CPU Structure and Function

Slides:



Advertisements
Similar presentations
CPU Structure and Function
Advertisements

Computer Organization and Architecture
Processor structure and function
Chapter 12 CPU Structure and Function. CPU Sequence Fetch instructions Interpret instructions Fetch data Process data Write data.
Computer Organization and Architecture
Computer Organization and Architecture
Computer Organization and Architecture The CPU Structure.
Chapter 12 CPU Structure and Function. Example Register Organizations.
RICARFENS AUGUSTIN JARED COELLO OSVALDO QUINONES Chapter 12 Processor Structure and Function.
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
CH12 CPU Structure and Function
CPU Registers – Page 1 of 35CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: CPU Registers Reading: Stallings, Sections 10.3,
CSCI 4717/5717 Computer Architecture
Edited By Miss Sarwat Iqbal (FUUAST) Last updated:21/1/13
Presented by: Sergio Ospina Qing Gao. Contents ♦ 12.1 Processor Organization ♦ 12.2 Register Organization ♦ 12.3 Instruction Cycle ♦ 12.4 Instruction.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 1 Computer System Overview.
Chapter 11 CPU Structure and Function. CPU Structure CPU must: —Fetch instructions —Interpret instructions —Fetch data —Process data —Write data.
ECE 456 Computer Architecture
ECE 456 Computer Architecture Lecture #14 – CPU (III) Instruction Cycle & Pipelining Instructor: Dr. Honggang Wang Fall 2013.
Fetch-execute cycle.
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
PART 4: (1/2) Central Processing Unit (CPU) Basics CHAPTER 12: P ROCESSOR S TRUCTURE AND F UNCTION.
Processor Organization
Structure and Role of a Processor
CPU Design and Pipelining – Page 1CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: CPU Operations and Pipelining Reading:
BASIC COMPUTER ARCHITECTURE HOW COMPUTER SYSTEMS WORK.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Chapter 12 Processor Structure and Function. Central Processing Unit CPU architecture, Register organization, Instruction formats and addressing modes(Intel.
Chapter 11 CPU Structure and Function
Displacement (Indexed) Stack
Chapter 1 Computer System Overview
Basic Processor Structure/design
William Stallings Computer Organization and Architecture 8th Edition
Stored program concept
William Stallings Computer Organization and Architecture
William Stallings Computer Organization and Architecture 7th Edition
Chapter 3 Top Level View of Computer Function and Interconnection
Chapter 15 Control Unit Operation
Processor Organization and Architecture
Chapter 12 CPU Structure and Function
Computer System Overview
Central Processing Unit
Computer Organization and ASSEMBLY LANGUAGE
ECEG-3202 Computer Architecture and Organization
Processor Organization and Architecture
William Stallings Computer Organization and Architecture 7th Edition
William Stallings Computer Organization and Architecture 8th Edition
The Little Man Computer
BIC 10503: COMPUTER ARCHITECTURE
Chapter 14 Control Unit Operation
Computer Architecture
William Stallings Computer Organization and Architecture 8th Edition
CPU: Instruction Sets and Instruction Cycles
Computer Architecture
Chapter 1 Computer System Overview
CPU Structure CPU must:
Chapter 11 Processor Structure and function
Presentation transcript:

CPU Structure and Function Processor organization: CPU must: Fetch instructions Interpret instructions Fetch data Process data Write data 22

CPU With Systems Bus

CPU Internal Structure

Register Organization 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 23

User Visible Registers General Purpose Data Address Condition Codes 24

General Purpose Registers (1) May be true general purpose May be restricted May be used for data or addressing Data Accumulator Addressing Segment 25

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 26

How Many GP Registers? Between 8 - 32 Fewer = more memory references 27

How big? Large enough to hold full address Large enough to hold full word Often possible to combine two data registers 28

Condition Code Registers 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 29

Control & Status Registers Program Counter Instruction Register Memory Address Register Memory Buffer Register 30

Program Status Word A set of bits Includes Condition Codes Sign of last result Zero Carry Equal Overflow Interrupt enable/disable Supervisor 31

Supervisor Mode Kernel mode Allows privileged instructions to execute Used by operating system Not available to user programs 32

Other Registers May have registers pointing to: Process control blocks Interrupt Vectors 33

Example Register Organizations

Instruction Cycle Indirect Cycle: May require memory access to fetch operands Indirect addressing requires more memory accesses Can be thought of as additional instruction subcycle

Instruction Cycle with Indirect

Instruction Cycle State Diagram

Data Flow (Instruction Fetch) Depends on CPU design In general: 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

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

Data Flow (Fetch Diagram)

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

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

Data Flow (Interrupt Diagram)

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

Improved Performance But not doubled: Fetch usually shorter than execution Prefetch more than one instruction? Any jump or branch means that prefetched instructions are not the required instructions Add more stages to improve performance 37