RE: [sv-bc] unsized number literals

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Wed Aug 04 2010 - 04:59:43 PDT

The conclusion of that thread seemed to be that 2'b11 would be the correct answer here.

Shalom

From: Surya Pratik Saha [mailto:spsaha@cal.interrasystems.com]
Sent: Wednesday, August 04, 2010 2:53 PM
To: Dhiraj Kumar Prasad
Cc: Bresticker, Shalom; sv-bc@eda.org
Subject: Re: [sv-bc] unsized number literals

Hi Dhiraj,
I don't agree, I did not get anything explicit in LRM supporting your answer. We have already discussed about that in past. See the mail thread with subject "Query about '1" around early July 2008 time frame.

Regards

Surya

-------- Original Message --------
Subject: Re:[sv-bc] unsized number literals
From: Dhiraj Kumar Prasad <dhiraj@cal.interrasystems.com><mailto:dhiraj@cal.interrasystems.com>
To: Bresticker, Shalom <shalom.bresticker@intel.com><mailto:shalom.bresticker@intel.com>
Cc: "sv-bc@eda.org"<mailto:sv-bc@eda.org> <sv-bc@eda.org><mailto:sv-bc@eda.org>, Dhiraj Kumar Prasad <dhiraj@cal.interrasystems.com><mailto:dhiraj@cal.interrasystems.com>
Date: Wednesday, August 04, 2010 5:09:57 PM

Hello Shalom,

The correct behavior should be 2'b11 . Even I have tested the three simulator and all are giving 2'b11 as output
with One of them is showing warning as port size differ in port connection.

-dhiRAj

Bresticker, Shalom wrote:
Consider the following code:

module top;
bot bot('1);
endmodule

module bot(input [1:0] i);
initial #10 $displayb(i);
endmodule

We have a port connection of '1 to a 2-bit port.

I would expect '1 to expand to 2'b11 without a problem.

In fact, the three simulators I tested showed different behaviors.

One did in fact show that i was assigned 2'b11 without any problem.

One simulator also assigned 2'b11 to i, but also issued a port-size mismatch warning.

One simulator also issued such a warning and assigned 2'bz1 to i.

What is the correct behavior?

Thanks,
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<http://www.mailscanner.info/>, and is
believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, 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.
Received on Wed Aug 4 05:00:57 2010

This archive was generated by hypermail 2.1.8 : Wed Aug 04 2010 - 05:03:33 PDT