xheep_gen.peripherals.base_peripherals.DMA module

class xheep_gen.peripherals.base_peripherals.DMA.DMA(address: int | None = None, length: int | None = None, ch_length: int = 256, num_channels: int = 1, num_master_ports: int = 1, num_channels_per_master_port: int = 1, fifo_depth: int = 4, addr_mode: str = 'yes', subaddr_mode: str = 'yes', hw_fifo_mode: str = 'yes', zero_padding: str = 'yes', is_included: str = 'yes')

Bases: BasePeripheral

Direct Memory Access controller for efficient data transfer between memory and peripherals.

Parameters:
  • ch_length (int) – The length of each channel in the DMA.

  • length (int) – The length of the DMA.

  • num_channels (int) – The number of channels in the DMA.

  • num_master_ports (int) – The number of master ports in the DMA.

  • num_channels_per_master_port (int) – The number of channels per master port in the DMA.

get_addr_mode()

Get the address mode of the DMA.

get_ch_length()

Get the length of each channel in the DMA.

get_fifo_depth()

Get the depth of the DMA FIFO.

get_hw_fifo_mode()

Get the hardware FIFO mode of the DMA.

get_is_included()

Get whether the DMA is included.

get_num_channels()

Get the number of channels in the DMA.

get_num_channels_per_master_port()

Get the number of channels per master port in the DMA.

get_num_master_ports()

Get the number of master ports in the DMA.

get_subaddr_mode()

Get the subaddress mode of the DMA.

get_xbar_array()

Get the DMA xbar array.

get_zero_padding()

Get the zero padding mode of the DMA.

set_addr_mode(value: str)

Set the address mode of the DMA.

set_ch_length(value: int)

Set the length of each channel in the DMA.

set_fifo_depth(value: int)

Set the depth of the DMA FIFO.

set_hw_fifo_mode(value: str)

Set the hardware FIFO mode of the DMA.

set_num_channels(value: int)

Set the number of channels in the DMA.

set_num_channels_per_master_port(value: int)

Set the number of channels per master port in the DMA.

set_num_master_ports(value: int)

Set the number of master ports in the DMA.

set_subaddr_mode(value: str)

Set the subaddress mode of the DMA.

set_zero_padding(value: str)

Set the zero padding mode of the DMA.

validate()

Checks if the DMA peripheral is valid (number of channels between 0 and 256, master ports between 0 and number of channels, channels per master port between 0 and number of channels, number of channels per master port is not 0 if number of channels is not 1).