• 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. how to merge coverage for each instances of the agents

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 65
  • Views 15181
  • 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

how to merge coverage for each instances of the agents

mukukr
mukukr over 3 years ago

I am having a coverage class like this:

covergroup dst_addr_cov @(drv_dst_addr_event);
   dst_addr_cp: coverpoint cov_dst_addr { ignore_bins invalid_dst_addr = {19, 24, [27:59], 64, [65:$]};}
endgroup : dst_addr_cov

Instantiated for all the agents, how to see the merged coverage? hoping this will cover all signals for all agent instances.

  • Cancel
  • StephenH
    StephenH over 3 years ago

    You need to look for the class name under the "Types" tree, this gives the merged coverage for all instances of that agent class.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mukukr
    mukukr over 3 years ago in reply to StephenH

     

    Thanks for the reply Stephen, I can see the bins for the Cover Point here, but I wanted to see the bins that are being created by each instance of the agents. as I am having 20+ instances of the agent so where can I see the bins based on agent number? 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • StephenH
    StephenH over 3 years ago in reply to mukukr

    I'm not sure exactly what you're asking, because you initially talked about a "merged" view, and now you mention seeing individual instances. Would you be able to share a small example code that shows how the bins are created for each instance, and what information you're looking for in IMC?

    The screenshot you posted yesterday is showing you the bins hit by any instance of the covergroup, hence it's a "merged" view as per your initial request.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mukukr
    mukukr over 3 years ago in reply to StephenH

    True that, initially I asked for the merged coverage, but now I wanted to see the bins that are being created by each instance of the agents. as I have instantiated coverage class for all the agent

    class cov extends uvm_component;

    // intf //event etc.

    covergroup dst_addr_cov @(addr_event);

    dst_addr_cp: coverpoint dst_addr {bins dst_addr[] = {[0:18], [20:22], 24, [60:63]};

    endgroup : fifoic_dst_addr_cov

    //task run_phase(uvm_phase phase);

    //house keeping logic to hit the event

    endtask endclass : cov

    // agent class

    class fifoic_agent extends uvm_agent;

    blk_env_fifoic_coverage fifoic_cov;
    // intf
    int agent_num;

    `uvm_component_utils(blk_env_fifoic_agent)

    // constructor 

    function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    // driver // monitor connections
    fifoic_cov = blk_env_fifoic_coverage::type_id::create("fifoic_cov", this);

    endfunction : build_phase

    function void connect_phase(uvm_phase phase);
    driver_h.seq_item_port.connect(sequencer_h.seq_item_export);

    //config_db and all the internal signal assignment 

    // `ifdef COV
    fifoic_cov.fifoic_vif = fifoic_vif[cfg_num];
    //`endif
    end
    endfunction : connect_phase
    endclass : blk_env_fifoic_agent

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • StephenH
    StephenH over 3 years ago in reply to mukukr

    OK, so I think you may only be missing the covergroup "option.per_instance = 1;" setting from your code then. As your coverage is in UVM components you may want to add a coverage control file to your xrun build command (xrun -covfile my.ccf), where the my.ccf contains at least the following options:

    select_functional
    set_covergroup per_instance_default_one
    set_covergroup -new_instance_reporting

    You can find details of all these options by searching in support.cadence.com, my main reason for mentioning them here is to highlight the last one, new_instance_reporting, which builds an instance tree in the coverage model, following the UVM testbench hierarchy.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mukukr
    mukukr over 3 years ago in reply to StephenH

    Thanks for response Stephen, I have modified my coverage code based on your suggestions, and after the modification I ran the sim w/ coverage dump, but unfortunately, I am not able to see any beans over here, sorry to bother you w/ the silly issue, I am very new to the IMC, could you please help w/ this?  am attaching the code and the imc snipped: 




    • 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