ADC to DMA stream not functioning

Hi,

I’m currently using PYNQ v2.6 on the RFSoC ZCU111 board (XCZU28DR-2FFVG1517E). I’ve attached an image of my block design and am using Vivado 2020.1 for my design environment.

I’m trying to load information from an ADC on the board into DMA, however I’m having no luck. My Jupyter notebook returns the following error. “DMA channel not started.”

The first read returns an array of values, however every read after that returns 0s. After the ADC, I have a custom block generating a TLAST signal every 128 clock cycles, followed by an asynchronous FIFO to switch from 125 MHz (ADC clock) into 100 MHz (AXI-Lite).

Initially I thought the problem was no TLAST signal, however my custom design works in isolation. I believe the DMA may not be firing a TREADY signal after the first read, but this is just a guess and I’m also not sure how to fix that.

Has anyone had a similar issue? Any advice welcome :slight_smile:

Block design - dma_write.pdf (217.5 KB)

1 Like

If you look at dma.register_map the S2MM_SR should give some indication as to why the DMA stopped. Can you copy the output here?

2 Likes

Hi, this is what dma.register_map outputs.

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=0, 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=1, Idle=0, SGIncld=0, DMAIntErr=1, DMASlvErr=0, DMADecErr=0, SGIntErr=0, SGSlvErr=0, SGDecErr=0, IOC_Irq=1, Dly_Irq=0, Err_Irq=1, 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=1938341888),
S2MM_DA_MSB = Register(Destination_Address=0),
S2MM_LENGTH = Register(Length=256)
}

Update:

I managed to get the design working. It is an AXI4-Stream counter that is passed into AXI DMA and read via PYNQ. Essentially my previous design didn’t work because tlast wasn’t firing at the correct time, whilst tvalid was always high, causing bus contention.

Thanks for the assistance :slight_smile:

Hi @ldav , i’m trying to do the same project but i’m in stall with the ADC acquisition, could you share your BD and notebook for example?

Thanks
Federico

1 Like