Docsity

The Evolution and Impact of Microprogramming on CPU Control Units - Prof. Edward Bosworth, Study notes of Computer Architecture and Organization

Toggle sidebar
bg1
The Evolution of Microprogramming
In this lecture, we deviate somewhat from the textbook
and discuss the history of microprogrammed control units.
The main topics for this lecture are as follows:
1. A review of the function of the Control Unit as a part of
the CPU and the standard ways to implement control.
2. A quick introduction to VHDL, a language that can be
used to design and test a hardwired control unit.
3. The origin of the microprogrammed control unit, and
factors that affected its early development.
We begin with a review of the CPU (Central Processing Unit) of a typical computer,
and comment on function of the control unit.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download The Evolution and Impact of Microprogramming on CPU Control Units - Prof. Edward Bosworth and more Study notes Computer Architecture and Organization in PDF only on Docsity!

The Evolution of Microprogramming

In this lecture, we deviate somewhat from the textbook and discuss the history of microprogrammed control units. The main topics for this lecture are as follows:

  1. A review of the function of the Control Unit as a part of the CPU and the standard ways to implement control.
  2. A quick introduction to VHDL, a language that can be used to design and test a hardwired control unit.
  3. The origin of the microprogrammed control unit, and factors that affected its early development. We begin with a review of the CPU (Central Processing Unit) of a typical computer, and comment on function of the control unit.

The Central Processing Unit (CPU)

The CPU has four main components:

  1. The Control Unit (along with the IR) interprets the machine language instruction and issues the control signals to make the CPU execute that instruction.
  2. The ALU (Arithmetic Logic Unit) that does the arithmetic and logic.
  3. The Register Set (Register File) that stores temporary results related to the computations. There are also Special Purpose Registers used by the Control Unit.
  4. An internal bus structure for communication. The function of the control unit is to decode the binary machine word in the IR (Instruction Register) and issue appropriate control signals, mostly to the CPU. It is the control signals that cause the computer to execute its program.

The Dynamic–Static Interface

In order to understand the DSI, we must place it within the context of a compiler for a higher–level language. Although most compilers do not emit assembly language, we shall find it easier to under the DSI if we pretend that they do. What does the compiler output? There are two options:

  1. A very simple assembly language. This requires a sophisticated compiler.
  2. A more complex assembly language. This may allow a simpler compiler, but it requires a more complex control unit. If complex enough, parts of the control unit are probably microprogrammed.

How Does the Control Unit Work?

The binary form of the instruction is now in the IR (Instruction Register). The control unit decodes that instruction and generates the control signals necessary for the CPU to act as directed by the machine language instruction. The two major design categories here are hard–wired and microprogrammed. Hardwired: The control signals are generated as an output of a set of basic logic gates, the input of which derives from the binary bits in the Instruction Register. Microprogrammed: The control signals are generated by a microprogram that is stored in Control Read Only Memory. The microcontroller fetches a control word from the CROM and places it into the  MBR , from which control signals are emitted. The microcontroller can almost be seen as a very simple computer within a more complex computer. This simplicity was part of the original motivation.

Maurice Wilkes

Maurice Wilkes worked in the Computing Laboratory at Cambridge University beginning in 1936, but mostly from 1945 as he served in WW 2. He read von Neumann’s preliminary report on the EDVAC in 1946. He immediately “recognized this as the real thing” and started on building a stored program computer. In August 1946 he attended a series of lectures “Theory and Techniques for Design of Electronic Digital Computers” given at the Moore School of Engineering at the University of Pennsylvania and met many of the designers of the ENIAC. On May 6, 1949 the EDSAC was first operational, computing the values of N 2 for 1  N  99. In 1951, Wilkes published The Preparation of Programs for Electronic Digital Computers, the first book on programming. I have a 1958 edition. Also in 1951, Wilkes published a paper “The Best Way to Design an Automatic Calculating Machine” that described a technique that he microprogramming. This technique is still in use today and still has the same name. In 1958, the EDSAC 2 became operational; it was the first microprogrammed computer. (page 618 of Warford, 2005)

Wilkes’ Motivations

“As soon as we started programming, we found to our surprise that it wasn’t as easy to get programs right as we had thought. … I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.” After his visit to the United States, Wilkes started to worry about the complexity of the control unit of the EDVAC, then in design. Here is what he wrote later. “I found that it did indeed have a centralized control based on the use of a matrix of diodes. It was, however, only capable of producing a fixed sequence of eight pulses—a different sequence for each instruction, but nevertheless fixed as far as a particular instruction was concerned. It was not, I think, until I got back to Cambridge that I realized that the solution was to turn the control unit into a computer in miniature by adding a second matrix to determine the flow of control at the microlevel and by providing for conditional microinstructions.” In other words, have the control signals emitted by a smaller computer that is controlled by a microprogram. The advantage is that the control unit of this smaller computer is extremely simple to design, test, and understand.

Microprogramming is Taken Seriously

It was with the introduction of the IBM System/360 that microprogramming was taken seriously as an option for designing control units. There were two reasons.

  1. The recent availability of memory units with sufficient reliability and reasonable cost.
  2. The fact that IBM took the technology seriously. IBM’ goals are stated in the 1967 paper by Tucker. “Microprogramming in the System/360 line is not meant to provide the problem programmer with an instruction set that he can custom–tailor. Quite the contrary, it has been used to help design a fixed instruction set capable of reaching across a compatible line of machines in a wide range of performances. … The use of microprogramming has, however, made it feasible for the smaller models of System/360 to provide the same comprehensive instruction set as the large models.” Tucker notes that the use of a ROS [Read Only Store] is somewhat expensive, becoming attractive only as “an instruction set becomes more comprehensive”. Source: (Page 225 of Tucker, 1967)

