Author Archive: Mansi kelawala

Array of Covergroups

In a testbench sometimes there is a need to take multiple instances of a covergroup as per protocol requirement.

In that case Array of Covergroup is needed.


By default the coverage information of all covergroup instances shall be grouped together and simulator shall create overall coverage of all the instances combined . So, user will not be able to see separate coverage information of each instance of covergroup.
There are some cases when user want to view separate coverage for all the instances. 

Example :

 In a testbench there can be more than one agents.  All of them belong to different transaction, different generator, different driver etc. In that case, if user may not want to view overall coverage of all the agents, instead individual agent coverage is required.

So, You can use SystemVerilog’s  single-word  Per instance Coverage option.

Here is the simple example how one can declare Array of Covergroup and how can use it.

Continue reading →

%d bloggers like this: