From: Luke Kenneth Casson Leighton Date: Tue, 21 Sep 2021 14:46:16 +0000 (+0100) Subject: convert HDLState.get_mem() to a dictionary of memory state results X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d8e4916d4000c1fca9772369576621b6d16d835;p=soc.git convert HDLState.get_mem() to a dictionary of memory state results --- diff --git a/src/soc/simple/test/teststate.py b/src/soc/simple/test/teststate.py index 37a2ebb9..3a65c9dc 100644 --- a/src/soc/simple/test/teststate.py +++ b/src/soc/simple/test/teststate.py @@ -52,10 +52,10 @@ class HDLState(State): def get_mem(self): # get the underlying HDL-simulated memory from the L0CacheBuffer hdlmem = get_l0_mem(self.core.l0) - self.mem = [] + self.mem = {} for i in range(hdlmem.depth): value = yield hdlmem._array[i] # should not really do this - self.mem.append(((i*8), value)) + self.mem[i*8] = value # add to State Factory