• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. Problem with functional coverage

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 66
  • Views 16639
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with functional coverage

danlarkin
danlarkin over 16 years ago
I'm having a problem with functional coverage collection. When I run the following testcase and inspect the results using ICCR I'm getting zero functional coverage. The relevant coverage directories are being created and I'm seeing the cover group inside ICCR so I'm not sure what I'm doing wrong?

Any thoughts?

module test();

class gen;
  rand logic[7:0]    a;
  rand logic[7:0]    b;
 
  event              ev_collect_coverage;

  covergroup cg_all @ev_collect_coverage;      
    c_a:             coverpoint a;
    c_b:               coverpoint b;
    cx:                cross c_a,c_b;
  endgroup

  function new( );      
    cg_all = new;
  endfunction: new
 
  function void post_randomize();
    ->ev_collect_coverage;        
  endfunction : post_randomize  
    
endclass

gen testgen;
bit flag;

initial
begin
 
  testgen = new();
   
  for (int i=0; i<10; i++)
    begin
      $display("------------------------------------------------------------");
      $display("---- CONFIG = %d",i);
      flag = testgen.randomize();     
      $display("A=%b",testgen.a);
      $display("B=%b",testgen.b);      
    end
end
endmodule
  • Cancel
Parents
  • danlarkin
    danlarkin over 16 years ago

    Just a brief follow-up question, is quering the coverage database through the coverage constructs (SystemVerilog LRM 18.7) supported? Because when I try to I get the following error message:

    This is not a valid built in method name for this object. [SystemVerilog]. 

    I've added the following inside the initial block of the above simple (corrected) testcase:

    cov_pt = testgen.cg_all.c_a.get_coverage();
    $display("CoverPoint coverage is %f", cov_pt);

    I also seem to get an error when I try get_inst_coverage and indeed $get_coverage()

    I'm using Incisive 6.2-s4

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • danlarkin
    danlarkin over 16 years ago

    Just a brief follow-up question, is quering the coverage database through the coverage constructs (SystemVerilog LRM 18.7) supported? Because when I try to I get the following error message:

    This is not a valid built in method name for this object. [SystemVerilog]. 

    I've added the following inside the initial block of the above simple (corrected) testcase:

    cov_pt = testgen.cg_all.c_a.get_coverage();
    $display("CoverPoint coverage is %f", cov_pt);

    I also seem to get an error when I try get_inst_coverage and indeed $get_coverage()

    I'm using Incisive 6.2-s4

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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.

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

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