What is associativity in SVA operators

Hi,

In SVA, I see “ASSOCIATIVITY” for different operators.

For example -

  1. – left

  2. throughout – right
  3. within – left
  4. intersect – left
  5. [*] [=] [->] – No associativity

Can someone please help me understand this concept?
Thanks in advance.

Regards,
Naveen

In reply to naveensv:
A left-associative operator, like subtraction, groups the leftmost elements first. A right-associative operator, like exponentiation, groups the rightmost elements first. An operator is non-associative when it doesn’t make sense to use in succession

The associativity indicates in what order operators of equal precedence in an expression are applied; thus

 
// and operator has a left associativity 
(a and b and c and d) are left associated as 
( ( ( (a and b) and c) and d)).


Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr


  1. SVA Alternative for Complex Assertions
    Verification Horizons - March 2018 Issue | Verification Academy
  2. SVA: Package for dynamic and range delays and repeats | Verification Academy
  3. SVA in a UVM Class-based Environment
    SVA in a UVM Class-based Environment | Verification Horizons | Verification Academy

In reply to ben@SystemVerilog.us:

Thanks Ben.

Hi @ben@SystemVerilog.us I don’t get clear idea on ur explanation.
Can I pls elaborate it.

Thanks in advance

In reply to VK_18:
The associativity indicates in what order operators of equal precedence in an expression are applied; thus

// and operator has a left associativity
(a and b and c and d) are left associated as
( ( ( (a and b) and c) and d)).
In this case, a tool can short circuit the computation (i. E., go no further evaluation) if (a and b)==0.
Ben Ben@systemverilog.us

Thanks u @ben@SystemVerilog.us