CPU Structure and Function

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

CPU Structure and Function

William Stallings Computer Organization and Architecture

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

UNIT- 5. Chapter 12 Processor Structure and Function

Chapter 12. CPU Structure and Function. Yonsei University

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 12 Processor Structure and Function

UNIT V: CENTRAL PROCESSING UNIT

Processing Unit CS206T

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

Chapter 14 - Processor Structure and Function

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

William Stallings Computer Organization and Architecture

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

Main Points of the Computer Organization and System Software Module

Chapter 16. Control Unit Operation. Yonsei University

Computer Organization and Technology Processor and System Structures

Processor Structure and Function

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

Module 5 - CPU Design

Digital System Design Using Verilog. - Processing Unit Design

William Stallings Computer Organization and Architecture 10 th Edition Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.

Blog -

SCRAM Introduction. Philipp Koehn. 19 February 2018

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

Computer System Overview

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

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Running Applications

GUJARAT TECHNOLOGICAL UNIVERSITY MASTER OF COMPUTER APPLICATION SEMESTER: III

Q.1 Explain Computer s Basic Elements

CSE 410. Operating Systems

Computer Systems Overview

RISC & Superscalar. COMP 212 Computer Organization & Architecture. COMP 212 Fall Lecture 12. Instruction Pipeline no hazard.

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

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

Computer Architecture and Organization. Instruction Sets: Addressing Modes and Formats

DC57 COMPUTER ORGANIZATION JUNE 2013

Högnivåspråk och översättning

Computer Structure. Unit 4. Processor

Computer Organization II CMSC 3833 Lecture 33

Computer Architecture and Organization (CS-507)

Computer System Overview. Chapter 1

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

Computer System Overview

What Are The Main Differences Between Program Counter Pc And Instruction Register Ir

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers.

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

Microprocessor Architecture

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

The MARIE Architecture

East Tennessee State University Department of Computer and Information Sciences CSCI 4717 Computer Architecture TEST 3 for Fall Semester, 2005

Addressing Modes. Immediate Direct Indirect Register Register Indirect Displacement (Indexed) Stack

Pipelining. Parts of these slides are from the support material provided by W. Stallings

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 11 Instruction Sets: Addressing Modes and Formats

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

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Computer Architecture

ELE 3230 Microprocessors and Computer Systems

Computer Organization CS 206 T Lec# 2: Instruction Sets


Operating System Control Structures

EE 3170 Microcontroller Applications

Module 4c: Pipelining

CISC Processor Design

The Stored Program Computer

Chapter 3. Z80 Instructions & Assembly Language. Von Neumann Architecture. Memory. instructions. program. data

REDUCED INSTRUCTION SET COMPUTERS (RISC)

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

Part One provides a background and context for the remainder of this book.

Chapter 2 Instruction Set Architecture

Instruction Sets: Characteristics and Functions Addressing Modes

Register Are Two Names For The Same Place

Lecture 10: Control Unit

Micro-programmed Control Ch 15

Introduction. 3 major parts of CPU : Fig Design Examples of simple CPU. In this chapter : Chap. 8. Chap. 8 Central Processing Unit

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

Micro-programmed Control Ch 15

Top-Level View of Computer Organization

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

Chapter 17. Microprogrammed Control. Yonsei University

CPE300: Digital System Architecture and Design

Lecture 10: Control Unit

Chapter 20 - Microprogrammed Control (9 th edition)

Chapter 4. Chapter 4 Objectives

Wednesday, September 13, Chapter 4

Chapter 3 : Control Unit

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

ARM ARCHITECTURE. Contents at a glance:

Hardware and Software Architecture. Chapter 2

Microcomputer Architecture and Programming

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION

Darshan Institute of Engineering & Technology for Diploma Studies Unit - 1

Chapter 4. MARIE: An Introduction to a Simple Computer

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

Wednesday, February 4, Chapter 4

Chapter 2: Instructions How we talk to the computer

Transcription:

CPU Structure and Function Chapter 12 Lesson 17 Slide 1/36

Processor Organization CPU must: Fetch instructions Interpret instructions Fetch data Process data Write data Lesson 17 Slide 2/36

CPU With Systems Bus Lesson 17 Slide 3/36

CPU Internal Structure Lesson 17 Slide 4/36

Registers CPU must have some working space (temporary storage) Called registers Number and function vary between processor designs One of the major design decisions Top level of memory hierarchy Registers: User-visible registers Control and status registers Lesson 17 Slide 5/36

