Support get of vpiIntVal from vec4 stack.

This commit is contained in:
Stephen Williams 2014-03-04 19:02:21 -08:00
parent b5e0099f28
commit e932c7a637
1 changed files with 12 additions and 0 deletions

View File

@ -292,6 +292,7 @@ class __vpiVThrVec4Stack : public __vpiHandle {
void vpi_get_value_string_(p_vpi_value vp, const vvp_vector4_t&val);
void vpi_get_value_binstr_(p_vpi_value vp, const vvp_vector4_t&val);
void vpi_get_value_decstr_(p_vpi_value vp, const vvp_vector4_t&val);
void vpi_get_value_int_ (p_vpi_value vp, const vvp_vector4_t&val);
void vpi_get_value_real_ (p_vpi_value vp, const vvp_vector4_t&val);
void vpi_get_value_hexstr_(p_vpi_value vp, const vvp_vector4_t&val);
void vpi_get_value_vector_(p_vpi_value vp, const vvp_vector4_t&val);
@ -361,6 +362,9 @@ void __vpiVThrVec4Stack::vpi_get_value(p_vpi_value vp)
case vpiHexStrVal:
vpi_get_value_hexstr_(vp, val);
break;
case vpiIntVal:
vpi_get_value_int_(vp, val);
break;
case vpiRealVal:
vpi_get_value_real_(vp, val);
break;
@ -441,6 +445,14 @@ void __vpiVThrVec4Stack::vpi_get_value_hexstr_(p_vpi_value vp, const vvp_vector4
vp->value.str = rbuf;
}
void __vpiVThrVec4Stack::vpi_get_value_int_(p_vpi_value vp, const vvp_vector4_t&val)
{
int32_t vali = 0;
int signed_flag = 0;
vector4_to_value(val, vali, signed_flag, false);
vp->value.integer = vali;
}
void __vpiVThrVec4Stack::vpi_get_value_real_(p_vpi_value vp, const vvp_vector4_t&val)
{
unsigned wid = val.size();