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.

sqrt_16DescriptionComputes the sine of elements of vector x. It uses Taylor series to computethe sine of angle x.Algorithm for (i 0; i nx; i ) y(i) sin(x(i)) where x(i) xradpiOverflow Handling MethodologyNot applicableSpecial Requirements noneImplementation Notes Computes the sine of elements of vector x. It uses the following Taylor seriesto compute the angle x in quadrant 1 (0–pi/2).sin(x) = c1*x + c2*x^2 + c3*x^3 + c4*x^4 + c5*x^5c1 = 3.140625xc2 = 0.02026367c3 = – 5.3251c4 = 0.5446778c5 = 1.800293The angle x in other quadrant is calculated by using symmetries that map theangle x into quadrant 1.ExampleBenchmarksSee examples/sine subdirectory(preliminary)Cycles † Core: 19 * nxOverhead: 17Code size(in bytes)93 program; 3 data† 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).sqrt_16FunctionSquare Root of a 16-bit Numberushort oflag = sqrt_16 (DATA *x, DATA *r, short nx)(defined in sqrtv.asm)Argumentsx[nx]r[nx]Pointer to input vector of size nx.Pointer to output vector of size nx containing the sqrt(x).Function Descriptions4-89

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

Saved successfully!

Ooh no, something went wrong!