Skip to content

Commit

Permalink
Error message for inconnected primitive ports.
Browse files Browse the repository at this point in the history
Error message (instead of a seg fault) when a primitive port
is left unconnected.

Signed-off-by: Stephen Williams <steve@icarus.com>
  • Loading branch information
steveicarus committed Sep 4, 2007
1 parent 2fc5f4f commit c92b37b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions elaborate.cc
Expand Up @@ -469,6 +469,12 @@ void PGBuiltin::elaborate(Design*des, NetScope*scope) const

for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) {
const PExpr*ex = pin(idx);
if (ex == 0) {
cerr << get_line() << ": error: Logic gate port "
"expressions are not optional." << endl;
des->errors += 1;
return;
}
NetNet*sig = (idx == 0)
? ex->elaborate_lnet(des, scope, true)
: ex->elaborate_net(des, scope, 0, 0, 0, 0);
Expand Down

0 comments on commit c92b37b

Please sign in to comment.