NetESignal::dup_expr() was not passing the word_ information.

The dup_expr() function for NetESignal was not copying the word_
expression. This would cause an individual array access to turn
into an entire array access. The file and line information was
also not being set correctly.

An assert() in tgt-vvp/eval_expr.c was also replaced with an
exit() since the appropriate information was already being
printed.
This commit is contained in:
Cary R 2008-03-12 14:58:45 -07:00 committed by Stephen Williams
parent 377f5eaa23
commit ef9ee52e53
2 changed files with 3 additions and 2 deletions

View File

@ -94,9 +94,10 @@ NetESFunc* NetESFunc::dup_expr() const
NetESignal* NetESignal::dup_expr() const
{
NetESignal*tmp = new NetESignal(net_);
NetESignal*tmp = new NetESignal(net_, word_);
assert(tmp);
tmp->expr_width(expr_width());
tmp->set_line(*this);
return tmp;
}

View File

@ -2336,7 +2336,7 @@ struct vector_info draw_eval_expr_wid(ivl_expr_t exp, unsigned wid,
fprintf(stderr, "%s:%u: vvp-tgt error: unhandled expr. type: "
"%u at %s:%d\n", ivl_expr_file(exp), ivl_expr_lineno(exp),
ivl_expr_type(exp), __FILE__, __LINE__);
assert(0);
exit(1);
res.base = 0;
res.wid = 0;
break;