Home
  • Products
  • Solutions
  • Support
  • Company
  • Products
  • Solutions
  • Support
  • Company
Community Implementation Functional coverage: array of covergroups

Stats

  • State Not Answered
  • Replies 1
  • Subscribers 7
  • Views 6300
  • Members are here 0

Functional coverage: array of covergroups

CK47
CK47 over 2 years ago

Hi 
I need to create a array of cover groups. I declared the covergroup in a class and created a array of classes. I used generate block to instantiate the class.

Once I run the tests to get coverage, the IMC tool shows only one instance of the class and covergroup in functional coverage section. How ever there are multiple instances of this covergroup created in code coverage section. 

I need multiple instances of the covergroup in functional coverage section. 

Below is the code I used - 

class cg_wrapper ;
covergroup cg_test with function sample(bit x);
cp_temp: coverpoint x { bins zero_1 = (0=>1);
bins one_0 = (1=>0);}
endgroup

function new (string name = "cg_temp_w");
cg_test = new();
cg_test.set_inst_name(name);
endfunction

function sample (bit x);
cg_test.sample(x);
endfunction
endclass

genvar kk ;
generate for(kk = 0;kk<9;kk++)
begin : cg_test_wrap
cg_wrapper wrapper_inst = new(temp_bit[kk]);
end
endgenerate

  • Reply
  • Cancel
  • Cancel
  • Diego Manas
    0 Diego Manas 7 months ago

    Late to the party here, but just in case somebody stumbles upon this. To enable per instance collection, you need to add "option.per_instance = 1;" to your covergroup. Otherwise, all gets collected into the same bucket

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2023 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information