try using req.op in RELOAD_WAIT_ACK to detect whether request
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 15 Jan 2022 18:44:24 +0000 (18:44 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 15 Jan 2022 18:44:24 +0000 (18:44 +0000)
can complete next cycle

src/soc/experiment/dcache.py

index 267a0e4443c1a44c855f41e117201f701496a720..228f9add0264da2877f3e67b22c14e3ec6e1c4bc 100644 (file)
@@ -1561,10 +1561,10 @@ class DCache(Elaboratable):
                     # Compare the whole address in case the
                     # request in r1.req is not the one that
                     # started this refill.
-                    with m.If(req.valid & r1.req.same_tag &
-                              ((r1.dcbz & r1.req.dcbz) |
-                               (~r1.dcbz & (r1.req.op == Op.OP_LOAD_MISS))) &
-                                (r1.store_row == get_row(req.real_addr))):
+                    with m.If(r1.full & r1.req.same_tag &
+                              ((r1.dcbz & req.dcbz) |
+                               (r1.req.op == Op.OP_LOAD_MISS)) &
+                                (r1.store_row == get_row(r1.req.real_addr))):
                         sync += r1.full.eq(r1_next_cycle)
                         sync += r1.slow_valid.eq(1)
                         with m.If(r1.mmu_req):