68030 Users Manual 3ed 1990

68030_Users_Manual_3ed_1990 68030_Users_Manual_3ed_1990

User Manual: manual pdf -FilePursuit

Open the PDF directly: View PDF PDF.
Page Count: 608

Download68030 Users Manual 3ed 1990
Open PDF In BrowserView PDF
ENHANCED 32-BIT
MICROPROCESSOR
USER'S MANUAL
THIRD EDITIO

®

MOTOROLA

Introduction
Data Organization and Addressing Capabilities
Instruction Set Summary
Processing States
Signal Description
On-Chip Cache Memories
Bus Operation
Exception Processing
Memory Management Unit
Coprocessor Interface Description
Instruction Execution Timing
Applications Information
Electrical Characteristics
Ordering Information and Mechani~al Data
M68000 Family Summary'
Index

®

MOTOROLA

MC68030
ENHANCED 32-811
MICROPROCESSOR USER'S MANUAL
Third Edition

Motorola reserves the right to make changes without further notice to any products herein
to improve reliability, function or design. Motorola does not assume any liability arising out
of the application or use of any product or circuit described herein; neither does it convey
any license under its patent rights nor the rights of others. Motorola products are not authorized for use as components in life support devices or systems intended for surgical implant
into the body or intended to support or sustain life. Buyer agrees to notify Motorola of any
such intended end use whereupon Motorola shall determine availability and suitabtlity of its
product or products for the use intended. Motorola and ® are registered trademarks of
Motorola, Inc. Motorola, Inc. is an Equal Employment Opportunity/Affirmative Action
Employer.

PRENTICE HALL, Englewood Cliffs, N.J. 07632

© 1990 MOlOROLA, INC.

Published by Prentice-Hall, Inc.
A Division of Simon & Schuster
El')glewood Cliffs, New Jersey 07632

The publisher offers discounts on this book when ordered
in bulk quantities. For more information, write:
Special SaleS/College Marketing
Prentice-Hall, Inc.
College Technical and Reference Division
Englewood Cliffs, New Jersey 07632

All rights reserved. No part of this book may be
reproduced, in any form or by any means,
without permission in writing from the publisher.

Printed in the United States of America
10 9 8 7 6 5 4 3 2

ISBN

0-13-566423-3

Prentice-Hall International (UK) limited, London
Prentice-Hall of Australia Pty. limited, Sydney
Prentice-Hall Canada Inc., Toronto
Prentice-Hall Hispanoamericana, S.A., Mexico
Prentice-Hall of India Private Limited, New Delhi
Prentice-Hall of Japan, Inc., Tokyo
Simon & Schuster Asia Pte. Ltd., Singapore
Editora Prentice-Hall do Brasil, Ltda., Rio de Janeiro

TABLE OF CONTENTS
Paragraph
Number

1.1
1.2
1.3
1.4
1.5
1.6
1.6.1
1.6.2
1.7
1.8
1.9

2.1
2.2
2.2.1
2.2.2
2.2.3
2.3
2.4
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.4.7
2.4.8
2.4.9

Title

Page
Number

Section 1
Introduction
Features .................................................................................
MC68030 Extensions to the M68000 Family...............................
Programming Model ...............................................................
Data Types and Addressing Modes...........................................
Instruction Set Overview.........................................................
Virtual Memory and Virtual Machine Concepts..........................
Virtual Memory·................................................................
Virtual Machine ................................................................
The Memory Management Unit ................................................
Pipelined Architecture .....................................................,........
The Cache Memories..............................................................
Section 2
Data Organization and Addressing Capabilities
Instruction Operands. ...... ........ ......... ......... ...... ............. ...... .....
Organization of Data in Registers.............................................
Data Registers ........................ ~.........................................
Address Registers.............................................................
Control Registers..............................................................
Organization of Data in Memory...............................................
Addressing Modes ........................ :.........................................
Data Register Direct Mode.................................................
Address Register Direct Mode.................................. ..........
Address Register Indirect Mode..........................................
Address Register Indirect with Postincrement Mode.............
Address Register Indirect with Predecrement Mode..............
Address Register Indirect with Displacement Mode..............
Address Register Indirect with Index (8-Bit Displacement)
Mode ............................................................................
Address Register Indirect with Index (Base Displacement)
Mode ............................................................................
Memory Indirect Postindexed Mode...................................

MOTOROLA

MC68030 USER'S MANUAL

1-3
1-4
1-4
1-10
1-10
1-12
1-12
1-14
1-15
1-16
1-16

2-1
2-2
2-2
2-4
2-4
2-5
2-8
2-9
2-10
2-10
2-10
2-11
2-12
2-12
2-13
2-14

iii

TABLE OF CONTENTS (Continued)
Paragraph
Number

Title

Page
Number

2.4.14
2.4.15
2.4.16
2.4.17
2.4.18
2.5
2.6
2.6.1
2.6.2
2.7
2.8
2.8.1
2.8.2
2.8.3

Memory Indirect Preindexed Mode.. .................. ........ .........
Program Counter Indirect with Displacement Mode ..............
Program Counter Indirect with Index (8-Bit Displacement)
Mode ............................................................................
Program Counter Indirect with Index (Base Displacement)
Mode ............................................................................
Program Counter Memory Indirect Postindexed Mode ..........
Program Counter Memory Indirect Preindexed Mode ...........
Absolute Short Addressing Mode.......................................
Absolute Long Addressing Mode........ ............ .............. ......
Immediate Data................................................................
Effective Address Encoding Summary.. .............. ............ ...... .....
Programmer's View of Addressing Modes...................... ...... .....
Addressing Capabilities.....................................................
General Addressing Mode Summary........ ...... ....................
M68000 Family Addressing Compatibility........ ...... ....................
Other Data Structures ........................................................ ; .....
System Stack...................................................................
User Program Stacks.........................................................
Queues............................................................................

3.1
3.2
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.2.6
3.2.7
3.2.8
3.2.9
3.2.10
3.2.11
3.3
3.3.1

Section 3
Instruction Set Summary
Instruction Format ...................................................................
Instruction Summary. .......... ..... ......... .... ........... ..... ........ ...... ....
Data Movement Instructions..............................................
Integer Arithmetic Instructions...........................................
Logical Instructions...........................................................
Shift and Rotate Instructions ..............................................
Bit Manipulation Instructions .... .................. ...... ........ .........
Bit Field Instructions.........................................................
Binary-Coded Decimal Instructions .....................................
Program Control Instructions .............................................
System Control Instructions ...............................................
Memory Management Unit Instructions..............................
Multiprocessor Instructions ................................................
Integer Condition Codes ..........................................................
Condition Code Computation.............................................

2.4.10
2.4.11
2.4.12
2.4.13

iv

MC68030 USER'S MANUAL

2-15
2-16
2-16
2-17
2-18
2-19
2-20
2-20
2-21
2-22
2-24
2-25
2-31
2-36
2-36
2-36
2-38
2-39

3-1
3-2
3-4
3-5
3-6
3-7
3-8
3-9
3-10
3-11
3-12
3-13
3-13
3-14
3-15

MOTOROLA

TABLE OF CONTENTS (Continued)
Paragraph
Number

Title

Page
Number

3.3.2
3.4
3.5
3.5.1
3.5.2
3.5.3
3.5.4

Conditional Tests..............................................................
Instruction Set Summary .........................................................
Instruction Examples.. .......... ...... ...... .................... ............ .......
Using the CAS and CAS2 Instructions .......... ................ ........ .....
Nested Subroutine Calls..........................................................
Bit Field Operations................................................................
Pipeline Synchronization with the NOP Instruction.....................

3-17
3-18
3-25
3-25
3-30
3-31
3-32

4.1
4.1.1
4.1.2
4.1.3
4.2
4.3
4.3.1
4.3.2

Section 4
Processing States
Privilege Levels......................................................................
Supervisor Privilege Level.................................................
User Privilege Level..........................................................
Changing Privilege Level...................................................
Address Space Types..............................................................
Exception Processing..............................................................
Exception Vectors.............................................................
Exception Stack Frame.... .......................... ............ ............

4-2
4-2
4-3
4-4
4-5
4-6
4-6
4-7

5.1
5.2
5.3
5.4
5.5
5.6
5.6.1
5.6.2
5.6.3
5.6.4
5.6.5
5.6.6
5.6.7
5.6.8
5.6.9
5.7
5.7.1

Section 5
Signal Description
Signal Index .......................................................................... .
Function Code Signals (FCO-FC2) ........................................... ..
Address Bus (AO-A31) ............................................................ .
Oata Bus (00-031 ) .................................................................. .
Transfer Size Signals (SIZO, SIZ1) ............................................ .
Bus Control Signals ............................................................... .
Operand Cycle Start (OCS) ................................................ .
External Cycle Start (ECS). ............................................... ..
Read/Write (R/W) ............................................................. .
Read-Modify-Write Cycle (RMC) ................ ; ...................... ..
Address Strobe (AS) ........................................................ .
Data Strobe (OS) .............................................................. .
Oata Buffer Enable (OBEN) ................................................ .
Oata Transfer and Size Acknowledge (OSACKO, OSACK1) .... .
Synchronous Termination (STERM) .................................. ..
Cache Control Signals ............................................................ .
Cache Inhibit Input (CIIN) .................................................. .

5-2
5-4
5-4
5-4
5-4
5-5
5-5
5-5
5-5
5-5
5-5
5-6
5-6
5-6
5-6
5-7
5-7

MOTOROLA

MC68030 USER'S MANUAL

v

TABLE OF CONTENTS (Continued)
Paragraph
Number

Title

Page
Number

5.7.2
5.7.3
5.7.4
5.8
5.8.1
5.8.2
5.8.3
5.9
5.9.1
5.9.2
5.9.3
5.10
5.10.1
5.10.2
5.10.3
5.11
5.11.1
5.11.2
5.11.3
5.11.4
5.12
5.13
5.14

Cache Inhibit Output (ClODf).... .............. ...... .....................
Cache Burst Request (CBREQ) ............ .......... .......... ............
Cache Burst Acknowledge (CBACK) ....................................
Interrupt Control Signals.. ............................ ...... .....................
Interrupt Priority level Signals...........................................
Interrupt Pending (lPEND) ..................................................
Autovector (AVEC) ............................................................
Bus Arbitration Control Signals................................................
Bus Request (BR)..............................................................
Bus Grant (BG) ...... ... ........ ....... ...... ..... ... ... .... ........ ...... ......
Bus Grant Acknowledge (BGACK) .......................................
Bus Exception Control Signals .... .............. ............ ........ ...........
Reset (RESET) ..................................................................
Halt (HALT) ......................................................................
Bus Error (BERR) ..............................................................
Emulator Support Signals ........................................................
Cache Disable (CiSlS).......... ...................... ...... ........ ...........
MMU Disable (MMUDIS) ...................................................
Pipeline Refill (REFill) .......................................................
Internal Microsequencer Status (STATUS) ...........................
Clock (ClK) ................................ ~...........................................
Power Supply Connections .................. ............ .......... ..............
Signal Summary .....................................................................

5-7
5-7
5-7
5-8
5-8
5-8
5-8
5-8
5-8
5-9
5-9
5-9
5-9
5-9
5-9
5-10
5-10
5-10
5-10
5-10
5-11
5-11
5-11

6.1
6.1.1
6.1.2
6.1.2.1
6.1.2.2
6.1.3
6.1.3.1
6.1.3.2
6.2
6.3
6.3.1
6.3.1.1

Section 6
On-Chip Cache Memories
On-Chip Cache Organization and Operation ...............................
Instruction Cache..............................................................
Data Cache ....................................... ;...............................
Write Allocation..........................................................
Read-Modify-Write Accesses........................................
Cache Filling....................................................................
Single Entry Mode......................................................
Burst Mode Filling ......................................................
Cache Reset .. : ..•.....................................................................
Cache ControL........................................................................
Cache Control Register...................................... ................
Write Allocate.............................................................

6-3
6-4
6-6
6-8
6-10
6-10
6-10
6-15
6-20
6-20
6-20
6-21

vi

MC68030 USER'S MANUAL

MOTOROLA

TABLE Of CONTENTS (Continued)
Paragraph
Number

6.3.1.2
6.3.1.3
6.3.1.4
6.3.1.5
6.3.1.6
6.3.1.7
6.3.1.8
6.3.1.9
6.3.1.10
6.3.1.11
6.3.2

7.1
7.1.1
7.1.2
7.1.3
7.1.4
7.1.5
7.1.6
7.1.7
7.2
7.2.1
7.2.2
7.2.3
7.2.4
7.2.5
7.2.6
7.2.7
7.2.8
7.2.9
7.2.10
7.3
7.3.1
7.3.2
7.3.3

7.3.4

MOTOROLA

Title

Page
Number

