Hello guys,

it's good to see the new 0.32 release, great work :)

Last year there were some efforts of Brian to get the OSVVM library running 
with GHDL . So, I've tried it today.
I took the latest release of  OSVVM which is 2013.05. The first thing I 
noticed: there is no Demo_Rand.vhd design anymore.

Next step was getting the ieee_proposed packages:

env_c.vhd
numeric_std_additions.vhd
numeric_std_unsigned_c.vhd
standard_additions_c.vhd
standard_textio_additions_c.vhd

I've done the changes in the source files described the document "Creating a 
VHDL-2002 version of OSVVM packages"
(commenting out the ieee_proposed library use lines). Furthermore I've to add 
the  numeric_std_additions & numeric_std_unsigned libraries
to fullfill the use of ieee.numeric_std_unsigned.all; (changed to 
ieee_proposed.numeric_std_unsigned.all;) in RandomPkg.vhd.

So, my compile steps are as Brian mentioned in 
https://mail.gna.org/public/ghdl-discuss/2013-04/msg00026.html (plus the 2 
numeric_std_* files):

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
ghdl -a --std=02 --work=ieee_proposed 
../../ieee_proposed/numeric_std_additions.vhd
ghdl -a --std=02 --work=ieee_proposed 
..../ieee_proposed/numeric_std_unsigned_c.vhd

ghdl -a --std=02 --ieee=synopsys ../../packages/SortListPkg_int.vhd
ghdl -a --std=02 --ieee=synopsys ../../packages/RandomBasePkg.vhd
ghdl -a --std=02 --ieee=synopsys ../../packages/RandomPkg.vhd
ghdl -a --std=02 --ieee=synopsys ../../packages/CoveragePkg.vhd


With ghdl -a --std=02 --ieee=synopsys ../../packages/RandomPkg.vhd I got this 
error:

../../packages/RandomPkg.vhd:1108:28: No overloaded subprogram found matching 
'find_leftmost'
../../packages/RandomPkg.vhd:1166:26: operator "<=" is overloaded
../../packages/RandomPkg.vhd:1166:26: possible interpretations are:
../../ieee_proposed/numeric_std_unsigned_c.vhd:802:12: function "<=" 
[std_logic_vector, std_logic_vector return boolean]
../../../../libraries/ieee/std_logic_1164.v93:69:10: implicit function "<=" 
[std_logic_vector, std_logic_vector return boolean]
../../packages/RandomPkg.vhd:1166:26: (you may like to use the -fexplicit 
option)


The first error is a "bug" in the OSVVM library itself. There is no function 
definition for find_leftmost() which takes unsigned, as used in 
RandomPkg.vhd:1108:

    impure function RandUnsigned (Max : unsigned) return unsigned is
      alias normMax : unsigned (Max'length downto 1) is Max ;
      variable Result : unsigned(Max'range) := (others => '0') ;
      alias normResult : unsigned(normMax'range) is Result ; 
      variable Size : integer ;
    begin
      -- Size = -1 if not found or Max'length = 0
      Size := find_leftmost(normMax, '1') ; 
    ...

there are only definitions for std_logic_vector & std_ulogic_vector in 
ieee_proposed.numeric_std_unsigned:

function find_leftmost (ARG : STD_ULOGIC_VECTOR; Y : STD_ULOGIC) return INTEGER;
function find_leftmost (ARG : STD_LOGIC_VECTOR; Y : STD_ULOGIC) return INTEGER;

Maybe there are some more definitions in the final VHDL-08 version of this 
package ...

The second one is simple imho, I have to select one of the two definitions 
explicitly, by adding the -fexplicit command line parameter:
ghdl -a --std=02 --ieee=synopsys -fexplicit  ../../../packages/RandomPkg.vhd 

With the -fexplicit switch I can get this compiled.
So, I step forward to the sensors.vhd example.

ghdl -a --std=02 --ieee=synopsys -fexplicit ../src/sensors.vhd 
../src/sensors.vhd:108:46: can't resolve overload for 'randcovpoint'
../src/sensors.vhd:108:46: possible interpretations are:
*std_standard*:1:1: integer subtype "integer"
../../../ieee_proposed/standard_additions_c.vhd:178:26: array type 
"integer_vector"

Mhm, here I don't know what have to do. The integer_vector type is defined in 
the ieee_proposed.std_additions library:

type INTEGER_VECTOR is array (NATURAL range <>) of INTEGER;

So I've added it to the sensors.vhd file:

library ieee_proposed;
use ieee_proposed.standard_additions.all;

But no success :(

Does anybody has any experience with compiling the current version of the OSVVM 
(2013.05) with GHDL 0.31 (mcode on OSX10.9)?


Greetings,
Torsten



--

Blog:   http://blog.goodcleanfun.de


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

Reply via email to