User guide
24-235
SystemVerilog Testbench Constructs
covType cov1;
initial
cov1 = new();
initial begin
repeat (10) begin
#10 clk = ~clk;
var = var + 1;
end
end
initial begin
repeat (40) begin
#3 cov1.sample();
end
end
endprogram
stop()
When called, collecting of coverage information is stopped for that
instance. Return type: void. See the get_coverage(), stop(), start()
example on page 235.
start()
When called, collecting of coverage information resumes for that
instance. Return type: void. See the get_coverage(), stop(), start()
example on page 235.
get_coverage(), stop(), start() example
program test();
reg clk = 0;
reg [2:0] var = 3'b001;
covergroup covType (input integer param1) @(clk);
cp1: coverpoint var {
bins s0 = { [ 0 : param1] } ;
bins s1 = { 3 };