Hello GHDL users,

while doing some experiments with the OSVVM library (which GHDL is able to 
compile) I stumbled upon
a potentially bug within GHDL. There are 3 overloaded procedures within the 
RandomPType protected type
to initialize the random generators of the OSVVM library;

procedure InitSeed (S : string ) is
    begin
      RandomSeed := GenRandSeed(S) ;
end procedure InitSeed ;

procedure InitSeed (I : integer ) is
    begin
      RandomSeed := GenRandSeed(I) ;
end procedure InitSeed ;

procedure InitSeed (IV : integer_vector ) is
    begin
      RandomSeed := GenRandSeed(IV) ;
end procedure InitSeed ;


The documentation gives the hint to call the procedure with the instance_name 
attribute of the variable, which is used
to generate the random numbers. If you call the init procedure on a local 
variable in a process, all is fine. 
Bit when you call it on a shared variable, there is an exception error when 
trying to analyze the design:

path_add_element: cannot handle IIR_KIND_PACKAGE_BODY (tb_pkg.vhd:32:14)

******************** GHDL Bug occured ****************************
Please report this bug on http://gna.org/projects/ghdl
GHDL release: GHDL 0.31 (20140108) [Dunoon edition]
Compiled with GNAT Version: GPL 2013 (20130314)
In directory: /Users/torstenmeissner/Projects/osvvm/trias/
Command line:
/opt/ghdl/gcc-4.8.2/libexec/gcc/x86_64-apple-darwin13.0.0/4.8.2/ghdl1 --std=02 
-P/opt/ghdl/gcc-4.8.2/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2/vhdl/lib//v93/std/
 
-P/opt/ghdl/gcc-4.8.2/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2/vhdl/lib//v93/synopsys/
 -quiet -o tb_pkg.s tb_pkg.vhd
Exception TYPES.INTERNAL_ERROR raised
Exception information:
Exception name: TYPES.INTERNAL_ERROR
Message: errorout.adb:71
Call stack traceback locations:
0x101282507 0x1012ace41 0x1012b4d42 0x1012d71ac 0x1012f2f49 0x1012f4e6b 
0x1012f4eb2 0x10130156f 0x101300093 0x101300ff9 0x101301bd8 0x101306884 
0x10125f024 0x10123f8b3 0x10124b0ef 0x10124cc1a 0x10124265e 0x10125f084 
0x10123ec04
******************************************************************

Execution terminated by unhandled exception
Exception name: TYPES.INTERNAL_ERROR
Message: errorout.adb:71
Call stack traceback locations:
0x101282507 0x1012ace41 0x1012b4d42 0x1012d71ac 0x1012f2f49 0x1012f4e6b 
0x1012f4eb2 0x10130156f 0x101300093 0x101300ff9 0x101301bd8 0x101306884 
0x10125f024 0x10123f8b3 0x10124b0ef 0x10124cc1a 0x10124265e 0x10125f084 
0x10123ec04
ghdl: compilation error


Maybe the support for the instance_name attribute on shared variables is broken?
My workaround is to use the instance_name attribute of the procedure, which I 
use as wrapper around the
InitSeed() call. when I'm doing that, GHDL is compiling without errors.

Besides of that, I'm very happy that there are GHDL binary packages for a bunch 
of operation systems on
the sourceforge site. So, the installation is much easier on OSX for example :)


Greets,
Torsten


--

Blog:   http://blog.goodcleanfun.de
Github:         https://github.com/tmeissner


_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to