def read(self, addr, size): req = ReadRequest(addr, size) self._iface.send(req) resp = self._iface.recv() if not isinstance(resp, ReadResponse): raise ValueError("Communication error with Simulation: got %s" % repr(resp)) return array.array('B', resp.data)
def FastBlockRead(self, size): req = ReadRequest(self.BASE_ADDRESS_BLOCK, size) self._iface.send(req) resp = self._iface.recv() if not isinstance(resp, ReadResponse): raise ValueError("Communication error with Simulation: got %s" % repr(resp)) return array.array('B', resp.data)
def ReadExternal(self, address, size): req = ReadRequest(self.BASE_ADDRESS_EXTERNAL + address, size) self._iface.send(req) resp = self._iface.recv() if not isinstance(resp, ReadResponse): raise ValueError("Communication error with Simulation: got %s" % repr(resp)) return array.array('B', resp.data)