PYNQ
PYNQ copied to clipboard
mmio.write() does not accept numpy.uint32 as type of data argument
If I call mmio.write() when data
is an instance of np.uint32
, the method raises a ValueError. This is funky, because the value of data
is cast to an np.uint32
when it is written to the array
member variable inside the method.
I fixed this in my own code by adding:
if isinstance(data, (np.uint32, np.int32)):
self._debug('Writing 4 bytes to offset {0:x}: {1:x}',
offset, data)
self.array[idx] = data
But you might find a better solution (Hence, a raised issue, and not a PR)