21.07.2015 Views

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

powernxoflagNumber of elements of input and output vectors.nx ≥ 4Overflow flag. If oflag = 1, a 32-bit overflow has occurred. If oflag = 0, a 32-bit overflow has not occurred.Caution: overflow in negation of a Q31 number can happennaturally when negating (–1).DescriptionThis function negates each of the elements of a vector (fractional values).Algorithm for (i 0; i nx; i ) x(i) –x(i)Overflow Handling MethodologySpecial Requirements noneImplementation Notes noneExampleBenchmarksSaturation implemented for overflow handlingSee examples/neg32 subdirectory(preliminary)Cycles † Core: 4 * nxOverhead: 13Code size(in bytes)61† Assumes all data is in on-chip dual-access RAM and that there is no bus conflict due to twiddletable reads and instruction fetches (provided linker command file reflects those conditions).powerFunctionArgumentsVector Powerushort oflag = power (DATA *x, LDATA *r, ushort nx)(defined in power.asm)x[nx]r[1]Pointer to input data vector 1 of size nx. In-place processingallowed (r can be = x = y)Pointer to output data vector element in Q31 formatSpecial cases: if x= –1 = 32768*2 16 , then r = 1 = 321767*2 16with oflag = 1 if x= 1 = 32767*2 16 , then r = –1 = 321768*2 16with oflag = 1Function Descriptions4-79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!