add get_fpregs stub function to HDLstate
[soc.git] / src / soc / simple / test / teststate.py
index 7da358ea7af1c51e7ce46e8635d39ff3a2f7a0a9..f95370d0c984f68f77de51d5bfc5e11b60b6a892 100644 (file)
@@ -19,6 +19,11 @@ class HDLState(State):
         super().__init__()
         self.core = core
 
+    def get_fpregs(self):
+        self.fpregs = []
+        for i in range(32):
+            self.fpregs.append(0)
+
     def get_intregs(self):
         self.intregs = []
         for i in range(32):
@@ -54,9 +59,12 @@ class HDLState(State):
         log("class hdl pc", hex(self.pc))
 
     def get_mem(self):
+        self.mem = {}
         # get the underlying HDL-simulated memory from the L0CacheBuffer
+        if hasattr(self.core, "icache"):
+            # err temporarily ignore memory
+            return # XXX have to work out how to deal with wb_get
         hdlmem = get_l0_mem(self.core.l0)
-        self.mem = {}
         for i in range(hdlmem.depth):
             value = yield hdlmem._array[i] # should not really do this
             self.mem[i*8] = value