ghdl
ghdl copied to clipboard
evaluation of static aggregates
trafficstars
Bug occurring when utilizing VUnit with GHDL. The code was originally written in Xilinx ISE 14.7 and can be compiled there. The source files are attached as a zip file. Can somebody tell me what goes wrong?
Thanks, Gustav
******************** GHDL Bug occured ****************************
Please report this bug on https://github.com/tgingold/ghdl/issues
GHDL release: 0.35 (tarball) [Dunoon edition]
Compiled with GNAT Version: GPL 2017 (20170515-63)
Target: i686-pc-mingw32
In directory: C:\workspace\1091\fw\FPGA\head\hw_rev_u4\fpga\GHDL_bug_report\bug1\Debug\src\VUnit\
Command line:
C:\Program Files\GHDL\bin\ghdl.exe -a --workdir=C:\workspace\1091\fw\FPGA\head\hw_rev_u4\fpga\GHDL_bug_report\bug1\Debug\src\VUnit\vunit_out\ghdl\libraries\fpga_lib --work=fpga_lib --std=08 -PC:\works
pace\1091\fw\FPGA\head\hw_rev_u4\fpga\GHDL_bug_report\bug1\Debug\src\VUnit\vunit_out\ghdl\libraries\vunit_lib -PC:\workspace\1091\fw\FPGA\head\hw_rev_u4\fpga\GHDL_bug_report\bug1\Debug\src\VUnit\vunit
_out\ghdl\libraries\fpga_lib --ieee=synopsys C:\workspace\1091\fw\FPGA\head\hw_rev_u4\fpga\GHDL_bug_report\bug1\Debug\src\master_Bug.vhd
Exception TYPES.INTERNAL_ERROR raised
Exception information:
raised TYPES.INTERNAL_ERROR : errorout.adb:246
******************************************************************
I think the crash is due to an unsupported vhdl 2008 feature: aggregates can now be locally static. I plan to implement that feature.
Had to adjust the root and add_source_files args in the run_debug.py file, but I could reproduce the bug with a recent build of GHDL:
# python3 run_debug.py
Compiling into fpga_lib: ../master_Bug.vhd
C:/msys64/mingw64/lib/python3.8/site-packages/vunit/sim_if/ghdl.py:256: Warning: 'ghdl.flags' is deprecated and it will be removed in future releases; use 'ghdl.a_flags' instead
warn(
failed
=== Command used: ===
C:/msys64/mingw64/bin/ghdl -a --workdir=D:/ghdl/ghdl/temp/VUnit/vunit_out/ghdl/libraries/fpga_lib --work=fpga_lib --std=08 -PD:/ghdl/ghdl/temp/VUnit/vunit_out/ghdl/libraries/vunit_lib -PD:/ghdl/ghdl/temp/VUnit/vunit_out/ghdl/libraries/fpga_lib --ieee=synopsys D:/ghdl/ghdl/temp/master_Bug.vhd
=== Command output: ===
build_constant: cannot handle IIR_KIND_AGGREGATE (D:/ghdl/ghdl/temp/master_Bug.vhd:52:73)
******************** GHDL Bug occurred ***************************
Please report this bug on https://github.com/ghdl/ghdl/issues
GHDL release: 1.0-dev (0.37.0.r1270.gb65ee8c3) [Dunoon edition]
Compiled with GNAT Version: 10.2.0
Target: x86_64-w64-mingw32
D:\data-dev\eine\ghdl\ghdl\temp\VUnit\
Command line:
C:\msys64\mingw64\bin\ghdl1-llvm.exe --workdir=D:/ghdl/ghdl/temp/VUnit/vunit_out/ghdl/libraries/fpga_lib --work=fpga_lib --std=08 -fsynopsys -PD:/ghdl/ghdl/temp/VUnit/vunit_out/ghdl/libraries/vunit_lib\ -PD:/ghdl/ghdl/temp/VUnit/vunit_out/ghdl/libraries/fpga_lib\ -PC:\msys64\mingw64\lib/ghdl\ieee\v08\ -PC:\msys64\mingw64\lib/ghdl\ -c -o D:/ghdl/ghdl/temp/VUnit/vunit_out/ghdl/libraries/fpga_lib\master_Bug.o D:/ghdl/ghdl/temp/master_Bug.vhd
Exception TYPES.INTERNAL_ERROR raised
Exception information:
raised TYPES.INTERNAL_ERROR : vhdl-errors.adb:32
Call stack traceback locations:
0x4a78bf 0x4e3b5e 0x4eeeb4 0x4eef74 0x558d5e 0x5591b9 0x57243f 0x572515 0x573546 0x572553 0x573546 0x5736b3 0x57421c 0x574983 0x574bc1 0x574d03 0x534787 0x53b2d7 0x52263f 0x636ee6 0x638bba 0x63a495 0x402706 0x4013bf 0x4014f4 0x7ffaa4177032 0x7ffaa549d0cf
******************************************************************
C:\msys64\mingw64\bin\ghdl.exe: compilation error
Compile failed