From 00e741a5d4f356fd70807bde12e8778a3448e75e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 29 Jan 2022 10:17:42 +0000 Subject: [PATCH] bug in dcache.py where when two stores occur in the same real page the address is corrupted. --- src/soc/experiment/dcache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/experiment/dcache.py b/src/soc/experiment/dcache.py index 0d021e0d..eb8b8bf9 100644 --- a/src/soc/experiment/dcache.py +++ b/src/soc/experiment/dcache.py @@ -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) -- 2.30.2