From: Luke Kenneth Casson Leighton Date: Fri, 17 Jul 2020 19:22:24 +0000 (+0100) Subject: port minerva cache fixes X-Git-Tag: semi_working_ecp5~701^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=90fc33b659fe9817b86572e8e28ed3da2376619e;p=soc.git port minerva cache fixes commit 3a0158919144757a2b369c9b750c72339e912f1d Author: Jean-François Nguyen Date: Wed Sep 11 01:34:46 2019 +0200 fetch,loadstore: Fix `{f,m}_busy` signal in case of a cache miss. --- 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():