diff --git a/elab_scope.cc b/elab_scope.cc index 852f863e6..1fe8faf51 100644 --- a/elab_scope.cc +++ b/elab_scope.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: elab_scope.cc,v 1.42 2007/03/05 05:59:10 steve Exp $" +#ident "$Id: elab_scope.cc,v 1.43 2007/03/08 06:11:35 steve Exp $" #endif # include "config.h" @@ -381,6 +381,14 @@ bool PGenerate::generate_scope_loop_(Design*des, NetScope*container) << loop_index << " = " << genvar_verinum << endl; } + // Scan the generated scope for gates that may create + // their own scopes. + typedef list::const_iterator pgate_list_it_t; + for (pgate_list_it_t cur = gates.begin() + ; cur != gates.end() ; cur ++) { + (*cur) ->elaborate_scope(des, scope); + } + scope_list_.push_back(scope); // Calculate the step for the loop variable. @@ -753,6 +761,9 @@ void PWhile::elaborate_scope(Design*des, NetScope*scope) const /* * $Log: elab_scope.cc,v $ + * Revision 1.43 2007/03/08 06:11:35 steve + * Elaborate scopes of modules instantated in generate loops. + * * Revision 1.42 2007/03/05 05:59:10 steve * Handle processes within generate loops. * diff --git a/elab_sig.cc b/elab_sig.cc index 5f0c586b1..7b2ae9edc 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: elab_sig.cc,v 1.47 2007/03/07 04:24:59 steve Exp $" +#ident "$Id: elab_sig.cc,v 1.48 2007/03/08 06:11:35 steve Exp $" #endif # include "config.h" @@ -283,6 +283,12 @@ bool PGenerate::elaborate_sig_(Design*des, NetScope*scope) const cur->elaborate_sig(des, scope); } + typedef list::const_iterator pgate_list_it_t; + for (pgate_list_it_t cur = gates.begin() + ; cur != gates.end() ; cur ++) { + (*cur) ->elaborate_sig(des, scope); + } + return true; } @@ -732,6 +738,9 @@ void PWire::elaborate_sig(Design*des, NetScope*scope) const /* * $Log: elab_sig.cc,v $ + * Revision 1.48 2007/03/08 06:11:35 steve + * Elaborate scopes of modules instantated in generate loops. + * * Revision 1.47 2007/03/07 04:24:59 steve * Make integer width controllable. *