diff --git a/t-dll-api.cc b/t-dll-api.cc index 1d94dc593..532a6f92d 100644 --- a/t-dll-api.cc +++ b/t-dll-api.cc @@ -17,10 +17,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: t-dll-api.cc,v 1.142 2007/03/02 06:13:22 steve Exp $" +#ident "$Id: t-dll-api.cc,v 1.143 2007/03/26 16:51:48 steve Exp $" #endif # include "config.h" +# include "StringHeap.h" # include "t-dll.h" # include # include @@ -28,6 +29,8 @@ # include #endif +static StringHeap api_strings; + /* THE FOLLOWING ARE FUNCTIONS THAT ARE CALLED FROM THE TARGET. */ extern "C" const char*ivl_design_flag(ivl_design_t des, const char*key) @@ -1139,9 +1142,16 @@ extern "C" ivl_signal_t ivl_lval_sig(ivl_lval_t net) } } +/* + * The nexus name is rarely needed. (Shouldn't be needed at all!) This + * function will calculate the name if it is not already calculated. + */ extern "C" const char* ivl_nexus_name(ivl_nexus_t net) { assert(net); + if (net->name_ == 0) { + net->name_ = api_strings.add(net->nexus_->name()); + } return net->name_; } @@ -1950,6 +1960,9 @@ extern "C" ivl_statement_t ivl_stmt_sub_stmt(ivl_statement_t net) /* * $Log: t-dll-api.cc,v $ + * Revision 1.143 2007/03/26 16:51:48 steve + * do not calculate nexus name unless needed. + * * Revision 1.142 2007/03/02 06:13:22 steve * Add support for edge sensitive spec paths. * diff --git a/t-dll.cc b/t-dll.cc index c7b93c133..150ef2405 100644 --- a/t-dll.cc +++ b/t-dll.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: t-dll.cc,v 1.166 2007/03/02 06:13:22 steve Exp $" +#ident "$Id: t-dll.cc,v 1.167 2007/03/26 16:51:49 steve Exp $" #endif # include "config.h" @@ -1920,7 +1920,7 @@ void dll_target::scope(const NetScope*net) unsigned i; scope = NULL; for (i = 0; i < des_.nroots_ && scope == NULL; i++) { - if (strcmp(des_.roots_[i]->name_, net->name().c_str()) == 0) + if (strcmp(des_.roots_[i]->name_, net->basename()) == 0) scope = des_.roots_[i]; } assert(scope); @@ -2127,7 +2127,8 @@ void dll_target::signal(const NetNet*net) } } else { ivl_nexus_t tmp = nexus_sig_make(obj, idx); - tmp->name_ = strings_.add(nex->name()); + tmp->nexus_ = nex; + tmp->name_ = 0; nex->t_cookie(tmp); if (obj->array_words > 1) obj->pins[idx] = tmp; @@ -2199,6 +2200,9 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj }; /* * $Log: t-dll.cc,v $ + * Revision 1.167 2007/03/26 16:51:49 steve + * do not calculate nexus name unless needed. + * * Revision 1.166 2007/03/02 06:13:22 steve * Add support for edge sensitive spec paths. * diff --git a/t-dll.h b/t-dll.h index d13d34182..086dda9ac 100644 --- a/t-dll.h +++ b/t-dll.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: t-dll.h,v 1.139 2007/03/02 06:13:22 steve Exp $" +#ident "$Id: t-dll.h,v 1.140 2007/03/26 16:51:49 steve Exp $" #endif # include "target.h" @@ -480,6 +480,7 @@ struct ivl_nexus_ptr_s { struct ivl_nexus_s { unsigned nptr_; struct ivl_nexus_ptr_s*ptrs_; + const Nexus*nexus_; const char*name_; void*private_data; }; @@ -669,6 +670,9 @@ struct ivl_statement_s { /* * $Log: t-dll.h,v $ + * Revision 1.140 2007/03/26 16:51:49 steve + * do not calculate nexus name unless needed. + * * Revision 1.139 2007/03/02 06:13:22 steve * Add support for edge sensitive spec paths. *