I am trying to write an assertion for my SystemVerilog design which checks if a signal is never high for more than 3 cycles (implicitly it must be de-asserted eventually). My signal is called "req" and I thought about doing something like this:
sequence req_three_seq;
req ##[1:2] (~req);
endsequence
property reg_three_prop;
@(posedge clk)
disable iff (reset)
(req) |-> req_three_seq;
endproperty
What can I do instead to create the assertion I need?
You could always add a helper block, something along the lines of:
Also, you could wrap the block and property in an
ifdef, so that you do not pull the additional block and signal into synthesis.