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

Similar documents
Chapter 16. Control Unit Operation. Yonsei University

William Stallings Computer Organization and Architecture

Processing Unit CS206T

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

There are four registers involved in the fetch cycle: MAR, MBR, PC, and IR.

Microprogrammed Control

Chapter 3 : Control Unit

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

Module 5 - CPU Design

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

Digital System Design Using Verilog. - Processing Unit Design

Chapter 20 - Microprogrammed Control (9 th edition)

Blog -

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


Advanced Computer Architecture

CPU Structure and Function

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

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

William Stallings Computer Organization and Architecture

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

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

Micro-programmed Control Ch 17

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

Chapter 17. Microprogrammed Control. Yonsei University

DC57 COMPUTER ORGANIZATION JUNE 2013

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

CPU Structure and Function

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

MICROPROGRAMMED CONTROL

Blog -

CPU Structure and Function. Chapter 12, William Stallings Computer Organization and Architecture 7 th Edition

BASIC COMPUTER ORGANIZATION AND DESIGN

CHAPTER 5 Basic Organization and Design Outline Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle

Computer Organization (Autonomous)

csitnepal Unit 3 Basic Computer Organization and Design

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

Introduction to CPU Design

Computer Logic II CCE 2010

BASIC COMPUTER ORGANIZATION AND DESIGN

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

Basic Computer Organization - Designing your first computer. Acknowledgment: Most of the slides are adapted from Prof. Hyunsoo Yoon s slides.

SCRAM Introduction. Philipp Koehn. 19 February 2018

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

Lecture 10: Control Unit

Implementing the Control. Simple Questions

Lecture 10: Control Unit

ENGG3380: Computer Organization and Design Lab5: Microprogrammed Control

UNIT- 5. Chapter 12 Processor Structure and Function

UNIT:2 BASIC COMPUTER ORGANIZATION AND DESIGN

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

Processing Unit. Unit II

Computer Organization CS 206 T Lec# 2: Instruction Sets

4. MICROPROGRAMMED COMPUTERS

Generating the Control Unit

Basic Computer Organization and Design Part 2/3

Lecture 11: Control Unit and Instruction Encoding

Author : Dalbir Singh, Computer Science Deptt. CPU Structure and Functions. 1. Processor Organization

General purpose registers These are memory units within the CPU designed to hold temporary data.

ADVANCED COMPUTER ARCHITECTURE TWO MARKS WITH ANSWERS

Unit II Basic Computer Organization

Chapter 4 The Von Neumann Model

THE MICROPROCESSOR Von Neumann s Architecture Model

PESIT Bangalore South Campus

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

1. Fundamental Concepts

MARIE: An Introduction to a Simple Computer

BASIC COMPUTER ORGANIZATION AND DESIGN


Computer Architecture

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

5-1 Instruction Codes

COMPUTER STRUCTURE AND ORGANIZATION

Major and Minor States

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

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

Faculty of Engineering Systems & Biomedical Dept. First Year Cairo University Sheet 6 Computer I

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

Basic Processing Unit (Chapter 7)

COMPUTER ORGANIZATION

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

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

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.

Chapter 12. CPU Structure and Function. Yonsei University

Running Applications

Computer organization and architecture UNIT-I 2 MARKS

The Processing Unit. TU-Delft. in1210/01-pds 1

Course Description: This course includes concepts of instruction set architecture,

Computer Architecture Programming the Basic Computer

MARIE: An Introduction to a Simple Computer

2 MARKS Q&A 1 KNREDDY UNIT-I

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Chapter 4. MARIE: An Introduction to a Simple Computer

General Purpose Processors

CC312: Computer Organization

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

Register-Level Design

Transcription:

Micro-Operations Instruction execution execution of a sequence of steps, i.e., cycles Fetch, Indirect, Execute & Interrupt cycles Cycle - a sequence of micro-operations Micro-operations data transfer between registers transfer between a register & an external bus ALU operation

Control Unit Atomic Operations CU causes the processor to step through a series of micro-operations in the proper sequence CU generates the control signals that cause each micro-operation to be executed Micro-Operations are the atomic operations of the Processor Control signals open & closes the logic gates transfer of data to & from the registers operation of the ALU Implementation of Control Unit Hardwired Microprogrammed, i.e., microinstructions

Constituent Elements of Program Execution

Functional Specifications of a Operations Addressing Modes Registers user visible Processor I/O Module Interface Memory Module Interface Bus Specification Defined by the Instruction Set Defined by the System Interrupts Defined by System Bus Specification & Operating System Support Execution Time Sequence of Instructions is not necessarily the same as the Written Sequence of Instructions in the Program (branching instructions)

Fetch - 4 Registers Memory Address Register (MAR) Connected to address lines of system bus Specifies address for read or write operation Memory Buffer Register (MBR) Connected to data lines of system 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) [micro-code RISC, length == 1] Data (instruction) moved from MBR to IR MBR is now free for further data fetches

Fetch Sequence (symbolic) t1: MAR <- (PC); CU issues READ command t2: MBR <- (memory) simultaneously PC <- (PC) +I t3: IR <- (MBR) where tx refers to the time unit/clock cycle ------------------ or ------------------ t1: MAR <- (PC) t2: MBR <- (memory) t3: PC <- (PC) +1 IR <- (MBR)

Interrupt Cycle completion of the execute cycle test for interrupt occurrences -- process pending interrupts t1: MBR (PC) t2: MAR Save_Address for PC contents PC address of start of interrupt processing routine, i.e., the interrupt Processing Routine_Address Multiple types and/or levels of interrupts, hence additional micro-operations may be required to obtain both Save_Address & Routine_Address t3: memory (MBR) - actual saving of the PC contents Saving the context is done by interrupt handler routine, not micro-ops