Data Burst Enable ............. ....... ............ ...... ............ .....
Clear Data Cache... ................ .............. ...... ........... ......
Clear Entry in Data Cache................................. ...........
Freeze Data Cache ...................................... ; ...............
Enable Data Cache......................................................
Instruction Burst Enable..............................................
Clear Instruction Cache................................................
Clear Entry in Instruction Cache...................................
Freeze Instruction Cache...... ........ ................... ........ .....
Enable Instruction Cache ... .................. ........... .............
Cache Address Register .....................................................
Section 7
Bus Operation
Bus Transfer Signals ............................. ~ ................................ .
Bus Control Signals ......................................................... .
Address Bus .................................................................... .
Address Strobe ................................................................ .
Data Bus ......................................................................... .
Data Strobe ..................................................................... .
Data Buffer Enable ........................................................... .
Bus Cycle.Termination Signals .......................................... .
Data Transfer Mechanism ....................................................... .
Dynamic Bus Sizing ......................................................... .
Misaligned Operands ....................................................... .
Effects of Dynamic Bus Sizing and Operand Misalignment .. ..
Address, Size, and Data Bus Relationships ........................ ..
MC68030 versus MC68020 Dynamic Bus Sizing .................. ..
Cache Filling ................................................................... .
Cache Interactions ........................................................... .
Asynchronous Operation .................................................. .
Synchronous Operation with DSACKx ................................ .
Synchronous Operation with STERM ................................ ..
Data Transfer Cycles .............................................................. .
Asynchronous Read Cycle ............................................... ..
Asynchronous Write Cycle ............................................... ..
Asynchronous Read-Modify-Write Cycle ............................ ..
Synchronous Read Cycle .................................................. .

MC68030 USER'S MANUAL

6-21
6-21
6-21
6-22
6-22
6-22
6-22
6-22
6-23
6-23
6-23

7-1
7-3

7-4
7-4
7-5
7-5
7-5
7-5
7-6
7-6
7-13
7-19
7-22

7-24
7-24
7-26
7-27
7-28
7-29
7-30
7-31
7-37

7-43
7-48

vii

TABLE OF CONTENTS (Continued)
Paragraph
Number
7.3.5
7.3.6
7.3.7
7.4
7.4.1
7.4.1.1
7.4.1.2
7.4.1.3
7.4.2
7.4.3
7.5
7.5.1
7.5.2
7.5.3
7.5.4
7.6
7.7
7.7.1
7.7.2
7.7.3
7.7.4
7.8

8.1
8.1.1
8.1.2
8.1.3
8.1.4
8.1.5
8.1.6
8.1.7
8.1.8
8.1.9
8.1.10
8.1.11

viii

Title

Page
Number

Synchronous Write Cycle...................................................
Synchronous Read-Modify-Write Cycle...............................
Burst Operation Cycles......................................................
CPU Space Cycles...................................................................
Interrupt Acknowledge Bus Cycles ......................................
Interrupt Acknowledge Cycle - Terminated Normally....
Autovector Interrupt Acknowledge Cycle .......................
Spurious Interrupt Cycle ..............................................
Breakpoint Acknowledge Cycle ................................ ; ..........
Coprocessor Communication Cycles.. .......... .......... ........ .....
Bus Exception Control Cycles ...................................................
Bus Errors........................................................................
Retry Operation .................. ;; ............................................
Halt Operation..................................................................
Double Bus Fault ..............................................................
Bus Synchronization........................ ................. ............ ..........
Bus Arbitration.......................................................................
Bus Request.....................................................................
Bus Grant .... ...... ..... ....... ....... ..... .... ....... ... ..... ...... .... ....... ...
Bus Grant Acknowledge ....................................................
Bus Arbitration Control......................................................
Reset Operation ......................................................................
Section 8
Exception Processing
Exception Processing Sequence ....... : .......................................
Reset Exception................................................................
Bus Error Exception ............................. ; ............................
Address Error Exception....................................................
Instruction Trap Exception .................................................
Illegal Instruction and Unimplemented Instruction
Exceptions.....................................................................
Privilege Violation Exception .................................'.............
Trace Exception................................................................
Format Error Exception ........................... ;.........................
Interrupt Exceptions ..........................................................
MMU Configuration Exception ...........................................
Breakpoint Instruction Exception ..... ; ..................................

MC68030 USER'S MANUAL

7-51
7-54
7-59
7-68'
7-69
7-70
7-71
7-74
7-74
7-74
7-75
7-82
7-89
7-91
7-94
7-95
7-96
7-98
7-99
7-100
7-100
7-103

8-1
8-5
8-7
8-8
8-9
8-9
8-11
8-12
8-14
8-14
8-21
8-22

MOTOROLA

TABLE OF CONTENTS (Continued)
Paragraph
Number

8.1.12
8.1.13
8.2
8.2.1
8.2.2
8.2.3
8.3
8.4

Title

Page
Number

Multiple Exceptions...........................................................
Return from Exception ............................................ '..........
Bus Fault Recovery. ... .... ..... ....... ... ...... .... ... .... ....... ...... ..... .... ...
Special Status Word (SSW)........ ...................... ..................
Using Software To Complete the Bus Cycles.......................
Completing the Bus Cycles with RTE ..................................
Coprocessor Considerations.....................................................
Exception Stack Frame Formats...............................................

8-23
8-24
8-27
8-28
8-29
8-31
8-32
8-32

Section 9
Memory Management Unit
9.1
Translation Table Structure ..................................................... .
9.1.1
Translation Control .......................................................... .
9.1.2
Translation Table Descriptors ............................................ .
9.2
Address Translation ............................................................... .
9.2.1
General Flow for Address Translation ................................ .
9.2.2
Effect of RESET on MMU .................................................. .
9.2.3
Effect of MMUDIS on Address Translation .......................... .
9.3
Transparent Translation .......................................................... .
9.4
Address Translation Cache .................................................... ..
9.5
Translation Table Details ........................................................ .
9.5.1
Descriptor Details ............................................................ .
9.5.1.1
Descriptor Field Definitions ........................................ ..
9.5.1.2
Root Pointer Descriptor .............................................. .
9.5.1.3
Short-Format Table Descriptor .................................... .
9.5.1.4
Long-Format Table Descriptor .................................... ..
9.5.1.5
Short-Format Early Termination Page Descriptor .......... ..
9.5.1.6
Long-Format Early Termination Page Descriptor .......... ..
9.5.1.7
Short-Format Page Descriptor .................................... ..
9.5.1.8
Long-Format Page Descriptor ...................................... .
9.5.1.9
Short-Format Invalid Descriptor. .................................. .
9.5.1.10
Long-Format Invalid Descriptor .................................. ..
9.5.1.11
Short-Format Indirect Descriptor ................................ ..
9.5.1.12
Long-Format Indirect Descriptor .................................. .
9.5.2
General Table Search ....................................................... .
9.5.3
Variations in Translation Table Structure ............................ .
9.5.3.1
Early Termination and Contiguous Memory .................. .
9.5.3.2
Indirection ................................................................. .

9-6
9-8
9-10
9-13
9-13
9-15
9-15
9-16
9-17
9-20
9-20
9-20
9-23
9-24
9-24
9-25
9-25
9-26
9-26
9-26
9-27
9-27
9-28
9-28
9-33
9-33
9-34

MOTOROLA

MC68030 USER'S MANUAL

ix

TABLE OF CONTENTS (Continued)
Paragraph
Number

Title

Page
Number

9.5.3.3
Table Sharing between Tasks.......................................
9.5.3.4
Paging of Tables.........................................................
9.5.3.5
Dynamic Allocation of Tables...................... .................
9.5.4
Detail of Table Search Operations......................................
9.5.5
Protection........................................................................
9.5.5.1
Function Code Lookup.................................................
9.5.5.2
Supervisor Translation Tree .........................................
9.5.5.3
Supervisor Only..........................................................
9.5.5.4
Write Protect..............................................................
9.6
MC68030 and MC68851 MMU Differences .................................
9.7
Registers................................................................................
9.7.1
Root Pointer Registers.................. ...... ...............................
9.7.2
Translation Control Register...............................................
9.7.3
Transparent Translation Registers......................................
9.7.4
MMU Status Register .............. .......... ...... ...........................
9.7.5
Register Programming Considerations................................
9.7.5.1
Register Side Effects...................................................
9.7.5.2
MMU Status Register Decoding.... ...... .................... ......
9.7.5.3
MMU Configuration Exception ...... ...............................
9.8
MMU Instructions ..................................... '" .................. -.. .......
9.9
Defining and Using Page Tables in an Operating System ............
9.9.1
Root Pointer Registers.......................................................
9.9.2
Task Memory Map Definition.............................................
9.9.3
Impact of MMU Features on Table Definition .......................
9.9.3.1 .
Number of Table Levels .... ...... ...... ............ .......... ........
9.9.3.2
Initial Shift Count ............................... ; ........................
9.9.3.3
Limit Fields ..... .... .... ...... ..... ..... ... ...... ..... .....................
9.9.3.4
Early Termination Page Descriptors ............ .......... ........
9.9.3.5
Indirect Descriptors .................. ..... ........ ........... ..... ......
9.9.3.6
Using Unused Descriptor Bits .... ................ ..................
9.10
An Example of Paging Implementation in an Operating System..
9.10.1
System Description .............. ..... ........ ........ .... ..... ... ............
9.10.2
Allocation Routines ...........................................................
9.10.3
Bus Error Handler Routine.................................................

x

MC68030 USER'S MANUAL

9-37
9-37
9-40
9-40
9-43
9-45
9-48
9-48
9-48
9-51
9-52
9-52
9-54
9-57
9-59
9-61
9-61
9-61
9-62
9-63
9-65
9-65
9-66
9-68
9-68
9-69
9-70
9-70
9-71
9-71
9-72
9-72
9-78
9-82

MOTOROLA

TABLE OF CONTENTS (Continued)
Paragraph
Number

Title

Page
Number

Section 10
Coprocessor Interface Description
10.1
Introduction ........................................................................... 10-1
Interface Features ............................................................. 10-2
10.1.1
10.1.2
Concurrent Operation Support ........................................... 10-3
10.1.3
Coprocessor Instruction Format. ......................................... 10-4
Coprocessor System Interface ............................................ 10-5
10.1.4
Coprocessor Classification ........................................... 10-5
10.1.4.1
Processor-Coprocessor Interface ................................... 10-6
10.1.4.2
Coprocessor Interface Register Selection ....................... 10-8
10.1.4.3
Coprocessor Instruction Types ................................................. 10-9
10.2
10.2.1
Coprocessor General Instructions ....................................... 10-9
10.2.1.1
Format. ...................................................................... 10-10
10.2.1.2
Protocol ..................................................................... 10-11
Coprocessor Conditional Instructions .................................. 10-12
10.2.2
Branch On Coprocessor Condition Instruction ................ 10-13
10.2.2.1
Format. ................................................................ 10-14
10.2.2.1.1
10.2.2.1.2
Protocol ............................................................... 10-15
Set On Coprocessor Condition Instruction ..................... 10-15
10.2.2.2
10.2.2.2.1
Format. ................................................................ 10-15
Protocol ............................................................... 10-16
10.2.2.2.2
10.2.2.3
Test Coprocessor Condition, Decrement and
Branch Instruction .................................................... 10-17
10.2.2.3.1
Format. ................................................................ 10-17
10.2.2.3.2
Protocol ............................................................... 10-18
10.2.2.4
Trap On Coprocessor Condition ................................... 10-18
10.2.2.4.1
Format. .............................'................................... 10-18
Protocol ............................................................... 10-19
10.2.2.4.2
Coprocessor Save and Restore Instructions ......................... 10-20
10.2.3
Coprocessor Internal State Frames ............................... 10-20
10.2.3.1
Coprocessor Format Words ......................................... 10-22
10.2.3.2
Empty/Reset Format Word ..................................... 10-22
10.2.3.2.1
10.2.3.2.2
Not I;leady Format Word ........................................ 10-23
Invalid Format Word ............................................. 10-23
10.2.3.2.3
Valid Format Word ................................................ 10-24
10.2.3.2.4
Coprocessor Context Save Instruction ........................... 10-24
10.2.3.3
10.2.3.3.1
Format. ................................................................ 10-24
Protocol ............................................................... 10-25
10.2.3.3.2

MOTOROLA

MC68030 USER'S MANUAL

xi

TABLE OF CONTENTS (Continued)
Paragraph
Number

Title

Page
Number

