Brad, I believe you mean 5.5.2 (in P1364/D8p1) instead of 6.6.2. I agree that "simple operand" here was maybe not intended to include parenthesized expressions. However, even if you included them, I think the statement is still true: the parenthesized expression can be considered to be type-converted. But it does not say that propagation stops there. Anyway, I agree that the text is still not clear enough. Parenthetical text is not excluded from being normative. How do you distinguish between a "comment" and a non-"comment"? Shalom >-----Original Message----- >From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On >Behalf Of Brad Pierce >Sent: Monday, November 07, 2005 10:28 PM >To: sv-bc@eda.org >Subject: [sv-bc] Type/size propagation does not stop at parens >(6.6.2, V-2005) > >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? > >-- Brad >Received on Tue Nov 8 01:47:29 2005
This archive was generated by hypermail 2.1.8 : Tue Nov 08 2005 - 01:48:13 PST