Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

multiple instances of a covergroup inside a class

Status
Not open for further replies.

shashi003

Newbie level 2
Joined
Sep 2, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
Hi,

Can we create multiple instances of a covergroup defined inside a class? It's giving an error when I do that?

class test;
bit [2:0] a;
covergroup cg;
A: coverpoint a { bins a0={0}; bins a1={1}; bins a2={2}; }
endgroup
function new(bit[2:0] a);
this.a = a;
cg c1=new();
cg c2=new();

endfunction
endclass

How can I create multiple instances of a covergroup?

Thanks,
Shashi.
 

No you can't, and what would be the benefit of doing so? It would just be redundant.

The purpose of declaring a covergroup within a class is to calculate coverage of its members. And many times you want coverage merged across all objects of a particular type, not per instance coverage.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top