10.2.3.4
Coprocessor Context Restore Instruction ....................... 10-27
10.2.3.4.1
Format. ................................................................ 10-27
10.2.3.4.2
Protocol ............................................................... 10-28
10.3
Coprocessor Interface Register Set ........................................... 10-29
10.3.1
Response CIR ................................... , ............................... 10-29
10.3.2
Control CI R ...................................................................... 10-30
10.3.3
Save CI R .......................................................................... 10-30
10.3.4
Restore CIR ...................................................................... 10-31
Operation Word CIR .......................................................... 10-31
10.3.5
10.3.6
Command CIR .................................................................. 10-31
10.3.7
Condition CIR ................................................................... 10-31
10.3.8
Operand CIR ..................................................................... 10-32
10.3.9
Register Select CIR ............................................................ 10-32
10.3.10
Instruction Address CIR ..................................................... 10-33
10.3.11
Operand Address CIR ........................................................ 10-33
10.4
Coprocessor Response Primitives ............................................. 10-33
10.4.1
ScanPC ............................................................................ 10-34
10.4.2
Coprocessor Response Primitive General Format ................. 10-35
10.4.3
Busy Primitive "',' .............................................................. 10-36
10.4.4
Null Primitive ................................................................... 10-37
10.4.5
Supervisor Check Primitive ................................................ 10-40
10.4.6
Transfer Operation Word Primitive ..................................... 10-40
10.4.7
Transfer from Instruction Stream Primitive, .......................... 10-41
10.4.8
Evaluate and Transfer Effective Address Primitive ................ 10-42
10.4.9
Evaluate Effective Address and Transfer Data Primitive ........ 10-43
10.4.10
Write to Previously Evaluated Effective Address Primitive ..... 10-46
10.4.11
Take Address and Transfer Data Primitive ........................... 10-48
10.4.12
Transfer to/from Top of Stack Primitive ............................... 10-49
10.4.13
Transfer Single Main Processor Register Primitive ............... 10-50
10.4.14
Transfer Main Processor Control Register Primitive .............. 10-50
10.4.15
Transfer Multiple Main Processor Registers Primitive ........... 10-52
10.4.16
Transfer Multiple Coprocessor Registers Primitive ................ 10-52
10.4.17
Transfer Status Register and ScanPC Primitive .................... 10-55
10.4.18
Take Pre-Instruction Exception Primitive .............................. 10-56
10.4.19
Take Mid:'lnstruction Exception Primitive ............................. 10-58
10.4.20
Take Post-Instruction Exception Primitive ............................ 10-60
10.5
Exceptions ............................................................................. 10-61
10.5.1
Coprocessor-Detected Exceptions ....................................... 10-61

xii

MC68030 USER'S MANUAL

MOTOROLA

TABLE OF CONTENTS (Continued)
Paragraph
Number

10.5.1.1
10.5.1.2
10.5.1.3
10.5.1.4
10.5.1.5
10.5.2
10.5.2.1
10.5.2.2
10.5.2.3
10.5.2.4
10.5.2.5
10.5.2.6
10.5.2.7
10.5.2.8
10.5.3
10.6

Title

Page
Number

Coprocessor-Detected Protocol Violations ..................... 10-62
Coprocessor-Detected Illegal Command or Condition
Words .................................................................... 10-63
Coprocessor Data-Processing Exceptions .... ~ ................. 10-63
Coprocessor System-Related Exceptions ....................... 10-64
Format Errors ............................................................. 10-64
Main-Processor-Detected Exceptions ................................... 10-65
Protocol Violations ...................................................... 10-65
F-Line Emulator Exceptions .......................................... 10-68
Privilege Violations ..................................................... 10-69
cpTRAPcc Instruction Traps ......................................... 10-69
Trace Exceptions ........................................................ 10-70
Interrupts ................................................................... 10-71
Format Errors ............................................................. 10-71
Address and Bus Errors ............................................... 10-72
Coprocessor Reset ............................................................ 10-72
Coprocessor Summary ........................ : ................................... 10-72

Section 11
Instruction Execution Timing
11.1
Performance Tradeoffs ............................................................ 11-1
11.2
Resource Scheduling ............................................................... 11-2
11.2.1
Microsequencer ...................................................... ; ......... 11-2
11.2.2
Instruction Pipe ................................................................ 11-2
11.2.3
Instruction Cache .............................................................. 11-4
11.2.4
Data Cache ....................................................................... 11-4
11.2.5
Bus Controller Resources ................................................... 11-4
Instruction Fetch Pending Buffer ................................... 11-5
11.2.5.1
Write Pending Buffer ................................................... 11-5
11.2.5.2
11.2.5.3
Micro Bus Controller ................................................... 11-5
11.2.6
Memory Management Unit ................................................ 11-6
11.3
Instruction Execution Timing Calculations ................................. 11-6
11.3.1
Instruction-Cache Case ...................................................... 11-6
11.3.2
Overlap and Best Case ...................................................... 11-7
11.3.3
Average No-Cache Case .................................................... 11-8
11.3.4
Actual Instruction-Cache-Case Execution Time Calculations ... 11-11
11.4
Effect of Data Cache ................................................................ 11-16
11.5
Effect of Wait States ................................................................ 11-18

MOTOROLA

MC68030 USER'S MANUAL

xiii

TABLE OF CONTENTS (Continued)
Paragraph
Number

Title

.Page
Number

11.6
11.6.1
11.6.2
11.6.3
11.6.4
11.6.5
11.6.6
11.6.7
11.6.8
11.6.9
11.6.10
11.6.11
11.6.12
11.6.13
11.6.14
11.6.15
11.6.16
11.6.17
11.6.18
11.7
11.7.1
11.7.2
11.8
11.9

Instruction Timing Tables .......... : ............................................. 11-24
Fetch Effective Address (fea) ... ; .......................................... 11-26
Fetch Immediate Effective Address (fiea) ............................. 11-28
Calculate Effective Address (cea) ........................................ 11-30
Calculate Immediate Effective Address Mode (ciea). ............. 11-32
Jump Effective Address ..................................................... 11-35
MOVE Instruction .............................................................. 11-37
Special-Purpose MOVE Instruction ...................................... 11-39
Arithmetical/Logical Instructions ......................................... 11-40
Immediate Arithmetical/Logical Instructions ......................... 11-42
Binary-Coded Decimal and Extended Instructions ................. 11-43
Single Operand Instructions ............................................... 11-44
Shift/Rotate Instructions .................................................... 11-45
. Bit Manipulation Instructions ............................................. 11-46
Bit Field Manipulation Instructions .... : ................................. 11-47
Conditional Branch Instructions ........... ·............................... 11-48
Control Instructions ........................................................... 11·:-49
Exception-Related Instructions and Operations .................... 11-50
Save and Restore Operations ............................................. 11-51
Address Translation Tree Search Timing ................................... 11-51
MMU Effective Address Calculation .................................... 11-58
MMU Instruction Timing .................................................... 11-60
Interrupt Latency .................................................................... 11-61
Bus Arbitration Latency ............................................................ 11-62

12.1
12.1.1
12.1.2
12.1.3
12.2
12.3
12.4
12.4.1
12.4.2
12.5
12.5.1

Section 12
Applications Information
Adapting the MC68030 to MC68020 Designs .............................. 12-1
Signal Routing .................................................................. 12-2
Hardware Differences ........................................................ 12-3
Software Differences ......................................................... 12-4
Floating-Point Units ................................................................. 12-5
Byte Select Logic for the MC68030 ........................................... 12-9
Memory Interface ................................................................... 12-11
Access Time Calculations .................................................. 12-14
Burst Mode Cycles ............................................................ 12-17
Static RAM Memory Banks ...................................................... 12-18
A Two Clock Synchronous Memory Bank Using SRAMs ....... 12-18

xiv

MC68030 USER'S MANUAL

MOTOROLA

TABLE OF CONTENTS (Concluded)
Paragraph
Number

Title

Page
Number

12.5.2
12.5.3
12.6
12.6.1
12.6.2
12.7
12.7.1
12.7.2
12.8

A 2-1-1-1 Burst Mode Memory Bank Using SRAMs .............. 12-24
A 3-1-1-1 Burst Mode Memory Bank Using SRAMs ............... 12-27
External Caches ...................................................................... 12-30
Cache Implementation ....................................................... 12-32
Instruction-Only External Cache Implementations ................. 12-35
Debugging Aids ...................................................................... 12-35
STATUS and REFILL .......................................................... 12-36
Real-Time Instruction Trace ............................................... 12-39
Power and Ground Considerations ........................................... 12-43

13.1
13.2

Section 13
Electrical Characteristics
Maximum Ratings ................................................................... 13-1
Thermal Characteristics - PGA Package ................................... 13-1

14.1
14.2
14.3
14.4

Section 14
Ordering Information and Mechanical Data
Standard MC68030 Ordering Information .................................. 14-1
Pin Assignments - Pin Grid Array (RC Suffix) ........................... 14-2
Pin Assignments - Ceramic Surface Mount (FE Suffix) .............. 14-3
Package Dimensions ............................................................... 14-4
Appendix A
M68000 Family Summary
Index

MOTOROLA

MC68030 USER'S MANUAL

xv

LIST OF ILLUSTRATIONS
Figure
Number

Title

Page
Number

1-1
1-2
1-3
1-4

Block Diagram .....................................................................
User Programming Model ....................................................
Supervisor Programming Model Supplement .........................
Status Register....................................................................

1-2
1-6
1-7
1-8

2-1
2-2
2-3
2-4
2-5
2-6
2-7
2-8
2-9
2-10
2-11
2-12
2-13
2-14
2-15

Memory Operand Address.. ..... ...... ............. ........ ....... ...........
Memory Data Organization .. ........... ...... .... ...... ..... ......... ..... ...
Single Effective Address Instruction Operation Word...............
Effective Address Specification Formats.................................
Using SIZE in the Index Selection..........................................
Using Absolute Address with Indexes....................................
Addressing Array Items........................................................
Using Indirect Absolute Memory Addressing..........................
Accessing an Item in a Structure Using Pointer ...... ~................
Indirect Addressing, Suppressed Index Register......................
Preindexed Indirect Addressing.............................................
Postindexed Indirect Addressing ..... .......... ... ........ ......... ........
Preindexed Indirect Addressing with Outer Displacement........
Postindexed Indirect Addressing with Outer Displacement.......
M68000 Family Address Extension Words..............................

2-6
2-7
2-8
2-23
2-25
2-26
2-27
2-28
2-28
2-29
2-29
2-30
2-30
2-31
2-37

3-1
3-2
3-3
3-4
3-5

Instruction Word General Format ..........................................
Linked List Insertion.. ..... ..... .... ........... ... ..... ..................... .....
Linked List Deletion..............................................................
Doubly Linked List Insertion..................................................
Doubly Linked List Deletion..................................................

3-1
3-26
3-27
3-29
3-30

4-1

General Exception Stack Frame ............ ..... ..... .......... ... ...... ....

4-7

5-1

Functional Signal Groups .....................................................

5-1

6-1
6-2
6-3

Internal Caches and the MC68030......... ..... ..... ..... ..... ......... ....
On-Chip Instruction Cache Organization.................................
On-Chip Data Cache Organization..........................................

6-2
6-5
6-7

MOTOROLA

MC68030 USER'S MANUAL

xvii

LIST OF ILLUSTRATIONS (Continued)
Figure
Number

6-4
6-5
6-6
6-7
6-8
6-9
6-10
6-11
6-12
6-13
6-14
6-15.
7-1
7-2
7-3
7-4
7-5
7-6
7-7
7-8
7-9
7-10
7-11
7-12
7-13
7-14
7-15
7-16
7-17
7-18
7-19

xviii

Page
Number

Title

No-Write-Allocation and Write-Allocation Mode Exampl~s .......
Single Entry Mode Operation - 8-Bit Port..............................
Single Entry Mode Operation - 16-Bit Port....... .............. .......
Single Entry Mode Operation - 32-Bit Port............................
Single Entry Mode Operation - ~Misaligned Long Word and
8-Bit Port.........................................................................
Single Entry Mode Operation - Misaligned Long Word and
16-Bit Port........................................................................
Single Entry Mode Operation - Misaligned Long Word and
32-Bit DSACKx Port...........................................................
Burst Operation Cycles and Burst Mode.................................
Burst Filling Wraparound Example........................................
Deferred Burst Filling Example..............................................
Cache Control Register.........................................................
Cache Address Register.. ......... ...... ................................. ......
Relationship Between External and Internal Signals................
Asynchronous Input Sample Window....................................
Internal Operand Representation.......... ........................ .........
MC68030 Interface to Various Port Sizes................................
Example of Long-Word Transfer to Word Port ........................
Long-Word Operand Write Timing (16-Bit Data Port) ...............
Example of Word Transfer to Byte Port..................................
Word Operand Write Timing (8-Bit Data Port) .........................
Misaligned Long-Word Transfer to Word Port Example...........
Misaligned Long-Word Transfer to Word Port................ ..........
Misaligned Cachable Long-Word Transfer from Word Port
Example .............................................'.............................
Misaligned Word Transfer to Word Port Example....................
Misaligned Word Transfer to Word Port.................................
Example of Misaligned Cachable Word Transfer from Word
Bus .................................................................................
Misaligned Long-Word Transfer to Long-Word Port........ .........
Misaligned Write Cycles to Long-Word Port............................
Misaligned Cachable Long-Word Transfer from Long-Word
Bus .................................................................................
Byte Data Select Generation for 16- and 32-Bit Ports ...... .........
Asynchronous Long-Word Read Cycle Flowchart....................

MC68030 USER'S MANUAL

6-9
6-11
6-12
6-12
6-13
6-14
6-15
6-17
6-17
6-18
6-21
6-23
7-2
7-3
7-8
7-9
7-11
7-12
7-13
7-14
7-15
7-16
7-17
7-17
7-18
7-20
7-20
7-21
7-22
7-25
7-32

MOTOROLA

LIST OF ILLUSTRATIONS (Continued)
Figure
Number
7-20
7-21
7-22
7-23
7-24
7-25
7-26
7-27
7-28
7-29
7-30
7-31
7-32
7-33
7-34
7-35
7-36
7-37
7-38
7-39
7-40
7-41
7-42
7-43
7-44
7-45
7-46
7-47
7-48
7-49
7-50
7-51

