From: Tobias Platen Date: Tue, 30 Nov 2021 16:56:45 +0000 (+0100) Subject: loadstore: add done_delay X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b7cc389e6dbc451def8272cdccf79ee9b32ddc2;p=soc.git loadstore: add done_delay --- diff --git a/src/soc/fu/ldst/loadstore.py b/src/soc/fu/ldst/loadstore.py index bb79fae5..9adb6f6b 100644 --- a/src/soc/fu/ldst/loadstore.py +++ b/src/soc/fu/ldst/loadstore.py @@ -86,6 +86,7 @@ class LoadStore1(PortInterfaceBase): # state info for LD/ST self.done = Signal() + self.done_delay = Signal() # latch most of the input request self.load = Signal() self.tlbie = Signal() @@ -157,14 +158,16 @@ class LoadStore1(PortInterfaceBase): return st_ok def get_rd_data(self, m): - ld_ok = self.done # indicates read data is valid - data = self.load_data # actual read data + ld_ok = self.done_delay # indicates read data is valid + data = self.load_data # actual read data return data, ld_ok def elaborate(self, platform): m = super().elaborate(platform) comb, sync = m.d.comb, m.d.sync + sync += self.done_delay.eq(self.done) + # create dcache module m.submodules.dcache = dcache = self.dcache