关于FFT数据输入倒序的问题?
本帖最后由 fpgaw 于 2010-7-15 11:33 编辑下面这段程序是对输入的数组进行时域里的倒序(DIT),但是不是完整的程序,我不明白数组在VHDL语言中的应用,麻烦高手能将程序完善一下!
procedure rec_fft_dit2(a[], n, x[], is)
// complex a input
// complex x result
{
complex b, c // workspace
complex s, t // workspace
if n == 1 then // end of recursion
{
x := a
return
}
nh := n/2
for k:=0 to nh-1 // copy to workspace
{
s := a // even indexed elements
t := a // odd indexed elements
}
// recursion: call two half-length FFTs:
rec_fft_dit2(s[],nh,b[],is)
rec_fft_dit2(t[],nh,c[],is)
fourier_shift(c[],nh,is*1/2)
for k:=0 to nh-1 // copy back from workspace
{
x := b + c;
x := b - c;
}
}
页:
[1]