From 6963fe9667d68c06170940f01bcb0ed61e816074 Mon Sep 17 00:00:00 2001 From: Nils Wistoff Date: Wed, 12 May 2021 19:39:47 +0200 Subject: [PATCH] icache: Reset FSM to FLUSH (#668) The current implementation resets to IDLE, where the icache checks if it was just enabled (rising edge of en_i), and flushes (initializes) itself if so. This assumes that en_i is de-asserted during reset, which is not necessarily the case (e.g. hardwired `en_i`), possibly leaving the cache uninitialized. Hence, reset to FLUSH directly. Signed-off-by: Nils Wistoff --- src/cache_subsystem/cva6_icache.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cache_subsystem/cva6_icache.sv b/src/cache_subsystem/cva6_icache.sv index 7c0b33053..86bfe5742 100644 --- a/src/cache_subsystem/cva6_icache.sv +++ b/src/cache_subsystem/cva6_icache.sv @@ -457,7 +457,7 @@ end else begin : gen_piton_offset cmp_en_q <= '0; cache_en_q <= '0; flush_q <= '0; - state_q <= IDLE; + state_q <= FLUSH; cl_offset_q <= '0; repl_way_oh_q <= '0; inv_q <= '0;