Next: Using ieee.math_real or ieee.math_complex, Previous: Top entity, Up: GHDL implementation of VHDL
Many vendors libraries have been analyzed with GHDL. There are usually no problems. Be sure to use the --work= option. However, some problems have been encountered.
GHDL follows the VHDL LRM (the manual which defines VHDL) more strictly than other VHDL tools. You could try to relax the restrictions by using the --std=93c, -fexplicit and --warn-no-vital-generic.
Even with these relaxations, some broken libraries may fail.
For example, unisim_VITAL.vhd
from Xilinx
can't be
compiled because lines such as:
variable Write_A_Write_B : memory_collision_type := Write_A_Write_B; variable Read_A_Write_B : memory_collision_type := Read_A_Write_B;
(there are 6 such lines). According to VHDL visibility rules, ‘Write_A_Write_B’ cannot be used while it is defined. This is very logical because it prevents from silly declarations such as
constant k : natural := 2 * k;
This files must be modified. Fortunately, in the example the variables are never written. So it is enough to remove them.