From ef9ee52e53fac9c058797cf76520a2c6a46e01e4 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 12 Mar 2008 14:58:45 -0700 Subject: [PATCH] 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. --- dup_expr.cc | 3 ++- tgt-vvp/eval_expr.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dup_expr.cc b/dup_expr.cc index 5c1158b9f..7a8ec8a76 100644 --- a/dup_expr.cc +++ b/dup_expr.cc @@ -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; } diff --git a/tgt-vvp/eval_expr.c b/tgt-vvp/eval_expr.c index 4a6d09d8b..03e43823f 100644 --- a/tgt-vvp/eval_expr.c +++ b/tgt-vvp/eval_expr.c @@ -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;