[sv-bc] RE: uniszed unbased literal in a concatenation

From: Brad Pierce <Brad.Pierce@synopsys.com>
Date: Mon Oct 07 2013 - 10:59:16 PDT
Hi Shalom,

I think it's legal, and 1-bit wide, but the designer probably thinks it means to fill out with 0's to the width of the LHS, that is, the same as

        assign w = w1;

except suppressing any warnings about the widths not matching.

-- Brad

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Bresticker, Shalom
Sent: Monday, October 07, 2013 8:42 AM
To: SV_BC List
Subject: [sv-bc] uniszed unbased literal in a concatenation

Hi, Consider this code:

module test1;

wire [2:0] w1;
wire [3:0] w ;

assign w = {'0, w1};

endmodule

Is this concatenation legal because '0 is 1 bit wide in a self-determined context, or is it illegal because it is an unsized constant in a concatenation?

I tend toward the first interpretation, but I see that some tools accept it and some do not.

Thanks,
Shalom

Shalom Bresticker
Intel, Networking Division 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<http://www.mailscanner.info/>, 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 Oct 7 10:59:58 2013

This archive was generated by hypermail 2.1.8 : Mon Oct 07 2013 - 11:00:08 PDT