Title
Asynchronous Byte Read Cycle Flowchart..............................
Asynchronous Byte and Word Read Cycles - 32-Bit Port........
Long-Word Read - 8-Bit Port with ClOUT Asserted................
Long-Word Read - 16-Bit and 32-Bit Port..............................
Asynchronous Write Cycle Flowchart.....................................
Asynchronous Read-Write-Read Cycles - 32-Bit Port..............
Asynchronous Byte and Word Write Cycles - 32-Bit Port........
Long-Word Operand Write - 8-Bit Port.................................
Long-Word Operand Write - 16-Bit Port................................
Asynchronous Read-Modify-Write Cycle Flowchart..................
Asynchronous Byte Read-Modify-Write Cycle - 32-Bit Port
(TAS Instruction with ClOUT or CIIN Asserted).....................
Synchronous [o.ng-Word Read Cycle Flowchart - No Burst
Allowed...........................................................................
Synchronous Read with CIIN Asserted and CBACK Negated.....
Synchronous Write Cycle Flowchart.......................................
Synchronous Write Cycle with Wait States - ClOUT Asserted
Synchronous Read-Modify-Write Cycle Flowchart...................
Synchronous Read-Modify-Write Cycle Timing - CIIN
Asserted ............ ........ .... .................... .............. ................
Burst Operation Flowchart - Four Long Words Transferred.....
Long-Word Operand Request from $07 with Burst Request
and Wait Cycles............... .............. ......... ...... ..... ........... ....
Long-Word Operand Request from $07 with Burst
Request - CBACK Negated Early.......................................
Long-Word Operand Request from $OE - Burst Fill Deferred...
Long-Word Operand Request from $07 with Burst
Request - CBACK and CIIN Asserted...... ...........................
MC68030 CPU Space Address Encoding.................................
Interrupt Acknowledge Cycle Flowchart........ ..... .....................
Interrupt Acknowledge Cycle Timing.. ........ ...... ......... .............
Autovector Operation Timing ............ ......... ....................... ....
Breakpoint Operation Flow.. ....... ......... .................................
Breakpoint Acknowledge Cycle Timing.. ................ ............. ....
Breakpoint Acknowledge Cycle Timing (Exception Signaled)....
Bus Error without DSACKx ...................................................
Late Bus Error with DSACKx.... ...................................... .......
Late Bus Error with STERM - Exception Taken......................

MOTOROLA

MC68030 USER'S MANUAL

Page
Number
7-32
7-33
7-34
7-35
7-37
7-38
7-39
7-40
7-41
7-44
7-45
7-49
7-50
7-52
7-53
7-55
7-56
7-62
7-63
7-64
7-65
7-66
7-69
7-71
7-72
7-73
7-75
7-76
7-77
7-84
7-85
7-86

xix

LIST OF ILLUSTRATIONS (Continued)
Figure
Number

Title

Page
Number

7-52
7-53
7-54
7-55
7-56
7-57
7-58
7-59
7-60
7-61
7-62
7-63
7-64
7-65

Long-Word Operand Request - Late BERR on Third Access ... .
Long-Word Operand Request - BERR on Second Access ...... ..
Asynchronous Late Retry ..................................................... .
Synchronous Late Retry ...................................................... .
Late Retry Operation for a Burst .......................................... ..
Halt Operation Timing ........................................................ ..
Bus Synchronization Example .............................................. .
Bus Arbitration Flowchart for Single Request ........................ ..
Bus Arbitration Operation Timing ........................................ ..
Bus Arbitration State Diagram .............................................. .
Single-Wire Bus Arbitration Timing Diagram ........................ ..
Bus Arbitration Operation (Bus Inactive) ................................ .
Initial Reset Operation Timing .............................................. .
Processor-Generated Reset Operation ................................... .

7-87
7-88
7-90
7-91
7-92
7-93
7-96
7-98
7-99
7-101
7-103
7-104
7-105
7-106

8-1
8-2
8-3
8-4
8-5
8-6
8-7
8-8
8-9

Reset Operation Flowchart .................................................. ..
Interrupt Pending Procedure ................................................ .
Interrupt Recognition Examples ............................................ .
Assertion of IP~ND ............................................................. .
Interrupt Exception Processing Flowchart .............................. .
Examples of Interrupt Recognition and Instruction Boundaries ..
Breakpoint Instruction Flowchart .......................................... .
RTE Instruction for Throwaway Four-Word Frames ................ .
Special Status Word (SSW) .................................................. .

8-6
8-15
8-17
8-18
8-19
8-20
8-23
8-26
9-28

9-1
9-2
9-3
9-4
9-5
9-6
9-7
9-8
9-9
9-10
9-11
9-12

MMU Block Diagram ...........................................................,.
MMU Programming Model ................................................... Translation Table Tree..........................................................
Example Translation Table Tree...... .................... ..................
Example Translation Table Tree Layout in Memory.................
Derivation of Table Index Fields............................................
Example Translation Tree Using Different Format Descriptors..
Address Translation General Flowchart.. .......... ......................
Root Pointer Descriptor Format.............................................
Short-Format Table Descriptor..............................................
Long-Format Table Descriptor...............................................
Short-Format Page Descriptor and Short-Format Early
Termination Page Descriptor ....................'..........................

9-3
9-4
9-5
9-7
9-8
9-9
9-12
9-14
9-23
9-24
9-24

xx

MC68030 USER'S MANUAL

9-25

MOTOROLA

LIST OF ILLUSTRATIONS (Continued)
Figure
Number

9-13
9-14
9-15
9-16
9-17
9-18
9-19
9-20
9-21
9-22
9-23
9-24
9-25
9-26
9-27
9-28
9-29
9-30
9~31

9-32
9-33
9-34
9-35
9-36
9-37
9-38
9-39
9-40
10-1
10-2
10-3
10-4
10-5
10-6

Title

Long-Format Early Termination Page Descriptor .............. .......
Long-Format Page Descriptor................................................
Short-Format Invalid Descriptor.............................................
Long-Format Invalid Descriptor.............................................
Short-Format Indirect Descriptor...........................................
Long-Format Indirect Descriptor............................................
Simplified Table Search Flowchart.........................................
Five-Level Table Search........................................................
Example Translation Tree Using Contiguous Memory...... .... ...
Example Translation Tree Using Indirect Descriptors...............
Example Translation Tree Using Shared Tables......................
Example Translation Tree with Nonresident Tables.................
Detailed Flowchart of MMU Table Search Operation ...............
Table Search Initialization Flowchart......................................
ATC Entry Creation Flowchart ...............................................
Limit Check Procedure Flowchart..... ...... ........ ... ......... ... .........
Detailed Flowchart of Descriptor Fetch Operation....................
Logical Address Map Using Function Code Lookup ............. ~...
Example Translation Tree Using ·Function Code Lookup...........
Example Translation Tree Structure for Two Tasks..................
Example Logical Address Map with Shared Supervisor and
User Address Spaces........................................................
Example Translation Tree Using Sand WP Bits to Set
Protection........................................................................
Root Pointer Register (CRP, SRP) Format................................
Translation Control Register (TC) Format........ ........................
Transparent Translation Register (TTO and TT1) Format...........
MMU Status Register (MMUSR) Format.................................
MMU Status Interpretation - PTEST Level 0..........................
MMU Status Interpretation - PTEST Level 7..........................
F-Line Coprocessor Instruction Operation Word.............. ........
Asynchronous Non-DMA M68000 Coprocessor Interface
Signal Usage ....................................................................
MC68030 CPU Space Address Encodings ...............................
Coprocessor Address Map in MC68030 CPU Space.................
Coprocessor Interface Register Set Map.................................
Coprocessor General Instruction Format (cpGEN) ....................

MOTOROLA

MC68030 USER'S MANUAL

Page
Number

9-25
9-26
9-26
9-27
9-27
9-28
9-29
9-31
9-35
9-36
9-38
9-39
9-41
9-42
9-42
9-43
9:.44
9-45
9-46
9-47
9-49
9-50
9-54
9-54
9-57
9-59
9-62
9-63
10-4
10-6
10-7
10-8
10-9
10-10

xxi

LIST OF ILLUSTRATIONS (Continued)
Figure
Number
10~7
10-8
10-9
10-10
10-11
10-12
10-13
10-14
10-15
10-16
10-17
10-18
10-19
10-20
10-21
10-22
10-23
10-24
10-25
10-26
10-27
10-28
10-29
10-30
10-31
10-32
10-33
10-34
10-35
10-36
10-37
10-38
10-39
10-40

xxii

Title

Page
Number

Coprocessor Interface Protocol for General Category
Instructions ......................................................................
Coprocessor Interface Protocol for Conditional Category
Instructions ......................................................................
Branch on Coprocessor Condition Instruction (cpBcc.W) ..........
Branch on Coprocessor Condition Instruction (cpBcc.L) ...........
Set on Coprocessor Condition (cpScc) ...... ~ ............................
Test Coprocessor Condition, Decrement and Branch Instruction
Format (cpDBcc) ...............................................................
Trap on Coprocessor Condition (cpTRAPcc)............................
Coprocessor State Frame Format in Memory..........................
Coprocessor Context Save Instruction Format (cpSAVE) ..........
Coprocessor Context Save Instruction Protocol................ .......
Coprocesor Context Restore Instruction Format (cpRESTORE)..
Coprocessor Context Restore Instruction Protocol...................
Control CIR Format ..............................................................
Condition CIR Format ....... ;...................................................
Operand Alignment for Operand CIR Accesses................ .......
Coprocessor Response Primitive Format................................
Busy Primitive Format ..........................................................
Null Primitive Format...........................................................
Supervisor Check Primitive Format .............................. ; .........
Transfer Operation Word Primitive Format .............................
Transfer from Instruction Stream Primitive Format..................
Evaluate and Transfer Effective Address Primitive Format........
Evaluate Effective Address and Transfer Data Primitive Format
Write to Previously Evaluated Effective Address Primitive
Format..............................................................................
Take Address and Transfer Data Primitive Format...................
Transfer To/From Top of Stack Primitive Format ............... ~.....
Transfer Single Main Processor Register Primitive Format.......
Transfer Main Processor Control Register Primitive Format......
Transfer Multiple Main Processor Registers Primi~ive Format...
Register Select Mask Format.................................................
Transfer Multiple Coprocessor Registers Primitive Format.......
Operand Format in Memory for Transfer to- (An)..................
Transfer Status Register and ScanPC Primitive Format............
Take Pre-Instruction Exception Primitive Format.....................

MC68030 USER'S MANUAL

10-11
10-13
10-14
10-14
10-15
10-17
10-18
10-21
10-25
10-26
10~27
10-28
10-30
10-31
10-32
10-35
10-36
10-37
10-40
10-41
10-41
10-42
10-43
10-46
10-48
10-49
10-50
10-51
10-52
10-52
10-53
10-54
10-55
10-56

MOTOROLA

LIST OF ILLUSTRATIONS (Continued)
Figure
Number

Title

Page
Number

10-41
10-42
10-43
10-44
10-45

MC68030 Pre-Instruction Stack Frame .................................. ..
Take Mid-Instruction Exception Primitive Format.. .................. .
MC68030 Mid-Instruction Stack Frame .................................. .
Take Post-Instruction Exception Primitive Format ................... .
MC68030 Post-Instruction Stack Frame .................................. .

10-57
10-58
10-59
10-60
10-60

11-1
11-2
11-3
11-4
11-5

Block Diagram - Eight Independent Resources ..................... .
Simultaneous Instruction Execution ..................................... ..
Derivation of Instruction Overlap Time .................................. .
Processor Activity - Even Alignment ................................... .
Processor Activity - Odd Alignment .................................... .

11-3
11-7
11-8
11-9
11-10

12-1

Signal Routing for Adapting the MC68030 to MC68020
Designs .......................................................................... .
32-Bit Data Bus Coprocessor Connection ............................... .
Chip-Select Generation PAL ................................................. .
PAL Equations .................................................................... .
Bus Cycle Timing Diagram ................................................... .
Example MC68030 Byte Select PAL System Configuration ...... .
MC68030 Byte Select PAL Equations ..................................... .
Access Time Computation Diagram ...................................... .
Example Two-Clock Read, Three-Clock Write Memory Bank .... .
Example PAL Equations for Two-Clock Memory Bank ............. .
Additional Memory Enable Circuits ....................................... .
Example Two-Clock Read and Write Memory Bank ................ .
Example PAL Equation for Two-Clock Read and Write Memory
Bank ............................................................................... .
Example 2-1-1-1 Burst Mode Memory Bank at 20 MHz, 256K
Bytes .............................................................................. .
Example 3-1-1-1 Pipelined Burst Mode Memory Bank at 20 MHz,
256K Bytes ...................................................................... .
Additional Memory Enable Circuit ....................................... ..
Example MC68030 Hardware Configuration with External
Physical Cache ................................................................ .
Example Early Termination Control Circuit ............................ .
Normal Instruction Boundaries ............................................. .
Trace or Interrupt Exception ................................................. .
Other Exceptions ............................................................... ,..

12-2
12-3
12-4
12-5
12-6
12-7
12-8
12-9
12-10
12-11
12-12
12-13
12-14
12-15
12-16
12-17
12-18
12-19
12-20
12-21

MOTOROLA

MC68030 USER'S MANUAL

12-2
12-6
12-8
12-8
12-9
12-12
12-13
12-15
12-19
12-20
12-21
12-22
12-23
12-25
12-28
12-29
12-33
12-34
12-37
12-38
12-38

xxiii

LIST OF ILLUSTRATIONS (Concluded)
Figure
Number

12-22
12-23
12-24
12-25

xxiv

Title

Page
Number

Processor Halted..................................................................
Trace Interface Circuit..........................................................
PAL Pin Definitions..............................................................
Logic Equations...................................................................

12-39
12-41
12-44
12-45

MC68030 USER'S MANUAL

MOTOROLA

-LIST OF TABLES
Table
Number

Title

Page
Number

1-1
1-2

Addressing Modes .................................................................. 1-11
Instruction Set ........................................................................ 1-13

2-1
2-2

IS-IllS Memory Indirection Encodings ............................ ........... 2-22
Effective Addressing Mode Categories........................ .............. 2-24

3-1
3-2
3-3
3-4
3-5
3-6
3-7
3-8
3-9
3-10
3-11
3-12
3-13
3-14

Data Movement Operations .....................................................
Integer Arithmetic Operations..................................................
Logical Operations ....... ..... ..... ........... ....... ..... ..... ............... ......
Shift and Rotate Operations.......................................... ...........
Bit Manipulation Operations....................................................
Bit Field Operations................................................................
BCD Operations ......................................................................
Program Control Operations ....................................................
System Control Operations......................................................
MMU Instructions ...................................................................
Multiprocessor Operations (Read-Modify-Write) .........................
Condition Code Computations..................................................
Conditional Tests ....................................................................
Instruction Set Summary .........................................................

4-1

Address Space Encodings........................................................ 4-5

5-1
5-2

Signal Index.. ............ .... ................... ... ....... ..... ....................... 5-2
Signal Summary... .......... ..... ....... ... ......... ...... ..... ................ ..... 5-12

7-1
7-2
7-3
7-4
7-5

DSACK Codes and Results .................. .................... ............ .....
Size Signal Encoding.. .......... .......... .......... ........ .................. .....
Address Offset Encodings........................................................
Data Bus Requirements for Read Cycles ....................................
MC68030 Internal to External Data Bus Multiplexer - Write
Cycles.................................................................................
Memory Alignment and Port Size Influence on Write Bus Cycles ..

7-6

MOTOROLA

MC68030 USER'S MANUAL

3-5
3-6
3-7
3-8
3-9
3-9
3-10
3-11
3-12
3-13
3-13
3-15
3-17
3-20

7-7
7-9
7-9
7-10
7-11
7-19

xxv

LIST OF TABLES (Continued)
Table
Number
7-7

Title

Page
Number

7-8
7-9

Data Bus Write Enable Signals for Byte, Word, and Long-Word
Ports .................................................................................. 7-23
DSACK, BERR, and HALT Assertion Results ............................... 7-79
STERM, BERR, and HALT Assertion Results............................... 7-81

8-1
8-2
8-3
8-4
8-5
8-6

Exception Vector Assignments .................................................
Microsequencer STATUS Indications ........................................
Tracing ControL .................. ·....................................................
Interrupt Levels and Mask Values.... ............ ........................ .....
Exception Priority Groups........................................................
Exception Stack Frames...........................................................

9-1
9-2
9-3

Size Restrictions ..................................................................... 9-10
Translation Tree Selection...................................... ................. 9.;.30
MMUSR Bit Definitions.............. .............. .......... ...................... 9-60

10-1
10-2
10-3
10-4
10-5
10-6

cpTRAPcc Opmode Encodings ................................................. 10-19
Coprocessor Format Word Encodings ....................................... 10-22
Null Coprocessor Response Primitive Encodings ........................ 10-39
Valid Effective Address Codes .................................................. 10-43
Main Processor Control Register Selector Codes ........................ 10-51
Exceptions Related to Primitive Processing ................................ 10-66

12-1
12-2
12-3

Data Bus Activity for Byte, Word, and Long-Word Ports .............. 12-11
Memory Access Time Equations at 20 MHz ............................... 12-16
Calculated tAVDV Values for Operation at Frequencies
Less Than or Equal to the CPU Maximum Frequency Rating .... 12-17
Microsequencer STATUS Indications ........................................ 12-36
List of Parts ............................................................................ 12-42
AS and ECSC Indications ......................................................... 12-43
VCC and GND Pin Assignments ................................................ 12-46

12-4
12-5
12-6
12-7

xxvi

MC68030 USER'S MANUAL

R·2
8-4
8-13
8-16
8-24
8-33

MOTOROLA

PREFACE
The MC68030 User's Manual describes the capabilities, operation, and programming of the MC68030 32-bit second-generation enhanced microprocessor. The manual consists of the following sections and appendix. For detailed
information on the MC68030 instruction set refer to M68000PM/AD, M68000
Family Programmer's Reference Manual.
Section 1. Introduction
Section 2. Data Organization and Addressing Capabilities
Section 3. Instruction Set Summary
Section 4. Processing States
Section 5. Signal Description
Section 6. On-Chip Cache Memories
Section 7. Bus Operation
Section 8. Exception Processing
Section 9. Memory Management Unit
Section 10. Coprocessor Interface Description
Section 11. Instruction Execution Timing
Section 12. Applications Information
Section 13. Electrical Characteristics
Section 14. Ordering Information and Mechanical Data
Appendix A. M68000 Family Summary
Index
NOTE

In this manual, assertion and negation are used to specify forcing a
signal to a particular state. In particular, assertion and assert refer
to a signal that is active or true; negation and negate indicate a
signal that is inactive or false. These terms are used independently
of the voltage level (high or low) that they represent.
The audience of this manual includes systems designers, systems programmers, and applications programmers. Systems designers need some knowledge of all sections, with particular emphasis on Sections 1,5,6,7,13,14,
and Appendix A. Designers who implement a coprocessor for their system
also nee~ a thorough knowledge of Section 10. Systems programmers should

MOTOROLA

MC68030 USER'S MANUAL

xxvii

become familiar with Sections 1, 2, 3, 4, 6, 8, 9, 11, and Appendix A. Applications programmers can find 'most of the information they need in Sections
1, 2, 3, 4, 9, 11, 12, and Appendix A.
From a different viewpoint, the audience for this book consists of users of
other M68000 Family members and those who are not familiar with these
microprocessors. Users of the other family members can find references to
similarities to and differences from the other Motorola microprocessors
throughout the manual. However, Section 1 and Appendix A specifically
identify the MC68030 within the rest of the family and contrast its differences.

xxviii

MC68030 USER'S MANUAL

MOTOROLA

SECTION 1
INTRODUCTION
The MC68030 is a second-generation full 32-bit enhanced microprocessor
from Motorola. The MC68030 is a member of the M68000 Family of devices
that combines a central processing unit (CPU) core, a data cache, an instruction cache, an enhanced bus controller, and a memory management unit
(MMU) in a single VLSI device. The processor is designed to operate at clock
speeds beyond 20 MHz. The MC68030 is implemented with 32-bit registers
and data paths, 32-bit addresses, a rich instruction set, and versatile addressing modes.
The MC68030 is upward object code compatible with the earlier members
of the M68000 Family and has the added features of an on-chip MMU, a data
cache, and an improved bus interface. It retains the flexible coprocessor
interface pioneered in the MC68020 and provides full IEEE floating-point
support through this interface with the MC68881 or MC68882 floating-point
coprocessor. Also, the internal functional blocks of this microprocessor are
designed to operate in parallel, allowing instruction execution to be overlapped. In addition to instruction execution, the internal caches, the on-chip
MMU, and the external bus controller all operate in parallel.
The MC68030 fully supports the nonmultiplexed bus structure of the MC68020,
with 32 bits of address and 32 bits of data. The MC68030 bus has an enhanced
controller that supports both asynchronous and synchronous bus cycles and
burst data transfers. It also supports the MC68020 dynamic bus sizing mechanism that automatically determines device port sizes on a cycle-by-cycle
basis as the processor transfers operands to or from external devices.
A block diagram of the MC68030 is shown in Figure 1-1. The instructions and
data required by the processor are supplied from the internal caches whenever possible. The MMU translates the logical address generated by the
processor into a physical address utilizing its address translation cache (ATC).
The bus controller manages the transfer of data between the CPU and memory or devices at the physical address.

MOTOROLA

MC68030 USER'S MANUAL

1-1

N

MICRDSEQUENCER AND CONTROL

INTERNAL
DATA
BUS
INSTRUCTION V''---------'
CACHE

INSTRUCTION
ADDRESS
BUS

s:
(')
0)

co

PHYSICAL

o
w
o

c:

en
m

::JJ

DATA
BUS

ADDRESS
BUS

en

s::l>
2

c:

:l>
r-

DATA
ADDRESS
BUS
DATA
CACHE

s::

o
-I
o

BUS CONTROL
SIGNALS

::0

or-

:t>

Figure 1-1. Block Diagram

1.1 FEATURES
The features of the MC68030 microprocessor are:
• Object Code Compatible with the MC68020 and Earlier M68000 Microprocessors
• Complete 32-Bit Nonmultiplexed Address and Data Buses
• 16 32-Bit General-Purpose Data and Address Registers
• Two 32-Bit Supervisor Stack Pointers and 10 Special-Purpose Control
Registers
• 256-Byte Instruction Cache and 256-Byte Data Cache Can Be Accessed
Simultaneously
• Paged MMU that Translates Addresses in Parallel with Instruction Execution and Internal Cache Accesses
• Two Transparent Segments Allow Untranslated Access to Physical Memory To Be Defined for Systems That Transfer Large Blocks of Data between Predefined Physical Addresses - e.g., Graphics Applications
• Pipelined Architecture with Increased Parallelism Allows Accesses to
Internal Caches To Occur in Parallel with Bus Transfers and Instruction
Execution To Be Overlapped
o Enhanced Bus Controller Supports Asynchronous Bus Cycles (three clocks
minimum), Synchronous Bus Cycles (two clocks minimum), and Burst
Data Transfers (one clock minimum) all to the Physical Address Space
• Dynamic Bus Sizing Supports 8-, 16-, 32-Bit Memories and Peripherals
• Support for Coprocessors with the M68000 Coprocessor Interface - e.g.,
Full IEEE Floating-Point Support Provided by the. MC688811MC68882
Floating-Point Coprocessors
• 4-Gbyte Logical and Physical Addressing Range
• Implemented in Motorola's HCMOS Technology That Allows CMOS and
HMOS (High-Density NMOS) Gates to be Combined for Maximum Speed,
Low Power, and Optimum Die Size
• Processor Speeds Beyond 20 MHz
Both improved performance and increased functionality result from the onchip implementation of the MMU and the data and instruction caches. The
enhanced bus controller and the internal parallelism also provide increased
system performance. Finally, the improved bus interface, the reduction in
physical size, and the lower power consumption combine to reduce system
costs and satisfy cost/performance goals of the system designer.

MOTOROLA

MC68030 USER'S MANUAL

1-3

1.2 MC68030 EXTENSIONS TO THE M68000 FAMILY
In addition to the on-chip instruction cache present in the MC68020, the
MC68030 has an internal data cache. Data that is accessed during read cycles
may be stored in the on-chip cache, where it is available for subsequent
accesses. The data cache reduces the number of external bus cycles when
the data operand required by an instructi,on is already in the data cache.
Performance is enhanced further because the on-chip caches can be internally
accessed in a single clock cycle. In addition, the bus controller provides a
two-clock cycle synchronous mode and burst mode accesses that can transfer
data in as little as one clock per long word.
Th'e MC68030 enhanced microprocessor contains an on-chip MMU that allows address translation to operate in parallel with the CPU core, the internal
caches, and the bus controller.
Additional signals support emulation and system analysis. External debug
equipment can disable the on-chip caches and the MMU to freeze the MC68030
internal state during breakpoint processing. In addition, the MC68030 indicates:
1.
2.
3.
4.
5.

The start of a refill of the instruction pipe
Instruction boundaries
Pending trace or interrupt processing
Exception processing
Halt conditions

This status and control information allows external debugging equipment to
trace the MC68030 activity and interact nonintrusively with the MC68030 to
effectively reduce system debug effort.

1.3 PROGRAMMING MODEL
The programming model of the MC68030 consists of two groups of registers:
the user model and the supervisor model. This corresponds to the user and
supervisor privilege levels. User programs executing at the user privilege
level use the registers of the user model. System software executing at the
. supervisor level uses the control registers of the supervisor level to perform
supervisor functions.

1-4

MC68030 USER'S MANUAL

MOTOROLA

Figure 1-2 shows the user programming model, conslstmg of 16 32-bit
general-purpose registers and two control registers:
• General-Purpose 32-Bit Registers (00-07, AO-A7)
• 32-Bit Program Counter (PC)
• 8-Bit Condition Code Register (CCR)
The supervisor programming model consists of the registers available to the
user plus 14 control registers:
• Two 32-Bit Supervisor Stack Pointers (ISP and MSP)
• 16-Bit Status Register (SR)
• 32-Bit Vector Base Register (VBR)
• 32-Bit Alternate Function Code Registers (SFC and OFC)
• 32-Bit Cache Control Register (CACR)
• 32-Bit Cache Address Register (CAAR)
• 64-Bit CPU Root Pointer (CRP)
• 64-Bit Supervisor Root Pointer (SRP)
• 32-Bit Translation Control Register (TC)
• 32-Bit Transparent Translation Registers (TTO and TTl)
• 16-Bit MMU Status Register (MMUSR)
The user programming model remains unchanged from previous M68000
Family microprocessors. The supervisor programming model supplements
the user programming model and is used exclusively by the MC68030 system
programmers who utilize the supervisor privilege level to implement sensitive operating system functions, liD control, and memory management
subsystems. The supervisor programming model contains all the controls to
access and enable the special features of the MC68030. This segregation was
carefully planned so that all application software is written to run at the
nonprivileged user level and migrates to the MC68030 from any M68000
platform without modification. Since system software is usually modified by
system programmers when ported to a new design, the control features are
properly placed in the supervisor programming model. For example, the
transparent translation feature of the MC68030 is new to the family supervisor
programming model for the MC68030 and the two translation registers are

MOTOROLA

MC68030 USER'S MANUAL

1-5

new additions to the family supervisor programming model for the MC68030.
Only supervisor code uses this feature, and user application programs remain
unaffected.
Registers DO-D7 are used as data registers for bit and bit field (1 to 32 bits),
byte (8 bit), word (16 bit), long-word (32 bit), and quad-word (64 bit) operations. Registers AO-A6 and the user, interrupt, and master stack pointers
are address registers that may be used as software stack pointers or base
address registers. Register A7 (shown as A7' and A7" in Figure 1-3) is a
register designation that applies to the user stack pointer in the user privilege
level and to either the interrupt or master stack pointer in the supervisor
privilege level. In the supervisor privilege level, the active stack pointer (interrupt or master) is called the supervisor stack pointer (SSP). In addition,
31

16 15

8 7
DO
Dl
D2
D3

DATA
REGISTERS

D4
D5
D6
D7

31

16 15
AO
Al
A2
ADDRESS
REGISTERS

A3
A4
A5
A6

31

16 15

31

0

0

I

A7 (USP) } . USER STACK
POINTER

I PC

}

