3

sudo apt-get install ghdl

seems to install everything correctly, but no VHDL2008 libraries. How can I add these?

/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"

~

Marcus
  • 41
  • 1
  • 4

2 Answers2

1

It seems that the package of GHDL that you installed was built with "openieee", instead of including libs from IEEE. This is because of licensing/distribution issues. You need to install a "regular" build of GHDL, or to download and build/install the libraries from https://github.com/ghdl/ghdl/tree/master/libraries.

According to https://github.com/ghdl/ghdl/issues/1255#issuecomment-619308878, in the future, open source IEEE libs for VHDL 2008 will be distributed with "openieee" builds of GHDL.

0

I get into this issue too for GHDL-v0.37. Try install the developer version.

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

reference: