Permalink
Browse files

Error message for inconnected primitive ports.

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...
1 parent 2fc5f4f commit c92b37b1bdb08b3a3b5c5b3c670090f80cc8eb8d @steveicarus committed Sep 4, 2007
Showing with 6 additions and 0 deletions.
  1. +6 −0 elaborate.cc
View
@@ -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);

0 comments on commit c92b37b

Please sign in to comment.