whoops another serious error in the CacheTagArray
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 7 Dec 2021 14:55:26 +0000 (14:55 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 7 Dec 2021 14:55:26 +0000 (14:55 +0000)
valid is of length NUM_WAYS not 1

src/soc/experiment/icache.py

index e6f35c5990eb5775db37cf03e957f306c16b64ca..4cb6b03867b0a95b314b2466d555aa25d2bfd665 100644 (file)
@@ -186,7 +186,7 @@ assert (REAL_ADDR_BITS == (TAG_BITS + ROW_BITS + ROW_OFF_BITS)), \
 # not handle a clean (commented) definition of the cache tags as a 3d
 # memory. For now, work around it by putting all the tags
 def CacheTagArray():
-    tag_layout = [('valid', 1),
+    tag_layout = [('valid', NUM_WAYS),
                   ('tag', TAG_RAM_WIDTH),
                  ]
     return Array(Record(tag_layout, name="tag%d" % x) for x in range(NUM_LINES))