MATLAB Answers

How to generate hdl code for a function containing dsp.HDLFFT and dsp.HDLIFFT system objects?

24 views (last 30 days)
satish kumar
satish kumar on 12 Jan 2021
Edited: Kiran Kintali on 6 Feb 2021 at 22:22
My matlab code consists of fft, multiplication, division and ifft operations in a single function. Can we generate hdl code for the entire function to burn on fpga. Please help.

  0 Comments

Sign in to comment.

Answers (3)

Kiran Kintali
Kiran Kintali on 12 Jan 2021
Can you share a sample code and testbench?
See attached example on how to generate HDL from hdl.FFT function.

  1 Comment

satish kumar
satish kumar on 20 Jan 2021
Kiran sir, individually hdlFFT and hdlIFFT i have done and it worked well. My requirement is as follows:
I have a row vector. On which i need to apply FFT and then multiply the result with a constant number and then apply IFFT to this result. So a function which does following FFT, multiplication and IFFT. I have written the function in matlab and tried to generate HDL code. But the code generation failed. My question is it possible to do so with HDL coder.

Sign in to comment.


Kiran Kintali
Kiran Kintali on 20 Jan 2021
Please share sample MATLAB Code and Testbench and the error you are seeing. Thanks

  3 Comments

satish kumar
satish kumar on 22 Jan 2021
Purpose of this test code is as follows. I am giving input : yIn , on which FFT applied and on this result(yOut) i applied IFFT to get back the given input yIn which is in YOut. But couldnt generate HDL.
Is it not possible to generate hdl code when FFT and IFFT hdl blocks in cascade. Because in my actual algorithm, i need them in cascade. Please help

Sign in to comment.


Kiran Kintali
Kiran Kintali on 6 Feb 2021 at 22:15
Edited: Kiran Kintali on 6 Feb 2021 at 22:22
See the attached file with examples on some of the coding styles.
Some of the examples contain FFT variations in MATLAB suitable for HDL code generation.
  1. basic discrete time integrator
  2. symmetric fir filter
  3. histogram equalizer
  4. 40 point parallel FFT
  5. polyphase channelizer

  0 Comments

Sign in to comment.

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!