I am relatively new to PYNQ, I am using it for my MSc thesis.
In particular, I developed a design in Vivado using the available FFT logicore.
The FFT is configured to have a single channel, 1024 FFT size, Pipelined architecture, 16 bit input width, fixed point data format, unscaled scaling, truncation rounding, non real time throttle.
I wanted to test my design in PYNQ, the overlay import ecc… works fine.
However I do not really know how to manage ap_fixed (the fft input is a fix16_15) in Python. My idea was to create a simple sinusoid using numpy, something like:
import numpy as np
x = np.linspace(0,2 * np.pi, 1024)
sinewave =np.sin(x)
And pass it to my fft to test it and check if the spectrum is coherent with the input signal.
Unfortunately I don’t really know how should I pass my sinusoid to my fft.
I should create a sinusoid with type ap_fixed<16,15>, but I didn’t understand how to do it properly.
I already read the following discussions: How to use ap_fixed data type to communicate with the ip made by the vivado hls? - #3 by dongzw and Using Fixed-Point Data in Python - #6 by pynqzen
But I am still a bit confused. Could anyone provide some examples or help me with the “conversion”?