Skip to content
Permalink
Browse files

Fix for GitHub issue 12 : Ternary lval-rval width mismatch.

A simple typing error that caused the expression to be incorrectly
evaluated as a real constant.
  • Loading branch information
martinwhitaker committed Feb 15, 2014
1 parent 66bdbb7 commit ecce1d25bc4e034423584a9386dcf4d8b30d58c0
Showing with 1 addition and 1 deletion.
  1. +1 −1 eval_tree.cc
@@ -1346,7 +1346,7 @@ NetExpr*NetETernary::blended_arguments_(const NetExpr*te, const NetExpr*fe) cons
if (t == 0 || f == 0) {
verireal tv, fv;
if (!get_real_arg_(te, tv)) return 0;
if (!get_real_arg_(te, fv)) return 0;
if (!get_real_arg_(fe, fv)) return 0;

verireal val = verireal(0.0);
if (tv.as_double() == fv.as_double()) val = tv;

0 comments on commit ecce1d2

Please sign in to comment.