Computer Organization 1 Instruction Fetch and Execute.

Slides:



Advertisements
Similar presentations
CPU Structure and Function
Advertisements

Damian BrowneLuis PabonPedro Tovar The operation of a computer in executing a program consists of a sequence of Instruction Cycles, with one machine.
Computer Organization and Architecture
Processor System Architecture
Computer Organization and Architecture
Computer Organization and Architecture
The CPU. Parts of the CPU Control Unit Arithmetic & Logic Unit Registers.
Computer Organization. This module surveys the physical resources of a computer system. –Basic components CPUMemoryBus I/O devices –CPU structure Registers.
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
Computer Systems. Computer System Components Computer Networks.
Chapter 0 Introduction to Computing
Memory - Registers Instruction Sets
Stored Program Concept: The Hardware View
The Computer Processor
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
CEG 320/520: Computer Organization and Assembly Language Programming1 CEG 320/520 Computer Organization and Assembly Language Programming.
CH12 CPU Structure and Function
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Basic Operational Concepts of a Computer
Processor Structure & Operations of an Accumulator Machine
Computer Organization Computer Organization & Assembly Language: Module 2.
4-1 Chapter 4 - The Instruction Set Architecture Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring.
Instruction Set Architecture
4-1 Chapter 4 - The Instruction Set Architecture Department of Information Technology, Radford University ITEC 352 Computer Organization Principles of.
Basic Architecture Lecture 15. In general, if the number of bits is n, then the number of different combinations of 0s and 1s that can be made is 2 n.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
4-1 Chapter 4 - The Instruction Set Architecture Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
Von Neumann Machine Objectives: Explain Von Neumann architecture:  Memory –Organization –Decoding memory addresses, MAR & MDR  ALU and Control Unit –Executing.
CSCI 211 Intro Computer Organization –Consists of gates for logic And Or Not –Processor –Memory –I/O interface.
4-1 Chapter 4 - The Instruction Set Architecture Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
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.
Computer Architecture Lecture 03 Fasih ur Rehman.
Computer Studies/ICT SS2
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Machine Instructions.
Stored Program A stored-program digital computer is one that keeps its programmed instructions, as well as its data, in read-write,
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
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?
CS61C L20 Datapath © UC Regents 1 Microprocessor James Tan Adapted from D. Patterson’s CS61C Copyright 2000.
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
CMSC 104, Lecture 061 Stored Programs A look at how programs are executed.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
The Processor & its components. The CPU The brain. Performs all major calculations. Controls and manages the operations of other components of the computer.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
BASIC COMPUTER ARCHITECTURE HOW COMPUTER SYSTEMS WORK.
Basic Processor Structure/design
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Number Representations and Basic Processor Architecture
Functional Units.
8085 MICROPROCESSOR 8085 CPU Registers and Status Flags S Z AC P C A B
Computer Architecture
Basic components Instruction processing
CPU Structure and Function
Chapter 11 Processor 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.
Computer Operation 6/22/2019.
COMPUTER ARCHITECTURE
Presentation transcript:

Computer Organization 1 Instruction Fetch and Execute

The System Bus Model

System Bus Model The bus can be thought of as a ring round which control commands, data and addresses to access are sent. Each device has access to the signals on the bus, but each device must be authorized to accept a particular message.

Memory Computer memory is arranged in a linear way, so that each byte in memory has its own address, numbered from 0 up to the last byte. Thus, for a memory with 2^32 bytes, the first byte is found at address 0, and the last byte at address 2^32 – 1. In today ’ s PCs, it is usual to group bytes in 32-bit words 64-bit word machines are next. We will use Murdocca and Heuring ’ s memory layout:

Memory The size of the address determines the size of the memory. For example, an 8 bit address size means that the memory is limited to 2^8 words (or bytes). That is, 256 locations. A 16-bit address allows for a memory as big as 2^16 locations, that is, 65,536. That is, 64k, where k stands for one kilobyte. A 20-bit address x 1024 gives 1,048,576 – 1MB A 30-bit address allows for addressing 2^30 locations – 1 GB 32 bit address can address 4GB of storage

Memory Memory addresses in a 16-bit machine are numbered from 0000 to FFFF hexadecimal In 32-bit address machines, it is possible to have up to 2^32 locations (ie 4 Gigabytes) in memory. That is, from: Address to address FFFF FFFF hex

The System Stack When a program (process) passes control to a subroutine (subprogram, method), all the program ’ s current values (PC, register contents, values of local variables) have to be parcelled up and saved until control returns from the method These values are stored on the system stack until the process is reinstated

Central Processing Unit CPU Consists of: ALU (Arithmetic and Logic Unit), The Registers (or Index Registers) - Local storage used as a ‘ scratchpad ’ for temporary storage during calculations The Control Unit

Central Processing Unit CPU The Control Unit coordinates the operations of the Memory, CPU, buses and I/O - like a computer within a computer There are several buses inside the CPU The Datapath is made up of the ALU and the Registers

Fetch Execute Cycle An instruction such as A = A + C; is translated into the computer ’ s Assembly Language (and then, Machine Language) form This example, in Assembly, could be: ADD C, A The program is in memory; instruction ADD C, A has to be copied into the CPU, and executed

Instruction Fetch and Execute 1. Copy contents of Program Counter (PC) into MAR (Memory Address Register). The PC contains the address of the next instruction, ADD A, C to be executed. 2. Copy (MAR) to bus 3. Fetch the instruction ADD A, C to be executed into the MBR (Memory Buffer Register) 4. Copy the instruction into the IR (Instruction Reg.)

Instruction Fetch and Execute 5. Split the instruction into opcode ADD, and operands A,C using the decode logic: if the instruction requires data, (here, A and C) copy the operand address A on to the MAR, and fetch the data from memory; fetch C; do the add, put the result back into memory at A 6. update the PC 7. Go to step 1. (Copy contents of Program Counter (PC) into MAR )

Index Registers The registers are a set of memory locations local to the CPU quick to access used as temporary storage for intermediate results each register has its own address within the CPU. Typical register numbers vary from a few to several thousand. Each register has its own address, starting from zero. Register addresses are much smaller than memory addresses: for example, 32 registers would require only a 5-bit address. Instructions which operate on registers can run about ten times as fast as instructions which access memory.

The Special Registers Program Counter (PC) keeps the memory address of the next instruction to be executed Instruction Register (IR) holds the current instruction being implemented Stack Pointer holds the address of the system stack Program (or Process) Status Word (PSW) has 4 condition codes; these are bits which are set by the last instruction. N, Z, C and V. N is set on (to 1) by a negative result; Z is set on by a zero; C is set by a Carry out from the ALU, and V (oVerflow) is set when the result from an arithmetic operation is too large to be handled by the ALU

Big & Little Endians Different ways of labelling storage Left-right vs. Right-left Big-Endian - most significant byte of any multibyte data field is stored at the lowest memory address Little-Endian - least significant byte of any multibyte data field is stored at the lowest memory address

Big-Endian v Little-Endian

Summary The memory in a computer is arranged in a linear fashion, each byte numbered with its address, starting at zero. The top part of the memory is occupied by the operating system, then there is a user area for programs and data; the system reserves areas for a system stack, and for I/O operations. Instructions are implemented by a Fetch- Execute cycle.