On Sat, 2013-03-09 at 18:59 +0100, Torsten Meißner wrote:
> Hallo GHDL users,
>
>
> i try to compile the vhdl-files of the OSVVM (open source vhdl verification
> library), a verification library
> which you can find under http://osvvm.org/ The authors claim, that the lib
> should run fine with VHDL-2002.
> For this, you have to compile and include the ieee_proposed packages, which
> add the VHDL-2008 features
> to the simulator.
>
> So, i have done following steps in my makefile (sensors.vhd is the test
> design)
>
> sensors.ghw : *.vhd
> ghdl -a --std=02 --work=ieee_proposed
> ieee_proposed/standard_additions_c.vhdl
> ghdl -a --std=02 --work=ieee_proposed
> ieee_proposed/standard_textio_additions_c.vhdl
The following 5 appear to be unnecessary with OSVVM package 2.3.1 now
available at http://www.synthworks.com/downloads/OS-VVM_2_3_1.zip
It only supplies the former two, and with these
> # ghdl -a --std=02 --work=ieee_proposed ieee_proposed/env_c.vhdl
> # ghdl -a --std=02 --work=ieee_proposed
> ieee_proposed/std_logic_1164_additions.vhdl
> # ghdl -a --std=02 --work=ieee_proposed
> ieee_proposed/numeric_std_additions.vhdl
> # ghdl -a --std=02 --work=ieee_proposed
> ieee_proposed/numeric_std_unsigned_c.vhdl
> # ghdl -a --std=02 --work=ieee_proposed
> ieee_proposed/fixed_float_types_c.vhdl
> ghdl -a --std=02 --ieee=synopsys SortListPkg_int.vhd
and here is the error.
> ghdl -a --std=02 --ieee=synopsys RandomBasePkg.vhd
SortListPkg_int.vhd:370:17: (type of 'a' is arrayofelementtype)
SortListPkg_int.vhd:75:30: (type of constant interface "a" is
elementtype)
This occurs at line 370:
variable Result : SortListPType ;
begin
Result.Add(A) ; --370
as you suspected, because of the overloaded procedures.
This does look to me like a GHDL error.
Until we can fix this, a crude workaround is to overcome the overloading
by renaming procedures:
type SortListPType is protected
procedure add ( constant A : in ElementType ) ;
procedure addA ( constant A : in ArrayofElementType ) ;
procedure addB ( constant A : in ArrayofElementType ; Min, Max :
integer ) ;
The renaming of addA also affects the procedure body and ONE call site
(line 370) in the same file.
The renaming of addB affects the procedure body, and three call sites in
RandomPkg.vhd (which the compiler will find for you!)
This leaves a similar overloading failure in RandomPkg :
procedure InitSeedS (S : string ) ;
procedure InitSeed (I : integer ) ;
procedure InitSeed (IV : integer_vector ) ;
affecting the procedure body, and two call sites in CoveragePkg.vhd
(lines 1049,1071 which again, the compiler will point out!)
In all cases, these are overloaded procedures in protected types.
Outside protected types, overloading appears to work satisfactorily, and
hopefully this will be enough of a clue to localise and fix the trouble
relatively easily.
Meanwhile, I hope this workaround (however ugly) allows progress to be
made in using OSVVM with GHDL.
- Brian
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss