361
CHAPTER 15 MULTIPLICATION AND ADDITION CALCULATOR
bit24 to bit9 (Q9 format)
bit25 to bit10 (Q10 format)
bit26 to bit11 (Q11 format)
•
Rounding processing
The LSB is set by rounding up the bit below the LSB of the selected output bits (round up if "1", ignore
if "0").
•
Saturation processing
This compares the sign bit (MSB) of the rounded 16-bit data with the upper bits of the accumulator. If a
bit with a different value is present, the data value is saturated (set to maximum or minimum). The result
of saturation depends on the sign bit (MSB) of the accumulator as follows.
If the sign of the accumulator is "0" -> Saturate to maximum positive value "7FFF
H
".
If the sign of the accumulator is "1" -> Saturate to maximum negative value "8000
H
".
The following shows an example.
■
Variable Monitor Output
The multiplication and addition macro includes registers (DSP-OT0 to DSP-OT7) that always contain the
values of addresses 0 to 7 in Y-RAM. Whenever data is written to Y-RAM addresses 0 to 7 (write from
CPU, write by STR instruction, or delayed write), the same data is written to the DSP-OT0 to DSP-OT7
registers.
Although CPU access to Y-RAM is prohibited during calculation, by using the STR instruction to store any
results required by the CPU in Y-RAM addresses 0 to 7, the CPU can read calculation results at any time.
(Saturate to maximum positive value): Saturation processing
7 F F
H
39 . . . . . . . . . . 28
F F F F
H
27 . . . . . . . . . . . . . . 12
F F F
H
11 . . . . . . . . . . 0
Accumulator
F F F F
H
(Select bit 27 to bit 12): Select scaling
1
(Accumulator bit 11): Rounding process
0 0 0 0
H
+)
0
Bit 15
Comparison
Saturation
processing
7 F F F
H
Transfer data
Summary of Contents for FR60Lite
Page 3: ......
Page 5: ......
Page 115: ...100 CHAPTER 3 CPU AND CONTROL UNITS ...
Page 127: ...112 CHAPTER 4 I O PORTS ...
Page 143: ...128 CHAPTER 5 INTERRUPT CONTROLLER ...
Page 155: ...140 CHAPTER 6 EXTERNAL INTERRUPT AND NMI CONTROLLER ...
Page 197: ...182 CHAPTER 9 PPG Programmable Pulse Generator ...
Page 337: ...322 CHAPTER 13 UART ...
Page 417: ...402 CHAPTER 16 DMAC DMA Controller ...
Page 445: ...430 CHAPTER 17 FLASH MEMORY ...
Page 451: ...436 CHAPTER 18 SERIAL PROGRAMMING CONNECTION ...
Page 493: ...478 APPENDIX F Precautions on Handling ...
Page 494: ...479 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Page 507: ...492 INDEX ...
Page 509: ......