set_width for NetESubSignal.

This commit is contained in:
steve 1999-07-16 04:33:41 +00:00
parent fe614647c5
commit b155202dd2
2 changed files with 19 additions and 2 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: netlist.cc,v 1.41 1999/07/03 02:12:51 steve Exp $"
#ident "$Id: netlist.cc,v 1.42 1999/07/16 04:33:41 steve Exp $"
#endif
# include <cassert>
@ -718,6 +718,9 @@ NetESignal* NetESignal::dup_expr() const
NetESubSignal::NetESubSignal(NetESignal*sig, NetExpr*ex)
: sig_(sig), idx_(ex)
{
// This suppots mux type indexing of an expression, so the
// with is by definition 1 bit.
expr_width(1);
}
NetESubSignal::~NetESubSignal()
@ -730,6 +733,12 @@ NetESubSignal* NetESubSignal::dup_expr() const
assert(0);
}
bool NetESubSignal::set_width(unsigned w)
{
if (w != 1) return false;
return true;
}
NetEUnary::~NetEUnary()
{
delete expr_;
@ -1295,6 +1304,9 @@ NetNet* Design::find_signal(bool (*func)(const NetNet*))
/*
* $Log: netlist.cc,v $
* Revision 1.42 1999/07/16 04:33:41 steve
* set_width for NetESubSignal.
*
* Revision 1.41 1999/07/03 02:12:51 steve
* Elaborate user defined tasks.
*

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: netlist.h,v 1.44 1999/07/07 04:20:57 steve Exp $"
#ident "$Id: netlist.h,v 1.45 1999/07/16 04:33:41 steve Exp $"
#endif
/*
@ -1189,6 +1189,8 @@ class NetESubSignal : public NetExpr {
const string&name() const { return sig_->name(); }
const NetExpr*index() const { return idx_; }
virtual bool set_width(unsigned);
NetESubSignal* dup_expr() const;
virtual void expr_scan(struct expr_scan_t*) const;
@ -1338,6 +1340,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
/*
* $Log: netlist.h,v $
* Revision 1.45 1999/07/16 04:33:41 steve
* set_width for NetESubSignal.
*
* Revision 1.44 1999/07/07 04:20:57 steve
* Emit vvm for user defined tasks.
*