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:
parent
804f5a94d5
commit
7d6b391572
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue