pynq.mmio Module
- class pynq.mmio.MMIO(base_addr, length=4, device=None, **kwargs)[source]
Bases:
objectThis class exposes API for MMIO read and write.
- base_addr
The base address, not necessarily page aligned.
- Type:
int
- length
The length in bytes of the address range.
- Type:
int
- array
A numpy view of the mapped range for efficient assignment
- Type:
numpy.ndarray
- read(offset=0, length=4, word_order='little')[source]
The method to read data from MMIO.
For the word_order parameter, it is only effective when operating 8 bytes. If it is little, from MSB to LSB, the bytes will be offset+4, offset+5, offset+6, offset+7, offset+0, offset+1, offset+2, offset+3. If it is big, from MSB to LSB, the bytes will be offset+0, offset+1, …, offset+7. This is different than the byte order (endianness); notice the endianness has not changed.
- Parameters:
offset (int) – The read offset from the MMIO base address.
length (int) – The length of the data in bytes.
word_order (str) – The word order of the 8-byte reads.
- Returns:
A list of data read out from MMIO
- Return type:
list