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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

log_10The initial estimate can be obtained from a look-up table, from choosing a midpoint,or simply from linear interpolation. The method chosen for this problemis linear interpolation and is accomplished by taking the complement of theleast significant bits of the Xnorm value.The reciprocal is multiplied by the Q31 number to generate the output.Overflow Handling MethodologynoneSpecial Requirements noneImplementation Notes noneExampleBenchmarksSee examples/ldiv16 subdirectory(preliminary)Cycles † Core: 4 * nxOverhead: 14Code size(in bytes)91† 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).log_10FunctionBase 10 Logarithmushort oflag = log_10 (DATA *x, LDATA *r, ushort nx)(defined in log_10.asm)Argumentsx[nx]r[nx]nxoflagPointer to input vector of size nx.Pointer to output data vector (Q31 format) of size nx.Length of input and output data vectorsOverflow flag. If oflag = 1, a 32-bit overflow has occurred. If oflag = 0, a 32-bit overflow has not occurred.DescriptionComputes the log base 10 of elements of vector x using Taylor series.Algorithm for (i 0; i nx; i ) y(i) log 10x(i) where –1 x(i) 1Overflow Handling MethodologyNo scaling implemented for overflow prevention4-64

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

Saved successfully!

Ooh no, something went wrong!