Hi All,
For the following example ::
bit clk , a , b , dis ;
always #5 clk = !clk;
initial begin
`ifdef NBA
#05; dis <= 1; // T:5 overlaps with posedge of clock
#10; dis <= 0;
#05; dis <= 1; // T:20
#10; dis <= 0; // T:30
`else
#05; dis = 1; // T:5 overlaps with posedge of clock
#10; dis = 0;
#05; dis = 1; // T:20
#10; dis = 0; // T:30
`endif
end
assert property( @(posedge clk) disable iff(dis) a == b ) $display("T:%0t Pass",$time);
else $display("T:%0t Fails",$time);
initial begin
#04; a = 1 ; b = 1;
#10; a = 0 ; b = 1;
#10; a = 1 ; b = 0;
#10; a = 1 ; b = 1;
#2; $finish();
end
At time:5 units there is posedge of clock as well as dis is assigned 1 (either in NBA or active region)
At time:15 units there is posedge of clock as well as dis is assigned 0 (either in NBA or active region)
I am aware that the expression within disable iff is asynchronously checked,
(1) So when dis is 1 at T:5 , will the assertion be disabled OR would it evaluate ( a == b ) ?
(2) So when dis is 0 at T:15 , will the assertion be active / re-enabled and evaluate ( a == b ) ?