THE FETCH-EXECUTE CYCLE.

Slides:



Advertisements
Similar presentations
Fetch-Execute cycle. Memory Read operation Read from memory.
Advertisements

The Fetch – Execute Cycle
Computer Architecture and the Fetch-Execute Cycle
Central Processing Unit
CS364 CH16 Control Unit Operation
Arithmetic Logic Unit (ALU)
Damian BrowneLuis PabonPedro Tovar The operation of a computer in executing a program consists of a sequence of Instruction Cycles, with one machine.
2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
The CPU. Parts of the CPU Control Unit Arithmetic & Logic Unit Registers.
The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
The Computer Processor
Lecture 13 - Introduction to the Central Processing Unit (CPU)
CPU Fetch/Execute Cycle
Fetch Execute Cycle Travis Griffiths. Naming Conventions and Disclaimer Individual registers in a particular CPU will have different names depending on.
SAP1 (Simple-As-Possible) Computer
Computer Architecture and the Fetch-Execute Cycle
Computer Architecture and the Fetch-Execute Cycle
CPU Design. Introduction – The CPU must perform three main tasks: Communication with memory – Fetching Instructions – Fetching and storing data Interpretation.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
The structure COMPUTER ARCHITECTURE – The elementary educational computer.
DH2T 34 – HNC Computer Architecture 1 Lecture 14 The Fetch-Decode-Execute Cycle [1]. © C Nyssen/Aberdeen College 2003 All images © C Nyssen/Aberdeen College.
Fetch-execute cycle.
Computer Systems - Registers. Starter… Discuss in pairs the definition of the following Control Unit Arithmetic and Logic Unit Registers Internal clock.
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
Fetch-Execute Cycle Fetch the next instruction Decode Execute It.
Computer Systems Organization
Dale & Lewis Chapter 5 Computing components
Structure and Role of a Processor
Jeremy R. Johnson William M. Mongan
Central Processing Unit Decode Cycle. Central Processing Unit Current Instruction Register (CIR) I1 The fetch cycle has transferred an instruction from.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Lec 4-2 Five operations of the machine cycle Fetch- fetch the next program instruction from memory. (PC+1); instruction to IR Decode- decode the instruction.
Program to multiply 2 numbers 500-Input x 291-Store acc. as x 500-Input y 292-Store acc. as y 193-Load y in to acc. (0 on 1 st parse) 391-Add x to acc.
Little Man Computer Task 1 Last lesson you were asked to write a program to multiply two numbers together. The next slide has a working program to do this.
3.1.4 Hardware a. describe the function and purpose of the control unit, memory unit and ALU (arithmetic logic unit) as individual parts of a computer;
Stored Program Concept Learning Objectives Learn the meaning of the stored program concept The processor and its components The fetch-decode-execute and.
OCR GCSE Computer Science Teaching and Learning Resources
Von Neumann architecture
Chapter 10: Computer systems (1)
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Symbol Hex Code Description I=0 I=1
Computer Science 210 Computer Organization
Lesson Objectives A note about notes: Aims
Five Execution Steps Instruction Fetch
System Architecture 1 Chapter 2.
Data Representation – Instructions
The fetch-execute cycle
The Processor and Machine Language
Instruction cycle Instruction: A command given to the microprocessor to perform an operation Program : A set of instructions given in a sequential.
Functional Units.
Computer Organization and ASSEMBLY LANGUAGE
Instruction and Control II
Intel 8080 Processor The 8080 was an 8-bit processor
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
The Little Man Computer
PZ01C - Machine architecture
Fundamental Concepts Processor fetches one instruction at a time and perform the operation specified. Instructions are fetched from successive memory locations.
THE FETCH-EXECUTE CYCLE.
GCSE OCR 1 The CPU Computer Science J276 Unit 1
Program Execution.
CPU Structure and Function
Information Representation: Machine Instructions
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Instruction execution and ALU
Computer Architecture
Little Man Computer.
Presentation transcript:

THE FETCH-EXECUTE CYCLE

The address of the first instruction is copied from the PC to the MAR REGISTERS ACC Check for interrupts Fetch instruction from memory MDR MAR 1 CIR Execute instruction Update Program counter PC 1 MEMORY Location Contents THE PROGRAM The address of the first instruction is copied from the PC to the MAR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The first instruction is read into the MDR REGISTERS ACC Check for interrupts Fetch instruction from memory MDR LDA 23 MAR 1 CIR Execute instruction Update Program counter PC 1 MEMORY Location Contents THE PROGRAM The first instruction is read into the MDR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The first instruction is copied into the CIR REGISTERS ACC Check for interrupts Fetch instruction from memory MDR LDA 23 MAR 1 CIR LDA 23 Execute instruction Update Program counter PC 1 MEMORY Location Contents THE PROGRAM The first instruction is copied into the CIR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The program counter is updated to point to the next instruction REGISTERS ACC Check for interrupts Fetch instruction from memory MDR LDA 23 MAR 1 CIR LDA 23 Execute instruction Update Program counter PC 2 MEMORY Location Contents THE PROGRAM The program counter is updated to point to the next instruction 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The address part of the current instruction is placed in the MAR REGISTERS ACC Check for interrupts Fetch instruction from memory MDR LDA 23 MAR 23 CIR LDA 23 Execute instruction Update Program counter PC 2 MEMORY Location Contents THE PROGRAM The address part of the current instruction is placed in the MAR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

