From 42913e46b8036345ee4cbecc9617438283212189 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Fri, 16 May 2008 16:33:04 -0700 Subject: [PATCH] Fix non-blocking assign to variable arrays. Non-blocking assignment with constant index was still trying to access the vpi handle directly. --- tgt-vvp/vvp_process.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tgt-vvp/vvp_process.c b/tgt-vvp/vvp_process.c index 1f2496ecf..961346a83 100644 --- a/tgt-vvp/vvp_process.c +++ b/tgt-vvp/vvp_process.c @@ -237,16 +237,12 @@ static void assign_to_lvector(ivl_lval_t lval, unsigned bit, unsigned part_off = 0; ivl_expr_t word_ix = ivl_lval_idx(lval); - unsigned long use_word = 0; + const unsigned long use_word = 0; if (ivl_signal_array_count(sig) > 1) { assert(word_ix); - if (! number_is_immediate(word_ix, 8*sizeof(use_word))) { - assign_to_array_word(sig, word_ix, bit, delay, dexp, width); - return; - } - - use_word = get_number_immediate(word_ix); + assign_to_array_word(sig, word_ix, bit, delay, dexp, width); + return; } if (part_off_ex == 0) {