From 8b7cc389e6dbc451def8272cdccf79ee9b32ddc2 Mon Sep 17 00:00:00 2001 From: Tobias Platen Date: Tue, 30 Nov 2021 17:56:45 +0100 Subject: [PATCH] loadstore: add done_delay --- src/soc/fu/ldst/loadstore.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.30.2