diff --git a/elab_net.cc b/elab_net.cc index b8f6e3a9b..4a7dfa83b 100644 --- a/elab_net.cc +++ b/elab_net.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: elab_net.cc,v 1.145 2005/01/28 05:39:33 steve Exp $" +#ident "$Id: elab_net.cc,v 1.146 2005/01/29 00:37:06 steve Exp $" #endif # include "config.h" @@ -1264,21 +1264,25 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope, unsigned repeat = 1; if (repeat_) { - verinum*rep = repeat_->eval_const(des, scope); - if (rep == 0) { + NetExpr*etmp = elab_and_eval(des, scope, repeat_); + assert(etmp); + NetEConst*erep = dynamic_cast(etmp); + + if (erep == 0) { cerr << get_line() << ": internal error: Unable to " << "evaluate constant repeat expression." << endl; des->errors += 1; return 0; } - repeat = rep->as_ulong(); + repeat = erep->value().as_ulong(); + delete etmp; if (repeat == 0) { - cerr << get_line() << ": error: Invalid repeat value." + cerr << get_line() << ": error: Concatenation epeat " + "may not be 0." << endl; des->errors += 1; - delete rep; return 0; } } @@ -2437,6 +2441,9 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope, /* * $Log: elab_net.cc,v $ + * Revision 1.146 2005/01/29 00:37:06 steve + * Integrate pr1072 fix from v0_8-branch. + * * Revision 1.145 2005/01/28 05:39:33 steve * Simplified NetMult and IVL_LPM_MULT. *