The Motorola 68000 Architecture: An In-Depth Analysis of its Features and Performance
Motorola 68000 Architecture: A Historic CPU Design
The Motorola 68000 (sometimes shortened to Motorola 68k or m68k and usually pronounced "sixty-eight-thousand") is a 16/32-bit complex instruction set computer (CISC) microprocessor, introduced in 1979 by Motorola Semiconductor Products Sector. The design implements a 32-bit instruction set, with 32-bit registers and a 16-bit internal data bus. The address bus is 24 bits and does not use memory segmentation, which made it easier to program for. Internally, it uses a 16-bit data arithmetic logic unit (ALU) and two more 16-bit ALUs used mostly for addresses, and has a 16-bit external data bus.
Motorola 68000 Architecture.pdf
The Motorola 68000 is a historic CPU architecture that was widely used in various personal computers, workstations, video games, arcade machines, embedded systems, and other devices. It was also the basis for the development of newer generations of processors with enhanced features and performance. In this article, we will explore the development, variants, applications, architecture, instruction set details, and improvements of the Motorola 68000 architecture.
Development of Motorola 68000
The development of the Motorola 68000 architecture can be traced back to the late 1970s, when Motorola was competing with Intel's x86 microprocessors in the market. Motorola had previously introduced the Motorola 6800, an 8-bit microprocessor that was released in 1974. The 6800 was followed by the Motorola 6809, another 8-bit microprocessor that was released in 1978. The 6809 had some features that were ahead of its time, such as two 8-bit accumulators that could be combined into a single 16-bit register, and a position-independent code capability that allowed for easier programming. However, the 6809 was still limited by its 8-bit architecture and could not compete with the emerging 16-bit microprocessors from Intel, such as the 8086 and the 8088.
To move to the 16-bit market, Motorola decided to design a new microprocessor that would have a 32-bit instruction set, but would use a 16-bit data bus to reduce the cost and complexity of the chip. The project was codenamed MACSS, which stood for Motorola's Advanced Computer System on Silicon. The lead designer of the project was Tom Gunter, who had previously worked on the 6800 and the 6809. Gunter and his team aimed to create a microprocessor that would be compatible with the existing 6800 software, but would also offer new features and capabilities that would make it suitable for high-performance applications.
The first samples of the Motorola 68000 were produced in 1979, and the chip was officially introduced in the same year. The chip had about 68,000 transistors, which gave it its name. The chip was manufactured using a nMOS process, which was the dominant technology at the time. The chip had a clock speed of 4 MHz to 16.67 MHz, depending on the model. The chip was packaged in a 64-pin DIP, which was compatible with the existing 6800 sockets. The chip was priced at about $360 per unit, which was comparable to Intel's 8086 and 8088.
Variants of Motorola 68000
The Motorola 68000 architecture spawned several variants that were produced by Motorola and other companies. Some of these variants were:
Motorola 68EC000: A low-cost version of the Motorola 68000 that had a reduced address bus of 20 bits, limiting the memory space to 1 MB. It also lacked some features such as external interrupt pins and coprocessor support. It was mainly used in embedded systems and low-end computers.
Motorola 68SEC000: An enhanced version of the Motorola 68EC000 that had a full address bus of 24 bits, allowing for a memory space of up to 16 MB. It also had some additional features such as power-saving modes and dynamic bus sizing. It was mainly used in embedded systems and portable devices.
Motorola 68HC000: A high-performance version of the Motorola 68000 that used a HCMOS process, which reduced the power consumption and increased the clock speed of the chip. It also had some minor improvements in the instruction set and addressing modes. It was mainly used in high-end computers and workstations.
Motorola 68008: A simplified version of the Motorola 68000 that had a reduced data bus of 8 bits, which made it cheaper and easier to interface with other devices. It also had a reduced address bus of 20 bits, limiting the memory space to 1 MB. It was mainly used in low-cost computers and home consoles.
Motorola 68010: An improved version of the Motorola 68000 that added some features such as virtual memory support, restartable instructions, loop mode, and larger multiply and divide instructions. It also had some bug fixes and performance enhancements. It was mainly used as an upgrade for existing Motorola 68000 systems.
Applications of Motorola 68000
The Motorola 68000 architecture was widely used in various applications, especially in the fields of personal computing and video gaming. Some of the notable applications of the Motorola 68000 were:
Personal computers and workstations: The Motorola 68000 was used as the main processor in many popular personal computers and workstations, such as the Apple Macintosh, the Sharp X68000, the Commodore Amiga, the Sinclair QL, the Atari ST, the AT&T UNIX PC, the Tandy Model 16/16B/6000, the Sun Microsystems Sun-1, Sun-2 and Sun-3, and the NeXT Computer, NeXTcube, NeXTstation, and NeXTcube Turbo. These computers used the Motorola 68000 as their main processor, or as a coprocessor to another processor, such as the Motorola 68020 or the Motorola 68030. The Motorola 68000 provided these computers with a powerful and versatile instruction set, a large address space, and a fast performance.
Video games and arcade machines: The Motorola 68000 was also used as the main processor or a coprocessor in many video game consoles and arcade machines, such as the Sega Genesis (Mega Drive), the Capcom System I (Arcade), the Sega System 16 (Arcade), the Sega System 24 (Arcade), the Namco System 2 (Arcade), and the Konami System GX (Arcade). These systems used the Motorola 68000 to handle complex graphics, sound, and gameplay logic. The Motorola 68000 also enabled these systems to run arcade-quality games at home or on the go.
Other devices and systems: The Motorola 68000 was also used in other devices and systems that required a high-performance microprocessor, such as the Texas Instruments TI-89 / TI-92 calculators, the Palm Pilot (all models running Palm OS 4.x or earlier), and the Space Shuttle. These devices and systems used the Motorola 68000 to perform complex calculations, run applications, and control operations.
Architecture of Motorola 68000
The architecture of the Motorola 68000 can be described by its main components and features, such as its address bus, its internal registers, its status register, its instruction set, its privilege levels, and its interrupts.
Address bus: The Motorola 68000 has a 24-bit address bus, which means that it can access up to 16 MB of memory. The address bus is big-endian, which means that the most significant byte of an address is stored at the lowest memory location. The address bus does not use memory segmentation, which means that there is no need to specify a segment register or a selector when accessing memory. The address bus can be divided into three regions: user space, supervisor space, and vector space. User space is the region where normal programs run. Supervisor space is the region where privileged programs run. Vector space is the region where exception vectors are stored.
Internal registers: The Motorola 68000 has 8 data registers (D0-D7) and 7 address registers (A0-A6). The data registers are 32-bit registers that can store data values or operands. The address registers are also 32-bit registers that can store memory addresses or pointers. The last address register (A7) also acts as the stack pointer, which points to the top of the stack. The stack is a data structure that stores temporary data or return addresses for subroutines. The stack grows downwards from high memory to low memory. The internal registers can be accessed in different sizes: byte (8 bits), word (16 bits), or long word (32 bits).
Status register: The Motorola 68000 has a 16-bit status register (SR) that stores information about the state of the processor and the result of the last instruction. The status register consists of two parts: the condition code register (CCR) and the system byte. The condition code register is the lower 8 bits of the status register, and it contains five flags: carry (C), overflow (V), zero (Z), negative (N), and extend (X). These flags are set or cleared according to the outcome of arithmetic or logical operations. The system byte is the upper 8 bits of the status register, and it contains three fields: interrupt mask (I), trace mode (T), and supervisor mode (S). The interrupt mask is a 3-bit field that determines the level of interrupts that can be accepted by the processor. The trace mode is a 1-bit field that enables or disables single-step execution of instructions. The supervisor mode is a 1-bit field that indicates whether the processor is running in user mode or supervisor mode.
Instruction set: The Motorola 68000 has a 32-bit instruction set, which means that each instruction consists of one or more 16-bit words. The instruction set is divided into three groups: data movement, data processing, and control flow. Data movement instructions are used to transfer data between registers, memory, or peripherals. Data processing instructions are used to perform arithmetic, logical, bit manipulation, or shift operations on data. Control flow instructions are used to change the sequence of execution, such as branching, jumping, calling, or returning from subroutines. The instruction set also supports coprocessor instructions, which are used to communicate with external devices or processors, such as a floating-point unit or a memory management unit.
Privilege levels: The Motorola 68000 supports two privilege levels: user mode and supervisor mode. User mode is the normal mode where most programs run. Supervisor mode is the privileged mode where system programs run. Some instructions and memory regions are only accessible in supervisor mode, such as interrupt control, exception handling, and vector space. The processor can switch between user mode and supervisor mode by using special instructions or by triggering exceptions.
Interrupts: The Motorola 68000 supports seven levels of interrupts: level 0 to level 6. Interrupts are signals that indicate the occurrence of external events that require immediate attention from the processor. Interrupts can be generated by peripherals, timers, or other processors. Interrupts can be masked or unmasked by setting the interrupt mask field in the status register. When an interrupt occurs, the processor saves the current program counter and status register on the stack, and then jumps to an interrupt handler routine that is specified by an interrupt vector in vector space. The interrupt handler routine performs the necessary actions to respond to the interrupt, and then returns to the interrupted program by restoring the program counter and status register from the stack.
Instruction Set Details of Motorola 68000
The instruction set details of the Motorola 68000 can be described by its addressing modes, operands, and instruction formats.
Addressing modes: The Motorola 68000 supports various addressing modes that specify how to access operands in registers or memory. Some of the common addressing modes are:
Data register direct: The operand is located in one of the data registers (D0-D7). For example, D0.
Address register direct: The operand is located in one of the address registers (A0-A6). For example, A0.
Address register indirect: The operand is located in memory at an address specified by one of the address registers (A0-A6). For example, (A0).
Address register indirect with postincrement: The operand is located in memory at an address specified by one of the address registers (A0-A6), and then the address register is incremented by the size of the operand. For example, (A0)+.
the operand is located in memory at an address specified by one of the address registers (A0-A6). For example, -(A0).
Address register indirect with displacement: The operand is located in memory at an address specified by adding a signed 16-bit displacement to one of the address registers (A0-A6). For example, 10(A0).
Address register indirect with index: The operand is located in memory at an address specified by adding a signed 8-bit displacement and an index register (D0-D7 or A0-A6) to one of the address registers (A0-A6). The index register can be scaled by 1, 2, 4, or 8. For example, 10(A0,D1*4).
Absolute short: The operand is located in memory at an address specified by a signed 16-bit value. For example, $1234.
Absolute long: The operand is located in memory at an address specified by a 32-bit value. For example, $12345678.
Program counter relative with displacement: The operand is located in memory at an address specified by adding a signed 16-bit displacement to the program counter. For example, 10(PC).
Program counter relative with index: The operand is located in memory at an address specified by adding a signed 8-bit displacement and an index register (D0-D7 or A0-A6) to the program counter. The index register can be scaled by 1, 2, 4, or 8. For example, 10(PC,D1*4).
Immediate: The operand is specified as part of the instruction. For example, #$1234.
Operands: The Motorola 68000 supports various operands that can be used as sources or destinations of data. Some of the common operands are:
Data: A data value that can be a byte (8 bits), a word (16 bits), or a long word (32 bits). For example, #$12, #$1234, or #$12345678.
Data register: A data register that can store a data value of any size. For example, D0.
Address register: An address register that can store a memory address or a pointer. For example, A0.
Status register: A status register that stores information about the state of the processor and the result of the last instruction. For example, SR.
Memory location: A memory location that can store a data value of any size. The memory location can be specified by using any of the addressing modes. For example, (A0), $1234, or 10(PC,D1*4).
Instruction formats: The Motorola 68000 supports various instruction formats that specify how to encode an instruction in binary form. Some of the common instruction formats are:
Data movement format: This format is used for data movement instructions, such as MOVE, MOVEA, MOVEQ, and LEA. It consists of three fields: operation size (2 bits), destination mode and register (6 bits), and source mode and register (6 bits). The operation size field specifies the size of the data to be moved: byte (01), word (11), or long word (10). The destination mode and register field specifies the addressing mode and register number of the destination operand. The source mode and register field specifies the addressing mode and register number of the source operand.
Data processing format: This format is used for data processing instructions, such as ADD, SUB, AND, OR, EOR, CMP, and NEG. It consists of four fields: operation size (2 bits), operation mode (3 bits), destination mode and register (6 bits), and source mode and register (6 bits). The operation size field specifies the size of the data to be processed: byte (00), word (01), or long word (10). The operation mode field specifies the type of operation to be performed: immediate (111), data register direct (000), memory to register (001), or register to memory (010). The destination mode and register field specifies the addressing mode and register number of the destination operand. The source mode and register field specifies the addressing mode and register number of the source operand.
Control flow format: This format is used for control flow instructions, such as Bcc, BRA, BSR, JMP, JSR, RTS, and RTE. It consists of two fields: operation code (8 bits) and displacement or address (8, 16, or 32 bits). The operation code field specifies the type of control flow instruction to be executed. The displacement or address field specifies the relative or absolute address of the target location to be branched or jumped to.
Improvements of Motorola 68000 Family
The Motorola 68000 family consists of several generations of processors that were based on the original Motorola 68000 architecture, but with various improvements and enhancements. Some of these generations were:
Motorola 68010: An improved version of the Motorola 68000 that added some features such as virtual memory support, restartable instructions, loop mode, and larger multiply and divide instructions. It also had some bug fixes and performance enhancements. It was mainly used as an upgrade for existing Motorola 68000 systems.
Motorola 68020: A fully 32-bit version of the Motorola 68000 that had a 32-bit address bus and a 32-bit data bus. It also had a three-stage pipeline, an instruction cache of 256 bytes, unrestricted word and long word data access, scaled indexing and another level of indirection in addressing modes, larger multiply (