According to 6.6.2, regarding propagating the type and size of an expression "back down to the context-determined operands of the expression" -- "When propagation reaches a simple operand as defined in 5.2 (a primary as defined in A.8.4), then that operand shall be converted to the propagated type and size. If the operand must be extended, then it shall be sign-extended only if the propagated type is signed." Yet every parenthesized expression is a primary primary --> ( mintypmax_expression ) --> ( expression ) and width propagation does not stop at parens. For example, the following yields |0001000|1001000|, not |0000000|1000000|. module m; reg [6:0] a; initial begin a = (3'b111 + 3'b001); $display("|%b|%b|", a, 7'b1000000 + (3'b111 + 3'b001)); end endmodule Note also that "simple operand" is not actually defined in 5.2. Are parenthetical comments even normative? -- BradReceived on Mon Nov 7 12:27:58 2005
This archive was generated by hypermail 2.1.8 : Mon Nov 07 2005 - 12:28:50 PST