2

I was curious if anybody has had any luck compiling the entire Xilinx ISE unisims library for GHDL simulator? I tried to compile just the package file for unisims and it gives me an error.

I Was wondering if it will compile completely by commenting out the unsupported sections of VHDL code... or it there's something else that needs to be done such as compiling a difference vital library or using different version --std. because I know I can pull out a single unisims component and compile with ghdl... just wondering how to complete 90% of the remaining components.

$ ghdl -a --std=08 --work=unisims C:/Xilinx/14.7/ISE_DE/ISE/vhdl/src/unisims/unisim_VCOMP.vhd

$ ghdl -a --std=08 --work=unisims C:/Xilinx/14.7/ISE_DE/ISE/vhdl/src/unisims/unisim_VPKG.vhd

ERROR: ../../src/vital2000/timing_p.vhdl:152:14: result subtype of a pure function cannot have access subelements
Paebbels
  • 15,573
  • 13
  • 70
  • 139
Bimo
  • 5,987
  • 2
  • 39
  • 61
  • VITAL is no longer supported by the IEEE, the VITAL TIMING package isn't compliant with the VHDL standard. The FUNCTION VitalTimingDataInit return type VitalTimingDataType has access type elements. Impure functions aren't formal proofs, requiring a massive rewrite or semantic legerdemain. See ghdl [issue 716](https://github.com/ghdl/ghdl/issues/716) where what's necessary to successfully analyze timing_p.vhdl is shown: `ghdl -a --std=08 -frelaxed-rules timing_p.vhdl`. The command line flag will produce a warning for this issue instead of an error and is found in Paebbel's scripts. –  May 10 '19 at 23:12
  • You'd need protected types (VHDL -2002, -2008) to avoid sleight of hand fixes, where VITAL 2000 was also used with -1993 and the majority of historic VITAL uses are VITAL 1995 which has the same issue in package vital_timing. –  May 10 '19 at 23:18

1 Answers1

2

GHDl is delivered with scripts to precompile libraries like Xilinx ISE primitive libraries (unisim, unimacro, uniprim, ...).

See this documentation: https://ghdl.readthedocs.io/en/latest/building/PrecompileVendorPrimitives.html

You can run the scripts in verbose or debug mode, to see all command line calls to GHDL and the applied parameters.

Bash:

./compile-xilinx-ise.sh -d

PowerShell:

.\compile-xilinx-ise.ps1 -Debug
Paebbels
  • 15,573
  • 13
  • 70
  • 139