Chapter 4 The Von Neumann Model

Similar documents
Central Processing Unit (CPU)

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

CPU Organisation and Operation

Computer organization

(Refer Slide Time: 00:01:16 min)

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

CSCI 4717 Computer Architecture. Function. Data Storage. Data Processing. Data movement to a peripheral. Data Movement

CHAPTER 7: The CPU and Memory

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

MICROPROCESSOR AND MICROCOMPUTER BASICS

Central Processing Unit

Instruction Set Architecture (ISA)

PROBLEMS. which was discussed in Section

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

MACHINE ARCHITECTURE & LANGUAGE

Computer Organization. and Instruction Execution. August 22

Microprocessor & Assembly Language

BASIC COMPUTER ORGANIZATION AND DESIGN

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

Instruction Set Design

Copyright 2012 Pearson Education, Inc. Chapter 1 INTRODUCTION TO COMPUTING AND ENGINEERING PROBLEM SOLVING

Let s put together a Manual Processor

PART B QUESTIONS AND ANSWERS UNIT I

1 Classical Universal Computer 3

Systems I: Computer Organization and Architecture

İSTANBUL AYDIN UNIVERSITY

Instruction Set Architecture

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

CPU Organization and Assembly Language

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

The 104 Duke_ACC Machine

Chapter 9 Computer Design Basics!

LSN 2 Computer Processors

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

An Overview of Stack Architecture and the PSC 1000 Microprocessor

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

TIMING DIAGRAM O 8085

Notes on Assembly Language

Summary of the MARIE Assembly Language

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Chapter 2 Topics. 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis

EC 362 Problem Set #2

1 Computer hardware. Peripheral Bus device "B" Peripheral device. controller. Memory. Central Processing Unit (CPU)

Computer Organization and Architecture

Administrative Issues

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

Microprocessor and Microcontroller Architecture

Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8

TYPES OF COMPUTERS AND THEIR PARTS MULTIPLE CHOICE QUESTIONS

Chapter 2 Logic Gates and Introduction to Computer Architecture

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

Building a computer. Electronic Numerical Integrator and Computer (ENIAC)

COMPUTER ORGANIZATION AND ARCHITECTURE. Slides Courtesy of Carl Hamacher, Computer Organization, Fifth edition,mcgrawhill

CHAPTER 4 MARIE: An Introduction to a Simple Computer

LC-3 Assembly Language

Programming Logic controllers

PROBLEMS #20,R0,R1 #$3A,R2,R4

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Introducción. Diseño de sistemas digitales.1

The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway

Chapter 5 Instructor's Manual

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Systems I: Computer Organization and Architecture

OAMulator. Online One Address Machine emulator and OAMPL compiler.

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

ARM Microprocessor and ARM-Based Microcontrollers

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

Microcontroller Basics A microcontroller is a small, low-cost computer-on-a-chip which usually includes:

CSCA0201 FUNDAMENTALS OF COMPUTING. Chapter 1 History of Computers

Chapter 1 Computer System Overview

Execution Cycle. Pipelining. IF and ID Stages. Simple MIPS Instruction Formats

EECS 427 RISC PROCESSOR

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

PROBLEMS (Cap. 4 - Istruzioni macchina)

1 Description of The Simpletron

CHAPTER 6: Computer System Organisation 1. The Computer System's Primary Functions

CSE 141L Computer Architecture Lab Fall Lecture 2

Processor Architectures

Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

CSC 2405: Computer Systems II

CS352H: Computer Systems Architecture

MULTIPLE CHOICE FREE RESPONSE QUESTIONS

Here is a diagram of a simple computer system: (this diagram will be the one needed for exams) CPU. cache

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

CHAPTER 11: Flip Flops

Introduction to Computer Architecture Concepts

picojava TM : A Hardware Implementation of the Java Virtual Machine

Reduced Instruction Set Computer (RISC)


Transcription:

Chapter 4 The Von Neumann Model The Stored Program Computer 1943: ENIAC Presper Eckert and John Mauchly -- first general electronic computer. (or was it John V. Atanasoff in 1939?) Hard-wired program -- settings of dials and switches. 1944: Beginnings of EDVAC among other improvements, includes program stored in memory 1945: John von Neumann wrote a report on the stored program concept, known as the First Draft of a Report on EDVAC The basic structure proposed in the draft became known as the von Neumann machine (or model). a memory, containing instructions and data a processing unit, for performing arithmetic and logical operations a control unit, for interpreting instructions For more history, see http://www.maxmon.com/history.htm 4-2 1

Von Neumann Model MEMORY MAR MDR INPUT Keyboard Mouse Scanner Disk PROCESSING UNIT ALU TEMP OUTPUT Monitor Printer LED Disk CONTROL UNIT PC IR 4-3 Memory 2 k x m array of stored bits Address unique (k-bit) identifier of location Contents m-bit value stored in location Basic Operations: LOAD read a value from a memory location STORE write a value to a memory location 0000 0001 0010 0011 0100 0101 0110 1101 1110 1111 00101101 10100010 4-4 2

