Sign in

username:

password:



Not a member?

Search c6x



Search tips

Subscribe to c6x



c6x by Keywords

AD535 | BIOS | Booting | Bootloader | C621 | C6211 | C6415 | C671 | C6711 | C6711DSK | C6713 | CCS | Chassaing | COFF | DAT | DM64 | DM642 | DMA | DSK671 | DSK6711 | EDM | EDMA | EMIF | Emulator | EVM | EVM620 | FFT | FIR | GPIO | Halting | HPI | HWI | IDK | JTAG | LDB | LDH | LDW | Linker | LMS | LOG_printf | Matlab | McBSP | MEM_alloc | MIPS | PCI | PCM3003 | Pipeline | Profiling | QDM | Reset | ROM | RTDX | Sampling | SDRAM | Stack | TEB | THS1206 | TMS320C621 | TMS320C6416 | TMS320C6711 | TMS320C6713 | UART | Vector Table | XBUS | XDS560


Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | TMS320C6x | Questions about dspf_sp_cfftr2_dit

Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).

  

Post a new Thread

Questions about dspf_sp_cfftr2_dit - fran...@yahoo.it - Mar 20 18:04:54 2010

Hi boys,I've a question regarding implementation of fft on tms320c6711 on a
dsk6711:
My code's critical part is essentially an interroupt driven function that has to
do the fft, so I've 

/*INCLUDES*/
[...]
#define N 2048 // Or every radix-2 number >3, points of fft

/*PROTOTYPES*/
void bit_rev(float *x,int n); // <-- ChipSupportLibrary 657.pdf
void gen_w_r2(float *w, int n);// <-- ChipSupportLibrary 657.pdf
void bitrev_index(short *index, int n);// <-- ChipSupportLibrary 657.pdf
void resp_to_int(void); // my function
/*MAIN*/
void main(){
[...]
for(;;)
}

/*CALLED FUNCTIONS*/

void resp_to_int(void){
  bitrev_index(table,N);
  gen_twiddle(w, N);
  bit_rev(w,N>>1);
  DSPF_sp_cfftr2_dit(v,w,N);
  DSPF_sp_bitrev_cplx((double*)v,table,N);
  magnitude_calc(v);
}

I've found how to call these functions in ti's doc; I've understand that: i have
to generate tiddle factors w of lenght N/2, reorder they using bit reversal, do
the fft that use sample's array of lenght 2*N (because real and immaginary part
are mixed like complex_number[0]=x[0] + jx[1] and so on) in normal order and
twiddle factors in bit reversed order and produce bit reversed coefficents of
the FFT in an array of lenght 2*N ( same rule ) and bitreverse the result to
obtain the correct order of real and immaginary part and finally calculate
magnitude and phase.

So my questions are:

0) In your opinion is the right way to do fft?

1) Why gen_twiddle is called passing N and bit_rev of twiddle is passed with
N>>1? The code in it do something_x[n]= something1*y[2*n] so there already
is N/2 numbers!

2) I've studied that it is very important to do windowing of sample beacuse the
initial and final part of the sequence may not enter in phase in the sampled
array. It's better to use many windows phased Npoint/Number_of_window.
Implementation of ti's fft use these techiniques? if not how can I do these
things?

3) I generate interroupt event using a timer that provocates the Hardware
Interroupt 8, using:

void start_timer1(){
  *(unsigned volatile int*)TIMER1_CTRL=0x000; //Disable output of Timer 1
  IRQ_map(IRQ_EVT_TINT1,8); // Map TINT event to CPU interrupt 8
  hTimer=TIMER_open(TIMER_DEV1,TIMER_OPEN_RESET);//Open a handle to timer  
  TIMER_configArgs(hTimer,      /* Setup the timer */
  TIMER_CTL_OF(0x000003c1),
  TIMER_PRD_OF(TPRD),
  TIMER_CNT_OF(0)
  );
  TIMER_start(hTimer); 	// Enable the timer
}

with defined:

#define FCPU     167000000					
#define SRATE    8000						
#define TPRD     (FCPU/(4*2*SRATE*10))

I've modified the FCPU parameters in bios from 150Mhz to 167Mhz. Is all my
method correct? i think there is soething not very good...i like the better
configuration in 5510dsk in wich configuring AD you can impose SampleRate in the
configurations string of the codec at the initialization.
In a lot of project I've seen everybody use FCPU/(4*2*SRATE) . Why 4*2? Can i
generate interroupt when i want or i have to extremely precise generate
interroupt only when AD is ready for me, so every 1/8000 seconds?

I wish in your reply!!!! Have a good day!!

_____________________________________

______________________________
StarterWare provides C-based no-OS platform support for the C6000 DSP devices.
Click here for details.




(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )