From: Florent Kermarrec Date: Fri, 10 Jan 2020 11:52:14 +0000 (+0100) Subject: wishbone/Cache: avoid REFILL_WRTAG state to improve speed. X-Git-Tag: 24jan2021_ls180~763 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa22d6aa82ee145671a424c7b3112daa82c9ca0d;p=litex.git wishbone/Cache: avoid REFILL_WRTAG state to improve speed. --- diff --git a/litex/soc/interconnect/wishbone.py b/litex/soc/interconnect/wishbone.py index 1fbdf975..d9cdcd3a 100644 --- a/litex/soc/interconnect/wishbone.py +++ b/litex/soc/interconnect/wishbone.py @@ -606,7 +606,10 @@ class Cache(Module): If(tag_do.dirty, NextState("EVICT") ).Else( - NextState("REFILL_WRTAG") + # Write the tag first to set the slave address + tag_port.we.eq(1), + word_clr.eq(1), + NextState("REFILL") ) ) ) @@ -618,16 +621,13 @@ class Cache(Module): If(slave.ack, word_inc.eq(1), If(word_is_last(word), - NextState("REFILL_WRTAG") + # Write the tag first to set the slave address + tag_port.we.eq(1), + word_clr.eq(1), + NextState("REFILL") ) ) ) - fsm.act("REFILL_WRTAG", - # Write the tag first to set the slave address - tag_port.we.eq(1), - word_clr.eq(1), - NextState("REFILL") - ) fsm.act("REFILL", slave.stb.eq(1), slave.cyc.eq(1),