diff --git a/vhdlpp/architec_elaborate.cc b/vhdlpp/architec_elaborate.cc index 472ec317b..806519c51 100644 --- a/vhdlpp/architec_elaborate.cc +++ b/vhdlpp/architec_elaborate.cc @@ -45,19 +45,19 @@ int Architecture::elaborate(Entity*entity) // Elaborate initializer expressions for signals & variables for (map::iterator cur = old_signals_.begin() ; cur != old_signals_.end() ; ++cur) { - cur->second->elaborate_init_expr(entity, this); + cur->second->elaborate(entity, this); } for (map::iterator cur = new_signals_.begin() ; cur != new_signals_.end() ; ++cur) { - cur->second->elaborate_init_expr(entity, this); + cur->second->elaborate(entity, this); } for (map::iterator cur = old_variables_.begin() ; cur != old_variables_.end() ; ++cur) { - cur->second->elaborate_init_expr(entity, this); + cur->second->elaborate(entity, this); } for (map::iterator cur = new_variables_.begin() ; cur != new_variables_.end() ; ++cur) { - cur->second->elaborate_init_expr(entity, this); + cur->second->elaborate(entity, this); } // Elaborate subprograms diff --git a/vhdlpp/vsignal.cc b/vhdlpp/vsignal.cc index 68cec4c4a..e39142f6b 100644 --- a/vhdlpp/vsignal.cc +++ b/vhdlpp/vsignal.cc @@ -35,11 +35,12 @@ SigVarBase::~SigVarBase() { } -void SigVarBase::elaborate_init_expr(Entity*ent, ScopeBase*scope) +void SigVarBase::elaborate(Entity*ent, ScopeBase*scope) { - if(init_expr_) { + if(init_expr_) init_expr_->elaborate_expr(ent, scope, peek_type()); - } + + type_->elaborate(ent, scope); } void SigVarBase::type_elaborate_(VType::decl_t&decl) diff --git a/vhdlpp/vsignal.h b/vhdlpp/vsignal.h index 6aa225d14..9beda6cef 100644 --- a/vhdlpp/vsignal.h +++ b/vhdlpp/vsignal.h @@ -42,8 +42,8 @@ class SigVarBase : public LineInfo { void dump(ostream&out, int indent = 0) const; - // Elaborates initializer expressions if needed. - void elaborate_init_expr(Entity*ent, ScopeBase*scope); + // Elaborates type & initializer expressions. + void elaborate(Entity*ent, ScopeBase*scope); perm_string peek_name() const { return name_; }