Concurrent Assertion :: not V/S ! Operator

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 .

In reply to hisingh:

The “!” is a Unary logical negation operator.
The “not” is a property operator.
A sequence is a property.
Thus, !( a ##1 b ) is Illegal because (a ##1 b) is not an expression but a sequence.
not( a ##1 b ) is legal because (a ##1 b) is a property.
Sig should be False ( i.e ! Sig will be True ) for next 2 clock ticks
@( posedge clk ) $rose( Sig ) |=> ! Sig[*2] ;
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
** SVA Handbook 4th Edition, 2016 ISBN 978-1518681448

  1. SVA Package: Dynamic and range delays and repeats SVA: Package for dynamic and range delays and repeats | Verification Academy
  2. Free books: * Component Design by Example FREE BOOK: Component Design by Example … A Step-by-Step Process Using VHDL with UART as Vehicle | Verification Academy
  1. Papers:

Udemy courses by Srinivasan Venkataramanan (http://cvcblr.com/home.html)
https://www.udemy.com/course/sva-basic/
https://www.udemy.com/course/sv-pre-uvm/

In reply to ben@SystemVerilog.us:

The not property operator also has some subtle differences on how it applies to strong and weak sequences. But just think of !(expression) as a unary Boolean operator.