Forum Discussion
Altera_Forum
Honored Contributor
7 years agoThank you Tricky for your response, but actually I wanted something else... Probably I did not explain myself well...
Actually, I wanted to assert/check the following scenario: 1) some event (let's name it event1) happens in TestBench 2) since this event, the signal should rise within between 10 to 20 cycles (if the signal rises after 11 cycles it's OK, if after 19 cycles it's also OK) 3) once the signal rises, it should stay stable (no changes in the signal) utill another event (let's name it event2) in the TestBench happens Here is how I would check that the signal rises within 10 to 20 cycles after event1 happens (is this correct?):assert property ((posedge clk) (event1) $rose(signal) ); But how can I add the check what the signal is stable after it's rose and until the assertion is disabled (the check should be disabled when event2==1'b1)? Could I write it in the following way?
assert property (@(posedge clk) $rose(event1) $rose(signal));
assert property (@(posedge clk) disable iff (event2==1'b1) $rose(signal) |-> $stable(signal)); How to write the above as a single assertion? Thank you!