68451_Memory_Management_Unit_Apr83 68451 Memory Management Unit Apr83
User Manual: 68451_Memory_Management_Unit_Apr83
Open the PDF directly: View PDF .
Page Count: 79
Download | |
Open PDF In Browser | View PDF |
Advance Information MC68451 MEMORY MANAGEMENT UNIT APRIL, 1983 This document contains information on a new product. Specifications and information herein are subject to change without notice. ©MOTOROLA lNC, 1982 ADI-872-R1 Motorola reserves the right to make changes 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. TABLE OF CONTENTS Paragraph Number Title Page Number Section 1 Introduction 1.1 1.2 1.3 1.4 1.5 Memory Segments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Codes and Address Spaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address Space Number. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Descriptors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Translation........................................................ 1-2 1-2 1-3 1-4 1-4 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 2.16 2.17 2.18 2.19 2.20 2.21 2.22 2.23 Section 2 Signal Description VCCandGND................ .................................... Clock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chip Select (CS) ................. ............................. Register Selects (RS1-RS5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Read/Write (R/W) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RESET ........................................................... Data Transfer Acknowledge WTACK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Upper and Lower Data Strobe (UDS, LDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address Strobe (AS) ............................................... Physical Address and Data (PADO-PAD15) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enable Data (ED) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hold Address (HAD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MODE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interrupt Request (IRQ) ............................................. Interrupt Acknowledge (lACK) ...... . . . . . . . . . . . . . . . . . . . . . . . . . . . FAULT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Codes (FCO-FC3). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address Bus (A8-A23) .............................................. Global Operation (GO) .............................................. ANY ............................................................. ALL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mapped Address Strobe (MAS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Write Inhibit (WIN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 2-2 2-2 2-2 2-2 2-2 2-2 2-2 2-3 2-3 2-3 2-3 2-3 2-3 2-4 2-4 2-4 2-4 2-4 2-4 2-5 2-5 2-5 3.1 3.1.1 3.1.2 3.1.3 Section 3 Register Description Descriptors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Logical Base Address (LBA) ..................................... Logical Address Mask (LAM) .................................... Physical Base Address (PBA) .................................... 3-2 3-2 3-2 3-3 iii TABLE OF CONTENTS ( Continued) Paragraph Number Title Page Number 3.1.4 3.1.5 3.1.6 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 Address Space Number (ASN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address Space Mask (ASM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Segment Status Register (SSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address Space Table (AST) ..................................... Accumulator (ACO-AC8) ........................................ Global Status Register (GSR) .................................... Local Status Register (LSR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Descriptor Pointer (DP) ......................................... Result Descriptor Pointer (RDP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interrupt Descriptor Pointer (lOP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interrupt Vector Register (lVR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 3-3 3-3 3-4 3-4 3-5 3-6 3-6 3-7 3-8 3-8 3-9 4.1 4.2 4.3 4.4 4.5 4.5.1 4.5.2 4.5.3 4.5.3.1 4.5.3.2 4.5.3.3 4.5.3.4 4.5.3.5 4.5.3.6 4.5.3.7 4.6 4.6.1 4.6.2 4.6.2.1 4.6.2.2 4.6.2.3 4.6.2.4 4.6.2.5 4.6.3 4.6.3.1 4.6.3.2 4.6.3.3 4.7 Section 4 MMU Functional Description Single-MMU Systems .............................................. Multiple-MMU Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MMU Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MMU Flow Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MMU Functional States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Reset State. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Idle State. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Normal Address Translation ..................................... Matching ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Successful Translation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Write Violation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . No Address Match ......................................... External Translation ........................................ External Write Violation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Undefined Segment Access ................................. MMUOperations ................................................... Operations Address Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Local Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interrupt Acknowledge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Read System Register ...................................... Transfer Descriptor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Write Segment Status Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Null Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Global Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Write System Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Load Descriptor Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Direct Translation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Operation Length Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 4-1 4-5 4-5 4-5 4-10 4-11 4-11 4-11 4-11 4-12 4-12 4-12 4-13 4-14 4-16 4-17 4-17 4-18 4-18 4-18 4-18 4-18 4-18 4-18 4-23 4-23 4-24 iv TABLE OF CONTENTS (Concluded) Paragraph Number Title Page Number 5.1 5.2 5.3 Section 5 Hardware Considerations MAS Timing Modes and Physical Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Physical Data Strobes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 6.2 6.3 6.4 6.5 Section 6 Software Considerations Segment Mapping Example ......................................... . Segmentation .................................................... . Virtual Memory Support ............................................ . Initialization Software .............................................. . Context Switching 7.1 7.2 7.3 7.4 7.5 Section 7 Electrical Specifications Maximum Ratings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Thermal Characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Power Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AC Electrical Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Electrical Characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 7-1 7-1 7-2 7-4 8.1 8.2 8.3 Section 8 Mechanical Data Ordering Information ............................................... Pin Assignments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Package Dimensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1 8-2 8-3 v 5-1 5-2 5-3 6-1 6-4 6-4 6-4 6-5 LIST OF ILLUSTRATIONS Figure Number Title Page Number 1-1 1-2 1-3 1-4 1-5 Simplified Block Diagram of Single-MMU System. . . . . . . . . . . . . . . . . . . . . . . Address Space of MC68000. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Memory Map of Typical Task Address Space. . . . . . . . . . . . . . . . . . . . . . . . . . . Schematic Diagram of Descriptor Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Functional Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 1-3 1-3 1-4 1-5 3-1 3-2 3-3 3-4 Programmer's Model ............................................... Schematic Logic of Address Matching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Schematic Logic of Physical Address Generation. . . . . . . . . . . . . . . . . . . . . . . . Address Space Table Organization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 3-2 3-3 3-5 4-1 4-2 4-3 4-4 4-5 4-6 4-7 4-8 4-9 4-10 4-11 4-12 4-13 Single-MMU System with MC68000 or MC6801O. . . . . . . . . . . . . . . . . . . . . . . . Using the MC68008 with the MMU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sample Circuit Diagram of a Two-MMU System with the MC68010 . . . . . . . . MMU Flow Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reset Flow Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Normal Translation Timing in a Two-MMU System. . . . . . . . . . . . . . . . . . . . . . Write Violation Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Undefined Segment Access Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Interrupt Acknowledge Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Read System Register Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Global Write Systems Register Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Successful Load Descriptor Operation in a Two-MMU System. . . . . . . . . . . . Timing for Successful Direct Translation in a Two-MMU System. . . . . . . . . . 4-2 4-3 4-4 4-6 4-10 4-13 4-14 4-15 4-19 4-20 4-21 4-22 4-25 5-1 5-2 5-3 Physical Address Strobe Generation .................................. Generation of Physical Read/Write and Physical Data Strobes . . . . . . . . . . . . Circuit to Inhibit Translation during lACK .............................. 5-2 5-2 5-3 6-1 6-2 Address Map Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Translation Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 6-3 7-1 7-2 7-3 7-4 Test Loads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Normal Translation Timing ........................................... Foldout 1 Operations Timing .................................................. Foldout 2 Miscellaneous Signal Timing ......................................... Foldout 2 vi LIST OF TABLES Table Number Title Page Number 3-1 Accumulator Assignments for Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5 4-1 4-2 Length of Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of MMU Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register/Operations Address Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9 4-16 4-17 4-3 vii/viii SECTION 1 INTRODUCTION The MC68451 memory management unit (MMU) provides address translation and protection for the 16 megabyte addressing range of the MC68000 MPU. Each bus master (or processor) in the M68000 Family provides a function code and an address during each bus cycle. The function code specifies an address space and the address specifies a location within that address space. The function codes distinguish between user and supervisor spaces and, within these, between data and program spaces. This separation of address spaces provides the basis for memory management and protection by the operating system. Provision is also made for other bus masters, such as the MC68450 DMAC, to have separate address spaces for logical DMA. A multitasking operating system is simplified and reliability is enhanced through the use of the MMU. Features of the MC68451 include: • • • • • • • • • • • • • • MC68451 F - Faster Translation Times Compatible with MC68000 and MC68008 Provides Virtual Memory Support for the MC68010 Provides Efficient Memory Allocation Separates Address Spaces of System and User Resources Provides Write Protection Supports Paging and Segmentation 32 Segments of Variable Size with Each MMU Multiple MMU Capability to Expand to Any Number of Segments Allows Inter-Task Communication through Shared Segments Quick Context Switching to Cut Operating System Overhead Simplifies Programming Model of Address Space Increases System Reliability DMA Compatible The MC68451 memory management unit (MMU) is the basic element of a memory management mechanism (MMM) in an M68000 Family system. The operating system is responsible for insuring the proper execution of user tasks in the system environment and memory management is basic to this responsibility. The MMM provides the operating system with the capability to allocate, control, and protect the system memory. A block diagram of a single-MMU system is shown in Figure 1-1. An MMM, implemented with one or more MC68451 MMUs, can provide address translation, separation, and write protection for the system memory. The MMM can be programmed to cause an interrupt when a chosen section of memory is accessed and can directly translate a logical address into a physical address making it available to the M PU for use by the operating system. Using these features, the MMM can provide separation and security for user programs and allow the operating system to manage the memory in an efficient fashion for multitasking. 1-1 I R/W R/W AS FCO-FC2 AS 3 I , Function Code Al-A23 r-MC68000/ MC68010 MPU IPL ~ BERR ~ iiiiAS FCO-FC2 Logical Address R/Vii Mapped Address Strobe ~ G ~ - Physical Addresses l\ PA8-PA23 \ PA1-PA23/ ~ MC68451 MMU V Memory Array iR'IT FAULT Al-A7 Figure 1-1. Simplified Block Diagram of Single-MMU System 1.1 MEMORY SEGMENTS The MMM partitions the logical address space into contiguous pieces called segments. Each segment is a section of the logical address space of a task which is mapped via the MMM into the physical address space. Each task may have any number of segments. Segments may be defined as user or supervisor, data-only or program-only, or program and data. They may be accessed by only one task or shared between two or more tasks. In addition, any segment can be write protected to insure system integrity. A fault (MC68000 bus error) is generated by the MMM if an undefined segment is accessed. 1.2 FUNCTION CODES AND ADDRESS SPACES Each bus master in the M68000 Family (including the MC68440 DMA controllers) provides a function code during each bus cycle to indicate the address space to be used for that cycle. The address bus then specifies a location within this address space for the operation taking place during that bus cycle. The function codes appear on the FCO-FC2 lines of the MC68000 and divide the memory references into two logical address spaces - the supervisor and the user spaces. Each of these is further divided into program and data spaces. A separate address space is also provided for internal CPUrelated activities such as interrupt acknowledge, giving a total of five defined function codes. The address space of the MC68000 is shown in Figure 1-2. In addition to the 3-bit function code provided by the MC680OQ, the MC68451 MMU also allows a fourth bit (FC3) which provides for the possibility of another bus master in the system. In this case, FC3 would be a function of bus grant acknowledge (BGACK) of the MC68000 to enable a second 1-2 Supervisor lACK n o User Data o FFFFFF Data FFFFFF Figure 1-2. Address Space of MC68000 set of eight function codes. This raises the total number of possible function codes to sixteen. If there is only one bus master (the MPU), the FC3 pin on the MMU should be tied low and only eight address spaces can then be used. 1.3 ADDRESS SPACE NUMBER Each task in a system has an address space which is comprised of all the segments defined for that task. This address space is assigned a number by programming all the address space number (ASN) fields in its descriptors with the same value. This value can be considered a task number. The currently active task's number is kept in the appropriate entry(s) in the address space table (AST). The AST is a set of MMU registers which defines which task's segments are to be used in address translation for each cycle type (supervisor program, supervisor data, etc). The AST contains an 8-bit entry for each possible function code. Each entry is assigned an ASN (task number) and this is used to select which descriptors may be used for translation. The logical address is then translated by one of these to produce the physical address. Figure 1-3 is a typical memory map of a task's address space. Supervisor lACK Program o User Data FFFFF ~ Task #01 o FFFFF Segment Figure 1-3. Memory Map of Typical Task Address Space 1-3 1.4 DESCRIPTORS Address translation is done using descriptors. A descriptor is a set of six registers (nine bytes) which describe a memory segment and how that segment is to be mapped to the physical addresses. Each descriptor contains base addresses for the logical and physical spaces of each segment. These base addresses are then masked with the logical address masks. The size of the segment is then defined by "don't cares" in the masks. This method allows segment sizes from a minimum of 256 bytes to a maximum of 16 megabytes in binary increments (i.e., powers of two). This also forces both logical and physical addresses of segment boundaries to lie on a segment size boundary. That is, a segment can only start on an address which is a multiple of 2k. The segments can be defined in such a way to allow them to be logically or physically shared between tasks. Descriptor mapping is shown schematically in Figure 1-4. o 1 of 32 Descriptors Logical Address Physical Address ~ 1 AST Function~ Code FFFFF Figure 1-4. Schematic Diagram of Descriptor Mapping 1.5 TRANSLATION During normal translation, the MMU translates the logical address provided by the MC68000 to produce a physical address which is then presented to the memory array. This is accomplished by matching the logical address with the information in the descriptors and then mapping it into the physical address space. A block diagram of the MC68451 MMU is shown in Figure 1-5. Refer to Figure 1-1 for the following. The logical address is composed of address lines A l-A23. The upper 16 bits of this address (A8-A23) are translated by the MMU and mapped into a physical address (PA8-PA23). The lower seven bits of the logical address (Al-A7) bypass the MMU and become the low-order physical address bits (PA1-PA7). In addition, the data strobes (UDS and LDS) remain unmapped to become the physical data strobes for a total of eight unmapped address lines. 1-4 FCO-FC3 Logical Address A8-A23 Cycle Address Space Number 1-----, R/W Address Address Space Space Mask Number 16 Logical Address Mask Logical Compare Range Match Space Match No Write Violation 1 of 32 Descriptors Physical Address Figure 1-5. Functional Block Diagram 1-5/1-6 Write Protect Bit SECTION 2 SIGNAL DESCRIPTION This section contains a brief description of the input and output signals. NOTE Throughout this document, active low signals are denoted by a superscript bar. This does not imply logical negation. To avoid confusion, a signal in its true state is said to be asserted whether that signal is active high or low. It is said to be negated when it is in its functionally inactive state. A signal which can be placed in the high-impedance state is said to be three-stated. A signal line which is first negated and then placed in the highimpedance state is said to be rescinded. Some MMU signal lines are classed as inputl output meani:-'~ that the bus buffers can be directed inward to input information into the MMU or outward to drive the bus. These signals must be either inputs or outputs at any given time, they may not be both. An example is the PAD port. Still other types of signals can logically be both inputs or outputs at the same time. The internal signal controller may assert or negate a signal and read it at the same time. To distinguish between them, the suffix "in" will be used to denote the input signal and the suffix "out" will be used for the output signal. Six pins on the MMU have this property - IRO, FAULT, MAS, GO, ANY, and ALL. In a multipleMMU system, they would be wired in parallel to provide a single-signal level for the entire system. Of these, three pins - IRO, FAULT, and ANY - are active low, wire-OR type signals. As such, asserting anyone of the parallel pins will drive the line low (true). If any of these signals are asserted on any MMU in the system, they will be detected as asserted on the corresponding "in" pin of all MMUs in the system. The ALL pin is an active-high open-drain gate and, as such, all pins are wire-ANDed and must be pulled high in order for the input to be high. Therefore, even if ALLout is asserted by an MMU, ALlin will not be detected true by any MMU unless all of the corresponding pins on all MMUs in the system are asserted. The GO and MAS pins are not open drain but they can be put in the high-impedance state. They should each be wired in parallel on all MMUs in the system since only one MMU at any given time will assert these signals. A pullup resistor is required to hold the Signal inactive when the pin is in the high-impedance state. 2.1 Vee AND GND These pins supply power to the MMU. The two are ground. Vee pins are + 5 volts ± 5% 2-1 and the two GND pins 2.2 CLOCK This TTL input signal must be the MC68000 system clock and must not be gated off at any time. 2.3 CHIP SELECT (CS) CS is an input used to activate the MMU for accesses to the registers and other MMU operations. The assertion of CS, in conjunction with the address of a global operation on pins RS1-RS5, selects the MMU to be a master for that operation. CS should be decoded from the physical address bus to protect the MMU registers from unauthorized access. See 4.6 MMU OPERATIONS. 2.4 REGISTER SELECTS (RS1-RS5) These five input pins should be the lower five bits of the physical address bus. When CS is asserted, these pins select the operation to be performed and the register involved (if any). See Table 4-3 for the operations address map. 2.5 READ/WRITE (R/W) The R/W input signal controls the direction of the data bus during an MMU operation. It is also used to compare against the matched descriptor to determine if a write violation has occurred during translation. 2.6 RESET Asserting the RESET input will reset the MMU regardless of what state it is in. The RESET pin must be held low for at least 16 clock cycles to reset the MMU. During power up, the RESET pin must be held low for at least 100 milliseconds after VCC is established and the clock signal is present. See 4.5.1 The Reset State. 2.7 DATA TRANSFER ACKNOWLEDGE (DTACK) The MMU uses this rescindable output to signal the completion of the operation phase of a bus cycle to the processor. If the bus cycle is a processor read, the MMU asserts DTACK to indicate that the information on the data bus is valid. If the bus cycle is a processor write to the MMU, DTACK is used to acknowledge acceptance of the data by the MMU. DTACK may be asserted only by an MMU that has CS or lACK asserted. 2.8 UPPER AND LOWER DATA STROBES (UDS, LOS) The UDS and LDS inputs are used during MMU operation (processor access of MMU registers) to indicate which byte of the data bus is to be used. The assertion of the upper data strobe indicates that the operation is to be performed at an even address using the upper byte of the data bus. The assertion of lower data strobe indicates that the operation is to be performed at an odd address using the lower byte of the data bus. During a processor write operation, the data strobes indicate to the MMU that valid data is on the data bus. 2-2 2.9 ADDRESS STROBE (AS) This input signal indicates to the MMU that a bus cycle is in progress, and that there is a valid address on the logical address bus. The assertion of AS initiates the normal translation phase of the bus cycle. 2.10 PHYSICAL ADDRESS AND DATA (PADO-PAD15) During MMU operations, these 16 multiplexed input/output pins function as the data bus used to transfer data to and from the MMU. During normal translation, the physical address PA8-PA23 is gated out on this bus. External octal data transceivers are used to isolate the system data bus from the physical address bus. The MMU provides the enable data (ED) signal to control these transceivers. See 2.11 ENABLE DATA for more detail. 2.11 ENABLE DATA (ED) The enable data Signal is a three-state output signal used to control the external bus transceivers on the PADO-PAD15 bus. When ED is asserted, the transceivers should be enabled (i.e., they should drive the bus). When ED is negated, the transceivers should be in the high-impedance state. R/W is used to control the direction of the transceivers. Only the MMU with CS or lACK asserted will assert ED. NOTE A pair of SN74LS245 type data transceivers may be used. ED will drive the output enable pin with no additional logic. See the circuit diagram in Section 4 (Figure 4-1). 2.12 HOLD ADDRESS (HAD) HAD is a rescindable output used to control an external latch on the physical address bus. After normal translation, HAD is asserted to hold the physical address stable. The latch should be of the transparent type such as an SN74LS373. HAD can directly interface with the enable pin of this type of latch. To provide address hold time, HAD is rescinded after MAS is rescinded. 2.13 MODE MODE is a three-level input used to program the mode of operation of the MAS signal. There are three modes of operation: A, S1, and S2. Mode A is selected by leaving the MODE pin unconnected. Mode S1 is selected by tying the MODE pin to VCC and mode S2 is selected by tying the MODE pin to ground. For description of the different modes, see SECTION 5 HARDWARE CONSIDERATIONS. 2.14 INTERRUPT REQUEST (IRQ) IRO is an open-drain input/ output signal. IROout is used to request an interrupt of the M PU. IROout is asserted if a descriptor in which the I (interrupt) bit is set, is matched in normal translation, and the interrupt enable (IE) bit in the global status register (GSR) is set. Clearing alilP (interrupt pending) bits in all segment status registers or clearing IE in the GSR will cause IRQ to be negated. If IRQin and lACK, and UDS and/ or LOS, are asserted, the MMU will perform an interrupt 2-3 acknowledge operation. See 4.6 MMU OPERATIONS. The IRO lines of all MMUs should be wireORed together and tied to VCC through a pullup resistor. They should be isolated from the IRO lines of other devices to prevent an MMU from detecting an erroneous interrupt. 2.15 INTERRUPT ACKNOWLEDGE (lACK) An MMU will begin the interrupt acknowledge operation if IROin and lACK are both asserted. The interrupt vector supplied by the interrupt vector register (lVR) is placed on the data bus for the MPU. Only one MMU should have its lACK pin tied to the lACK circuitry from the processor; all other MMUs should have this pin tied high (inactive). 2.16 FAULT FAULT is an open-drain input/output signal. During normal translation, if an MMU detects a write violation or an undefined segment access, it asserts the FAULT line for five clock cycles or until AS becomes negated, whichever is longer. If an MMU detects FAUL Tin asserted, it updates its global and local status registers to reflect this. The FAULT lines of all MMUs in the system should be wireORed and tied to VCC through a pullup reSistor. The FAULT signals can be connected directly to the MC68CXJO BERR pin but they should be isolated from any other bus error signals in the system to prevent the MMUs from detecting an erroneous FAULT. 2.17 FUNCTION CODES (FCO-FC3) The function code inputs specify the type of bus cycle being executed by the current bus master. The function code indicates which address space is to be used for that cycle and is used to index into the address space table for the cycle address space number used in descriptor matching. See 1.2 FUNCTION CODES AND ADDRESS SPACES. 2.18 ADDRESS BUS (A8-A23) These inputs are the upper 16 bits of the MPU address bus. They form the logical address which the MMU translates into 16 physical-address bits. The lower seven address lines (A 1-A7) bypass the MMU. 2.19 GLOBAL OPERATION (GO) GO is a rescindable input/ output inter-MMU Signal used in multiple-MMU systems to indicate or detect global operations. If CS is,asserted and the operation to be performed is global, the MMU is selected as the master MMU for that operation. GOout is then asserted by the master MMU to signal other MMUs that they are slaves in a global operation. Thus, if GOin is asserted while CS is negated, the MMU is selected as a slave for that operation. For a detailed description, see 4.6 MMU OPERATIONS. 2.20 ANY The ANY Signal is an open-drain input/output inter-MMU handshake signal for multiple-MMU systems. A slave MMU asserts ANYout during a global operation if it has a local event to report which is significant if it occurs in one, but not necessarily all, MMUs, The ANY pins are wire-ORed and require a pullup resistor to Vce. 2-4 2.21 ALL The ALL pin is an open-drain input! output similar to ANY except that it reports events that are significant only when they occur in all MMUs. The ALL pins are wire-ANDed together and require a pu"up resistor to Vcc. 2.22 MAPPED ADDRESS STROBE (MAS) MAS is a rescindable input/output signal. MASout is asserted by an MMU if an address match occurs during normal translation. This indicates that a valid physical address is present at the PADOPAD15 outputs. MASin is used by an MMU to detect a successful translation by another MMU. MAS can be programmed to operate in an asynchronous or synchronous mode by the MODE pin. 2.23 WRITE INHIBIT (WIN) WIN is a rescindable output provided to protect write-protected segments during read-modify-write bus cycles. Norma"y, write-protected segments are protected by the assertion of FAULT and the withholding of MAS upon detection of an attempted write to that segment. However, during readmodify-write bus cycles, AS remains asserted, making it difficult to prevent the write portion of the instruction from writing to the protected segment. To proviae write protection during these instructions, WIN should be included in the decoding of the physical data strobes. See 5.2 PHYSICAL DATA STROBES. WIN is asserted with MAS each time a write-protected segment is accessed, whether the access is a read or a write. NOTE In multiple-MMU systems, MAS, HAD, WIN, FAULT, DTACK, ED, and GO should be connected in para"el to their respective pins on a" MMUs. Each should be tied to VCC through a pu"up resistor to insure that the signal is negated while the pin is in the highimpedance state. 2-5/2-6 SECTION 3 REGISTER DESCRIPTION Figure 3-1 shows a programmer's model of the MMU. The MMU registers consist of two groups: the descriptors and the system registers. Each of the 32 descriptors is nine bytes long and defines one memory segment. See 3.1 DESCRIPTORS. (a) Descriptors (32) I • •• I I Logical Base Address Logical Address Mask Physical Base Address Address Space Number Address Space Mask f.---8 Segment Status Register Bits---J~~I.II(--8 _--------=J ----- --I.-- -- Segment Status Register u I I II liP 1M lwpi I E .-"",,-- 8;15--1 (b) System Registers Address Space Table Accumulator ~8 Bits----+-! Address ASTO $0 AST1 $2 AST2 $4 AST3 $6 Logical Base AddresslTranslation Register AC1 AC2 Logical Ad.dress Mask AC3 AC4 Physical Base AddresslTranslation Register AC5 Address Space Number Address Space Mask AST5 $8 ACS $A AST6 $C ASTl $E AST8 $10 AST9 $12 $14 AST11 $16 AST12 $18 AST13 $lA AST14 $lC AST15 $lE Segment Status Register AC7 Miscellaneous Registers 7 6 5 Descriptor Pointer AST10 8Bits~ ACO AC6 AST4 _I. f.--8Bits Interrupt Vector Register IV7 IV6 Global Status Register F OF Local Status Register L7 L6 Interrupt Descriptor Pointer Result Descriptor Pointer IV5 4 3 DP4 DP3 IV4 IV3 o 2 DP2 IV2 Address DP1 DPO $29 IV1 IVO $2B IE $20 L4 RW GAT GAL LIP $2F NVI 14 13 12 11 10 $39 NVR R4 R3 R2 R1 RO $3B L5 Figure 3-1. Programmer's Model 3-1 In the following discussion, a segment access is defined as a successful match occurring on a segment during normal translation. The system registers contain both information local to the MMU and information global to the MMM. Each bit in the system registers and the segment status registers, except the address space table, is one of four types: Control Control bits can be set or cleared by the MPU to select MMU options. These are read/write bits. Status Alterable SA bits are set or cleared by the M MU to indicate status information. These are also read/write bits. Status Unalterable SU bits are set or cleared by the MMU to reflect status information. These bits cannot be written by the MPU. Reserved bits are reserved for future expansion. They cannot be writReserved ten and are zero when read. The system registers are all directly addressable from the physical-address space. Accessing registers causes certain operations to be performed. See 4.6.1 Operations Address Map for the locations of system registers. The descriptors are not directly addressable, but are accessed using the descriptor pointer and the accumulator. 3.1 DESCRIPTORS Each M M U contains 32 descriptors (0-31), each of which can define one memory segment. A descriptor is loaded by the MPU using the accumulator and descriptor pointer with a load descriptor operation. The segment status register (SSR) can be written to by the MPU indirectly using the descriptor pointer. Each descriptor consists of the following registers. 3.1.1 Logical Base Address (LBA) The LBA is a 16-bit register which, together with the logical address mask (LAM), defines the logical addressing range of a segment. This is typically the first address in the segment, although it can be any address within the range defined by the LAM. 3.1.2 Logical Address Mask (LAM) The LAM is a 16-bit mask which defines the bit positions in the LBA which are to be used for range matching. Ones, in the mask, mark significant bit positions while zeroes indicate "don't care" positions. A range match occurs if, in each bit position in the LAM which is set to one, the LBA matches the incoming logical address. The matching function is depicted schematically in Figure 3-2. LAin) - - - 4 Matchln) LAMln) LBAln) Figure 3-2. Schematic Logic of Address Matching 3-2 3.1.3 Physical Base Address (PBA) The PBA is a 16-bit address which, with the LAM and the incoming logical address, is used to form the physical address. The logical address is passed through to the physical address in those bit positions in the LAM which contain zeroes (the "don't cares") and the PBA is gated out in those positions which contain ones. A schematic representation of the physical address generation mechanism is shown in Figure 3-3. LA(n) -~-----1 LAM(n) PAIn) PBA(n) ----~ Figure 3-3. Schematic Logic of Physical Address Generation 3.1.4 Address Space Number (ASN) The ASN is an 8-bit number which, together with the address space mask, is used in detecting a match with the cycle address space number. 3.1.5 Address Space Mask (ASM) The ASM is an 8-bit mask which defines the significant bit positions in the ASN which are to be used in descriptor matching. As in the LAM, the bit positions which are set are used for matching and the bit positions that are clear are "don't cares". A space match occurs if, in the significant bit positions, the cycle address space number matches the AS N. Address space matching is schematically similar to logical address matching as shown in Figure 3-2. 3.1.6 Segment Status Register (SSR) Each descriptor has an 8-bit SSR. The SSR can be written to in two ways: using the load descriptor operation or indirectly using the descriptor pointer in a write status register operation. Each bit is labeled as control or status alterable. Bits 5 and 6 are reserved for future use. 7 Iu I U 6 5 4 3 2 1 0 Addressed indirectly through I I I IP I M I wp I E I the descriptor pointer U (used) is set by the MMU if the segment was accessed since it was defined. This bit is status alterable. Set: a) By a segment access (successful translation using the segment) b) By an MPU write of "1" Cleared: a) Reset (in segment #0 of master) b) MPU write of "Oil If the I (interrupt) control bit is set, an interrupt is generated upon accessing the segment. Set: a) MPU writes a "1" Cleared: a) MPU writes a "0" b) Reset (segment #0 of master) 3-3 IP IP (interrupt pending) is set if the I bit is set when the segment is accessed. IROout is asserted if an IP bit, in one or more SSRs, is set and IE in the global status register (GSR) is set. IROout is negated when all the IP bits in all SSRs are clear or IE is cleared. IP is status alterable and should be cleared by the interrupt service routine. Set: a) Segment access and I is set b) MPU writes a "1" Cleared: a) MPU writes a "0" b) Reset (in segment #0 of master) c) E bit is a "0" M The M (modified) bit is set by the MMU if the segment has been written to since it was defined. The M bit is status alterable. Set: a) Successful write to the segment b) MPU writes a "1" Cleared: a) MPU writes a "0" b) Reset (segment #0 in master) WP If the WP (write protect) control bit is set, the segment is write protected. A write access to the segment with WP set will cause a write violation. Set: a) MPU writes a "1" Cleared: a) MPU writes a "0" b) Reset (segment #0 in master) E E (enable) is a control bit which, when set, enables the segment to participate in the matching process. E can be cleared (the segment disabled) by a write to the SSR, but a load descriptor operation must be performed to set it. Set: a) Load descriptor operation with AC7, bit #0 set b) Reset (segment #0 in master) Cleared: a) MPU writes a "0" b) Unsuccessful load descriptor operation on this descriptor c) Load descriptor operation with AC7, bit #0 cleared 3.2 SYSTEM REGISTERS The system registers consist of the address space table, accumulator, and miscellaneous registers which include global status register, local status register, descriptor pointer, result descriptor pointer, interrupt descriptor pointer, and interrupt vector register. Each of these registers is described below. 3.2.1 Address Space Table (AST) Each MMU has a local copy of the AST. This table is organized as 16 8-bit, read/write registers located at even byte addresses starting at address $00. Each entry is programmed by the operating system with a unique address space number, each of which is associated with a task. During a memory access, the MMU receives a 4-bit function code (FCO-FC3) which is used to index into the AST to select the cycle address space number. This number is then used to check for a match with the ASN in each of the 32 descriptors within the MMU. 3-4 The MC68000 MPU and the MC68450 DMAC only provide a 3-bit function code, FCO-FC2. In a system with more than one bus master, the BGACK signal from the MPU could be inverted and used as FC3. This would result in the AST organization shown in Figure 3-4. FC1 o o FCOf+8 Bits...j 0 ASTO 1 AST1 User Data o AST2 User Program 1 o o AST3 0 AST4 1 AST5 Supervisor Data o AST6 Supervisor Program ASTl Interrupt Acknowledge 1 o o o o o AST8 o ASTlO AST9 1 AST11 0 AST12 o AST14 AST13 AST15 Figure 3-4. Address Space Table Organization 3.2.2 Accumulator (ACO-ACS) The accumulator (shown in Figure 3-1) is used to access the descriptors, perform direct translation, and latch information during a fault. The accumulator consists of nine 8-bit registers located at byte addresses from $20 to $28. The register assignments for each operation in which it participates is shown in Table 3-1. Table 3-1. Accumulator Assignments for Operations Register Assignment Load/ Read Descriptor Direct Translation Normal Translation (Fault) Address ACO Logical Base Address (MSB) Logical Translation Register (MSB) Logical Address (MSB) $20 ACl Logical Base Address (LSB) Logical Translation Register (LSB) Logical Address (LSB) $21 AC2 Logical Address Mask (MSB) $22 AC3 Logical Address Mask (LSB) $23 AC4 PhYSical Base Address (MSB) Physical Translation Register (MSB) AC5 Physical Base Address (LSB) Physical Translation Register (LSB) AC6 Address Space Number (ASN) Address Space Number (ASN) $24 $25 Cycle Address Space Number (CASN) $26 AC7 Segment Status Register (SSR) $27 AC8 Address Space Mask (ASM) $28 3-5 3.2.3 Global Status Register (GSR) The GSR is an 8-bit register used to reflect faults and to enable interrupts from an MMU. All MMUs maintain identical information in their GS Rs. Bits 1, 2, 3, 4, and 5 are reserved for future use. The organization of the GSR is shown below. The GSR is located at address $2D. 7 GSR 6 5 4 3 I F I OF I I I I I oIE I $20 Address 2 F F (fault) is a status alterable bit that is set by the MMU whenever FAOTIin is detected. Clearing the F bit automatically clears bits L4-L7 in the local status register. Set: a) Write violation detected in this MMU b) FAUL Tin detected c) ALlin detected (undefined segment access) d) MPU writes a "1" Cleared: a) Reset asserted b) M PU writes a "0" OF OF (double fault) is set if a FAUL Tin signal was detected with F set. OF is a status alterable bit. Set: a) Fault occurs and F was previously set b) MPU writes a "1" Cleared: a) Reset b) M PU writes a "0" IE If IE (interrupt control bit. Set: a) Cleared: a) b) enable) is set, the interrupt-request line is enabled. This is a read/write MPU writes a "1" Reset M PU writes a "0" 3.2.4 Local Status Register (LSR) The LSR is an 8-bit register which reflects information local to its MMU. The LSR can be globally written but the GAL, GAT, and LIP bits will not be affected. L4-L7 are cleared if F in the GSR is cleared on reset. The organization of the LSR is shown below. The LSR is located at address $2F. 7 LSR 6 5 I L7 I L6 I L5 4 3 2 1 0 I L4 I RW IGATI GALl LIP I ~2dFdress RW RW is a status alterable bit which reflects the state of the R/W pin at the time FAUL Tin is asserted. Set: a) MPU writes a "1" b) When fault occurs during read of segment Cleared: a) Reset b) MPU writes a "0" c) When fault occurs during write of segment GAT GAT (global accumulator for translate) is set by the MMU if ACO, AC1, and AC6 are globally consistent. See 4.5.3 Global Operations. Set: a) If ACO, AC1, and AC6 are globally consistent (they were last modified as a result of a global write) 3-6 Cleared: a) b) Reset If ACO, AC1, and AC6 are not globally consistent GAL GAL (global accumulator for load) is set if ACO, AC1, AC2, AC3, AC6, and AC8 are globally consistent. Set: a) If ACO, AC1, AC2, AC3, AC6, and AC8 are globally consistent Cleared: a) Reset b) If ACO, AC1, AC2, AC3, AC6, and AC8 are not globally consistent LIP LI P (local interrupt pending) is set if one or more descriptors have IP set in their segment status registers. Set: a) If IP is set in any descriptor Cleared: a) Reset b) If all IP bits are clear L4-L7 The status information encoded in L4-L7 reflects the status of the MMU after the last event (an operation or fault). These bits are encoded and changed as a unit. They are cleared whenever the F bit in the GSR is cleared and are alterable by the MPU. L7 L6 L5 L4 a a a a NO The MMU was not the source of the last event. a a a OT A direct translation was locally successful. A match was found in one of the MMU descriptors. LO A load descriptor fault occurred. A previously defined descriptor conflicts with the descriptor being loaded. a a a a a a USA An undefined segment access was attempted. The logical address was not matched in any descriptor in the MMM. WV A write violation occurred. A segment defined in the MMU was write protected and a write to that memory segment was attempted. The NVR bit in the ROP will show whether the USA or WV occurred in the MMU. See 3.2.6 Result Descriptor Pointer (RDP). Set: a) b) Cleared: a) b) c) d) Various bits set if OT, LO, USA, or WV occur MPU writes a "1" Reset MPU writes a "0" When F bit in GSR is cleared If MMU was not the source of the last event (NO) 3.2.5 Descriptor Pointer (DP) The OP is an 8-bit read/write pointer register located at address $29. The five low-order bits identify the descriptor to be used in the load descriptor, read segment status (transfer descriptor), and write segment status operations. Bits 5, 6, and 7 are reserved. 3-7 The DP is initialized to $00 on reset. It can be globally written by the MPU. The DP is loaded by the MMU with the number of the descriptor matched in a direct translation operation to allow a subsequent transfer descriptor operation to load the match descriptor into the accumulator. See 4.6.3 Global Operation and 4.6.3.3 Direct Translation. 76543210 DP I I DP41 DP31 DP21 DPl I DPO I ~~dress 3.2.6 Result Descriptor Pointer (RDP) The RDP is an 8-bit, read-only register that identifies a descriptor involved in the following events: a write violation, a load descriptor failure, or a direct translation success. The RDP is loaded from a priority encoder which determines the highest priority descriptor involved. For example, in a load descriptor operation, more than one descriptor currently in the MMU may collide with the descriptor being loaded. Only the number of the highest priority descriptor will be loaded into the RDP. Descriptor 0 is considered to be the highest priority and 31 is the lowest. The RDP bit assignments are shown below. Bits 5 and 6 are reserved. The RDP is initialized to $80 on reset. The RDP is located at address $3B. 7 6 RDP INVRI NVR 5 I 4 3 2 lOA I R41 R31 R21 Rl I RO I $:tess If no descriptor is selected by the priority encoder when the RDP is loaded, NVR (no valid result) is set; otherwise, it is cleared. This bit is status unalterable. Set: a) Reset b) No result from WV, LD, or DT Cleared: a) AWV, LD failure of DT success in MMU RO-R4 RO-R4 encode the number of the descriptor selected by the priority encoder. 3.2.7 Interrupt Descriptor Pointer (IDP) The IDP is an 8-bit read-only register that is read to determine which descriptor caused an interrupt. Each time it is read, the IDP is loaded from the priority encoder with the highest-priority descriptor which has IP set in its SSR. If no descriptor has IP set, the no valid interrupt (NVI) bit is set. See 4.6.2.1 Interrupt Acknowledge. The bit IDP assignments are shown below. Bits 5 and 6 are reserved. The IDP is located at address $39. 7 IDP I NVII 6 5 3 2 114 113 4 I 12 1 111 o 10 I $39 Address NVI NVI is set if no descriptor has IP set; otherwise, it is cleared. 10-14 These bits encode the number of the descriptor selected by the priority encoder. 3-8 3.2.8 Interrupt Vector Register (IVR) The IVR is an 8-bit read/write register containing the interrupt vector. Its contents are placed on the data lines, 00-07, during the interrupt acknowledge operation to provide the processor with a vector number. The iVR is initialized to $OF (the MC68000 uninitiaiized-device vector numberi on reset. The IVR is located at address $28. 76543210 IVR I IV? IIV611V511V411V3 IIV2 IIV1 I Iva 3-9/3-10 I ~d:ress SECTION 4 MMU FUNCTIONAL DESCRIPTION 4.1 SINGLE-MMU SYSTEMS The memory management mechanism can be comprised of one or more memory management units. Implementing memory management using the MC68000 or MC68010 MPUs and a single MC68451 is straightforward. Two SN74LS245 type bidirectional buffers are needed to demultiplex the physical address/ data port (PADO-PAD15). These are directly controlled by the enable data (ED) and read/write (R/W) lines. Two SN74LS373 type transparent latches are used to latch the translated address when the PAD port is needed to transfer data to or from the MPU. These latches are controlled by the hold address (HAD) line. A circuit diagram of a single-MMU system is shown in Figure 4-1. The MMU may also be used with the MC68008 8-bit data bus version of the MC68000. This requires only a few gates to synthesize the upper and lower data strobe signals (UDS and LOS) from address line AO and data strobe (oS) on the MC68008. Since there is only one data strobe in an MC68008 system, the physical data strobe generation is somewhat simpler; otherwise, the circuit is identical to that of the MC68000 system. A circuit diagram of a single-MMU system using the MC68008 MPU is shown in Figure 4-2. 4.2 MULTIPLE-MMU SYSTEMS If more than 32 descriptors are needed for performance enhancement reasons, multiple MMUs may be configured in a system. The number of MMUs that can be used is not logically constrained. In practice, buffer drive limitations limit the number to six MMUs without using additional external buffering. A circuit diagram showing two MC68451s in a system with the MC68000 or MC68010 is shown in Figure 4-3. Notice that the data buffers and address latches are shared by both MMUs and need not be duplicated. The GO, ANY, and ALL lines are bused together to provide the inter-MMU handshake necessary for the global operations as outlined below. Notice that only one of the MMUs is chip-selected on RES ET. This selects the master out of reset. For more information refer to 4.5.1 The Reset State. In order to perform its operations, some of the information in MMU registers must be global. That is, it must be duplicated in all the MMUs in the system. For example, the address space table must be global to insure that the address space numbers are common to all MMUs. To allow this, certain operations are defined as global. Any system register that can be written, is written globally. This includes the accumulator, the address space table, the descriptor pointer, the interrupt vector register, the global status register, and the local status register. The result descriptor pointer and the interrupt descriptor pointer are read only and, therefore, are local and not global. 4-1 R/W ... 3 FCO-FC2 A8-A23 r.: .. AS A1-A7 . M C68000I MC6801 0 MPU +5V", +5V~ DTACK BERR ~ LDS HAD AS PADO-PAD15 RS1-RS5 WlN MAS cs IRQ GO ANY +5V? i3ERR ~ ED A8-A23 DTACK FAULT RESET T I T +5V r-. ' ... )+5V ~ : P' 1 System UDS R/W~ FCO-FC2 FC3 PLDS~ LDS PUDS ~ UDS I ... '" .. T T ~ DO-D15 I~ ,.. DO-D15 rDIR SN74LS245\ 1E (X2) .. ~ T~ Memoryl Peripherals PUDS PDS Generator 'i lLDS lJ!5S ill I R/W DO-D15 AS ? 1 PUDS ~ PLDS PLDS PAS Generator PAS RESET IPLO ~ IPL1 I- SN74LS148 Priority Encoder ............. G I- .. IPL2 I- BGACK FrOmSystem~ System Reset>------- AS~ _ _ UDSILDS \ , PUDS/PlDS HAS ___ --./'-------- ~ __ _ --.I ~ --.J-.- - - - HAD PADO-PAD15 IRQ __ I '--__ ( r--- -C =::)>-------- - ----------- ---------- -- ----------GO All -------- -- -- ----------- ------------------------------- -- ----------- ---v DO-D15 R/W - - - - -C ===:)>----- --------------------------- It L MPU Recogo;,,, DTACK, End Cycle MMU Places Vector Number on PADO-PAD15 ED Asserted to Turn on Data Buffers L . . - - - - - - - - I A C K Asserted, MMU Begins Operation Figure 4-9. Interrupt Acknowledge Timing 4-19 CLK 1JU1IUUUl ru U UUUUU1J1J1JU1 ------,.))0------------<~----- -- -- ----""")------) -- ------- -- - ~------- FCO-FC3 --{ "". A1-A23 ""._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _J AS ~ __________ I ~-/, - - - - ~-----I ~----I I PADO-PAD15 ----f( '--------}- - -C ___) >------ CS~ I _ _ _ _ __ ------------ ------------------------ED ALL / ' - _ _- - o J ---------------- -----------------------------------------------------------~ DO-D15 ------C = )r------ ---------------- ------------------------ t~~ LL;= MMU Asserted DTACK to End Read Cycle Data from Register is Placed on PADO-PAD15 Bus Data Buffers are Enabled Address is Translated, ES is Asserted, and Operation is Decoded from RS1-RS5 Figure 4-10. Read System Register Timing 4-20 01234wwwwwww FCO-FC3 ww ww www ww ww56789 --{ '-;::::=::::=::::=:::== A1-A23 -1\-_________ AS\ __--'I ___......J,r--- UDS/LDS \~_________ PUDS/PLDS \ ...._______ _~I \~_ __ ~ MAS I HAD~ PADO-PAD15 (}-- CS(MMU1) ~ =========~}-- --{ I J GO (MMU1) ill (MMU1) J ALLout (MMU1) ---F ALLout (MMU2) '-l~ __________ JL ALL ANY DTACK ~ 00-015 {...._________ R/W ~\-_ _ _ _ _ _ __ L L DTACK A"Orted by Master (MMU1) Operation Ends ALL Negated, GO Negated MMU2 Accepts Data, Asserts ALL (MMU2), ALL Asserted ' - - - - - - MMU1 Accepts Data, Asserts ALL (MMU1) MMU1 Asserts GOout to Become Master MMU2 Receives Min to Become Slave ES on MMU1 is Asserted Figure 4-11. Global Write Systems Register Timing 4-21 The MMU which has CS asserted becomes the master by asserting GOout. The other MMUs detect GOin and become slaves. Each MMU transfers the data on the data bus to the selected register. If the write is to a byte of the accumulator, that register is marked as global. If F is cleared in the GSR, L4-L7 are also cleared. When the transfer is completed in each MMU, each will assert ALLout. After all MMUs have asserted ALLout, ALlin will be true and, upon detecting ALlin, the master rescinds GO. 4.6.3.2 LOAD DESCRIPTOR OPERATION. Descriptors are loaded by transferring the contents of the accumulator to the descriptor after performing global checks for collisions. A collision exists when two or more enabled descriptors are programmed to translate the same logical address. To prepare for descriptor loading, the accumulator must be loaded globally with the LBA, LAM, ASN, and ASM as described in 3.2.2 Accumulator. To make global collision checks, ACO, AC1, AC2, AC3, AC6, and AC8 must have been globally loaded. If they are, the global accumulator for load (GAll bit in the LSR of each MMU is set. To initiate the operation, a read from address $3F is done. If the load is successful, the data bus will be set to $00. If a collision is found, the load is unsuccessful and the data bus is set to $FF. During the load descriptor operation, the MMU with CS asserted becomes the master by asserting GOout. The other MMUs detect GOin and become slaves. The slave MMUs decode the operation from RS1-RS5, R/W, and the data strobes (UDS, LDS). The descriptor whose number is in the descriptor pointer is disabled (its E bit is cleared) so that it cannot cause a collision. If the GAL bit in the LSR of a slave is clear, L4-L7 is encoded to indicate LD and ANYout are asserted. If GAL is set, the slave checks the enabled descriptors against its accumulator for collisions. If a conflict is found, the slave asserts ANY out and loads its RDP with the number of the descriptor which caused the collision. If no collision is detected, L4-L7 are cleared. When GOin is detected, ALLout, and ANYout are negated and the operation ends. The master aborts the transfer if there is a local descriptor conflict, if the GAL bit is clear, or if ANYin is asserted. If the failure was not local, L4-L7 are cleared. Otherwise, L4-L7 are encoded with LD and ANY out is asserted by the master. The master then puts $FF on DO-D7 to indicate failure to the MPU, negates ALLout and ANYout, and rescinds GOout. When ANYin is negated, the operation is terminated. If there were no local collisions, the GAL bit of the slave is set, and ALlin is asserted, the master completes the transfer and enables the loaded descriptor. It then puts $00 on DO-D7 to indicate success, clears L4-L7, negates ALLout, and rescinds GOout. The example timing diagram in Figure 4-12 shows a successful load descriptor operation in a two-MMU system. 4.6.3.3 DIRECT TRANSLATION. The memory management mechanism can be used to directly translate the logical address into a physical address and make it available to the processor in the accumulator. The logical address to be translated is globally loaded into ACO-AC1 and the ASN to be used is loaded into AC6. Translation is initiated with a read from the address $3D. 4-22 CLK FCO-FC3 A1-A23 AS l.fUUUlJ1J1 ill U UU U UU UUl.IUlJlJ ~'----------------}-_______ _ _ _ _ _ _ _ _.1. --( ~ ~ ~ ~ ===== -----.r}-_____ _____ -----.r_____ -----.r- _____ -------.r- '--______ PADO-PAD15 CS MMU1 GO MMU1 E6 MMUl ALLoutMMU1 ALLout MMU2 ALL ANYoutMMU1 ANYout MMU2 ----« )- - - - -C r = }-- ~-----~ "- ___ J "- ____ -------.r- ------_/-'-----~--r--~ _____ .---l'- ____ ---------- - - - -- - - - - --- ---------- ---------- - - - -- - - - - --- --------- ---------- - - - -- - - - - - - - - - - - - - - - - -----~ 00-015 R/W ----C==== - - - - - - - - - --- -- - - - - --- }- --------- t l tMaster jMMU1) Asserts DT ACK to End Cycle. Slave (MMU2) Negates ALL Master Negates GO to Signal End of Operation to Slave Master Negates ALL, Places $00 on PADO-PAD15 to Show Success Slave (MMU2) Asserts ALL to Show no Collision Master (MMU1) Asserts ALL to Show no Collision MMU1 Asserts GO causing MMU2 to Become Slave. Load Descriptor Operation is Decoded from RS1-RS5 and Data Strobes. MMUl Translates Address and CS is Asserted Causing it to become Master. Figure 4-12. Successful Load Descriptor Operation in a Two- MMU System 4-23 If the translation is successful, the OP and ROP point to the descriptor which performed the translation and the physical address is loaded into AC4-AC5. The processor reads $00 from the data bus. If the logical address could not be translated because it was globally undefined, the data bus is set to $FF to indicate the failure. Using AC6 to supply the cycle address space number, each MMU attempts to match the logical address contained in ACO-ACl with one of its enabled descriptors. Each MMU must have the same information in ACO, AC1, and AC6. The GAT (global accumulator for translation) bit in the LS R is set if these registers have each been globally loaded. If a match is found, and GAT is set, the physical address is formed as in normal translation and put into AC4-AC5. The ROP and OP are loaded from the priority encoder and L4-L7 are encoded to indicate direct translation (OT). The master puts $00 on 00-07 to signal that the translation was successful, and rescinds GO to terminate the operation. If no match is found, or GAT is cleared, the MMU asserts ALLout and L4-L7 in the LSR are cleared. The master monitors ANYin and ALlin. If ANYin becomes asserted, then another MMU performs the translation. The master puts $00 on 00-07 to indicate success, negates ALLout, and rescinds GOout. It waits until ANYin is negated before terminating the operation. If ALlin becomes asserted, then none of the MMUs performed the translation. The master puts $FF on 00-07 to indicate failure, negates ALLout, and rescinds GOout to terminate the operation. Each slave MMU negates ANYout and ALLout when the master MMU rescinds GO at the end of the operation. 4.7 OPERATION LENGTH TABLE The length of each operation, in system clock periods, is given in Table 4-1. The table includes operation lengths for both the single MMU case and for the multiple MMU situation. Both minimum and maximum numbers are given. Each operation is measured from the assertion of CS to the assertion of OTACK. The minimum number is derived from "ideal" conditions. Each signal is assumed to appear at precisely the right time to be used internally for the optimum speed of the operation. Parametric timing diagrams are given in Figures 7-2, 7-3, and 7-4. These should be used for system hardware design considerations. The flow diagram (Figure 4-4) should be used for debugging multiple-MMU systems. The example timing diagram in Figure 4-13 shows a successful direct translation operation in a twoMMU system. 4-24 CLK FCO-FC3 UlJUU1JlJl ru UUU U UU lIUlJUlJU -------->-===== >-- --<------ -- - - - - - - - ---- '-. Al-A23 --< --- . AS~ _ _ _ _ _ ~ ~-----~ L _____ ~ ~-----~ '- ______, PAOO-PA015 CS MMU1 GOMMU1 ~C)- - ALLoutMMU2 ALL ANYout MMU1 ANYout MMU2 -c ==_----'>-- '--______ "'- ___ f I "'-----~ EO MMU1 ALLoutMMU1 r ---------- --- -- ---- - - - - - - - - - - - - - - ~ ______ --------- - - - --- ./---~ -- - - - -------- -\r-- ---------- --- -- - - - - - - - - --------- -\{------~ 00-015 R/W ----C==== - - - - - - - - - - -- - - - - }- --- -------- t l L Slave (MMU2) Negates ALL, Ends Operation, Master (MMU1) Asserts DTACK to End Cycle Master Negates GO to Signal End of Operation Slave (MMU2) Can't translate Asserts ALLout Master (MMU1) Translates Logical Address, Asserts ANY out to Show this, Places $00 on PADO-PAD15 Bus to Show Success MMU1 Asserts GOout to Become Master, Asserts ill to Turn on Data Buffers MMU1 is Chip Selected, Decodes Operation (Direct Translation) Figure 4-13. Timing for Successful Direct Translation in a Two-MMU System 4-25/4-26 SECTION 5 HARDWARE CONSIDERATIONS 5.1 MAS TIMING MODES AND PHYSICAL ADDRESS The mapped address strobe (MAS) signals that a valid translated address is present on the physical address bus. It should be included in the generation of the physical address strobe (PAS) which is then used to gate the memory decode circuitry. AS is also included in the PAS to effect a quick release of the bus at the end of a cycle. MAS can be programmed with the MODE pin in three modes: Mode A MAS is asserted asynchronously. MAS is asserted as soon as a match for the function code and logical address is found, except in the case of a translation following an MMU operation. In this case, MAS will be asserted as described in Mode S2 below. Two circuits for generating physical address strobe are shown in Figure 5-1 (a) and Figure 5-1 (bl. The circuit in Figure 5-1(a) uses a delay element to delay MAS to produce PAS. The delay time should be equal to the delay from MAS to PADO-PAD15 valid plus the desired setup time for physical addresses required by the user's bus. This circuit should be used when the setup time for physical addresses to PAS must be greater than parameter 13. Since the setup time from PADO-PAD15 to MAS valid (parameter 13a) may be negative, the delay element must allow for this setup time as well as the setup required by the user's physical address bus. The circuit shown in Figure 5-1 (b) uses a delay element to delay AS to produce PAS. The delay value must be equal to the AS to PADO-PAD15 translation time plus the setup required for the user's bus. This circuit should be used when the setup time for physical addresses can be equal to or less than parameter 13. This is because the MAS strobe will be delayed until the next falling edge of the clock when the previous cycle was an MMU operation. This assures a positive address setup time equal to the setup time from PADO-PAD15 to MAS asserted valid in mode S2 (parameter 13), This method is preferred if the setup time given in parameter 13 is sufficient for the user's bus since it does not require the additional delay of PAS due to the delay time of PADO-PAD15 to MAS valid. In either case, the translation time will be longer for translations following an MMU operation. See length of operations in Table 4-1 for more information. Mode S1 MAS is asserted on the first rising edge of CLOCK after the physical address if valid. This mode was intended to allow the generation of PAS by ORing AS and MAS. MAS asserts PAS and AS negates it to release the bus quickly at the end of the cycle. A circuit to generate PAS using MAS in mode S1 is shown in Figure 5-1(c). 5-1 Mode S2 MAS is asserted on the first falling edge of CLOCK after the address is valid. This mode was intended to allow the generation of PAS using AS and MAS only. A circuit to do this is shown in Figure 5-1 (c). la) Asynchronous Mode, Method 1 Ib) Asynchronous Mode, Method 2 M:: ____________~PAS Ie) Synchronous Modes Figure 5-1. Physical Address Strobe Generation 5.2. PHYSICAL DATA STROBES The physical data strobes, physical upper data strobe (PUOS), and physical lower data strobe (PLOS), should be generated using UOS or LOS gated with MAS, WIN, and R/W. WIN and R/W will prevent the data strobes from being asserted during the write portion of and read-modify-write cycle on a write-protected segment. MAS is included to prevent data strobes from being asserted on a write cycle of a write-protected segment. A circuit to generate physical data strobes is shown in Figure 5-2. Three-state buffers are used to allow access from the physical bus by an external processor. +5V UDS - - - - - - + - - - 1 LOS - - - - - - - - - / MAS--------------~~ LDS (MMU) UDS (MMU) Figure 5-2. Generation of Physical Read/Write and Physical Data Strobes 5-2 5.3 INTERRUPTS When the MC68000 responds to an interrupt, it places the interrupt acknowledge (lACK) function code on FCO-FC3 and the level of the interrupt to which it is responding on the address lines A l-A3. This is not a true memory access, but the MMU must translate it since AS is asserted. To prevent the MMU from attempting to translate an address during an interrupt acknowledge cycle, the MASin signal is forced low. This informs the MMU that the cycle was translated by another MMU. However, the MMU will still assert ALLout to show that it could not translate the address. To prevent ALlin from being asserted and causing a fault, ALL must also be forced low. A circuit to do this is shown in Figure 5-3; however, it is acceptable to dedicate a descriptor to translate the lACK access ($FFFFFX), thus eliminating this external circuitry. +5V F C O - - - - - - L ._ _ FC1-----i FC2-----i AS )O-e---ALL *--{:t:»- = Open-Collector Output Figure 5-3. Circuit to Inhibit Translation During lACK 5-3/5-4 SECTION 6 SOFTWARE CONSIDERATIONS 6.1 SEGMENT MAPPING EXAMPLE In constructing segments, the size of a given segment is determined by the logical address mask. Although there are no constraints on which bits are significant, one approach is to allow only contiguous, low order zeroes ("don't cares"). With this constraint, if there are N zeroes, the size of the segment is 2(8+ N) bytes. Since the seven low-order address lines bypass the MMU, the smallest possible segment is 128 words (256 bytes). In the logical address space, a segment defined this way extends from the address formed by the LBA with zeroes in the "don't care" positions in the LAM to the address formed by the LBA with ones in the "don't care" bit positions. In the physical address space, the segment extends from the address formed by the PBA with zeroes in the "don't care" bit positions in the LAM to the address formed with ones in the "don't care" positions. This system is ideal for use with the binary buddy algorithm in which segments are all of 2k multiple size. Figure 6-1 shows an example memory map. In this example, the map has been divided between two users and the operating system. The user tasks each have three segments: A, B, and C. The operating system also has three segments: 0, V, and R. Segment R maps the logical addresses unchanged to the physical address space, but only for address space number $00. This segment is automatically generated in descriptor zero in the master MMU on reset. Segments 0 and V also belong to the operating system and are accessed only by ASNs with bit seven set. This is an arbitrary assignment and need not be followed. Segments 1A, 1B, and 1C belong to user number one, and are accessed by address space numbers $01 and $81. User one would be assigned ANS $01 and the operating system would use $81 to access those segments. A parallel situation exists with user two. Note that segments 1A and 2A are isolated from each other even though they share the same logical addresses. User one is prevented from accessing the same memory as user two because his ASN does not match segment 2A. Segments can overlap in physical memory, however, as 1C and 2C do here. Note the manner in which segments 1Band 2B are defined. Here the logical and physical base addresses are considered to be the top of the segment rather than the bottom. This is useful in describing push-down, pop-up stacks which grow towards low memory. The same segment can be 6-1 described in the other way, also. An alternate descriptor for segment 1B is given below and a translation example is given in Figure 6-2. Descriptor Logical Base Address Logical Address Mask Physical Base Address Address Space Number Address Space Mask 18 $4000 $COOO $8000 $01 $7F logical Addresses ••{2A{ Physical Addresses 000000 OFFFFF 000000 0003FF 100000 IFFFFF 200000 IFFFFF }.A 3FFFFF R u{.{ v{ lC{ 2C{ 400000 600000 600000 7FFFFF 800000 8003FF 900000 9FFFFF AOOOOO AFFFFF 7FFFFF 800000 }.. } EOOOOO EFFFFF FOOOOO FFFFFF FOOOOO FFFFFF logical Addresses Segment Logical Base Address (LBA) Logical Address Mask (LAM) Physical Base Address (PBA) Address Space Number (ASN) Address Space Mask (ASM) R OOOJ OOOJ OOOJ 00 FF R .. BFFFFF o{ }v }2A }2C }lC }o Physical Addresses V 0 1A 16 1C 2A 26 2C 8000 FFFC 0000 80 80 FCXXl 0000 7FFF 0000 Fooo 7FFF ACXXl FCXXl ECXXl COOO 9000 Fooo Fooo BFFF Eooo 1000 Eooo 7FFF Eooo 80 2000 01 80 7F 01 7F 01 7F 02 7F 02 7F 02 7F Figure 6-1. Address Map Example 6-2 Fooo 0 CASN = X Logical Address (A8-A23) Range Match Results from Logical Address 0 0 o 1 1 o 000 0 0 11 0 0 0 Space Match Results from CASN Matching in All ASM Set Bits ASM ASN 0 0 ~r_0_____0__0__0___0_IL1____0___0 __0__~Y 0 0 0 0 0 0 0 0 0 a \ 0 0 0 01 .... _ _ _ _ _ _ _ _ _ _:=;LA..:.M"-'-_ _ _ _ _ _ _ _--'_ Matching LBA in All LAM Set Bits o 0 0 0 0 0 0 0 0 0 0 0 0 01 LBA _ ~~------~--------~ 000000000000000 PBA 1 0 0 1 000 0 000 1 1 \~-----------------r----------------J/ I Physical Address (PA8-PA23) Physical address is formed by passing the !ogical address (A8-A23) in those positions which are clear ("don't care" bits) in the LAM. In the other LAM bit positions (set positions) the PBA is gated out to the physical address bus. Figure 6-2. Translation Example 6.2 SEGMENTATION Since segment sizes must be multiples of two, multiple descriptors can be used to map a segment of non-binary size. For example, a segment of 70K bytes could be constructed using two descriptors: one of 64K bytes and one of 8K bytes, losing 2K bytes to internal fragmentation. A purely binary system would allocate 128K bytes, wasting 58K bytes. For this reason, a modified binary buddy allocation algorithm should be used. 6.3 VIRTUAL MEMORY SUPPORT The MC68451 MMU supports virtual memory systems as well. In a virtual system, the virtual address is larger than the physical RAM available and a combination of memory management hardware and software maintain a portion of the address space on a fast backing store such as a disk. Virtual memory systems are usually implemented with a paging type of memory management system. In paging systems, the logical (virtual) address space is divided into equal length pages. A task is then allocated a certain number of these pages at initial load time and the memory management hardware is programmed to map these virtual pages to physical pages. This is equivalent to setting all descriptors to the same length. Thus, the MMU serves as a content-addressable translation buffer of 32 pages. In such a system, a page fault is caused when an access is attempted to a page that is not currently mapped by the MMU. This is an error in a non-virtual system but signals a page fault in a virtual system. The other ingredient in a virtual system is a processor that is capable of aborting any instruction and finishing it a later time. This is necessary because any memory access could potentially be the cause of a page fault. When this occurs, the faulting bus cycle is suspended and the operating sytem takes corrective action. The bus cycle is then re-run and the instruction is continued. The MC68OCX) does not save enough information when processing a bus error to return and finish the instruction that was being executed. Therefore, a true virtual system is not possible using a single MC68OCX) MPU. The MC68010 virtual microprocessor (VMPU) will allow a faulted bus cycle to be re-run and the instruction to be continued. This processor can, in conjunction with the MC68451 MMU, be used to implement a virtual memory system. The MMU also provides hardware assistance for virtual paging systems. The logical address, the cycle address space number, and the R/W line are latched in the accumulator on a fault. This information is used by the page fault handler to fix the page fault. In addition, the used and modified bits in the segment status register allow the implementation of a variety of page replacement algorithms. 6.4 INITIALIZATION SOFTWARE A fter a reset (power-on or processor initiated), the master M M U (the M M U for which CS was asserted during reset) will map the logical addresses unchanged into the physical address space using descriptor zero (see 2.6 RESET). This will allow the processor to fetch its supervisor stack and program counter (if it was a power-on reset) and begin executing the operating sytem initialization routine. See the MC68000 Data Sheet for more information. 6-4 The operating system would then set up descriptors for itself and system resources (such as the MMUl. To load a descriptor, the operating system loads the descriptor number in the DP register, and the LBA, LAM, PBA, ASN, and ASM into the accumulator as described in 4.6.3.2 LOAD DESCRIPTOR OPERATION. The processor then reads from the appropriate physical address to begin the loading operation. The MMM globally checks for conflicts and loads and enables the descriptor if none are found. As a result of the read, the processor gets a status byte in the low byte of the word. The status will read $00 if the load was successful and $FF if there was a conflict. If a conflict occurred, the RDP can be used to find the highest priority conflicting descriptor. A descriptor can be quickly disabled by writing to its segment status register. The I and WP bits can be programmed and the U and M bits can be cleared but the E bit can be set only by a load descrip• tor operation. Descriptors would then be set up for the user tasks and a task would be selected to execute. Address space table entries ASTl and AST2 would then be loaded with the address space number of the task to be run. These are the address spaces of user data and user program in the MC68000. The program counter and status register to be used by the task are then pushed onto the system stack. The processor then executes an RTE instruction which fetches the status register and program counter off of the stack. The status register should have had the supervisor bit cleared so that the processor will enter the user state and its acesses are then mapped through ASTl and AST2 to start the user task. To return to the operating system from a user task, a watchdog timer could be used to interrupt the processor. The exception processing caused by this would switch the processor to the supervisor state and the supervisor address spaces would be mapped by the operating systems descriptors. 6.5 CONTEXT SWITCHING Switching the MMU from one user task to the other is very efficient. Suppose two user tasks were present in memory and the processor had returned to the operating system as described above. To switch tasks, the operating system would change ASTl and AST2 to the ASN of the user task which it wished to execute. It would then push the new status register and program counter on the stack and execute an RTE. Switching between two supervisor tasks is more complex. If AST5 and AST6 are changed while the processor is in the supervisor state, subsequent accesses are immediately mapped through the new address space. A move multiple (MOVEM) using the predecrement mode followed by an illegal instruction can be executed to perform the switch. The processor prefetch pipeline fetches the MOVEM and the illegal instruction, alters AST6 and AST5 (data entry last), then traps through the illegal instruction routine to the new supervisor task. A flag (possibly the illegal instruction opcode) is used to distinguish between normal illegal instructions and attempts to switch tasks in this manner. Another method is to have a task in the user space perform the switch. The supervisor stack pointer is set up, the processor alters the status register to put itself in the user state, AST5 and AST6 are changed, and the processor traps to the supervisor task. 6-5/6-6 SECTION 7 ELECTRICAL SPECIFICATIONS 7.1 MAXIMUM RATINGS Symbol Value Unit Supply Voltage VCC -0.3 to + 7.0 V Input Voltage Vin TA T stg -0.3 to + 7.0 o to 70 -55 to + 150 °c Characteristics Operating Temperature Range Storage Temperature V °c 7.2 THERMAL CHARACTERISTICS Characteristics Thermal Resistance Ceramic Plastic Type B Chip Carrier Type C Chip Carrier Symbol Value 8JA 30 30 50 50 This device contains circuitry to protect the inputs against damage due to high static voltages or electric fields; however, it is advised that normai precuations be taken to avoid application of any voltage higher than maximum-rated voltages to this highimpedance circuit. Reliability of operation is enhanced If unused inputs are tied to an appropriate logic voltage ievel (e.g., either VSS or VCC). Rating °C/W 7.3 POWER CONSIDERATIONS The average chip-junction temperature, T J, in °c can be obtained from: TJ = T A + (PoeOJA) Where: TA= Ambient Temperature, °c OJA = Package Thermal Resistance, Junction-to-Ambient, °C/W PO= PINT+ PliO PINT= ICC x VCe, Watts - Chip Internal Power PI/O= Power Dissipation on Input and Output Pins - User Determined For most applications PI/O< PINT and can be neglected. (1 ) An approximate relationship between Po and TJ (if PliO is neglected) is: PO= K -;- (T J + 273°C) (2) Solving equations 1 and 2 for K gives: (3) K = Toe(T A + 273°C) + OJAeP 0 2 Where K is a constant pertaining to the particular part. K can be determined from equation 3 by measuring Po (at equilibrium) for a known T A Using this value of K the values of Po and T J can be obtained by solving equations (1) and (2) iteratively for any value of T A 7-1 +5V MAS, GO, IRQ, FAULT, ANY, ALL ~RL +5V =7500 Test Point 0--+--....--+........ ~CL = 130 pF I CL CL=l30 pF (Includes all Parasitics) _ Rp=5.6 kU for WIN, PADO-PAD15, HAD, ED, DTACK MMD7000 or Equivalent = Figure 7-1. Test Loads 7.4 AC ELECTRICAL SPECIFICATIONS (Vee=5.0 Vdc±5%, GND=O Vdc, TA=Ooe to 70 0 e, see Figures 7-2, 7-3, and 7-4) 10 MHz 8 MHz Number Max Unit 1 Clock Period 125 500 100 500 ns 2 Clock Width Low 55 250 45 250 ns 3 Clock Width High 55 250 45 250 ns 4 Clock Fall Time - 10 - 10 ns 10 ns Characteristic Min Max Min 5 Clock Rise Time - 10 - 6 AS Width Asserted 200 - 180 - ns 7 FCO-FC3 Valid to AS Asserted I FC Setup Time) 50 - 40 - ns 8 A8-A23, FCO-FC3 Valid After AS Negated (Address, FC Hold Time) 0 - 0 - ns 9 A8-A23 Valid to AS Asserted IAddress Setup) 25 - 15 - ns 10 AS Asserted to PADO-PAD15 Valid - 150 - 125 ns 11 AS Negated to MAS Negated - 100 - 75 ns 12 AS Asserted to MAS Asserted (Asynchronous Mode) - 150 - 125 ns 13 PADO-PAD15 Valid to MAS Asserted (Mode Sl or S2) 30 - 25 - ns 13a PADO-PAD15 Valid to MAS Asserted* (Mode A) -20 - -20 - ns 14 Clock High to MAS Asserted (Mode Sl) - 80 - 60 ns 15 Clock Low to MAS Asserted (Mode S2) - 80 - 60 ns 16 Clock High to HAD Asserted - 100 - 80 ns 17 Clock High to HAD Negated - 100 - 80 ns 18 PADO-PAD15 Valid to HAD Asserted 40 - 30 - ns 19 PADO-PAD15 Valid after HAD Asserted 40 - 30 - ns 20 AS Negated to 60 - 50 - ns 21 AS - 20 - 20 ns 22 R/W High after AS Negated 40 - 40 - ns 22a R/W Low after AS Negated 0 - 0 - ns 23 MAS Asserted to R/W Transition (Read-Modify-Write) 0 - 0 - ns 24 MAS Asserted to WIN Asserted - 20 - 20 ns 25 MAS Negated to WIN Negated 0 40 0 40 ns 26 MAS Asserted to IRQ Asserted - 120 - 120 ns 27 Clock High to I RQ Negated - 200 - 180 ns ns HAD Negated Asserted to R/W Valid 28 AS Asserted to ALL Hi-Z (No Match) - 200 - 160 29 MAS Asserted to ALL Negated (External Match) - 80 - 60 ns 30 FAULT Width Asserted 5 - 5 - Clk. Per. 31 AS Asserted to FAU LT Asserted (U SA) * * 8.5 12.5 8.5 12.5 Clk. Per. 32 AS Asserted to FAULT Asserted IWV) * * 13.5 18.5 13.5 18.5 Clk. Per. 33 AS Negated to FAULT Hi-Z lAS Slower than Minimum Width) - 100 34 CS to UDS, LDS Nonoverlap (to Avoid Operation) 0 35 RS1-RS5, CS, and lACK Valid to Clock Low 36 RS1-RS5 Valid to CS Low * Except Immediately following an operation. See Table 4-1 for more information 7-2 - 90 ns - 0 - ns 20 - 15 - ns 0 - 0 - ns * * Assumes AS IS not a limiting factor. NOTES FOR FIGURES 7-2, 7-3, AND 7-4: 1. These waveforms should only be referenced in regard to the edge-to-edge measurement of the timing specifications. They are not intended as a functional description of the input and output signals. Refer to other functional descriptions and their related diagrams for device operation. ClK 2. Waveform measurements for all inputs and outputs are specified at: logic high = 2.0 V, logic low = O.S V. ~ CD ClK 2 -i~[;:Lr ~rL~r---'L-J II AS - ''C~I - 6 -" l ~II ®- ~ PADOPA015 (Write) FCO-FC2 AS-A23 ~ T ~t8~ -----------------------+--------~~--~----_+--_+----------~----~~------- (Read) ~ ~ r--+ I PADOPAD15 ANY ~@- f+ 1 f-oI~ MAS (A) lACK ®~ All J ------------------------~ ~ \-@ ., MAS (S1) 1""-:10- ..., MAS (S2) J ~® ~ 15 @22 ® 1 ~ R/W (R-M-Wl ®--. ., ~ @- ~ All ~A ~ 22 I 1I ~ ~~ I ~ "' @- ~ <2:::::-31$ --. -@- t--+ ~"' ~ R/W -@ I V ---; ~ Figure 7-3. Operations Timing .. , - +@ ClK ~ T A V I 1. I""" ~ 30 A Y Figure 7-2. Normal Translation Timing Type K (Outputs) Type D (Inputs) Asynchronous Inputs --~----~~----- J=LF--:-~r_57- ~'-_ _ _ _- - - - - - - - - - - - - - - - - Figure 7-4. Miscellaneous Signal Timing Foldout 1 Foldout 2 Timing Diagrams (Timing tables located on pages 7-2 and 7-3.) 7.4 AC ELECTRICAL SPECIFICATIONS (Continued) (VCC=5.0 Vdc±5%, GND=O Vdc, TA=OoC to 70°C; see Figures 7-2,7-3, and 7-4) 8 MHz Number Characteristic Min 37 Data Strobes Negated to RS1-RS5, CS, and lACK Invalid 38 10 MHz Max Min Max Unit 0 - 0 - ns UDS, LDS Width Negated 140 - 100 - ns 39 PADO-PAD15 Hi-Z to ED Asserted 60 - 40 - ns 40 ED Asserted to PADO-PAD15 Valid (Write) - 40 - 40 ns 41 UDS, LDS Negated to ED Negated - 100 - 50 ns 42 ED Negated to PADO-PAD15 Hi-Z (Write) - 60 - 60 ns 43 Clock Low to PADO-PAD15 Valid (Read) 44 PADO-PAD15 Valid to DTACK Asserted (Read) - 100 - 100 ns 187 - 150 - 45 ns UDS, LDS Negated to PADO-PAD15 Hi-Z (Read) - 120 - 100 ns 46 Clock Low to ANY Asserted (Output) - 125 - 100 ns 47 Clock Low to ANY Hi-Z (Output) - 125 - 100 ns 48 Clock Low to ALL Hi-Z (Output) - 125 - 100 ns 49 Clock Low to ALL Negated (Output) - 125 - 100 ns 50 Clock High to DT ACK Asserted - 75 - 55 ns 51 UDS, LDS Negated to DTACK Negated - 100 - 80 ns 52 CS Valid to RESET Negated (CS Setup before RESET) Clk. Per. 53 CS Valid after RESET Negated (CS Hold Time after RESET) 54 RESET Width Asserted (See Note 1) 5 - 5 - -10 60 -10 60 ns 10 - 10 - Clk. Per. 55 Type K Pins Logic High to Hi-Z (See Note 2) - 100 - 100 ns 56 Type D Inputs Fall Time (See Note 3) - 200 - 200 ns 57 Type D Inputs Rise Time - 200 - 200 ns 58 Asynchronous Input Setup Time 30 - 20 - ns I NOTES: 1. Initial power-on-reset pulse shall be ;;:: 100 ms to allow for system clock stabilization. 2. Type K outputs are: DTACK, MAS, WIN, HAD, ED, and GO. 3. Type D inputs are: FAULT, IRQ, MAS, GO, ANY, and ALL. MC68451 F - The following parameters, for the MC68451 F, differ from those given for the MC68451 while all others remain unchanged. 8 MHz Number Characteristic 10 MHz Min Max Min Max Unit 10 AS Asserted to PADO-PAD15 Valid - 125 - 100 ns 12 AS Asserted to MAS Asserted (Asynchronous Mode) - 125 - 100 ns 13 PADO-PAD15 Valid to MAS Asserted (Mode Sl or S2) 13a PADO-PAD15 Valid to MAS Asserted* (Mode A) 40 - 40 - ns -10 - -10 - ns * Except immediately following an operation. See Table 4-1 for more information. Timing diagrams (Figures 7-2, 7-3, and 7-4) are located on a foldout page at the end of this document. 7-3 7.5 ELECTRICAL CHARACTERISTICS (VCC=5.0 Vdc +5%, GND=O Vdc, TA=O°C to 70°C) Symbol Min Max Unit Input High Voltage All Inputs Except MODE MODE VIH VSS+2.0 VCC VCC - V Input Low Voltage All Inputs Except MODE MODE VIL VSS-0.3 - VSS+O.S VSS V lin - 20 p.A Hi-Z (Off-State) Input Current (VCC= Max) PADO-PAD15, DTACK, MAS, WIN, ED, GO ITSI - 20 p.A Output High Voltage (JOH= -400p.A, VOH=2.4 V) All Outputs Except FAULT, IRQ, ANY, ALL VOH VSS+2.4 - V Output Low Voltage (VCC= Max) PADO-PAD15, DTACK, MAS, WIN, HAD, ED, GO (I0L =5.3mA) FAULT,IRQ,ANY,ALL (IOL = 10.7 rnA) VOL - 0.5 0.5 V - - 1.5 W 20 pF Characteristics Input Leakage Current @ 5.25 V Power Dissipation Po Capacitance (Package Type Dependent) (Vin=OV, TA=25°C, Frequency = 1 MHz) Cin 7-4 - SECTION 8 8.1 ORDERING INFORMATION (TA=OoC to 70°C) Package Type Ceramic L Suffix Frequency Order Number 8 MHz MC68451 L8 MC68451 L8F MC68451 L10 MC68451 L10F 10 MHz Plastic G Suffix 8 MHz 10 MHz Type B Leadless Chip Carrier ZB Suffix Type C Leadless Chip Carrier ZC Suffix Pin Grid Array R Suffix 8 MHz 10 MHz 8 MHz 10 MHz 8 MHz 10 MHz 8-1 MC68451G8 MC68451G8F MC68451GlO MC68451 GlOF MC68451ZB8 M C68451 ZB8F MC68451ZB10 MC68451ZB10F MC68451ZC8 M C68451 ZC8F MC68451ZC10 MC68451ZC10F MC68451 R8 MC68451 R8F MC68451 R10 MC68451 RlOF 8.2 PIN ASSIGNMENTS 64-Pin Dual-in-line Package 68-Terminal Chip Carrier PADO PADl MAS PAD2 HAD PAD3 MODE WIN PAD4 PAD5 FAOIT Vccvcc- PAD6 R/W- IRO GND PAD? PAD8 FC3 FC2 VCC PAD9 FCl FCO PADll AS RESET PAD12 PAD13 f5'fACK Eo PAD15 A23 A22 GO A2l ANY ALL A20 A19 iAC'R A18 CS Al? CLOCK GND VCC R/W A16 A15 .A14 RSl RS2 A13 RS3 29 A12 RS4 30 All AS 109 RS1RS2RS3RS4RS5A8- 18 A9Al0A1lA12A13A14A15A16- 26 2? PAD14 LDS RS5 I PADlO UDS 1~I(f)tJ ou:..! I:..! -1/>- (f)/(f) ~ -I(f)uJZIOloOO~WI(f)u0uUZ ulu ~
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-c041 52.342996, 2008/05/07-21:37:19 Create Date : 2015:07:17 17:47:03-08:00 Modify Date : 2015:07:17 17:10:33-07:00 Metadata Date : 2015:07:17 17:10:33-07:00 Producer : Adobe Acrobat 9.0 Paper Capture Plug-in Format : application/pdf Document ID : uuid:fca9ca21-ff26-634a-a6d4-b093e7cb49f5 Instance ID : uuid:1f64245d-4fc3-bb47-a80b-e528185a5496 Page Layout : SinglePage Page Mode : UseOutlines Page Count : 79EXIF Metadata provided by EXIF.tools