This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear Sir,
i get the perfect results for 8point and 16 point fft..
but when i go for 32 bits or higer than that like 64,128,256,512 and 1024 point fft i dont get the exact results.
i followed ur tutorial.sprabb6b ,sprz281c ,sprz308d and sprz310d too..
my result is going into scratch buffer..
data=&adcOutCh3[0];
hwafft_br(data, data_br, DATA_LEN_1024); /* bit-reverse input data */
data=data_br;
//out_sel = hwafft_wrapper(data,scratch,fft_flag,scale_flag,hwafft_32pts);
out_sel = hwafft_32pts(data, scratch, scratch, data, fft_flag, scale_flag);
if (out_sel == OUT_SEL_DATA)
{
result = data;
result1 = (float *) data;
for(i=0;i<DATA_LEN_1024;i++)
{
Real_Part[i] =data[i] & 0x0000FFFF;
Imaginary_Part[i] = data[i] >> 16;
}
}
if(out_sel==OUT_SEL_SCRATCH)
{
result = scratch;
for(i=0;i<DATA_LEN_1024;i++)
{
Real_Part[i] =scratch[i] & 0x0000FFFF;
Imaginary_Part[i] = scratch[i] >> 16;
}
// .cmd file.
-stack 0x2000 /* Primary stack size */
-sysstack 0x1000 /* Secondary stack size */
-heap 0x2000 /* Heap area size */
-c /* Use C linking conventions: auto-init vars at runtime */
-u _Reset /* Force load of reset interrupt handler */
/* SPECIFY THE SYSTEM MEMORY MAP */
MEMORY
{
PAGE 0: /* ---- Unified Program/Data Address Space ---- */
MMR (RWIX): origin = 0x000000, length = 0x0000c0 /* MMRs */
// DARAM0 (RWIX): origin = 0x0000c0, length = 0x00ff40 /* 64KB - MMRs */
DARAM0 (RWIX) : origin = 00000c0h length = 007f40h /* on-chip DARAM 0 */
//DARAM1 (RWIX) : origin = 0002000h length = 002000h /* on-chip DARAM 1 */
//DARAM2 (RWIX) : origin = 0004000h length = 002000h /* on-chip DARAM 2 */
//DARAM3 (RWIX) : origin = 0006000h length = 002000h /* on-chip DARAM 3 */
DARAM4 (RWIX) : origin = 0008000h length = 002000h /* on-chip DARAM 4 */
DARAM5 (RWIX) : origin = 000a000h length = 002000h /* on-chip DARAM 5 */
DARAM6 (RWIX) : origin = 000c000h length = 002000h /* on-chip DARAM 6 */
DARAM7 (RWIX) : origin = 000e000h length = 002000h /* on-chip DARAM 7 */
SARAM0 (RWIX): origin = 0x010000, length = 0x010000 /* 64KB */
SARAM1 (RWIX): origin = 0x020000, length = 0x020000 /* 128KB */
SARAM2 (RWIX): origin = 0x040000, length = 0x00FE00 /* 64KB */
VECS (RWIX): origin = 0x04FE00, length = 0x000200 /* 512B */
PDROM (RIX): origin = 0xff8000, length = 0x008000 /* 32KB */
PAGE 2: /* -------- 64K-word I/O Address Space -------- */
IOPORT (RWI) : origin = 0x000000, length = 0x020000
}
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
SECTIONS
{
.text >> SARAM1|SARAM2|SARAM0 /* Code */
/* Both stacks must be on same physical memory page */
.stack > DARAM0 /* Primary system stack */
.sysstack > DARAM0 /* Secondary system stack */
.data >> DARAM0|DARAM4|DARAM5 /* Initialized vars */
.bss >> DARAM0|DARAM6|DARAM7 /* Global & static vars */
.const >> DARAM0|DARAM4|DARAM5 /* Constant data */
.sysmem > DARAM0|DARAM6|DARAM7 /* Dynamic memory (malloc) */
.switch > SARAM2 /* Switch statement tables */
.cinit > SARAM2 /* Auto-initialization tables */
.pinit > SARAM2 /* Initialization fn tables */
.cio > SARAM2 /* C I/O buffers */
.args > SARAM2 /* Arguments to main() */
vectors > VECS /* Interrupt vectors */
.onchip_code : > SARAM2
.ioport > IOPORT PAGE 2 /* Global & static ioport vars */
//data_buf > DARAM4 ALIGN=1024
data_br_buf > SARAM0 ALIGN=1024
scratch_buf > SARAM1 ALIGN=1024
}
plzzz help me out..
i really dont understand whats going wrong
Hello,
if FFT result is greater than 32767 it shows 32767 in the data variable..i have set the address of data variable as follows
data_br_buf > SARAM0 ALIGN=1024
scratch_buf > SARAM1 ALIGN=1024
SARAM0 (RWIX): origin = 0x010000, length = 0x010000 /* 64KB */
SARAM1 (RWIX): origin = 0x020000, length = 0x020000 /* 128KB */
out_sel = hwafft_wrapper(data,scratch,fft_flag,scale_flag,hwafft_256pts);
but i dont understand why the value of resultant is so?