Fix assertion elaborating certain primitive port part selects

In sertail brimitives, the passed port may have part selects.
Make sure to call the test_width method on the expressions.
This commit is contained in:
Stephen Williams 2010-06-01 09:17:36 -07:00
parent 1993bf6f69
commit c6465f4485
1 changed files with 5 additions and 0 deletions

View File

@ -223,6 +223,11 @@ unsigned PGBuiltin::calculate_array_count_(Design*des, NetScope*scope,
gate. Figure out how many are desired. */
if (msb_) {
need_constant_expr = true;
ivl_variable_type_t use_type;
bool flag = false;
msb_->test_width(des, scope, 0, 0, use_type, flag);
flag = false;
lsb_->test_width(des, scope, 0, 0, use_type, flag);
NetExpr*msb_exp = elab_and_eval(des, scope, msb_, -1);
NetExpr*lsb_exp = elab_and_eval(des, scope, lsb_, -1);
need_constant_expr = false;