Skip to content

rx_channel

rfsoc_rfdc.receiver.rx_channel

Classes

RxChannel(dma_ip, fifo_count_ip, target_device, buff_size=1024, debug_mode=False)

Source code in rfsoc_rfdc/receiver/rx_channel.py
def __init__(self, dma_ip, fifo_count_ip, target_device, buff_size=1024, debug_mode=False):
    self.rx_buff_size = buff_size
    self.rx_buff = allocate(shape=(self.rx_buff_size,),
                            dtype=MyRFdcType.DATA_PATH_DTYPE, target=target_device)

    self.rx_dma = dma_ip
    self.warning_cnt = 0
    self.debug_mode = debug_mode
    # Config FIFO count IP
    self.fifo_count = fifo_count_ip
    self.fifo_count.setdirection("in")
    self.fifo_count.setlength(32)
Attributes
rx_buff_size = buff_size instance-attribute
rx_buff = allocate(shape=(self.rx_buff_size,), dtype=(MyRFdcType.DATA_PATH_DTYPE), target=target_device) instance-attribute
rx_dma = dma_ip instance-attribute
warning_cnt = 0 instance-attribute
debug_mode = debug_mode instance-attribute
fifo_count = fifo_count_ip instance-attribute
data property
Functions
transfer()
Source code in rfsoc_rfdc/receiver/rx_channel.py
def transfer(self):
    # Monitor FIFO in debug mode
    self._monitor_fifo()
    # Trigger DMA transfer
    self.rx_dma.transfer(self.rx_buff)
stream(mode='STREAM')
Source code in rfsoc_rfdc/receiver/rx_channel.py
def stream(self, mode='STREAM'):
    # Monitor FIFO in debug mode
    self._monitor_fifo()
    # Trigger DMA transfer
    self.rx_dma.stream(self.rx_buff)