® ItIIOTOROLA MPC603EUM/AD REV. 1 EC603e™ Rise Microprocessors Overview Programming Model Instruction and Data Cache Operation Exceptions Memory Management Instruction Timing Signal Descriptions System Interface Operation Power Management PowerPC Instruction Set Listings ~ Instructions Not Implemented .:D PowerPC 603 Processor System Design ~ and Programming Considerations Glossary ril!i Index lIm] Overview Programming Model Instruction and Data Cache Operation Exceptions Memory Management Instruction Timing Signal Descriptions System Interface Operation Power Management PowerPC Instruction Set Listings Instructions Not Implemented PowerPC 603 Processor System Design and Programming Considerations Glossary mDI Index MPC603EUM/AD 11/97 REV. 1 MPC603e & EC603e'" Rise Microprocessors User's Manual with Supplement for PowerPC 603™ Microprocessor ® MOTOROLA This document contains information on a new product under development. Motorola reserves the right to change or discontinue this product without notice. Information in this document is provided solely to enable system and software implementers to use PowerPC microprocessors. There are no express or implied copyright licenses granted hereunder to design or fabricate PowerPC integrated circuits or integrated circuits based on the information in this document. Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. "Typical" parameters can and do vary in different applications. All operating parameters, including ''Typicals'' must be validated for each customer application by customer's technical experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. Motorola and @ are registered trademarks and EC603e is a trademark of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer. The PowerPC name, the PowerPC logotype, and PowerPC 603 are trademarks of International Business Machines Corporation used by Motorola under license from International Business Machines Corporation. © Motorola Inc. 1997. All rights reserved. Portions hereof © International Business Machines Corp. 1991-1997. All rights reserved. CONTENTS Paragraph Page Title Number Number About This Book Audience ............................................................................................................ xxix Organization ....................................................................................................... xxix Suggested Reading ............................................................................................... xxx Conventions ..................................................................................................... xxxiii Acronyms and Abbreviations .......................................................................... xxxiv Terminology Conventions .............................................................................. xxxvii Chapter 1 Overview 1.1 Overview .............................................................................................................. 1-1 1.1.1 Features ............................................................................................................ 1-2 1.1.2 System Design and Programming Considerations ........................................... 1-7 1.1.2.1 Hardware Features ....................................................................................... 1-7 1.1.2.1.1 Replacement of XATS Signal by CSE1 Signal ....................................... 1-7 1.1.2.1.2 Addition of Half-Clock Bus Multipliers .................................................. 1-7 1.1.2.2 Software Features ........................................................................................ 1-8 1.1.2.2.1 16-Kbyte Instruction and Data Caches .................................................... 1-8 1.1.2.2.2 Clock Configuration Available in HID 1 Register ................................... 1-8 1.1.2.2.3 Performance Enhancements ..................................................................... 1-8 1.1.3 Instruction Unit ................................................................................................ 1-9 1.1.3.1 Instruction Queue and Dispatch Unit .......................................................... 1-9 1.1.3.2 Branch Processing Unit (BPU) .................................................................... 1-9 1.1.4 Independent Execution Units ......................................................................... 1-10 1.1.4.1 Integer Unit (IU) ........................................................................................ 1-10 1.1.4.2 Floating-Point Unit (FPU) ......................................................................... 1-10 1.1.4.3 Load/Store Unit (LSU) .............................................................................. 1-11 1.1.4.4 System Register Unit (SRU) ...................................................................... 1-11 1.1.4.5 Completion Unit ........................................................................................ 1-11 1.1.5 Memory Subsystem Support. ......................................................................... 1-12 1.1.5.1 Memory Management Units (MMUs) ....................................................... 1-12 1.1.5.2 Cache Units ................................................................................................ 1-13 1.1.6 Processor Bus Interface ................................................................................. 1-14 MOTOROLA Contents iii CONTENTS Paragraph Page Title Number Number 1.1.7 System Support Functions .............................................................................. 1-14 1.1.7.1 Power Management .................................................................................... 1-15 1.1.7.2 Time Base/Decrementer ............................................................................. 1-15 1.1.7.3 IEEE 1149.1 (JTAG)/COP Test Interface .................................................. 1-16 1.1.7.4 Clock Multiplier ......................................................................................... 1-16 1.2 PowerPC Architecture Implementation .............................................................. 1-16 1.3 Implementation-Specific Information ................................................................ 1-16 1.3.1 Programming Model. ...................................................................................... 1-17 1.3.1.1 Processor Version Register (PVR) ............................................................. 1-18 1.3.1.2 Hardware Implementation Register 0 (HIDO) ............................................ 1-18 1.3.1.3 Run_N Counter Register (Run_N) ............................................................. 1-19 1.3.l.4 General-Purpose Registers (GPRs) ............................................................ 1-19 1.3.1.5 Floating-Point Registers (FPRs) ................................................................. 1-19 1.3.1.6 Condition Register (CR) ............................................................................. 1-19 1.3.1.7 Floating-Point Status and Control Register (FPSCR) ................................ 1-19 1.3.1.8 Machine State Register (MSR) ................................................................... 1-19 1.3.1.9 Segment Registers (SRs) ............................................................................ 1-19 1.3.1.10 Special-Purpose Registers (SPRs) .............................................................. 1-20 1.3.1.10.1 User-Level SPRs .................................................................................... 1-20 1.3.1.10.2 Supervisor-Level SPRs .......................................................................... 1-20 1.3.2 Instruction Set and Addressing Modes ........................................................... 1-23 1.3.2.1 PowerPC Instruction Set and Addressing Modes ....................................... 1-23 1.3.2.1.1 PowerPC Instruction Set ........................................................................ 1-23 1.3.2.1.2 Calculating Effective Addresses ............................................................ 1-24 1.3.2.2 Implementation-Specific Instruction Set .................................................... 1-25 1.3.3 Cache Implementation .................................................................................... 1-25 1.3.3.1 PowerPC Cache Characteristics ................................................................. 1-25 1.3.3.2 Implementation-Specific Cache Implementation ....................................... 1-26 1.3.4 Exception Model ............................................................................................ 1-27 1.3.4.1 PowerPC Exception Model ........................................................................ 1-27 1.3.4.2 Implementation-Specific Exception Model.. .............................................. 1-29 1.3.5 Memory Management .................................................................................... 1-32 1.3.5.1 PowerPC Memory Management ................................................................ 1-32 1.3.5.2 Implementation-Specific Memory Management... ..................................... 1-32 1.3.6 Instruction Timing .......................................................................................... 1-33 1.3.7 System Interface ............................................................................................. 1-35 1.3.7.1 Memory Accesses ....................................................................................... 1-36 1.3.7.2 Signals ........................................................................................................ 1-36 1.3.7.3 Signal Configuration .................................................................................. 1-38 iv MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA CONTENTS Paragraph Page Title Number Number Chapter 2 Programming Model 2.1 Register Set .......................................................................................................... 2-1 2.1.1 PowerPC Register Set ...................................................................................... 2-1 2.1.2 Implementation-Specific Registers .................................................................. 2-7 2.1.2.1 Hardware Implementation Registers (HIDO and HID1) .............................. 2-7 2.1.2.2 Data and Instruction TLB Miss Address Registers (DMISS and IMISS) ................................................................................ 2-9 2.1.2.3 Data and Instruction TLB Compare Registers (DCMP and ICMP) .................................................................................. 2-9 2.1.2.4 Primary and Secondary Hash Address Registers (HASHl and HASH2) ........................................................................... 2-10 2.1.2.5 Required Physical Address Register (RPA) ............................................... 2-11 2.1.2.6 Instruction Address Breakpoint Register (IABR) ...................................... 2-11 2.l.2.7 Run_N Counter Register (Run_N) ............................................................. 2-12 2.2 Operand Conventions ......................................................................................... 2-12 2.2.1 Floating-Point Execution Models-urSA ..................................................... 2-12 2.2.2 Data Organization in Memory and Data Transfers ........................................ 2-13 2.2.3 Alignment and Misaligned Accesses ............................................................. 2-13 2.2.4 Floating-Point Operand .................................................................................. 2-14 2.2.5 Effect of Operand Placement on Performance ............................................... 2-14 2.3 Instruction Set Summary .................................................................................... 2-15 2.3.1 Classes of Instructions .................................................................................... 2-16 2.3.1.1 Definition of Boundedly Undefined .......................................................... 2-16 2.3.1.2 Defined Instruction Class ........................................................................... 2-16 2.3.1.3 Illegal Instruction Class ............................................................................. 2-17 2.3.1.4 Reserved Instruction Class ......................................................................... 2-18 2.3.2 Addressing Modes .......................................................................................... 2-18 2.3.2.1 Memory Addressing ................................................................................... 2-18 2.3.2.2 Memory Operands ...................................................................................... 2-18 2.3.2.3 Effective Address Calculation ................................................................... 2-19 2.3.2.4 Synchronization ......................................................................................... 2-19 2.3.2.4.1 Context Synchronization ........................................................................ 2-20 2.3.2.4.2 Execution Synchronization .................................................................... 2-20 2.3.2.4.3 Instruction-Related Exceptions .............................................................. 2-20 2.3.3 Instruction Set Overview ................................................................................ 2-21 2.3.4 PowerPC UISA Instructions .......................................................................... 2-21 2.3.4.1 Integer Instructions .................................................................................... 2-21 2.3.4.1.1 Integer Arithmetic Instructions .............................................................. 2-22 2.3.4.1.2 Integer Compare Instructions ................................................................. 2-22 2.3.4.l.3 Integer Logical Instructions ................................................................... 2-23 2.3.4.1.4 Integer Rotate and Shift Instructions ..................................................... 2-24 MOTOROLA Contents v CONTENTS Paragraph Page Title Number Number 2.3.4.2 Floating-Point Instructions ......................................................................... 2-25 2.3.4.2.1 Floating-Point Arithmetic Instructions ................................................... 2-26 2.3.4.2.2 Floating-Point Multiply-Add Instructions .............................................. 2-26 2.3.4.2.3 Floating-Point Rounding and Conversion Instructions .......................... 2-27 2.3.4.2.4 Floating-Point Compare Instructions ..................................................... 2-27 2.3.4.2.5 Floating-Point Status and Control Register Instructions ........................ 2-27 2.3.4.2.6 Floating-Point Move Instructions ........................................................... 2-28 2.3.4.3 Load and Store Instructions ........................................................................ 2-28 2.3.4.3.1 Self-Modifying Code .............................................................................. 2-29 2.3.4.3.2 Integer Load and Store Address Generation .......................................... 2-29 2.3.4.3.3 Register Indirect Integer Load Instructions ............................................ 2-29 2.3.4.3.4 Integer Store Instructions ....................................................................... 2-30 2.3.4.3.5 Integer Load and Store with Byte-Reverse Instructions ........................ 2-31 2.3.4.3.6 Integer Load and Store Multiple Instructions ......................................... 2-32 2.3.4.3.7 Integer Load and Store String Instructions ............................................. 2-33 2.3.4.3.8 Floating-Point Load and Store Address Generation ............................... 2-34 2.3.4.3.9 Floating-Point Load Instructions ............................................................ 2-34 2.3.4.3.10 Floating-Point Store Instructions ........................................................... 2-34 2.3.4.4 Branch and Flow Control Instructions ....................................................... 2-35 2.3.4.4.1 Branch Instruction Address Calculation................................................. 2-36 2.3.4.4.2 Branch Instructions ................................................................................ 2-36 2.3.4.4.3 Condition Register Logical Instructions ................................................ 2-36 2.3.4.5 Trap Instructions ......................................................................................... 2-37 2.3.4.6 Processor Control Instructions ................................................................... 2-37 2.3.4.6.1 Move to/from Condition Register Instructions ...................................... 2-38 2.3.4.7 Memory Synchronization Instructions-UISA .......................................... 2-38 2.3.5 PowerPC VEA Instructions ............................................................................ 2-39 2.3.5.1 Processor Control Instructions ................................................................... 2-39 2.3.5.2 Memory Synchronization Instructions-VEA ........................................... 2-40 2.3.5.3 Memory Control Instructions-VEA ......................................................... 2-41 2.3.5.4 External Control Instructions ..................................................................... 2-42 2.3.6 PowerPC OEA Instructions ............................................................................ 2-42 2.3.6.1 System Linkage Instructions ...................................................................... 2-42 2.3.6.2 Processor Control Instructions-OEA ....................................................... 2-42 2.3.6.2.1 Move to/from Machine State Register Instructions ............................... 2-43 2.3.6.2.2 Move to/from Special-Purpose Register Instructions ............................ 2-43 2.3.6.3 Memory Control Instructions-OEA ......................................................... 2-44 2.3.6.3.1 Supervisor-Level Cache Management Instruction ................................. 2-44 2.3.6.3.2 Segment Register Manipulation Instructions ......................................... 2-45 2.3.6.3.3 Translation Lookaside Buffer Management Instructions ....................... 2-45 2.3.7 Recommended Simplified Mnemonics .......................................................... 2-46 2.3.8 Implementation-Specific Instructions ............................................................ 2-46 vi MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA CONTENTS Paragraph Page Title Number Number Chapter 3 Instruction and Data Cache Operation 3.1 Instruction Cache Organization and ControL ..................................................... 3-3 3.1.1 Instruction Cache Organization ........................................................................ 3-3 3.1.2 Instruction Cache Fill Operations .................................................................... 3-4 3.1.3 Instruction Cache Control ................................................................................ 3-4 3.1.3.1 Instruction Cache Invalidation ..................................................................... 3-4 3.1.3.2 Instruction Cache Disabling ......................................................................... 3-4 3.1.3.3 Instruction Cache Locking ........................................................................... 3-4 3.2 Data Cache Organization and Control ................................................................. 3-5 3.2.1 Data Cache Organization ................................................................................. 3-5 3.2.2 Data Cache Fill Operations .............................................................................. 3-5 3.2.3 Data Cache Control .......................................................................................... 3-6 3.2.3.1 Data Cache Invalidation ............................................................................... 3-6 3.2.3.2 Data Cache Disabling ................................................................................... 3-6 3.2.3.3 Data Cache Locking ..................................................................................... 3-6 3.2.3.4 Data Cache Operations and Address Broadcasts ......................................... 3-7 3.2.4 Data Cache Touch Load Support ..................................................................... 3-7 3.3 Basic Data Cache Operations ............................................................................... 3-8 3.3.1 Data Cache Fill ................................................................................................. 3-8 3.3.2 Data Cache Cast-Out Operation ....................................................................... 3-8 3.3.3 Cache Block Push Operation ........................................................................... 3-8 3.4 Data Cache Transactions on Bus .......................................................................... 3-8 3.4.1 Single-Beat Transactions ................................................................................. 3-8 3.4.2 Burst Transactions ............................................................................................ 3-8 3.4.3 Access to Direct-Store Segments ..................................................................... 3-9 3.5 Memory Management/Cache Access Mode Bits-W, I, M, and G ................... 3-10 3.5.1 Write-Through Attribute (W) ......................................................................... 3-11 3.5.2 Caching-Inhibited Attribute (I) ...................................................................... 3-11 3.5.3 Memory Coherency Attribute (M) ................................................................. 3-12 3.5.4 Guarded Attribute (G) .................................................................................... 3-12 3.5.5 W, I, and M Bit Combinations ....................................................................... 3-13 3.5.5.1 Out-of-Order Execution and Guarded Memory ......................................... 3-13 3.5.5.2 Effects of Out-of-Order Data Accesses ..................................................... 3-14 3.5.5.3 Effects of Out-of-Order Instruction Fetches .............................................. 3-14 3.6 Cache Coherency-MEl Protocol ...................................................................... 3-15 3.6.1 MEl State Definitions .................................................................................... 3-15 3.6.2 MEl State Diagram ........................................................................................ 3-16 3.6.3 MEl Hardware Considerations ....................................................................... 3-17 3.6.4 Coherency Precautions ................................................................................... 3-18 3.6.4.1 Coherency in Single-Processor Systems .................................................... 3-18 3.6.5 Load and Store Coherency Summary ............................................................ 3-18 MOTOROLA Contents vii CONTENTS Paragraph Page Title Number Number 3.6.6 Atomic Memory References .......................................................................... .3-19 3.6.7 Cache Reaction to Specific Bus Operations ................................................... 3-19 3.6.8 Operations Causing ARTRY Assertion ......................................................... .3-21 3.6.9 Enveloped High-Priority Cache Block Push Operation ................................ .3-21 3.7 Cache Control Instructions ................................................................................. 3-22 3.7.1 Data Cache Block Invalidate (dcbi) Instruction ............................................ .3-23 3.7.2 Data Cache Block Touch (debt) Instruction ................................................. .3-23 3.7.3 Data Cache Block Touch for Store (debtst) Instruction ................................ 3-24 3.7.4 Data Cache Block Clear to Zero (debz) Instruction ....................................... 3-24 3.7.5 Data Cache Block Store (debst) Instruction ................................................. .3-24 3.7.6 Data Cache Block Flush (debf) Instruction ................................................... .3-24 3.7.7 Enforce In-Order Execution of 110 Instruction (eieio) .................................. .3-25 3.7.8 Instruction Cache Block Invalidate (iebi) Instruction ................................... .3-25 3.7.9 Instruction Synchronize (isyne) Instruction ................................................... 3-25 3.8 Bus Operations Caused by Cache Control Instructions ..................................... .3-25 3.9 Bus Interface ...................................................................................................... .3-27 3.10 MEl State Transactions ...................................................................................... 3-28 Chapter 4 Exceptions 4.1 Exception Classes ................................................................................................ .4-2 4.1.1 Exception Priorities ......................................................................................... .4-7 4.1.2 Summary of Front-End Exception Handling ................................................... .4-9 4.2 Exception Processing ......................................................................................... .4-1 0 4.2.1 Enabling and Disabling Exceptions ............................................................... .4-14 4.2.2 Steps for Exception Processing ..................................................................... .4-15 4.2.3 Setting MSR[RI] ............................................................................................ .4-15 4.2.4 Returning from an Exception Handler ......................................................... ..4-16 4.3 Process Switching .............................................................................................. .4-16 4.4 Exception Latencies ........................................................................................... .4-17 4.5 Exception Definitions ........................................................................................ .4-17 4.5.1 Reset Exceptions (OxOO 100) ......................................................................... ..4-18 4.5.1.1 Hard Reset and Power-On Reset ............................................................... .4-19 4.5.1.2 Soft Reset .................................................................................................. .4-20 4.5.2 Machine Check Exception (Ox00200) ........................................................... .4-21 4.5.2.1 Machine Check Exception Enabled (MSR[ME] = 1) .............................. ..4-22 4.5.2.2 Checkstop State (MSR[ME] = 0) .............................................................. .4-22 4.5.3 DSI Exception (Ox00300) .............................................................................. .4-23 4.5.4 lSI Exception (Ox00400) ............................................................................... .4-25 4.5.5 External Interrupt (Ox00500) ......................................................................... .4-25 4.5.6 Alignment Exception (Ox00600) ................................................................... .4-26 viii MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA CONTENTS Paragraph Page Title Number Number 4.5.6.1 Integer Alignment Exceptions ................................................................... 4-27 4.5.6.1.1 Page Address Translation Access .......................................................... 4-28 4.5.6.2 Floating-Point Alignment Exceptions ........................................................ 4-28 4.5.7 Program Exception (Ox00700) ....................................................................... 4-29 4.5.7.1 IEEE Floating-Point Exception Program Exceptions ................................ 4-30 4.5.7.2 Illegal, Reserved, and Unimplemented Instructions Program Exceptions ............................................................................... 4-30 4.5.8 Floating-Point Unavailable Exception (Ox00800) ........................................ .4-31 4.5.9 Decrementer Exception (Ox00900) ................................................................ 4-31 4.5.10 System Call Exception (OxOOCOO) ................................................................. 4-31 4.5.11 Trace Exception (OxOODOO) ........................................................................... 4-32 4.5.11.1 Single-Step Instruction Trace Mode .......................................................... 4-33 4.5.11.2 Branch Trace Mode .................................................................................... 4-33 4.5.12 Instruction TLB Miss Exception (OxOlOOO) .................................................. 4-33 4.5.13 Data TLB Miss on Load Exception (OxOil 00) .............................................. 4-34 4.5.14 Data TLB Miss on Store Exception (Ox0l200) ............................................. .4-35 4.5.15 Instruction Address Breakpoint Exception (Ox01300) ................................... 4-35 4.5.16 System Management Interrupt (OxOI400) .................................................... .4-37 Chapter 5 Memory Management 5.1 MMU Features ..................................................................................................... 5-2 5.1.1 Memory Addressing ......................................................................................... 5-3 5.1.2 MMU Organization .......................................................................................... 5-3 5.1.3 Address Translation Mechanisms .................................................................... 5-8 5.1.4 Memory Protection Facilities ......................................................................... 5-1 0 5.1.5 Page History Information ............................................................................... 5-11 5.1.6 General Flow of MMU Address Translation ................................................. 5-11 5.1.6.1 Real Addressing Mode and Block Address Translation Selection ............ 5-11 5.1.6.2 Page Address Translation Selection ........................................................... 5-12 5.1.7 MMU Exceptions Summary .......................................................................... 5-14 5.1.8 MMU Instructions and Register Summary .................................................... 5-17 5.2 Real Addressing Mode ....................................................................................... 5-20 5.3 Block Address Translation ................................................................................. 5-20 5.4 Memory Segment Model .................................................................................... 5-21 5.4.1 Page History Recording ................................................................................. 5-21 5.4.1.1 Referenced BiL ........................................................................................... 5-22 5.4.1.2 Changed BiL ............................................................................................... 5-23 5.4.1.3 Scenarios for Referenced and Changed Bit Recording .............................. 5-23 5.4.2 Page Memory Protection ................................................................................ 5-25 5.4.3 TLB Description ............................................................................................. 5-25 MOTOROLA Contents ix CONTENTS Paragraph Page Title Number Number 5.4.3.1 TLB Organization ....................................................................................... 5-25 5.4.3.2 TLB Entry Invalidation .............................................................................. 5-27 5.4.4 Page Address Translation Summary .............................................................. 5-28 5.5 Page Table Search Operation ............................................................................ .5-30 5.5.1 Page Table Search Operation-Conceptual Flow ......................................... .5-30 5.5.2 Implementation-Specific Table Search Operation ......................................... 5-33 5.5.2.1 Resources for Table Search Operations ..................................................... 5-34 5.5.2.1.1 Data and Instruction TLB Miss Address Registers (DMISS and IMISS) ............................................................................... 5-36 5.5.2.1.2 Data and Instruction TLB Compare Registers (DCMP and ICMP) ....... 5-37 5.5.2.1.3 Primary and Secondary Hash Address Registers (HASH 1 and HASH2) ............................................................................ 5-37 5.5.2.1.4 Required Physical Address Register (RPA) ........................................... 5-38 5.5.2.2 Software Table Search Operation ............................................................... 5-38 5.5.2.2.1 Flow for Example Exception Handlers .................................................. 5-39 5.5.2.2.2 Code for Example Exception Handlers .................................................. 5-44 5.5.3 Page Table Updates ........................................................................................ 5-50 5.5.4 Segment Register Updates .............................................................................. 5-50 Chapter 6 Instruction Timing 6.1 Terminology and Conventions ............................................................................. 6-1 6.2 Instruction Timing Overview ............................................................................... 6-3 6.3 Timing Considerations .........................................................................................6-5 6.3.1 General Instruction Flow .................................................................................. 6-6 6.3.2 Instruction Fetch Timing .................................................................................. 6-9 6.3.2.1 Cache Arbitration ......................................................................................... 6-9 6.3.2.2 Cache Hit ...................................................................................................... 6-9 6.3.2.3 Cache Miss ................................................................................................. 6-1 0 6.3.3 Instruction Dispatch and Completion Considerations .................................... 6-11 6.3.3.1 Rename Register Operation ........................................................................ 6-12 6.3.3.2 Instruction Serialization ............................................................................. 6-13 6.3.3.3 Execution Unit Considerations ................................................................... 6-14 6.4 Execution Unit Timings ...................................................................................... 6-14 6.4.1 Branch Processing Unit Execution Timing .................................................... 6-14 6.4.1.1 Branch Folding ........................................................................................... 6-14 6.4.1.2 Static Branch Prediction ............................................................................. 6-16 6.4.1.2.1 Predicted Branch Timing Examples ....................................................... 6-16 6.4.2 Integer Unit Execution Timing ....................................................................... 6-18 6.4.3 Floating-Point Unit Execution Timing ........................................................... 6-18 6.4.4 Load/Store Unit Execution Timing ................................................................ 6-18 x MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA CONTENTS Paragraph Page Title Number Number 6.4.5 System Register Unit Execution Timing ........................................................ 6-18 6.5 Memory Performance Considerations ................................................................ 6-18 6.5.1 Copy-Back Mode ........................................................................................... 6-19 6.5.2 Write-Through Mode ..................................................................................... 6-19 6.5.3 Cache-Inhibited Accesses .............................................................................. 6-20 6.6 Instruction Scheduling Guidelines ..................................................................... 6-20 6.6.1 Branch, Dispatch, and Completion Unit Resource Requirements ................. 6-21 6.6.1.1 Branch Resolution Resource Requirements ............................................... 6-21 6.6.1.2 Dispatch Unit Resource Requirements ...................................................... 6-21 6.6.1.3 Completion Unit Resource Requirements .................................................. 6-22 6.7 Instruction Latency Summary ............................................................................ 6-22 Chapter 7 Signal Descriptions 7.1 Signal Configuration ............................................................................................ 7-3 7.2 Signal Descriptions .............................................................................................. 7-4 7.2.1 Address Bus Arbitration Signals ...................................................................... 7-4 7.2.1.1 Bus Request (BR)-Output. ......................................................................... 7-4 7.2.1.2 Bus Grant (BG)-Input ................................................................................ 7-5 7.2.1.3 Address Bus Busy (ABB) ............................................................................ 7-5 7.2.1.3.1 Address Bus Busy (ABB)-Output ......................................................... 7-5 7.2.1.3.2 Address Bus Busy (ABB)-Input.. .......................................................... 7-6 7.2.2 Address Transfer Start Signals ......................................................................... 7-6 7.2.2.1 Transfer Start (TS) ....................................................................................... 7-6 7.2.2.1.1 Transfer Start (TS)-Output .................................................................... 7-6 7.2.2.1.2 Transfer Start (TS)-Input ....................................................................... 7-7 7.2.3 Address Transfer Signals ................................................................................. 7-7 7.2.3.1 Address Bus (A[0-31]) ................................................................................ 7-7 7.2.3.1.1 Address Bus (A[0-31])-Output ............................................................. 7-7 7.2.3.1.2 Address Bus (A[0-31])-Input.. .............................................................. 7-7 7.2.3.2 Address Bus Parity (AP[0-3]) ..................................................................... 7-8 7.2.3.2.1 Address Bus Parity (AP[0--3])-Output .................................................. 7-8 7.2.3.2.2 Address Bus Parity (AP[0--3])-Input.. ................................................... 7-8 7.2.3.3 Address Parity Error (APE)-Output.. ........................................................ 7-8 7.2.4 Address Transfer Attribute Signals .................................................................. 7-9 7.2.4.1 Transfer Type (TT[O-4]) .............................................................................. 7-9 7.2.4.1.1 Transfer Type (TT[O-4])-Output.. ......................................................... 7-9 7.2.4.1.2 Transfer Type (TT[O-4])-Input ............................................................. 7-9 7.2.4.2 Transfer Size (TSIZ[0--2])-Output .......................................................... 7-12 7.2.4.3 Transfer Burst (TBST) ............................................................................... 7-13 7.2.4.3.1 Transfer Burst (TBST)-Output ............................................................ 7-13 MOTOROLA Contents xi CONTENTS Paragraph Page Title Number Number 7.2.4.3.2 Transfer Burst (TBST)-Input ............................................................... 7-13 7.2.4.4 Transfer Code (TC[O-I])-Output ............................................................ 7-14 7.2.4.5 Cache Inhibit (CI)-Output ....................................................................... 7-14 7.2.4.6 Write-Through (WT)-Output... ................................................................ 7-14 7.2.4.7 Global (GBL) .............................................................................................. 7-15 7.2.4.7.1 Global (GBL)-Output .......................................................................... 7-15 7.2.4.7.2 Global (GBL)-Input ............................................................................. 7-15 7.2..4.8 Cache Set Entry (CSE[O-I])-Output ....................................................... 7-15 7.2.5 Address Transfer Termination Signals ........................................................... 7-15 7.2.5.1 Address Acknowledge (AACK)-Input.. ................. ,................................ 7-16 7.2.5.2 Address Retry (ARTRY) ............................................................................ 7-16 7.2.5.2.1 Address Retry (ARTRY)-Output. ........................................................ 7-16 7.2.5.2.2 Address Retry (ARTRY)-Input ........................................................... 7-17 7.2.6 Data Bus Arbitration Signals .......................................................................... 7-17 7.2.6.1 Data Bus Grant (DBG)-Input .................................................................. 7-17 7.2.6.2 Data Bus Write Only (DBWO)-Input ..................................................... 7-18 7.2.6.3 Data Bus Busy (DBB) ................................................................................ 7-18 7.2.6.3.1 Data Bus Busy (DBB)-Output ............................................................. 7-18 7.2.6.3.2 Data Bus Busy (DBB)-Input ................................................................ 7-18 7.2.7 Data Transfer Signals ..................................................................................... 7-19 7.2.7.1 Data Bus (DH[0-31], DL[0-31]) ............................................................... 7-19 7.2.7.1.1 Data Bus (DH[0-31], DL[0-31])-Output.. .......................................... 7-19 7.2.7.1.2 Data Bus (DH[0-31], DL[0-31])-Input.. ............................................. 7-20 7.2.7.2 Data Bus Parity (DP[0-7]) ......................................................................... 7-20 7.2.7.2.1 Data Bus Parity (DP[0-7])-Output ...................................................... 7-20 7.2.7.2.2 Data Bus Parity (DP[0-7])-Input ......................................................... 7-20 7.2.7.3 Data Parity Error (DPE)-Output.. ............................................................ 7-21 7.2.7.4 Data Bus Disable (DBDIS)-Input ............................................................ 7-21 7.2.8 Data Transfer Termination Signals ................................................................ 7-21 7.2.8.1 Transfer Acknowledge (TA)-Input. ......................................................... 7-22 7.2.8.2 Data Retry (DRTRY)-Input ..................................................................... 7-22 7.2.8.3 Transfer Error Acknowledge (TEA)-Input.. ........................................... ;7-23 7.2.9 System Status Signals ..................................................................................... 7-23 7.2.9.1 Interrupt (INT)-Input ............................................................................... 7-23 7.2.9.2 System Management Interrupt (SMI)-Input ............................................ 7-24 7.2.9.3 Machine Check Interrupt (MCP)-Input.. ................................................. 7-24 7.2.9.4 Checkstop Input (CKSTP_IN)-Input ...................................................... 7-24 7.2.9.5 Checkstop Output (CKSTP_OUT)-Output.. ........................................... 7-25 7.2.9.6 Reset Signals .............................................................................................. 7-25 7.2.9.6.1 Hard Reset (HRESET)-Input. .............................................................. 7-25 7.2.9.6.2 Soft Reset (SRESET)-Input ................................................................. 7-26 7.2.9.7 Processor Status Signals ............................................................................. 7-26 7.2.9.7.1 Quiescent Request (QREQ) ................................................................... 7-26 xii MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA CONTENTS Paragraph Page Title Number Number 7.2.9.7.2 Quiescent Acknowledge (QACK) ......................................................... 7-26 7.2.9.7.3 Reservation (RSRV)-Output ............................................................... 7-27 7.2.9.7.4 Time Base Enable (TBEN)-Input... ..................................................... 7-27 7.2.9.7.5 TLBI Sync (TLBISYNC) ...................................................................... 7-27 7.2.10 COP/Scan Interface ........................................................................................ 7-28 7.2.11 Pipeline Tracking Support. ............................................................................. 7-28 7.2.12 Clock Signals ................................................................................................. 7-29 7.2.12.1 System Clock (SYSCLK)-Input .............................................................. 7-30 7.2.12.2 Test Clock (CLK_OUT)-Output ............................................................. 7-30 7.2.12.3 PLL Configuration (PLL_CFG[0-3])-Input ........................................... 7-30 7.2.13 Power and Ground Signals ............................................................................. 7-32 Chapter 8 System Interface Operation 8.1 Overview .............................................................................................................. 8-1 8.1.1 Operation of the Instruction and Data Caches ................................................. 8-2 8.1.2 Operation of the System Interface .................................................................... 8-4 8.1.2.1 Optional 32-Bit Data Bus Mode .................................................................. 8-5 8.1.3 Direct-Store Accesses ...................................................................................... 8-6 8.2 Memory Access Protocol ..................................................................................... 8-6 8.2.1 Arbitration Signals ........................................................................................... 8-7 8.2.2 Address Pipelining and Split-Bus Transactions ............................................... 8-8 8.3 Address Bus Tenure ............................................................................................. 8-9 8.3.1 Address Bus Arbitration ................................................................................... 8-9 8.3.2 Address Transfer ............................................................................................ 8-11 8.3.2.1 Address Bus Parity ..................................................................................... 8-13 8.3.2.2 Address Transfer Attribute Signals ............................................................ 8-13 8.3.2.2.1 Transfer Type (TT[0-4]) Signals ........................................................... 8-13 8.3.2.2.2 Transfer Size (TSIZ[0-2]) Signals ......................................................... 8-13 8.3.2.3 Burst Ordering During Data Transfers ....................................................... 8-14 8.3.2.4 Effect of Alignment in Data Transfers (64-Bit Bus) .................................. 8-15 8.3.2.5 Effect of Alignment in Data Transfers (32-Bit Bus) .................................. 8-17 8.3.2.5.1 Alignment of External Control Instructions ........................................... 8-19 8.3.2.6 Transfer Code (TC[O-l]) Signals .............................................................. 8-20 8.3.3 Address Transfer Termination ...................................................................... 8-20 8.4 Data Bus Tenure ................................................................................................. 8-22 8.4.1 Data Bus Arbitration ...................................................................................... 8-22 8.4.1.1 Using the DBB Signal ................................................................................ 8-23 8.4.2 Data Bus Write Only ...................................................................................... 8-24 8.4.3 Data Transfer .................................................................................................. 8-24 8.4.4 Data Transfer Termination ............................................................................. 8-25 MOTOROLA Contents xiii CONTENTS Paragraph Page Title Number Number 8.4.4.1 Nonnal Single-Beat Tennination ............................................................... 8-26 8.4.4.2 Data Transfer Tennination Due to a Bus Error .......................................... 8-29 8.4.S Memory Coherency-MEl Protocol .............................................................. 8-30 8.S Timing Examples ................................................................................................ 8-32 8.6 Optional Bus.Configurations .............................................................................. 8-38 8.6.1 32-Bit Data Bus Mode .................................................................................... 8-38 8.6.2 No-ORTRY Mode .......................................................................................... 8-40 8.6.3 Reduced-Pinout Mode .................................................................................... 8-40 8.7 Interrupt, Checkstop, and Reset Signals ............................................................. 8-41 8.7.1 External Interrupts .......................................................................................... 8-41 8.7.2 Checkstops ...................................................................................................... 8-41 8.7.3 Reset Inputs .................................................................................................... 8-41 8.7.4 System Quiesce Control Signals .................................................................... 8-42 8.8 Processor State Signals ....................................................................................... 8-42 8.8.1 Support for the lwarxlstwcx. Instruction Pair.. .............................................. 8-42 8.8.2 TLBISYNC Input ........................................................................................... 8-42 8.9 IEEE 1149 . I-Compliant Interface ...................................................................... 8-43 8.9.1 IEEE 1149.1 Interface Description ................................................................. 8-43 8.10 Using Data Bus Write Only ................................................................................ 8-43 Chapter 9 Power Management 9.1 Dynamic Power Management .............................................................................. 9-1 9.2 Programmable Power Modes ................................................................................ 9-1 9.2.1 Power Management Modes .............................................................................. 9-3 9.2.1.1 Full-Power Mode with DPM Disabled ......................................................... 9-3 9.2.1.2 Full-Power Mode with DPM Enabled .......................................................... 9-3 9.2.1.3 Doze Mode ................................................................................................... 9-4 9.2.1.4 Nap Mode ..................................................................................................... 9-4 9.2.1.S Sleep Mode ................................................................................................... 9-S 9.2.2 Power Management Software Considerations .................................................. 9-6 Appendix A PowerPC Instruction Set Listings A.l Instructions Sorted by Mnemonic ........................................................................ A-l A.2 Instructions Sorted by Opcode ............................................................................ A-9 A.3 Instructions Grouped by Functional Categories ................................................ A-17 AA Instructions Sorted by Form .............................................................................. A-28 A.S Instruction Set Legend ....................................................................................... A-39 xiv MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA CONTENTS Paragraph Page Title Number Number Appendix B Instructions Not Implemented Appendix C PowerPC 603 Processor System Design and Programming Considerations C.I PowerPC 603 Microprocessor Hardware Considerations ................................... C-l C.I.I Hardware Support for Direct-Store Accesses ................................................. C-I C.l.l.1 Extended Address Transfer Start (XATS) .................................................. C-2 c.l.l.l.l Extended Address Transfer Start (XATS)-Output ............................... C-2 C.1.l.l.2 Extended Address Transfer Start (XATS)-Input.. ................................ C-2 C.1.2 Direct-Store Protocol Operation ..................................................................... C-2 C.l.2.l Direct-Store Transactions ........................................................................... C-4 C.l.2.1.1 Store Operations ...................................................................................... C-S C. 1.2. l.2 Load Operations ...................................................................................... C-S C.l.2.2 Direct-Store Transaction Protocol Details .................................................. C-6 C.I.2.2.1 Packet 0 ................................................................................................... C-7 C.1.2.2.2 Packet I ................................................................................................... C-S C.l.2.3 I/O Reply Operations .................................................................................. C-S C.I.2.4 Direct-Store Operation Timing ................................................................. C-IO C.1.3 CSE Signal .................................................................................................... C-12 C.1.4 PowerPC 603 Processor Bus Clock Multiplier Configuration ...................... C-12 C.I.S PowerPC 603 Processor Cache Organization ............................................... C-13 C.I.S.1 Instruction Cache Organization ................................................................ C-14 C.l.S.2 Data Cache Organization .......................................................................... C-14 C.l.6 PLL Configuration (PLL_CFG[O-3])-Input.. ............................................. C-IS C.1.7 Address Pipelining and Split-Bus Transactions ............................................ C-IS C.1.S Data Bus Arbitration ..................................................................................... C-16 C.2 PowerPC 603 Processor Software Considerations ............................................ C-16 C.2.1 Direct-Store Interface Address Translation .................................................. C-16 C.2.1.1 Direct-Store Segment Translation Summary Flow ................................... C-17 C.2.1.2 Direct-Store Interface Accesses ................................................................ C-IS C.2.1.3 Direct-Store Segment Protection .............................................................. C-IS C.2.1.4 Instructions Not Supported in Direct-Store Segments .............................. C-19 C.2.I.S Instructions with No Effect in Direct-Store Segments .............................. C-19 C.2.2 Store Instruction Latency .............................................................................. C-19 C.2.3 Instruction Execution by System Register Unit.. .......................................... C-20 C.2.4 Machine Check Exception (Ox00200) ........................................................... C-21 C.2.S Instruction Address Breakpoint Exception (Ox01400) .................................. C-21 C.2.6 Cache Control Instructions ............................................................................ C-21 MOTOROLA Contents xv CONTENTS Paragraph Page Title Number Number Glossary of Terms and Abbreviations Index xvi MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA I LLUSTRA TIONS Figure Page Title Number Number 1-1 Block Diagram ............... ........ ................. ............. ..... ..... ........ ...... .... .............. ..... 1-6 1-2 Programming Model-Registers ...................................................................... 1-22 1-3 Data Cache Organization .................................................................................. 1-27 1-4 Exception Classifications......... .......... ......... ............. ....... ..................... ....... ...... 1-29 1-5 Exceptions and Conditions ............................................................................... 1-29 1-6 System Interface................................................................................................ 1-35 1-7 Signal Groups .................................................................................................... 1-38 2-1 Programming Model-Registers ........................................................................ 2-3 2-2 Hardware Implementation Register 0 (HIDO) .................................................... 2-7 2-3 Hardware Implementation Register 1 (HIDl) .................................................... 2-9 2-4 DMISS and IMISS Registers .............................................................................. 2-9 2-5 DCMP and ICMP Registers..... ......... .......... ................. ... ......... .............. ...... ..... 2-\ 0 2-6 HASHI and HASH2 Registers ......................................................................... 2-10 2-7 Required Physical Address Register (RPA) ..................................................... 2-11 2-8 Instruction Address Breakpoint Register (IABR) ............................................. 2-11 3-1 Instruction Cache Organization .......................................................................... 3-3 3-2 Data Cache Organization .................................................................................... 3-5 3-3 Double-Word Address Ordering-Critical Double Word First... ....................... 3-9 3-4 MEl Cache Coherency Protocol-State Diagram (WIM = 001) ...................... 3-16 3-5 Bus Interface Address Buffers .......................................................................... 3-28 4-1 Exceptions and Conditions ................................................................................. 4-4 4-2 Machine Status SavelRestore Register 0 .......................................................... 4-10 4-3 Machine Status SavelRestore Register 1 .......................................................... 4-10 4-4 Machine State Register (MSR) ......................................................................... 4-12 5-1 MMU Conceptual Block Diagram-32-Bit Implementations ............................ 5-5 5-2 IMMU Block Diagram ........................................................................................ 5-6 5-3 DMMU Block Diagram ...................................................................................... 5-7 5-4 Address Translation Types ................................................................................. 5-9 5-5 General Flow of Address Translation (Real Addressing Mode and Block) ..... 5-12 5-6 General Flow of Page and Direct-Store Interface Address Translation ........... 5-13 5-7 Segment Register and TLB Organization ......................................................... 5-26 5-8 Page Address Translation Flow for 32-Bit Implementations-TLB Hit... ....... 5-29 5-9 Primary Page Table Search-Conceptual Flow ............................................... 5-32 5-lO Secondary Page Table Search Flow-Conceptual Flow .................................. 5-33 5-11 Derivation of Key Bit for SRR 1 ....................................................................... 5-36 5-12 DMISS and IMISS Registers ............................................................................ 5-36 5-l3 DCMP and ICMP Registers .............................................................................. 5-37 MOTOROLA Illustrations xvii ILLUSTRATIONS Figure Page Title Number Number 5-14 HASHI and HASH2 Registers ......................................................................... 5-37 5-15 Required Physical Address (RPA) Register ..................................................... 5-38 5-16 Flow for Example Software Table Search Operation ....................................... 5-40 5-17 Check and Set Rand C Bit Flow.............. .............................. .............. ............ 5-41 5-18 Page Fault Setup Flow.................. ............... ............. ................... .......... ........... 5-42 5-19 Setup for Protection Violation Exceptions ....................................................... 5-43 6-1 Pipelined Execution Unit .................................................................................... 6-4 6-2 Instruction Flow Diagram................................................................................... 6-8 6-3 Instruction Timing-Cache Hit ........................................................................ 6-10 6-4 Instruction Timing-Cache Miss ...................................................................... 6-11 6-5 Branch Instruction Timing ....... .................. .................................. .......... ........... 6-17 7-1 Signal Groups ...................................................................................................... 7-3 7-2 IEEE 1149.1-Compliant Boundary Scan Interface ........................................... 7-28 8-1 Block Diagram .................................................................................................... 8-3 8-2 Timing Diagram Legend ..................................................................................... 8-5 8-3 Overlapping Tenures on the Bus for a Single-Beat Transfer .............................. 8-6 8-4 Address Bus Arbitration ................................................................................... 8-10 8-5 Address Bus Arbitration Showing Bus Parking ................................................ 8-11 8-6 Address Bus Transfer ........................................................................................ 8-12 8-7 Snooped Address Cycle with ARTRY ............................................................. 8-22 8-8 Data Bus Arbitration ......................................................................................... 8-23 8-9 Normal Single-Beat Read Termination ............................................................ 8-26 8-10 Normal Single-Beat Write Termination ............................................................ 8-27 8-11 Normal Burst Transaction ................................................................................. 8-27 8-12 Termination with DRTRY ................................................................................ 8-28 8-13 Read Burst with TA Wait States and DRTRY .................................................. 8-29 8-14 MEl Cache Coherency Protocol-State Diagram (WIM = 001) ...................... 8-31 8-15 Fastest Single-Beat Reads ................................................................................. 8-32 8-16 Fastest Single-Beat Writes ................................................................................ 8-33 8-17 Single-Beat Reads Showing Data-Delay Controls ........................................... 8-34 8-18 Single-Beat Writes Showing Data Delay Controls ........................................... 8-35 8-19 Burst Transfers with Data Delay Controls ........................................................ 8-36 8-20 Use of Transfer Error Acknowledge (TEA) ..................................................... 8-37 8-21 32-Bit Data Bus Transfer (Eight-Beat Burst) ................................................... 8-39 8-22 32-Bit Data Bus Transfer (Two-Beat Burst with DRTRY) .............................. 8-39 8-23 Data Bus Write Only Transaction ..................................................................... 8-44 C-J Direct-Store Tenures ........................................................................................... C-4 C-2 Direct-Store Operation-Packet 0 ...................................................................... C-7 C-3 Direct-Store Operation-Packet 1 ...................................................................... C-8 C-4 I/O Reply Operation ............................................................................................ C-9 C-5 Direct-Store Interface Load Access Example ................................................... C-ll C-6 Direct-Store Interface Store Access Example ................................................... C-12 C-7 Instruction Cache Organization ......................................................................... C-14 xviii MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA ILLUSTRATIONS Figure Page Title Number Number C-8 Data Cache Organization .................................................................................. C-lS C-9 Direct-Store Segment Translation Flow ............................................................ C-17 MOTOROLA Illustrations xix ILLUSTRATIONS Figure Page Title Number Number xx MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA TABLES Table Page Title Number Number Acronyms and Abbreviated Terms .................................................................. xxxiv ii Terminology Conventions .............................................................................. xxxvii iii Instruction Field Conventions ........................................................................ xxxviii 1-1 CSE[O-I] Signals ................................................................................................. 1-7 1-2 Generated SRRI [Key] Bit .................................................................................. 1-8 1-3 Additional/Changed HIDO Bits .......................................................................... 1-18 2-1 MSR[POW] and MSR[TGPR] Bits ..................................................................... 2-5 2-2 HIDO Bit Settings ................................................................................................. 2-8 2-3 HIDI Bit Settings ................................................................................................. 2-9 2-4 DCMP and ICMP Bit Settings ........................................................................... 2-10 2-5 HASH 1 and HASH2 Bit Settings ...................................................................... 2-10 2-6 RPA Bit Settings ................................................................................................ 2-11 2-7 Instruction Address Breakpoint Register Bit Settings ....................................... 2-12 2-8 Memory Operands ............................................................................................. 2-13 2-9 Integer Arithmetic Instructions .......................................................................... 2-22 2-10 Integer Compare Instructions ............................................................................. 2-23 2-11 Integer Logical Instructions ............................................................................... 2-23 2-12 Integer Rotate Instructions ................................................................................. 2-24 2-13 Integer Shift Instructions .................................................................................... 2-25 2-14 Floating-Point Arithmetic Instructions .............................................................. 2-26 2-15 Floating-Point Multiply-Add Instructions ......................................................... 2-26 2-16 Floating-Point Rounding and Conversion Instructions ...................................... 2-27 2-17 Floating-Point Compare Instructions ................................................................. 2-27 2-18 Floating-Point Status and Control Register Instructions ................................... 2-28 2-19 Floating-Point Move Instructions ...................................................................... 2-28 2-20 Integer Load Instructions ................................................................................... 2-30 2-21 Integer Store Instructions ................................................................................... 2-31 2-22 Integer Load and Store with Byte-Reverse Instructions .................................... 2-31 2-23 Integer Load and Store Multiple Instructions .................................................... 2-32 2-24 Integer Load and Store String Instructions ........................................................ 2-33 2-25 Floating-Point Load Instructions ....................................................................... 2-34 2-26 Floating-Point Store Instructions ....................................................................... 2-35 2-27 Branch Instructions ............................................................................................ 2-36 2-28 Condition Register Logical Instructions ............................................................ 2-37 2-29 Trap Instructions ................................................................................................ 2-37 2-30 Move to/from Condition Register Instructions .................................................. 2-38 MOTOROLA Tables xxi TABLES Table Page Title Number Number 2-31 Memory Synchronization Instructions-UISA ................................................. 2-39 2-32 Move from Time Base Instruction ..................................................................... 2-40 2-33 Memory Synchronization Instructions-VEA .................................................. 2-40 2-34 User-Level Cache Instructions ........................................................................... 2-41 2-35 External Control Instructions ............................................................................. 2-42 2-36 System Linkage Instructions .............................................................................. 2-42 2-37 Move to/from Machine State Register Instructions ........................................... 2-43 2-38 Move to/from Special-Purpose Register Instructions ........................................ 2-43 2-39 Implementation-specific SPR Encodings (mfspr) ............................................. 2-43 2-40 Supervisor-Level Cache Management Instruction ............................................. 2-44 2-41 Segment Register Manipulation Instructions ..................................................... 2-45 2-42 Translation Lookaside Buffer Management Instructions .................................. 2-46 3-1 Combinations ofW, I, and M Bits ..................................................................... 3-13 3-2 MEl State Definitions ........................................................................................ 3-16 3-3 CSE[O-I] Signal Encoding ................................................................................ 3-18 3-4 Memory Coherency Actions on Load Operations ............................................. 3-19 3-5 Memory Coherency Actions on Store Operations ............................................. 3-19 3-6 Response to Bus Transactions ........................................................................... 3-20 3-7 Bus Operations Caused by Cache Control Instructions (WIM = 001) .............. 3-26 3-8 MEl State Transitions .....................................................................•.................. 3-28 4-1 Exception Classifications ..................................................................................... 4-3 4-2 Exception Priorities .............................................................................................. 4-7 4-3 SRRI Bit Settings for Machine Check Exceptions ............................................ 4-11 4-4 SRR1 Bit Settings for Software Table Search Operations ................................. 4-11 4-5 MSR Bit Settings ............................................................................................... 4-12 4-6 IEEE Floating-Point Exception Mode Bits ........................................................ 4-14 4-7 MSR Setting Due to Exception .......................................................................... 4-17 4-8 Settings Caused by Hard Reset .......................................................................... 4-19 4-9 Soft Reset Exception-Register Settings ........................................................... 4-20 4-10 Machine Check Exception-Register Settings .................................................. 4-22 4-11 DSI Exception-Register Settings ..................................................................... 4-24 4-12 External Interrupt-Register Settings ................................................................ 4-26 4-13 Alignment Interrupt-Register Settings ............................................................ 4-27 4-14 Access Types ..................................................................................................... 4-28 4-15 Trace Exception-Register Settings .................................................................. 4-32 4-16 Instruction and Data TLB Miss Exceptions-Register Settings ....................... .4-34 4-17 Instruction Address Breakpoint Exception-Register Settings ......................... 4-35 4-18 Breakpoint Action for Multiple Modes Enabled for the Same Address ............ 4-36 4-19 System Management Interrupt-Register Settings ............................................ 4-37 5-1 MMU Features Summary .................................................................................... 5-2 5-2 Access Protection Options for Pages ................................................................. 5-10 5-3 Translation Exception Conditions ...................................................................... 5-15 5-4 Other MMU Exception Conditions .................................................................... 5-16 xxii MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA TABLES Table Page Title Number Number 5-5 Instruction Summary-MMU Control .............................................................. 5-18 5-6 MMURegisters .................................................................................................. 5-18 5-7 Table Search Operations to Update History Bits-TLB Hit Case .................... 5-22 5-8 Model for Guaranteed Rand C Bit Settings ...................................................... 5-24 5-9 Implementation-Specific Resources for Table Search Operations .................... 5-34 5-10 Implementation-Specific SRRI Bits .................................................................. 5-36 5-11 DCMP and ICMP Bit Settings ........................................................................... 5-37 5-12 HASHI and HASH2 Bit Settings ...................................................................... 5-38 5-13 RPA Bit Settings ................................................................................................ 5-38 6-1 Branch Instructions ............................................................................................ 6-23 6-2 System Register Instructions .............................................................................. 6-23 6-3 Condition Register Logical Instructions ............................................................ 6-24 6-4 Integer Instructions ............................................................................................ 6-24 6-5 Floating-Point Instructions ................................................................................. 6-26 6-6 Load and Store Instructions ............................................................................... 6-28 7-1 Transfer Encoding for the Bus Master. ................................................................ 7-9 7-2 Snoop Hit Response ........................................................................................... 7-11 7-3 Implementation-Specific Transfer Encoding ..................................................... 7-12 7-4 CLK_OUT Signal Configuration ....................................................................... 7-12 7-5 Data Transfer Size ............................................................................................. 7-13 7-6 Encodings for TC[O-I] Signals ......................................................................... 7-14 7-7 Data Bus Lane Assignments .............................................................................. 7-19 7-8 DP[0-7] Signal Assignments ............................................................................. 7-20 7-9 Pipeline Tracking Outputs ................................................................................. 7-29 7-10 PLL Configuration ............................................................................................. 7-31 8-1 Transfer Size Signal Encodings ......................................................................... 8-14 8-2 Burst Ordering-64-Bit Bus .............................................................................. 8-14 8-3 Burst Ordering-32-Bit Bus .............................................................................. 8-15 8-4 Aligned Data Transfers (64-Bit Bus) ................................................................. 8-15 8-5 Misaligned Data Transfers (Four-Byte Examples) ............................................ 8-17 8-6 Aligned Data Transfers (32-Bit Bus Mode) ....................................................... 8-18 8-7 Misaligned 32-Bit Data Bus Transfer (Four-Byte Examples) ........................... 8-19 8-8 Transfer Code Encoding .................................................................................... 8-20 8-9 CSE[O-I] Signals ............................................................................................... 8-31 8-10 IEEE Interface Pin Descriptions ........................................................................ 8-43 9-1 Programmable Power Modes ............................................................................... 9-3 A-I Complete Instruction List Sorted by Mnemonic ................................................. A-I A-2 Complete Instruction List Sorted by Opcode ...................................................... A-9 A-3 Integer Arithmetic Instructions ......................................................................... A-17 A-4 Integer Compare Instructions ............................................................................ A-18 A-5 Integer Logical Instructions .............................................................................. A-18 A-6 Integer Rotate Instructions ................................................................................ A-18 A-7 Integer Shift Instructions ................................................................................... A-I9 MOTOROLA Tables xxiii TABLES Table Page Title Number Number A-8 Floating-Point Arithmetic Instructions ............................................................. A-19 A-9 Floating-Point Multiply-Add Instructions ........................................................ A-20 A-lO Floating-Point Rounding and Conversion Instructions ..................................... A-20 A-II Floating-Point Compare Instructions ................................................................ A-20 A-12 Floating-Point Status and Control Register Instructions .................................. A-20 A-13 Integer Load Instructions .................................................................................. A-21 A-14 Integer Store Instructions .................................................................................. A-22 A-15 Integer Load and Store with Byte-Reverse Instructions ................................... A-22 A-16 Integer Load and Store Multiple Instructions ................................................... A-22 A-17 Integer Load and Store String Instructions ....................................................... A-23 A-18 Memory Synchronization Instructions .............................................................. A-23 A-19 Floating-Point Load Instructions ...................................................................... A-23 A-20 Floating-Point Store Instructions ...................................................................... A-24 A-21 Floating-Point Move Instructions ..................................................................... A-24 A-22 Branch Instructions ........................................................................................... A-24 A-23 Condition Register Logical Instructions ........................................................... A-24 A-24 System Linkage Instructions ............................................................................. A-25 A-25 Trap Instructions ............................................................................................... A-25 A-26 Processor Control Instructions .......................................................................... A-25 A-27 Cache Management Instructions ....................................................................... A-26 A-28 Segment Register Manipulation Instructions .................................................... A-26 A-29 Lookaside Buffer Management Instructions ..................................................... A-26 A-30 External Control Instructions ............................................................................ A-27 A-31 I-Form ............................................................................................................... A-28 A-32 B-Form .............................................................................................................. A-28 A-33 SC-Form ............................................................................................................ A-28 A-34 D-Form .............................................................................................................. A-28 A-35 DS-Form ........................................................................................................... A-30 A-36 X-Form .............................................................................................................. A-30 A-37 XL-Form ........................................................................................................... A-34 A-38 XFX-Form ......................................................................................................... A-35 A-39 XFL-Form ......................................................................................................... A-35 A-40 XS-Form ........................................................................................................... A-35 A-41 XO-Form ........................................................................................................... A-35 A-42 A-Form .............................................................................................................. A-36 A-43 M-Form ............................................................................................................. A-37 A-44 MD-Form .......................................................................................................... A-37 A-45 MDS-Form ........................................................................................................ A-38 A-46 PowerPC Instruction Set Legend ...................................................................... A-39 B-1 32-Bit Instructions Not Implemented by the PowerPC 603e ............................... B-l B-2 64-Bit Instructions Not Implemented .................................................................. B-l B-3 Floating-Point Instructions Not Supported by the EC603e Microprocessor ....... B-3 B-4 64-Bit SPR Encoding Not Implemented .............................................................. B-5 xxiv MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA TABLES Table Page Title Number Number C-l Direct-S tore Bus Operations ................................................................................ C-4 C-2 Address Bits for 1/0 Reply Operations ................................................................ C-9 C-3 CSE Signal Encoding ......................................................................................... C-12 C-4 PowerPC 603 Microprocessor PLL Configuration ............................................ C-13 C-5 Store Instruction Timing .................................................................................... C-I9 C-6 System Register Instructions .............................................................................. C-20 MOTOROLA Tables xxv xxvi MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA About This Book The primary objective of this user's manual is to define the functionality of the PowerPC 603TM and PowerPC 603e™ microprocessors for use by software and hardware developers. Although the emphasis of this manual is upon the 603e, all of the information within applies to both the 603 and 603e, except for those differences noted in Appendix C, "PowerPC 603 Processor System Design and Programming Considerations." Those readers who are primarily interested in the 603 should begin with Appendix C. In addition, this book describes the EC603e™ microprocessor. The EC603e microprocessor for embedded systems is functionally equivalent to the 603e with the exception of the floating-point unit which is not supported on the EC603e microprocessor; therefore, the term 'EC603e' is used only when it is necessary to distinguish functional differences with the EC603e microprocessor. The 603e is built upon the low-power dissipation, low-cost and high-performance attributes of the 603 while providing the system designer additional capabilities through higher processor clock speeds, increases in cache size (16-Kbyte instruction and data caches) and set-associativity (4-way), and greater system clock flexibility. The 603e only implements the 32-bit portion of the PowerPCTM architecture. The 603e and EC603e microprocessors are implemented in both a 2.5-volt version (PID 0007v 603e microprocessor, abbreviated as PID7v-603e) and a 3.3-volt version (PID 0006 603e microprocessor, abbreviated as PID6-603e). In this document, the term '603e' is used as an abbreviation for 'PowerPC 603e microprocessor' and the term '603' is an abbreviation for 'PowerPC 603 microprocessor'. The PowerPC 603e microprocessors are available from Motorola as MPC603e. The EC603e microprocessors are available from Motorola as MPE603e. It is important to note that this book is intended as a companion to the PowerPC Microprocessor Family: The Programming Environments, referred to as The Programming Environments Manual; contact your local sales representative to obtain a copy. Because the PowerPC architecture is designed to be flexible to support a broad range of processors, The Programming Environments Manual provides a general description of features that are common to PowerPC processors and indicates those features that are optional or that may be implemented differently in the design of each processor. MOTOROLA AboutThis Book xxvii This document summarizes features of the 603e that are not defined by the architecture. This document and The Programming Environments Manual distinguish between the three levels, or programming environments, of the PowerPC architecture, which are as follows: PowerPC user instruction set architecture (UISA)-The UISA defines the level of the architecture to which user-level software should conform. The UISA defines the base user-level instruction set, user-level registers, data types, memory conventions, and the memory and programming models seen by application programmers. PowerPC virtual environment architecture (VEA)-The VEA, which is the smallest component of the PowerPC architecture, defines additional user-level functionality that falls outside typical user-level software requirements. The VEA describes the memory model for an environment in which multiple processors or other devices can access external memory, defines aspects of the cache model and cache control instructions from a user-level perspective. The resources defined by the VEA are particularly useful for optimizing memory accesses and for managing resources in an environment in which other processors and other devices can access external memory. PowerPC operating environment architecture (OEA)-The OEA defines supervisor- level resources typically required by an operating system. The OEA defines the PowerPC memory management model, supervisor-level registers, and the exception model. Implementations that conform to the PowerPC OEA also conform to the PowerPC urSA and VEA. It is important to note that some resources are defined more generally at one level in the architecture and more specifically at another. For example, conditions that cause a ftoating- point exception are defined by the UISA, while the exception mechanism itself is defined by the OEA. Because it is important to distinguish between the levels of the architecture in order to ensure compatibility across multiple platforms, those distinctions are shown clearly throughout this book. For ease in reference, this book has arranged topics described by the architecture into topics that build upon one another, beginning with a description and complete summary of 603e- specific registers and progressing to more specialized topics such as 603e-specific details regarding the cache, exception, and memory management models. As such, chapters may include information from multiple levels of the architecture. (For example, the discussion of the cache model uses information from both the VEA and the OEA.) The PowerPC Architecture: A Specification for a New Family of RISC Processors defines the architecture from the perspective of the three programming environments and remains the defining document for the PowerPC architecture. The information in this book is subject to change without notice, as described in the disclaimers on the title page of this book. As with any technical documentation, it is the xxviii MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA readers' responsibility to be sure they are using the most recent version of the documentation. For more information, contact your sales representative. Audience This manual is intended for system software and hardware developers and applications programmers who want to develop products using the 603e microprocessors. It is assumed that the reader understands operating systems, microprocessor system design, the basic principles of RISC processing, and details of the PowerPC architecture. Organization Following is a summary and a brief description of the major sections of this manual: • Chapter 1, "Overview," is useful for readers who want a general understanding of the features and functions of the PowerPC architecture and the 603e. This chapter describes the flexible nature of the PowerPC architecture definition, and provides an overview of how the PowerPC architecture defines the register set, operand conventions, addressing modes, instruction set, cache model, exception model, and memory management model. • Chapter 2, "Programming Model," provides a brief synopsis of the registers implemented in the 603e, operand conventions, an overview of the PowerPC addressing modes, and a list of the instructions implemented by the 603e. Instructions are organized by function. • Chapter 3, "Instruction and Data Cache Operation," provides a discussion of the cache and memory model as implemented on the 603e. • Chapter 4, "Exceptions," describes the exception model defined in the PowerPC OEA and the specific exception model implemented on the 603e. • Chapter 5, "Memory Management," describes the 603e's implementation ofthe memory management unit specifications provided by the PowerPC OEA for PowerPC processors. Chapter 6, "Instruction Timing," provides information about latencies, interlocks, special situations, and various conditions to help make programming more efficient. This chapter is of special interest to software engineers and system designers. • Chapter 7, "Signal Descriptions," provides descriptions of individual signals of the 603e. Chapter 8, "System Interface Operation," describes signal timings for various operations. It also provides information for interfacing to the 603e. • Chapter 9, "Power Management," provides information about power saving modes for the 603e. MOTOROLA AboutThis Book xxix • Appendix A, "PowerPC Instruction Set Listings," lists all the PowerPC instructions while indicating those instructions that are not implemented by the 603e; it also includes the instructions that are specific to the 603e. Instructions are grouped according to mnemonic, opcode, function, and form. Also included is a quick reference table that contains general information, such as the architecture level, privilege level, and form, and indicates if the instruction is 64-bit and optional. • Appendix B, "Instructions Not Implemented," provides a list of PowerPC instructions not implemented by the 603e. • Appendix C, "PowerPC 603 Processor System Design and Programming Considerations," provides a discussion of the hardware and software differences between the 603 and 603e. • This manual also includes a glossary and an index. Suggested Reading This section lists additional reading that provides background for the information in this manual as well as general information about the PowerPC architecture. General Information The following documentation provides useful information about the PowerPC architecture and computer architecture in general: • The following books are available from the Morgan-Kaufmann Publishers, 340 Pine Street, Sixth Floor, San Francisco, CA 94104; Tel. (800) 745-7323 (U.S.A.), (415) 392-2665 (Intemational); intemet address: mkp@mkp.com. - The PowerPC Architecture: A Specification for a New Family of RISC Processors, Second Edition, by Intemational Business Machines, Inc. Updates to the architecture specification are accessible via the world-wide web at http://www.austin.ibm.comltechlppc-chg.html. - PowerPC Microprocessor Common Hardware Reference Platform: A System Architecture, by Apple Computer, Inc., Intemational Business Machines, Inc., and Motorola, Inc. - Macintosh Technology in the Common Hardware Reference Platform, by Apple Computer, Inc. - Computer Architecture: A Quantitative Approach, Second Edition, by John L. Hennessy and David A. Patterson • Inside Macintosh: PowerPC System Software, Addison-Wesley Publishing Company, One Jacob Way, Reading, MA, 01867; Tel. (800) 282-2732 (U.S.A.), (800) 637-0029 (Canada), (716) 871-6555 (Intemational). • PowerPC Programming for Intel Programmers, by Kip McClanahan; lOG Books Worldwide, Inc., 919 East Hillsdale Boulevard, Suite 400, Foster City, CA, 94404; Tel. (800) 434-3422 (U.S.A.), (415) 655-3022 (Intemational). xxx MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA PowerPC Documentation The PowerPC documentation is available from the sources listed on the back cover of this manual; the document order numbers are included in parentheses for ease in ordering: User's manuals-These books provide details about individual PowerPC implementations and are intended to be used in conjunction with The Programming Environments Manual. These include the following: - PowerPC 604™ RISC Microprocessor User's Manual: MPC604UMI AD (Motorola order #) - MPC750 RISC Microprocessor User's Manual: MPC750UM/AD (Motorola order #) - PowerPC 620™ RISC Microprocessor User's Manual: MPC620UMI AD (Motorola order #) • Programming environments manuals-These books provide information about resources defined by the PowerPC architecture that are common to PowerPC processors. There are two versions, one that describes the functionality of the combined 32- and 64-bit architecture models and one that describes only the 32-bit model. - PowerPC Microprocessor Family: The Programming Environments, Rev 1: MPCFPE/AD (Motorola order #) - PowerPC Microprocessor Family: The Programming Environments for 32-Bit Microprocessors, Rev. 1: MPCFPE32B/AD (Motorola order #) • Implementation Variances Relative to Rev. 1 of The Programming Environments Manual is available via the world-wide web at http://www.motorola.com/PowerPC/. • Addenda/errata to user's manuals-Because some processors have follow-on parts an addendum is provided that describes the additional features and changes to functionality of the follow-on part. These addenda are intended for use with the corresponding user's manuals. These include the following: - Addendum to PowerPC 604 RISC Microprocessor User's Manual: PowerPC 604e™ Microprocessor Supplement and User's Manual Errata: MPC604UMADI AD (Motorola order #) • Hardware specifications-Hardware specifications provide specific data regarding bus timing, signal behavior, and AC, DC, and thermal characteristics, as well as other design considerations for each PowerPC implementation. These include the following: - PowerPC 603 RISC Microprocessor Hardware Specifications: MPC603ECID (Motorola order #) - PowerPC 603e RISC Microprocessor Family: PID6-603e Hardware Specifications: MPC603EEC/D (Motorola order #) MOTOROLA AboutThis Book xxxi - PowerPC 603e RISC Microprocessor Family: PID7v-603e Hardware Specifications: MPC603E7VECID (Motorola order #) - PowerPC 603e RISC Microprocessor Family: PID7t-603e Hardware Specifications: MPC603E7TECID (Motorola order #) - PowerPC 604 RISC Microprocessor Hardware Specifications: MPC604ECID (Motorola order #) - PowerPC 604e RISC Microprocessor Family: PID9v-604e Hardware Specifications: MPC604E9VECID (Motorola order #) - PowerPC 604e RISC Microprocessor Family: PID9q-604e Hardware Specifications: MPC604E9QECID (Motorola order #) - MPC750 RISC Microprocessor Hardware Specifications MPC750ECID (Motorola order #) - EC603e Embedded RISC Microprocessor (PID6) Hardware Specifications: MPE603EECID (Motorola order #) - EC603e Embedded RISC Microprocessor (PID7v) Hardware Specifications: MPE603E7VECID (Motorola order #) • Technical Summaries-Each PowerPC implementation has a technical summary that provides an overview of its features. This document is roughly the equivalent to the overview (Chapter 1) of an implementation's user's manual. Technical summaries are available for the 601, 603, 603e, 604, 604e, and EC603e microprocessors which can be ordered as follows: - EC603e Embedded RISC Microprocessor Technical Summary: MPE603EID (Motorola order #) • PowerPC Microprocessor Family: The Bus Interface for 32-Bit Microprocessors: MPCBUSIFIAD (Motorola order #) provides a detailed functional description of the 60x bus interface, as implemented on the 601, 603, and 604 family of PowerPC microprocessors. This document is intended to help system and chipset developers by providing a centralized reference source to identify the bus interface presented by the 60x family of PowerPC microprocessors. • PowerPC Microprocessor Family: The Programmer's Reference Guide: MPCPRGID (Motorola order #) is a concise reference that includes the register summary, memory control model, exception vectors, and the PowerPC instruction set. • PowerPC Microprocessor Family: The Programmer's Pocket Reference Guide: MPCPRGREFID (Motorola order #) This foldout card provides an overview of the PowerPC registers, instructions, and exceptions for 32-bit implementations. xxxii MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA • Application notes-These short documents contain useful information about specific design issues useful to programmers and engineers working with PowerPC processors. • Documentation for support chips-These include the following: - MPC105 PCI Bridge/Memory Controller User's Manual: MPCI05UMlAD (Motorola order #) - MPC106 PCI Bridge/Memory Controller User's Manual: MPCI06UMlAD (Motorola order #) Additional literature on PowerPC implementations is being released as new processors become available. For a current list of PowerPC documentation, refer to the world-wide web at http://www.mot.comlSPS/PowerPC/. Conventions This document uses the following notational conventions: mnemonics Instruction mnemonics are shown in lowercase bold. italics Italics indicate variable command parameters, for example, bcctrx. Book titles in text are set in italics. OxO Prefix to denote hexadecimal number ObO Prefix to denote binary number rA,rB Instruction syntax used to identify a source GPR rAIO The contents of a specified GPR or the value O. rD Instruction syntax used to identify a destination GPR frA, frB, frC Instruction syntax used to identify a source FPR frD Instruction syntax used to identify a destination FPR REG[FlELD] Abbreviations or acronyms for registers are shown in uppercase text. Specific bits, fields, or ranges appear in brackets. For example, MSR[LE] refers to the little-endian mode enable bit in the machine state register. x In certain contexts, such as a signal encoding, this indicates a don't care. n Used to express an undefined numerical value -, NOT logical operator & AND logical operator OR logical operator Indicates reserved bits or bit fields in a register. Although these bits may be written to as either ones or zeros, they are always read as zeros. MOTOROLA AboutThis Book xxxiii Acronyms and Abbreviations Table i contains acronyms and abbreviations that are used in this document. Table i. Acronyms and Abbreviated Terms Term Meaning ALU Arithmetic logic unit ATE Automatic test equipment ASR Address space register BAT Block address translation BIST Built-in self test BIU Bus interface unit BPU Branch processing unit BUC Bus unit controller BUID Bus unit 10 CAR Cache address register CIA Current instruction address CMOS Complementary metal-oxide semiconductor COP Common on-chip processor CR Condition register CRTRY Cache retry queue CTR Count register OAR Oata address register OBAT Data BAT OCMP Data TLB compare DEC Decrementer register OMISS Data TLB miss address DSISR Register used for determining the source of a OSI exception OTLB Data translation lookaside buffer EA Effective address EAR External access register ECC Error checking and correction FIFO First-in-first-out FPR Floating-point register (Note that the EC603e microprocessor does not support the floating- point unit.) FPSCR Floating-point status and control register (Note that the EC603e microprocessor does not support the floating-point unit.) xxxiv MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table i. Acronyms and Abbreviated Terms (Continued) Term Meaning FPU Floating-point unit (Note that the EC603e microprocessor does not support the floating-point unit.) GPR General-purpose register HASH1 Primary hash address HASH2 Secondary hash address IABR Instruction address breakpoint register IBAT Instruction BAT ICMP Instruction TLB compare IEEE Institute for Electrical and Electronics Engineers IMISS Instruction TLB miss address 10 Instruction queue ITLB Instruction translation lookaside buffer IU Integer unit L2 Secondary cache LIFO Last-in-first-out LR Link register LRU Least recently used LSB Least-significant byte Isb Least-significant bit LSU Load/store unit MEl Modifiedlexclusive/invalid MESI Modified/exclusive/sharedlinvalid-cache coherency protocol MMU Memory management unit MO MO register MSB Most-significant byte msb Most-significant bit MSR Machine state register NaN Not a number No-op No operation OEA Operating environment architecture PID Processor identification tag PIR Processor identification register PLL Phase-locked loop MOTOROLA AboutThis Book xxxv Table i. Acronyms and Abbreviated Terms (Continued) Term Meaning POWER Performance Optimized with Enhanced RISC architecture PTE Page table entry PTEG Page table entry group PVR Processor version register RAW Read-alter-write RISC Reduced instruction set computing RPA Required physical address RTl Register transfer language RWITM Read with intent to modify SDR1 Register that specifies the page table base address for virtual-to-physical address translation SlB Segment lookaside buffer SPR Special-purpose register SR Segment register SRRO Machine status save/restore register 0 SRR1 Machine status save/restore register 1 SRU System register unit TAP Test access port TB Time base facility TBl Time base lower register TBU Time base upper register TlB Translation lookaside buffer TTL Transistor-to-transistor logic UIMM Unsigned immediate value UISA User instruction set architecture UTlB Unified translation lookaside buffer UUT Unit under test VEA Virtual environment architecture WAR Write-alter-read WAW Write-alter-write WIMG Write-through/caching-inhibited/memory-coherency enforced/guarded bits XATC Extended address transfer code XER Register used for indicating conditions such as carries and overflows for integer operations xxxvi MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Terminology Conventions Table ii describes terminology conventions used in this manual. Table ii. Terminology Conventions The Architecture Specification This Manual Data storage interrupt (DSI) DSI exception Extended mnemonics Simplified mnemonics Fixed-point unit (FXU) Integer unit (IU) Instruction storage interrupt (lSI) lSI exception Interrupt Exception Privileged mode (or privileged state) Supervisor-level privilege Problem mode (or problem state) User-level privilege Real address Physical address Relocation Translation Storage (locations) Memory Storage (the act of) Access Store in Write back Store through Write through MOTOROLA AboutThis Book xxxvii Table iii describes instruction field notation used in this manual. Table iii. Instruction Field Conventions The Architecture Specification Equivalent to: SA,SS,ST crbA, crbS, crbD (respectively) SF, SFA crfD, crfS (respectively) 0 d OS ds FLM FM FRA,FRS,FRC,FR~FRS frA, frS, frC, frO, frS (respectively) FXM CRM RA, RS, RT, RS rA, rS, rD, rS (respectively) SI SIMM U IMM UI UIMM I, II, III 0... 0 (shaded) xxxviii MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Chapter 1 Overview This chapter provides an overview of features of the PowerPC 603e™ microprocessor and the PowerPCTM architecture, and information about how the 603e implementation complies with the architectural definitions. In addition, this book describes the EC603e microprocessor. Note that the 603e and EC603e microprocessors are implemented in both a 2.S-volt version (PID 0007v 603e microprocessor, abbreviated as PID7v-603e) and a 3.3-volt version (PID 0006 603e microprocessor, abbreviated as PID6-603e). 1.1 Overview This section describes the details of the 603e, provides a block diagram showing the major functional units, and describes briefly how those units interact. Any differences between the PID6-603e, PID7v-603e, and EC603e implementations are noted. The 603e is a low-power implementation of the PowerPC microprocessor family of reduced instruction set computing (RISC) microprocessors. The 603e implements the 32-bit portion of the PowerPC architecture, which provides 32-bit effective addresses, integer data types of 8, 16, and 32 bits, and floating-point data types of 32 and 64 bits. The 603e is a superscalar processor that can issue and retire as many as three instructions per clock. Instructions can execute out of order for increased performance; however, the 603e makes completion appear sequential. The 603e integrates five execution units-an integer unit (IU), a floating-point unit (FPU) (not supported on the EC603e microprocessor), a branch processing unit (BPU), a load/store unit (LSU), and a system register unit (SRU). The ability to execute five instructions in parallel and the use of simple instructions with rapid execution times yield high efficiency and throughput for 603e-based systems. Most integer instructions execute in one clock cycle. On the 603e, the FPU is pipelined so a single-precision multiply-add instruction can be issued and completed every clock cycle. (Note that the EC603e microprocessor does not support the floating-point unit.) The 603e provides independent on-chip, 16-Kbyte, four-way set-associative, physically addressed caches for instructions and data and on-chip instruction and data memory management units (MMUs). The MMUs contain 64-entry, two-way set-associative, data and instruction translation lookaside buffers (DTLB and ITLB) that provide support for MOTOROLA Chapter 1. Overview 1-1 demand-paged virtual memory address translation and variable-sized block translation. The TLBs and caches use a least recently used (LRU) replacement algorithm. The 603e also supports block address translation through the use of two independent instruction and data block address translation (!BAT and DBAT) arrays of four entries each. Effective addresses are compared simultaneously with all four entries in the BAT array during block translation. In accordance with the PowerPC architecture, if an effective address hits in both the TLB and BAT array, the BAT translation takes priority. The 603e has a selectable 32- or 64-bit data bus and a 32-bit address bus. The 603e interface protocol allows multiple masters to compete for system resources through a central external arbiter. The 603e provides a three-state coherency protocol that supports the exclusive, modified, and invalid cache states. This protocol is a compatible subset of the MESI (modified/exclusive/shared/invalid) four-state protocol and operates coherently in systems that contain four-state caches. The 603e supports single-beat and burst data transfers for memory accesses, and supports memory-mapped I/O operations. The 603e is fabricated using an advanced CMOS process technology and is fully compatible with TTL devices. 1.1.1 Features This section describes the major features of the 603e noting where the PID6-603e, PID7v-603e, and EC603e implementations differ: • High-performance, superscalar microprocessor - As many as three instructions issued and retired per clock - As many as five instructions in execution per clock - Single-cycle execution for most instructions - Pipelined FPU for all single-precision and most double-precision operations (The EC603e microprocessor does not support the floating-point unit.) • Five independent execution units and two register files - BPU featuring static branch prediction - A 32-bit IU - Fully IEEE 754-compliant FPU for both single- and double-precision operations (The EC603e microprocessor does not support the floating-point unit.) - LSU for data transfer between data cache and GPRs and FPRs (The EC603e microprocessor does not support the floating-point unit.) - SRU that executes condition register (CR), special-purpose register (SPR), and integer add/compare instructions - Thirty-two GPRs for integer operands 1-2 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA - Thirty-two FPRs for single- or double-precision operands (The EC603e microprocessor does not support the floating-point unit.) • High instruction and data throughput - Zero-cycle branch capability (branch folding) - Programmable static branch prediction on unresolved conditional branches - Instruction fetch unit capable of fetching two instructions per clock from the instruction cache - A six-entry instruction queue that provides lookahead capability - Independent pipelines with feed-forwarding that reduces data dependencies in hardware - l6-Kbyte data cache-four-way set-associative, physically addressed; LRU replacement algorithm - l6-Kbyte instruction cache-four-way set-associative, physically addressed; LRU replacement algorithm - Cache write-back or write-through operation programmable on a per page or per block basis - BPU that performs CR lookahead operations - Address translation facilities for 4-Kbyte page size, variable block size, and 256-Mbyte segment size - A 64-entry, two-way set-associative ITLB - A 64-entry, two-way set-associative DTLB - Four-entry data and instruction BAT arrays providing l28-Kbyte to 256-Mbyte blocks - Software table search operations and updates supported through fast trap mechanism - 52-bit virtual address; 32-bit physical address • Facilities for enhanced system performance - A 32- or 64-bit split-transaction external data bus with burst transfers - Support for one-level address pipelining and out-of-order bus transactions - Hardware support for misaligned little-endian accesses (PID7v-603e) MOTOROLA Chapter 1. Overview 1-3 • Integrated power management - Low-power 2.5-volt and 3.3-volt designs - Internal processor/bus clock multiplier ratios as follows: - 111, 1.5/1,2/1,2.511,3/1, 3.5/1, and 4/1 (PID6-603e) - 211,2.5/1,3/1,3.5/1,4/1,4.5/1,5/1,5.5/1, and 6/1 (PID7v-603e) - Three power-saving modes: doze, nap, and sleep - Automatic dynamic power reduction when internal functional units are idle • In-system testability and debugging features through JTAG boundary-scan capability Features specific to the PID7v-603e follow: • Enhancements to the register set - The PID7v-603e adds two new bits to the HIDO register: - The address bus enable (ABE) bit, bit 28, gives the PID7v-603e microprocessor the ability to broadcast debf, debi, and debst onto the 60x bus. - The instruction fetch enable M (IFEM) bit, bit 24, allows the PID7v-603e to reflect the value of the M-bit onto the 60x bus during instruction translation. - The Run_N counter register (Run_N) has been extended from 16 to 32 bits. • Enhancements to cache implementation - The instruction cache is blocked only until the critical load completes (hit under reloads allowed). - The critical double word is simultaneously written to the cache and forwarded to the requesting unit, thus minimizing stalls due to load delays. - Provides for an optional data cache operation broadcast feature (enabled by the HIDO[ABE] bit) that allows for correct system management utilizing an external copyback L2 cache. - All of the cache control instructions (iebi, debi, debf, and debst, excluding debz) require that the HIDO[ABE] configuration bit be enabled in order to execute. • Exceptions - The PID7v-603e now offers hardware support for misaligned little-endian accesses. Little-endian load/store accesses that are not on a word boundary, with the exception of strings and multiples, generate exceptions under the same circumstances as big-endian accesses. - The PID7v-603e removed misalignment support for eciwx and eeowx graphics instructions. These instructions cause an alignment exception if the access is not on a word boundary. 1-4 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA • Bus clock-New bus multipliers of 4.5x, 5x, 5.5x, and 6x that are selected by the unused encodings of the PLL_CFG[0-3]. Bus multipliers of Ix and 1.5x are not supported by PID7v-603e. • Power management-Internal voltage supply changed from 3.3 volts to 2.5 volts. The core logic of the chip now uses a 2.5-volt supply. • Signals-The Run_N counter, which affects the JTAG/COP, has been extended from 16 bits to 32 bits. • Instruction timing - The integer divide instructions divwu[o][.] and divw[o][.] execute in 20 clock cycles; execution of these instructions in the PID6-603e requires 37 clock cycles. - Support for single-cycle store - An adder/comparator added to system register unit that allows dispatch and execution of multiple integer add and compare instructions on each cycle. Figure 1-1 provides a block diagram of the 603e that illustrates how the execution units-IU, FPU (not supported by the EC603e microprocessor), BPU, LSU, and SRU-operate independently and in parallel. Note that this is a conceptual diagram and does not attempt to show how these features are physically implemented on the chip. For more information on the execution units, refer to PowerPC 603e RISC Microprocessor Technical Summary. The 603e provides address translation and protection facilities, including an ITLB, DTLB, and instruction and data BAT arrays. Instruction fetching and issuing is handled in the instruction unit. Translation of addresses for cache or external memory accesses are handled by the MMUs. Both units are discussed in more detail in Sections 1.1.3, "Instruction Unit," and 1.1.5.1, "Memory Management Units (MMUs)." MOTOROLA Chapter 1. Overview 1-5 64 Bit I "' t .-----------+--1 SEQUENTIAL I 64 Bit BRANCH PROCESSING FETCHER UNIT INSTRUCTION QUEUE EI3 SYSTEM REGISTER .---___--...J {64 Bit UNIT I- Dispatch Unit "}---l G INSTRUCTION UNIT 64 Bit INTEGER ~ 64 Bit l 1+ _ GPR File ~ LOAD/STORE ~ FPR File ~ FLOATI~G. I 64 Bid r- r -- -_--, 64 B i t J . I I 7U~I: I G'p R~namE UNIT I FPRename ~()Nr'!1rr : G . Registers rnBJ 1 Registers l •. . . .-J I J I .. ~l ..I -'-.CJ 32 Bit COMPLETION UNIT DMMU IMMU - § I SRs I DBAT Array 64 Bit I SRs I - IBAT Array IDTLBI 1mB I ' - - - '--- Power Time Base I 1- Dissipation Counter/ Control JTAG/COP Decremente Clock Tags I 16·Kbyte D Cache Tags 16·Kbyte I Cache ~ Interface Multiplier Touch Load Buffer t t I PROCESSOR BUS Copyback Buffer I INTERFACE 32·BIT ADDRESS BUS l 3U64·BIT DATA BUS * Note that the EC603e microprocessor does not support the floating-point unit or the floating-point register file. Figure 1-1. Block Diagram MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 1.1.2 System Design and Programming Considerations The 603e is built upon the low power dissipation, low cost and high performance attributes of the 603 while providing the system designer additional capabilities through higher processor clock speeds (to 100 MHz), increases in cache size (16-Kbyte instruction and data caches) and set associativity (four-way), and greater system clock flexibility. The following subsections describe the differences between the 603 and the 603e that affect the system designer and programmer already familiar with the operation of the 603. The design enhancements to the 603e are described in the following sections as changes that can require a modification to the hardware or software configuration of a system designed for the 603. 1.1.2.1 Hardware Features The following hardware features of the 603e may require system designers to modify systems designed for the 603. 1.1.2.1.1 Replacement of XATS Signal by CSE1 Signal The 603e employs four-way set associativity for both the instruction and data caches, in place of the two-way set associativity used in the 603. This change requires the use of an additional cache set entry (CSE I) signal to indicate which member of the cache set is being loaded during a cache line fill. The CSEI signal on the 603e is in the same pin location as the XATS signal on the 603. Note that the XATS signal is no longer needed by the 603e because support for access to direct-store segments has been removed. Table 1-1 shows the CSE[O-l] signal encoding indicating the cache set element selected during a cache load operation. Table 1-1. CSE[0-1] Signals CSE[0-1] Cache Set Element 00 Set 0 01 Set 1 10 Set 2 11 Set 3 1.1.2.1.2 Addition of Half-Clock Bus Multipliers Some of the reserved clock configuration signal settings of the 603 are redefined to allow more flexible selection of higher internal and bus clock frequencies. The 603e provides programmable internal processor clock rates of lx, 1.5x, 2x, 2.5x, 3x, 3.5x, and 4x multiples of the externally supplied clock frequency. For additional information, refer to the appropriate device-specific hardware specifications. MOTOROLA Chapter 1. Overview 1-7 1.1.2.2 Software Featu.res The features of the 603e described in the following sections affect software originally written for the 603. 1.1.2.2.1 16-Kbyte Instruction and Data Caches The instruction and data caches of the 603e are 16 Kbytes in size, compared to the 8-Kbyte instruction and data caches of the 603. The increase in cache size may require modification of cache flush routines. The increase in cache size is also reflected in four-way set associativity of the instruction and data caches in place of the two-way set associativity in the 603. 1.1.2.2.2 Clock Configuration Available in HID1 Register Bits 0-3 in the new HIDI register (SPR 1009) provides software read-only access to the configuration of the PLL_CFG signals. The HID 1 register is not implemented in the 603. 1.1.2.2.3 Performance Enhancements The following enhancements provide improved performance without any required changes to software (other than compiler optimization) or hardware designed for the 603: • Support for single-cycle store. • Addition of adder/comparator in system register unit allows dispatch and execution of multiple integer add and compare instructions on each cycle. • Addition of a key bit (bit 12) to SRRI to provide information about memory protection violations prior to page table search operations. This key bit is set when the combination of the settings in the appropriate Kx bit in the segment register and the MSR[PR] bit indicates that when the PP bits in the PTE are set to either 00 or 01, a protection violation exists; if this is the case for a data write operation with a DTLB miss, the changed (C) bit in the page tables should not be updated (see Table 1-2). This reduces the time required to execute the page table search routine since the software no longer has to explicitly read both the Kx and MSR[PR] bits to determine whether a protection violation exists before updating the C bit. Table 1-2. Generated SRR1 [Key] Bit Segment Register SRR1 [Key] Generated MSR[PR] [Ks, Kp] on OTLB Misses Ox 0 0 xO 1 0 1x 0 1 x1 1 1 Note that this key bit indicates a protection violation if the PTE[pp1bits are either 00 or 01. 1-8 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 1.1.3 Instruction Unit As shown in Figure 1-1, the 603e instruction unit, which contains a fetch unit, instruction queue, dispatch unit, and BPU, provides centralized control of instruction flow to the execution units. The instruction unit determines the address of the next instruction to be fetched based on information from the sequential fetcher and from the BPU. The instruction unit fetches the instructions from the instruction cache into the instruction queue. The BPU extracts branch instructions from the fetcher and uses static branch prediction on unresolved conditional branches to allow the instruction unit to fetch instructions from a predicted target instruction stream while a conditional branch is evaluated. The BPU folds out branch instructions for unconditional branches or conditional branches unaffected by instructions in progress in the execution pipeline. Instructions issued beyond a predicted branch do not complete execution until the branch is resolved, preserving the programming model of sequential execution. If any of these instructions are to be executed in the BPU, they are decoded but not issued. Instructions to be executed by the FPU, IU, LSU, and SRU are issued and allowed to complete up to the register write-back stage. (Note that the FPU is not supported on the EC603e microprocessor.) Write-back is allowed when a correctly predicted branch is resolved, and instruction execution continues without interruption along the predicted path. If branch prediction is incorrect, the instruction unit flushes all predicted path instructions, and instructions are issued from the correct path. 1.1.3.1 Instruction Queue and Dispatch Unit The instruction queue (IQ), shown in Figure 1-1, holds as many as six instructions and loads up to two instructions from the instruction unit during a single cycle. The instruction fetch unit continuously loads as many instructions as space in the IQ allows. Instructions are dispatched to their respective execution units from the dispatch unit at a maximum rate of two instructions per cycle. Dispatching is facilitated to the IU, FPU (not supported on the EC603e microprocessor), LSU, and SRU by the provision of a reservation station at each unit. The dispatch unit performs source and destination register dependency checking, determines dispatch serializations, and inhibits subsequent instruction dispatching as required. For a more detailed overview of instruction dispatch, see Section 1.3.6, "Instruction Timing." 1.1.3.2 Branch Processing Unit (BPU) The BPU receives branch instructions from the fetch unit and performs CR lookahead operations on conditional branches to resolve them early, achieving the effect of a zero-cycle branch in many cases. The BPU uses a bit in the instruction encoding to predict the direction of the conditional branch. Therefore, when an unresolved conditional branch instruction is encountered, the MOTOROLA Chapter 1. Overview 1-9 603e fetches instructions from the predicted target stream until the conditional branch is resolved. The BPU contains an adder to compute branch target addresses and three user-control registers-the link register (LR), the count register (CTR), and the CR. The BPU calculates the return pointer for subroutine calls and saves it into the LR for certain types of branch instructions. The LRalso contains the branch target address for the Branch Conditional to Link Register (bclrx) instruction. The CTR contains the branch target address for the Branch Conditional to Count Register (bcctrx) instruction. The contents of the LR and CTR can be copied to or from any GPR. Because the BPU uses dedicated registers rather than GPRs or FPRs, execution of branch instructions is largely independent from execution of integer and floating-point instructions. 1.1.4 Independent Execution Units The PowerPC architecture's support for independent execution units allows implementation of processors with out-of-order instruction execution. For example, because branch instructions do not depend on GPRs or FPRs, branches can often be resolved early, eliminating stalls caused by taken branches. In addition to the BPU, the 603e provides four other execution units and a completion unit, which are described in the following sections. 1.1.4.1 Integer Unit (IU) The IU executes all integer instructions. The IU executes one integer instruction at a time, performing computations with its arithmetic logic unit (ALU), multiplier, divider, and XER register. Most integer instructions are single-cycle instructions. Thirty-two general-purpose registers are provided to support integer operations. Stalls due to contention for GPRs are minimized by the automatic allocation of rename registers. The 603e writes the contents of the rename registers to the appropriate GPR when integer instructions are retired by the completion unit. 1.1.4.2 Floating-Point Unit (FPU) The FPU (not supported by the EC603e microprocessor) contains a single-precision mUltiply-add array and the floating-point status and control register (FPSCR). The multiply-add array allows the 603e to efficiently implement multiply and multiply-add operations. The FPU is pipelined so that single-precision instructions and double-precision instructions can be issued back-to-back. Thirty-two floating-point registers are provided to support floating-point operations. Stalls due to contention for FPRs are minimized by the automatic allocation of rename registers. The 603e writes the contents of the rename registers to the appropriate FPR when floating-point instructions are retired by the completion unit. The 603e supports all IEEE 754 floating-point data types (normalized, denormalized, NaN, zero, and infinity) in hardware, eliminating the latency incurred by software exception 1-10 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA routines. (The term, 'exception' is also referred to as 'interrupt' in the architecture specification.) 1.1.4.3 Load/Store Unit (LSU) The LSU executes all load and store instructions and provides the data transfer interface between the GPRs, FPRs, and the cache/memory subsystem. The LSU calculates effective addresses, performs data alignment, and provides sequencing for load/store string and multiple instructions. (Note that the EC603e microprocessor does not support the floating-point register file.) Load and store instructions are issued and translated in program order; however, the actual memory accesses can occur out of order. Synchronizing instructions are provided to enforce strict ordering. Cacheable loads, when free of data dependencies, execute in an out-of-order manner with a maximum throughput of one per cycle and a two-cycle total latency. Data returned from the cache is held in a rename register until the completion logic commits the value to a GPR or FPR (not supported by the EC603e microprocessor). Stores cannot be executed in a predicted manner and are held in the store queue until the completion logic signals that the store operation is to be completed to memory. The 603e executes store instructions with a maximum throughput of one per cycle and a three-cycle total latency. The time required to perform the actual load or store operation varies depending on whether the operation involves the cache, system memory, or an 110 device. 1.1.4.4 System Register Unit (SRU) The SRU executes various system-level instructions, including condition register logical operations and move to/from special-purpose register instructions, and also executes integer add/compare instructions. In order to maintain system state, most instructions executed by the SRU are completion-serialized; that is, the instruction is held for execution in the SRU until all prior instructions issued have completed. Results from completion-serialized instructions executed by the SRU are not available or forwarded for subsequent instructions until the instruction completes. 1.1.4.5 Completion Unit The completion unit tracks instructions from dispatch through execution, and then retires, or "completes" them in program order. Completing an instruction commits the 603e to any architectural register changes caused by that instruction. In-order completion ensures the correct architectural state when the 603e must recover from a mispredicted branch or any exception. Instruction state and other information required for completion is kept in a first-in-first-out (FIFO) queue of five completion buffers. A single completion buffer is allocated for each instruction once it enters the dispatch unit. An available completion buffer is a required resource for instruction dispatch; if no completion buffers are available, instruction MOTOROLA Chapter 1. Overview 1-11 dispatch stalls. A maximum of two instructions per cycle are completed in order from the queue. 1.1.5 Memory Subsystem Support The 603e provides support for cache and memory management through dual instruction and data memory management units. The 603e also provides dual 16-Kbyte instruction and data caches, and an efficient processor bus interface to facilitate access to main memory and other bus subsystems. The memory subsystem support functions are described in the following subsections. 1.1.5.1 Memory Management Units (MMUs) The 603e' s MMU s support up to 4 Petabytes (252) of virtual memory and 4 Gigabytes (232) of physical memory (referred to as real memory in the architecture specification) for instruction and data. The MMUs also control access privileges for these spaces on block and page granularities. Referenced and changed status is maintained by the processor for each page to assist implementation of a demand-paged virtual memory system. A key bit is implemented to provide information about memory protection violations prior to page table search operations. The LSU calculates effective addresses for data loads and stores, performs data alignment to and from cache memory, and provides the sequencing for load and store string and multiple word instructions. The instruction unit calculates the effective addresses for instruction fetching. After an address is generated, the higher-order bits of the effective address are translated by the appropriate MMU into physical address bits. Simultaneously, the lower-order address bits (that are untranslated and therefore, considered both logical and physical), are directed to the on-chip caches where they form the index into the four-way set-associative tag array. After translating the address, the MMU passes the higher-order bits of the physical address to the cache, and the cache lookup completes. For caching-inhibited accesses or accesses that miss in the cache, the untranslated lower-order address bits are concatenated with the translated higher-order address bits; the resulting 32-bit physical address is then used by the memory unit and the system interface, which accesses external memory. The MMU also directs the address translation and enforces the protection hierarchy programmed by the operating system in relation to the supervisor/user privilege level of the access and in relation to whether the access is a load or store. For instruction accesses, the MMU performs an address lookup in both the 64 entries of the ITLB, and in the IBAT array. If an effective address hits in both the ITLB and the IBAT array, the IBAT array translation takes priority. Data accesses cause a lookup in the DTLB and DBAT array for the physical address translation. In most cases, the physical address translation resides in one of the TLBs and the physical address bits are readily available to the on-chip cache. 1-12 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA When the physical address translation misses in the TLBs, the 603e provides hardware assistance for software to perform a search of the translation tables in memory. The hardware assist consists of the following features: • Automatic storage of the missed effective address in the IMISS and DMISS registers • Automatic generation of the primary and secondary hashed real address of the page table entry group (PTEG), which are readable from the HASH1 and HASH2 register locations. The HASH data is generated from the contents of the IMISS or DMISS register. Which register is selected depends on which miss (instruction or data) was last acknowledged. • Automatic generation of the first word of the page table entry (PTE) for which the tables are being searched • A real page address (RPA) register that matches the format of the lower word of the PTE • Two TLB access instructions (tlbli and tlbld) that are used to load an address translation into the instruction or data TLBs • Shadow registers for GPRs 0-3 that allow miss code to execute without corrupting the state of any of the existing GPRs. These shadow registers are only used for servicing a TLB miss. See Section 1.3.5.2, "Implementation-Specific Memory Management," for more information about memory management for the 603e. 1.1.5.2 Cache Units The 603e provides independent 16-Kbyte, four-way set-associative instruction and data caches. The cache line size is 32 bytes in length. The caches are designed to adhere to a write-back policy, but the 603e allows control of cacheability, write policy, and memory coherency at the page and block levels. The caches use a least recently used (LRU) replacement policy. As shown in Figure 1-1, the caches provide a 64-bit interface to the instruction fetch unit and load/store unit. The surrounding logic selects, organizes, and forwards the requested information to the requesting unit. Write operations to the cache can be performed on a byte basis, and a complete read-modify-write operation to the cache can occur in each cycle. The load/store and instruction fetch units provide the caches with the address of the data or instruction to be fetched. In the case of a cache hit, the cache returns two words to the requesting unit. Since the 603e data cache tags are single ported, simultaneous load or store and snoop accesses cause resource contention. Snoop accesses have the highest priority and are given first access to the tags, unless the snoop access coincides with a tag write, in which case the MOTOROLA Chapter 1. Overview 1-13 snoop is retried and must re-arbitrate for access to the cache. Loads or stores that are deferred due to snoop accesses are executed on the clock cycle following the snoop. 1.1.6 Processor Bus Interface Because the caches on the 603e are on-chip, write-back caches, the predominant type of transaction for most applications is burst-read memory operations, followed by burst-write memory operations, and single-beat (noncacheable or write-through) memory read and write operations. Additionally, there can be address-only operations, variants of the burst and single-beat operations, (for example, global memory operations that are snooped and atomic memory operations), and address retry activity (for example, when a snooped read access hits a modified line in the cache). Memory accesses can occur in single-beat (1-8 bytes) and four-beat burst (32 bytes) data transfers when the bus is configured as 64 bits, and in single-beat (1-4 bytes), two-beat (8 bytes), and eight-beat (32 bytes) data transfers when the bus is configured as 32 bits. The address and data buses operate independently to support pipelining and split transactions during memory accesses. The 603e can pipeline its own transactions to a depth of one level. Access to the system interface is granted through an external arbitration mechanism that allows devices to compete for bus mastership. This arbitration mechanism is flexible, allowing the 603e to be integrated into systems that implement various fairness and bus parking procedures to avoid arbitration overhead. Typically, memory accesses are weakly ordered-sequences of operations, including load/store string and multiple instructions, do not necessarily complete in the order they begin-maximizing the efficiency of the bus without sacrificing coherency of the data. The 603e allows read operations to precede store operations (except when a dependency exists, or in cases where a non-cacheable access is performed), and provides support for a write operation to proceed a previously queued read data tenure (for example, allowing a snoop push to be enveloped by the address and data tenures of a read operation). Because the processor can dynamically optimize run-time ordering of load/store traffic, overall performance is improved. 1.1.7 System Support Functions The 603e implements several support functions that include power management, time base/decrementer registers for system timing tasks, an IEEE 1149.1(JTAG)/common on-chip processor (COP) test interface, and a phase-locked loop (PLL) clock multiplier. These system support functions are described in the following subsections. 1-14 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 1.1.7.1 Power Management The 603e provides four power modes selectable by setting the appropriate control bits in the machine state register (MSR) and hardware implementation register 0 (HIDO) registers. The four power modes are as follows: • Full-power-This is the default power state of the 603e. The 603e is fully powered and the internal functional units are operating at the full processor clock speed. If the dynamic power management mode is enabled, functional units that are idle will automatically enter a low-power state without affecting performance, software execution, or external hardware. • Doze-All the functional units of the 603e are disabled except for the time base/decrementer registers and the bus snooping logic. When the processor is in doze mode, an external asynchronous interrupt, a system management interrupt, a decrementer exception, a hard or soft reset, or machine check brings the 603e into the full-power state. The 603e in doze mode maintains the PLL in a fully powered state and locked to the system external clock input (SYSCLK) so a transition to the full-power state takes only a few processor clock cycles. • Nap-The nap mode further reduces power consumption by disabling bus snooping, leaving only the time base register and the PLL in a powered state. The 603e returns to the full-power state upon receipt of an external asynchronous interrupt, a system management interrupt, a decrementer exception, a hard or soft reset, or a machine check input (MCP) signal. A return to full-power state from a nap state takes only a few processor clock cycles. • Sleep-Sleep mode reduces power consumption to a minimum by disabling all internal functional units, after which external system logic may disable the PLL and SYSCLK. Returning the 603e to the full-power state requires the enabling of the PLL and SYSCLK, followed by the assertion of an external asynchronous interrupt, a system management interrupt, a hard or soft reset, or a machine check input (MCP) signal after the time required to relock the PLL. The PID7v-603e implementation offers the following enhancements to the 603e family: • Lower-power design • 2.S-volt core and 3.3-volt I/O 1.1.7.2 Time Base/Decrementer The time base is a 64-bit register (accessed as two 32-bit registers) that is incremented once every four bus clock cycles; external control of the time base is provided through the time base enable (TBEN) signal. The decrementer is a 32-bit register that generates a decrementer interrupt exception after a programmable delay. The contents of the decrementer register are decremented once every four bus clock cycles, and the decrementer exception is generated as the count passes through zero. MOTOROLA Chapter 1. Overview 1-15 1.1.7.3 IEEE 1149.1 (JTAG)/COPTest Interface The 603e provides IEEE 1149.1 and COP functions for facilitating board testing and chip debug. The IEEE 1149.1 test interface provides a means for boundary-scan testing the 603e and the board to which it is attached. The COP function shares the IEEE 1149.1 test port, provides a means for executing test routines, and facilitates chip and software debugging. 1.1.7.4 Clock Multiplier The internal clocking of the 603e is generated from and synchronized to the external clock signal, SYSCLK, by means of a voltage-controlled oscillator-based PLL. The PLL provides programmable internal processor clock rates of lx, 1.5x, 2x, 2.5x, 3x, 3.5x, and 4x multiples of the externally supplied clock frequency. The bus clock is the same frequency and is synchronous with SYSCLK. The configuration of the PLL can be read by software from the hardware implementation register 1 (HIDl). 1.2 PowerPC Architecture Implementation The PowerPC architecture consists of the following layers, and adherence to the PowerPC architecture can be measured in terms of which of the following levels of the architecture is implemented: • PowerPC user instruction set architecture (VISA)-Defines the base user-level instruction set, user-level registers, data types, floating-point exception model, memory models for a uniprocessor environment, and programming model for a uniprocessor environment. • PowerPC virtual environment architecture (VEA)-Describes the memory model for a multiprocessor environment, defines cache control instructions, and describes other aspects of virtual environments. Implementations that conform to the VEA also adhere to the VISA, but may not necessarily adhere to the OEA. • PowerPC operating environment architecture (OEA)-Defines the memory management model, supervisor-level registers, synchronization requirements, and the exception model. Implementations that conform to the OEA also adhere to the VISA and the VEA. The PowerPC architecture allows a wide range of designs for such features as cache and system interface implementations. 1.3 Implementation-Specific Information The PowerPC architecture is derived from the mM POWER architecture (Performance Optimized with Enhanced RISC architecture). The PowerPC architecture shares the benefits of the POWER architecture optimized for single-chip implementations. The PowerPC architecture design facilitates parallel instruction execution and is scalable to take advantage of future technological gains. 1-16 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA This section describes the PowerPC architecture in general, and specific details about the implementation of the 603e as a low-power, 32-bit member of the PowerPC processor family. The main topics addressed are as follows: • Section 1.3.1, "Programming Model," describes the registers for the operating environment architecture common among PowerPC processors and describes the programming model. It also describes the additional registers that are unique to the 603e. • Section 1.3.2, "Instruction Set and Addressing Modes," describes the PowerPC instruction set and addressing modes for the PowerPC operating environment architecture, and defines and describes the PowerPC instructions implemented in the 603e. • Section 1.3.3, "Cache Implementation," describes the cache model that is defined generally for PowerPC processors by the virtual environment architecture. It also provides specific details about the 603e cache implementation. • Section 1.3.4, "Exception Model," describes the exception model of the PowerPC operating environment architecture and the differences in the 603e exception model. • Section 1.3.5, "Memory Management," describes generally the conventions for memory management among the PowerPC processors. This section also describes the 603e's implementation of the 32-bit PowerPC memory management specification. • Section 1.3.6, "Instruction Timing," provides a general description of the instruction timing provided by the superscalar, parallel execution supported by the PowerPC architecture and the 603e. • Section 1.3.7, "System Interface," describes the signals implemented on the 603e. The 603e is a high-performance, superscalar PowerPC microprocessor. The PowerPC architecture allows optimizing compilers to schedule instructions to maximize performance through efficient use of the PowerPC instruction set and register model. The multiple, independent execution units allow compilers to optimize instruction throughput. Compilers that take advantage of the flexibility of the PowerPC architecture can additionally optimize system performance of the PowerPC processors. The following sections summarize the features of the 603e, including both those that are defined by the architecture and those that are unique to the various 603e implementations. Specific features ofthe 603e are listed in Section 1.1.1, "Features." 1.3.1 Programming Model The PowerPC architecture defines register-to-register operations for most computational instructions. Source operands for these instructions are accessed from the registers or are provided as immediate values embedded in the instruction opcode. The three-register instruction format allows specification of a target register distinct from the two source operands. Load and store instructions transfer data between registers and memory. MOTOROLA Chapter 1. Overview 1-17 PowerPC processors have two levels of privilege-supervisor mode of operation (typically used by the operating system) and user mode of operation (used by the application software). The programming models incorporate 32 GPRs, 32 FPRs (not supported by the EC603e microprocessor), special-purpose registers (SPRs), and several miscellaneous registers. Each PowerPC microprocessor also has its own unique set of hardware implementation (HID) registers. Having access to privileged instructions, registers, and other resources allows the operating system to control the application environment (providing virtual memory and protecting operating-system and critical machine resources). Instructions that control the state of the processor, the address translation mechanism, and supervisor registers can be executed only when the processor is operating in supervisor mode. Figure 1-2 shows all the 603e registers available at the user and supervisor level. The numbers to the right of the SPRs indicate the number that is used in the syntax of the instruction operands to access the register. The following subsections describe the PID7v-603e implementation-specific features as they apply to registers. 1.3.1.1 Processor Version Register (PVR) The processor version number is 6 for the PID6-603e and 7 for the PID7v-603e. The processor revision level starts at OxOlOO and changes for each chip revision. The revision level is updated on all silicon revisions. 1.3.1.2 Hardware Implementation Register 0 (HIDO) PID7v-603e (designated by PVR level Ox0200) defines additional bits in the hardware implementation register 0 (HIDO), a supervisor-level register that provides the means for enabling the 603e's checkstops and features, and allows software to read the configuration of the PLL configuration signals. The HIDO bits with changed bit assignments are shown in Table 1-3. The HIDO bits that are not shown here are implemented as they are in Section 2.1.2.1, "Hardware Implementation Registers (HIDO and HID1)." Table 1-3. Additional/Changed HIDO Bits Bit(s) Description 24 Instruction fetch enable M (IFEM) bit-Enables the M bit on the bus. Used for instruction fetches. 25-26 Reserved 28 Address broadcast enable (ABE)-This configuration bit allows for the broadcast of debt, debi, and debst on the bus. Note that these cache control instruction broadcasts are not snooped by the PID7v-603e. Refer to Section 1.3.3, "Cache Implementation:' for more information. 29-30 Reserved 1-18 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 1.3.1.3 Run_N Counter Register (Run_N) The 33-bit Run_N counter register is unique to the PID7v-603e. The Run_N counter is used by the COP to control the number of processor cycles that the processor runs before halting. The most-significant 32 bits form a 32-bit counter. The function of the least-significant bit remains unchanged. 1.3.1.4 General-Purpose Registers (GPRs) The PowerPC architecture defines 32 user-level, general-purpose registers (GPRs). These registers are either 32 bits wide in 32-bit PowerPC microprocessors and 64 bits wide in 64-bit PowerPC microprocessors. The GPRs serve as the data source or destination for all integer instructions. 1.3.1.5 Floating-Point Registers (FPRs) The PowerPC architecture also defines 32 user-level, 64-bit floating-point registers (FPRs) (not supported by the EC603e microprocessor). The FPRs serve as the data source or destination for floating-point instructions. These registers can contain data objects of either single- or double-precision floating-point formats. 1.3.1.6 Condition Register (CR) The CR is a 32-bit user-level register that consists of eight four-bit fields that reflect the results of certain operations, such as move, integer and floating-point compare, arithmetic, and logical instructions, and provide a mechanism for testing and branching. 1.3.1.7 Floating-Point Status and Control Register (FPSCR) The floating-point status and control register (FPSCR) is a user-level register that contains all exception signal bits, exception summary bits, exception enable bits, and rounding control bits needed for compliance with the IEEE 754 standard. (Note that this is not supported by the EC603e microprocessor.) 1.3.1.8 Machine State Register (MSR) The machine state register (MSR) is a supervisor-level register that defines the state of the processor. The contents of this register are saved when an exception is taken and restored when the exception handling completes. The 603e implements the MSR as a 32-bit register; 64-bit PowerPC processors implement a 64-bit MSR. To ensure proper operation of the EC603e microprocessor, the MSR[FP] bit should remain cleared to zero. 1.3.1.9 Segment Registers (SRs) For memory management, 32-bit PowerPC microprocessors implement sixteen 32-bit segment registers (SRs). To speed access, the 603e implements the segment registers as two arrays; a main array (for data memory accesses) and a shadow array (for instruction memory accesses). Loading a segment entry with the Move to Segment Register (mtsr) instruction loads both arrays. MOTOROLA Chapter 1. Overview 1-19 1.3.1.10 Special-Purpose Registers (SPRs) The PowerPC operating environment architecture defines numerous special-purpose registers that serve a variety of functions, such as providing controls, indicating status, configuring the processor, and performing special operations. During normal execution, a program can access the registers, shown in Figure 2-1, depending on the program's access privilege (supervisor or user, determined by the privilege-level (PR) bit in the MSR). Note that registers ~uch as the GPRs and FPRs (not supported by the EC603e microprocessor) are accessed through operands that are part of the instructions. Access to registers can be explicit (that is, through the use of specific instructions for that purpose such as Move to Special-Purpose Register (mtspr) and Move from Special-Purpose Register (mfspr) instructions) or implicit, as the part of the execution of an instruction. Some registers are accessed both explicitly and implicitly In the 603e, all SPRs are 32 bits wide. 1.3.1.10.1 User-Level SPRs The following 603e SPRs are accessible by user-level software: • Link register (LR)-The link register can be used to provide the branch target address and to hold the return address after branch and link instructions. The LR is 32 bits wide in 32-bit implementations. Count register (CTR)-The CTR is decremented and tested automatically as a result of branch-and-count instructions. The CTR is 32 bits wide in 32-bit implementations. • XER register-The 32-bit XER contains the summary overflow bit, integer carry bit, overflow bit, and a field specifying the number of bytes to be transferred by a Load String Word Indexed (lswx) or Store String Word Indexed (stswx) instruction. 1.3.1.10.2 Supervisor-Level SPRs The 603e also contains SPRs that can be accessed only by supervisor-level software. These registers consist of the following: • The 32-bit DSISR defines the cause of data access and alignment exceptions. • The data address register (DAR) is a 32-bit register that holds the address of an access after an alignment or DSI exception. • Decrementer register (DEC) is a 32-bit decrementing counter that provides a mechanism for causing a decrementer exception after a programmable delay. • The 32-bit SDR1 specifies the page table format used in virtual-to-physical address translation for pages. (Note that physical address is referred to as real address in the architecture specification.) • The machine status save/restore register 0 (SRRO) is a 32-bit register that is used by the 603e for saving the address of the instruction that caused the exception, and the address to return to when a Return from Interrupt (rfi) instruction is executed. 1-20 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA • The machine status save/restore register 1 (SRR1) is a 32-bit register used to save machine status on exceptions and to restore machine status when an rfi instruction is executed. • The 32-bit SPRGO-SPRG3 registers are provided for operating system use. • The external access register (EAR) is a 32-bit register that controls access to the external control facility through the External Control In Word Indexed (eciwx) and External Control Out Word Indexed (ecowx) instructions. • The time base register (TB) is a 64-bit register that maintains the time of day and operates interval timers. The TB consists of two 32-bit fields-time base upper (TBU) and time base lower (TBL). • The processor version register (PVR) is a 32-bit, read-only register that identifies the version (model) and revision level of the PowerPC processor. • Block address translation (BAT) arrays-The PowerPC architecture defines 16 BAT registers, divided into four pairs of data BATs (DBATs) and four pairs of instruction BATs (!BATs). See Figure 2-1 for a list of the SPR numbers for the BAT arrays. The following supervisor-level SPRs are implementation-specific to the 603e: • The DMISS and IMISS registers are read-only registers that are loaded automatically upon an instruction or data TLB miss. • The HASH1 and HASH2 registers contain the physical addresses of the primary and secondary page table entry groups (PTEGs). • The ICMP and DCMP registers contain a duplicate of the first word in the page table entry (PTE) for which the table search is looking. • The required physical address (RPA) register is loaded by the processor with the second word of the correct PTE during a page table search. • The hardware implementation (HIDO and HID 1) registers provide the means for enabling the 603e's checkstops and features, and allows software to read the configuration of the PLL configuration signals. • The instruction address breakpoint register (lABR) is loaded with an instruction address that is compared to instruction addresses in the dispatch queue. When an address match occurs, an instruction address breakpoint exception is generated. Figure 2-1 shows all the 603e registers available at the user and supervisor level. The numbers to the right of the SPRs indicate the number that is used in the syntax of the instruction operands to access the register. MOTOROLA Chapter 1. Overview 1-21 SUPERVISOR MODEL Configuration Registers USER MODEL Hardware Implemenlation Machine State Processor Version Registers Register Register General-Purpose Registers ~ SPR1008 MSR ,--_p_v_R---,1 SPR 287 GPRO ~ SPR1009 GPRl Memory Management Registers •• Instruction BAT Software Table GPR31 · Registers IBATOU SPR528 Data BAT Registers DBATOU SPR 536 Search Registers 1 DMISS SPR 976 IBATOL SPR529 DBATOL SPR 537 DCMP SPR977 IBAT1U SPR 530 DBAT1U SPR538 HASHl SPR978 Floating-Point Reglsters2 IBAT1L SPR531 DBAT1L SPR539 HASH2 SPR 979 IBAT2U SPR532 DBAT2U SPR 540 IMISS SPR 980 FPRO IBAT2L SPR533 DBAT2L SPR 541 ICMP SPR981 FPRl IBAT3U SPR534 DBAT3U SPR 542 RPA SPR 982 •• FPR31 · IBAT3L SDR1 SPR535 DBAT3L SPR 543 Segment Registers SRO I SDRl ISPR 25 SRl Condition Register CR ·•• SR15 Floating-Point Status Exception Handling Registers and Control Reglster2 Data Address Register DSISR I FPSCR DAR ISPR 19 I DSISR I SPR 18 XER SPRGs Save and Restore XER I SPR 1 SPRGO SPR 272 ~SPR26 SPRGl SPR 273 ~SPR27 Link Register SPRG2 SPR 274 LR ISPRS SPRG3 SPR 275 Count Register Miscellaneous Registers CTR I SPR9 Time Base Facility (For Writing) Decrementer Time Base Facility ~SPR284 DEC I SPR22 (For Reading) ~SPR285 ~TBR26S Instruction Address External Address Breakpoint Register 1 Register (Optional) ~TBR269 IABR ISPR 1010 I EAR I SPR 282 Notes: lThese registers are 603e-specific (PID6-603e and PID7v-603e) registers. They may not be supported by other PowerPC processors. 2Not supported on the EC603e microprocessor. Figure 1-2. Programming Model-Registers 1-22 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 1.3.2 Instruction Set and Addressing Modes The following subsections describe the PowerPC instruction set and addressing modes in general. 1.3.2.1 PowerPC Instruction Set and Addressing Modes All PowerPC instructions are encoded as single-word (32-bit) opcodes. Instruction formats are consistent among all instruction types, permitting efficient decoding to occur in parallel with operand accesses. This fixed instruction length and consistent format greatly simplifies instruction pipelining. 1.3.2.1.1 PowerPC Instruction Set The PowerPC instructions are divided into the following categories: • Integer instructions-These include computational and logical instructions. - Integer arithmetic instructions - Integer compare instructions - Integer logical instructions - Integer rotate and shift instructions • Floating-point instructions-These include floating-point computational instructions, as well as instructions that affect the FPSCR. (Note that these instructions are not implemented on the EC603e microprocessor.) - Floating-point arithmetic instructions - Floating-point multiply/add instructions - Floating-point rounding and conversion instructions - Floating-point compare instructions - Floating-point status and control instructions • Load/store instructions-These include integer and floating-point load and store instructions. - Integer load and store instructions - Integer load and store multiple instructions - Floating-point load and store (not implemented on the EC603e microprocessor) - Primitives used to construct atomic memory operations (lwarx and stwcx. instructions) • Flow control instructions-These include branching instructions, condition register logical instructions, trap instructions, and other instructions that affect the instruction flow. - Branch and trap instructions - Condition register logical instructions MOTOROLA Chapter 1. Overview 1-23 • Processor control instructions-These instructions are used for synchronizing memory accesses and management of caches, TLBs, and the segment registers. - Move to/from SPR instructions - Move to/from MSR - Synchronize - Instruction synchronize • Memory control instructions-These instructions provide control of caches, TLBs, and segment registers. - Supervisor-level cache management instructions - User-level cache instructions - Segment register manipulation instructions - Translation lookaside buffer management instructions Note that this grouping of the instructions does not indicate which execution unit executes a particular instruction or group of instructions. Integer instructions operate on byte, half-word, and word operands. Floating-point instructions operate on single-precision (one word) and double-precision (one double word) floating-point operands. The PowerPC architecture uses instructions that are four bytes long and word-aligned. It provides for byte, half-word, and word operand loads and stores between memory and a set of 32 GPRs. It also provides for word and double-word operand loads and stores between memory and a set of 32 floating-point registers (FPRs). Computational instructions do not modify memory. To use a memory operand in a computation and then modify the same or another memory location, the memory contents must be loaded into a register, modified, and then written back to the target location with distinct instructions. PowerPC processors follow the program flow when they are in the normal execution state. However, the flow of instructions can be interrupted directly by the execution of an instruction or by an asynchronous event. Either kind of exception may cause one of several components of the system software to be invoked. 1.3.2.1.2 Calculating Effective Addresses The effective address (EA) is the 32-bit address computed by the processor when executing a memory access or branch instruction or when fetching the next sequential instruction. The PowerPC architecture supports two simple memory addressing modes: • EA = (rAIO) + offset (including offset = 0) (register indirect with immediate index) • EA =(rAIO) + rB (register indirect with index) These simple addressing modes allow efficient address generation for memory accesses. Calculation of the effective address for aligned transfers occurs in a single clock cycle. 1-24 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA For a memory access instruction, if the sum of the effective address and the operand length exceeds the maximum effective address, the memory operand is considered to wrap around from the maximum effective address to effective address O. Effective address computations for both data and instruction accesses use 32-bit unsigned binary arithmetic. A carry from bit 0 is ignored in 32-bit implementations. 1.3.2.2 Implementation-Specific Instruction Set The 603e instruction set is defined as follows: • The 603e provides hardware support for all 32-bit PowerPC instructions. • The 603e provides two implementation-specific instructions used for software table search operations following TLB misses: - Load Data TLB Entry (tlbld) - Load Instruction TLB Entry (tlbli) • The 603e implements the following instructions which are defined as optional by the PowerPC architecture: - External Control In Word Indexed (eciwx) - External Control Out Word Indexed (ecowx) - Floating Select (fsel) (Not supported by the EC603e microprocessor) - Floating Reciprocal Estimate Single-Precision (fres) (Not supported by the EC603e microprocessor) - Floating Reciprocal Square Root Estimate (frsqrte) (Not supported by the EC603e microprocessor) - Store Floating-Point as Integer Word (stfiwx) (Not supported by the EC603e microprocessor) 1.3.3 Cache Implementation The following subsections describe the general cache characteristics as implemented in the PowerPC architecture, and the 603e implementation, specifically. PID7v-603e specific information is noted where applicable. 1.3.3.1 PowerPC Cache Characteristics The PowerPC architecture does not define hardware aspects of cache implementations. For example, some PowerPC processors, including the 603e, have separate instruction and data caches (Harvard architecture), while others, such as the PowerPC 601® microprocessor, implement a unified cache. MOTOROLA Chapter 1. Overview 1-25 PowerPC microprocessors control the following memory access modes on a page or block basis: • Write-backlwrite-through mode • Caching-inhibited mode • Memory coherency Note that in the 603e, a cache block is defined as eight words. The VEA defines cache management instructions that provide a means by which the application programmer can affect the cache contents. 1.3.3.2 Implementation-Specific Cache Implementation The 603e has two 16-Kbyte, four-way set-associative (instruction and data) caches. The caches are physically addressed, and the data cache can operate in either write-back or write-through mode as specified by the PowerPC architecture. The data cache is configured as 128 sets of four blocks each. Each block consists of 32 bytes, two state bits, and an address tag. The two state bits implement the three-state MEl (modified/exclusive/invalid) protocol. Each block contains eight 32-bit words. Note that the PowerPC architecture defines the term 'block' as the cacheable unit. For the 603e, the block size is equivalent to a cache line. A block diagram of the data cache organization is shown in Figure 1-3. The instruction cache also consists of 128 sets of four blocks, and each block consists of 32 bytes, an address tag, and a valid bit. The instruction cache may not be written to except through a block fill operation. In the PID7v-603e, the instruction cache is blocked only until the critical load completes. The PID7v-603e supports instruction fetching from other instruction cache lines following the forwarding of the critical first double word of a cache line load operation. Successive instruction fetches from the cache line being loaded are forwarded, and accesses to other instruction cache lines can proceed during the cache line load operation. The instruction cache is not snooped, and cache coherency must be maintained by software. A fast hardware invalidation capability is provided to support cache maintenance. The organization of the instruction cache is very similar to the data cache shown in Figure 1-3. Each cache block contains eight contiguous words from memory that are loaded from an 8-word boundary (that is, bits A27-A31 of the effective addresses are zero); thus, a cache block never crosses a page boundary. Misaligned accesses across a page boundary can incur a performance penalty. The 603e's cache blocks are loaded in four beats of 64 bits each when the 603e is configured with a 64-bit data bus; when the 603e is configured with a 32-bit bus, cache block loads are performed with eight beats of 32 bits each. The burst load is performed as critical double word first. The data cache is blocked to internal accesses until the load completes; the instruction cache allows sequential fetching during a cache block load. In 1-26 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA the PID7v-603e, the critical double word is simultaneously written to the cache and forwarded to the requesting unit, thus minimizing stalls due to load delays. To ensure coherency among caches in a multiprocessor (or mUltiple caching-device) implementation, the 603e implements the MEl protocol. These three states, modified, exclusive, and invalid, indicate the state of the cache block as follows: • Modified-The cache block is modified with respect to system memory; that is, data for this address is valid only in the cache and not in system memory. • Exclusive-This cache block holds valid data that is identical to the data at this address in system memory. No other cache has this data. • Invalid-This cache block does not hold valid data. Cache coherency is enforced by on-chip bus snooping logic. Since the 603e's data cache tags are single-ported, a simultaneous load or store and snoop access represent a resource contention. The snoop access is given first access to the tags. The load or store then occurs on the clock following the snoop. 128 Sets I • • ~ I• Address Tag 0 -----j - State • Words 0-7 r- r--- Block 0 Block 1 Address Tag 1 - State Words 0-7 Block 2 Address Tag 2 State Words 0-7 Block 3 Address Tag 3 State Words 0-7 8 Words/Block Figure 1-3. Data Cache Organization 1.3.4 Exception Model This section describes the PowerPC exception model and the 603e implementation, specifically. PID7v-603e-specific information is noted where applicable. 1.3.4.1 PowerPC Exception Model The PowerPC exception mechanism allows the processor to change to supervisor state as a result of external signals, errors, or unusual conditions arising in the execution of instructions, and differ from the arithmetic exceptions defined by the IEEE for floating-point operations. When exceptions occur, information about the state of the processor is saved to certain registers and the processor begins execution at an address MOTOROLA Chapter 1. Overview 1-27 (exception vector) predetennined for each exception. Processing of exceptions occurs in supervisor mode. Although multiple exception conditions can map to a single exception vector, a more specific condition may be determined by examining a register associated with the exception-for example, the DSISR and the FPSCR. Additionally, some exception conditions can be explicitly enabled or disabled by software. The PowerPC architecture requires that exceptions be handled in program order; therefore, although a particular implementation may recognize exception conditions out of order, they are presented strictly in order. When an instruction-caused exception is recognized, any unexecuted instructions that appear earlier in the instruction stream, including any that have not yet entered the execute stage, are required to complete before the exception is taken. Any exceptions caused by those instructions are handled first. Likewise, exceptions that are asynchronous and precise are recognized when they occur, but are not handled until the instruction currently in the completion stage successfully completes execution or generates an exception, and the completed store queue is emptied. Unless a catastrophic condition causes a system reset or machine check exception, only one exception is handled at a time. If, for example, a single instruction encounters multiple exception conditions, those conditions are handled sequentially. After the exception handler handles an exception, the instruction execution continues until the next exception condition is encountered. However, in many cases there is no attempt to re-execute the instruction. This method of recognizing and handling exception conditions sequentially guarantees that exceptions are recoverable. Exception handlers should save the information stored in SRRO and SRRI early to prevent the program state from being lost due to a system reset or machine check exception or to an instruction-caused exception in the exception handler, and before enabling external interrupts. The PowerPC architecture supports four types of exceptions: • Synchronous, precise-These are caused by instructions. All instruction-caused exceptions are handled precisely; that is, the machine state at the time the exception occurs is known and can be completely restored. This means that (excluding the trap and system call exceptions) the address of the faulting instruction is provided to the exception handler and that neither the faulting instruction nor subsequent instructions in the code stream will complete execution before the exception is taken. Once the exception is processed, execution resumes at the address of the faulting instruction (or at an alternate address provided by the exception handler). When an exception is taken due to a trap or system call instruction, execution resumes at an address provided by the handler. • Synchronous, imprecise-The PowerPC architecture defines two imprecise floating-point exception modes, recoverable and nonrecoverable. Even though the 603e provides a means to enable the imprecise modes, it implements these modes 1-28 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA identically to the precise mode (that is, all enabled floating-point enabled exceptions are always precise on the 603e). (Note that the EC603e microprocessor does not support floating-point operations.) • Asynchronous, maskable-The external, system management interrupt (SMI), and decrementer interrupts are maskable asynchronous exceptions. When these exceptions occur, their handling is postponed until the next instruction, and any exceptions associated with that instruction, completes execution. If there are no instructions in the execution units, the exception is taken immediately upon determination of the correct restart address (for loading SRRO). Asynchronous, nonmaskable-There are two nonmaskable asynchronous exceptions: system reset and the machine check exception. These exceptions may not be recoverable, or may provide a limited degree of recoverability. All exceptions report recoverability through the MSR[RI] bit. 1.3.4.2 Implementation-Specific Exception Model As specified by the PowerPC architecture, all 603e exceptions can be described as either precise or imprecise and either synchronous or asynchronous. Asynchronous exceptions (some of which are maskable) are caused by events external to the processor's execution; synchronous exceptions, which are all handled precisely by the 603e, are caused by instructions. The 603e exception classes are shown in Figure 1-4. Figure 1-4. Exception Classifications Synchronous/Asynchronous Precise/Imprecise Exception Type Asynchronous, nonmaskable Imprecise Machine check System reset Asynchronous, maskable Precise External interrupt Decrementer System management interrupt Synchronous Precise Instruction-caused exceptions Although exceptions have other characteristics as well, such as whether they are maskable or nonmaskable, the distinctions shown in Figure 1-4 define categories of exceptions that the 603e handles uniquely. Note that Figure 1-4 includes no synchronous imprecise instructions. While the PowerPC architecture supports imprecise handling of floating-point exceptions, the 603e, with the exception of the EC603e microprocessor, implements floating-point exception modes as precise exceptions. The 603e's exceptions, and conditions that cause them, are listed in Figure 1-5. Figure 1-5. Exceptions and Conditions Exception Vector Offset Causing Conditions Type (hex) Reserved 00000 - MOTOROLA Chapter 1. Overview 1-29 Figure 1-5. Exceptions and Conditions (Continued) Exception Vector Offset Causing Conditions Type (hex) System reset 00100 A system reset is caused by the assertion of either SRESET or HRESET. Machine 00200 A machine check is caused by the assertion of the TEA signal during a data bus check transaction, assertion of MCP, or an address or data parity error. OSI 00300 The cause of a OSI exception can be determined by the bit settings in the DSISR, listed as follows: 1 Set if the translation of an attempted access is not found in the primary hash table entry group (HTEG), or in the rehashed secondary HTEG, or in the range of a OBAT register; otherwise cleared. 4 Set if a memory access is not permitted by the page or OBAT protection mechanism; otherwise cleared. 5 Set by an eciwx or ecowx instruction if the access is to an address that is marked as write-through, or execution of a load/store instruction that accesses a direct-store segment. 6 Set for a store operation and cleared for a load operation. 11 Set if eciwx or ecowx is used and EAR[E) is cleared. lSI 00400 An lSI exception is caused when an instruction fetch cannot be performed for any of the following reasons: · The effective (logical) address cannot be translated. That is, there is a page fault for this portion of the translation, so an lSI exception must be taken to load the PTE (and possibly the page) into memory. ·· The fetch access is to a direct-store segment (indicated by SRR1 [3) set). The fetch access violates memory protection (indicated by SRR1 [4) set). If the key bits (Ks and Kp) in the segment register and the PP bits in the PTE are set to prohibit read access, instructions cannot be fetched from this location. External 00500 An external interrupt is caused when MSR[EE) = 1 and the INT signal is asserted. interrupt Alignment 00600 An alignment exception is caused when the 603e cannot perform a memory access for any of the reasons described below: ·· The operand of a floating-point load or store instruction is not word-aligned. The operand of Imw, stmw, Iwarx, and stwcx. instructions are not aligned. · The operand of a single-register load or store operation is not aligned, and the 603e is in little-end ian mode (PI06-603e only). · The execution of a floating-point load or store instruction to a direct-store segment. · The operand of a load, store, load multiple, store multiple, load string, or store string instruction crosses a segment boundary into a direct-store segment, or crosses a protection boundary. ··Execution of a misaligned eciwx or ecowx instruction (PI07v-603e only). The instruction is Imw, stmw, Iswi, Iswx, stswi, stswx and the 603e is in little- end ian mode. · The operand of dcbz is in memory that is write-through-required or caching- inhibited. 1-30 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Figure 1-5. Exceptions and Conditions (Continued) Exception Vector Offset Causing Conditions Type (hex) Program 00700 A program exception is caused by one of the following exception conditions, which correspond to bit settings in SRR1 and arise during execution of an instruction: · Floating-point enabled exception-A floating-point enabled exception condition is generated when the following condition is met: (MSR[FEO]I MSR[FE1]) & FPSCR[FEX] is 1. (Not supported by the EC603e microprocessor.) FPSCR[FEX] is set by the execution of a floating-point instruction that causes an enabled exception or by the execution of one of the "move to FPSCR" instructions that results in both an exception condition bit and its corresponding enable bit being set in the FPSCR. (Not supported by the EC603e microprocessor.) · Illegal instruction-An illegal instruction program exception is generated when execution of an instruction is attempted with an illegal opcode or illegal combination of opcode and extended opcode fields (including PowerPC instructions not implemented in the 603e), or when execution of an optional instruction not provided in the 603e is attempted (these do not include those optional instructions that are treated as no-ops). · Privileged instruction-A privileged instruction type program exception is generated when the execution of a privileged instruction is attempted and the MSR register user privilege bit, MSR[PR], is set. In the 603e, this exception is generated for mtspr or mfspr with an invalid SPR field if SPR[O] = 1 and MSR[PR] = 1. This may not be true for all PowerPC processors. · Trap-A trap type program exception is generated when any of the conditions specified in a trap instruction is met. Floating-point 00800 A floating-point unavailable exception is caused by an attempt to execute a unavailable floating-point instruction (including floating-point load, store, and move instructions) when the floating-point available bit is disabled (MSR[FP] = 0). Note that the EC603e microprocessor takes a floating-point unavailable exception when execution of a floating-point instruction is attempted. Decrementer 00900 The decrementer exception occurs when the most significant bit of the decrementer (DEC) register transitions from 0 to 1. Must also be enabled with the MSR[EE] bit. Reserved OOAOO-OOBFF - System call OOCOO A system call exception occurs when a System Call (sc) instruction is executed. Trace OODOO A trace exception is taken when MSR[SE] =1 or when the currently completing instruction is a branch and MSR[BE] =1. Reserved OOEOO The 603e does not generate an exception to this vector. Other PowerPC processors may use this vector for floating-point assist exceptions. Reserved 00E1D-00FFF - Instruction 01000 An instruction translation miss exception is caused when an effective address for translation an instruction fetch cannot be translated by the ITLB. miss Data load 01100 A data load translation miss exception is caused when an effective address for a translation data load operation cannot be translated by the DTLB. miss MOTOROLA Chapter 1. Overview 1-31 Figure 1-5. Exceptions and Conditions (Continued) Exception Vector Offset Causing Conditions Type (hex) Data store 01200 A data store translation miss exception is caused when an effective address for a translation data store operation cannot be translated by the DTLB, or where a DTLB hit miss occurs, and the change bit in the PTE must be set due to a data store operation. Instruction 01300 An instruction address breakpoint exception occurs when the address (bits 0-29) address in the IABR matches the next instruction to complete in the completion unit, and breakpoint the IABR enable bit (bit 30) is set. System 01400 A system management interrupt is caused when MSR[EE] = 1 and the Sfiifi input management signal is asserted. interrupt Reserved 01500-02FFF - 1.3.5 Memory Management The following subsections describe the memory management features of the PowerPC architecture, and the 603e implementation, respectively. 1.3.5.1 PowerPC Memory Management The primary functions of the MMU are to translate logical (effective) addresses to physical addresses for memory accesses, and to provide access protection on blocks and pages of memory. There are two types of accesses generated by the 603e that require address translation- instruction accesses, and data accesses to memory generated by load and store instructions. The PowerPC MMU and exception model support demand-paged virtual memory. Virtual memory management permits execution of programs larger than the size of physical memory; demand-paged implies that individual pages are loaded into physical memory from system memory only when they are first accessed by an executing program. The hashed page table is a variable-sized data structure that defines the mapping between virtual page numbers and physical page numbers. The page table size is a power of 2, and its starting address is a multiple of its size. The page table contains a number of page table entry groups (PTEGs). A PTEG contains eight page table entries (PTEs) of eight bytes each; therefore, each PTEG is 64 bytes long. PTEG addresses are entry points for table search operations. Address translations are enabled by setting bits in the MSR-MSR[IR] enables instruction address translations and MSR[DR] enables data address translations. 1.3.5.2 Implementation-Specific Memory Management The instruction and data memory management units in the 603e provide 4 Gbytes of logical address space accessible to supervisor and user programs with a 4-Kbyte page size and 1-32 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 256-Mbyte segment size. Block sizes range from 128 Kbyte to 256 Mbyte and are software selectable. In addition, the 603e uses an interim 52-bit virtual address and hashed page tables for generating 32-bit physical addresses. The MMUs in the 603e rely on the exception processing mechanism for the implementation of the paged virtual memory environment and for enforcing protection of designated memory areas. Instruction and data TLBs provide address translation in parallel with the on-chip cache access, incurring no additional time penalty in the event of a TLB hit. A TLB is a cache of the most recently used page table entries. Software is responsible for maintaining the consistency of the TLB with memory. The 603e's TLBs are 64-entry, two-way set-associative caches that contain instruction and data address translations. The 603e provides hardware assist for software table search operations through the hashed page table on TLB misses. Supervisor software can invalidate TLB entries selectively. The 603e also provides independent four-entry BAT arrays for instructions and data that maintain address translations for blocks of memory. These entries define blocks that can vary from 128 Kbytes to 256 Mbytes. The BAT arrays are maintained by system software. As specified by the PowerPC architecture, the hashed page table is a variable-sized data structure that defines the mapping between virtual page numbers and physical page numbers. The page table size is a power of 2, and its starting address is a multiple of its size. Also as specified by the PowerPC architecture, the page table contains a number of page table entry groups (PTEGs). A PTEG contains eight page table entries (PTEs j of eight bytes each; therefore, each PTEG is 64 bytes long. PTEG addresses are entry points for table search operations. 1.3.6 Instruction Timing The 603e is a pipelined superscalar processor. A pipelined processor is one in which the processing of an instruction is reduced into discrete stages. Because the processing of an instruction is broken into a series of stages, an instruction does not require the entire resources of an execution unit. For example, after an instruction completes the decode stage, it can pass on to the next stage, while the subsequent instruction can advance into the decode stage. This improves the throughput of the instruction flow. For example, it may take three cycles for a floating-point instruction to complete, but if there are no stalls in the floating-point pipeline, a series of floating-point instructions can have a throughput of one instruction per cycle. MOTOROLA Chapter 1. Overview 1-33 The instruction pipeline in the 603e has four major pipeline stages, described as follows: • The fetch pipeline stage primarily involves retrieving instructions from the memory system and determining the location of the next instruction fetch. Additionally, the BPU decodes branches during the fetch stage and folds out branch instructions before the dispatch stage if possible. • The dispatch pipeline stage is responsible for decoding the instructions supplied by the instruction fetch stage, and determining which of the instructions are eligible to be dispatched in the current cycle. In addition, the source operands of the instructions are read from the appropriate register file and dispatched with the instruction to the execute pipeline stage. At the end of the dispatch pipeline stage, the dispatched instructions and their operands are latched by the appropriate execution unit. • During the execute pipeline stage each execution unit that has an executable instruction executes the selected instruction (perhaps over multiple cycles), writes the instruction's result into the appropriate rename register, and notifies the completion stage that the instruction has finished execution. In the case of an internal exception, the execution unit reports the exception to the completionlwriteback pipeline stage and discontinues instruction execution until the exception is handled. The exception is not signaled until that instruction is the next to be completed. Execution of most floating-point instructions is pipelined within the FPU allowing up to three instructions to be executing in the FPU concurrently. The pipeline stages for the floating-point unit are multiply, add, and round-convert. Execution of most load/store instructions is also pipelined. The load/store unit has two pipeline stages. The first stage is for effective address calculation and MMU translation and the second stage is for accessing the data in the cache. (Note that the EC603e microprocessor does not support the floating-point unit.) • The complete/writeback pipeline stage maintains the correct architectural machine state and transfers the contents of the rename registers to the GPRs and FPRs as instructions are retired. If the completion logic detects an instruction causing an exception, all following instructions are cancelled, their execution results in rename registers are discarded, and instructions are fetched from the correct instruction stream. A superscalar processor is one that issues multiple independent instructions into multiple pipelines allowing instructions to execute in parallel. The 603e has five independent execution units, one each for integer instructions, floating-point instructions (floating-point instructions are trapped by the floating-point unavailable exception on the EC603e microprocessor), branch instructions, load/store instructions, and system register instructions. The IU and the FPU each have dedicated register files for maintaining operands (GPRs and FPRs, respectively), allowing integer calculations and floating~point calculations to occur simultaneously without interference. Integer division performance of the PID7v-603e has been improved, with the divwux and divwx instructions executing in 20 clock cycles, instead of the 37 cycles required in the PID6-603e. 1-34 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA The 603e provides support for single-cycle store and it provides an adder/comparator in the system register unit that allows the dispatch and execution of multiple integer add and compare instructions on each cycle. Refer to Chapter 6, "Instruction Timing," for more information. Because the PowerPC architecture can be applied to such a wide variety of implementations, instruction timing among various PowerPC processors varies accordingly. 1.3.7 System Interface The system interface is specific for each PowerPC microprocessor implementation. The 603e provides a versatile system interface that allows for a wide range of implementations. The interface includes a 32-bit address bus, a 32- or 64-bit data bus, and 56 control and information signals (see Figure 1-6). The system interface allows for address-only transactions as well as address and data transactions. The 603e control and information signals include the address arbitration, address start, address transfer, transfer attribute, address termination, data arbitration, data transfer, data termination, and processor state signals. Test and control signals provide diagnostics for selected internal circuits. ADDRESS DATA ADDRESS ARBITRATION DATA ARBITRATION ADDRESS START DATA TRANSFER ADDRESS TRANSFER 603e DATA TERMINATION TRANSFER ATTRIBUTE PROCESSOR STATE ADDRESS TERMINATION TEST AND CONTROL CLOCKS I +3.3V -=- Figure 1-6. System Interface The system interface supports bus pipelining, which allows the address tenure of one transaction to overlap the data tenure of another. The extent of the pipelining depends on external arbitration and control circuitry. Similarly, the 603e supports split-bus transactions for systems with multiple potential bus masters-one device can have mastership of the address bus while another has mastership of the data bus. Allowing multiple bus transactions to occur simultaneously increases the available bus bandwidth for other activity and as a result, improves performance. The 603e supports multiple masters through a bus arbitration scheme that allows various devices to compete for the shared bus resource. The arbitration logic can implement priority protocols, such as fairness, and can park masters to avoid arbitration overhead. The MEl MOTOROLA Chapter 1. Overview 1-35 protocol ensures coherency among multiple devices and system memory. Also, the 603e's on-chip caches and TLBs and optional second-level caches can be controlled externally. The 603e's clocking structure allows the bus to operate at integer multiples of the processor cycle time. The following sections describe the 603e bus support for memory operations. Note that some signals perform different functions depending upon the addressing protocol used. 1.3.7.1 Memory Accesses The 603e's data bus is configured at power-up to either a 32- or 64-bit width. When the 603e is configured with a 32-bit data bus, memory accesses allow transfer sizes of 8, 16,24, or 32 bits in one bus clock cycle. Data transfers occur in either single-beat transactions, or two-beat or eight-beat burst transactions, with a single-beat transaction transferring as many as 32 bits. Single- or double-beat transactions are caused by noncached accesses that access memory directly (that is, reads and writes when caching is disabled, caching-inhibited accesses, and stores in write-through mode). Eight-beat burst transactions,which always transfer an entire cache line (32 bytes), are initiated when a line is read from or written to memory. When the 603e is configured with a 64-bit data bus, memory accesses allow transfer sizes of 8, 16,24,32,40,48,56, or 64 bits in one bus clock cycle. Data transfers occur in either single-beat transactions or four-beat burst transactions. Single-beat transactions are caused by noncached accesses that access memory directly (that is, reads and writes when caching is disabled, caching-inhibited accesses, and stores in write-through mode). Four-beat burst transactions, which always transfer an entire cache line (32 bytes), are initiated when a line is read from or written to memory. 1.3.7.2 Signals The 603e signals are grouped as follows: • Address arbitration signals-The 603e uses these signals to arbitrate for address bus mastership. • Address transfer start signals-These signals indicate that a bus master has begun a transaction on the address bus. • Address transfer signals-These signals, which consist of the address bus, address parity, and address parity error signals, are used to transfer the address and to ensure the integrity of the transfer. • Transfer attribute signals-These signals provide information about the type of transfer, such as the transfer size and whether the transaction is bursted, write-through, or caching-inhibited. • Address transfer termination signals-These signals are used to acknowledge the end of the address phase of the transaction. They also indicate whether a condition exists that requires the address phase to be repeated. 1-36 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA • Data arbitration signals-The 603e uses these signals to arbitrate for data bus mastership. • Data transfer signals-These signals, which consist of the data bus, data parity, and data parity error signals, are used to transfer the data and to ensure the integrity of the transfer. • Data transfer termination signals-Data termination signals are required after each data beat in a data transfer. In a single-beat transaction, the data termination signals also indicate the end of the tenure, while in burst accesses, the data termination signals apply to individual beats and indicate the end of the tenure only after the final data beat. They also indicate whether a condition exists that requires the data phase to be repeated. • System status signals-These signals include the interrupt signal, checkstop signals, and both soft- and hard-reset signals. These signals are used to interrupt and, under various conditions, to reset the processor. • Processor state signals-These signals indicate the state of the reservation coherency bit, enable the time base, provide machine quiesce control, and cause a machine halt on execution of a tlbsync instruction. • IEEE 1149. 1(JTAG)/COP interface signals-The IEEE 1149.1 test unit and the common on-chip processor (COP) unit are accessed through a shared set of input, output, and clocking signals. The IEEE 1149 .1/COP interface provides a means for boundary scan testing and internal debugging of the 603e. • Test interface signals-These signals are used for production testing. • Clock signals-These signals determine the system clock frequency. These signals can also be used to synchronize multiprocessor systems. NOTE A bar over a signal name indicates that the signal is active low-for example, ARTRY (address retry) and TS (transfer start). Active-low signals are referred to as asserted (active) when they are low and negated when they are high. Signals that are not active low, such as AP[0-3] (address bus parity signals) and TT[0-4] (transfer type signals) are referred to as asserted when they are high and negated when they are low. MOTOROLA Chapter 1. Overview 1-37 1.3.7.3 Signal Configuration Figure 1-7 illustrates the 603e's logical pin configuration, showing how the signals are grouped. BR DBG 1J t~ 1 1 ADDRESS ARBITRATION BG AEiB .... 1 1 1 1 DBWO DBB DATA ARBITRATION ADDRESS-[~ TS .. 1 START 64 8 DH[0-31], Dl[0-31] DPr0-71 OPE 1 J DATA TRANSFER { A[0-31] • 32 1 DBl)fS ADDRESS BUS 1 AP[0-3] ~ .. 4 APE TA r- TI[D-4] TBST 1 5 1 1 1 DRTRY TEA :.r=t DATA TERMINATION ~ TSIZ[0-2] • 1 INT SMI ~ TRANSFER ~ GaL .. 3 1 en 21 MCJ5 INTERRUPTS 0 ATTRIBUTE- CT 1 W 2 i:::KSTi' IN CKsip OUT CHECKSTOPS Wi CD HRESET SRESET RESET 1 2 CSE[0-1] 2 Tcr0-11 RSRV '- 2 1 2 1 0Rr0 OA(;I( TBEN =1J PROCESSOR STATUS T[Bls'i'f'lC ADDRESS TERMINATION { .. AACK ARfRY .... 1 1 1 'rnSi. TCK TMS, TDI, TOO ~ JTAG/COP 5 :..r INTERFACE SYSClK . t 1 ClK OUT TEST CLOCKS Pll CFG[0-3] 1 3 l LSSDTEST .. 4 S CONTROL I.J.. +3.3 V Figure 1-7. Signal Groups 1-38 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Chapter 2 Programming Model This chapter describes the PowerPC programming model with respect to the PowerPC 603e microprocessor. It consists of three major sections that describe the following: • Registers implemented in the 603e • Operand conventions • The 603e instruction set 2.1 Register Set This section describes the register organization in the 603e as defined by the three levels of the PowerPC architecture-the user instruction set architecture (UISA), the virtual environment architecture (VEA), and the operating environment architecture (OEA), as well as the 603e implementation-specific registers. Full descriptions of the basic register set defined by the PowerPC architecture are provided in Chapter 2, "PowerPC Register Set," in The Programming Environments Manual. The PowerPC architecture defines register-to-register operations for all computational instructions. Source data for these instructions is accessed from the on-chip registers or is provided as an immediate value embedded in the opcode. The three-register instruction format allows specification of a target register distinct from the two source registers, thus preserving the original data for use by other instructions and reducing the number of instructions required for certain operations. Data is transferred between memory and registers with explicit load and store instructions only. Note that there may be registers common to other PowerPC processors that are not implemented in the 603e. When the 603e detects special-purpose register (SPR) encodings other than those defined in this document, it either takes an exception or it treats the instruction as a no-op. (Note that exceptions are referred to as interrupts in the architecture specification.) Conversely, some SPRs in the 603e may not be implemented in other PowerPC processors, or may not be implemented in the same way in other PowerPC processors. 2.1.1 PowerPC Register Set The PowerPC UISA registers, shown in Figure 2-1, can be accessed by either user- or supervisor-level instructions (the architecture specification refers to user- and supervisor- MOTOROLA Chapter 2. Programming Model 2-1 level as problem state and privileged state, respectively). The general-purpose registers (GPRs) and floating-point registers (FPRs) are accessed through instruction operands. (Note that the EC603e microprocessor does not support the floating-point register file; an attempt to access the floating-point register file will result in a floating-point unavailable exception.) Access to registers can be explicit (that is, through the use of specific instructions for that purpose such as the mtspr and mfspr instructions) or implicit as part of the execution (or side effect) of an instruction. Some registers are accessed both explicitly and implicitly. The number to the right of the register name indicates the number that is used in the syntax of the instruction operands to access the register (for example, the number used to access the XER is SPRl). For more information on the PowerPC register set, refer to Chapter 2, "PowerPC Register Set," in The Programming Environments Manual. 2-2 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA SUPERVISOR MODEL Configuration Registers USER MODEL Hardware Implementation Machine State Processor Version Registers1 Register Register General-Purpose Registers ~ SPR1008 MSR PVR '--------' ISPR 287 GPRO ~ SPR1009 GPR1 Memory Management Registers ·· Instruction BAT Software Table Registers Data BAT Registers Search Registers 1 GPR31 IBATOU SPR 528 DBATOU SPR 536 DMISS SPR 976 IBATOL SPR 529 DBATOL SPR 537 DCMP SPR 977 IBAT1U SPR 530 DBAT1U SPR 538 HASH1 SPR 978 Floating-Point IBAT1L SPR 531 DBAT1L SPR 539 HASH2 SPR 979 Registers 2 IBAT2U SPR 532 DBAT2U SPR 540 IMISS SPR 980 FPRO IBAT2L SPR 533 DBAT2L SPR 541 ICMP SPR 981 FPR1 IBAT3U SPR 534 DBAT3U SPR 542 RPA SPR 982 IBAT3L SPR535 DBAT3L SPR543 Segment Registers FPR31 SDR1 SRO SDR1 ISPR 25 SR1 Condition Register CR ·· SR15 Floating-Point Status Exception Handling Registers and Control Register2 Data Address Register DSISR I FPSCR DAR I SPR 19 DSISR SPR18 XER SPRGs Save and Restore XER I SPR 1 SPRGO SPR 272 ~SPR26 SPRG1 SPR 273 ~SPR27 Link Register SPRG2 SPR 274 SPRG3 SPR 275 L-_LR_--,I SPR 8 Count Register Miscellaneous Registers CTA I SPR9 Time Base Facility (For Writing) Decrementer Time Base Facility ~SPR284 DEC I SPR22 (For Reading) ~SPR285 ~TBR268 Instruction Address External Address Breakpoint Register1 Register (Optional) ~TBR269 IABR ISPR 1010 I EAR I SPR 282 Notes: 1These registers are 603e-specific (PID6-603e and PID7v-603e) registers. They may not be supported by other PowerPC processors. 2Not supported on the EC603e microprocessor. Figure 2-1. Programming Model-Registers MOTOROLA Chapter 2. Programming Model 2-3 The 603e's user-level registers are described as follows: • User-level registers (UISA)-The user-level registers can be accessed by all software with either user or supervisor privileges. The user-level register set includes the following: - General-purpose registers (GPRs). The general-purpose register file consists of thirty-two 32-bit GPRs designated as GPRO-GPR31. This register file serves as the data source or destination for all integer instructions and provides data for generating addresses. - Floating-point registers (FPRs). The floating-point register file consists of thirty- two 64-bit FPRs designated as FPRO-FPR31, which serves as the data source or destination for all floating-point instructions. These registers can contain data objects of either single- or double-precision floating-point format. (The floating- point register file is not supported on the EC603e microprocessor; an attempt to access the floating-point register file will result in a floating-point unavailable exception.) - Condition register (CR). The CR is a 32-bit register, divided into eight 4-bit fields, CRO--CR7, that reflects the results of certain arithmetic operations and provides a mechanism for testing and branching. - Floating-point status and control register (FPSCR). The FPSCR is a user-control register that contains all floating-point exception signal bits, exception summary bits, exception enable bits, and rounding control bits needed for compliance with the IEEE 754 standard. (The FPU is not supported on the EC603e microprocessor; an attempt to access the floating-point register file will result in a floating-point unavailable exception.) The remaining user-level registers are SPRs. Note that the PowerPC architecture provides a separate mechanism for accessing SPRs (the mtspr and mfspr instructions). These instructions are commonly used to explicitly access certain registers, while other SPRs may be more typically accessed as the side effect of executing other instructions. - XER register (XER). The XER is a 32-bit register that indicates overflow and carries for integer operations. It is set implicitly by many instructions. - Link register (LR). The 32-bit link register provides the branch target address for the Branch Conditional to Link Register (bclrx) instruction, and can optionally be used to hold the logical address (referred to as the effective address in the architecture specification) of the instruction that follows a branch and link instruction, typically used for linking to subroutines. - Count register (CTR). The CTR is a 32-bit register for holding a loop count that can be decremented during execution of appropriately coded branch instructions. The CTR can also provide the branch target address for the Branch Conditional to Count Register (bcctrx) instruction. 2-4 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA • User-level registers (VEA)-The PowerPC VEA introduces the time base facility (TB) for reading. The TB is a 64-bit register pair whose contents are incremented once every four bus clock cycles. The TB consists of two 32-bit registers-time base upper (TBU) and time base lower (TBL). Note that the time base registers are read- only when in user state. The 603e's supervisor-level registers are described as follows: • Supervisor-level registers (OEA)-The OEA defines the registers that are used typically by an operating system for such operations as memory management, configuration, and exception handling. The supervisor-level registers defined by the PowerPC architecture for 32-bit implementations are described as follows: - Configuration registers Machine state register (MSR). The MSR defines the state of the processor. The MSR can be modified by the Move to Machine State Register (mtmsr), System Call (sc), and Return from Exception (rfi) instructions. It can be read by the Move from Machine State Register (mfmsr) instruction. Implementation Note-The 603e defines MSR[l3] as the power management enable (POW) bit and MSR[14] as the temporary GPR remapping (TGPR) bit. These additional bits are described in Table 2-1. Table 2-1. MSR[POW] and MSR[TGPR] Bits Bit Name Description 13 POW Power management enable (603e-specific) a Disables programmable power modes (normal operation mode). 1 Enables programmable power modes (nap, doze, or sleep mode). This bit controls the programmable power modes only, it has no effect on dynamic power management (DPM). MSR[POW] may be altered with an mtmsr instruction only. Also, when altering the POW bit, software may alter only this bit in the MSR and no others. The mtmsr instruction must be followed by a context-synchronizing instruction. See Chapter 9, "Power Management," for more information on power management. 14 TGPR Temporary GPR remapping (603e-specific) 0 Normal operation 1 TGPR mode. GPRo-GPR3 are remapped to TGPRQ-TGPR3 for use by TLB miss routines. The contents of GPRO-GPR3 remain unchanged while MSR[TGPR] = 1. Attempts to use GPR4-GPR31 with MSR[TGPR] = 1 yield undefined results. Overlays TGPRO-TGPR3 over GPRD-GPR3 for use by TLB miss routines. When this bit is set, all instruction accesses to GPRo-GPR3 are mapped to TGPRO-TGPR3, respectively. The contents of GPRo-GPR3 are unchanged as long as this bit remains set. Attempts to use GPR4-GPR31 when this bit is set yields undefined results.The TGPR bit is set when either an instruction TLB miss, data read miss, or data write miss exception is taken. The TGPR bit is cleared by an rfi instruction. MOTOROLA Chapter 2. Programming Model 2-5 - Processor version register (PVR). This register is a read-only register that identifies the version (model) and revision level of the PowerPC processor. Implementation Note-The processor version number is 6 for the PID6- 603e and 7 for the PID7v-603e. The processor revision level starts at OxOlOO and changes for each chip revision. The revision level is updated on all silicon revisions. - Memory management registers - Block-address translation (BAT) registers. The 603e includes eight block- address translation registers (BATs), consisting of four pairs of instruction BATs (IBATOU-IBAT3U and IBATOL-IBAT3L) and four pairs of data BATs (DBATOU-DBAT3U and DBATOL-DBAT3L). See Figure 2-1 for a list of the SPR numbers for the BAT registers. SDRI. The SDRI register specifies the page table base address used in virtual- to-physical address translation. (Note that physical address is referred to as real address in the architecture specification.) Segment registers (SR). The PowerPC OEA defines sixteen 32-bit segment registers (SRO-SRI5). Note that SRs are implemented on 32-bit implementations only. The fields in the segment register are interpreted differently depending on the value of bit O. - Exception handling registers - Data address register (DAR). After a data access or an alignment exception, the DAR is set to the effective address generated by the faulting instruction. - SPRGO-SPRG3. The SPRGO-SPRG3 registers are provided for operating system use. - DSISR. The DSISR defines the cause of data access and alignment exceptions. - Machine status save/restore register 0 (SRRO). The SRRO is used to save machine status on exceptions and to restore machine status when an rfi instruction is executed. - Machine status save/restore register 1 (SRRl). The SRRI is used to save machine status on exceptions and to restore machine status when an rfi instruction is executed. Implementation Note-The 603e implements the Key bit (bit 12) in the SRRI register in order to simplify the table search software. For more information refer to Chapter 5, "Memory Management." - Miscellaneous registers - The time base facility (TB) for writing. The TB is a 64-bit register pair that can be used to provide time of day or interval timing. It consists oftwo 32-bit registers-time base upper (TBU) and time base lower (TBL). The TB is incremented once every four clock cycles. 2-6 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA - Decrementer (DEC). The DEC register is a 32-bit decrementing counter that provides a mechanism for causing a decrementer exception after a programmable delay. The DEC is decremented once every four bus clock cycles. - External access register (EAR). The EAR is a 32-bit register used in conjunction with the eciwx and ecowx instructions. While the PowerPC architecture specifies that the low-order six bits of the EAR (bits 26-31) are used to select a device, the 603e only implements the low-order 4 bits (bits 28-31). Note that the EAR register and the eciwx and ecowx instructions are optional in the PowerPC architecture and may not be supported in all PowerPC processors that implement the OEA. 2.1.2 Implementation-Specific Registers The 603e includes several implementation-specific SPRs that are not defined by the PowerPC architecture. They are the DMISS, IMISS, DCMP, ICMP, HASH1, HASH2, RPA, HIDO, HID1, and IABR registers. These registers can be accessed by supervisor-level instructions only. Any attempt to access these SPRs with user-level instructions results in a supervisor-level exception. The SPR numbers for these registers are shown in Figure 2-1. The DMISS, !MISS, DCMP, ICMP, HASH1, HASH2, and RPA registers are used for software table search operations and should only be accessed when address translation is disabled (that is, MSR[IR] = 0 and MSR[DR] = 0). For a complete discussion of software table search operations, refer to Section 5.5.2, "Implementation-Specific Table Search Operation." 2.1.2.1 Hardware Implementation Registers (HIDO and HID1) The HIDO and HIDI registers, shown in Figure 2-2 and Figure 2-3 respectively, define enable bits for various 603e-specific features. [J Reserved EICE DLOCK o 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 26 27 28 30 31 Figure 2-2. Hardware Implementation Register 0 (HI DO) MOTOROLA Chapter 2. Programming Model 2-7 Table 2-2 shows the bit definitions for HIDO. Table 2-2. HIDO Bit Settings Bit(s) Name Description 0 EMCP Enable machine check pin 1 - Reserved 2 EBA Enable bus address parity checking 3 EBD Enable bus data parity checking 4 SBCLK Select bus clock for test clock pin 5 EICE Enable ICE outputs-pipeline tracking support 6 ECLK Enable external test clock pin 7 PAR Disable precharge of ARTRY and shared signals 8 DOZE Doze mode-PLL, time base, and snooping active 1 9 NAP Nap mode-PLL and time base active 1 10 SLEEP Sleep mode-no external clock required 1 11 DPM Enable dynamic power management1 12 RISEG Reserved for test 13-14 - Reserved 15 NHR Reserved 16 ICE Instruction cache enable2 17 DCE Data cache enable 2 18 ILOCK Instruction cache LOCK2 19 DLOCK Data cache LOCK 2 20 ICFI Instruction cache flash invalidate2 21 DCFI Data cache flash invalidate2 22-23 - Reserved 24 IFEM Instruction fetch enable M (PID7v-603e only) 25-26 - Reserved 27 FBIOB Force branch indirect on bus 28 ABE Address broadcast enable2 (PID7v-603e only) 29-30 - Reserved 31 NOOPTI No-op touch instructions Notes: 1. See Chapter 9, "Power Management;' for more information. 2. See Chapter 3, "Instruction and Data Cache Operation;' for more information. 2-8 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA D Reserved o 1 2 3 4 31 Figure 2-3. Hardware Implementation Register 1 (HID1) Table 2-3 shows the bit definitions for HIDl. Table 2-3. HID1 Bit Settings Bit(s) Name Description 0 PCO PLL configuration bit 0 (read-only) 1 PCl PLL configuration bit 1 (read-only) 2 PC2 PLL configuration bit 2 (read-only) 3 PC3 PLL configuration bit 3 (read-only) 4-31 - Reserved Note: The clock configuration bits reflect the state of the PLL_CFG[O-3] signals. 2.1.2.2 Data and Instruction TLB Miss Address Registers (DMISS and IMISS) The DMISS and IMISS registers have the same format as shown in Figure 2-4. They are loaded automatically upon a data or instruction TLB miss. The DMISS and IMISS contain the effective page address of the access that caused the TLB miss exception. The contents are used by the 603e when calculating the values of HASHI and HASH2, and by the tlbld and tIbli instructions when loading a new TLB entry. Note that the 603e always loads the DMISS register with a big-endian address, even when MSR[LE] is set. These registers are read and write to the software. Effective Page Address o 31 Figure 2-4. DMISS and IMISS Registers 2.1.2.3 Data and Instruction TLB Compare Registers (DCMP and ICMP) The DCMP and ICMP registers are shown in Figure 2-5. These registers contain the first word in the required PTE. The contents are constructed automatically from the contents of the segment registers and the effective address (DMISS or IMISS) when a TLB miss exception occurs. Each PTE read from the tables during the table search process should be compared with this value to determine whether or not the PTE is a match. Upon execution of a tIbld or tlbli instruction the upper 25 bits of the DCMP or ICMP register and 11 bits MOTOROLA Chapter 2. Programming Model 2-9 of the effective address operand are loaded into the first word of the selected TLB entry. These registers are read and write to the software. liD Reserved VSID API o1 24 25 26 31 Figure 2-5. DCMP and ICMP Registers Table 2-4 describes the bit settings for the DCMP and ICMP registers. Table 2-4. DCMP and ICMP Bit Settings Bits Name Description 0 V Valid bit. Set by the processor on a TLB miss exception. 1-24 VSID Virtual segment ID. Copied from VSID field of corresponding segment register. 25 - Reserved 26-31 API Abbreviated page index. Copied from API of effective address. 2.1.2.4 Primary and Secondary Hash Address Registers (HASH1 and HASH2) The HASH! and HASH2 registers contain the physical addresses of the primary and secondary PTEGs for the access that caused the TLB miss exception. For convenience, the 603e automatically constructs the full physical address by routing bits 0-6 of SDR! into HASH! and HASH2 and clearing the lower 6 bits. These registers are read-only and are constructed from the contents of the DMISS or IMISS register (the register choice is determined by which miss was last acknowledged). The format for the HASH! and HASH2 registers is shown in Figure 2-6. HTABORG[0-6] Hashed Page Address 000000 o 6 7 25 26 31 Figure 2-6. HASH1 and HASH2 Registers Table 2-5 describes the bit settings of the HASH! and HASH2 registers. Table 2-5. HASH1 and HASH2 Bit Settings Bits Name Description 0-6 HTABORG[0-6] Copy of the upper 7 bits of the HTABORG field from SDR1 7-25 Hashed page address Address bits 7-25 of the PTEG to be searched 26-31 - Reserved 2-10 MPC603e & EC603e RiSe Microprocessors User's Manual MOTOROLA 2.1.2.5 Required Physical Address Register (RPA) The RPA register is shown in Figure 2-7. During a page table search operation, the software must load the RPA with the second word of the correct PTE. When the tlbld or tlbli instruction is executed, the contents of the RPA register and the DMISS or IMISS register are merged and loaded into the selected TLB entry. The referenced (R) bit is ignored when the write occurs (no location exists in the TLB entry for this bit). The RPA register is read and write to the software. CJ Reserved RPN 0001 R C I I WIMG I and SRR1 [WAY] tlbld rB Loads the contents of the DCMP and RPA registers into the DTLB entry selected by and SRR1[WAYl In addition, the 603e contains the following features that do not specifically control the 603e MMU but that are implemented to increase performance and flexibility in the software table search routines whenever one of the three TLB miss exceptions occurs: • Temporary GPRO--GPR3. These registers are available as rO-r3 when MSR[TGPR] is set. The 603e automatically sets MSR[TGPR] for these cases, allowing these exception handlers to have four registers that are used as scratchpad space, without having to save or restore this part of the machine state that existed when the exception occurred. Note that MSR[TGPR] is cleared when the rfi instruction is executed because the old MSR value (with MSR[TGPR] = 0) saved in SRRI is restored. Refer to Section 5.5.2.2, "Software Table Search Operation," for code examples that take advantage of these registers. • The 603e also automatically saves the values of CR[CRO] of the executing context to SRRl[0-3]. Thus, the exception handler can set CR[CRO] bits and branch accordingly in the exception handler routine, without having to save the existing CR[CRO] bits. However, the exception handler must restore these bits to CR[CRO] before executing the rfi instruction. • Also saved in SRRI are two bits identifying the type of miss (SRRI [DIl] identifies instruction or data, and SRRl[L/S] identifies a load or store). Additionally, SRRl[WAY] identifies the associativity class of the TLB entry selected for replacement by the LRU algorithm. The software can change this value, effectively overriding the replacement algorithm. Finally, the SRRI [KEY] bit is used by the table search software to determine if there is a protection violation associated with the access (useful on data write misses for determining if the C bit should be updated in the table). Table 5-10 summarizes the SRRI bits updated whenever one ofthe three TLB miss exceptions occurs. MOTOROLA Chapter 5. Memory Management 5-35 Table 5-10. Implementation-Specific SRR1 Bits Bit Number Name Function 0-3 CRFO Condition register field 0 bits 12 KEY Key forTLB miss (either Ks or Kp from segment register, depending on whether the access is a user or supervisor access) 13 011 Set if instruction TLB miss 14 WAY Next TLB set to be replaced (set per LRU) 15 S/L Set if data TLB miss was for a load instruction The key bit saved in SRRI is derived as shown in Figure 5-11. Select KEY from segment register: If MSR[PR] = 0, KEY = Ks If MSR[PR] = 1, KEY = Kp Figure 5-11. Derivation of Key Bit for SRR1 The remainder of this section describes the format of the implementation-specific SPRs that are not defined by the PowerPC architecture, but are used by the TLB miss exception handlers. These registers can be accessed by supervisor-level instructions only. Any attempt to access these SPRs with user-level instructions results in a privileged instruction program exception. As DMISS, IMISS, DCMP, ICMP, HASH1, HASH2, and RPA are used to access the translation tables for software table search operations, they should only be accessed when address iransiaiion is disabled (that is, MSR[IR] = 0 and MSR[DRJ = 0). Note that MSR[IR] and MSR[DR] are cleared by the processor whenever an exception occurs. 5.5.2.1.1 Data and Instruction TLB Miss Address Registers (DMISS and IMISS) The DMISS and IMISS registers have the same format as shown in Figure 5-12. They are loaded automatically upon a data or instruction TLB miss. The DMISS and IMISS contain the effective page address of the access which caused the TLB miss exception. The contents are used by the processor when calculating the values of HASHl and HASH2, and by the tlbld and tlbli instructions when loading a new TLB entry. Note that the 603e always loads a big-endian address into the DMISS register. These registers are read-only to the software. Effective Page Address o 31 Figure 5-12. DMISS and IMISS Registers 5-36 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 5.5.2.1.2 Data and Instruction TLB Compare Registers (DCMP and ICMP) The DCMP and ICMP registers are shown in Figure 5-13. These registers contain the first word in the required PTE. The contents are constructed automatically from the contents of the segment registers and the effective address (DMISS or IMISS) when a TLB miss exception occurs. Each PTE read from the tables in memory during the table search process should be compared with this value to determine whether or not the PTE is a match. Upon execution of a tlbld or tlbli instruction, the contents of the DCMP or ICMP register is loaded into the first word of the selected TLB entry. VSID API o1 24 25 26 31 Figure 5-13. DCMP and ICMP Registers Table 5-11 describes the bit settings for the DCMP and ICMP registers. Table 5-11. DCMP and ICMP Bit Settings Bits Name Description 0 V Valid bit. Set by the processor on a TLB miss exception. 1-24 VSID Virtual segment ID. Copied from VSID field of corresponding segment register. 25 H Hash function identifier. Cleared by the processor on a TLB miss exception 26-31 API Abbreviated page index. Copied from API of effective address. 5.5.2.1.3 Primary and Secondary Hash Address Registers (HASH1 and HASH2) HASHI and HASH2 contain the physical addresses of the primary and secondary PTEGs for the access that caused the TLB miss exception. Only bits 7-25 differ between them. For convenience, the processor automatically constructs the full physical address by routing bits 0-6 of SDRI into HASHI and HASH2 and clearing the lower six bits. These registers are read-only and are constructed from the contents of the DMISS or !MISS register. The format for the HASHI and HASH2 registers is shown in Figure 5-14. ii!I Reserved HTABORG Hashed Page Address o 6 7 25 26 31 Figure 5-14. HASH1 and HASH2 Registers MOTOROLA Chapter 5. Memory Management 5-37 Table 5-12 describes the bit settings of the HASHI and HASH2 registers. Table 5-12. HASH1 and HASH2 Bit Settings Bits Name Description (}-6 HTABORG[G-6] Copy of the upper 7 bits of the HTABORG field from SDR1 7-25 Hashed page address Address bits 7-25 of the PTEG to be searched. 26-31 - Reserved 5.5.2.1.4 Required Physical Address Register (RPA) The RPA is shown in Figure 5-15. During a page table search operation, the software must load the RPA with the second word of the correct PTE. When the tlbld or tlbli instruction is executed, data from the !MISS and ICMP (or DMISS and DCMP) and the RPA registers is merged and loaded into the selected TLB entry. The TLB entry is selected by the effective address of the access (loaded by the table search software from the DMISS or !MISS register) and the SRR1[WAY] bit. III Reserved RPN o 19 20 22 23 24 25 28 29 30 31 Figure 5-15. Required Physical Address (RPA) Register Table 5-13 describes the bit settings of the RPA register. Table 5-13. RPA Bit Settings Bits Name Description 0-19 RPN Physical page number from PTE 20-22 - Reserved 23 R Referenced bit from PTE 24 C Changed bit from PTE 25-28 WIMG Memory/cache access attribute bits 29 - Reserved 30-31 PP Page protection bits from PTE 5.5.2.2 Software Table Search Operation When a TLB miss occurs, the instruction or data MMU loads the !MISS or DMISS register, respectively, with the effective address of the access. The processor completes all instructions dispatched prior to the exception, status information is saved in SRR1, and one of the three TLB miss exceptions is taken. In addition, the processor loads the ICMP or DCMP register with the value to be compared with the first word of PTEs in the tables in memory. 5-38 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA The software should then access the first PTE at the address pointed to by HASHI. The first word of the PTE should be loaded and compared to the contents of DCMP or ICMP. If there is a match, then the required PTE has been found and the second word of the PTE is loaded from memory into the RPA register. Then the tlbli or tlbld instruction is executed, which loads the contents of the ICMP (or DCMP) and RPA registers into the selected TLB entry. The TLB entry is selected by the effective address of the access and the SRR1 [WAY] bit. If the compare did not result in a match, however, the PTEG address is incremented to point to the next PTE in the table and the above sequence is repeated. If none of the eight PTEs in the primary PTEG matches, the sequence is then repeated using the secondary PTEG (at the address contained in HASH2). If the PTE is also not found in the eight entries of the secondary page table, a page fault condition exists, and a page fault exception must be synthesized. Thus the appropriate bits must be set in SRR1 (or DSISR) and the TLB miss handler must branch to either the lSI or DSI exception handler, which handles the page fault condition. This section provides a flow diagram outlining some example software that can be used to handle the three TLB miss exceptions, as well as some example assembly language that implements that flow. 5.5.2.2.1 Flow for Example Exception Handlers Figure 5-16 shows the flow for the example TLB miss exception handlers. The flow shown is common for the three exception handlers, except that the IMISS and ICMP registers are used for the instruction TLB miss exception while the DMISS and DCMP registers are used for the two data TLB miss exceptions. Also, for the cases of store instructions that cause either a TLB miss or require a table search operation to update the C bit, the flow shows that the C bit is set in both the TLB entry and the PTE in memory. Finally, in the case of a page fault (no PTE found in the table search operation), the setup for the lSI or DSI exception is slightly different for these two cases. Figure 5-17 shows the flow for checking the R and C bits and setting them appropriately, Figure 5-18 shows the flow for synthesizing a page fault exception when no PTE is found. Figure 5-19 shows the flow for managing the cases of a TLB miss on an instruction access to guarded memory, and a TLB miss when C =0 and a protection violation exists. The set up for these protection violation exceptions is very similar to that of page fault conditions (as shown in Figure 5-18) except that different bits in SRRI (and DSISR) are set. MOTOROLA Chapter 5. Memory Management 5-39 TLB Miss Exception Load primary PTEG pointer: ptr f- HASH1 - 8 compare_value f- ICMP/OCMP Read lower word of next PTE from memory: ptr f- ptr + 8 temp f- (ptr) temp =compare_value otherwise ~cnt'¢'O otherwise .........-----' compare_value Secondary hash ~otherwise complete T instruction access and Set up for page fault exception I temp[G] = 1 (See Figure 5- i 8) othelise ........ Set up for protection violation exception (See Figure 5-19) Check R, C bits and set as needed (See Figure 5-17) Figure 5-16. Flow for Example Software Table Search Operation 5-40 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Check R, C bits and set as needed handler for data store op y-temp[C]=~ otherwise Check pro- . - 10 tectlon pp - otherwise 11 ~ pp=OO pp=10 I 01 pp = 11 Set up for Return to TLB Miss protection violation Exception flow (See Figure 5-19) (See Figure 5-16) SRR1[KEY] = 1 otherwise Set up for protection violation (See Figure 5-19) Return to TLB Miss Exception flow (See Figure 5-16) Figure 5-17. Check and Set Rand C Bit Flow MOTOROLA Chapter 5. Memory Management 5-41 Set up for page fault exception Data TLB miss handlers Instruction TLB miss handlers DSISR[1] (- 1 dtemp (- DMISS SRR1[31] = 1 (little-endian mode) Branch to lSI exception Handler Branch to DSI exception Handler Figure 5-18. Page Fault Setup Flow 5-42 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Set up for protection violation exceptions Data TLB miss handlers Instruction TLB miss handler (Instruction access (Data access to guarded memory) to protected memory; C=O) SRR1[31] = 1 (Iittle-endian mode) Figure 5·19. Setup for Protection Violation Exceptions MOTOROLA Chapter 5. Memory Management 5-43 5.5.2.2.2 Code for Example Exception Handlers This section provides some assembly language examples that implement the flow diagrams described above. Note that although these routines fit into a few cache lines, they are supplied only as a functional example; they could be further optimized for faster performance. # TLB software load for 603e # # New Instructions: # tlbld - write the dtlb with the pte in rpa reg # tlbli - write the itlb with the pte in rpa reg #NewSPRs # dmiss - address of dstream miss # imiss - address of istream miss # hash I - address primary hash PTEG address # hash2 - returns secondary hash PTEG address # iCmp - returns the primary istream compare value # dCmp - returns the primary dstream compare value # rpa - the second word of pte used by tlblx # # gpr rO .. r3 are shadowed # # there are three flows. # tlbDataMiss- tlb miss on data load # tlbCeqO - tlb miss on data store or store with tlb change bit = 0 # tlbInstrMiss- tlb miss on instruction fetch #+ # place labels for reI branches #- #.machine PPC_603e .set rO,o .set rI, I .set r2,2 .set r3,3 .set dMiss,lOlO .set dCmp, lOll .set hashl,1012 .set hash2,I013 .set iMiss, 1014 .set iCmp, 1015 .set rpa,lOlO .set cO,O .set dar, 19 .set dsisr,I8 .set srrO,26 .set srrl,27 .csect tlbmiss[PR] vecO: .globl vecO 5-44 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA .org vecO+Ox300 vec300: .org vecO+Ox400 vec400: #+ # Instruction TB miss flow # Entry: # Vec = 1000 # srrO -> address of instruction that missed # srrl -> 0:3=crO 4=lru way bit 16:31 = saved MSR # msr -> 1 # iMiss -> ea that missed # iCmp -> the compare value for the va that missed # hashl -> pointer to first hash pteg # hash2 -> pointer to second hash pteg # # Register usage: # rO is saved counter # rl is junk # r2 is pointer to pteg # r3 is current compare value .org vecO+Oxl000 tlbInstrMiss: mfspr r2, hashl # get first pointer addi rl, 0, 8 # load 8 for counter mfctr rO # save counter mfspr r3, iCmp # get first compare value addi r2, r2,-8 # pre dec the pointer imO: mtctr rl # load counter iml: Iwzu rI, 8(r2) # get next pte cmp cO, rl, r3 # see if found pte bdneq im 1 # dec count br if cmp ne and if count not zero bne instrSecHash# if not found set up second hash or exit I r1, +4(r2) # load tlb entry lower-word andi. r3, rI, 8 # check G-bit bne doISIp # if guarded, take an lSI mtctr rO # restore counter mfspr rO, iMiss # get the miss address for the tlbli mfspr r3, srrl # get the saved crO bits mtcrf Ox80, r3 # restore CRO mtspr rpa, r 1 # set the pte ori rl, rl, Ox 100# set reference bit srw rl, rl, 8 # get byte 7 of pte tlbli rO # load the itlb stb rI, +6(r2) # update page table rfi # return to executing program #+ # Register usage: MOTOROLA Chapter 5. Memory Management 5-45 # rO is saved counter # rl isjunk # r2 is pointer to pteg # r3 is current compare value #- instrSecHash: andi. rI. r3, Ox0040# see if we have done second hash bne dolSI # if so, go to lSI exception mfspr r2, hash2 # get the second pointer ori r3, r3, Ox0040# change the compare value addi rI, 0, 8 # load 8 for counter addi r2, r2, -8 # pre dec for update on load b imO # try second hash #+ # entry Not Found: synthesize an lSI exception # guarded memory protection violation: synthesize an lSI exception # Entry: # rO is saved counter # rI is junk # r2 is pointer to pteg # r3 is current compare value # dolSIp: mfspr r3, srrl # get srrl andi. r2,r3,Oxffff # clean upper srr I addis r2, r2, Ox0800# or in srr<4> = I to flag prot violation b isil : dolSI: mfspr r3, srrl # get srrl andi. r2, r3, Oxffff# clean srrl addis r2, r2, Ox4000# or in srr 1<1> = I to nag pte not found mtctr rO # restore counter isil mtspr srrl,r2 # set srrl mfmsr rO # get msr xori rO, rO, Ox8000# flip the msr bit mtcn Ox80, r3 # restore CRO mtmsr rO # flip back to the native gprs b vec400 # go to instr. access exception # #+ # Data TLB miss flow # Entry: # Vee = 1100 # srrO -> address of instruction that caused data tlb miss # srrl -> 0:3=crO 4=lru way bit 5=1 if store 16:31 = saved MSR # msr -> 1 # dMiss -> ea that missed # dCmp -> the compare value for the va that missed # hash 1 -> pointer to first hash pteg 5-46 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA # hash2 -> pointer to second hash pteg # # Register usage: # rO is saved counter # rl isjunk # r2 is pointer to pteg # r3 is current compare value #- .csect tlbmiss[PR1 .org vecO+OxllOO tlbDataMiss: mfspr r2, hashl # get first pointer addi rl, 0,8 # load 8 for counter mfctr rO # save counter mfspr r3, dCmp # get first compare value addi r2, r2,-8 # pre dec the pointer dmO: mtctr rl # load counter dml: lwzu rl,8(r2) # get next pte cmp cO, rl, r3 # see if found pte bdneq dml # dec count br if cmp ne and if count not zero bne dataSecHash# if not found set up second hash or exit 1 rl, +4(r2) # load tlb entry lower-word mtctr rO # restore counter mfspr rO, dMiss # get the miss address for the tlbld mfspr r3, srrl # get the saved crO bits mtcrf Ox80, r3 # restore CRO mtspr rpa, rl # set the pte ori r 1, rl, Ox 100# set reference bit srw rl, rl, 8 # get byte 7 of pte tlb1d rO # load the dtlb stb r1, +6(r2) # update page table rfi # return to executing program #+ # Register usage: # rO is saved counter # rl is junk # r2 is pointer to pteg # r3 is current compare value #- dataSecHash: andi. r1, r3, Ox0040# see if we have done second hash bne doDSI # if so, go to DSI exception mfspr r2, hash2 # get the second pointer ori r3, r3, Ox004O# change the compare value addi rl, 0, 8 # load 8 for counter addi r2, r2,-8 # pre dec for update on load b dmO # try second hash # #+ MOTOROLA Chapter 5. Memory Management 5-47 # C=O in dtlb and dtlb miss on store flow # Entry: # Vec = 1200 # srrO -> address of store that caused the exception # srr1 -> O:3=crO 4=lru way bit 5=1 16:31 = saved MSR # msr -> I # dMiss -> ea that missed # dCmp -> the compare value for the va that missed # hash I -> pointer to first hash pteg # hash2 -> pointer to second hash pteg # # Register usage: # rO is saved counter # rl isjunk # r2 is pointer to pteg # r3 is current compare value #- .csect tlbmiss[PR] .org vecO+Oxl200 tlbCeqO: mfspr r2, hashl # get first pointer addi rI, 0, 8 # load 8 for counter mfctr rO # save counter mfspr r3,dCmp # get first compare value addi r2, r2,-8 # pre dec the pointer ceqO: mtctr rl # load counter ceq1: Iwzu rl,8(r2) # get next pte cmp cO, rl, r3 # see iffound pte bdneq ceq I # dec count br if cmp ne and if count not zero bne cEqOSecHash# if not found set up second hash or exit rl, +4(r2) # load tlb entry lower-word andi. r3,r1,Ox80 # check the C-bit beq cEqOChkProt# if (C==O) go check protection modes ceq2: mtctr rO # restore counter mfspr rO, dMiss # get the miss address for the tlbld mfspr r3, srrl # get the saved crO bits mtcrf Ox80, r3 # restore CRO mtspr rpa, rI # set the pte tlbld rO # load the dtlb rfi # return to executing program #+ # Register usage: # rO is saved counter # rl isjunk # r2 is pointer to pteg # r3 is current compare value #- cEqOSecHash: andi. r1, r3, Ox0040# see if we have done second hash 5-48 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA bne doDSI # if so, go to DSI exception mfspr r2, hash2 # get the second pointer ori r3, r3, OxOO40# change the compare value addi rl, 0,8 # load 8 for counter addi r2, r2, -8 # pre dec for update on load b ceqO # try second hash #+ # entry found and PTE(c-bit==O): # (check protection before setting PTE(c-bit) # Register usage: # rO is saved counter # rl is PTE entry # r2 is pointer to pteg # r3 is trashed #- cEqOChkProt: rlwinm. r3,rl,30,0,1 # test PP bge- chkO # if (PP==OO or PP=Ol) goto chkO: andi. r3,rl,l # test PP[O] beq+ chk2 # return if PP[O]==O b doDSIp # else DSIp chkO: rnfspr r3,srrl # get old msr andis. r3,r3,OxOO08# test the KEY bit (SRRO-bit 12) beq chk2 # if (KEY==O) goto chk2: b doDSIp # else DSIp chk2: ori rl, rl, Ox I 80# set reference and change bit sth rl, -2(r2) # update page table b ceq2 # and back we go # #+ # entry Not Found: synthesize a DSI exception # Entry: # rO is saved counter # rl is junk # r2 is pointer to pteg # r3 is current compare value # doDSI: rnfspr r3, srrl # get srrl rlwinm rl, r3, 9,6,6# get srrl to bit 6 for load/store, zero rest addis rl, rl, Ox4000# or in dsisr = 1 to flag pte not found b dsi1: doDSIp: mfspr r3, srr 1 # get srrl rlwinm rl, r3, 9,6,6# get srrl to bit 6 for load/store, zero rest addis rl, rl, Ox0800# or in dsisr<4> = 1 to flag prot violation dsil: mtctr rO # restore counter andi. r2, r3, Oxffff# clear upper bits of srrl mtspr srrl, r2 # set srrl mtspr dsisr, rl # load the dsisr MOTOROLA Chapter 5. Memory Management 5-49 mfspr rl, dMiss # get miss address rlwinm. r2,r2,O,3l ,31# test LE bit bne dsi2: # if little endian then: xor rl,rl,Ox07 # de-mung the data address dsi2: mtspr dar, rl # put in dar mfmsr rO # get msr xoris rO, rO, Ox2 # flip the msr bit mtcrf Ox80, r3 # restore eRO mtmsr rO # flip back to the native gprs b vec300 # branch to DSI exception 5.5.3 Page Table Updates When TLBs are implemented (as in the 603e) they are defined as noncoherent caches ofthe page tables. TLB entries must be flushed explicitly with the TLB invalidate entry instruction (tlhie) whenever the corresponding PTE is modified. Since the 603e is intended primarily for uniprocessor environments, it does not provide coherency of TLBs between multiple processors. If the 603e is used in a multiprocessor environment where TLB coherency is required, all synchronization must be implemented in software. Processors may write referenced and changed bits with unsynchronized, atomic byte store operations. Note that the V, R, and C bits each resides in a distinct byte of a PTE. Therefore, extreme care must be taken to use byte writes when updating only one of these bits. Explicitly altering certain MSR bits (using the mtmsr instruction), or explicitly altering PTEs, or certain system registers, may have the side effect of changing the effective or physical addresses from which the current instruction stream is being fetched. This kind of side effect is defined as an implicit branch. Implicit branches are not supported and an attempt to perform one causes boundedly-undefined results. Therefore, PTEs must not be changed in a manner that causes an implicit branch. Chapter 2, "PowerPC Register Set," in The Programming Environments Manual, lists the possible implicit branch conditions that can occur when system registers and MSR bits are changed. 5.5.4 Segment Register Updates There are certain synchronization requirements for using the move to segment register instructions. These are described in "Synchronization Requirements for Special Registers and for Lookaside Buffers" in Chapter 2, "PowerPC Register Set," in The Programming Environments Manual. 5-50 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Chapter 6 Instruction Timing This chapter describes instruction prefetch and execution through all of the execution units of the PowerPC 603e microprocessor. It also provides examples of instruction sequences showing concurrent execution and various register dependencies to illustrate timing interactions. Bus signals described in this chapter are only accurate to within half clock cycle increments. See Chapter 8, "System Interface Operation," for more specific information regarding bus operation timing. Instruction mnemonics used in this chapter can be identified by referring to Chapter 8, "Instruction Set," in The Programming Environments Manual. 6.1 Terminology and Conventions This section describes terminology and conventions used in this chapter. • Branch prediction-The process of guessing whether a branch will be taken. Such predictions can be correct or incorrect; the term predicted as it is used here does not imply that the prediction is correct (successful). The PowerPC architecture defines a means for static branch prediction, which is part of the instruction encoding. • Branch resolution-The determination of whether a branch is taken or not taken. A branch is said to be resolved when it can exactly be determined which path it will take. If the branch is resolved as predicted, the instructions following the predicted branch can be completed. If the branch is not resolved as predicted, instructions on the mispredicted path are purged from the instruction pipeline and are replaced with the instructions from the nonpredicted path. • Completion---Completion occurs when an instruction is removed from the completion buffer. When an instruction completes we can be sure that this instruction and all previous instructions will cause no exceptions. In some situations, an instruction can finish and complete in the same cycle. • Finish-The term indicates the final cycle of execution. In this cycle, the completion buffer is updated to indicate that the instruction has finished executing. • Latency-The number of clock cycles necessary to execute an instruction and make ready the results of that execution for a subsequent instruction. MOTOROLA Chapter 6. Instruction Timing 6-1 • Pipeline-In the context of instruction timing, the term pipeline refers to the interconnection of the stages. The events necessary to process an instruction are broken into several cycle-length tasks to allow work to be performed on several instructions simultaneously-analogous to an assembly line. As an instruction is processed, it passes from one stage to the next. When it does, the stage becomes available for the next instruction. Although an individual instruction may take many cycles to complete (the number of cycles is called instruction latency), pipelining makes it possible to overlap the processing so that the throughput (number of instructions completed per cycle) is greater than if pipelining were not implemented. • Program order-The original order in which program instructions are provided to the instruction queue from the cache. • Rename buffer-Temporary buffers used by instructions that have not completed and as write-back buffers for those that have. • Reservation station-A buffer between the dispatch and execute stages that allows instructions to be dispatched even though the operands required for execution may not yet be available. • Stage-An element in the pipeline at which certain actions are performed, such as decoding the instruction, performing an arithmetic operation, and writing back the results. A stage typically takes a cycle to perform its operation; however, some stages are repeated (a double-precision floating-point multiply, for example). When this occurs, an instruction immediately following it in the pipeline is forced to stall in its cycle. In some cases, an instruction may also occupy more than one stage simultaneously-for example, instructions may complete and write back their results in the same cycle. After an instruction is fetched, it can always be defined as being in one or more stages. • Stall-An occurrence when an instruction cannot proceed to the next stage. • Superscalar-A superscalar processor is one that can issue multiple instructions concurrently from a conventional linear instruction stream. In a superscalar implementation, multiple instructions can be in the same stage at the same time. Throughput-A measure of the number of instructions that are processed per cycle. For example, a series of double-precision floating-point multiply instructions has a throughput of one instruction per clock cycle. • Write-back-Write-back (in the context of instruction handling) occurs when a result is written from the rename registers into the architectural registers (typically the GPRs and FPRs). Results are written back at completion time or are moved into the write-back buffer. Results in the write-back buffer cannot be flushed. If an exception occurs, these buffers must write back before the exception is taken. 6-2 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 6.2 Instruction Timing Overview The 603e has been designed to minimize average instruction execution latency. Latency is defined as the number of clock cycles necessary to execute an instruction and make ready the results of that execution for a subsequent instruction. For many of the instructions in the 603e, this can be simplified to include only the execute phase for a particular instruction. However, data access instructions require additional clock cycles between the execute phase and the write-back phase due to memory latencies. In accordance with this definition, logical, bit-field, and most integer instructions have a latency of one clock cycle (for example, results for these instructions are ready for use on the next clock cycle after issue). Other instructions, such as the integer multiply, require more than one clock cycle to complete execution. Effective throughput of more than one instruction per clock cycle can be realized by the many performance features in the 603e including pipelining, superscalar instruction issue, branch acceleration, and multiple execution units that operate independently and in parallel. The load/store and floating-point units on the 603e are pipelined, which means that the execution units are broken into stages. Each stage performs a specific step, which contributes to the overall execution of an instruction. The pipelined design is analogous to an assembly line where workers perform a specific task and pass the partially complete product to the next worker. (Note: The EC603e microprocessor does not support the floating-point unit.) When an instruction is issued to a pipelined execution unit, the first stage in the pipeline begins its designated work on that instruction. As an instruction is passed from one stage in the pipeline to the next, evacuated stages may accept new instructions. This design allows a single execution unit to be working on several different instructions simultaneously. While it may take several cycles for a given instruction to propagate through the execution pipeline, once the pipeline has been filled with instructions the execution unit is capable of completing an instruction every clock. Figure 6-1 shows a graphical representation of a generic pipelined execution unit. MOTOROLA Chapter 6. Instruction Timing 6-3 CLOCK 0 I(STAGE 1) A II (STAGE 2) II (STAGE 3) CLOCK 1 I(STAGE 1) {1r§GE 2) A II (STAGE 3) CLOCK 2 I(STAGE 1) @ G E 2) Bfc§GE 3) A I CLOCK 3 I(STAGE 1) Dfc§GE 2) Cfc§GE 3) B I Figure 6-1. Pipelined Execution Unit If the number of stages in each pipeline is equal to the total latency in clock cycles of its respective execution unit, the processor can continuously issue instructions to the same execution unit without stalling. Thus, when enough instructions have been issued to an execution unit to fill its pipeline, the first instruction will have completed execution and exited the pipeline, allowing subsequent instructions to be issued into the tail of the pipeline without interruption. The 603e's completion buffer is capable of retiring two instructions on every clock cycle. In general, instruction processing is accomplished in four stages described as follows: • The fetch pipeline stage primarily involves retrieving instructions from the memory system and determining the location of the next instruction fetch. Additionally, the BPU decodes branches during the fetch stage and folds out branch instructions before the dispatch stage if possibie. The instruction fetch stage includes the clock cycles necessary to request instructions from the on-chip cache as well as the time it takes the on-cl-jp cache to respond to that request. • The decode/dispatch pipeline stage is responsible for decoding the instructions supplied by the instruction fetch stage, and determining which of the instructions are eligible to be dispatched in the current cycle. In addition, the source operands of the instructions are read from the appropriate register file and dispatched with the instruction to the execute pipeline stage. At the end of the dispatch pipeline stage, the dispatched instructions and their operands are latched by the appropriate execution unit. • During the execute pipeline stage each execution unit that has an executable instruction executes the selected instruction (perhaps over multiple cycles), writes the instruction's result into the appropriate rename register, and notifies the completion stage that the instruction has finished execution. In the case of an internal exception, the execution unit reports the exception to the completionlwriteback pipeline stage and discontinues instruction execution until the exception is handled. The exception is not signaled until that instruction is the next to be completed. Execution of most fioating-point instructions is pipelined within the FPU allowing up to three instructions to be executing in the FPU concurrently. The pipeline stages 6-4 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA for the floating-point unit are multiply, add, and round-convert. Execution of most load/store instructions is also pipelined. The load/store unit has two pipeline stages. The first stage is for effective address calculation and MMU translation and the second stage is for accessing the data in the cache. • The complete/writeback pipeline stage maintains the correct architectural machine state and transfers the contents of the rename registers to the GPRs and FPRs as instructions are retired. If the completion logic detects an instruction causing an exception, all following instructions are canceled, their execution results in rename registers are discarded, and instructions are fetched from the correct instruction stream. More information regarding these operations are provided in the following paragraphs. 6.3 Timing Considerations A superscalar processor is one that issues multiple independent instructions into multiple pipelines allowing instructions to execute in parallel. The 603e has five independent execution units (four execution units on the EC603e microprocessor), one each for integer instructions, floating-point instructions (not supported on the EC603e microprocessor), branch instructions, load/store instructions, and system register instructions. The IU and the FPU each have dedicated register files for maintaining operands (GPRs and FPRs, respectively), allowing integer calculations and floating-point calculations to occur simultaneously without interference. Integer division performance of the PID7v-603e has been improved, with the divwux and divwx instructions executing in 20 clock cycles, instead of the 37 cycles required in the PID6-603e. Note: The FPU is not supported on the EC603e microprocessor; therefore, floating-point instructions are trapped by the floating-point unavailable exception and can be emulated in software. The 603e is a true superscalar implementation of the PowerPC architecture since a maximum of three instructions can be issued to the execution units (one branch instruction to the branch processing unit, and two instructions issued from the dispatch queue to the other execution units) during each clock cycle. Although a superscalar implementation complicates instruction timing, these complications are transparent to the software. While the 603e appears to the programmer to execute instructions in sequential order, the 603e provides increased performance by executing multiple instructions at a time, and using hardware to manage dependencies. The 603e provides support for single-cycle store and it provides an adder/comparator in the system register unit that allows the dispatch and execution of multiple integer add and compare instructions on each cycle. When an instruction is issued, the register file places the appropriate source data on the appropriate source bus. The corresponding execution unit then reads the data from the bus. MOTOROLA Chapter 6. Instruction Timing 6-5 The register files and source buses have sufficient bandwidth to allow the dispatching of two instructions per clock. The 603e contains the following execution units that operate independently and in parallel: • Branch processing unit (BPU) • 32-bit integer unit (IV) • 64-bit floating-point unit (FPU) (not supported on the EC603e microprocessor) • Load/store unit (LSU) • System register unit (SRU) The 603e's branch processing unit decodes and executes branches immediately after they are fetched. The resources of the branch unit include-a count register (CTR) rename register for mtspr(CTR), a link register (LR) rename register for mtspr(LR), a link register (LR) rename register for branches specifying an update of the link register, and a branch reservation station for conditional branches that cannot be resolved due to a CR-data dependency. When a conditional branch cannot be resolved due to a CR-data dependency, the branch direction is predicted and execution commences down the predicted path. If the branch resolves as incorrectly guessed, then: 1. the instruction buffer is purged and fetching of the correct path commences, 2. any instructions executed prior to the predicted branch in the completion buffer are allowed to "complete", 3. all inst..··uctions executed subsequent to the mispredicted branch are purged from the machine, and 4) dispatching down the correct path commences. When the IV, SRU, or FPU (not supported on the EC603e microprocessor) finishes executing an instruction, it places the resulting data, if any, into one of the general-purpose register (GPR) or floating-point register (FPR) rename registers. The results are then stored into the correct GPR during the write-back stage. If a subsequent instruction is waiting for this data, it is forwarded past the register file, directly into the appropriate execution unit for the immediate execution of the waiting instruction. This allows a data-dependent instruction to be decoded without waiting for the data to be written into the register file and then read back out again. This feature, known as feed forwarding, significantly shortens the time the machine may stall on data dependencies. 6.3.1 General Instruction Flow Instructions are fetched from the instruction cache at a peak rate of two per cycle, and placed in either the instruction queue (IQ) or the BPU. Instructions enter the IQ and are issued to the various execution units from the dispatch queue. The IQ is a six-entry queue, which is the backbone of the master pipeline for the microprocessor. The 603e tries to keep the IQ full at all times. Although two instructions can be brought in from the on-chip cache in a single clock cycle, if there is a one-instruction vacancy in the IQ, one instruction will 6-6 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA be fetched from the cache to fill it. If while topping off the IQ, the request for new instructions misses in the on-chip cache, then arbitration for a memory access will begin. Instructions enter the IQ through entry 5 and filter down to be issued from queue entry I or o. The fetch bus between the IQ and the on-chip cache is wide enough for two instructions to be brought into the IQ simultaneously, which matches the dispatcher's ability to issue two instructions per cycle. Branch instructions are identified by the fetcher, and forwarded to the BPU directly, bypassing the dispatch queue. The branch is either executed and resolved (if the branch is unconditional or if required conditions are available), or is predicted. Once a branch instruction has been executed, it may need to update a special-purpose register. In that case, the branch instruction will do its write back sometime after the decode/execute phase. If no write back is needed, the branch instruction is retired. All other instructions are issued from the dispatch queue, with dispatch rate contingent on execution unit busy status, rename and completion buffer availability, and the serializing behavior of some instructions. Instruction dispatch is done in program order, and if the instruction in queue entry 0 is unable to be dispatched, it will inhibit the instruction in queue entry 1 from being issued. MOTOROLA Chapter 6. Instruction Timing 6-7 Figure 6-2 reflects the organization of the 603e, and the paths taken by instructions issued from the instruction queue and how those instructions progress through the various execution units. Fetch Branch Processing Unit o liiililfjBmfi Instruction Queue .!fSII!Iili~a (In Program Order) r------------------- Dispatch : Completion Buffer : Assignment ,, ,, , ,,, , IU Store Queue ,----------- • •~.~• •Iiii~.=t~i.I~. Completion Queue (In Program Order) Note: The EC603e microprocessor does not support the floating-point unit. Figure 6-2_ Instruction Flow Diagram 6-8 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 6.3.2 Instruction Fetch Timing The timing of the instruction fetch mechanism on the 603e depends heavily on the state of the on-chip cache. The speed with which the required instruction is returned to the fetcher depends on whether the instruction being asked for is in the on-chip cache (cache hit) or whether a memory transaction is required to bring the data into the cache (cache miss). These issues are discussed further in the following sections. 6.3.2.1 Cache Arbitration When the instruction fetcher attempts to fetch instructions from the on-chip cache, the cache mayor may not be able to immediately respond to the request. There are two scenarios that may be encountered by the instruction fetcher when it requests instructions from the on-chip cache. The first scenario is when the on-chip cache is idle and a request comes in from the instruction fetcher for additional instructions. In this case, the on-chip cache responds with the requested instructions on the next clock cycle. The second scenario occurs if at the time the instruction fetcher requests instructions, the on-chip cache is busy due to a cache-line-reload operation. When this case arises, the on- chip cache will be inaccessible until the reload operation is complete. 6.3.2.2 Cache Hit Assuming that the instruction fetcher is not blocked from the cache by a cache-reload operation and the instructions it needs are in the on-chip cache (a cache hit has occurred), there will be only one clock cycle between the time that the instruction fetcher requests the instructions and the time that the instructions enter the IQ. As previously stated, two instructions can be simultaneously fetched from the on-chip cache and loaded into the IQ. Figure 6-3 shows a brief example of instruction fetching that hits in the on-chip cache. In this example, two instructions are fetched into the IQ during clock cycle O. During clock cycle 1, instructions 0 and 1 are dispatched to the integer and floating-point execution units. During clock cycle 2, a branch instruction is fetched into the branch processing unit. The BPU is immediately able to determine that the branch will indeed change program flow and sends a request to the on-chip cache for the new instruction stream. During clock cycle 4, the new instructions arrive in the IQ. In clock cycle 5, one integer instruction is dispatched to the integer unit, and the following instruction (also an integer instruction) is blocked from dispatch until clock cycle 6. Instructions fetched in clock cycle 5 are held in the IQ until the dispatch queue is cleared on the next cycle. As the IQ is emptied into the individual execution units, additional instructions will be requested from the on-chip cache. MOTOROLA Chapter 6. Instruction Timing 6-9 o 2 3 4 5 6 7 8 9 I 4 br i5 fadd 1tJ&1i!lrj i6 fadd i 17faddl c=J Fetch Iflf:~~. Dispatch !8 add ~,'t2l1;. -- mnnm Held in IQ I 9 add Ii1P!lfMt~~jl Execute i10 add ~lIIllIIili;~IMl Write back 111 fSUb~lIlIIlII~i1ljllJi ~ Deallocate Figure 6-3. Instruction Timing-Cache Hit 6.3.2.3 Cache Miss Figure 6-4 shows a brief example of an instruction fetch that misses in the on-chip cache and how that fetch affects the instruction issue. Note that the processorlbus clock ratio is 1: 1 in this exainple. In this example, two instructions are fetched into the IQ during clock cycle O. During clock cycle I, instructions 0 and 1 are dispatched to the integer and floating-point execution units. During clock cycle 2, a branch instruction is fetched into the branch processing unit. The BPU is immediately able to determine that the branch will indeed change program flow and sends a request to the on-chip cache for the new instruction stream. 6-10 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA o 2 3 4 5 6 7 8 9 10 11 AD~RESS HL_~_---,.lf------';-- . . . e e e: : DATA: -~----<-< --- i 2 add Ii , --- 13 fadd Ie;> " ~ " ~,'; ~ :1 d~' ~ ~' , == , - - - I 4 br c:=J Fetch -- ~ Deallocate Dispatch Execute Write back 8 fsub I; ·1 Figure 6-4. Instruction Timing-Cache Miss During clock cycle 3, the on-chip cache misses the access and determines that a memory access will have to occur. During clock cycle 5, the address of the block of instructions is applied to the system bus. During clock cycle 7, two instructions (64 bits) are returned from memory, and are forwarded to the cache and the instruction fetcher. In subsequent clock cycles, one integer and one floating-point instruction is dispatched to their respective execution units. Instructions are forwarded to the instruction fetcher and the cache until the cache line reload is completed in cycle 10. 6.3.3 Instruction Dispatch and Completion Considerations Several factors affect the 603e's ability to dispatch instructions at a peak rate of two per cycle. These factors include execution unit availability, destination rename register availability, completion buffer availability, and the handling of dispatch-serialized instructions. To avoid dispatch unit stalls due to instruction data dependencies, the 603e provides a reservation station for each execution unit. If a data dependency exists that may preclude an instruction from beginning execution, that instruction will be dispatched to the reservation station associated with its execution unit, thereby clearing the dispatch unit. When the data that the operation depends upon is returned via a cache access or as a result of a previous operation, execution will begin during the same clock cycle that the register MOTOROLA Chapter 6. Instruction Timing 6-11 file is being updated. If the second instruction in the dispatch unit requires the same execution unit, dispatch of that instruction will stall until the first instruction completes execution. The completion unit provides a mechanism to track instructions from dispatch through execution, and then retire or "complete" them in program order. Completing an instruction implies the commitment of the results of instruction execution to the architected registers. In-order completion ensures the correct architectural state when the 603e must recover from a mispredicted branch, or any other exception or interrupt. (Note that the term exception is referred to as interrupt in the architecture specification.) Instruction state and all information required for completion is kept in a first-in, first-out queue of five completion buffers. A single completion buffer is allocated for each instruction once it is dispatched by the dispatch unit. A completion buffer is a required resource for dispatch; if there are no completion buffers available, the dispatch unit will stall. While a maximum of two instructions per cycle may be completed and retired in program order from the completion unit, instruction completion can be stalled by the instruction reaching the last position in the completion queue while the instruction is still being executed. Store instructions, and instructions executed by the FPU (not supported by the EC603e microprocessor) and SRU (with the exception of integer add and compare instructions) can only be retired from the last position in the completion queue. The rate of instruction completion is also affected by the 603e's ability to write the instruction results from the rename registers to the architected registers when the instruction is retired. The 603e can perform two write-back operations from the rename registers to the GPRs each clock cycle, but can perform only one write back per cycle to the CR, FPR (not supported on the EC603e microprocessor), LR, and CTR. Due to the 603e's out-of-order execution capability, the in-order completion of instructions by the completion unit provides a precise exception mechanism. All program-related exceptions are signaled when the instruction causing the exception has reached the last position in the completion buffer. All prior instructions are allowed to complete before the exception is taken. 6.3.3.1 Rename Register Operation To avoid contention for a given register file location in the course of out-of-order execution, the 603e provides rename registers for the storage of instruction results prior to their commitment to the architected register by the completion unit. Five rename registers are provided for the GPRs, four for the FPRs (not supported on the EC603e microprocessor), and one each for the condition register, the link register and the count register. When the dispatch unit dispatches an instruction to its execution unit, it allocates a rename register for the results of that instruction. If an instruction is dispatched to a reservation station associated with an execution unit due to a data dependency, the dispatcher will also provide a tag to the execution unit identifying which rename register will forward the 6-12 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA required data upon instruction completion. When the data is available in the rename register, the pending execution may begin. Instruction results are transferred from the rename registers to the architected registers by the completion unit when an instruction is retired from the completion queue without exceptions and after any predicted branch conditions preceding it in the completion queue have been resolved correctly. If a predicted branch is found to have been incorrectly predicted, the instructions following the branch will be flushed from the completion queue, and the results of those instructions will be flushed from the rename registers. 6.3.3.2 Instruction Serialization While the 603e is capable of dispatching and completing two instructions per cycle, there is a class of instructions referred to as serializing instructions that limit dispatch and completion to one instruction per cycle. The type of serialization caused by these instructions fall into three categories-completion, dispatch, and refetch serialization. Completion serialized instructions are held in the execution unit until all prior instructions in the completion unit have been retired. Completion serialization is used for instructions that access or modify nonrenamed resources. Results from these instructions will not be available or forwarded for subsequent instructions until the serializing instruction is retired from the completion unit. Instructions that are completion serialized are as follows: • Instructions (with the exception of integer add and compare instructions) executed by the system register unit • Floating-point instructions that access or modify the FPSCR (not supported on the EC603e microprocessor) or CR (mtfsbl, mcrfs, mtfsfi, mffs, and mtfsf) • Instructions that manage caches and TLBs • Instructions that directly access the GPRs (load and store mUltiple word and load and store string instructions) • Instructions defined by the architecture to have synchronizing behavior A subset of the completion serialized instructions are dispatch serialized. Dispatch serialized instructions inhibit the dispatching of subsequent instructions until the serializing instruction is retired from the completion unit. Dispatch serialization is used for instructions that access renamed resources used by the dispatcher, and for instructions requiring refetch serialization, including: • The load multiple instructions, lmw, lswi, and Iswx • The mtspr(XER) and mcrxr instructions • The synchronizing instructions, sync, isync, mtmsr, rfi, and sc A subset of the dispatch serialized instructions are also refetch serialized. Refetch serialized instructions inhibit dispatching of subsequent instructions and force the refetching of subsequent instructions after the serializing instructions are retired from the completion unit. The context synchronizing instruction, isync, is a refetch serializing instruction. MOTOROLA Chapter 6. Instruction Timing 6-13 6.3.3.3 Execution Unit Considerations As previously noted, the 603e is capable of dispatching and retiring two instructions per clock cycle. One of the factors affecting the peak dispatch rate is the availability of execution units on each clock cycle. For an instruction to be issued, the required execution unit must be available.· The dispatcher monitors the availability of all execution units and suspends instruction dispatch if the required execution unit is not available. An execution unit may not be available if it can accept and execute only one instruction per cycle, or if an execution unit's pipeline becomes full. This situation may occur if instruction execution takes more clock cycles than the number of pipeline stages in the unit, and additional instructions are issued to that unit to fill the remaining pipeline stages. 6.4 Execution Unit Timings The following sections describe instruction timing considerations within each of the respective execution units in the 603e. Refer to Table 6-1 for branch instruction execution timing. 6.4.1 Branch Processing Unit Execution Timing Flow control operations (conditional branches, unconditional branches, and traps) are typically expensive to execute in most machines because they disrupt normal flow in the instruction stream. When a change in program flow occurs, the IQ must be reloaded with the target instruction stream. During this time the execution units will be idle. However, previously issued instructions will continue to execute wl>,ile the new instruction strea.-n makes its way into the IQ. Performance features such as branch folding and static branch prediction help minimize the penalties associated with flow control operations on the 603e. The timing for branch instruction execution is determined by many factors including the following: • Whether the branch is taken • Whether the target instruction stream is in the on-chip cache • Whether the branch is predicted • Whether the prediction is correct 6.4.1.1 Branch Folding When a branch instruction is encountered by the fetcher, the BPU immediately tries to pull that instruction out of the instruction stream and resolve it. When the BPU pulls the branch instruction out of the instruction stream, the instruction above the branch is shifted down to take the place of the removed branch. The technique of removing the branch instruction from the instruction sequence seen by the other execution units, is known as branch folding. 6-14 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Often, branch folding reduces the penalties of flow control instructions to zero since instruction execution proceeds as though the branch was never there. If the folded branch instruction changes program flow (the branch is said to be "taken" in this case), the BPU immediately requests the instructions at the new target from the on-chip cache. In most cases, the new instructions arrive in the IQ before any bubbles are introduced into the execution units. If the folded branch does not change program flow (the branch is said to be "not taken" in this case), the branch is already removed from the instruction stream and execution continues as if there were never a branch in the original sequence. When a conditional branch cannot be resolved due to a CR data dependency, the branch is executed by means of static branch prediction, and instruction fetching proceeds down the predicted path. If the branch prediction was incorrect when the branch is resolved, the instruction queue and all subsequently executed instructions are purged, instructions executed prior to the predicted branch are allowed to complete, and instruction fetching resumes down the correct path. There are several situations where instruction sequences create dependencies that prevent a branch instruction from being resolved immediately, thereby causing execution of the subsequent instruction stream based on the predicted outcome of the branch instruction. The instruction sequences, and the resulting action of the branch instruction is described as follows: • An mtspr(LK) followed by a belr-Fetching is stopped, and the branch waits for the mtspr to execute. • An mtspr(CTR) followed by a bcctr-Fetching is stopped, and the branch waits for the mtspr to execute. • An mtspr(CTR) followed by a bc(CTR)-Fetching is stopped, and the branch waits for the mtspr to execute. • A bc(CTR) followed by another bc(CTR)-Fetching is stopped, and the second branch waits for the first branch to be completed. • A bc(CTR) followed by a bcctr-Fetching is stopped, and the bcctr waits for the first branch to be completed. • A branch(LK = 1) followed by a branch(LK = I)-Fetching is stopped, and the second branch waits for the first branch to be completed. (Note: a bl instruction does not have to wait for a branch(LK = 1) to complete.) • A bc(based-on-CR) waiting for resolution due to a CR-dependency followed by a bc(based-on-CR)-Fetching is stopped and the second branch waits for the first CR- dependency to be resolved. (Note: branch conditions can be a function of the CTR and the CR; if the CTR condition is sufficient to resolve the branch, then a CR- dependency is ignored.) MOTOROLA Chapter 6. Instruction Timing 6-15 6.4.1.2 Static Branch Prediction Static branch prediction is a mechanism by which software (for example, compilers) can give a hint to the machine hardware about the direction the branch is likely to take. When a branch instruction encounters a data dependency, the BPU waits for the required condition code to become available. Rather than stalling instruction issue until the source operand is ready, the 603e predicts which path the branch instruction is likely to take, and instructions are fetched and executed along that path. When the branch operand becomes available, the branch is evaluated. If the predicted path was correct, program flow continues along that path uninterrupted; otherwise, the processor backs up, and program flow resumes along the correct path. There is a scenario where a flow control instruction will not be predicted on the 603e. If the target address of the branch (link or count register) will be modified by an instruction that appears before the branch instruction, the BPU must wait until the target address is available. The 603e executes through one level of prediction. The microprocessor may not predict a branch if a prior branch instruction is still unresolved. The number of instructions that can be executed after the issue of a predicted branch instruction is limited by the fact that no instruction executed after a predicted branch may actually update the register files or memory until the branch is completed. That is, instructions may be issued and executed, but may not reach the write-back stage in the completion unit. When an instruction following a predicted branch has completed execution, it will not be moved into the write-back stage, instead, it will simply stall in the last stage of the completion unit. This means that the completion queue may become full, which will limit the number of additional instructions that may be issued subsequent to an unresolved predicted bra..'lch. In the case of a misprediction, the 603e is able to redirect its machine state rather painlessly because the programing model has not been updated. When a branch is found to be mispredicted, all instructions that were issued subsequent to the predicted branch instruction are simply flushed from the completion queue, and their results flushed from the rename registers. No architected register state needs to be restored because no architected register state was modified by the instructions following the unresolved predicted branch. 6.4.1.2.1 Predicted Branch Timing Examples Figure 6-5 depicts the cases where branch instructions are predicted, and shows both "taken" and "not taken" branch outcomes. During clock cycle 0, two instructions are dispatched to their respective execution units. Notice that the BPU has a combined decode/execute stage, thus the branch (instruction 1) is predicted not to be taken during clock cycle I because its source register (condition register) is not available. During clock cycle 2, instructions 0 and 2 progress through their pipelines. In addition, the branch (instruction 1) remains predicted. Notice that the next branch instruction (instruction 5) is not able to begin its decode/execute phase while instruction 1 is predicted. 6-16 MPC603e & EC603e RiSe Microprocessors User's Manual MOTOROLA During clock cycle 3, instruction 0 begins its write-back stage. The write back of instruction o resolves the data dependency for the first branch (instruction 1); thus the first branch becomes resolved and it is determined that the prediction was correct. Recall that only one branch may be predicted at a time; thus, when instruction I is resolved the BPU is free to predict instruction 5. During clock 4, the second branch instruction remains predicted while additional instructions move through the various pipelines. During clock cycle 5, the BPU realizes that the prediction made for instruction 5 was incorrect. Note that since instruction 6 was issued and executed conditionally, it never performed its write back. As a result of the misprediction, all instructions that followed the branch in the instruction stream must be flushed from the respective execution unit pipelines. Notice that instructions 6 and 7 do not continue execution since it has been determined that these instructions should have never been issued in the first place. Since the branch has been resolved, a request is sent to the on-chip cache for the new instruction stream (based on the execution of instruction 5). During clock 6, the new set of instructions are in the IQ and the appropriate dispatching begins on clock cycle 7. o 2 3 4 5 6 7 8 9 10 :e e e: i 0 add I 2 fadd !< 3 add II !4 fadd ! ! 6 add t 17 fadd C=::J Fetch 8 and F/oO Dispatch 9 fsub I 00 .00 I _ Predicted _ Execute _ Writeback eee ~ Deallocate Figure 6-5. Branch Instruction Timing MOTOROLA Chapter 6. Instruction Timing 6-17 6.4.2 Integer Unit Execution Timing The integer unit executes all integer and bit-field instructions. Many of these instructions execute in a single clock cycle. The integer unit has one execute phase in its pipeline, thus when a multicycle integer instruction is being executed, no other integer instructions may begin an execute phase. Refer to Table 6-4 for integer instruction execution timing. 6.4.3 Floating-Point Unit Execution Timing The floating-point unit on the 603e (not supported on the EC603e microprocessor) executes all floating-point instructions. Execution of most floating-point instructions is pipelined within the FPU, allowing up to three instructions to be executing in the FPU concurrently. While most floating-point instructions execute with three- or four-cycle latency, and one- or two-cycle throughput, three instructions (fdivs, fdiv, and fres) execute with latencies of 18 to 33 cycles. The fdivs, fdiv, fres, mtfsbO, mtfsbl, mtfsfi, mffs, and mtfsfinstructions block the floating-point unit pipeline until they complete execution, and thereby inhibit the dispatch of additional floating-point instructions. With the exception of the mcrfs instruction, all floating-point instructions will immediately forward their CR results to the BPU for fast branch resolution without waiting for the instruction to be retired by the completion unit, and the CR updated. Refer to Table 6-5 for floating-point instruction execution timing. 6.4.4 Load/Store Unit Execution Timing The execution of most load and store instructions is pipelined. The LSU has two pipeline stages; the first stage is for effective address calculation and MMU translation, and the second stage is for accessing the data in the cache. Load and store instructions have a two- cycle latency and one-cycle throughput. Load instructions that miss in the cache block subsequent accesses to the cache \vhile the cache line refill is in process. Refer to Table 6-6 for load and store instruction execution timing. 6.4.5 System Register Unit Execution Timing The majority of the instructions executed by the SRU access or modify nonrenamed registers, or directly access renamed registers, and generally execute in a serial manner. Results from these instructions will not be available or forwarded for use by subsequent instructions until the instruction completes and is retired. The SRU can also execute the integer instructions addi, addis, add, addo, cmpi, cmp, cmpli, and cmpl without serialization, and in parallel with another integer instruction. Refer to Section 6.3.3.2, "Instruction Serialization," for additional information on serializing instructions executed by the SRU, and Table 6-2, Table 6-3, and Table 6-4 for SRU instruction execution timing. 6.5 Memory Performance Considerations Due to the 603e's instruction throughput of three instructions per clock cycle, lack of data bandwidth can become a performance bottleneck. In order for the 603e to approach its potential performance levels, it must be able to read and write data quickly and efficiently. 6-18 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA If there are many processors in a system environment, one processor may experience long memory latencies while another bus master (for example, a direct memory access controller) is using the external bus. In order to alleviate this possible contention, the 603e provides three memory update modes-copy-back, write-through, and cache-inhibit. Each page of memory is specified to be in one of these modes. If a page is in copy-back mode, data being stored to that page is written only to the on-chip cache. If a page is in write-through mode, writes to that page update the on-chip cache on hits and always update main memory. If a page is cache- inhibited, data in that page will never be stored in the on-chip cache. All three of these modes of operation have advantages and disadvantages. A decision as to which mode to use depends on the system environment as well as the application. This section describes how performance is impacted by each memory update mode. For details about the operation of the on-chip cache and the memory update modes, see Chapter 3, "Instruction and Data Cache Operation." 6.5.1 Copy-Back Mode When storing data while in copy-back mode, store operations for cacheable data do not necessarily cause an external bus cycle to update memory. Instead, memory updates only occur on modified line replacements, cache flushes, or when another processor attempts to access a specific address for which there is a corresponding modified cache entry. For this reason, copy-back mode may be preferred when external bus bandwidth is a potential bottleneck-for example, in a mUltiprocessor environment. Copy-back mode is also well suited for data that is closely coupled to a processor, such as local variables. If more than one device uses data stored in a page that is in copy-back mode, snooping must be enabled to allow copy-back operations and cache invalidations of modified data. The 603e implements snooping hardware to prevent other devices from accessing invalid data. When bus snooping is enabled, the processor monitors the transactions of the other devices. For example, if another device accesses a memory location and its memory-coherent (M) bit is set, and the 603e's on-chip cache has a modified value for that address, the processor preempts the bus transaction, and updates memory with the cache data. If the cache contents associated with the snooped address are unmodified, the 603e will invalidate the cache block. The other device is then free to attempt an access to the updated memory address. See Chapter 3, "Instruction and Data Cache Operation," for complete information about bus snooping. Copy-back mode provides complete cache/memory coherency as well as maximizing available external bus bandwidth. 6.5.2 Write-Through Mode Store operations to memory in write-through mode always update memory as well as the on-chip cache (on cache hits). Write-through mode is used when the data in the cache must always agree with external memory (for example, video memory), or when there is shared MOTOROLA Chapter 6. Instruction Timing 6-19 (global) data that may be used frequently, or when allocation of a cache line on a cache miss is undesirable. Automatic copy back of cached data is not performed if that data is from a memory page marked as write-through mode since valid cache data always agrees with memory. Stores to memory that are in write-through mode may cause a decrease in performance. Each time a store is performed to memory in write-through mode, the bus will be busy for the extra clock cycles required to perform the memory update; therefore, load operations that miss the on-chip cache must wait while the external store operation completes. 6.5.3 Cache-Inhibited Accesses If a memory page is specified to be cache-inhibited, data from this page will not be stored in the on-chip cache. Areas of the memory map can be cache-inhibited by the operating system software. If a cache-inhibited access hits in the on-chip cache, the corresponding cache line is invalidated. If the line is marked as modified, it is copied back to memory before being invalidated. In summary, the copy-back mode allows both load and store operations to use the on-chip cache. The write-through mode allows load operations to use the on-chip cache, but store operations cause a memory access and a cache update if the data is already in the cache. Lastly, the cache-inhibited mode causes memory access for both loads and stores. 6.6 Instruction Scheduling Guidelines The performance of the 603e can be improved by avoiding resource conflicts and promoting parallel utilization of execution units through efficient instruction scheduling. Instruction scheduling on the 603e can be improved by observing the following guidelines: • Implement good static branch prediction (setting of y bit in BO field). • When branch prediction is uncertain, or an even probability, predict fall through. • To reduce mispredictions, separate the instruction that sets CR bits from the branch instruction that evaluates them; separation by more than nine instructions ensures that the CR bits will be immediately available for evaluation. • When branching conditionally to a location specified by count registers (CTRs) or link registers (LRs), or when branching conditionally based on the value in the count register, separate the mtspr instruction that initializes the CTR or LR from the branch instruction performing the evaluation. Separation of the branch instruction and the mtspr instruction by more than nine instructions ensures the register values will be immediately available for use by the branch instruction. • Schedule instructions such that they can dual issue. • Schedule instructions to minimizeexecution-unit-busy stalls. 6-20 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA • Avoid using serializing instructions. • Schedule instructions to avoid dispatch stalls due to renamed resource limitations. - Only five instructions can be in execute-complete stage at anyone time - Only five GPR destinations can be in execute-complete-deallocate stage at any one time. Note that load with update address instructions use two destination registers. - Only four FPR destinations can be in execute-complete-deallocate stage at any one time. (Not supported on the EC603e microprocessor) 6.6.1 Branch, Dispatch, and Completion Unit Resource Requirements This section describes the specific resources required to avoid stalls during branch resolution, instruction dispatching, and instruction completion. 6.6.1.1 Branch Resolution Resource Requirements The following is a list of branch instructions and the resources required to avoid stalling the fetch unit in the course of branch resolution: • The beIr instruction requires LR availability. • The bcctr instruction requires CTR availability. • "Branch and link" instructions require shadow LR availability. • The "branch conditional on counter decrement and CR condition" requires CTR availability or the CR condition must be false, and 603e cannot be executing instructions following an unresolved predicted branch when the branch is encountered by the BPU. • The "branch conditional on CR condition" cannot be executed following an unresolved predicted branch instruction. 6.6.1.2 Dispatch Unit Resource Requirements The following is a list of resources required to avoid stalls in the dispatch unit; note that the two dispatch buffers are described as DQ[O] and DQ[l], where DQ[O] is the dispatch buffer located at the very bottom of the dispatch queue: • Requirements for dispatching from DQ[O] are as follows: - Needed execution unit available - Needed GPR rename register(s) available - Needed FPR rename registers available (not supported on the EC603e microprocessor) - Completion buffer is not full - Instruction is dispatch serialized and completion buffer is empty - A dispatch serialized instruction is not currently being executed MOTOROLA Chapter 6. Instruction Timing 6-21 • Requirements for dispatching from DQ[1] are as follows: - Instruction in DQ[O] must dispatch - Instruction dispatched by DQ[O] is not dispatch serialized - Needed execution unit is available (after dispatch from DQ[OD - Needed GPR rename registers(s) are available (after dispatch from DQ[OD - Needed FPR rename register is available (after dispatch from DQ[OD (Not supported on the EC603e microprocessor) - Completion buffer is not full (after dispatch from DQ[OD - Instruction dispatched from DQ[1] is not dispatch serialized 6.6.1.3 Completion Unit Resource Requirements The following is a list of resources required to avoid stalls in the completion unit; note that the two completion buffers are described as CQ[O] and CQ[I], where CQ[O] is the completion buffer located at the very end of the completion queue: • Requirements for completing an instruction from CQ[O] are as follows: - Instruction in CQ[O] must be finished - Instruction in CQ[O] must not follow an unresolved predicted branch - Instruction in CQ[O] must not cause an exception • Requirements for completing an instruction from CQ[I] are as follows: - Instruction in CQ[O] must complete in same cycle - Instruction in CQ[I] must be finished - Instruction in CQ[1] must not follow an unresolved predicted branch - Instruction in CQ[1] must not cause an exception - Instruction in CQ[l] must be an integer or load instruction - Number of CR updates from both CQ[O] and CQ[I] must not exceed one - Number of GPR updates from both CQ[O] and CQ[1] must not exceed two - Number of FPR updates from both CQ[O] and CQ[1] must not exceed one (not supported on the EC603e microprocessor) 6.7 Instruction Latency Summary Table 6-1 through Table 6-6 list t:l;le latencies associated with each instruction executed by the 603e. Note that the instruction latency tables contain no 64-bit architected instructions. These instructions will trap to an illegal instruction exception handler when encountered. Recall that the term latency is defined as the total time it takes to execute an instruction and make ready the results of that instruction. 6-22 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table 6-1 provides the latencies for the branch instructions. Table 6-1. Branch Instructions Primary Extended Mnemonic Unit Cycles 16 --- bc[l][a] BPU 1· 18 --- b[I][a] BPU 1· 19 016 bclr[l] BPU 1· 19 528 bcctr[l] BPU 1· ·These operations may be folded for an effective cycle time of O. Table 6-2 provides the latencies for the system register instructions. Table 6-2. System Register Instructions Primary Extended Mnemonic Unit Cycles 17 --1 sc SRU 3 19 050 rfi SRU 3 19 150 isync SRU 1& 31 083 mfmsr SRU 1 31 146 mtmsr SRU 2 31 210 mtsr SRU 2 31 242 mtsrin SRU 2 31 339 mfspr (notl/DBATs) SRU 1 31 339 mfspr (DBATs) SRU 3& 31 339 mtspr (IBATs) SRU 3& 31 467 mtspr (not IBATs) SRU 2 (XER-&) 31 467 mtspr (IBATs) SRU 2& 31 595 mfsr SRU 3& 31 598 sync SRU 1& 31 659 mfsrin SRU 3& 31 854 eieio SRU 1 31 371 mftb SRU 1 31 467 mttb SRU 1 Note: Cycle times marked with "&" require a variable number of cycles due to serialization. MOTOROLA Chapter 6. Instruction Timing 6-23 Table 6-3 provides the latencies for the condition register logical instructions. Table 6-3. Condition Register Logical Instructions Primary Extended Mnemonic Unit Cycles 19 000 mcrf SRU 1 19 033 crnor SRU 1 19 129 crandc SRU 1 19 193 crxor SRU 1 19 225 crnand SRU 1 19 257 crand SRU 1 19 289 creqv SRU 1 19 417 crorc SRU 1 19 449 cror SRU 1 31 019 mtcr SRU 1 31 144 mtcrf SRU 1 31 512 mcrxr SRU 1& Note: Cycle times marked with "&" require a variable number of cycles due to serialization. Table 6-4 provides the latencies for the integer instructions. Table 6-4. Integer Instructions I Primary I Extended I Mnemonic I Unit Cycles 03 - twi Integer 2 07 - mUIli Integer 2,3 08 - subtic Integer 1 10 - cmpli Integer 11\ &SRU 11 - cmpi Integer 11\ &SRU 12 - addic Integer 1 13 - addic. Integer 1 14 - addi Integer 1 &SRU 15 - addis Integer 1 &SRU 20 - rlwimi[.] Integer 1 21 I rlwmm[.] Integer 6-24 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table 6-4. Integer Instructions (Continued) Primary Extended Mnemonic Unit Cycles 23 - rlwnm[.] Integer 1 24 - ori Integer 1 25 - oris Integer 1 26 - xori Integer 1 27 - xoris Integer 1 28 - andl. Integer 1 29 - andis. Integer 1 31 000 cmp Integer 1" &SRU 31 004 tw Integer 2 31 008 subfc[o][.] Integer 1 31 010 addc[o][.] Integer 1 31 011 mulhwu[.] Integer 2,3.4,5,6 31 024 slw[.] Integer 1 31 026 cntlzw[.] Integer 1 31 028 and[.] Integer 1 31 032 cmpl Integer 1" &SRU 31 040 sUbf[.] Integer 1 31 060 andc[.] Integer 1 31 075 mUlhw[.] Integer 2,3,4,5 31 104 neg[o][.] Integer 1 31 124 nor[.] Integer 1 31 136 subfe[o][.] Integer 1 31 138 adde[o][.] Integer 1 31 200 subtze[o][.] Integer 1 31 202 addze[o][.] Integer 1 31 232 subfme[o][.] Integer 1 31 234 addme[o][.] Integer 1 31 235 mull[o][.] Integer 2,3.4,5 31 266 add[o][.] Integer 1 &SRU 1 31 284 eqv[.] Integer 1 31 316 xor[.] Integer 1 MOTOROLA Chapter 6. InstructionTiming 6-25 Table 6-4. Integer Instructions (Continued) Primary Extended Mnemonic Unit Cycles 31 412 orc[.] Integer 1 31 444 or[.] Integer 1 31 459 dlvwu[o][.] Integer 37 31 476 nand[.] Integer 1 31 491 dlvw[o][.] Integer 37 31 536 srw[.] Integer 1 31 792 sraw[.] Integer 1 31 824 srawi[.] Integer 1 31 922 extsh[.] Integer 1 31 954 extsb[.] Integer 1 Notes: "II" indicates that the cycle time immediately forwards their CR results to the BPU for fast branch resolution. 1. The SRU can only execute the add and add[o] instructions. Table 6-5 provides the latencies for the floating-point instructions. Note that floating-point instructions are not supported on the EC603e microprocessor and execution of a floating- point instruction will result in a trap to the floating-point unavailable exception vector. Table 6-5. Floating-Point Instructions I Primary I Extended I Mnemonic I Unit I Cycles 59 018 fdivs[.] FPU 1811 59 020 fsubs[.] FPU 1-1-111 59 021 fadds[.] FPU 1-1-111 59 024 fres[.] FPU 1811 59 025 fmuls[.] FPU 1-1-111 59 028 fmsubs[.] FPU 1-1-111 59 029 fmadds[.] FPU 1-1-111 59 030 fnmsubs[.] FPU 1-1-111 59 031 fnmadds[.] FPU 1-1-111 63 000 fcmpu FPU 1-1-111 63 012 frsp[.] FPU 1-1-111 63 014 fctiw[.] FPU 1-1-111 63 015 fctiwz[.] FPU 1-1-111 63 018 fdlv[.] FPU 3311 6-26 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table 6-5. Floating-Point Instructions (Continued) Primary Extended Mnemonic Unit Cycles 63 020 fsub[.] FPU 1-1-11\ 63 021 fadd[.] FPU 1-1-11\ 63 023 fsel[.] FPU 1-1-11\ 63 025 fmul[.] FPU 2-1-11\ 63 026 frsqrte[.] FPU 1-1-11\ 63 028 fmsub[.] FPU 2-1-11\ 63 029 fmadd[.] FPU 2-1-11\ 63 030 fnmsub[.] FPU 2-1-11\ 63 031 fnmadd[.] FPU 2-1-11\ 63 032 fcmpo FPU 1-1-11\ 63 038 mtfsb1[.] FPU 1-1-1&1\ 63 040 fneg[.] FPU 1-1-11\ 63 064 mcrfs FPU 1-1-1& 63 070 mtfsbO[.] FPU 1-1-1&1\ 63 072 fmr[.] FPU 1-1-11\ 63 134 mtfsfi[.] FPU 111&1\ 63 136 fnabs[.] FPU 1-1-11\ 63 264 fabs[.] FPU 1-1-11\ 63 583 mffs[.] FPU 1-1-1&1\ 63 711 mtfsf[.] FPU 1-1-1&1\ Notes: Cycle times marked with "&" require a variable number of cycles due to completion serialization. Cycle times marked with "1\" immediately forward their CR results to the BPU for fast branch resolution. Cycle times marked with a "-" specify the number of clock cycles in each pipeline stage. Instructions with a single entry in the cycles column are not pipelined. MOTOROLA Chapter 6. Instruction Timing 6-27 Table 6-6 provides latencies for the load and store instructions. Table 6-6. Load and Store Instructions Primary Extended Mnemonic Unit Cycles 31 020 Iwarx LSU 2:1 31 023 Iwzx LSU 2:1 31 054 dcbst LSU 215& 31 055 Iwzux LSU 2:1 31 086 dcbf LSU 215& 31 087 Ibzx LSU 2:1 31 119 Ibzux LSU 2:1 31 150 stwcx. LSU 8 31 151 stwx LSU 2:1 31 183 stwux LSU 2:1 31 215 stbx LSU 2:1 31 246 dcbtst LSU 2 31 247 stbux LSU 2:1 31 278 dcbt LSU 2 31 279 Ihzx LSU 2:1 31 306 tlbie LSU 3& 31 310 eciwx LSU 2:1 31 311 Ihzux LSU 2:1 31 343 Ihax LSU 2:1 31 375 Ihaux LSU 2:1 31 407 sthx LSU 2:1 31 438 ecowx LSU 2:1 31 439 sthux LSU 2:1 31 470 dcbl LSU 2& 31 533 Iswx LSU 2+n& 31 534 Iwbrx LSU 2:1 31 535 Ifsx LSU 2:1 31 566 tlbsync LSU 2& 31 567 Ifsux LSU 2:1 31 597 Iswi LSU 2+n& 31 599 Ifdx LSU 2:1 6-28 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table 6-6. Load and Store Instructions (Continued) Primary Extended Mnemonic Unit Cycles 31 631 Ifdux LSU 2:1 31 661 stswx LSU 1 + n& 31 662 stwbrx LSU 2:1 31 663 stfsx LSU 2:1 31 695 stfsux LSU 2:1 31 725 stswi LSU 1 + n& 31 727 stfdx LSU 2:1 31 759 stfdux LSU 2:1 31 790 Ihbrx LSU 2:1 31 918 sthbrx LSU 2:1 31 978 tlbld LSU 2& 31 982 icbi LSU 3& 31 983 stfiwx LSU 2:1 31 1010 tlbli LSU 3& 31 1014 dcbz LSU 10& 32 --- Iwz LSU 2:1 33 --- Iwzu LSU 2:1 34 --- Ibz LSU 2:1 35 --- Ibzu LSU 2:1 36 --- stw LSU 2:1 37 --- stwu LSU 2:1 38 --- stb LSU 2:1 39 --- stbu LSU 2:1 40 --- 1hz LSU 2:1 41 --- Ihzu LSU 2:1 42 --- Iha LSU 2:1 43 --- Ihau LSU 2:1 44 --- sth LSU 2:1 45 --- sthu LSU 2:1 46 --- Imw LSU 2 + n& 47 --- stmw LSU 1 + n& 48 --- Ifs LSU 2:1 MOTOROLA Chapter 6. Instruction Timing 6-29 Table 6-6. Load and Store Instructions (Continued) Primary Extended Mnemonic Unit Cycles 49 ... Ifsu LSU 2:1 50 --- Ifd LSU 2:1 51 --- Ifdu LSU 2:1 52 --- stfs LSU 2:1 53 --- stfsu LSU 2:1 54 --- stfd LSU 2:1 55 --- stfdu LSU 2:1 Notes: Cycle times marked with U&" require a variable number of cycles due to serialization. Cycle times marked with a "f'specify hit and miss times for cache management instructions that require conditional bus activity. Cycle times marked with a ":" specify cycles of total latency and throughput for pipe lined load and store instructions. Load and store multiple and string instruction cycles are shown as a fixed number of cycles plus a variable number of cycles where Un" is the number of words accessed by the instruction. 6-30 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Chapter 7 Signal Descriptions This chapter describes the PowerPC 603e microprocessor's external signals. It contains a concise description of individual signals, showing behavior when the signal is asserted and negated and when the signal is an input and an output. NOTE A bar over a signal name indicates that the signal is active low-for example, ARTRY (address retry) and TS (transfer start). Active-low signals are referred to as asserted (active) when they are low and negated when they are high. Signals that are not active-low, such as AP[0-3] (address bus parity signals) and TT[0--4] (transfer type signals) are referred to as asserted when they are high and negated when they are low. The 603e signals are grouped as follows: • Address arbitration signals-The 603e uses these signals to arbitrate for address bus mastership. • Address transfer start signals-These signals indicate that a bus master has begun a transaction on the address bus. • Address transfer signals-These signals, which consist of the address bus, address parity, and address parity error signals, are used to transfer the address and to ensure the integrity of the transfer. • Transfer attribute signals-These signals provide information about the type of transfer, such as the transfer size and whether the transaction is bursted, write- through, or cache-inhibited. • Address transfer termination signals-These signals are used to acknowledge the end of the address phase of the transaction. They also indicate whether a condition exists that requires the address phase to be repeated. • Data arbitration signals-The 603e uses these signals to arbitrate for data bus mastership. • Data transfer signals-These signals, which consist of the data bus, data parity, and data parity error signals, are used to transfer the data and to ensure the integrity of the transfer. MOTOROLA Chapter 7. Signal Descriptions 7-1 • Data transfer termination signals-Data termination signals are required after each data beat in a data transfer. In a single-beat transaction, the data termination signals also indicate the end of the tenure, while in burst accesses, the data termination signals apply to individual beats and indicate the end of the tenure only after the final data beat. They also indicate whether a condition exists that requires the data phase to be repeated. • System status signals-These signals include the external interrupt signal, checkstop signals, and both soft- and hard-reset signals. These signals are used to interrupt and, under various conditions, to reset the processor. • ITAG/COP interface signals-The ITAG (IEEE 1149.1) interface and common on- chip processor (COP) unit provides a serial interface to the system for performing monitoring and boundary tests. • Processor status-These signals include the memory reservation signal, machine quiesce control signals, time base enable signal, and TLBISYNC signal. • Clock signals-These signals provide for system clock input and frequency control. 7-2 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 7.1 Signal Configuration Figure 7-1 illustrates the 603e microprocessor's signal configuration, showing how the signals are grouped. NOTE A pinout showing actual pin numbers is included in the 603e hardware specifications. BR DBG 1J t .... 111 1 ADDRESS BG DBWO DATA 1 ARBITRATION ABB DBB ARBITRATION 1 ADDRESS is ... 1 -[- START 64 DH[0-31], Dl[0-31] DP[O-7] 1 DATA t 8 A[0-31J lJF5E JTRANSFER .. 32 1 DBDIS 1 ADDRESS BUS • AP[0-3J .. 4 :.r=t APE TA 1 1 DFiTR'l DATA -. TI[Q-4j TeST .... 5 1 1 TEA TERMINATION • TSIZ[O-2] 1 iNT SMi ~ 3 cree .. en 21 fVICP INTERRUPTS TRANSFER ,- • CT 1 0 CRSTP II'! CRSTP oui CHECKSTOPS ATTRIBUTE 1 W 2 WT CD 2 ~SF!ESEi RESET 1 CSE[O-l] 2 TC[O-l] RS1W J=l 2 1 - 2 OREO QACR PROCESSOR TBEN 1 STATUS 1 TlBISYI'!C ADDRESS AACK ... TERMINATION{.. ARTRY .. 11 iRSj, TCK, TMS, TDI, TOO """LJTAGICOP 5 :r INTERFACE .. t SYSClK 1 ClK OUT TEST CLOCKS 1 3 l LSSDTEST Pll_CFG[O-3] .. 4 S CONTROL I-±- +3.3 V Figure 7-1. Signal Groups MOTOROLA Chapter 7. Signal Descriptions 7-3 7.2 Signal Descriptions This section describes individual603e signals, grouped according to Figure 7-1. Note that the following sections are intended to provide a quick summary of signal functions. Chapter 8, "System Interface Operation," describes many of these signals in greater detail, both with respect to how individual signals function and how groups of signals interact. 7.2.1 Address Bus Arbitration Signals The address arbitration signals are a collection of input and output signals the 603e uses to request the address bus, recognize when the request is granted, and indicate to other devices when mastership is granted. For a detailed description of how these signals interact, see Section 8.3.1, "Address Bus Arbitration." 7.2.1.1 Bus Request (BR)-Output The bus request (BR) signal is an output signal on the 603e. Following are the state meaning and timing comments for the BR signal. State Meaning Asserted-Indicates that the 603e is requesting mastership of the address bus. Note that BR may be asserted for one or more cycles, and then de-asserted due to an internal cancellation of the bus request (for example, due to a load hit in the touch load buffer). See Section 8.3.1, "Address Bus Arbitration." Negated-Indicates that the 603e is not requesting the address bus. The 603e may have no bus operation pending, it may be parked, or the ARTRY input was asserted on the previous bus clock cycle. Timing COll1.luents Assertion-Occurs when the 603e is not parked and a bus transaction is needed. This may occur even if the two possible pipeline accesses have occurred. BR will also be asserted for one cycle during the execution of a dcbz instruction, and during the execution of a load instruction which hits in the touch load buffer. Negation-Occurs for at least one bus clock cycle after an accepted, qualified bus grant (see BG and ABB), even if another transaction is pending. It is also negated for at least one bus clock cycle when the assertion of ARTRY is detected on the bus. 7-4 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 7.2.1.2 Bus Grant (BG)-Input The bus grant (BG) signal is an input signal on the 603e. Following are the state meaning and timing comments for the BG signal. State Meaning Asserted-Indicates that the 603e may, with the proper qualification, assume mastership of the address bus. A qualified bus grant occurs when BG is asserted and ABE and ARTRY (after AACK) are not asserted. The ABB and ARTRY signals are driven by the 603e or other bus masters. If the 603e is parked, BR need not be asserted for the qualified bus grant. See Section 8.3.1, "Address Bus Arbitration." Negated- Indicates that the 603e is not the next potential address bus master. Timing Comments Assertion-May occur at any time to indicate the 603e is free to use the address bus. After the 603e assumes bus mastership, it does not check for a qualified bus grant again until the cycle during which the address bus tenure is completed (assuming it has another transaction to run). The 603e does not accept a BG in the cycles between the assertion of any TS and AACK. Negation-May occur at any time to indicate the 603e cannot use the bus. The 603e may still assume bus mastership on the bus clock cycle of the negation of BG because during the previous cycle BG indicated to the 603e that it was free to take mastership (if qualified). 7.2.1.3 Address Bus Busy (ABB) The address bus busy (ABB) signal is both an input and an output signal. 7.2.1.3.1 Address Bus Busy (ABB}-Output Following are the state meaning and timing comments for the ABB output signal. State Meaning Asserted-Indicates that the 603e is the address bus master. See Section 8.3.1, "Address Bus Arbitration." Negated-Indicates that the 603e is not using the address bus. If ABB is negated during the bus clock cycle following a qualified bus grant, the 603e did not accept mastership, even if BR was asserted. This can occur if a potential transaction is aborted internally before the transaction is started. Timing Comments Assertion-Occurs on the bus clock cycle following a qualified BG that is accepted by the processor (see Negated). Negation-Occurs for a minimum of one-half bus clock cycle following the assertion of AACK. If ABB is negated during the bus clock cycle following a qualified bus grant, the 603e did not accept mastership, even if BR was asserted. High Impedance-Occurs after ABB is negated. MOTOROLA Chapter 7. Signal Descriptions 7-5 7.2.1.3.2 Address Bus Busy (ABB)-Input Following are the state meaning and timing comments for the ABB input signal. State Meaning Asserted-Indicates that the address bus is in use. This condition effectively blocks the 603e from assuming address bus ownership, regardless of the BG input; see Section 8.3.1, "Address Bus Arbitration." Negated-Indicates that the address bus is not owned by another bus master and that it is available to the 603e when accompanied by a qualified bus grant. Timing Comments Assertion-May occur when the 603e must be prevented from using the address bus (and the processor is not currently asserting ABB). Negation-May occur whenever the 603e can use the address bus. 7.2.2 Address Transfer Start Signals Address transfer start signals are input and output signals that indicate that an address bus transfer has begun. The transfer start (TS) signal identifies the operation as a memory transaction. For detailed information about how TS interacts with other signals, refer to Section 8.3.2, "Address Transfer." 7.2.2.1 Transfer Start (TS) The TS signal is both an input and an output signal on the 603e. 7.2.2.1.1 Transfer Start (TS)-Output Following are the state meaning and timing comments for the TS output signal. State Meaning Asserted-Indicates that the 603e has begun a memory bus transaction and that the address bus and transfer attribute signals are valid. When asserted with the appropriate TT[0-4] signals it is also an implied data bus request for a memory transaction (unless it is an address-only operation). Negated-Indicates that no bus transaction is occurring during normal operation. Timing Comments Assertion-Coincides with the assertion of ABB. Negation--Occurs one bus clock cycle after TS is asserted. High Impedance-Coincides with the negation of ABB. 7-6 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 7.2.2.1.2 Transfer Start (TS)-Input Following are the state meaning and timing comments for the TS input signal. State Meaning Asserted-Indicates that another master has begun a bus transaction and that the address bus and transfer attribute signals are valid for snooping (see GBL). Negated-Indicates that no bus transaction is occurring. Timing Comments Assertion-May occur during the assertion of ABB. Negation-Must occur one bus clock cycle after TS is asserted. 7.2.3 Address Transfer Signals The address transfer signals are used to transmit the address and to generate and monitor parity for the address transfer. For a detailed description of how these signals interact, refer to Section 8.3.2, "Address Transfer." 7.2.3.1 Address Bus (A[O-31]) The address bus (A[0--31]) consists of 32 signals that are both input and output signals. 7.2.3.1.1 Address Bus (A[0-31])-Output Following are the state meaning and timing comments for the A[O--31] output signals. State Meaning AssertedlNegated-Represents the physical address (real address in the architecture specification) of the data to be transferred. On burst transfers, the address bus presents the double-word-aligned address containing the critical code/data that missed the cache on a read operation, or the first double word of the cache line on a write operation. Note that the address output during burst operations is not incremented. See Section 8.3.2, "Address Transfer." Timing Comments AssertionlNegation-Occurs on the bus clock cycle after a qualified bus grant (coincides with assertion of ABB and TS). High Impedance-Occurs one bus clock cycle after AACK is asserted. 7.2.3.1.2 Address Bus (A[O-31])-lnput Following are the state meaning and timing comments for the A [0--31] input signals. State Meaning AssertedlNegated-Represents the physical address of a snoop operation. Timing Comments AssertionlNegation-Must occur on the same bus clock cycle as the assertion ofTS; is sampled by 603e only on this cycle. MOTOROLA Chapter 7. Signal Descriptions 7-7 7.2.3.2 Address Bus Parity (AP[O-3]) The address bus parity (AP[0-3D signals are both input and output signals reflecting one bit of odd-byte parity for each of the 4 bytes of address when a valid address is on the bus. 7.2.3.2.1 Address Bus Parity (AP[O-3])-Output Following are the state meaning and timing comments for the AP[0-3] output signal on the 603e. State Meaning Asserted/Negated-Represents odd parity for each of 4 bytes of the physical address for a transaction. Odd parity means that an odd number of bits, including the parity bit, are driven high. The signal assignments correspond to the following: APO A [0-7] API A[8-1S] AP2 A[16-23] AP3 A[24-31] For more information, see Section 8.3.2.1, "Address Bus Parity." Timing Comments AssertionlNegation-The same as A[0-31]. High Impedance-The same as A[0-31]. 7.2.3.2.2 Address Bus Parity (AP[O-3])-lnput Following are the state meaning and timing comments for the AP[0-3] input signal on the 603e. State Meaning Asserted/Negated-Represents odd parity for each of 4 bytes of the physical address for snooping operations. Detected even parity causes the processor to take a machine check exception or enter the checkstop state if address parity checking is enabled in the HIDO register; see Section 2.1.2.1, "Hardware Implementation Registers (HIDO and HIDl)." (See also the APE signal description.) Timing Comments AssertionlNegation-The same as A[0-31]. 7.2.3.3 Address Parity Error (APE)-Output The address parity error (APE) signal is an output signal on the 603e. Note that the (APE) signal is an open-drain type output, and requires an external pull-up resistor (for example, 10 ill to Vdd) to assure proper de-assertion of the APE signal. Following are the state meaning and timing comments for the APE signal on the 603e. The APE signal will not be asserted if address parity checking is disabled (HIDO[EBA] cleared to 0). For more information, see Section 8.3.2.1, "Address Bus Parity." State Meaning Asserted-Indicates incorrect address bus parity has been detected by the 603e on a snoop (GBL asserted). Negated-Indicates that the 603e has not detected a parity error (even parity) on the address bus. 7-8 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Timing Comments Assertion-Occurs on the second bus clock cycle after TS is asserted. High Impedance-Occurs on the third bus clock cycle after TS is asserted. 7.2.4 Address Transfer Attribute Signals The transfer attribute signals are a set of signals that further characterize the transfer-such as the size of the transfer, whether it is a read or write operation, and whether it is a burst or single-beat transfer. For a detailed description of how these signals interact, see Section 8.3.2, "Address Transfer." Note that some signal functions vary depending on whether the transaction is a memory access or an I/O access. 7.2.4.1 Transfer Type (TT[O-4]) The transfer type (TT[~]) signals consist of five input/output signals on the 603e. For a complete description of TT[O-4] signals and for transfer type encodings, see Table 7-1. 7.2.4.1.1 Transfer Type (TT[O-4])-Output Following are the state meaning and timing comments for the TT[~] output signals on the 603e. State Meaning AssertedlNegated-lndicates the type of transfer in progress. Timing Comments AssertionlNegationlHigh Impedance-The same as A[O-31]. 7.2.4.1.2 Transfer Type (TT[O-4])-lnput Following are the state meaning and timing comments for the TT[0-3] input signals on the 603e. State Meaning AssertedlNegated-lndicates the type of transfer in progress (see Table 7-2). Timing Comments AssertionlNegation-The same asA[0-31]. Table 7-1 describes the transfer encodings for a 603e bus master. Table 7-1. Transfer Encoding for the Bus Master 603e Bus 60x Bus Transaction Master TTO TT1 TT2 TT3 TT4 Specification Transaction Source Transaction Command N/A N/A 0 0 0 0 0 Clean block Address only N/A N/A 0 0 1 0 0 Flush block Address only N/A N/A 0 1 0 0 0 sync Address only Address only dcbz 0 1 1 0 0 Kill block Address only N/A N/A 1 0 0 0 0 eieio Address only MOTOROLA Chapter 7. Signal Descriptions 7-9 Table 7-1. Transfer Encoding for the Bus Master (Continued) 603e Bus 60x Bus Transaction Master Source no n1 n2 TT3 TT4 Specification Transaction Transaction Command Single-beat ecowx 1 0 1 0 0 External control Single-beat write (nonGBL) word write write N/A N/A 1 1 0 0 0 TlB invalidate Address only Single-beat read eciwx 1 1 1 0 0 External control Single-beat (nonGBL) word read read N/A N/A 0 0 0 0 1 Iwarx Address only Reservation set N/A N/A 0 0 1 0 1 Reserved - N/A N/A 0 1 0 0 1 tlbsync Address only N/A N/A 0 1 1 0 1 icbi Address only N/A N/A 1 X X 0 1 Reserved - Single-beat Caching- 0 0 0 1 0 Write-with-flush Single-beat write inhibited or write- write or burst through store Burst (nonGBl) Cast-out, or 0 0 1 1 0 Write-with-kill Single-beat snoop copyback write or burst Single-beat read Caching- 0 1 0 1 0 Read Single-beat inhibited load or read or burst instruction fetch Burst load miss, store 0 1 1 1 0 Read-with-intent- Burst miss, or to-modify instruction fetch Single-beat stwcx. 1 0 0 1 0 Write-with-flush- Single-beat write atomic write N/A N/A 1 0 1 1 0 Reserved N/A Single-beat read Iwarx (caching- 1 1 0 1 0 Read-atomic Single-beat inhibited load) read or burst Burst Iwarx 1 1 1 1 0 Read-with-intent- Burst (load miss) to-modify-atomic N/A N/A 0 0 0 1 1 Reserved - N/A N/A 0 0 1 1 1 Reserved - N/A N/A 0 1 0 1 1 Read-with-no- Single-beat intent-to-cache read or burst N/A N/A 0 1 1 1 1 Reserved - N/A N/A 1 X X 1 1 Reserved - 7-10 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table 7-2 describes the 60x bus specification transfer encodings and the 603e bus snoop response on an address hit. Table 7-2. Snoop Hit Response 603e Bus SOx Bus Specification Transaction TTO TT1 TT2 TT3 TT4 Snooper; Command Action on Hit Clean block Address only 0 0 0 0 0 N/A Flush block Address only 0 0 1 0 0 N/A sync Address only 0 1 0 0 0 N/A Kill block Address only 0 1 1 0 0 Kill, cancel reservation eieio Address only 1 0 0 0 0 N/A External control word write Single-beat write 1 0 1 0 0 N/A TLB Invalidate Address only 1 1 0 0 0 N/A External control word read Single-beat read 1 1 1 0 0 N/A Iwarx Address only 0 0 0 0 1 N/A Reservation set Reserved - 0 0 1 0 1 N/A tlbsync Address only 0 1 0 0 1 N/A icbi Address only 0 1 1 0 1 N/A Reserved - 1 X X 0 1 N/A Write-with-flush Single-beat write or burst 0 0 0 1 0 Flush, cancel reservation Write-with-kill Single-beat write or burst 0 0 1 1 0 Kill, cancel reservation Read Single-beat read or burst 0 1 0 1 0 Clean or flush Read-with-intent-to-modify Burst 0 1 1 1 0 Flush Write-with-flush-atomic Single-beat write 1 0 0 1 0 Flush, cancel reservation Reserved N/A 1 0 1 1 0 N/A Read-atomic Single-beat read or burst 1 1 0 1 0 Clean or flush Read-with-intent-to modify- Burst 1 1 1 1 0 Flush atomic Reserved - 0 0 0 1 1 N/A Reserved - 0 0 1 1 1 N/A Read-with-no-intent-to-cache Single-beat read or burst 0 1 0 1 1 Clean Reserved - 0 1 1 1 1 N/A Reserved - 1 X X 1 1 N/A MOTOROLA Chapter 7 _ Signal Descriptions 7-11 The 603e provides transfer type signals (Tf[0--4]) that characterize bus transfers. When HIDO[ABE] is set, the PID7v-603e performs address-only bus transactions with the encodings shown in Table 7-3. Table 7-3. Implementation-Specific Transfer Encoding PID7v-6D3e Transaction TTD TT1 TT2 TT3 TT4 Transaction Transaction Source 0 0 0 0 0 Clean block Address only debst 0 0 1 0 0 Flush block Address only debf 0 1 1 0 0 Kill block Address only debz, debl The 603e provides a CLK_OUT signal for test purposes that allows the monitoring of the processor and bus clock frequencies. The frequency of the CLK_OUT signal is determined by the configuration of the HIDO[SBCLK] and HIDO[ECLK] bits, as shown in Table 7-4. Note that the PID7v-603e's CLK_OUT signal will be driven at the processor frequency during the assertion of HRESET; when the HRESET signal is deasserted, the CLK_OUT signal enters the default high-impedance state. Table 7-4. ClK_OUT Signal Configuration HIDD[SBClK] HIDD[EClK] ClK_OUT Output State 0 0 High-impedance 0 1 Processor clock frequency 1 0 Half-bus clock frequency 1 1 Bus clock frequency 7.2.4.2 Transfer Size (TSIZ[O-2])-Output The transfer size (TSIZ[0-2]) signals consist of three output signals on the 603e. Following are the state meaning and timing comments for the TSIZ[O-2] output signals on the 603e. State Meaning AssertedlNegated-For memory accesses, these signals along with TBST, indicate the data transfer size for the current bus operation, as shown in Table 7-5. Table 8-4 shows how the transfer size signals are used with the address signals for aligned transfers. Table 8-5 shows how the transfer size signals are used with the address signals for misaligned transfers. For external control instructions (eciwx and ecowx), TSIZ[0-2] are used to output bits 29-31 of the external access register (EAR), which are used to form the resource ID (TBSTIITSIZ[0-2]). 7-12 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Timing Comments AssertionlNegation-The same as A[O-31]. High Impedance-The same as A[0-31]. Table 7-5. Data Transfer Size TBST TSIZ[o-2] Transfer Size Asserted 010 Burst (32 bytes) Negated 000 8 bytes Negated 001 1 byte Negated 010 2 bytes Negated 011 3 bytes Negated 100 4 bytes Negated 101 5 bytes Negated 110 6 bytes Negated 111 7 bytes 7.2.4.3 Transfer Burst (TBST) The transfer burst (TBST) signal is an input/output signal on the 603e. 7.2.4.3.1 Transfer Burst (TBST)-'-Output Following are the state meaning and timing comments for the TBST output signal. State Meaning Asserted-Indicates that a burst transfer is in progress. Negated-Indicates that a burst transfer is not in progress. For external control instructions (eciwx and ecowx), TBST is used to output bit 28 of the EAR, which is used to form the resource ID (TBSTIITSIZ[O-2]). Timing Comments AssertionlNegation-The same as A[0-31]. High Impedance-The same as A[O-31]. 7.2.4.3.2 Transfer Burst (TBST)-Input Following are the state meaning and timing comments for the TBST input signal. State Meaning AssertedlNegated-U sed when snooping for single-beat reads (read with no intent to cache). Timing Comments AssertionlNegation-The same as A[0-31]. MOTOROLA Chapter 7. Signal Descriptions 7-13 7.2.4.4 Transfer Code (TC[O-1])-Output The transfer code (TC[O-l]) consists of two output signals on the 603e. Following are the state meaning and timing comments for the TC[O-l] signals. State Meaning AssertedlNegated-Represents a special encoding for the transfer in progress (see Table 7-6). Timing Comments AssertionlNegation-The same as A[O-31]. High Impedance-The same as A[O-31]. Table 7-6. Encodings for TC[O-1] Signals TC(o-1) Read Write 00 Data transaction Any write 01 Touch load - 10 Instruction fetch - 11 Reserved - 7.2.4.5 Cache Inhibit (CI)-Output The cache inhibit (CI) signal is an output signal on the 603e. Following are the state meaning and timing comments for the CI signal. State Meaning Asserted-Indicates that a single-beat transfer will not be cached, reflecting the setting of the I bit for the block or page that contains the address of the current transaction. Negated-Indicates that a burst transfer will allocate a line in the 603e data cache. Timing Comments AssertionlNegation-The same as ArO-311. High Impedance-The same as A[O-31]. 7.2.4.6 Write-Through (WT)-Output The write-through (WT) signal is an output signal on the 603e. Following are the state meaning and timing comments for the WT signal. State Meaning Asserted-Indicates that a single-beat transaction is write-through, reflecting the value of the W bit for the block or page that contains the address of the current transaction. Negated-Indicates that a transaction is not write-through. Timing Comments AssertionlNegation-The same as A[O-31]. High Impedance-The same as A[O-31]. 7-14 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 7.2.4.7 Global (GBl) The global (GBL) signal is an input/output signal on the 603e. 7.2.4.7.1 Global (GBL)-Output Following are the state meaning and timing comments for the GBL output signal. State Meaning Asserted-Indicates that a transaction is global, reflecting the setting of the M bit for the block or page that contains the address of the current transaction (except in the case of copy-back operations and instruction fetches, which are nonglobal.) Negated-Indicates that a transaction is not global. Timing Comments AssertionlNegation-The same as A[0-31]. High Impedance-The same as A[0-31]. 7.2.4.7.2 Global (GBL)-Input Following are the state meaning and timing comments for the GBL input signal. State Meaning Asserted-Indicates that a transaction must be snooped by the 603e. Negated-Indicates that a transaction is not snooped by the 603e. Timing Comments AssertionlNegation-The same asA[0-31]. 7.2.4.8 Cache Set Entry (CSE[O-1])-Output Following are the state meaning and timing comments for the CSE[O-l] signals. State Meaning Asserted/Negated-Represents the cache replacement set element for the current transaction reloading into or writing out of the cache. Can be used with the address bus and the transfer attribute signals to externally track the state of each cache line in the 603e's cache. Note that the CSE[O-l] signals are not meaningful during data cache touch load operations. Timing Comments AssertionlNegation-The same as A[0-31]. High Impedance-The same as A[0-31]. 7.2.5 Address Transfer Termination Signals The address transfer termination signals are used to indicate either that the address phase of the transaction has completed successfully or must be repeated, and when it should be terminated. For detailed information about how these signals interact, see Section 8.3.3, "Address Transfer Termination." MOTOROLA Chapter 7. Signal Descriptions 7-15 7.2.5.1 Address Acknowledge (AACK)-Input The address acknowledge (AACK) signal is an input signal (input-only) on the 603e. Following are the state meaning and timing comments for the AACK signal. State Meaning Asserted-Indicates that the address phase of a transaction is complete. The address bus will go to a high impedance state on the next bus clock cycle. The 603e samples ARTRY on the bus clock cycle following the assertion of AACK. Negated-(During ABB) indicates that the address bus and the transfer attributes must remain driven. Timing Comments Assertion-May occur as early as the bus clock cycle after TS is asserted (unless 603e is configured for 1:1 or 1.5:1 clock modes, when AACK can be asserted no sooner than the second cycle following the assertion ofTS-one address wait state); assertion can be delayed to allow adequate address access time for slow devices. For example, if an implementation supports slow snooping devices, an external arbiter can postpone the assertion of AACK. Negation-Must occur one bus clock cycle after the assertion of AACK. 7.2.5.2 Address Retry (ARTRY) The address retry (ARTRY) signal is both an input and output signal on the 603e. 7.2.5.2.1 Address Retry (ARTRY)-Output Following are the state meaning and timing comments for the ARTRY output signal. State Meaning Asserted-Indicates that the 603e detects a condition in which a snooped address tenure must be reLried. If the 603e needs to update memory as a result of the snoop that caused the retry, the 603e asserts BR the second cycle after AACK if ARTRY is asserted. High Impedance-Indicates that the 603e does not need the snooped address tenure to be retried. Timing Comments Assertion-Asserted the third bus cycle following the assertion of TS if a retry is required. Negation-Occurs the second bus cycle after the assertion of AACK. Since this signal may be simultaneously driven by multiple devices, it negates in a unique fashion. First the buffer goes to high impedance for a minimum of one-half processor cycle (dependent on the clock mode), then it is driven negated for one bus cycle before returning to high impedance. This special method of negation may be disabled by setting precharge disable in HIDO. 7-16 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 7.2.5.2.2 Address Retry (ARTRY)-Input Following are the state meaning and timing comments for the ARTRY input signal. State Meaning Asserted-If the 603e is the address bus master, ARTRY indicates that the 603e must retry the preceding address tenure and immediately negate BR (if asserted). If the associated data tenure has already started, the 603e will also abort the data tenure immediately, even if the burst data has been received. If the 603e is not the address bus master, this input indicates that the 603e should immediately negate BR for one bus clock cycle following the assertion of ARTRY by the snooping bus master to allow an opportunity for a copy-back operation to main memory. Note that the subsequent address presented on the address bus may not be the same one associated with the assertion of the ARTRY signal. NegatedlHigh Impedance-Indicates that the 603e does not need to retry the last address tenure. Timing Comments Assertion-May occur as early as the second cycle following the assertion ofTS, and must occur by the bus clock cycle immediately following the assertion of AACK if an address retry is required. Negation-Must occur during the second cycle after the assertion of AACK. 7.2.6 Data Bus Arbitration Signals Like the address bus arbitration signals, data bus arbitration signals maintain an orderly process for determining data bus mastership. Note that there is no data bus arbitration signal equivalent to the address bus arbitration signal BR (bus request), because, except for address-only transactions, TS implies data bus requests. For a detailed description on how these signals interact, see Section 8.4.1, "Data Bus Arbitration." One special signal, DBWO, allows the 603e to be configured dynamically to write data out of order with respect to read data. For detailed information about using DBWO, see Section 8.10, "Using Data Bus Write Only." 7.2.6.1 Data Bus Grant {DBG)-Input The data bus grant (DB G) signal is an input signal (input-only) on the 603e. Following are the state meaning and timing comments for the DBG signal. State Meaning Asserted-Indicates that the 603e may, with the proper qualification, assume mastership ofthe data bus. The 603e derives a qualified data bus grant when DBG is asserted and DBB, DRTRY, andARTRY are negated; that is, the data bus is not busy (DBB is negated), there is no outstanding attempt to retry the current data tenure (DRTRY is ......,=~ negated), and there is no outstanding attempt to perform an ARTRY of the associated address tenure. Negated-Indicates that the 603e must hold off its data tenures. MOTOROLA Chapter 7. Signal Descriptions 7-17 Timing Comments Assertion-May occur any time to indicate the 603e is free to take data bus mastership. It is not sampled until TS is asserted. Negation-May occur at any time to indicate the 603e cannot assume data bus mastership. 7.2.6.2 Data Bus Write Only (DBWO)-Input The data bus write only (DBWO) signal is an input signal (input-only) on the 603e. Following are the state meaning and timing comments for the DBWO signal. State Meaning Asserted-Indicates that the 603e may run the data bus tenure for an outstanding write address even if a read address is pipelined before the write address. Refer to Section 8.10, "Using Data Bus Write Only," for detailed instructions for using DBWO. Negated-Indicates that the 603e must run the data bus tenures in the same order as the address tenures. Timing Comments Assertion-Must occur no later than a qualified DBG for an outstanding write tenure. DBWO is only recognized by the 603e on the clock of a qualified DBG. If no write requests are pending, the 603e will ignore DBWO and assume data bus ownership for the next pending read request. Negation-May occur any time after a qualified DBG and before the next assertion of DBG. 7.2.6.3 Data Bus Busy (DBB) The data bus busy (DBB) signal is both an input and output signal on the 603e. 7.2.6.3.1 Data Bus Busy (DBB)-Output Following are the state meaning and timing comments for the DBB output signal. State Meaning Asserted-Indicates that the 603e is the data bus master. The 603e always assumes data bus mastership if it needs the data bus and is given a qualified data bus grant (see DBG). Negated-Indicates that the 603e is not using the data bus. Timing Comments Assertion-Occurs during the bus clock cycle following a qualified DBG. Negation-Occurs for a minimum of one-half bus clock cycle (dependent on clock mode) following the assertion of the final TA. High Impedance-Occurs after DBB is negated. 7.2.6.3.2 Data Bus Busy (DBB)-Input Following are the state meaning and timing comments for the DBB input signal. Stare Meaning Asserted-Indicates that another device is bus master. Negated-Indicates that the data bus is free (with proper qualification, see DBG) for use by the 603e. 7-18 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Timing Comments Assertion-Must occur when the 603e must be prevented from using the data bus. Negation-May occur whenever the data bus is available. 7.2.7 Data Transfer Signals Like the address transfer signals, the data transfer signals are used to transmit data and to generate and monitor parity for the data transfer. For a detailed description of how the data transfer signals interact, see Section 8.4.3, "Data Transfer." 7.2.7.1 Data Bus (DH[O-31], DL[O-31]) The data bus (DH[0-31] and DL[0-31]) consists of 64 signals that are both input and output on the 603e. Following are the state meaning and timing comments for the DH and DL signals. State Meaning The data bus has two halves-data bus high (DH) and data bus low (DL). See Table 7 -7 for the data bus lane assignments. Timing Comments The data bus is driven once for noncached transactions and four times for cache transactions (bursts). Table 7-7. Data Bus Lane Assignments Data Bus Signals Byte Lane DH[Q-7] 0 DH[8-15] 1 DH[16-23] 2 DH[24-31] 3 DL[Q-7] 4 DL[8-15] 5 DL[16-23] 6 DL[24-31] 7 7.2.7.1.1 Data Bus (DH[O-31], DL[O-31])-Output Following are the state meaning and timing comments for the DH and DL output signals. State Meaning AssertedlNegated-Represents the state of data during a data write. Byte lanes not selected for data transfer will not supply valid data. Timing Comments Assertion/Negation-Initial beat coincides with DBB and, for bursts, transitions on the bus clock cycle following each assertion of TA. High Impedance-Occurs on the bus clock cycle after the final assertion of TA. MOTOROLA Chapter 7. Signal Descriptions 7-19 7.2.7.1.2 Data Bus (DH[O-31], DL[O-31])-lnput Following are the state meaning and timing comments for the DH and DL input signals. State Meaning AssertedlNegated-Represents the state of data during a data read transaction. Timing Comments AssertionlNegation-Data must be valid on the same bus clock cycle that TA is asserted. 7.2.7.2 Data Bus Parity (DP[O-7]) The eight data bus parity (DP[0-7]) signals on the 603e are both output and input signals. 7.2.7.2.1 Data Bus Parity (DP[O-7])-Output Following are the state meaning and timing comments for the DP output signals. State Meaning AssertedlNegated-Represents odd parity for each of 8 bytes of data write transactions. Odd parity means that an odd number of bits, including the parity bit, are driven high. The signal assignments are listed in Table 7-8. Timing Comments AssertionlNegation-The same as DL[0-31]. High Impedance-The same as DL[0-31]. Table 7-8. DP[o-7] Signal Assignments Signal Name Signal ASSignments DPO DH[0-7] DP1 DH[8-15] DP2 DH[16-23] DP3 DH[24-31] DP4 DL[0-7] DP5 DL[8-15] DP6 DL[16-23] DP7 DL[24-31] 7.2.7.2.2 Data Bus Parity (DP[O-7])-lnput Following are the state meaning and timing comments for the DP input signals. State Meaning AssertedlNegated-Represents odd parity for each byte of read data. Parity is checked on all data byte lanes, regardless of the size of the transfer. Detected even parity causes a checkstop if data parity errors are enabled in the HIDO register. (See DPE.) Timing Comments AssertionlNegation-The same as DL[0-31]. 7-20 MPC603e & EC603e RISC Microprocessors User's Manual, MOTOROLA 7.2.7.3 Data Parity Error (DPE)-Output The data parity error (DPE) signal is an output signal (output-only) on the 603e. Note that the (DPE) signal is an open-drain type output, and requires an external pull-up resistor (for example, 10 kQ to Vdd) to assure proper de-assertion of the (DPE) signal. Following are the state meaning and timing comments for the DPE signal. State Meaning Asserted-Indicates incorrect data bus parity. Negated-Indicates correct data bus parity. Timing Comments Assertion-Occurs on the second bus clock cycle after fA is asserted to the 603e, unless TA is cancelled by an assertion of DRTRY. High Impedance-Occurs on the third bus clock cycle after TA is asserted to the 603e. 7.2.7.4 Data Bus Disable (DBDIS)-Input The Data Bus Disable (DBDIS) signal is an input signal (input-only) on the 603e. Following are the state meanings and timing comments for the DBDIS signal. State Meaning Asserted-Indicates (for a write transaction) that the 603e must release data bus and the data bus parity to high impedance during the following cycle. The data tenure will remain active, DBB will remain driven, and the transfer termination signals will still be monitored by the 603e. Negated-Indicates the data bus should remain normally driven. DB DIS is ignored during read transactions. Timing Comments AssertionlNegation-May be asserted on any clock cycle when the 603e is driving, or will be driving the data bus; may remain asserted multiple cycles. 7.2.8 Data Transfer Termination Signals Data termination signals are required after each data beat in a data transfer. Note that in a single-beat transaction, the data termination signals also indicate the end of the tenure, while in burst accesses, the data termination signals apply to individual beats and indicate the end of the tenure only after the final data beat. For a detailed description of how these signals interact, see Section 8.4.4, "Data Transfer Termination." MOTOROLA Chapter 7. Signal Descriptions 7-21 7.2.8.1 Transfer Acknowledge (TA)-Input The transfer acknowledge (TA) signal is an input signal (input-only) on the 603e. Following are the state meaning and timing comments for the TA signal. State Meaning Asserted-Indicates that a single-beat data transfer completed successfully or that a data beat in a burst transfer completed successfully (unless DRTRY is asserted on the next bus clock cycle). Note that TA must be asserted for each data beat in a burst transaction, and must be asserted during assertion of DRTRY. For more information, see Section 8.4.4, "Data Transfer Termination." Negated-(During DBB) indicates that, until TA is asserted, the 603e must continue to drive the data for the current write or must wait to sample the data for reads. Timing Comments Assertion-Must not occur before AACK for the current transaction (if the address retry mechanism is to be used to prevent invalid data from being used by the processor); otherwise, assertion may occur at any time during the assertion of DBB. The system can withhold assertion of TA to indicate that the 603e should insert wait states to extend the duration of the data beat. Negation-Must occur after the bus clock cycle of the final (or only) data beat of the transfer. For a burst transfer, the system can assert TA for one bus clock cycle and then negate it to advance the burst transfer to the next beat and insert wait states during the next beat. (Note: when the 603e is configured for 1:1 clock mode and is performing a burst read into the data cache, the 603e requires one wait state between the assertion of TS and the first assertion of TA for that transaction. If no-DRTRY mode is also selected, the 603e requires two wait states for 1: 1 clock mode, or I wait state for 1.5: 1 clock mode.) 7.2.8.2 Data Retry (DRTRY)-Input The data retry (DRTRY) signal is input only on the 603e. Following are the state meaning and timing comments for the DRTRY signal. State Meaning Asserted-Indicates that the 603e must invalidate the data from the previous read operation. Negated-Indicates that data presented with TA on the previous read operation is valid. Note that DRTRY is ignored for write transactions. Timing Comments Assertion-Must occur during the bus clock cycle immediately after TA is asserted if a retry is required. The DRTRY signal may be held asserted for multiple bus clock cycles. When DRTRY is negated, data must have been valid on the previous clock with TA asserted. 7-22 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Negation-Must occur during the bus clock cycle after a valid data beat. This may occur several cycles after DBB is negated, effectively extending the data bus tenure. Start-up-The DRTRY signal is sampled at the negation of HRESET; ifDRTRY is asserted, No-DRTRY mode is selected. If DRTRY is negated at start-up, DRTRY is enabled. 7.2.8.3 Transfer Error Acknowledge (TEA)-Input The transfer error acknowledge (TEA) signal is input only on the 603e. Following are the state meaning and timing comments for the TEA signal. State Meaning Asserted-Indicates that a bus error occurred. Causes a machine check exception (and possibly causes the processor to enter checkstop state if machine check enable bit is cleared (MSR[ME] = 0)). For more information, see Section 4.5.2.2, "Checkstop State (MSR[ME] =0)." Assertion terminates the current transaction; that is, assertion of TA and DRTRY are ignored. The assertion of TEA causes the negationlhigh impedance ofDBB in the next clock cycle. However, data entering the GPR or the cache are not invalidated. (Note that the term, 'exception,' is also referred to as 'interrupt' in the architecture specification.) Negated-Indicates that no bus error was detected Timing Comments Assertion-May be asserted while DBB is asserted, and the cycle after TA during a read operation. TEA should be asserted for one cycle only. Negation-TEA must be negated no later than the negation of DBB. 7.2.9 System Status Signals Most system status signals are input signals that indicate when exceptions are received, when checkstop conditions have occurred, and when the 603e must be reset. The 603e generates the output signal, CKSTP_OUT, when it detects a checkstop condition. For a detailed description of these signals, see Section 8.7, "Interrupt, Checkstop, and Reset Signals." 7.2.9.1 Interrupt (INT)-Input The interrupt (INT) signal is input only. Following are the state meaning and timing comments for the INT signal. State Meaning Asserted-The 603e initiates an interrupt if MSR[EE] is set; otherwise, the 603e ignores the interrupt. To guarantee that the 603e will take the external interrupt, the INT signal must be held active until the 603e takes the interrupt; otherwise, whether the 603e takes an external interrupt, depends on whether the MSR[EE] bit was set while the INT signal was held active. MOTOROLA Chapter 7. Signal Descriptions 7-23 Negated-Indicates that normal operation should proceed. See Section 8.7.1, "External Interrupts." Timing Comments Assertion-May occur at any time and may be asserted asynchronously to the input clocks. The !NT input is level-sensitive. Negation-Should not occur until interrupt is taken. 7.2.9.2 System Management Interrupt (SMI)-Input The system management interrupt (SMI) signal is input only. Following are the state meaning and timing comments for the SMI signal. State Meaning Asserted-The 603e initiates a system management interrupt operation if the MSR[EE] is set; otherwise, the 603e ignores the exception condition. The 603e must hold the SMI signal active until the exception is taken. Negated-Indicates that normal operation should proceed. See Section 8.7.1, "External Interrupts." Timing Comments Assertion-May occur at any time and may be asserted asynchronously to the input clocks. The SMI input is level-sensitive. Negation-Should not occur until interrupt is taken. 7.2.9.3 Machine Check Interrupt (MCP)-Input The machine check interrupt (MCP) signal is input only on the 603e. Following are the state meaning and timing comments for the MCP signal. State Meaning Asserted-The 603e initiates a machine check interrupt operation if MSR[ME] and HIDO[EMCP] are set; if MSR[ME] is cleared and HIDO[EMCP] is set, the 603e must terminate operation by internally gating off all clocks, and releasing all outputs (except CKSTP_OUT) to the high impedance state. If HIDO[EMCP] is cleared, the 603e ignores the interrupt condition. The MCP signal must be held asserted for 2 bus clock cycles. Negated-Indicates that normal operation should proceed. See Section 8.7.1, "External Interrupts." Timing Comments Assertion-May occur at any time and may be asserted asynchronously to the input clocks. The MCP input is negative edge- sensitive. Negation-May be negated 2 bus cycles after assertion. 7.2.9.4 Checkstop Input (CKSTP_IN)-Input The checkstop input (CKSTP_IN) signal is input only on the 603e. Following are the state meaning and timing comments for the CKSTP_IN signal. State Meaning Asserted-Indicates that the 603e must terminate operation by internally gating off all clocks, and release all outputs (except 7-24 MPC603e & EC603e RiSe Microprocessors User's Manual MOTOROLA CKSTP_OUT) to the high impedance state. Once CKSTP_IN has been asserted it must remain asserted until the system has been reset. Negated-Indicates that normal operation should proceed. See Section 8.7.2, "Checkstops." Timing Comments Assertion-May occur at any time and may be asserted asynchronously to the input clocks. Negation-May occur any time after the CKSTP_OUT output signal has been asserted. 7.2.9.5 Checkstop Output (CKSTP_OUT)-Output The checkstop output (CKSTP_OUT) signal is output only on the 603e. Note that the CKSTP_OUT signal is an open-drain type output, and requires an external pull-up resistor (for example, 10 kO to Vdd) to assure proper de-assertion of the CKSTP_OUT signal. Following are the state meaning and timing comments for the CKSTP_OUT signal. State Meaning Asserted-Indicates that the 603e has detected a checks top condition and has ceased operation. Negated-Indicates that the 603e is operating normally. See Section 8.7.2, "Checkstops." Timing Comments Assertion-May occur at any time and may be asserted asynchronously to the 603e input clocks. Negation-Is negated upon assertion of ~'"""'-=;;- HRESET. 7.2.9.6 Reset Signals There are two reset signals on the 603e-hard reset (HRESET) and soft reset (SRESET). Descriptions of the reset signals are as follows: 7.2.9.6.1 Hard Reset (HRESET)-Input The hard reset (HRESET) signal is input only and must be used at power-on to properly reset the processor. Following are the state meaning and timing comments for the HRESET signal. State Meaning Asserted-Initiates a complete hard reset operation when this input transitions from asserted to negated. Causes a reset exception as described in Section 4.5.1.1, "Hard Reset and Power-On Reset." Output drivers are released to high impedance within five clocks after the assertion of HRESET. Negated-Indicates that normal operation should proceed. See Section 8.7.3, "Reset Inputs." MOTOROLA Chapter 7. Signal Descriptions 7-25 Timing Comments Assertion-May occur at any time and may be asserted asynchronously to the 603e input clock; must be held asserted for a minimum of 255 clock cycles after the PLL lock time has been met. Refer to the appropriate hardware specifications for further timing comments. Negation-May occur any time after the minimum reset pulse width has been met. This input has additional functionality in certain test modes. 7.2.9.6.2 Soft Reset (SRESET)-Input The soft reset (SRESET) signal is input only. Following are the state meaning and timing comments for the SRESET signal. State Meaning Asserted- Initiates processing for a reset exception as described in Section 4.5.1.2, "Soft Reset." Negated-Indicates that normal operation should proceed. See Section 8.7.3, "Reset Inputs." Timing Comments Assertion-May occur at any time and may be asserted asynchronously to the 603e input clock. The SRESET input is negative edge-sensitive. Negation-May be negated 2 bus cycles after assertion. This input has additional functionality in certain test modes. 7.2.9.7 Processor Status Signals Processor status signals indicate the state of the processor. This includes the memory reservation signal, machine quiesce control signals, time base enable signal, and TLBISYl"~C signal. 7.2.9.7.1 Quiescent Request (QREQ) The quiescent request (QREQ) signal is output only. Following are the state meaning and timing comments for the QREQ signal. State Meaning Asserted-Indicates that the 603e is requesting all bus activity normally required to be snooped to terminate or to pause so the 603e may enter a quiescent (low power) state. Once the 603e has entered a quiescent state, it no longer snoops bus activity. Negated-Indicates that the 603e is not making a request to enter the quiescent state. Timing Comments Assertion/Negation-May occur on any cycle. QREQ will remain asserted for the duration of the quiescent state. 7.2.9.7.2 Quiescent Acknowledge (QACK) The quiescent acknowledge (QACK) signal is input only. Following are the state meaning and timing comments for the QACK signal. 7-26 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA State Meaning Asserted-Indicates that all bus activity that requires snooping has terminated or paused, and that the 603e may enter the quiescent (or low power) state. Negated-Indicates that the 603e may not enter a quiescent state, and must continue snooping the bus. Timing Comments AssertionlNegation-May occur on any cycle following the assertion of QREQ, and must be held asserted for a minimum of one bus clock cycle. Start-Up-QACK is sampled at the negation of HRESET to select reduced-pinout mode; if QACK is asserted at start-up, reduced- pinout mode is disabled. 7.2.9.7.3 Reservation (RSRV)-Output The reservation (RSRV) signal is output only on the 603e. Following are the state meaning and timing comments for the RSRV signal. State Meaning AssertedlNegated-Represents the state of the reservation coherency bit in the reservation address register that is used by the lwarx and stwcx. instructions. See Section 8.8.1, "Support for the lwarx/stwcx. Instruction Pair." Timing Comments AssertionlNegation-Occurs synchronously with respect to bus clock cycles. The execution of an lwarx instruction sets the internal reservation condition. 7.2.9.7.4 Time Base Enable (TBEN)-Input The time base enable (TBEN) signal is input only on the 603e. Following are the state meanings and timing comments for the TBEN signal. State Meaning Asserted-Indicates that the time base should continue clocking. This input is essentially a "count enable" control for the time base counter. Negated-Indicates the time base should stop clocking. Timing Comments AssertionlNegation-May occur on any cycle. 7.2.9.7.5 TLBI Sync (TLBISYNC) The TLBI Sync (TLBISYNC) signal is input only on the 603e. Following are the state meanings and timing comments for the TLBISYNC signal. State Meaning Asserted-Indicates that instruction execution should stop after execution of a tlbsync instruction. Negated-Indicates that the instruction execution may continue or resume after the completion of a tlbsync instruction. MOTOROLA Chapter 7. Signal Descriptions 7-27 Timing Comments Assertion/Negation-May occur on any cycle. Start-Up-TLBISYNC is sampled at the negation ofHRESET to select 32-bit data bus mode; ifTLBISYNC is negated at start-up, 32- bit mode is disabled and the default 64-bit mode is selected. 7.2.10 COP/Scan Interface The 603e has extensive on-chip test capability including the following: • Built-in instruction and data cache self test (BIST) • Debug control/observation (COP) • Boundary scan (IEEE 1149.1 compliant interface) • LSSD test control The BIST hardware is not exercised as part of the power-on reset (PaR) sequence. The COP and boundary scan logic are not used under typical operating conditions. Detailed discussion of the 603e test functions is beyond the scope of this document; however, sufficient information has been provided to allow the system designer to disable the test functions that would impede normal operation. The COP/scan interface is shown in Figure 7-2. For more information, see Section 8.9, "IEEE 1149. I-Compliant Interface." ~1 TOI (Test Data Input) - - - - - 1.. "I TMS (Test Mode Seiect) ~ - - - - - 1.. TCK (Test Clock input) .. TOO (Test Data Output) - - -......~I TRST (Test Reset) Figure 7-2. IEEE 1149.1-Compliant Boundary Scan Interface 7.2.11 Pipeline Tracking Support The 603e provides for nonintrusive instruction pipeline tracking. Setting the HIDO[EICE] bit causes the address parity and data parity signals to be redefined as outputs providing pipeline tracking information. These signals toggle at the CPU clock rate and will have special loading and timing requirements when in this mode. 7-28 MPC603e & EC603e RiSe Microprocessors User's Manual MOTOROLA Table 7-9 shows the outputs when HIDO[EICE] is set. Table 7-9. Pipeline Tracking Outputs Bit(s) Function Encoding DP[0-1] Fetch 00 None 01 Two 10 One 11 Branch DP[2-3] Retire 00 None 01 Two 10 One 11 Exception DP[4-5] Fold 00 None 01 First 10 Second 11 Both DP[6-7] Prediction 00 Nonspec 01 Spec_2nd 10 Spec_both 11 Flush_spec AP[0-3] FEA FEA[20-23] Given the object code, these signals provide sufficient information to track instruction execution (except for register indirect branches). Register indirect branches may be tracked either by examining and matching potential target streams (nonintrusive but not always resolvable), or by forcing register indirect branch targets to be fetched externally by setting HIDO[FBIOB]. Setting HIDO[EICE] also enables the processor clock to the CLK_OUT signal which provides a synchronizing clock to the pipeline tracking outputs. 7.2.12 Clock Signals The clock signal inputs of the 603e determine the system clock frequency and provide a flexible clocking scheme that allows the processor to operate at an integer multiple of the system clock frequency. Refer to the appropriate hardware specifications for exact timing relationships of the clock signals. . MOTOROLA Chapter 7. Signal Descriptions 7-29 7.2.12.1 System Clock (SYSCLK)-Input The 603e requires a single system clock (SYSCLK) input. This input sets the frequency of operation for the bus interface. Internally, the 603e uses a phase-locked loop (PLL) circuit to generate a master clock for all of the CPU circuitry (including the bus interface circuitry) which is phase-locked to the SYSCLK input. The master clock may be set to an integer or half-integer multiple (1:1, 1.5:1,2:1,2.5:1,3:1,3.5:1 or 4:1) of the SYSCLK frequency allowing the CPU core to operate at an equal or greater frequency than the bus interface. State Meaning AssertedlNegated-The SYSCLK input is the primary clock input for the 603e, and represents the bus clock frequency for 603e bus operation. Internally, the 603e may be operating at an integer or half- integer multiple of the bus clock frequency. Timing Comments Duty cycle-Refer to the appropriate hardware specifications for timing comments. Note: SYSCLK is used as the frequency reference for the internal PLL clock generator, and must not be suspended or varied during normal operation to ensure proper PLL operation. 7.2.12.2 Test Clock (CLK_OUT)-Output The test clock (CLK_OUT) signal is an output-only signal on the 603e. Following are the state meaning and timing comments for the CLK_OUT signal. State Meaning AssertedlNegated-Provides PLL clock output for PLL testing and monitoring. The CLK_OUT signal clocks at either the processor clock frequency, the bus clock frequency, or the half-bus clock frequency if enabled by the appropriate bits in the HIDO register; the default state of the CLK_OUT signal is high-impedance. The CLK.-OUT signal is provided for testing purposes only_ Timing Comments AssertionlNegation-Refer to the appropriate hardware specifications for timing comments. 7.2.12.3 PLL Configuration (PLL_CFG[O-3])-lnput The PLL (phase-lock loop) is configured by the PLL_CFG[0-3] signals. For a given SYSCLK (bus) frequency, the PLL configuration signals set the internal CPU frequency of operation. Following are the state meaning and timing comments for the PLL_CFG[0-3] signals. State Meaning AssertedlNegated- Configures the operation of the PLL and the internal processor clock frequency. Settings are based on the desired bus and internal frequency of operation. Timing Comments AssertionlNegation-Must remain stable during operation; should only be changed during the assertion of HRESET or during sleep mode. These bits may be read through bits PCO-PC3 in the HID 1 register. 7-30 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table 7-10. PLL Configuration Bus, CPU and PLL Frequencies CPU! Bus Bus Bus Bus Bus Bus Bus PLL_CFG[D-3] SYSCLK 16.6 MHz 20 MHz 25 MHz 33.3 MHz 40 MHz 50 MHz 66.6 MHz Ratio 0000 1:1 - - - - - - 66.6 (133) 0001 1:1 - - - 33.3 40 50 - (133) (160) (200) 0010 1:1 16.6 20 25 - - - - (133) (160) (200) 1100 1.5:1 - - - - - 75 100 (150) (200) 0100 2:1 - - - 66.6 80 100 - (133) (160) (200) 0101 2:1 33.3 40 50 - - - - (133) (160) (200) 0110 2.5:1 - - - 83.3 100 - - (166) (200) 1000 3:1 - - 75 100 - - - (150) (200) 1110 3.5:1 - 70 87.5 - - - - (140) (175) 1010 4:1 66.6 80 100 - - - - (133) (160) (200) 0011 PLLBypass 1111 Clock Off Notes: 1. Some PLL configurations may select bus, CPU, or PLL frequencies which are not useful, not supported, or not tested for by the 603e. For complete and up-to-date information, refer to the appropriate hardware specifications. PLL frequencies, shown in parentheses, should not fall below 133 MHz, and should not exceed 200 MHz. 2. In PLL-bypass mode, the SYSCLK input signal clocks the internal processor directly, and the bus is set for 1:1 mode operation. In clock-off mode, no clocking occurs inside the 603e regardless of the SYSCLK input. MOTOROLA Chapter 7. Signal Descriptions 7-31 7.2.13 Power and Ground Signals The 603e ptovides the following connections for power and ground: • VDD and OVDD-The VDD and OVDD signals provide the connection for the supply voltage. On the 603e, there is no electrical distinction between the VDD and the OVDD signals. • AVDD-The AVDD power signal provides power to the clock generation phase- lock ed loop. See the appropriate hardware specifications for information on how to use this signal. • GND and OGND-The GND and OGND signals provide the connection for grounding the 603e. On the 603e, there is no electrical distinction between the GND and OGND signals. 7-32 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Chapter 8 System Interface Operation This chapter describes the PowerPC 603e microprocessor's bus interface and its operation. It shows how the 603e signals, defined in Chapter 7, "Signal Descriptions," interact to perform address and data transfers. 8.1 Overview The system interface prioritizes requests for bus operations from the instruction and data caches, and performs bus operations per the 603e bus protocol. It includes address register queues, prioritization logic, and bus control unit. The system interface latches snoop addresses for snooping in the data cache and in the address register queues, snoops for direct-store reply operations and for reservations controlled by the Load Word and Reserve Indexed (Iwarx) and Store Word Conditional Indexed (stwcx.) instructions, and maintains the touch load address for the cache. The interface allows one level of pipelining; that is, with certain restrictions discussed later, there can be two outstanding transactions at any given time. Accesses are prioritized with load operations preceding store operations. Instructions are automatically fetched from the memory system into the instruction unit where they are dispatched to the execution units at a peak rate of three instructions per clock. Conversely, load and store instructions explicitly specify the movement of operands to and from the integer and floating-point register files and the memory system. (The EC603e microprocessor does not support the floating-point register files.) When the 603e encounters an instruction or data access, it calculates the logical address (effective address in the architecture specification) and uses the low-order address bits to check for a hit in the on-chip, l6-Kbyte instruction and data caches. During cache lookup, the instruction and data memory management units (MMUs) use the higher-order address bits to calculate the virtual address, from which they calculate the physical address (real address in the architecture specification). The physical address bits are then compared with the corresponding cache tag bits to determine if a cache hit occurred. If the access misses in the corresponding cache, the physical address is used to access system memory. In addition to the loads, stores, and instruction fetches, the 603e performs software table search operations following TLB misses, cache cast-out operations when least-recently used cache lines are written to memory after a cache miss, and cache-line snoop push-out operations when a modified cache line experiences a snoop hit from another bus master. MOTOROLA Chapter 8. System Interface Operation 8-1 Figure 8-1 shows the address path from the execution units and instruction fetcher, through the translation logic to the caches and system interface logic. The 603e uses separate address and data buses and a variety of control and status signals for performing reads and writes. The address bus is 32 bits wide and the data bus can be configured to be 32 or 64 bits wide. The interface is synchronous-all 603e inputs are sampled at and all outputs are driven from the rising edge of the bus clock. The bus can run at the full processor-clock frequency or at an integer division of the processor-clock speed. While the 603e operates at 3.3 volts, all the I/O signals are 5.0 volt TTL-compatible. 8.1.1 Operation of the Instruction and Data Caches The 603e provides independent instruction and data caches. Each cache is a physically- addressed, l6-Kbyte cache with four-way set associativity. Both caches consist of 128 sets of four cache lines , with eight words in each cache line. Because the data cache on the 603e is an on-chip, write-back primary cache, the predominant type of transaction for most applications is burst-read memory operations, followed by burst-write memory operations, direct-store operations, and single-beat (noncacheable or write-through) memory read and write operations. Additionally, there can be address-only operations, variants of the burst and single-beat operations (global memory operations that are snooped, and atomic memory operations, for example), and address retry activity (for example, when a snooped read access hits a modified line in the cache). Since the 603e data cache tags are single ported, simultaneous load or store and snoop accesses cause resource contention. Snoop accesses have the highest priority and are given first access to the tags, unless the snoop access coincides with a tag write, in which case the snoop is retried and must re-arbitrate for access to the cache. Loads or stores that are deferred due to snoop accesses are performed on the clock cycle following the snoop. The 603e supports a three-state coherency protocol that supports the modified, exclusive, and invalid (MEl) cache states. The protocol is a subset of the MESI (modifiedlexclusive/sharedlinvalid) four-state protocol and operates coherently in systems that contain four-state caches. With the exception of the dcbz instruction, the 603e does not broadcast cache control instructions. The cache control instructions are intended for the management of the local cache but not for other caches in the system. Cache lines in the 603e are loaded in four beats of 64 bits each (or eight beats of 32 bits each when operating in 32-bit bus mode). The burst load is performed as "critical double word first." The cache that is being loaded is blocked to internal accesses until the load completes (that is, no hits under misses). The critical double word is simultaneously written to the cache and forwarded to the requesting unit, thus minimizing stalls due to load delays. 8-2 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 64 Bit t SEQUENTIAL 64 Bit BRANCH FETCHER PROCESSING UNIT 164 Bit INSTRUCTION QUEUE EI3 ~64Bit SYSTEM REGISTER UNIT Dispatch Unit I- [II INSTRUCTION UNIT , 64 Bit -= '"""'" ., j 64 Bit ~ .1 64 Bitl 1 64 Bit INTEGER 1+I- GPR File ~ LOA~~~ORE~ FPR File ~ FLOATING- I UNIT PQINTUNIT I PP Rename FP Rename ~ Registers [II I Registers rz::::II I c::RlliJ I~ I FPSCRI I I I I I I _.J 32 Bit COMPLETION UNIT DMMU IMMU § ISRsl~ 64 Bit ISRsl~ I DTLB I ~ IITLBI~ Power Dissipation Time Base Counter/ I Control JTAG/COP Decremente Clock Tags J 16-KbYt e } D Cache Tags 16-Kby1e} I Cache Interface Multiplier i l Touch Load Buffer I PROCESSOR BUS Copyback Buffer J INTERFACE 32-BIT ADDRESS BUS 32-/64-BIT DATA BUS 1 • Note that the EC603e microprocessor does not support the floating-point unit or the floating-point register file. Figure 8-1. Block Diagram MOTOROLA Chapter 8. System Interface Operation 8-3 Cache lines are selected for replacement based on an LRU (least recently used) algorithm. Each time a cache line is accessed, it is tagged as the most recently used line of the set. When a miss occurs, if both lines in the set are marked as valid, the least recently used line is replaced with the new data. When data to be replaced is in the modified state, the modified data is written into a write-back buffer while the missed data is being read from memory. When the load completes, the 603e then pushes the replaced line from the write- back buffer to main memory in a burst write operation. 8.1.2 Operation of the System Interface Memory accesses can occur in single-beat (1-8 bytes) and four-beat (32 bytes) burst data transfers when the 603e is configured with a 64-bit data bus. When the 603e is in the optional 32-bit data bus mode, memory accesses can occur in single-beat (1 to 4 bytes), two-beat (8 bytes), and eight-beat (32 bytes) bursts. The address and data buses are independent for memory accesses to support pipelining and split transactions. The 603e can pipeline as many as two transactions and has limited support for out-of-order split-bus transactions. Access to the system interface is granted through an external arbitration mechanism that allows devices to compete for bus mastership. This arbitration mechanism. is flexible, allowing the 603e to be integrated into systems that implement various fairness and bus- parking procedures to avoid arbitration overhead. 'TYPically, memory accesses are weakly ordered-sequences of operations, including load/store string and multiple instructions, do not necessarily complete in the order they begin-maximizing the efficiency of the bus without sacrificing coherency of the data. The 603e allows load operations to precede store operations (except when a dependency exists). In addition, the 603e can be configured to reorder high-priority store operations ahead of lower-priority store operations. Because the processor can dynamically optimize run-time ordering of load/store traffic, overall performance is improved. Note that the Synchronize (sync) instruction can be used to enforce strong Qrdering. The following sections describe how the 603e interface operates, providing detailed timing diagrams that illustrate how the signals interact. A collection of more general timing diagrams are included as examples of typical bus operations. Figure 8-2 is a legend of the conventions used in the timing diagrams. This is a synchronous interface-all 603e input signals are sampled and output signals are driven on the rising edge of the bus clock cycle (see the PowerPC 603e RISC Microprocessor Hardware Specifications for exact timing information). 8-4 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Bar over signal name indicates active low apO 603e input (while 603e is a bus master) 603e output (while 603e is a bus master) 603e output (grouped: here, address plus attributes) qual BG 603e internal signal (inaccessible to the user, but used in I diagrams to clarify operations) Compelling dependency-event will occur on the next clock cycle Prerequisite dependency-event will occur on an undetermined subsequent clock cycle < > 603e three-state output or input 603e nonsampled input Signal with sample point A sampled condition (dot on high or low state) with multiple dependencies \ \ Timing for a signal had it been asserted (it is not '- _ _ _ _ J actually asserted) Figure 8-2. Timing Diagram Legend 8.1.2.1 Optional 32-Bit Data Bus Mode The 603e supports an optional 32-bit data bus mode. The 32-bit data bus mode operates the same as the 64-bit data bus mode with the exception of the byte lanes involved in the transfer and the number of data beats that are performed. The number of data beats required for a data tenure in the 32-bit data bus mode is one, two, or eight beats depending on the size of the program transaction and the cache mode for the address. For additional information about 32-bit data bus mode, see Section 8.6.1, "32-Bit Data Bus Mode." MOTOROLA Chapter 8. System Interface Operation 8-5 8.1.3 Direct-Store Accesses The 603e does not support the extended transfer protocol for accesses to the direct-store storage space. The transfer protocol used for any given access is selected by the T bit in the MMU segment registers; if the T bit is set, the memory access is a direct-store access. An attempt to access to a direct-store segment will result in the 603e taking a DSI exception. 8.2 Memory Access Protocol Memory accesses are divided into address and data tenures. Each tenure has three phases- bus arbitration, transfer, and termination. The 603e also supports address-only transactions. Note that address and data tenures can overlap, as shown in Figure 8-3. Figure 8-3 shows that the address and data tenures are distinct from one another and that both consist of three phases-arbitration, transfer, and termination. Address and data tenures are independent (indicated in Figure 8-3 by the fact that the data tenure begins before the address tenure ends), which allows split-bus transactions to be implemented at the system level in multiprocessor systems. Figure 8-3 shows a data transfer that consists of a single-beat transfer of as many as 64 bits. Four-beat burst transfers of 32-byte cache lines require data transfer termination signals for each beat of data. ADDRESS TENURE r__------------~A~------------~ ~ ARBITRATION TERMINATION / INDEPENDENT ADDRESS AND DATA \ DATA TENURE ~ _ _ _ _A , - - - - _ r , IARBITRATION ISINGLE-BEAT TRANSFER ITERMINATION I Figure 8-3_ Overlapping Tenures on the Bus for a Single-Beat Transfer 8-6 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA The basic functions of the address and data tenures are as follows: Address tenure - Arbitration: During arbitration, address bus arbitration signals are used to gain mastership of the address bus. - Transfer: After the 603e is the address bus master, it transfers the address on the address bus. The address signals and the transfer attribute signals control the address transfer. The address parity and address parity error signals ensure the integrity of the address transfer. - Termination: After the address transfer, the system signals that the address tenure is complete or that it must be repeated. • Data tenure - Arbitration: To begin the data tenure, the 603e arbitrates for mastership of the data bus. - Transfer: After the 603e is the data bus master, it samples the data bus for read operations or drives the data bus for write operations. The data parity and data parity error signals ensure the integrity of the data transfer. - Termination: Data termination signals are required after each data beat in a data transfer. Note that in a single-beat transaction, the data termination signals also indicate the end of the tenure, while in burst accesses, the data termination signals apply to individual beats and indicate the end of the tenure only after the final data beat. The 603e generates an address-only bus transfer during the execution of the dcbz instruction, which uses only the address bus with no data transfer involved. Additionally, the 603e's retry capability provides an efficient snooping protocol for systems with multiple memory systems (including caches) that must remain coherent. 8.2.1 Arbitration Signals Arbitration for both address and data bus mastership is performed by a central, external arbiter and, minimally, by the arbitration signals shown in Section 7.2.1, "Address Bus Arbitration Signals." Most arbiter implementations require additional signals to coordinate bus master/slave/snooping activities. Note that address bus busy (ABB) and data bus busy (DBB) are bidirectional signals. These signals are inputs unless the 603e has mastership of one or both of the respective buses; they must be connected high through pull-up resistors so that they remain negated when no devices have control of the buses. MOTOROLA Chapter 8. System Interface Operation 8-7 The following list describes the address arbitration signals: • BR (bus request)-Assertion indicates that the 603e is requesting mastership of the address bus. • BG (bus grant)-Assertion indicates that the 603e may, with the proper qualification, assume mastership of the address bus. A qualified bus grant occurs when BG is asserted and ABB and ARTRY are negated. If the 603e is parked, BR need not be asserted for the qualified bus grant. • ABB (address bus busy)-Assertion by the 603e indicates that the 603e is the address bus master. The following list describes the data arbitration signals: • DBG (data bus grant)-Indicates that the 603e may, with the proper qualification, assume mastership of the data bus. A qualified data bus grant occurs when DBG is asserted while DBB, DRTRY, and ARTRY are negated. The DBB signal is driven by the current bus master, DRTRY is only driven from the bus, and ARTRY is from the bus, but only for the address bus tenure associated with the current data bus tenure (that is, not from another address tenure). • DBWO (data bus write only)-Assertion indicates that the 603e may perform the data bus tenure for an outstanding write address even if a read address is pipelined before the write address. If DBWO is asserted, the 603e will assume data bus mastership for a pending data bus write operation; the 603e will take the data bus for a pending read operation if this input is asserted along with DBG and no write is pending. Care must be taken with DBWO to ensure the desired write is queued (for exampie, a cache-line snoop push-out operation). • DBB (data bus busy)-Assertion by the 603e indicates that the 603e is the data bus master. The 603e always assumes data bus mastership if it needs the data bus and is given a qualified data bus grant (see DBG). For more detailed information on the arbitration signals, refer to Section 7.2.1, "Address Bus Arbitration Signals," and Section 7.2.6, "Data Bus Arbitration Signals." 8.2.2 Address Pipelining and Split-Bus Transactions The 603e protocol provides independent address and data bus capability to support pipelined and split-bus transaction system organizations. Address pipelining allows the address tenure of a new bus transaction to begin before the data tenure of the current transaction has finished. Split-bus transaction capability allows other bus activity to occur (either from the same master or from different masters) between the address and data tenures of a transaction. While this capability does not inherently reduce memory latency, support for address pipelining and split-bus transactions can greatly improve effective bus/memory throughput. For this reason, these techniques are most effective in shared-memory multiprocessor 8-8 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA implementations where bus bandwidth IS an important measurement of system performance. External arbitration is required in systems in which multiple devices must compete for the system bus. The design of the external arbiter affects pipelining by regulating address bus grant (BG), data bus grant (DBG), and address acknowledge (AACK) signals. For example, a one-level pipeline is enabled by asserting AACK to the current address bus master and granting mastership of the address bus to the next requesting master before the current data bus tenure has completed. Two address tenures can occur before the current data bus tenure completes. The 603e can pipeline its own transactions to a depth of one level (intraprocessor pipelining); however, the 603e bus protocol does not constrain the maximum number of levels of pipelining that can occur on the bus between multiple masters (interprocessor pipelining). The external arbiter must control the pipeline depth and synchronization between masters and slaves. In a pipelined implementation, data bus tenures are kept in strict order with respect to address tenures. However, external hardware can further decouple the address and data buses, allowing the data tenures to occur out of order with respect to the address tenures. This requires some form of system tag to associate the out-of-order data transaction with the proper originating address transaction (not defined for the 603e interface). Individual bus requests and data bus grants from each processor can be used by the system to implement tags to support interprocessor, out-of-order transactions. The 603e supports a limited intraprocessor out-of-order, split-transaction capability via the data bus write only (DBWO) signal. For more information about using DBWO, see Section 8.10, "Using Data Bus Write Only." 8.3 Address Bus Tenure This section describes the three phases of the address tenure-address bus arbitration, address transfer, and address termination. 8.3.1 Address Bus Arbitration When the 603e needs access to the external bus and it is not parked (BG is negated), it asserts bus request (BR) until it is granted mastership of the bus and the bus is available (see Figure 8-4). The external arbiter must grant master-elect status to the potential master by asserting the bus grant (BG) signal. The 603e requcsting the bus determines that the bus is available when the ABB input is negated. When the address bus is not busy (ABB input is negated), BG is asserted and the address retry (ARTRY) input is negated. This is referred to as a qualified bus grant. The potential master assumes address bus mastership by asserting ABB when it receives a qualified bus grant. MOTOROLA Chapter 8. System Interface Operation 8-9 -1 o Logical Bus Clock Figure 8-4. Address Bus Arbitration External arbiters must allow only one device at a time to be the address bus master. In implementations in which no other device can be a master, BG can be grounded (always asserted) to continually grant mastership of the address bus to the 603e. If the 603e asserts BR before the external arbiter asserts BG, the 603e is considered to be unparked, as shown in Figure 8-4. Figure 8-5 shows the parked case, where a qualified bus grant exists on the clock edge following a need_bus condition. Notice that the bus clock cycle required for arbitration is eliminated if the 603e is parked, reducing overall memory latency for a transaction. The 603e always negates ABB for at least one bus clock cycle after AACK is asserted, even if it is parked and has another transaction pending. Typically, bus parking is provided to the device that was the most recent bus master; however, system designers may choose other schemes such as providing unrequested bus grants in situations where it is easy to correctly predict the next device requesting bus mastership. 8-10 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA -1 o ~B© ~------~--------~~ -;....;----------; Figure 8-5. Address Bus Arbitration Showing Bus Parking When the 603e receives a qualified bus grant, it assumes address bus mastership by asserting ABB and negating the BR output signal. Meanwhile, the 603e drives the address for the requested access onto the address bus and asserts TS to indicate the start of a new transaction. When designing external bus arbitration logic, note that the 603e may assert BR without using the bus after it receives the qualified bus grant. For example, in a system using bus snooping, if the 603e asserts BR to perform a replacement copy-back operation, another device can invalidate that line before the 603e is granted mastership of the bus. Once the 603e is granted the bus, it no longer needs to perform the copy-back operation; therefore, the 603e does not assert ABB and does not use the bus for the copy-back operation. Note that the 603e asserts BR for at least one clock cycle in these instances. 8.3.2 Address Transfer During the address transfer, the physical address and all attributes of the transaction are transferred from the bus master to the slave device(s). Snooping logic may monitor the transfer to enforce cache coherency; see discussion about snooping in Section 8.3.3, "Address Transfer Termination." MOTOROLA Chapter 8. System Interface Operation 8-11 The signals used in the address transfer include the following signal groups: • Address transfer start signal: Transfer start (TS) • Address transfer signals: Address bus (A[0-31]), address parity (AP[O-3]), and address parity error (APE) • Address transfer attribute signals: Transfer type (TT[O-4]), transfer code (TC[O-l]), transfer size (TSIZ[0-2]), transfer burst (TBST), cache inhibit (CI), write-through (WT), global (GBL), and cache set element (CSE[O-l]) Figure 8-6 shows that the timing for all of these signals, except TS and APE, is identical. All of the address transfer and address transfer attribute signals are combined into the ADDR+ grouping in Figure 8-6. The TS signal indicates that the 603e has begun an address transfer and that the address and transfer attributes are valid (within the context of a synchronous bus). The 603e always asserts TS coincident with ABB. As an input, TS need not coincide with the assertion of ABB on the bus (that is, TS can be asserted with, or on, a subsequent clock cycle after ABB is asserted; the 603e tracks this transaction correctly). o 2 3 4 Figure 8-6. Address Bus Transfer In Figure 8-6, the address transfer occurs during bus clock cycles 1 and 2 (arbitration occurs in bus clock cycle 0 and the address transfer is terminated in bus clock 3). In this diagram, the address bus termination input, AACK, is asserted to the 603e on the bus clock following assertion of TS (as shown by the dependency line). This is the minimum duration of the address transfer for the 603e; the duration can be extended by delaying the assertion of AACK for one or more bus clocks. 8-12 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 8.3.2.1 Address Bus Parity The 603e always generates 1 bit of correct odd-byte parity for each of the 4 bytes of address when a valid address is on the bus. The calculated values are placed on the AP[O-3] outputs when the 603e is the address bus master. If the 603e is not the master and TS and GBL are asserted together (qualified condition for snooping memory operations), the calculated values are compared with the AP[O-3] inputs. If there is an error, and address parity checking is enabled (HIDO[EBA] set to 1), the APE output is asserted. An address bus parity error causes a checkstop condition if MSR[ME] is cleared to O. For more information about checkstop conditions, see Chapter 4, "Exceptions." 8.3.2.2 Address Transfer Attribute Signals The transfer attribute signals include several encoded signals such as the transfer type (TT[O-4]) signals, transfer burst (TBST) signal, transfer size (TSIZ[O-2]) signals, and transfer code (TC[O-I]) signals. Section 7.2.4, "Address Transfer Attribute Signals," describes the encodings for the address transfer attribute signals. 8.3.2.2.1 Transfer Type (TT[0-4]) Signals Snooping logic should fully decode the transfer type signals if the GBL signal is asserted. Slave devices can sometimes use the individual transfer type signals without fully decoding the group. For a complete description of the encoding for transfer type signals TT[O-4], refer to Table 8-1 and Table 8-2. 8.3.2.2.2 Transfer Size (TSIZ[0-2]) Signals The transfer size signals (TSIZ[O-2]) indicate the size of the requested data transfer as shown in Table 8-1. The TSIZ[0-2] signals may be used along with TBST andA[29-31] to determine which portion of the data bus contains valid data for a write transaction or which portion of the bus should contain valid data for a read transaction. Note that for a burst transaction (as indicated by the assertion of TBST), TSIZ[O-2] are always set to ObOlO. Therefore, if the TBST signal is asserted, the memory system should transfer a total of eight words (32 bytes), regardless of the TSIZ[O-2] encoding. MOTOROLA Chapter 8. System Interface Operation 8-13 Table 8-1. Transfer Size Signal Encodings TBST TSIZO TSIZ1 TSIZ2 Transfer Size Asserted a 1 a Eight-word burst Negated a a a Eight bytes Negated a a 1 One byte Negated a 1 a Two bytes Negated a 1 1 Three bytes Negated 1 a a Four bytes Negated 1 a 1 Five bytes (N/A) Negated 1 1 a Six bytes (N/A) Negated 1 1 1 Seven bytes (N/A) The basic coherency size of the bus is defined to be 32 bytes (corresponding to one cache line). Data triIDsfers that cross an aligned, 32-byte boundary either must present a new address onto the bus at that boundary (for coherency consideration) or must operate as noncoherent data with respect to the 603e. The 603e never generates a bus transaction with a transfer size of 5 bytes, 6 bytes, or 7 bytes. 8.3.2.3 Burst Ordering During Data Transfers During burst data transfer operations, 32 bytes of data (one cache line) are transferred to or from the cache in order. Burst write transfers are always performed zero double word first, but since burst reads are performed critical double word first, a burst read transfer may not start with the first double word of the cache line, and the cache line fill may wrap around the end of the cache line. This section describes the burst ordering for the 603e when operating in either the 64- or 32-bit bus mode. Table 8-2 describes the burst ordering when the 603e is configured with a 64-bit data bus. Table 8-2. Burst Ordering-64-Bit Bus For Starting Address: Data Transfer A[27-28] =00 A[27-28] =01 A[27-28] =10 A[27-28] =11 First data beat OWO OW1 OW2 OW3 Second data beat OW1 OW2 OW3 OWO Third data beat OW2 OW3 OWO OW1 Fourth data beat OW3 OWO OW1 OW2 Note: A[29-31] are always ObOOO for burst transfers by the 603e. 8-14 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table 8-3 describes the burst ordering when the 603e is configured with a 32-bit bus. Table 8-3. Burst Ordering-32-Bit Bus For Starting Address: Data Transfer A[27-28] = 00 A[27-28] = 01 A[27-28] = 10 A[27-28] = 11 First data beat DWO-U DW1-U DW2-U DW3-U Second data beat DWO-L DW1-L DW2-L DW3-L Third data beat DW1-U DW2-U DW3-U DWO-U Fourth data beat DW1-L DW2-L DW3-L DWO-L Fifth data beat DW2-U DW3-U DWO-U DW1-U Sixth data beat DW2-L DW3-L DWO-L DW1-L Seventh data beat DW3-U DWO-U DW1-U DW2-U Eighth data beat DW3-L DWO-L DW1-L DW2-L Notes: A[29-31] are always ObOOO for burst transfers by the 603e. "U" and "I;' represent the upper and lower word of the double word respectively. 8.3.2.4 Effect of Alignment in Data Transfers (64-Bit Bus) Table 8-4 lists the aligned transfers that can occur on the 603e bus when configured with a 64-bit width. These are transfers in which the data is aligned to an address that is an integer multiple of the size of the data. For example, Table 8-4 shows that 1-byte data is always aligned; however, for a 4-byte word to be aligned, it must be oriented on an address that is a multiple of 4. Table 8-4. Aligned Data Transfers (64-Bit Bus) Data Bus Byte Lane(s) Transfer Size TSIZO TSIZ1 TSIZ2 A[29-31] 0 1 2 3 4 5 6 7 Byte 0 0 1 000 .,j - - - - - - - 0 0 1 001 - .,j - - - - - - 0 0 1 010 - - .,j - - - - - 0 0 1 011 - - - .,j - - - - 0 0 1 100 - - - - .,j - - - 0 0 1 101 - - - - - .,j - - 0 0 1 110 - - - - - - .,j - 0 0 1 111 - - - - - - - .,j MOTOROLA Chapter 8. System Interface Operation 8-15 Table 8-4. Aligned Data Transfers (64-Bit Bus) (Continued) Data Bus Byte Lane(s) Transfer Size TSIZO TSIZ1 TSIZ2 A[2~1] 0 1 2 3 4 5 6 7 Half word 0 1 0 000 .,j .,j - - - - - - 0 1 0 010 - - .,j .,j - - - - 0 1 0 100 - - - - .,j .,j - - 0 1 0 110 - - - - - - .,j .,j Word 1 0 0 000 .,j .,j .,j .,j - - - - 1 0 0 100 - - - - .,j .,j .,j .,j Double word 0 0 0 000 .,j .,j .,j .,j .,j .,j .,j .,j Notes: These entries indicate the byte portions of the requested operand that are read or written during that bus transaction. These entries are not required and are ignored during read transactions and are driven with unde- fined data during all write transactions. The 603e supports misaligned memory operations, although their use may substantially degrade performance. Misaligned memory transfers address memory that is not aligned to the size of the data being transferred (such as, a word read of an odd byte address). Although most of these operations hit in the primary cache (or generate burst memory operations if they miss), the 603e interface supports misaligned transfers within a word (32-bit aligned) boundary, as shown in Table 8-5. Note that the 4-byte transfer in Table 8-5 is only one example of misalignment. As long as the attempted transfer does not cross a word boundary, the 603e can transfer the data on the misaligned address (for example, a half- word read from an odd byte-aligned address). An attempt to address data that crosses a word boundary requires two bus transfers to access the data. Note that an attempt to load or store a floating-point operand that is not word-aligned will result in a floating-point alignment exception. For more information, refer to Section 4.5.6, "Alignment Exception (Ox00600)." Due to the performance degradations associated with misaligned memory operations, they are best avoided. In addition to the double-word straddle boundary condition, the address translation logic can generate substantial exception overhead when the load/store multiple and load/store string instructions access misaligned data. It is strongly recommended that software attempt to align code and data where possible. 8-16 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table 8-5. Misaligned Data Transfers (Four-Byte Examples) Data Bus Byte Lanes Transfer Size TSIZ[o-2] A[29-31] (Four Bytes) 0 1 2 3 4 5 6 7 Aligned 100 000 A A A A - - - - Misaligned-first access 011 001 A A A - - - - second access 001 100 - - - - A - - - Misaligned-first access 010 010 - - A A - - - - second access 011 100 - - - - A A - - Misaligned-first access 001 011 - - - A - - - - second access 011 100 - - - - A A A - Aligned 100 100 - - - - A A A A Misaligned-first access 011 101 - - - - - A A A second access 001 000 A - - - - - - - Misaligned-first access 010 110 - - - - - - A A second access 010 000 A A - - - - - - Misaligned-first access 001 111 - - - - - - - A second access 01 1 000 A A A - - - - - Notes: A: Byte lane used -: Byte lane not used 8.3.2.5 Effect of Alignment in Data Transfers (32-Bit Bus) The aligned data transfer cases for 32-bit data bus mode are shown in Table 8-6. All of the transfers require a single data beat (if caching-inhibited or write-through) except for double-word cases which require two data beats. The double-word case is only generated by the 603e for load or store double operations to/from the floating-point GPRs (not supported on the EC603e microprocessor). All caching-inhibited instruction fetches are performed as word operations. MOTOROLA Chapter 8. System Interface Operation 8-17 Table 8-6. Aligned Data Transfers (32-Bit Bus Mode) Data Bus Byte Lane(s) Transfer Size TSIZO TSIZ1 TSIZ2 A[29-31] 0 1 2 3 4 5 6 7 Byte 0 0 1 000 A - - - x x x x 0 0 1 001 - A x - x x x x 0 0 1 010 - - A - x x x x 0 0 1 011 - - - A x x x x 0 0 1 100 A - - - x x x x 0 0 1 101 - A - - x x x x 0 0 1 110 - - A - x x x x 0 0 1 111 - - - A x x x x Half word 0 1 0 000 A A - - x x x x 0 1 0 010 - - A A x x x x 0 1 0 100 A A - - x x x x 0 1 0 110 - - A A x x x x Word 1 0 0 000 A A A A x x x x 1 0 0 100 A A A A x x x x Double word 0 0 0 000 A A A A x x x x Second beat 0 0 0 000 A A A A x x x x Notes: A: Byte lane used -: Byte lane not used x: Byte lane not used in 32-bit bus mode Misaligned data transfers when the 603e is configured with a 32-bit data bus operate in the same way as when configured with a 64-bit data bus, with the exception that only the DH[0-31] data bus is used. See Table 8-7 for an example of a 4-byte misaligned transfer starting at each possible byte address within a double word. 8-18 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table 8-7. Misaligned 32-Bit Data Bus Transfer (Four-Byte Examples) Data Bus Byte Lanes Transfer Size TSIZ[0-2] A[29-31] (Four Bytes) 0 1 2 3 4 5 6 7 Aligned 100 000 A A A A x x x x Misaligned-first access 011 001 A A A x x x x second access 001 100 A - - - x ·x x x Misaligned-first access 010 010 - - A A x x x x second access 010 100 A A - x x x x x Misaligned-first access 001 011 - - - A x x x x second access 011 100 A A A - x x x x Aligned 100 100 A A A A x x x x Misaligned-first access 011 101 - A A A x x x x second access 001 000 A - - - x x x x Misaligned-first access 010 110 - - A A x x x x second access 010 000 A A - - x x x x Misaligned-first access 001 111 - - - A x x x x second access 011 000 A A A - x x x x Notes: A: Byte lane used Byte lane not used x: Byte lane not used in 32-bit bus mode 8.3.2.5.1 Alignment of External Control Instructions The size of the data transfer associated with the eciwx and ecowx instructions is always 4 bytes. However, if the eciwx or ecowx instruction is misaligned and crosses any word boundary, the 603e will generate two bus operations, each with a size of fewer than 4 bytes. For the first bus operation, bits A[29-31] equal bits 29-31 of the effective address of the instruction, which will be Ob 10 1, Ob 110, or 0b111. The size associated with the first bus operation will be 3, 2, or 1 bytes, respectively. For the second bus operation, bits A[29-31] equal ObOOO, and the size associated with the operation will be 1,2, or 3 bytes, respectively. For both operations, TBST and TSIZ[O-2] are redefined to specify the resource ID (RID). The resource ID is copied from bits 28-31 of the EAR. For eciwxlecowx operations, the state of bit 28 of the EAR is presented by the TBST signal without inversion (if EAR[28] = 1, TBST =1). The size of the second bus operation cannot be deduced from the operation itself; the system must determine how many bytes were transferred on the first bus operation to determine the size of the second operation. MOTOROLA Chapter 8. System Interface Operation 8-19 Furthermore, the two bus operations associated with such a misaligned external control instruction are not atomic. That is, the 603e may initiate other types of memory operations between the two transfers. Also, the two bus operations associated with a misaligned ecowx may be interrupted by an eciwx bus operation, and vice versa. The 603e does guarantee that the two operations associated with a misaligned ecowx will not be interrupted by another ecowx operation; and likewise for eciwx. Because a misaligned external control address is considered a programming error, the system may choose to assert TEA or otherwise cause an exception when a misaligned external control bus operation occurs. (The term exception is referred to interrupt in the architecture specification.) 8.3.2.6 Transfer Code (TC[O-1]) Signals The TCO and TC1 signals provide supplemental information about the corresponding address. Note that the TCx signals can be used with the TT[O-4] and TBST signals to further define the current transaction. Table 8-8 shows the encodings ofthe TCO and TC1 signals. Table 8-8. Transfer Code Encoding TC[0-1] Read Write 00 Data transaction Any write 01 Touch load N/A 10 Instruction fetch N/A 11 (Reserved) N/A 8.3.3 Address Transfer Termination The address tenure of a bus operation is terminated when completed with the assertion of AACK, or retried with the assertion of ARTRY. The 603e does not terminate the address transfer until the AACK (address acknowledge) input is asserted; therefore, the system can extend the address transfer phase by delaying the assertion of AACK to the 603e. Although AACK can be asserted as early as the bus clock cycle following TS (see Figure 8-7), which allows a minimum address tenure of two bus cycles when the 603e clock is configured for 1: 1 (processor clock to bus clock) mode, the ARTRY snoop response cannot be determined in the minimum allowed address tenure period. When in 1:1 or 1.5:1 clock mode, AACK must not be asserted until the third clock of the address tenure (one address wait state) to allow the 603e an opportunity to assert ARTRY on the bus. For other clock configurations (2:1, 2.5:1, 3:1, 3.5:1, and 4:1), the ARTRY snoop response can be determined in the minimum address tenure period, and AACK may be asserted as early as the second bus clock of the address tenure. As shown in Figure 8-7, these signals are asserted for one bus clock cycle, three-stated for half of the next bus clock cycle, driven high till the following bus cycle, and finally three-stated. Note that AACK must be asserted for only one bus clock cycle. 8-20 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA The address transfer can be tenninated with the requirement to retry if ARTRY is asserted anytime during the address tenure and through the cycle following AACK. The assertion causes the entire transaction (address and data tenure) to be rerun. As a snooping device, the 603e asserts ARTRY for a snooped transaction that hits modified data in the data cache that must be written back to memory, or if the snooped transaction could not be serviced. As a bus master, the 603e responds to an assertion of ARTRY by aborting the bus transaction and re-requesting the bus. Note that after recognizing an assertion of ARTRY and aborting the transaction in progress, the 603e is not guaranteed to run the same transaction the next time it is granted the bus due to internal reordering of load and store operations. If an address retry is required, the ARTRY response will be asserted by a bus snooping device as early as the second cycle after the assertion of TS (or until the third cycle following TS if I: 1 or 1.5: 1 processor to bus clock ratio is selected). Once asserted, ARTRY must remain asserted through the cycle after the assertion of AACK. The assertion of ARTRY during the cycle after the assertion of AACK is referred to as a qualified ARTRY. An earlier assertion of ARTRY during the address tenure is referred to as an early ARTRY. As a bus master, the 603e recognizes either an early or qualified ARTRY and prevents the data tenure associated with the retried address tenure. If the data tenure has already begun, the 603e aborts and terminates the data tenure immediately even if the burst data has been received. If the assertion of ARTRY is received up to or on the bus cycle following the first (or only) assertion of TA for the data tenure, the 603e ignores the first data beat, and if it is a load operation, does not forward data internally to the cache and execution units. If ARTRY is asserted after the first (or only) assertion of TA, improper operation of the bus interface may result. During the clock of a qualified ARTRY, the 603e also determines if it should negate BR and ignore BG on the following cycle. On the following cycle, only the snooping master that asserted ARTRY and needs to perform a snoop copy-back operation is allowed to assert BR. This guarantees the snooping master an opportunity to request and be granted the bus before the just-retried master can restart its transaction. Note that a nonclocked bus arbiter may detect the assertion of address bus request by the bus master that asserted ARTRY, and return a qualified bus grant one cycle earlier than shown in Figure 8-7. MOTOROLA Chapter 8. System Interface Operation 8-21 2 3 4 5 6 7 8 ~.~.:- - - - '>til addr BV'-------'L-$ r-'\'---+-_-+----II qualBG .\ Figure 8-7. Snooped Address Cycle with ARTRY 8.4 Data Bus Tenure This section describes the data bus arbitration, transfer, and termination phases defined by the 603e memory access protocol. The phases ofthe data tenure are identical to those of the address tenure, underscoring the symmetry in the control of the two buses. BA.1 Data Bus Arbitration Data bus arbitration uses the data arbitration signal group-DBG, DBWO, and DBB . .Additionally, the combination of TS and TT[0-4] provides information about the data bus request to extemallogic. The TS signal is an implied data bus request from the 603e; the arbiter must qualify TS with the transfer type (TT) encodings to determine if the current address transfer is an address- only operation, which does not require a data bus transfer (see Figure 8-7). lithe data bus is needed, the arbiter grants data bus mastership by asserting the DBG input to the 603e. As with the address bus arbitration phase, the 603e must qualify the DBG input with a number of input signals before assuming bus mastership, as shown in Figure 8-8. 8-22 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA o 2 3 Diaia ~-----+-------=~ _______-+-_ _ _- : Figure 8-8. Data Bus Arbitration A qualified data bus grant can be expressed as the following: QDBG =DBG asserted while DBB, DRTRY, and ARTRY (associated with the data bus operation) are negated. When a data tenure overlaps with its associated address tenure, a qualified ARTRY assertion coincident with a data bus grant signal does not result in data bus mastership (DBB is not asserted). Otherwise, the 603e always asserts DBB on the bus clock cycle after recognition of a qualified data bus grant. Since the 603e can pipeline transactions, there may be an outstanding data bus transaction when a new address transaction is retried. In this case, the 603e becomes the data bus master to complete the previous transaction. 8.4.1.1 Using the DBB Signal The DBB signal should be connected between masters if data tenure scheduling is left to the masters. Optionally, the memory system can control data tenure scheduling directly with DBG. However, it is possible to ignore the DBB signal in the system if the DBB input is not used as the final data bus allocation control between data bus masters, and if the memory system can track the start and end of the data tenure. If DBB is not used to signal the end of a data tenure, DBG is only asserted to the next bus master the cycle before the cycle that the next bus master may actually begin its data tenure, rather than asserting it earlier (usually during another master's data tenure) and allowing the negation of DBB to be the final gating signal for a qualified data bus grant. Even if DBB is ignored in the system, the 603e always recognizes its own assertion of DBB, and requires one cycle after data tenure completion to negate its own DBB before recognizing a qualified data bus grant for another data tenure. If DBB is ignored in the system, it must still be connected to a pull- up resistor on the 603e to ensure proper operation. MOTOROLA Chapter 8. System Interface Operation 8-23 8.4.2 Data Bus Write Only As a result of address pipelining, the 603e may have up to two data tenures queued to perform when it receives a qualified DBG. Generally, the data tenures should be performed in strict order (the same order) as their address tenures were performed. The 603e, however, also supports a limited out-of-order capability with the data bus write only (DBWO) input. When recognized on the clock of a qualified DBG, DBWO may direct the 603e to perform the next pending data write tenure even if a pending read tenure would have normally been performed first. For more information on the operation of DBWO, refer to Section 8.10, "Using Data Bus Write Only." If the 603e has any data tenures to perform, it always accepts data bus mastership to perform a data tenure when it recognizes a qualified DBG. If DBWO is asserted with a qualified DBG and no write tenure is queued to run, the 603e still takes mastership of the data bus to perform the next pending read data tenure. Generally, DBWO should only be used to allow a copy-back operation (burst write) to occur before a pending read operation. If DBWO is used for single-beat write operations, it may negate the effect of the eieio instruction by allowing a write operation to precede a program-scheduled read operation. 8.4.3 Data Transfer The data transfer signals include DH[O-31], DL[0-31], DP[O-7J and DPE. For memory accesses, the DH and DL signals form a 64-bit data path for read and write operations. The 603e transfers data in either single- or four-beat burst transfers when configured with a 64-bit data bus; when configured with a 32-bit data bus, the 603e performs one-, two-, and eight-beat data transfers. Single-beat operations can transfer from 1 to 8 bytes at a time and can be misaligned; set: St:clion 8.3.2.4, "Effect of Alignment in Data Transfers (64-Bit Bus)." Note that the EC603e microprocessor can transfer from 1 to 4 bytes during single- beat operations. Burst operations always transfer eight words and are aligned on eight-word address boundaries. Burst transfers can achieve significantly higher bus throughput than single-beat operations. The type of transaction initiated by the 603e depends on whether the code or data is cacheable and, for store operations whether the cache is considered in write-back or write- through mode, which software controls on either a page or block basis. Burst transfers support cacheable operations only; that is, memory structures must be marked as cacheable (and write-back for data store operations) in the respective page or block descriptor to take advantage of burst transfers. The 603e output TBST indicates to the system whether the current transaction is a single- or four-beat transfer (except during eciwxlecowx transactions, when it signals the state of EAR[28]). A burst transfer has an assumed address order. For load or store operations that miss in the cache (and are marked as cacheable and, for stores, write-back in the MMU), the 603e uses the double-word-aligned address associated with the critical code or data that 8-24 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA initiated the transaction. This minimizes latency by allowing the critical code or data to be forwarded to the processor before the rest of the cache line is filled. For all other burst operations, however, the cache line is transferred beginning with the oct-word-aligned data. The 603e does not directly support dynamic interfacing to subsystems with less than a 64- bit data path. It does, however, provide a static 32-bit data bus mode; for more information, see Section 8.1.2.1, "Optional 32-Bit Data Bus Mode." 8.4.4 Data Transfer Termination Four signals are used to terminate data bus transactions-TA, DRTRY (data retry), TEA (transfer error acknowledge), and ARTRY. The TA signal indicates normal termination of data transactions. It must always be asserted on the bus cycle coincident with the data that it is qualifying. It may be withheld by the slave for any number of clocks until valid data is ready to be supplied or accepted. DRTRY indicates invalid read data in the previous bus clock cycle. DRTRY extends the current data beat and does not terminate it. If it is asserted after the last (or only) data beat, the 603e negates DBB but still considers the data beat active and waits for another assertion ofTA. DRTRY is ignored on write operations. TEA indicates a nonrecoverable bus error event. Upon receiving a final (or only) termination condition, the 603e always negates DBB for one cycle. If DRTRY is asserted by the memory system to extend the last (or only) data beat past the negation of DBB, the memory system should three-state the data bus on the clock after the final assertion of TA, even though it will negate DRTRY on that clock. This is to prevent a potential momentary data bus conflict if a write access begins on the following cycle. The TEA signal is used to signal a nonrecoverable error during the data transaction. It may be asserted on any cycle during DBi3, or on the cycle after a qualified 'fA during a read operation, except when no-DRTRY mode is selected (where no-DRTRY mode cancels checking the cycle after T A). The assertion of TEA terminates the data tenure immediately even if in the middle of a burst; however, it does not prevent incorrect data that has just been acknowledged with TA from being written into the 603e's cache or GPRs. The assertion of TEA initiates either a machine check exception or a checkstop condition based on the setting of the MSR. An assertion of ARTRY causes the data tenure to be terminated immediately if the ARTRY is for the address tenure associated with the data tenure in operation. If ARTRY is connected for the 603e, the earliest allowable assertion of T A to the 603e is directly dependent on the earliest possible assertion of ARTRY to the 603e; see Section 8.3.3, "Address Transfer Termination." If the 603e clock is configured for 1: 1 or 1.5: 1 (processor clock to bus clock ratio) mode and the 603e is performing a burst read into its data cache, at least one wait state must be provided between the assertion of TS and the first assertion of T A for that transaction. If no-DRTRY mode is also selected, at least two wait states must be provided. The wait states are required due to possible resource contention in the data cache caused by a block MOTOROLA Chapter 8. System Interface Operation 8-25 replacement (or cast-out) required in connection with the new linefill. These waits states may be provided by withholding the assertion of TA to the 603e for that data tenure, or by withholding DBG to the 603e thereby delaying the start of the data tenure. This restriction applies only to burst reads into the data cache when configured in 1: 1 or 1.5: 1 clock modes. (It does not apply to instruction fetches, write operations, noncachable read operations, or non-I:1 or 1.5:1 clock modes.) 8.4.4.1 Normal Single-Beat Termination Normal termination of a single-beat data read operation occurs when TA is asserted by a responding slave. The TEA and DRTRY signals must remain negated during the transfer (see Figure 8-9). o 2 3 4 rn '-,------" 5l(,--------~ data AACK -----+----+-.j\~_ _-+';/ l-! Figure 8-9. Normal Single-Beat Read Termination 8-26 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA The DRTRY signal is not sampled during data writes, as shown in Figure 8-10. o 2 3 data: ta~~~Im~~~~~~~~ I • I I • I I I • • drtry ;£);~;~~~~~;t{%f;f,~~~;:;.l1j~':;R~~i~;~]rf;;,\:gf:\Mai~;ji:(~;~,:'r;1i~~J~~W~*,~~~[i'.;, • I . I , I I I , , • AACK ! Figure 8-10. Normal Single-Beat Write Termination Normal termination of a burst transfer occurs when TA is asserted for four bus clock cycles, as shown in Figure 8-11. The bus clock cycles in which T A is asserted need not be consecutive, thus allowing pacing of the data transfer beats. For read bursts to terminate successfully, TEA and DRTRY must remain negated during the transfer. For write bursts, TEA must remain negated for a successful transfer. DRTRY is ignored during data writes. 2 3 4 5 6 7 Figure 8-11. Normal Burst Transaction MOTOROLA Chapter 8. System Interface Operation 8-27 For read bursts, DRTRY may be asserted one bus clock cycle after TA is asserted to signal that the data presented with TA is invalid and that the processor must wait for the negation of DRTRY before forwarding data to the processor (see Figure 8-12). Thus, a data beat can be terminated by a predicted branch with fA and then one bus clock cycle later confirmed with the negation of DRTRY. The DRTRY signal is valid only for read transactions. TA must be asserted on the bus clock cycle before the first bus clock cycle of the assertion of DRTRY; otherwise the results are undefined. The DRTRY signal extends data bus mastership such that other processors cannot use the data bus until DRTRY is negated. Therefore, in the example in Figure 8-12, DBB cannot be asserted until bus clock cycle 5. This is true for both read and write operations even though DRTRY does not extend bus mastership for write operations. 2 3 4 5 -' drtry: Figure 8-12. Termination with DRTRY Figure 8-13 shows the effect of using DRTRY during a burst read. It also shows the effect of using TA to pace the data transfer rate. Notice that in bus clock cycle 3 of Figure 8-13, TA is negated for the second data beat. The 603e data pipeline does not proceed until bus clock cycle 4 when the TA is reasserted. Note that DRTRY is useful for systems that implement predicted forwarding of data such as those with direct-mapped, second-level caches where hit/miss is determined on the following bus clock cycle, or for parity- or ECC-checked memory systems. Note that DRTRY may not be implemented on other PowerPC processors. 8-28 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 8.4.4.2 Data Transfer Termination Due to a Bus Error The TEA signal indicates that a bus error occurred. It may be asserted while DBB (and/or DRTRY for read operations) is asserted. Asserting TEA to the 603e terminates the transaction; that is, further assertions of TA and DRTRY are ignored and DBB is negated; see Figure 8-13. 2 3 4 5 6 7 8 9 Figure 8-13. Read Burst with TA Wait States and DRTRY Assertion of the TEA signal causes a machine check exception (and possibly a checkstop condition within the 603e). For more information, see Section 4.5.2, "Machine Check Exception (Ox00200)." Note also that the 603e does not implement a synchronous error capability for memory accesses. This means that the exception instruction pointer does not point to the memory operation that caused the assertion of TEA, but to the instruction about to be executed (perhaps several instructions later). However, assertion of TEA does not invalidate data entering the GPR or the cache. Additionally, the corresponding address of the access that caused TEA to be asserted is not latched by the 603e. To recover, the exception handler must determine and remedy the cause of the TEA, or the 603e must be reset; therefore, this function should only be used to flag fatal system conditions to the processor (such as parity or uncorrectable ECC errors). After the 603e has committed to run a transaction, that transaction must eventually complete. Address retry causes the transaction to be restarted; TA wait states and DRTRY assertion for reads delay termination of individual data beats. Eventually, however, the system must either terminate the transaction or assert the TEA signal (and vector the 603e into a machine check exception.) For this reason, care must be taken to check for the end of physical memory and the location of certain system facilities to avoid memory accesses that result in the generation of machine check exceptions. MOTOROLA Chapter 8. System Interface Operation 8-29 Note thatTEA generates a machine check exception depending on the ME bit in the MSR. Clearing the machine check exception enable control bits leads to a true checks top condition (instruction execution halted and processor clock stopped). 8.4.5 Memory COherency-MEl Protocol The 603e provides dedicated hardware to provide memory coherency by snooping bus transactions. The address retry capability enforces the three-state, MEl cache-coherency protocol (see Figure 8-14). The global (GBL) output signal indicates whether the current transaction must be snooped by other snooping devices on the bus. Address bus masters assert GBL to indicate that the current transaction is a global access (that is, an access to memory shared by more than one device). If GBL is not asserted for the transaction, that transaction is not snooped. When other devices detect the GBL input asserted, they must respond by snooping the broadcast address. Normally, GBL reflects the M bit value specified for the memory reference in the corresponding translationdescriptor(s). Note that care must be taken to minimize the number of pages marked as global, because the retry protocol discussed in the previous section is used to enforce coherency and can require significant bus bandwidth. When the 603e is not the address bus master, GBL is an input. The 603e snoops a transaction if TS and GBL are asserted together in the same bus clock cycle (this is a qualified snooping condition). No snoop update to the 603e cache occurs if the snooped transaction is not marked global. This includes invalidation cycles. When the 603e detects a qualified snoop condition, the address associated with the TS is compared against the data cache tags. Snooping completes if no hit is detected. If, however, the address hits in the cache, the 603e reacts according to the MEl protocol shown in Figure 8-14, assuming the WIM bits are set to write-back, caching-allowed, and coherency- enforced modes (WIM = 001). The 603e's on-chip data cache is implemented as a four-way set-associative cache. To facilitate external monitoring of the internal cache tags, the cache set entry (CSE[O-l]) signals indicate which cache set is being replaced on read operations. Note that these signals are valid only for 603e burst operations; for all other bus operations, the CSE[O-I] signals should be ignored. 8-30 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA BUS TRANSACTIONS SH = Snoop Hit CD = Snoop Push RH = Read Hit WH = Write Hit WM = Write Miss CD = Cache Line Fill RM = Read Miss SH/CRW = Snoop Hit, Cacheable Read/Write SH/CIR = Snoop Hit, Cache Inhibited Read Figure 8-14. MEl Cache Coherency Protocol-State Diagram (WIM = 001) Table 8-9 shows the CSE encodings. Table 8-9. CSE[0-1] Signals CSE[o-1] Cache Set Element 00 Set 0 01 Set 1 10 Set 2 11 Set 3 MOTOROLA Chapter 8. System Interface Operation 8-31 8.5 Timing Examples This section shows timing diagrams for various scenarios. Figure 8-15 illustrates the fastest single-beat reads possible for the 603e. This figure shows both minimal latency and maximum single-beat throughput. By delaying the data bus tenure, the latency increases, but, because of split-transaction pipelining, the overall throughput is not affected unless the data bus latency causes the third address tenure to be delayed. Note that all bidirectional signals are three-stated between bus tenures. 1 1 213141516 7 1 8 1 9 10 11 12 ''--__---'7 ''--_----'7 Fi=i,iC;:;1."---:----=''----7_I",";=====''l SG t''---T-=P'=i;''':''''''=i,L,=lJ",,;, ASS: , fT\ !f\'---+-----+--1! TS: L0 : Ll.J ! LL! A[0-31]~!-+-CJ:C~PU~AC::>---+--< :CPUA: >---+--+-< Read >-+---+--<=:~CP~U~A:=>-T--+-~ TT[Q-4] ~--+-{=S~BW~:J>--+--' >---+--< : SBW : GBL;0r"1;,;<,J,"~ AACK! ARTRY: I:"'/;~',;!, ,4', ': i\ r '::<:'\\ i;,'{':""/ ,"':;;/,':>1,', "';"i DBB: W-! W-! '---l.J D[Q--63] --;--~~f--T---T--i~f--';""---"-<@f----+---------- ;.-.! TA ?\t;~,l\\f";)f'{i't~';A ht;."'''''' iF"\ k", j ''.\ f!,\,)i'[ t':;:;~fi:;t!>j DRTRy~:--~'~~---+--~:--~--+---+---~~f--~---+--~ TEA: 1 1 6 1 7 8 1 9 1 10 11 12 Figure 8-16. Fastest Single-Beat Writes MOTOROLA Chapter 8. System Interface Operation 8-33 Figure 8-17 shows three ways to delay single-beat reads showing data-delay controls: • The TA signal can remain negated to insert wait states in clock cycles 3 and 4. • For the second access, DBG could have been asserted in clock cycle 6. • In the third access, DRTRY is asserted in clock cycle 11 to flush the previous data. Note that all bidirectional signals are three-stated between bus tenures. The pipelining shown in Figure 8-17 can occur if the second access is not another load (for example, an instruction fetch). I 1 I 2 3 I 4 I 5 I 6 7 I 8 I 9 10 11 12 13 I 14 I BR~ cb cb : BG ~ : @'f;,~;li";Ult!ili,i§'l : L!F'~ili~lR!{I'~"'\ : #!li!IJ.?;!li+\Wi~lq : ABB I I \ I I r-+-"\ I r+"\ I I I I I I I I I I I I fS: : ~: : ~ :~ : A[0-31]I I CPUA)---+--{ CPUA >--y CPUA I I I I I I TT[O-4] I I Read >---+---< Read >---+-< Read I I I I I I TBST I I I I I I I GBL ~iiii;t~. M!!!a.~l rm~!Ji1 (0\mJsJ!I~~~I:1!i;!'%§~ AACK: : :~: y~~ ARTRY I I I I I I I I I I I I I I OBG ' &1111##;\ AI,IjIWltltlilll'SIII, \ , . I 135:~-~,~IE'l![~m'!'!!;if:tl:;lilmm'i!l:1l11171.1-.I"§!rnrn!,:'m;g~;:,_,.rn!'~ I I I I I I I I I I I I OBBI \ I I 1/ ~ I I I I I I I 0[0-63]1----+--1---+--+--< In I I I I I I I I I I TA .il!'jl~I" \\...-I-_._'I'1"l~m_!2_il.!',_1i1'----l_~_" '.;w/:m'----I--~I~.-m-', ""'._1&1"",;~"",!tI,=;:I_t~iI''''''lij I I I I I ORTRY I I I I I TEA~I-~I--+I-~-~-~-+I-~I-~-~--+--+--~~-~ I 1 6 I 7 I 8 I 9 10 11 12 13 14 Figure 8-17. Single-Beat Reads Showing Data-Delay Controls 8-34 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Figure 8-18 shows data-delay controls in a single-beat write operation. Note that all bidirectional signals are three-stated between bus tenures. Data transfers are delayed in the following ways: • The TA signal is held negated to insert wait states in clocks 3 and 4. • In clock 6, DBG is held negated, delaying the start of the data tenure. The last access is not delayed (DRTRY is valid only for read operations). I 1 2 I 3 I 4 I 5 6 I 7 I 8 I 9 I 10 11 12 ' ---'---.--' ',---.--.....-J' ,'----~--- I A[0-31] ~-+-C~:C~PU~A::J>-+--< :CPUA: >---+--<=::C~P~UA~:::J-+-+-~ ~t:i;,j;~,;tZl~~;,vJAi1: ,, ,, ,, ARTRY! OBG ~j~~lt~\ ,'---+ .-. . ........ "i"':"_--+....../i_ll"i"'~"ffi_I_ , , , .'T'"'·. ·.·_·,.·""""i. , OBBl \ ~ 0[0-63] ;~---+--+-{=:=~o~ut=::=}--t---t-C§}---l--{E)I"--7-~ \'---i---"1i.",,8iiii!'·~;~d··'~.rt.llilIi;;~,"!,31l:l111'L..-~~"" ...~· "!I'":' 'a:·---t......&'... I&"""'i¥~ lIli!':!ditj... , , I 1 7 I 8 I 9 10 I 11 12 Figure 8-18. Single-Beat Writes Showing Data Delay Controls MOTOROLA Chapter 8. System Interface Operation 8-35 Figure 8-19 shows the use of data-delay controls with burst transfers. Note that all bidirectional signals are three-stated between bus tenures. Note the following: • The first data beat of bursted read data (clock 0) is the critical quad word. • The write burst shows the use of TA signal negation to delay the third data beat. • The final read burst shows the use of DRTRY on the third data beat. • The address for the third transfer is delayed until the first transfer completes. r0 l6 i,'-__--'. '1-_-"---'; I I I I I SR 7: BG :\I-T-"_""'" """-'-+--+-+L_il"'P~p,1 /'P""'"-T-----f-""lli).",;," A[0-31] TT[0-4] Write Read AACK: ARTRY: DM~ : A~~~" .~~~ ar~..~ , DBB: i G,-+-i-l--l--l--l-':G : • I I I • I I I I I • • : I"'Ti I • I I I I 0[0-63] :-.:---+~~In~o~~~~ . , TAja. DRTRY: \.J) TEA~:~~~~~~~--~~~~~--~~~-+~~+-~~,--. Figure 8-19. Burst Transfers with Data Delay Controls 8-36 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Figure 8-20 shows the use of the TEA signal. Note that all bidirectional signals are three- stated between bus tenures. Note the following: • The first data beat of the read burst (in clock 0) is the critical quad word. • The TEA signal truncates the burst write transfer on the third data beat. • The 603e eventually causes an exception to be taken on the TEA event. 1112131415161718191101111121131141151161171 ABB: TS: A[0-31] ; TT[O-4] : AACK: ARTRY! OBG ~ I; F,I;:;"';"';'""'" "',":,')};, 1;;;;"'"' ':C;;', t"":~"~~~,: OBB ! " :m :fT\~---7----7-----7"':1:-: ,, ,, 0[0-63]:--;~--:-~~~~~ TA 1,h~~;) ,;i;A :0 :0 ORTRY: TEA: 1 1 1 2 1 3 14 1 5 1 6 1 7 8 9 10 111 12 13 14 15 16 117 1 Figure 8-20. Use of Transfer Error Acknowledge (TEA) MOTOROLA Chapter 8. System Interface Operation 8-37 8.6 Optional Bus Configurations The 603e supports three optional bus configurations that are selected by the assertion or negation of DRTRY, TLBISYNC, and QACK signals during the negation of the HRESET signal. The operation and selection of the optional bus configurations are described in the following sections. 8.6.1 32-Bit Data Bus Mode The 603e supports an optional 32-bit data bus mode. The 32-bit data bus mode operates the same as the 64-bit data bus mode with the exception of the byte lanes involved in the transfer and the number of data beats that are performed. When in 32-bit data bus mode, only byte lanes 0 through 3 are used corresponding to DHO-DH31 and DPO-DP3. Byte lanes 4 through 7 corresponding to DLO-DL31 and DP4-DP7 are never used in this mode. The unused data bus signals are not sampled by the 603e during read operations, and they are driven low during write operations. The number of data beats required for a data tenure in the 32-bit data bus mode is one, two, or eight beats depending on the size of the program transaction and the cache mode for the address. Data transactions of one or two data beats are performed for caching-inhibited load/store or write-through store operations. These transactions do not assert the TBST signal even though a two-beat burst may be performed (having the same TBST and TSIZ[O-2] encodings as the 64-bit data bus mode). Single-beat data transactions are performed for bus operations of 4 bytes or less, and double-beat data transactions are performed for 8-byte operations only. The 603e only generates an 8-byte operation for a double-word-aligned load or store double operation to or from the floating-point GPRs (not supported on the EC603e microprocessor). All cache-inhibited instruction fetches are performed as word (single-beat) operations. Data transactions of eight data beats are performed for burst operations that load into or store from the 603e's internal caches. These transactions transfer 32 bytes in the same way as in 64-bit data bus mode, asserting the TBST signal, and signaling a transfer size of 2 (TSIZ(O-2) = ObOlO). The same bus protocols apply for arbitration, transfer, and termination of the address and data tenures in the 32-bit data bus mode as they apply to the 64-bit data bus mode. Late ARTRY cancellation of the data tenure applies on the bus clock after the first data beat is acknowledged (after the first TA) for word or smaller transactions, or on the bus clock after the second data beat is acknowledged (after the second TA) for double-word or burst operations (or coincident with respective TA if no-DRTRY mode is selected). An example of an eight-beat data transfer while the 603e is in 32-bit data bus mode is shown in Figure 8-21. 8-38 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA , , , TS!i-----(-h ABB~ ADDR:~ , , , >----: TBSTi~ AACKi~ ARTRY: : I DBB! DH[Q-31]: TA: DRTAY: ~~ : __~__~____~__~__~__~__~__~v---: f\:e~ I : ""':~""':~~~ I :,,! ~ G~ ~ 'F~ sr\~~~. • I ~, , :~t=~ES: : • I , I I • I I 1 • I I I I TEA: Figure 8-21. 32-Bit Data Bus Transfer (Eight-Beat Burst) An example of a two-beat data transfer (with DRTRY asserted during each data tenure) is shown in Figure 8-22, I I I I I TS~ ABB~ ADDR~ , ~ TBST~ AACK~ , , , , ---'--~--- ,'---+-----+---.;.--....;1 DH[O-31] TA ~~~: ,~,,: DRTRY '~ : : ~:---- TEA • Figure 8-22. 32-Bit Data Bus Transfer (Two-Beat Burst with DRTRY) , The 603e selects 64-bit or 32-bit data bus mode at startup by sampling the state of the TLBISYNC signal at the negation of HRESET. If the TLBISYNC signal is negated at the negation of HRESET, 64-bit data mode is entered by the 603e. If TLBISYNC is asserted at the negation of HRESET, 32-bit data mode is entered. MOTOROLA Chapter 8. System Interface Operation 8-39 8.6.2 No-DRTRY Mode The 603e supports an optional mode to disable the use of the data retry function provided through the DRTRY signal. The no-DRTRY mode allows the forwarding of data during load operations to the internal CPU one bus cycle sooner than in the normal bus protocol. The PowerPC bus protocol specifies that, during load operations, the memory system normally has the capability to cancel data that was read by the master on the bus cycle after TAwas asserted. In the 603e implementation, this late cancellation protocol requires the 603e to hold any loaded data at the bus interface for one additional bus clock to verify that the data is valid before forwarding it to the internal CPU. For systems that do not implement the DRTRY function, the 603e provides an optional no-DRTRY mode that eliminates this one-cycle stall during all load operations, and allows for the forwarding of data to the internal CPU immediately when fA is recognized. When the 603e is in the no-DRTRY mode, data can no longer be cancelled the cycle after it is acknowledged by an assertion of TA. Data is immediately forwarded to the CPU internally, and any attempt at late cancellation by the system may cause improper operation by the 603e. When the 603e is following normal bus protocol, data may be cancelled the bus cycle after TA by either of two means-late cancellation by DRTRY, or late cancellation by ARTRY. When no-DRTRY mode is selected, both cancellation cases must be disallowed in the system design for the bus protocol. When no-DRTRY mode is selected for the 603e, the system must ensure that DRTRY will not be asserted to the 603e. If it is asserted, it may cause improper operation of the bus interface. The system must also ensure that an assertion of ARTRY by a snooping device must occur before or coincident \vith the first assertion of TA to the 603e, but not on the cycle after the first assertion of T A. Other than the inability to cancel data that was read by the master on the bus cycle after TA was asserted, the bus protocol for the 603e is identical to that for the basic transfer bus protocols described in this chapter, as well asfor 32-bit data bus mode. The 603e selects the desired DRTRY mode at startup by sampling the state ofthe DRTRY signal itself at the negation of the HRESET signal. If the DRTRY signal is negated at the negation of HRESET, normal operation is selected. If the DRTRY signal is asserted at the negation of HRESET, no-DRTRY mode is selected. 8.6.3 Reduced-Pinout Mode The 603e provides an optional reduced-pinout mode. This mode idles the switching of numerous signals for reduced power consumption. The DL[0-31], DP[0-7], AP[O-3], APE, DPE, and RSRV signals are disabled when the reduced-pinout mode is selected. Note that the 32-bit data bus mode is implicitly selected when the reduced-pinout mode is enabled. 8-40 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA When in the reduced-pinout mode, the bidirectional and output signals disabled are always driven low during the periods when they would normally have been driven by the 603e. The open-drain outputs (APE and DPE) are always three-stated. The bidirectional inputs are always turned-off at the input receivers of the 603e and are not sampled. The 603e selects either full-pinout or reduced-pinout mode at startup by sampling the state of the QACK signal at the negation of HRESET. If the QACK signal is asserted at the negation of HRESET, full-pinout mode is selected by the 603e. If QACK is negated at the negation of HRESET, reduced-pinout mode is selected. 8.7 Interrupt, Checkstop, and Reset Signals This section describes external interrupts, checks top operations, and hard and soft reset inputs. 8.7.1 External Interrupts The external interrupt input signals (INT, SMI and MCP) of the 603e eventually force the processor to take the external interrupt vector, or the system management interrupt vector if the MSR[EE] is set, or the machine check interrupt if the MSR[ME] bit and the HIDO[EMCP] bit are set. 8.7.2 Checkstops The 603e has two checkstop input signals-CKSTP_IN (non-maskable) and MCP (enabled when MSR[ME] is cleared, and HIDO[EMCP] is set), and a checkstop output (CKSTP_OUT). If CKSTP_IN or MCP is asserted, the 603e halts operations by gating off all internal clocks. The 603e asserts CKSTP_OUT if CKSTP_IN is asserted. If CHECKSTOP is asserted by the 603e, it has entered the checkstop state, and processing has halted internally. The CHECKS TOP signal can be asserted for various reasons including receiving a TEA signal and detection of external parity errors. For more information about checkstop state, see Section 4.5.2.2, "Checkstop State (MSR[ME] = 0)." 8.7.3 Reset Inputs The 603e has two reset inputs, described as follows: • HRESET (hard reset)-The HRESET signal is used for power-on reset sequences, or for situations in which the 603e must go through the entire cold-start sequence of internal hardware initializations. • SRESET (soft reset)-The soft reset input provides warm reset capability. This input can be used to avoid forcing the 603e to complete the cold start sequence. When either reset input is negated, the processor attempts to fetch code from the system reset exception vector. The vector is located at offset OxOO 100 from the exception prefix (all zeros or ones, depending on the setting of the exception prefix bit in the machine state register (MSR[IP]). The IP bit is set for HRESET. MOTOROLA Chapter 8. System Interface Operation 8-41 8.7.4 System Quiesce Control Signals The system quiesce control signals (QREQ and QACK) allow the processor to enter a low power state, and bring bus activity to a quiescent state in an orderly fashion. The system quiesce state is entered by asserting the QREQ signal. This signal allows the system to terminate or pause any bus activities that are normally snooped. When the system is ready to enter the system quiesce state, it asserts the QACK signal. At this time the 603e may enter a quiescent (low power) state. When the 603e is in the quiescent state, it stops snooping bus activity. 8.8 Processor State Signals This section describes the 603e's support for atomic update and memory through the use of the lwarxlstwcx. opcode pair, and includes a description of the 603e TLBISYNC input. 8.8.1 Support for the Iwarxlstwcx. Instruction Pair The Load Word and Reserve Indexed (lwarx) and the Store Word Conditional Indexed (stwcx.) instructions provide a means for atomic memory updating. Memory can be updated atomically by setting a reservation on the load and checking that the reservation is still valid before the store is performed. In the 603e, the reservations are made on behalf of aligned, 32-byte sections of the memory address space. The reservation (RSRV) output signal is driven synchronously with the bus clock and reftectsthe status of the reservation coherency bit in the reservation address register (see Chapter 3, "Instruction and Data Cache Operation," for more information). See Section 7.2.9.7.3, "Reservation (RSRV)-Output," for information about timing. 8.8.2 TLBISYNC Input .The TLBISYNC input allows for the hardware synchronization of changes to MMU tables when the 603e and another DMA master share the same MMU translation tables in system memory. It is asserted by a DMA master when it is using shared addresses that could be changed in the MMU tables by the 603e during the DMA master's tenure. The TLBISYNC input, when asserted to the 603e, prevents the 603e from completing any instructions past a tlbsync instruction. Generally, during the execution of an eciwx or ecowx instruction by the 603e, the selected DMA device should assert the 603e's TLBISYNC signal and maintain it asserted during its DMA tenure if it is using a shared translation address. Subsequent instructions by the 603e should include a sync and tlbsync instruction before any MMU table changes are performed. This will prevent the 603e from making table changes disruptive to the other master during the DMA period. 8-42 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 8.9 IEEE 1149.1-Compliant Interface The 603e boundary-scan interface is a fully-compliant implementation of the IEEE 1149.1 standard. This section describes the 603e IEEE 1149. 1(JTAG) interface. 8.9.1 IEEE 1149.1 Interface Description The 603e has five dedicated JTAG signals which are described in Table 8-10. The TDI and TDO scan ports are used to scan instructions as well as data into the various scan registers for JTAG operations. The scan operation is controlled by the test access port (TAP) controller which in turn is controlled by the TMS input sequence. The scan data is latched in at the rising edge of TCK. Table 8-10. IEEE Interface Pin Descriptions WeakPullup Signal Name Input/Output IEEE 1149.1 Function Provided TOI Input Yes Serial scan input signal TOO Output No Serial scan output signal TMS Input Yes TAP controller mode signal TCK Input Yes Scan clock iRSi Input Yes TAP controller reset TRST is a JTAG optional signal which is used to reset the TAP controller asynchronously. The TRST signal assures that the JTAG logic does not interfere with the normal operation of the chip, and can be asserted coincident with the HRESET. The PID7v-603e implements the JTAG/COP in the same manner as does the PID6-603e implementation with the exception of the introduction of the 33-bit Run_N counter register in which the most-significant 32 bits form a 32-bit counter. The function of the least- significant bit remains unchanged. The Run_N counter is used by the COP to control the number of processor cycles that the processor runs before halting. 8.10 Using Data Bus Write Only The 603e supports split-transaction pipelined transactions. It supports a limited out-of- order capability for its own pipelined transactions through the data bus write only (DBWO) signal. When recognized on the clock of a qualified DBG, the assertion of DBWO directs the 603e to perform the next pending data write tenure (if any), even if a pending read tenure would have normally been performed because of address pipelining. The DBWO signal does not change the order of write tenures with respect to other write tenures from the same 603e. It only allows that a write tenure be performed ahead of a pending read tenure from the same 603e. In general, an address tenure on the bus is followed strictly in order by its associated data tenure. Transactions pipelined by the 603e complete strictly in order. However, the 603e MOTOROLA Chapter 8. System Interface Operation 8-43 can run bus transactions out of order only when the external system allows. the. 603e to perform a cache-line-snoop-push-out operation (or other write transaction, if pending in the 603e write queues) between the address and data tenures of a read operation through the use of DBWO. This effectively envelopes the write operation within the read operation. Figure 8-23 shows how the DBWO signal is used to perform an enveloped write transaction. Write Address (1) (2),...---_ _ L.J LJ Enveloped Write ~ Transaction LJ LJ (2) ,--_ _ _ _ _--, (1)r-_ _ _ _ __ L.J LJ DBB ~~_ _ _ _ _ _~!I~ ______~r- DBWO --u- Figure 8-23. Data Bus Write Only Transaction Note that although the 603e can pipeline any write transaction behind the read transaction, special care should be used when using the enveloped write feature. It is envisioned that most system implementations will not need this capability; for these applications, DBWO should remain negated. In systems \vhere t.ltis capability is needed, DB\"I{O should be asserted under the following scenario: 1. The 603e initiates a read transaction (either single-beat or burst) by completing the read address tenure with no address retry. 2. Then, the 603e initiates a write transaction by completing the write address tenure, with no address retry. 3. At this point, if DBWO is asserted with a qualified data bus grant to the 603e, the 603e asserts DBB and drIves the write data onto the data bus, out of order with respect to the address pipeline. The write transaction concludes with the 603e negating DBB. 4. The next qualified data bus grant signals the 603e to complete the outstanding read transaction by latching the data on the bus. This assertion of DBG should not be accompanied by an asserted DBWO. Any number of bus transactions by other bus masters can be attempted between any of these steps. 8-44 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Note the following regarding DBWO: • DBWO can be asserted if no data bus read is pending, but it has no effect on write ordering. • The ordering and presence of data bus writes is determined by the writes in the write queues at the time BG is asserted for the write address (not DBG). If a particular write is desired (for example, a cache-line-snoop-push-out operation), then BG must be asserted after that particular write is in the queue and it must be the highest priority write in the queue at that time. A cache-line-snoop-push-out operations may be the highest priority write, but more than one may be queued. • Because more than one write may be in the write queue when DBG is asserted for the write address, more than one data bus write may be enveloped by a pending data bus read. The arbiter must monitor bus operations and coordinate the various masters and slaves with respect to the use of the data bus when DBWO is used. Individual DBG signals associated with each bus device should allow the arbiter to synchronize both pipelined and split- transaction bus organizations. Individual DBG and DBWO signals provide a primitive form of source-level tagging for the granting of the data bus. Note that use of the DBWO signal allows some operation-level tagging with respect to the 603e and the use of the data bus. MOTOROLA Chapter 8. System Interface Operation 8-45 8-46 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Chapter 9 Power Management The PowerPC 603e microprocessor is the first microprocessor specifically designed for low-power operation. The 603e provides both automatic and program-controllable power reduction modes for progressive reduction of power consumption. This chapter describes the hardware support provided by the 603e for power management. 9.1 Dynamic Power Management Dynamic power management automatically powers up and down the individual execution units of the 603e, based upon the contents of the instruction stream. For example, if no floating-point instructions are being executed, the floating-point unit is automatically powered down. Power is not actually removed from the execution unit; instead, each execution unit has an independent clock input, which is automatically controlled on a clock-by-clock basis. Since CMOS circuits consume negligible power when they are not switching, stopping the clock to an execution unit effectively eliminates its power consumption. The operation of DPM is completely transparent to software or any external hardware. Dynamic power management is enabled by setting bit 11 in HIDO on power-up, or following HRESET. 9.2 Programmable Power Modes The 603e provides four power modes selectable by setting the appropriate control bits in the machine state register (MSR) and hardware implementation register 0 (HIDO) registers. The four power modes are described briefly as follows: • Full-power-This is the default power state of the 603e. The 603e is fully powered and the internal functional units are operating at the full processor clock speed. If the dynamic power management mode is enabled, functional units that are idle will automatically enter a low-power state without affecting performance, software execution, or external hardware. • Doze-All the functional units of the 603e are disabled except for the time basel decrementer registers and the bus snooping logic. When the processor is in doze mode, an external asynchronous interrupt, a system management interrupt, a decrementer exception, a hard or soft reset, or machine check brings the 603e into MOTOROLA Chapter 9. Power Management 9-1 the full-power state. The 603e in doze mode maintains the PLL in a fully powered state and locked to the system external clock input (SYSCLK) so a transition to the full-power state takes only a few processor clock cycles. • Nap-The nap mode further reduces power consumption by disabling bus snooping, leaving only the time base register and the PLL in a powered state. The 603e returns to the full-power state upon receipt of an external asynchronous interrupt, a system management interrupt, a decrementer exception, a hard or soft reset, or a machine check input (MCP) signal. A return to full-power state from a nap state takes only a few processor clock cycles. • Sleep-Sleep mode reduces power consumption to a minimum by disabling all internal functional units, after which external system logic may disable the PLL and SYSCLK. Returning the 603e to the full-power state requires the enabling of the PLL and SYSCLK, followed by the assertion of an external asynchronous interrupt, a system management interrupt, a hard or soft reset, or a machine check input (MCP) signal after the time required to relock the PLL. The PID7v-603e implementation offers the following enhancements to the 603e family: Lower-power design • 2.S-volt core and 3.3-volt 110 Hardware can enable a power management state through external asynchronous interrupts. The hardware interrupt causes the transfer of program flow to interrupt handler code. The appropriate mode is then set by the software. The 603e provides a separate interrupt and interrupt vector for pow'er ffiatiagement-the syste111 111anagenlent interrupt (Slv1I). The 603e also contains a decrement timer which allows it to enter the nap or doze mode for a predetermined amount of time and then return to full po\ver operation through the decrementer interrupt exception. Note that the 603e cannot switch from one power management mode to another without first returning to full-on mode. The nap and sleep modes disable bus snooping; therefore, a hardware handshake is provided to ensure coherency before the 603e enters these power management modes. Table 9-1 summarizes the four power states. 9-2 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table 9-1. Programmable Power Modes Full-Power Wake Up PM Mode Functioning Units Activation Method Method Full power All units active - - Full power Requested logic by By instruction dispatch - (with DPM) demand Doze • Bus snooping Controlled by SW External asynchronous • Data cache as needed exceptions * • Decrementer timer Decrementer interrupt Reset Nap Decrementer timer Controlled by hardware External asynchronous and software exceptions Decrementer interrupt Reset Sleep None Controlled by hardware External asynchronous and software exceptions Reset 9.2.1 Power Management Modes The following sections describe the characteristics of the 603e's power management modes, the requirements for entering and exiting the various modes, and the system capabilities provided by the 603e while the power management modes are active. 9.2.1.1 Full-Power Mode with DPM Disabled Full-power mode with DPM disabled power mode is selected when the OPM enable bit (bit 11) in HIOO is cleared. • Default state following power-up and HRESET • All functional units are operating at full processor speed at all times 9.2.1.2 Full-Power Mode with DPM Enabled Full-power mode with DPM enabled (HID0[11] = 1) provides on-chip power management without affecting the functionality or performance of the 603e. • Required functional units are operating at full processor speed • Functional units are clocked only when needed • No software or hardware intervention required after mode is set • Softwarelhardware and performance transparent MOTOROLA Chapter g. Power Management 9-3 9.2.1.3 Doze Mode Doze mode disables most functional units but maintains cache coherency by enabling the bus interface unit and snooping. A snoop hit will cause the 603e to enable the data cache, copy the data back to memory, disable the cache, and fully return to the doze state. • Most functional units disabled • Bus snooping and time base/decrementer still enabled • Doze mode sequence - Set doze bit (HIDO[8] = 1) - 603e enters doze mode after several processor clocks • Several methods of returning to full-power mode - Assert INT, SMI, MCP or decrementer interrupts - Assert hard reset or soft reset • Transition to full-power state takes no more than a few processor cycles • PLL running and locked to SYSCLK 9.2.1.4 Nap Mode The nap mode disables the 603e but still maintains the phase-locked loop (PLL) and the time base/decrementer. The time base can be used to restore the 603e to full-on state after a programmed amount of time. Because bus snooping is disabled for nap and sleep mode, a hardware handshake using the quiesce request (QREQ) and quiesce acknowledge (QACK) signals are required to maintain data coherency. The 603e will assert the QREQ signal to indicate that it is ready to disable bus snooping. When the system has ensured that snooping is no longer necessary, it will assert QACK and the 603e will enter the sleep or nap mode. • Time base/decrementer still enabled • Most functional units disabled (including bus snooping) • All nonessential input receivers disabled • Nap mode sequence - Set nap bit (HIDO[9] = 1) - 603e asserts quiesce request (QREQ) signal - System asserts quiesce acknowledge (QACK) signal - 603e enters sleep mode after several processor clocks • Several methods of returning to full-power mode - Assert INT, SMI, MCP or decrementer interrupts - Assert hard reset or soft reset • Transition to full-power takes no more than a few processor cycles • PLL running and locked to SYSCLK 9-4 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA 9.2.1.5 Sleep Mode Sleep mode consumes the least amount of power of the four modes since all functional units are disabled. To conserve the maximum amount of power, the PLL may be disabled and the SYSCLK may be removed. Due to the fully static design of the 603e, internal processor state is preserved when no internal clock is present. Because the time base and decrementer are disabled while the 603e is in sleep mode, the 603e's time base contents will have to be updated from an external time base following sleep mode if accurate time-of-day maintenance is required. Before the 603e enters the sleep mode, the 603e will assert the QREQ signal to indicate that it is ready to disable bus snooping. When the system has ensured that snooping is no longer necessary, it will assert QACK and the 603e will enter the sleep mode. • All functional units disabled (including bus snooping and time base) • All nonessential input receivers disabled - Internal clock regenerators disabled - PLL still running (see below) Sleep mode sequence - Set sleep bit (HIDO[lO] = 1) - 603e asserts quiesce request (QREQ) - System asserts quiesce acknowledge (QACK) - 603e enters sleep mode after several processor clocks • Several methods of returning to full-power mode - Assert INT, SMI or MCP interrupts - Assert hard reset or soft reset • PLL may be disabled and SYSCLK may be removed while in sleep mode • Return to full-power mode after PLL and SYSCLK disabled in sleep mode - Enable SYSCLK - Reconfigure PLL into desired processor clock mode - System logic waits for PLL startup and relock time (100 J..lsec) - System logic asserts one of the sleep recovery signals (for example, INT or SMI) MOTOROLA Chapter 9. Power Management 9-5 9.2.2 Power Management Software Considerations Since the 603e is a dual issue processor with out-of-order execution capability, care must be taken in how the power management mode is entered. Furthermore, nap and sleep modes require all outstanding bus operations to be completed before the power management mode is entered. Normally during system configuration time, one of the power management modes would be selected by setting the appropriate HIDO mode bit. Later on, the power management mode is invoked by setting the MSR[POW] bit. To ensure a clean transition into and out of the power management mode, set the MSR[EE] bit and execute the following code sequence: sync mtmsr[POW = 1] isync loop: bloop 9-6 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Appendix A PowerPC Instruction Set Listings This appendix lists the PowerPC 603e microprocessor's instruction set as well as the additional PowerPC instructions not implemented in the 603e. Instructions are sorted by mnemonic, opcode, function, and form. Also included in this appendix is a quick reference table that contains general information, such as the architecture level, privilege level, and form, and indicates if the instruction is 64-bit and optional. Note that split fields, that represent the concatenation of sequences from left to right, are shown in lowercase. For more information refer to Chapter 8, "Instruction Set," in The Programming Environments Manual. A.1 Instructions Sorted by Mnemonic Table A-I lists the instructions implemented in the PowerPC architecture in alphabetical order by mnemonic. Table A-1. Complete Instruction List Sorted by Mnemonic Key: D Reserved bits Instruction not implemented in the 603e Name 0 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 31 0 A B 266 31 0 A B 10 lEI 31 0 A B 138 addi 14 0 A SIMM addic 12 0 A SIMM addic. 13 0 A SIMM addis 15 0 A SIMM addmex 31 0 A 234 addzex 31 0 A 202 andx 31 S A B 28 andcx 31 S A B 60 MOTOROLA Appendix A. PowerPC Instruction Set Listings A-1 Name 0 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 andi. 28 S A UIMM andis. 29 S A UIMM bx 18 LI bex 16 BO BI BD beetrx 19 BO BI 528 belrx 19 16 emp 31 erfD 0 empi 11 erfD SIMM em pi 31 erfD 32 erand 19 erbD erbA erbB 257 erande 19 erbD erbA erbB 129 ereqv 19 erbD erbA erbB ernand 19 erbD erbA erbB 225 ernor 19 erbD erbA erbB 33 eror 19 erbD crbA crbB 449 crorc 19 crbD erbA crbB 4i7 erxor 19 crbD crbA crbB 193 debf 31 A B 86 debi 1 31 A B 470 ,.. debst debt debtst 31 31 31 A A A B B B 54 278 246 divwux 31 459 eeiwx 31 310 ~--------~--------~-------+--------+-----------------~ eeowx 31 438 ------------------~ eieio 31 854 A-2 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Name 0 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 eqvx 31 S A ~----------+---------~---------+~ extsbx 31 S A fctiwzXT 63 D fdivx7 63 D fdivsXT 59 D A B fmaddXT 63 D A B fmaddsXT 59 D A B C 29 fmrx7 63 D 72 fmsubXT 63 D C 28 fmsubsXT 59 D C 28 fmulx7 63 D C 25 fmulsx7 59 D C 25 fnabsXT 63 D 136 fnegXT 63 D .:I fnmaddx 7 63 D A B C fnmaddsx7 59 D A B C fnmsubx7 63 D A B C fnmsubsXT 59 D fresx 5,7 59 D frspXT 63 D frsqrtex 5,7 63 D fselx 5,7 63 D MOTOROLA Appendix A. PowerPC Instruction Set Listings A-3 Name 0 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 fsubs'? 59 icbi .31 Isync 19 Ibz 34 Ibzu 35 Ibzux 31 Ifdu7 51 D A d Ifdux7 31 D A B 631 Ifdx7 31 D A B 599 Ifs7 48 D A d Ifsu7 49 D A d Ifsux7 31 D A B 567 Ifsx7 31 D A B 535 Iha 42 D A d Ell Ihau 43 D A d Ihaux 31 D A B 375 Ihax 31 D A B 343 Ihbrx 31 D A B 790 1hz 40 D A d Ihzu 41 D A d Ihzux 31 D A B 311 Ihzx 31 D A B 279 Imw 3 46 D A d A-4 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Name 0 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Iswi 3 31 D A NB 597 Iwz 32 D A d Iwzu 33 D A d Iwzux 31 D A B 55 Iwzx 31 23 mcrf 19 0 mcrfs7 63 64 mcrxr 31 512 mfcr 31 19 mffsx7 63 D 583 mfmsr 1 31 D 83 mfspr 2 31 D 339 mfsr 1 31 D 595 mfsrin 1 31 659 mftb 31 371 ... mtcrf 31 144 mtfsbOx7 63 70 mtfsb1x 7 63 38 mtfsfx7 63 711 mtfsfix7 63 134 mtmsr 1 31 146 mtspr 2 31 467 mtsr 1 31 210 MOTOROLA Appendix A. PowerPC Instruction Set Listings A-5 Name 0 6 7 8 9 10 11 12 13 14 15 16 17 18 192021 22 23 24 25 26 27 28 29 30 31 mullwx 31 D A 235 nandx 31 S A 476 negx 31 D A 104 norx 31 S A 124 orx 31 S A B 444 orcx 31 S A B 412 ori 24 S A UIMM oris 25 UIMM A-6 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Name 0 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 stfd 54 S A d stfdu 55 S A d stfdux 31 S A B 759 stfdx 31 S A B 727 stfiwx 5 31 S A B 983 stfs 52 S A d stfsu 53 S A d stfsux 31 S A B 695 stfsx 31 S A B 663 sth 44 S A d sthbrx 31 S A B 918 sthu 45 S A d sthux 31 S A B 439 sthx 31 S A B 407 stmw 3 47 S A d stswi 3 31 S A NB 725 stswx 3 31 S A B 661 lEI stw 36 S A d stwbrx 31 S A B 662 stwcx. 31 S A B 150 stwu 37 S A d stwux 31 S A B 183 stwx 31 S A B 151 subfx 31 D A B 40 subfcx 31 D A B 8 MOTOROLA Appendix A. PowerPC Instruction Set Listings A-7 Name 0 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 subfex 31 o A B 136 subfle 08 o A SIMM subfmex 31 o A subfzex 31 tlbld 1,6 31 978 tlbll 1,6 31 1010 tlbsyne 1 ,S 31 566 tw 31 4 twi 03 A SIMM xorx 31 S A B 316 xori 26 S A UIMM xoris 27 S A UIMM 1 Supervisor-level instruction 2 Supervisor- and user-level instruction 3 Load and store string or multiple instruction 4 54-bit instruction 5 Optional in the PowerPC architecture 6 Implementation-specific instruction 7 Floating-point instructions are not supported by the EC603e microprocessor and are trapped by the floating-point unavailable exception vector, A-8 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA A.2 Instructions Sorted by Opcode Table A-2 lists the instructions defined in the PowerPC architecture in numeric order by opcode. Key: D Reserved bits . . Instruction not implemented in the 603e Table A-2. Complete Instruction List Sorted by Opcode Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 mUIli 000111 A SIMM subfic 001000 A SIMM cmpli 001010 A UIMM cmpi 001011 A SIMM addic 001100 D A SIMM addic. 001101 D A SIMM addi 001110 D A SIMM addis 001111 D A SIMM bcx 010000 sc 010001 bx 010010 mcrf 010011 0000000000 bclrx 010011 0000010000 crnor 010011 0000100001 rfi 010011 0000110010 crandc 010011 0010000001 lEI isync 010011 0010010110 crxor 010011 crbD crbA crbB 0011000001 crnand 010011 crbD crbA crbB 0011100001 crand 010011 crbD crbA crbB 0100000001 creqv 010011 crbD crbA crbB 0100100001 crorc 010011 crbD crbA crbB 0110100001 cror 010011 crbD crbA crbB 0111000001 bcctrx 010011 BO BI rlwimix 010100 S A MOTOROLA Appendix A. PowerPC Instruction Set Listings A-9 Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 rlwinmx 010101 S A SH MB ME rlwnmx 010111 S A B MB ME ori 011000 S A UIMM oris 011001 S A UIMM xori 011010 S A UIMM xoris 011011 S A UIMM andi. 011100 S A UIMM andis. 011101 S A UIMM Iwzux 011111 A B 0000110111 A-10 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0001010111 011111 D A 0001101000 011111 D A 0001110111 011111 s A B 0001111100 011111 D A B 0010001000 011111 D A B 0010001010 011111 s 0010010000 mullwx 011111 00 1110 10 11 mtsrin r001111-:111111-r-~;-1~~~~j0j--B--r-'----~OD001111-:111;o00011(0)-1~ dcbtst 011111 B 0011110110 stbux 011111 ABO011110111 MOTOROLA Appendix A. PowerPC Instruction Set Listings A-11 Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 add x 011111 B 0100001010 debt 011111 B 0100010110 Ihzx 011111 B 0100010111 eqvx 011111 B 0100011100 tlbie 1,5 011111 B 0100110010 eeiwx 011111 D A B 0100110110 Ihzux 011111 D A B 0100110111 xorx 011111 S A B 0100111100 Iswx 3 011111 1000010101 Iwbrx 011111 D A B 1000010110 A-12 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Ifsx7 011111 o A B 1000010111 Ifsux7 011111 1000110111 mfsr 011111 1001010011 Iswi 3 011111 1001010101 sync 011111 1001010110 Ifdx 7 011111 1001010111 Ifdux7 011111 0 B 1001110111 mfsrin 1 011111 0 B 1010010011 stswx 3 011111 S A B 1010010101 stwbrx 011111 S A B 1010010110 stfsx 011111 S A B 1010010111 stfsux 011111 S A B 1010110111 stswi 3 011111 S A NB 1011010101 stfdx7 011111 S A B 1011010111 stfdux7 011111 S A B 1011110111 Ihbrx 011111 0 A B 1100010110 1101010110 sthbrx 011111 1110010110 extshx 011111 1110011010 .a extsbx 011111 1110111010 tlbld 1,6 011111 1111010010 icbi 011111 1111010110 dcbz 011111 B 1111110110 ~---------F-=~~~~-------+--------~----------------~4 Iwz 100000 A d MOTOROLA Appendix A. PowerPC Instruction Set Listings A·13 Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Iwzu 100001 D A d Ibz 100010 D A d Ibzu 100011 D A d stw 100100 S A d stwu 100101 S A d stb 100110 S A d stbu 100111 S A d 1hz 101000 D A d Ihzu 101001 D A d Iha 101010 D A d Ihau 10101 1 D A d sth 101100 S A d sthu 101101 S A d Imw 3 101 11 0 D A d stmw 3 101111 S A d Ifs7 110000 D A d Ifsu7 110001 D A d Ifd7 110010 D A d lidu 7 i i 00 i i D A d stfs7 110100 S A d stfsu 7 110101 S A d sUd 7 .. 110110 S A d sUdu 7 110111 S A d fmulsK 11 101 1 D ~--------~--------r--------+~~~~4--------4--------~~ fmsubsx7 1110 11 D A c 1 1 1 00 A-14 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 fmaddsx7 111011 D A B c 1 1 1 01 fnmsubsx7 1110 11 D A B c 11110 frspK 111111 ~----------4---------- fctiwK 111111 D fctiwzK 111111 D fdlvK 111111 D ~--------~--------~-------+--------- fsubK 111111 D fmulK 111111 D frsqrtex 5,7 111111 D fmsubK 111111 D fmaddK 111111 D A B C 1 1 1 01 fnmsubK 111111 D A B C 11110 fnmaddx 7 111111 A B C 11111 fempo 7 111111 erfD 0000100000 mtfsb1x 7 111111 0000100110 fnegK 111111 0000101000 merfs7 111111 erfD 0001000000 mtfsbOK 111111 0001000110 lEI fmrK 111111 0001001000 mtfsflK 111111 erfD 0010000110 fnabsK 111111 0010001000 fabsK 111111 0100001000 mffsK 111111 1001000111 MOTOROLA Appendix A. PowerPC Instruction Set Listings A-15 Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 Supervisor-level instruction 2 Supervisor- and user-level instruction 3 Load and store string or multiple instruction 4 64-bit instruction 5 Optional in the PowerPC architecture 6603e-implementation specific instruction 7 Floating-point instructions are not supported by the EC603e microprocessor and are trapped by the floating-point unavailable exception vector. A-16 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA A.3 Instructions Grouped by Functional Categories Table A-3 through Table A-30 list the PowerPC instructions grouped by function. Key: D Reserved bits • Instruction not implemented in the 603e Table A-3. Integer Arithmetic Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 addx 31 D A B 266 addcx 31 D A B 10 addex 31 D A B 138 addi 14 D A SIMM addic 12 D A SIMM addic. 13 D A SIMM addis 15 D A SIMM 31 D A 234 31 31 31 D D D A A A 235 104 40 - 31 D A B 8 08 D A SIMM 31 D A 136 31 D A 232 31 D A 200 MOTOROLA Appendix A. PowerPC Instruction Set Listings A-17 Table A-4. Integer Compare Instructions Name 0 5 678 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2425 26 27 28 29 30 31 cmp 31 crfO A B cmpl 11 crfO A cmpl 31 crfO A B cmpll 10 crfO A Table A-S. Integer Logical Instructions Name 0 5 678 9 10 11 12 13 14 15 16 17 18 192021 22 23 24 25 26 27 28 29 30 31 andx 31 S A B 28 andcx 31 S A B 60 andl. 28 S A UIMM norx 31 S A B 124 orx 31 S A B 444 orcx 31 S A B 412 ori 24 S A UIMM oris 25 S A UIMM xorx 31 S A B 316 Ell xori 26 S A UIMM xoris 27 S A UIMM Table A-S. Integer Rotate Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1920 21 22 23 24 25 26 27 28 29 30 31 A-18 MPC603e& EC603e RISC Microprocessors User's Manual MOTOROLA Table A-G. Integer Rotate Instructions (Continued) Table A-7. Integer Shift Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Table A-S. Floating-Point Arithmetic Instructions7 Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 MOTOROLA Appendix A. Power PC Instruction Set Listings A-19 Table A-9. Floating-Point Multiply-Add Instructions? Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 fmaddx 63 D A B C 29 Rc fmaddsx 59 D A B C 29 Rc fmsubx 63 D A B C 28 Rc fmsubsx 59 D A B C 28 Rc fnmaddx 63 D A B C 31 Rc fnmaddsx 59 D A B C 31 Rc fnmsubx 63 D A B C 30 Rc fnmsubsx 59 D A B C 30 Rc Table A-10. Floating-Point Rounding and Conversion Instructions? Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Table A-11. Floating-Point Compare Instructions? Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 fempo 63 cnD A B 1-----1---- fcmpu 63 crfD A B Table A-12. Floating-Point Status and Control Register Instructions? Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 64 583 70 38 711 134 A-20 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table A-13. Integer Load Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22232425 26 2728 29 30 31 Ibz 34 D A d Ibzu 35 D A d Ibzux 31 D A B 119 Ibzx 31 D A B 87 Iha 42 D A d Ihau 43 D A d ~-----+--------+--------1--------'------------------ Ihaux 31 DAB 375 ~-----+--------+--------1--------~----------------- Ihax 31 DAB 343 1hz 40 D A d Ihzu 41 D A d Iwz 32 D A d Iwzu 33 D A d Iwzux 31 D A B 55 Iwzx 31 D A B 23 MOTOROLA Appendix A. PowerPC Instruction Set Listings A-21 Table A-14. Integer Store Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 stb 38 s A d stbu 39 s A d sthu 45 S A sthux 31 S A sthx 31 S A stw 36 S A d stwu 37 S A d stwux 31 S A B 183 stwx 31 S A B 151 Table A-15. Integer Load and Store with Byte-Reverse Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1920 21 22 23 24 25 26 27 28 29 30 31 Ihbrx l - "11 n ~ A u ''~'I CRM 1·:9·; 144 mtspr 2 31 D spr 467 Table A-39. XFL-Form opeD f~l FM B xo Specific Instructions Name 0 5 6 7 8 9 1011 12131415161718192021 22232425262728293031 mtfsfx7 ,-I_63_---'I=q·"-I_ _ _F_M_ _ ~fQ"'_I___B ____'_ _ _ _7_11_ _ ___'_IR-,cl Table A-40. XS-Form opeD s A sh xo Specific Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Table A-41. XO-Form opeD D A xo Rc opeD D A xo Rc opeD D A xo Rc Specific Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1920 21 22 23 24 25 26 27 28 29 30 31 a::::I:===:=:===:====:=====:====:=====:====:=====~:=~:=======2=:=:========1::::1 MOTOROLA Appendix A. PowerPC Instruction Set Listings A-35 addex 31 D A addmex 31 D A negx 31 D A 104 subfx 31 D A 40 subfcx 31 D A 8 subfex 31 D A 136 subfmex 31 D A 232 subfzex 31 D A 200 Table A-42. A-Form opcn D XO Rc OPCD D XO Rc OPCD D XO Rc ,.. Name 0 OPCD 5 D Specific Instructions XO Rc 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 faddx7 63 D A B 21 Rc faddsx7 59 D A B 21 Rc fdivX' 63 D A B 18 Rc fdivsx7 59 D A B 18 Rc fmaddx7 63 D A B C 29 Rc fmaddsx7 59 D A B C 29 Rc fmsubx7 63 D A B C 28 Rc fmsubsx7 59 D A B C 28 Rc A-36 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA fmulx7 63 D A C 25 fmulsx7 59 D A C 25 fnmaddx 7 63 D A B C 31 fnmaddsx7 59 D A B C 31 fnmsubx7 63 D A B C 30 fnmsubsx7 59 D C 30 fresx 5'7 59 D frsqrtex 5,7 63 D fsubsx7 59 D A B Table A-43. M-Form OPCD S A SH MB ME OPCD S A B MB ME 1:1 Specific Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2728293031 rlwimix 20 S A SH MB ME Rc rlwinmx 21 S A SH MB ME Rc rlwnmx 23 S A B MB ME Rc Table A-44. MD-Form OPCD S A sh mb XO OPCD S A sh me XO Specific Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 MOTOROLA Appendix A. PowerPC Instruction Set Listings A-37 Table A-45. MDS-Form OPCD S A B mb XO OPCD S A B me XO 1::1 Specific Instructions Name 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 I Supervisor-level instruction 2 Supervisor- and user-level instruction 3 Load and store string or multiple instruction 4 64-bit instruction 5 Optional in the PowerPC architecture 6 603e-implementation specific instruction 7 Floating-point instructions are not supported by the EC603e microprocessor and are trapped by the floating-point unavailable exception vector. A-38 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA A.S Instruction Set Legend Table A-46 provides general information on the PowerPC instruction set (such as the architectural level, privilege level, and form). Key: o Reserved bits • Instruction not implemented in the 603e Table A-46. PowerPC Instruction Set Legend UISA VEA OEA Supervisor Level 64-Bit Optional Form addx addex " " XO XO addex " XO addi addie " " D D addie. " D addis " D addmex addzex "" XO XO andx " X andex " X andi. " D andis. bx " " D I bex " B bectrx " XL belrx " XL emp " X em pi " D em pi " X empll " D entlzwx " X erand " XL erande " XL ereqv " XL MOTOROLA Appendix A. PowerPC Instruction Set Listings A-39 ernand ...j XL ernor ...j XL eror ...j XL erore ...j XL erxor ...j XL debt X debl 1 X debst ...j X debt ...j X debtst ...j X debz ...j X dlvwx ...j XO divwux ...j XO eciwx ...j ...j X eeowx ...j ...j X eieio ...j X eqvx ...j X extsbx ...j X extshx ...j X tetiw.? ...j X tetiwz.? ...j X tdlv.? ...j A tdivs.? ...; A tmadd.? ...j A A-40 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA fmaddsx7 ,f A fmrx7 ,f X fmsubx7 ,f A fmsubsx7 ,f A fmulx7 ,f A fmulsx7 ,f A fnabsx7 ,f X fnegx7 ,f X fnmaddx 7 ,f A fnmaddsx7 ,f A fnmsubx7 ,f A fnmsubsx7 ,f A fresx 5,7 ,f A frspx7 ,f X frsqrtex 5,7 ,f ,f A fselx 5,7 ,f ,f A fsubx7 ,f A fsubsx7 ,f A icbi ,f X isync ,f XL Ibz ,f D Ibzu ,f D Ibzux ,f X Ibzx ,f X .rl Ifd7 D Ifdu 7 D (fdux 7 X Ifdx7 X MOTOROLA Appendix A. PowerPC Instruction Set Listings A-41 UISA VEA OEA Supervisor Level 64-bit Optional Form Ifs7 ;f D Ifsu7 ;f D Ifsux7 ;f X Ifsx7 ;f X Iha ;f D Ihau ;f D Ihaux ;f X Ihax ;f X Ihbrx ;f X 1hz ;f D Ihzu ;f D Ihzux ;f X Ihzx ;f X Imw 3 ;f D Iswi 3 ;f X Iswx 3 ;f X Iwbrx ;f X Iwz ;f D Iwzu ;f D Iwzux ;f X Iwzx ;f X mcrf ;f XL mcrfs 7 ;f X ~~ ;f X mfcr ;f X ~? ;f X mfmsr 1 ;f;f X mfspr 2 ;f ;f;f XFX ~-----+------+---~~----~-----r------+-----~------~ mfsr 1 ;f.~ X mfsrin 1 ;f;f X A-42 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA UISA YEA OEA Supervisor Level 64-bit Optional Form mftb ;j XFX mtcrf ;j XFX mtfsbOX' ;j X mtfsb1x 7 ;j X mtfsfx7 ;j XFL mtfsfix7 ;j X mtmsr 1 ;j ;j X mtspr 2 ;j ;j ;j XFX mtsr 1 ;j ;j X mtsrin 1 ;j ;j X multi ;j D mullwx ;j XO nandx ;j X negx ;j XO norx ;j X orx ;j X orcx ;j X ori ;j D oris ;j D ~ rlwimix M rlwinmx M rlwnmx M MOTOROLA Appendix A_ PowerPC Instruction Set Listings A-43 UISA VEA OEA Supervisor Level 64-bit Optional Form srwx ...j X stb ...j D stbu ...j D stbux ...j X stbx ...j X sHd 7 ...j D r------+------+-----~----------_r------+_----~------~ sHdu 7 ...j D sHdux7 ...j X sHdx7 ...j X sHlwx 5 ,7 ...j X r------+------+-----~----------_r------+_----~------~ sHs7 ...j D r------+------+-----~----------_r------+_----~------~ sHsu7 ...j D sHsux7 ...j X sHsx7 ...j X ~ ...j D r------+------+-----~~--------_r------+_----_1------~ sthbrx ...j X r------+------+-----~~--------_r------+_----_1------~ ~ ...j D r------+------+-----~r_--------_r------+_----_1------~ sthux ...j X sthx ...j X A-44 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA stmw 3 ...J D stswi 3 ...J X stswx 3 ...J X stw ...J D stwbrx ...J X stwex. ...J X stwu ...J D stwux ...J x stwx ...J X subfx ...J XO subfex ...J XO subfex ...J XO subfle ...J D subfmex ...J XO subfzex ...J XO syne ...J X tlbld 1,6 ...J X tlbll 1,6 ...J X tlbsyne 1,5 ...J X tw ...J X twi ...J D xorx ...J X ID xorl ...J D xoris ...J D 1 Supervisor-level instruction 2 Supervisor- and user-level instruction 3 Load and store string or multiple instruction 4 64-bit instruction 5 Optional in the PowerPC architecture 6 603e-implementation specific instruction 7 Floating-point instructions are not supported by the EC603e microprocessor andare trapped by the floating-point unavailable exception vector, MOTOROLA Appendix A. PowerPC Instruction Set Listings A-45 A-46 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Appendix B Instructions Not Implemented This appendix provides a list of the 32-bit and 64-bit PowerPC instructions that are not implemented in the PowerPC 603e microprocessor. It also provides a list of the fioating- point instructions that are not supported by the EC603e microprocessor and the 64-bit SPR encoding that is not implemented by the 603e. Note that any attempt to execute instructions that are not implemented on the 603e will generate an illegal instruction exception. Note that exceptions are referred to as interrupts in the architecture specification. Table B-1 provides the 32-bit PowerPC instructions that are optional to the PowerPC architecture but not implemented by the 603e. Table B-1. 32-Bit Instructions Not Implemented by the PowerPC 603e Mnemonic Instruction fsqrt Floating Square Root (Double-Precision) fsqrts Floating Square Root Single tibia TLB Invalidate All Table B-2 provides a list of 64-bit instructions that are not implemented by the 603e and EC603e microprocessors. Table B-2. 64-Bit Instructions Not Implemented Mnemonic Instruction cntlzd Count Leading Zeros Double Word divd Divide Double Word divdu Divide Double Word Unsigned extsw Extend Sign Word fcfid Floating Convert From Integer Double Word fctid Floating Convert to Integer Double Word fctidz Floating Convert to Integer Double Word with Round toward Zero Id Load Double Word Idarx Load Double Word and Reserve Indexed MOTOROLA Appendix B. Instructions Not Implemented B-1 Table B-2. 64-Bit Instructions Not Implemented (Continued) Mnemonic Instruction Idu Load Double Word with Update Idux Load Double Word with Update Indexed Idx Load Double Word Indexed Iwa Load Word Algebraic Iwaux Load Word Algebraic with Update Indexed Iwax Load Word Algebraic Indexed mulld Multiply Low Double Word mulhd Multiply High Double Word mulhdu Multiply High Double Word Unsigned rldel Rotate Left Double Word then Clear Left rider Rotate Left Double Word then Clear Right rldie Rotate Left Double Word Immediate then Clear rldiel Rotate Left Double Word Immediate then Clear Left rldler Rotate Left Double Word Immediate then Clear Right rldimi Rotate Left Double Word Immediate then Mask Insert slbia SLB Invalidate All slbie SLB Invalidate Entry sid Shift Left Double Word srad Shift Right Algebraic Double Word sradi Shift Right Algebraic Double Word Immediate srd Shift Right Double Word std Store Double Word stdex. Store Double Word Conditional Indexed stdu Store Double Word with Update stdux Store Double Word Indexed with Update stdx Store Double Word Indexed td Trap Double Word tdi Trap Double Word Immediate 8-2 MPC603e & EC603e RiSe Microprocessors User's Manual MOTOROLA Table B-3 lists floating-point instructions that are not supported by the EC603e microprocessor. The EC603e microprocessor does not support the floating-point unit; therefore, floating-point instructions are trapped by the floating-point unavailable exception vector but they may be emulated by software. Table 8-3. Floating-Point Instructions Not Supported by the EC603e Microprocessor Mnemonic Instruction fabs Floating Absolute fadd Floating Add fadds Floating Add Single fcmpo Floating Compare Ordered fcmpu Floating Compare Unordered fctlw Floating Convert to Integer Word fctiwz Floating Convert to Integer Word with Round toward Zero fdiv Floating Divide fdlvs Floating Divide Single fmadd Floating Multiply Add fmadds Floating Multipy Add Single fmr Floating Move Register fmsub Floating Multiply Subtract fmsubs Floating Multiply Subtract Single fmul Floating Multiply fmuls Floating Multiply Single fnabs Floating Negative Absolute fneg Floating Negative fnmadd Floating Negative Multiply-Add (Double-Precision) fnmadds Floating Negatve Multiply-Add Single fnmsub Floating Negative Multiply-Subtract (Double-Precision) fnmsubs Floating Negative Multiply -Subtract Single fres Floating Reciprocal Estimate Single frsp Floating Round to Single frsqrte Floating Reciprocal Square Root Estimate fsel Floating Select fsqrt Floating Square Root (Double-Precision) fsqrts Floating Square Root Single MOTOROLA Appendix B. Instructions Not Implemented B-3 Table B-3. Floating-Point Instructions Not Supported by the EC603e Microprocessor (Continued) Mnemonic Instruction fsub Floating Subtract fsubs Floating Subtract Single Ifd Load Floating-Point Double Ifdu Load Floating-Point Double with Update Ifdux Load Floating-Point Double with Update Indexed Ifdx Load Floating-Point Ifs Load Floating-Point Single Ifsu Load Floating-Point Single with Update Ifsux Load Floating-Point Single with Update Indexed Ifsx Load Floating-Point Indexed mcrfs Move to Condition Register from FPSCR mffs Move from FPSCR mtfsbO Move to FPSCR Bit 0 mtfsb1 Move to FPSCR Bit 1 mtfsf Move to FPSCR Fields mtfsfi Move to FPSCR Field Immediate sUd Siore Floaiing-Point Double stfdu Store Floating-Point Double with Update stfdux Store Floating-Point Double with Update Indexed stfdx Store Floating-Point Double Indexed stfiwx Store Floating-Point as Integer Word Indexed stfs Store Floating-Point Single stfsu Store Floating-Point Single with Update stfsux Store Floating-Point Single with Update Indexed stfsx Store Floating-Point Single Indexed tibia TLB Invalidate All Table B-4 provides the 64-bit SPR encoding that is not implemented by the 603e and 8-4 MPC603e & EC603e RISC Microprocessors User·s Manual MOTOROLA EC603e microprocessor. Table B-4. 64-Bit SPR Encoding Not Implemented SPR Register Access Name Decimal spr[5-9] spr[0-4] 280 01000 11000 ASR Supervisor MOTOROLA Appendix B. Instructions Not Implemented 6-5 8-6 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Appendix C PowerPC 603 Processor System Design and Programming Considerations While the PowerPC 603 microprocessor shares most of the attributes of the PowerPC 603e microprocessor, the system designer or programmer should keep in mind the 603 hardware and software differences, described in the following sections, that can require modifications to accommodate the 603 in systems designed for the 603e. ", C.1 PowerPC 603 Microprocessor Hardware Considerations The 603's hardware implementation differs from the 603e in the following ways: • XATS signal replaces CSEI signal • Hardware support for access to direct-store segments • Bus clock multipliers of 1: 1, 2: 1, 3: 1, and 4: 1 only 8-Kbyte, two-way set associative instruction and data caches • HID 1 register not implemented in 603 The following sections provide further information on the operation of some of the hardware features specific to the 603. C.1.1 Hardware Support for Direct-Store Accesses The 603 provides hardware support for direct-store bus accesses through the provision of the extended address transfer start (XATS) signal, and support for direct-store accesses in the bus interface unit. Direct-store accesses are invoked when a segment register T bit is set to 1. The operation of the XATS signal is described in the following section. The XATS signal is in the same location as the CSE 1 signal on the 603e. ~ MOTOROLA Appendix C. PowerPC 603 Processor System Design C-1 and Programming Considerations C.1.1.1 Extended Address Transfer Start (XATS) The XATS signal is both an input and an output signal on the 603. C.1.1.1.1 Extended Address Transfer Start (XATS)-Output Following are the state meaning and timing comments for the XATS output signal. State Meaning Asserted-Indicates that the 603 has begun a direct-store operation and that the first address cycle is valid. When asserted with the appropriate XATC signals it is also an implied data bus request for certain direct-store operation (unless it is an address-only operation). Negated-Is negated during an entire memory transaction. Timing Comments Assertion-Coincides with the assertion of ABB. Negation-Occurs one bus clock cycle after the assertion of XATS. High Impedance-Coincides with the negation of ABB. C.1.1.1.2 Extended Address Transfer Start (XATS)-Input Following are the state meaning and timing comments for the XATS input signal. State Meaning Asserted-Indicates that the 603 must check for a direct-store operation reply. Negated-Indicates that there is no need to check for a direct-store operation reply. Timing Comments Assertion-May occur while ABB is asserted. Negation-Must occur one bus clock cycle after XATS is asserted. C.1.2 Direct-Store Protocol Operation The 603 defines separate memory-mapped and I/O address spaces, or segments, distinguished by the corresponding segment register T bit in the address translation logic of the 603. If the T bit is cleared, the memory reference is a normal memory-mapped access and can use the virtual memory management hardware of the 603. If the T bit is set, the memory reference is a direct-store access. The following points should be considered for direct-store accesses: • The use of direct-store segment accesses may have a significant impact on the .. performance of the 603. The provision of direct-store segment access capability by the 603 is to provide compatibility with earlier hardware 110 controllers and may not be provided in future derivatives of the 603 family. • Direct-store accesses are strongly ordered; for example, these accesses occur on the bus strictly in order with respect to the instruction stream. • Direct-store accesses provide synchronous error reporting. The 603 has a single bus interface to support both memory accesses and direct-store segment accesses. C-2 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA The direct-store protocol for the 603 allows for the transfer of 1 to 128 bytes of data between the 603 and the bus unit controller (BUC) for each single load or store request issued by the program. The block of data is transferred by the 603 as multiple single-beat bus transactions (individual address and data tenure for each transaction) until completion. The program waits for the sequence of bus transactions to be completed so that a final completion status (error or no error) can be reported precisely with respect to the program flow. The completion status is snooped by the 603 from a bus transaction run by the BUC. The system recognizes the assertion of the TS signal as the start of a memory-mapped access. The assertion of XATS indicates a direct-store access. This allows memory-mapped devices to ignore direct-store transactions. If XATS is asserted, the access is to a direct- store space and the following extensions to the memory access protocol apply: • A new set of bus operations are defined. The transfer type, transfer burst, and transfer size signals arc redefined for direct-store operations; they convey the opcode for the 1/0 transaction (see Table C-l). There are two beats of address for each direct-store transfer. The first beat (packet 0) provides basic address information such as the segment register and the sender tag and several control bits; the second beat (packet 1) provides additional addressing bits from the segment register and the logical address. • The TT[0-3], TBST, and TSIZ[0-2] signals are remapped to form an 8-bit extended transfer code (XATC) which specifies a command and transfer size for the transaction. The XATC field is driven and snooped by the 603 during direct-store transactions. Only the data signals such as DH[0-31] and DP[0-3] are used. The lower half of the data bus and parity is ignored. The sender that initiated the transaction must wait for a reply from the receiver bus unit controller (BUC) before starting a new operation. The 603 does not burst direct -store transactions. All direct -store transactions generated by the 603 are single-beat transactions of 4 bytes or less (single data beat tenure per address tenure). Direct-store transactions use separate arbitration for the split address and data buses and define address-only and single-beat transactions. The address-retry vehicle is identical, although there is no hardware coherency support for direct-store transactions. The ARTRY signal is useful, however, for pacing 603 transactions, effectively indicating to the 603 that the BUC is in a queue-full condition and cannot accept new data. In addition to the extensions noted above, there are fundamental differences between memory-mapped and direct-store operations. For example, only half of the 64-bit data path is available for 603 direct-store transactions. This lowers the pin count for 110 interfaces but generally results in substantially less bandwidth than memory-mapped accesses. Additionally, loadlstore instructions that address direct-store segments cannot complete successfully without an error-free reply from the addressed BUC. Because normal direct- MOTOROLA Appendix C. PowerPC 603 Processor System Design C-3 and Programming Considerations store accesses involve multiple I/O transactions (streaming), they are likely to be very long latency instructions; therefore, direct-store operations usually stall 603 instruction issue. Figure C-I shows a direct-store tenure. Note that the I/O device response is an address-only bus transaction. ADDRESS TENURE 1/0 RESPONSE ( ~ __________~A~____________~ , ~ ( __________~A~____________~ , ARBITRATION TERMINATION • • • ARBITRATION TERMINATION INDEPENDENT ADDRESS AND DATA ~DATA TENURE NO DATA TENURE FOR 1/0 RESPONSE (1/0 responses are address-only) ARBITRATION TRANSFER TERMINATION ••• Figure C-1. Direct-Store Tenures It should be noted that in the best case, the use of the 603 direct-store protocol degrades performance and requires the addressed controllers to implement 603 bus master capability to generate the reply transactions. C.l.2.1 Direci-Siore Transactions The 603 defines seven direct-store transaction operations, as shown in Table C-l. These operations permit communication between the 603 and BUCs. A single 603 store or load instruction (that translates to a direct-store access) generates one or more direct-store operations (two or more direct-store operations for loads) from the 603 and one reply operation from the addressed BUe. Table C-1. Direct-Store Bus Operations Operation Address Only Direction XATC Encoding Load start (request) Yes 603~ 10 01000000 Load immediate No 603~ 10 0101 0000 Load last No 603~ 10 0111 0000 Store immediate No 603~ 10 0001 0000 Store last No 603~ 10 0011 0000 Load reply Yes 10 ~603 11000000 Store reply Yes 10~603 10000000 C-4 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA For the first beat of the address bus, the extended address transfer code (XATC) contains the 110 opcode as shown in Table C-I; the opcode is formed by concatenating the transfer type, transfer burst, and transfer size signals defined as follows: XATC =TT[0:3]IITBSTIITSIZ[0-2] C.1.2.1.1 Store Operations There are three operations defined for direct-store store operations from the 603 to the BUC, defined as follows: 1. Store immediate operations transfer up to 32 bits of data each from the 603 to the BUC. 2. Store last operations transfer up to 32 bits of data each from the 603 to the BUC. 3. Store reply from the BUC reveals the success/failure of that direct-store access to the 603. A direct-store store access consists of one or more data transfer operations followed by the 110 store reply operation from the BUC. If the data can be transferred in one 32-bit data transaction, it is marked as a store last operation followed by the store reply operation; no store immediate operation is involved in the transfer, as shown in the following sequence: STORE LAST (from 603) • • STORE REPLY (from BUC) However, if more data is involved in the direct-store access, there will be one or more store immediate operations. The BUC can detect when the last data is being transferred by looking for the store last opcode, as shown in the following sequence: STORE IMMEDIATE(s) • • STORE LAST • STORE REPLY C.1.2.1.2 Load Operations Direct-store load accesses are similar to store operations, except that the 603 latches data _ from the addressed BUC rather than supplying the data to the BUC. As with memory accesses, the 603 is the master on both load and store operations; the external system must provide the data bus grant to the 603 when the BUC is ready to supply the data to the 603. The load request direct-store operation has no analogous store operation; it informs the addressed BUC of the total number of bytes of data that the BUC must provide to the 603 MOTOROLA Appendix C. PowerPC 603 Processor System Design C-5 and Programming Considerations on the subsequent load immediate/load last operations. For direct-store load accesses, the simplest, 32-bit (or fewer) data transfer sequence is as follows: LOAD REQUEST • • LOAD LAST • • LOAD REPLY (from BVC) However, if more data is involved in the direct-store access, there will be one or more load immediate operations. The BUC can detect when the last data is being transferred by looking for the load last opcode, as seen in the following sequence: LOAD REQUEST • • LOADIMM(s) • • LOAD LAST • • LOAD REPLY Note that three of the seven defined operations are address-only transactions and do not use tile daia bus. However, unlike the memory transfer protocol, these transactions are not broadcast from one master to all snooping devices. The direct-store address-only transaction protocol strictly controls communication between the 603 and the BVe. C.1.2.2 Direct-Store Transaction Protocol Details As mentioned previously, there are two address-bus beats corresponding to two packets of information about the address. The two packets contain the sender and receiver tags, the address and extended address bits, and extra control and status bits. The two beats of the address bus (plus attributes) are shown at the top of Figure C-2 as two packets. The first packet, packet 0, is then expanded to depict the XATC and address bus information in detail. C-6 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA C.1.2.2.1 Packet 0 Figure C-2 shows the organization of the first packet in a direct-store transaction. The XATC contains the I/O opcode, as discussed earlier and as shown in Table C-l. The address bus contains the following: Key bit II segment register II sender tag A(O-31)+Attributes ~ __------------------~A~------------------~ ( Address Bus (AO-A31) "\ ~ __________________ ~A~ ________________ ~ r \ o 7 o 1 23 1112 2728 31 XATC I + I II I I I ~Il\.... v~_ _ _JTo I/OOpcode BUID From Segment Register Key Bit Reserved Figure C-2. Direct-Store Operation-Packet 0 This information is organized as follows: • Bits 0 and 1 of the address bus are reserved-the 603 always drives these bits to zero. • Key bit-Bit 2 is the key bit from the segment register (either SR[Kp] or SR[Ks]). Kp indicates user-level access and Ks indicates supervisor-level access. The 603 multiplexes the correct key bit into this position according to the current operating context (user or supervisor). (Note that user- and supervisor-level refer to problem and privileged state, respectively, in the architecture specification.) • Segment register-Address bits 3-27 correspond to bits 3-27 of the selected segment register. Note that address bits 3-11 form the 9-bit receiver tag. Software must initialize these bits in the segment register to the ID of the BUC to be addressed; they are referred to as the BUID (bus unit ID) bits. • PID (sender tag)-Address bits 28-31 form the 4-bit sender tag. The 603 PID (processor ID) comes from bits 28-31 of the 603's processor ID register. The 4-bit PID tag allows a maximum of 16 processor IDs to be defined for a given system. If more bits are needed for a very large multiprocessor system, for example, it is envisioned that the second-level cache (or equivalent logic) can append a larger processor tag as needed. The BUC addressed by the receiver tag should latch the sender address required by the subsequent I/O reply operation. MOTOROLA Appendix C. PowerPC 603 Processor System Design C-7 and Programming Considerations C.1.2.2.2 Packet 1 The second address beat, packet 1, transfers byte counts and the physical address for the transaction, as shown in Figure C-3. ADDR+~ ~ ____________________________ ~A~ __________________________ ~ I '\ o 7 0 3 4 31 I XATC I + ISR(28-31j Bus Address I Byte Count Address Bus (AD-A31) Figure C-3. Direct-Store Operation-Packet 1 For packet 1, the XATC is defined as follows: • Load request operations-XATC contains the total number of bytes to be transferred (128 bytes maximum for 603). • Immediatellast (load or store) operations-XATC contains the current transfer byte count (1 to 4 bytes). Address bits 0-31 contain the physical address of the transaction. The physical address is generated by concatenating segment register bits 28-31 with bits 4-31 of the effective address, as follows: Segment register (bits 28-31) II effective address (bits 4-31) While the 603 provides the address of the transaction to the BUC, the BUC must maintain a valid address pointer for the reply. C.1.2.3 1/0 Reply Operations Hues must respond to 603 direct-store transactions with an 110 reply operation, as shown in Figure C-4. The purpose of this reply operation is to inform the 603 of the success or failure of the attempted direct-store access. This requires the system direct-store slave to have 603 bus mastership capability-a substantially more complex design task than bus slave implementations that use memory-mapped 110 access. Reply operations from the BUC to the 603 are address-only transactions. As with packet 0 of the address bus on 603 direct-store operations, the XATC contains the opcode for the operation (see Table C-1). Additionally, the 110 reply operation transfers the sender/receiver tags in the first beat. C-s MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Address Bus (AO-A31) ~ ________________________________ ______________________________ ~A~ ~ r \ o 7 0123 1112 2728 31 I XATC I + I II V"'I I 1/0 Opcode ~"-~________--... ~________~/"--y--J BUID Bue ~ecific PID 1 "-~----------------~V~----------------/ Error Segment Register Bit ReseNed Figure C-4. VO Reply Operation The address bits are described in Table C-2. Table C-2. Address Bits for VO Reply Operations Address Bits Description 0-1 Reserved. These bits should be cleared for compatibility with future PowerPC microprocessors. 2 Error bit. It is set if the BUC records an error in the access. 3-11 BUIO. Sender tag of a reply operation. Corresponds with bits 3-11 of one of the 603 segment registers. 12-27 Address bits 12-27 are BUC-specific and are ignored by the 603. 28-31 PIO (receiver tag). The 603 effectively snoops operations on the bus and, on reply operations, compares this field to bits 28-31 of the PIO register to determine if it should recognize this 1/0 reply. The second beat of the address bus is reserved; the XATC and address buses should be driven to zero to preserve compatibility with future protocol enhancements. The following sequence occurs when the 603 detects an error bit set on an 110 reply operation: 1. The 603 completes the instruction that initiated the access. 2. If the instruction is a load, the data is forwarded to the register file(s )lsequencer. 3. A direct-store error exception is generated, which transfers 603 control to the direct- store error exception handler to recover from the error. If the error bit is not set, the 603 instruction that initiated the access completes and instruction execution resumes. MOTOROLA Appendix C. PowerPC 603 Processor System Design e-9 and Programming Considerations System designers should note the following: • "Misplaced" reply operations (that match the processor tag and arrive unexpectedly) are ignored by the 603. • Extemallogic must assert AACK for the 603, even though it is the receiver of the reply operation. AACK is an input-only signal to the 603. • The 603 monitors address parity when enabled by software and XATS and reply operations (load or store). C.1.2.4 Direct-Store Operation Timing The following timing diagrams show the sequence of events in a typical 603 direct-store load access (Figure C-5) and a typical 603 direct-store store access (Figure C-6). All arbitration signals except for ABB and DBB have been omitted for clarity, although they are still required. Note that, for either case, the number of immediate operations depends on the amount and the alignment of data to be transferred. If no more than 4 bytes are being transferred, and the data is double-word-aligned (that is, does not straddle an 8-byte address boundary), there will be no immediate operation as shown in the figures. The 603 can transfer as many as 128 bytes of data in one load or store instruction (requiring more than 33 immediate operations in the case of misaligned operands). In Figure C-5, XATS is asserted with the same timing relationship as TS in a memory access. Notice, however, that the address bus (and XATC) transition on the next bus clock cycle. The first of the two beats on the address bus is valid for one bus clock cycle window only, and that window is defined by the assertion of XATS. The second address bus beat, however, can be extended by delaying the assertion of AACK until the system has latched the address. The load request and load reply operations, shown in Figure C-5, are address-only transactions as denoted by the negated TT3 signal during their respective address tenures. Note that other types of bus operations can occur between the individual direct-store operations on the bus. The 603 involved in this transaction, however, does not initiate any other direct-store load or store operations once the first direct-store operation has begun address tenure; however, if the I/O operation is retried, other higher-priority operations can occur. Notice that, in this example (zero wait states), 13 bus clock cycles are required to transfer no more than 8 bytes of data. C-10 MPC603e & EC603e RIse Microprocessors User's Manual MOTOROLA REQUESTOP IMM.OP LASTOP REPLYOP 121 3 4 I 5 I 6 7 I 8 I 9 10 11 I 12 I 13 I AI8I8 I }{AlrS I I ADlDl~+}{AlrC I I I I I I I I I I I DlI8I8~.$: Li-J$: I ~ DH[o-311~~*,,1)lr~ TA . . . .lij,~m. :. . : • Figure C-S. Direct-Store Interface Load Access Example Figure C-6 shows a direct-store store access comprised of three direct-store operations. As with the example in Figure C-5, notice that data is transferred only on the 32 bits of the DH bus. As opposed to Figure C-5, there is no request operation since the 603 has the data ready for the BUC. The assertion of the TEA signal during a direct-store operation indicates that an unrecoverable error has occurred. IT the TEA signal is asserted during a direct-store operation, the TEA action will be delayed and the following direct-store transactions will continue until all data transfers from the direct store segment had been completed. The bus agent that asserts TEA is responsible for asserting the TEA signal for every direct-store transaction tenure including the last one. The direct-store reply, in this case, is not required and will be ignored by the processor. The processor will take a machine check exception after the last direct-store data tenure has been terminated by the assertion of TEA, and not before. MOTOROLA Appendix C. PowerPC 603 Processor System Design C-11 and Programming Considerations IMM. OP I LAST OP I REPLYOP 121 3 I 4 I 5 I 6 7 I 8 I 9 I 10 I ~ I ~ I ADDIPl+XAl"C I I I I DH[0-311~ ~ I I I TA • • ! . . . . ! AI Figure C-6. Direct-Store Interface Store Access Example C.1.3 CSE Signal The 603 employs two-way set associativity for both the instruction and data caches, in place of the four-way set associativity of the 603e. The CSE signal indicates which cache set is being loaded during a cache line fill. Table C-3 shows the CSE signal encoding indicating the cache set selected during a cache load operation. Table C-3. CSE Signal Encoding CSE Cache Set Element D SelD 1 Sel1 C.1.4 PowerPC 603 Processor Bus Clock Multiplier Configuration The 603 provides support for bus clock multipliers of 1:1, 2:1, 3:1, and 4:1. The bus clock multipliers are selected through the setting of the PLL_CFG[O-3] signals as shown in Table C-4. C-12 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table C-4. PowerPC 603 Microprocessor PLL Configuration Bus, CPU, and PLL Frequencies CPU! PLL_CFG Bus Bus Bus Bus Bus Bus Bus SVSCLK 0-3 16.6 MHz 20 MHz 25 MHz 33.3 MHz 40 MHz 50 MHz 66.6 MHz Ratio 0000 1:1 - - - - - - 66.6 (133) 0001 1:1 - - - 33.3 40 50 - (133) (160) (200) 0010 1:1 16.6 20 25 - - - - (133) (160) (200) 0100 2:1 - - - 66.6 80 100 - (133) (160) (200) 0101 2:1 33.3 40 50 - - - - (133) (160) (200) 1000 3:1 - - 75 100 - - - (150) (200) 1001 3:1 50 - - - - - - (200) 1100 4:1 66.6 80 100 - - - - (133) (160) (200) 0011 PLL bypass 1111 Clock off Notes: 1. Some PLL configurations may select bus, CPU, or PLL frequencies which are not useful, not supported, or not tested for by the 603. PLL frequencies (shown in parenthesis in ) should not fall below 133 MHz, and should not exceed 200 MHz. 2. In PLL bypass mode, the SYSCLK input signal clocks the internal processor directly, the PLL is disabled, and the bus mode is set for 1:1 mode operation. This mode is intended for factory use only. Note that the AC timing specifications given in this document do not apply in PLL bypass mode. 3. In clock·off mode, no clocking occurs inside the 603 regardless of the SYSCLK input.4. PLL_CFGO-PLL_CFG1 signals selectthe CPU·to·bus ratio (1:1,2:1,3:1,4:1), PLL_CFG2-PLL_CFG3 signals select the CPU·to·PLL multiplier (x2, x4, x8). C.1.S PowerPC 603 Processor Cache Organization The 603 provides two 8-Kbyte, two-way set associative caches to allow the registers and execution units rapid access to instructions and data. The instruction and data caches are configured as 128 sets of two blocks. The operation of the 603' s instruction and data caches is consistent with the caches in the 603e, with the exception of the reduced cache size and set associativity. MOTOROLA Appendix C. PowerPC 603 Processor System Design C-13 and Programming Considerations C.1.S.1 Instruction Cache Organization The organization of the instruction cache is shown in Figure C-7. Each cache block contains eight contiguous words from memory that are loaded from an eight-word boundary (that is, bits A27-A31 of the logical (effective) addresses are zero); as a result, cache blocks are aligned with page boundaries. Note that address bits A20-A26 provide an index to select a set. Bits A27-A31 select a byte within a block. The tags consists of bits PAO-PA19. Address translation occurs in parallel, such that higher-order bits (the tag bits in the cache) are physical. Note that the replacement algorithm is strictly an LRU algorithm; that is, the least recently used block is filled with new instructions on a cache miss. SET 1 SET 0 I I I I I I I I I BLOCK 0 ADDRESS TAG f0- r- ~--~--~--+---+---~--+---4-~ r- r- ~--~--~--+---+---~--+---4-~ r- r- ~--~--~--+---+---~--+---4-~ r- r- ~--~--~--+---+---~--+---4-~ r- r- ~--~--~--+---+---+---+---4-~ r- r-- ~--~--~--+---+---~--+---4-~ r- r-- I ••• I I • • I I: I I I r-- BLOCK 127 ADDRESS TAG f- I" 8 WORDS -I Figure C-7.lnstruction Cache Organization C.1.S.2 Data Cache Organization The organization of the data cache is shown in Figure C-8. Each cache block contains eight contiguous words from memory that are loaded from an eight-word boundary (that is, bits A27-A31 of the logical (effective) addresses are zero); as a result, cache blocks are aligned with page boundaries. C-14 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Note that address bits A20-A26 provide an index to select a set. Bits A27-A3l select a byte within a block. The tags consists of bits PAO-PA19. Address translation occurs in parallel, such that higher-order bits (the tag bits in the cache) are physical. Note that the replacement algorithm is strictly an LRU algorithm; that is, the least recently used block is filled with new data on a cache miss. BLOCK 11 BLOCK 01 I I I I I I I I SET ° ADDRESS TAG - - - - - - - - - - - '- - - • • • • • • • • • - l- SET 127 ADDRESS TAG - f- aWaRDS Figure C-S. Data Cache Organization C.1.6 PLL Configuration (PLL_CFG[O-3])-lnput The 603 operates as described in Section 7.2.12.3, "PLL Configuration (PLL_CFG[O- 3D-Input," except for the following: To avoid incorrect operation of the PLL, the clock input to the SYSCLK signal input should be stable and within the frequency range specified for the selected PLL_CFG configuration during power-up, during normal operation, or when exiting the sleep power-saving mode. C.1.7 Address Pipelining and Split-Bus Transactions The 603 operates as described in Section 8.2.2, "Address Pipelining and Split-Bus Transactions," except for the following: Note that in multiprocessor systems, addresses associated with cache line loads are not snooped between the third and fourth beat during the data tenure when the system is configured for 64-bit bus operation. MOTOROLA Appendix C. PowerPC 603 Processor System Design C-15 and Programming Considerations When configured for 32-bit bus operation, cache line loads are not snooped between the sixth and eighth beats. To ensure memory coherency, multiprocessor systems should avoid pipelined operation, or disallow snooping during the last data beat of a cache load operation. C.1.8 Data Bus Arbitration The 603 operates as described in Section 8.4.1, "Data Bus Arbitration," except for the following: When the 603 is configured for 1: 1 processor to bus clock operation and DBG is always held asserted, multiple single-beat writes will cause incorrect data to be written to memory. The DBG signal should only be asserted when the data tenure can be started on the following bus cycle. C.2 PowerPC 603 Processor Software Considerations When developing software for the 603, the programmer should note the following differences from the 603e: • The 603 supports direct-store accesses; setting T = 1 in a segment register does not result in a DSI exception. • Store instructions have two-cycle latency and two-cycle throughput. • The 603 does not perform integer add or compare instructions in the SRU. • The 603 does not implement the key bit (bit 12) in SRRI to provide information about memory protection violations prior to page table search operations. • HIDI is not implemented by the 603; no read-only access to the PLL_CFG signal configuration is provided. • The PVR value for the 603 is Ox0003. The following sections provide further information on the 603 attributes that may affect software written for the 603e. C.2.1 Direct-Store Interface Address Translation With address translation enabled, all memory accesses generated by the 603 map to a segment descriptor in the segment table. If T = 1 for the selected segment descriptor and ~ there are no BAT hits, the access maps to the direct-store interface, invoking a specific bus protocol for accessing some special-purpose 110 devices. Direct-store segments are provided for POWER compatibility. As the direct-store interface is present only for compatibility with existing 110 devices that used this interface and the direct-store interface protocol is not optimized for performance, its use is discouraged. The selection of address translation type differs for instruction and data accesses only in that instruction accesses are not allowed from direct-store segments; attempting to fetch an instruction from a direct- C-16 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA store segment causes an lSI exception. Applications that require low latency load/store access to external address space should use memory-mapped 110, rather than the direct- store interface. Refer to Chapter 5, "Memory Management" for additional information about address translation and memory accesses. C.2.1.1 Direct-Store Segment Translation Summary Flow Figure C-9 shows the flow used by the MMU when direct-store segment address translation is selected. In the case of a floating-point load or store operation to a direct-store segment, other implementations may not take an alignment exception, as is allowed by the PowerPC architecture. In the case of an eciwx, eeowx, lwarx, or stwex. instruction, the 603 sets the DSISR register as shown and causes the DSI exception. Direct-Store Segment Translation Instruction Access Data Access 1 A Floating-Point Load or Store otherwise ...... :A~g~e~tl ~c~t~n ... : eciwx, eeowx, Iwar~ otherwise . I ,--c: or stwex. instruction L _ DSISR[5] f - 1 _ _ _ ..J ~ otherwise """,.1_,"" ('d>!, debtst, debf, debi, debst, debz, or iebi) ............... ~NO-OP ) Perform Direct-Store Interface Access - - - Optional to the PowerPC architecture. Implemented in the 603. Figure C-9_ Direct-Store Segment Translation Flow MOTOROLA Appendix C. PowerPC 603 Processor System Design C-17 and Programming Considerations A direct-store access occurs when a data access is initiated and SR[T] is set. In the 603, MSR[DR] is a don't care for this case. The following apply for direct-store accesses: • Floating-point loads and stores to direct-store segments always cause an alignment exception, regardless of operand alignment. • Iwarx or stwex. instructions that map into a direct -store segment always cause a DSI exception. However, if the instruction crosses a segment boundary, an alignment exception is taken instead. C.2.1.2 Direct-Store Interface Accesses When the address translation process determines that the segment descriptor has T = I, direct-store interface address translation is selected and no reference is made to the page tables and referenced and changed bits are not updated. These accesses are performed as if the WIMG bits were ObOlOl; that is, caching is inhibited, the accesses bypass the cache, hardware-enforced coherency is not required, and the accesses are considered guarded. The specific protocol invoked to perform these accesses involves the transfer of address and data information in packets; however, the PowerPC OEA does not define the exact hardware protocol used for direct-store interface accesses. Some instructions cause multiple address/data transactions to occur on the bus. In this case, the address for each transaction is handled individually with respect to the DMMU. The following data is sent by the 603 to the memory controller in the protocol (two packets consisting of address-only cycles). • Packet 0 - One of the Kx bits (Ks or Kp) is selected to be the key as follows: - For supervisor accesses (MSR[PR] =0), the Ks bit is used and Kp is ignored. - For user accesses (MSR[PR] = 1), the Kp bit is used and Ks is ignored. - The contents of bits 3-31 of the segment register, which is the BUm field concatenated with the "controller-specific" field. • Packet I-SR[28-31] concatenated with the 28 lower-order bits of the effective address, EA4-EA31. C.2.1.3 Direct-Store Segment Protection Page-level memory protection as described in Section 5.4.2, "Page Memory Protection," is not provided for direct-store segments. The appropriate key bit (Ks or Kp) from the segment descriptor is sent to the memory controller, and the memory controller implements any protection required. Frequently, no such mechanism is provided; the fact that a direct-store segment is mapped into the address space of a process may be regarded as sufficient authority to access the segment. C-18 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA C.2.1.4 Instructions Not Supported in Direct-Store Segments The following instructions are not supported at all and cause a DSI exception in the 603 (with DSISR[5] set) when issued with an effective address that selects a segment descriptor = that has T 1 (or when MSR[DR] 0): = • lwarx • stwex. • eciwx • ecowx C.2.1.5 Instructions with No Effect in Direct-Store Segments The following instructions are executed as no-ops by the 603 when issued with an effective address that selects a segment where T = 1: • debt • debtst • debf • debi • debst • debz • icbi C.2.2 Store Instruction Latency The store instructions executed by the 603 execute with 2-cycle latency, and 2-cycle throughput, in contrast to the 2-cycle latency and I-cycle throughput of the 603e. Table C-5 provides the latencies for the store instructions executed by the 603. Table C-S. Store Instruction Timing Primary Extended Mnemonic Unit Cycles 31 151 stwx LSU 2:2 31 183 stwux LSU 2:2 31 215 stbx LSU 2:2 31 247 stbux LSU 2:2 31 407 sthx LSU 2:2 31 438 ecowx LSU 2:2 31 439 sthux LSU 2:2 31 662 stwbrx LSU 2:2 31 663 stfsx LSU 2:2 31 695 stfsux LSU 2:2 31 727 stfdx LSU 2:2 MOTOROLA Appendix C. PowerPC 603 Processor System Design C-19 and Programming Considerations Table C-S. Store Instruction Timing (Continued) Primary Extended Mnemonic Unit Cycles 31 918 sthbrx LSU 2:2 31 983 stfiwx LSU 2:2 36 --- stw LSU 2:2 37 --- stwu LSU 2:2 38 --- stb LSU 2:2 39 --- stbu LSU 2:2 44 --- sth LSU 2:2 45 --- sthu LSU 2:2 52 --- stfs LSU 2:2 53 --- stfsu LSU 2:2 54 --- stfd LSU 2:2 55 --- stfdu LSU 2:2 C.2.3 Instruction Execution by System Register Unit Unlike the 603e, the 603's SRU does not execute integer add and compare instructions. Table C-6 lists the instructions executed by the 603's SRU, and the number of cycles required for execution. Table C-6. System Register Instructions Primary Extended Mnemonic Unit Cycles 17 - -1 sc SRU 3 19 050 rfi SRU 3 19 150 isync SRU 1& 31 083 mfmsr SRU 1 31 146 mtmsr SRU 2 31 210 mtsr SRU 2 31 242 mtsrin SRU 2 31 339 mfspr (not I/DBATs) SRU 1 31 339 mfspr (DBATs) SRU 3& 31 339 mfspr (I BATs) SRU 3& 31 467 mtspr (not IBATs) SRU 2 (XER-&) 31 467 mtspr (IBATs) SRU 2& 31 595 mfsr SRU 3& 31 598 sync SRU 1& C-20 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Table C-6. System Register Instructions (Continued) Primary Extended Mnemonic Unit Cycles 31 659 mfsrin SRU 3& 31 854 eieio SRU 1 31 371 mftb SRU 1 31 467 mttb SRU 1 Note: Cycle times marked with "&" require a variable number of cycles due to serialization. C.2.4 Machine Check Exception (Ox00200) The 603 operates as described in Section 4.5.2, "Machine Check Exception (Ox00200)," with the exception of the following: To ensure memory coherency following the assertion of TEA, the instruction cache should be invalidated by setting and clearing HIDO[lCFI], and flushing the data cache before performing any load or store operations, or executing any data cache management instructions other than debf. Note that an assertion of TEA during an instruction fetch will result in an immediate instruction refetch before the machine check exception is taken, which will result in a second assertion of the TEA signal. The second assertion of TEA while the machine check exception is pending from the previous TEA assertion will result in the 603 entering the checks top state instead of taking the machine check exception. C.2.S Instruction Address Breakpoint Exception (Ox01400) The 603 operates as described in Section 4.5.15, "Instruction Address Breakpoint Exception (OxOI300)," with the exception of the following: To avoid spurious IABR exceptions, the IABR special-purpose register should not be loaded with an address that falls within the same cache line as a disabled, but matching IABR address. C.2.6 Cache Control Instructions The 603 operates as described in Section 3.7, "Cache Control Instructions," with the exception of the following: Note that loop structures that contain long sequences of debz or debi instructions may cause snoop performance degradation. Programmers can improve snoop performance by .s inserting no-op instructions (ori 0,0,0) between debz or debi instructions, replacing the debz or debi instructions with a sequence of write-through store operations, using the decrementer to generate a periodic exception to allow snoop activity, or mapping the address space where the debz or debi instructions execute as global (M = 1). MOTOROLA Appendix C. PowerPC 603 Processor System Design C-21 and Programming Considerations Note that the use of the dcbz instruction in a multiprocessor system can result in loss of data coherency if the dcbz instruction is executed in memory space marked as global (M = 1). Programmers should use software coherency protocols to ensure that no processor can perform a kill operation to memory used by another processor. III C-22 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Glossary of Terms and Abbreviations The glossary contains an alphabetical list of terms, phrases, and abbreviations used in this book. Some of the terms and definitions included in the glossary are reprinted from IEEE Std 754-1985, IEEE Standard for Binary Floating-Point Arithmetic, copyright ©1985 by the Institute of Electrical and Electronics Engineers, Inc. with the permission of the IEEE. A Atomic. A bus access that attempts to be part of a read-write operation to the same address uninterrupted by any other access to that address (the term refers to the fact that the transactions are indivisible). The PowerPC 603e microprocessor initiates the read and write separately, but signals the memory system that it is attempting an atomic operation. If the operation fails, status is kept so that the 603e can try again. The 603e implements atomic accesses through the lwarxlstwcx. instruction pair. B Beat. A single state on the 603e bus interface that may extend across multiple bus cycles. A 603e transaction can be composed of multiple address or data beats. Biased exponent. The sum of the exponent and a constant (bias) chosen to make the biased exponent's range non-negative. Big-endian. A byte-ordering method in memory where the address n of a word corresponds to the most significant byte. In an addressed memory word, the bytes are ordered (left to right) 0, 1,2,3, with 0 being the most significant byte. Boundedly undefined. The results of attempting to execute a given instruction are said to be boundedly undefined if they could have been achieved by executing an arbitrary sequence of defined instructions, in valid form, starting in the state the machine was in before attempting to execute the given instruction. Boundedly undefined results for a given instruction may vary between lijllJ implementations, and between execution attempts in the same implementation. MOTOROLA Glossary of Terms and Abbreviations Glossary-1 Branch folding. A technique of removing the branch instruction from the instruction sequence. Burst. A multiple beat data transfer whose total size is typically equal to a cache block (in the 603e, a 32-byte block). Bus clock. Clock that causes the bus state transitions. Bus master. The owner of the address or data bus; the device that initiates or requests the transaction. C Cache. High-speed memory containing recently accessed data and/or instructions (subset of main memory). Cache block. The cacheable unit for a PowerPC processor. The size of a cache block may vary among processors. For the 603e, it is one cache line (8 words). Cache coherency. Caches are coherent if a processor performing a read from its cache is supplied with data corresponding to the most recent value written to memory or to another processor's cache. Cast-outs. Cache block that must be written to memory when a snoop miss causes the least recently used block with modified data to be replaced. Context synchronization. Context synchronization is the result of specific instructions (such as sc or rfi) or when certain events occur (such as an exception). During context synchronization, ail instructions in execution complete past the point where they can produce an exception; all instructions in execution complete in the context in which they began execution; all subsequent instructions are fetched and executed in the new context. Copy-back operation. A cache operation in which a cache line is copied back to memory to enforce cache coherency. Copy-back operations consist of snoop push-out operations and cache cast-out operations. D Denormalized number. A nonzero floating-point number whose exponent has a reserved value, usually the format's minimum, and whose explicit or implicit leading significand bit is zero. Glossary-2 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Direct-store segment access. An access to an 110 address space. The 603 defines separate memory-mapped and 110 address spaces, or segments, distinguished by the corresponding segment register T bit in the address translation logic of the 603. If the T bit is cleared, the memory reference is a normal memory-mapped access and can use the virtual memory management hardware of the 603. If the T bit is set, the memory reference is a direct-store access. E Exception. An unusual or error condition encountered by the processor that results in special processing. Exception handler. A software routine that executes when an exception occurs. Normally, the exception handler corrects the condition that caused the exception, or performs some other meaningful task (such as aborting the program that caused the exception). The addresses of the exception handlers are defined by a two-word exception vector that is branched to automatically when an exception occurs. Exclusive state. EMI state (E) in which only one caching device contains data that is also in system memory. Execution synchronization. All instructions in execution are architecturally complete before beginning execution (appearing to begin execution) of the next instruction. Similar to context synchronization but doesn't force the contents of the instruction buffers to be deleted and refetched. Exponent. The component of a binary floating-point number that normally signifies the integer power to which two is raised in determining the value of the represented number. Occasionally the exponent is called the signed or unbiased exponent. F Feed-forwarding. A 603e feature that reduces the number of clock cycles that an execution unit must wait to use a register. When the source register of the current instruction is the same as the destination register of the previous instruction, the result of the previous instruction is routed to the current instruction at the same time that it is written to the register file. With feed-forwarding, the destination bus is gated to the waiting execution unit over the appropriate source bus, saving the cycles which would be used for the write and read. RI.) Floating-point unit. The functional unit in the 603e processor responsible for executing all floating-point instructions. (Not supported on the EC603e microprocessor) MOTOROLA Glossary of Terms and Abbreviations Glossary-3 Flush. An operation that causes a modified cache block to be invalidated and the data to be written to memory. Fraction. The field of the significand that lies to the right of its implied binary point. G General-purpose register. Any of the 32 registers in the 603e register file. These registers provide the source operands and destination results for all 603e data manipulation instructions. Load instructions move data from memory to registers, and store instructions move data from registers to memory. I IEEE 754. A standard written by the Institute of Electrical and Electronics Engineers that defines operations of binary floating-point arithmetic and representations of binary floating-point numbers. Instruction queue. A holding place for instructions fetched from the current instruction stream. Integer unit. The functional unit in the 603e responsible for executing all integer instructions. Interrupt. An external signal that causes the 603e to suspend current execution and take a predefined exception. Invalid state. EMI state (I) that indicates that the cache block does not contain valid data. K Kill. An operation that causes a cache block to be invalidated. L Latency. The number of clock cycles necessary to execute an instruction and make ready the results of that instruction. Little-endian. A byte-ordering method in memory where the address n of a word corresponds to the least significant byte. In an addressed memory word, the bytes are ordered (left to right) 3, 2, 1,0, with 3 being the most significant byte. Livelock. A state in which processors interact in a way such that no processor makes progress. M Mantissa. The decimal part of logarithm. Glossary-4 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Memory-mapped accesses. Accesses whose addresses use the segmented or block address translation mechanisms provided by the MMU and that occur externally with the bus protocol defined for memory. Memory coherency. Refers to memory agreement between caches and system memory (for example, EMI cache coherency). Memory consistency. Refers to levels of memory with respect to a single processor and system memory (for example, on-chip cache, secondary cache, and system memory). Memory-forced 110 controller interface access. These accesses are made to memory space. They do not use the extensions to the memory protocol described for 110 controller interface accesses, and they bypass the page- and block-translation and protection mechanisms. Memory management unit. The functional unit in the 603e that translates the logical address bits to physical address bits. Modified state. EMI state (M) in which one, and only one, caching device has the valid data for that address. The data at this address in external memory is not valid. N NaN. An abbreviation for not a number; a symbolic entity encoded in floating -point format. There are two types of NaN s-signaling NaN s and quiet NaNs. No-op. No-operation. A single-cycle operation that does not affect registers or generate bus activity. o Out-of-order. An operation is said to be out-of-order when it is not guaranteed to be required by the sequential execution model, such as the execution of an instruction that follows another instruction that may alter the instruction flow. For example, execution of instructions in an unresolved branch is said to be out-of-order, as is the execution of an instruction behind another instruction that may yet cause an exception. The results of operations that are performed out-of-order are not committed to architected resources until it can be ensured that these results adhere to the in-order, or sequential execution model. Overflow. An error condition that occurs during arithmetic operations when the result cannot be stored accurately in the destination register(s). re!.] For example, if two 32-bit numbers are added, the sum may require 33 bits due to carry. Since the 32-bit registers of the 603e cannot represent this sum, an overflow condition occurs. MOTOROLA Glossary of Terms and Abbreviations Glossary-5 P Packet. A term used in the 603 with respect to direct store operations. Page. A 4-Kbyte area of memory, aligned on a 4-Kbyte boundary. Park. The act of allowing a bus master to maintain mastership of the bus without having to arbitrate. Pipelining. A technique that breaks instruction execution into distinct steps so that multiple steps can be performed at the same time. Precise exceptions. The pipeline can be stopped so the instructions that preceded the faulting instruction can complete, and subsequent instructions can be executed following the execution of the exception handler. The system is precise unless one of the imprecise modes for invoking the floating-point enabled exception is in effect. Q Quiesce. To come to rest. The processor is said to quiesce when an exception is taken or a sync instruction is executed. The instruction stream is stopped at the decode stage and executing instructions are allowed to complete to create a controlled context for instructions that may be affected by out-of-order, parallel execution. See Context synchronization. Quiet NaNs. Propagate through almost every arithmetic operation without signaiing exceptions. These are used to represent the results of certain invalid operations, such as invalid arithmetic operations on infinities or on Nfu~~S, when invalid. S Scan interface. The 603e's test interface. Shadowing. Shadowing allows a register to be updated by instructions that are executed out of order without destroying machine state information. Signaling NaNs. Signal the invalid operation exception when they are specified as arithmetic operands Significand. The component of a binary floating-point number that consists of an explicit or implicit leading bit to the left of its implied binary point and a fraction field to the right. Slave. The device addressed by a master device. The slave is identified in the address tenure and is responsible for supplying or latching the requested data for the master during the data tenure. Glossary-6 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA Snooping. Monitoring addresses driven by a bus master to detect the need for coherency actions. Snoop push. Write-backs due to a snoop hit. The block will transition to an invalid or exclusive state. Split-transaction. A transaction with independent request and response tenures. Split-transaction Bus. A bus that allows address and data transactions from different processors to occur independently. Static branch prediction. Mechanism by which software (for example, compilers) can give a hint to the machine hardware about the direction the branch is likely to take. Superscalar machine. A machine that can issue multiple instructions concurrently from a conventional linear instruction stream. Supervisor mode. The privileged operation state of the 603e. In supervisor mode, software can access all control registers and can access the supervisor memory space, among other privileged operations. T Tenure. The period of bus mastership. For the 603e, there can be separate address bus tenures and data bus tenures. A tenure consists of three phases: arbitration, transfer, termination Transaction. A complete exchange between two bus devices. A transaction is minimally comprised of an address tenure; one or more data tenures may be involved in the exchange. There are two kinds of transactions: address/data and address-only. Transfer termination. Signal that refers to both signals that acknowledge the transfer of individual beats (of both single-beat transfer and individual beats of a burst transfer) and to signals that mark the end of the tenure. U Underflow. An error condition that occurs during arithmetic operations when the result cannot be represented accurately in the destination register. For example, underflow can happen if two floating-point fractions are multiplied and the result is a single-precision number. The result may require a larger exponent and/or mantissa than the single- @I.] precision format makes available. In other words, the result is too small to be represented accurately. MOTOROLA Glossary of Terms and Abbreviations Glossary-7 User mode. The unprivileged operating state of the 603e. In user mode, software can only access certain control registers and can only access user memory space. No privileged operations can be performed. W Write-through. A memory update policy in which all processor write cycles are written to both the cache and memory. Glossary-8 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA INDEX Numerics floating -point load and store, 2-34 603e integer load and store, 2-29 features Address translation, see Memory management unit hardware, 1-7 Addressing conventions list of features, 1-2 addressing modes, 2-18 PID7v-specific, 1-4 alignment, 2-13 instructions, 2-46 Aligned data transfer, 2-13, 8-15, 8-19 overview, I-I, 1-16 Alignment PID7v data transfers, 2-13, 8-15 features, 1-4 exception, 4-26, 5-16 HlDO bits (PID7v-specific), 2-8, 3-22 rules, 2-13 processor identification (PID) number An signals, 7-7 definition, xxvii, I-I APE signal, 7-8, 8-13 603-specific features, 1-7, C-I APn signals, 7-8 Arbitration, system bus, 8-9, 8-22 ARTRY signal, 3-21, 7-16 A Atomic memory references AACK signal, 7-16 stwcx., 2-38 ABB signal, 7-5, 8-8 using Iwarxlstwcx., 3-19 ABE (address broadcast enable) bit, 2-8, 3-22 Address bus B address tenure, 8-7, C-4 address transfer BG signal, 7-5, 8-8 An, 7-7 Block address translation APE, 7-8, 8-13 BAT register initialization, 5-20 APn, 7-8 block address translation flow, 5-11 address transfer attribute selection of block address translation, 5-8 CI,7-14 Boundedly undefined, definition, 2-16 CSEn, 7-15 BR signal, 7-4, 8-8 GBL,7-15 Branch folding, 6-14 TBST, 7-13, 8-13 Branch instructions TCn, 7-14 address calculation, 2-36 TCn, 8-20 branch instructions, 2-36, A-24 TSIZn, 7-12 condition register logical, 2-36, A-24 TSIZn, 8-13 system linkage, 2-42, A-25 TIn, 7-9,8-13 trap, 2-37, A-25 WT,7-14 Branch prediction, 6-1, 6-16 address transfer start Branch processing unit TS, 7-6,8-12 branch instruction timing, 6-17 XATS (603-specific), 1-7, C-2 execution timing, 6-14 XATS(603-specific), C-3 latency, branch instructions, 6-23 address transfer termination overview, 1-9 AACK,7-16 Branch resolution, 6-1 ARTRY, 3-21,7-16 Burst data transfers terminating address transfer, 8-20 32-bit data bus, 8-15 arbitration signals, 7-4, 8-8 64-bit data bus, 8-14 bus arbitration transfers with data delays, timing, 8-36 ABB, 7-5, 8-8 Burst transactions, 3-8 BG, 7-5, 8-8 Bus arbitration, see Data bus BR, 7-4, 8-8 Bus configurations, 8-38, 8-40 bus parking, 8-11 Bus interface unit (BIU), 3-2 Address calculation Byte ordering .'~'., branch instructions, 2-36 default, 2-18 effective address, 2-19 Byte-reverse instructions, 2-31, A-22 MOTOROLA Index Index-1 INDEX C Completion, definition, 6-1 Cache Context synchronization, 2-20 Conventions, xxxiii, xxxvii, 2-12 characteristics, 3-1 instructions, 2-41, 2-44, 3-22, A-26 COP/scan interface, 7-28 MEl state definition, 3-15 Copy-back mode, 6-19 CR logical instructions, 2-36 organization, instruction/data, 3-3-3-7 CSEn signals, 7-15, 8-30 overview, 1-25 Cache arbitration, 6-9 Cache block push operation, 3-8 D Cache block, definition, 3-1 Data bus Cache cast-out operation, 3-8 32-bit data bus mode, 8-38 Cache coherency arbitration signals, 7-17, 8-8 actions on load operations, 3-18 bus arbitration, 8-22 actions on store operations, 3-19 data tenure, 8-7, C-4 copy-back operation, 3-11 data transfer, 7-19, 8-24 in single-processor systems, 3-18 data transfer termination, 7-21,8-25 MEl protocol, 3-15 Data cache out-of-order execution, 3-13 basic operations, 3-8 overview, 3-2 broadcasting, 3-7 reaction to bus operations, 3-19 bus transactions, 3-8 WIMG bits, 3-10, 3-13, 8-30 cache control, 3-6 write-back mode, 3-11 configuration, 3-1 Cache hit, 6-9 DCFI, DCE, DLOCK bits, 3-6 Cache management instructions, 2-41, 2-44, 3-22, disabling, 3-6 A-26 fill operations, 3-5, 3-8 Cache miss, 6-10 locking, 3-6 Cache operations organization, 3-5, C-15 basic data cache operations, 3-8 touch load operations, 3-7 data cache transactions, 3-8 touch ioad support, 3-/ instruction cache fill operations, 3-4 Data storage interrupt (DSI), see DSI exception overview, 1-13,3-1 Data TLB miss on load exception, 4-34 respoust: tu bus lransa<;liuns, 3-19 Data TLB miss on store exception, 4-35 Cache unit Data transfers memory performance, 6-19 alignment, 2-13, 8-15 operation of the cache, 8-2 burst ordering, 8-14 overview, 3-1 eciwx and ecowx instructions, alignment, 8-19 Cache-inhibited accesses (I bit) signals, 8-24 cache interactions, 3-10 DBB signal, 7-18, 8-8, 8-23 I-bit setting, 3-11 DBDlS signal, 7-21 timing considerations, 6-20 DBG signal, 7-17,8-8 Changed (C) bit maintenance DBWO signal, 7-18, 8-8, 8-24, 8-43 recording, 5-11, 5-21-5-24 DCMP and ICMP registers, 2-10, 5-37 Checkstop Decrementer interrupt, 4-31, 9-2 signal, 7-24, 8-41 Defined instruction class, 2-16 state, 4-22 DHnlDLn signals, 7-19 CI signal, 7-14 Direct address translation (translation disabled) Classes of instructions, 2-16 data accesses, 3-11, 5-9, 5-11, 5-20 Clean block operation, 3-20 instruction accesses, 3-11, 5-9, 5-11, 5-20 Clock signals Direct-store access on the 603e, 3-9 CLK_OUT,7-30 Direct-store interface (603-specific) PLL_CFGn,7-30 accesses, C-18 SYSCLK,7-30 alignment exception, C-18 Compare instructions, 2-27, A-18 architectural ramifications of accesses, C-2 Completion considerations, 6-11 Index-2 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA INDEX bus protocol returning from an exception handler, 4-16 address and data tenures, C-4 summary, 2-20 detailed description, C-6 system call, 4-31 load access, timing, C-ll system management interrupt, 4-37 load operations, C-5 trace exception, 4-32 store access, timing, C-12 Execution synchronization, 2-20 store operations, C-5 Execution units, 1-10 transactions, C-4 External control instructions, 2-42, 8-19, A-27 XATS,C-3 instructions with no effect, C-19 F no-op instructions, C-19 protection, C-18 Features list, 1-2 segment protection, C-18 Feed forwarding, 6-6 selection of direct-store segments, C-16 Finish cycle, definition, 6-1 unsupported functions, C-19 Floating-point model Dispatch considerations, 6-11 FEO/FE1 bits, 4-14 DMISS and IMISS registers, 2-9, 5-36 FP arithmetic instructions, 2-26, A-19 DPE signal, 7-21 FP compare instructions, 2-27, A-20 DPn signals, 7-20 FP execution models, 2-12 DRTRY signal, 7-22, 8-25, 8-28 FP load instructions, 2-34, A-23 DSI exception, 4-23 FP move instructions, 2-28, A-24 FP multiply-add instructions, 2-26, A-20 FP rounding/conversion instructions, 2-27, A-20 E FP store instructions, 2-34, A-24 EC603e FP unavailable exception, 4-31 features list, 1-2 FPSCR instructions, 2-27, A-20 instructions not supported, B-3 Floating-point unit overview, 1-1 execution timing, 6-18 Effective address calculation latency, FP instructions, 6-26 address translation, 5-3 overview, 1-10 branches, 2-19, 2-36 Flow control instructions loads and stores, 2-19, 2-29, 2-34 branch instruction address calculation, 2-36 Error termination, 8-29 branch instructions, 2-36 Exceptions condition register logical, 2-36 alignment exception, 4-26 Flush block operation, 3-20 data TLB miss on load, 4-34 FPRO-FPR31,2-4 data TLB miss on store, 4-35 FPSCR instructions, 2-27, A-20 decrementer interrupt, 4-31 DSI exception, 4-23 G enabling and disabling, 4-14 exception classifications, 4-2 GBL signal, 7-15 exception processing, 4-10, 4-15 GPRO-GPR31,2-4 external interrupt, 4-25 Guarded memory bit (G bit) FP unavailable exception, 4-31 cache interactions, 3-10 instruction address breakpoint, 4-35 G-bit setting, 3-12 instruction related, 2-20 instruction TLB miss, 4-33 H machine check exception, 4-21 HASHI and HASH2 registers, 2-10, 5-37 overview, 1-27 Hashing functions program exception, 4-29 primary PTEG, 5-32 register settings secondary PTEG, 5-33 FPSCR,4-30 MSR,4-17 SRRO/SRRl,4-11 reset, 4-18 HIDO register bit settings, 2-8 DCFI, DCE, DLOCK bits, 3-6 doze bit, 9-4 1",.1 MOTOROLA Index Index-3 INDEX doze, nap, sleep, DPM bits, 2-8 FP store instructions, 2-34, A-24 DPM enable bit, 9-3 FPSCR isntructions, 2-27, A-20 ICFI, ICE, ILOCK bits, 3-4 multiply-add, 2-26, A-20 nap bit, 9-4 rounding and conversion, 2-27, A-20 PID7v-specific bits, 1-18,3-22 illegal instructions, 2-17 HID 1 register integer bit settings, 2-9 arithmetic, 2-22, A-17 PLL configuration, 2-9, 7-30 compare, 2-22, A-18 HRESET signal, 7-25 load, A-21 logical, 2-23, A-18 multiple, 2-32, A-22 rotate and shift, 2-24, A-18-A-19 I/O tenures, C-4 store, 2-30, A-22 IABR (instruction address breakpoint register), 2-11 latency summary, 6-22 ICE control bit, 3-4 load and store ICFI control bit, 3-4 address generation, floating-point, 2-34 IEEE 1149.1-compliant interface, 8-43 address generation, integer, 2-29 IFEM (instruction fetch enable) bit, 1-18, 2-8 byte-reverse instructions, 2-31, A-22 Illegal instruction class, 2-17 integer load, 2-29 ILOCK control bit, 3-4 integer mUltiple instructions, 2-32, A-22 Instruction address breakpoint exception, 4-35 integer store, 2-30 Instruction cache string instructions, 2-33, A-23 cache control bits, 3-4 memory control, 2-41, 2-44, 3-22, A-26 cache fill operations, 3-4 memory synchronization, 2-38, 2-40, A-23 configuration, 3-1 PowerPC instructions, list ICFI, ICE, ILOCK bits, 3-4 form (format), A-28 organization, 3-3, C-14 function, A-17 Instruction timing legend, A-39 execution unit, 6-14 mnemonic. A-I fetch,6-9 opcode, A-9 instruction flow, 6-6 processor control, 2-37, 2-39, 2-42, A-25 memory performance considerations, 6-18 rese.rved instructions, 2-18 overview, 1-33, 6-3 segment register manipulation, 2-45, A-26 terminology, 6-1 simplified mnemonics, 2-46 timing considerations, 6-5 supervisor-level cache management, 2-44 Instruction TLB miss exception, 4-33 support for lwarx/stwcx., 8-42 Instruction unit, 1-9 system linkage, 2-42, A-25 Instructions TLB management instructions, 2-45, A-26 603e, instructions not implemented, B-1 trap instructions, 2-37, A-25 603e-specific instructions, 2-46 INT signal, 7-23, 8-41 branch address calculation, 2-36 Integer arithmetic instructions, 2-22, A-17 branch instructions, 2-36, A-24 Integer compare instructions, 2-22, A-18 cache management instructions, 2-41, 2-44, Integer load instructions, 2-29, A-21 3-22, A-26 Integer logical instructions, 2-23, A-18 classes, 2-16 Integer multiple instructions, 2-32, A-22 condition register logical, 2-36, A-24 Integer rotate and shift instructions, 2-24, A-18-A-19 defined instructions, 2-16 Integer store instructions, 2-30, A-22 EC603e, instructions not supported, B-3 Integer unit external control, 2-42, A-27 execution timing, 6-18 floating-point latency, integer instructions, 6-24 arithmetic, 2-26, A-19 overview, 1-10 compare, 2-27, A-20 Interrupt, external, 4-25 "~I.I FP load instructions, 2-34, A-23 Interrupt, see Exceptions FP move instructions, 2-28, A-24 FP status and control register, 2-27 Index-4 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA INDEX K address translation mechanisms, 5-8, 5-11 Kill block operation, 3-20 block address translation, 5-8, 5-11, 5-20 block diagram, 5-5-5-7 direct address translation, 3-11, 5-9, 5-11, 5-20 L exceptions, 5-14 Latency, 6-1, 6-3, 6-22, 8-24 features summary, 5-2 Load operations instructions and registers, 5-17 I/O load accesses, C-5 memory protection, 5-10 memory coherency actions, 3-18 overview, 1-12, 1-32 Load/store page address translation, 5-8,5-11,5-28 address generation, 2-29, 2-34 page history status, 5-11, 5-21-5-25 byte-reverse instructions, 2-31, A-22 page table search operation, 5-30 floating-point load instructions, 2-34, A-23 segment model, 5-21 floating-point move instructions, 2-28, A-24 software table search operation, 5-33, 5-38, 5-40 floating-point store instructions, 2-34, A-24 Memory synchronization integer load instructions, 2-29, A-21 instructions, 2-38, 2-40, A-23 integer store instructions, 2-30, A-22 stwcx., 2-38 load/store multiple instructions, 2-32, A-22 Memory/cache access modes memory synchronization instructions, 2-38, performance impact of copy-back mode, 6-19 2-40, A-23 see also WIMG bits string instructions, 2-33, A-23 Misaligned accesses, 2-13 Load/store unit Misaligned data transfer, 8-17, 8-19 execution timing, 6-18 Move instructions, 2-28 latency, load and store instructions, 6-28 MSR (machine state register) Logical addresses bit settings, 4-12 translation into physical addresses, 5-1 DRlIR bit, 4-13 Iwarx/stwcx. EE bit, 4-12 atomic memory references, 3-19 FEOIFEI bits, 4-14 support, 8-42 POW bit, 2-5, 4-12 RI bit, 4-15 M settings due to exception, 4-17 TGPR bit, 2-5, 4-12 Machine check exception checkstop state, 4-22 register settings, 4-22 N SRR I bit settings, 4-11 No-DRTRY mode, 8-40 machine check exception enabled, 4-22 Nondenormalized mode, support, 2-25 MCP signal, 7-24 MEl protocol definition, MEl states, 3-15 o enforcing memory coherency, 8-30 Operand conventions, 2-12 hardware considerations, 3-17 Operand placement and performance, 2-14 Memory accesses, 8-4 Operating environment architecture (OEA), xxviii, Memory coherency bit (M bit) 1-16,2-42 cache interactions, 3-10 Optional instructions, A-39 I-bit setting, 3-12 M-bit setting, 3-12 p timing considerations, 6-19 Page address translation Memory control instructions page address translation flow, 5-28 segment register manipulation, 2-45 page size, 5-21 supervisor-level cache management, 2-44 selection of page address translation, 5-8, 5-14 TLB management, 2-45 table search operation, 5-30 user-level cache, 2-41, 2-44, 3-22 TLB organization, 5-26 Memory management unit Page history status address translation flow, 5-11 Rand C bit recording, 5-11, 5-21-5-25 MOTOROLA Index Index-5 INDEX Page tables no-execute protection, 5-12 page table updates, 5-50 options available, 5-10 resources for table search operations, 5-34 protection violations, 5-14 software table search operation, 5-33, 5-38 PTEGs (PTE groups), 5-30 table search for PTE, 5-30 PTEs (page table entries), 5-30 Performance considerations, memory, 6-18 Phase locked loop, 9-4 Q Physical address generation memory management unit, 5-1 QACK signal, 7-26, 8-38, 8-41 PID7v-603e features, 1-4 QREQ signal, 7-26, 8-42 Pipeline Qualified bus grant, 8-8 instruction timing, definition, 6-2 Qualified data bus grant, 8-23 Pipeline stages description, 6-4 R Pipelined execution unit, 6-4 Read atomic operation, 3-20 PLL configuration, 7-31 Read operation, 3-20 Power management Read with intent to modify operation, 3-20 doze mode, 9-4 Real address (RA), see Physical address generation doze, nap, sleep, DPM bits, 2-8, 2-9 Real addressing mode, see Direct address translation full-power mode, 9-3 Reduced-pinout mode, 8-40 nap mode, 9-4 Referenced (R) bit maintenance programmable power modes, 9-3 recording, 5-11, 5-21-5-24, 5-31 sleep mode, 9-5 Registers software considerations, 9-6 configuration registers Power management modes, 1-15 MSR,2-5 Power-on reset settings, 4-19 PVR,2-6 PowerPC 603-specific features, 1-7, C-I exception handling registers PowerPC architecture DAR, 2-6 instruction list, A-I. A-9, A-17 DSISR,2-6 levels of implementation, 1-16 SPRGO-SPRG3, 2-6 operating environment architecture (OEA), xxviii, SRRO, 2-6 1-16,2-42 SRRl,2-6 user instruction set architecture (UISA), xxviii, 1- implementation-specific registers 16,2-1 DCMPIICMP, 2-9 virtual environment architecture (VEA), xxviii, 1- DMISSIIMISS, 2-9 16,2-39 HASHlIHASH2, 2-10 Privilege levels HIDOIHIDI, 1-18,2-7 supervisor-level cache instruction, 2-44 IABR,2-11 Privileged state, see Supervisor mode RPA,2-11 Problem state, see User mode Run_N, 1-19,2-12 Process switching, 4-16 memory management registers Processor control instructions, 2-37, 2-39, 2-42, A-25 BAT registers, 2-6 Processor identification (PID) number SDRl,2-6 definition, xxvii, 1-1 SR,2-6 Program exception, 4-29 supervisor-level Program order, 6-2 BAT registers, 2-6 Programmable power states DAR, 2-6 doze mode, 9-4 DCMP and ICMP, 2-9, 5-37 full-power mode (DPM enabled/disabled), 9-3 DEC, 2-7 nap mode, 9-4 DMISS and IMISS, 2-9, 5-36 sleep mode, 9-5 DSISR,2-6 Protection of memory areas EAR, 2-7 direct-store interface protection HASH 1 and HASH2, 2-10, 5-37 (603-specific), C-18 HIDO and HIDl, 1-18,2-7 Index-6 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA INDEX IABR,2-11 checkstop, 8-41 MSR,2-5 cr,7-14 PVR,2-6 CKSTP_IN,7-24 RPA,2-11 CKSTP_OUT,7-25 SDRI,2-6 CLK_OUT,7-30 SPRGO-SPRG3,2-6 configuration, 7-3 SR,2-6 COP/scan interface, 7-28 SRRO,2-6 CSEn, 7-15, 8-30 SRRl,2-6 data arbitration, 8-8, 8-22 TB,2-6 data transfer termination, 8-25 user-level DBB, 7-18, 8-8, 8-23 CR,2-4 DBDlS,7-21 CTR,2-4 DBG, 7-17, 8-8 FPRO-FPR31,2-4 DBWO, 7-18, 8-8, 8-24, 8-43 FPSCR,2-4 DHnIDLn,7-19 GPRO-GPR31,2-4 DPE,7-21 LR,2-4 DPn,7-20 TB,2-5 DRTRY, 7-22, 8-25, 8-28 TGPRO-TGPR3,5-35 GBL,7-15 XER,2-4 HRESET,7-25 Rename buffer, 6-2 INT, 7-23, 8-41 Rename register operation, 6-12 MCP, 7-24 Reservation station, 6-2 PLL_CFGn, 7-30 Reserved instruction class, 2- I 8 QACK, 7-26,8-38,8-41 Reset QREQ, 7-26, 8-42 HRESET signal, 7-25, 8-41 reset, 8-41 reset exception, 4-18 RSRV, 7-27, 8-42 settings caused by hard reset, 4-19 SMI, 4-37, 7-24 SRESET signal, 7-26, 8-41 SRESET, 7-26, 8-41 Rotate and shift instructions, 2-24, A-18-A-19 TA,7-22 RPA (required physical address), 2-1 1, 5-38 TBEN,7-27 RSRV signal, 7-27, 8-42 TBST, 7-13, 8-24 Run_N counter register, 1-19, 2-12 TCn, 7-14, 8-20 ~, 7-23, 8-25, 8-29 s TLBlSYNC,7-27 TS,7-6 Segment registers TSIZn, 7-12, 8-13 SR manipulation instructions, 2-45, A-26 TTn, 7-9, 8-13 T bit, C-2, 3 WT,7-14 Segmented memory model, see Memory management XATS (603-specific), 1-7, C-2, C-3 unit Single-beat reads with data delays, timing, 8-35 Self-modifying code, 2-29 Single-beat transactions, 3-8 Serializing instructions, 6-13 Single-beat transfer Signals reads with data delays, timing, 8-34 AACK,7-16 reads, timing, 8-32 ABB, 7-5,8-8 termination, 8-26 address arbitration, 7-4, 8-8 writes, timing, 8-33 address transfer, 8-12 SMI signal, 4-37, 7-24 address transfer attribute, 8-13 Snoop operation, 3-19, 6-19 An, 7-7 Split-bus transaction, 8-8 APE, 7-8 SPR encodings not implemented in 603e, B-5 APn,7-8 SRESET signal, 7-26 ARTRY, 7-16, 8-25 SRRO/SRRI (status save/restore registers) BG, 7-5,8-8 bit settings for machine check exception, 4-11 BR, 7-4,8-8 bit settings for table search operations, 4-11 MOTOROLA Index Index-7 INDEX Key bit derivation (SRR1), 5-36 Termination, 8-20, 8-25 Stall,6-2 TGPRO-GPR3 registers, 5-35 Static branch prediction, 6-16 Throughput, 6-2 Store operations Timing diagrams, interface I/O operations to BUC, C-5 address transfer signals, 8-12 memory coherency actions, 3-19 burst transfers with data delays, 8-36 single-beat writes, 8-33 direct-store interface load access, C-ll String instructions, 2-33, A-23 direct-store interface store access, C-12 Superscalar, 6-2 single-beat reads, 8-32 Supervisor mode, see Privilege levels single-beat reads with data delays, 8-34 Supervisor-level registers summary, 2-5 single-beat writes, 8-33 sync operation, 3-20 single-beat writes with data delays, 8-35 Synchronization use of TEA, 8-37 context/execution synchronization, 2-19 using DBWO, 8-43 execution of rfi, 4-16 Timing, instruction memory synchronization instructions, 2-38, BPU execution timing, 6-14 2-40, A-23 branch timing example, 6-17 SYSCLK signal, 7-30 cache arbitration, 6-9 System call exception, 4-31 cache hit, 6-9 System interface cache miss, 6-10 overview, 1-35 FPU execution timing, 6-18 System linkage instructions, 2-42, A-25 instruction dispatch, 6-11 System management interrupt, 4-37,9-2 instruction fetch timing, 6-9 System quiesce control signals, 8-42 instruction flow, 6-6 System register unit instruction scheduling guidelines, 6-20 execution timing, 6-18 ill execution timing, 6-18 latency, CR logical instructions, 6-24 latency summary, 6-22 latency, system register instructions, 6-23, C-20 load/store unit execution timing, 6-18 System status overview, 6-3 CKSTP IN,7-24 SRU execution timing, 6-18 CKSTP_OUT, 7-25 stage, definition, 6-2 HRESET,7-25 TLB INT,7-23 description, 5-25 MCP, 7-24 invalidate, A-26 QACK,7-26 invalidate (tlbie instruction), 5-27, 5-50 QREQ,7-26 TLB management instructions, 2-46, A-26 RSRV, 7-27 TI..BISYNC signal, 7-27 SMI,7-24 Trace exception, 4-32 SRESET,7-26 Transactions, data cache, 3-8 TBEN,7-27 Transfer, 8-11, 8-24 TLBISYNC, 7-27 Trap instructions, 2-37 TS signal, 7-6, 8-12 TSIZn signals, 7-12, 8-13 T TIn signals, 7-9,8-13 TA signal, 7-22 Table search operations algorithm, 5-30 U software routines, 5-33 Use of TEA, timing, 8-37 software routines for the 603e, 5-38-5-50 User mode, 4-1 SRRI bit settings, 4-11 User instruction set architecture (UISA), xxviii, table search flow (primary and secondary), 5-31 1-16,2-1 TBEN signal, 7-27 User-level registers summary, 2-4 TBST signal, 7-13, 8-13, 8-24 user-mode, 2-42 TCn signals, 7-14, 8-20 Using DBWO, timing, 8-43 TEA signal, 7-23, 8-29 Index-a MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA INDEX v Virtual environment architecture (VEA), xxviii, 1-16,2-39 W WIMG bits, 3-10, 8-30 Write with atomic operation, 3-20 Write with flush operation, 3-20 Write with kill operation, 3-20 Write-back, 6-2 Write-back mode, 3-11 Write-through mode (W bit) cache interactions, 3-10 timing considerations, 6-\9 W-bit setting, 3-11 WT signal, 7-14 X XATS signal (603-specific), 1-7, C-2, C-3 MOTOROLA Index Index-9 INDEX Index-10 MPC603e & EC603e RISC Microprocessors User's Manual MOTOROLA MOTOROLA AUTHORIZED DISTRIBUTOR & WORLDWIDE SALES OFFICES NORTH AMERICAN DISTRIBUTORS UNITED STATES Thousand Oaks ILLINOIS ALABAMA Newark ..... ..... (805)449-1480 Addison Huntsville Woodland Hills Wyle Laboratories ..... . (708)620-{)969 Arrow/Schweber Electronics ... (205)837-6955 HamiltonfHalimark .... (818)594-{)404 Arlington Heights FAI ......................... (205)837-9209 COLORADO HamiitonfHalimark ....... (847)797-7300 Future Electronics ............ (205)830-2322 Lakewood Chicago Hamilton/Hallmark ........... (205)837-8700 FAI · .. (303)237-1400 FAI .............. . . . .. (708)843-0034 Newark. . . . . . . . (205)837-9091 Future Electronics .. · .. (303)232-2008 Newark Electronics Corp ... 1-800-4NEWARK Wyle Electronics... . ... (205)830-1119 Denver Hoffman Estates Newark ..................... (303)373-4540 Future Electronics . . .. (708)882-1255 ARIZONA Phoenix Englewood Itasca FAI ......................... (602)731-4661 ArrowfSchweber Electronics ... (303)799-0258 ArrowfSchweber Electronics ... (708)250-{)500 Future Electronics ............ (602)968-7140 HamiitonfHalimark .... . ..... (303)790-1662 Palatine PENSTOCK ................. (303)799-7845 PENSTOCK. . .............. (708)934-3700 Hamilton/Hallmark ........... (602)736-7000 Wyle Electronics ............. (602)804-7000 Thornton Schaumburg Wyle Electronics ............. (303)457-9953 Newark .. (708)310-8980 Tempe Arrow/Schweber Electronics ... (602)431-{)030 CONNECTICUT INDIANA Newark ..................... (602)966-6340 Bloomfield Indianapolis Newark ..................... (203)243-1731 ArrowfSchweber Electronics ... (317)299-2071 PENSTOCK ................. (602)967-1620 Cheshire HamiltonfHalimark ........... (317)575-3500 CALIFORNIA FAI ......................... (203)250-1319 FAI ......................... (317)469-{)441 Agoura Hills Future Electronics ............ (317)469-{)447 Future Electronics ............ (818)865-0040 Future Electronics ............ (203)25Q-{)083 Hamilton/Hallmark ........... (203)271-5700 Newark ..................... (317)259-{)085 Calabassas Arrow/Schweber Electronics ... (818)880-9686 Wallingford Ft. Wayne ArrowTSchweberElectronics ... (203)265-7741 Newark ..................... (219)484-{)766 Wyle Electronics ............. (818)880-9000 Wyle Electronics ............. (203)269-8077 PENSTOCK ....... (219)432-1277 Culver City Hamilton/Hallmark ........... (310)558-2000 FLORIDA IOWA Altamonte Springs Cedar Rapids Garden Grove Newark ......... . ..... (319)393-3800 Newark ..................... (714)893-4909 Future Electronics ............ (407)865-7900 Clearwater KANSAS Irvine Arrow/Schweber Electronics ... (714)587-{)404 FAI ......................... (813)530-1665 Kansas City Future Electronics ............ (813)530-1222 FAI ............ . . (913)381-6800 FAI ......................... (714)753-4778 Future Electronics ............ (714)453-1515 Deerfield Beach Lenexa ArrowfSchweber Electronics ... (305)429-8200 Arrow/Schweber Electronics .... (913)541-9542 Hamilton/Hallmark ........... (714)789-4100 Wyle Electronics ............. (305)420-0500 Olathe Wyle Laboratories Corporate .. (714)753-9953 PENSTOCK ................. (913)829-9330 Wyle Electronics ............. (714)789-9953 Ft. Lauderdale FAI ......................... (954)428-9494 Overland Park Los Angeles Future Electronics ............ (913)649-1531 FAI ......................... (818)879-1234 Future Electronics ............ (954)426-4043 HamiltonfHalimark ........... (913)663-7900 Manhattan Beach Hamilton/Hallmark ........... (954)677-3500 Newark ..................... (913)677-{)727 PENSTOCK ................. (310)546-6953 Newark ..................... (954)486-1151 Lake Mary MARYLAND Newberry Park Baltimore PENSTOCK ................. (805)375-6680 ArrowfSchweber Electronics ... (407)333-9300 FAI ......................... (410)312-{)833 Palo Alto LargorrampaiSt. Petersburg HamiltonfHalimark ........... (813)507-5000 Columbia Newark ..................... (415)812-6300 Arrow/Schweber Electronics ... (301 )596-7800 Rancho Cordova Newark................... (813)287-1578 Future Electronics...... . .. (410)29Q-{)600 Wyle Electronics ... ...... (916)638-5282 Wyle Electronics. .. . . . . . .. (813)376-3004 HamiitonfHalimark (410)720-3400 Riverside Maitland PENSTOCK......... . .. (410)290-3746 Newark .......... . · . .. (909)980-21 05 Wyle Electronics ............. (407)740-7450 Wyle Electronics.... .. (410)312-4844 Rocklin Orlando HamiltonfHalimark .. · . .. (916)632-4500 FAI . . . . .............. (407)865-9555 Hanover Newark. . . .. . . . . . . . . . .. (407)896-6350 Newark ............. . .. (410)712-6922 Sacramento FAI ..... (916)782-7882 Tallahassee MASSACHUSETTS Newark ............ . · . .. (916)565-1760 FAI · .. (904)668-7772 Bedford Wyle Electronics... . ...... (617)271-9953 San Diego Tampa Arrow/Schweber Electronics ... (619)565-4800 Newark ... (813)287-1578 Boston ArrowfSchweber Electronics ... (508)658-0900 FAI ......................... (619)623-2888 PENSTOCK. . .... (813)247-7556 FAI . .. (508)779-3111 Future Electronics ............ (619)625-2800 Winter Park Hamilton/Hallmark .. (407)657-3300 Newark ..... . . .. 1-800-4NEWARK HamiltonfHalimark .... .. (619)571-7540 PENSTOCK .. (407)672-1114 Bolton Newark.. .. (619)453-8211 Future Corporate ....... (508)779-3000 PENSTOCK. . . . . . . . . . .. (619)623-9100 GEORGIA Burlington Wyle Electronics ....... . .. (619)556-6600 Atlanta PENSTOCK ... (617)229-9100 San Jose FAI. .. (404)447-4767 Peabody ArrowfSchweberElectronics ... (408)441-9700 Duluth Hamilton/Hallmark .. (508)532-3701 Arrow/Schweber Electronics ... (408)426-6400 ArrowfSchweber Electronics ... (404)497-1300 HamiltonfHalimark .. (770)623-4400 Woburn FAI ......................... (408)434-0369 Newark ...... (617)935-8350 Future Electronics .. (408)434-1122 Norcross MICHIGAN Future Electronics ...... (770)441-7676 Santa Clara Detroit Wyle Electronics .. (408)727-2500 Newark. . . . . . . . . . . . . . (770)448-1300 FAI..... . ............... (313)513-{)015 Santa Fe Springs PENSTOCK ............ (770)734-9990 Future Electronics ............ (616)698-6800 Newark ..................... (310)929-9722 Wyle Electronics .......... (770)441-9045 Grand Rapids Sierra Madre IDAHO Newark. . . ... (616)954-6700 PENSTOCK ................. (818)355-6775 Boise Sunnyvale FAI ......................... (208)376-6080 Hamilton/Hallmark ........... (408)435-3600 Newark ..... . (208)342-4311 continued on next page PENSTOCK ................. (408)730-0300 For changes to this information contact Technical Publications at FAX (602) 244-6560 AUTHORIZED DISTRIBUTORS - continued UNITED STATES - continued NORTH CAROLINA EIPaso MICHIGAN - continued Charlotte FAI ... . ... (915)577--B531 livonia FAI ........ (704)548-9503 Newark . (915)772-6367 Arrow/Schweber Electronics ... (810)455-0850 Future Electronics ............ (704)547-1107 Ft. Worth Future Electronics ............ (313)261-5270 Newark .. . . .... (704)535-5650 Allied Electronics ............. (817)336-5401 Hamilton/Hallmark ........... (313)416-5800 Morrisville Houston Troy Wyle Electronics ............. (919)469-1502 Arrow/Schweber Electronics ... (713)647-6868 Newark ......... . . (810)583-2899 Raleigh FAI .. ' ... (713)952-7088 MINNESOTA Arrow/Schweber Electronics ... (919)876-3132 Future Electronics ... (713)785-1155 Bloomington FAI . . . . . . . . . . . . . . .... (919)876-0088 Hamilton/Hallmark ....... (713)781-6100 Wyle Electronics .............. (612)853-2280 Future Electronics ............ (919)790-7111 Newark .. .. (713)894-9334 Burnsville Hamilton/Hallmark .... (919)872-0712 Wyle Electronics .' .. (713)784-9953 PENSTOCK .................. (612)882-7630 Newark. . . . . . . . . . . .. 1-800-4NEWARK Richardson Eden Prairie OHIO PENSTOCK ... (214)479-9215 Arrow/SchweberElectronics ... (612)941-5280 Centerville Wyle Electronics .' (214)235-9953 FAI ......................... (612)947-0909 Arrow/Schweber Electronics ... (513)435-5563 San Antonio Future Electronics. . .. . ...... (612)944-2200 Cleveland FAI. · ...... (210)738-3330 Hamilton/Hallmark.... (612)881-2600 FAI .. (216)448-0061 Newark (210)734-7960 Minneapolis Newark. . ..... (216)391-9330 UTAH Newark ............. . (612)331-6350 Columbus Draper MISSOURI Newark .. .... (614)328-0352 Wyle Electronics .......... (801 )523-2335 Earth City Dayton Salt Lake City Hamilton/Hallmark ........... (314)291-5350 FAI .... ......... .. (513)427-6090 Arrow/Schweber Electronics ... (801 )973-6913 St. Louis Future Electronics. . ...... (513)426-0090 FAI .. (301 )467-9696 Arrow/SchweberElectronics ... (314)567-6888 Hamilton/Hallmark ........... (513)439-6735 Future Electronics " (801 )467-4448 Future Electronics ............ (314)469-6805 Newark ......... (513)294-8980 Hamilton/Hallmark ........... (801 )266-2022 FAI ......................... (314)542-9922 Mayfield Heights Newark ... . .. (801)261-5660 Newark........ . ....... (314)453-9400 Future Electronics . . . .. (216)449-6996 West Valley City NEW JERSEY Miamisburg Wyle Electronics ............. (801)974-9953 Bridgewater Wyle Electronics . (937)436-9953 WASHINGTON PEIiJSTOCK ......... . .. (908)575-9490 Solon Bellevue East Brunswick Arrow/Schweber Electronics ... (216)248-3990 Almac Electronics Corp. " (206)643-9992 Newark ............. . .. (908)937-6600 Hamilton/Hallmark (216)498-1100 PENSTOCK .. (206)454-2371 Fairfield Wyle Electronics ............. (216)248-9996 Bothell FAI ............... . (201)331-1133 Worthington Future Electronics . ... .. (206)489-3400 Marlton Hamilton/Hallmark . (614)888-3313 Kirkland Arrow/Schweber Electronics ... (609)596-8000 OKLAHOMA Newark. · ........... (206)814-6230 FAI . . . . . . . . . . . . . . . . . (609)988-1500 Tulsa Redmond Future Electronics ............ (609)596-4080 FAI .. . ...... (918)492-1500 Hamilton/Hallmark · ...... (206)882-7000 Mt. Laurel Hamilton/Hallmark (918)459-6000 Wyle Electronics ...... (206)881-1150 Hamilton/Hallmark ........... (609)222-6400 Newark. (918)252-5070 Seattle Wyle Electronics ............. (609)439-9110 OREGON FAI (206)485-6616 Oradell Beaverton WISCONSIN Wyle Electronics ............. (201 )261-3200 Arrow/Almac Electronics Corp. . (503)629-8090 Brookfield Pinebrook Future Electronics .. (503)645-9454 Arrow/Schweber Electronics ... (414)792-0150 Arrow/Schweber Electronics (201 )227-7RRO He!T!!!tor.!Ha!!mark ........... (503)526-6200 ruiurt:l Eiecironics .. (4 i4)879-o244 Wyle Electronics ............. (201 )882-8358 Portland Wyle Electronics .. .. (414)879-0434 Parsippany FAI .. · ...... (503)297-5020 Madison Future Electronics ...... ' (201 )299-0400 Newark. ...... (503)297-1984 Newark. · ........... (608)278-0177 Hamilton/Hallmark ...... (201)515-1641 PENSTOCK ... (503)646-1670 Milwaukee NEW MEXICO Wyle Electronics .. · ...... (503)598-9953 FAI . .... (414)792-9778 Albuquerque PENNSYLVANIA New Berlin Hamilton/Hallmark ........... (505)293-5119 Coatesville Hamilton/Hallmark .... (414)780-7200 Newark. . . . . . . .... (505)828-1878 PENSTOCK. . ........ (610)383-9536 Wauwatosa NEW YORK Ft. Washington Newark .. (414)453-9100 Bohemia Newark . . · ...... (215)654-1434 Newark. . . . . . . . . . . . . .. . .... (516)567-4200 Pittsburgh CANADA Hauppauge Arrow/Schweber Electronics ... (412)963-6807 Arrow/SchweberElectronics ... (516)231-1000 Newark.. . ...... (412)788-4790 ALBERTA FAI ......................... (516)348-3700 TENNESSEE c~~a~ ......... (403)291-5333 Future Electronics ............ (516)234-4000 Knoxville Future Electronics .......... (403)250-5550 Hamilton/Hallmark ........... (516)434-7400 Newark ... . ....... (615)588-6493 Hamilton/Hallmark .... (800)663-5500 Newark .................. 1-800-4NEWARK TEXAS Edmonton PENSTOCK. (516)724-9580 Austin FAI ............. . (403)438-5888 Wyle Electronics ............. (516)231-7850 Arrow/Schweber Electronics ... (512)835-4180 Future Electronics · ...... (403)438-2858 Henrietta Future Electronics ............ (512)502-0991 Hamilton/Hallmark .. (800)663-5500 Wyle Electronics ............. (716)334-5970 FAI ........ (512)346-6426 Saskatchewan Konkoma Hamilton/Hallmark ........... (512)219-3700 Hamilton/Hallmark .. (800)663-5500 Hamilton/Hallmark ........... (516)737-0600 Newark ....... (972)458-2528 Pittsford PENSTOCK. . . ...... (512)348-9762 BRITISH COLUMBIA Newark ..................... (716)381-4244 Wyle Electronics.. . ..... (512)833-9953 Vancouver Rochester Benbrook Arrow Electronics .. (604)421-2333 Arrow/SchweberElectronics ... (716)427-0300 PENSTOCK .. . ........ (817)249-0442 FAI. · ........... (604)654-1050 Future Electronics ............ (716)387-9550 Carollton Future Electronics ...... (604)294-1166 FAI .............. . (716)387-9600 Arrow/Schweber Electronics ... (214)380-6464 Hamilton/Hallmark .... (604)420-4101 Hamilton/Hallmark ...... (716)272-2740 Dallas MANITOBA FAI. ..... (214)231-7195 S~~~cu.se ................... (315)451-4405 Future Electronics .. .... (214)437-2437 Winnipeg FAI ........ (204)786-3075 Future Electronics ............ (315)451-2371 Hamilton/Hallmark .... (214)553-4300 Future Electronics ........ (204)944-1446 Newark......... . ......... (315)457-4873 Newark. · ...... (214)458-2528 Hamilton/Hallmark .. ...... (800)663-5500 For changes to this information contact Technical Publications at FAX (602) 244-6560 AUTHORIZED DISTRIBUTORS - continued CANADA - continued Ottawa QUEBEC Arrow Electronics ............ (613)226-6903 Montreal ONTARIO FAI ......................... (613)820-8244 Arrow Electronics ............ (514)421-7411 Kanata Future Electronics .... (613)727-1800 FAI ......................... (514)694-8157 PENSTOCK ... .. (613)592-6088 Hamilton/Hallmark... . ..... (613)228-1700 Future Electronics ........•..• (514)694-7710 London Toronto Hamiijon/Hallmark ........... (514)335-1000 Newark .... . .... (519)685-4280 Arrow Electronics .. (905)670-7769 Mt. Royal Mississauga FAI ......................... (905)612-9888 Newark ..................... (514)738-4488 PENSTOCK ... . . ..... (905)403-0724 Future Electronics .. (905)612-9200 Quebec City Newark ....... . (905)670-2888 Arrow Electronics ............ (418)687-4231 Hamilton/Hallmark ... . ... (905)564-6060 Newark .. . . . . . . . . . . . . . . . . . .. (905)670-2888 FAI ......................... (418)682-5775 Future Electronics ............ (418)877-6666 INTERNATIONAL DISTRIBUTORS ARGENTINA GERMANY - continued PHILIPPINES Electrocomponentes . . . . . . (5-41) 375-3366 Newark .................... (49)2154-70011 Alexan Commercial ......... (63) 2241-9493 Elko ................... (5-41) 372-1101 Sasco Semiconductor ......... (49) 89-46110 POLAND AUSTRALIA Spoerle Electronic .......... (49) 6103-304-0 EBV Elektronik ............. (48) 713422944 Avnet VSI Electronics (Aust.) .. . (61)29878-1299 GREECE Macro Group ................ (48) 22 224337 Veltek Australia Pty Ltd .... (61)39574-9300 EBV Elektronik ............... (30) 13414300 SEI/Elbatex ................ (48) 22 6254877 AUSTRIA HONG KONG Spoerle Electronic ........... (48) 22 6060447 EBV Elektronik .............. (43) 1 8941774 Avnet WKK Components Ltd. . . . .. (852)2 357-8888 PORTUGAL SEI/Elbatex GmbH ............ (43) 1 866420 Nanshing Clr. & Chern. Co. Ltd (852)2333-5121 Amitron Arrow ............... (35) 114714806 Spoerle Electronic ........... (43) 1 31872700 HUNGARY ROMANIA BELGIUM Macro Group ................. (36) 12030277 Macro Group ................. (401) 6343129 EBV Elektronik .. (32) 2 716 0010 SEI/Elbatex .................. (36) 11409194 RUSSIA SEI/Belgium . . . . . . . . . . . . . . .. (32) 24600560 Spoerle Electronic ............. (36) 11294202 EBV Elektronik ............. (7) 095 9763510 Spoerle Electronic. . . . . . . . . .. (32) 27254660 INDIA Macro Group - Moscow ..... (7) 095 30600266 BRAZIL Max India Ltd .............. (91) 80 558-7758 Macro Group-51. Petersburg ..... (7) 81 25311476 Future ...................... (019) 235-1511 INDONESIA SCOTLAND Intertek ..................... (011) 268-2922 P.T. Ometraco ............. (62) 21619-6166 EBV Elektronik ............ (44) 141 4202070 Karimex .................... (011) 524-2366 IRELAND Future .................... (44) 141 9413999 Masktrade .................. (011) 221-9411 Arrow Electronics ........... (353) 14595540 SINGAPORE Panamericana ............... (011) 223-0222 EBV Elektronik ............. (353) 14564034 Future Electronics ............. (65)479-1300 Siletek..... . ............ (011) 534-4401 Future Electronics ............. (353) 6541330 Strong Pte. Ltd ............... (65) 276-3996 Tec . . . . . . . . . . . . . . . . . . . . . .. (001) 5505-2046 Macro Group ............... (353) 16766904 Uraco Technologies Pte Ltd..... (65) 545-7811 Teleradio ................... (001) 574-0788 ITALY SLOVAKIA BULGARIA Avnet EMG SRL .............. (39) 2 381901 Macro Group ................. (42) 89634181 Macro Group ................. (359) 2708140 EBV Elektronik SRL ........... (39) 2 660961 SEI/Elbatex ................... (42) 7722137 CHINA Future Electronics ............. (39) 2 660941 SLOVENIA Future Advanced Electronics Ltd. .. (852)2305-3633 Silverstar Ltd. SpA ........... (39) 2 6612 51 EBV Elektronik ............ (386) 611 330216 Avnet WKK Components Ltd ...... (852)2357-6888 JAPAN SEI/Elbatex ............... (386) 611957196 China EI. App. Corp. XiaMan Co .. (86)106818-9750 AMSC Co., Ltd ............. 81-422-54-6800 S.AFRICA Nanco Electronics Supply Ltd.. (852) 2 765-3025 Fuji Electronics Co., Ltd ..... 81-3-3814-1411 Avnet-ASD ................ (27) 11 4442333 ........... or (852) 2 333-5121 Marubun Corporation ....... 81-3-3639-8951 Reutech Components ....... (27) 11 3972992 Qing Cheng Enterprises Ltd ... (852) 2 493-4202 Nippon Motorola Micro Elec.. 81-3-3280-7300 SPAIN OMRON Corporation ....... 81-3-3779-9053 Amitron Arrow .............. (34) 1 304 30 40 CZECH REPUBLIC EBV Elektronik .......... (420) 2 90022101 Tokyo Electron Ltd.......... 81-3-5561-7254 EBV Elektronik ............. (34) 1 804 32 56 Spoerle Electronic ............ (420) 2 731355 KOREA SEI/Selco S.A............... (34) 1 6371011 SEI/Elbatex ... " (420) 2 4763707 Jung Kwang Sa . . . .. (82)2278-5333 SWEDEN Macro Group.. . .... (420) 2 3412182 Lite-On Korea Ltd ..... . ... " (82)2858-3853 Arrow-Th:s .................. (46) 8 362970 Nasca Co. Ltd .. .... (82)23772-6800 Avnet EMG AB ............. (46) 8 6291400 DENMARK Arrow Exatec ..... (45) 44 927000 LATVIA EBV Elektronik .............. (46) 405 92100 AlS Avnet EMG . . . . .... (45) 44 880800 Avnet Baltronic Ltd. .. ... (371) 8821118 SWITZERLAND EBV Elektronik- Soeborg ...... (45) 39690511 Macro Group .... .. .......... (371) 7313195 EBV Elektronik .............. (41) 1 7456161 EBV Elektronik - Aabyhoej ..... (45) 86250660 LITHUANIA SEI/ElbatexAG ............. (41)564375111 Macro Group ....... (370) 7764937 Spoerle Electronic ............ (41) 1 8746262 ESTONIA Arrow Field Eesti . · ... (372) 6503288 MEXICO TAIWAN Avnet Baltronic .. ' · ... (372) 6397000 Avnet. . . ........ (3) 632-0182 Avnet-Mercuries Co., Ltd ... (886)2516-7303 Dicopel ...... . .. (5) 705-7422 Solomon Technology Corp. .. (886)2788--8989 FINLAND Arrow Field OY .... (358)97775 71 Future .............. (3) 122-0043 Strong Electronics Co. Ltd ... (886)2917-9917 Avnet EMG OY . . .... (358)9613181 SemiconductoresProlesionales ...... (5) 658-6011 THAILAND EBV Elektronik · .. (358)98557730 Steren ........................ (5) 325-0925 Shapiphat Ltd. .............. (66) 2221-1)432 NETHERLANDS ......................... or (66) 2221-5384 FRANCE Arrow Electronique (33) 1 49 78 49 78 HOLLAND TURKEY Avnet EMG . . . . . . . . . . . . . .. (33) 1 49 65 25 00 EBV Elektronik ............. (31) 3465 83010 EBV Elektronik ............ (90) 216 4631352 EBV Elektronik ............. (33) 1 40963000 SEI/Benelux B.V. .. ..... (31) 7657 22500 UNITED KINGDOM Spoerle Electronics - Nieuwegen ... (31) 3060 91234 Arrow Electronics (UK) Ltd.. (44) 1 234270027 Future Electronics.... (33) 169821111 Spoerle Eleclronics- Veldhoven ... (31) 4025 45430 Avnet EMG . . . . . . . .. .. . ... (44) 1 462488500 Newark. . . . . .. (33) 1 30954060 SEI/Scaib . . (33) 1 69 19 89 00 NEW ZEALAND EBV Elektronik ........... (44) 1 628783688 Avnet VSI (NZ) Ltd (64)9636-7801 Farnell ................... (44) 1 132790101 GERMANY Avnet EMG. . .. (49) 894511001 NORWAY Future Electronics Ltd. . . . .. (44) 1 753763000 EBV Elektronik GmbH.. . .. (49) 89 99114-0 Arrow Tahonic AlS . (47)22378440 Macro Group .............. (44) 1 628 60600 Future Electronics GmbH .... (49) 89-957 270 AlS Avnet EMG ... . (47)66773600 Newark . .. .. .. .. . .. . . . ... (44) 1 420 543333 SEI/Jermyn GmbH...... (49) 6431-5080 EBV Elektronik .... . . (47)2267 1780 For changes to this information contact Technical Publications at FAX (602) 244-6560 MOTOROLA WORLDWIDE SALES OFFICES UNITED STATES TEXAS KOREA ALABAMA Austin .. . · ...... (512)502-2100 Pusan .. . . ....... 82(51)4635-035 Huntsville .. . . ... (205)464-6800 Houston .. (713)251-0006 Seoul. . .. 82(2)554-5118 ALASKA ... . . .... ' (800)635-8291 Plano .... . ...... (972)516-5100 MALAYSIA ARIZONA VIRGINIA Penang .. ...... 60(4)228-2514 Phoenix ........ . .. (602)302-8056 Richmond .. .. (804)285-2100 MEXICO CALIFORNIA WASHINGTON Chihuahua ... . ....... 52(14)39-3120 Calabasas .. . · (818)878-6800 Bellevue .. ... .. (206)454-4160 Mexico City .. ....... 52(5)282-0230 Irvine ........ . .. (714)753-7360 Seattle (toll free) .. (206)622-9960 Guadalajara .... · ..... 52(36)78-0750 Los Angeles .. (818)878-6800 WISCONSIN Zapopan Jalisco . ....... 52(36)78-0750 San Diego .. . · (619)541-2163 Milwaukee/Brookfield ...... (414)792-0122 Marketing ... · ..... 52(36)21-2023 Sunnyvale .... . (408)749-{J510 Field Applications Engineering Available Customer Service · .... 52(36)669-9160 COLORADO Through All Sales Offices NETHERLANDS Denver ........... . · (303)337-3434 CANADA Best. (31)499361211 CONNECTICUT PHILIPPINES Wallingford ..... .. (203)949-4100 BRITISH COLUMBIA Manila. (63)2822-{J625 FLORIDA Vancouver. · ...... (604)606-8502 POLAND Clearwater . (813)524-4177 ONTARIO .... (48) 34 27 55 75 Maitland .... .. (407)628-2636 Ottawa ............. (613)226-3491 PUERTO RICO Pompano Beach/Ft. Lauderdale .... (954)351-6040 Toronto ... (416)497-8181 Rio Piedras ..... . ....... (787)282-2300 GEORGIA QUEBEC RUSSIA Atlanta ... .. .......... (770)729-7100 Montreal. . ..... (514)333-3300 .............. (7)0959299025 IDAHO INTERNATIONAL SCOTLAND Boise ... .. ........... (208)323-9413 East Kilbride. (44)1355565447 AUSTRALIA ILLINOIS Melbourne ................. (61-3)98870711 SINGAPORE ..... (65)4818188 Chicago/Schaumburg ......... (847)413-2500 Sydney...... .. (61-2)99661071 SPAIN INDIANA Madrid .. . · . . . .. 34( 1)457-8204 BRAZIL or ..... . ............. 34(1 )457-8254 Indianapolis .... . .. (317)571-{J400 Sao Paulo ............... 55(011 )3033-5244 Kokomo ... . . . . .. (765)455-51 00 SWEDEN CHINA 801na. · ..... 46(8)734-8800 IOWA Beijing . .. 86-10-68437222 Cedar Rapids. · (319)378-{J383 Guangzhou . .. 86-20--67537888 SWITZERLAND KANSAS Geneva .. 41(22)7991111 Shanghai ..... 86-21--63747668 Kansas City/Mission .. . .. (913)451-8555 Zurich. ...... 41(1)733-4074 Tianjin . . · . . .. 86-22-25325072 MARYLAND TAIWAN CZECH REPUBLIC Taipei ..... 886(2)717-7089 Columbia ... . ..... (410)381-1570 .......................... (420) 2 21852222 MASSACHUSETTS THAILAND FINLAND Bangkok ... . ........ 66(2)254-4910 Marlborough. (508)357--6207 Helsinki ..... 358 9 6824 400 Woburn . · (781 )932-9700 TURKEY Direct Sales Lines 3589 6824 4044 MICHIGAN ... (90)2122746648 ... 358 9 6824 4045 Detroit ...................... (248)347--6800 UNITED KINGDOM FRANCE Aylesbury · ... 44 1 (296)395252 MiNNESOTA Paris. . 33134 635900 Minnetonka .. (612)932-1500 NORTH AMERICA GERMANY MISSOURI Langenhagen/Hanover 49(511)786880 FULL LINE REPRESENTATIVES St.Louis ....... · (314)275-7380 AR;ZONA, Tempe Munich ....... 498992103-0 NEW JERSEY Nuremberg. 49 911 96-3190 S&S Technologies, Inc. .. (602)414-1100 Fairfield ........ . . .... (973)808-2400 CALIFORNIA, Loomis Sindelfingen ...... 497031 79710 NEW YORK Wiesbaden. 49 611 973050 Galena Technology Group ..... (916)652-{J268 Fairport .. (716)425-4000 INDIANA, Indianapolis Fishkill... .. (914)896-0511 HONG KONG Kwai Fong · .... 852-2-613-6888 Bailey's Electronics ...... (317)848-9958 Hauppauge ................. (516)361-7000 NEVADA, Clark County Tai Po . · . . .. 852-2-666-8333 NORTH CAROLINA S&S Technologies, Inc ........ (602)414-1100 Raleigh ..... .. (919)870-4355 HUNGARY ...... (36) 1 250 83 29 NEVADA, Reno OHIO Galena Tech. Group .......... (702)746-0642 Cleveland ................... (440)349-3100 INDIA Bangalore. . .. 91-80-5598615 NEW MEXICO, Albuquerque Columbus/Worthington... (614)431-8492 S&S Technologies, Inc........ (505)414-1100 Dayton (937)438-6800 ISRAEL Herzlia 972-9-9522333 TEXAS, EI Paso OKLAHOMA S&S Technologies, Inc. . ..... (915)833-5461 Tulsa ...... . ITALY · (918)251-3414 Milan .. 39(2)82201 UTAH, Salt Lake City or ...... . · (918)258-0933 Utah Compo Sales, Inc. . .. (801)572-4010 JAPAN OREGON Kyusyu ..... 81-92-725-7583 WASHINGTON, Spokane Portland .. (503)641-3681 Doug Kenley ......... (509)924-2322 Gotanda ...... 81-3-5487-8311 PENNSYLVANIA Nagoya .... 81-52-232-3500 NORTH AMERICA Colmar ...... (215)997-1020 Osaka .......... 81-6-305-1801 HYBRID/MCM COMPONENT SUPPLIERS Philadelphia/Horsham ... (215)957-4100 Sendai ...... . ........... 81-22-268-4333 Chip Supply ...... (407)298-7100 TENNESSEE ..... 81-878-37-9972 Elmo Semiconductor ...... (818)768-7400 Takamatsu Knoxville ............ . .. (423)584-4841 Tokyo 81-3-3440-3311 Minco Technology Labs Inc.... (512)834-2022 Semi Dice Inc. (310)594-4631 For changes to this information contact Technical Publications at FAX (602) 244-6560 Overview Programming Model Instruction and Data Cache Operation Exceptions Memory Management Instruction Timing Signal Descriptions System Interface Operation Power Management PowerPC Instruction Set Listings _ Instructions Not Implemented ..:sJ PowerPC 603 Processor System Design _ and Programming Considerations Glossary fill.] Index 'I~I.J Overview Programming Model Instruction and Data Cache Operation Exceptions Memory Management Instruction Timing Signal Descriptions System Interface Operation Power Management PowerPC Instruction Set Listings Instructions Not Implemented PowerPC 603 Processor System· Design and Programming Considerations i'Im Glossary DmI Index Attention! This book is a companion to the PowerPC Microprocessor Family: The Programming Environments, referred to as The Programming Environments Manual. Note that the companion Programming Environments Manual exists in two versions. See the Preface for a description of the following two versions: • PowerPC Microprocessor Family: The Programming Environments, Rev 1 Order #: MPCFPEIAD • PowerPC Microprocessor Family: The Programming Environments for 32-Bit Microprocessors, Rev 1 Order #: MPCFPE32B/AD Call the Motorola LDC at 1-800-441-2447 (website: http://1dc.nmd.com) or contact your local sales office to obtain copies. 1ATX35069-1 Printed in USA 11/97 BANTA CO. MOTa #130 5,000 LlTRISC @ MOTOROI.A • •, . ...... : I -. • .. .- Industrial F?ark, 51 INTERNET: S~S a. Mfax IS a trademark of Motorola, ••