我正在使用ghdl (0.32rc1)运行自动测试台。我的一些测试需要来自Xilinx的unisim原语。
我准备了两个外部文件,如果其中一个想测试我的例子。要运行我的示例,您需要一个Xilinx或Vivado安装,这样您就可以找到MUXCY原语。它位于<InstallDir>\ISE_DS\ISE\vhdl\src\unisims\primitive文件夹中。
我使用以下ghdl命令分析了这三个文件:
PS D:\Temp\ghdl> C:\Tools\GHDL\0.32RC1\bin\ghdl.exe -a --work=work C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\unisims\primitive\MUXCY.vhd
PS D:\Temp\ghdl> C:\Tools\GHDL\0.32RC1\bin\ghdl.exe -a --work=poc .\arith_prefix_and.vhdl
PS D:\Temp\ghdl> C:\Tools\GHDL\0.32RC1\bin\ghdl.exe -a --work=test .\arith_prefix_and_tb.vhdl
.\arith_prefix_and_tb.vhdl:96:16:warning: universal integer bound must be numeric literal or attribute到目前为止没有任何错误。
现在,我开始了模拟,这只是ghdl.exe -r on Windows (Linux:-e和-r):
PS D:\Temp\ghdl> C:\Tools\GHDL\0.32RC1\bin\ghdl.exe -r --work=test arith_prefix_and_tb
.\arith_prefix_and.vhdl:79:40:warning: 'mux' is not bound
.\arith_prefix_and.vhdl:43:14:warning: (in default configuration of arith_prefix_and(rtl))现在ghdl报告说mux无法绑定。
我也尝试了参数--syn-binding和-P.,但是没有什么改变。
我要做什么来绑定MUXCY组件?
有人能创造一个'ghdl‘标签吗?我没有足够的名声:)
发布于 2015-01-13 18:44:00
下面是我解决这个问题的方法:
首先,分析unisim库中的MUXCY,如下所示:
ghdl -a --work=unisim C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\unisims\primitive\MUXCY.vhd注意该命令中的--work=unisim。
然后,确保将library UNISIM;添加到arith_prefix_and.vhdl文件的顶部。
这样就行了。
我认为这里发生的事情是,由于您在分析work时将poc库的名称重写为--work=poc,所以它看不到在名为work的实际库中分析的MUXCY实体,因此无法找到将MUXCY组件绑定到的默认实体。
https://stackoverflow.com/questions/27928409
复制相似问题