In reply to dave_59:
Thank You Mr. Dave,
This was what I was looking for.
But there remains an issue, I made slight changes, so that ready triggers, 4 to 7 clocks cycles after valid is HIGH. And the assertion will pass for when ready is triggered 6:10 cycles after valid.
task run();
@(negedge clk) valid <= 1;
repeat ($urandom_range(4,7)) begin
@(negedge clk);
end
ready <= 1;
@(negedge clk) ready <= 0; valid <= 0;
endtask
property RUN;
// @(negedge clk) $rose(valid) |-> ##[6:10] $stable(valid) && ready;
@(negedge clk) $rose(valid) |-> ready[=1] within valid[*6:10];
endproperty
In this case, it shows error for 4 cycle delay. And shows passed for 6 and 7 cycle delays i.e., as we want it to behave.
But for delays of 5 cycle it shows passed, but that should also state an error, as the least delay should be 6 cycles.