Correctly handle negative genvar values.
During expression elaboration, genvar values were being erroneously cast to unsigned values when creating a verinum for use in expression evaluation.
This commit is contained in:
parent
f682d9cad1
commit
45bb1313e7
|
|
@ -2711,6 +2711,7 @@ NetExpr* PEIdent::elaborate_expr(Design*des, NetScope*scope,
|
|||
<< " is genvar with value " << scope->genvar_tmp_val
|
||||
<< "." << endl;
|
||||
verinum val (scope->genvar_tmp_val, expr_wid);
|
||||
val.has_sign(true);
|
||||
NetEConst*tmp = new NetEConst(val);
|
||||
tmp->set_line(*this);
|
||||
return tmp;
|
||||
|
|
|
|||
Loading…
Reference in New Issue