Tests: t_vpi_var: Fix vector length, bug553.

Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
Jeremy Bennett 2012-08-25 12:05:08 -04:00 committed by Wilson Snyder
parent 39492a0726
commit 706920ba19
2 changed files with 7 additions and 5 deletions

View File

@ -97,7 +97,8 @@ void t_embed_child_io_eval (unsigned char clk,
VL_DEBUG_IF(VL_PRINTF(" t_embed1_child_io_eval\n"); );
Vt_embed1_child* __modelp = __get_modelp();
VL_DEBUG_IF(VL_PRINTF("[%0ld] in clk=%x b=%x V=%x R=%x\n",
VL_TIME_Q(), clk, bit_in, vec_in[0], is_ref););
(long int) (VL_TIME_Q()), clk, bit_in, vec_in[0],
is_ref););
__modelp->clk = clk;
__modelp->bit_in = bit_in;
__modelp->vec_in = vec_in[0];
@ -119,5 +120,6 @@ void t_embed_child_io_eval (unsigned char clk,
wide_out[3] = __modelp->wide_out[3];
*did_init_out = __modelp->did_init_out;
VL_DEBUG_IF(VL_PRINTF("[%0ld] out b=%x V=%x DI=%x\n",
VL_TIME_Q(), *bit_out, *vec_out, *did_init_out););
(long int)(VL_TIME_Q()), *bit_out, *vec_out,
*did_init_out););
}

View File

@ -281,7 +281,7 @@ int _mon_check_quad() {
CHECK_RESULT_NZ(vh2);
s_vpi_value v;
t_vpi_vecval vv; bzero(&vv,sizeof(vv));
t_vpi_vecval vv[2]; bzero(&vv,sizeof(vv));
s_vpi_time t;
t.type = vpiSimTime;
@ -294,13 +294,13 @@ int _mon_check_quad() {
CHECK_RESULT_NZ(vhidx2);
v.format = vpiVectorVal;
v.value.vector = &vv;
v.value.vector = vv;
v.value.vector[1].aval = 0x12819213UL;
v.value.vector[0].aval = 0xabd31a1cUL;
vpi_put_value(vhidx2, &v, &t, vpiNoDelay);
v.format = vpiVectorVal;
v.value.vector = &vv;
v.value.vector = vv;
v.value.vector[1].aval = 0x1c77bb9bUL;
v.value.vector[0].aval = 0x3784ea09UL;
vpi_put_value(vhidx3, &v, &t, vpiNoDelay);