diff --git a/vvp/vpi_vthr_vector.cc b/vvp/vpi_vthr_vector.cc index edef159dc..d1e87fbe9 100644 --- a/vvp/vpi_vthr_vector.cc +++ b/vvp/vpi_vthr_vector.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2009 Stephen Williams (steve@icarus.com) + * Copyright (c) 2001-2010 Stephen Williams (steve@icarus.com) * Copyright (c) 2001 Stephan Boettcher * * This source code is free software; you can redistribute it @@ -109,7 +109,8 @@ static int vthr_vec_get(int code, vpiHandle ref) static char* vthr_vec_get_str(int code, vpiHandle ref) { assert((ref->vpi_type->type_code==vpiNet) - || (ref->vpi_type->type_code==vpiReg)); + || (ref->vpi_type->type_code==vpiReg) + || (ref->vpi_type->type_code==vpiConstant)); struct __vpiVThrVec*rfp = (struct __vpiVThrVec*)ref; @@ -319,6 +320,8 @@ static void vthr_vec_get_value(vpiHandle ref, s_vpi_value*vp) } break; + case vpiObjTypeVal: + vp->format = vpiVectorVal; case vpiVectorVal: vp->value.vector = (s_vpi_vecval*) need_result_buf((wid+31)/32*sizeof(s_vpi_vecval), RBUF_VAL); diff --git a/vvp/vthread.cc b/vvp/vthread.cc index a93eb4dbf..c9ce00092 100644 --- a/vvp/vthread.cc +++ b/vvp/vthread.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2009 Stephen Williams (steve@icarus.com) + * Copyright (c) 2001-2010 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -167,7 +167,8 @@ static inline void thr_clr_bit_(struct vthread_s*thr, unsigned addr) vvp_bit4_t vthread_get_bit(struct vthread_s*thr, unsigned addr) { - return thr_get_bit(thr, addr); + if (vpi_mode_flag == VPI_MODE_COMPILETF) return BIT4_X; + else return thr_get_bit(thr, addr); } void vthread_put_bit(struct vthread_s*thr, unsigned addr, vvp_bit4_t bit)