In reply to hisingh:
The throughout operator specifies that a signal (expression) must hold throughout a sequence.
( b throughout R ) is equivalent to ( b [*0:$] intersect R )
For example, in the following handshake example, a req is honored with an acknowledge within the next 4 cycles. The ack is then followed at a later time by a done control signal. However, there is one additional requirement that throughout the time between the ack and done an enable signal must be asserted to drive a tri-state bus. That assertion can be expressed as follows.
For stimulus via +define+M2 I observe the same O/P as the original code ( using throughout )
However for +define+M1 due to Vacuous pass there is No assertion Failure at TIME : 70 .
I tried using strong operator in consequent of property ’ ab ’ but it throws Compilation Error .
**
Any suggestion on how Vacuous Pass of antecedent in property ’ checkMode ’ could
make the assertion FAIL ?**
YOUR ISSUE: with (seq1 |-> seq2 |-> seq3) then
If seq1 is a NO MATCH, then assertion is vacuous.
If seq1 IS A MATCH and seq2 is a NO MATCH then assertion is vacuous
This is because seq2 |-> seq3 is a property where seq2 is an antecedent
ALTERNATE SOLUTIONS: One solution is to use the ONE antecedent. Thus,
Another solution is to use the implies property operator
ap_OK2_mode : assert property(@ (posedge clk)
@ ( posedge clk ) $fell( bMode ) implies checkbMode );
// Note: LHS of the implies starts in the SAME cycle as the LHS
STYLE:
4. Way to many unnecessary declarations (sequences and properties).
It makes it harder to read.
5. If you reuse declared properties or sequences, use a prefix notation to identify the type. Some people use p_ for properties, s_ or q_ for sequences. I don’t care what notation you use, but be consistent throughout the project.
6. Way to many character spaces and lines spaces; it makes the code harder to read.