From d6391490e31aad0032461791d9c5c1e388c58748 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 16 Sep 2019 20:39:19 +0100 Subject: [PATCH] Resize vector before assigning to a dynamic array word. Failing to do this leads to an assertion failure in vvp. --- tgt-vvp/stmt_assign.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tgt-vvp/stmt_assign.c b/tgt-vvp/stmt_assign.c index 8ad27c450..889371ee7 100644 --- a/tgt-vvp/stmt_assign.c +++ b/tgt-vvp/stmt_assign.c @@ -1020,6 +1020,7 @@ static int show_stmt_assign_sig_darray(ivl_statement_t net) } else if (mux) { draw_eval_vec4(rval); + resize_vec4_wid(rval, ivl_stmt_lwidth(net)); /* The %store/dar/vec4 expects the array index to be in index register 3. Calculate the index in place. */