Support vpiObjTypeVal for vec4Stack values.

Also allow vpi_get_value outside of scope. (Return 'x)
This commit is contained in:
Stephen Williams 2014-10-25 20:38:39 -07:00
parent 4e727adc25
commit 8ac06fb63f
1 changed files with 6 additions and 2 deletions

View File

@ -348,8 +348,10 @@ char*__vpiVThrVec4Stack::vpi_get_str(int code)
void __vpiVThrVec4Stack::vpi_get_value(p_vpi_value vp) void __vpiVThrVec4Stack::vpi_get_value(p_vpi_value vp)
{ {
assert(vpip_current_vthread); vvp_vector4_t val;
vvp_vector4_t val = vthread_get_vec4_stack(vpip_current_vthread, depth_);
if (vpip_current_vthread)
val = vthread_get_vec4_stack(vpip_current_vthread, depth_);
switch (vp->format) { switch (vp->format) {
@ -371,6 +373,8 @@ void __vpiVThrVec4Stack::vpi_get_value(p_vpi_value vp)
case vpiStringVal: case vpiStringVal:
vpi_get_value_string_(vp, val); vpi_get_value_string_(vp, val);
break; break;
case vpiObjTypeVal:
vp->format = vpiVectorVal;
case vpiVectorVal: case vpiVectorVal:
vpi_get_value_vector_(vp, val); vpi_get_value_vector_(vp, val);
break; break;