Jump to content

Difference between get_inst_coverage and get_coverage


omahesh

Recommended Posts

Hi,

I'm trying to observe the difference between get_coverage & get_inst_coverage with the following example;

class trans;

rand logic wrd;

rand logic [2:0] addr;

rand logic [7:0] din;

rand logic [2:0] no_of_rst;

covergroup cg;

type_option.merge_instances = 1;

option.per_instance = 1;

option.get_inst_coverage = 1;

op_t: coverpoint addr;

op_r: coverpoint din;

endgroup

function new();

cg = new();

endfunction : new

endclass

program main();

trans trans_0 = new();

trans trans_1 = new();

trans trans_2 = new();

initial begin

trans_0.randomize();

trans_1.randomize();

trans_2.randomize();

trans_0.cg.sample();

trans_2.cg.sample();

$display("coverage:%f",trans_0.cg.get_coverage());

$display("coverage1:%f",trans_2.cg.get_inst_coverage());

$display("coverage1:%f",trans_2.cg.get_coverage());

end

endprogram

But the tool is showing error at lines type_option.merge_instances and at option.get_inst_coverage.

Can anyone suggest me the how can i get the get_inst_coverage result which is different from get_coverage?

Thanks,

Regards,

Mahee.

Link to comment
Share on other sites

i assume the tool is saying that this is not supported in the 10.20 release, right? you should try a more recent release such as 11.*,12.1,12.20,... as a side note you can view the type and/or instance based coverage using "iccr" or "imc" without the need of the direct coverage api/options.

/uwe

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...