Dspf_Q15Tofl - Texas Instruments TMS320C67 DSP Series Programmer's Reference Manual

Library
Hide thumbs Also See for TMS320C67 DSP Series:
Table of Contents

Advertisement

DSPF_q15tofl

DSPF_q15tofl
Function
Arguments
Description
Algorithm
Special Requirements
Implementation Notes
4-78
Q15 format to single-precision IEEE floating-point format
void DSPF_q15tofl (const short *x, float * restrict r, int nx)
x
Input array containing shorts in Q15 format.
r
Output array containing equivalent floats.
nx
Number of values in the x vector.
This routine converts data in the Q15 format into IEEE single-precision floating
point.
This is the C equivalent for the assembly code. Note that the assembly code
is hand optimized and restrictions may apply.
void DSPF_q15tofl(const short *x, float * restrict r, int nx)
{
int i;
for (i = 0; i < nx; i++)
r[i] = (float)x[i] / 0x8000;
}
-
The array x must be double-word aligned.
-
The value of nx must be > 0.
-
Extraneous loads are allowed in the program.
-
LDDW instructions are used to load four short values at a time.
-
The loop is unrolled once and software pipelined. However, by condition-
ally storing odd numbered array sizes are also permitted.
-
To avoid write buffer fulls on the 671x the output array is brought into cache
inside the kernel. Thus, the store happens to addresses already in L1D.
Thus, no use of the write buffer is made.
-
No write buffer fulls occur because of cache touching.
-
Endianess: This code is little endian.
-
Interruptibility: This code is interrup-tolerant but not interruptible.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C67 DSP Series and is the answer not in the manual?

Questions and answers

Table of Contents