use word_select
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 14 Sep 2020 10:00:34 +0000 (11:00 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 14 Sep 2020 10:00:34 +0000 (11:00 +0100)
src/soc/experiment/icache.py

index ba9f940e6582cc866a5429ec1e5c4473ac7db5b3..53d165a3c9d6999707666450dc3637e0f233136a 100644 (file)
@@ -365,7 +365,7 @@ def next_row(row):
 # in the current cache row
 def read_insn_word(addr, data):
     word = addr[2:INSN_BITS+3]
-    return data[word * 32:32 + word * 32]
+    return data.word_select(word, 32)
 
 #     -- Get the tag value from the address
 #     function get_tag(