11.07.2015 Views

section 7 - Index of

section 7 - Index of

section 7 - Index of

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.

MPYR Signed Multiply and Round MPYRInstruction Fields 1:51*52 Q Q Q Sign k 0 dXOXO 0 0YO YO 0 0X1 XO 0 1Y1 YO 0 1XOY1 1 0YOXO 1 0X1 YO 1 1Y1 X1 1 101010101+ o1A 0B 1Note: Only the indicated S1 *S2 combinations are valid. X1 *X1 and Y1 *Y1 are not valid.Timing: 2+mv oscillator clock cyclesMemory: 1 +mv program wordsExample 2:MPYR -Y1,#14, BBefore ExecutionY1 1~ _________ $_65_4_32_1 __ ~BI~ ____ $_OO_:O_OO_OO_O_:OO_O_OO_O __ ~Y1 IAfter Execution$654321~--------------~B~I ____ $F_F_:FF_F_E6_B_:O_OO_oo_o __ ~Explanation <strong>of</strong> Example 2: The content <strong>of</strong> Y1 is negated, multiplied by 2- 14 , rounded toa single precision number (24 bits in B1) and placed in the B accumulator. The net effect<strong>of</strong> this operation is negate the content <strong>of</strong> Y1 and divide the result by 2 14 , place the resultin the accumulator and then round to a single precision number. An alternate interpretationis that X1 is negated and placed in the accumulator, right shifted 14 places, filledwith the sign bit (0 for a positive number and 1 for a negative number) and then roundedto a single precision number.

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

Saved successfully!

Ooh no, something went wrong!