Over agressive signal elimination in constant probadation.
This commit is contained in:
parent
2b40c7ce11
commit
acfb5c177d
23
cprop.cc
23
cprop.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: cprop.cc,v 1.7 2000/02/23 02:56:54 steve Exp $"
|
||||
#ident "$Id: cprop.cc,v 1.8 2000/04/28 21:00:28 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "netlist.h"
|
||||
|
|
@ -297,24 +297,6 @@ void cprop_dc_functor::lpm_const(Design*des, NetConst*obj)
|
|||
}
|
||||
}
|
||||
|
||||
// If there are no other drivers, delete all the signals that
|
||||
// are also dangling.
|
||||
for (unsigned idx = 0 ; idx < obj->pin_count() ; idx += 1) {
|
||||
if (count_outputs(obj->pin(idx)) != 1)
|
||||
continue;
|
||||
|
||||
NetObj*cur;
|
||||
unsigned pin;
|
||||
obj->pin(idx).next_link(cur, pin);
|
||||
while (cur != obj) {
|
||||
NetNet*tmp = dynamic_cast<NetNet*>(cur);
|
||||
cur->pin(pin).next_link(cur, pin);
|
||||
assert(tmp->get_eref() == 0);
|
||||
cerr << "cprop: delete dangling signal " <<
|
||||
tmp->name() << "." << endl;
|
||||
delete tmp;
|
||||
}
|
||||
}
|
||||
|
||||
// Done. Delete me.
|
||||
delete obj;
|
||||
|
|
@ -337,6 +319,9 @@ void cprop(Design*des)
|
|||
|
||||
/*
|
||||
* $Log: cprop.cc,v $
|
||||
* Revision 1.8 2000/04/28 21:00:28 steve
|
||||
* Over agressive signal elimination in constant probadation.
|
||||
*
|
||||
* Revision 1.7 2000/02/23 02:56:54 steve
|
||||
* Macintosh compilers do not support ident.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: design_dump.cc,v 1.78 2000/04/23 03:45:24 steve Exp $"
|
||||
#ident "$Id: design_dump.cc,v 1.79 2000/04/28 21:00:29 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -49,6 +49,7 @@ void NetNet::dump_net(ostream&o, unsigned ind) const
|
|||
pin_count() << "]";
|
||||
if (local_flag_)
|
||||
o << " (local)";
|
||||
o << " (eref=" << get_eref() << ")";
|
||||
if (scope_)
|
||||
o << " scope=" << scope_->name();
|
||||
o << " #(" << rise_time() << "," << fall_time() << "," <<
|
||||
|
|
@ -56,6 +57,23 @@ void NetNet::dump_net(ostream&o, unsigned ind) const
|
|||
for (unsigned idx = pin_count() ; idx > 0 ; idx -= 1)
|
||||
o << ivalue_[idx-1];
|
||||
o << endl;
|
||||
|
||||
for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) {
|
||||
if (! pin(idx).is_linked())
|
||||
continue;
|
||||
|
||||
o << setw(ind+4) << "" << "[" << idx << "]:";
|
||||
|
||||
unsigned cpin;
|
||||
const NetObj*cur;
|
||||
for (pin(idx).next_link(cur, cpin)
|
||||
; (cur != this) || (cpin != idx)
|
||||
; cur->pin(cpin).next_link(cur, cpin)) {
|
||||
|
||||
o << " " << cur->name() << "[" << cpin << "]";
|
||||
}
|
||||
o << endl;
|
||||
}
|
||||
dump_obj_attr(o, ind+4);
|
||||
}
|
||||
|
||||
|
|
@ -908,6 +926,9 @@ void Design::dump(ostream&o) const
|
|||
|
||||
/*
|
||||
* $Log: design_dump.cc,v $
|
||||
* Revision 1.79 2000/04/28 21:00:29 steve
|
||||
* Over agressive signal elimination in constant probadation.
|
||||
*
|
||||
* Revision 1.78 2000/04/23 03:45:24 steve
|
||||
* Add support for the procedural release statement.
|
||||
*
|
||||
|
|
|
|||
13
elab_net.cc
13
elab_net.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: elab_net.cc,v 1.29 2000/04/01 21:40:22 steve Exp $"
|
||||
#ident "$Id: elab_net.cc,v 1.30 2000/04/28 21:00:29 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "PExpr.h"
|
||||
|
|
@ -169,6 +169,14 @@ NetNet* PEBinary::elaborate_net_add_(Design*des, const string&path,
|
|||
if (lwidth > owidth)
|
||||
owidth = width + 1;
|
||||
|
||||
// Pad out the operands, if necessary, the match the width of
|
||||
// the adder device.
|
||||
if (lsig->pin_count() < width)
|
||||
lsig = pad_to_width(des, path, lsig, width);
|
||||
|
||||
if (rsig->pin_count() < width)
|
||||
rsig = pad_to_width(des, path, rsig, width);
|
||||
|
||||
// Make the adder as wide as the widest operand
|
||||
osig = new NetNet(0, des->local_symbol(path), NetNet::WIRE, owidth);
|
||||
NetAddSub*adder = new NetAddSub(name, width);
|
||||
|
|
@ -1408,6 +1416,9 @@ NetNet* PEUnary::elaborate_net(Design*des, const string&path,
|
|||
|
||||
/*
|
||||
* $Log: elab_net.cc,v $
|
||||
* Revision 1.30 2000/04/28 21:00:29 steve
|
||||
* Over agressive signal elimination in constant probadation.
|
||||
*
|
||||
* Revision 1.29 2000/04/01 21:40:22 steve
|
||||
* Add support for integer division.
|
||||
*
|
||||
|
|
|
|||
15
nodangle.cc
15
nodangle.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: nodangle.cc,v 1.4 2000/04/18 04:50:20 steve Exp $"
|
||||
#ident "$Id: nodangle.cc,v 1.5 2000/04/28 21:00:29 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -53,6 +53,16 @@ void nodangle_f::signal(Design*des, NetNet*sig)
|
|||
if (sig->get_eref() > 0)
|
||||
return;
|
||||
|
||||
/* Look for a completely unconnected signal. */
|
||||
unsigned unlinked = 0;
|
||||
for (unsigned idx = 0 ; idx < sig->pin_count() ; idx += 1)
|
||||
if (! sig->pin(idx).is_linked()) unlinked += 1;
|
||||
|
||||
if (unlinked == sig->pin_count()) {
|
||||
delete sig;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check to see if there is some significant signal connected
|
||||
to every pin of this signal. */
|
||||
unsigned significant_flags = 0;
|
||||
|
|
@ -84,6 +94,9 @@ void nodangle(Design*des)
|
|||
|
||||
/*
|
||||
* $Log: nodangle.cc,v $
|
||||
* Revision 1.5 2000/04/28 21:00:29 steve
|
||||
* Over agressive signal elimination in constant probadation.
|
||||
*
|
||||
* Revision 1.4 2000/04/18 04:50:20 steve
|
||||
* Clean up unneeded NetEvent objects.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue