Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.

Slides:



Advertisements
Similar presentations
Control Unit Implemntation
Advertisements

Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Arithmetic Logic Unit (ALU)
CS1104: Computer Organisation School of Computing National University of Singapore.
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Microprocessors. Von Neumann architecture Data and instructions in single read/write memory Contents of memory addressable by location, independent of.
Computer Architecture
Introduction to CPU Design
Execution of an instruction
Chapter 16 Control Unit Operation No HW problems on this chapter. It is important to understand this material on the architecture of computer control units,
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
Chapter 7. Basic Processing Unit
CPEN Digital System Design Chapter 9 – Computer Design
Computer Organization and Architecture
Basic Processing Unit (Week 6)
Computer Architecture Lecture 12 Fasih ur Rehman.
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
Chapter 7 Processing Unit
Chapter 5 Basic Processing Unit
TEAM 1: Miguel Harmant Rodney Rodriguez Elias Crespo Javier Parra Alfredo Alonso Marc-Wayne Anglin.
Lec 5 Introduction to CPU Design. Introduction to CPU Design Computer Organization & Assembly Language Programming slide 2 Outline  Introduction  Data.
Lecture 16 Today’s topics: –MARIE Instruction Decoding and Control –Hardwired control –Micro-programmed control 1.
Introduction to Computer Organization and Architecture Micro Program ภาษาเครื่อง ไมโครโปรแกรม.
Multiple-bus organization
EXECUTION OF COMPLETE INSTRUCTION
Computer Design Basics
Computer Architecture Lecture 09 Fasih ur Rehman.
Introduction to CPU Design COE 205 Computer Organization and Assembly Language Dr. Aiman El-Maleh College of Computer Sciences and Engineering King Fahd.
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
1 Control Unit Operation and Microprogramming Chap 16 & 17 of CO&A Dr. Farag.
Microprogrammed Control Chapter11:. Two methods for generating the control signals are: 1)Hardwired control o Sequential logic circuit that generates.
In1210/01-PDS 1 TU-Delft The Processing Unit. in1210/01-PDS 2 TU-Delft Problem f y ALU y Decoder a instruction Reg ?
Computer architecture
UNIT-III CONTROL UNIT DESIGN
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Chapter 3 Basic Processing Unit.
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
MICROPROGRAMMED CONTROL
GROUP 2 CHAPTER 16 CONTROL UNIT Group Members ๏ Evelio L. Hernandez ๏ Ashwin Soerdien ๏ Andrew Keiper ๏ Hermes Andino.
Please see “portrait orientation” PowerPoint file for Chapter 7 Figure 7.1. Single-bus organization of the datapath inside a processor.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Chapter 10 Control Unit Operation “Controls the operation of the processor”
BASIC COMPUTER ARCHITECTURE HOW COMPUTER SYSTEMS WORK.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Functions of Processor Operation Addressing modes Registers i/o module interface Memory module interface Interrupts.
Basic Computer Organization and Design
Computer Organization and Architecture + Networks
Computer Organization
William Stallings Computer Organization and Architecture
Overview Control Memory Comparison of Implementations
UNIT 4 Control Unit. UNIT 4 Control Unit Single CPU Bus CPU Bus MUX Temp PC R0 R(n-1) Instruction Decoder IR MAR MDR Z Y ALU Carry In Address Lines.
Basic Processing Unit Unit- 7 Engineered for Tomorrow CSE, MVJCE.
Functional Units.
Computer Organization “Central” Processing Unit (CPU)
Computer Organization and Design
Some Fundamental Concepts
Control Unit Introduction Types Comparison Control Memory
Chapter 7. Basic Processing Unit
Chapter 7. Basic Processing Unit
Fundamental Concepts Processor fetches one instruction at a time and perform the operation specified. Instructions are fetched from successive memory locations.
William Stallings Computer Organization and Architecture 8th Edition
Computer Architecture
Chapter 14 Control Unit Operation
Basic Processing Unit UNIT-5.
Processor Organization and Architecture
Presentation transcript:

Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface

