03.08.2013 Views

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

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.

Function MLIB_VMac_F32F16F16<br />

}<br />

// input4 value = 0.45<br />

f32In4 = FRAC32 (0.45);<br />

// output should be FRAC32(0.195) = 0x18F5C28F<br />

f32Out = MLIB_VMac_F32(f32In1, f32In2, f32In3, f32In4);<br />

// output should be FRAC32(0.195) = 0x18F5C28F<br />

f32Out = MLIB_VMac (f32In1, f32In2, f32In3, f32In4, Define F32);<br />

// ##############################################################<br />

// Available only if 32-bit fractional implementation selected<br />

// as default<br />

// ##############################################################<br />

// output should be FRAC32(0.195) = 0x18F5C28F<br />

f32Out = MLIB_VMac (f32In1, f32In2, f32In3, f32In4);<br />

4.181 Function MLIB_VMac_F32F16F16<br />

This function implements the vector multiply accumulate function.<br />

4.181.1 Declaration<br />

tFrac32 MLIB_VMac_F32F16F16(register tFrac16 f16In1, register tFrac16 f16In2, register<br />

tFrac16 f16In3, register tFrac16 f16In4);<br />

4.181.2 Arguments<br />

Table 4-218. MLIB_VMac_F32F16F16 arguments<br />

Type Name Direction Description<br />

register tFrac16 f16In1 input First input value to first multiplication.<br />

register tFrac16 f16In2 input Second input value to first multiplication.<br />

register tFrac16 f16In3 input First input value to second multiplication.<br />

register tFrac16 f16In4 input Second input value to second multiplication.<br />

register tFrac16 f16In1 input First input value to first multiplication<br />

register tFrac16 f16In2 input Second input value to first multiplication<br />

register tFrac16 f16In3 input First input value to second multiplication<br />

register tFrac16 f16In4 input Second input value to second multiplication<br />

4.181.3 Return<br />

Vector multiplied input values with addition.Vector multiplied input values with addition<br />

<strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> <strong>PXR40xx</strong>, Rev. 1.0<br />

676 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!