Add file/line information to named events and better expr. error.
This patch adds file and line number information to named events.
It also modifies the draw_eval_expr_wid() routine to fail with
an appropriate message for named events. This checking needs to
be pushed into the elaboration stage, but this will give a better
message than we had before.
(cherry picked from commit dff6a1ebff)
This commit is contained in:
parent
bb5d30ead5
commit
3f8f81568a
|
|
@ -308,6 +308,7 @@ void dll_target::expr_event(const NetEEvent*net)
|
|||
assert(expr_);
|
||||
|
||||
expr_->type_ = IVL_EX_EVENT;
|
||||
FILE_NAME(expr_, net);
|
||||
expr_->value_= IVL_VT_VOID;
|
||||
|
||||
/* Locate the event by name. Save the ivl_event_t in the
|
||||
|
|
|
|||
|
|
@ -2983,6 +2983,12 @@ struct vector_info draw_eval_expr_wid(ivl_expr_t exp, unsigned wid,
|
|||
res.base = 0;
|
||||
res.wid = 0;
|
||||
break;
|
||||
case IVL_EX_EVENT:
|
||||
fprintf(stderr, "%s:%u: vvp-tgt error: A named event is not "
|
||||
"handled in this context (expression).\n",
|
||||
ivl_expr_file(exp), ivl_expr_lineno(exp));
|
||||
exit(1);
|
||||
break;
|
||||
|
||||
case IVL_EX_STRING:
|
||||
res = draw_string_expr(exp, wid);
|
||||
|
|
|
|||
Loading…
Reference in New Issue