[sv-bc] "size" of expressions with side effect operators

From: Kakkar, Sachin <Sachin_Kakkar@mentorg.com>
Date: Fri May 28 2004 - 00:24:18 PDT

Hi,

Could you please clarify my confusion regarding the "size" of
expressions with side effect operators used in assignments.

[1]
 The behavior of ++/-- operator.

------------------------
Consider the case :

out[7:0] = ++in[1:0];

It can be interpreted in 2 ways :

a)when size depends on max(Lhs, Rhs) of assignment.
      t[7:0] = in1[1:0] + 1;
      in1[1:0] = t[1:0];
      out[7:0] = t[7:0];

 
b)when size of operand with ++ operator is
  self-determined.
 
    t[1:0] = in1[1:0] + 1;
     in1[1:0] = t[1:0];
     out[7:0] = t[1:0];

Please let me know, which one is the correct interpretation ?
-----------------------

[2]

  Also for assignment like this
  a = (b = c + d) ;

Please let me know, is it correct to assume that this expr. (b = c + d )
will be treated as a separate assignment and size of temporaries during
assignment will not depend on size of surrounding context ie. "a" in
this case?

Thanks & Regards,
-Sachin

****************************************************
Sachin Kakkar
Sr. Member Technical Staff
Mentor Graphics(NOIDA) Pvt Ltd
Email : sachin_kakkar@mentorg.com
****************************************************
Received on Fri May 28 00:24:35 2004

This archive was generated by hypermail 2.1.8 : Fri May 28 2004 - 00:25:43 PDT