"WAY" does not exist - range(NUM_WAYS) was intended
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 24 Aug 2020 11:43:34 +0000 (12:43 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 24 Aug 2020 11:43:34 +0000 (12:43 +0100)
src/soc/experiment/dcache.py

index 85a0c3b95b842ce7de00ebdaacb3f82fc87aeadc..074dc4c7f726fc25a83e7fd5286d52d34b2936df 100644 (file)
@@ -1643,7 +1643,7 @@ class DcacheRequest(Elaboratable):
                 comb += s_tag.eq(get_tag(s_ra))
 
 #                 for i in way_t loop
-                for i in range(WAY):
+                for i in range(NUM_WAYS):
 #                     if go = '1' and cache_valids(req_index)(i) = '1'
 #                      and read_tag(i, cache_tag_set) = s_tag
 #                      and tlb_valid_way(j) = '1' then
@@ -1678,7 +1678,7 @@ class DcacheRequest(Elaboratable):
 #             s_tag := get_tag(r0.req.addr);
             comb += s_tag.eq(get_tag(r0.req.addr))
 #             for i in way_t loop
-            for i in range(WAY):
+            for i in range(NUM_WAYS):
 #                 if go = '1' and cache_valids(req_index)(i) = '1' and
 #                     read_tag(i, cache_tag_set) = s_tag then
                 with m.If(go & cache_valid_bits[req_index][i] &