From 90fc33b659fe9817b86572e8e28ed3da2376619e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 17 Jul 2020 20:22:24 +0100 Subject: [PATCH] =?utf8?q?port=20minerva=20cache=20fixes=20commit=203a0158?= =?utf8?q?919144757a2b369c9b750c72339e912f1d=20Author:=20Jean-Fran=C3=A7oi?= =?utf8?q?s=20Nguyen=20=20Date:=20=20=20Wed=20Sep=20?= =?utf8?q?11=2001:34:46=202019=20+0200?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit fetch,loadstore: Fix `{f,m}_busy` signal in case of a cache miss. --- src/soc/minerva/units/fetch.py | 2 +- src/soc/minerva/units/loadstore.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/soc/minerva/units/fetch.py b/src/soc/minerva/units/fetch.py index b7cdad11..04e1f58d 100644 --- a/src/soc/minerva/units/fetch.py +++ b/src/soc/minerva/units/fetch.py @@ -178,7 +178,7 @@ class CachedFetchUnit(FetchUnitInterface, Elaboratable): ] with m.Elif(f_icache_select): m.d.comb += [ - self.f_busy_o.eq(icache.s2_re & icache.s2_miss), + self.f_busy_o.eq(icache.s2_miss), self.f_instr_o.eq(icache.s2_rdata) ] with m.Else(): diff --git a/src/soc/minerva/units/loadstore.py b/src/soc/minerva/units/loadstore.py index a4d76d19..499daf21 100644 --- a/src/soc/minerva/units/loadstore.py +++ b/src/soc/minerva/units/loadstore.py @@ -257,9 +257,9 @@ class CachedLoadStoreUnit(LoadStoreUnitInterface, Elaboratable): self.m_busy_o.eq(0), self.m_ld_data_o.eq(0) ] - with m.Elif(m_dcache_select): + with m.Elif(self.m_load & m_dcache_select): m.d.comb += [ - self.m_busy_o.eq(dcache.s2_re & dcache.s2_miss), + self.m_busy_o.eq(dcache.s2_miss), self.m_ld_data_o.eq(dcache.s2_rdata) ] with m.Else(): -- 2.30.2