Von Neumann Machine Objectives: Explain Von Neumann architecture:  Memory –Organization –Decoding memory addresses, MAR & MDR  ALU and Control Unit –Executing.

Slides:



Advertisements
Similar presentations
The CPU The Central Presentation Unit What is the CPU?
Advertisements

Computer Architecture and the Fetch-Execute Cycle
The Von Neumann Architecture Odds and Ends
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
Execution of an instruction
CHAPTER 5 COMPUTER SYSTEMS ORGANIZATION. REMEMBER... Computer science is the study of algorithms including * Their formal and mathematical properties---
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Chapter 5: Computer Systems Organization Invitation to Computer Science, C++ Version, Third Edition Added to by S. Steinfadt - Spring 2005 Additional source.
The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Elements of the Computer (How a processor works)
Lecture 13 - Introduction to the Central Processing Unit (CPU)
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Computer Structure.
Invitation to Computer Science 5th Edition
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
Computer Architecture And Organization UNIT-II Structured Organization.
CPU How It Works. 2 Generic Block Diagram CPU MemoryInputOutput Address Bus Data Bus.
Invitation to Computer Science 6th Edition Chapter 5 Computer Systems Organization.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
General Concepts of Computer Organization Overview of Microcomputer.
Computer Architecture And Organization UNIT-II General System Architecture.
Execution of an instruction
Computer Science 101 Computer Systems Organization.
Computer Science 101 Computer Systems Organization ALU, Control Unit, Instruction Set.
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 Science 101 Computer Systems Organization Machine Language Examples Entire machine.
Introduction to Microprocessors
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.
Assessment Covering… Von Neuman architecture Registers – purpose and use, the fetch execute cycle.
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
Dale & Lewis Chapter 5 Computing components
Invitation to Computer Science 6 th Edition Chapter 5 Computer Systems Organization.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
The Processor & its components. The CPU The brain. Performs all major calculations. Controls and manages the operations of other components of the computer.
Chapter 5: Computer Systems Organization Invitation to Computer Science,
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
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;
Dr.Ahmed Bayoumi Dr.Shady Elmashad
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Chapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model
Microprocessor and Assembly Language
Computer Architecture
Chapter 4 The Von Neumann Model
The Processor and Machine Language
Chapter 4 The Von Neumann Model
Functional Units.
Computer Systems Organization
Chapter 5: Computer Systems Organization
Sequencing, Selection, and Loops in Machine Language
Computer Architecture
Chapter 4 The Von Neumann Model
The Von Neumann Architecture Odds and Ends
The Von Neumann Architecture
The Stored Program Computer
GCSE OCR 1 The CPU Computer Science J276 Unit 1
Basic components Instruction processing
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 Science. The CPU The CPU is made up of 3 main parts : Cache ALU Control Unit.
Presentation transcript:

Von Neumann Machine Objectives: Explain Von Neumann architecture:  Memory –Organization –Decoding memory addresses, MAR & MDR  ALU and Control Unit –Executing arithmetic & logic operations, ALU register, CCR, multiplexor circuit –Decoding machine instructions, PC & IR Decode and trace machine language programs

Von Neumann Architecture  A model for designing and building computers:  Has following three characteristics 1.Has four major subsystems 1. memory 2. input-output (I/O) 3. arithmetic-logic unit (ALU) 4. control unit 2.Program is stored in memory 3.Each processor executes one instruction at a time (fetched, decoded and executed)

The Four Subsystems Memory Processor Control Unit ALU Input-Output RAM ROM... Register Disks Screen Keyboard Bus

Control circuits (Chap 4) Decoders and Multiplexors  Decoder circuit (Figure 4.25, p. 164) : takes n inputs and helps choose one of the 2 n outputs, numbered 0,1,…, 2 n-1. (determines which binary number the inputs represent and activates the output with that binary as its ID.)  Multiplexor circuit (Figure 4.26, p. 165): based on value of n selector lines (a binary number) selects one of the 2 n (0, 1,…, 2 n –1) inputs as the output. So, it has just one output.

Decoder Circuit Selects one output line, e.g. if inputs are 1, 0: output line 2 is chosen (set to 1) Used to decode memory addresses and operation codes. Two INPUTS

Multiplexor Circuit selects one input line, based on value of selector lines. Used to select result from correct circuit. Input lines Selector lines (11 selects input line 3) Output line Value in line 3 is passed to output

Internal Memory  Random Access Memory (RAM)  Stores in and retrieves from current programs and data from different parts of memory  -Can retrieve without destroying the current content  -Replaces the old with new when storing.  -Takes the same time to access any part of the memory.  Read Only Memory (ROM)  -Stores permanent programs, e.g. start-up (Cannot overwrite).  Sizes of memory (internal and/or external)  -N Kilobytes (N * thousands)  N Megabytes (N * millions)  N Gigabytes (N * billions)

RAM Memory Addresses Each memory cell has an address. Simple example: 32-bit address space. RAM There are 4 memory cells, each containing 8 bits. The addresses are 0, 1, 2, 3 in binary. Each address is 2 bits long.

Memory Address Register (MAR) Memory Data Register (MDR) Memory unit contains two of the special registers. MAR holds the current memory address. MDR hold the data which has been read from that memory address or about to be written to it.

