MMIO(base_addr, length=4, debug=False)¶
This class exposes API for MMIO read and write.
int – The address of the page for the MMIO base address.
int – The offset of the MMIO base address from the virt_base.
int – The base address, not necessarily page aligned.
int – The length in bytes of the address range.
bool – Turn on debug mode if it is True.
file – Underlying file object for MMIO mapping
mmap – An mmap object created when mapping files to memory.
numpy.ndarray – A numpy view of the mapped range for efficient assignment
The method to read data from MMIO.
- offset (int) – The read offset from the MMIO base address.
- length (int) – The length of the data in bytes.
A list of data read out from MMIO
The method to write data to MMIO.
- offset (int) – The write offset from the MMIO base address.
- data (int / bytes) – The integer(s) to be written into MMIO.
Returns: Return type: