From ee1098f9afb1a63a34d613a8949c00e5b0c75b47 Mon Sep 17 00:00:00 2001 From: Philipp Wagner Date: Sat, 5 Oct 2019 18:34:00 +0100 Subject: [PATCH] Tracer: Reference Verilator bug for miscompilation This miscompilation is now reported and fixed, mention it in the code to refer back to it when we can revert back to the old code (which will take a couple months until we can require a newer Verilator version). Fixes #372 --- rtl/ibex_tracer.sv | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtl/ibex_tracer.sv b/rtl/ibex_tracer.sv index 5d429056..423b76d6 100644 --- a/rtl/ibex_tracer.sv +++ b/rtl/ibex_tracer.sv @@ -583,7 +583,10 @@ module ibex_tracer ( string mnemonic; /* - TODO: Gives wrong results in Verilator for unknown reasons. Debug what's going on. + Gives wrong results in Verilator < 4.020. + See https://github.com/lowRISC/ibex/issues/372 and + https://www.veripool.org/issues/1536-Verilator-Misoptimization-in-if-and-case-with-default-statement-inside-a-function + unique case (rvfi_insn[14:12]) 3'b000: mnemonic = "lb"; 3'b001: mnemonic = "lh";