From d84f1b9843fcdf7f9996d4b0eb1871b6923272f8 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 6 Jun 2022 13:27:55 +0200 Subject: [PATCH] tgt-vvp: Use `%cmp/e` instead of `%cmp/u` for `case` comparisons `%cmp/e` and `%cmp/u` are very similar with `%cmp/e` not setting the lt flag and being a bit faster due to it. For case comparisons the flag is not needed so switch to `%cmp/e`. This speeds up simulation time designs which make use of case comparisons. Signed-off-by: Lars-Peter Clausen --- tgt-vvp/vvp_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgt-vvp/vvp_process.c b/tgt-vvp/vvp_process.c index 2604ae656..8165abfa2 100644 --- a/tgt-vvp/vvp_process.c +++ b/tgt-vvp/vvp_process.c @@ -671,7 +671,7 @@ static int show_stmt_case(ivl_statement_t net, ivl_scope_t sscope) switch (ivl_statement_type(net)) { case IVL_ST_CASE: - fprintf(vvp_out, " %%cmp/u;\n"); + fprintf(vvp_out, " %%cmp/e;\n"); fprintf(vvp_out, " %%jmp/1 T_%u.%u, 6;\n", thread_count, local_base+idx); break;