AI Engine Intrinsics  (AIE) r2p21
 All Data Structures Namespaces Functions Variables Typedefs Groups Pages
FFT Addressing

Overview

FFT addressing intrinsics .

Data pointer increment functions

v2cint32 * fft_data_incr (v2cint32 *ptr, int range, v2cint32 *&target, umod_t &cntwrap)
 Increment the FFT data pointer.
 
v8cint16 * fft_data_incr (v8cint16 *ptr, int range, v8cint16 *&target, umod_t &cntwrap)
 Increment the FFT data pointer.
 
v4cint16 * fft_data_incr (v4cint16 *ptr, int range, v4cint16 *&target, umod_t &cntwrap)
 Increment the FFT data pointer.
 
v4cfloat * fft_data_incr (v4cfloat *ptr, int range, v4cfloat *&target, umod_t &cntwrap)
 Increment the FFT data pointer.
 
v2cfloat * fft_data_incr (v2cfloat *ptr, int range, v2cfloat *&target, umod_t &cntwrap)
 Increment the FFT data pointer.
 

Data pointer increment functions without cntwrap return value

v4cint32 * fft_data_incr (v4cint32 *ptr, int range, v4cint32 *&target)
 Iterate over the FFT input values.
 
v2cint32 * fft_data_incr (v2cint32 *ptr, int range, v2cint32 *&target)
 Iterate over the FFT input values.
 
v8cint16 * fft_data_incr (v8cint16 *ptr, int range, v8cint16 *&target)
 Iterate over the FFT input values.
 
v4cint16 * fft_data_incr (v4cint16 *ptr, int range, v4cint16 *&target)
 Iterate over the FFT input values.
 
v4cfloat * fft_data_incr (v4cfloat *ptr, int range, v4cfloat *&target)
 Iterate over the FFT input values.
 
v2cfloat * fft_data_incr (v2cfloat *ptr, int range, v2cfloat *&target)
 Iterate over the FFT input values.
 

Twiddle factor increment functions

void * fft_twiddle_incr_inl (void *ptr, int bytes, umod_t cntwrap, int step)
 Increment the twiddle factor pointer.
 
#define fft_twiddle_incr(ptr, cntwrap, step)   fft_twiddle_incr_inl((ptr), 1, (cntwrap), (step))
 Increment the twiddle factor pointer.
 

Macro Definition Documentation

#define fft_twiddle_incr (   ptr,
  cntwrap,
  step 
)    fft_twiddle_incr_inl((ptr), 1, (cntwrap), (step))

Increment the twiddle factor pointer.

Parameters
[in]cntwrapContains the block wrap (cntwrap[19]) and the count of previous wraps (cntwrap[2:0])
[in,out]ptrPointer to the current twiddle vector.
[in]stepBinary logarithm of the number of wraps per pointer increment. Must be a compile-time constant.

This function is called within every stage of the Stockham FFT algorithm in order to get a new set of twiddle values.

The internal logic of this function can be thought of as the following:

bool wrap = cntwrap >> 19;
bool cntzero = (cntwrap & ((1 << step) - 1)) == 0;
if(wrap && cntzero)
++ptw;

Function Documentation

v2cint32* fft_data_incr ( v2cint32 *  ptr,
int  range,
v2cint32 *&  target,
umod_t &  cntwrap 
)

Increment the FFT data pointer.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block
[in,out]cntwrapWrap bit (cntwrap[19]) and wrap counter (cntwrap[2:0])

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

cnt = cntwrap & 0x7;
if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
wrap = 1;
cnt = (cnt+1) & 0x7;
}
else
wrap = 0;
cntwrap = (wrap << 19) | cnt;
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
v8cint16* fft_data_incr ( v8cint16 *  ptr,
int  range,
v8cint16 *&  target,
umod_t &  cntwrap 
)

Increment the FFT data pointer.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block
[in,out]cntwrapWrap bit (cntwrap[19]) and wrap counter (cntwrap[2:0])

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

