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.

lognThe coefficients Bi used in the calculation are derived from the Ci as follows:B0 Q30 1581d 0062DhB1 Q14 16381d 03FFDhB2 Q15 –16298d 0C056hB3 Q16 20693d 050D5hB4 Q17 –24950d 09E8AhB5 Q18 21677d 054ADhB6 Q19 –9130d 0DC56hExampleBenchmarksSee examples/log_2 subdirectory(preliminary)Cycles † Core: 36 * nxOverhead: 37Code size(in bytes)166† 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).lognFunctionBase e Logarithm (natural logarithm)ushort oflag = logn (DATA *x, LDATA *r, ushort nx)(defined in logn.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 e of elements of vector x using Taylor series.Algorithm for (i 0; i nx; i ) y(i) log nx(i) where –1 x(i) 1Overflow Handling MethodologyNo scaling implemented for overflow preventionSpecial Requirements Special RequirementsnoneFunction Descriptions4-67

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

Saved successfully!

Ooh no, something went wrong!