From b43c5434555756afeeda5fdff11246a651c61644 Mon Sep 17 00:00:00 2001 From: steve Date: Fri, 13 Jun 2003 19:10:20 +0000 Subject: [PATCH] Handle assign of real to vector. --- elaborate.cc | 10 +++++++++- tgt-vvp/eval_expr.c | 9 ++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/elaborate.cc b/elaborate.cc index d856aeb49..0509814b9 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -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(listroots) /* * $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. * diff --git a/tgt-vvp/eval_expr.c b/tgt-vvp/eval_expr.c index f69cc9a50..548578ace 100644 --- a/tgt-vvp/eval_expr.c +++ b/tgt-vvp/eval_expr.c @@ -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. *