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>
This commit is contained in:
parent
2fc5f4f7d8
commit
c92b37b1bd
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue