From 338240c37bd94ecd80e222d4659e05927ade83c6 Mon Sep 17 00:00:00 2001 From: steve Date: Sat, 21 Nov 1998 19:19:44 +0000 Subject: [PATCH] Give anonymous modules a name when elaborated. --- elaborate.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/elaborate.cc b/elaborate.cc index 9c4ea2efc..ffeb5d754 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: elaborate.cc,v 1.4 1998/11/11 03:13:04 steve Exp $" +#ident "$Id: elaborate.cc,v 1.5 1998/11/21 19:19:44 steve Exp $" #endif /* @@ -219,11 +219,17 @@ void PGModule::elaborate(Design*des, const string&path) const return; } + string my_name; + if (get_name() == "") + my_name = local_symbol(path); + else + my_name = path + "." + get_name(); + // Elaborate this instance of the module. The recursive // elaboration causes the module to generate a netlist with // the ports represented by NetNet objects. I will find them // later. - rmod->elaborate(des, path + "." + get_name()); + rmod->elaborate(des, my_name); // Now connect the ports of the newly elaborated designs to // the expressions that are the instantiation parameters. @@ -241,7 +247,7 @@ void PGModule::elaborate(Design*des, const string&path) const } assert(sig); - NetNet*prt = des->find_signal(path + "." + get_name() + "." + + NetNet*prt = des->find_signal(my_name + "." + rmod->ports[idx]->name); assert(prt); @@ -700,6 +706,9 @@ Design* elaborate(const list&modules, const string&root) /* * $Log: elaborate.cc,v $ + * Revision 1.5 1998/11/21 19:19:44 steve + * Give anonymous modules a name when elaborated. + * * Revision 1.4 1998/11/11 03:13:04 steve * Handle while loops. *