Allow release to handle removal of target net.
This commit is contained in:
parent
2fad8d4cff
commit
8ab2ec6f86
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: design_dump.cc,v 1.132 2002/08/13 05:35:00 steve Exp $"
|
#ident "$Id: design_dump.cc,v 1.133 2002/08/19 00:06:11 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -658,8 +658,12 @@ void NetPDelay::dump(ostream&o, unsigned ind) const
|
||||||
|
|
||||||
void NetRelease::dump(ostream&o, unsigned ind) const
|
void NetRelease::dump(ostream&o, unsigned ind) const
|
||||||
{
|
{
|
||||||
|
if (lval_)
|
||||||
o << setw(ind) << "" << "release " << lval_->name() << "; "
|
o << setw(ind) << "" << "release " << lval_->name() << "; "
|
||||||
<< "/* " << get_line() << " */" << endl;
|
<< "/* " << get_line() << " */" << endl;
|
||||||
|
else
|
||||||
|
o << setw(ind) << "" << "release (null); "
|
||||||
|
<< "/* " << get_line() << " */" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetRepeat::dump(ostream&o, unsigned ind) const
|
void NetRepeat::dump(ostream&o, unsigned ind) const
|
||||||
|
|
@ -987,6 +991,9 @@ void Design::dump(ostream&o) const
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: design_dump.cc,v $
|
* $Log: design_dump.cc,v $
|
||||||
|
* Revision 1.133 2002/08/19 00:06:11 steve
|
||||||
|
* Allow release to handle removal of target net.
|
||||||
|
*
|
||||||
* Revision 1.132 2002/08/13 05:35:00 steve
|
* Revision 1.132 2002/08/13 05:35:00 steve
|
||||||
* Do not elide named blocks.
|
* Do not elide named blocks.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
11
net_force.cc
11
net_force.cc
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: net_force.cc,v 1.8 2002/08/12 01:34:59 steve Exp $"
|
#ident "$Id: net_force.cc,v 1.9 2002/08/19 00:06:12 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -116,10 +116,16 @@ const NetNet* NetForce::lval() const
|
||||||
NetRelease::NetRelease(NetNet*l)
|
NetRelease::NetRelease(NetNet*l)
|
||||||
: lval_(l)
|
: lval_(l)
|
||||||
{
|
{
|
||||||
|
/* Put myself into a release list that the net is
|
||||||
|
keeping. This is so that the NetNet can detach itself if
|
||||||
|
and when it is deleted by the optimizer. */
|
||||||
|
release_next_ = lval_->release_list_;
|
||||||
|
lval_->release_list_ = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
NetRelease::~NetRelease()
|
NetRelease::~NetRelease()
|
||||||
{
|
{
|
||||||
|
assert(lval_ == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const NetNet*NetRelease::lval() const
|
const NetNet*NetRelease::lval() const
|
||||||
|
|
@ -130,6 +136,9 @@ const NetNet*NetRelease::lval() const
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: net_force.cc,v $
|
* $Log: net_force.cc,v $
|
||||||
|
* Revision 1.9 2002/08/19 00:06:12 steve
|
||||||
|
* Allow release to handle removal of target net.
|
||||||
|
*
|
||||||
* Revision 1.8 2002/08/12 01:34:59 steve
|
* Revision 1.8 2002/08/12 01:34:59 steve
|
||||||
* conditional ident string using autoconfig.
|
* conditional ident string using autoconfig.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
18
netlist.cc
18
netlist.cc
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: netlist.cc,v 1.197 2002/08/12 01:34:59 steve Exp $"
|
#ident "$Id: netlist.cc,v 1.198 2002/08/19 00:06:12 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -240,6 +240,8 @@ NetNet::NetNet(NetScope*s, const string&n, Type t, unsigned npins)
|
||||||
{
|
{
|
||||||
assert(s);
|
assert(s);
|
||||||
|
|
||||||
|
release_list_ = 0;
|
||||||
|
|
||||||
verinum::V init_value = verinum::Vz;
|
verinum::V init_value = verinum::Vz;
|
||||||
Link::DIR dir = Link::PASSIVE;
|
Link::DIR dir = Link::PASSIVE;
|
||||||
|
|
||||||
|
|
@ -278,6 +280,8 @@ NetNet::NetNet(NetScope*s, const string&n, Type t, long ms, long ls)
|
||||||
{
|
{
|
||||||
assert(s);
|
assert(s);
|
||||||
|
|
||||||
|
release_list_ = 0;
|
||||||
|
|
||||||
verinum::V init_value = verinum::Vz;
|
verinum::V init_value = verinum::Vz;
|
||||||
Link::DIR dir = Link::PASSIVE;
|
Link::DIR dir = Link::PASSIVE;
|
||||||
|
|
||||||
|
|
@ -326,6 +330,15 @@ NetNet::~NetNet()
|
||||||
assert(lref_count_ == 0);
|
assert(lref_count_ == 0);
|
||||||
if (scope())
|
if (scope())
|
||||||
scope()->rem_signal(this);
|
scope()->rem_signal(this);
|
||||||
|
|
||||||
|
/* Detach me from all the NetRelease objects that refer to me. */
|
||||||
|
while (release_list_) {
|
||||||
|
NetRelease*tmp = release_list_;
|
||||||
|
release_list_ = tmp->release_next_;
|
||||||
|
assert(tmp->lval_ == this);
|
||||||
|
tmp->lval_ = 0;
|
||||||
|
tmp->release_next_ = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NetNet::Type NetNet::type() const
|
NetNet::Type NetNet::type() const
|
||||||
|
|
@ -2311,6 +2324,9 @@ const NetProc*NetTaskDef::proc() const
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: netlist.cc,v $
|
* $Log: netlist.cc,v $
|
||||||
|
* Revision 1.198 2002/08/19 00:06:12 steve
|
||||||
|
* Allow release to handle removal of target net.
|
||||||
|
*
|
||||||
* Revision 1.197 2002/08/12 01:34:59 steve
|
* Revision 1.197 2002/08/12 01:34:59 steve
|
||||||
* conditional ident string using autoconfig.
|
* conditional ident string using autoconfig.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
15
netlist.h
15
netlist.h
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: netlist.h,v 1.259 2002/08/18 22:07:16 steve Exp $"
|
#ident "$Id: netlist.h,v 1.260 2002/08/19 00:06:12 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -49,6 +49,7 @@ class Nexus;
|
||||||
class NetNode;
|
class NetNode;
|
||||||
class NetProc;
|
class NetProc;
|
||||||
class NetProcTop;
|
class NetProcTop;
|
||||||
|
class NetRelease;
|
||||||
class NetScope;
|
class NetScope;
|
||||||
class NetExpr;
|
class NetExpr;
|
||||||
class NetESignal;
|
class NetESignal;
|
||||||
|
|
@ -416,6 +417,12 @@ class NetNet : public NetObj, public LineInfo {
|
||||||
friend class NetScope;
|
friend class NetScope;
|
||||||
NetNet*sig_next_, *sig_prev_;
|
NetNet*sig_next_, *sig_prev_;
|
||||||
|
|
||||||
|
// Keep a list of release statements that reference me. I may
|
||||||
|
// need to know this in order to fix them up when I am
|
||||||
|
// deleted.
|
||||||
|
friend class NetRelease;
|
||||||
|
NetRelease*release_list_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Type type_;
|
Type type_;
|
||||||
PortType port_type_;
|
PortType port_type_;
|
||||||
|
|
@ -1930,6 +1937,9 @@ class NetRelease : public NetProc {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NetNet*lval_;
|
NetNet*lval_;
|
||||||
|
// Used to manage list within NetNet objects.
|
||||||
|
friend class NetNet;
|
||||||
|
NetRelease*release_next_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3016,6 +3026,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: netlist.h,v $
|
* $Log: netlist.h,v $
|
||||||
|
* Revision 1.260 2002/08/19 00:06:12 steve
|
||||||
|
* Allow release to handle removal of target net.
|
||||||
|
*
|
||||||
* Revision 1.259 2002/08/18 22:07:16 steve
|
* Revision 1.259 2002/08/18 22:07:16 steve
|
||||||
* Detect temporaries in sequential block synthesis.
|
* Detect temporaries in sequential block synthesis.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: t-dll-proc.cc,v 1.53 2002/08/13 05:35:00 steve Exp $"
|
#ident "$Id: t-dll-proc.cc,v 1.54 2002/08/19 00:06:12 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -591,11 +591,21 @@ bool dll_target::proc_release(const NetRelease*net)
|
||||||
|
|
||||||
stmt_cur_->type_ = IVL_ST_RELEASE;
|
stmt_cur_->type_ = IVL_ST_RELEASE;
|
||||||
|
|
||||||
|
/* If there is no signal attached to the release, then it is
|
||||||
|
the victom of an elided net. In that case, simply state
|
||||||
|
that there are no lvals, and that's all. */
|
||||||
|
const NetNet*lsig = net->lval();
|
||||||
|
if (lsig == 0) {
|
||||||
|
stmt_cur_->u_.cassign_.lvals = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert(lsig);
|
||||||
stmt_cur_->u_.cassign_.lvals = 1;
|
stmt_cur_->u_.cassign_.lvals = 1;
|
||||||
stmt_cur_->u_.cassign_.lval = (struct ivl_lval_s*)
|
stmt_cur_->u_.cassign_.lval = (struct ivl_lval_s*)
|
||||||
calloc(1, sizeof(struct ivl_lval_s));
|
calloc(1, sizeof(struct ivl_lval_s));
|
||||||
|
|
||||||
const NetNet*lsig = net->lval();
|
|
||||||
ivl_signal_t sig = find_signal(des_, lsig);
|
ivl_signal_t sig = find_signal(des_, lsig);
|
||||||
assert(sig);
|
assert(sig);
|
||||||
|
|
||||||
|
|
@ -812,6 +822,9 @@ void dll_target::proc_while(const NetWhile*net)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: t-dll-proc.cc,v $
|
* $Log: t-dll-proc.cc,v $
|
||||||
|
* Revision 1.54 2002/08/19 00:06:12 steve
|
||||||
|
* Allow release to handle removal of target net.
|
||||||
|
*
|
||||||
* Revision 1.53 2002/08/13 05:35:00 steve
|
* Revision 1.53 2002/08/13 05:35:00 steve
|
||||||
* Do not elide named blocks.
|
* Do not elide named blocks.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: vvp_process.c,v 1.63 2002/08/12 01:35:04 steve Exp $"
|
#ident "$Id: vvp_process.c,v 1.64 2002/08/19 00:06:12 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "vvp_priv.h"
|
# include "vvp_priv.h"
|
||||||
|
|
@ -763,6 +763,12 @@ static int show_stmt_release(ivl_statement_t net)
|
||||||
ivl_signal_t lsig;
|
ivl_signal_t lsig;
|
||||||
unsigned idx;
|
unsigned idx;
|
||||||
|
|
||||||
|
/* If there are no l-vals (the target signal has been elided)
|
||||||
|
then turn the release into a no-op. In other words, we are
|
||||||
|
done before we start. */
|
||||||
|
if (ivl_stmt_lvals(net) == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
assert(ivl_stmt_lvals(net) == 1);
|
assert(ivl_stmt_lvals(net) == 1);
|
||||||
lval = ivl_stmt_lval(net, 0);
|
lval = ivl_stmt_lval(net, 0);
|
||||||
|
|
||||||
|
|
@ -1226,6 +1232,9 @@ int draw_func_definition(ivl_scope_t scope)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vvp_process.c,v $
|
* $Log: vvp_process.c,v $
|
||||||
|
* Revision 1.64 2002/08/19 00:06:12 steve
|
||||||
|
* Allow release to handle removal of target net.
|
||||||
|
*
|
||||||
* Revision 1.63 2002/08/12 01:35:04 steve
|
* Revision 1.63 2002/08/12 01:35:04 steve
|
||||||
* conditional ident string using autoconfig.
|
* conditional ident string using autoconfig.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue