parameter names do not have defined size.

This commit is contained in:
steve 2001-10-07 03:38:08 +00:00
parent cbd501b865
commit 494b5ff1ee
3 changed files with 33 additions and 3 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: elab_pexpr.cc,v 1.9 2001/07/25 03:10:49 steve Exp $"
#ident "$Id: elab_pexpr.cc,v 1.10 2001/10/07 03:38:08 steve Exp $"
#endif
# include "config.h"
@ -101,7 +101,22 @@ NetEConcat* PEConcat::elaborate_pexpr(Design*des, NetScope*scope) const
assert(parms_[idx]);
NetExpr*ex = parms_[idx]->elaborate_pexpr(des, scope);
if (ex == 0) continue;
ex->set_line(*parms_[idx]);
if (! ex->has_width()) {
cerr << ex->get_line() << ": error: operand of "
<< "concatenation has indefinite width: "
<< *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);
}
@ -203,6 +218,9 @@ NetExpr*PEUnary::elaborate_pexpr (Design*des, NetScope*scope) const
/*
* $Log: elab_pexpr.cc,v $
* Revision 1.10 2001/10/07 03:38:08 steve
* parameter names do not have defined size.
*
* Revision 1.9 2001/07/25 03:10:49 steve
* Create a config.h.in file to hold all the config
* junk, and support gcc 3.0. (Stephan Boettcher)

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: netlist.cc,v 1.171 2001/09/29 01:53:22 steve Exp $"
#ident "$Id: netlist.cc,v 1.172 2001/10/07 03:38:08 steve Exp $"
#endif
# include "config.h"
@ -2144,6 +2144,11 @@ NetEParam::~NetEParam()
{
}
bool NetEParam::has_width() const
{
return false;
}
NetEParam* NetEParam::dup_expr() const
{
return new NetEParam(des_, scope_, name_);
@ -2424,6 +2429,9 @@ const NetProc*NetTaskDef::proc() const
/*
* $Log: netlist.cc,v $
* Revision 1.172 2001/10/07 03:38:08 steve
* parameter names do not have defined size.
*
* Revision 1.171 2001/09/29 01:53:22 steve
* Fix the size of unsized constant operants to compare (PR#274)
*

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: netlist.h,v 1.214 2001/08/25 23:50:03 steve Exp $"
#ident "$Id: netlist.h,v 1.215 2001/10/07 03:38:08 steve Exp $"
#endif
/*
@ -2279,6 +2279,7 @@ class NetEParam : public NetExpr {
~NetEParam();
virtual bool set_width(unsigned w);
virtual bool has_width() const;
virtual void expr_scan(struct expr_scan_t*) const;
virtual NetExpr* eval_tree();
virtual NetEParam* dup_expr() const;
@ -2847,6 +2848,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
/*
* $Log: netlist.h,v $
* Revision 1.215 2001/10/07 03:38:08 steve
* parameter names do not have defined size.
*
* Revision 1.214 2001/08/25 23:50:03 steve
* Change the NetAssign_ class to refer to the signal
* instead of link into the netlist. This is faster