cnt = cntwrap & 0x7;
if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
wrap = 1;
cnt = (cnt+1) & 0x7;
}
else
wrap = 0;
cntwrap = (wrap << 19) | cnt;
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
v4cint16* fft_data_incr ( v4cint16 *  ptr,
int  range,
v4cint16 *&  target,
umod_t &  cntwrap 
)

Increment the FFT data pointer.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block
[in,out]cntwrapWrap bit (cntwrap[19]) and wrap counter (cntwrap[2:0])

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

cnt = cntwrap & 0x7;
if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
wrap = 1;
cnt = (cnt+1) & 0x7;
}
else
wrap = 0;
cntwrap = (wrap << 19) | cnt;
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
v4cfloat* fft_data_incr ( v4cfloat *  ptr,
int  range,
v4cfloat *&  target,
umod_t &  cntwrap 
)

Increment the FFT data pointer.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block
[in,out]cntwrapWrap bit (cntwrap[19]) and wrap counter (cntwrap[2:0])

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

cnt = cntwrap & 0x7;
if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
wrap = 1;
cnt = (cnt+1) & 0x7;
}
else
wrap = 0;
cntwrap = (wrap << 19) | cnt;
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
v2cfloat* fft_data_incr ( v2cfloat *  ptr,
int  range,
v2cfloat *&  target,
umod_t &  cntwrap 
)

Increment the FFT data pointer.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block
[in,out]cntwrapWrap bit (cntwrap[19]) and wrap counter (cntwrap[2:0])

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

cnt = cntwrap & 0x7;
if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
wrap = 1;
cnt = (cnt+1) & 0x7;
}
else
wrap = 0;
cntwrap = (wrap << 19) | cnt;
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
v4cint32* fft_data_incr ( v4cint32 *  ptr,
int  range,
v4cint32 *&  target 
)

Iterate over the FFT input values.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
}
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
See Also
fft_data_incr()
v2cint32* fft_data_incr ( v2cint32 *  ptr,
int  range,
v2cint32 *&  target 
)

Iterate over the FFT input values.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
}
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
See Also
fft_data_incr()
v8cint16* fft_data_incr ( v8cint16 *  ptr,
int  range,
v8cint16 *&  target 
)

Iterate over the FFT input values.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
}
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
See Also
fft_data_incr()
v4cint16* fft_data_incr ( v4cint16 *  ptr,
int  range,
v4cint16 *&  target 
)

Iterate over the FFT input values.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
}
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
See Also
fft_data_incr()
v4cfloat* fft_data_incr ( v4cfloat *  ptr,
int  range,
v4cfloat *&  target 
)

Iterate over the FFT input values.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
}
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
See Also
fft_data_incr()
v2cfloat* fft_data_incr ( v2cfloat *  ptr,
int  range,
v2cfloat *&  target 
)

Iterate over the FFT input values.

Parameters
[in,out]ptrPointer to the input vector
[in]rangeSize of the block of vectors to iterate over between jumps
[in,out]targetPointer to the end of the consecutive block

This function enables the iteration of the pointer that is the current target of the butterfly operation. If this pointer becomes equal to the target i.e. reaches the end of the wrap, it skips the appropriate distance (the range) and begins to iterate towards a newly assigned target. The pseudocode showing this logic can be seen below:

if(++ptr == target)
{
ptr += (radix-1) * range;
target += radix * range;
}
Note
The radix value must be set statically with set_rdx(). Allowed values for the radix are 2,3,4,5 and 7.
See Also
fft_data_incr()
void* fft_twiddle_incr_inl ( void *  ptr,
int  bytes,
umod_t  cntwrap,
int  step 
)

Increment the twiddle factor pointer.

Parameters
[in]cntwrapContains the block wrap (cntwrap[19]) and the count of previous wraps (cntwrap[2:0])
[in,out]ptrPointer to the current twiddle vector.
[in]stepBinary logarithm of the number of wraps per pointer increment. Must be a compile-time constant.

This function is called within every stage of the Stockham FFT algorithm in order to get a new set of twiddle values.

The internal logic of this function can be thought of as the following:

bool wrap = cntwrap >> 19;
bool cntzero = (cntwrap & ((1 << step) - 1)) == 0;
if(wrap && cntzero)
++ptw;