Using Unisim with GHDL: vital_timing and vital_primitives not found in ieee library

526 Views Asked by At

I'm trying to simulate a component that uses a component from the Xilinx Unisim library that came with ISE. How can I do that?

Here is what I tried. I ran into a problem I don't understand.

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

And then many many more errors.

Here is the GHDL version information:

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.
1

There are 1 best solutions below

0
On

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.