I

}

PROGRAM
'COUNTER

15

[==~===

CCR

CQ...NDITION
CODE
REGISTER

Figure 1-2. User Programming Model

1-6

MC68030 USER'S MANUAL

MOTOROLA

the address registers may be used for word and long-word operations. All
of the 16 general-purpose registers (00-07, AO-A7) may be used as index
registers.
The program counter (PC) contains the address of the next instruction to be
executed by the MC68030. During instruction execution and exception processing, the processor automatically increments the contents of the PC or
places a new value in the PC, as appropriate.

31
~

16 15

I

31
~

J-

I

_ _ _ _ _ _ _ _ _ _ _--'-_ _ _ _ _ _ _ _ _ _ _ _...J. Al' (ISP,

16 15

0

I

I

_ _ _ _ _ _ _ _ _ _ _--'-._ _ _ _ _ _ _ _ _ _ _ _...J.

15

8 7

I...._ _ _ _ _--'_ _ _(CC_R_'

MASTER STACK
POINTER

0

o

31

I SR }

....JI

2

VBR

}

SFC
OFC

t

0

=== =====~~==B

I[-=---~----~~-=-~ ~~===-~ = =

L ____________________________ _
31

(MS~
:J

_--I

L-.._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

31

A7"

INTERRUPT
STACK
POINTER

0

STATUS
REGISTER
VECTOR BASE
REGISTER
ALTERNATE
FUNCTION
COOE REGISTERS

I CACR

}

CACHE CONTROL
REGISTER

I

}

