RE: [sv-bc] Query about '1

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Tue Jul 08 2008 - 06:39:33 PDT
I think the answers should be:


________________________________

	From: owner-sv-bc@server.eda.org
[mailto:owner-sv-bc@server.eda.org] On Behalf Of Banerjee, Ayan
	Sent: Tuesday, July 08, 2008 3:57 PM
	To: sv-bc@server.eda-stds.org
	Subject: [sv-bc] Query about '1
	
	

	Hi,

	 

	I have 3 queries about what should be the correct behavior for
the following 3 cases.

	 

	1)

	What should be behavior if '1 is passed to a port as is done in
the following testcase?

	 

	module top;

	bottom inst('1);

	endmodule

	 

	module bottom(a);

	input [63:0] a;

	 

	initial

	    $display("%b", a);

	endmodule

	 

	 Should it be a)
1111111111111111111111111111111111111111111111111111111111111111 or

	                    b)
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz1 or

	                    c)
0000000000000000000000000000000000000000000000000000000000000001

	 

	[SB] a. This should be treated as the continuous assignment
"bottom.a = '1" . 

	 

	 

	2) What should be the behavior if '1 is used as parameter value

	module top;

	parameter [63:0] p1 = '1;

	initial

	    $display("%b",p1);

	endmodule

	 

	Should it be a)
1111111111111111111111111111111111111111111111111111111111111111 or

	                  b)
0000000000000000000000000000000000000000000000000000000000000001

	 

	[SB] a. Treated as assignment "p1[63:0] = '1". 

	 

	3) Similar to 2 but in a more general case what should be the
value of parameter if range is specified which is more than 32 but the
expression assigned is of 32 bit. Should the expression be evaluated in
32 bit or with the size of parameter?

	 

	module top;

	parameter [63:0] p1 = 1'b1 << 63;

	initial

	    $display("%b",p1);

	endmodule

	 

	Should it be a)
0000000000000000000000000000000000000000000000000000000000000000  or

	                  b)
1000000000000000000000000000000000000000000000000000000000000000

	 

	The behavior of simulators are different in the above cases.
Thanks in advance for your help.

	 [SB] With the size of the parameter. The answer should be b. We
discussed this in the past.

	 

	Shalom

	 

	 

	 

	 

	-Regards,

	Ayan

---------------------------------------------------------------------
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 Tue Jul 8 06:42:28 2008

This archive was generated by hypermail 2.1.8 : Tue Jul 08 2008 - 06:43:07 PDT