User-Visible Registers General Purpose Data Address Condition Codes Lesson 17 Slide 6/36

General Purpose Registers (1) May be true general purpose May be restricted May be used for data or addressing Data Accumulator Addressing Segment Lesson 17 Slide 7/36

General Purpose Registers (2) Make them general purpose Increase flexibility and programmer options Increase instruction size & complexity Make them specialized Smaller (faster) instructions Less flexibility Lesson 17 Slide 8/36

How Many GP Registers? Between 8-32 Fewer = more memory references More does not reduce memory references and takes up processor real estate But in RISC processors, hundreds of registers Lesson 17 Slide 9/36

Large enough to hold full address Large enough to hold full word Often possible to combine two data registers C programming double int a; long int a; How big? Lesson 17 Slide 10/36

Condition Code Registers Flags Sets of individual bits e.g. result of last operation was zero Can be read (implicitly) by programs e.g. Jump if zero Can not (usually) be set by programs Lesson 17 Slide 11/36

Control & Status Registers For instruction execution: Program Counter (PC) Instruction Register (IR) Memory Address Register (MAR) Memory Buffer Register (MBR) Lesson 17 Slide 12/36

Program Status Word (PSW) A set of bits Includes Condition Codes Sign of last result Zero Carry Equal Overflow Interrupt enable/disable Supervisor Lesson 17 Slide 13/36

Supervisor Mode Kernel mode Allows privileged instructions to execute Used by operating system Not available to user programs Lesson 17 Slide 14/36

Other Registers May have registers pointing to: Process control blocks Interrupt Vectors CPU design and operating system design are closely linked Lesson 17 Slide 15/36

Example Register Organizations Lesson 17 Slide 16/36

Instruction Cycle Subcycles: Fetch: Read the next instruction from memory into the CPU Execute: Interpret the opcode and perform the indicated operation Interrupt: If interrupts are enabled and an interrupt has occurred, save the current process state and service the interrupt Lesson 17 Slide 17/36

Indirect Cycle May require memory access to fetch operands Indirect addressing requires more memory accesses Can be thought of as additional instruction subcycle Lesson 17 Slide 18/36

Instruction Cycle with Indirect Lesson 17 Slide 19/36

Instruction Cycle State Diagram Lesson 17 Slide 20/36

Depends on CPU design In general: Data Flow (Instruction Fetch) Fetch PC contains address of next instruction Address moved to MAR Address placed on address bus Control unit requests memory read Result placed on data bus, copied to MBR, then to IR Meanwhile PC incremented by 1 Lesson 17 Slide 21/36

Data Flow (Data Fetch) IR is examined If indirect addressing, indirect cycle is performed Right most N bits of MBR transferred to MAR Control unit requests memory read Result (address of operand) moved to MBR Lesson 17 Slide 22/36

Data Flow (Fetch Diagram) Lesson 17 Slide 23/36

Lesson 17 Slide 24/36 Data Flow (Indirect Diagram)

Data Flow (Execute) May take many forms Depends on instruction being executed May include Memory read/write Input/Output Register transfers ALU operations Lesson 17 Slide 25/36

Data Flow (Interrupt) Simple Predictable Current PC saved to allow resumption after interrupt Contents of PC copied to MBR Special memory location (e.g. stack pointer) loaded to MAR MBR written to memory PC loaded with address of interrupt handling routine Next instruction (first of interrupt handler) can be fetched Lesson 17 Slide 26/36

Data Flow (Interrupt Diagram) Lesson 17 Slide 27/36

Fetch accessing main memory Prefetch Execution usually does not access main memory Can fetch next instruction during execution of current instruction Called instruction prefetch Lesson 17 Slide 28/36

But not doubled: Improved Performance Fetch usually shorter than execution Any jump or branch means that prefetched instructions are not the required instructions Add more stages to improve performance Lesson 17 Slide 29/36

Pipelining Fetch instruction (FI) Decode instruction (DI) Calculate operands (CO) Fetch operands (FO) Execute instructions (EI) Write operand (WO) Overlap these operations Lesson 17 Slide 30/36

Two Stage Instruction Pipeline Lesson 17 Slide 31/36

Lesson 17 Slide 32/36 Timing of Pipeline

Lesson 17 Slide 33/36 Branch in a Pipeline

Six Stage Instruction Pipeline Lesson 17 Slide 22/36

Alternative Pipeline Depiction Lesson 17 Slide 22/36

Speedup Factors with Instruction Pipelining Lesson 17 Slide 22/36