rfft problem

Started by Sazali Senawi October 23, 2002
Hi all;
Im still stuck when using the rfft function eventhough
Ive followed every advice ive found in the mailing
list archive concerning the rfft. Ive compared the
result with Matlab and i still find that the result
of rfft is wrong. I really need it to work in order to
continue my work. I extremely need yr help .
below are the steps Ive taken:

1) ive included dsplib.h and Tms320.h
2) ive included 54xdsp.lib
3) ive set my input data in the cmd file as follows

.fftdata: {} > IDATA PAGE 1,align(32)

4) could anybody please tell me what i did wrong. my
code is as follows:

#include <std.h>
#include <stdio.h>
#include <math.h>
#include "dsplib.h"
#include <tms320.h>

#pragma DATA_SECTION(AA,".fftdata");
short AA[16]={0};
float A[16]={1.0000, 0.7071, 0.0000, -0.7071,
-1.0000,-0.7071, 0.0000, 0.7071,
1.0000, 0.7071, 0.0000, -0.7071,
-1.0000,-0.7071, 0.0000 , 0.7071};
int i=0;

printf(" %f\n",A[i]);
return 0;

I thank you in advance for yr cooperation.


On Wed, 23 Oct 2002 08:31:34 +0200, you wrote:

>Hi Brian,
>this is not an exactly answer to your question but it may help you.
>Take a look at TI' Application Report spra366 - "Generating Efficient Code
>with TMS320". There you'll find some c-coding guidelines.
>Organizing your code in a propper way let the compiler produce efficient

Thanks for the pointer, I've read that before but its been awhile.
What I'm really trying to find out is how much success (or trouble)
people have had in taking a 'standard' piece of 'C' code and dropping
it into their CCS project. I've had a variable amount of success, some
of the problems being mine and others being things that I think the
CCS compiler should at least warn about.



Brian C. Lane (W7BCL) Programmer
www.shinemicro.com RF, DSP & Microcontroller Design