REGISTERS ACC Check for interrupts Fetch instruction from memory MDR 14 MAR 23 CIR LDA 23 Execute instruction Update Program counter PC 2 MEMORY Location Contents The contents of the location whose address is in the MAR are loaded into the MDR THE PROGRAM 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The contents of the MDR are copied into the ACC REGISTERS ACC 14 Check for interrupts Fetch instruction from memory MDR 14 MAR 23 CIR LDA 23 Execute instruction Update Program counter PC 2 MEMORY Location Contents THE PROGRAM The contents of the MDR are copied into the ACC 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The Status Register is checked for interrupts REGISTERS ACC 14 Check for interrupts Fetch instruction from memory MDR 14 MAR 23 CIR LDA 23 Execute instruction Update Program counter PC 2 MEMORY Location Contents THE PROGRAM The Status Register is checked for interrupts 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The address of the second instruction is copied from the PC to the MAR REGISTERS ACC 14 Check for interrupts Fetch instruction from memory MDR 14 MAR 2 CIR LDA 23 Execute instruction Update Program counter PC 2 MEMORY Location Contents THE PROGRAM The address of the second instruction is copied from the PC to the MAR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The second instruction is read into the MDR REGISTERS ACC 14 Check for interrupts Fetch instruction from memory MDR ADD 72 MAR 2 CIR LDA 23 Execute instruction Update Program counter PC 2 MEMORY Location Contents THE PROGRAM The second instruction is read into the MDR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The second instruction is copied into the CIR REGISTERS ACC 14 Check for interrupts Fetch instruction from memory MDR ADD 72 MAR 2 CIR ADD 72 Execute instruction Update Program counter PC 2 MEMORY Location Contents THE PROGRAM The second instruction is copied into the CIR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The program counter is updated to point to the next instruction REGISTERS ACC 14 Check for interrupts Fetch instruction from memory MDR ADD 72 MAR 2 CIR ADD 72 Execute instruction Update Program counter PC 3 MEMORY Location Contents THE PROGRAM The program counter is updated to point to the next instruction 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The address part of the current instruction is placed in the MAR REGISTERS ACC 14 Check for interrupts Fetch instruction from memory MDR ADD 72 MAR 72 CIR ADD 72 Execute instruction Update Program counter PC 3 MEMORY Location Contents THE PROGRAM The address part of the current instruction is placed in the MAR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

REGISTERS ACC 14 Check for interrupts Fetch instruction from memory MDR 35 MAR 72 CIR ADD 72 Execute instruction Update Program counter PC 3 MEMORY Location Contents The contents of the location whose address is in the MAR are loaded into the MDR THE PROGRAM 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The contents of the MDR are added to the ACC REGISTERS ACC 49 Check for interrupts Fetch instruction from memory MDR 35 MAR 72 CIR ADD 72 Execute instruction Update Program counter PC 3 MEMORY Location Contents THE PROGRAM The contents of the MDR are added to the ACC 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The Status Register is checked for interrupts REGISTERS ACC 49 Check for interrupts Fetch instruction from memory MDR 35 MAR 72 CIR ADD 72 Execute instruction Update Program counter PC 3 MEMORY Location Contents THE PROGRAM The Status Register is checked for interrupts 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The address of the third instruction is copied from the PC to the MAR REGISTERS ACC 49 Check for interrupts Fetch instruction from memory MDR 35 MAR 3 CIR ADD 72 Execute instruction Update Program counter PC 3 MEMORY Location Contents THE PROGRAM The address of the third instruction is copied from the PC to the MAR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The third instruction is read into the MDR REGISTERS ACC 49 Check for interrupts Fetch instruction from memory MDR STA 53 MAR 3 CIR ADD 72 Execute instruction Update Program counter PC 3 MEMORY Location Contents THE PROGRAM The third instruction is read into the MDR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The third instruction is copied into the CIR REGISTERS ACC 49 Check for interrupts Fetch instruction from memory MDR STA 53 MAR 3 CIR STA 53 Execute instruction Update Program counter PC 3 MEMORY Location Contents THE PROGRAM The third instruction is copied into the CIR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The program counter is updated to point to the next instruction REGISTERS ACC 49 Check for interrupts Fetch instruction from memory MDR STA 53 MAR 3 CIR STA 53 Execute instruction Update Program counter PC 4 MEMORY Location Contents THE PROGRAM The program counter is updated to point to the next instruction 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The address part of the current instruction is placed in the MAR REGISTERS ACC 49 Check for interrupts Fetch instruction from memory MDR STA 53 MAR 53 CIR STA 53 Execute instruction Update Program counter PC 4 MEMORY Location Contents THE PROGRAM The address part of the current instruction is placed in the MAR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

The contents of the ACC are copied into the MDR REGISTERS ACC 49 Check for interrupts Fetch instruction from memory MDR 49 MAR 53 CIR STA 53 Execute instruction Update Program counter PC 4 MEMORY Location Contents THE PROGRAM The contents of the ACC are copied into the MDR 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 26 72 35

REGISTERS ACC 49 Check for interrupts Fetch instruction from memory MDR 49 MAR 53 CIR STA 53 Execute instruction Update Program counter PC 4 MEMORY Location Contents The contents of the MDR are copied into the memory location whose address is in the MAR THE PROGRAM 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 49 72 35

The Status Register is checked for interrupts REGISTERS ACC 49 Check for interrupts Fetch instruction from memory MDR 49 MAR 53 CIR STA 53 Execute instruction Update Program counter PC 4 MEMORY Location Contents THE PROGRAM The Status Register is checked for interrupts 1 LDA 23 2 ADD 72 3 STA 53 23 14 53 49 72 35