diff --git a/elab_lval.cc b/elab_lval.cc index f46d3d215..1fd231ae0 100644 --- a/elab_lval.cc +++ b/elab_lval.cc @@ -244,7 +244,8 @@ NetAssign_* PEIdent::elaborate_lval_net_word_(Design*des, ivl_assert(*this, index_head.lsb == 0); ivl_variable_type_t expr_type_tmp = IVL_VT_NO_TYPE; - bool unsized_flag_tmp; + // This not used, but it needs to have a default value. + bool unsized_flag_tmp = false; index_head.msb->test_width(des, scope, reg->vector_width(), reg->vector_width(), expr_type_tmp, @@ -310,7 +311,8 @@ bool PEIdent::elaborate_lval_net_bit_(Design*des, NetNet*reg = lv->sig(); ivl_variable_type_t expr_type_tmp = IVL_VT_NO_TYPE; - bool unsized_flag_tmp; + // This not used, but it needs to have a default value. + bool unsized_flag_tmp = false; index_tail.msb->test_width(des, scope, lv->lwidth(), lv->lwidth(), expr_type_tmp, @@ -443,7 +445,8 @@ bool PEIdent::elaborate_lval_net_idx_(Design*des, calculate_up_do_width_(des, scope, wid); ivl_variable_type_t expr_type_tmp = IVL_VT_NO_TYPE; - bool unsized_flag_tmp; + // This not used, but it needs to have a default value. + bool unsized_flag_tmp = false; index_tail.msb->test_width(des, scope, wid, wid, expr_type_tmp, diff --git a/vpi/sys_display.c b/vpi/sys_display.c index b4c68aae1..587564b59 100644 --- a/vpi/sys_display.c +++ b/vpi/sys_display.c @@ -1992,6 +1992,12 @@ static char *get_display(unsigned int *rtnsz, struct strobe_cb_info *info) fmt = strdup(value.value.str); width = get_format(&result, fmt, info, &idx); free(fmt); + } else if (vpi_get(vpiConstType, item) == vpiRealConst) { + value.format = vpiRealVal; + vpi_get_value(item, &value); + sprintf(buf, "%#g", value.value.real); + result = strdup(buf); + width = strlen(result); } else { width = get_numeric(&result, info, item); }