Reply To: GHDL workarounds – any known ones?

Why OSVVM™? Forums OSVVM GHDL workarounds – any known ones? Reply To: GHDL workarounds – any known ones?

#2466
Jim Lewis
Member

Hi Ajeetha,
WRT scoreboards, there are no known issues with either GHDL or NVC.

There is a subtle VHDL thing with using or referencing multiple generic packages that declare a type – such as ScoreboardIDType that is declared in ScoreboardGenericPkg.

If you reference only one Scoreboard package instance, such as ScoreboardPkg_slv, then the following is fine:

library OSVVM ;
context OSVVM.OSvvmContext ;
use OSVVM.ScoreboardPkg_slv.all ; 
entity e ...
architecture a of e is 
  signal SB1 : ScoreboardIDType ;
begin
  initialize : process
  begin
    SB1 <= NewID("SB1") ; 
    . . . 

OTOH, if you reference a second scoreboard, then you need to disambiguate ScoreboardIDType, but that happens in the type reference and not in the methods.

library OSVVM ;
context OSVVM.OSvvmContext ;
use OSVVM.ScoreboardPkg_slv.all ; 
use OSVVM.ScoreboardPkg_int.all ; 
entity e ...
architecture a of e is 
  signal SB1 : osvvm.ScoreboardPkg_slv.ScoreboardIDType ; -- all the disambiguation you need.
begin
  initialize : process
  begin
    SB1 <= NewID("SB1") ; 
    . . . 

Looking at the code you provided it is either due to preference or a misunderstanding. I have seen code where people prefer to reference specific subprograms from a package. I would think though they would also need to reference ScoreboardIDType as that is required to use these subprograms.

It is possible that someone arrived at that code by starting with a misunderstanding of what went wrong when using two scoreboard packages. So they pealed things back until they got something that worked without really understanding that their issues were due to including the second scoreboard package.

In addition to needing to disambiguate ScoreboardIDType, the only other call that needs to be disambiguated is the calls to WriteScoreboardYaml. Anything subprogram that has ScoreboardIDType as a parameter is disambiguated by the signal with which it is called.

Need additional examples see: OsvvmLibraries/AXI4/Axi4/src/Axi4Manager.vhd and search on ScoreboardIDType. I used the selected path that includes the library and package in Axi4Manager as if someone uses it as a template, they will not have issues.

Cheers,
Jim