Presentation is loading. Please wait.

Presentation is loading. Please wait.

Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.

Similar presentations


Presentation on theme: "Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems."— Presentation transcript:

1 Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems Fundamentals Lecture 28 – Computer Design Basics

2 Chapter 10 2 Overview  Datapaths ALU Shifter Datapath representation Datapath operations  Control word  Simple Computer Architecture Instruction Set Architecture (ISA) Instruction Formats  Single-Cycle Hardwired Control

3 Chapter 10 3 Designing Computers 101  We describe a computer’s appearance (as seen by a programmer) at the lowest level as an instruction set architecture (ISA). The instructions and operands a machine can use are the basis of the ISA.  At a basic level, the computer architecture is divided into datapath and control.  This datapath is defined by a set of registers, the possible microoperations, and the control interface.

4 Chapter 10 4 The Basic Datapath  A basic datapath will consist of two major components; The register file, which contains the register set and the logic required to be able to supply operands for operations and to store the results of operations in the destination register(s). The function unit, which performs the actual transformations required to complete microoperations.

5 Chapter 10 5 Datapath  Two major components: The register file The function unit

6 Chapter 10 6 The ALU  Instead of dedicated logic per register, computers have a shared logic unit This is the arithmetic logic unit, or ALU.  The ALU is a combinational circuit that performs; Arithmetic (add/subtract/complement) Logical operations (AND/OR/XOR/NOT) The ALU may or may not perform shifts.

7 Chapter 10 7 Shifter Design  Shift registers Parallel load, shift left or right, read out value  Separate register from shift logic and place shift logic in ALU Use multiplexers to implement 4-bit shift logic capable of arithmetic and logical, left and right shifts

8 Chapter 10 8 Datapath Representation  Datapath contains: Register file Function unit Additional logic and connections for system interaction (i.e. memory read/write, external constants, etc.)

9 Chapter 10 9 Datapath Operation  The datapath completes a single microoperation each clock cycle.  For given microoperation, we need to specify;  Source registers  Destination register  Operation to perform  For the datapath, we also need to specify;  External or function data  Data B from register or constant  Whether the destination is updated

10 Chapter 10 10 Control Word  The required information to specify a datapath operation is encoded in a control word. A uniform format that covers all operations is desirable – note that some information is not needed for all operations.

11 Chapter 10 11 The Control Word Fields  Fields DA – D Address AA – A Address BA – B Address MB – Mux B FS – Function Select MD – Mux D RW – Register Write Control word DAAABA M B FS M D R W 1514131211109876543210

12 Chapter 10 12 Stored Program Computer  Control words operate the datapath  Store control words in memory Sequence through them to perform a series of computational steps  This is what a computer does

13 Chapter 10 13 Simple Computer Architecture  A computer is controlled by a series of instructions. Instructions are binary words that are used to determine both the datapath processing and the control behavior.  A program is a collection of instructions that are used to accomplish some task(s).  A program counter (PC) is used to keep track of the address of the next instruction in memory. The PC has counting logic, as well as parallel load and other logic to permit changes in the instruction sequence.

14 Chapter 10 14 Simple Computer Architecture  Changes in the instruction sequence can be either conditional or unconditional.  Instructions are executed by activating the necessary microoperations to perform the specified task.  Note that the computer uses programmable control, but we will use a hardwired control unit to actually implement the programmable control.

15 Chapter 10 15 Instruction Set Architecture (ISA)  The instruction set architecture (ISA) a comprehensive description of the instructions a computer can execute.  The ISA has three major components Storage Resources Instruction Formats Instruction Specification

16 Chapter 10 16 Storage Resources  From the programmer’s viewpoint, the computer has various resources available for storing information Register file Program counter (PC) Instruction memory (program memory) Data memory  Data and program memory may be distinct, or they may exist in the same memory.

17 Chapter 10 17 Instruction Formats  Instructions are divided into bit groupings called fields. Each field will contain a specific part of the instruction. Operation code (opcode)  An n-bit opcode can specify up to 2 n different operations. Operand(s)  Registers  Addresses  Constant data Operands may be specified implicitly as well.

18 Chapter 10 18 Instruction Formats  The source(s) and destination of an instruction can all be registers.  The opcode field determines what the actual register transfer operation will be. The source registers are read and the new information is written to the destination register. All registers are explicitly identified (usually).

19 Chapter 10 19 Instruction Formats  Immediate operands are data constants contained within the instruction.  Note that only three bits of data can be specified here, so it must be extended to the register length by zero-fill or sign-extension. Clever encodings enable wider immediates  RR format, RI format, B format

20 Chapter 10 20 Instruction Formats  Changes in program flow are caused by jump or branch instructions, affecting only the PC. Can load the PC from source register A. Can add the sign-extended 6-bit offset (AD) to the PC. Can be either unconditional, or conditional based on some flag value (i.e. Z, N, C, V).

21 Chapter 10 21 Instruction Specifications  The instruction specifications describe in detail each instruction the system can execute.  A mnemonic is by the programmer to represent the opcode in text, an assembler then generates the actual binary instruction.  Not every instruction sets every flag Refer to Table 10-8 on p. 454

22 Chapter 10 22 Single-Cycle Hardwired Control  In single-cycle hardwired control, the PC is updated on each clock cycle. Each instruction is completed in a single cycle.  The PC is used to select a word from the instruction memory, which is driven to the instruction decoder.  The instruction decoder then provides the control word to the datapath to activate the desired functionality, and determines how the PC is updated.

23 Chapter 10 23 Control Unit The constant field is zero-filled and made available to the datapath The concatenated offset field is sign-extended for PC-relative addressing. PL – if 0, the PC increments, otherwise the update is controlled by JB JB – if 0, do conditional branch, otherwise do unconditional jump BC – if 0, do BRZ, otherwise do BRN MW – if 1, will write to external memory The instruction decoder maps the instruction word to a control word. Good design practice is to minimize the complexity of this operation.

24 Chapter 10 24 Single-Cycle Computer Issues  Complex operations Only combinational logic can be used in data transformation – no sequential logic  E.g. no multiplier  Unified memory If program and data are in one memory, how can you simultaneously access the same memory for an instruction and a data operand?  Worst-case delay

25 Chapter 10 25 Summary  Datapaths ALU Shifter Datapath representation Datapath operations  Control word  Simple Computer Architecture Instruction Set Architecture (ISA)  Storage, Instruction Formats & Specifications  Single-Cycle Hardwired Control

26 Chapter 10 26 Terms of Use  © 2004 by Pearson Education,Inc. All rights reserved.  The following terms of use apply in addition to the standard Pearson Education Legal Notice.Legal Notice  Permission is given to incorporate these materials into classroom presentations and handouts only to instructors adopting Logic and Computer Design Fundamentals as the course text.  Permission is granted to the instructors adopting the book to post these materials on a protected website or protected ftp site in original or modified form. All other website or ftp postings, including those offering the materials for a fee, are prohibited.  You may not remove or in any way alter this Terms of Use notice or any trademark, copyright, or other proprietary notice, including the copyright watermark on each slide.  Return to Title Page Return to Title Page


Download ppt "Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems."

Similar presentations


Ads by Google