1 Multiple-bus organization  Simple single-bus structure:  Results in long control sequences, because only one data item can be transferred over the bus in a clock cycle.  Most commercial processors provide multiple internal paths to enable several transfers to take place in parallel.  Multiple-bus organization.

2 Multiple bus organization (contd..) Instruction decoder Register file Constant 4 ALU MDR A B R MUX PC Incrementer MAR IR Memory address lines Memory data lines Bus ABus BBus C

3 Multiple bus organization (contd..)  Three-bus organization to connect the registers and the ALU of a processor.  All general-purpose registers are combined into a single block called register file.  Register file has three ports.  Two outputs ports connected to buses A and B, allowing the contents of two different registers to be accessed simultaneously, and placed on buses A and B.  Third input port allows the data on bus C to be loaded into a third register during the same clock cycle.  Inputs to the ALU and outputs from the ALU:  Buses A and B are used to transfer the source operands to the A and B inputs of the ALU.  Result is transferred to the destination over bus C.

4 Multiple bus organization (contd..)  ALU can also pass one of its two input operands unmodified if needed:  Control signals for such an operation are R=A or R=B.  Three bus arrangement obviates the need for Registers Y and Z in the single bus organization.  Incrementer unit:  Used to increment the PC by 4.  Source for the constant 4 at the ALU multiplexer can be used to increment other addresses such as the memory addresses in multiple load/store instructions.

5 Multiple bus organization (contd..) Three operand instruction : ADD R4, R5, R6 Step Action 1PC out,R=B,MAR in,Read,IncPC 2WMFC 3MDR outB,R=B,IR in 4R4 outA,R5 outB,SelectA,Add,R6 in,End 1. Pass the contents of the PC through ALU and load it into MAR. Increment PC. 2. Wait for MFC. 3. Load the data received into MAR and transfer to IR. 4. Execution of the instruction is the last step.

6 Control unit  To execute instructions the processor must generate the necessary control signals in proper sequence.  Hardwired control:  Control unit is designed as a finite state machine.  Inflexible but fast.  Appropriate for simpler machines (e.g. RISC machines)  Microprogrammed control:  Control path is designed hierarchically using principles identical to the CPU design.  Flexible, but slow.  Appropriate for complex machines (e.g. CISC machines)

7 Hardwired control StepAction 1PC out,MAR in,Read,Select4,Add,Z in 2Z out,PC in,Y,WMFC 3MDR out,IR in 4R3 out,MAR in,Read 5R1 out,Y in,WMFC 6MDR out,SelectY,Add,Z in 7Z out,R1 in,End Each step in this sequence is completed in one clock cycle. A counter may be used to keep track of the control steps. Each state or count, of this counter corresponds to one control step.

8 Hardwired control (contd..)  Required control signals are determined by the following information:  Contents of the control step counter. Determines which step in the sequence.  Contents of the instruction register. Determines the actual instruction  Contents of the condition code flags. Used for example in a BRANCH instruction.  External input signals such as MFC.

9 Hardwired control (contd..) Control unit organization CLK Clock Control step IR encoder Decoder/ codes counter inputs Condition External Control signals Control unit consists of a decoder/encoder block to accept the following inputs: - Control step counter. - Instruction Register. - Condition codes - External inputs. Generates control signals.

10 Hardwired control (contd..)

11 Hardwired control (contd..) Control signals such as Z in, PC out, ADD are generated by encoder block Suppose if Z in is asserted: - During T 1 for all instructions. - During T 6 for ADD instruction. - During T 4 for unconditional BRANCH instruction T 1 ADD BRANCH T 4 T 6

