diff --git a/expr_synth.cc b/expr_synth.cc index 121bc201f..bbf58fae5 100644 --- a/expr_synth.cc +++ b/expr_synth.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: expr_synth.cc,v 1.17 2000/11/29 05:24:00 steve Exp $" +#ident "$Id: expr_synth.cc,v 1.18 2000/11/29 23:16:18 steve Exp $" #endif # include "netlist.h" @@ -308,7 +308,7 @@ NetNet* NetEConcat::synthesize(Design*des) obit += 1; } - if (tmp->local_flag()) + if (tmp->local_flag() && tmp->get_eref() == 0) delete tmp; } @@ -444,6 +444,9 @@ NetNet* NetESignal::synthesize(Design*des) /* * $Log: expr_synth.cc,v $ + * Revision 1.18 2000/11/29 23:16:18 steve + * Do not delete synthesized signals used in expressions. + * * Revision 1.17 2000/11/29 05:24:00 steve * synthesis for unary reduction ! and N operators. * diff --git a/netlist.cc b/netlist.cc index 32595cf49..a7db9598c 100644 --- a/netlist.cc +++ b/netlist.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: netlist.cc,v 1.147 2000/11/29 05:24:00 steve Exp $" +#ident "$Id: netlist.cc,v 1.148 2000/11/29 23:16:19 steve Exp $" #endif # include @@ -369,6 +369,12 @@ NetNet::NetNet(NetScope*s, const string&n, Type t, long ms, long ls) NetNet::~NetNet() { + if (eref_count_ > 0) { + cerr << get_line() << ": internal error: attempt to delete " + << "signal ``" << name() << "'' which has " + << "expression references." << endl; + dump_net(cerr, 4); + } assert(eref_count_ == 0); if (scope()) scope()->rem_signal(this); @@ -2465,6 +2471,9 @@ bool NetUDP::sequ_glob_(string input, char output) /* * $Log: netlist.cc,v $ + * Revision 1.148 2000/11/29 23:16:19 steve + * Do not delete synthesized signals used in expressions. + * * Revision 1.147 2000/11/29 05:24:00 steve * synthesis for unary reduction ! and N operators. *