pynq.mmio Module

class pynq.mmio.MMIO(base_addr, length=4, debug=False, device=None)[source]

Bases: object

This 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
debug

Turn on debug mode if it is True.

Type:bool
array

A numpy view of the mapped range for efficient assignment

Type:numpy.ndarray
read_mm(offset=0, length=4)[source]

The method to read data from MMIO.

Parameters:
  • offset (int) – The read offset from the MMIO base address.
  • length (int) – The length of the data in bytes.
Returns:

A list of data read out from MMIO

Return type:

list

read_reg(offset=0, length=4)[source]

The method to read data from MMIO.

Parameters:
  • offset (int) – The read offset from the MMIO base address.
  • length (int) – The length of the data in bytes.
Returns:

A list of data read out from MMIO

Return type:

list

write_mm(offset, data)[source]

The method to write data to MMIO.

Parameters:
  • offset (int) – The write offset from the MMIO base address.
  • data (int / bytes) – The integer(s) to be written into MMIO.
Returns:

Return type:

None

write_reg(offset, data)[source]

The method to write data to MMIO.

Parameters:
  • offset (int) – The write offset from the MMIO base address.
  • data (int / bytes) – The integer(s) to be written into MMIO.
Returns:

Return type:

None