1. This document is provided for reference purposes only so that Renesas customers may select the appropriate
Renesas products for their use. Renesas neither makes warranties or representations with respect to the
accuracy or completeness of the information contained in this document nor grants any license to any
intellectual property rights or any other rights of Renesas or any third party with respect to the information in
this document.
2. Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising
out of the use of any information in this document, including, but not limited to, product data, diagrams, charts,
programs, algorithms, and application circuit examples.
3. You should not use the products or the technology described in this document for the purpose of military
applications such as the development of weapons of mass destruction or for the purpose of any other military
use. When exporting the products or technology described herein, you should follow the applicable export
control laws and regulations, and procedures required by such laws and regulations.
4. All information included in this document such as product data, diagrams, charts, programs, algorithms, and
application circuit examples, is current as of the date this document is issued. Such information, however, is
subject to change without any prior notice. Before purchasing or using any Renesas products listed in this
document, please confirm the latest product information with a Renesas sales office. Also, please pay regular
and careful attention to additional and different information to be disclosed by Renesas such as that disclosed
through our website. (http://www.renesas.com )
5. Renesas has used reasonable care in compiling the information included in this document, but Renesas
assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information
included in this document.
6. When using or otherwise relying on the information in this document, you should evaluate the information in
light of the total system before deciding about the applicability of such information to the intended application.
Renesas makes no representations, warranties or guaranties regarding the suitability of its products for any
particular application and specifically disclaims any liability arising out of the application and use of the
information in this document or Renesas products.
7. With the exception of products specified by Renesas as suitable for automobile applications, Renesas
products are not designed, manufactured or tested for applications or otherwise in systems the failure or
malfunction of which may cause a direct threat to human life or create a risk of human injury or which require
especially high quality and reliability such as safety systems, or equipment or systems for transportation and
traffic, healthcare, combustion control, aerospace and aeronautics, nuclear power, or undersea communication
transmission. If you are considering the use of our products for such purposes, please contact a Renesas
sales office beforehand. Renesas shall have no liability for damages arising out of the uses set forth above.
8. Notwithstanding the preceding paragraph, you should not use Renesas products for the purposes listed below:
(1) artificial life support devices or systems
(2) surgical implantations
(3) healthcare intervention (e.g., excision, administration of medication, etc.)
(4) any other purposes that pose a direct threat to human life
Renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who
elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas
Technology Corp., its affiliated companies and their officers, directors, and employees against any and all
damages arising out of such applications.
9. You should use the products described herein within the range specified by Renesas, especially with respect
to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation
characteristics, installation and other product characteristics. Renesas shall have no liability for malfunctions or
damages arising out of the use of Renesas products beyond such specified ranges.
10. Although Renesas endeavors to improve the quality and reliability of its products, IC products have specific
characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use
conditions. Please be sure to implement safety measures to guard against the possibility of physical injury, and
injury or damage caused by fire in the event of the failure of a Renesas product, such as safety design for
hardware and software including but not limited to redundancy, fire control and malfunction prevention,
appropriate treatment for aging degradation or any other applicable measures. Among others, since the
evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or
system manufactured by you.
11. In case Renesas products listed in this document are detached from the products to which the Renesas
products are attached or affixed, the risk of accident such as swallowing by infants and small children is very
high. You should implement safety measures so that Renesas products may not be easily detached from your
products. Renesas shall have no liability for damages arising out of such detachment.
12. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written
approval from Renesas.
13. Please contact a Renesas sales office if you have any questions regarding the information contained in this
document, Renesas semiconductor products, or if you have any other inquiries.
Rev.1.00 Jan. 10, 2008 Page ii of xxx
REJ09B0261-0100
General Precautions in the Handling of MPU/MCU Products
The following usage notes are applicable to all MPU/MCU products from Renesas. For detailed usage notes
on the products covered by this manual, refer to the relevant sections of the manual. If the descriptions under
General Precautions in the Handling of MPU/MCU Products and in the body of the manual differ from each
other, the description in the body of the manual takes precedence.
1. Handling of Unused Pins
Handle unused pins in accord with the directions given under Handling of Unused Pins in
the manual.
The input pins of CMOS products are generally in the high-impedance state. In operation
with an unused pin in the open-circuit state, extra electromagnetic noise is induced in
the vicinity of LSI, an associated shoot-through current flows internally, and malfunctions
may occur due to the false recognition of the pin state as an input signal. Unused pins
should be handled as described under Handling of Unused Pins in the manual.
2. Processing at Power-on
The state of the product is undefined at the moment when power is supplied.
The states of internal circuits in the LSI are indeterminate and the states of register settings
and pins are undefined at the moment when power is supplied.
In a finished product where the reset signal is applied to the external reset pin, the
states of pins are not guaranteed from the moment when power is supplied until the
reset process is completed.
In a similar way, the states of pins in a product that is reset by an on-chip power-on
reset function are not guaranteed from the moment when power is supplied until the
power reaches the level at which resetting has been specified.
3. Prohibition of Access to Reserved Addresses
Access to reserved addresses is prohibited.
The reserved addresses are provided for the possible future expansion of functions. Do not
access these addresses; the correct operation of LSI is not guaranteed if they are
accessed.
4. Clock Signals
After applying a reset, only release the reset line after the operating clock signal has
become stable. When switching the clock signal during program execution, wait until the
target clock signal has stabilized.
When the clock signal is generated with an external resonator (or from an external
oscillator) during a reset, ensure that the reset line is only released after full stabilization
of the clock signal. Moreover, when switching to a clock signal produced with an
external resonator (or by an external oscillator) while program execution is in progress,
wait until the target clock signal is stable.
5. Differences between Products
Before changing from one product to another, i.e. to one with a different type number,
confirm that the change will not lead to problems.
The characteristics of MPU/MCU in the same group but having different type numbers may
differ because of the differences in internal memory capacity and layout pattern. When
changing to products of different type numbers, implement a system-evaluation test for
each of the products.
Rev.1.00 Jan. 10, 2008 Page iii of xxx
REJ09B0261-0100
Rev.1.00 Jan. 10, 2008 Page iv of xxx
REJ09B0261-0100
Preface
This LSI is a RISC (Reduced Instruction Set Computer) microcomputer which includes a Renesas
Technology-original RISC CPU (SH-4A) and various peripheral functions required to configure a
system.
Target Users: This manual was written for users who will be using this LSI in the design of
application systems. Users of this manual are expected to understand the
fundamentals of electrical circuits, logical circuits, and microcomputers.
Objective: This manual was written to explain the hardware functions and electrical
characteristics of this LSI to the above users.
Notes on reading this manual:
• In order to understand the overall functions of the chip
Read the manual according to the contents. This manual consists of parts on the CPU, system
control functions, peripheral functions and electrical characteristics.
• In order to understand individual instructions in detail
Read the separate manuals SH-4A Extended Functions Software Manual and SH-4A Software
Manual.
Rules: Bit order: The MSB is on the left and the LSB is on the right.
Number notation: Binary is B'xxxx, hexadecimal is H'xxxx, decimal is xxxx.
Signal notation: An overbar is added to active-low signals: xxxx
Rev.1.00 Jan. 10, 2008 Page v of xxx
REJ09B0261-0100
Abbreviations
ALU Arithmetic Logic Unit
ASID Address Space Identifier
BGA Ball Grid Array
CMT Timer/Counter (Compare Match Timer)
CPG Clock Pulse Generator
CPU Central Processing Unit
DDR Double Data Rate
DDRIF DDR-SDRAM Interface
DMA Direct Memory Access
DMAC Direct Memory Access Controller
FIFO First-In First-Out
FPU Floating-point Unit
HAC Audio Codec
H-UDI User Debugging Interface
INTC Interrupt Controller
JTAG Joint Test Action Group
LBSC Local Bus State Controller
LRAM L Memory
LRU Least Recently Used
LSB Least Significant Bit
MMCIF Multimedia Card Interface
MMU Memory Management Unit
Rev.1.00 Jan. 10, 2008 Page vi of xxx
REJ09B0261-0100
MSB Most Significant Bit
PC Program Counter
PCI Peripheral Component Interconnect
PCIC PCI (local bus) Controller
PFC Pin Function Controller
RISC Reduced Instruction Set Computer
RTC Realtime Clock
SCIF Serial Communication Interface with FIFO
SIOF Serial Interface with FIFO
SSI Serial Sound Interface
TAP Test Access Port
TLB Translation Lookaside Buffer
TMU Timer Unit
UART Universal Asynchronous Receiver/Transmitter
UBC User Break Controller
WDT Watchdog Timer
Rev.1.00 Jan. 10, 2008 Page vii of xxx
REJ09B0261-0100
All trademarks and registered trademarks are the property of their respective owners.
Rev.1.00 Jan. 10, 2008 Page viii of xxx
REJ09B0261-0100
B. Mode Pin Settings ............................................................................................................ 1628
C. Pin Functions ................................................................................................................... 1631
C.1 Pin States .......................................................................................................... 1631
C.2 Handling of Unused Pins .................................................................................. 1642
D. Turning On and Off Power Supply.................................................................................. 1653
D.1 Turning On and Off Between Each Power Supply Series ................................ 1653
D.2 Power-On and Power-Off Sequences for Power Supplies with Different
Potentials in DDR2-SDRAM Power Supply Backup Mode............................. 1654
D.3 Turning On and Off Between the Same Power Supply Series.......................... 1655
E. Version Registers (PVR, PRR) ........................................................................................ 1656
F. Product Lineup................................................................................................................. 1657
Rev.1.00 Jan. 10, 2008 Page xxx of xxx
REJ09B0261-0100
1. Overview
Section 1 Overview
The SH7785 incorporates a DDR2-SDRAM interface, a PCI controller, a DMA controller, timers,
serial interfaces, audio interfaces, a graphics data translation accelerator (GDTA) that supports
YUV data conversion and motion compensation processing, and a display unit (DU) that supports
digital RGB display. The DDR2 interface, PCI interface, and the local bus are independent,
providing dedicated external bus interfaces for the transfer of large amounts of data and of
streaming data.
The SH7785 contains an SH-4A (PVR.VER = H'30: Extended version), which is a 32-bit RISC
(reduced instruction set computer) multiprocessor including an FPU as well as a CPU, providing
upward compatibility (instruction set level) with the SH-1, SH-2, SH-3, and SH-4
microcomputers. The CPU and FPU run at 600 MHz. The processor also includes an instruction
cache, an operand cache for which copy-back or write-through mode is selectable, a four-entry
fully associative instruction TLB (translation look-aside buffer), and an MMU (memory
management unit) with a 64-entry fully associative unified TLB.
1.1 Features of the SH7785
The features of the SH7785 are listed in table 1.1
Table 1.1 SH7785 Features
Item Features
LSI
• CPU Operating frequency: 600 MHz
• Voltage: 1.1 V (internal), 1.8 V (DDR2-SDRAM), 3.3 V (I/O)
• External bus (local bus)
⎯ Separate 26-bit address and 64-bit data buses (the PCI bus is not
available when the 64-bit data bus is in use)
⎯ External bus frequency: up to 100 MHz
• External bus (DDR2-SDRAM bus interface)
⎯ Separate 15-bit address and 32-bit data buses
⎯ External bus frequency: up to 300 MHz (600 Mbps)
• External bus (PCI bus):
⎯ 32-bit address/data multiplexed bus
⎯ External bus frequency: 33 MHz or 66 MHz
Rev.1.00 Jan. 10, 2008 Page 1 of 1658
REJ09B0261-0100
1. Overview
Item Features
CPU
• Renesas Technology original architecture
• 32-bit internal data bus
• General-register files:
⎯ Sixteen 32-bit general registers (eight 32-bit shadow registers)
⎯ Seven 32-bit control registers
⎯ Four 32-bit system registers
• RISC-type instruction set (upward compatibility for the SH-1, SH-2, SH-3
and SH-4 processors)
⎯ Instruction length: 16-bit fixed length for improved code efficiency
⎯ Load/store architecture
⎯ Delayed branch instructions
⎯ Conditional instruction execution
⎯ Instruction-set design based on the C language
• Super-scalar architecture covering both the FPU and CPU provides for
the simultaneous execution of any two instructions
• Instruction-execution time: Two instructions per cycle (max.)
• Selectable write method (copy-back or write-through)
• Store queue (32 bytes × 2 entries)
• One-stage copy-back buffer and one-stage write-through buffer
LRAM
• ILRAM
⎯ 8-Kbyte high-speed memory
⎯ Three independent read/write ports
⎯ 8-/16-/32-/64-bit access from the CPU or FPU
⎯ 8-/16-/32-/64-bit access and 16-/32-byte access in response to
⎯ Support for protection of memory from CPU or FPU access
• OLRAM
⎯ 16-Kbyte high-speed memory
⎯ Three independent read/write ports
⎯ 8-/16-/32-/64-bit access by the CPU or the FPU
⎯ 8-/16-/32-/64-bit access and 16-/32-byte access in response to
⎯ Support for protection of memory from CPU or FPU access
external requests
external requests
Rev.1.00 Jan. 10, 2008 Page 4 of 1658
REJ09B0261-0100
Item Features
URAM
• 128-Kbyte large-capacity memory
• Three independent read/write ports
• 8-/16-/32-bit access by the CPU or the FPU
• 8-/16-/32-bit access by the DMAC
Interrupt controller
(INTC)
• Nine independent external interrupts: NMI and IRQ7 to IRQ0
⎯ NMI: Falling/rising edge selectable
⎯ IRQ: Falling/rising edge or high level/low level selectable
• 15-level-encoded external interrupts: IRL3 to IRL0, or IRL7 to IRL4
• On-chip module interrupts: A priority level can be set for each module.
The following modules can issue on-chip module interrupts:
TMU, DU, GDTA, SCIF, WDT, H-UDI, DMAC, HAC, PCIC, SIOF, HSPI,
MMCIF, SSI, FLCTL, and GPIO.
1. Overview
Rev.1.00 Jan. 10, 2008 Page 5 of 1658
REJ09B0261-0100
1. Overview
Item Features
Local bus state
controller (LBSC)
• A dedicated Local-bus interface
⎯ Controls the external memory space divided into seven 64-Mbyte
⎯ The interface type, bus width, and wait-cycle insertion can be set for
• SRAM interface
⎯ Wait-cycle insertion can be set by register values.
⎯ Wait-cycle insertion by the RDY pin
⎯ Connectable as area 0, 1, 2, 3, 4, 5, or 6
⎯ Selectable bus width: 64-/32-/16-/8-bit
• Burst ROM interface
⎯ Wait-cycle insertion can be set by register values.
⎯ Number of units in burst transfers can be set by register values.
⎯ Connectable as area 0, 1, 2, 3, 4, 5, or 6
⎯ Selectable bus width: 64-/32-/16-/8-bit
• MPX interface
⎯ Address/data multiplexing
⎯ Connectable as area 1 or 4
⎯ Selectable bus widths: 64-/32-bit
• SRAM interface with byte-control
⎯ Connectable as area 1 or 4
⎯ Selectable bus width: 64-/32-/16-bit
• PCMCIA interface (only for little-endian mode)
⎯ Wait-cycle insertion can be set by register values.
⎯ Bus-sizing function for adaptation to the I/O bus width
⎯ Connectable as area 5 or 6
⎯ Selectable bus width: 16-/8-bit
• Supports transfer to and from E-IDE/ATAPI devices (ATA3)
⎯ Supports PIO mode 4 type and multi-word DMA mode 2 type
⎯ Connectable as area 5 or 6
•
Big or little endian is selectable
(max.) areas
each area.
Rev.1.00 Jan. 10, 2008 Page 6 of 1658
REJ09B0261-0100
Item Features
DDR2-SDRAM bus
controller (DBSC)
• A dedicated DDR2-SDRAM bus interface
⎯ Multi-bank support: Supports multi-bank (four banks) operation
⎯ Number of banks: Supports four or eight banks (however, no more
⎯ Selectable bus width: 32-/16-bit
⎯ Supports preceding precharging and activation
⎯ Burst length: Four (fixed)
⎯ Burst type: Sequential (fixed)
⎯ CAS latency: 2, 3, 4, 5, 6 cycles
• Auto-refresh mode
⎯ An average interval is selectable by a register setting. Preceding
• Self-refresh mode
• Connectable memory capacity: Up to 1 Gbyte
⎯ With a 32-bit bus width
16 M x 16 bits (256 Mbits) x 2, 32 M x 16 bits (512 Mbits) x 2, 64 M x
⎯ With a 16-bit bus width
16 M x 16 bits (256 Mbits) x 1, 32 M x 16 bits (512 Mbits) x 1, 64 M x
• Big or little endian is selectable
1. Overview
than four banks can be opened concurrently)
refresh operations are performed when there are no pending
requests.
16 bits (1 Gbit) x 2, 128 M x 16 bits (2 Gbits) x 2, 32 M x 8 bits (256
Mbits) x 4, 64 M x 8 bits (512 Mbits) x 4, 128 M x 8 bits (1 Gbit) x 4,
256 M x 8 bits (2 Gbits) x 4
16 bits (1 Gbit) x 1, 128 M x 16 bits (2 Gbits) x 1, 32 M x 8 bits (256
Mbits) x 2, 64 M x 8 bits (512 Mbits) x 2, 128 M x 8 bits (1 Gbit) x 2,
256 M x 8 bits (2 Gbits) x 2
Rev.1.00 Jan. 10, 2008 Page 7 of 1658
REJ09B0261-0100
1. Overview
Item Features
PCI bus controller
(PCIC)
• PCI bus controller (supports a subset of revision 2.2)
⎯ 32-bit bus (33 MHz or 66 MHz)
• Operation as PCI master/target
• Operation in PCI host/normal mode
⎯ Built-in bus arbiter (host mode)
• Operates with up to four external bus-master devices
• Mode for operation with an external bus arbiter
• Supports burst transfers
• Supports parity checking and error reports
• Supports four individual external interrupt signals (INTA to INTD) in host
mode
• Supports a single external interrupt signal (INTA) in normal mode
• Up to 512 Mbytes of PCI memory space (32 bit address mode)
• Up to 64 Mbytes of PCI memory space (29 bit address mode)
Direct memory
access controller
(DMAC)
• Number of channels: 12
• 12-channel physical address DMA controller
• Four channels support external requests (channels 0 to 3)
• Address space: 4 Gbytes (Physical address)
• Units of data transfer: 8, 16, or 32 bits; 16 or 32 bytes
• Address modes:
⎯ Dual address mode
• Transfer requests: External request, on-chip peripheral module request,
or auto-request
• Choice of DACK or DRAK (four external pins)
• Bus modes: Cycle-stealing or burst mode
• Priority: Select either fixed mode or round-robin mode
Clock pulse
generator (CPG)
• CPU frequency: Up to 600 MHz
• Local bus frequency: Up to 100 MHz
• DDR2-SDRAM interface frequency: Up to 300 MHz
• On-chip peripheral bus frequency: Up to 50 MHz
• Power-down modes
⎯ Sleep mode
⎯ Module-standby mode
⎯ DDR back-up power function (power is supplied only to the DDR)
Rev.1.00 Jan. 10, 2008 Page 8 of 1658
REJ09B0261-0100
Item Features
Watchdog timer
(WDT)
• Number of channels: One
• Single-channel watchdog timer
(operation in watchdog-timer or interval-timer mode is selectable)
• Selectable reset function: Power-on or manual reset
Timer unit (TMU)
• Number of channels: Six
• 6-channel auto-reloading 32-bit down-counter
• Input-capture function (only on channel 2)
• Choice of a maximum of six input clock signals to drive counting (external
• Motion Compensation processing
⎯ Generation of estimated images using motion vectors in macroblock
⎯ Modes: Forward, reverse, bidirectional, and intra-macroblock
• Dedicated DMAC for image-data transfer
• Embedded RAM for color-palette data
• Embedded RAM for IDCT data
1. Overview
mode (YUV 4:2:0 → ARGB8888)
units (16 x 16 pixels)
processing
Rev.1.00 Jan. 10, 2008 Page 9 of 1658
REJ09B0261-0100
1. Overview
Item Features
Display unit (DU)
• Display plane
⎯ 6 planes (a maximum number at 480 dots x 234 dots)
⎯ 4 planes (a maximum number at 854 dots x 480 dots)
⎯ 3 planes (a maximum number at 800 dots x 600 dots)
• CRT scanning method: Non-interlaced, interlaced, interlaced sync & video
• Data transfer FIFOs
⎯ On-chip 224-byte FIFO for transfer of data to and from flash memory
⎯ On-chip 32-byte FIFO for transfer of control codes
⎯ Flag bit to indicate overruns and underruns during access from the
General purpose
I/O (GPIO)
User break
controller (UBC)
• General purpose I/O port pins: 111
• Some GPIO pins are configurable as interrupts
• Supports user-break interrupts as a facility for debugging
• Two break channels
• Addresses, data values, types of access, and widths of data are all
specifiable as break conditions
• Supports a sequential break function
User debug
interface (H-UDI)
• JTAG interface (TCK, TMS, TRST, TDI, TDO)
• Supports the E10A emulator
• Realtime branch tracing
Package
Power supply
voltage
• 436-pin flip-chip BGA (body: 19 x 19 mm, ball pitch: 0.8-mm)
• I/O (VDDQ), PLL1 (VDDQ-PLL1), PLL2 (VDDQ-PLL2): 3.3 V
CPU or DMA
Rev.1.00 Jan. 10, 2008 Page 12 of 1658
REJ09B0261-0100
1.2 Block Diagram
A block diagram of the SH7785 is given as figure 1.1.
SH-4A
Superscalar CPU
FPU
MMU
32 KB I-cache
32 KB O-cache
8 KB ILRAM
16 KB OLRAM
URAM
128 KB
DDRII-SDRAM
Controller
(DBSC)
DDR2-SDRAM
DDR2-400/600
1 GB max
32 bit/16 bit
300 MHz
DDR bus
1. Overview
Periperal busSuper Hyway
SCIF0/HSPI/FLCTL
SCIF2/MMCIF
HAC/SSI/SIOF
HAC/SSI
TMU, WDT
Peripheral Bus Controller
ROM
NOR Flash
SRAM
PC Card/ATA3
Note: * The PCI bus and the display unit are not available when the local bus width is 64 bits.
The PCI controller and the display unit cannot be used when the local bus width is 64 bits.
64*/32/16
/8 bit
100 MHz
Local bus
INTC
Local Bus
Controller
SRAM, ROM,
PCMCIA
MPX
GDTA
Display Unit
Controller
Controller
PCI bus
Figure 1.1 SH7785 Block Diagram
DMA
PCI
CPG
Debug
32 bit
33/66 MHz
Rev.1.00 Jan. 10, 2008 Page 13 of 1658
REJ09B0261-0100
1. Overview
1.3 Pin Arrangement Table
Table 1.2 Pin Function
No. Pin Name I/O Function No. Pin Name I/O Function
1 MDQ0 IO DDR data 0 28 MDQ27 IO DDR data 27
2 MDQ1 IO DDR data 1 29 MDQ28 IO DDR data 28
3 MDQ2 IO DDR data 2 30 MDQ29 IO DDR data 29
4 MDQ3 IO DDR data 3 31 MDQ30 IO DDR data 30
5 MDQ4 IO DDR data 4 32 MDQ31 IO DDR data 31
6 MDQ5 IO DDR data 5 33 MDM0 O DDR data mask 0
7 MDQ6 IO DDR data 6 34 MDM1 O DDR data mask 1
8 MDQ7 IO DDR data 7 35 MDM2 O DDR data mask 2
9 MDQ8 IO DDR data 8 36 MDM3 O DDR data mask 3
10 MDQ9 IO DDR data 9 37 MDQS0 IO DDR data strobe 0
11 MDQ10 IO DDR data 10 38 MDQS1 IO DDR data strobe 1
12 MDQ11 IO DDR data 11 39 MDQS2 IO DDR data strobe 2
13 MDQ12 IO DDR data 12 40 MDQS3 IO DDR data strobe 3
14 MDQ13 IO DDR data 13 41 MDQS0 IO DDR data strobe 0
(antiphase)
15 MDQ14 IO DDR data 14 42 MDQS1 IO DDR data strobe 1
(antiphase)
16 MDQ15 IO DDR data 15 43 MDQS2 IO DDR data strobe 2
(antiphase)
17 MDQ16 IO DDR data 16 44 MDQS3 IO DDR data strobe 3
(antiphase)
18 MDQ17 IO DDR data 17 45 MA0 O DDR address 0
19 MDQ18 IO DDR data 18 46 MA1 O DDR address 1
20 MDQ19 IO DDR data 19 47 MA2 O DDR address 2
21 MDQ20 IO DDR data 20 48 MA3 O DDR address 3
22 MDQ21 IO DDR data 21 49 MA4 O DDR address 4
23 MDQ22 IO DDR data 22 50 MA5 O DDR address 5
24 MDQ23 IO DDR data 23 51 MA6 O DDR address 6
25 MDQ24 IO DDR data 24 52 MA7 O DDR address 7
26 MDQ25 IO DDR data 25 53 MA8 O DDR address 8
27 MDQ26 IO DDR data 26 54 MA9 O DDR address 9
Rev.1.00 Jan. 10, 2008 Page 14 of 1658
REJ09B0261-0100
1. Overview
No. Pin Name I/O Function No. Pin Name I/O Function
55 MA10 O DDR address 10 87 D12 IO Local bus data 12
56 MA11 O DDR address 11 88 D13 IO Local bus data 13
57 MA12 O DDR address 12 89 D14 IO Local bus data 14
58 MA13 O DDR address 13 90 D15 IO Local bus data 15
59 MA14 O DDR address 14 91 D16 IO Local bus data 16
60 MBA0 O DDR bank address 0 92 D17 IO Local bus data 17
61 MBA1 O DDR bank address 1 93 D18 IO Local bus data 18
62 MBA2 O DDR bank address 2 94 D19 IO Local bus data 19
63 MCK0 O DDR clock 0 95 D20 IO Local bus data 20
64 MCK0O DDR clock 0 (antiphase) 96 D21 IO Local bus data 21
65 MCK1 O DDR clock 1 97 D22 IO Local bus data 22
66 MCK1O DDR clock 1 (antiphase) 98 D23 IO Local bus data 23
67 MCSO DDR chip select 99 D24 IO Local bus data 24
68 MRASO DDR row address select 100 D25 IO Local bus data 25
69 MCASO DDR column address select 101 D26 IO Local bus data 26
70 MWEO DDR write enable 102 D27 IO Local bus data 27
71 MODT O DDR on chip terminator 103 D28 IO Local bus data 28
72 MCKE O DDR clock enable 104 D29 IO Local bus data 29
73 MVREF I DDR reference voltage 105 D30 IO Local bus data 30
74 MBKPRSTI DDR backup reset 106 D31 IO Local bus data 31
75 D0 IO Local bus data 0 107 A0 O Local bus address 0
76 D1 IO Local bus data 1 108 A1 O Local bus address 1
77 D2 IO Local bus data 2 109 A2 O Local bus address 2
78 D3 IO Local bus data 3 110 A3 O Local bus address 3
79 D4 IO Local bus data 4 111 A4 O Local bus address 4
80 D5 IO Local bus data 5 112 A5 O Local bus address 5
81 D6 IO Local bus data 6 113 A6 O Local bus address 6
82 D7 IO Local bus data 7 114 A7 O Local bus address 7
83 D8 IO Local bus data 8 115 A8 O Local bus address 8
84 D9 IO Local bus data 9 116 A9 O Local bus address 9
85 D10 IO Local bus data 10 117 A10 O Local bus address 10
86 D11 IO Local bus data 11 118 A11 O Local bus address 11
Rev.1.00 Jan. 10, 2008 Page 15 of 1658
REJ09B0261-0100
1. Overview
No. Pin Name I/O Function No. Pin Name I/O Function
119 A12 O Local bus address 12 140 RD/FRAMEO/O Read strobe/MPX IF
FRAME
120 A13 O Local bus address 13 141 R/W O Read/Write
121 A14 O Local bus address 14 142 BS O Bus start
122 A15 O Local bus address 15 143 WE0/REG O/O Write enable 0/PCMCIA IF
REG
123 A16 O Local bus address 16 144 WE1 O Write enable 1
124 A17 O Local bus address 17 145 WE2/IORD O/O Write enable 2/PCMCIA IF
IORD
125 A18 O Local bus address 18 146 WE3/IOWR O/O Write enable 3/PCMCIA IF
IOWR
126 A19 O Local bus address 19 147 RDY I Bus ready
127 A20 O Local bus address 20 148 CLKOUT O Clock out
128 A21 O Local bus address 21 149 CLKOUTENB O Clock out enable
129 A22 O Local bus address 22 150 D32/AD0/DR0 IO/IO/O Local bus data 32/PCI
address data 0/Digital red 0
130 A23 O Local bus address 23 151 D33/AD1/DR1 IO/IO/O Local bus data 33/PCI
address data 1/Digital red 1
131 A24 O Local bus address 24 152 D34/AD2/DR2 IO/IO/O Local bus data 34/PCI
address data 2/Digital red 2
132 A25 O Local bus address 25 153 D35/AD3/DR3 IO/IO/O Local bus data 35/PCI
address data 3/Digital red 3
133 CS0O Chip select 0 154 D36/AD4/DR4 IO/IO/O Local bus data 36/PCI
address data 4/Digital red 4
134 CS1O Chip select 1 155 D37/AD5/DR5 IO/IO/O Local bus data 37/PCI
address data 5/Digital red 5
135 CS2O Chip select 2 156 D38/AD6/DG0 IO/IO/O Local bus data 38/PCI
address data 6/Digital green
0
136 CS3O Chip select 3 151 D33/AD1/DR1 IO/IO/O Local bus data 33/PCI
address data 1/Digital red 1
137 CS4O Chip select 4 152 D34/AD2/DR2 IO/IO/O Local bus data 34/PCI
address data 2/Digital red 2
138 CS5O Chip select 5 153 D35/AD3/DR3 IO/IO/O Local bus data 35/PCI
address data 3/Digital red 3
139 CS6O Chip select 6 154 D36/AD4/DR4 IO/IO/O Local bus data 36/PCI
address data 4/Digital red 4
Rev.1.00 Jan. 10, 2008 Page 16 of 1658
REJ09B0261-0100
No. Pin Name I/O Function No. Pin Name I/O Function
155 D37/AD5/DR5 IO/IO/O Local bus data 37/PCI
address data 5/Digital red 5
156 D38/AD6/DG0 IO/IO/O Local bus data 38/PCI
address data 6/Digital green
0
157 D39/AD7/DG1 IO/IO/O Local bus data 39/PCI
address data 7/Digital green
1
158 D40/AD8/DG2 IO/IO/O Local bus data 40/PCI
address data 8/Digital green
2
159 D41/AD9/DG3 IO/IO/O Local bus data 41/PCI
address data 9/Digital green
3
160 D42/AD10/DG4 IO/IO/O Local bus data 42/PCI
address data 10/Digital
green 4
161 D43/AD11/DG5 IO/IO/O Local bus data 43/PCI
address data 11/Digital
green 5
162 D44/AD12/DB0 IO/IO/O Local bus data 44/PCI
address data 12/Digital blue
0
163 D45/AD13/DB1 IO/IO/O Local bus data 45/PCI
address data 13/Digital blue
1
164 D46/AD14/DB2 IO/IO/O Local bus data 46/PCI
address data 14/Digital blue
2
165 D47/AD15/DB3 IO/IO/O Local bus data 47/PCI
address data 15/Digital blue
3
166 D48/AD16/DB4 IO/IO/O Local bus data 48/PCI
address data 16/Digital blue
4
167 D49/AD17/DB5 IO/IO/O Local bus data 49/PCI
address data 17/Digital blue
5
168 D50/AD18 IO/IO Local bus data 50/PCI
address data 18
169 D51/AD19 IO/IO Local bus data 51/PCI
address data 19
170 D52/AD20 IO/IO Local bus data 52/PCI
address data 20
171 D53/AD21 IO/IO Local bus data 53/PCI
address data 21
172 D54/AD22 IO/IO Local bus data 54/PCI
address data 22
173 D55/AD23 IO/IO Local bus data 55/PCI
address data 23
174 D56/AD24 IO/IO Local bus data 56/PCI
address data 24
175 D57/AD25 IO/IO Local bus data 57/PCI
address data 25
176 D58/AD26 IO/IO Local bus data 58/PCI
address data 26
177 D59/AD27 IO/IO Local bus data 59/PCI
address data 27
178 D60/AD28 IO/IO Local bus data 60/PCI
address data 28
179 D61/AD29 IO/IO Local bus data 61/PCI
address data 29
180 D62/AD30 IO/IO Local bus data 62/PCI
address data 30
1. Overview
Rev.1.00 Jan. 10, 2008 Page 17 of 1658
REJ09B0261-0100
1. Overview
No. Pin Name I/O Function No. Pin Name I/O Function
181 D63/AD31 IO/IO Local bus data 63/PCI
address data 31
182 WE4/CBE0 O/IO Write enable 4/PCI
command/byte enable 0
183 WE5/CBE1 O/IO Write enable 5/PCI
command/byte enable 1
184 WE6/CBE2 O/IO Write enable 6/PCI
command/byte enable 2
185 WE7/CBE3 O/IO Write enable 7/PCI
command/byte enable 3
186 PCIFRAME/
VSYNC
187 IRDY/HSYNCIO/IO PCI initiator ready/HSYNC
188 TRDY/DISP IO/O PCI target ready/display
189 IDSEL I PCI configuration device
190 LOCK/ODDF IO/IO PCI lock/even-odd field 208 XTAL O Crystal resonator
191 DEVSEL/
DCLKOUT
192 PAR IO PCI parity 210 NMI I Nonmaskable interrupt
Package: 436-pin FC-BGA, 19 mm x 19 mm, ball pitch: 0.8 mm
12345678910111213141516171819202122
VSS
MCK0
A
VDD-
MCK1
B
DDR
MCK1
VSS
C
VDD-
MVREF
D
DDR
MCS
MA10
E
VSS
MA14
F
MDQ17
MDQ22
G
VDD-
MDQ16
H
DDR
MDQ23
MDQ28
J
VSS
MDQ26
K
MDQ31
L
MDM3
VSS
M
VSS
VSS
N
PRESET
SCIF0_TXD
SCIF0_SCK
/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DG5
D40/AD
8/DG2
D36/AD
4/DR4
D33/AD
1/DR1
D32/AD
0/DR0
CLKOU
T
VSSPLL2
VSSQ-
PLL2
VSSPLL1
VSSA-
PLL1
VSS
12345678910111213141516171819202122
AB
AA
Y
W
V
U
T
R
P
N
M
L
K
J
H
G
F
E
D
C
B
Figure 1.3 SH7785 Pin Arrangement (Bottom View)
Rev.1.00 Jan. 10, 2008 Page 23 of 1658
REJ09B0261-0100
1. Overview
1.5 Physical Memory Address Map
The SH7785 supports 32-bit virtual address space, and supports both 29-bit and 32-bit physical
address spaces. For details of mappings from the virtual address space to the physical address
spaces, see section 7, Memory Management Unit (MMU).
Figure 1.4 shows the relationship between the AREASEL bits and the physical memory address
map. The 32-bit physical address space corresponds with the address space of the SuperHyway
bus.
DBSC11 DB SC11DB SC11D BSC 11DB SC11D BS C11DB SC11
DBSC12 DBSC12DBSC12DB SC12DBSC12DBSC 12DBSC12
DBSC13 DBSC13DBSC13DB SC13DBSC13DBSC 13DBSC13
DBSC14 DBSC14DBSC14DB SC14DBSC14DBSC 14DBSC14
DBSC15 DBSC15DBSC15DB SC15DBSC15DBSC 15DBSC15
29-bit physical
address space
32-bit physical
address space
(extended mode)
Note: Memory Address Map Select Register (MMSELR) Area Select Bit (AREASEL)
For details, refer to section 11.4.1, Memory Address Map Select Register (MMSELR).
Figure 1.4 Relationship between AREASEL Bits and Physical Memory Address Map
Rev.1.00 Jan. 10, 2008 Page 24 of 1658
REJ09B0261-0100
2. Programming Model
Section 2 Programming Model
The programming model of this LSI is explained in this section. This LSI has registers and data
formats as shown below.
2.1 Data Formats
The data formats supported in this LSI are shown in figure 2.1.
07
Byte (8 bits)
Word (16 bits)
Longword (32 bits)
Single-precision floating-point (32 bits)
Double-precision floating-point (64 bits)
Legend:
:Sign field
s
:Exponent field
e
:Fraction field
f
6251
se
Figure 2.1 Data Formats
015
031
031 3022
sef
063
f
Rev.1.00 Jan. 10, 2008 Page 25 of 1658
REJ09B0261-0100
2. Programming Model
2.2 Register Descriptions
2.2.1 Privileged Mode and Banks
(1) Processing Modes
This LSI has two processing modes, user mode and privileged mode. This LSI normally operates
in user mode, and switches to privileged mode when an exception occurs or an interrupt is
accepted. There are four kinds of registers—general registers, system registers, control registers,
and floating-point registers—and the registers that can be accessed differ in the two processing
modes.
(2) General Registers
There are 16 general registers, designated R0 to R15. General registers R0 to R7 are banked
registers which are switched by a processing mode change.
• Privileged mode
In privileged mode, the register bank bit (RB) in the status register (SR) defines which banked
register set is accessed as general registers, and which set is accessed only through the load
control register (LDC) and store control register (STC) instructions.
When the RB bit is 1 (that is, when bank 1 is selected), the 16 registers comprising bank 1
general registers R0_BANK1 to R7_BANK1 and non-banked general registers R8 to R15 can
be accessed as general registers R0 to R15. In this case, the eight registers comprising bank 0
general registers R0_BANK0 to R7_BANK0 are accessed by the LDC/STC instructions.
When the RB bit is 0 (that is, when bank 0 is selected), the 16 registers comprising bank 0
general registers R0_BANK0 to R7_BANK0 and non-banked general registers R8 to R15 can
be accessed as general registers R0 to R15. In this case, the eight registers comprising bank 1
general registers R0_BANK1 to R7_BANK1 are accessed by the LDC/STC instructions.
• User mode
In user mode, the 16 registers comprising bank 0 general registers R0_BANK0 to R7_BANK0
and non-banked general registers R8 to R15 can be accessed as general registers R0 to R15.
The eight registers comprising bank 1 general registers R0_BANK1 to R7_BANK1 cannot be
accessed.
(3) Control Registers
Control registers comprise the global base register (GBR) and status register (SR), which can be
accessed in both processing modes, and the saved status register (SSR), saved program counter
(SPC), vector base register (VBR), saved general register 15 (SGR), and debug base register
Rev.1.00 Jan. 10, 2008 Page 26 of 1658
REJ09B0261-0100
2. Programming Model
(DBR), which can only be accessed in privileged mode. Some bits of the status register (such as
the RB bit) can only be accessed in privileged mode.
(4) System Registers
System registers comprise the multiply-and-accumulate registers (MACH/MACL), the procedure
register (PR), and the program counter (PC). Access to these registers does not depend on the
processing mode.
(5) Floating-Point Registers and System Registers Related to FPU
There are thirty-two floating-point registers, FR0–FR15 and XF0–XF15. FR0–FR15 and XF0–
XF15 can be assigned to either of two banks (FPR0_BANK0–FPR15_BANK0 or FPR0_BANK1–
FPR15_BANK1).
FR0–FR15 can be used as the eight registers DR0/2/4/6/8/10/12/14 (double-precision floatingpoint registers, or pair registers) or the four registers FV0/4/8/12 (register vectors), while XF0–
XF15 can be used as the eight registers XD0/2/4/6/8/10/12/14 (register pairs) or register matrix
XMTRX.
System registers related to the FPU comprise the floating-point communication register (FPUL)
and the floating-point status/control register (FPSCR). These registers are used for communication
between the FPU and the CPU, and the exception handling setting.
Register values after a reset are shown in table 2.1.
Rev.1.00 Jan. 10, 2008 Page 27 of 1658
REJ09B0261-0100
2. Programming Model
Table 2.1 Initial Register Values
Type RegistersInitial Value*
General registers R0_BANK0 to R7_BANK0,
R0_BANK1 to R7_BANK1,
R8 to R15
Control registers
SR MD bit = 1, RB bit = 1, BL bit = 1, FD bit = 0,
(c) Register configuration in
privileged mode (RB = 0)
Notes: 1.
R0 is used as the index register in indexed register-indirect addressing mode and
indexed GBR indirect addressing mode.
Banked registers
2.
Banked registers
3.
Accessed as general registers when the RB bit is set to 1 in SR. Accessed only by
LDC/STC instructions when the RB bit is cleared to 0.
Banked registers
4.
Accessed as general registers when the RB bit is cleared to 0 in SR. Accessed only
by LDC/STC instructions when the RB bit is set to 1.
Figure 2.2 CPU Register Configuration in Each Processing Mode
Rev.1.00 Jan. 10, 2008 Page 29 of 1658
REJ09B0261-0100
2. Programming Model
2.2.2 General Registers
Figure 2.3 shows the relationship between the processing modes and general registers. This LSI
has twenty-four 32-bit general registers (R0_BANK0 to R7_BANK0, R0_BANK1 to
R7_BANK1, and R8 to R15). However, only 16 of these can be accessed as general registers R0
to R15 in one processing mode. This LSI has two processing modes, user mode and privileged
mode.
• R0_BANK0 to R7_BANK0
Allocated to R0 to R7 in user mode (SR.MD = 0)
Allocated to R0 to R7 when SR.RB = 0 in privileged mode (SR.MD = 1).
• R0_BANK1 to R7_BANK1
Cannot be accessed in user mode.
Allocated to R0 to R7 when SR.RB = 1 in privileged mode.
Rev.1.00 Jan. 10, 2008 Page 30 of 1658
REJ09B0261-0100
2. Programming Model
Note on Programming: As the user's R0 to R7 are assigned to R0_BANK0 to R7_BANK0, and
after an exception or interrupt R0 to R7 are assigned to R0_BANK1 to
R7_BANK1, it is not necessary for the interrupt handler to save and
restore the user's R0 to R7 (R0_BANK0 to R7_BANK0).
2.2.3 Floating-Point Registers
Figure 2.4 shows the floating-point register configuration. There are thirty-two 32-bit floatingpoint registers, FPR0_BANK0 to FPR15_BANK0, AND FPR0_BANK1 to FPR15_BANK1,
comprising two banks. These registers are referenced as FR0 to FR15, DR0/2/4/6/8/10/12/14,
FV0/4/8/12, XF0 to XF15, XD0/2/4/6/8/10/12/14, or XMTRX. Reference names of each register
are defined depending on the state of the FR bit in FPSCR (see figure 2.4).
When FPSCR.FR = 0, FR0 to FR15 are assigned to FPR0_BANK0 to FPR15_BANK0;
when FPSCR.FR = 1, FR0 to FR15 are assigned to FPR0_BANK1 to FPR15_BANK1.
3. Double-precision floating-point registers or single-precision floating-point registers, DRi (8
registers): A DR register comprises two FR registers.
Rev.1.00 Jan. 10, 2008 Page 32 of 1658
REJ09B0261-0100
2. Programming Model
2.2.4 Control Registers
(1) Status Register (SR)
BIt:
31302928272625242322212019181716
MDRBBL
Initial value:
Initial value:
Bit Bit Name
31 — 0 R Reserved
30 MD 1 R/W Processing Mode
29 RB 1 R/W Privileged Mode General Register Bank Specification
28 BL 1 R/W Exception/Interrupt Block Bit
0111000000000000
R/W:
RR/WR/WR/WRRRRRRRRRRRR
BIt:
151413121110987654321
FDMQIMASKST
0000000011110000
R/W:
R/WRRRRRR/W R/W R/W R/W R/W R/WRRR/W R/W
Initial
Value R/W Description
For details on reading/writing this bit, see General
Precautions on Handling of Product.
Selects the processing mode.
0: User mode (Some instructions cannot be executed
and some resources cannot be accessed.)
1: Privileged mode
This bit is set to 1 by an exception or interrupt.
Bit
0: R0_BANK0 to R7_BANK0 are accessed as general
registers R0 to R7 and R0_BANK1 to R7_BANK1 can
be accessed using LDC/STC instructions
1: R0_BANK1 to R7_BANK1 are accessed as general
registers R0 to R7 and R0_BANK0–R7_BANK0 can
be accessed using LDC/STC instructions
This bit is set to 1 by an exception or interrupt.
This bit is set to 1 by a reset, a general exception, or an
interrupt.
While this bit is set to 1, an interrupt request is masked.
In this case, this processor enters the reset state when
a general exception other than a user break occurs.
0
Rev.1.00 Jan. 10, 2008 Page 33 of 1658
REJ09B0261-0100
2. Programming Model
Initial
Bit Bit Name
Value R/W Description
27 to 16 — All 0 R Reserved
For details on reading/writing this bit, see General
Precautions on Handling of Product.
15 FD 0 R/W FPU Disable Bit
When this bit is set to 1 and an FPU instruction is not in
a delay slot, a general FPU disable exception occurs.
When this bit is set to 1 and an FPU instruction is in a
delay slot, a slot FPU disable exception occurs. (FPU
instructions: H'F*** instructions and LDS (.L)/STS(.L)
instructions using FPUL/FPSCR)
14 to 10 — All 0 R Reserved
For details on reading/writing this bit, see General
Precautions on Handling of Product.
9 M 0 R/W M Bit
Used by the DIV0S, DIV0U, and DIV1 instructions.
8 Q 0 R/W Q Bit
Used by the DIV0S, DIV0U, and DIV1 instructions.
7 to 4 IMASK 1111 R/W Interrupt Mask Level Bits
An interrupt whose priority is equal to or less than the
value of the IMASK bits is masked. It can be chosen by
CPU operation mode register (CPUOPM) whether the
level of IMASK is changed to accept an interrupt or not
when an interrupt is occurred. For details, see appendix
A, CPU Operation Mode Register (CPUOPM).
3, 2 — All 0 R Reserved
For details on reading/writing this bit, see General
Precautions on Handling of Product.
1 S 0 R/W S Bit
Used by the MAC instruction.
0 T 0 R/W T Bit
Indicates true/false condition, carry/borrow, or
overflow/underflow.
For details, see section 3, Instruction Set.
Rev.1.00 Jan. 10, 2008 Page 34 of 1658
REJ09B0261-0100
2. Programming Model
(2) Saved Status Register (SSR) (32 bits, Privileged Mode, Initial Value = Undefined)
The contents of SR are saved to SSR in the event of an exception or interrupt.
(3) Saved Program Counter (SPC) (32 bits, Privileged Mode, Initial Value = Undefined)
The address of an instruction at which an interrupt or exception occurs is saved to SPC.
(4) Global Base Register (GBR) (32 bits, Initial Value = Undefined)
GBR is referenced as the base address of addressing @(disp,GBR) and @(R0,GBR).
(5) Vector Base Register (VBR) (32 bits, Privileged Mode, Initial Value = H'00000000)
VBR is referenced as the branch destination base address in the event of an exception or interrupt.
For details, see section 5, Exception Handling.
(6) Saved General Register 15 (SGR) (32 bits, Privileged Mode, Initial Value = Undefined)
The contents of R15 are saved to SGR in the event of an exception or interrupt.
(7) Debug Base Register (DBR) (32 bits, Privileged Mode, Initial Value = Undefined)
When the user break debugging function is enabled (CBCR.UBDE = 1), DBR is referenced as the
branch destination address of the user break handler instead of VBR.
2.2.5 System Registers
(1) Multiply-and-Accumulate Registers (MACH and MACL) (32 bits, Initial Value =
Undefined)
MACH and MACL are used for the added value in a MAC instruction, and to store the operation
result of a MAC or MUL instruction.
(2) Procedure Register (PR) (32 bits, Initial Value = Undefined)
The return address is stored in PR in a subroutine call using a BSR, BSRF, or JSR instruction. PR
is referenced by the subroutine return instruction (RTS).
(3) Program Counter (PC) (32 bits, Initial Value = H'A0000000)
PC indicates the address of the instruction currently being executed.
For details on reading/writing this bit, see General
Precautions on Handling of Product.
21 FR 0 R/W Floating-Point Register Bank
0: FPR0_BANK0 to FPR15_BANK0 are assigned to
FR0 to FR15 and FPR0_BANK1 to FPR15_BANK1
are assigned to XF0 to XF15
1: FPR0_BANK0 to FPR15_BANK0 are assigned to
XF0 to XF15 and FPR0_BANK1 to FPR15_BANK1
are assigned to FR0 to FR15
20 SZ 0 R/W Transfer Size Mode
0: Data size of FMOV instruction is 32-bits
1: Data size of FMOV instruction is a 32-bit register
pair (64 bits)
For relationship between the SZ bit, PR bit, and endian,
see figure 2.5.
19 PR 0 R/W Precision Mode
0: Floating-point instructions are executed as
single-precision operations
1: Floating-point instructions are executed as
double-precision operations (graphics support
instructions are undefined)
For relationship between the SZ bit, PR bit, and endian,
see figure 2.5
18 DN 1 R/W Denormalization Mode
0: Denormalized number is treated as such
1: Denormalized number is treated as zero
FRSZPRDN
Cause
R/W
0
FlagRM
Rev.1.00 Jan. 10, 2008 Page 36 of 1658
REJ09B0261-0100
Initial
Bit Bit Name
17 to 12 Cause 000000 R/W
11 to 7 Enable (EN) 00000 R/W
6 to 2 Flag 00000 R/W
Value R/W Description
FPU Exception Cause Field
FPU Exception Enable Field
FPU Exception Flag Field
Each time an FPU operation instruction is executed, the
FPU exception cause field is cleared to 0. When an
FPU exception occurs, the bits corresponding to FPU
exception cause field and flag field are set to 1. The
FPU exception flag field remains set to 1 until it is
cleared to 0 by software.
For bit allocations of each field, see table 2.2.
1, 0 RM 01 R/W Rounding Mode
These bits select the rounding mode.
00: Round to Nearest
01: Round to Zero
10: Reserved
11: Reserved
2. Programming Model
Rev.1.00 Jan. 10, 2008 Page 37 of 1658
REJ09B0261-0100
2. Programming Model
<Big endian>
Floating-point register
630
DR (2i)
630
FR (2i)FR (2i+1)
Memory area
<Little endian>
Floating-point register
Memory area
63 32 31 0
8n+4 8n+78n8n+3
630630
DR (2i)
630
FR (2i)FR (2i+1)
63 32
4n4m4n+34m+3
(1) SZ = 0(2) SZ = 1, PR = 0
Notes: 1. In the case of SZ = 0 and PR = 0, DR register can not be used.
2. The bit-location of DR register is used for double precision format when PR = 1.
(In the case of (2), it is used when PR is changed from 0 to 1.)
1, *2
*
31 0
DR (2i)
630
FR (2i+1)FR (2i)
63 32 31 0
630
2
*
630
63 32
8n+48n+78n+38n
DR (2i)
FR (2i+1)FR (2i)
31 0
8n8n+38n+78n+4
(3) SZ = 1, PR = 1
Figure 2.5 Relationship between SZ bit and Endian
Table 2.2 Bit Allocation for FPU Exception Handling
Field Name
Cause FPU exception
cause field
Enable FPU exception
enable field
Flag FPU exception flag
field
FPU
Error (E)
Bit 17 Bit 16 Bit 15 Bit 14 Bit 13 Bit 12
None Bit 11 Bit 10 Bit 9 Bit 8 Bit 7
None Bit 6 Bit 5 Bit 4 Bit 3 Bit 2
Invalid
Operation (V)
Division
by Zero (Z)
Overflow
(O)
Underflow
(U)
Inexact
(I)
(5) Floating-Point Communication Register (FPUL) (32 bits, Initial Value = Undefined)
Information is transferred between the FPU and CPU via FPUL.
Rev.1.00 Jan. 10, 2008 Page 38 of 1658
REJ09B0261-0100
2. Programming Model
2.3 Memory-Mapped Registers
Some control registers are mapped to the following memory areas. Each of the mapped registers
has two addresses.
H'1C00 0000 to H'1FFF FFFF
H'FC00 0000 to H'FFFF FFFF
These two areas are used as follows.
• H'1C00 0000 to H'1FFF FFFF
This area must be accessed using the address translation function of the MMU.
Setting the page number of this area to the corresponding field of the TLB enables access to a
memory-mapped register.
The operation of an access to this area without using the address translation function of the
MMU is not guaranteed.
• H'FC00 0000 to H'FFFF FFFF
Access to area H'FC00 0000 to H'FFFF FFFF in user mode will cause an address error.
Memory-mapped registers can be referenced in user mode by means of access that involves
address translation.
Note: Do not access addresses to which registers are not mapped in either area. The operation of
an access to an address with no register mapped is undefined. Also, memory-mapped
registers must be accessed using a fixed data size. The operation of an access using an
invalid data size is undefined.
Rev.1.00 Jan. 10, 2008 Page 39 of 1658
REJ09B0261-0100
2. Programming Model
2.4 Data Formats in Registers
Register operands are always longwords (32 bits). When a memory operand is only a byte (8 bits)
or a word (16 bits), it is sign-extended into a longword when loaded into a register.
0
67
S
31
SS
1415
S
31
SS
067
0
01415
Figure 2.6 Formats of Byte Data and Word Data in Register
2.5 Data Formats in Memory
Memory data formats are classified into bytes, words, and longwords. Memory can be accessed in
an 8-bit byte, 16-bit word, or 32-bit longword form. A memory operand less than 32 bits in length
is sign-extended before being loaded into a register.
A word operand must be accessed starting from a word boundary (even address of a 2-byte unit:
address 2n), and a longword operand starting from a longword boundary (even address of a 4-byte
unit: address 4n). An address error will result if this rule is not observed. A byte operand can be
accessed from any address.
Big endian or little endian byte order can be selected for the data format. The endian should be set
with the external pin after a power-on reset. The endian cannot be changed dynamically. Bit
positions are numbered left to right from most-significant to least-significant. Thus, in a 32-bit
longword, the leftmost bit, bit 31, is the most significant bit and the rightmost bit, bit 0, is the least
significant bit.
The data format in memory is shown in figure 2.7.
Rev.1.00 Jan. 10, 2008 Page 40 of 1658
REJ09B0261-0100
2. Programming Model
Address A
Address A + 4
Address A + 8
A + 1 A + 2 A + 3
A
31
231570
70707070
Byte 0
Byte 1 Byte 2
150 150
Word 0
310
Longword
Big endianLittle endian
Byte 3
Word 1
A + 10 A + 9 A + 8
A + 11
31
231570
70707070
Byte 3
Byte 2 Byte 1 Byte 0
150
Word 1
310
150
Longword
Word 0
Address A + 8
Address A + 4
Address A
Figure 2.7 Data Formats in Memory
For the 64-bit data format, see figure 2.5.
2.6 Processing States
This LSI has major three processing states: the reset state, instruction execution state, and powerdown state.
(1) Reset State
In this state the CPU is reset. The reset state is divided into the power-on reset state and the
manual reset.
In the power-on reset state, the internal state of the CPU and the on-chip peripheral module
registers are initialized. In the manual reset state, the internal state of the CPU and some registers
of on-chip peripheral modules are initialized. For details, see register descriptions for each section.
(2) Instruction Execution State
In this state, the CPU executes program instructions in sequence. The Instruction execution state
has the normal program execution state and the exception handling state.
(3) Power-Down State
In a power-down state, CPU halts operation and power consumption is reduced. The power-down
state is entered by executing a SLEEP instruction. There are two modes in the power-down state:
sleep mode and standby mode. For details, see section 17, Power-Down mode.
Rev.1.00 Jan. 10, 2008 Page 41 of 1658
REJ09B0261-0100
2. Programming Model
From any state
when reset/manual
reset input
Reset/manual
reset clearance
Instruction execution state
Figure 2.8 Processing State Transitions
Reset state
Reset/manual
reset input
Sleep instruction execution
Interrupt occurence
Reset/manual
reset input
Power-down state
Rev.1.00 Jan. 10, 2008 Page 42 of 1658
REJ09B0261-0100
2. Programming Model
2.7 Usage Notes
2.7.1 Notes on Self-Modifying Code
To accelerate the processing speed, the instruction prefetching capability of this LSI has been
significantly enhanced from that of the SH-4. Therefore, in the case when a code in memory is
rewritten and attempted to be executed immediately, there is increased possibility that the code
before being modified, which has already been prefetched, is executed.
To ensure execution of the modified code, one of the following sequence of instructions should be
executed between the code rewriting instruction and execution of the modified code.
(1) When the Codes to be Modified are in Non-Cacheable Area
SYNCO
ICBI @Rn
The target for the ICBI instruction can be any address within the range where no address error
exception occurs.
(2) When the Codes to be Modified are in Cacheable Area (Write-Through)
SYNCO
ICBI @Rn
All instruction cache areas corresponding to the modified codes should be invalidated by the ICBI
instruction. The ICBI instruction should be issued to each cache line. One cache line is 32 bytes.
(3) When the Codes to be Modified are in Cacheable Area (Copy-Back)
OCBP @Rm or OCBWB @Rm
SYNCO
ICBI @Rn
All operand cache areas corresponding to the modified codes should be written back to the main
memory by the OCBP or OCBWB instruction. Then all instruction cache areas corresponding to
the modified codes should be invalidated by the ICBI instruction. The OCBP, OCBWB, and ICBI
instruction should be issued to each cache line. One cache line is 32 bytes.
Note: Self-modifying code is the processing which executes instructions while dynamically
rewriting the codes in memory.
Rev.1.00 Jan. 10, 2008 Page 43 of 1658
REJ09B0261-0100
2. Programming Model
Rev.1.00 Jan. 10, 2008 Page 44 of 1658
REJ09B0261-0100
3. Instruction Set
Section 3 Instruction Set
This LSI's instruction set is implemented with 16-bit fixed-length instructions. This LSI can use
byte (8-bit), word (16-bit), longword (32-bit), and quadword (64-bit) data sizes for memory
access. Single-precision floating-point data (32 bits) can be moved to and from memory using
longword or quadword size. Double-precision floating-point data (64 bits) can be moved to and
from memory using longword size. When this LSI moves byte-size or word-size data from
memory to a register, the data is sign-extended.
3.1 Execution Environment
(1) PC
At the start of instruction execution, the PC indicates the address of the instruction itself.
(2) Load-Store Architecture
This LSI has a load-store architecture in which operations are basically executed using registers.
Except for bit-manipulation operations such as logical AND that are executed directly in memory,
operands in an operation that requires memory access are loaded into registers and the operation is
executed between the registers.
(3) Delayed Branches
Except for the two branch instructions BF and BT, this LSI's branch instructions and RTE are
delayed branches. In a delayed branch, the instruction following the branch is executed before the
branch destination instruction.
(4) Delay Slot
This execution slot following a delayed branch is called a delay slot. For example, the BRA
execution sequence is as follows:
Rev.1.00 Jan. 10, 2008 Page 45 of 1658
REJ09B0261-0100
3. Instruction Set
Table 3.1 Execution Order of Delayed Branch Instructions
Instructions Execution Order
BRA TARGET (Delayed branch instruction) BRA
ADD (Delay slot) ↓
: ADD
: ↓
A slot illegal instruction exception may occur when a specific instruction is executed in a delay
slot. For details, see section 5, Exception Handling. The instruction following BF/S or BT/S for
which the branch is not taken is also a delay slot instruction.
(5) T Bit
The T bit in SR is used to show the result of a compare operation, and is referenced by a
conditional branch instruction. An example of the use of a conditional branch instruction is shown
below.
ADD #1, R0 ; T bit is not changed by ADD operation
CMP/EQ R1, R0 ; If R0 = R1, T bit is set to 1
BT TARGET ; Branches to TARGET if T bit = 1 (R0 = R1)
In an RTE delay slot, the SR bits are referenced as follows. In instruction access, the MD bit is
used before modification, and in data access, the MD bit is accessed after modification. The other
bits—S, T, M, Q, FD, BL, and RB—after modification are used for delay slot instruction
execution. The STC and STC.L SR instructions access all SR bits after modification.
(6) Constant Values
An 8-bit constant value can be specified by the instruction code and an immediate value. 16-bit
and 32-bit constant values can be defined as literal constant values in memory, and can be
referenced by a PC-relative load instruction.
MOV.W @(disp, PC), Rn
MOV.L @(disp, PC), Rn
There are no PC-relative load instructions for floating-point operations. However, it is possible to
set 0.0 or 1.0 by using the FLDI0 or FLDI1 instruction on a single-precision floating-point
register.
Rev.1.00 Jan. 10, 2008 Page 46 of 1658
REJ09B0261-0100
3. Instruction Set
3.2 Addressing Modes
Addressing modes and effective address calculation methods are shown in table 3.2. When a
location in virtual memory space is accessed (AT in MMUCR = 1), the effective address is
translated into a physical memory address. If multiple virtual memory space systems are selected
(SV in MMUCR = 0), the least significant bit of PTEH is also referenced as the access ASID. For
details, see section 7, Memory Management Unit (MMU).
Table 3.2 Addressing Modes and Effective Addresses
Addressing
Mode
Register
direct
Register
indirect
Register
indirect
with postincrement
Instruction
Format Effective Address Calculation Method
Rn Effective address is register Rn.
(Operand is register Rn contents.)
@Rn Effective address is register Rn contents.
RnRn
@Rn+ Effective address is register Rn contents.
A constant is added to Rn after instruction
execution: 1 for a byte operand, 2 for a word
operand, 4 for a longword operand, 8 for a
quadword operand.
RnRn
Rn + 1/2/4
1/2/4
+
Calculation
Formula
—
Rn → EA
(EA: effective
address)
Rn → EA
After instruction
execution
Byte:
Rn + 1 → Rn
Word:
Rn + 2 → Rn
Longword:
Rn + 4 → Rn
Quadword:
Rn + 8 → Rn
Rev.1.00 Jan. 10, 2008 Page 47 of 1658
REJ09B0261-0100
3. Instruction Set
Addressing
Mode
Register
indirect
with predecrement
Register
indirect with
displacement
Instruction
Format Effective Address Calculation Method
@–Rn Effective address is register Rn contents,
decremented by a constant beforehand:
1 for a byte operand, 2 for a word operand,
4 for a longword operand, 8 for a quadword
operand.
Rn
Rn – 1/2/4
–
Rn – 1/2/4/8
1/2/4
@(disp:4, Rn) Effective address is register Rn contents with
4-bit displacement disp added. After disp is
zero-extended, it is multiplied by 1 (byte), 2
(word), or 4 (longword), according to the operand
size.
Rn
disp
+
Rn + disp × 1/2/4
(zero-extended)
×
Calculation
Formula
Byte:
Rn – 1 → Rn
Word:
Rn – 2 → Rn
Longword:
Rn – 4 → Rn
Quadword:
Rn – 8 → Rn
Rn → EA
(Instruction
executed
with Rn after
calculation)
Byte: Rn + disp
→ EA
Word: Rn + disp
× 2 → EA
Longword:
Rn + disp × 4 →
EA
Indexed
register
@(R0, Rn) Effective address is sum of register Rn and R0
contents.
indirect
Rev.1.00 Jan. 10, 2008 Page 48 of 1658
REJ09B0261-0100
1/2/4
Rn
R0
Rn + R0 → EA
+
Rn + R0
3. Instruction Set
Addressing
Mode
GBR indirect
with displacement
Indexed GBR
indirect
PC-relative
with
displacement
Instruction
Format Effective Address Calculation Method
@(disp:8,
GBR)
Effective address is register GBR contents with
8-bit displacement disp added. After disp is
zero-extended, it is multiplied by 1 (byte), 2 (word),
or 4 (longword), according to the operand size.
GBR
disp
(zero-extended)
+
GBR
+ disp × 1/2/4
×
1/2/4
@(R0, GBR) Effective address is sum of register GBR and R0
contents.
GBR
+
R0
GBR + R0
@(disp:8, PC) Effective address is PC + 4 with 8-bit displacement
disp added. After disp is zero-extended, it is
multiplied by 2 (word), or 4 (longword), according
to the operand size. With a longword operand,
the lower 2 bits of PC are masked.
PC
*
&
Calculation
Formula
Byte: GBR +
disp → EA
Word: GBR +
disp × 2 → EA
Longword:
GBR + disp ×
4 → EA
GBR + R0 →
EA
Word: PC + 4
+ disp × 2 →
EA
Longword:
PC & H'FFFF
FFFC + 4 +
disp × 4 → EA
H'FFFF FFFC
4
disp
(zero-extended)
2/4
+
PC + 4 + disp
× 2
+
×
*
With longword operand
or PC &
H'FFFF FFFC
+ 4 + disp × 4
Rev.1.00 Jan. 10, 2008 Page 49 of 1658
REJ09B0261-0100
3. Instruction Set
Addressing
Mode
Instruction
Format Effective Address Calculation Method
PC-relative disp:8 Effective address is PC + 4 with 8-bit displacement
disp added after being sign-extended and
multiplied by 2.
PC
+
4
+
PC + 4 + disp × 2
disp
(sign-extended)
×
2
PC-relative disp:12 Effective address is PC + 4 with 12-bit displacement
disp added after being sign-extended and
multiplied by 2.
PC
+
4
+
PC + 4 + disp × 2
disp
(sign-extended)
×
Calculation
Formula
PC + 4 + disp
× 2 → BranchTarget
PC + 4 + disp
× 2 → BranchTarget
2
Rn Effective address is sum of PC + 4 and Rn.
PC
+
4
+
PC + 4 + Rn
Rn
Rev.1.00 Jan. 10, 2008 Page 50 of 1658
REJ09B0261-0100
PC + 4 + Rn →
Branch-Target
3. Instruction Set
Addressing
Mode
Immediate #imm:8 8-bit immediate data imm of TST, AND, OR, or XOR
Instruction
Format Effective Address Calculation Method
Calculation
Formula
—
instruction is zero-extended.
#imm:8 8-bit immediate data imm of MOV, ADD, or CMP/EQ
—
instruction is sign-extended.
#imm:8 8-bit immediate data imm of TRAPA instruction is
—
zero-extended and multiplied by 4.
Note: For the addressing modes below that use a displacement (disp), the assembler descriptions
in this manual show the value before scaling (×1, ×2, or ×4) is performed according to the
operand size. This is done to clarify the operation of the LSI. Refer to the relevant
assembler notation rules for the actual assembler descriptions.
@ (disp:4, Rn) ; Register indirect with displacement
@ (disp:8, GBR) ; GBR indirect with displacement
@ (disp:8, PC) ; PC-relative with displacement
disp:8, disp:12 ; PC-relative
Rev.1.00 Jan. 10, 2008 Page 51 of 1658
REJ09B0261-0100
3. Instruction Set
3.3 Instruction Set
Table 3.3 shows the notation used in the SH instruction lists shown in tables 3.4 to 3.13.
Table 3.3 Notation Used in Instruction List
Item Format Description
Instruction
mnemonic
Operation
notation
Instruction code MSB ↔ LSB mmmm: Register number (Rm, FRm)
Instruction OperationInstruction CodePrivilegedT Bit New
FMOV DRm,XDn DRm → XDn
FMOV XDm,DRn XDm → DRn
FMOV XDm,XDn XDm → XDn
FMOV @Rm,XDn (Rm) → XDn
FMOV @Rm+,XDn (Rm) → XDn, Rm + 8 → Rm
FMOV @(R0,Rm),XDn (R0 + Rm) → XDn
FMOV XDm,@Rn XDm → (Rn)
FMOV XDm,@-Rn Rn – 8 → Rn, XDm → (Rn)
FMOV XDm,@(R0,Rn) XDm → (R0 + Rn)
FIPR FVm,FVn inner_product (FVm, FVn) →
FR[n+3]
FTRV XMTRX,FVn transform_vector (XMTRX,
FVn) → FVn
FRCHG ~FPSCR.FR → FPSCR.FR
FSCHG ~FPSCR.SZ → FPSCR.SZ
FPCHG ~FPSCR.PR → FPSCR.PR
FSRRA FRn 1/sqrt(FRn) → FRn
FSCA FPUL,DRn sin(FPUL) → FRn*
cos(FPUL) → FR[n + 1]
Note: * sqrt(FRn) is the square root of FRn.
1111nnn1mmm01100
1111nnn0mmm11100
1111nnn1mmm11100
1111nnn1mmmm1000
1111nnn1mmmm1001
1111nnn1mmmm0110
1111nnnnmmm11010
1111nnnnmmm11011
1111nnnnmmm10111
1111nnmm11101101
1111nn0111111101
1111101111111101
1111001111111101
1111011111111101
1111nnnn01111101
1111nnn011111101
— — —
— — —
— — —
— — —
— — —
— — —
— — —
— — —
— — —
— — —
— — —
— — —
— — —
⎯ ⎯ New
⎯ ⎯ New
⎯ ⎯ New
Rev.1.00 Jan. 10, 2008 Page 64 of 1658
REJ09B0261-0100
4. Pipelining
Section 4 Pipelining
This LSI is a 2-ILP (instruction-level-parallelism) superscalar pipelining microprocessor.
Instruction execution is pipelined, and two instructions can be executed in parallel.
4.1 Pipelines
Figure 4.1 shows the basic pipelines. Normally, a pipeline consists of eight stages: instruction
fetch (I1/I2/I3), decode and register read (ID), execution (E1/E2/E3), and write-back (WB). An
instruction is executed as a combination of basic pipelines.