Commit 66d6af33 by René

cg1

parents
Showing with 51 additions and 0 deletions
`timescale 1ps/1ps
module TB_CG1(
);
reg clk, rst;
reg [1:0] A, B;
covergroup cg @(posedge clk);
pb1: coverpoint A;
endgroup
cg cg_inst
initial begin
clk = 0;
end
always #5 clk = ~clk;
initial begin
cg_inst = new();
rst = 1;
A = 0; B = 0;
#10
rst = 0;
#10
A = 0; B = 0;
#10
A = 1; B = 0;
#10
A = 3; B = 0;
#10
wait (clk);
$display("Coverage (instance): %1h", cg_inst.get_inst_coverage());
$display("Coverage (pb1): %1h", cg_inst.pb1.get_coverage());
$stop;
end
endmodule
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment