The revision list can be viewed directly by
clicking the title page.
The revision list summarizes the locations of
revisions and additions. Details should always
be checked by referring to the relevant text.
SH7706 Group
32
Hardware Manual
Renesas 32-Bit RISC Microcomputer
SuperH™ RISC engine Family/SH7700 Series
SH7706HD6417706F
HD6417706BP
Rev. 5.00
Revision Date: May 29, 2006
Page 2
Keep safety first in your circuit designs!
1. Renesas Technology Corp. puts the maximum effort into making semiconductor products better and
more reliable, but there is always the possibility that trouble may occur with them. Trouble with
semiconductors may lead to personal injury, fire or property damage.
Remember to give due consideration to safety when making your circuit designs, with appropriate
measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of nonflammable material or
(iii) prevention against any malfunction or mishap.
Notes regarding these materials
1. These materials are intended as a reference to assist our customers in the selection of the Renesas
Technology Corp. product best suited to the customer's application; they do not convey any license
under any intellectual property rights, or any other rights, belonging to Renesas Technology Corp. or
a third party.
2. Renesas Technology Corp. assumes no responsibility for any damage, or infringement of any thirdparty's rights, originating in the use of any product data, diagrams, charts, programs, algorithms, or
circuit application examples contained in these materials.
3. All information contained in these materials, including product data, diagrams, charts, programs and
algorithms represents information on products at the time of publication of these materials, and are
subject to change by Renesas Technology Corp. without notice due to product improvements or
other reasons. It is therefore recommended that customers contact Renesas Technology Corp. or
an authorized Renesas Technology Corp. product distributor for the latest product information
before purchasing a product listed herein.
The information described here may contain technical inaccuracies or typographical errors.
Renesas Technology Corp. assumes no responsibility for any damage, liability, or other loss rising
from these inaccuracies or errors.
Please also pay attention to information published by Renesas Technology Corp. by various means,
including the Renesas Technology Corp. Semiconductor home page (http://www.renesas.com).
4. When using any or all of the information contained in these materials, including product data,
diagrams, charts, programs, and algorithms, please be sure to evaluate all information as a total
system before making a final decision on the applicability of the information and products. Renesas
Technology Corp. assumes no responsibility for any damage, liability or other loss resulting from the
information contained herein.
5. Renesas Technology Corp. semiconductors are not designed or manufactured for use in a device or
system that is used under circumstances in which human life is potentially at stake. Please contact
Renesas Technology Corp. or an authorized Renesas Technology Corp. product distributor when
considering the use of a product contained herein for any specific purposes, such as apparatus or
systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use.
6. The prior written approval of Renesas Technology Corp. is necessary to reprint or reproduce in
whole or in part these materials.
7. If these products or technologies are subject to the Japanese export control restrictions, they must
be exported under a license from the Japanese government and cannot be imported into a country
other than the approved destination.
Any diversion or reexport contrary to the export control laws and regulations of Japan and/or the
country of destination is prohibited.
8. Please contact Renesas Technology Corp. for further details on these materials or the products
contained therein.
Rev. 5.00 May 29, 2006 page ii of xlviii
Page 3
General Precautions on Handling of Product
1. Treatment of NC Pins
Note: Do not connect anything to the NC pins.
The NC (not connected) pins are either not connected to any of the internal circuitry or are
they are used as test pins or to reduce noise. If something is connected to the NC pins, the
operation of the LSI is not guaranteed.
2. Treatment of Unused Input Pins
Note: Fix all unused input pins to high or low level.
Generally, the input pins of CMOS products are high-impedance input pins. If unused pins
are in their open states, intermediate levels are induced by noise in the vicinity, a passthrough current flows internally, and a malfunction m ay occur.
3. Processing before Initializatio n
Note: When power is first supplied, the product’s state is undefined.
The states of internal circuits are undefined until full power is supplied throughout the
chip and a low level is input on the reset pin. During the period where the states are
undefined, the register settings and the output state of each pin are also undefined. Design
your system so that it does not malfunction because of processing while it is in this
undefined state. For those products which have a reset function, reset the LSI immediately
after the power supply has been turned on.
4. Prohibition of Access to Undefined or Reserved Addresses
Note: Access to undefined or reserved addresses is prohibited.
The undefined or reserved addresses may be used to expand functions, or test registers
may have been be allocated to these addresses. Do not access these registers; the system’s
operation is not guaranteed if they are accessed.
Rev. 5.00 May 29, 2006 page iii of xlviii
Page 4
Configuration of This Manual
This manual comprises the following items:
1. General Precautions on Handling of Product
2. Configuration of This Manual
3. Preface
4. Main Revisions for This Edition
The list of revisions is a summary of points that have been revised or added to earlier versions.
This does not include all of the revised contents. For details, see th e actual locations in this
manual.
5. Contents
6. Overview
7. Description of Functional Modules
CPU and System-Control Modules
On-Chip Peripheral Modules
The configuration of the functional description of each module differs according to the
module. However, the generic style includes the following items:
When designing an application system that includes this LSI, take notes into account. Each section
includes notes in relation to the descriptions given, and usage notes are given, as required, as the
final part of each section.
8. List of Registers
9. Electrical Characteristics
10.Appendix
11.Index
Rev. 5.00 May 29, 2006 page iv of xlviii
Page 5
Preface
The SH7706 RISC (Reduced Instruction Set Computer) microcomputer includes a Renesas
Technology original RISC CPU as its core, and the 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 function s and electrical
characteristics of this LSI to the above users.
Refer to the SH-3/SH-3E/SH3-DSP Progr a mming Manual for a detailed description
of the instruction set.
Notes on reading this manual:
• Product names
The following products are covered in this manual.
Product Classifications and Abbreviations
Basic ClassificationProduct Code
• In order to understand the overall functions of the chip
Read the manual according to the contents. This manual can be roughly categorized into parts
on the CPU, system control functions, peripheral functions and electrical characteristics.
• In order to understand the details of the CPU’s functions
Read the SH-3/SH-3E/SH3-DSP Programming Manual.
Rules:Register name:The following notation is used for cases when the same or a
similar function, e.g. serial communication, is implemented
on more than one channel:
XXX_N (XXX is the register name and N is the channel
number)
Bit order:The MSB (most significant bit) is on the left and the LSB
(least significant bit) is on the right.
Number notation: Binary is B'xxxx, hexadecimal is H'xxxx, decimal is xxxx.
Signal notation:An overbar is added to a low-active signal: xxxx
Rev. 5.00 May 29, 2006 page v of xlviii
Page 6
Related Manuals:The latest versions of all related manuals are available from our web site.
Please ensure you have the latest versions of all documents you require.
http://www.renesas.com/eng/
SH Series C/C++ Compiler, Assembler, Optimizing Linkage Editor User’s
Manual
SH Series Simulator/Debugger (for Windows) User’s ManualADE-702-186
SH Series Simulator/Debugger (for UNIX) User’s ManualADE-702-203
High-performance Embedded Workshop User’s ManualADE-702-201
SH Series High-performance Embedded Workshop,
High-performance Debugging Interface Tutorial
ADE-702-246
ADE-702-230
Rev. 5.00 May 29, 2006 page vi of xlviii
Page 7
Abbreviations
ACIAAsynchronous Communication Interface Adapter
ADCAnalog to Digital Converter
AUDAdvanced User Debugger
BSCBus State Controller
CPGClock Pulse Generator
CMTCompare Match Timer
DACDigital to Analog Converter
DMADirect Memory Access
DMACDirect Memory Access Controller
DRAMDynamic Random Access Memory
ETUElementary Time Unit
FIFOFirst-In First-Out
H-UDIUser Debugging Interface
INTCInterrupt Controller
JEIDAJapan Electronic Industry Development Association
JTAGJoint Test Action Group
LRULeast Recently Used
LSBL east Significant Bit
MMUMemory Management Unit
MSBMost Significant Bit
PCMCIAPersonal Computer Memory Card International Association
PFCPin Function Controller
PLLPhase Locked Loop
RISCReduced Instruction Set Computer
ROMRead Only Memory
RTCRealtime Clock
SCISerial Communication Interface
SCIFSerial Communication Interface with FIFO
SRAMStatic Random Access Memory
TLBTranslation Lookaside Buffer
TMUTimer Unit
UARTUniversal Asynchronous Receiver/Transmitter
UBCUser Break Controller
WDTWatchdog Timer
Number of Pins
FP-176C TBP-208A Pin NameI/ODescription
109K15AUDATA[0]/PTF[0]I/OAUD data / input/output port F
110K16AUDATA[1]/PTF[1]I/OAUD data / input port F
111K17AUDATA[2]/PTF[2]I/OAUD data / input/output port F
AV
CC
AV
SS
167
168
169
170
171
172
173
174
175
176
INDEX MARK
3.4.4 Avoiding
Synonym Problems
Figure 3.9 Synonym
Problem
69Figure amended
When using a 4-kbyte page
Virtual address
31
VPN
Physical address
31
PPN
When using a 1-kbyte page
Virtual address
31
Physical address
31
VPN
PPN
12 11
12 11
0
Offset
Virtual address (11 to 4)
0
Offset
Physical address (31 to 10)
9
9
010
Offset
Virtual address (11 to 4)
010
Offset
Physical address (31 to 10)
Rev. 5.00 May 29, 2006 page ix of xlviii
Page 10
ItemPageRevision (See Manual for Details)
6.3.2 IRQ Interrupt116Description amended
When using edge-sensing for IRQ interrupts, clear the interrupt
source by having software read 1 from the corresponding bit in
IRR0, then write 0 to the bit.
It is not necessary to clear the bit
to 0 when using level-sensing. Instead, the pin corresponding to
the interrupt request must be driven high.
6.4.4 Interrupt
Request Register 0
(IRR0)
129Description amended
To clear one of bits IRQ5R to IRQ0R to 0, first read the bit to
confirm it is set to 1, then write 0 only to the bit to be cleared
while writing 1 to all the other bits. Only 0 can be written to bits
IRQ5R to IRQ0R.
Table amended
BitBit Name Initial Value R/W Description
7, 6—All 0RReserved
5IRQ5R0R/W IRQ5 Interrupt Request
4IRQ4R0R/W IRQ4 Interrupt Request
3IRQ3R0R/W IRQ3 Interrupt Request
These bits are always read as 0. The write value
should always be 0.
Indicates whether an interrupt request is input to the
IRQ5 pin. When edge detection mode is set for IRQ5,
an interrupt request is cleared by clearing the IRQ5R
It is not necessary to clear the flag when using
bit.
level-sensing, because this bit merely shows the status
of the IRQ5 pin.
0: An interrupt request is not input to IRQ5 pin
1: An interrupt request is input to IRQ5 pin
Indicates whether an interrupt request is input to the
IRQ4 pin. When edge detection mode is set for IRQ4,
an interrupt request is cleared by clearing the IRQ4R
It is not necessary to clear the flag when using
bit.
level-sensing, because this bit merely shows the status
of the IRQ4 pin.
0: An interrupt request is not input to IRQ4 pin
1: An interrupt request is input to IRQ4 pin
Indicates whether an interrupt request is input to the
IRQ3 pin. When edge detection mode is set for IRQ3,
an interrupt request is cleared by clearing the IRQ3R
It is not necessary to clear the flag when using
bit.
level-sensing, because this bit merely shows the status
of the IRQ3 pin.
0: An interrupt request is not input to IRQ3 pin
1: An interrupt request is input to IRQ3 pin
Rev. 5.00 May 29, 2006 page x of xlviii
Page 11
ItemPageRevision (See Manual for Details)
6.4.4 Interrupt
Request Register 0
(IRR0)
130
Table amended
BitBit Name Initial Value R/W Description
2IRQ2R0R/W IRQ2 Interrupt Request
1IRQ1R0R/W IRQ1 Interrupt Request
0IRQ0R0R/W IRQ0 Interrupt Request (IRQ0R)
Indicates whether an interrupt request is input to the
IRQ2 pin. When edge detection mode is set for IRQ2,
an interrupt request is cleared by clearing the IRQ2R
It is not necessary to clear the flag when using
bit.
level-sensing, because this bit merely shows the status
of the IRQ2 pin.
0: An interrupt request is not input to IRQ2 pin
1: An interrupt request is input to IRQ2 pin
Indicates whether an interrupt request is input to the
IRQ1 pin. When edge detection mode is set for IRQ1,
an interrupt request is cleared by clearing the IRQ1R
It is not necessary to clear the flag when using
bit.
level-sensing, because this bit merely shows the status
of the IRQ1 pin.
0: An interrupt request is not input to IRQ1 pin
1: An interrupt request is input to IRQ1 pin
Indicates whether an interrupt request is input to the
IRQ0 pin. When edge detection mode is set for IRQ0,
an interrupt request is cleared by clearing the IRQ0R
It is not necessary to clear the flag when using
bit.
level-sensing, because this bit merely shows the status
of the IRQ0 pin.
0: An interrupt request is not input to IRQ0 pin
1: An interrupt request is input to IRQ0 pin
Specify the number of wait states inserted into
physical space area 6
R/W
PCR. Also specify the burst pitch for burst transfer.
Refer to table 8.6 for details.
R/W
Area 5 Wait Control
R/W
Specify the number of wait states inserted into
physical space area 5
R/W
PCR. Also specify the burst pitch for burst transfer.
Refer to table 8.7 for details.
in combination with A6W3 in
in combination with A5W3 in
Table 8.6 Area 6 Wait
Control
(Normal
Memory I/F)
Table 8.7 Area 5 Wait
Control
(Normal
Memory I/F)
184Table title amended
184Table title amended
Rev. 5.00 May 29, 2006 page xi of xlviii
Page 12
ItemPageRevision (See Manual for Details)
8.4.6 PCMCIA
192Table title amended
Control Register (PCR)
Table 8.10 Area 6
Wait Control
(PCMCIA
I/F)
8.5.4 Synchronous
DRAM Interface
222Description added
If an external bus access request (in order to perform 2) below
conflicts with an auto-refresh request, self-refresh request, or
bus release request internal to the LSI under the following
conditions, SDRAM all-bank precharge may not be executed
properly in the first cycle of the refresh or bus release cycle. In
this case, precharging of the selected bank is executed instead
of all-bank precharge.
1. The RASD bit in the individual memory control register
(MCR) is set to 1
and
2. long-word access is performed to any 16-bit bus width area
(areas 0 to 6) or word/long-word access is performed to any 8bit bus width area (areas 0 to 6).
The problem may be avoided by either of the following
measures.
1. Use the auto-precharge mode.
2. Use 32-bit bus width for all areas.
Figure 8.24 AutoRefresh Operation
229Figure amended
RTCNT value
RTCOR
H'00000000
Rev. 5.00 May 29, 2006 page xii of xlviii
Page 13
ItemPageRevision (See Manual for Details)
8.5.4 Synchronous
DRAM Interface
Figure 8.27
Synchronous DRAM
Mode Write Timing
233Figure amended and note added
TRp1TRp2 TRp3 TRp4 TMw1 TMw2 TMw3 TMw4
CKIO
A15 to A13
*
or (A14 to A12)
*
A11 (A10)
*
A12 (A11)
A10 to A2
*
(A9 to A1)
CSn
RD/WR
RASU or RASL
CASU or CASL
D31 to D0
9.3.2 DMA
Destination Address
Registers 0 to 3
(DAR_0 to DAR_3)
CKE
Note: * Items in parentheses ( ) apply to 16-bit bus width connections.
(High)
255Description amended
To transfer data in 16 bits or in 32 bits, specify the address with
16-bit or 32-bit address boundary. When transferring data in 16byte units, a 16-byte boundary (address 16n) must be set for
the source address value. Specifying other addresses does not
guarantee operation.
Rev. 5.00 May 29, 2006 page xiii of xlviii
Page 14
ItemPageRevision (See Manual for Details)
9.5.2 Register
Description
Compare Match Timer
Control/Status
Register (CMCSR)
294Description amended
The compare match timer control/status register (CMCSR) is a
16-bit register that indicates the occurrence of compare
matches,
and establishes the clock used for
incrementation.
Table amended
BitBit Name Initial Value R/WDescription
1
0
CKS1
CKS000
R/W
Clock select 1 and 0
R/W
These bits select the clock input to the CMCNT
from among the four clocks obtained by dividing
the peripheral clock (Pφ). When the STR
the CMSTR is set to 1, the CMCNT begins
incrementing with the clock selected by CKS1 and
CKS0.
00: P φ/4
01: P φ/8
10: P φ/16
11: P φ/64
0 bit of
9.5.3 Operation
Period Count
Operation
295Description amended
When a clock is selected with the CKS1 and CKS0 bits of the
CMCSR register and the STR0 bit of the CMSTR is set to 1, the
CMCNT begins incrementing with the selected clock. ...
CMCNT Count Timing296Description amended
One of four clocks (Pφ/4, Pφ/8, Pφ/16, Pφ/64) obtained by
dividing the
peripheral clock (Pφ) can be selected by the CKS1
and CKS0 bits of the CMCSR. Figure 9.28 shows the timing.
Figure 9.28 Count
Timing
Figure amended
Peripheral clock (Pφ)
CMT clock
CMCNT0 input clock
CMCNT0
N-1
Rev. 5.00 May 29, 2006 page xiv of xlviii
Page 15
ItemPageRevision (See Manual for Details)
9.6.1 Example of
DMA Transfer between
A/D Converter and
External Memory
(Address Reload on)
Table 9.7 Values in
the DMAC after the
Fourth Transfer Ends
9.7 Cautions301,
302
Description added
13. When the DMAC transfers data under conditions (1) or (2)
below, the CPU may fetch an unexpected instruction, resulting
in program runaway, or the DMA may transfer the wrong data.
(1) At wake-up from the sleep mode when operating with a
clock ratio for Iφ:Bφ of other than 1:1.
(2) The internal clock frequency division ratio bits (IFC[2:0]) in
the frequency control register (FRQCR) are modified.
Note that no problem occurs if the clock ratio for Iφ:Bφ is 1:1
after modification of the bits. Furthermore, no problem occurs if
the frequency multiplication ratio bits (STC[2:0]) are modified at
the same time as IFC[2:0].
These problems may be avoided by either of the following
measures.
• Do not use the DMAC when in sleep mode, or set the clock
ratio for Iφ:Bφ to 1:1 before entering sleep mode.
• Do not use the DMAC when modifying only the internal clock
frequency division ratio bits (IFC[2:0]) to produce a clock ratio
for Iφ:Bφ of other than 1:1.
Section 10 Clock
Pulse Generator
(CPG)
303 to
305,
309 to
(Before) Internal clock → (After) CPU clock
312
10.1 Feature305Description amended
1. PLL Circuit 1: PLL circuit 1 doubles, triples, quadruples, or
leaves unchanged the input clock frequency from the
or PLL circuit 2.
CKIO pin
Rev. 5.00 May 29, 2006 page xv of xlviii
Page 16
ItemPageRevision (See Manual for Details)
10.3 Clock Operating
Modes
Table 10.3 Available
Combination of Clock
Mode and FRQCR
Values
308,
309
Table amended and note 1 added
2
Clock
Mode FRQCR
1
*
PLL1PLL2
Clock Rate
(I:B:P)
*
Input Frequency Range
Notes: 1. This LSI cannot operate in an FRQCR value other
than that listed in table 10.3.
• The peripheral clock frequency should not be set higher than
the frequency of the CKIO pin,
313Description amended
… In clock mode 7, connect the EXTAL pin to V
and leave the XTAL pin open.
352Description and table amended
RTC control register 1 (RCR1) affects carry flags and alarm
or higher than 33 MHz.
flags. It also selects whether to generate interrupts for each
flag. Because flags are sometimes set after an operand read,
do not use this register in read-modify-write processing.
RCR1 is an 8-bit read/write register. Bits CIE, AIE, and AF are
initialized by a power-on reset or manual reset. After a poweron reset or manual reset, however, the CF flag is undefined.
When using the CF flag, it must be initialized beforehand. This
register is not initialized in standby mode.
BitBit Name Initial Value R/W Description
7CF
—R/W Carry Flag
Status flag that indicates that a carry has occurred. CF
is set to 1 when a count-up to R64CNT or RSECCNT
occurs. A count register value read at this time cannot
be guaranteed; another read is required.
0: No count up of R64CNT or RSECCNT.
[Clearing condition]
When 0 is written to CF
1: Count up of R64CNT or RSECCNT.
[Setting condition]
When 1 is written to CF
CKIO Frequency
Range
Q or VSSQ
CC
13.4.2 Setting the
Time
356,
357
Replaced
Rev. 5.00 May 29, 2006 page xvi of xlviii
Page 17
ItemPageRevision (See Manual for Details)
14.3.8 SC Port
Control Register
(SCPCR)
381Table amended
BitBit NameInitial Value R/WDescription
11
SCP5MD1
10
SCP5MD0
9
SCP4MD1
8
SCP4MD0
7
SCP3MD1
6
SCP3MD0
5
SCP2MD1
4
SCP2MD0
R/W
1
0
1
0
1
0
0
0
See section 17.1.10, SC Port Control Register
(SCPCR).
R/W
R/W
R/W
R/W
R/W
R/W
R/W
16.1 Feature
Figure 16.1 SCIF
Block Diagram
16.3.6 Serial Control
Register 2 (SCSCR2)
442Figure amended
SCFRDR2
RxD2
TxD2
SCK2
RTS2
CTS2
SCRSR2
451Bit table amended
BitBit Name
10CKE1
CKE000
Initial
Value R/WDescription
SCFTDR2
(16 stages)(16 stages)
SCTSR2
Parity generation
Parity check
R/W
00: Internal clock, SCK pin used for
R/W
ignored)
01: Internal clock, SCK2 pin used for clock output
10: External clock, SCK2 pin used for clock input
11: External clock, SCK2 pin used for clock input
Notes: 1. The output clock frequency is 16 times the bit
rate.
2. The input clock frequency is 16 times the bit rate.
SCPCR
SCPDR
SCFDR2
SCFCR2
SCSSR2
SCSCR2
SCSMR2
Transmit/
receive
control
Ex
I/O pin (input signal is
1
*
2
*
2
*
16.4.1 Serial
Operation
Serial data reception:
479Description amended
5. When modem control is enabled, the RTS2 signal is output
when SCFRDR2 is
01:
10: Port input (Pull-up MOS: on)
11: Port input (Pull-up MOS: off)
the SCPCR setting is
18.10.2 SC Port Data
Register (SCPDR)
526Bit table amended
BitBit Name Initial Value R/WDescription
5SCP5DT
4SCP4DT0R/W
3SCP3DT0R/W
Rev. 5.00 May 29, 2006 page xviii of xlviii
0RTable 18.10 shows the function of SCPDR
Page 19
ItemPageRevision (See Manual for Details)
Section 22 PowerDown Modes
Table 22.1 PowerDown Modes
568Table amended and note 5 added
CPU
Reg-
Mode
Module
standby
function
Transition
Conditions
Set MSTP bit of
STBCR to 1
5
*
CPG CPU
Runs Runs
*
On-Chip
ister
Memory
Held HeldSpecified
4
State
Note: 5. If the realtime clock (RTC) is set to module standby
mode (bit 1 in standby control register (STBCR) set to 1) before
any register in the RTC, SCI, or TMU is accessed, registers in
the serial communication interface (SCI) or timer unit (TMU)
may not be read properly. To avoid this problem, access (read
or write) any register in the RTC, SCI, or TMU once or more
before setting the RTC to module standby mode.
22.3.3 Module
Standby Function
Transition to Module
Standby Function
576Description added
If the realtime clock (RTC) is set to module standby mode (bit 1
in standby control register (STBCR) set to 1) before any
register in the RTC, SCI, or TMU is accessed, registers in the
serial communication interface (SCI) or timer unit (TMU) may
not be read properly. To avoid this problem, access (read or
write) any register in the RTC, SCI, or TMU once or more
before setting the RTC to module standby mode.
24.3.1 Clock Timing
Figure 24.4 Power-
On Oscillation Settling
Time
615Figure amended
CKIO,
internal clock
V
CC
V
– RTC
CC
– PLL1
V
CC
– PLL2
V
CC
VCC min
t
OSC1
On-Chip
Peripheral
Modules Pins
2
*
module
halts
External
Canceling
Memory
Procedure
Refresh 1. Clear MSTP
bit to 0
2. Power-on
reset
RESETP
Rev. 5.00 May 29, 2006 page xix of xlviii
Page 20
ItemPageRevision (See Manual for Details)
24.3.6 Synchronous
DRAM Timing
Figure 24.39
646Figure amended and note added
TRp1
TRp2 TRp3 TRp4 TMw1 TMw2 TMw3 TMw4
CKIO
Synchronous DRAM
Mode Register Write
Cycle
A11 (A10)
A12 (A11)
A10 to A2
(A9 to A1)
*
t
t
AD
AD
*
*
t
CSD3
Note: * Items in parentheses ( ) apply to 16-bit bus width
connections.
t
t
AD
AD
t
t
AD
AD
t
t
AD
AD
t
t
t
t
AD
AD
AD
CSD3
24.3.7 PCMCIA
Timing
Figure 24.45
PCMCIA I/O Bus Cycle
(TED = 2, TEH = 1,
One Wait, External
Wait)
24.3.12 Delay Time
Variation Due to Load
Capacitance
Figure 24.63 Load
Capacitance vs. Delay
Time
652Figure amended
D15 to D0
(read)
ICIOWR
(write)
t
D15 to D0
(write)
WDD1
663Figure amended
+3
+2
+1
Delay Time [ns]
+0
+0 +10 +20 +30 +40 +50
t
ICWSD
Load Capacitance [pF]
t
RDS1
t
ICWSD
t
WDH4
t
WDH1
50 pF stipulated
30 pF stipulated
Rev. 5.00 May 29, 2006 page xx of xlviii
Page 21
ItemPageRevision (See Manual for Details)
B.1 Pin Functions
Table B.1 Pin States
during Resets, PowerDown States, and BusReleased State
Table B.3Pin States (Normal Memory/Little Endian)........................................................... 678
Table B.4Pin States (Normal Memory/Big Endian) .............................................................. 680
Table B.5Pin States (Burst ROM/Little Endian).................................................................... 682
Table B.6Pin States (Burst ROM/Big Endian)....................................................................... 684
Table B.7Pin States (Synchronous DRAM/Little Endian)..................................................... 686
Table B.8Pin States (Synchronous DRAM/Big Endian)........................................................ 687
Table B.9Pin States (PCMCIA/Little Endian)....................................................................... 688
Table B.10 Pin States (PCMCIA/Big Endian).......................................................................... 690
Rev. 5.00 May 29, 2006 page xlviii of xlviii
Page 49
Section 1 Overview
Section 1 Overview
The SH7706 is a RISC microprocessor that integrates a Renesas Technology-original RISC-type
SuperH™ architecture SH-3 CPU as its core that has peripheral functions required for system
configuration. The CPU of this LSI has upper compatibility with the SH-1 and SH-2 at object code
level. This LSI incorporates a memory management unit (MMU) that has a 128-entry 4-way set
associative translation lookaside buffer (TLB).
The LSI incorporates the following peripheral functions: an on-chip direct memory access
controller (DMAC) that enables high-speed data transfer and a bus state controller (BSC) that
enables direct connection to different types of memory. The LSI also incorporates a serial
communication interface, an A/D converter, a D/A converter, a timer, and a realtime clock that
enable system configuration at low cost.
A built-in power management function enables dynamic control of power consumption. Thus, this
LSI is optimum for portable electronic devices such as PDAs that require both high performance
and low power.
The SH7706 incorporates a user debugging interface (H-UDI) and an advanced user debugger
(AUD) to support emulator functions such as E10A. This LSI also incorporates a user break
controller (UBC) for self debugging.
Note: The SuperH is a trademark of Renesas Technology, Corp.
1.1Feature
• Original Renesas SuperH architecture
• Object code level compatible with SH-1 , SH- 2 and SH-3
• 32-bit RISC-type instruction set
Instruction length: 16-bit fix e d length
Improved code efficiency
Load-store architecture
Delayed branch instructions
Instruction set oriented for C language
• Five-stage pipeline
• Instruction execution time: one instruction/cycle for basic instructions
• General-register: Sixteen 32-bit general registers
• Control-register: Eight 32-bit control registers
• System-register: Four 32-bit system registers
Rev. 5.00 May 29, 2006 page 1 of 698
REJ09B0146-0500
Page 50
Section 1 Overview
• 32-bit internal data bus
• Logical address space: 4 Gbytes
• Space identifier ASID: 8 bits, 256 logical address space
• Abundant Peripheral Functions
Memory Management Unit (MMU)
User Break Controller (UBC)
Bus state Contro lle r (BSC)
Direct Memory Access Controller (DMAC)
Clock Pulse Generator (CPG)
Watchdog Timer (WDT)
Timer Unit (TMU)
Realtime Clock (RTC)
Serial Communication Interface (SCI)
Smartcard Interface
Serial Communication Interface with FIFO (SCIF)
10-bit A/D converter (ADC)
8-bit D/A converter (DAC)
User Debugging Interface (H-UDI)
Advanced User Debugger (AUD)
Rev. 5.00 May 29, 2006 page 2 of 698
REJ09B0146-0500
Page 51
1.2Block Diagram
Section 1 Overview
MMU
TLB
CCN
CACHE
H-UDI
INTC
CPG/WDT
I bus 1I bus 2
BRIDGE
External bus
interface
L bus
CPU
UBC
AUD
BSC
DMAC
CMT
I/O port
SCI
TMU
Peripheral bus 1
RTC
SCIF
ADC
Peripheral bus 2
DAC
Legend:
ADC
AUD
BSC
CACHE
CCN
CMT
CPG/WDT
CPU
DAC
: A/D converter
: Advanced user debugger
: Bus state controller
: Cache memory
: Cache memory controller
: Compare match timer
: Clock pulse generator/watchdog timer
: Central processing unit
: D/A converter
Figure 1.1 SH7706 Block Diagram
DMAC
: Direct memory access controller
H-UDI
: User debugging interface
INTC
: Interrupt controller
MMU
: Memory management unit
RTC
: Realtime clock
SCI
: Serial communication interface (with smart card interface)
Rev. 5.00 May 29, 2006 page 4 of 698
REJ09B0146-0500
Page 53
Section 1 Overview
ABCDEFGHJKLMNPRTU
17
16
15
14
13
12
11
10
17
16
15
14
13
12
11
SH7706
9
8
7
6
5
4
3
2
TBP-208A
(Top view)
INDEX MARK
10
9
8
7
6
5
4
3
2
1
ABCDEFGHJKLMNPRTU
Note: Section in the dotted lines are perspective view.
Figure 1.3 Pin Assignment (TBP-208A)
Rev. 5.00 May 29, 2006 page 5 of 698
1
REJ09B0146-0500
Page 54
Section 1 Overview
1.4Pin Function
Number of Pins
FP-176CTBP-208APin NameI/ODescription
1
1C3V
2C2XTAL2OOn-chip RTC crystal oscillator pin
3C1EXTAL2IOn-chip RTC crystal oscillator pin
4D3V
5F4D31/PTB[7]I/OData bus / input/output port B
6F3D30/PTB[6]I/OData bus / input/output port B
7F2D29/PTB[5]I/OData bus / input/output port B
8F1D28/PTB[4]I/OData bus / input/output port B
9G4D27/PTB[3]I/OData bus / input/output port B
10G3D26/PTB[2]I/OData bus / input/output port B
11G2VSSQ—Input/output power supply (0 V)
12G1D25/PTB[1]I/OData bus / input/output port B
13H4VCCQ—Input/output power supply (3.3 V)
14H3D24/PTB[0]I/OData bus / input/output port B
15H2D23/PTA[7]I/OData bus / input/output port A
16H1D22/PTA[6]I/OData bus / input/output port A
17J4D21/PTA[5]I/OData bus / input/output port A
18J2D20/PTA[4]I/OData bus / input/output port A
19J1V
20J3D19/PTA[3]I/OData bus / input/output port A
21K1V
22K2D18/PTA[2]I/OData bus / input/output port A
23K3D17/PTA[1]I/OData bus / input/output port A
24K4D16/PTA[0]I/OData bus / input/output port A
25L1VSSQ—Input/output power supply (0 V)
26L2D15I/OData bus
27L3VCCQ—Input/output power supply (3.3 V)
28L4D14I/OData bus
29M1D13I/OData bus
-RTC
CC
-RTC
SS
SS
CC
*
1
*
—RTC power supply (1.9 V)
—RTC power supply (0 V)
—Internal power supply (0 V)
—Internal power supply (1.9 V)
Rev. 5.00 May 29, 2006 page 6 of 698
REJ09B0146-0500
Page 55
Section 1 Overview
Number of Pins
FP-176CTBP-208APin NameI/ODescription
30M2D12I/OData bus
31M3D11I/OData bus
32M4D10I/OData bus
33N1D9I/OData bus
34N2D8I/OData bus
35N3D7I/OData bus
36N4D6I/OData bus
37P1VSSQ—Input/output power supply (0 V)
38P2D5I/OData bus
39P3VCCQ—Input/output power supply (3.3 V)
40R1D4I/OData bus
41R2D3I/OData bus
42P4D2I/OData bus
43T1D1I/OData bus
44T2D0I/OData bus
45U1A0OAddress bus
46U2A1OAddress bus
47R3A2OAddress bus
48T3A3OAddress bus
49U3VSSQ—Input/output power supply (0 V)
50R4A4OAddress bus
51T4VCCQ—Input/output power supply (3.3 V)
52U4A5OAddress bus
53P5A6OAddress bus
54R5A7OAddress bus
55T5A8OAddress bus
56U5A9OAddress bus
57P6A10OAddress bus
58R6A11OAddress bus
59T6A12OAddress bus
Rev. 5.00 May 29, 2006 page 7 of 698
REJ09B0146-0500
Page 56
Section 1 Overview
Number of Pins
FP-176CTBP-208APin NameI/ODescription
60U6A13OAddress bus
61P7VSSQ—Input/output power supply (0 V)
62R7A14OAddress bus
63T7VCCQ—Input/output power supply (3.3 V)
64U7A15OAddress bus
65P8A16OAddress bus
66R8A17OAddress bus
67T8A18OAddress bus
68U8A19OAddress bus
69P9A20OAddress bus
70T9A21OAddress bus
71U9V
SS
—Internal power supply (0 V)
72R9A22OAddress bus
73U10V
CC
—Internal power supply (1.9 V)
74T10A23OAddress bus
75P10A24OAddress bus
76T11A25OAddress bus
77R11BS/PTC[0]O / I/OBus cycle start signal /
input/output port C
78P11RDORead strobe
79U12WE0/DQMLLOD7 to D0 select signal /
DQM (SDRAM)
80T12WE1/DQMLU/WEOD15 to D8 select signal / DQM
(SDRAM) / write strobe (PCMCIA)
81R12WE2/DQMUL/
ICIORD/PTC[1]
O / O /
O / I/O
D23 to D16 select signal /
DQM (SDRAM) /
PCMCIA input/output read /
input/output port C
82P12WE3/DQMUU/
ICIOWR/PTC[2]
O / O /
O / I/O
D31 to D24 select signal /
DQM (SDRAM) /
PCMCIA input/output write /
input/output port C
83U13RD/WRORead/write
Rev. 5.00 May 29, 2006 page 8 of 698
REJ09B0146-0500
Page 57
Section 1 Overview
Number of Pins
FP-176CTBP-208APin NameI/ODescription
84R13VSSQ—Input/output power supply (0 V)
85P13CS0OChip select 0
86U14VCCQ—Input/output power supply (3.3 V)
87T14CS2/PTC[3]O / I/OChip select 2 / input/output port C
88R14CS3/PTC[4]O / I/OChip select 3 / input/output port C
89U17CS4/PTC[5]O / I/OChip select 4 / input/output port C
90T17CS5/CE1A/PTC[6]O / O / I/O Chip select 5 / CE1 (area 5
input/output port E
109K15AUDATA[0]/PTF[0]I/OAUD data / input/output port F
110K16AUDATA[1]/PTF[1]I/OAUD data / input port F
111K17AUDATA[2]/PTF[2]I/OAUD data / input/output port F
112J14AUDATA[3]/PTF[3]I/OAUD data / input/output port F
113J16AUDSYNC/PTF[4]O / I/OAUD synchronous /
input/output port F
114J17TDI/PTG[0]IData input (H-UDI) / input port G
115J15V
SS
—Internal power supply (0 V)
116H17TCK/PTG[1]IClock (H-UDI) / input port G
117H16V
CC
—Internal power supply (1.9 V)
118G16TMS/PTG[2]IMode select (H-UDI) / input port G
119G15TRST/PTG[3]IReset (H-UDI) / input port G
120G14TDO/PTF[5]O / I/OData output (H-UDI) /
input/output port E
137A15VSSQ—Input/output power supply (0 V)
138C14CKIOI/OSystem clock input/output
139B14VCCQ—Input/output power supply (3.3 V)
140A14TxD0/SCPT[0]OSCI transmit data 0 / SC port
141D13SCK0/SCPT[1]I/OSCI clock 0 / SC port
142C13TxD2/SCPT[2]OSCIF transmit data 2 / SC port
143B13SCK2/SCPT[3]I/OSCIF clock 2 / SC port
144A13RTS2/SCPT[4]O / I/OSCIF transmit request 2 / SC port
145D12RxD0/SCPT[0]ISCI receive data 0 / SC port
146C12RxD2/SCPT[2]ISCIF receive data 2 / SC port
147B12CTS2/IRQ5/SCPT[5]ISCIF transmit clear / external
interruption request / SC port
148D11V
SS
—Internal power supply (0 V)
149C11RESETMIManual reset request
150B11V
CC
—Internal power supply (1.9 V)
151A11IRQ0/IRL0/PTH[0]I / I / I/OExternal interrupt request /
input/output port H
152D10IRQ1/IRL1/PTH[1]I / I / I/OExternal interrupt request /
input/output port H
153C10IRQ2/IRL2/PTH[2]I / I / I/OExternal interrupt request /
input/output port H
154B10IRQ3/IRL3/PTH[3]I / I / I/OExternal interrupt request /
Number of Pins
FP-176CTBP-208APin NameI/ODescription
157B9NMIINonmaskable interrupt request
158A9VCCQ—Input/output power supply (3.3 V)
159C9AUDCK/PTG[4]IAUD clock / input port G
160A8DREQ0/PTH[5]I / I/ODMA request / input/output port H
161B8DREQ1/PTH[6]I / I/ODMA request / input/output port H
162C8ADTRG/PTG[5]IAnalog trigger / input port G
163D8MD0IClock mode setting
164B7MD2IClock mode setting
165A6RESETPIPower-on reset request
166B6CAIChip activate / hardware standby
request
167C6MD3IArea 0 bus width setting
168D6MD4IArea 0 bus width setting
169A5MD5IEndian setting
170B5AV
SS
—Analog power supply (0 V)
171C5AN[0]/PTJ[0]IA/D converter input / input port J
172D5AN[1]/PTJ[1]IA/D converter input / input port J
173A4AN[2]/DA[1]/PTJ[2]I / O / IA/D converter input / D/A converter
output / input port J
174B4AN[3]/DA[0]/PTJ[3]I / O / IA/D converter input / D/A converter
output / input port J
175B3AV
176B2AV
CC
SS
—Analog power supply (3.3 V)
—Analog power supply (0 V)
Notes: Except in hardware standby mode, all VCC/VSS pins must be connected to the system power
supply. (Supply power constantly.) In hardware standby mode, power must be supplied at
least to VCC−RTC and VSS−RTC. If power is not supplied to VCC and VSS pins other than
−RTC and VSS−RTC, hold the CA pin low.
V
CC
In the TBP-208A package, the A1, A2, A3, A7, A12, B1, C4, C7, D1, D2, D4, D7, D14, D15,
E1, E2, E3, E4, F14, F17, G17, H14, H15, K14, P14, R10, T13, T15, T16, U11, U15, and
U16 pins must be connected to V
.
SS
1. Must be connected to the power supply even when the RTC is not used.
2. Must be connected to the power supply even when the on-chip PLL circuits are not
used (except in hardware standby mode).
3. Must be high level when the user system is used independently without using the
emulator or H-UDI. When this pin goes low or is open, the RESETP pin may be
masked. (See section 21, User Debugging Interface (H-UDI).)
Rev. 5.00 May 29, 2006 page 12 of 698
REJ09B0146-0500
Page 61
Section 2 CPU
Section 2 CPU
2.1Register Description
2.1.1Privileged Mode and Banks
Processor Modes: There are two processor modes: user mode and privileged mode. The SH7706
normally operates in user mode, and enters privileged mode when an exception occurs or an
interrupt is accepted. There are three kinds of registers—general registers, system registers, and
control registers—and the registers that can be accessed differ in the two processor modes.
General Registers: There are 16 general registers, designated R0 to R15. General registers R0 to
R7 are banked registers which are switched by a processor mode change. 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, BANK1 general registers R0_BANK1 to R7_BANK1 and non-banked
general registers R8 to R15 function as the general register set, with BANK0 general registers
R0_BANK0 to R7_BANK0 accessed only by the LDC/STC instructions.
When the RB bit is 0, BANK0 general registers R0_BANK0 to R7_BANK0 and nonbanked
general registers R8 to R15 function as the general register set, with BANK1 general registers
R0_BANK1 to R7_BANK1 accessed only by the LDC/STC instructions. In user mode, the 16
registers comprising bank 0 general registers R0_BANK0 to R7_BANK0 and non-banked
registers R8 to R15 can be accessed as general registers R0 to R15, and bank 1 general registers
R0_BANK1 to R7_BANK1 cannot be accessed.
Control Registers: Control registers comprise the global base register (GBR) and status register
(SR) which can be accessed in both processor modes, and the saved status register (SSR), saved
program counter (SPC), and vector base register (VBR) 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.
System Registers: System registers comprise the multiply and accumulate registers
(MACL/MACH), the procedure register (PR), and the program counter (PC). Access to these
registers does not depend on the processor mode.
The register configuration in each mode is shown in figures 2.1.
Rev. 5.00 May 29, 2006 page 13 of 698
REJ09B0146-0500
Page 62
Section 2 CPU
Switching between user mode and privileged mode is controlled by the processor mode bit (MD)
in the status register.
c. Privileged mode
register configuration
(RB = 0)
Notes: 1.
R0 functions as an index register in the indexed register-indirect addressing mode and indexed
GBR-indirect addressing mode.
2.
Banked register
3.
Banked register
When the RB bit of the SR register is 1, the register can be accessed for general use. When the
RB bit is 0, it can only be accessed with the LDC/STC instruction.
4.
Banked register
When the RB bit of the SR register is 0, the register can be accessed for general use. When the
RB bit is 1, it can only be accessed with the LDC/STC instruction.
Figure 2.1 Register Configuration
Rev. 5.00 May 29, 2006 page 14 of 698
REJ09B0146-0500
Page 63
Section 2 CPU
Register values after a reset are shown in table 2.1.
Table 2.1Initial Register Values
TypeRegistersInitial Value*
General registersR0 to R15Undefined
Control registers
Note:* Initial value is set at power-on-reset or manual-reset.
2.1.2General Registers
There are 16 general registers, designated R0 to R15. General registers R0 to R7 are banked
registers, with a different R0 to R7 register bank (R0_BANK0 to R7_BANK0 or R0_BANK1 to
R7_BANK1) being accessed according to the processor mode. For details, see figure 2.1.
The general register configuration is shown in figure 2.2.
310
R0
R1
R2
R3
R4
R5
R6
R7
R10
R11
R12
R13
R14
R15
R8
R9
1
2
*
*
2
*
2
*
2
*
2
*
2
*
2
*
2
*
General Registers
Initialized to undefined by a reset.
Notes:
1. R0 functions as an index register in the indexed
register-indirect addressing mode and indexed
GBR-indirect addressing mode. In some instructions,
only R0 can be used as the source register or
destination register.
2. R0 to R7 are banked registers.
In privileged mode, SR.RB specifies which banked registers are
accessed as general registers (R0_BANK0 to R7_BANK0 or
R0_BANK1 to R7_BANK1).
Figure 2.2 General Registers
Rev. 5.00 May 29, 2006 page 15 of 698
REJ09B0146-0500
Page 64
Section 2 CPU
2.1.3System Registers
System registers can be accessed by the LDS and STS instructions. When an exception occurs, the
contents of the program counter (PC) are saved in the saved program counter (SPC). The SPC
contents are restored to the PC by the RTE instruction used at the end of the exception handling.
There are three system registers, as follows.
• Multiply and accumulate register ( M AC)
• Procedure register (PR)
• Program counter (PC)
The system register configuration is shown in figure 2.3.
Multiply and Accumulate Register (MAC)
310
MACH
MACL
Procedure Register (PR)
310
PR
Program Counter (PC)
310
PC
Figure 2.3 System Registers
1. Multiply and Accumulate Register (MAC)
Multiply and Accumulate register is consist of High e r part r e gister (MACH) and Lower part
register (MACL).
Store the results of multiply-and-accumulate operations.
Initialized to undefined by a reset.
2. Procedure Register (PR)
Stores the return address for exiting a subroutine procedure.
Initialized to undefined by a reset.
3. Program Counter (PC)
Indicates the address four addresses (two instructions) ahead of the currently executing
instruction. Initialized to H'A0000000 by a reset.
Rev. 5.00 May 29, 2006 page 16 of 698
REJ09B0146-0500
Page 65
Section 2 CPU
2.1.4Control Registers
Control registers can be accessed in privileged mode using the LDC and STC instructions. The
GBR register can also be accessed in user mode. There are five control registers, as follows:
• Status register (SR)
• Saved status register (SSR)
• Saved program counter (SPC)
• Global base register (GBR)
• Vector base register (VBR)
The control register configuration is shown in figure 2.4.
Status Register (SR)
310
SR
Saved Status Register (SSR)
310
SSR
Saved Program Counter (SPC)
310
SPC
Global Base Register (GBR)
310
GBR
Vector Base Register (VBR)
310
VBR
Figure 2.4 Control Registers
Rev. 5.00 May 29, 2006 page 17 of 698
REJ09B0146-0500
Page 66
Section 2 CPU
• Status Register (SR)
The information of system status are set in this register.
BitBit NameInitial ValueR/WDescription
310RReserved
These bits always read as 0, and the write value
should always be 0.
30MD1R/WProcessor operation mode bit
Indicates the processor operation mode.
0: User mode
1: Privileged mode
MD is set to 1 when an exception or interruption
is occurred.
29RB1R/WRegister bank bit
Determines the bank of general registers R0 to
R7 used in privileged mode.
1: R0_BANK1 to R7_BANK1 and R8 to R15 are
general registers, and R0_BANK0 to
R7_BANK0 can be accessed by LDC/STC
instructions.
0: R0_BANK0 to R7_BANK0 and R8 to R15 are
general registers, and R0_BANK1 to
R7_BANK1 can be accessed by LDC/STC
instructions.
RB is set to 1 when an exception or interruption
is occurred.
28BL1R/WBlock bit
0: Exceptions and interrupts are accepted.
1: Exceptions and interrupts are suppressed.
See section 4, Exception Processing, for
details.
BL is set to 1 when an exception or interruption
is occurred.
27 to 13All 0RReserved
These bits always read as 0, and the write value
should always be 0.
12C L0R/WCache lock bit
0: Cache look function is disabled.
1: Cache look function is enabled.
Rev. 5.00 May 29, 2006 page 18 of 698
REJ09B0146-0500
Page 67
Section 2 CPU
BitBit NameInitial ValueR/WDescription
11, 10All 0RReserved
These bits always read as 0, and the write value
should always be 0.
9
8
7
6
5
4
3, 2All 0RReserved
1S R/WS bit
0T R/WT bit
Note: The M, Q, S and T bits can be set or cleared by special instructions in user mode. Their
M
Q
I3
I2
I1
I0
values are undefined after a reset. All other bits can be read or written in privileged mode.
1
1
1
1
R/W
R/W
R/W
R/W
R/W
R/W
M bit
Q bit
Used by the DIV0S/U and DIV1 instructions.
Interrupt mask bits
4-bit field indicating the interrupt request mask
level.
I3 to I0 do not change to the interrupt
acceptance level when an interrupt is occurred.
These bits always read as 0, and the write value
should always be 0.
Used by the MAC instruction.
Used by the MOVT, CMP/cond, TAS, TST, BT,
BF, SETT, CLRT, and DT instructions to
indicate true (1) or false (0).
Used by the ADDV/C, SUBV/C, DIV0U/S, DIV1,
NEGC, SHAR/L, SHLR/L, ROTR/L, and
ROTCR/L instructions to indicate a carry,
borrow, overflow, or underflow.
• Saved Status Register (SSR)
Stores current SR value at time of exception to indicate processor status in return to instruction
stream from exception handler.
Initialized to undefined by a reset.
• Saved Program Counter (SPC)
Stores current PC value at time of exception to indicate return address at completion of
exception handling.
Initialized to undefined by a reset.
Rev. 5.00 May 29, 2006 page 19 of 698
REJ09B0146-0500
Page 68
Section 2 CPU
• Global Base Re gister (GBR)
Stores base address of GBR-indirect addressing mode. The GBR-indirect addressing mode is
used for on-chip supporting module register area data transfers and logic operations.
The GBR register can also be accessed in user mode.
Initialized to undefined by a reset.
• Vector Base Register (VBR)
Stores base address of exception handling vector area.
Initialized to H'0000000 by a reset.
2.2Data Formats
2.2.1Data Format in Registers
Register operands are always longwords (32 bits). When a memory operand is only a byte (8 bits)
or a word (16 bits), the sign is extended to the longword, and stores into the register.
310
Longword
2.2.2Data Format in Memory
Memory data formats are classified into bytes, words, and longwords. Memory can be accessed in
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 stored in 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 th is r ule 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 mode should
be set with the MD5 external pin in a power-on reset. Big-endian mode is selected when the MD5
pin is low, and little-endian when high. The endian mode 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.
Rev. 5.00 May 29, 2006 page 20 of 698
REJ09B0146-0500
Page 69
The data format in memory is shown in figure 2.5.
Section 2 CPU
Address A
Address A + 4
Address A + 8
Address A + 1Address A + 3
Address A
237
31015
Byte0 Byte1Byte2Byte3
Word0
LongwordLongword
Big-endian mode
Word1
Address A + 11
Address A + 10Address A + 8
Address A + 9Address A + 2
237
31015
Byte3Byte2 Byte1 Byte0
Word1
Little-endian mode
Word0
Address A + 8
Address A + 4
Address A
Figure 2.5 Data Format in Memory
2.3Instruction Features
2.3.1Execution Environment
Data Length: The instruction set is implemented with fixed-length 16-bit wide instructions
executed in a pipelined sequence with single-cycle execution for most instructions. All operations
are executed in 32-bit longword units. Memory can be accessed in 8-bit byte, 16-bit word, or 32bit longword units, with byte or word units sign-extended into 32-bit longwords. Literals are signextended in arithmetic operations (MOV, ADD, and CMP/EQ instructions) and zero-extended in
logical operations (TST, AND, OR, and XOR instructions).
Load/Store Architecture: The load-store architecture is used, so basic operations are executed by
the registers. Operations requiring memory access are executed in registers following register
loading, except for bit-manipulation operations such as logical AND functions, which are executed
directly in memory.
Delayed Branching: Unconditional branching is implemented as delayed branch operations.
Pipeline disruptions due to branching are minimized by the execution of the instruction following
the delayed branch instruction prior to branching. Conditional branch instructions are of two
kinds, delayed and normal.
BRATRGET
ADDR1, R0; ADD is executed pr ior to branching to TRGET
Rev. 5.00 May 29, 2006 page 21 of 698
REJ09B0146-0500
Page 70
Section 2 CPU
T bit: The T bit in the status register (SR) is used to indicate the result of compar e operations, and
is read as a TRUE/FALSE condition determining if a conditional branch is taken or not. To
improve processing speed, the T bit logic state is modified only by specific operations. An
example of how the T bit may be used in a sequence of operations is shown below.
ADD#1, R0; T bit not modified by ADD o peration
CMP/EQR1, R0; T bit set to 1 when R0 = 0
BTTRGET; branch taken to TRGET when T bit = 1 (R0 = 0)
Literals: Byte-length literals are inserted directly into the instruction code as immediate data. To
maintain the 16-bit fixed-length instruction code, word or longword literals are stored in a table in
main memory rather than inserted directly into the instruction code. The memory table is accessed
by the MOV instruction using PC-relative addressing with displacement, as follows:
MOV.W@(disp, PC), R0
Absolute Addresses: As with word and longword literals, absolute add r esses must also be stored
in a table in main memory. The value of the absolute address is transfer red to a register and the
operand access is specified by indexed register-indirect addressing, with the absolute address
loaded (like word and longword immediate data) during instruction execution.
16-Bit and 32-Bit Displacements: In the same way, 16-bit and 32-bit displacements also must be
stored in a table in main memory. Exactly like absolute addresses, the displacement value is
transferred to a register and the operand access is specified by indexed register-indirect addressing,
loading the displacement (like word and longword immediate data) during instruction execution.
Rev. 5.00 May 29, 2006 page 22 of 698
REJ09B0146-0500
Page 71
2.3.2Addressing Modes
Addressing modes and effective address calculation methods are shown in table 2.2.
Table 2.2Addressing Modes and Effective Addresses
Section 2 CPU
Addressing
Mode
Register
direct
Register
indirect
Register
indirect with
postincrement
Register
indirect with
predecrement
Instruction
FormatEffective Address Calculation MethodCalculation Formula
RnEffective address is register Rn. (Operand
is register Rn contents.)
@RnEffective 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.
Rn
Rn + 1/2/4
1/2/4
@–RnEffective 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.
Instruction
FormatEffective Address Calculation MethodCalculation Formula
@(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
(zero-extended)
1/2/4
+
×
Rn
+ disp × 1/2/4
@(R0, Rn) Effective address is sum of register Rn and
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.
Effective address is sum of register GBR
and R0 contents.
GBR
R0
Rev. 5.00 May 29, 2006 page 24 of 698
REJ09B0146-0500
+
×
GBR
+ disp × 1/2/4
GBR + R0
+
GBR + R0
Page 73
Section 2 CPU
Addressing
Mode
PC-relative
with
displacement
Instruction
FormatEffective Address Calculation MethodCalculation Formula
@(disp:8,
PC)
Effective address is register PC contents
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,
Word: PC + disp × 2
Longword:
PC & H'FFFF FFFC +
disp × 4
the lower 2 bits of PC are masked.
PC
(for longword)
&
H'FFFFFFFC
+
disp
(zero-extended)
x
2/4
disp:8Effective address is register PC contents
PC + disp × 2
or
PC&H'FFFFFFFC
+ disp × 4
PC + disp × 2PC-relative
with 8-bit displacement disp added after
being sign-extended and multiplied by 2.
PC
disp
(sign-extended)
+
PC + disp × 2
×
2
disp:12Effective address is register PC contents
with 12-bit displacement disp added after
being sign-extended and multiplied by 2.
PC
disp
(sign-extended)
2
+
PC + disp × 2
×
Rev. 5.00 May 29, 2006 page 25 of 698
PC + disp × 2
REJ09B0146-0500
Page 74
Section 2 CPU
Addressing
Mode
PC-relativeRnEffective address is sum of register PC and
Instruction
FormatEffective Address Calculation MethodCalculation Formula
PC + Rn
Rn contents.
PC
Immediate
+
R0
#imm:88-bit immediate data imm of TST, AND, OR,
PC + R0
—
or XOR instruction is zero-extended.
#imm:88-bit immediate data imm of MOV, ADD,
—
or CMP/EQ instruction is sign-extended.
#imm:88-bit immediate data imm of TRAPA
—
instruction is zero-extend ed and mult iplied
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, Rn) ; GBR indirect with displacement
@ (disp:8, PC) ; PC-relative with displacement
disp:8, disp:12 ; PC-relative
Rev. 5.00 May 29, 2006 page 26 of 698
REJ09B0146-0500
Page 75
Section 2 CPU
2.3.3Instruction Formats
Table 2.3 explains the meaning of instruction formats and source and destination operands. The
meaning of the operands depends on the operation code. The following symbols are used.
MACH,MACLMAC.W
indirect with postincrement
(multiply-andaccumulate
operation)
nnnn: * register
indirect with postincrement
(multiply-andaccumulate
operation)
mmmm: register
indirect with post-
nnnn: register
direct
increment
mmmm: register
direct
nnnn: register
indirect with
pre-decrement
mmmm: register
direct
mmmmdddd:
register indirect
nnnn: indexed
register indirect
R0 (register
direct)
with displacement
R0 (register direct) nnnndddd:
register indirect
with
displacement
Instruction
Example
ADD
Rm,Rn
MOV.L
Rm,@Rn
@Rm+,@Rn+
MOV.L
@Rm+,Rn
MOV.L
Rm,@–Rn
MOV.L
Rm,@(R0,Rn)
MOV.B
@(disp,Rm),R0
MOV.B
R0,@(disp,Rn)
Rev. 5.00 May 29, 2006 page 28 of 698
REJ09B0146-0500
Page 77
Section 2 CPU
Instruction Format
nmd
format
150
xxxxdddd
nnnn
mmmm
Source
Operand
mmmm: register
direct
Destination
Operand
nnnndddd:
register indirect
with
displacement
mmmmdddd:
register indirect
nnnn: register
direct
with displacement
d format
150
xxxx
xxxx
dddd
dddd
dddddddd: GBR
indirect with
R0 (register
direct)
displacement
R0 (register direct) dddddddd: GBR
indirect with
displacement
dddddddd:
PC-relative with
R0 (register
direct)
displacement
dddddddd:
—BFlabel
PC-relative
d12
format
nd8
format
150
xxxx
150
xxxx
dddd
nnnn
dddddddd
dddd
dddd
dddddddddddd:
PC-relative
dddddddd:
PC-relative with
—BRAlabel
nnnn: register
direct
displacement
i format
150
xxxx
xxxx
i i i i
iiiiiiii: immediateIndexed GBR
i i i i
indirect
iiiiiiii: immediateR0 (register
direct)
iiiiiiii: immediate—TRAPA #imm
ni format
150
xxxx
nnnn
i i i i
i i i i
iiiiiiii: immediatennnn: register
direct
Note:* In a multiply-and-accumulate instruction, nnnn is the source register.
Instruction
Example
MOV.L
Rm,@(disp,Rn)
MOV.L
@(disp,Rm),Rn
MOV.L
@(disp,GBR),R0
MOV.L
R0,@(disp,GBR)
MOVA
@(disp,PC),R0
(label = disp +
PC)
MOV.L
@(disp,PC),Rn
AND.B
#imm,
@(R0,GBR)
AND
#imm,R0
ADD
#imm,Rn
Rev. 5.00 May 29, 2006 page 29 of 698
REJ09B0146-0500
Page 78
Section 2 CPU
2.4Instruction Set
2.4.1Instruction Set Clas sif ied by Function
The SH7706 instruction set includes 68 basic instruction types, as listed in table 2.4.
Table 2.4Classification of Instructions
Classification Types
Data transfer5
21ADDBinary additionArithmetic
operations
Operation
CodeFunction
MOVData transfer
MOVAEffective address transfer
MOVTT bit transfer
SWAPSwap of upper and lower bytes
XTRCTExtraction of middle of linked registers
ADDCBinary addition with carry
ADDVBinary addition with overflow check
CMP/condComparison
DIV1Division
DIV0SInitialization of signed division
DIV0UInitialization of unsigned division
DMULSSigned double-precision multiplication
DMULUUnsigned double-prec is ion mul tip lic ati on
DTDecrement and test
EXTSSign extension
EXTUZero extension
MACMultiply-and-accumulate operat io n,
Rev. 5.00 May 29, 2006 page 30 of 698
REJ09B0146-0500
Page 79
Section 2 CPU
Operation
Classification Types
Arithmetic
operations
Logic
operations
Shift12ROTLOne-bit left rotation
21
6
CodeFunction
MULDouble-precision multiplication
(32 × 32 bits)
MULSSigned multiplication (16 × 16 bits)
MULUUnsigned multiplication (16 × 16 bits)
NEGNegation
NEGCNegation with borrow
SUBBinary subtraction
SUBCBinary subtraction with borrow
SUBVBinary subtraction with underflow check
ANDLogical AND
NOTBit inversion
ORLogical OR
TASMemory test and bit set
TSTLogical AND and T bit set
XORExclusive OR
ROTROne-bit right rotation
ROTCLOne-bit left rotation with T bit
ROTCROne-bit right rotation with T bit
SHALOne-bit arithmet ic left sh ift
SHAROne-bit arithmetic right shift
SHLLOne-bit logical left shift
SHLLnn-bit logical left shift
SHLROne-bit logical right shift
SHLRnn-bit logical right shift
SHADDynamic arithmetic shift
SHLDDynamic logical shift
No. of
Instructions
33
14
16
Rev. 5.00 May 29, 2006 page 31 of 698
REJ09B0146-0500
Page 80
Section 2 CPU
Operation
Classification Types
Branch9
System
control
Total:68188
15
CodeFunction
BFConditional branch, delayed conditional
branch (T = 0)
BTConditional branch, delayed conditional
branch (T = 1)
BRAUnconditional branch
BRAFUnconditional branch
BSRBranch to subroutine procedure
BSRFBranch to subroutine procedure
JMPUnconditional branch
JSRBranch to subroutine procedure
RTSReturn from subroutine procedure
CLRMACMAC register clear
CLRTClear T bit
CLRSClear S bit
LDCLoad to control register
LDSLoad to system register
LDTLBLoad PTE to TLB
NOPNo operation
PREFPrefetch data to cache
RTEReturn from exception handling
SETSSet S bit
SETTSet T bit
SLEEPShift to power-down mode
STCStore from control register
STSStore from system register
TRAPATrap exception handling
No. of
Instructions
11
75
The instruction codes are listed from tables 2.5 to 2.10. Those tables are described according to the
following items.
Rev. 5.00 May 29, 2006 page 32 of 698
REJ09B0146-0500
Page 81
Section 2 CPU
ItemFormatExplanation
Instruction
mnemonic
Instruction
code
Operation
summary
Privileged
mode
Execution
cycles
T bitValue of T bit after instruction is executed
Note: * Scaling (×1, ×2, ×4) is performed according to the instruction operand size.
1111: R15
iiii: Immediate data
dddd: Displacement*
→, ←
(xx)
M/Q/T
&
|
^
~
<<n, >>n
Direction of transfer
Memory operand
Flag bits in SR
Logical AND of each bit
Logical OR of each bit
Exclusive OR of each bit
Logical NOT of each bit
n-bit shift
Indicates whether privileged mode applies
Value when no wait states are inserted
The execution cycles listed in the table are minimums. The
actual number of cycles may be increased in cases such as
the followings:
1. When contention occurs between instruction fetches and
data access
2. When the destination register of the load instruction
(memory → register) and the register used by the next
instruction are the same
Rev. 5.00 May 29, 2006 page 44 of 698
REJ09B0146-0500
Page 93
Section 2 CPU
Notes: The table shows the minimum number of execution cycles. The actual number of
instruction execution cycles will increase in cases such as the followings:
a. When there is contention between an instruction fetch and data access
b. When the destination register in a load (memory-to-register) instruction is also used
by the next instruction
With the addressing modes using displacement (disp) listed below, the assembler
descriptions in this manual show the value before scaling (×1, ×2, or ×4) is performed. This
is done to clarify the operation of the chip. For the actual assembler descriptions, refer to
the individual assembler notation rules.
@ (disp:4, Rn) ; Register-indirect with displacement
@ (disp:8, Rn) ; GBR-indirect with displacement
@ (disp:8, PC) ; PC-relative with displacement
disp:8, disp:12 ; PC-relative
* The number of cycles until the sleep state is entered.
Note: See the SH-3/SH-3E/SH3-DSP Programming Manual for details.
Rev. 5.00 May 29, 2006 page 48 of 698
REJ09B0146-0500
Page 97
Section 2 CPU
2.5Processor States and Processor Modes
2.5.1Processor States
The SH7706 has five processor states: the reset state, exception-handling state, bus-released state,
program execution state, and power-down state.
Reset State: In this state the CPU is reset. The CPU enters the power-on reset state if the RESETP
pin is low, or the manual reset state if the RESETM pin is low. See section 4, Exception
Processing, for more information on resets.
In the power-on reset state, the internal states of the CPU and the on-chip supporting module
registers are initialized. In the manual reset state, th e internal states of the CPU and registers of onchip supporting modules other than the bus state controller (BSC) are initialized. For details, refer
to section 23.3, Register States in Processing Mode.
Exception-Handling State: This is a transient state during which the CPU's processor state flow
is altered by a reset, general exception, or interrupt exception handling.
In the case of a reset, the CPU branches to address H'A0000000 and starts executing the usercoded exception handling program.
In the case of a general exception or interrupt, the program counter (PC) contents are saved in the
saved program counter (SPC) and the status register (SR) contents are saved in the saved status
register (SSR). The CPU branches to the start address of the user-coded exception service routine
found from the sum of the contents of the vector base address and the vector offset. See section 4,
Exception Processing, for more information on resets, general exceptions, and interrupts.
Program Execution State: In this state the CPU executes program instructions in sequence.
Power-Down State: In the power-down state, CPU operation halts and power consumption is
reduced. There are three modes in the power-down state: sleep mode, software standby mode and
hardware standby mode. The software standby mode and hardware standby mode are expressed by
a generlc name, standby mode. See section 22, Power-Down Modes, for more information.
Bus-Released State: In this state the CPU has released the bus to a device that requested it.
Transitions between the states are shown in figure 2.6.
Rev. 5.00 May 29, 2006 page 49 of 698
REJ09B0146-0500
Page 98
Section 2 CPU
From any state when
RESETP = 0
Interrupt
Bus-released state
Bus
request
Sleep mode
Power-on reset
Bus request
Bus
request
clearance
From any state but hardware standby
mode or bus-released state when RESETM = 0
RESETP = 0
state
RESETP = 1RESETM = 1
Exception-handling state
Exception
Bus request clearance
Bus request
interrupt
Bus request
clearance
SLEEP
instruction
with STBY
bit cleared
Program execution state
End of exception
transition
processing
Manual reset
state
Reset state
Interrupt
SLEEP
instruction
with STBY
bit set
Software standby mode
CA = 1, RESETP=0
Note: * The hardware standby mode is entered when the CA pin goes low level from any state.
Hardware standby mode
*
Power-down state
Figure 2.6 Processor State Transitions
2.5.2Processor Modes
There are two processor modes: privileged mode and user mode. The processor mode is
determined by the processor mode bit (MD) in the status register (SR). User mode is selected
when the MD bit is 0, and privileged mode when the MD bit is 1. When the reset state or
exception state is entered, the MD bit is set to 1. When ex ceptio n handling ends, the MD bit is
cleared to 0 and user mode is entered. There are certain registers and bits which can only be
accessed in privileged mode.
Rev. 5.00 May 29, 2006 page 50 of 698
REJ09B0146-0500
Page 99
Section 3 Memory Management Unit (MMU)
Section 3 Memory Management Unit (MMU)
This LSI has an on-chip memory management unit (MMU) that implements address translation.
This LSI's features a resident translation look-aside buffer (TLB) that caches information for usercreated address translation tables located in external memory. It enables high-speed translation of
virtual addresses into physical addresses. Address translation uses the paging system and supports
two page sizes (1 kbyte and 4 kbytes). The access right to virtual address space can be set for
privileged and user modes to provide memory protection.
3.1Role of MMU
The MMU is a feature designed to make efficient use of physical memory. As shown in figure 3.1,
if a process is smaller in size than the physical memory, the entire process can be mapped onto
physical memory. However, if the process increases in size to the extent that it no longer fits into
physical memory, it becomes necessary to partition the process and to map those parts requiring
execution onto memory as occasion demands (figure 3.1(1)). Having the process itself consider
this mapping onto physical memory would impose a large burden on the process. To lighten this
burden, the idea of virtual memory was born as a means of performing en bloc mapping onto
physical memory (figure 3.1(2)). In a virtual memory system, substantially more virtual memory
than physical memory is provided, and the process is mapped onto this virtual memory. Thus a
process only has to consider operation in virtual memory. Mapping from virtual memory to
physical memory is handled by the MMU. The MMU is normally controlled by the operating
system, switching physical memory to allow the virtual memory required by a process to be
mapped onto physical memory in a smooth fashion. Switching of physical memory is carried out
via secondary storage, etc.
The virtual memory system that came into being in this way is particularly effective in a timesharing system (TSS) in which a number of processes are running simultaneously (figure 3.1(3)).
If processes running in a TSS had to take mapping onto virtual memory into consideration while
running, it would not be possible to increase efficiency. Virtual memory is thus used to reduce this
load on the individual processes and so improve efficiency (figure 3.1(4)). In the virtual memory
system, virtual memory is allocated to each process. The task of the MMU is to perform efficient
mapping of these virtual memory areas onto physical memory. It also has a memory protection
feature that prevents one process from inadvertently accessing another process's physical memory.
When address translation from virtual memory to physical memory is performed using the MMU,
it may occur that the relevant translation information is not recorded in the MMU, with the result
that one process may inadvertently access the virtual memory allocated to another process. In this
case, the MMU will generate an exception, change the physical memory mapping, and record the
new address translation inform ation.
Rev. 5.00 May 29, 2006 page 51 of 698
REJ09B0146-0500
Page 100
Section 3 Memory Management Unit (MMU)
Although the functions of the MMU could also be implemented by software alone, the need for
translation to be performed by software each time a process accesses physical memory would
result in poor efficiency. For this reason, a buffer for address translation (translation look-aside
buffer: TLB) is provided in hardware to hold frequently used address translation information. The
TLB can be described as a cache for storing address translation information. Unlike cache
memory, however, if address translation fails, that is, if an exception is generated, switching of
address translation information is normally performed by software. This makes it possible for
memory management to be performed flexibly by software.
The MMU has two methods of mapping from virtual memory to physical memory: a paging
method using fixed-length address translation, and a segment method using variable-length
address translation. With the pag ing method, the unit of translation is a fixed-size address sp ace
(usually of 1 to 64 kbytes) called a page.
In the following text, this LSI's address space in virtual memory is referred to as virtual address
space, and address space in physical memory as physical memory space.
Virtual
Process 1
Physical
memory
Process 1
Physical
memory
Process 1
memory
MMU
Physical
memory
Process 1
Process 2
Process 3
Figure 3.1 MMU Functions
Rev. 5.00 May 29, 2006 page 52 of 698
REJ09B0146-0500
Physical
memory
(3)
(1)
Process 1
Process 2
Process 3
Virtual
memory
MMU
Physical
memory
(2)
(4)
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.