SystemVerilog Q vs. assoc-array - which one to use for scoreboard

Hello,

Queues in SV provide more search related functions such as "find_first/find_index" etc. that aid in scoreboard modeling. It is true that assoc-arrays are slightly better at memory foot-print. Also indexing can be done via any field there, not in Q - but in Q one can use the "find_first..with" to do the same.

As you can see above - this debate is meaningless after a point (as our friend Keith/Metta pointed out nicely) - you use what is easy for you. Another aspect to consider is tool support.

As of today I'm aware of 4 EDA tools nicely support Qs, few have issues/limitations with assoc-arrays though. So check your tool doc too before you make a choice.

Regards

Srini

www.cvcblr.com

--- In ASICDESIGN@yahoogroups.com, Cool Cake <cool_cake20@...> wrote:

>

>

> Hi,

>

>         For this question , they posted answer as "queues" in a website.But I think associative array's are better suite in building score board.Because indexing is of any type where as in queues indexing is only of integral expression is allowed.

>

> I am bit confused here .But in my point answer is an associative arrays.

>

> I welcome all your views and what's your take on this.which one is used or which one best suites?.

>

>

> Regards

>

>

>

A good discussion on another forum where our CTO talked about these choices in System Verilog when it comes to functional verification.  Find details below. Another aspect to consider is the built-in scoreboard components becoming available with standard verification methodologies such as OVM, VMM and soon UVM. They all use Queues and some assoc-arrays as well.

And recently at ClubT India I learnt that Specman has now added this as an update to OVM-e scoreboard as well. So good for those Specmaniacs too!

Enjoy further reading below.

www.cvcblr.com

Hello,

Queues in SV provide more search related functions such as "find_first/find_index" etc. that aid in scoreboard modeling. It is true that assoc-arrays are slightly better at memory foot-print. Also indexing can be done via any field there, not in Q - but in Q one can use the "find_first..with" to do the same.

As you can see above - this debate is meaningless after a point (as our friend Keith/Metta pointed out nicely) - you use what is easy for you. Another aspect to consider is tool support.

As of today I'm aware of 4 EDA tools nicely support Qs, few have issues/limitations with assoc-arrays though. So check your tool doc too before you make a choice.

Regards

Srini

www.cvcblr.com

--- In ASICDESIGN@yahoogroups.com, Cool Cake <cool_cake20@...> wrote:

>

>

> Hi,

>

>         For this question , they posted answer as "queues" in a website.But I think associative array's are better suite in building score board.Because indexing is of any type where as in queues indexing is only of integral expression is allowed.

>

> I am bit confused here .But in my point answer is an associative arrays.

>

> I welcome all your views and what's your take on this.which one is used or which one best suites?.

>

>

> Regards

>

>

>

Comments

Popular posts from this blog

Smart one-liner for bit inversion in SystemVerilog

SystemVerilog Soft constraints usage in `uvm_do_with macro

Easier PLI integration with MPSim