Why is the output of the FFT HDL Optimized block zeros in Vivado's Simulation ?
1 view (last 30 days)
Show older comments
Youssef Abdelsalam
on 19 Aug 2021
Commented: Youssef Abdelsalam
on 24 Aug 2021
I recently connected the FFT Block in Simulink to in and out ports so i can generate its HDL Code and implement it in Vivado.
After i generated it, i compiled the files in Vivado and created a block design to connect its inputs and outputs to other components of my design, but first i wanted to test if it's even working so i connected the data_in port to a simple counter and ran the simulation.
The output was unfortunately just a bunch of zeros (bit vector of 19 zeros).
Any idea why it behaves like this ?
(clk connected to clocking wizard, reset connected to "1" as a constant and so are valid_in and clk_enable also).
This screenshot is from Vivado's Block Design but this FFT IP's source is Simulinks/Matlab's generated HDL code of the FFT HDL Optimized Block.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/716294/image.jpeg)
0 Comments
Accepted Answer
Bharath Venkataraman
on 23 Aug 2021
I'd first suggest that you run the generated HDL and Testbench to make sure that the HDL design is working correctly.
The next thing is to check and make sure that you are feeding in the correct data via data_in and that valid_in is staying high for the FFT length. Also, note that FFT has a latency, so the output will stay at 0s for a certain number of clock cycles after the last input of the frame is passed in.
Hope this helps.
3 Comments
Bharath Venkataraman
on 24 Aug 2021
I suggest that you generate an input stimulus in Simulink, pass it through the FFT subsystem to make sure that you are driving the input properly and getting the desired output. This gives you a working baseline in Simulink.
Once the above is done, you can check your Vivado design to make sure that your input in the Vivado design matches how you are driving your Simulink design.
More Answers (0)
See Also
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!