CSE 241 Computer Organization Lecture # 8 Ch. 7 Control Unit Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.

Slides:



Advertisements
Similar presentations
CS364 CH16 Control Unit Operation
Advertisements

Damian BrowneLuis PabonPedro Tovar The operation of a computer in executing a program consists of a sequence of Instruction Cycles, with one machine.
PART 5: (2/2) Processor Internals CHAPTER 15: CONTROL UNIT OPERATION 1.
ARITHMETIC LOGIC SHIFT UNIT
Computer Organization and Architecture
CHAPTER 16 – CONTROL UNIT OPERATION
Computer Organization and Architecture
Instruction Set Architecture & Design
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.
Computer Organization and Architecture
CH12 CPU Structure and Function
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Group 1 Michael Bouizza Rolando Abreu Carlos De Cossio Ricardo Urena Michael Hernandez Robert Romano Sun Li Yang.
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
TEAM 1: Miguel Harmant Rodney Rodriguez Elias Crespo Javier Parra Alfredo Alonso Marc-Wayne Anglin.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Introduction to Computer Organization and Architecture Micro Program ภาษาเครื่อง ไมโครโปรแกรม.
Computer Architecture Lecture 2 System Buses. Program Concept Hardwired systems are inflexible General purpose hardware can do different tasks, given.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
1 Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can be specified with register transfer statements.
Fetch-execute cycle.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Machine Instructions.
UNIT-III CONTROL UNIT DESIGN
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Chapter 6: Computer Components Dr Mohamed Menacer Taibah University
Register Transfer Languages (RTL)
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
GROUP 2 CHAPTER 16 CONTROL UNIT Group Members ๏ Evelio L. Hernandez ๏ Ashwin Soerdien ๏ Andrew Keiper ๏ Hermes Andino.
PART 4: (1/2) Central Processing Unit (CPU) Basics CHAPTER 12: P ROCESSOR S TRUCTURE AND F UNCTION.
Control Unit Operations Chapter10:. What is Control Unit (CU)?(1)  Part of a CPU or other device that directs its operation.  Tells the rest of the.
Chapter 10 Control Unit Operation “Controls the operation of the processor”
Processor Organization
Processor Organization and Architecture Module III.
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
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.
Computer Organization and Architecture + Networks
Control Unit Operation
Lecture 13 - Introduction to the Central Processing Unit (CPU)
CHAPTER 4 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Chapter 9 a Instruction Level Parallelism and Superscalar Processors
Micro-Operations A computer executes a program Fetch/execute cycle
William Stallings Computer Organization and Architecture
William Stallings Computer Organization and Architecture 7th Edition
Computer Organization and Design
Chapter 15 Control Unit Operation
Computer Organization and ASSEMBLY LANGUAGE
William Stallings Computer Organization and Architecture 7th Edition
Chapter 14 Control Unit Operation
William Stallings Computer Organization and Architecture 8th Edition
By: A. H. Abdul Hafez Computer Architecture and Organization: L06: Stored program and Instruction code.
Chapter 14 Control Unit Operation
William Stallings Computer Organization and Architecture 10th Edition
CPU Structure and Function
A Top-Level View Of Computer Function And Interconnection
Information Representation: Machine Instructions
Computer Architecture
Presentation transcript:

CSE 241 Computer Organization Lecture # 8 Ch. 7 Control Unit Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering

Course Web Page —

General-purpose arithmetic and logic functions Data Results Instruction Interpreter Instruction codes Control signals Each code is an instruction. A sequence of codes (or instructions) is called software. CPU

Micro-operations A computer executes programs. A program is a sequence of instructions  instruction cycles. Each instruction is made up of smaller units (subcycles). —e.g., fetch/execute subcycles. Each subcycle has a number of steps. Each step has a number of micro-operations. Each micro-operation does very little. Micro-operation is an atomic operation of CPU. Any instruction can be described as a sequence of micro-operations.

Constituent Elements of Program Execution