CACHE
AOORESS
REGISTER

31

63

32

CAAR

I
I

}

CPU ROOT
POINTER
REGISTER

SR.

}

SUPERVISOR
ROOT POINTER
REGISTER

I

TC

}

I no

}

I IT!

}

CAf

63

32

31

31

TRANSLATION
CONTROL
REGISTER
TRANSPARENT
TRANSLATION
REGISTER 0

31
' - -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _....l

15

TRANSPARENT
TRANSLATION
REGISTER 1

o
STATUS
REGISTER
I MMUSR} MMU

L..-_ _ _ _ _ _ _ _ _ _ _---I.

Figure 1-3. Supervisor Programming Model Supplement

MOTOROLA

MC68030 USER'S MANUAL

1-7

The status register, SR, (see Figure 1-4) stores the processor status. It contains
the condition codes that reflect the results of a previous operation and can
be used for conditional instruction execution in a program. The condition
codes are extend (X), negative (N), zero (Z), overflow (V), and carry (C). The
user byte containing the condition codes is the only portion of the status
register information available in the user privilege level, and it is referenced
as the CCR in user programs. In the supervisor privilege level, software can
access the full status register, including the interrupt priority mask (three
bits) as well as additional control bits. These bits indicate whether the processor is in:
1. One of two trace modes (T1, TO)
2. Supervisor or user privilege level (S)
3. Master or interrupt mode (M)
The vector base register (VBR) contains the base address of the exception
vector table in memory. The displacement of an exception vector is added
to the value in this register to access the vector table.
Alternate function code registers, SFC and DFC, contain 3-bit function codes.
Function codes can be considered extensions of the 32-bit linear address that
optionally provide as many as eight 4-Gbyte address spaces. Function codes
are automatically generated by the processor to select address spaces for
data and program at the user and supervisor privilege levels and a CPU
address space for processor functions (e.g., coprocessor communications).
Registers SFC and DFC are used by certain instructions to explicitly specify
the function codes for operations.
USER BYTE
(CONDITION COOE REGISTER)

SYSTEM BYTE

I
15

14

13

12

I

II
11

10

9

B

7

6

5

4

3

2

1, 0

CARRY
1NTERRUPT
PRIORITY MASK

TRACE
ENABLE

1 - -_ _

OVERflOW

' - - - - - - ZERO

SUPERVISOR/USER
STATE -------'

L...--_ _ _ _

MASTER/INTERRUPT
STATE - - - - - - - - '

~-----

NEGATIVE
EXTEND

Figure 1-4. Status Register

1-8

MC68030 USER'S MANUAL

MOTOROLA

The cache control register (CACR) controls the on-chip instruction and data
caches of the MC68030. The cache address register (CAAR) stores an address
for cache control functions.
The CPU root pointer (CRP) contains a pointer to the root of the translation
tree for the currently executing task of the MC68030. This tree contains the
mapping information for the task's address space. When the MC68030 is
configured to provide a separate address space for supervisor routines, the
supervisor root pointer (SRP) contains a pointer to the root of the translation
tree describing the supervisor's address space.
The translation control register (TC) consists of several fields that control
address translation. These fields enable and disable address translation, enable and disable the use of SRP for the supervisor address space, and select
or ignore the function codes in translating addresses. Other fields define the
size of memory pages, the number of address bits used in translation, and
the translation table structure.
The transparent translation registers, TTO and TTl, can each specify separate
blocks of memory as directly accessible without address translation. Logical
addresses in these areas become the physical addresses for memory access.
Function codes and the eight most significant bits of the address can be used
to define the area of memory and type of access; either read, write, or both
types of memory access can be directly mapped. The transparent translation
feature allows rapid movement of large blocks of data in memory or I/O
space without disturbing the context of the on-chip address translation cache
or incurring delays associated with translation table lookups. This feature is
useful to graphics, controller, and real-time applications.
The MMU status register (MMUSR) contains memory management status
information resulting from a search of the address translation cache or the
translation tree for a particular logical address.

MOTOROLA

MC68030 USER'S MANUAL

1-9

-

1.4 DATA TYPES AND ADDRESSING MODES
Seven basic data types are supported:
1. Bits
2. Bit Fields (Fields of consecutive bits, 1-32 bits long)
3. BCD Digits (Packed: 2 digits/byte, Unpacked: 1 digit/byte)
4. Byte Integers (8 bits)
5. Word Integers (16 bits)
6. Long-Word Integers (32 bits)
7. Quad-Word Integers (64 bits)
In addition, the instruction set supports operations on other data types such
as memory addresses. The coprocessor mechanism allows direct support of
floating-point operations with the MC68881 and MC68882 floating-point co. processors as well as specialized user-defined data types and functions.
The
1.
2.
3.
4.
5.
6.
7.
8.
9.

18 addressing modes, shown in Table 1-1, include nine basic types:
Register Direct
Register Indirect
Register Indirect with Index
Memory Indirect
Program Counter Indirect with Displacement
Program Counter Indirect with Index
Program Counter Memory Indirect
Absolute
Immediate

The register indirect addressing modes can also postincrement, predecrement, offset, and index addresses. The program counter relative mode also
has index and offset capabilities. As in the MC68020, both modes are extended to provide indirect reference through memory. In addition to these
addressing modes, many instructions implicitly specify the use of the condition code register, stack pointer, and/or program counter.

1.5 INSTRUCTION SET OVERVIEW
The instructions in the MC68030 instruction set are listed in Table 1-2. The
instruction set has been tailored to support structured high-level languages
and sophisticated operating systems. Many instructions operate on bytes,
words, or long words, and most instructions can use any of the 18 addressing
modes.

1-10

MC68030 USER'S MANUAL

MOTOROLA

Table 1-1. Addressing Modes
Addressing Modes

Syntax

Register Direct
Data Register Direct
Address Register Direct

Dn
An

Register Indirect
Address Register
Address Register
Address Register
Address Register

(An)
(An)+
-(An)
(d16,An)

Indirect
Indirect with Postincrement
Indirect with Predecrement
Indirect with Displacement

Register Indirect with Index
Address Register Indirect with Index (S-Bit Displacement)
Address Register Indirect with Index (Base Displacement)

(ds,An,Xn)
(bd,An,Xn)

Memory Indirect
Memory Indirect Postindexed
Memory Indirect Preindexed

