CONTROL UNIT CONTROL UNIT. CONTROL vs DATA PATH. Instruction Sequencing. Two main operations of Control Unit can be identified:

Similar documents
Micro-Operations. execution of a sequence of steps, i.e., cycles

Digital System Design Using Verilog. - Processing Unit Design

Lecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit

Micro-programmed Control Ch 15

Machine Instructions vs. Micro-instructions. Micro-programmed Control Ch 15. Machine Instructions vs. Micro-instructions (2) Hardwired Control (4)

Micro-programmed Control Ch 15

Microprogramming is a technique to implement the control system of a CPU using a control store to hold the microoperations.

Micro-programmed Control Ch 17

Hardwired Control (4) Micro-programmed Control Ch 17. Micro-programmed Control (3) Machine Instructions vs. Micro-instructions

Implementing the Control. Simple Questions

Chapter 4. MARIE: An Introduction to a Simple Computer 4.8 MARIE 4.8 MARIE A Discussion on Decoding

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 16 Micro-programmed Control

Chapter 20 - Microprogrammed Control (9 th edition)

Microprogramming. Bởi: Hoang Lan Nguyen. - Controller the data to move from one register to another


Module 5 - CPU Design

4. MICROPROGRAMMED COMPUTERS

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Advanced Computer Architecture

William Stallings Computer Organization and Architecture 8 th Edition. Micro-programmed Control

Microprogrammed Control Approach

ENGG3380: Computer Organization and Design Lab5: Microprogrammed Control

Controller Implementation--Part II

Chapter 17. Microprogrammed Control. Yonsei University

Processing Unit CS206T

Control Unit Implementation

Mapping Control to Hardware

MICROPROGRAMMED CONTROL

Introduction to CPU Design

Processing Unit. Unit II

Computer Logic II CCE 2010

THE MICROPROCESSOR Von Neumann s Architecture Model

MARIE: An Introduction to a Simple Computer

MARIE: An Introduction to a Simple Computer

Introduction to Computers - Chapter 4

Control unit. Input/output devices provide a means for us to make use of a computer system. Computer System. Computer.

Generating the Control Unit

Chapter 3 : Control Unit


Chapter 4. MARIE: An Introduction to a Simple Computer

Register-Level Design

EECE 417 Computer Systems Architecture

EECS150. Implement of Processor FSMs

5.7. Microprogramming: Simplifying Control Design 5.7

Multicycle Approach. Designing MIPS Processor

Microprogrammed Control

Chapter 05: Basic Processing Units Control Unit Design. Lesson 15: Microinstructions

The register set differs from one computer architecture to another. It is usually a combination of general-purpose and special purpose registers

PART A (22 Marks) 2. a) Briefly write about r's complement and (r-1)'s complement. [8] b) Explain any two ways of adding decimal numbers.

CC 311- Computer Architecture. The Processor - Control

Blog -

CISC Processor Design

Chapter 4. Chapter 4 Objectives. MARIE: An Introduction to a Simple Computer

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter

The Processor: Datapath & Control

Multicycle conclusion

Computer Architecture. Lecture 5: Multi-Cycle and Microprogrammed Microarchitectures

Micro Programming. Herman Spanjersberg

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Department of Electrical Engineering Introduction to Computer Engineering 1 Assignment 6: Computer Architecture

1. Fundamental Concepts

Materials: 1. Projectable Version of Diagrams 2. MIPS Simulation 3. Code for Lab 5 - part 1 to demonstrate using microprogramming

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store.

Chapter 4 The Von Neumann Model

Outcomes. Lecture 13 - Introduction to the Central Processing Unit (CPU) Central Processing UNIT (CPU) or Processor

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Materials: 1. Projectable Version of Diagrams 2. MIPS Simulation 3. Code for Lab 5 - part 1 to demonstrate using microprogramming

Class Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2

SISTEMI EMBEDDED. Computer Organization Central Processing Unit (CPU) Federico Baronti Last version:

Blog -

