diff --git a/elab_net.cc b/elab_net.cc index 9a3a6a0e7..dd7af4fd0 100644 --- a/elab_net.cc +++ b/elab_net.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: elab_net.cc,v 1.206 2007/06/04 02:19:07 steve Exp $" +#ident "$Id: elab_net.cc,v 1.207 2007/06/12 04:05:45 steve Exp $" #endif # include "config.h" @@ -2221,6 +2221,8 @@ bool PEIdent::eval_part_select_(Design*des, NetScope*scope, NetNet*sig, endl; cerr << get_line() << ": : Index expression is: " << *index_tail.msb << endl; + cerr << get_line() << ": : Context scope is: " + << scope_path(scope) << endl; des->errors += 1; return false; } @@ -3016,6 +3018,9 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope, /* * $Log: elab_net.cc,v $ + * Revision 1.207 2007/06/12 04:05:45 steve + * Put instantiated modules in the proper generated scope. + * * Revision 1.206 2007/06/04 02:19:07 steve * Handle bit/part select of array words in nets. * diff --git a/pform.cc b/pform.cc index ea45f8f2a..801f866a1 100644 --- a/pform.cc +++ b/pform.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: pform.cc,v 1.147 2007/06/02 03:42:13 steve Exp $" +#ident "$Id: pform.cc,v 1.148 2007/06/12 04:05:45 steve Exp $" #endif # include "config.h" @@ -920,6 +920,14 @@ void pform_makegates(PGBuiltin::Type type, * constraints, and sometimes different syntax. The X_modgate * functions handle the instantiations of modules (and UDP objects) by * making PGModule objects. + * + * The first pform_make_modgate handles the case of a module + * instantiated with ports passed by position. The "wires" is an + * ordered array of port expressions. + * + * The second pform_make_modgate handles the case of a module + * instantiated with ports passed by name. The "bind" argument is the + * ports matched with names. */ static void pform_make_modgate(perm_string type, perm_string name, @@ -992,7 +1000,11 @@ static void pform_make_modgate(perm_string type, cur->set_parameters(overrides->by_order); } - pform_cur_module->add_gate(cur); + + if (pform_cur_generate) + pform_cur_generate->add_gate(cur); + else + pform_cur_module->add_gate(cur); } void pform_make_modgates(perm_string type, @@ -1778,6 +1790,9 @@ int pform_parse(const char*path, FILE*file) /* * $Log: pform.cc,v $ + * Revision 1.148 2007/06/12 04:05:45 steve + * Put instantiated modules in the proper generated scope. + * * Revision 1.147 2007/06/02 03:42:13 steve * Properly evaluate scope path expressions. *