Arithmetic shift operators: signedness

From: Jayaram Bhasker (jbhasker@cadence.com)
Date: Fri May 17 2002 - 08:53:49 PDT


Precedence: bulk

Sec 4.1.12 says that a 0 or a signbit is filled in based on the signedness of the
result type. Later it says "The result signedness is .... and the remainder of the
expression as outlined in sec 4.5.1". However, I do not see the arith shift operators
listed in Table 29. Nor any mention of how the signedness of an arith shift op is
determined in sec 4.5.1.

So how is the signedness determined based on the remainder of the expression?
Is there a case where the result type is unsigned (dont know how yet) and if
you have

$signed (4'b1101) >>> 2

then 0's are shifted in?

I would have thought that whether a 0 or a signbit is filled based solely on
the signedness of the first operand and nothing else.

Maybe the last sentence on pg 50 was intended to be just "The result signedness is
determined by the left-hand operand.".

Any comments?

- bhasker



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:55:37 PDT and
sponsored by Boyd Technology, Inc.