Hi All,
With regards to the following code;
module GRG_covergroup;
bit [7:0] ADDR;
bit clk;
// Covergroup containing options
covergroup CG1 @(posedge clk);
CP1 : coverpoint ADDR {
bins b1 = ('h00 => 'hFF => 'h00);
bins b2 = (b1 => 'h55);
}
endgroup
initial begin
CG1 cg_inst = new;
#21
$display ("*** Functional Coverage = %.2f%% ***", cg_inst.get_coverage());
end
//clock generation
initial begin
clk = 1'b1;
forever #5 clk = ~clk;
$display ("Finished!!");
end
initial begin
#10 ADDR='hFF;
#10 ADDR = 'h00;
#10 ADDR = 'hFF;
#20 $finish;
end
initial begin
$dumpfile("dump.vcd"); $dumpvars;
end
endmodule
bins b1 = 00->ff->00;
This occurs repetitively, so I want to re use this bin;
for b2, I do not want to write as b2 = 00->ff->00->55;
But I would like to write as b2 = (b1 => 'h55)
I want to re use this bin b1 wherever required so that I can avoid writing entire transition.
How to re use that bins b1 ?
Thank You