RuntImeError: DMA channel not started on RFSoC 4×2

Hello everyone.

I’m trying to develop an original spectrum analyzer referring to rfsoc_sam/spectrum_analyser.
I am currently trying to connect the AXI-DMA to a spectrum_analyser IP and display the power spectrum in PYNQ. However, when I try to display it, I get an error “RuntimeError: DMA not start”. I have tried everything but cannot solve the problem. If you know how to solve this problem, please help me.
The spectrum_analyser IP is created by HDL Coder. The DMA operation is in the get_frame function of receiver_frontend.py.

The first picture is the AXI-DMA setup screen, the second is when the power spectrum is displayed in PYNQ, and the third is when the error “RuntimeError: DMA not start”.

FPGA: RFSoC 4×2 PYNQ version: 3.0.0

Thank you.

spectrum_analyser.zip (221.9 KB)

spectrum_analyser_dma.register_map:

RegisterMap {
MM2S_DMACR = Register(RS=0, Reset=0, Keyhole=0, Cyclic_BD_Enable=0, IOC_IrqEn=0, Dly_IrqEn=0, Err_IrqEn=0, IRQThreshold=0, IRQDelay=0),
MM2S_DMASR = Register(Halted=0, Idle=0, SGIncld=0, DMAIntErr=0, DMASlvErr=0, DMADecErr=0, SGIntErr=0, SGSlvErr=0, SGDecErr=0, IOC_Irq=0, Dly_Irq=0, Err_Irq=0, IRQThresholdSts=0, IRQDelaySts=0),
MM2S_CURDESC = Register(Current_Descriptor_Pointer=0),
MM2S_CURDESC_MSB = Register(Current_Descriptor_Pointer=0),
MM2S_TAILDESC = Register(Tail_Descriptor_Pointer=0),
MM2S_TAILDESC_MSB = Register(Tail_Descriptor_Pointer=0),
MM2S_SA = Register(Source_Address=0),
MM2S_SA_MSB = Register(Source_Address=0),
MM2S_LENGTH = Register(Length=0),
SG_CTL = Register(SG_CACHE=0, SG_USER=0),
S2MM_DMACR = Register(RS=1, Reset=0, Keyhole=0, Cyclic_BD_Enable=0, IOC_IrqEn=1, Dly_IrqEn=0, Err_IrqEn=0, IRQThreshold=1, IRQDelay=0),
S2MM_DMASR = Register(Halted=0, Idle=0, SGIncld=0, DMAIntErr=0, DMASlvErr=0, DMADecErr=0, SGIntErr=0, SGSlvErr=0, SGDecErr=0, IOC_Irq=0, Dly_Irq=0, Err_Irq=0, IRQThresholdSts=0, IRQDelaySts=0),
S2MM_CURDESC = Register(Current_Descriptor_Pointer=0),
S2MM_CURDESC_MSB = Register(Current_Descriptor_Pointer=0),
S2MM_TAILDESC = Register(Tail_Descriptor_Pointer=0),
S2MM_TAILDESC_MSB = Register(Tail_Descriptor_Pointer=0),
S2MM_DA = Register(Destination_Address=0),
S2MM_DA_MSB = Register(Destination_Address=0),
S2MM_LENGTH = Register(Length=0)
}



hello @b034vdv
did you provide TLAST for your DMA?
if you don’t provide TLAST for your DMA, it will run only once, and next time it will return the error.
you can see more details in the following link:
https://support.xilinx.com/s/question/0D52E00006iHkalSAC/tlast-axi-dma-behaviour?language=en_US

Regards,
Mo

1 Like

Hello @Mohammad_Hossein_Sam

Thank you for your reply. Sorry for the late reply.

I didn’t know that TLAST was required for DMA to work. I will try to provide TLAST to the IP connected to DMA. I will inform you of the results of the trial. Thank you for providing the materials.

Hello, @Mohammad_Hossein_Sam
It took some time, but today I succeeded in providing TLAST signal for DMA and the error was resolved.
Thank you very much!

2 Likes

Hi @b034vdv
you are so welcome!
happy to hear that!
Regards,
Mo

1 Like