Handle assign of real to vector.

This commit is contained in:
steve 2003-06-13 19:10:20 +00:00
parent dc90f0d52d
commit b43c543455
2 changed files with 15 additions and 4 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: elaborate.cc,v 1.281 2003/05/19 02:50:58 steve Exp $"
#ident "$Id: elaborate.cc,v 1.282 2003/06/13 19:10:20 steve Exp $"
#endif
# include "config.h"
@ -1091,6 +1091,11 @@ NetProc* PAssign::elaborate(Design*des, NetScope*scope) const
processing on the r-value. */
if (NetVariable*tmp = lv->var()) {
} else if (rv->expr_type() == NetExpr::ET_REAL) {
// The r-value is a real. Casting will happen in the
// code generator, so leave it.
} else {
unsigned wid = count_lval_width(lv);
rv->set_width(wid);
@ -2554,6 +2559,9 @@ Design* elaborate(list<const char*>roots)
/*
* $Log: elaborate.cc,v $
* Revision 1.282 2003/06/13 19:10:20 steve
* Handle assign of real to vector.
*
* Revision 1.281 2003/05/19 02:50:58 steve
* Implement the wait statement behaviorally instead of as nets.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: eval_expr.c,v 1.96 2003/06/11 02:23:45 steve Exp $"
#ident "$Id: eval_expr.c,v 1.97 2003/06/13 19:10:20 steve Exp $"
#endif
# include "vvp_priv.h"
@ -260,8 +260,8 @@ static struct vector_info draw_binary_expr_eq(ivl_expr_t exp,
&& number_is_immediate(re, 16))
return draw_eq_immediate(exp, ewid, le, re, stuff_ok_flag);
if (ivl_expr_value(le) == IVL_VT_REAL) {
assert(ivl_expr_value(re) == IVL_VT_REAL);
if ((ivl_expr_value(le) == IVL_VT_REAL)
||(ivl_expr_value(re) == IVL_VT_REAL)) {
return draw_binary_expr_eq_real(exp);
}
@ -2017,6 +2017,9 @@ struct vector_info draw_eval_expr(ivl_expr_t exp, int stuff_ok_flag)
/*
* $Log: eval_expr.c,v $
* Revision 1.97 2003/06/13 19:10:20 steve
* Handle assign of real to vector.
*
* Revision 1.96 2003/06/11 02:23:45 steve
* Proper pad of signed constants.
*