Fetch Subcycle MAR MBR PC IR AC Memory Address Register (MAR) —Connected to address bus. —Specifies address for read or write operation. Memory Buffer Register (MBR) —Connected to data bus. —Holds data to write or last data read. Program Counter (PC) —Holds address of next instruction to be fetched. Instruction Register (IR) —Holds last instruction fetched.

Fetch Sequence Address of next instruction is in PC. Address (MAR) is placed on address bus. Control unit issues READ command. Result (data from memory) appears on data bus. Data from data bus copied into MBR. PC incremented by 1 (in parallel with data fetch from memory). Data (instruction) moved from MBR to IR. MBR is now free for further data fetches.

Fetch Sequence (symbolic) t 1 :MAR ← (PC) t 2 :MBR ← (memory), PC ← (PC) +I t 3 :IR ← (MBR) (tx = time unit/clock cycle) Micro-operations take equal times. Or t 1 :MAR ← (PC) t 2 :MBR ← (memory) t 3 :PC ← (PC) +I, IR ← (MBR) Step Micro-operation t1t1 t2t2 t3t3

Proper sequence must be followed MAR ← (PC) must precede MBR ← (memory) Conflicts must be avoided Must not read & write same register at same time. MBR ← (memory) & IR ← (MBR) must not be in same step (cycle). PC ← (PC) +1 involves addition Use ALU. May need additional micro-operations. Rules for Clock Cycle Grouping

Indirect Subcycle MAR ← (IRaddress) - address field of IR MBR ← (memory) IRaddress ← (MBR) MBR contains an address. IR is now in same state as if direct addressing had been used.

Interrupt Subcycle At the end of the execute subcycle, interrupts are tested. Some interrupt occurred  interrupt subcycle. t 1 :MBR ← (PC) t 2 :MAR ← save-address, PC ← routine-address t 3 :memory ← (MBR) This is a minimum May be additional micro-ops to get addresses. N.B. saving context is done by interrupt handler routine, not micro-ops.

Execute Subcycle (ADD) Execute subcycle is different for each instruction. ADD R1, X Add the contents of location X to register R1, result in R1 t 1 :MAR ← (IRaddress) t 2 :MBR ← (memory) t 3 :R1 ← R1 + (MBR) Note no overlap of micro-operations.

Execute Subcycle (ISZ) ISZ X - increment and skip if zero t 1 :MAR ← (IRaddress) t 2 :MBR ← (memory) t 3 :MBR ← (MBR) + 1 t 4 :memory ← (MBR) if (MBR) == 0 then PC ← (PC) + 1 Notes: “If …” is a single micro-operation. Micro-operations done during t 4.

Functional Requirements of Control Unit 1.Define basic elements of processor ALU Registers Internal data paths External data paths Control Unit 2.Describe micro-operations processor performs Transfer data between registers. Transfer data from register to external/system bus. Transfer data from external/system bus to register. Perform arithmetic or logical operations. 3.Determine functions control unit must perform Sequencing: Causing the CPU to step through a series of micro-operations in the proper sequence. Execution: Causing each micro-operation to be performed.

Model of the Control Unit

Control Unit – Inputs and Outputs Inputs Clock: One micro-operation (or set of parallel micro-operations) per clock cycle. Instruction register Opcode for current instruction. Determines which micro-operations are performed. Flags State of CPU. Results of previous operations. Control signals from control bus Interrupts. Acknowledgements. Outputs (control signals) Within CPU Causes data movement. Activates specific functions. Via control bus: to memory and to I/O modules.

Data Paths and Control Signals MAR ← (PC) - Control unit activates signal to open gates between PC and MAR: C 2 MBR ← (memory) - Open gates between MAR and address bus : C 0 - Memory read control signal. - Open gates between data bus and MBR : C 5 Instruction Fetch

Internal Organization Usually a single internal bus. Gates control movement of data onto and off the bus. Control signals control data transfer to and from external systems bus. Temporary registers needed for proper operation of ALU. t 1 : MAR ← (IRaddress) t 2 : MBR ← (memory) t 3 : Y ← (MBR) t 4 : Z ← (AC) + (Y) t 5 : AC ← (Z) ALU