Document No. U14272EJ3V0UM00 (3rd edition)
Date Published November 2002 NS CP(K)
NEC Electronics Corporation 2000
MIPS Technologies, Inc. 1998
Printed in Japan
Page 2
[MEMO]
2
User’s Manual U14272EJ3V0UM
Page 3
NOTES FOR CMOS DEVICES
1PRECAUTION AGAINST ESD FOR SEMICONDUCTORS
Note:
Strong electric field, when exposed to a MOS device, can cause destruction of the gate oxide and
ultimately degrade the device operation. Steps must be taken to stop generation of static electricity
as much as possible, and quickly dissipate it once, when it has occurred. Environmental control
must be adequate. When it is dry, humidifier should be used. It is recommended to avoid using
insulators that easily build static electricity. Semiconductor devices must be stored and transported
in an anti-static container, static shielding bag or conductive material. All test and measurement
tools including work bench and floor should be grounded. The operator should be grounded using
wrist strap. Semiconductor devices must not be touched with bare hands. Similar precautions need
to be taken for PW boards with semiconductor devices on it.
2HANDLING OF UNUSED INPUT PINS FOR CMOS
Note:
No connection for CMOS device inputs can be cause of malfunction. If no connection is provided
to the input pins, it is possible that an internal input level may be generated due to noise, etc., hence
causing malfunction. CMOS devices behave differently than Bipolar or NMOS devices. Input levels
of CMOS devices must be fixed high or low by using a pull-up or pull-down circuitry. Each unused
DD
pin should be connected to V
being an output pin. All handling related to the unused pins must be judged device by device and
related specifications governing the devices.
or GND with a resistor, if it is considered to have a possibility of
3STATUS BEFORE INITIALIZATION OF MOS DEVICES
Note:
Power-on does not necessarily define initial status of MOS device. Production process of MOS
does not define the initial operation status of the device. Immediately after the power source is
turned ON, the devices with reset function have not yet been initialized. Hence, power-on does
not guarantee out-pin levels, I/O settings or contents of registers. Device is not initialized until the
reset signal is received. Reset operation must be executed immediately after power-on for devices
having reset function.
R4181, VR4300, VR4305, VR4310, VR4400, VR5000A, VR5432, and VR Series are trademarks of NEC
Electronics Corporation.
MIPS is a registered trademark of MIPS Technologies, Inc. in the United States.
MBA is a trademark of Vadem Corporation.
Pentium, Intel, and StrataFlash are trademarks of Intel Corporation.
DEC VAX is a trademark of Digital Equipment Corporation.
PC/AT is a trademark of International Business Machines Corporation.
User’s Manual U14272EJ3V0UM
3
Page 4
Exporting this product or equipment that includes this product may require a governmental license from the U.S.A. for some
countries because this product utilizes technologies limited by the export control regulations of the U.S.A.
•
The information in this document is current as of January, 2002. The information is subject to
change without notice. For actual design-in, refer to the latest publications of NEC Electronics data
sheets or data books, etc., for the most up-to-date specifications of NEC Electronics products. Not
all products and/or types are available in every country. Please check with an NEC Electronics sales
representative for availability and additional information.
No part of this document may be copied or reproduced in any form or by any means without the prior
•
written consent of NEC Electronics. NEC Electronics assumes no responsibility for any errors that may
appear in this document.
•
NEC Electronics does not assume any liability for infringement of patents, copyrights or other intellectual
property rights of third parties by or arising from the use of NEC Electronics products listed in this document
or any other liability arising from the use of such products. No license, express, implied or otherwise, is
granted under any patents, copyrights or other intellectual property rights of NEC Electronics or others.
Descriptions of circuits, software and other related information in this document are provided for illustrative
•
purposes in semiconductor product operation and application examples. The incorporation of these
circuits, software and information in the design of a customer's equipment shall be done under the full
responsibility of the customer. NEC Electronics assumes no responsibility for any losses incurred by
customers or third parties arising from the use of these circuits, software and information.
•
While NEC Electronics endeavors to enhance the quality, reliability and safety of NEC Electronics products,
customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely. To
minimize risks of damage to property or injury (including death) to persons arising from defects in NEC
Electronics products, customers must incorporate sufficient safety measures in their design, such as
redundancy, fire-containment and anti-failure features.
•
NEC Electronics products are classified into the following three quality grades: "Standard", "Special" and
"Specific".
The "Specific" quality grade applies only to NEC Electronics products developed based on a customerdesignated "quality assurance program" for a specific application. The recommended applications of an NEC
Electronics product depend on its quality grade, as indicated below. Customers must check the quality grade of
each NEC Electronics product before using it in a particular application.
"Standard": Computers, office equipment, communications equipment, test and measurement equipment, audio
and visual equipment, home electronic appliances, machine tools, personal electronic equipment
and industrial robots.
systems, anti-crime systems, safety equipment and medical equipment (not specifically designed
for life support).
"Specific": Aircraft, aerospace equipment, submersible repeaters, nuclear reactor control systems, life
support systems and medical equipment for life support, etc.
The quality grade of NEC Electronics products is "Standard" unless otherwise expressly specified in NEC
Electronics data sheets or data books, etc. If customers wish to use NEC Electronics products in applications
not intended by NEC Electronics, they must contact an NEC Electronics sales representative in advance to
determine NEC Electronics' willingness to support a given application.
(Note)
(1) "NEC Electronics" as used in this statement means NEC Electronics Corporation and also includes its
majority-owned subsidiaries.
(2) "NEC Electronics products" means any product developed or manufactured by or for NEC Electronics (as
defined above).
M8E 02. 11-1
4
User’s Manual U14272EJ3V0UM
Page 5
Regional Information
Some information contained in this document may vary from country to country. Before using any NEC
Electronics product in your application, pIease contact the NEC Electronics office in your country to
obtain a list of authorized representatives and distributors. They will verify:
•
Device availability
•
Ordering information
•
Product release schedule
•
Availability of related technical literature
•
Development environment specifications (for example, specifications for third-party tools and
components, host computers, power plugs, AC supply voltages, and so forth)
•
Network requirements
In addition, trademarks, registered trademarks, export restrictions, and other legal issues may also vary
from country to country.
NEC Electronics America, Inc. (U.S.)
Santa Clara, California
Tel: 408-588-6000
800-366-9782
Fax: 408-588-6130
800-729-9288
p. 30
p. 34
p. 35
pp. 38 to 42
p. 43
pp. 45, 46
p. 47
pp. 48, 49
p. 52
p. 53
p. 58
p. 60
pp. 63 to 66
pp. 67 to 90
p. 95
p. 97
pp. 97 to 101, 104, 105
p. 98
p. 101
p. 104
p. 105
pp. 106, 107
p. 108
p. 109
p. 111
p. 113
p. 114
p. 117
Major Revisions in This Edition (1/5)
Separation of the following parts of the previous (the 2nd) edition
CHAPTER 3 MIPS III INSTRUCTION SET SUMMARY, CHAPTER 4 M IPS16 INSTRUCTION SE T ,
CHAPTER 5 V
CHAPTER 7 EXCEPTION PROCESSING (second half), CHAPTER 9 CACHE MEMORY,
CHAPTER 10 CPU CORE INTERRUP T S, CHAPTER 27 MIPS III INSTRUCTIO N SET DETAILS,
CHAPTER 28 MIPS16 INSTRUCTION SET FORMAT
Deletion of modem block in
Modification of desc ri ption in
Modification of Remark i n
Addition of
Modification of desc ri ption and deletion of figure in
Addition of
Addition of descriptions in
Addition of
Connection Circuits of Resonator
Modification of Note in
Modification of descriptions for SYSDIR and SYSEN# and additi on of description in Note in
System bus interface signals
Addition of descript i on f o r I RDIN/RxD2 in
Addition and modificati on i n
Addition of
Circuits
Addition of
Modification of
Modification of desc ri ption in
Addition of description i n Note in
Modification in
Modification of desc ri ption in
Addition of description i n
Modification of desc ri ption in
Addition of
Modification in
Modification of desc ri ption in
Modification of desc ri ption for bit 4 and addition of Caution and Remark in
(0x0A00 0000)
Modification of desc ri ptions for bits 14 to 12, bit s 3 to 0, and Remark in
(0x0A00 000C)
Modification of
Deletion of description f or Di v4 mode and addition of description i n Rem ark in
clock (TClock)
4181 PIPELINE, CHAPTER 6 MEMORY MANAGEMENT SYSTEM (first half),
R
Figure 1-1. Internal Block Diagram
1.3.16 LCD interface
1.3.17 Wake-up events
1.4.2 CPU instruction set overview
and
1.4.3 Data formats and addressing
1.4.4 CP0 registers
1.4.9 Power modes
and
1.4.10 Code compatibility
1.5 Clock Interface
Figure 1-8. External Circuits of Clock Oscillator
and
Figure 1-9. Incorrect
2.2.1 System bus interface signals
2.2.10 IrDA interface signals
2.3 Pin Status in Specific Status
2.4 Recommended Connection of Unused Pins and I/O Circuit Types
CHAPTER 3 CP0 REGISTERS
Table 4-6. DRAM Address Map
5.1.1 RTC reset
Figure 5-1
through
Figure 5-5, Figure 5-8
, and
Figure 5-9
Figure 5-2. RSTSW Reset
5.1.5 HALTimer shutdown
5.3.1 Cold Reset
5.3.2 Soft Reset
5.4 Notes on Initialization
R
Figure 6-1. V
4181 Internal Bus Structure
6.1.2 (3) LCD module (LCD Control Unit)
6.2.1 BCUCNTREG1
6.2.3 BCUSPEEDREG
Figure 6-2. ROM Read Cycle and Access Parameters
6.2.6 (2) Peripheral
and
2.2.1
2.5 Pin I/O
6
User’s Manual U14272EJ3V0UM
Page 7
PageDescription
p. 119
p. 122
p. 123
pp. 125 to 128, 130
p. 129
p. 134
p. 135
p. 136
p. 137
p. 138
p. 140
p. 149
p. 150
p. 151
p. 152
p. 153
p. 156
p. 157
pp. 157, 158
p. 159
pp. 161, 162
p. 171
p. 173
p. 184
p. 186
p. 189
pp. 190, 191
p. 191
p. 192
p. 192
p. 192
p. 193
p. 194
p. 196
p. 197
Major Revisions in This Edition (2/5)
Modification of desc ri ption in
Modification of Remark i n
Modification of figure i n
Modification of
Figure 6-3
Addition of description i n
Addition of Caution and modifi cation in Remark in
Modification of desc ri ption for bits 6 to 4 in
Modification of Note in
Addition of description i n
Addition of description i n
Modification of desc ri ption for bits 10 and 9 and addition of description in
02C4)
Modification of desc ri ption for bits 3 and 2 in
Modification of values at reset in
(0x0A00 065A)
Addition of description for bit 8 in
Addition of description for bit 0 in
Addition of description for bits 5 and 4 in
Modification of desc ri ption and addition of Caution in
Addition of Caution in
Addition and modificati on of descriptions in
Modification of desc ri ption in
Addition of Remarks and description in
Addition of description i n
Modification of desc ri ption in
Modification of address and description for bits 2 and 1, and addition of description in
KIUINTREG (0x0B00 0086)
Modification of R/W and addition of description in
Modification of desc ri ption in
Addition and modificati on of descriptions in
Modification of desc ri ption in
Modification of location of
Modification of
Figure 10-2. EDO DRAM Sign als on RSTSW Reset (SDRAM Bit = 0)
Modification of desc ri ption in
Modification of desc ri ption in
Modification of desc ri ption of Caution in
Modification of signal nam e i n
Modification of desc ri ption in
6.3.2 Connection to external ROM (x 16) devices
6.3.3 (4) 64 Mbit PageROM
6.3.3 (5) 32 Mbit flash memory (when using Intel
through
Table 6-2. V
Figure 6-8
R
4181 EDO DRAM Capacity
6.5.2 MEMCFG_REG (0x0A00 0304)
6.5.3 MODE_REG (0x0A00 0308)
6.5.4 SDTIMINGREG (0x0A00 030C)
6.6 ISA Bridge
6.7.1 ISABRGCTL (0x0B00 02C0)
7.2.6 AIUDMAMSKREG (0x0A00 0046)
7.2.7 MICRCLENREG (0x0A00 0658)
7.2.9 MICDMACFGREG (0x0A00 065E)
7.2.10 SPKDMACFGREG (0x0A00 0660)
7.2.11 DMAITRQREG (0x0A00 0662)
8.1 Overview
Figure 8-1. SCK and SI/SO Relationship
8.2.2 SCK phase and CSI transfer timing
8.2.3 (1) Burst mode
8.3.1 CSIMODE (0x0B00 0900)
9.1 Overview
Table 9-1. ICU Registers
9.2.11 MAIUINTREG (0x0B00 0090)
Figure 10-1. Transition of V
R
4181 Power Mode
10.2.1 Power mode and state transition
Table 10-2. Operations During Reset
10.3.3 Deadman’s Switch reset
10.3.4 (2) Preserving SDRAM data
Table 10-3. Operations During Shutdown
10.5 Power-on Control
10.5.2 Activation via CompactFlash interrupt request
10.5.3 Activation via GPIO activation in terrupt request
TM
DD28F032)
6.7.3 XISACTL (0x0B00
and
7.2.8 SPKRCLENREG
9.2.9
User’s Manual U14272EJ3V0UM
7
Page 8
PageDescription
p. 198
pp. 201 to 204
pp. 205 to 207
p. 209
p. 211
p. 214
p. 215
p. 220
p. 238
p. 242
p. 254
p. 267
p. 270
p. 273
p. 275
p. 283
p. 286
p. 289
p. 290
p. 291
p. 292
p. 295
p. 298
p. 298
p. 301
pp. 303, 304
p. 308
p. 314
pp. 315, 316
p. 320
p. 321
p. 324
p. 325
p. 327
p. 328
Major Revisions in This Edition (3/5)
Modification of desc ri ption of Cautions in
Modification of desc ri ptions in
Addition of
Modification of desc ri ption for bit 6 in
Modification of value at reset for bit 7 in
Modification of desc ri ption for bit 2 to 0 in
Modification of desc ri ption for bit 4 in
Modification of value at reset for bit 15 in
Modification and addition of descriptions in
Modification of desc ri ption in
Modification of R/W f or bi ts 15 to 8 in
Modification of desc ri ption in
Modification of desc ri ption for bit 15 in
Modification of desc ri ption for bit 7 in
Addition of Caution in
Modification of location of Note in
Modification of desc ri ption for bits 5 to 0 in
Addition of description i n
Modification of desc ri ption in
Addition of description i n
Modification of values at reset for bits 2 to 0 in
Modification of desc ri ption in
Addition of Note in
Modification of
Modification of desc ri ption and addition of Caution in
Modification of address es in
(0x0B00 0162)
Modification of values at reset for bits 11, 10 and 5 and addition of Caution in
(0x0B00 016E)
Modification of values at reset for bits 11, 10 and 5 and addition of Caution in
(0x0B00 017E)
Addition of descriptions in
Modification of desc ri ption in
Modification of desc ri ption in
Modification of desc ri ption for bits 1 and 0 in
Modification of desc ri ptions for bits 14 to 10 and bits 4 t o 0 i n
Modification and addition of descriptions for bits 2 t o 0 i n
Modification of signal nam e i n
through
10.6.5
Figure 14-6. Touch/Release Detection Timing
Figure 14-7. A/D Port Scan Timing
10.6.1
10.6.8
13.2.5 16-bit bus cycles
13.3.15 KEYEN (0x0B00 031C)
14.1 General
14.3.6 PIUASCNREG (0x0B00 0130)
Table 14-4. PIUASCNREG Bit M an ipulation and States
14.3.7 PIUAMSKREG (0x0B00 0132)
Table 14-7. Mask Clear During Scan Sequencer Operation
15.2.1 SDMADATREG (0x0B00 0160)
15.3.1 Output (speaker)
16.2.6 Interrupts and status reporting
Table 16-3. KIU Interrupt Registers
17.1 General
10.5.4 Activation via DCD interrupt req u est
through
Table 14-3. PIUCNTREG Bit Man ipulation and States
10.6.4
10.7.1 PMUINTREG (0x0B00 00A0)
10.7.2 PMUCNTREG (0x0B00 00A2)
10.7.4 PMUDIVREG (0x0B00 00AC)
10.7.5 DRAMHIBCTL (0x0B00 00B2)
11.2.2 (3) ECMPHREG (0x0B00 00CC)
13.1.3 General-purpose registers
13.3.5 GPDATHREG (0x0B00 0308)
13.3.19 PCS1STRA (0x0B00 0326)
13.3.23 LCDGPMODE (0x0B00 032E)
14.3.4 PIUSTBLREG (0x0B00 0128)
14.3.8 PIUCIVLREG (0x0B00 013E)
15.1 General
and
15.2.2 MDMADATREG
and
15.3.2 Input (microphone)
16.3.3 KIUSCANS (0x0B00 0192)
16.3.4 KIUWKS (0x0B00 0194)
16.3.6 KIUINT (0x0B00 0198)
15.2.6 SCNVC_END
15.2.12 MCNVC_END
8
User’s Manual U14272EJ3V0UM
Page 9
PageDescription
p. 333
p. 333
p. 336
p. 337
p. 338
p. 341
p. 344
p. 345
p. 346
p. 346
p. 348
p. 349
pp. 350, 351
p. 352
p. 356
p. 357
p. 359
p. 360
p. 361
pp. 362, 364, 376
p. 365
p. 368
p. 373
p. 375
p. 377
p. 379
p. 380
pp. 381, 383, 395
p. 384
p. 387
p. 392
p. 394
p. 395
p. 397
Major Revisions in This Edition (4/5)
Modification of signal nam es in
Modification of desc ri ption for bit 0 in
Addition of Caution for bit 4 i n
Modification of desc ri ption for bit 7 in
Modification of desc ri ption and addition of Caution for bit 0 in
Modification of desc ri ptions for bits 7, 4, 3, and 0 i n
Modification of desc ri ption for bit 6 in
0x31)
Modification of desc ri ption for bits 7 and 6 and addition of description in
(Index: 0x13, 0x1B, 0x23, 0x2B, 0x33)
Addition of description i n
Modification of Remark for bits 5 to 0 in
0x35)
Modification of desc ri ption for bit 2 in
Modification of desc ri ption for bits 1 and 0 and addition of description in
(Index: 0x2F)
Addition of
Addition of
Addition of function f or bi t 2 in
Modification of desc ri ption in
Modification of figure i n
Addition of Caution in
Modification of desc ri ption in
Modification of values at reset in
Addition of description i n
Modification of desc ri ptions for bits 2 to 0 in
Modification of R/W and addition of description in
Modification of desc ri ptions for bits 7 to 4 in
Modification of R/W f or bi t 1 in
Addition of description and Caution in
Modification of desc ri ption in
Modification of values at reset in
Addition of description i n
Modification of desc ri ptions for bits 2 to 0 in
Modification of R/W and addition of description in
Modification of desc ri ptions for bits 7 to 4 in
Addition of description i n
Modification of R/W f or bi t 1 in
17.5 Memory Mapping of CompactFlash Card
17.6 Controlling Bus When CompactFlash Card Is Used
Table 19-2. Correspondence between Baud Rates and Divisors
19.3.14 SIUACTMSK_1 (0x0C00 001C)
20.1 General
Table 20-1. SIU2 Registers
through
20.3.1
Table 20-2. Correspondence between Baud Rates and Divisors
20.3.13 SIUIRSEL_2 (0x0C00 008)
20.3.16 SIUACTMSK_2 (0x0C00 000C)
19.3.3, 19.3.5
19.3.7 SIUFC_1 (0x0C00 0012: Write)
19.3.10 SIULS_1 (0x0C00 0015)
19.3.11 SIUMS_1 (0x0C00 0016)
20.3.3, 20.3.5
20.3.7 SIUFC_2 (0x0C00 0002: Write)
20.3.10 SIULS_2 (0x0C00 0005)
20.3.11 SIUMS_2 (0x0C00 0006)
, and
, and
19.3.12
20.3.12
17.4.16 MEMSELn_REG
17.4.22 VOLTSELREG
User’s Manual U14272EJ3V0UM
9
Page 10
PageDescription
p. 399
p. 401
p. 406
p. 420
p. 428
p. 429
p. 433
pp. 436 to 438
pp. 439 to 444
Major Revisions in This Edition (5/5)
Modification of desc ri ption in
Modification of bus width in
Modification of desc ri ption in
Addition of Remark in
Addition of Remark in
Addition of Caution in
Addition of Caution in
Addition of
Addition of
5.4 Notes on Initialization ............................................................................................................. 106
5.4.1 CPU core ..................................................................................................................................... 106
5.4.2 Internal peripheral units ............................................................................................................... 106
5.4.3 Returning from power mode ........................................................................................................ 107
CHAPTER 6 BUS CONTROL .............................................................................................................. 108
6.1 MBA Host Bridge ..................................................................................................................... 108
6.1.1 MBA Host Bridge ROM and register address space ................................................................... 109
6.1.2 MBA modules address space ...................................................................................................... 109
6.2 Bus Control Registers ............................................................................................................. 110
4181 Activation Sequence (When Activation Is OK) ............................................................................... 102
R
8-1.SCK and SI/SO Relationship ...................................................................................................................... 157
9-1.Outline of Interrupt Control .......................................................................................................................... 172
10-1.Transition of VR4181 Power Mode .............................................................................................................. 189
10-2.EDO DRAM Signals on RSTSW Reset (SDRAM Bit = 0) ........................................................................... 192
10-3.Activation via Power Switch Interrupt Request (BATTINH = H) .................................................................. 195
10-4.Activation via Power Switch Interrupt Request (BATTINH = L) .................................................................. 195
10-5.Activation via CompactFlash Interrupt Request (BATTINH = H) ................................................................ 196
10-6.Activation via CompactFlash Interrupt Request (BATTINH = L) ................................................................. 196
14-3.Internal Block Diagram of PIU ..................................................................................................................... 277
14-4.Scan Sequencer State Transition Diagram ................................................................................................. 278
14-5.Interval Times and States ........................................................................................................................... 286
21-6.Color Panel in 8-Bit Data Bus ..................................................................................................................... 409
21-10. FLM Period .................................................................................................................................................. 411
22-1.Example of Connection of PLL Passive Components ................................................................................. 430
A-1.Mask Circuit for RSTSW# Signal ................................................................................................................ 436
A-2.Release of Self-Refresh Mode by RSTSW# Signal (EDO DRAM) .............................................................. 437
A-3.Release of Self-Refresh Mode by RSTSW# Signal (SDRAM) .................................................................... 438
26
User’s Manual U14272EJ3V0UM
Page 27
LIST OF TABLES (1/2)
Table No.TitlePage
1-1.Supported PClock and TClock Frequencies ............................................................................................... 31
1-2.Devices Supported by System Bus ............................................................................................................. 31
4-3.Internal I/O Space 1 .................................................................................................................................... 94
4-4.Internal I/O Space 2 .................................................................................................................................... 94
4-5.MBA Bus I/O Space .................................................................................................................................... 95
6-1.Bus Control Registers ................................................................................................................................. 110
4181 EDO DRAM Capacity ..................................................................................................................... 129
10-1.Overview of Power Modes .......................................................................................................................... 190
10-2.Operations During Reset ............................................................................................................................ 191
10-3.Operations During Shutdown ...................................................................................................................... 193
14-3.PIUCNTREG Bit Manipulation and States .................................................................................................. 283
14-4.PIUASCNREG Bit Manipulation and States ................................................................................................ 290
14-5.Detected Data and Page Buffers ................................................................................................................ 293
14-6.A/D Ports and Data Buffers ......................................................................................................................... 294
14-7.Mask Clear During Scan Sequencer Operation .......................................................................................... 295
17-1.ECU Control Registers ................................................................................................................................ 328
19-2.Correspondence between Baud Rates and Divisors .................................................................................. 365
19-3.Interrupt Function ........................................................................................................................................ 367
20-2.Correspondence between Baud Rates and Divisors .................................................................................. 384
20-3.Interrupt Function ........................................................................................................................................ 386
21-1.LCD Panel Resolutions (in Pixels, TYP.) .................................................................................................... 399
21-2.Redefining LCD Interface Pins When LCD Controller Is Disabled .............................................................. 400
23-2.Calculation Example of CP0 Hazard and Number of Instructions Inserted ................................................. 435
28
User’s Manual U14272EJ3V0UM
Page 29
CHAPTER 1 INTRODUCTION
This chapter describes the outline of the VR4181 (µ PD30181), which is a 64-/32-bit microprocessor.
1.1 Features
The VR4181, which is a high-performance 64-/32-bit microprocessor employing the RISC (reduced instruction set
computer) architecture developed by MIPS
TM
, is one of the VR-Series microprocessor products manufactured by NEC
Electronics.
The VR4181 contains the VR4110TM CPU core of ultra-low-power consumption with cache memory, high-speed
product-sum operation unit, and memory management unit. It also has interface units for peripheral circuits such as
LCD controller, CompactFlash controller, DMA controller, keyboard interface, serial interface, IrDA interface, touch
panel interface, real-time clock, A/D converter and D/A converter required for the battery-driven portable information
equipment. The features of the VR
4181 are described below.
• Employs 0.25 µ m process
• 64-bit RISC VR4110 CPU core with pipeline clock up to 66 MHz (operation in 32-bit mode is available)
• Optimized 5-stage pipeline
• On-chip instruction and data caches with 4 KB each in size
• Write-back cache for reducing store operation that use the system bus
• 32-bit physical address space and 40-bit virtual address space, and 32 double-entry TLB
• Instruction set: MIPS III (with the FPU, LL and SC instructions left out) and MIPS16
• Supports MADD16 and DMADD16 instructions for executing a multiply-and-accumulate operation of 16-bit data
x 16-bit data + 64-bit data within one clock cycle
• Effective power management features, which include four operating modes, Fullspeed, Standby, Suspend and
Hibernate mode
• On-chip PLL and clock generator
• DRAM interface supporting 16-bit width SDRAM and EDO DRAM
• Ordinary ROM/PageROM/flash memory interface
• UMA based LCD controller
• 4-channel DMA controller
• RTC unit including 3-channel timers and counters
• Two UART-compatible serial interfaces and one clocked serial interface
• IrDA (SIR) interface
• Keyboard scan interface supporting 8 x 8 key matrix
• X-Y auto-scan touch panel interface
• CompactFlash interface compatible with ExCA
• A/D and D/A converters
• Includes ISA-subset bus
• Supply voltage: 2.5 V for CPU core, 3.3 V for I/O
4181 integrates an NEC Electronics’ VR4110 CPU core supporting both the MIPS III and MIPS16
instruction sets.
The VR4181 supports the following pipeline clock (PClock) and internal bus clock (TClock) frequencies. The
PClock is set by attaching pull-up or pull-down resistors to the CLKSEL(2:0) pins. The frequency of the TClock, which
is used in MBA bus, is set by PMUDIVREG register in Power Management Unit.
Table 1-1. Supported PClock and TClock Frequencies
PClock frequencyTClock frequency
65.4 MHz65.4/32.7/21.8 MHz
62.0 MHz62.0/31.0/20.7 MHz
49.1 MHz49.1/24.6 MHz
The VR4110 core of the VR4181 includes 4 KB of instruction cache and 4 KB of data cache.
The VR4110 core also supports the following power management modes:
• Fullspeed
• Standby
• Suspend
Note
• Hibernate
Note Suspend mode is supported only when the internal LCD controller has been disabled or the LCD panel
has been powered off.
1.3.2 Bus interface
The VR4181 incorporates single bus architecture. All external memory and I/O devices are connected to the same
22-bit address bus and 16-bit data bus. These external address and data bus are together called the system bus.
When the external bus operates at a very high speed, the DRAM data bus must be isolated from other low speed
devices such as ROM array. The VR4181 provides two pins, SYSEN# and SYSDIR, to control the data buffers for this
isolation.
The VR4181 supports the following types of devices connected to the system bus.
Table 1-2. Devices Supported by System Bus
DeviceData width
ROM, flash memory16 bits only
DRAM16 bits only
CompactFlash8 or 16 bits
External I/O8 or 16 bits
External memory8 or 16 bits
Six of the external bus interface signals, IORD#, IOWR#, IORDY, IOCS16#, MEMCS16# and RESET#, can be
individually defined as general-purpose I/O pins or LCD interface pin if they are not needed by external system
components.
User’s Manual U14272EJ3V0UM
31
Page 32
CHAPTER 1 INTRODUCTION
1.3.3 Memory interface
4181 provides control for both ROM/flash memory and DRAM. Up to four 16-bit ROM/flash memory banks
The VR
may be supported utilizing either 32-Mbit or 64-Mbit single cycle or page mode devices. Bank mixing is not supported
for ROM/flash memory. When a system implements less than the maximum 4 banks of ROM/flash memory, unused
ROM chip select pins can be defined as general-purpose I/O pins.
The VR4181 also supports up to 2 banks of 1M x 16 or 4M x 16 EDO-type DRAM or SDRAM at bus frequencies of
up to 66 MHz. When both banks are EDO-type DRAM, bank mixing is supported.
1.3.4 DMA controller (DCU)
The VR4181 provides a 4-channel DMA controller to support internal DMA transfers. The 4 channels are allocated
as follows:
• Channel 1 - Audio input
• Channel 2 - Audio output
• Channel 3, 4 - Reserved
1.3.5 Interrupt controller (ICU)
The VR4181 provides an interrupt controller which combines all interrupt request sources into one of the VR4110
core interrupt inputs - NMI and Int(2:0). The interrupt controller also provides interrupt request status reporting.
1.3.6 Real-time clock
The VR4181 includes a real-time clock (RTC), which allows time keeping based on the 32.768 kHz clock as a
source. The RTC operates as long as the VR4181 remains powered.
1.3.7 Audio output (D/A converter)
The VR4181 provides a 1-channel 10-bit D/A converter for generating audio output.
1.3.8 Touch panel interface and audio input (A/D converter)
The VR4181 provides an 8-channel 10-bit A/D converter for interfacing to a touch panel, an external microphone,
and other types of analog input.
1.3.9 CompactFlash interface (ECU)
The VR4181 provides an ExCA-compatible bus controller supporting a single CompactFlash slot. This interface is
shared with the keyboard interface logic and must be disabled when an 8 x 8 key matrix is connected to the VR4181.
1.3.10 Serial interface channel 1 (SIU1)
The VR4181 provides a 16550 UART for implementing an RS-232-C type serial interface. When the serial
interface is not needed, each of the 7 serial interface pins can be individually redefined as general-purpose I/O pins.
1.3.11 Serial interface channel 2 (SIU2)
The serial interface channel 2 is also based on a 16550 UART but only reserves 2 pins for the interface. The serial
interface channel 2 can be configured in one of the following modes:
• Simple 2-wire serial interface using TxD2 and RxD2
• SIR-type IrDA interface using IRDIN and IRDOUT
• Full RS-232-C compatible interface using TxD2, RxD2 and 5 GPIO pins
32
User’s Manual U14272EJ3V0UM
Page 33
CHAPTER 1 INTRODUCTION
1.3.12 Clocked serial interface (CSI)
4181 provides a clocked serial interface (CSI) which has an option to be configured as general-purpose I/O
The VR
pins. This interface supports slave mode operation only. The clocked serial interface requires allocation of 4 signals;
SI, SO, SCK, and FRM. The clock source for this interface is input on the pin assigned to SCK.
1.3.13 Keyboard interface (KIU)
The VR4181 provides support for an 8 x 8 key matrix. This keyboard interface can only be supported when the
CompactFlash interface is disabled and reconfigured to provide the SCANIN(7:0) inputs and the SCANOUT(7:0)
outputs.
1.3.14 General-purpose I/O
The VR4181 provides total 32 bits of general-purpose I/O. Sixteen of these, GPIO(31:16), are available through
pins allocated to other functions as shown in the following table. The DCD1#/GPIO29 is the only one of the 16 pins
that can cause the system’s waking up from a low power mode if enabled by software. The other pins have no
functions other than those listed below.
The remaining 16 bits of general-purpose I/O, GPIO(15:0), are allocated to pins by default. Each of these pins can
be configured to support a particular interface such as CSI, secondary serial interface (RS-232-C), programmable
chip selects, or color LCD control. Otherwise, each of these pins can be also defined as one of the following:
4181 provides support for 2 programmable chip selects (PCS) which are also available as general-purpose
The VR
I/O pins. Each PCS can decode either I/O or memory accesses and can optionally be qualified to read, write, or both
read and write.
1.3.16 LCD interface
The LCD controller of the VR4181 is Unified Memory Architecture (UMA) based in which the frame buffer is part of
system DRAM. The LCD controller supports monochrome STN LCD panels having 4-bit data bus interfaces and color
STN LCD panels having 8-bit data bus interface. When interfacing to a color LCD panel, general-purpose I/O pins
must be allocated to provide the upper nibble of the 8-bit LCD data bus.
In monochrome mode, the LCD controller supports 1-bpp mode (mono), 2-bpp mode (4 gray levels) and 4-bpp
mode (16 gray levels). In color mode, it supports 4-bpp mode (16 colors) and 8-bpp mode (256 colors).
The LCD controller includes a 256-entry x 18-bit color pallet. In 8-bpp color modes, the pallet is used to select 256
colors out of possible 262,144 colors.
The LCD controller supports LCD panels of up to 320 x 320 pixels. Typical LCD panel horizontal/vertical
resolutions are as follows.
Table 1-4. LCD Panel Resolutions (in Pixels, TYP.)
The LCD controller also provides power-on and power-down sequence control for the LCD panel via the VPLCD
and VPBIAS pins. Power sequencing is provided to prevent latch-up damage to the panel.
The LCD controller can be disabled to allow connection of an external LCDC with integrated frame buffer RAM
such as NEC Electronics’ µ PD16661. When the internal LCD controller is disabled, the SHCLK, LOCLK, VPLCD,
and VPBIAS pins are redefined as follows:
Table 1-5. Functions of LCD Interface Pins when LCD Controller Is Disabled
34
Redefined functionDefault function
LCDCS#SHCLK
MEMCS16#LOCLK
VPGPIO1VPLCD
VPGPIO0VPBIAS
User’s Manual U14272EJ3V0UM
Page 35
CHAPTER 1 INTRODUCTION
1.3.17 Wake-up events
The VR
4181 supports 4 power management modes: Fullspeed, Standby, Suspend, and Hibernate. Of these
modes, Hibernate is the lowest power mode and results in the powering off of all system components including the
2.5 V logic in the VR4181. The VR4181 3.3 V logic, which includes RTC, PMU, and non-volatile registers, remain
powered during the Hibernate mode, as does the system DRAM. Software can configure the VR4181 waking up from
the Hibernate mode and returning to Fullspeed mode due to any one of the following events:
• Activation of the DCD1# pin
• Activation of the POWER pin
• RTC alarm
• Activation of one of the GPIO(15:0) pins
• Activation of the CF_BUSY# pin (CompactFlash interrupt request (IREQ))
4111TM or the VR4121TM, the VR4181 will wake up after RTC reset without these
Remark Different from the V
R
wake-up events.
1.4 VR4110 CPU Core
Figure 1-2 shows the internal block diagram of the VR4110 CPU core.
In addition to the conventional high-performance integer operation units, this CPU core has the full-associative
format translation lookaside buffer (TLB), which has 32 entries that provide mapping to 2-page pairs (odd and even)
for one entry. Moreover, it also includes instruction cache, data cache, and bus interface.
Control(o)
Control(i)
Address/Data(o)
Address/Data(i)
Internal clock
Figure 1-2. V
Virtual address bus
Internal data bus
interface
R4110 CPU Core Internal Block Diagram
Bus
Data
cache
(4 KB)
Instruction
cache
(4 KB)
Clock
generator
CP0CPU
TLB
User’s Manual U14272EJ3V0UM
35
Page 36
CHAPTER 1 INTRODUCTION
(1) CPU
The CPU has hardware resources to process an integer instruction. They are the 64-bit register file, 64-bit
integer data path, and multiply-and-accumulate operation unit.
(2) Coprocessor 0 (CP0)
The CP0 incorporates a memory management unit (MMU) and exception handling function. MMU checks
whether there is an access between different memory segments (user, supervisor, and kernel) by executing
address translation. The translation lookaside buffer (TLB) translates virtual addresses to physical addresses.
(3) Instruction cache
The instruction cache employs direct mapping, virtual index, and physical tag. Its capacity is 4 KB.
(4) Data cache
The data cache employs direct mapping, virtual index, physical tag, and writeback. Its capacity is 4 KB.
(5) CPU bus interface
The CPU bus interface controls data transmission/reception between the VR
4110 core and the MBA Host Bridge.
This interface consists of two 32-bit multiplexed address/data buses (one is for input, and another is for output),
clock signal, and control signals such as interrupt requests.
(6) Clock generator
The following clock inputs are oscillated and supplied to internal units.
• 32.768 kHz clock for RTC unit
Crystal resonator input oscillated via an internal oscillator and supplied to the RTC unit.
• 18.432 MHz clock for serial interface and the VR4181’s reference operating clock
Crystal resonator input oscillated via an internal oscillator, and then multiplied by phase-locked loop (PLL) to
generate a pipeline clock (PClock). The internal bus clock (TClock) is generated from PClock and supplied to
peripheral units.
36
User’s Manual U14272EJ3V0UM
Page 37
CHAPTER 1 INTRODUCTION
1.4.1 CPU registers
4110 core has thirty-two 64-bit general-purpose registers (GPRs).
The VR
In addition, the processor provides the following special registers:
• 64-bit Program Counter (PC)
• 64-bit HI register, containing the integer multiply and divide upper doubleword result
• 64-bit LO register, containing the integer multiply and divide lower doubleword result
Two of the general-purpose registers have assigned functions as follows:
• r0 is hardwired to a value of zero, and can be used as the target register for any instruction whose result is to
be discarded. r0 can also be used as a source when a zero value is needed.
• r31 is the link register used by link instructions, such as JAL (Jump and Link) instruction. This register can be
used for other instructions. However, be careful that use of the register by a link instruction will not coincide
with use of the register for other operations.
The register group is provided within the CP0, to process exceptions and to manage addresses.
CPU registers can operate as either 32-bit or 64-bit registers, depending on the VR4181 processor mode of
operation.
The operation of the CPU registers differs depending on what instructions are executed: 32-bit instructions or
MIPS16 instructions. For details, refer to V
4181 has no Program Status Word (PSW) register as such; this is covered by the Status and Cause
The VR
R4100 Series Architecture User’s Manual.
registers incorporated within the CP0 (see 1.4.4 CP0 registers).
Figure 1-3 shows the CPU registers.
General-purpose registers
r0 = 0
r1
r2
r29
r30
r31 = LinkAddress
Figure 1-3. CPU Registers
0313263
Multiply/divide registers
HI
31
32
LO
Program Counter
31633263
PC
0313263
0
0
User’s Manual U14272EJ3V0UM
37
Page 38
CHAPTER 1 INTRODUCTION
1.4.2 CPU instruction set overview
There are two types of CPU instructions: 32-bit length instructions (MIPS III) and 16-bit length instructions
(MIPS16). Use of the MIPS16 instructions is enabled or disabled by setting MIPS16EN pin during a reset.
For details about instruction formats and their fields in each instruction set and operation of each instruction, refer
to VR4100 Series Architecture User’s Manual.
(1) MIPS III instructions
All the CPU instructions are 32-bit length when executing MIPS III instructions, and they are classified into three
instruction formats as shown in Figure 1-4: immediate (I type), jump (J type), and register (R type).
Figure 1-4. CPU Instruction Formats (32-Bit Length Instruction)
3126 2521 2016 150
oprsrtimmediateI - type (Immediate)
3126 250
optargetJ - type (Jump)
3126 2521 2016 150
oprsrtsaR - type (Register)
11 106 5
rdfunct
The instruction set can be further divided into the following five groupings:
(a) Load and store instructions move data between the memory and the general-purpose registers. They are all
immediate (I-type) instructions, since the only addressing mode supported is base register plus 16-bit,
signed immediate offset.
(b) Computational instructions perform arithmetic, logical, shift, and multiply and divide operations on values in
registers. They include R-type (in which both the operands and the result are stored in registers) and I-type
(in which one operand is a 16-bit signed immediate value) formats.
(c) Jump and branch instructions change the control flow of a program. Jumps are made either to an absolute
address formed by combining a 26-bit target address with the higher bits of the program counter (J-type
format) or register-specified address (R-type format). The format of the branch instructions is I type.
Branches have 16-bit offsets relative to the program counter. JAL instructions save their return address in
register 31.
(d) System control coprocessor (CP0) instructions perform operations on CP0 registers to control the memory-
management and exception-handling facilities of the processor.
(e) Special instructions perform system calls and breakpoint exceptions, or cause a branch to the general
exception-handling vector based upon the result of a comparison. These instructions occur in both R-type
and I-type formats.
38
User’s Manual U14272EJ3V0UM
Page 39
CHAPTER 1 INTRODUCTION
(2) MIPS16 instructions
All the CPU instructions except for JAL and JALX are 16-bit length when executing MIPS16 instructions, and
they are classified into thirteen instruction formats as shown in Figure 1-5.
Figure 1-5. CPU Instruction Formats (16-Bit Length Instruction)
I-type
RI-type
RR-type
RRI-type
RRR-type
RRI-A-type
Shift-type
I8-type
15
op
10 8 7
opimmediate
opfunct
RRIimmediate
RRRF
RRI-AF
SHIFTF
I8immediate
rx
10 8 7
rx
10 8 7
rx
10 8 7
rx
10 8 7
rx
10 8 7
rx
10 8 7
funct
immediate
54
ry
54
ry
54
ry
5 4
ryimmediate
54
ryShamt
21
rz
3
21
01011
01115
01115
01115
01115
01115
01115
01115
I8_MOVR32-type
I8_MOV32R-type
I64-type
RI64-type
Immediate(15:0)
10 8 7
I8r32(4:0)
15 10 8 7 3 2
I8r32(2:0)functrz
I64immediate
I64immediate
JAL/JALX-type
16 15
JAL
funct
10 8 7
funct
10 8 7
funct
11 10 9 5 4
X
Immediate(20:16)
54
ry
54
r32(4:3)
54
ry
Immediate(25:21)
01115
011
01115
01115
031
User’s Manual U14272EJ3V0UM
39
Page 40
CHAPTER 1 INTRODUCTION
The instruction set can be further divided into the following four groupings:
(a) Load and store instructions move data between memory and general-purpose registers. They include RRI,
RI, I8, and RI64 types.
(b) Computational instructions perform arithmetic, logical, shift, and multiply and divide operations on values in
registers. They include RI, RRIA, I8, RI64, I64, RR, RRR, I8_MOVR32, and I8_MOV32R types.
(c) Jump and branch instructions change the control flow of a program. They include JAL/JALX, RR, RI, I8, and I
types.
(d) Special instructions are BREAK and Extend instructions. The BREAK instruction transfers control to an
exception handler. The Extend instruction extends the immediate field of the next instruction. They are RR
and I types. When extending the immediate field of the next instruction by using the Extend instruction, one
cycle is needed for executing the Extend instruction, and another cycle is needed for executing the next
instruction.
1.4.3 Data formats and addressing
The VR4181 uses the following four data formats:
• Doubleword (64 bits)
• Word (32 bits)
• Halfword (16 bits)
• Byte (8 bits)
If the data format is any one of halfword, word, or doubleword, the byte ordering can be set as either big endian or
little endian. However, the VR4181 only support the little-endian order.
Endianness refers to the location of byte 0 within the multi-byte data structure. Figure 1-6 show the configuration.
When configured as a little-endian system, byte 0 is always the least-significant (rightmost) byte, which is
compatible with PentiumTM and DEC VAXTM conventions.
In this manual, bit designations are always little endian.
40
User’s Manual U14272EJ3V0UM
Page 41
CHAPTER 1 INTRODUCTION
Figure 1-6. Byte Address in Little-Endian Byte Order
(a) Word data
3124 2316 158 70
High-order
address
Low-order
address
15
11
14
10
7
3
6
2
13
9
5
1
(b) Doubleword data
WordHalfwordByte
63032 3116 158 7
High-order
address
Low-order
address
23
15
22
21
20
19
18
14
13
12
11
10
7
6
5
4
3
Remarks 1. The lowest byte is the lowest address.
2. The address of word data is specified by the lowest byte’s address.
Word
address
12
8
4
0
17
16
9
8
2
1
0
12
8
4
0
Doubleword
address
16
8
0
User’s Manual U14272EJ3V0UM
41
Page 42
CHAPTER 1 INTRODUCTION
The CPU core uses the following byte boundaries for halfword, word, and doubleword accesses:
• Halfword: An even byte boundary (0, 2, 4...)
• Word: A byte boundary divisible by four (0, 4, 8...)
• Doubleword: A byte boundary divisible by eight (0, 8, 16...)
The following special instructions are used to load and store data that are not aligned on 4-byte (word) or 8-byte
(doubleword) boundaries:
• Word access:LWL, LWR, SWL, SWR
• Doubleword access: LDL, LDR, SDL, SDR
These instructions are used in pairs of L and R.
Accessing unaligned data requires one additional instruction cycle (1 PCycle) over that required for accessing
aligned data.
Figure 1-7 shows the access of an unaligned word that has byte address 3.
Figure 1-7. Unaligned Word Accessing (Little Endian)
High-order address
Low-order address
3124 2316 158 70
654
3
42
User’s Manual U14272EJ3V0UM
Page 43
CHAPTER 1 INTRODUCTION
1.4.4 CP0 registers
The CP0 has thirty-two registers, each of which has its own register number.
Table 1-6 shows simple descriptions of each register. For the detailed descriptions of the registers, refer to
CHAPTER 3 CP0 REGISTERS.
Table 1-6. System Control Coprocessor (CP0) Register Definitions
NumberRegisterUsageDescription
0IndexM em ory managementProgrammable pointer to TLB array
1RandomMemory managementPseudo-random pointer to TLB array (read only)
2EntryLo0Memory managementLower half of TLB entry for even VPN
3EntryLo1Memory managementLower half of TLB entry for odd VPN
4ContextException processi ngPointer to kernel virtual PTE in 32-bit mode
5PageMaskMemory managementPage size s pecification
6WiredMemory managementNumber of wired TLB entri es
7−−Reserved for future use
8BadVAddrException processi ngVirtual address where the most recent error occurred
9CountException processingTimer count
10EntryHiMemory managementHigher half of TLB entry (includi ng ASID)
11CompareExc eption processingTimer compare value
12StatusException processi ngStatus indic ation
13Caus eException processingCause of last exception
14EPCException processi ngException P rogram Count er
15PRI dMemory managementProcessor revi sion identifier
16Confi gMemory managementConfiguration (memory system modes) specification
Note1
17
18WatchLoException processingMemory reference t rap address low bits
19WatchHiException processingMemory reference trap address high bits
20XCont extException processingPointer to kernel virtual P T E i n 64-bi t mode
21 to 25−−Reserved for future use
26
27
28TagLoMemory managementLower half of cache tag
29TagHiMemory managementHigher half of cache tag
30ErrorEPCException processi ngError Excepti on P rogram Counter
31−−Reserved for future use
LLAddr
Parity Error
Cache Error
Note2
Note2
Memory managementPhysic al address for self diagnostics
Exception processi ngCache parity bits
Exception processi ngIndex and status of cache error
Notes1. This register is defined to maintain compatibility with the VR
meaningless during normal operations.
4100TM. This register is not used in the VR4181
2. This register is defined to maintain compatibility with the V
R
hardware.
User’s Manual U14272EJ3V0UM
4000TM and VR4400TM. This register is
43
Page 44
CHAPTER 1 INTRODUCTION
1.4.5 Floating-point unit (FPU)
4181 does not support the floating-point unit (FPU). Coprocessor Unusable exception will occur if any FPU
The VR
instructions are executed. If necessary, FPU instructions should be emulated by software in an exception handler.
1.4.6 Memory management unit
The VR4181 has a 32-bit physical addressing range of 4 GB. However, since it is rare for systems to implement a
physical memory space as large as that memory space, the CPU provides a logical expansion of memory space by
translating addresses composed in the large virtual address space into available physical memory addresses.
The VR4181 has three operating modes: User, Supervisor, and Kernel. The manner in which memory addresses
are mapped depends on these operating modes.
In addition, the VR4181 supports the 32-bit and 64-bit addressing modes. The manner in which memory
addresses are translated or mapped depends on these addressing modes.
A detailed description of the physical address space is given in CHAPTER 4 MEMORY MANAGEMENT
SYSTEM. For details about the virtual address space, refer to V
R4100 Series Architecture User’s Manual.
(1) Translation lookaside buffer (TLB)
Virtual memory mapping is performed using the translation lookaside buffer (TLB). The TLB translates virtual
addresses to physical addresses. It runs by a full-associative method and has 32 entries, each of which two
successive pages are mapped.
The TLB of the VR
4181 holds both instruction addresses and data addresses so that it is called as joint TLB
(JTLB).
The page size can be configured, on a per-entry basis, to map a page size of 1 KB to 256 KB, in power of four. A
CP0 register stores the size of the page to be mapped, and that size is entered into the TLB when a new entry is
written. Thus, operating systems can provide special purpose maps; for example, a typical frame buffer can be
memory-mapped using only one TLB entry.
Translating a virtual address to a physical address begins by comparing the virtual address from the processor
with the physical addresses in the TLB. There is a match when the virtual page number (VPN) of the address is
the same as the VPN field of an entry, and either the Global (G) bit of the TLB entry is set, or the ASID field of the
virtual address is the same as the ASID field of the TLB entry.
This match is referred to as a TLB hit. If there is no match, a TLB Miss exception is taken by the processor and
software is allowed to refill the TLB from a page table of virtual/physical addresses in memory.
1.4.7 Cache
The VR4181 chip incorporates instruction and data caches, which are independent of each other. This
configuration enables high-performance pipeline operations. Both caches have a 64-bit data bus, enabling a oneclock access. These buses can be accessed in parallel. The instruction cache of the VR4181 has a storage capacity
of 4 KB, while the data cache has a capacity of 4 KB.
For details about caches, refer to V
R4100 Series Architecture User’s Manual.
1.4.8 Instruction pipeline
4181 has a 5-stage instruction pipeline. Under normal circumstances, one instruction is issued each cycle.
The VR
For details, refer to V
44
R4100 Series Architecture User’s Manual.
User’s Manual U14272EJ3V0UM
Page 45
CHAPTER 1 INTRODUCTION
1.4.9 Power modes
4181 supports four power modes: Fullspeed mode, Standby mode, Suspend mode, and Hibernate mode. A
The VR
detailed description of these power modes is also given in CHAPTER 10 POWER MANAGEMENT UNIT (PMU).
(1) Fullspeed mode
This is the normal operation mode.
The VR4181’s default status sets operation under Fullspeed mode. After a reset, the VR4181 returns to Fullspeed
mode.
(2) Standby mode
When a STANDBY instruction has been executed, the processor can be set to Standby mode. During Standby
mode, the pipeline clock (PClock) in the CPU core is held at high level. The peripheral units all operate as they
do during Fullspeed mode. This means that DMA operations are enabled during Standby mode.
During Standby mode, the processor returns to Fullspeed mode if any interrupt request occurs.
(3) Suspend mode
When the SUSPEND instruction has been executed, the processor can be set to Suspend mode. During
Suspend mode, the pipeline clock (PClock) in the CPU core is held at high level. The VR4181 also stops
supplying TClock and PCLK to peripheral units. While in this mode, the register and cache contents are retained.
Contents of DRAM can also be retained by putting DRAM into self-refresh mode.
During Suspend mode, the processor returns to Fullspeed mode if any of power-on factors or some of interrupt
requests occurs.
(4) Hibernate mode
When the HIBERNATE instruction has been executed, the processor can be set to Hibernate mode. During
Hibernate mode, clocks other than the RTC clock (32.768 kHz) are held at high level and the PLL stops. While in
this mode, contents of the registers and caches are not retained. Contents of DRAM can be retained by putting
DRAM into self-refresh mode.
Power consumption during Hibernate mode is about 0 W if power to 2.5 V power supply is not applied (it does
not go completely to 0 W due to the existence of a 32.768 kHz oscillator or on-chip peripheral circuits that
operate at 32.768 kHz).
During Hibernate mode, the processor returns to Fullspeed mode if any of power-on factors or some of interrupt
requests occurs.
User’s Manual U14272EJ3V0UM
45
Page 46
CHAPTER 1 INTRODUCTION
1.4.10 Code compatibility
R4110 core is designed in consideration of the program compatibility to other VR-Series processors.
The V
However since it has some differences from other processors on their architecture, it cannot necessarily execute all
programs that can be executed in other VR-Series processors, and also other VR-Series processors cannot
necessarily execute all programs that can be executed in the VR4110 core.
Matters that should be paid attention to when porting programs between the VR4110 core and other VR-Series
processors are listed below.
• A 16-bit length MIPS16 instruction set is added in the VR4110 core.
• Multiply-add instructions (MADD16, DMADD16) are added in the VR4110 core.
• Instructions for power modes (HIBERNATE, STANDBY, SUSPEND) are added in the VR4110 core to support
power modes.
• The VR4110 core does not support floating-point instructions since it has no Floating-Point Unit (FPU).
• The VR4110 core does not have the LL bit to perform synchronization of multiprocessing. Therefore, it does not
support instructions that manipulate the LL bit (LL, LLD, SC, SCD).
• The CP0 hazards of the VR4110 core are equally or less stringent than those of the VR4000.
For more information about each instruction, refer to V
manuals of each product other than the V
R4100 Series.
R4100 Series Architecture User’s Manual, and user’s
Instructions supported by each of the VR Series processors are listed below.
(16 bits)
Floating-point operationN/AN/AAAAA
Power mode transitionAAN/AAAN/A
V
4121
R
4122
VR
A
(32 bits)
VR4300
TM
VR4305
VR4310
N/AN/AA
Series Processors
R
TM
VR5000A
TM
TM
TM
VR5432
TM
VR10000
VR12000
TM
TM
N/A
(32 bits)
46
User’s Manual U14272EJ3V0UM
Page 47
CHAPTER 1 INTRODUCTION
1.5 Clock Interface
The VR4181 has the following eight clocks.
• CLKX1, CLKX2 (input)
These are oscillation inputs of 18.432 MHz, and used to generate operation clocks for the CPU core, serial
interface, and other peripheral units.
• RTCX1, RTCX2 (input)
These are oscillation inputs of 32.768 kHz, and used for PMU, RTC, and so on.
• PClock (internal)
This clock is used to control the pipeline in the VR4110 core, and for units relating to the pipeline. This clock is
generated from the clock input of CLKX1 and CLKX2 pins via the PLL. Its frequency is determined by
CLKSEL(2:0) pins.
• MasterOut (internal)
This is a bus clock of the VR4110 core, and used for interrupt control. This clock operates in frequency of 1/4 of
the TClock frequency. The contents of the CP0’s Count register are incremented synchronously with this clock.
• TClock (internal)
This is an operation clock for internal MBA bus and is supplied to the internal MBA modules (memory controller,
LCD controller, and DMA controller). This clock is generated from PClock and its frequency is 1/1, 1/2, or 1/3 of
the PClock frequency (it is determined by internal register setting). It is set to 1/2 by default.
• PCLK (internal)
This clock is supplied to the internal ISA peripherals. This clock is generated from TClock and its frequency is
determined by internal register setting. PCLK will operate only when accesses to the internal ISA bus occur.
• SYSCLK (internal, output)
This clock is used as the external ISA bus clock. It is also supplied to the internal CompactFlash controller. This
clock is generated from PCLK and its frequency is determined by internal register setting. SYSCLK will operate
only when accesses to the external ISA bus occur.
• SDCLK (output)
This clock is supplied to SDRAM. This clock operates in the same frequency as that of TClock. SDCLK will
operate only when accesses to SDRAM occur.
User’s Manual U14272EJ3V0UM
47
Page 48
CHAPTER 1 INTRODUCTION
Figure 1-8 shows the external circuits of the clock oscillator.
Figure 1-8. External Circuits of Clock Oscillator
(a) Crystal oscillation(b) External clock
VR4181
GND_OSC
Note 1
Note 2
External
clock
Open
VR4181
Note 1
Note 2
Notes 1. CLKX1, RTCX1
2. CLKX2, RTCX2
Cautions1.When using the clock oscillator, wire as follows in the area enclosed by the broken line in
the above figures to avoid an adverse effect from wiring capacitance.
• Keep the wiring length as short as possible.
• Do not cross the wiring with the other signal lines. Do not route the wiring near a
signal line through which a high fluctuating current flows.
• Always make the ground point of the oscillator capacitor the same potential as GND.
Do not ground the capacitor to a ground pattern through which a high current flows.
• Do not fetch signals from the oscillator.
2.Ensure that no load such as wiring capacity is applied to the CLKX2 or RTCX2 pin when
inputting an external clock.
Figure 1-9 shows examples of the incorrect connection circuit of the resonator.
48
User’s Manual U14272EJ3V0UM
Page 49
CHAPTER 1 INTRODUCTION
Figure 1-9. Incorrect Connection Circuits of Resonator
(a) Connection circuit wiring is too long.
Note 1
(c) A high fluctuating current flows near a signal line.
Note 1
Note 2
Note 3Note 3
Note 3
Note 2
(b) There is another signal line crossing.
Note 1
(d) A current flows over the ground line of the
oscillator
(The potentials of points A, B, and C change).
ADD(21:0) : Address Bus
ADIN(2:0) : Analog Data Input
AUDIOIN : Audio Input
AUDIOOUT : Audio Output
BATTINH : Battery Inhibit
BATTINT# : Battery Interrupt
CAS# : Column Address Strobe
CD1#, CD2# : Card Detect for CompactFlash
CF_AEN# : Address Enable for CompactFlash Buffer
CF_BUSY# : Ready/Busy/Interrupt Request for CompactFlash
CF_CE(2:1)# : Card Enable for CompactFlash
CF_DEN# : Data Enable for CompactFlash Buffer
CF_DIR : Data Direction for CompactFlash Buffer
CF_IOIS16# : I/O is 16 bits for CompactFlash
CF_IOR# : I/O Read Strobe for CompactFlas h
CF_IOW# : I/O Write Strobe for CompactFlash
CF_OE# : Output Enable for CompactFlash
CF_REG# : Register Memory Access for CompactFlash
CF_RESET : Reset f or CompactFlash
CF_STSCHG# : Status Change of CompactFlash
CF_VCCEN# : V
CF_WAIT# : Wait Input for CompactFlash
CF_WE# : Write Enable for CompactFlash
CLKEN : Clock Enable for SDRAM
CLKSEL(2:0) : Clock Select
CLKX1, CLKX2 : Clock Input
CTS1#, CTS2# : Clear to Send
DATA(15:0) : Data Bus
DCD1#, DCD2# : Data Carrier Detect
DSR1#, DSR2# : Data Set Ready
DTR1#, DTR2# : Data Terminal Ready
FLM : First Line Clock f or LCD
FPD(7:0) : Screen Data of LCD
FRM : Clocked Serial Frame
GND_AD : Ground for A/D and D/A Converter
GND_IO : Ground for I/O
GND_LOGIC : Ground for Logic
GND_OSC : Ground for Oscillator
GND_PLL : Ground for PLL
GND_TP : Ground for Touch Panel
GPIO(31:0) : General Purpose I/ O
IOCS16# : I/O 16-bit Bus Siz ing
IORD# : I/O Read
IORDY : I/O Ready
IOWR# : I/O Write
IRDIN : IrDA Data Input
IRDOUT : IrDA Data Output
LCAS# : Lower Column Address Strobe
LCDCS# : Chip Select f o r L CD
CC
Enable for CompactFlash
LDQM : Lower Byte Enable for SDRAM
LEDOUT : LED Output
LOCLK : Load Clock for LCD
M : LCD Modulation Clock
MEMCS16# : Memory 16-bit Bus Sizing
MEMRD# : Memory Read
MEMWR# : Memory Write
MIPS16EN : MIPS16 Enable
MPOWER : Main Power
PCS(1:0)# : Programmable Chip Select
POWER : Power Switch
POWERON : P o wer On State
RAS(1:0)# : Row Address Strobe for DRAM
RESET# : Reset Output
ROMCS(3:0)# : Chip Select f or ROM
RSTSW# : Reset Switch
RTCRST# : Real-t i me Cl o ck Reset
RTCX1, RTCX2 : Real-time Clock Input
RTS1#, RTS2# : Request to Send
RxD1, RxD2 : Re ceive Data
SCANIN(7:0) : Scan Data Input
SCANOUT(7:0) : Scan Data Output
SCK : CSI (Clocked Serial Interface) Clock
SDCLK : Operation Clock for SDRAM
SDCS(1:0)# : Chip Select for SDRAM
SDRAS# : Row Address Strobe for SDRAM
SHCLK : Shift Clock for LCD
SI : Clocked Serial Data Input
SO : Clocked Serial Data Output
SYSCLK : Sy s tem Clock for System Bus
SYSDIR : System Data Direction
SYSEN# : Sy s tem Data Enable
TPX(1:0) : Touch Panel Data of X
TPY(1:0) : Touch Panel Data of Y
TxD1, TxD2 : Transmit Data
UBE# : Upper Byte Enable for System Bus
UCAS# : Upper Column Address Strobe for DRAM
UDQM : Upper Byte Enable for SDRAM
VDD_AD : Power Supply for A/D and D/A Converter
VDD_IO : Power Supply for I/O
VDD_LOGIC : Power Supply for Logic
VDD_OSC : Power Supply for Oscillator
VDD_PLL : Power Supply for PLL
VDD_TP : Power Supply f or Touch Panel
VPBIAS : Bias Power Control for LCD
VPGPIO(1:0) : General Purpose Output for LCD Panel Power
Control
VPLCD : Logic Power Control for LCD
Remark # indicates active low.
User’s Manual U14272EJ3V0UM
51
Page 52
CHAPTER 2 PIN FUNCTIONS
2.2 Pin Function Description
Remark # indicates active low.
2.2.1 System bus interface signals
Signal nameI/ODescription of funct i on
ADD(21:0)
DATA(15:0)I/OData bus.
IORD#/GPIO16I/OSystem bus I/O read signal output or general-purpose I/O.
IOWR#/GPIO17I/OSystem bus I/O write signal output or general -purpose I/O.
IORDY/GPIO18I/OSystem bus I/O channel ready i nput or general -purpose I/O.
IOCS16#/GPIO19I/OBus sizing request input for system bus I/O or general-purpose I/O.
UBE#/GPIO20/MI/OSystem bus upper by te enable output, general-purpose input, or LCD modul ation
RESET#/GPIO21I/OSystem bus reset out put or general-purpose I/O.
Note
OutputAddress bus.
Used to specify addres s for the DRAM, ROM, flas h memory, or system bus (ISA).
Used to transmit and receive data between the V
memory, or system bus.
It is active when t he V
when configured as IORD#.
It is active when t he V
when configured as IOWR#.
Set this signal as active when system bus controller is ready to be accessed by the
V
4181 when configured as IORDY.
R
Set this signal as active when system bus I/O accesses data in 16-bit width, if
configured as IOCS16#.
output.
During system bus accesses, this signal is active when the high-order byte is valid on
the data bus.
It is active when t he V
RESET#.
4181 and DRAM, ROM, flash
R
4181 accesses the system bus to read data from an I/O port
R
4181 accesses the system bus to write data to an I/O port
R
4181 resets the system bus controller when configured as
R
(1/2)
Note The VR
4181 utilizes different addressings depending on the types of the external accesses.
During ROM accesses, bits 22 to 1 of the internal address lines are output to the ADD(21:0) pins (the
minimum transfer data width is a half word (1 word = 32 bits)).
During accesses other than ROM accesses, bits 21 to 0 of the internal address lines are output to the
ADD(21:0) pins (the minimum transfer data width is 1 byte).
52
User’s Manual U14272EJ3V0UM
Page 53
CHAPTER 2 PIN FUNCTIONS
Signal nameI/ODescription of funct i on
SYSDIR
SYSEN#
SDCS(1:0)#/RAS(1:0)#OutputSDRAM chip select for bank 0 and bank 1 or EDO DRAM row address strobes.
CAS#OutputSDRAM c ol um n address strobe. Leave unconnect ed when using EDO DRAM.
SDRAS#OutputSDRAM row address s trobe. Leave unconnected when using EDO DRA M .
UDQM/UCAS#OutputS DRA M upper byte enable or EDO DRAM upper byte col um n address strobe.
LDQM/LCAS#OutputSDRAM lower byte enable or EDO DRAM lower byte column address strobe.
SDCLKOutputSDRAM operating clock.
CLKENOutputSDRA M clock enable output (CKE).
ROMCS3#OutputROM chip select output for bank 3.
ROMCS2#/GPIO24I/OROM chip select out put for bank 2, or general-purpose I/O.
ROMCS1#/GPIO23I/OROM chip select out put for bank 1, or general-purpose I/O.
ROMCS0#/GPIO22I/OROM chip select out put for bank 0, or general-purpose I/O.
MEMRD#OutputMemory read signal f or ROM and system bus.
MEMWR#OutputM em ory write signal for ROM, DRAM and system bus.
Note
Note
OutputData bus isolati on buffer direction control. This signal is valid only when ROM , ISA,
or CompactFlash acces ses are enabled.
This becomes low level during ROM , ISA, or CompactFlas h read cycle, or becomes
high level during ROM, ISA, or CompactFlash write cycle.
OutputData bus isolati on buffer enable. This signal is valid only when ROM, ISA, or
CompactFlash acces ses are enabled.
This becomes active during ROM or ISA cycle.
(2/2)
Note The SYSEN# and SYSDIR signals control a buffer which is used to isolate SDRAM data bus from the bus of
other low speed devices. By isolating the high-speed data bus of SDRAM, the load of the data bus between
4181 and SDRAM is reduced.
the VR
When the EXBUFFEN bit of the XISACTL register is cleared to 0, the SYSEN# and SYSDIR signals start their
operation. These signals keep low level until EXBUFFEN bit is cleared to 0 after a reset.
When an isolation buffer is used, SYSEN# and SYSDIR signals function as follows;
SYSEN#SYSDIRBus operation
00External ISA, Compact F l ash, or ROM read cycle
01External ISA, CompactFlash, or flash memory mode write cycle
1Don’t careExternal Buffer Disable
DRAM read/write cycle or Hibernate mode
User’s Manual U14272EJ3V0UM
53
Page 54
CHAPTER 2 PIN FUNCTIONS
2.2.2 LCD interface signals
Signal nameI/ODescription of funct i on
SHCLK/LCDCS#OutputLCD shift clock output or chip select for external LCD controller.
LOCLK/MEMCS16#I/OLCD load clock output or bus sizing request input for system bus memory access.
When using as MEMCS16#, the ex ternal agent must activat e this signal at the
system bus memory access in 16-bit width.
FLM/MIPS16ENI/OThe function of this pin differs dependi ng on the operating status.
<During RTC reset (input)>
This signal enables use of M I PS16 instructions.
0: Disable use of MIPS 16 i nstructions
1: Enable use of MIPS16 instructions
<During normal operation (output)>
LCD first line clock output.
FPD(7:4)/GPIO(15:12)
FPD(3:0)
Note
VPLCD/VPGPIO1OutputLCD logic power control. This signal may be defined as a general-purpose out put
VPBIAS/VPGPIO0OutputLCD bias power control. This signal may be defined as a general-purpose output
Note
See
Output
2.2.11 General-purpose I/O signals
OutputLCD screen data.
when an external LCD controller is used.
when an external LCD controller is used.
in this section.
Note Connection between FPD(7:0) of the VR
width as below.
For details, refer to CHAPTER 21 LCD CONTROLLER.
VR4181LCD Panel Data (4-bit width)LCD Panel Data (8-bit wi dth)
FPD0Data Line 0Data Line 4
FPD1Data Line 1Data Line 5
FPD2Data Line 2Data Line 6
FPD3Data Line 3Data Line 7
FPD4−Data Line 0
FPD5−Data Line 1
FPD6−Data Line 2
FPD7−Data Line 3
4181 and LCD panel data lines differs depending on the panel data
54
User’s Manual U14272EJ3V0UM
Page 55
CHAPTER 2 PIN FUNCTIONS
2.2.3 Initialization interface signals
Signal nameI/ODescription of funct i on
POWERInputVR4181 activation signal.
RSTSW#InputVR4181 reset signal.
RTCRST#InputReset signal for i nt e rnal Real -t i me clock and internal logic. When power is first
supplied to the system, the external agent must activate this signal.
POWERONOutputThis signal indicates that the VR4181 is ready to operate. It bec omes active when a
power-on factor is detected and bec om es inactive when the BATTINH/BATTINT#
signal check has been com pl eted.
MPOWEROutputThis signal indic ates that the VR4181 is operating. This signal i s inactive during
Hibernate mode. During this signal being inactive, turn off t he 2.5 V power supply.
2.2.4 Battery monitor interface signals
Signal nameI/ODescription of funct i on
BATTINH/BATTINT#InputThe func t i on of this pin differs depending on the s t ate of the MPOWER pin.
<When MPOWER = 0>
BATTINH signal
Enables or disables acti vation on power application.
1: Enable activation
0: Disable activati on
<When MPOWER = 1>
BATTINT# signal
This is an interrupt signal t hat is input when remaining battery power i s low during
normal operations. The external agent checks the remaining battery power and
activates this signal if voltage suff i cient for operations cannot be suppl i ed.
2.2.5 Clock interface signals
Signal nameI/ODescription of funct i on
RTCX(2:1)−Connections to 32.768 kHz crystal resonator.
CLKX(2:1)−Connections to 18.432 MHz cryst al resonator.
User’s Manual U14272EJ3V0UM
55
Page 56
CHAPTER 2 PIN FUNCTIONS
2.2.6 Touch panel interface and audio interface signals
Signal nameI/ODescription of funct i on
TPX(1:0)I/OTouch panel X coordinate data. They use the voltage applied t o t he X coordinate
and the voltage input to the Y coordinate to detect which coordi nates on the touch
panel are being pressed.
TPY(1:0)I/OTouch panel Y coordinate data. They use the voltage applied t o t he Y coordinate
and the voltage input to the X coordinate to detect which coordi nates on the touch
panel are being pressed.
ADIN(2:0)InputGeneral-purpose A/D data inputs.
AUDIOINInputAudio input.
AUDIOOUTOutputAudio output.
2.2.7 LED interface signals
Signal nameI/ODescription of funct i on
LEDOUTOutputThis is an output signal for lighti ng LE Ds.
2.2.8 CompactFlash interface and keyboard interface signals
Signal nameI/ODescription of funct i on
CF_WE#/SCANOUT7OutputCompactFlash write enable output or keyboard scan data output.
CF_OE#/SCANOUT6OutputCompactFlash output enable or keyboard scan data output.
CF_IOW#/SCANOUT5OutputCompactFlash I/O wri t e strobe output or keyboard scan data output.
CF_IOR#/SCANOUT4OutputCompactFlash I/O read strobe output or keyboard scan data output .
CF_STSCHG#/SCANOUT3I/OCompactFlas h status changed input or keyboard s can data output.
CF_CE(2:1)#/
SCANOUT(2:1)
CF_BUSY#/SCANOUT0I/ OCompactFlash ready/busy/i nt errupt request indication input or k eyboard scan data
CF_REG#/SCANIN7I/OCompactFlash register select output or keyboard scan data input .
CF_RESET/SCANIN6I/OCompact F lash reset output or keyboard scan data input .
CF_WAIT#/SCANIN5InputCompact F l ash wait input or keyboard scan dat a i nput.
CF_IOIS16#/SCANIN4InputCompactF l ash I/O 16-bit bus input or keyboard scan data input.
CF_VCCEN#/SCANIN3I/OCompactFlash VCC enable output or keyboard scan data i nput.
CF_DEN#/SCANIN2I/OCompactFlash data buffer enabl e output or keyboard scan data input.
CF_DIR/SCANIN1I/OCompac tFlash data direction cont rol out put or keyboard scan data input.
CF_AEN#/SCANIN0I/OCompactF l ash address buffer enable output or keyboard scan data input.
OutputCompactFlash c ard enabl e outputs or keyboard scan data out put s.
output.
56
User’s Manual U14272EJ3V0UM
Page 57
CHAPTER 2 PIN FUNCTIONS
2.2.9 Serial interface channel 1 signals
Signal nameI/ODescription of funct i on
RxD1/GPIO25I/OSerial channel 1 receive data i nput or general-purpose I/O.
TxD1/GPIO26/CLKSEL0I / OThe function of this pin differs depending on the operating st atus.
<During RTC reset (input)>
This signal is used to set CPU core operation clock frequency
<During normal operation (input/output)>
Serial channel 1 transmit data output or general-purpose I/O.
RTS1#/GPIO27/CLKSEL1I/OThe function of this pin differs depending on the operating status.
<During RTC reset (input)>
This signal is used to set CPU core operation clock frequency
<During normal operation (input/output)>
Serial channel 1 request to send output or general-purpose I/O.
CTS1#/GPIO28I/OSerial channel 1 clear to send input or general-purpose I/O.
DCD1#/GPIO29I/OSerial channel 1 dat a carrier detect input or general-purpose I/O.
DTR1#/GPIO30/CLKSEL2I/OThe function of this pin differs depending on the operating status.
<During RTC reset (input)>
This signal is used to set CPU core operation clock frequency
<During normal operation (input/output)>
Serial channel 1 data terminal ready output or general-purpose I/O.
DSR1#/GPIO31I/ OSerial channel 1 Data set ready input or general-purpose I/O.
Note
Note
Note
.
.
.
Note CLKSEL(2:0) signals are used to set the frequency of the CPU core operation clock (PClock). These signals
are sampled when the RTCRST# signal goes high.
The relationship between the CLKSEL(2:0) pin settings and clock frequency is shown below.
TClock is generated from PClock and its frequency is always 1/2 of the PClock frequency after RTC reset.
User’s Manual U14272EJ3V0UM
57
Page 58
CHAPTER 2 PIN FUNCTIONS
2.2.10 IrDA interface signals
Signal nameI/ODescription of funct i on
IRDIN/RxD2InputIrDA receive data input or serial channel 2 receive data input.
Connect this pin to GND (digit al ) via resistor when an IrDA receive component is
connected.
IRDOUT/TxD2OutputIrDA transm i t data output or serial channel 2 transm i t data output.
2.2.11 General-purpose I/O signals
Signal nameI/ODescription of funct i on
See
GPIO(31:25)I/O
GPIO(24:16)I/O
GPIO15/FPD7/CD2#I/OGeneral-purpose I/O, LCD screen data output, or CompactFl ash card detect 2 input.
GPIO14/FPD6/CD1#I/OGeneral-purpose I/O, LCD screen data output, or CompactFl ash card detect 1 input.
GPIO13/FPD5I/OGeneral-purpose I/O or LCD screen data output.
GPIO12/FPD4I/OGeneral-purpose I/O or LCD screen data output.
GPIO11/PCS1#I/OGeneral-purpose I/O or programmable chip select 1.
GPIO10/FRM/SYSCLKI/OGeneral-purpose I/O, serial frame input f or clocked serial interface, or external bus
GPIO9/CTS2#I/OGeneral-purpose I/O or seri al channel 2 clear to send output.
GPIO8/DSR2#I/OGeneral-purpose I/O or serial channel 2 data set ready input.
GPIO7/DTR2#I/OGeneral-purpose I/O or serial channel 2 data term i nal ready input.
GPIO6/RTS2#I/OGeneral-purpose I/O or seri al channel 2 request to send output.
GPIO5/DCD2#I/OGeneral-purpose I/O or serial c hannel 2 data carrier detect input.
GPIO4I/OGeneral-purpose I/O.
GPIO3/PCS0#I/OGeneral-purpose I/O or programmable chip selec t 0.
GPIO2/SCKI/OGeneral -purpose I/O or serial clock input for clocked serial i nt erface.
GPIO1/SOI/OGeneral-purpos e I/O or serial data output signal f or clocked serial interfac e.
GPIO0/SII /OGeneral-purpose I/O or serial data input signal for clocked seri al i nterface.
2.2.9 Serial interface channel 1 signals
See
2.2.1 System bus interface signals
system clock output.
in this section
in this section.
58
User’s Manual U14272EJ3V0UM
Page 59
2.2.12 Dedicated VDD/GND signals
CHAPTER 2 PIN FUNCTIONS
Signal namePower
supply
VDD_PLL2.5 VPower supply dedicated for the PLL analog block .
GND_PLL2.5 VGround dedicated for the PLL analog bloc k.
VDD_TP3.3 VPower supply dedicated for the touch panel interface.
GND_TP3. 3 VGround dedicated for the touc h panel i nterface.
VDD_AD3.3 VPower supply dedicated for the A/D and D/A converters. The voltage applied to t hi s
pin becomes the maximum value for the A/D and D/A interf ace signals.
GND_AD3.3 VGround dedicat ed for the A/D and D/A converters . The voltage applied to this pin
becomes the minimum v al ue for the A/D and D/A interface signals.
VDD_OSC3.3 VPower supply dedic ated for the oscillator.
GND_OSC3.3 VGround dedicated for the oscillator.
VDD_LOGIC2.5 VOrdinary power supply of 2.5 V
GND_LOGIC2.5 VOrdinary ground of 2.5 V
VDD_IO3.3 VOrdinary power supply of 3.3 V
GND_IO3.3 VOrdinary ground of 3.3 V
Description of funct i on
Caution The VR4181 has two types of power supplies. The 3.3 V power supply should be turned on at first.
Turn on/off the 2.5 V power supply depending on the status of the MPOWER pin.
Notes1. Maintains the state of previous Fullspeed mode.
2. The state depends on the GPHIBSTH/GPHIBSTL register setting.
3. The input level is sampled to determine the CPU core operation frequency.
Remark 0: low level, 1: high level, Hi-Z: high impedance
62
User’s Manual U14272EJ3V0UM
Page 63
CHAPTER 2 PIN FUNCTIONS
2.4 Recommended Connection of Unused Pins and I/O Circ uit Types
Pin NameRecommended Connection When Not UsedI/O Ci rcuit Type
ADD(21:0)−A
DATA(15:0)−A
MEMRD#−A
MEMWR#−A
SDCS(1:0)#/RAS(1:0)#−A
UDQM/UCAS#−A
LDQM/LCAS#−A
CAS#Leave openA
SDRAS#Leave openA
SDCLKLeave openA
CLKENLeave openA
SYSDIRLeave openA
SYSEN#Leave openA
IORD#/GPIO16Connect to VDD_IO or GND_IO via resistorA
IOWR#/GPIO17Connect to VDD_IO or GND_IO v i a resistorA
IORDY/GPIO18Connect to VDD_IO or GND_IO via resistorA
IOCS16#/GPIO19Connect to VDD_IO or GND_IO via resistorA
UBE#/GPIO20/MConnect to VDD_IO or GND_IO v i a resistorA
RESET#/GPIO21Connect t o VDD_IO or GND_IO v i a res i s torA
ROMCS(2:0)#/GPIO(24:22)Connect to VDD_IO or GND_IO via resistorA
ROMCS3#−A
SHCLK/LCDCS#Leav e openA
LOCLK/MEMCS16#Leave openA
FLM/MIPS16ENConnect to VDD_IO or GND_IO via resistorA
FPD(3:0)Leave openA
VPLCD/VPGPIO1Leave openA
VPBIAS/VPGPIO0Leav e openA
POWERConnect to GND_IO via resistorA
RTCRST#−A
RSTSW#−A
POWERONLeave openA
MPOWER−A
BATTINH/BATTINT#−A
TPX(1:0)−B
TPY(1:0)−C
(1/3)
Remark No specification (−) in the Recommended Connection When Not Used column indicates that the pin is
always connected.
User’s Manual U14272EJ3V0UM
63
Page 64
CHAPTER 2 PIN FUNCTIONS
Pin NameRecommended Connection When Not UsedI/O Ci rcuit Type
ADIN(2:0)Connect to GND_ADD
AUDIOINConnect to GND_ADD
AUDIOOUTLeave openE
CF_WE#/SCANOUT7Leave openA
CF_OE#/SCANOUT6Leave openA
CF_IOW#/SCANOUT5Leave openA
CF_IOR#/SCANOUT4Leave openA
CF_STSCHG#/SCANOUT3Connect to VDD_IO via resistorA
CF_CE(2:1)#/SCANOUT(2:1)Leave openA
CF_BUSY#/SCANOUT0Connec t to VDD_IO via resist orA
CF_REG#/SCANIN7Leave openA
CF_RESET/SCANIN6Leave openA
CF_WAIT#/SCANIN5Connect to VDD_IO via resist orA
CF_IOIS16#/SCANIN4Connect to VDD_IO via resistorA
CF_VCCEN#/SCANIN3Leave openA
CF_DEN#/SCANIN2Leave openA
CF_DIR/SCANIN1Leave openA
CF_AEN#/SCANIN0Leave openA
RxD1/GPIO25Connect to VDD_IO or GND_IO via resis torA
TxD1/GPIO26/CLKSEL0Connect to VDD_IO or GND_IO via resistorA
RTS1#/GPIO27/CLKSEL1Connect to VDD_IO or GND_IO via resistorA
CTS1#/GPIO28Connect to VDD_IO or GND_IO via resi storA
DCD1#/GPIO29Connect to VDD_IO or GND_IO via resistorA
DTR1#/GPIO30/CLKSEL2Connect to VDD_IO or GND_IO via resistorA
DSR1#/GPIO31Connect to VDD_IO or GND_IO via resistorA
IRDIN/RxD2Connect to VDD_IO or GND_IO via resistorA
IRDOUT/TxD2Leave openA
GPIO(15:14)/FPD(7:6)/CD(2:1)#Connect to VDD_IO or GND_IO via resistorA
GPIO(13:12)/FPD(5:4)Connect to VDD_IO or GND_IO via resistorA
GPIO11/PCS1#Connect to VDD_IO or GND_IO via resistorA
GPIO10/FRM/SYSCLKConnect to VDD_IO or GND_IO via resistorA
GPIO9/CTS2#Connect to VDD_IO or GND_IO via resistorA
GPIO8/DSR2#Connect to VDD_IO or GND_IO vi a resistorA
GPIO7/DTR2#Connect t o VDD_IO or GND_IO via resistorA
GPIO6/RTS2#Connect to VDD_IO or GND_IO via resistorA
GPIO5/DCD2#Connect to VDD_IO or GND_IO via resistorA
GPIO4Connect to VDD_IO or GND_IO via resistorA
(2/3)
64
User’s Manual U14272EJ3V0UM
Page 65
CHAPTER 2 PIN FUNCTIONS
Pin NameRecommended Connection When Not UsedI/O Ci rcuit Type
GPIO3/PCS0#Connect t o VDD_IO or GND_IO via resistorA
GPIO2/SCKConnect to VDD_IO or GND_I O via resistorA
GPIO1/SOConnect to VDD_IO or GND_IO via resistorA
GPIO0/SIConnect to VDD_IO or GND_IO via resistorA
LEDOUTLeave openA
(3/3)
User’s Manual U14272EJ3V0UM
65
Page 66
CHAPTER 2 PIN FUNCTIONS
2.5 Pin I/O Circuits
Type AType C
V
Data
DD
P-ch
IN/OUT
Data
V
P-ch
DD
IN/OUT
Output
disable
Input
enable
Type B
Data
Output
disable
N-ch
Output
N-ch
disable
P-ch
+
N-ch
N-ch
V
P-ch
−
V
ref
DD
Input
IN/OUT
enable
N-ch
Type D
P-ch
IN
+
−
V
ref
N-ch
P-ch
N-ch
+
−
V
ref
Type E
Analog
output
OUT
voltage
66
User’s Manual U14272EJ3V0UM
Page 67
CHAPTER 3 CP0 REGISTERS
3.1 Coprocessor 0 (CP0)
The Coprocessor 0 (CP0), which is also called as System Control Coprocessor, is implemented as an integral part
of the CPU, and supports memory management, address translation, exception handling, and operation mode
control.
Memory management, address translation, and operation mode control are provided by a block called memory
management unit (MMU). The MMU contains a 32-entry TLB (translation lookaside buffer) that is used when
translating virtual addresses to physical addresses.
The CP0 has registers shown in Table 3-1 that are used to set various modes for memory management and
exception handling and to indicate statuses of the processor. Each CP0 register has a unique number that is used
as an operand to specify a CP0 register to be accessed.
Caution When accessing the CP0 registers, some instructions require consideration of the interval time
until the next instruction is executed, because there is a delay from when the contents of the
CP0 register change to when this change is reflected in the CPU operation. This time lag is
called a CP0 hazard. For details, refer to CHAPTER 23 COPROCESSOR 0 HAZARDS.
For details about functions of the CP0, refer to V
R4100 Series Architecture User’s Manual.
User’s Manual U14272EJ3V0UM
67
Page 68
CHAPTER 3 CP0 REGISTERS
Table 3-1. CP0 Registers
NumberRegisterUsageDescription
0IndexM em ory managementProgrammable pointer to TLB array
1RandomMemory managementPseudo-random pointer to TLB array (read only)
2EntryLo0Memory managementLower half of TLB entry for even VPN
3EntryLo1Memory managementLower half of TLB entry for odd VPN
4ContextException processi ngPointer to kernel virtual PTE in 32-bit mode
5PageMaskMemory managementPage size s pecification
6WiredMemory managementNumber of wired TLB entri es
7−−Reserved for future use
8BadVAddrException processi ngVirtual address where the most recent error occurred
9CountException processingTimer count
10EntryHiMemory managementHigher half of TLB entry (includi ng ASID)
11CompareExc eption processingTimer compare value
12StatusException processi ngStatus indic ation
13Caus eException processingCause of last exception
14EPCException processi ngException P rogram Count er
15PRI dMemory managementProcessor revi sion identifier
16Confi gMemory managementConfiguration (memory system modes) specification
Note1
17
18WatchLoException processingMemory reference t rap address low bits
19WatchHiException processingMemory reference trap address high bits
20XCont extException processingPointer to kernel virtual P T E i n 64-bi t mode
21 to 25−−Reserved for future use
26
27
28TagLoMemory managementLower half of cache tag
29TagHiMemory managementHigher half of cache tag
30ErrorEPCException processi ngError Excepti on P rogram Counter
31−−Reserved for future use
LLAddr
Parity Error
Cache Error
Note2
Note2
Memory managementPhysic al address for self diagnostics
Exception processi ngCache parity bits
Exception processi ngIndex and status of cache error
Notes1. This register is defined to maintain compatibility with the VR
4000 and VR4400. This register is meaningless
during normal operations.
2. This register is defined to maintain compatibility with the VR4100. This register is not used in the VR4181
hardware.
68
User’s Manual U14272EJ3V0UM
Page 69
CHAPTER 3 CP0 REGISTERS
3.2 Details of CP0 Registers
3.2.1 Index register (0)
The Index register is a 32-bit, read/write register containing five low-order bits to index an entry in the TLB. The
most-significant bit of the register shows the success or failure of a TLB probe (TLBP) instruction.
The Index register also specifies the TLB entry affected by TLB read (TLBR) or TLB write index (TLBWI)
instructions.
The contents of the Index register are undefined after a reset so that it must be initialized by software.
Figure 3-1. Index Register
31
305 40
P0Index
P:Indicates whether probing is successful or not. It is set to 1 if the latest TLBP instruction fails. It is
cleared to 0 when the TLBP instruction is successful.
Index:Specifies an index to a TLB entry that is a target of the TLBR or TLBWI instruction.
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
3.2.2 Random register (1)
The Random register is a read-only register. The low-order 5 bits are used in referencing a TLB entry. This
register is decremented each time an instruction is executed. The values that can be set in the register are as
follows:
• The lower bound is the content of the Wired register.
• The upper bound is 31.
The Random register specifies the entry in the TLB that is affected by the TLBWR instruction. The register is
readable to verify proper operation of the processor.
The Random register is set to the value of the upper bound upon Cold Reset. This register is also set to the upper
bound when the Wired register is written. Figure 3-2 shows the format of the Random register.
Figure 3-2. Random Register
31
0Random
540
Random: TLB random index
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
User’s Manual U14272EJ3V0UM
69
Page 70
CHAPTER 3 CP0 REGISTERS
3.2.3 EntryLo0 (2) and EntryLo1 (3) registers
The EntryLo register consists of two registers that have identical formats: EntryLo0, used for even virtual pages
and EntryLo1, used for odd virtual pages. The EntryLo0 and EntryLo1 registers are both read-/write-accessible.
They are used to access the built-in TLB. When a TLB read/write operation is carried out, the EntryLo0 and EntryLo1
registers hold the contents of the low-order 32 bits of TLB entries at even and odd addresses, respectively.
The contents of these registers are undefined after a reset so that they must be initialized by software.
Figure 3-3. EntryLo0 and EntryLo1 Registers
(a) 32-bit mode
3128 276 53 210
PFNCDV G0EntryLo0
3128 276 53 210
PFNCDV G0EntryLo1
(b) 64-bit mode
6328 276 53 210
PFNCDV G0EntryLo0
6328 276 53 210
PFNCDV G0EntryLo1
PFN:Page frame number; high-order bits of the physical address.
C:Specifies the TLB page attribute (see Table 3-2).
D:Dirty. If this bit is set to 1, the page is marked as dirty and, therefore, writable. This bit is actually
a write-protect bit that software can use to prevent alteration of data.
V:Valid. If this bit is set to 1, it indicates that the TLB entry is valid; otherwise, a TLB Invalid
exception (TLBL or TLBS) occurs.
G:Global. If this bit is set in both EntryLo0 and EntryLo1, then the processor ignores the ASID during
TLB lookup.
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
The coherency attribute (C) bits are used to specify whether to use the cache in referencing a page. When the
cache is used, whether the page attribute is “cached” or “uncached” is selected by algorithm.
Table 3-2 lists the page attributes selected according to the value in the C bits.
70
User’s Manual U14272EJ3V0UM
Page 71
CHAPTER 3 CP0 REGISTERS
Table 3-2. Cache Algorithm
C bit valueCache algorithm
0Cached
1Cached
2Uncached
3Cached
4Cached
5Cached
6Cached
7Cached
3.2.4 Context register (4)
The Context register is a read/write register containing the pointer to an entry in the page table entry (PTE) array
on the memory; this array is a table that stores virtual-to-physical address translations. When there is a TLB miss,
the operating system loads the unsuccessfully translated entry from the PTE array to the TLB. The Context register
is used by the TLB Refill exception handler for loading TLB entries.
The Context register duplicates some of the information provided in the BadVAddr register, but the information is
arranged in a form that is more useful for a software TLB exception handler.
Figure 3-4. Context Register
(a) 32-bit mode
24253143
PTEBaseBadVPN20
0
(b) 64-bit mode
24
PTEBaseBadVPN20
0256343
PTEBase: The PTEBase field is a base address of the PTE entry table.
BadVPN2: This field holds the value (VPN2) obtained by halving the virtual page number of the most recent
virtual address for which translation failed.
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
The PTEBase field is used by software as the pointer to the base address of the PTE table in the current user
address space.
The 21-bit BadVPN2 field contains bits 31 to 11 of the virtual address that caused the TLB miss; bit 10 is excluded
because a single TLB entry maps to an even-odd page pair. For a 1 KB page size, this format can directly address
the pair-table of 8-byte PTEs. When the page size is 4 KB or more, shifting or masking this value produces the
correct PTE reference address.
User’s Manual U14272EJ3V0UM
71
Page 72
CHAPTER 3 CP0 REGISTERS
3.2.5 PageMask register (5)
The PageMask register is a read/write register used for reading from or writing to the TLB; it holds a comparison
mask that sets the page size for each TLB entry, as shown in Table 3-3. Five page sizes can be selected between 1
KB and 256 KB.
TLB read and write instructions use this register as either a source or a destination; Bits 18 to 11 that are targets
of comparison are masked during address translation.
The contents of the PageMask register are undefined after a reset so that it must be initialized by software.
Figure 3-5. PageMask Register
3119 1811 100
MASK00
MASK:Page comparison mask, which determines the virtual page size for the corresponding entry.
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
Table 3-3 lists the mask pattern for each page size. If the mask pattern is one not listed below, the TLB behaves
unexpectedly.
The Wired register is a read/write register that specifies the lower boundary of the random entry of the TLB as
shown in Figure 3-6. Wired entries cannot be overwritten by a TLBWR instruction, but by a TLBWI instruction.
Random entries can be overwritten by both instructions.
Figure 3-6. Positions Indicated by the Wired Register
TLB
31
Range specified by
the Random register
Value in the Wired register
Range of Wired
entries
0
The Wired register is set to 0 upon Cold Reset. Writing this register also sets the Random register to the value of
its upper bound (see 3.2.2 Random register (1)).
Figure 3-7. Wired Register
315 40
0Wired
Wired:TLB wired boundary
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
User’s Manual U14272EJ3V0UM
73
Page 74
CHAPTER 3 CP0 REGISTERS
3.2.7 BadVAddr register (8)
The Bad Virtual Address (BadVAddr) register is a read-only register that saves the most recent virtual address that
failed to have a valid translation, or that had an addressing error.
Caution This register saves no information after a bus error exception, because it is not an address error
exception.
Figure 3-8. BadVAddr Register
(a) 32-bit mode
031
BadVAddr
(b) 64-bit mode
063
BadVAddr
BadVAddr:Most recent virtual address for which an addressing error occurred, or for which address
translation failed.
3.2.8 Count register (9)
The read/write Count register acts as a timer. It is incremented in synchronization with the MasterOut clock (1/8,
1/12, or 1/16 frequencies of the PClock), regardless of whether instructions are being executed, retired, or any
forward progress is actually made through the pipeline.
This register is a free-running type. When the register reaches all ones, it rolls over to zero and continues
counting. This register is used for self-diagnostic test, system initialization, or the establishment of inter-process
synchronization.
Figure 3-9. Count Register
031
Count
Count:Up-to-date count value that is compared with the value of the Compare register.
74
User’s Manual U14272EJ3V0UM
Page 75
CHAPTER 3 CP0 REGISTERS
3.2.9 EntryHi register (10)
The EntryHi register is write-accessible. It is used to access the built-in TLB. The EntryHi register holds the highorder bits of a TLB entry for TLB read and write operations. If a TLB Refill, TLB Invalid, or TLB Modified exception
occurs, the EntryHi register holds the high-order bit of the TLB entry. The EntryHi register is also set with the virtual
page number (VPN2) for a virtual address where an exception occurred and the ASID. See VR4100 SeriesArchitecture User’s Manual for details of the TLB exception.
The ASID is used to read from or write to the ASID field of the TLB entry. It is also checked with the ASID of the
TLB entry as the ASID of the virtual address during address translation.
The EntryHi register is accessed by the TLBP, TLBWR, TLBWI, and TLBR instructions.
The contents of the EntryHi register are undefined after a reset so that it must be initialized by software.
Figure 3-10. EntryHi Register
(a) 32-bit mode
3111 108 70
VPN20ASID
(b) 64-bit mode
6362 6111 1040 398 70
FillVPN2R0ASID
VPN2:Virtual page number divided by two (mapping to two pages)
ASID:Address space ID. An 8-bit ASID field that allows multiple processes to share the TLB; each
process has a distinct mapping of otherwise identical virtual page numbers.
R:Space type (00 → user, 01 → supervisor, 11 → kernel). Matches bits 63 and 62 of the virtual
address.
Fill:Reserved. Ignored on write. When read, returns zero.
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
User’s Manual U14272EJ3V0UM
75
Page 76
CHAPTER 3 CP0 REGISTERS
3.2.10 Compare register (11)
The Compare register causes a timer interrupt; it maintains a stable value that does not change on its own.
When the value of the Count register (see 3.2.8 Count register (9)) equals the value of the Compare register, the
IP7 bit in the Cause register is set. This causes an interrupt as soon as the interrupt is enabled. Writing a value to
the Compare register, as a side effect, clears the timer interrupt request.
For diagnostic purposes, the Compare register is a read/write register. Normally, this register should be only used
for a write.
The contents of the Compare register are undefined after a reset.
Figure 3-11. Compare Register
031
Compare
Compare: Value that is compared with the count value of the Count register.
3.2.11 Status register (12)
The Status register is a read/write register that contains the operating mode, interrupt enabling, and the diagnostic
states of the processor.
Figure 3-12. Status Register (1/2)
29282726252416158765321031
0
0REDSIMUX KSU
CU0
4
EXL
IEKX SX
ERL
CU0:Enables/disables the use of the coprocessor (1 → Enabled, 0 → Disabled).
CP0 can be used in Kernel mode at all times.
RE:Enables/disables reversing of the endian setting in User mode (0 → Disabled, 1 → Enabled). This
bit must be set to 0 since the VR4181 supports the little-endian order only.
DS:Diagnostic Status field (see Figure 3-13).
IM:Interrupt mask field used to enable/disable interrupts (0 → Disabled, 1 → Enabled). This field
consists of 8 bits that are used to control eight interrupts. The bits are assigned to interrupts as
follows:
IM7:Masks a timer interrupt.
IM(6:2):Mask ordinary interrupts (Int(4:0)
Note
). However, Int(4:3)
Note
never occur in the VR4181.
IM(1:0):Mask software interrupts.
76
Note Int(4:0) are internal signals of the VR4110 CPU core. For details about connection to
the on-chip peripheral units, refer to CHAPTER 9 INTERRUPT CONTROL UNIT
(ICU).
User’s Manual U14272EJ3V0UM
Page 77
CHAPTER 3 CP0 REGISTERS
Figure 3-12. Status Register (2/2)
KX:Enables 64-bit addressing in Kernel mode (0 → 32-bit, 1 → 64-bit). 64-bit operations are always
valid in Kernel mode.
SX:Enables 64-bit addressing and operation in Supervisor mode (0 → 32-bit, 1 → 64-bit).
UX:Enables 64-bit addressing and operation in User mode (0 → 32-bit, 1 → 64-bit).
KSU:Sets and indicates the operating mode (10 → User, 01 → Supervisor, 00 → Kernel).
ERL:Sets and indicates the error level (0 → Normal, 1 → Error).
EXL:Sets and indicates the exception level (0 → Normal, 1 → Exception).
IE:Sets and indicates interrupt enabling/disabling (0 → Disabled, 1 → Enabled).
0:Reserved for future use. Write 0 in a write operation. When this bit is read, 0 is read.
Figure 3-13 shows the details of the Diagnostic Status (DS) field. All DS field bits other than the TS bit are
writable.
Figure 3-13. Status Register Diagnostic Status Field
161718192021222324
0BEVTSSR0CHCEDE
BEV:Specifies the base address of a TLB Refill exception vector and common exception vector (0 →
Normal, 1 → Bootstrap).
TS:Occurs the TLB to be shut down (read-only) (0 → Not shut down, 1 → Shut down). This bit is used
to avoid any problems that may occur when multiple TLB entries match the same virtual address.
After the TLB has been shut down, reset the processor to enable restart. Note that the TLB is shut
down even if a TLB entry matching a virtual address is marked as being invalid (with the V bit
cleared).
SR:Occurs a Soft Reset or NMI exception (0 → Not occurred, 1 → Occurred).
CH:CP0 condition bit (0 → False, 1 → True). This bit can be read and written by software only; it
cannot be accessed by hardware.
CE, DE:These are prepared to maintain compatibility with the VR4100, and are not used in the VR4181
hardware.
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
The Status register has the following fields where the modes and access statuses are set.
User’s Manual U14272EJ3V0UM
77
Page 78
CHAPTER 3 CP0 REGISTERS
(1) Interrupt enable
Interrupts are enabled when all of the following conditions are true:
• IE bit is set to 1.
• EXL bit is cleared to 0.
• ERL bit is cleared to 0.
• The appropriate bit of the IM field is set to 1.
(2) Operating modes
The following Status register bit settings are required for User, Kernel, and Supervisor modes.
• The processor is in User mode when KSU = 10, EXL = 0, and ERL = 0.
• The processor is in Supervisor mode when KSU = 01, EXL = 0, and ERL = 0.
• The processor is in Kernel mode when KSU = 00, EXL = 1, or ERL = 1.
Access to the kernel address space is allowed when the processor is in Kernel mode.
Access to the supervisor address space is allowed when the processor is in Supervisor or Kernel mode.
Access to the user address space is allowed in any of the three operating modes.
(3) Addressing modes
The following Status register bit settings select 32- or 64-bit operation for each of User, Kernel, and Supervisor
operating modes. Enabling 64-bit operation permits the execution of 64-bit opcodes and translation of 64-bit
addresses. 64-bit operation for User, Kernel and Supervisor modes can be set independently.
• 64-bit addressing for Kernel mode is enabled when KX bit = 1. 64-bit operations are always valid in Kernel
mode. If this bit is set, an XTLB Refill exception occurs if a TLB miss occurs in the Kernel mode address
space.
• 64-bit addressing and operations are enabled for Supervisor mode when SX bit = 1. If this bit is set, an
XTLB Refill exception occurs if a TLB miss occurs in the Supervisor mode address space.
• 64-bit addressing and operations are enabled for User mode when UX bit = 1. If this bit is set, an XTLB Refill
exception occurs if a TLB miss occurs in the User mode address space.
(4) Status after reset
The contents of the Status register are undefined after Cold Resets, except for the following bits in the Diagnostic
Status field.
• TS and SR bits are cleared to 0.
SR bit is 0 after Cold Reset, and is 1 after Soft Reset or NMI.
• ERL and BEV bits are set to 1.
78
Remark Cold Reset and Soft Reset are resets for the CPU core (see 5.3 Reset of CPU Core). For the
reset of all the VR
4181 including peripheral units, refer to CHAPTER 5 INITIALIZATION
INTERFACE and CHAPTER 10 POWER MANAGEMENT UNIT (PMU).
User’s Manual U14272EJ3V0UM
Page 79
CHAPTER 3 CP0 REGISTERS
3.2.12 Cause register (13)
The 32-bit read/write Cause register holds the cause of the most recent exception. A 5-bit exception code
indicates one of the causes (see Table 3-4). Other bits hold the detailed information of the specific exception. All
bits in the Cause register, with the exception of the IP1 and IP0 bits, are read-only; IP1 and IP0 bits are used for
software interrupts.
Figure 3-14. Cause Register
82716 156721031 30 29 28
BD 0CE0IP(7:0)0 ExcCode0
BD:Indicates whether the most recent exception occurred in the branch delay slot (1 → In delay slot, 0
→ Normal).
CE:Indicates the coprocessor number in which a Coprocessor Unusable exception occurred.
This field will remain undefined for as long as no exception occurs.
IP:Indicates whether an interrupt is pending (1 → Interrupt pending, 0 → No interrupt pending).
IP(1:0):Software interrupts. Only these bits cause an interrupt exception, when they are set
to 1 by means of software.
Note Int(4:0) are internal signals of the VR4110 CPU core. For details about connection to
the on-chip peripheral units, refer to CHAPTER 9 INTERRUPT CONTROL UNIT(ICU).
ExcCode: Exception code field (refer to Table 3-4 for details).
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
User’s Manual U14272EJ3V0UM
79
Page 80
CHAPTER 3 CP0 REGISTERS
Table 3-4. Cause Register Exception Code Field
Exception codeMnemonicDescription
0IntInterrupt exception
1ModTLB Modified exception
2TLBLTLB Refill exception (load or fetch)
3TLBSTLB Refill exception (store)
4AdELAddress Error exception (load or fetch)
5AdESAddress Error exception (store)
6IBEBus Error ex ception (instruction fetch)
7DBEBus E rror exception (data load or store)
8SysSystem Call exception
9BpBreakpoint excepti on
10RIReserved Instruction exception
11CpUCoprocessor Unusable exception
12OvInteger Overflow exception
13TrTrap exception
14 to 22Reserved for future use
23WATCHWatch exception
24 to 31Reserved for future use
The VR4181 has eight interrupt request sources, IP7 to IP0. They are used for the purpose as follows.
For the detailed description of interrupts of the CPU core, refer to V
R4100 Series Architecture User’s Manual.
(1) IP7
This bit indicates whether there is a timer interrupt request.
It is set when the values of the Count register and Compare register match.
(2) IP6 to IP2
IP6 to IP2 reflect the state of the interrupt request signals of the CPU core.
(3) IP1 and IP0
These bits are used to set/clear a software interrupt request.
80
User’s Manual U14272EJ3V0UM
Page 81
CHAPTER 3 CP0 REGISTERS
3.2.13 Exception Program Counter (EPC) register (14)
The Exception Program Counter (EPC) is a read/write register that contains the address at which processing
resumes after an exception has been serviced. The contents of this register change depending on whether
execution of MIPS16 instructions is enabled or disabled. Setting the MIPS16EN pin after RTC reset specifies
whether execution of the MIPS16 instructions is enabled or disabled.
When the MIPS16 instruction execution is disabled, either of the following addresses is contained in the EPC
register:
• Virtual address of the instruction that caused the exception
• Virtual address of the immediately preceding branch or jump instruction (when the instruction associated with
the exception is in a branch delay slot, and the BD bit in the Cause register is set to 1)
When the MIPS16 instruction execution is enabled, either of the following addresses is contained in the EPC
register during a 32-bit instruction execution:
• Virtual address of the instruction that caused the exception and ISA mode at which an exception occurs
• Virtual address of the immediately preceding branch or jump instruction and ISA mode at which an exception
occurs (when the instruction associated with the exception is in a branch delay slot of the jump instruction, and
the BD bit in the Cause register is set to 1)
When the 16-bit instruction is executed, either of the following addresses is contained in the EPC register:
• Virtual address of the instruction that caused the exception and ISA mode at which an exception occurs
• Virtual address of the immediately preceding Extend or jump instruction and ISA mode at which an exception
occurs (when the instruction associated with the exception is in a branch delay slot of the jump instruction or in
the instruction following the Extend instruction, and the BD bit in the Cause register is set to 1)
The EXL bit in the Status register is set to 1 to keep the processor from overwriting the address of the exception-
causing instruction contained in the EPC register in the event of another exception.
The EPC register never indicates the address of the instruction in a branch delay slot.
Figure 3-15. EPC Register (When MIPS16 ISA Is Disabled)
(a) 32-bit mode
031
EPC
(b) 64-bit mode
063
EPC
EPC:Restart address (virtual) after exception processing.
User’s Manual U14272EJ3V0UM
81
Page 82
CHAPTER 3 CP0 REGISTERS
Figure 3-16. EPC Register (When MIPS16 ISA Is Enabled)
(a) 32-bit mode
1
031
EPCEIM
EPC:Bits 31 to 1 of restart address (virtual) after exception processing.
EIM:ISA mode at which an exception occurs (1 → When MIPS16 SIA instruction is executed, 0 →
When MIPS III ISA instruction is executed).
(b) 64-bit mode
1
063
EPCEIM
EPC:Bits 63 to 1 of restart address (virtual) after exception processing.
EIM:ISA mode at which an exception occurs (1 → When MIPS16 SIA instruction is executed, 0 →
The 32-bit, read-only Processor Revision Identifier (PRId) register contains information identifying the
implementation and revision level of the CPU and CP0.
Figure 3-17. PRId Register
3116 158 70
0ImpRev
Imp:CPU core processor ID number (0x0C for the VR4181)
Rev:CPU core processor revision number
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
The processor revision number is stored as a value in the form y.x, where y is a major revision number in bits 7 to
4 and x is a minor revision number in bits 3 to 0.
The processor revision number can distinguish CPU core revisions of the VR4181, however there is no guarantee
that changes to the CPU core will necessarily be reflected in the PRId register, or that changes to the revision
number necessarily reflect real CPU core changes. Therefore, create a program that does not depend on the
processor revision number field.
82
User’s Manual U14272EJ3V0UM
Page 83
CHAPTER 3 CP0 REGISTERS
3.2.15 Config register (16)
The Config register specifies various configuration options selected on the VR
4181.
Some configuration options, as defined by the EC and BE fields, are set by the hardware during Cold Reset and
are included in the Config register as read-only status bits for the software to access. Other configuration options
(AD, EP, and K0 fields) can be read/written and controlled by software; on Cold Reset these fields are undefined.
Since only a subset of the VR4000 SeriesTM options are available in the VR4181, some bits are set to constants (e.g.,
bits 14 and 13) that were variable in the VR4000 Series. The Config register should be initialized by software before
caches are used.
The contents of the Config register are undefined after a reset so that it must be initialized by software.
Caution Be sure to set the EP field and the AD bit to 0. If they are set with any other values, the
0 → Processor clock frequency divided by 2
1 → Processor clock frequency divided by 3
2 → Processor clock frequency divided by 4
3 to 7 → Reserved
EP:Transfer data pattern (cache write-back pattern) setting
0 → DD: 1 word per 1 cycle
Others → Reserved
AD:Accelerate data mode
0 → VR4000 Series compatible mode
1 → Reserved
M16:MIPS16 ISA mode enable/disable indication (read only)
0 → MIPS16 instruction cannot be executed
1 → MIPS16 instruction can be executed.
BE:BigEndianMem (Endian mode indication)
0 → Little endian
1 → Reserved
CS:Cache size mode indication (n = IC, DC)
0 → Reserved
(n+10)
1 → 2
IC:Instruction cache size indication. 2
bytes
(IC+10)
bytes in the VR4181.
2 → 4 KB
Others → Reserved
DC:Data cache size indication. 2
(DC+10)
bytes in the VR4181.
2 → 4 KB
Others → Reserved
User’s Manual U14272EJ3V0UM
83
Page 84
CHAPTER 3 CP0 REGISTERS
Figure 3-18. Config Register (2/2)
K0:kseg0 cache coherency algorithm
2 → Uncached
Others → Cached
1:1 is returned when read.
0:0 is returned when read.
3.2.16 Load Linked Address (LLAddr) register (17)
The read/write Load Linked Address (LLAddr) register is not used with the VR
4181 processor except for diagnostic
purpose, and serves no function during normal operation. The LLAddr register is implemented just for compatibility
between the VR4181 and VR4000 or VR4400.
The contents of the LLAddr register are undefined after a reset.
Figure 3-19. LLAddr Register
310
PAddr:32-bit physical address
PAddr
84
User’s Manual U14272EJ3V0UM
Page 85
CHAPTER 3 CP0 REGISTERS
3.2.17 WatchLo (18) and WatchHi (19) registers
4181 processor provides a debugging feature to detect references to a selected physical address; load and
The VR
store instructions to the location specified by the WatchLo and WatchHi registers cause a Watch exception.
The contents of these registers are undefined after a reset so that they must be initialized by software.
Figure 3-20. WatchLo Register
321031
PAddr00 R W
PAddr0:Specifies physical address bits 31 to 3.
R:Specifies detection of watch address references when load instructions are executed (1 → Detect,
0 → Not detect).
W:Specifies detection of watch address references when store instructions are executed (1 → Detect,
0 → Not detect).
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
Figure 3-21. WatchHi Register
031
0
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
User’s Manual U14272EJ3V0UM
85
Page 86
CHAPTER 3 CP0 REGISTERS
3.2.18 XContext register (20)
The read/write XContext register contains a pointer to an entry in the page table entry (PTE) array, an operating
system data structure that stores virtual-to-physical address translations. If a TLB miss occurs, the operating system
loads the untranslated data from the PTE into the TLB to handle the software error.
The XContext register is used by the XTLB Refill exception handler to load TLB entries in 64-bit addressing mode.
The XContext register duplicates some of the information provided in the BadVAddr register, and puts it in a form
useful for the XTLB exception handler.
This register is included solely for operating system use. The operating system sets the PTEBase field in the
register, as needed.
Figure 3-22. XContext Register
32035 34 336343
PTEBaseRBadVPN20
PTEBase: Base address of the PTE entry table.
R:Space type (00 → User, 01→ Supervisor, 11 → Kernel). The setting of this field matches virtual
address bits 63 and 62.
BadVPN2: The value (VPN2) obtained by halving the virtual page number of the most recent virtual address
for which translation failed.
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
The 29-bit BadVPN2 field has bits 39 to 11 of the virtual address that caused the TLB miss; bit 10 is excluded
because a single TLB entry maps to an even-odd page pair. For a 1 KB page size, this format may be used directly
to address the pair-table of 8-byte PTEs. When the page size is 4 KB or more, shifting or masking this value
produces the appropriate PTE reference address.
86
User’s Manual U14272EJ3V0UM
Page 87
CHAPTER 3 CP0 REGISTERS
3.2.19 Parity Error register (26)
The Parity Error (PErr) register is a readable/writable register. This register is defined to maintain software-
compatibility with the VR
4100, and is not used in hardware because the VR4181 has no parity.
Figure 3-23. Parity Error Register
08731
0Diagnostic
Diagnostic:8-bit self diagnostic field.
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
3.2.20 Cache Error register (27)
The Cache Error register is a readable/writable register. This register is defined to maintain software-compatibility
with the VR
4100, and is not used in hardware because the VR4181 has no parity.
Figure 3-24. Cache Error Register
310
0
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
User’s Manual U14272EJ3V0UM
87
Page 88
CHAPTER 3 CP0 REGISTERS
3.2.21 TagLo (28) and TagHi (29) registers
The TagLo and TagHi registers are 32-bit read/write registers that hold the primary cache tag during cache
initialization, cache diagnostics, or cache error processing. The Tag registers are written by the CACHE and MTC0
instructions.
The contents of these registers are undefined after a reset.
Figure 3-25. TagLo Register
(a) When used with data cache
3110 9876
PTagLo
VDW0
0
(b) When used with instruction cache
3110 9 8
PTagLo
V0
0
PTagLo:Specifies physical address bits 31 to 10.
V:Valid bit
D:Dirty bit. However, this bit is defined only for the compatibility with the VR4000 Series processors,
and does not indicate the status of cache memory in spite of its readability and writability. This bit
cannot change the status of cache memory.
W:Writeback bit (set if cache line has been updated)
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
Figure 3-26. TagHi Register
310
0
0:Reserved for future use. Write 0 in a write operation. When this field is read, 0 is read.
88
User’s Manual U14272EJ3V0UM
Page 89
CHAPTER 3 CP0 REGISTERS
3.2.22 ErrorEPC register (30)
The Error Exception Program Counter (ErrorEPC) register is similar to the EPC register. It is used to store the
Program Counter value at which the Cold Reset, Soft Reset, or NMI exception has been serviced.
The read/write ErrorEPC register contains the virtual address at which instruction processing can resume after
servicing an error. The contents of this register change depending on whether execution of MIPS16 instructions is
enabled or disabled. Setting the MIPS16EN pin after RTC reset specifies whether the execution of MIPS16
instructions is enabled or disabled.
When the MIPS16 instruction execution is disabled, either of the following addresses is contained in the ErrorEPC
register:
• Virtual address of the instruction that caused the exception
• Virtual address of the immediately preceding branch or jump instruction, when the instruction associated with
the error exception is in a branch delay slot, and the BD bit in the Cause register is set to 1
When the MIPS16 instruction execution is enabled, either of the following addresses is contained in the ErrorEPC
register during a 32-bit instruction execution:
• Virtual address of the instruction that caused the exception and ISA mode at which an exception occurs
• Virtual address of the immediately preceding branch or jump instruction and ISA mode at which an exception
occurs when the instruction associated with the error exception is in a branch delay slot, and the BD bit in the
Cause register is set to 1
When the 16-bit instruction is executed, either of the following addresses is contained in the ErrorEPC register:
• Virtual address of the instruction that caused the exception and ISA mode at which an exception occurs
• Virtual address of the immediately preceding jump instruction or Extend instruction and ISA mode at which an
exception occurs when the instruction associated with the error exception is in a branch delay slot of the jump
instruction or is the instruction following the Extend instruction, and the BD bit in the Cause register is set to 1
The contents of the ErrorEPC register do not change when the ERL bit of the Status register is set to 1. This
prevents the processor when other exceptions occur from overwriting the address of the instruction in this register
that causes an error exception.
The ErrorEPC register never indicates the address of the instruction in a branch delay slot.
User’s Manual U14272EJ3V0UM
89
Page 90
CHAPTER 3 CP0 REGISTERS
Figure 3-27. ErrorEPC Register (When MIPS16 ISA Is Disabled)
(a) 32-bit mode
ErrorEPC
(b) 64-bit mode
ErrorEPC
ErrorEPC: Virtual restart address after Cold reset, Soft reset, or NMI exception.
Figure 3-28. ErrorEPC Register (When MIPS16 ISA Is Enabled)
031
063
(a) 32-bit mode
1031
ErrorEPCErIM
ErrorEPC: Bits 31 to 1 of virtual restart address after Cold reset, Soft reset, or NMI exception.
ErIM:ISA mode at which an error exception occurs (1 → MIPS16 ISA, 0 → MIPS III ISA).
(b) 64-bit mode
1063
ErrorEPCErIM
ErrorEPC: Bits 63 to 1 of virtual restart address after Cold reset, Soft reset, or NMI exception.
ErIM:ISA mode at which an error exception occurs (1 → MIPS16 ISA, 0 → MIPS III ISA).
90
User’s Manual U14272EJ3V0UM
Page 91
CHAPTER 4 MEMORY MANAGEMENT SYSTEM
4.1 Overview
The VR4181 provides a memory management unit (MMU) which uses a translation lookaside buffer (TLB) to
translate virtual addresses into physical addresses.
Virtual addresses are translated into physical addresses using an on-chip TLB. The on-chip TLB is a fullassociative memory that holds 32 entries, which provide mapping to 32 odd/even page pairs for one entry. The TLB
is accessed through the CP0 registers. Note that the virtual address space includes areas that are translated to
physical addresses without using a TLB, and areas where the use of cache memory can be selected.
The VR4181 has three operating modes: User, Supervisor, and Kernel; the manner in which memory addresses
are mapped depends on these operating modes. In addition, the VR4181 supports the 32-bit and 64-bit addressing
modes; the manner in which memory addresses are translated or mapped depends on these addressing modes.
For details about the memory management system and virtual address space, refer to V
Architecture User’s Manual.
R4100 Series
User’s Manual U14272EJ3V0UM
91
Page 92
CHAPTER 4 MEMORY MANAGEMENT SYSTEM
4.2 Physical Address Space
Using a 32-bit address, the processor physical address space encompasses 4 GB. The VR4181 uses this 4 GB
physical address space as shown in Figure 4-1.
Figure 4-1. V
0xFFFF FFFF
0x2000 0000
0x1FFF FFFF
0x1800 0000
0x17FF FFFF
0x1400 0000
0x13FF FFFF
0x1000 0000
0x0FFF FFFF
0x0D00 0000
0x0CFF FFFF
0x0C00 0000
0x0BFF FFFF
0x0B00 0000
0x0AFF FFFF
0x0A00 0000
0x09FF FFFF
R4181 Physical Address Space
(Mirror image of 0x0000 0000 to 0x1FFF FFFF area)
ROM space (including a boot ROM)
External system bus I/O space (ISA I/O)
External system bus memory space (ISA memory)
RFU
Internal ISA I/O space 1
Internal ISA I/O space 2
MBA bus I/O space
92
RFU
0x0400 0000
0x03FF FFFF
DRAM space
0x0000 0000
User’s Manual U14272EJ3V0UM
Page 93
CHAPTER 4 MEMORY MANAGEMENT SYSTEM
Table 4-1. VR4181 Physical Address Space
Physical addressS paceCapacity (bytes)
0xFFFF FFFF to 0x2000 0000Mirror image of 0x1FFF FFFF to 0x0000 00003.5 G
0x1FFF FFFF to 0x1800 0000ROM space128 M
0x17FF FFFF to 0x1400 0000External system bus I/O space (ISA I/O)64 M
0x13FF FFFF to 0x1000 0000External system bus memory space (ISA memory)64 M
0x0FFF FFFF to 0x0D00 0000Space reserved for future us e48 M
0x0CFF FFFF to 0x0C00 0000Internal ISA I /O space 116 M
0x0BFF FFFF to 0x0B00 0000Internal ISA I/O spac e 216 M
0x0AFF FFFF to 0x0A00 0000MBA bus I/O space16 M
0x09FF FFFF to 0x0400 0000Space reserved for future use96 M
0x03FF FFFF to 0x0000 0000DRAM (SDRAM) space64 M
4.2.1 ROM space
The ROM space mapping differs depending on the capacity of the ROM being used. The ROM capacity is set via
the ROMs(1:0) bits in the BCUCNTREG1 reg ister.
The physical addresses of the ROM space are listed below.
Table 4-2. ROM Address Map
Physical addressWhen using 32-Mbit ROMWhen using 64-Mbit ROM
0x1FFF FFFF to 0x1FC0 0000Bank 3 (ROMCS3#)Bank 3 (ROMCS3#)
0x1FBF FFFF to 0x1F80 0000Bank 2 (ROMCS2#)
0x1F7F FFFF to 0x1F40 0000Bank 1 (ROMCS1#)Bank 2 (ROMCS 2#)
0x1F3F FFFF to 0x1F00 0000Bank 0 (ROMCS0#)
0x1EFF FFFF to 0x1E80 0000Reserved for future useBank 1 (ROMCS1#)
0x1E7F FFFF to 0x1E00 0000Bank 0 (ROMCS0#)
4.2.2 External system bus space
The following two types of system bus space are available.
• External system bus I/O space
This corresponds to the ISA’s I/O space.
• External system bus memory space
This corresponds to the ISA’s memory space.
User’s Manual U14272EJ3V0UM
93
Page 94
4.2.3 Internal I/O space
R4181 has three internal I/O spaces. Each of these spaces is described below.
The V
CHAPTER 4 MEMORY MANAGEMENT SYSTEM
Table 4-3. Internal I/O Space 1
Physical addressInternal I/O
0x0C00 001F to 0x0C00 0010SIU1
0x0C00 000F to 0x0C00 0000SIU2
Table 4-4. Internal I/O Space 2
Physical addressInternal I/O
0x0B00 09FF to 0x0B00 0900CS I
0x0B00 08FF to 0x0B00 0800ECU
0x0B00 07FF to 0x0B00 0400Reserved for future use
0x0B00 03FF to 0x0B00 0300GIU
0x0B00 02FF to 0x0B00 02D0Reserved for future use
0x0B00 02CF to 0x0B00 02C0ISA Bri dge
0x0B00 02BF to 0x0B00 02A0PIU-2
0x0B00 029F to 0x0B00 0280Reserved for future use
0x0B00 027F to 0x0B00 0260A/D test
0x0B00 025F to 0x0B00 0240LED
0x0B00 023F to 0x0B00 01E0Reserved for future us e
0x0B00 01DF to 0x0B00 01C0RTC-2
0x0B00 01BF to 0x0B00 01A0Reserved for future use
0x0B00 019F to 0x0B00 0180KIU
0x0B00 017F to 0x0B00 0160AIU
0x0B00 015F to 0x0B00 0140Reserved for future use
0x0B00 013F to 0x0B00 0120PIU-1
0x0B00 011F to 0x0B00 0100Reserved for future use
0x0B00 00FF to 0x0B00 00E0DS U
0x0B00 00DF to 0x0B00 00C0RTC-1
0x0B00 00BF to 0x0B00 00A0PMU
0x0B00 009F to 0x0B00 0080ICU-3
0x0B00 007F to 0x0B00 0000Reserved for future use
94
User’s Manual U14272EJ3V0UM
Page 95
CHAPTER 4 MEMORY MANAGEMENT SYSTEM
Table 4-5. MBA Bus I/O Space
Physical addressInternal I/O
0x0A00 06FF to 0x0A00 0600DCU-2
0x0A00 05FF to 0x0A00 0500Reserved for future use
0x0A00 04FF to 0x0A00 0400LCD controller
0x0A00 03FF to 0x0A00 0300Mem ory controller
0x0A00 02FF to 0x0A00 0220Reserved for future use
0x0A00 021F to 0x0A00 0200ICU-2
0x0A00 01FF to 0x0A00 00A0Reserved for future use
0x0A00 009F to 0x0A00 0080ICU-1
0x0A00 007F to 0x0A00 0050Reserved for future use
0x0A00 004F to 0x0A00 0020DCU-1
0x0A00 001F to 0x0A00 0000MBA Host Bridge
4.2.4 DRAM space
The DRAM space differs depending on the capacity of the DRAM being used. The DRAM capacity is set via the
B1Config(1:0) bits in the MEMCFG_REG register.
The physical addresses of the DRAM space are listed below.
Table 4-6. DRAM Address Map
Physical addressWhen using 16-Mbit DRAMWhen using 64-Mbit DRAM
0x00FF FFFF to 0x0080 0000Reserved f or f uture useBank 1 (SDCS 1#/RAS1#)
0x007F FFFF to 0x0040 0000Bank 0 (SDCS0#/RAS0#)
0x003F FFFF to 0x0020 0000Bank 1 (SDCS1#/RAS1#)
0x001F FFFF to 0x0000 0000Bank 0 (SDCS0#/RAS0#)
User’s Manual U14272EJ3V0UM
95
Page 96
CHAPTER 5 INITIALIZATION INTERFACE
This chapter describes the reset signal descriptions and types, signal- and timing-related dependence, and the
initialization sequence during each mode that can be selected by the user.
A detailed description of the operation during and after a reset and its relationships to the power modes are also
provided in CHAPTER 10 POWER MANAGEMENT UNIT (PMU).
Remark # that follows signal names indicates active low.
5.1 Reset Function
There are five ways to reset the VR4181. Each is summarized below.
96
User’s Manual U14272EJ3V0UM
Page 97
CHAPTER 5 INITIALIZ AT ION INTERFACE
5.1.1 RTC reset
During power-on, set the RTCRST# pin as active. After waiting about 600 ms for the 32.768 kHz oscillator to begin
oscillating when the power supply is stable at 3.0 V or above, setting the RTCRST# pin as inactive causes the RTC
unit to begin counting. Then, the states of the MIPS16EN and CLKSEL(2:0) pins are read after one RTC cycle. Next,
4181 asserts the POWERON pin and checks the state of the BATTINH/BATTINT# signal. If it is at high level,
the VR
the VR4181 asserts the MPOWER pin and activates the external agent’s DC/DC converter. After the stabilization time
period (about 350 ms) of the DC/DC converter, the VR4181 begins PLL oscillation and starts all clocks (a period of
about 16 ms following the start of PLL oscillation is required for stabilization of PLL oscillation).
An RTC reset does not save any of the status information and it completely initializes the processor’s internal
state. Since the DRAM is not switched to self refresh mode, the contents of DRAM after an RTC reset are not at all
guaranteed.
After a reset, the processor becomes the system bus master, which executes a Cold Reset exception sequence
and begins to access the reset exception vectors in the ROM space. Since only part of the internal status is reset
when a reset occurs in the VR4181, the processor should be completely initialized by software (see 5.4 Notes onInitialization).
After power-on, the processor’s pin statuses are undefined since the RTCRST# is asserted, until the 32.768 kHz
clock oscillator starts oscillation. The pin statuses after oscillation starts are described in CHAPTER 2 PINFUNCTIONS in this document.
RTCRST# (Input)
POWER (Input)
POWERON (Output)
MPOWER (Output)
ColdReset# (Internal)
Reset# (Internal)
PLL (Internal)
RTC (Internal,
32.768 kHz)
L
Undefined
> 600 ms
Stable oscillation
Figure 5-1. RTC Reset
> 32 ms
350 ms
Undefined
16 ms
Stable oscillation
16MasterClock
Note
Note MasterClock is the basic clock used in the CPU core. Its frequency is one forth of TClock frequency.
User’s Manual U14272EJ3V0UM
97
Page 98
CHAPTER 5 INITIALIZ AT ION INTERFACE
5.1.2 RSTSW reset
After the RSTSW# pin becomes active and then becomes inactive 100
s later, the VR4181 starts PLL oscillation
µ
and starts all clocks (a period of about 16 ms following the start of PLL oscillation is required for stabilization of PLL
oscillation).
An RSTSW reset basically initializes the entire internal state except for the RTC timer, the GIU, and the PMU. The
VR4181 has function to preserve DRAM data during RSTSW reset. For detail, refer to CHAPTER 10 POWERMANAGEMENT UNIT (PMU).
After a reset, the processor becomes the system bus master, which executes a Cold Reset exception sequence
and begins to access the reset exception vectors in the ROM space. Since only part of the internal status is reset
when a reset occurs in the VR4181, the processor should be completely initialized by software (see 5.4 Notes on
Initialization).
Figure 5-2. RSTSW Reset
RSTSW# (Input)
POWER (Input)
MPOWER (Output)
ColdReset# (Internal)
Reset# (Internal)
PLL (Internal)
RTC (Internal,
32.768 kHz)
L
H
Stable oscillation
Stable oscillation
Undefined
> 3RTC
16 ms
16MasterClock
Stable oscillation
Note
Note MasterClock is the basic clock used in the CPU core. Its frequency is one forth of TClock frequency.
98
User’s Manual U14272EJ3V0UM
Page 99
CHAPTER 5 INITIALIZ AT ION INTERFACE
5.1.3 Deadman’s Switch reset
After the Deadman’s Switch unit is enabled, if the Deadman’s Switch is not cleared within the specified time
period, the VR
4181 immediately enters to reset status. Setting and clearing of the Deadman’s Switch is performed by
software.
A Deadman’s Switch reset initializes the entire internal state except for the RTC timer, the GIU, and the PMU.
Since the DRAM is not switched to self-refresh mode, the contents of DRAM after a Deadman’s Switch reset are not
at all guaranteed.
After a reset, the processor becomes the system bus master, which executes a Cold Reset exception sequence
and begins to access the reset vectors in the ROM space. Since only part of the internal status is reset when a reset
occurs in the VR4181, the processor should be completely initialized by software (see 5.4 Notes on Initialization).
Figure 5-3. Deadman’s Switch Reset
RSTSW# (Input)
POWER (Input)
MPOWER (Output)
ColdReset# (Internal)
Reset# (Internal)
PLL (Internal)
RTC (Internal,
32.768 kHz)
H
L
H
Stable oscillation
Stable oscillation
Undefined
16 ms
16MasterClock
Stable oscillation
Note
Note MasterClock is the basic clock used in the CPU core. Its frequency is one forth of TClock frequency.
User’s Manual U14272EJ3V0UM
99
Page 100
CHAPTER 5 INITIALIZ AT ION INTERFACE
5.1.4 Software shutdown
When the software executes the HIBERNATE instruction, the VR
4181 sets the MPOWER pin as inactive, then
enters reset status. Recovery from reset status occurs when the POWER pin or DCD# signal is ass erted or when an
unmasked wake-up interrupt request is occurred.
A reset by software shutdown initializes the entire internal state except for the RTC timer, the GIU, and the PMU.
After a reset, the processor becomes the system bus master, which executes a Cold Reset exception sequence
and begins to access the reset vectors in the ROM space. Since only part of the internal status is reset when a reset
occurs in the VR4181, the processor should be completely initialized by software (see 5.4 Notes on Initialization).
Cauiton The V
Fullspeed mode. To preserve DRAM data, software must set the DRAM to self-refresh mode. For
details, refer to CHAPTER 10 POWER MANAGEMENT UNIT (PMU).
POWER (Input)
POWERON (Output)
MPOWER (Output)
ColdReset# (Internal)
Reset# (Internal)
PLL (Internal)
R4181 does not set the DRAM to self-refresh mode at the transition to Hibernate mode from
Figure 5-4. Software Shutdown
Stable oscillation
Stopped
Undefined
RTC (Internal,
32.768 kHz)
Stable oscillation
> 32 ms
Note1
Notes1. Wait time for activation. It can be changed by setting the PMUWAITREG register.
2. MasterClock is the basic clock used in the CPU core. Its frequency is one forth of TClock
frequency.
100
User’s Manual U14272EJ3V0UM
16 ms
16MasterClock
Note2
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.