more signal sizes in icache.py
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 5 Dec 2021 12:35:20 +0000 (12:35 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 5 Dec 2021 12:35:20 +0000 (12:35 +0000)
src/soc/experiment/icache.py

index fac91b2722d0d943a02b9dc099422827b932687f..a4a6fac503c30e8d3eabdbd47a79a1fb808607e8 100644 (file)
@@ -349,7 +349,7 @@ class ICache(Elaboratable):
             d_out    = Signal(ROW_SIZE_BITS, name="d_out_%d" % i)
             wr_sel   = Signal(ROW_SIZE)
 
-            way = CacheRam(ROW_BITS, ROW_SIZE_BITS, True)
+            way = CacheRam(ROW_BITS, ROW_SIZE_BITS, True, ram_num=i)
             setattr(m.submodules, "cacheram_%d" % i, way)
 
             comb += way.rd_en.eq(do_read)
@@ -607,7 +607,7 @@ class ICache(Elaboratable):
                     )
 
             # Keep track of our index and way for subsequent stores
-            st_row = Signal(BRAM_ROWS)
+            st_row = Signal(ROW_BITS)
             comb += st_row.eq(get_row(req_laddr))
             sync += r.store_index.eq(req_index)
             sync += r.store_row.eq(st_row)