• 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. Coverage not getting hit when trying with IUS simulator

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 65
  • Views 14814
  • 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

Coverage not getting hit when trying with IUS simulator

anikam
anikam over 7 years ago

Hi

I am seeing discrepancy in cover bins getting hit , I have total 10 cover bins out of which valid 8 get hit with VCS , however with IUS none of my valid bin gets hit.

I have put display prints to see whether "values" are being received in monitor call back file or not, I see that prints are coming with correct values for both IUS and VCS , however the bin doesn't get hit, when seen with imc -gui tool.

Please can anyone help in this regard.

Regards

Anika

  • Cancel
Parents
  • tpylant
    tpylant over 7 years ago

    Can you provide more details of your cover group? Sharing an example would be extremely helpful. Please show the cover group trigger and explain how the trigger signal is generated.

    Thanks,
    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • anikam
    anikam over 7 years ago in reply to tpylant

    Thanks tim for your response.

    Let me give an example :

    class A extends def_cov_data_callback;

    covergroup transaction_type@(xact_sample);
        type_option.comment = "coverage";
        option.per_instance = 1;

        cmd : coverpoint xact.cmd iff((xact.set_ccc == 0) && (xact.data_type == `ABC)) 
        {
          option.comment = "This coverpoint captures coverage of commands sent by Master";
          bins write_cmd     = {WRITE};
          bins read_cmd      = {READ};
        }

        broadcast_header : coverpoint xact.broadcast_header
        {
          option.comment = "This coverpoint captures coverage of commands sent by Master";
          bins with_brdcast_header     = {1};
          bins without_brdcast_header  = {0};
        }

    .....

    ....

    and so on

    endgroup

    endclass

    This xact_sample is event which is declared in file "cov_data_callback.sv"

    class cov_data_callback extends callback;

    event xact_sample;

    function transaction_observed_cov()

    ...

    $display("PRINTING XACT")

    xact.print(); ----------------------------------- Till this point my displays come fine in the log with IUS , I see correct values but still bin doesn't hit.

    ->this.xact_sample

    endfunction

    endclass

    Let me know if you need any other information

    Regards

    Anika

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • anikam
    anikam over 7 years ago in reply to tpylant

    Thanks tim for your response.

    Let me give an example :

    class A extends def_cov_data_callback;

    covergroup transaction_type@(xact_sample);
        type_option.comment = "coverage";
        option.per_instance = 1;

        cmd : coverpoint xact.cmd iff((xact.set_ccc == 0) && (xact.data_type == `ABC)) 
        {
          option.comment = "This coverpoint captures coverage of commands sent by Master";
          bins write_cmd     = {WRITE};
          bins read_cmd      = {READ};
        }

        broadcast_header : coverpoint xact.broadcast_header
        {
          option.comment = "This coverpoint captures coverage of commands sent by Master";
          bins with_brdcast_header     = {1};
          bins without_brdcast_header  = {0};
        }

    .....

    ....

    and so on

    endgroup

    endclass

    This xact_sample is event which is declared in file "cov_data_callback.sv"

    class cov_data_callback extends callback;

    event xact_sample;

    function transaction_observed_cov()

    ...

    $display("PRINTING XACT")

    xact.print(); ----------------------------------- Till this point my displays come fine in the log with IUS , I see correct values but still bin doesn't hit.

    ->this.xact_sample

    endfunction

    endclass

    Let me know if you need any other information

    Regards

    Anika

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • tpylant
    tpylant over 7 years ago in reply to anikam

    Here is the complete code I generated based on your example:

    typedef enum bit {READ, WRITE} cmd_e;
    typedef enum bit {ABC, XYZ} data_e;

    class xact_c;
      rand cmd_e  cmd;
           bit    set_ccc;
      rand data_e data_type;

      constraint cmd_const {data_type dist {ABC := 1, XYZ := 1};}  
      constraint type_const {data_type dist {ABC := 1, XYZ := 1};}

      function void print();
        $display("xact print %n, %b, %n", cmd, set_ccc, data_type);
      endfunction
    endclass

    class cov_data_callback;
      event xact_sample;
      xact_c xact = new();

      function void transaction_observed_cov();
        $display("PRINTING XACT");
        xact.print();
        //Till this point my displays come fine in the log with IUS
        //I see correct values but still bin doesn't hit.
        ->this.xact_sample;
      endfunction
    endclass

    class A extends cov_data_callback;
      covergroup transaction_type @(xact_sample);
        type_option.comment = "coverage";
        option.per_instance = 1;
        cmd : coverpoint xact.cmd iff((xact.set_ccc == 0) && (xact.data_type == ABC))
        {
          option.comment = "This coverpoint captures coverage of commands sent by Master";
          bins write_cmd = {WRITE};
          bins read_cmd = {READ};
        }
      endgroup

      function new();
        super.new();
        transaction_type = new();
      endfunction
    endclass

    module test;
      A grpTest = new();
      initial begin
        repeat (10) begin
          #1 void'(grpTest.xact.randomize());
          grpTest.transaction_observed_cov();
        end
      end
    endmodule

    The output is:

    PRINTING XACT
    xact print WRITE, 0, ABC
    PRINTING XACT
    xact print WRITE, 0, XYZ
    PRINTING XACT
    xact print WRITE, 0, ABC
    PRINTING XACT
    xact print WRITE, 0, XYZ
    PRINTING XACT
    xact print WRITE, 0, ABC
    PRINTING XACT
    xact print WRITE, 0, XYZ
    PRINTING XACT
    xact print READ, 0, ABC
    PRINTING XACT
    xact print WRITE, 0, XYZ
    PRINTING XACT
    xact print WRITE, 0, ABC
    PRINTING XACT
    xact print WRITE, 0, XYZ

    And the coverage is:

    So with my example, the coverage report is lining up with the displayed output.

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • 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.

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

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