Hi all ,
I am trying to understand the difference b/w not and ! Operator and on what criteria should I choose b/w them to use in an assertion .
I tried the following Code :: EDA_LINK
I observe that there is a Compilation Error using ! Operator .
*[ Q1] Is it because ( Sig[numclk] ) is treated as an expression ?
i.e Sig[*2] is equivalent to Sig ##1 Sig
I have noted a few differences ( Please Correct me if wrong ) ::
(1) not changes the strength of the expression whereas ! doesn’t
(2) not can be used on an entire expression whereas ! can’t
i.e ! ( a ##1 b ) is Illegal whereas not( a ##1 b ) is legal
[Q2] Are there any points that could be added ? . Does LRM mention anything on this
Via trial and error I see that following property_expression for ! Operator will Never be True ::
@( posedge clk ) $rose( Sig ) |-> ! Sig[*numClk ] ; // When Antecedent is True , Consequent ( ! Sig[*1] ) would be False ALWAYS .
**i.e Consequent Needs to be evaluated after at least 1 Clock tick.**
If I change the property expression for ! Operator to ::
@( posedge clk ) $rose( Sig ) |=> ! Sig[*numClk ] ;
After antecedent is True at T1 , Sig should be False ( i.e ! Sig will be True ) for next 2 clock ticks , for the assertion to PASS .