Example: quiz answers

MARIE: An Introduction to a Simple Computer

195 CHAPTER When you wish to produce a result by means of an instrument, do notallow yourself to complicate it. Leonardo da Vinci4 MARIE: An Introductionto a Simple INTRODUCTIOND esigning a Computer nowadays is a job for a Computer engineer with plenty oftraining. It is impossible in an introductory textbook such as this (and in anintroductory course in Computer organization and architecture) to present every-thing necessary to design and build a working Computer such as those we can buytoday. However, in this chapter, we first look at a very Simple Computer calledMARIE: a Machine Architecture that is Really Intuitive and Easy. We then pro-vide brief overviews of Intel and MIPs machines, two popular architecturesreflecting the CISC and RISC design philosophies. The objective of this chapteris to give you an understanding of how a Computer functions. We have, therefore,kept the architecture as uncomplicated as possible, following the advice in theopening quote by Leonardo da CPU BASICS AND ORGANIZATIONFrom our studies in Chapter 2 (data representation) we know that a computermust manipulate binary-coded data.

200 Chapter 4 / MARIE: An Introduction to a Simple Computer System Bus Interface Cards FIGURE 4.3 Backplane Bus connects the processor, the I/O devices, and the memory (so all devices share one bus). Many computers have a hierarchy of buses, so it is not uncommon to have

Tags:

  Introduction, Simple, Mirae, An introduction to a simple

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of MARIE: An Introduction to a Simple Computer

1 195 CHAPTER When you wish to produce a result by means of an instrument, do notallow yourself to complicate it. Leonardo da Vinci4 MARIE: An Introductionto a Simple INTRODUCTIOND esigning a Computer nowadays is a job for a Computer engineer with plenty oftraining. It is impossible in an introductory textbook such as this (and in anintroductory course in Computer organization and architecture) to present every-thing necessary to design and build a working Computer such as those we can buytoday. However, in this chapter, we first look at a very Simple Computer calledMARIE: a Machine Architecture that is Really Intuitive and Easy. We then pro-vide brief overviews of Intel and MIPs machines, two popular architecturesreflecting the CISC and RISC design philosophies. The objective of this chapteris to give you an understanding of how a Computer functions. We have, therefore,kept the architecture as uncomplicated as possible, following the advice in theopening quote by Leonardo da CPU BASICS AND ORGANIZATIONFrom our studies in Chapter 2 (data representation) we know that a computermust manipulate binary-coded data.

2 We also know from Chapter 3 that memory isused to store both data and program instructions (also in binary). Somehow, theprogram must be executed and the data must be processed correctly. The centralprocessing unit(CPU) is responsible for fetching program instructions, decod-ing each instruction that is fetched, and performing the indicated sequence ofoperations on the correct data. To understand how computers work, you must firstbecome familiar with their various components and the interaction among 10/18/10 12:03 PM Page 195196 Chapter 4/ MARIE: An Introduction to a Simple Computercomponents. To introduce the Simple architecture in the next section, we firstexamine, in general, the microarchitecture that exists at the control level of mod-ern computers have a CPU that can be divided into two pieces. The first is thedatapath, which is a network of storage units (registers) and arithmetic and logicunits (for performing various operations on data) connected by buses (capable ofmoving data from place to place) where the timing is controlled by clocks.

3 Thesecond CPU component is the control unit, a module responsible for sequencingoperations and making sure the correct data are where they need to be at the cor-rect time. Together, these components perform the tasks of the CPU: fetchinginstructions, decoding them, and finally performing the indicated sequence ofoperations. The performance of a machine is directly affected by the design of thedatapath and the control unit. Therefore, we cover these components of the CPUin detail in the following The RegistersRegisters are used in Computer systems as places to store a wide variety of data,such as addresses, program counters, or data necessary for program simply, a registeris a hardware device that stores binary data. Registers arelocated on the processor so information can be accessed very quickly. We saw inChapter 3 that D flip-flops can be used to implement registers. One D flip-flop isequivalent to a 1-bit register, so a collection of D flip-flops is necessary to storemulti-bit values.

4 For example, to build a 16-bit register, we need to connect 16 Dflip-flops together. We saw in our binary counter figure from Chapter 3 that thesecollections of flip-flops must be clocked to work in unison. At each pulse of theclock, input enters the register and cannot be changed (and thus is stored) untilthe clock pulses processing on a Computer is usually done on fixed-size binary wordsstored in registers. Therefore, most computers have registers of a certain sizes include 16, 32, and 64 bits. The number of registers in a machinevaries from architecture to architecture, but is typically a power of 2, with 16 and32 being most common. Registers contain data, addresses, or control registers are specified as special purpose and may contain only data, onlyaddresses, or only control information. Other registers are more generic and mayhold data, addresses, and control information at various is written to registers, read from registers, and transferred fromregister to register.

