Write the specified data to the given memory at the given address
(self, memory, addr, data, flush_queue=False)
| 292 | return None |
| 293 | |
| 294 | def write(self, memory, addr, data, flush_queue=False): |
| 295 | """Write the specified data to the given memory at the given address""" |
| 296 | wreq = _WriteRequest(memory, addr, data, self.cf) |
| 297 | if memory.id not in self._write_requests: |
| 298 | self._write_requests[memory.id] = [] |
| 299 | |
| 300 | # Workaround until we secure the uplink and change messages for |
| 301 | # mems to non-blocking |
| 302 | self._write_requests_lock.acquire() |
| 303 | if flush_queue: |
| 304 | self._write_requests[memory.id] = self._write_requests[ |
| 305 | memory.id][:1] |
| 306 | self._write_requests[memory.id].append(wreq) |
| 307 | if len(self._write_requests[memory.id]) == 1: |
| 308 | wreq.start() |
| 309 | self._write_requests_lock.release() |
| 310 | |
| 311 | return True |
| 312 | |
| 313 | def read(self, memory, addr, length): |
| 314 | """ |