1

I'm new to SystemVerilog Assertions and I know that I can check if a signal doesn't change between clock ticks using Concurrent Assertions:

assert property (@(posedge clk) enable == 0 |=> $stable(data));

But how would I do so continuously using Immediate Assertions? This is an example that I found online but I'm not sure if it's what I need and how it works:

assign not_a = !a;
always_comb begin : b1
    a1: assert (not_a != a);
    a2: assert #0 (not_a!= a); // Should pass once values have settled
end

1 Answer 1

1

What you are asking for does not make any sense. If it a signal never can change, then it must be a constant. With the example you show, a1 might fail - there is a race condition between a and not_a. a2 is deferred assertion - it takes care of the race and will never fail. But the problem with both these assertions is that if a changes at some time, a2 never fails and you may are may not see a failure with a1

Sign up to request clarification or add additional context in comments.

5 Comments

Thank you for your comment. I think I didn't word my question properly, All I'm looking for is to use Immediate Assertions to check if a signal is stable, since I don't have a clock.
Without any reference, what is your definition of stable?
The signal does not change when the assertion is running.
So without any reference, when should the assertion start running, and when should it stop? My definition of stable means check for no change during some period or time window. You can't use the signal itself as a reference because it is indeed stable between its changes.
The signal A needs to stay the same when ever an other signal, B, is high. Sorry for all the confusion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.