Support float and shorts, bug1592, bug1619.

Signed-off-by: Wilson Snyder <[email protected]>
This commit is contained in:
Garrett Smith
2019-12-03 18:26:22 -05:00
committed by Wilson Snyder
parent 95ffcad12e
commit 96f8bbd023
6 changed files with 70 additions and 5 deletions
+18 -3
View File
@@ -1708,9 +1708,24 @@ IData VL_VALUEPLUSARGS_INW(int rbits, const std::string& ld, WDataOutP rwp) VL_M
_vl_vsss_setbit(rwp, rbits, lsb, 8, dp[posp]); lsb+=8;
}
break;
case 'e': // FALLTHRU - Unsupported
case 'f': // FALLTHRU - Unsupported
case 'g': // FALLTHRU - Unsupported
case 'e': {
double temp = 0.f;
sscanf(dp, "%le", &temp);
VL_SET_WQ(rwp, VL_CVT_Q_D(temp));
break;
}
case 'f': {
double temp = 0.f;
sscanf(dp, "%lf", &temp);
VL_SET_WQ(rwp, VL_CVT_Q_D(temp));
break;
}
case 'g': {
double temp = 0.f;
sscanf(dp, "%lg", &temp);
VL_SET_WQ(rwp, VL_CVT_Q_D(temp));
break;
}
default: // Other simulators simply return 0 in these cases and don't error out
return 0;
}