Execute Cycle (ADD) Different sequence of micro-operations for each instruction ADD R1, X - add the contents of location X to Register 1, place the result in R1 t1: MAR (IR(address(X))) t2: MBR (Memory) t3: R1 (R1) + (MBR) Note: there is no overlap of micro-operations

Execute Cycle (ISZ) ISZ X - increment and skip if zero t1: MAR (IR(address(x)) t2: MBR (memory) t3: MBR (MBR) + 1 t4: memory (MBR) if (MBR) == 0 then PC (PC) + 1 test & action operation is one micro op performed during time unit t4

Execute Cycle (BSA) BSA X - Branch and save address subroutine call instruction Address of instruction following BSA is saved in X; it will be used to return from the subroutine Execution continues from X+1 t1: MAR (IR(address(X)) MBR (PC) - address of next instruction in the sequence BSA X branches to X+1 after saving return address to location X t2: PC (IR(address(X)) memory (MBR) - save PC contents in memory t3: PC (PC) + 1 - start processing from X+1 X : return address X+1: start of subroutine X+n: return from subroutine

Instruction Cycle Each phase decomposed into sequence of elementary micro-operations E.g. fetch, indirect, and interrupt cycles Execute cycle One sequence of micro-operations for each opcode Need to tie sequences together Assume new 2-bit register Instruction cycle code (ICC) designates which part of cycle processor is in 00: Fetch 01: Indirect 10: Execute 11: Interrupt

Flowchart for Instruction Cycle (Code) Operation of the Processor Performance of a Sequence of Micro-Operations Indirect Cycle Execute Cycle next cycle depends upon the state of the system Interrupt Cycle Fetch Cycle next cycle depends upon the state of the system

Types of Micro-operation Transfer data between registers Transfer data from register to external interface Transfer data from external interface to register Perform arithmetic or logical operations using registers for I/O

Functions of Control Unit using Control Signals Sequencing CU causes the CPU to step through a series of micro-operations in proper sequence based on the program being executed Execution CU causes each micro-operation to be performed Control Signals External: inputs indicating the state of the system Internal: logic required to perform the sequencing and execution functions

Control Signals Clock (clock cycle time, processor cycle time) One micro-instruction (or set of parallel micro-instructions) per clock cycle Instruction register Opcode & addressing mode for current instruction Determines which micro-instructions are performed Flags Used to determine the status of the CPU Results of previous ALU operations Signals from the control bus part of the system bus Interrupts Acknowledgements

Model of Control Unit

Control Signals - output Control Signals within CPU Cause data movement register to register Activate specific ALU functions Activate a specific data path Control Signals to the control bus To memory via the system bus To I/O modules

Control Signal Sources Clock One micro-instruction (or set of parallel micro-instructions) per clock cycle Instruction Register Op-code for current instruction Determines which micro-instructions are performed Flags State of CPU Results of previous operations From Control Bus Interrupts / Bus Requests Acknowledgements

Control Signals Outputs Within CPU Cause data movement Activate specific functions Via Main Bus To memory To I/O modules

Control Signals

The Internal Bus?

Example Simple Processor & Data Paths

Example Simple Processor & Data Paths

State Machine for Example Simple Processor http://highered.mcgraw-hill.com/sites/dl/premium/0072467509/instructor/104653/figurec9.xls

Control Unit with Decoded Inputs

Problems With Hard Wired Designs Sequencing & micro-operation logic gets complex Difficult to design, prototype, and test Resultant design is inflexible, and difficult to build upon (Pipeline, multiple computation units, etc.) Adding new instructions requires major design and adds complexity quickly

Example Simple Processor Micro-Programed Control

Control Unit Organization The Control Memory contains sequences of microinstructions that provide the control signals to execute instruction cycles, e.g. Fetch, Indirect, Execute, and Interrupt. Tasks of Control Unit: Microinstruction sequencing Microinstruction execution May be expected to complete instruction execution in 1 clock cycle. How is this possible?

Recall: Micro-sequencing

Microinstructions: Generate Control Signals Provide Branching Example of Control Memory Organization

Horizontal vs Vertical Microprogramming Horizontal Microprogrammed or Unpacked Hard Direct Vertical Microprogrammed or Packed Soft Indirect

Microinstruction Encoding - Direct Encoding

Microinstruction Encoding - Indirect Encoding

Horizontal Micro-programming Wide control memory word High degree of parallel operations possible Little encoding of control information Faster

Vertical Micro-programming Width can be much narrower Control signals encoded into function codes need to be decoded More complex, more complicated to program, less flexibility More difficult to modify Slower

Typical Microinstruction Formats

Example Microprogramming Formats MicroProgram Counter Subroutines Stack Control Register (MicroProgram Format)

Next Address Decision Depending on ALU flags and control buffer register: Get next instruction Add 1 to control address register Jump to new routine based on jump microinstruction Load address field of control buffer register into control address register Jump to machine instruction routine Load control address register based on opcode in IR

Microprogrammed Control Unit

Necessity of speed Design Considerations Size of Microinstructions Address generation Branches Both conditional and unconditional Based on current microinstruction, condition flags, contents of IR Based on format of address information Two address fields Single address field

Branch Control: Two Address Fields Branch based upon: Instruction Opcode Address 1 Address 2 Does require a wide microinstruction, but no address calculation is needed

Branch Control: Single Address Field Branch based upon: Next instruction Address Opcode Does require more circuitry, e.g. adder

Branch Control: Variable Format One bit determines microinstruction format: Control signal format Branch format Does require even more circuitry, and is slowest.

Advantages and Disadvantages of Microprogramming Advantage: Simplifies design of control unit Cheaper to design Less error-prone Much easier to modify Supports having multiple versions / models Disadvantage: Slower More expensive to produce in quantities