Skip to content

Commit

Permalink
v0.9: Treat an empty @* as something that will never trigger.
Browse files Browse the repository at this point in the history
An @* with no sensitivities should be treated as something that will
never trigger vs something that will run continuously. This patch makes
this change and adds a warning when an @* has no sensitivities since
this is almost certainly a coding bug.
  • Loading branch information
caryr committed Nov 24, 2011
1 parent 34d8eb2 commit fff46da
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions elaborate.cc
Expand Up @@ -3146,10 +3146,20 @@ NetProc* PEventStatement::elaborate_st(Design*des, NetScope*scope,
}

if (nset->count() == 0) {
cerr << get_fileline() << ": error: No inputs to statement."
<< " The @* cannot execute." << endl;
des->errors += 1;
return enet;
cerr << get_fileline() << ": warning: @* found no "
"sensitivities so it will never trigger."
<< endl;
/* Add the currently unreferenced event to the scope. */
scope->add_event(ev);
/* Delete the current wait, create a new one with no
* statement and add the event to it. This creates a
* perpetual wait since nothing will ever trigger the
* unreferenced event. */
delete wa;
wa = new NetEvWait(0);
wa->set_line(*this);
wa->add_event(ev);
return wa;
}

NetEvProbe*pr = new NetEvProbe(scope, scope->local_symbol(),
Expand Down

0 comments on commit fff46da

Please sign in to comment.