From 13958cf374745fa86060cb5c3bb6933cf6739ffa Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Fri, 28 Mar 2008 21:34:18 -0500 Subject: [PATCH] Elaborate_sig skips ports that are missing on primitives It is illegal for primitives to not have ports bound, but that error will be taken care of later, during elaborate. --- elab_sig.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/elab_sig.cc b/elab_sig.cc index 95a9fa032..328ede2c0 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -298,8 +298,18 @@ bool PGBuiltin::elaborate_sig(Design*des, NetScope*scope) const { bool flag = true; - for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) - flag = pin(idx)->elaborate_sig(des, scope) && flag; + for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) { + const PExpr* pin_expr = pin(idx); + if (pin_expr == 0) { + // If there is no pin expression for this port, + // then skip it. Do not bother generating an error + // message here, that will be done during + // elaboration where these semantic details are tested. + continue; + } + ivl_assert(*this, pin_expr); + flag = pin_expr->elaborate_sig(des, scope) && flag; + } return flag; }