"TMS320C55x DSP Library DSPLIB Programmer's Reference"
"TMS320C55x DSP Library DSPLIB Programmer's Reference"
"TMS320C55x DSP Library DSPLIB Programmer's Reference"
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
neg32nxoflagNumber 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 Q15 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/neg 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).neg32FunctionArgumentsVector Negate (double precision)ushort oflag = neg32 (LDATA *x, LDATA *r, ushort nx)(defined in neg.asm)x[nx]r[nx]Pointer to input data vector 1 of size nx. In-place processingallowed (r can be = x = y)Pointer to output data vector of size nx. In-place processingallowedSpecial cases: if x = –1 = 32768 * 2 16 , then r = 1 = 321767 * 2 16 with oflag= 1if x= 1 = 32767 * 2 16 , then r = –1 = 321768 * 2 16 with oflag= 14-78