diff --git a/elab_pexpr.cc b/elab_pexpr.cc index b2ba09148..9e95f79e8 100644 --- a/elab_pexpr.cc +++ b/elab_pexpr.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: elab_pexpr.cc,v 1.16 2002/08/12 01:34:59 steve Exp $" +#ident "$Id: elab_pexpr.cc,v 1.17 2002/11/09 01:40:19 steve Exp $" #endif # include "config.h" @@ -108,11 +108,6 @@ NetEConcat* PEConcat::elaborate_pexpr(Design*des, NetScope*scope) const << *ex << endl; des->errors += 1; - } else if (ex->expr_width() == 0) { - cerr << ex->get_line() << ": internal error: " - << "Operand of concatenation has no width: " - << *ex << endl; - des->errors += 1; } tmp->set(idx, ex); @@ -222,6 +217,9 @@ NetExpr*PEUnary::elaborate_pexpr (Design*des, NetScope*scope) const /* * $Log: elab_pexpr.cc,v $ + * Revision 1.17 2002/11/09 01:40:19 steve + * Postpone parameter width check to evaluation. + * * Revision 1.16 2002/08/12 01:34:59 steve * conditional ident string using autoconfig. * diff --git a/eval_tree.cc b/eval_tree.cc index 7dd237a97..c1c7afa27 100644 --- a/eval_tree.cc +++ b/eval_tree.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: eval_tree.cc,v 1.42 2002/10/19 22:59:49 steve Exp $" +#ident "$Id: eval_tree.cc,v 1.43 2002/11/09 01:40:19 steve Exp $" #endif # include "config.h" @@ -752,7 +752,13 @@ NetEConst* NetEConcat::eval_tree() << "operand has indefinite width: " << *parms_[idx] << endl; local_errors += 1; + } else if (expr->expr_width() == 0) { + cerr << expr->get_line() << ": internal error: " + << "Operand of concatenation has no width: " + << *expr << endl; + local_errors += 1; } + gap += expr->expr_width(); } @@ -1134,6 +1140,9 @@ NetEConst* NetEUReduce::eval_tree() /* * $Log: eval_tree.cc,v $ + * Revision 1.43 2002/11/09 01:40:19 steve + * Postpone parameter width check to evaluation. + * * Revision 1.42 2002/10/19 22:59:49 steve * Redo the parameter vector support to allow * parameter names in range expressions. diff --git a/net_expr.cc b/net_expr.cc index 5beb05efb..b7a697d4f 100644 --- a/net_expr.cc +++ b/net_expr.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: net_expr.cc,v 1.9 2002/11/06 02:25:13 steve Exp $" +#ident "$Id: net_expr.cc,v 1.10 2002/11/09 01:40:19 steve Exp $" #endif # include "config.h" @@ -109,6 +109,11 @@ NetEConcat::~NetEConcat() delete parms_[idx]; } +bool NetEConcat::has_width() const +{ + return true; +} + void NetEConcat::set(unsigned idx, NetExpr*e) { assert(idx < parms_.count()); @@ -237,6 +242,9 @@ bool NetESelect::set_width(unsigned w) /* * $Log: net_expr.cc,v $ + * Revision 1.10 2002/11/09 01:40:19 steve + * Postpone parameter width check to evaluation. + * * Revision 1.9 2002/11/06 02:25:13 steve * No need to keep excess width from an * unsigned constant value, if it can diff --git a/netlist.h b/netlist.h index db7acdb60..62bcbf9d3 100644 --- a/netlist.h +++ b/netlist.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: netlist.h,v 1.268 2002/11/02 03:27:52 steve Exp $" +#ident "$Id: netlist.h,v 1.269 2002/11/09 01:40:19 steve Exp $" #endif /* @@ -2428,6 +2428,7 @@ class NetEConcat : public NetExpr { NetExpr* parm(unsigned idx) const { return parms_[idx]; } virtual NexusSet* nex_input(); + virtual bool has_width() const; virtual bool set_width(unsigned w); virtual NetEConcat* dup_expr() const; virtual NetEConst* eval_tree(); @@ -3083,6 +3084,9 @@ extern ostream& operator << (ostream&, NetNet::Type); /* * $Log: netlist.h,v $ + * Revision 1.269 2002/11/09 01:40:19 steve + * Postpone parameter width check to evaluation. + * * Revision 1.268 2002/11/02 03:27:52 steve * Allow named events to be referenced by * hierarchical names.