Interface to Memory How does processing unit get data to/from memory? MAR: Memory Address Register MEMORY MDR: Memory Data Register To LOAD a location (A): 1. Write the address (A) into the MAR. 2. Send a read signal to the memory. 3. Read the data from MDR. To STORE a value (X) to a location (A): 1. Write the data (X) to the MDR. 2. Write the address (A) into the MAR. 3. Send a write signal to the memory. MAR MDR 4-5 Processing Unit Functional Units ALU = Arithmetic and Logic Unit could have many functional units. some of them special-purpose (multiply, square root, ) LC-3 performs ADD, AND, NOT PROCESSINGUNIT ALU Registers Small, temporary storage Operands and results of functional units LC-3 has eight registers (R0,, R7), each 16 bits wide TEMP Word Size number of bits normally processed by ALU in one instruction also width of registers LC-3 is 16 bits 4-6 3

Input and Output Devices for getting data into and out of computer memory Each device has its own interface, usually a set of registers like the memory s MAR and MDR INPUT Keyboard Mouse Scanner Disk LC-3 supports keyboard (input) and monitor (output) keyboard: data register (KBDR) and status register (KBSR) monitor: data register (DDR) and status register (DSR) OUTPUT Monitor Printer LED Disk Some devices provide both input and output disk, network Program that controls access to a device is usually called a driver. 4-7 Control Unit Orchestrates execution of the program CONTROL UNIT PC IR Instruction Register (IR) contains the current instruction. Program Counter (PC) contains the address of the next instruction to be executed. Control unit: reads an instruction from memory the instruction s address is in the PC interprets the instruction, generating signals that tell the other components what to do an instruction may take many machine cycles to complete 4-8 4

Instruction Processing Fetch instruction from memory Decode instruction Evaluate address Fetch operands from memory Execute operation Store result 4-9 Instruction The instruction is the fundamental unit of work. Specifies two things: opcode: operation to be performed operands: data/locations to be used for operation An instruction is encoded as a sequence of bits. (Just like data!) Often, but not always, instructions have a fixed length, such as 16 or 32 bits. Control unit interprets instruction: generates sequence of control signals to carry out operation. Operation is either executed completely, or not at all. A computer s instructions and their formats is known as its Instruction Set Architecture (ISA). 4-10 5

Example: LC-3 ADD Instruction LC-3 has 16-bit instructions. Each instruction has a four-bit opcode, bits [15:12]. LC-3 has eight registers (R0-R7) for temporary storage. Sources and destination of ADD are registers. Add the contents of R2 to the contents of R6, and store the result in R6. 4-11 Example: LC-3 LDR Instruction Load instruction -- reads data from memory Base + offset mode: add offset to base register -- result is memory address load from memory address into destination register Add the value 6 to the contents of R3 to form a memory address. Load the contents of that memory location to R2. 4-12 6

Instruction Processing: FETCH Load next instruction (at address stored in PC) from memory into Instruction Register (IR). Copy contents of PC into MAR. Send read signal to memory. Copy contents of MDR into IR. Then increment PC, so that it points to the next instruction in sequence. PC becomes PC+1. F D EA OP EX S 4-13 Instruction Processing: DECODE First identify the opcode. In LC-3, this is always the first four bits of instruction. A 4-to-16 decoder asserts a control line corresponding to the desired opcode. Depending on opcode, identify other operands from the remaining bits. Example: for LDR, last six bits is offset for ADD, last three bits is source operand #2 F D EA OP EX S 4-14 7

Instruction Processing: EVALUATE ADDRESS For instructions that require memory access, compute address used for access. F Examples: add offset to base register (as in LDR) add offset to PC add offset to zero D EA OP EX S 4-15 Instruction Processing: FETCH OPERANDS Obtain source operands needed to perform operation. Examples: load data from memory (LDR) read data from register file (ADD) F D EA OP EX S 4-16 8

Instruction Processing: EXECUTE Perform the operation, using the source operands. Examples: send operands to ALU and assert ADD signal do nothing (e.g., for loads and stores) F D EA OP EX S 4-17 Instruction Processing: STORE RESULT Write results to destination. (register or memory) Examples: result of ADD is placed in destination register result of memory load is placed in destination register for store instruction, data is stored to memory write address to MAR, data to MDR assert WRITE signal to memory F D EA OP EX S 4-18 9

Changing the Sequence of Instructions In the FETCH phase, we increment the Program Counter by 1. What if we don t want to always execute the instruction that follows this one? examples: loop, if-then, function call Need special instructions that change the contents of the PC. These are called control instructions. jumps are unconditional -- they always change the PC branches are conditional -- they change the PC only if some condition is true (e.g., the result of an ADD is zero) 4-19 Example: LC-3 JMP Instruction Set the PC to the value contained in a register. This becomes the address of the next instruction to fetch. Load the contents of R3 into the PC. 4-20 10

Instruction Processing Summary Instructions look just like data -- it s all interpretation. Three basic kinds of instructions: computational instructions (ADD, AND, ) data movement instructions (LD, ST, ) control instructions (JMP, BRnz, ) Six basic phases of instruction processing: F D EA OP EX S not all phases are needed by every instruction phases may take variable number of machine cycles 4-21 Control Unit State Diagram The control unit is a state machine. Here is part of a simplified state diagram for the LC-3: A more complete state diagram is in Appendix C. It will be more understandable after Chapter 5. 4-22 11

Stopping the Clock Control unit will repeat instruction processing sequence as long as clock is running. If not processing instructions from your application, then it is processing instructions from the Operating System (OS). The OS is a special program that manages processor and other resources. To stop the computer: AND the clock generator signal with ZERO When control unit stops seeing the CLOCK signal, it stops processing. 4-23 12