1

sudo apt-get install ghdl

似乎正确安装了所有东西,但没有 VHDL2008 库。我怎样才能添加这些?

/usr/bin/ghdl -i   --std=08 --work=work /home/user/Projects/endian_swapper/tests/../hdl/endian_swapper.vhdl && \
/usr/bin/ghdl -m   --std=08 --work=work endian_swapper_vhdl
/usr/bin/ghdl-gcc:warning: library ieee does not exists for v08
/usr/bin/ghdl-gcc:warning: library ieee does not exists for v08
/home/user/Projects/endian_swapper/tests/../hdl/endian_swapper.vhdl:42:9:error: cannot find resource library "ieee"
/home/user/Projects/endian_swapper/tests/../hdl/endian_swapper.vhdl:44:10:error: unit "std_logic_1164" not found in library "ieee"
/home/user/Projects/endian_swapper/tests/../hdl/endian_swapper.vhdl:45:10:error: unit "numeric_std" not found in library "ieee"

~

4

2 回答 2

0

对于 GHDL-v0.37,我也遇到了这个问题。尝试安装开发者版本。

git clone https://github.com/ghdl/ghdl.git
cd ghdl
sudo apt install gnat
./configure --prefix=/usr/local
make
make install

参考:

于 2021-06-01T15:01:32.907 回答
0

您安装的 GHDL 包似乎是使用“openieee”构建的,而不是包含来自 IEEE 的库。这是因为许可/分发问题。您需要安装 GHDL 的“常规”构建,或从https://github.com/ghdl/ghdl/tree/master/libraries下载并构建/安装库。

根据https://github.com/ghdl/ghdl/issues/1255#issuecomment-619308878,将来,VHDL 2008 的开源 IEEE 库将与 GHDL 的“openieee”版本一起分发。

于 2020-04-27T21:16:19.850 回答