Hi,
Here is the code, I was expecting that if either z |-> a1, or z|-> a2 should trigger a new trace. But by looking at the waveform and the log, the 1st part when z is high, there is only one trace triggered, and in the 2nd part when z is high again, all conditions did get triggered, just curious why they are not consistent???
sequence a1;
(a, $display(“New a1 starts at %t”, $realtime)) ##2 (b, $display(“a1 match at %t”, $realtime));
endsequence
sequence a2;
(c, $display(“New a2 starts at %t”, $realtime)) ##1 (d, $display(“a2 match at %t”, $realtime));
endsequence
sequence abcd;
a1 or a2;
endsequence
property zabcd;
@(posedge clk)
z |-> abcd ;
endproperty
assert property(zabcd) $display(“zabcd Pass at %t”, $realtime);
//-- log file –
KERNEL: New a1 starts at 30
ASSERT: Error: ASRT_0005 testbench.sv(27): Assertion FAILED at time: 70ns, scope: tb, start-time: 30ns
KERNEL: New a1 starts at 130
KERNEL: New a1 starts at 150
KERNEL: New a1 starts at 170
KERNEL: a1 match at 170
KERNEL: New a2 starts at 170
KERNEL: zabcd Pass at 170
KERNEL: New a1 starts at 190
KERNEL: a1 match at 190
KERNEL: New a2 starts at 190
KERNEL: a2 match at 190
KERNEL: zabcd Pass at 190
KERNEL: zabcd Pass at 190
RUNTIME: Info: RUNTIME_0068 testbench.sv (52): $finish called.
For more detail, please check below
edaplayground link …