I want to code an assert to validate if signal data remains stable while the CS signal is enabled. The data signal could change its state just in the posedge or negegde of the CS signal, in these cases, the assertion must pass anyways.
Is there another clock involved for sampling stability, or is this all asynchronous? And if asynchronous, what do you mean by “just in the posedge or negegde of the CS signal”. There would only be before or after.
Hi.
I want to code an assert to validate if signal data remains stable while the CS signal is enabled. The data signal could change its state just in the posedge or negegde of the CS signal, in these cases, the assertion must pass anyways.
You have to specify your problem more accurately. How long is your CS signal and are you really sure data are changing on the edges of CS?
The CS signal could be from 4 cycles to practically any number of cycles. I need to be sure the ‘din’, and ‘dout’ signals remain stable while the CS signal is asserted., Also consider that Din and Dout signal could change just when CS goes high or low (in this case the assertion must pass). The CS, din, and dout signals are all synchronous.
I have this option, but I am not sure if it is the best way to do it:
Hi Dave ,
Please correct me if my understanding is incorrect .
Shouldn’t we use ’ until_with ’ instead ? i.e alternative for ’ throughout ’ operator is ’ until_with ’ .
For ’ until ’ operator the LHS need not be true when the RHS is true whereas using ’ until_with ’ the LHS needs to be True when RHS is True .
I understand this checks that ’ dout ’ is stable till the clock edge that ’ cs ’ goes low. Just like with the “until”, like Dave mentioned before. Am I missing something?
Via throughout operator the consequent is evaluated at T:25 .
As signal ’ dout ’ has same value at clock event T:15 and T:25 , $stable( dout ) is True .
Hence assertion passes at T:25
Using until operator although the consequent starts evaluation at T:25 , the assertion passes at T:45 .
Now $stable( dout ) needs to be True till signal ’ cs ’ is de-asserted .
I don’t know why my simulator doesn’t recognize the “until” keyword, could be a UVM version problem? Is there another alternative to write this in a clear way?