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, and is believed to be clean.Received on Wed Aug 4 04:42:21 2010
This archive was generated by hypermail 2.1.8 : Wed Aug 04 2010 - 04:44:53 PDT