Subject: signed types
From: Muzaffer Kal (muzaffer@dspia.com)
Date: Thu Oct 11 2001 - 01:56:50 PDT
hi everyone,
I signed up for this section a while ago but haven't been able to contribute
anything till now. Even now, I am not sure whether my comments are fully
applicable to synthesizability or just issues about the base standard but
here it goes:
* in section 4.1.7 the paragraph next to the last says " ... integral
operands (an integer, or a unsized, unbased integer) ... ". Integer is
repeated here and it should mention an integer number. I think it should say
" ... integral operands (an integer, or a unsized, unbased integer NUMBER)
... "
* section 4.1.7 paragrahp 2 says "when two operands of unequal bit lengths
are used, the smaller operand shall be zero filled on the most significant
bit side to extend to the size of the larger operand". Same section
paragraph 6 says "when both operands of a relational expression are signed
integral operands (...) then the expression shall be interpreted as a
comparison between signed values ...".
I think these two statements are in conflict. I don't think it makes sense
to zero extend the smaller operand if the comparison is to be between signed
values. I think relational operators also should conform to section 4.5.2
step 4 which says "extend the size of each operand (...) to the size of the
expression. Perform sign extension if and only if the operand type (...) is
signed" so the smaller operand should be signed extended.
* section 4.1.8 paragraph 1, sentence 2 says "these four operators bit for
bit, with zero filling if the two operands are of unequal bit length". If
both operands are signed, the expression type should be signed (per 4.5.1
step 12) and section 4.5.2. step 4 should apply.
I should also say that I am really looking forward to having my simulator
and my synthesizer support signed types.
Muzaffer Kal
408.654.9573 DSPIA Inc. http://www.dspia.com
This archive was generated by hypermail 2b28 : Thu Oct 11 2001 - 01:59:17 PDT