将 Unisim 与 GHDL 结合使用:在 ieee 库中找不到 important_timing 和 important_primitives
我正在尝试模拟一个使用 ISE 附带的 Xilinx Unisim 库中的组件的组件。我怎样才能做到这一点?
这是我尝试过的。我遇到了一个我不明白的问题。
$ ls
DualPortMemory.vhd TestDualPortMemory.vhd Utilities.vhd
$ ghdl --clean
$ ghdl -i --work=unisim /opt/Xilinx/14.7/ISE_DS/ISE/vhdl/src/unisims/*.vhd
$ ghdl -i --work=unisim /opt/Xilinx/14.7/ISE_DS/ISE/vhdl/src/unisims/primitive/*.vhd
$ ghdl -i *.vhd
$ ghdl -m -g -Punisim --warn-unused --ieee=synopsys TestDualPortMemory
/opt/Xilinx/14.7/ISE_DS/ISE/vhdl/src/unisims/primitive/RAMB16_S9_S18.vhd:24:10:error: unit "vital_timing" not found in library "ieee"
/opt/Xilinx/14.7/ISE_DS/ISE/vhdl/src/unisims/unisim_VPKG.vhd:48:10:error: unit "vital_timing" not found in library "ieee"
/opt/Xilinx/14.7/ISE_DS/ISE/vhdl/src/unisims/unisim_VPKG.vhd:49:10:error: unit "vital_primitives" not found in library "ieee"
/opt/Xilinx/14.7/ISE_DS/ISE/vhdl/src/unisims/unisim_VPKG.vhd:66:16:error: no declaration for "vitaltablesymboltype"
/opt/Xilinx/14.7/ISE_DS/ISE/vhdl/src/unisims/unisim_VPKG.vhd:67:16:error: no declaration for "vitaltablesymboltype"
然后还有更多的错误。
以下是 GHDL 版本信息:
GHDL 0.37 (Ubuntu 0.37+dfsg-1ubuntu1) [Dunoon edition]
Compiled with GNAT Version: 9.3.0
llvm code generator
Written by Tristan Gingold.
Copyright (C) 2003 - 2020 Tristan Gingold.
GHDL is free software, covered by the GNU General Public License. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

Vital 包似乎不存在于 GHDL 二进制文件中,但它存在于源代码中。您可以在 /lib/ghdl/gcc/vhdl/ieee/v93 中检查 .o 文件,在 /lib/ghdl/gcc/vhdl/src/ieee/v93 中检查 .vhd 源。
如果源不存在,则从以下位置下载:
https://github.com/ghdl/ghdl/tree/master/libraries/重要95
并按所示顺序使用“sudo ghdl -a --workdir=/lib/ghdl/gcc/vhdl/ieee/v93 --work=ieee fatal_timing.vhd fatal_timing-body.vhd fatal_primitives.vhd fatal_primitives-body.vhd”进行编译。其中 workdir 表示保存已编译包的路径。
我不知道它是否有助于模拟,但 unisim 为我编译了。
Vital package doesn't seem to be present in GHDL binary but it is there in source. you can check in /lib/ghdl/gcc/vhdl/ieee/v93 for .o files and /lib/ghdl/gcc/vhdl/src/ieee/v93 for .vhd sources.
if sources are not present then download them from:
https://github.com/ghdl/ghdl/tree/master/libraries/vital95
and compile using "sudo ghdl -a --workdir=/lib/ghdl/gcc/vhdl/ieee/v93 --work=ieee vital_timing.vhd vital_timing-body.vhd vital_primitives.vhd vital_primitives-body.vhd" in order shown. where workdir represents path to wherever compiled packages are saved.
I don't know if it will help the simulation but unisim compiled for me.