([bd,An),Xn,od)
([bd,An,XnJ.od)

Program Counter Indirect with Displacement

(d16,PC)

Program Counter Indirect with Index
PC Indirect with Index (S-Bit Displacement)
PC Indirect with Index (Base Displacement)

(dS,PC,Xn)
(bd,PC,Xn)

Program Counter Memory Indirect
PC Memory Indirect Postindexed
PC Memory Indirect Preindexed

([bd,PCJ.Xn,od)
([bd,PC,XnJ.od)

Absolute
Absolute Short
Absolute Long

(xxx).W
(xxx).L

Immediate

#(data)

NOTES:
Dn
An
S, d16

= Data

Register, DO-D7
Address Register, AO-A7
= A twos-complement or sign-extended displacement; added as part of the
effective address calculation; size is S (dS) or 16 (d16) bits; when omitted,
assemblers use a value of zero.
Xn = Address or data register used as an index register; form is Xn.SIZE*SCALE,
where SIZE is .W or .L (indicates index register size) and SCALE is 1, 2, 4,
or S (index register is multiplied by SCALE); use of SIZE and/or SCALE is
optional.
.
bd = A twos-complement base displacement; when present, size can be 16 or
32 bits.
od = Outer displacement, added as part of effective address calculation after
any memory indirection; use is optional with a size of 16 or 32 bits.
PC = Program Counter
(data) = Immediate value of S, 16, or 32 bits
( ) = Effective Address
[ ) = Use as indirect access to long-word address.

MOTOROLA

=

MC68030 USER'S MANUAL

1-11

•

1.6 VIRTUAL MEMORY AND VIRTUAL MACHINE CONCEPTS
The full addressing range of the MC68030 is 4 Gbytes (4,294,967,296 bytes)
in each of eight address spaces. Even though most systems implement a
smaller physical memory, the system can be made to appear to have a full
4 Gbytes of memory available to each user program by using virtual memory
techniques.
In a virtual memory system, a user program can be written as if it has a large
amount of memory available, when the physical memory actually present is
much smaller. Similarly, a system can be designed to allow user programs
to access devices that are not physically present in the system, such as tape
drives, disk drives, printers, terminals, and so forth. With proper software
emulation, a physical system can appear to be any other M68000 computer
system to a user program, and the program can be given full access to all
of the resources of that emulated system. Such an emulated system is called
a virtual machine.

1.6.1 Virtual Memory
A system that supports virtual memory has a limited amount of high-speed
physical memory that can be accessed directly by the processor and main'tains an image of a much larger virtual memory on a secondary storage
device such as a large-capacity disk drive. When the processor attempts to
access a location in the virtual memory map that is not resident in physical
memory, a page fault occurs. The access to that location is temporarily suspended while the necessary data is fetched from secondary storage and
placed in physical memory. The suspended access is then either restarted
or continued.
The MC68030 uses instruction continuation to support virtual memory. When
a bus cycle is terminated with a bus error, the microprocessor suspends the
current instruction and executes the virtual memory bus error handler. When
the bus error handler has completed execution, it returns control to the
program that was executing when the error was detected, reruns the faulted
bus cycle (when required), and continues the suspended instruction.

1-12

MC68030 USER'S MANUAL

MOTOROLA

Table 1-2. Instruction Set
Mnemonic

Description

Mnemonic

ABCD
ADD
ADDA
ADDI
ADDQ
ADDX
AND
ANDI
ASL, ASR

Add Decimal with Extend
Add
Add Address
Add Immediate
Add Quick
Add with Extend
Logical AND
Logical AND Immediate
Arithmetic Shift Left and Ri(lht

Bcc
BCHG
BCLR
BFCHG
BFCLR
BFEXTS
BFEXTU
BFFFO
BFINS
BFSET
BFTST
BKPT
BRA
BSET
BSR
BTST

Branch Conditionally
Test Bit and Change
Test Bit and Clear
Test Bit Field and Change
Test Bit Field and Clear
Signed Bit Field Extract
Unsigned Bit Field Extract
Bit Field Find First One
Bit Field Insert
Test Bit Field and Set
Test Bit Field
Breakpoint
Branch
Test Bit and Set
Branch to Subroutine
Test Bit

CAS
CAS2
CHK
CHK2

Compare and Swap Operands
Compare and Swap Dual Operands
Check Register Against Bound
Check Register Against Upper and
Lower Bounds
Clear
Compare
Compare Address
Compare Immediate
Compare Memory to Memory
Compare Register Against Upper and
Lower Bounds

CLR
CMP
CMPA
CMPI
CMPM
CMP2

EOR
EORI
EXG
EXT, EXTB

Logical Exclusive OR
Logical Exclusive OR Immediate
Exchange Registers
Sign Extend

ILLEGAL

Take Illegal Instruction Trap

JMP
JSR

Jump
Jump to Subroutine

LEA
LINK
LSL, LSR

Load Effective Address
Link and Allocate
Logical Shift Left and Ri(lht

MOVE
MOVEA
MOVE CCR
MOVE SR

Move
Move Address
Move Condition Code Register
Move Status Register

MOTOROLA

Move
Move
Move
Move
Move
Move

MULS
MULU

Signed Multiply
Unsigned Multiply

NBCD
NEG
NEGX
NOP
NOT

Negate Decimal with Extend
Negate
Negate with Extend
No Operation
Logical Complement

OR
ORI
ORICCR

Logical Inclusive OR
Logical Inclusive OR Immediate
Logical Inclusive OR Immediate to
Condition Codes
Logical Inclusive OR Immediate to Status
Register

ORISR

DBcc
Test Condition, Decrement and Branch
DIVS, DIVSL Signed Divide
DIVU, DIVUL Unsigned Divide

Description

MOVE USP
MOVEC
MOVEM
MOVEP
MOVEQ
MOVES

User Stack Pointer
Control Register
Multiple Registers
Peripheral
Quick
Alternate Address Space

PACK
PEA

Pack BCD
Push Effective Address

PFLUSH
PFLUSHA
PLOADR,
PLOADW
PMOVE
PMOVEFD

Flush Entry(ies) in the ATC
Flush All Entries in the ATC
Load Entry into the ATC

PTESTR,
PTESTW

Move to/from MMU Registers
Move to/from MMU Registers with Flush
Disable
Test a Logical Address

RESET
ROL,ROR
ROXL, ROXR
RTD
RTE
RTR
RTS

Reset External Devices
Rotate Left and Right
Rotate with Extend Left and Right
Return and Deallocate
Return from Exception
Return and Restore Codes
Return from Subroutine

SBCD
Scc
STOP
SUB
SUBA
SUBI
SUBQ
SUBX
SWAP

Subtract Decimal with Extend
Set Conditionally
Stop
Subtract
Subtract Address
Subtract Immediate
Subtract Quick
Subtract with Extend
Swap Register Words

TAS
TRAP
TRAPcc
TRAPV
TST

Test Operand and Set
Trap
Trap Conditionally
Trap on Overflow
Test Operand

UNLK
UNPK

Unlink
Unpack BCD

MC68030 USER'S MANUAL

1-13

Coprocessor Instructions
Mnemonic
cpBcc
cpDBcc
cpGEN

Description

Mnemonic

Branch Conditionally
Test Coprocessor Condition,
Decrement and Branch
Coprocessor General Instruction

cpRESTORE
cpSAVE
cpScc
cpTRAPcc

Description
Restore Internal State of Coprocessor
Save Internal State of Coprocessor
Set Conditionally
Trap Conditionally

1.6.2 Virtual Machine
A typical use for a virtual machine system is the development of software,
such as an operating system, for a new machine also under development
and not yet available for programming use. In a virtual machine system, a
governing operating system emulates the hardware of the new machine and
allows the new software to be executed and debugged as though it were
running on the new hardware. Since the new software is controlled by the
governing operating system, it is executed at a lower privilege level than the
governing operating system. Thus, any attempts by the new software to use
virtual resources that a're not physically present (and should be emulated)
are trapped to the governing operating system and performed by its software.
In the MC68030 implementation of a virtual machine, the virtual application
runs at the user privilege level. The governing operating system executes at
the supervisor privilege level and any attempt by the new operating system
to access supervisor resources or execute privileged instructions causes a
trap to the governing operating system.
Instruction continuation is used to support virtual liD devices in memorymapped inputloutput systems. Control and data registers for the virtual device are simulated in the memory map. An access to a virtual register causes
a fault and the function of the register is emulated by software.

1-14

MC68030 USER'S MANUAL

MOTOROLA

1.7 THE MEMORY MANAGEMENT UNIT
The MMU supports virtual memory systems by translating logical addresses
to physical addresses using translation tables stored in memory. The MMU
stores address mappings in an address translation cache (ATC) that contains
the most recently used translations. When the ATC contains the address for
a bus cycle requested by the CPU, a translation table search is not performed.
Features of the MMU include:
• Multiple Level Translation Tables with Short- and Long-Format Descriptors for Efficient Table Space Usage
• Table Searches Automatically Performed in Microcode
• 22-Entry Fully Associative ATC
• Address Translations and Internal Instruction and Data Cache Accesses
Performed in Parallel
• Eight Page Sizes Available Ranging from 256 to 32K Bytes
• Two Optional Transparent Blocks
• User and Supervisor Root Pointer Registers
• Write Protection and Supervisor Protection Attributes
• Translations Enabled/Disabled by Software
• Translations Can Be Disabled with External MMUDIS Signal
• Used and Modified Bits Automatically Maintained in Tables and ATC
• Cache Inhibit Output (ClOUT) Signal Can Be Asserted on a Page-by-Page
Basis
• 32-Bit Internal Logical Address with Capability To Ignore as many as 15
Upper Address Bits
• 3-Bit Function Code Supports Separate Address Spaces
• 32-Bit Physical Address
The memory management function performed by the MMU is called demand
paged memory management. Since a task specifies the areas of memory it
requires as it executes, memory allocation is supported on a demand basis.
If a requested access to memory is not currently mapped by the system, then
the access causes a demand for the operating system to load or allocate the
required memory image. The technique used by the MC68030 is paged memory management because physical memory is managed in blocks of a specified number of bytes, called page frames. The logical address space is divided

MOTOROLA

MC68030 USER'S MANUAL

1-15

into fixed-size pages that contain the same number of bytes as the page
frames. Memory management assigns a physical base address to a logical
page. The system software then transfers data between secondary storage
and memory one or more pages at a time.

1.8 PIPELINED ARCHITECTURE
The MC68030 uses a three-stage pipelined internal architecture to provide
for optimum instruction throug~put. The pipeline allows as many as three
words of a single instruction or three consecutive instructions to be decoded
concurrently.

1.9 THE CACHE MEMORIES
Due to locality of reference, instructions and data that are used in a program
have a high probability of being reused within a short time. Additionally,
instructions and data operands that reside in proximity to the instructions
and data currently in use also have a high probability of being utilized within
a short period. To exploit these locality characteristics, the MC68030 contains
two on-chip logical caches, a data cache, and an instruction cache.
Each of the caches stores 256 bytes of information, organized as 16 entries,
each containing a block of four long words (16 bytes). The processor fills the
cache entries either one long word at a time or, during burst mode accesses,
four long words consecutively. The burst mode of operation not only fills
the cache efficiently but also captures adjacent instruction or data items that
are likely to be required in the near future due to locality characteristics of
the executing task.
The caches improve the overall performance of the system by -reducing the
number of bus cycles required by the processor to fetch information from
memory and by increasing the bus bandwidth available for other bus masters
in the system. Addition of the data cache in the MC68030 extends the benefits
of cache techniques to all memory accesses. During a write cycle, the data
cache circuitry writes data to a cached data item as well as to the item in
memory, maintaining consistency between data in the cache and that in
memory. However, writing data that is not in the cache mayor may not cause
the data item to be stored in the cache, depending on the write allocation
policy selected in the cache control register (CACR).

1-16

MC68030 USER'S MANUAL

MOTOROLA

SECTION 2
DATA ORGANIZATION AND ADDRESSING
CAPABILITIES
Most external references to memory by a microprocessor are either program
references or data references; they either access instruction words or operands (data items) for an instruction. Program references are references to
the program space, the section of memory that contains the program instructions and any immediate data operands that reside in the instruction
stream. Refer to M68000PM/AD, M68000 Programmer's Reference Manual,
for descriptions of the instructions in the program space. Data references
refer to the data space, the section of memory that contains the program
data. Data items in the instruction stream can be accessed with the program
counter relative addressing modes, and these accesses are classified as program references. A third type of external reference used for coprocessor
communications, interrupt acknowledge cycles, and breakpoint acknowledge
cycles is classified as a CPU space reference. The MC68030 automatically
sets the function codes to access the program space, the data space, or the
CPU space for special functions as required. The function codes can be used
by the memory management unit to organize separate program (read only)
and data (read-write) memory areas.
This section describes the data organization and addressing capabilities of
the MC68030. It lists the types of operands used by instructions and describes
the registers and their use as operands. Next, the section describes the organization of data in memory and the addressing modes available to access
data in memory. Last, the section describes the system stack and user program stacks and queues.

2.1 INSTRUCTION OPERANDS
The MC68030 supports a general-purpose set of operands to serve the requirements of a large range of applications. Operands of MC68030 instructions may reside in registers, in memory, or within the instructions themselves.
An instruction operand might also reside in a coprocessor. An operand may
be a single bit, a bit field of from 1 to 32 bits in length, a byte (8 bits), a word
(16 bits), a long word (32 bits), or a quad word (64 bits). The operand size
for each instruction is either explicitly encoded in the instruction or implicitly

MOTOROLA

MC68030 USER'S MANUAL

2-1

defined by the instruction operation. Coprocessors are designed to support
special computation models that require very specific but widely varying
data operand types and sizes. Hence, coprocessor instructions can specify
operands of any size.

2.2 ORGANIZATION OF DATA IN REGISTERS
The eight data registers can store data operands of 1, 8, 16, 32, and 64 bits,
addresses of 16 or 32 bits, or bit fields of 1 to 32 bits. The seven address
registers and the three stack pointers are used for address operands of 16
or 32 bits. The control registers (SR, VBR, SFC, DFC, CACR, CAAR, CRP, SRP,
TC, TTO, TT1, and MMUSR) vary in size according to function. Coprocessors
may define unique operand sizes and support them with on-chip registers
accordingly.

2.2.1 Data Registers
Each data register is 32 bits wide. Byte operands occupy the low-order 8 bits,
word operands the low-order 16 bits, and long-word operands the entire 32
bits. When a data register is used as either a source or destination operand,
only the appropriate low-order byte or word (in byte or word operations,
respectively) is used or changed; the remaining high-order portion is neither
used nor changed. The least significant bit of a long-word integer is addressed
as bit zero, and the most significant bit is addressed as bit 31. For bit fields,
the most significant bit is addressed as bit zero, and the least significant bit
is addressed as the width of the field minus one. If the width of the field plus
the offset is greater than 32, the bit field wraps around within the register.
The following illustration shows the organization of various types of data in
the data registers.
Quad-word data consists of two long words: for example, the product of 32bit multiply or the quotient of 32-bit divide operations (signed and unsigned).
Quad words may be organized in any two data registers without restrictions
on order or pairing. There are no explicit instructions for the management
of this data type, although the MOVEM instruction can be used to move a
quad word into or out of the registers.
Binary-coded decimal (BCD) data represents decimal numbers in binary form.
Although many BCD codes have been devised, the BCD .instructions of the
M68000 Family support formats in which the four least significant bits consist
of a binary number having the numeric value of the corresponding decimal
number. Two BCD formats are used. In the unpacked BCD format, a byte

2-2

MC68030 USER'S MANUAL

MOTOROLA

Bit (O~Modulo (Offset)<31, Offset of 0= MSB)
31

I MSB I

30

o

29

I LSB I

Byte
31

24

High-Order Byte

16

23

o

15

Middle-High Byte

Middle-Low Byte

Low-Order Byte

16-Bit Word
16

31

15
Low-Order Word

High-Order Word

Long Word
31

Long Word

Quad Word
63

I MSB I

32

62
Any Ox

31

I LSB I

Any Oy

Bit Field (O~Offset<32, 0 = effective address
list = list of registers, for example 03-00
# = immediate data; a literal integer
{offset:width} = bit field selection
label = assemble program label
[m] = bit m of an operand
[m: n] = bits m through n of operand

MOTOROLA

MC68030 USER'S MANUAL

3-3

x

= extend (X) bit in CCR
N = negative (N) bit in CCR
Z = Zero (Z) bit in CCR
V = overflow (V) bit in CCR
C = carry (C) bit in CCR
+ = arithmetic addition or postincrement indicator
- = arithmetic subtraction or predecrement indicator
x = arithmetic multiplication
7 = arithmetic division or conjunction symbol
- = invert; operand is logically complemented
A = logical AND
V = logical OR
EB= logical exclusive OR
Oc= data register, 07-00 used during compare
Ou = data register, 07-pO used during update
Dr, Oq = data registers, remainder or quotient of divide
Oh, 01 = data registers, high- or low-order 32 bits of product
MSW = most sig nificant word
LSW = least significant word
MSB = most significant bit
FC = function code
{R/W} = read or write indicator
[An] = address extensions

III

3.2.1 Data Movement Instructions
The MOVE instructions with their associated addressing modes are the basic
means of transferring and storing addresses and data. MOVE instructions
transfer byte, word, and long-word operands from memory to memory, memory to register, register to memory, and register to register. Address movement instructions (MOVE or MOVEA) transfer word and long-word operands
and ensure that only valid address manipulations are executed. In addition
to the general MOVE instructions, there are several special data movement
instructions: move multiple registers (MOVEM), move peripheral data
(MOVEP), move quick (MOVEO), exchange registers (EXG), load effective
address (LEA), push effective address (PEA), link stack (LINK), and unlink
stack (UNLK).

3-4

MC68030 USER'S MANUAL

MOTOROLA

Table 3-1 is a summary of the integer and floating-point data movement
operations.

Table 3-1. Data Movement Operations
Instruction
EXG

Operand Syntax

Operand Size

Rn,Rn

32

Operation
Rn •• Rn

LEA

.An

32

 • An

LINK

An,#

16,32

Sp-4. SP; An. (SP); SP. An, SP+D. SP

MOVE
MOVEA

,
.An

8,16,32
16,32.32

source. destination

MOVEM

list,
,list

16,32
16,32.32

listed registers. destination
source. listed registers

MOVEP

Dn, (d16.An)

16,32

Dn[31 :24] • (An + d); Dn[23:16] • An + d + 2);
Dn[15:8]. (An+d+4); Dn[7:0]. (An+d+6)
(An+d). Dn[31:24]; (An+d+2). Dn[23:16];
(An+d+4). Dn[15:8]; (An+d+6). Dn[7:0]
immediate data. destination

(d16.An),Dn
MOVEQ

#,Dn

8.32

PEA



32

SP-4. SP;  • (SP)

UNLK

An

32

An. SP; (SP). An; SP+4. SP

l1li

3.2.2 Integer Arithmetic Instructions
The integer arithmetic operations include the four basic operations of add
(ADD), subtract (SUB), multiply (MUL), and divide (DIV) as well as arithmetic
compare (CMP, CMPM, CMP2), clear (CLR), and negate (NEG). The instruction
set includes ADD, CMP, and SUB instructions for both address and data
operations with all operand sizes valid for data operations. Address operands
consist of 16 or 32 bits. The clear and negate instructions apply to all sizes
of data operands.
Signed and unsigned MUL and DIV instructions include:
• Word mUltiply to produce a long-word product
• Long-word multiply to produce and long-word or quad-word product
• Division of a long word divided by a word divisor (word quotient and
word remainder)
• Division of a long word or quad word dividend by a long-word divisor
(long-word quotient and long-word remainder)
A set of extended instructions provides multiprecision and mixed-size arithmetic. These instructions are add extended (ADDX), subtract extended (SUBX),
sign extended (EXT), and negate binary with extend (NEGX). Refer to Table
3-2 for a summary of the integer arithmetic operations.

MOTOROLA

MC68030 USER'S MANUAL

3-5

Table 3-2. Integer Arithmetic Operations
Instruction

Operand Syntax

Operand Size

8,16,32
8,16,32
16,32

source + destination. destination

ADDA

Dn,(ea)
(ea),Dn
(ea),An

ADDI
ADDQ

#(data),(ea)
#(data),(ea)

8,16,32
8,16,32

immediate data + destination. destination

ADDX

Dn,Dn
- (An), - (An)

8,16,32
8,16,32

source + destination + X • destination

ADD

III

CLR
CMP
CMPA
CMPI

Operation

(ea)

8,16,32

o • destination

(ea),Dn
(ea),An

8,16,32
16,32

destination - source

#(data),(ea)

8,16,32

destination - immediate data

CMPM

(An)+,(An)+

8,16,32

destination - source

CMP2

(ea),Rn

8,16,32

lower bound ( = Rn ( = upper bound

(ea),Dn
(ea),Dr:Dq
(ea),Dq
(ea),Dr:Dq

32/16.16:16
64/32.32:32
32/32.32
32/32 • 32:32

Dn
Dn
Dn

8.16
16.32
8.32

(ea),Dn
(ea),DI
(ea),Dh:DI

16x 16.32
32 x 32.32
32 x32. 64

NEG

(ea)

8,16,32

NEGX

(ea)

8,16,32
8,16,32
8,16,32
16,32

destination = source. destination

SUBA

(ea),Dn
Dn,(ea)
(ea),An

SUBI
SUBQ

#(data),(ea)
#(data),(ea)

8,16,32
8,16,32

destination - immediate data. destination

SUBX

Dn,Dn
-(An),-(An)

8,16,32
8,16,32

destination - source - X. destination

DIVS/DIVU

DIVSLlDIVUL
EXT
EXTB
MULS/MULU

SUB

destination/source. destination (signed or unsigned)

sign extended destination. destination

source x destination. destination (signed or unsigned)

oo-

destination. destination
destination - X • destination

3.2.3 Logical Instructions
The logical operation instructions (AND, OR, EOR, and NOT) perform logical
operations with all sizes of integer data operands. A similar set of immediate
instructions (ANDI, ORI, and EORI) provide these logical oper'ations with all
sizes of immediate data. The TST instruction compares the operand with zero
arithmetically, placing the result in the condition code register: Table 3-3
summarizes the logical operation,s.

3-6

MC68030 USER'S MANUAL

MOTOROLA

Table 3-3. Logical Operations
Instruction
AND

Operand Syntax

Operand Size

(ea),Dn
Dn,(ea)

8,16,32
8,16,32

Operation
source A destination. destination

ANDI

#,

8,16,32

immediate data A destination. destination

EOR

Dn,,

8,16,32

source EEl destination. destination

EORI

#(data),(ea)

8,16,32

immediate data EEl destination. destination

NOT

(ea)

8,16,32

- destination. destination

OR

(ea),Dn
Dn,(ea)

8,16,32
8,16,32

source V destination. destination

ORI

#(data),(ea)

8,16,32

immediate data V destination. destination

TST

(ea)

8,16,32

source -

•

0 to set condition codes

3.2.4 Shift and Rotate Instructions
The arithmetic shift instructions (ASR and ASL) and logical shift instructions
(LSR and LSL) provide shift operations in both directions. The ROR, ROL,
ROXR, and ROXL instructions perform rotate (circular shift) operations, with
and without the extend bit. All shift and rotate operations can be performed
on either registers or memory.
Register shift and rotate operations shift all operand sizes. The shift count
may be specified in the instruction operation word (to shift from 1-8 places)
or in a register (modulo 64 shift count).
Memory shift and rotate operations shift word-length operands one bit position only. The SWAP instruction exchanges the 16-bit halves of a register.
Performance of shift/rotate instructions is enhanced so that use of the ROR
and ROL instructions with a shift count of eight allows fast byte swapping.
Table 3-4 is a summary of the shift and rotate operations.

MOTOROLA

MC68030 USER'S MANUAL

3-7

Table 3-4. Shift and Rotate Operations
Instruction

ASL

ASR

•

LSL

LSR

ROL

ROR

ROXL

ROXR

SWAP

Operand Syntax

Operand Size

Dn,Dn
#(data),Dn
(ea)

8, 16, 32
8,16,32
16

Operation

Dn,Dn
#(data),Dn
(ea)

8,16,32
8,16,32
16

Dn,Dn
#(data),Dn
(ea)

8,16,32
8,16,32
16

~

Dn,Dn
#(data),Dn
(ea)

8,16,32
8,16,32
16

o~

Dn,Dn
#(data),Dn
(ea)

8,16,32
8,16,32
16

Dn,Dn
#(data),Dn
(ea)

8,16,32
8,16,32
16

Dn,Dn
#(data),Dn
(ea)

8,16,32
8,16,32
16

Dn,Dn
#(data),Dn
(ea)

8,16,32
8,16,32
16

On

32

~

1<-0

~

~

~

~o

lIE

~

~

Y

~

~

~

lIE

~

~

~~

H

HxH

~~

X

~-

~

3.2.5 Bit Manipulation Instructions
Bit manipulation operations are accomplished using the following instructions: bit test (BT5T), bit test and set (B5ET), bit test and clear (BCLR), and
bit test and change (BCHG). All bit manipulation operations can be performed
on either registers or memory. The bit number is specified as immediate
data or in a data register. Register operands are 32 bits long, and memory
operands are 8 bits long. In Table 3-5, the summary of the bit manipulation
operations, Z refers to bit 2, the zero bit of the status register.

3-8

MC68030 USER'S MANUAL

MOTOROLA

Table 3-5. Bit Manipulation Operations
Operand Syntax

Operand Size

Operation

BCHG

On,(ea}
#(data},(ea)

8,32
8,32

- (bit number) of destination) • Z • bit of destination

BClR

On,(ea}
#(data),(ea)

8,32
8,32

- (bit number) of destination) • Z;
o • bit of destination

BSH

On,(ea}
#(data},(ea)

8,32
8,32

- (bit number) of destination) • Z;
1 • bit of destination

BTST

On,(ea}
#( data) ,( ea)

8,32
8,32

- (bit number) of destination) • Z

Instruction

-

3.2.6 Bit Field Instructions
The MC68030 supports variable-length bit field operations on fields of up to
32 bits. The bit field insert (BFINS) instruction inserts a value into a bit field.
Bit field extract unsigned (BFEXTU) and bit field extract signed (BFEXTS)
extract a value from the field. Bit field find first one (BFFFO) finds the first
bit that is set in a bit field. Also included are instructions that are analogous
to the bit manipulation operations; bit field test (BFTST), bit field test and
set (BFSET), bit field test and clear (BFCLR), and bit field test and change
(BFCHG). Table 3-6 is a summary of the bit field operations.

Table 3-6. Bit Field Operations
Instruction
BFCHG
BFClR

Operand Syntax

Operand Size

(ea) {offset:width}

1-32

- Field, Field
O's, Field

Operation

(ea) {offset:width}

1-32

BFEXTS

(ea) {offset:width},On

1-32

Field, On; Sign Extended

BFEXTU

(ea) {offset:widthl,On

1-32

Field' On; Zero Extended

BFFFO

(ea) {offset:width},On

1-32

Scan for first bit set .in field; offset. On

BFINS

On,(ea} {offset:width}

1-32

On. Field

BFSET

(ea) {offset:width}

1-32

l's, Field

BFTST

(ea) {offset:width}

1-32

Field MSB • N; - (OR of all bits in field) • Z

NOTE: All bit field instructions set the Nand Z bits as shown for BFTST before performing the specified operation.

MOTOROLA

MC68030 USER'S MANUAL

3-9

3.2.7 Binary-Coded Decimal Instructions
Five instructions support operations on binary-coded decimal (BCD) numbers. The arithmetic operations on packed BCD numbers are add decimal
with extend (ABCD), subtract decimal with extend (SBCD), and negate decimal with extend (NBCD). PACK and UNPACK instructions aid in the conversion of byte encoded numeric data, such as ASCII or EBCDIC strings, to
BCD data and vice versa. Table 3-7 is a summary of the BCD operations.

•

Table 3-7. BCD Operations
Instruction
ABCD

3-10

Operand Syntax

Operand Size

Dn,Dn
- (An), - (An)

8
8

sourcelO + destinationlO + X • destination

o-

NBCD

(ea)

8

PACK

-(An),-(An)
#(data)
Dn,Dn,#(data)

16.8

SBCD

Dn,Dn
-(An),-(An)

8
8

UNPK

-(An),-(An)
#(data)
Dn,Dn,#(data)

8.16

Operation

destinationlO - X • destination

unpackaged source + immediate data. packed
destination

16.8

8.16

destinationlO - sourcelO - X. destination
packed source. unpacked source
unpacked source + immediate data.
unpacked destination

MC68030 USER'S MANUAL

MOTOROLA

3.2.8 Program Control Instructions
A set of subroutine call and return instructions and conditional and unconditional branch instructions perform program control operations. The no
operation instruction (NOP) may be used to force synchronization of the
internal pipelines. Table 3-8 summarizes these instructions.
Table 3-8. Program Control Operations
Instruction

Operand Syntax

Operation

Operand Size
Integer and Floating-Point Conditional


Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Create Date                     : 2012:08:13 12:24:14-08:00
Modify Date                     : 2012:08:13 13:41:01-07:00
Metadata Date                   : 2012:08:13 13:41:01-07:00
Producer                        : Adobe Acrobat 9.51 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:9dce55ff-8dac-4914-a59d-0f3ba1180cdc
Instance ID                     : uuid:3251b489-fd8c-4117-8c23-0722eb29ce43
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 608
EXIF Metadata provided by EXIF.tools

Navigation menu