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
Bus request and bus grant 227 Cache snoop 228
227
229
230
Architecture
Architecture
High-performance Risc techniques
Features
Introduction
Low power consumption
Notation Used in This Manual
Signal notation
Mathematical notation
Data notation
Architecture
Overview
Architecture
CPU registers
Registers
CP0 registers
Exception program counter
Reserved †
Operation code 6 bits
Instruction Set Overview
Source register 5 bits
Destination register 5 bits
Computational
Load/store
Jump/branch
Coprocessor
ALU 3-operand, register type
Computational Instructions
ALU Immediate
Jump/Branch Instructions
Multiply/Divide
Coprocessor Instructions
Special 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
Kernel mode
User mode
Memory Management Unit MMU
1 R3900 Processor Core operating modes
Kuseg
Direct segment mapping
Kseg0
Kseg1
Address mapping
Architecture
Instruction Notation
Instruction Set Overview
Instruction Formats
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
Instruction Format and Description
Jump/Branch Instructions
Jump instructions
10. Branch instructions
Instruction in the delay slot is executed during the jump
Architecture
11. Special instructions
Special Instructions
BCzT, BCzF Instruction Format and Description
Coprocessor Instructions
COPz Instruction Format and Description
Architecture
System Control Coprocessor CP0 Instructions
Restore From
13. System control coprocessor CP0 instructions
Cache Instruction Format and Description
Pipeline Architecture
Delayed branching
Delay Slot
Delayed load
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
Cause register
Exception Processing Registers
Status register
Cache register
Read/Write
Cause register register no.13
Bits Mnemonic Field name Description
Mnemonic Cause
ExcCode field
Bits
Status register register no.12
Field name Description
Read
Status register 1/2
Bits Mnemonic Field name Description Value on Read
IEc/IEp/IEo Interrupt Enable current/previous/old
KUc/KUp/KUo Kernel/User mode current/previous/old
NmI Non-maskable Interrupt
IntMask Interrupt Mask
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
∙ Exception mask
Address Error exception ∙ Causes
∙ Applicable instructions
∙ Processing
∙ 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 Exception Mnemonic
Priority of Exceptions
Return from Exception Handler
Architecture
Instruction Cache
Caches
Data Cache
Data cache configuration
Operation during lock
Lock bit setting
Lock function
Auto-lock bits
Lock bit clearing
Cache disabling
Cache Test Function
Cache flushing
Example
Cache refill
Cache Refill
Cache Snoop
Architecture
System Control Processor CP0 Registers
Debugging Functions
Depc ††
PRId Processor revision ID Debug †† Debug exception control
Debug register register no.16
DBD Debug Branch Delay
DM Debug Mode 0 at reset
SSt Single at reset
BsF Bus Error Exception Flag
NIS Non-maskable Interrupt Status
OES Other Exceptions Status
DSS bit
Debug Exceptions
Types of debug exceptions
Debug Single Step DSS
Ii Debug exception handler execution
Branching to a debug exception handler
Exception priorities
Iii Return from a debug exception handler
Executing a Deret instruction
∙ Exception masking
Details of Debug Exceptions
Single Step exception ∙ Cause
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
Triplebyte access 24 bits
Word access 32 bits
Halfword access 16 bits
Byte access 8 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
COPz rs
OPcode
Special function
CP0 Function
COPz rt
Notation
TMPR3901F
200
Bus interface for ease of system implementation
R3900 Processor Core
On-chip peripheral circuits
Debugging support functions on chip
Low power consumption, optimal for portable applications
Maximum operating frequency
Package
R3900 Processor Core Clock generator
Internal Blocks
Bus interface unit bus controller / write buffer
Address protection unit
204
Instruction Iimitations
Configuration
R3900 Processor Core
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
Synchronizer
Debug Support Unit
Register address map
BSts 0xFF00 BAddr0 Bcnt0 BMsk0 BAddr1 Bcnt1 BMsk1
INT50
INT* signal synchronization
NMI* signal synchronization
CPCOND31
CPCOND* signal synchronization
Pins
Mode quadruple frequency of crystal oscillator
Enables internal PLL clock
Halt signal. Indicates that TMPR3901F is in halt mode
Doze signal. Indicates that TMPR3901F is in doze mode
Clock
Operations
∙ Master Clock
∙ Processor Clock
Clock
Master clock Processor
System 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