Hi,
I want to restrict the bins for the variable a, if variable b is equal to 2.I have used this code i am not getting any output?
module tb;
reg [3:0] a;
reg [1:0] b;
integer i = 0;
covergroup c;
option.per_instance = 1;
coverpoint a{
bins zero[]= {0,1} with(b == 2);
bins one[]= {4,5,6};
}
endgroup
c ci;
initial begin
ci = new();
for (i = 0; i <10; i++) begin
a = $urandom();
b = $urandom();
ci.sample();
#10;
end
end
initial begin
$dumpfile("dump.vcd");
$dumpvars;
#500;
$finish();
end
endmodule
####run.do file
vsim +access+r;
run -all;
acdb save;
acdb report -db fcover.acdb -txt -o cov.txt -verbose
exec cat cov.txt;
exit
Can someone help me?