12 Hardwired control (contd..)  Control hardware can be viewed as a state machine:  Changes state every clock cycle depending on the contents of the instruction register, condition codes, and external inputs.  Outputs of the state machine are control signals:  Sequence of control signals generated by the machine is determined by wiring of logic elements, hence the name “hardwired control”.  Speed of operation is one of the advantages of hardwired control is its speed of operation.  Disadvantages include:  Little flexibility.  Limited complexity of the instruction set it can implement.

13 Microprogrammed control  Hardwired control generates control signals using:  A control step counter.  Decoder/encode circuit.  Microprogrammed control:  Control signals are generated by a program similar to machine language programs.

14 Microprogrammed control (contd..) Control Word (CW) is a word whose individual bits represent various control signals. StepAction 1PC out,MAR in,Read,Select4,Add,Z in 2Z out,PC in,Y,WMFC 3MDR out,IR in 4R3 out,MAR in,Read 5R1 out,Y in,WMFC 6MDR out,SelectY,Add,Z in 7Z out,R1 in,End Control Signals: PC out PC in MAR in Read MDR out IR in Y in SelectY Select4 Add Z in Z out R1 out R1 in R3 out WMFC End At every step, some control signals are asserted (=1) and all others are 0.

15 Microprogrammed control (contd..) PC in PC out MAR in Read MDR out IR in Y Select Add Z in Z out R1 out R1 in R3 out WMFC End Micro - instruction At every step,a Control Word needs to be generated. Every instruction will need a sequence of CWs for its execution. Sequence of CWs for an instruction is the microroutine for the instruction. Each CW in this microroutine is referred to as a microinstruction. (SelectY is represented by Select=0, & Select4 by Select=1)

16 Microprogrammed control (contd..)  Every instruction will have its own microroutine which is made up of microinstructions.  Microroutine for all instructions in the instruction set of a computer are stored in a special memory called Control Store.  Recall that the Control Unit generates the control signals:  Sequentially reading the CWs of the corresponding microroutine from the control store.

17 Microprogrammed control (contd..) store Control generator Starting address CW Clock  PC IR Basic organization of a microprogrammed control unit. Microprogram counter (  PC) is used to read CWs from control store sequentially. When a new instruction is loaded into IR, Starting address generator generates the starting address of the microroutine. This address is loaded into the  PC.  PC is automatically incremented by the clock, so successive microinstructions are read from the control store.

18 Microprogrammed control (contd..)  Basic organization of the microprogrammed control unit cannot check the status of condition codes or external inputs to determine what should be the next microinstruction.  Recall that in the hardwired control, this was handled by an appropriate logic function.  How to handle this in microprogrammed control:  Use conditional branch microinstructions.  These microinstructions, in addition to the branch address also specify which of the external inputs, condition codes or possibly registers should be checked as a condition for branching.

19 Microprogrammed control (contd..) Fetch BRANCH<0 instruction, microroutine is at address 25. Branch to address 25. Test the N bit of the condition codes If 0, go to 0 and get new instr. Else execute microinstruction located at 26 and put the branch target address into Register Z. ( Microinstruction at location 27 ). Address 25 is the output of starting address generator and is loaded into the microprogram counter (  PC ).

20 Microprogrammed control (contd..) Control Unit with Conditional Branching in the Microprogram Control store Clock generator Starting and branch address Condition codes inputs External CW IR  PC Starting and branch address generator instead of starting address generator.

21 Microprogrammed control (contd..)  Starting and branch address generator accepts as inputs:  Contents of the Instruction Register (as before).  External inputs  Condition codes  Generates a new address and loads it into microprogram counter (  PC ) when a microinstruction instructs it do so.   PC is incremented every time a microinstruction is fetched except:  New instruction is loaded into IR,  PC is loaded with the starting address of the microroutine for that instruction.  Branch instruction is encountered and branch condition is satisfied,  PC is loaded with the branch address.  End instruction is encountered,  PC is loaded with the address of the first CW in the microroutine for the instruction fetch cycle.