How the MAR & MDR Work For simple 4-cell example, showing one bit being read. MAR Decoder RAM Bit goes to MDR because line 00 carries a AND 00 01

Fetch Fetch (address) 1. Decode the address in the MAR 2. Load the address into MAR 3. Copy contents of that memory location into MDR (The fetch / store controller is set to fetch.)

Store Store (address, value) 1. Load the address into MAR 2. Load the value into MDR 3. Decode the address in the MAR 4. Store the contents of the MDR into that memory location. (The fetch / store controller is set to store.)

Arithmetic-Logic Unit (ALU)  Registers  Circuits to do math operations  Circuits to do logic (e.g. compare) (We have seen circuits for add and compare as examples) See Fig 5.13 on page 194

Circuits Inside the ALU See Figure 5.12, p. 193 In example, all circuits produce results:  > 1100 on line 00  > 0110 on line 01  1001 = > 0000 on line 10  > 0001 on line 11 Selector lines are 00 for add operation, so Multiplexor selects output on line 00: 1100

Multiplexor a + b a - b a = b a ab. b Line 0 (00) Line 1 (01) Line 2 (10) Line 3 (11) out

Overall ALU Organization R0 R1 R2 R3 Multiplexor +-/= … Selector lines BUS0 BUS1 BUS2 ALU …

More about the Von Neumann Machine  Stored Program—the most fundamental characteristics of Von Neumann machine.  A sequence of machine language instructions stored as binary values in memory.  Fetch----Decode----Execute----Store  Op code and Operand

Op code & Operand  Op code---A code for representing the operation parts of the machine instructions of a computer.  Operand (Address in our book)---An entity on which an operation is performed or that which is operated upon. An operand is usually identified by an address part of an instruction.

CISC Machine & RISC Machine  CISC--Complex Instruction Set Computers  As few as instructions  RISC--Reduced Instruction Set Computers  As many as instructions

Simulator

5.2.4 Control Unit Machine instructions are stored in RAM. The job of the Control Unit is to repeatedly:  Fetch the next instruction from RAM  Decode the instruction  Execute the instruction

Flow Chart of an Instruction  In a real computer, there are five(5) steps  involved as follow: Instruction Fetch Unit Instruction Decode Unit Operand Fetch Unit Instruction Execution Unit Write Back Unit

Control Unit Registers  PC : Program Counter Holds address of next instruction  It will automatic incremented to next  instruction address.  IR : Instruction Register Holds current instruction  Computer will find the instruction by the address  Pointed by PC

Machine Instructions  Each brand of processor has circuitry for a particular set of instructions.  One brand may have 30 instructions, another 400 instructions.  For any brand, a typical machine instruction will contain: –Operation code: tells which operation to do (Op Code) –One or more Addresses telling where the data (operands) are. (see Fig Page 195)

Types of Operations  Data transfer (Copy data from one place to another -- RAM to Register, Register to RAM, one address to another in RAM)  Arithmetic (e.g. add)  Compare (e.g. are the operands equal)  Branch (tells where the next instruction to be executed is stored)

5.2.5 The Entire Computer  Look at Figure 5.18, p. 203, and identify:  --the four major subsystems  --the registers used by each subsystem  Trace the execution of a machine instruction through the computer.

Machine Code  Registers  Machine Instructions

Various Registers  MAR  -Size to match the address space (20 bit for 1MB)  MDR  -Standard cell size 8-bits in Intel- based pc’s (in our simulator 12 bits) It can be anything between 8-64 bits in different Computer systems Fetch / Store control signal

Various Registers  General Purpose Register  -To work with ALU and MDR or I/O Buffer  Condition Code Register  -Execution of Compare instruction sets these registers (depending on the outcome) –GT, EQ, LE (100, 010, 001)

Various Registers  IR –Op code and Operands –Op code decoded and Control signals sent to memory, ALU, I/O –Operands used to fetch / store data from / to memory locations to / from general purpose registers.  PC –holds address for the next instruction; usually it is incremented by 1, unless a JUMP Op-code is encountered.

Operation Codes – Details 0000 LOAD X (Copy contents of memory Location X to Register and replaces whatever Reg had before; X is in binary, pointing to an address) 0001 STORE X (Copy contents of R to X) 1101 IN X (get integer value from standard input device and store it in location X in binary form) 1110 OUT X (Output the decimal equivalent of the binary contents of X on the standard output device)

Operation Codes – Details 0010 CLEAR X (Fill location X with 0’s) 0011 ADD X (Add the contents of X to what is already there in R and leave the result in R) 0101 SUBTRACT X (Subtract the contents of X from R and the result stays in R) 0100 INCREMENT X (Add 1 to the contents of X) 0110 DECREMENT (Subtract 1 from the contents of X)

Operation Codes – Details 1000 JUMP X (Get the next instruction from the next location 1001 JUMPGT X (If the contents of GT condition code Register is 1, take the control (I.e., the next instruction from X) 1010 JUMPEQ X (If (EQ CCR) = 1,..) 1011 JUMPLT X; (If (LT CCR = 1,…) 1100 JUMPNEQ X (If (EQ CCR) = 0, …) Note: (L) means contents of L.