bug in dcache.py where when two stores occur in the same real page
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 29 Jan 2022 10:17:42 +0000 (10:17 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 29 Jan 2022 10:17:42 +0000 (10:17 +0000)
the address is corrupted.

src/soc/experiment/dcache.py

index 0d021e0daecb4856622aa5d8051c91d8f20ecf5d..eb8b8bf938245030e9063a6d1deaef3ea063e0fe 100644 (file)
@@ -1639,7 +1639,7 @@ class DCache(Elaboratable):
                     # See if there is another store waiting
                     # to be done which is in the same real page.
                     with m.If(req.valid):
-                        _ra = req.real_addr[ROW_LINE_BITS:SET_SIZE_BITS]
+                        _ra = req.real_addr[0:SET_SIZE_BITS]
                         sync += r1.wb.adr[0:SET_SIZE_BITS].eq(_ra)
                         sync += r1.wb.dat.eq(req.data)
                         sync += r1.wb.sel.eq(req.byte_sel)