From: khan Sim on
mr sean little

i ve been able to use hdl coder for fft of input signal from workspace, first it was not working, cuz i was using inport block , when i used the signal from workspace block, the problem was solved.

thank you very much,

as i go ahead and i will face any problem, i will surely bother u. :)

thanx
Kind regards
Khan
From: Sean Little on
"khan Sim" <akhun85(a)yahoo.com> wrote in message <ht4ugb$30b$1(a)fred.mathworks.com>...
> mr sean little
>
> i ve been able to use hdl coder for fft of input signal from workspace, first it was not working, cuz i was using inport block , when i used the signal from workspace block, the problem was solved.
>
> thank you very much,
>
> as i go ahead and i will face any problem, i will surely bother u. :)
>
> thanx
> Kind regards
> Khan

As promised, I have started the process of posting some materials to the File Exchange. It will take a couple of days for my submission to be approved.

Note that you can also use a constant block with the constant field that references a variable defined in the MATLAB workspace.

Sean Little
From: khan Sim on
well , moving one step ahead... from previous steps.

FFT has been successful as i found hdl coder block, but how about IFFT(Inverse fourier transform). as far as i have searched, i dont find any HDL compatible block in simulink.

How can i perform ifft compatible with hdl???

thanx
regards
khan
From: Sean Little on
"khan Sim" <akhun85(a)yahoo.com> wrote in message <htd81s$b85$1(a)fred.mathworks.com>...
> well , moving one step ahead... from previous steps.
>
> FFT has been successful as i found hdl coder block, but how about IFFT(Inverse fourier transform). as far as i have searched, i dont find any HDL compatible block in simulink.
>
> How can i perform ifft compatible with hdl???
>
> thanx
> regards
> khan

There is no IFFT block in the HDL coder.

You can compute the IFFT using the FFT block. To compute the IFFT, simply take the conjugate of the complex values before you pass them to the FFT block. Then take the conjugate of the outputs again, followed by a gain block with the value 1/N where N is the size of the FFT.
From: khan Sim on
i have used two HDL coders,
HDL coder (used for fft) =HDLFFT
and
HDL coder (used for Ifft)=HDLIFFT

I am using the same HDL coder for IFFT aswell. The "dout" of HDLFFT is connected to the "din"of HDLIFFT via "complex conjugate" block. The "dvalid" of HDLFFT is connected to the "start" of HDLIFFT. Now i think the output "dout" of HDLIFFT should be equal to "din" of HDLFFT. but when i see the result on scope, the real part of both the signals that is (the "din" of HDLFFT and the "dout" of HDLIFFT are not the same).


has it something to do with the timing of signals? "dvalid" of HDLFFT and "start" of HDLIFFT?

Thanx
regards
khan