In continuous assignment, r-value is sized or lossless, never self determined.

The r-value expression takes on at least the width of the l-value. If
there is a sized width greater then the l-value width, take that on
instead. But if the r-value is unsized, there are unsized sub-expressions
that cause the expression as a whole to be unlimited width, so elaborate
and evalulate the r-value as lossless.
This commit is contained in:
Stephen Williams 2008-09-13 17:40:19 -07:00
parent 804f5a94d5
commit 7d6b391572
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ void PGAssign::elaborate(Design*des, NetScope*scope) const
<< ", unsized_flag=" << (unsized_flag?"true":"false") << endl;
}
int expr_wid = unsized_flag? -1 : (int) use_width;
int expr_wid = unsized_flag? -2 : (int) use_width;
NetExpr*rval_expr = elab_and_eval(des, scope, pin(1),
expr_wid, lval->vector_width());