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.
This commit is contained in:
Stephen Williams 2008-03-28 21:34:18 -05:00
parent b5b5a9935c
commit 13958cf374
1 changed files with 12 additions and 2 deletions

View File

@ -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;
}