ECE369. Chapter 5 ECE369

CPU Structure and Function

Unit 8 - Week 7: Organization and Optimization of Micro-programmed Controlled Control Unit

Initial Representation Finite State Diagram. Logic Representation Logic Equations

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

structural RTL for mov ra, rb Answer:- (Page 164) Virtualians Social Network Prepared by: Irfan Khan

The Microarchitecture Level

ADVANCED COMPUTER ARCHITECTURE TWO MARKS WITH ANSWERS

Chapter 16. Control Unit Operation. Yonsei University

Objective now How are such control statements registers and other components Managed to ensure proper execution of each instruction

Computer Organization Control Unit. Department of Computer Science Missouri University of Science & Technology

ENE 334 Microprocessors

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Data Paths and Microprogramming

Where Does The Cpu Store The Address Of The

CS Computer Architecture

CPE 335. Basic MIPS Architecture Part II

COMPUTER STRUCTURE AND ORGANIZATION

Chapter 4 The Processor (Part 2)

William Stallings Computer Organization and Architecture

Microprogramming. Chapter Hardwired control unit

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Outline of today s lecture. EEL-4713 Computer Architecture Designing a Multiple-Cycle Processor. What s wrong with our CPI=1 processor?

Computer Architecture

William Stallings Computer Organization and Architecture

William Stallings Computer Organization and Architecture. Chapter 11 CPU Structure and Function

Micro computer Organization

2 MARKS Q&A 1 KNREDDY UNIT-I

Microcomputer Architecture and Programming

Microprogramming: Basic Idea

Transcription:

CONTROL UNIT CONTROL UNIT of the Microprocessor Two main operations of Control Unit can be identified: Instruction sequencing - the methods by which instructions are selected for execution or, the manner in which control of the processor is transferred from one instruction to another Instruction interpretation - the methods used for activating the control signals that cause the data processing unit to execute the instruction. 2 CONTROL vs DA PATH Digital system: data path control path The data processing path is a network of functional units capable of performing certain operations on data The control unit issues control signals to the data processing part These control signals select the functions to be performed at specific times and route the data through the appropriate functional units The data processing path is logically reconfigured by the control unit to perform certain sets of (micro) operations Instruction Sequencing The simplest method of controlling the sequence in which instructions are executed is to have each instruction explicitly specify the address of its successor (or successors, if more than one possibility exists) Explicit inclusion of instruction addresses in all instructions has the disadvantage of substantially increasing instruction length Most instructions in a typical program have a unique successor If an instruction Ii is stored in memory location A, and I i has a unique successor I i+1, then it is natural to store I i+1 in the location that immediately follows A (A+1 or A+k, where k is the length in words of I i ). 3 4

Instruction Sequencing Use of a Program Counter (PC) or instruction address register The address of instruction I i+1 can then be determined by incrementing PC thus: PC PC + k where k is the length in words of Ii If I i must be fetched from main memory one word at a time, then PC is automatically incremented by one (k) before each new instruction word is read Consequently, after all words of I have been fetched, PC points to I i+1 A program counter (PC) makes it unnecessary for an instruction to specify the address of its successor, if the program is a linear sequence of instructions 5 Instruction Sequencing Branch instructions specify implicitly an instruction address X. An unconditional branch always alters the flow of program control by causing the operation PC X A conditional branch instruction first tests for some condition C within the processor; C is typically a property of a result generated by an earlier instruction and stored in a status register. If C is true, then PC X, otherwise PC is incremented to point to the next consecutive instruction. 6 INSTRUCTION INRPRETION Instruction interpretation Control Unit (CU) decodes an instruction and generates control signals. Type of control signals (outputs from CU): Controls that select the functions to be performed by data-path at specific times - main job of CU. Controls with other processors (state controls, synchronization, request for control of buses, etc.) There are also synchronization signals (inputs to CU): State and condition information from the datapath and memory interface unit that can modify the sequence of controls generated by CU. State and condition information from other processors (start, stop, acknowledge, busy, etc.) C out directly control data-path. The main purpose of the CU C in feedback from data-path. Can modify the sequence of C out (Conditions, interrupts, and state) C sout to other control unites (State, synchronization, (busy), bus request, confirmations) C sin from others controllers (State, start, stop. Similar to Csout) Data Input C sin C out Control Unit Data-path Cin C sout Data Output 7 8

