"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.
addCycles †Code size(in bytes)Aubias:Core:nreven: [(8 * nx – 3 * nr * (nr + 2) + 68) / 8] * nrnr odd: [(8 * nx – 3 * (nr–1) * (nr+1) + 68)/8] * (nr – 1) + 33nr = 1: nx + 26Overhead:nr even: 64nr odd: 55nr = 1: 47Abias: 226Araw: 178Aubias: 308† 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).addFunctionVector Addushort oflag = add (DATA *x, DATA *y, DATA *r, ushort nx, ushort scale)(defined in add.asm)Argumentsx[nx]y[nx]r[nx]nxscaleoflagPointer to input data vector 1 of size nx. In-place processingallowed (r can be = x = y)Pointer to input data vector 2 of size nxPointer to output data vector of size nx containing (x+y) if scale = 0 (x+y) /2 if scale = 1Number of elements of input and output vectors.nx ≥ 4Scale selection If scale = 1, divide the result by 2 to prevent overflow If scale = 0, do not divide by 2Overflow flag. If oflag = 1, a 32-bit overflow has occurred If oflag = 0, a 32-bit overflow has not occurredDescriptionThis function adds two vectors, element by element.Function Descriptions4-9