From b155202dd2b1b0c85bb2944911f5b8e5e00ce73e Mon Sep 17 00:00:00 2001 From: steve Date: Fri, 16 Jul 1999 04:33:41 +0000 Subject: [PATCH] set_width for NetESubSignal. --- netlist.cc | 14 +++++++++++++- netlist.h | 7 ++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/netlist.cc b/netlist.cc index c4d5d6c5e..de52d15ea 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) -#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 @@ -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. * diff --git a/netlist.h b/netlist.h index c03779421..592345ead 100644 --- a/netlist.h +++ b/netlist.h @@ -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. *