diff --git a/vhdlpp/entity_elaborate.cc b/vhdlpp/entity_elaborate.cc index 861029ca7..4d74d0039 100644 --- a/vhdlpp/entity_elaborate.cc +++ b/vhdlpp/entity_elaborate.cc @@ -92,7 +92,8 @@ int Entity::elaborate_generic_exprs_() for (vector::const_iterator cur = parms_.begin() ; cur != parms_.end() ; ++cur) { InterfacePort*curp = *cur; - curp->expr->elaborate_expr(this, 0, curp->type); + if(curp->expr) + curp->expr->elaborate_expr(this, 0, curp->type); } return errors; } diff --git a/vhdlpp/entity_emit.cc b/vhdlpp/entity_emit.cc index 41fb1eef8..268b36f7d 100644 --- a/vhdlpp/entity_emit.cc +++ b/vhdlpp/entity_emit.cc @@ -50,9 +50,11 @@ int Entity::emit(ostream&out) const InterfacePort*curp = *cur; if (cur != parms_.begin()) out << ", "; - out << "parameter \\" << curp->name << " = "; - ivl_assert(*this, curp->expr); - errors += curp->expr->emit(out, this, 0); + out << "parameter \\" << curp->name << " "; + if(curp->expr) { + out << "= "; + errors += curp->expr->emit(out, this, 0); + } } out << ") "; }