Hi everyone,
I would like to collect the coverage from my simulation. I created the covergroup inside my verification module. The problem is when the coverage block is enabled (En_blockname_cov == 1’b1),the compilation takes too long I feel like it will not terminate, no warning just stuck somewhere .But once the coverage block is switched off, compiling the project is very fast only takes few seconds.
Please tell me how to improve this code and eliminate problem.
The section of the code causing the problem is the following:
module verif_XBar(
...
);
...
if(En_blockname_cov)
begin
covergroup cg_blockname @(posedge clk);
coverpoint {.............}
{
bins ...;
...
bins blockname_invalid = default;
}
...
endgroup : cg_blockname
cg_blockname blockname_cov = new();
// real cov_blockname = 0.0;
always @(posedge clk)
begin
blockname_cov.sample();
// cov_blockname = $get_coverage();
end
end
endmodule
Thanks