I agree, '1 should be allowed in a concatenation. In a self-determined context, '1 is 1-bit wide. We don't allow unsized integer constants because there is not a defined bit-width for an integer (32 or 64?), but this problem doesn't apply for '1.
Paul
----- Original Message -----
From: "Yulik Feldman" <yulik.feldman@intel.com>
To: "Shalom Bresticker" <shalom.bresticker@intel.com>
Cc: sv-bc@eda.org
Sent: Monday, March 22, 2010 9:07:27 AM
Subject: [sv-bc] RE: Is '1 allowed in a concatenation?
Nice catch. But why not to allow them, writing '1 in concatenation operands is simpler than writing 1b'1, and if the semantics would be well-defined, it would just improve the user experience.
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Bresticker, Shalom
Sent: Monday, March 22, 2010 2:46 PM
To: sv-bc@eda.org
Subject: [sv-bc] Is '1 allowed in a concatenation?
Is a literal like '1 allowed in a concatenation?
On the one hand, 11.4.12 says, "Unsized constant numbers shall not be allowed in concatenations. This is because the size of each operand in
the concatenation is needed to calculate the complete size of the concatenation."
On the other hand, 5.7.1 says, "An unsized single-bit value can be specified by preceding the single-bit value with an apostrophe ( ' ), but without the base specifier. All bits of the unsized value shall be set to the value of the specified bit. In a self-determined context, an unsized single-bit value shall have a width of 1 bit, and the value shall be treated as unsigned."
I tend to the interpretation that they are not allowed.
Shalom
Shalom Bresticker
Intel LAD DA, Jerusalem, Israel
+972 2 589 6582 (office)
+972 54 721 1033 (cell)
http://www.linkedin.com/in/shalombresticker
--------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
-- This message has been scanned for viruses and dangerous content by MailScanner , and is believed to be clean. --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- This message has been scanned for viruses and dangerous content by MailScanner , and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Mar 22 06:16:02 2010
This archive was generated by hypermail 2.1.8 : Mon Mar 22 2010 - 06:16:06 PDT