send address to memory only for one cycle and acknowledge LD immediately
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 8 May 2020 21:29:55 +0000 (22:29 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 8 May 2020 21:29:55 +0000 (22:29 +0100)
in test-L0CacheBuffer

src/soc/experiment/l0_cache.py

index 204d4ec42fb6ea87cc957f97c5f7ae5332c30156..5dc6daaefe2eb88ab1a38fb02ff856bf3b168bf3 100644 (file)
@@ -272,11 +272,10 @@ class L0CacheBuffer(Elaboratable):
         # if now in "LD" mode: wait for addr_ok, then send the address out
         # to memory, acknowledge address, and send out LD data
         with m.If(ld_active.q):
-            with m.If(ldport.addr.ok):
+            with m.If(ldport.addr.ok & adrok_l.qn):
                 comb += rdport.addr.eq(ldport.addr.data) # addr ok, send thru
-                with m.If(adrok_l.qn):
-                    comb += ldport.addr_ok_o.eq(1) # acknowledge addr ok
-                    sync += adrok_l.s.eq(1)       # and pull "ack" latch
+                comb += ldport.addr_ok_o.eq(1) # acknowledge addr ok
+                sync += adrok_l.s.eq(1)       # and pull "ack" latch
 
         # if now in "ST" mode: likewise do the same but with "ST"
         # to memory, acknowledge address, and send out LD data