Control Unit Instruction interpretation The control unit tells the data-path what to do every clock cycle during the execution of instructions This is typically specified by a finite-state diagram Every state corresponds to one clock cycle, and the operations to be performed during the clock cycle are written within the state. Each instruction takes several clock cycles to complete MAR PC IR M[MAR] PC PC+k Decode Op-code Memory access not complete Memory access complete Two methods for Control Unite implementation: hardwired control microprogrammed control 9 10 Hardwired control Hardwired control Turning a state diagram into hardware is the next step. The alternatives for doing this depend on the implementation technology. One way to bound the complexity of control is by the product States * Control inputs * Control outputs where: States = the number of states in the finite-state machine controller; Control inputs = the number of signals examined by the control unit; Control outputs = the number of control outputs generated for the hardware, including bits to specify the next state. Example: the finite-state diagram contains 50 states (requiring 6 bits to represent the state) 3 bits to select conditions from the data-path and memory interface unit 12 bits for the op-code of an instruction Control Hardwired logic 40 bits wide 2 (12+3+6) =2 21 entries 12 Instruction Register 3 6 State Control Lines Data-path 11 12

Hardwired control Control can be specified as a big table Each row of the table contains the values of the control lines to perform the operations required by the state and supplies the next state number. In figure we assume that there are 40 control lines. The straightforward implementation of a table is with a read only memory (ROM) ROM will require: 2 21 words, each 40 bits wide (10 MB of ROM!) But, little of this table has unique information, so its size can be reduced by keeping only the rows with unique information - at the cost of more complicated address decoding Such a hardware construct is called a programmed logic array (PLA) The solution, introduced by Maurice Wilkes, was to turn the control unit into a miniature computer by having two tables: a table to specify control of the data-path and a table to determine control flow at the micro level Wilkes called his invention microprogramming and attached the prefix "micro" to traditional terms used at the control level: microinstruction, microcode, microprogram Microinstructions specify all the control signals for the data-path, plus the ability to conditionally decide which microinstruction should be executed next Once the data-path and memory for the microinstructions are designed, control becomes essentially a programming task; that is the task of writing an interpreter for the instruction set The invention of microprogramming enabled the instruction set to be changed by altering the contents of control store without touching the hardware. 13 14 Control Microprogram memory Control Lines Datapath The structure of a microprogram is very similar to the state diagram, with a microinstruction for each state in the diagram. While it doesn't matter to the hardware how the control lines are grouped within a microinstruction, control lines performing related functions are traditionally placed next to each other for ease of understanding Groups of related control lines are called fields and are given names in a microinstruction format: 1 Microinstruction PC + Destination ALU operation Source 1 Source 2 Misc Cond Jump address Address select logic Instruction register 15 16

Reducing hardware costs by encoding control lines Instrrctions Microsequencer Instructions Microsequencer For example If no more than one of 8 lines is set simultaneously in the same microinstruction, then they can be encoded into a 3-bit field Extra hardware cost of a 3-to-8 decoder Extra time needed... Field... Field B... (3 bits) (2 bits) Decoder 1:8... Decoder 1:4 A0 A1 A7 B0 B1 B2 B3 8 resorces controlled 4 resources controlled Vertical ui Pipeline structures seqvencing Microinstruction no. µi(n+2) µi(n+1) µi(n) Control memory (microprograms) (a) control Time (c) seqvencing Microinstruction no. µi(n+2) µi(n+1) µi(n) Control memory (microprograms) Microinstruction register control Time 17 (b) (d) 18 Nanoprogramming Orders µs ns nmc µmc nri µri sequencing Controls CPU internal hardware sequencing 19