1/1

|
about cfft core---NEED HELP
by Unknown on Nov 21, 2005 |
Not available! | ||
|
hi.
i am trying to implement FFT in DIT for 8 pt in VHDL language as twiddle factors should be using CORDIC algorithm. i already implemented 8 -pt FFT for 8 bit preasion for singned input in c language. few days ago i found cfft core.but it is implemented in radix 4 fft. so,for my FFT in DIT for 8 pt what shoud i make changes? can you provide me some material like fsm diagram or something??? i really need help in my code.plz help me. plz respond as soon as possible. thank you very much pratibha |
|||
|
about cfft core---NEED HELP
by Unknown on Nov 21, 2005 |
Not available! | ||
|
Hi, i'm working on fft too for an exam at my university (please forget
my english mistakes, I'm Italian). Could you send to me your fft
implementation in c so I can work a little on it? I have to perform a
timing simulation, comparing c results with the risults of a fft core
on a fpga.
Please I really need help!!
Thanks!!
2005/11/21, pratibha172004 at yahoo.co.in pratibha172004 at yahoo.co.in>:
hi.
i am trying to implement FFT in DIT for 8 pt in VHDL language as
twiddle factors should be using CORDIC algorithm. i already implemented
8 -pt FFT for 8 bit preasion for singned input in c language.
few days ago i found cfft core.but it is implemented in radix 4 fft.
so,for my FFT in DIT for 8 pt what shoud i make changes?
can you provide me some material like fsm diram or something???
i really need help in my code.plz help me.
plz respond as soon as possible.
thank you very much
pratibha
_______________________________________________
http://www.opencores.org/mailman/listinfo/cores
|
|||
|
about cfft core---NEED HELP
by Unknown on Nov 22, 2005 |
Not available! | ||
|
hi..
u didn't specify that you want fft implemented in c language as twiddle
factor replace by CORDIC algorithms.
anyway i am sending u fft in c language without using cordic algorithms.
hope so it will work for you.
pratibha
---------------------------------------------------------------------
#include
#include
#include
/*****************************************************
*******************************/
void init_array(int n, double *A_re, double *A_im);
void compute_W(int n, double *W_re, double *W_im);
void output_array(int n, double *A_re, double *A_im, char *outfile);
void permute_bitrev(int n, double *A_re, double *A_im);
int bitrev(int inp, int numbits);
int log_2(int n);
void fft(int n, double *A_re, double *A_im, double *W_re, double
*W_im);
/*****************************************************
*******************************/
/* gets no. of points from the user, initialize the points and roots of
unity lookup table
* and lets fft go. finally bit-reverses the results and outputs them
into a file.
* n should be a power of 2.
*/
int main(int argc, char *argv[])
{
int n;
int i;
double *A_re, *A_im, *W_re, *W_im;
n = 64;
A_re = (double*)malloc(sizeof(double)*n);
A_im = (double*)malloc(sizeof(double)*n);
W_re = (double*)malloc(sizeof(double)*n/2);
W_im = (double*)malloc(sizeof(double)*n/2);
assert(A_re != NULL && A_im != NULL && W_re != NULL && W_im !=
NULL);
for (i=0; i %g,%g\n", input_buf, input_buf[i+1],
A_re[NumPoints], A_im[NumPoints]); */
/* printf("%g %g\n", A_re[NumPoints], A_im[NumPoints]); */
NumPoints++;
}
#endif
for (i=0; i>= 1;
}
return rev;
}
/* returns log n (to the base 2), if n is positive and power of 2 */
int log_2(int n)
{
int res;
for (res=0; n >= 2; res++)
n = n >> 1;
return res;
}
/* fft on a set of n points given by A_re and A_im. Bit-reversal
permuted roots-of-unity lookup table
* is given by W_re and W_im. More specifically, W is the array of
first n/2 nth roots of unity stored
* in a permuted bitreversal order.
*
* FFT - Decimation In Time FFT with input array in correct order and
output array in bit-reversed order.
*
* REQ: n should be a power of 2 to work.
*/
void fft(int n, double *A_re, double *A_im, double *W_re, double
*W_im)
{
double w_re, w_im, u_re, u_im, t_re, t_im;
int m, g, b;
int i, mt, k;
/* for each stage */
for (m=n; m>=2; m=m>>1)
{
/* m = n/2^s; mt = m/2; */
mt = m >> 1;
/* for each group of butterfly */
for (g=0,k=0; gcagliostro82 at g...>
To:
Date: Mon Nov 21 23:19:03 CET 2005
Subject: [oc] about cfft core---NEED HELP
Hi, i'm working on fft too for an exam at my university (please
forget my english mistakes, I'm Italian). Could you send to me your fft implementation in c so I can work a little on it? I have to perform a timing simulation, comparing c results with the risults of a fft core on a fpga. Please I really need help!! Thanks!! |
|||
|
about cfft core---NEED HELP
by Unknown on Nov 22, 2005 |
Not available! | ||
|
Thanks for your answer. As you said I'm in need of cordic algorithms
implementation, but I'll try this other implementation too. Can you
tell me your name, so I can insert it in bibliography and credits in
my relation? (what a bad english :-( )
2005/11/22, pratibha172004 at yahoo.co.in pratibha172004 at yahoo.co.in>:
hi..
u didn't specify that you want fft implemented in c language as twiddle
factor replace by CORDIC algorithms.
anyway i am sending u fft in c language without using cordic algorithms.
hope so it will work for you.
pratibha
---------------------------------------------------------------------
#include
#include
#include
/*****************************************************
*******************************/
void init_array(int n, double *A_re, double *A_im);
void compute_W(int n, double *W_re, double *W_im);
void output_array(int n, double *A_re, double *A_im, char *outfile);
void permute_bitrev(int n, double *A_re, double *A_im);
int bitrev(int inp, int numbits);
int log_2(int n);
void fft(int n, double *A_re, double *A_im, double *W_re, double
*W_im);
/*****************************************************
*******************************/
/* gets no. of points from the user, initialize the points and roots of
unity lookup table
* and lets fft go. finally bit-reverses the results and outputs them
into a file.
* n should be a power of 2.
*/
int main(int argc, char *argv[])
{
int n;
int i;
double *A_re, *A_im, *W_re, *W_im;
n = 64;
A_re = (double*)malloc(sizeof(double)*n);
A_im = (double*)malloc(sizeof(double)*n);
W_re = (double*)malloc(sizeof(double)*n/2);
W_im = (double*)malloc(sizeof(double)*n/2);
assert(A_re != NULL && A_im != NULL && W_re != NULL && W_im !=
NULL);
for (i=0; i %g,%g\n", input_buf, input_buf[i+1],
A_re[NumPoints], A_im[NumPoints]); */
/* printf("%g %g\n", A_re[NumPoints], A_im[NumPoints]); */
NumPoints++;
}
#endif
for (i=0; i>= 1;
}
return rev;
}
/* returns log n (to the base 2), if n is positive and power of 2 */
int log_2(int n)
{
int res;
for (res=0; n >= 2; res++)
n = n >> 1;
return res;
}
/* fft on a set of n points given by A_re and A_im. Bit-reversal
permuted roots-of-unity lookup table
* is given by W_re and W_im. More specifically, W is the array of
first n/2 nth roots of unity stored
* in a permuted bitreversal order.
*
* FFT - Decimation In Time FFT with input array in correct order and
output array in bit-reversed order.
*
* REQ: n should be a power of 2 to work.
*/
void fft(int n, double *A_re, double *A_im, double *W_re, double
*W_im)
{
double w_re, w_im, u_re, u_im, t_re, t_im;
int m, g, b;
int i, mt, k;
/* for each stage */
for (m=n; m>=2; m=m>>1)
{
/* m = n/2^s; mt = m/2; */
mt = m >> 1;
/* for each group of butterfly */
for (g=0,k=0; gcagliostro82 at g...>
To:
Date: Mon Nov 21 23:19:03 CET 2005
Subject: [oc] about cfft core---NEED HELP
> Hi, i'm working on fft too for an exam at my university (please
_______________________________________________
http://www.opencores.org/mailman/listinfo/cores
> forget > my english mistakes, I'm Italian). Could you send to me your fft > implementation in c so I can work a little on it? I have to perform > a > timing simulation, comparing c results with the risults of a fft > core > on a fpga. > Please I really need help!! > Thanks!! > |
|||
1/1

