29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

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.

<strong>Compiler</strong> Features<br />

4.10 <strong>Compiler</strong> support <strong>for</strong> European Telecommunications Standards Institute (ETSI)<br />

basic operations<br />

<strong>ARM</strong> <strong>Compiler</strong> 4.1 and later provide support <strong>for</strong> <strong>the</strong> ETSI basic operations through <strong>the</strong> header<br />

file dspfns.h. The dspfns.h header file contains definitions of <strong>the</strong> ETSI basic operations as a<br />

combination of C code and intrinsics.<br />

See dspfns.h <strong>for</strong> a complete list of <strong>the</strong> ETSI basic operations supported in <strong>ARM</strong> <strong>Compiler</strong> 4.1<br />

and later.<br />

<strong>ARM</strong> <strong>Compiler</strong> 4.1 and later support <strong>the</strong> original ETSI family of basic operations as described<br />

in <strong>the</strong> ETSI G.729 recommendation Coding of speech at 8 kbit/s using conjugate-structure<br />

algebraic-code-excited linear prediction (CS-ACELP), including:<br />

• 16-bit and 32-bit saturated arithmetic operations, such as add and sub. For example,<br />

add(v1, v2) adds two 16-bit numbers v1 and v2 toge<strong>the</strong>r, with overflow control and<br />

saturation, returning a 16-bit result.<br />

• 16-bit and 32-bit multiplication operations, such as mult and L_mult. For example,<br />

mult(v1, v2) multiplies two 16-bit numbers v1 and v2 toge<strong>the</strong>r, returning a scaled 16-bit<br />

result.<br />

• 16-bit arithmetic shift operations, such as shl and shr. For example, <strong>the</strong> saturating left<br />

shift operation shl(v1, v2) arithmetically shifts <strong>the</strong> 16-bit input v1 left v2 positions. A<br />

negative shift count shifts v1 right v2 positions.<br />

• 16-bit data conversion operations, such as extract_l, extract_h, and round. For example,<br />

round(L_v1) rounds <strong>the</strong> lower 16 bits of <strong>the</strong> 32-bit input L_v1 into <strong>the</strong> most significant 16<br />

bits with saturation.<br />

Note<br />

Beware that both <strong>the</strong> dspfns.h header file and <strong>the</strong> ISO C99 header file math.h both define<br />

(different versions of) <strong>the</strong> function round(). Take care to avoid this potential conflict.<br />

4.10.1 See also<br />

Concepts<br />

• European Telecommunications Standards Institute (ETSI) basic operations on page 4-12.<br />

Reference<br />

<strong>Compiler</strong> Reference:<br />

• ETSI basic operations on page 5-89.<br />

<strong>ARM</strong> DUI 0375C Copyright © 2007-2008, 2011 <strong>ARM</strong>. All rights reserved. 4-13<br />

ID061811<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!