From 8ac06fb63f83422f012ce998e9338d8ce2ac874c Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Sat, 25 Oct 2014 20:38:39 -0700 Subject: [PATCH] Support vpiObjTypeVal for vec4Stack values. Also allow vpi_get_value outside of scope. (Return 'x) --- vvp/vpi_vthr_vector.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vvp/vpi_vthr_vector.cc b/vvp/vpi_vthr_vector.cc index bdf9cd4bc..4ee2d8a86 100644 --- a/vvp/vpi_vthr_vector.cc +++ b/vvp/vpi_vthr_vector.cc @@ -348,8 +348,10 @@ char*__vpiVThrVec4Stack::vpi_get_str(int code) void __vpiVThrVec4Stack::vpi_get_value(p_vpi_value vp) { - assert(vpip_current_vthread); - vvp_vector4_t val = vthread_get_vec4_stack(vpip_current_vthread, depth_); + vvp_vector4_t val; + + if (vpip_current_vthread) + val = vthread_get_vec4_stack(vpip_current_vthread, depth_); switch (vp->format) { @@ -371,6 +373,8 @@ void __vpiVThrVec4Stack::vpi_get_value(p_vpi_value vp) case vpiStringVal: vpi_get_value_string_(vp, val); break; + case vpiObjTypeVal: + vp->format = vpiVectorVal; case vpiVectorVal: vpi_get_value_vector_(vp, val); break;