Signed-ness of parameters

Propagate the signedness of named parameters when they are evaluated.
This commit is contained in:
Stephen Williams 2008-01-22 20:16:43 -08:00
parent 5b17f2039a
commit 89bf16b21e
2 changed files with 7 additions and 0 deletions

View File

@ -1224,6 +1224,11 @@ NetExpr* PEIdent::elaborate_expr_param(Design*des,
perm_string name = peek_tail_name(path_);
NetEConstParam*ptmp
= new NetEConstParam(found_in, name, ctmp->value());
if (debug_elaborate)
cerr << get_fileline() << ": debug: "
<< "Elaborate parameter <" << name
<< "> as constant " << *ptmp << endl;
delete tmp;
tmp = ptmp;
}

View File

@ -1402,6 +1402,8 @@ NetEConst* NetESelect::eval_tree(int prune_to_width)
bval += 1;
}
oval.has_sign(has_sign());
NetEConst*res = new NetEConst(oval);
return res;
}