store tag in temp signal
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 30 Sep 2020 08:55:58 +0000 (09:55 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 30 Sep 2020 08:55:58 +0000 (09:55 +0100)
src/soc/experiment/icache.py

index c5fed771be0763bc18846d2d2048253ca94d477a..55cacd32c501d47d7c09d863d4bea7092b09ae8f 100644 (file)
@@ -921,13 +921,15 @@ class ICache(Elaboratable):
 #      end loop;
         # Test if pending request is a hit on any way
         for i in range(NUM_WAYS):
+            tagi = Signal(TAG_BITS, name="ti%d" % i)
+            comb += tagi.eq(read_tag(i, cache_tags[req_index]))
             with m.If(i_in.req &
                       (cache_valid_bits[req_index][i] |
                        ((r.state == State.WAIT_ACK)
                         & (req_index == r.store_index)
                         & (i == r.store_way)
                         & r.rows_valid[req_row % ROW_PER_LINE]))):
-                with m.If(read_tag(i, cache_tags[req_index]) == req_tag):
+                with m.If(tagi == req_tag):
                     comb += hit_way.eq(i)
                     comb += is_hit.eq(1)