AnsweredAssumed Answered

Calling rfftN from ASM

Question asked by Afinko on Oct 15, 2009
Latest reply on Oct 19, 2009 by Afinko

I want to compute 1024 point real radix-2 FFT on ADSP-21375 EZ-kit Lite.

I found in VisualDSP++ 5.0 Run-Time Library Manual for SHARC Processors the example how to use this library, but it is for C code. However, the routines are written in ASM (rfft_simd.asm).

I will not use any C code in my project.

 

Is there any example on how to use "rfft_simd.asm" from ASM main file?

The problem is, that I do not know which pointers are used for input and output.

E.g. rfft_1024 is calling _cfft512_simd and _cfft512_simd is calling ___bitrev_simd.

In "bitrev_simd.asm" is clearly written which register it is using:

 

*           Calling Parameters
*                R0 -->  Input buffer
*                R1 -->  Output buffer
*                R2 -->  Length of buffer
*   
*           Return Registers
*                R0 -->  Modify value
*                R7 -->  Log2(N)
*
*           Altered Registers
*                R2, R4, R7, R8, R12,
*                I4, M4
*                I3, M3
*                I2, M2
*                I5 (used by function, preserved on entry)

 

But in rfft_1024 and _cfft512_simd it is not written and I am a bit confused.

 

I will need to compute 1024 point real radix-2 FFT lot of the times for many inputs from another sources in a complex main program.

Therefore, I am planing to edit "rfft_simd.asm", to add _cfft512_simd and ___bitrev_simd inside one function and remove non necessary things such as:

 

#if ( RFFT == 16 )
#define LENGTH    16
#define NAME      rfft16_simd
#define TWIDDLE   ___tc16
#define CFFT_HALF   _cfft8_simd
#elif ( RFFT == 32 )
#define LENGTH    32
#define NAME      rfft32_simd
#define TWIDDLE   ___tc32
#define CFFT_HALF   _cfft16_simd
#elif ( RFFT == 64 )

etc...

 

It could be great if someone can add here a complete project in ASM, that will compute 1024 point real radix-2 FFT on SHARC (21375 e.g. with using "rfft_simd.asm".

Thanks.

Afi

Outcomes