Elaborate expressions for entity generics.

This commit is contained in:
Stephen Williams 2011-10-29 17:07:03 -07:00
parent 15da45f7cb
commit 5724f71339
2 changed files with 13 additions and 0 deletions

View File

@ -123,6 +123,7 @@ class Entity : public ComponentBase {
map<perm_string,VType::decl_t> declarations_;
int elaborate_generic_exprs_(void);
int elaborate_ports_(void);
};

View File

@ -77,6 +77,7 @@ int Entity::elaborate()
<< ", choosing architecture " << bind_arch_->get_name()
<< "." << endl;
errors += elaborate_generic_exprs_();
errors += elaborate_ports_();
errors += bind_arch_->elaborate(this);
@ -84,6 +85,17 @@ int Entity::elaborate()
return errors;
}
int Entity::elaborate_generic_exprs_()
{
int errors = 0;
for (vector<InterfacePort*>::const_iterator cur = parms_.begin()
; cur != parms_.end() ; ++cur) {
InterfacePort*curp = *cur;
curp->expr->elaborate_expr(this, 0, curp->type);
}
return errors;
}
int Entity::elaborate_ports_(void)
{
int errors = 0;