5 Registers are not addressed in the same way memory isaddressed (recall that each memory word has a unique binary address beginningwith location 0). Registers are addressed and manipulated by the control unit modern Computer systems, there are many types of specialized registers:registers to store information, registers to shift values, registers to compare val-ues, and registers that count. There are scratchpad registers that store temporaryvalues, index registers to control program looping, stack pointer registers to 10/18/10 12:03 PM Page The Bus197age stacks of information for processes, status (or flag) registers to hold the statusor mode of operation (such as overflow, carry, or zero conditions), and generalpurpose registers that are the registers available to the programmer. Most comput-ers have register sets, and each set is used in a specific way.

6 For example, thePentium architecture has a data register set and an address register set. Certainarchitectures have very large sets of registers that can be used in quite novel waysto speed up execution of instructions. (We discuss this topic when we coveradvanced architectures in Chapter 9.) The ALUThe arithmetic logic unit(ALU) carries out the logic operations (such as com-parisons) and arithmetic operations (such as add or multiply) required during theprogram execution. You saw an example of a Simple ALU in Chapter 3. Generallyan ALU has two data inputs and one data output. Operations performed in theALU often affect bits in the status register(bits are set to indicate actions suchas whether an overflow has occurred). The ALU knows which operations to per-form because it is controlled by signals from the control The Control UnitThe control unitis the policeman or traffic manager of the CPU.

7 It monitorsthe execution of all instructions and the transfer of all information. The controlunit extracts instructions from memory, decodes these instructions, making suredata are in the right place at the right time, tells the ALU which registers to use,services interrupts, and turns on the correct circuitry in the ALU for the executionof the desired operation. The control unit uses a program counterregister to findthe next instruction for execution and a status register to keep track of overflows,carries, borrows, and the like. Section covers the control unit in more THE BUSThe CPU communicates with the other components via a bus. Abusis a set ofwires that acts as a shared but common datapath to connect multiple subsystemswithin the system. It consists of multiple lines, allowing the parallel movement ofbits. Buses are low cost but very versatile, and they make it easy to connect newdevices to each other and to the system.

8 At any one time, only one device (be it aregister, the ALU, memory, or some other component) may use the bus. However,this sharing often results in a communications bottleneck. The speed of the bus isaffected by its length as well as by the number of devices sharing it. Quite often,devices are divided into masterand slavecategories; a master device is one thatinitiates actions and a slave is one that responds to requests by a bus can be point-to-point, connecting two specific components (as seen inFigure ) or it can be a common pathwaythat connects a number of devices, 10/18/10 12:03 PM Page 197198 Chapter 4/ MARIE: An Introduction to a Simple ComputerFIGURE ) Point-to-Point Busesb) Multipoint BusesSerialPor tModemALUC ontrolUnitComputer 1 Computer 2 CPUM onitorFileServerPrinterMemoryDiskControl lerDiskControllerDisk(a)(b) 10/18/10 12:03 PM Page The Bus199 CPUMainMemoryPowerAddress LinesData LinesControl LinesI/ODeviceI/ODeviceI/O SubsystemFIGURE Components of a Typical Busrequiring these devices to share the bus (referred to as a multipointbus andshown in Figure ).

9 Because of this sharing, the bus protocol(set of usage rules) is very impor-tant. Figure shows a typical bus consisting of data lines, address lines, controllines, and power lines. Often the lines of a bus dedicated to moving data arecalled the data bus. These data lines contain the actual information that must bemoved from one location to another. Control linesindicate which device has per-mission to use the bus and for what purpose (reading or writing from memory orfrom an input/output [I/O] device, for example). Control lines also transferacknowledgments for bus requests, interrupts, and clock synchronization linesindicate the location ( , in memory) that the data should beeither read from or written to. The power linesprovide the electrical power nec-essary. Typical bus transactions include sending an address (for a read or write),transferring data from memory to a register (a memory read), and transferringdata to the memory from a register (a memory write).

10 In addition, buses are usedfor I/O reads and writes from peripheral devices. Each type of transfer occurswithin a bus cycle, the time between two ticks of the bus of the different types of information buses transport and the variousdevices that use the buses, buses themselves have been divided into differenttypes. Processor-memory busesare short, high-speed buses that are closelymatched to the memory system on the machine to maximize the bandwidth(transfer of data) and are usually design specific. I/O busesare typically longerthan processor-memory buses and allow for many types of devices with varyingbandwidths. These buses are compatible with many different architectures. Abackplane bus(Figure ) is actually built into the chassis of the machine 10/18/10 12:03 PM Page 199200 Chapter 4/ MARIE: An Introduction to a Simple ComputerSystemBusInterfaceCardsFIGURE Busconnects the processor, the I/O devices, and the memory (so all devices share onebus).


Related search queries