TX39 Family Core Architecture
Page
Toshiba
Contents
Memory location of exception vectors
EPC Exception Program Counter register
Coprocessor Unusable exception
Appendix a Instruction Set Details
Bus Interface Unit Bus Controller / Write Buffer
230
227
Bus request and bus grant 227 Cache snoop 228
229
Architecture
Architecture
Features
Introduction
High-performance Risc techniques
Low power consumption
Data notation
Signal notation
Notation Used in This Manual
Mathematical notation
Architecture
Overview
Architecture
CPU registers
Registers
CP0 registers
Exception program counter
Reserved †
Destination register 5 bits
Instruction Set Overview
Operation code 6 bits
Source register 5 bits
Coprocessor
Load/store
Computational
Jump/branch
Computational Instructions
ALU Immediate
ALU 3-operand, register type
Special Instructions
Multiply/Divide
Jump/Branch Instructions
Coprocessor Instructions
CP0 instructions Instruction Description CP0 Instructions
Special Instruction
Big endian and little endian formats
Data Formats and Addressing
Architecture
Byte addresses of a misaligned word
Pipeline Processing Overview
1 R3900 Processor Core operating modes
User mode
Kernel mode
Memory Management Unit MMU
Kseg1
Direct segment mapping
Kuseg
Kseg0
Address mapping
Architecture
Instruction Set Overview
Instruction Formats
Instruction Notation
Load and Store Instructions
Byte specifications for load and store instructions
Base Offset
Sync
Computational Instructions
NOR
SLLV, SRLV, Srav Instruction Format and Description
MTHI, Mtlo Instruction Format and Description
MFHI, Mflo Instruction Format and Description
Architecture
Jump/Branch Instructions
Jump instructions
Instruction Format and Description
10. Branch instructions
Instruction in the delay slot is executed during the jump
Architecture
11. Special instructions
Special Instructions
Coprocessor Instructions
COPz Instruction Format and Description
BCzT, BCzF Instruction Format and Description
Architecture
Cache Instruction Format and Description
Restore From
System Control Coprocessor CP0 Instructions
13. System control coprocessor CP0 instructions
Pipeline Architecture
Delay Slot
Delayed load
Delayed branching
Nonblocking load function
Nonblocking Load Function
Streaming
Divide Instruction DIV, Divu
R3900 Processor Core Operating Modes
Memory Management Unit MMU
Internal MMU virtual address space
Direct Segment Mapping
Kuseg
512MB
Exception Processing
Utlb
TLBL2
Cache register
Exception Processing Registers
Cause register
Status register
Cause register register no.13
Bits Mnemonic Field name Description
Read/Write
Mnemonic Cause
ExcCode field
Read
Status register register no.12
Bits
Field name Description
Status register 1/2
Bits Mnemonic Field name Description Value on Read
IntMask Interrupt Mask
KUc/KUp/KUo Kernel/User mode current/previous/old
IEc/IEp/IEo Interrupt Enable current/previous/old
NmI Non-maskable Interrupt
Cache register
Cache register register no.7
DALc/DALp/DALo Data Cache Auto-Lock current/previous/old
IAL DAL
Shows how the RFE instruction works
PRId Processor Revision Identifier register register no.15
BadVAddr Bad Virtual Address register register no.8
21-19
Config Configuration register register no.3
10. Config register2/2
Exception Details
∙ Processing
Address Error exception ∙ Causes
∙ Exception mask
∙ Applicable instructions
∙ Servicing
Breakpoint exception ∙ Cause
Bus Error exception ∙ Causes
Architecture
Coprocessor Unusable exception ∙ Cause
Interrupts ∙ Cause
Reserved Instruction exception ∙ Cause
Overflow exception ∙ Cause
Reset exception ∙ Cause
Non-maskable interrupt ∙ Cause
System Call exception ∙ Cause
Architecture
Priority of Exceptions
Return from Exception Handler
Priority of Exceptions Exception Mnemonic
Architecture
Instruction Cache
Caches
Data Cache
Data cache configuration
Lock bit setting
Lock function
Operation during lock
Auto-lock bits
Lock bit clearing
Example
Cache Test Function
Cache disabling
Cache flushing
Cache refill
Cache Refill
Cache Snoop
Architecture
System Control Processor CP0 Registers
Debugging Functions
Depc ††
PRId Processor revision ID Debug †† Debug exception control
DBD Debug Branch Delay
DM Debug Mode 0 at reset
Debug register register no.16
OES Other Exceptions Status
BsF Bus Error Exception Flag
SSt Single at reset
NIS Non-maskable Interrupt Status
Debug Single Step DSS
Debug Exceptions
DSS bit
Types of debug exceptions
Ii Debug exception handler execution
Branching to a debug exception handler
Iii Return from a debug exception handler
Executing a Deret instruction
Exception priorities
Details of Debug Exceptions
Single Step exception ∙ Cause
∙ Exception masking
Debug Breakpoint exception ∙ Cause
∙ Instruction causing this exception
Architecture
Appendix a Instruction Set Details
Instruction Classes
Instruction Formats
Instruction Notation Conventions
Bitwise logical XOR operation
Twos complement division
Examples of Instruction Notation
Function Meaning
Table A-2. Common Load/Store Functions
Byte access 8 bits
Word access 32 bits
Triplebyte access 24 bits
Halfword access 16 bits
Jump and Branch Instructions
ADD
Addi
Addiu
Addu
Rd, rs, rt
Andi
BCzF
Operation Code Bit Encoding
BCzFL
111
BCzT
113
BCzTL
115
BEQ
Beql
Bgez
Bgezal
Bgezall
Bgezl
Bgtz
Bgtzl
Blez
Blezl
Bltz
Bltzal
Bltzall
Bltzl
BNE
Bnel
Break
Data
Bit# Cache Name
Bit# Cache Operation Description Name
CFCz
COPz
COPz
CTCz
Deret
DIV
Divu
Jump
JAL
Jalr
JR rs
LB rt, offsetbase
LBU
LH rt, offsetbase
LHU
LUI
LW rt, offsetbase
LWL
152
LWR
154
Multiply/Add
Maddu
MFC0
MFCz
MFCz
MFCz
Mfhi
Mflo
MTC0
MTCz
MTCz
Mthi
Mtlo
Mult
Multu
NOR
Or rd, rs, rt
ORI
RFE
SB rt, offsetbase
Sdbbp
SH rt, offsetbase
SLL
Sllv
SLT
Slti
Sltiu
Sltu
SRA
Srav
SRL
Srlv
SUB
Subu
SW rt, offsetbase
SWL
189
SWR
191
Sync
Syscall
XOR
Xori
OPcode
Special function
COPz rs
CP0 Function
COPz rt
Notation
TMPR3901F
200
R3900 Processor Core
On-chip peripheral circuits
Bus interface for ease of system implementation
Package
Low power consumption, optimal for portable applications
Debugging support functions on chip
Maximum operating frequency
Address protection unit
Internal Blocks
R3900 Processor Core Clock generator
Bus interface unit bus controller / write buffer
204
Configuration
R3900 Processor Core
Instruction Iimitations
Address mapping
Clock Generator
Sync NOP
Registers Break Address register BAddr0-1
Address Protection Unit
Break Control register BCnt0-1
Break Mask register BMsk0-1
Memory protection exception
Break Status register BSts
BSts 0xFF00 BAddr0 Bcnt0 BMsk0 BAddr1 Bcnt1 BMsk1
Debug Support Unit
Synchronizer
Register address map
INT50
INT* signal synchronization
NMI* signal synchronization
CPCOND31
CPCOND* signal synchronization
Pins
Doze signal. Indicates that TMPR3901F is in doze mode
Enables internal PLL clock
Mode quadruple frequency of crystal oscillator
Halt signal. Indicates that TMPR3901F is in halt mode
∙ Processor Clock
Operations
Clock
∙ Master Clock
Master clock Processor
System clock
Clock
Single Read
Read Operation
Bus error during a single read operation
Burst Read
Burst read 4 words 1 wait
Bus error in burst read operation 4 words
Single write operation 2 waits
Write Operation
1 NMI
Interrupts
Interrupt
2 INT50
Bus request and bus grant
Bus Arbitration
BUSGNT*L
Reset
Single read operation in half-speed bus mode
Half-Speed Bus Mode
Halt mode
Power-Down Mode
232
Standby mode PLL stop
Standby Mode
Doze Mode
Reduced Frequency Mode