Clarification is needed on determining the bit-length for the operands of an "inside" expression. Consider the following example: bit r; bit [3:0] x, y, b4; bit [5:0] b6; bit [6:0] b7; bit [7:0] b8; ... r = (x+y) inside { b4, [b8:b4], b6+b7 } For determining the length of the operands is this equivalent to: r = (8'(x+y) ==? 8'(b4)) ||((8'(x+y) >= 8'(b8)) && (8'(x+y) <= 8'(b4))) ||(8'(x+y) ==? 8'(b6+b7)) or possibly: r = (4'(x+y) ==? 4'(b4)) ||((8'(x+y) >= 8'(b8)) && (4'(x+y) <= 4'(b4))) ||(7'(x+y) ==? 7'(b6+b7)) Note the result are different if there is overflow for the expressions (x+y) or (b6+b7). Section 11.6.1 describes the rules fo expression bit lengths, but the 'inside' operator is not covered. - Ray Ryan -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Mar 10 15:01:26 2009
This archive was generated by hypermail 2.1.8 : Tue Mar 10 2009 - 15:02:36 PDT