04.03.2013 Views

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Under development<br />

Preliminary document<br />

Specifications in this document are tentative and subject to change.<br />

<strong>RL78</strong>/<strong>D1A</strong> CHAPTER 18 MULTIPLIER AND DIVIDER/MULTIPLY-ACCUMULATOR<br />

18.4.4 Multiply-accumulation (signed) operation<br />

• Initial setting<br />

Set the multiplication/division control register (MDUC) to 48H.<br />

Set the initial accumulated value of higher 16 bits to multiplication/division data register C (H) (MDCH).<br />

( If the accumulated value in the MDCH register is negative, the MACSF bit is set to 1.)<br />

Set the initial accumulated value of lower 16 bits to multiplication/division data register C (L) (MDCL).<br />

Set the multiplicand to multiplication/division data register A (L) (MDAL).<br />

Set the multiplier to multiplication/division data register A (H) (MDAH).<br />

(There is no preference in the order of executing steps , , and . Multiplication operation is<br />

automatically started when the multiplier is set to the MDAH register, respectively.)<br />

• During operation processing<br />

The multiplication operation finishes in one clock cycle.<br />

(The multiplication result is stored in multiplication/division data register B (L) (MDBL) and multiplication/division<br />

data register B (H) (MDBH).)<br />

After , the multiply-accumulation operation finishes in one additional clock cycle. (There is a wait of at least<br />

two clock cycles after specifying the initial settings is finished ().)<br />

• Operation end<br />

If the accumulated value stored in the MDCL and MDCH registers is positive, the MACSF bit is cleared to 0.<br />

Read the accumulated value (lower 16 bits) from the MDCL register.<br />

Read the accumulated value (higher 16 bits) from the MDCH register.<br />

(There is no preference in the order of executing steps and .)<br />

( If the result of the multiply-accumulation operation causes an overflow, the MACOF bit is set to 1, INTMD<br />

signal is occurred.)<br />

• Next operation<br />

The next time multiplication, division or multiply-accumulation is performed, start with the initial settings of each<br />

step.<br />

Caution The data is in the two's complement format in multiply-accumulation (signed) operation.<br />

Remark Steps to correspond to to in Figure 18-9.<br />

R01UH0317EJ0004 Rev. 0.04 1022<br />

Feb. 22, 2013

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

Saved successfully!

Ooh no, something went wrong!