Parameters get their types (signedness) from expressions.

Parameters get their signedness from the expression that is assigned
to them unless the type is explicitly expressed where the parameter
is declared.
This commit is contained in:
Stephen Williams 2008-03-25 21:30:41 -07:00
parent 14e3a886bd
commit 32b115d8fe
1 changed files with 3 additions and 5 deletions

View File

@ -377,10 +377,6 @@ void NetScope::evaluate_parameters(Design*des)
assert(nexpr);
delete expr;
(*cur).second.expr = nexpr;
// Set the signedness flag.
(*cur).second.expr
->cast_signed( (*cur).second.signed_flag );
}
break;
@ -393,7 +389,9 @@ void NetScope::evaluate_parameters(Design*des)
}
/* If the parameter has range information, then make
sure the value is set right. */
sure the value is set right. Note that if the
parameter doesn't have an explicit range, then it
will get the signedness from the expression itself. */
if (range_flag) {
unsigned long wid = (msb >= lsb)? msb - lsb : lsb - msb;
wid += 1;