Microprogramming is Taken Seriously

(By IBM’s Customers)

The primary intent of the IBM design team was to generate an entire family of computers with one ISA (Instruction Set Architecture) but many different organizations. Microprogramming allowed computers of a wide range of computing power (and cost) to implement the same instruction set and run the same assembly language software. Several of the IBM product line managers saw another use for microprogramming, one that their customer base thought to be extremely important: allowing assembly language programs from earlier models (IBM 1401, IBM 7040, IBM 7094) to run unchanged on any model of the System/360 series. As one later author put it, it was only the introduction of microprogramming and the emulation of earlier machines allowed by this feature that prevented “mass defections” of the IBM customer base to other companies, such as Honeywell, that were certainly looking for the business. This idea was proposed and named “emulation” by Stewart Tucker (quoted above).

The 1960’s and 1970’s

Here I just quote our textbook. “In the 1960s and 1970s, microprogramming was one of the most important techniques used in implementing machines. Through most of that period, machines were implemented with discrete components or MSI (medium- scale integration—fewer than 1000 gates per chip), ….[Designers could choose between a hardwired control unit based on a finite–state–machine model or a microprogrammed control unit]. The reliance on standard parts of low- to medium-level integration made these two design styles radically different. Microprogrammed approaches were attractive because implementing the control with a large collection of low- density gates was extremely costly. Furthermore, the popularity of relatively complex instruction sets demanded a large control unit, making a ROM-based implementation much more efficient. The hardwired implementations were faster, but too costly for most machines. Furthermore, it was very difficult to get the control correct, and changing ROMs was easier than replacing a random logic control unit. Eventually, microprogrammed control was implemented in RAM, to allow changes late in the design cycle, and even in the field after a machine shipped.”

The Microprogram Design Process

Here we make an assertion that is almost true on the face of it: the design and testing of a control unit is one of the more difficult parts of developing a new computer. In the late 1970’s, microprogramming had become popular. One of the reasons was the way in which it facilitated the process of designing the control unit. Microprogramming was quite similar to assembly language programming; many designers of the time were experts at this. Microprogram assemblers had been developed and were in wide use. The process of microprogram development was simple:

  1. Write the microcode in a symbolic “microassembly” language and assemble it into binary microcode.
  2. Download the microcode to an EPROM (Erasable Programmable ROM) using a ROM programmer.
  3. Test the microcode, fix the problems, and repeat.

The IBM XT/

IBM was attempting to regain dominance in the desktop market. They noted that both the S/370 and the Motorola 68000 used sixteen 32–bit general purpose registers. In 1984 IBM announced the XT/370, a “370 on a desktop”, a pair of Motorola 68000s re– microprogrammed to emulate the S/370 instruction set. Two units were required because the control store on the Motorola was too small for the S/370. As a computer the project was successful. It failed because IBM wanted full S/370 prices for the software to run on the XT/370. Source: Page 189 from (Murdocca, 2007) Confirmed on the IBM Web Site (Kozuh, 1984)

Side–Effects of Microprogramming

It is a simple fact that the introduction of microprogramming allowed the development of Instruction Set Architectures of almost arbitrary complexity. The VAX series of computers, marketed by the Digital Equipment Corporation, is usually seen as the “high water mark” of microprogrammed designs. The later VAX designs supported an Instruction Set Architecture with more than 300 instructions and more than a dozen addressing modes. When examining the IA–32 Instruction Set Architecture, we may not a number of instructions of significant complexity. These were introduced to support high–level languages (remember the “semantic gap”). It was later discovered that these were rarely used by compilers, but the “legacy code” issue forced their retention. It is now the case that the existence of these instructions in the IA–32 ISA required that part of the control unit be microprogrammed; a hardwired control unit would be too complex. The ghost of the Intel 80286 still haunts us.

Microprogramming: The Late Evolution

“The Mc2 [microprogramming control] level was the standard design for practically all commercial computers until load/store architectures became fashionable in the 1980s”. Events that lead to the reduced emphasis on microprogramming include:

  1. The availability of VLSI technology, which allowed a number of improvements, including on–chip cache memory, at reasonable cost.
  2. The availability of ASIC (Application Specific Integrated Circuits) and FPGA (Field Programmable Gate Arrays), each of which could be used to create custom circuits that were easily tested and reconfigured.
  3. The beginning of the RISC (Reduced Instruction Set Computer) movement, with its realization that complex instruction sets were not required. Modern design practice favors a “mixed control unit” with hardwired control for the simpler (and more common) instructions and microcode implementation of the more complex (mainly legacy code) instructions. The later versions (80486 and following) of the Intel IA–32 architecture provide a good example of this “mixed mode” control unit. We examine these to close the lecture. (page 618 of Warford, 2005)

The IA–32 Control Unit

In order to understand the IA–32 control unit, we must first comment on a fact of instruction execution in the MIPS. Every instruction in the MIPS can be executed in one pass through the data path. What is meant by that? In this chapter, we have studied two variants of the MIPS data path.

  1. A single–cycle implementation in which every instruction is completely executed in one cycle, hence one pass through the data path.
  2. A multi–cycle implementation, in which the execution of each instruction is divided into 3, 4, or 5 phases, with one clock pulse per phase. Even here, the instructions can be viewed as taking one pass through the data path. The MIPS was designed as a RISC machine. Part of this design philosophy calls for efficient execution of instructions; the single pass through the data path is one result. The IA–32 architecture, with its requirement for support of legacy designs, is one example of a CISC (Complex Instruction Set Computer). Some instructions can be executed in 3 or 4 clock cycles, but some require hundreds of clock cycles. The design challenge for the later IA–32 implementations is how to provide for quick execution of the simpler instructions without penalizing the more complex ones.