Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)