Fix handling of errors in behavioral lvalues. (PR#28)

This commit is contained in:
steve 2000-10-26 17:09:46 +00:00
parent df660bab0c
commit f915efaf15
2 changed files with 18 additions and 4 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_lval.cc,v 1.4 2000/09/10 15:43:59 steve Exp $"
#ident "$Id: elab_lval.cc,v 1.5 2000/10/26 17:09:46 steve Exp $"
#endif
# include "PExpr.h"
@ -103,6 +103,13 @@ NetAssign_* PEConcat::elaborate_lval(Design*des, NetScope*scope) const
for (unsigned idx = 0 ; idx < parms_.count() ; idx += 1) {
NetAssign_*tmp = parms_[idx]->elaborate_lval(des, scope);
/* If the l-value doesn't elaborate, the error was
already detected and printed. We just skip it and let
the compiler catch more errors. */
if (tmp == 0)
continue;
assert(tmp);
/* If adjacent l-values in the concatenation are not bit
@ -274,6 +281,9 @@ NetAssign_* PEIdent::elaborate_lval(Design*des, NetScope*scope) const
/*
* $Log: elab_lval.cc,v $
* Revision 1.5 2000/10/26 17:09:46 steve
* Fix handling of errors in behavioral lvalues. (PR#28)
*
* Revision 1.4 2000/09/10 15:43:59 steve
* Some error checking.
*

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: elaborate.cc,v 1.193 2000/10/07 19:45:42 steve Exp $"
#ident "$Id: elaborate.cc,v 1.194 2000/10/26 17:09:46 steve Exp $"
#endif
/*
@ -501,9 +501,10 @@ void PGModule::elaborate_mod_(Design*des, Module*rmod, const string&path) const
assert(sig);
// Check that the parts have matching pin counts. If
// not, they are different widths.
// not, they are different widths. Note that idx is 0
// based, but users count parameter positions from 1.
if (prts_pin_count != sig->pin_count()) {
cerr << get_line() << ": error: Port " << idx << " of "
cerr << get_line() << ": error: Port " << (idx+1) << " of "
<< type_ << " expects " << prts_pin_count <<
" pins, got " << sig->pin_count() << " from "
<< sig->name() << endl;
@ -2282,6 +2283,9 @@ Design* elaborate(const map<string,Module*>&modules,
/*
* $Log: elaborate.cc,v $
* Revision 1.194 2000/10/26 17:09:46 steve
* Fix handling of errors in behavioral lvalues. (PR#28)
*
* Revision 1.193 2000/10/07 19:45:42 steve
* Put logic devices into scopes.
*