About ADC FFT

pynq-z2, vivado 2022.2

“I connected the ADC(pmod adc) and FFT IP as shown in the picture below, but I’m having trouble receiving and reading FFT data through DMA in Jupyter Notebook. data_recv.wait() is not finishing.”

Jupyter code
from pynq import Overlay
from math import log
ol = Overlay(‘FFT_0120.bit’)

ol?

data_dma=ol.data_dma
config_dma=ol.config_dma
data_recv=data_dma.recvchannel
conf_send=config_dma.sendchannel

import numpy as np
import matplotlib.pyplot as plt
import random
from pynq import allocate
import time

SAMPLES = 1024
output_buffer=allocate(SAMPLES, np.csingle)

data_recv.transfer(output_buffer)
data_recv.wait()

Hi @reung,

Is the FFT IP generating the TLAST signal properly? If not, you will need to add logic to do this.
There are a number of post in the forums with very similar issues, in relation to the TLAST signal.

Mario

thanks you!
I checked and found that tlast was not activated.
But I have one more question.
in picture that i attached this reply, i connnect adc(Read_ADC_Top)->fifo generator_0->xfft_0->data_dma!
i can read fft data from dma using Jupyter notebook… however i think the value is wrong.
what did i do wrong…?


image

Hi @reung,

The samples are either signed or unsigned integers, so your buffer allocation should take this into consideration.

Mario

hi @marioruiz ,
but i use np.csingle when i allocate buffer.
i think np.csingle is data type for complex that is positive or negative.
i have to change this data type?