RE: [sv-bc] RE: clog2 problem

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Thu Jan 24 2008 - 02:25:27 PST
Greg, 

> signed'(1'b1) will 0-extend the literal before cloaking it 
> with signedness

I don't think so.

See, for example, in 11.7:

regS = signed'(4'b1100); // regS = -4

According to you, the RHS becomes 8'sb00001100, which is not -4.

If it is first turned to signed, 4'sb1100, then size-extended, it
becomes 8'sb11111100, which is indeed -4.

6.24.1 says, 
"The cast shall return the value that a variable of the casting type
would hold after being assigned the expression."

Regards,
Shalom
---------------------------------------------------------------------
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 Thu Jan 24 02:26:54 2008

This archive was generated by hypermail 2.1.8 : Thu Jan 24 2008 - 02:27:06 PST