Skip to content

Commit

Permalink
Merge pull request #1006 from larsclausen/queue-darray-2state-oob
Browse files Browse the repository at this point in the history
Return '0 for out-of-bounds access on 2-state queues and dynamic arrays.
  • Loading branch information
caryr authored Oct 10, 2023
2 parents d22bb3d + 3e58507 commit c498d53
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ivtest/ivltests/sv_queue_vec.v
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module top;
int q_tst [$];
int q_tmp [$];
int elem;
integer q_tst [$];
integer q_tmp [$];
integer elem;
integer idx;
bit passed;

Expand Down
2 changes: 0 additions & 2 deletions ivtest/regress-fsv.list
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ sv_darray_nest1 NI ivltests
sv_darray_nest2 NI ivltests
sv_darray_nest3 NI ivltests
sv_darray_nest4 NI ivltests
sv_darray_oob_vec2 NI ivltests
sv_deferred_assert1 NI ivltests
sv_deferred_assert2 NI ivltests
sv_deferred_assume1 NI ivltests
Expand All @@ -135,4 +134,3 @@ sv_queue_nest1 NI ivltests
sv_queue_nest2 NI ivltests
sv_queue_nest3 NI ivltests
sv_queue_nest4 NI ivltests
sv_queue_oob_vec2 NI ivltests
2 changes: 2 additions & 0 deletions ivtest/regress-sv.list
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ sv_darray_decl_assign normal,-g2009 ivltests
sv_darray_function normal,-g2009 ivltests
sv_darray_oob_real normal,-g2009 ivltests
sv_darray_oob_string normal,-g2009 ivltests
sv_darray_oob_vec2 normal,-g2009 ivltests
sv_darray_oob_vec4 normal,-g2009 ivltests
sv_darray_signed normal,-g2009 ivltests
sv_darray_word_size normal,-g2005-sv ivltests
Expand Down Expand Up @@ -784,6 +785,7 @@ sv_queue_function1 normal,-g2009 ivltests
sv_queue_function2 normal,-g2009 ivltests
sv_queue_oob_real normal,-g2009 ivltests
sv_queue_oob_string normal,-g2009 ivltests
sv_queue_oob_vec2 normal,-g2009 ivltests
sv_queue_oob_vec4 normal,-g2009 ivltests
sv_queue_parray normal,-g2009,-pfileline=1 ivltests gold=sv_queue_parray.gold
sv_queue_parray_bounded normal,-g2009,-pfileline=1 ivltests gold=sv_queue_parray_bounded.gold
Expand Down
2 changes: 2 additions & 0 deletions tgt-vvp/eval_vec4.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,8 @@ static void draw_select_vec4(ivl_expr_t expr)
assert(base);
draw_eval_expr_into_integer(base, 3);
fprintf(vvp_out, " %%load/dar/vec4 v%p_0;\n", sig);
if (ivl_expr_value(expr) == IVL_VT_BOOL)
fprintf(vvp_out, " %%cast2;\n");

return;
}
Expand Down

0 comments on commit c498d53

Please sign in to comment.