Pad limited r-values in continuous assignments.

This commit is contained in:
steve 2001-11-04 23:12:29 +00:00
parent cc5ddc0b6b
commit 649428962e
1 changed files with 11 additions and 10 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) && !defined(macintosh) #if !defined(WINNT) && !defined(macintosh)
#ident "$Id: elaborate.cc,v 1.228 2001/10/31 03:22:31 steve Exp $" #ident "$Id: elaborate.cc,v 1.229 2001/11/04 23:12:29 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -183,15 +183,13 @@ void PGAssign::elaborate(Design*des, const string&path) const
assert(lval && rval); assert(lval && rval);
if (lval->pin_count() > rval->pin_count()) {
cerr << get_line() << ": sorry: lval width (" << /* If the r-value insists on being smaller then the l-value
lval->pin_count() << ") > rval width (" << (perhaps it is explicitly sized) the pad it out to be the
rval->pin_count() << ")." << endl; right width so that something is connected to all the bits
delete lval; of the l-value. */
delete rval; if (lval->pin_count() > rval->pin_count())
des->errors += 1; rval = pad_to_width(des, rval, lval->pin_count());
return;
}
for (unsigned idx = 0 ; idx < lval->pin_count() ; idx += 1) for (unsigned idx = 0 ; idx < lval->pin_count() ; idx += 1)
connect(lval->pin(idx), rval->pin(idx)); connect(lval->pin(idx), rval->pin(idx));
@ -2411,6 +2409,9 @@ Design* elaborate(list<const char*>roots)
/* /*
* $Log: elaborate.cc,v $ * $Log: elaborate.cc,v $
* Revision 1.229 2001/11/04 23:12:29 steve
* Pad limited r-values in continuous assignments.
*
* Revision 1.228 2001/10/31 03:22:31 steve * Revision 1.228 2001/10/31 03:22:31 steve
* Give up if roots are missing. * Give up if roots are missing.
* *