The Von Neumann Architecture Odds and Ends. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001

Similar documents
CMPUT101 Introduction to Computing - Summer 2002

The Von Neumann Architecture. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001

Designing Computers. The Von Neumann Architecture. The Von Neumann Architecture. The Von Neumann Architecture

CMPUT101 Introduction to Computing - Summer 2002

Computer Architecture (part 2)

CMPUT 101 with Solutions Quiz 2 (50 minutes) November 16, 2000

CMPUT 101 with Solutions Quiz 2 (50 minutes) August 7, 2002

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

CMPUT 101 with Solutions Quiz 2 (50 minutes) November 7, 2003

CS1004: Intro to CS in Java, Spring 2005

COMPUTER SYSTEM. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U

Chapter 5 12/2/2013. Objectives. Computer Systems Organization. Objectives. Objectives (continued) Introduction. INVITATION TO Computer Science 1

Chapter 5: Computer Systems Organization. Invitation to Computer Science, C++ Version, Third Edition

Chapter 5: Computer Systems Organization

Computer Architecture

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

An Introduction to System Software and Virtual Machines

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

Memory General R0 Registers R1 R2. Input Register 1. Input Register 2. Program Counter. Instruction Register

Von Neumann Architecture

A B C ((NOT A) AND B) OR C

Computer Organization

Data Manipulation. Chih-Wei Tang ( 唐之瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan

Chapter 2 Data Manipulation

AS/A Level Computing Syllabus 2011

Outcomes. Lecture 13 - Introduction to the Central Processing Unit (CPU) Central Processing UNIT (CPU) or Processor

Computer Architecture 2/26/01 Lecture #

Teaching London Computing

The Stored Program Computer

Computer Architecture and Data Manipulation. Von Neumann Architecture

Chapter 08: The Memory System. Lesson 01: Basic Concepts

Level 2: The Hardware World Chapters 4 and 5 (topics of other cs courses)

Machine Architecture. or what s in the box? Lectures 2 & 3. Prof Leslie Smith. ITNP23 - Autumn 2014 Lectures 2&3, Slide 1

5 Computer Organization

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

Chapter 4 The Von Neumann Model

The Stored Program Computer

What Are The Main Differences Between Program Counter Pc And Instruction Register Ir

Information Science 1

Chapter 4 The Von Neumann Model

Computer Architecture Review CS 595

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computing Layers

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Wednesday, February 4, Chapter 4

Chapter One. Introduction to Computer System

Chapter 4 The Von Neumann Model

Basic Computer Architecture

Show how to connect three Full Adders to implement a 3-bit ripple-carry adder

Wednesday, September 13, Chapter 4

Introduction to Computer Engineering. CS/ECE 252 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin Madison

Summary of Computer Architecture

UNIT 2 Data Center Environment

Computer System. Hiroaki Kobayashi 7/25/2011. Agenda. Von Neumann Model Stored-program instructions and data are stored on memory

Computer Architecture COMP360

The Institution of Engineers - Sri Lanka

Computer Architecture and Assembly Language. Spring

CS 101, Mock Computer Architecture

Systems Architecture

Lecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit

5 Computer Organization

EE 3170 Microcontroller Applications

Dec Hex Bin ORG ; ZERO. Introduction To Computing

COSC121: Computer Systems: Review

1. True or False? For tasks like Web surfing, sufficient memory can make up for a slow processor.

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

COSC121: Computer Systems: Review

Topics: Microcontrollers Programming Basics: structure and variables Digital Output Analog to Digital Conversion. Arduino

General purpose registers These are memory units within the CPU designed to hold temporary data.

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

Digital System Design Using Verilog. - Processing Unit Design

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter

Computing Layers. Chapter 5 The LC-3

Introduction to MiniSim A Simple von Neumann Machine

Introduction to CPU architecture using the M6800 microprocessor

(Advanced) Computer Organization & Architechture. Prof. Dr. Hasan Hüseyin BALIK (3 rd Week)

Multiple Choice Type Questions

CS 140 Introduction to Computing & Computer Technology. Computing Components

Computer Organization and Technology Processor and System Structures

Embedded Systems Ch 15 ARM Organization and Implementation

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

CPU Structure and Function

CPU. Fall 2003 CSE 207 Digital Design Project #4 R0 R1 R2 R3 R4 R5 R6 R7 PC STATUS IR. Control Logic RAM MAR MDR. Internal Processor Bus

LC-3 Architecture. (Ch4 ish material)

Why learn Computer Programming? Computer-based problem solving in Science and Engineering. Why learn Fortran? Elementary Computer Organization

Computer Organization

CN310 Microprocessor Systems Design

Copyright 2000 N. AYDIN. All rights reserved. 1

CC411: Introduction To Microprocessors

Computer Organization II CMSC 3833 Lecture 33

Microcomputer Architecture and Programming

Chapter 5 The LC-3. ACKNOWLEDGEMENT: This lecture uses slides prepared by Gregory T. Byrd, North Carolina State University 5-2

Unit objective. Unit Introduction UNIT - I. In this unit you will be introduced to :

Chapter 1 : Introduction

Machine code. Nils Jansen December 12, 2017

Chapter 16. Control Unit Operation. Yonsei University

Introduction to Computer Science. Homework 1

Introduction to Computer Engineering. CS/ECE 252, Fall 2016 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison

Lecture 11: Control Unit and Instruction Encoding

Transcription:

The Von Neumann Architecture Odds and Ends Chapter 5.1-5.2 Von Neumann Architecture CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 1 Designing Computers All computers more or less based on the same basic design, the Von Neumann Architecture! CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 2 The Von Neumann Architecture Model for designing and building computers, based on the following three characteristics: 1) The computer consists of four main sub-systems: Memory ALU (Arithmetic/Logic Unit) Control Unit Input/Output System (I/O) 2) Program is stored in memory during execution. 3) Program instructions are executed sequentially. CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 3 Chapter 5: The Von Neumann Architecture 1

The Von Neumann Architecture Bus Memory Processor (CPU) Control Unit Input-Output Store data and program Execute program ALU Do arithmetic/logic operations requested by program Communicate with "outside world", e.g. Screen Keyboard Storage devices... CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 4 MAR Memory decoder circuit Structure of the Memory Subsystem F/S... MDR Fetch/Store controller Fetch(address) Load address into MAR. Decode the address in MAR. Copy the content of memory cell with specified address into MDR. Store(address, value) Load the address into MAR. Load the value into MDR. Decode the address in MAR Copy the content of MDR into memory cell with the specified address. CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 5 Implementation of the Memory Subsystem CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 6 Chapter 5: The Von Neumann Architecture 2

CACHE - Modern addition High-speed memory, integrated on the CPU Ca. 10 times faster than RAM Relatively small (128-256K) Stores data most recently used Principle of Locality When CPU needs data: First looks in the cache, only if not there, then fetch from RAM. If cache full, new data overwrites older entries in cache. Memory Processor (CPU) Cache Control Unit ALU I/O CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 7 I/O Subsystem: Hard-Drives Uses magnetic surfaces to store the data. Each surface has many circular tracks. Each track consists of many sectors. The surfaces rotate at a high speed Typically ~7000 rev/min The read/write arm moves: back and forth to locate a track CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 8 Hard-Drive CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 9 Chapter 5: The Von Neumann Architecture 3

Disk Access Time The time it takes to read/write data to a disk, consists of: Seek time The time it takes to position the read/write head over correct track (depends on arm movement speed). Latency The time waiting for the beginning of the desired sector to get under the read/write head (depends on rotation speed) Transfer time The time needed for the sector to pass under the read/write head (depends on rotation speed) Disk Access Time = Seek time + Latency + Transfer time Measure worst, best, and average case. (Example: p. 189) CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 10 Structure of the ALU Registers: Very fast local memory cells, that store operands of operations and intermediate results. CCR (condition code register), a special purpose register that stores the result of <, =, > operations ALU circuitry: Contains an array of circuits to do mathematical/logic operations. Bus: Data path interconnecting the registers to the ALU circuitry. R0 R1 R2 Rn ALU circuitry GT EQ LT CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 11 Implementation of the ALU ALU Circuitry Every circuit produces a result but only the desired one is selected CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 12 Chapter 5: The Von Neumann Architecture 4

Structure of the Control Unit PC (Program Counter): stores the address of next instruction to fetch IR (Instruction Register): stores the instruction fetched from memory Instruction Decoder: Decodes instruction and activates necessary circuitry PC IR +1 Instruction Decoder CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 13 Machine Language Instructions A machine language instruction consists of: Operation code, telling which operation to perform Address field(s), telling the memory addresses of the values on which the operation works. Example: ADD X, Y (Add content of memory locations X and Y, and store back in memory location Y). Assume: opcode for ADD is 9, and addresses X=99, Y=100 Opcode (8 bits) Address 1 (16 bits) Address 2 (16 bits) 00001001 0000000001100011 0000000001100100 CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 14 Implementation of the Control Unit CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 15 Chapter 5: The Von Neumann Architecture 5

von Neumann Architecture CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 16 How does this all work together? Program Execution: PC is set to the address where the first program instruction is stored in memory. Repeat until HALT instruction or fatal error Fetch instruction Decode instruction Execute instruction End of loop CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 17 Program Execution (cont.) Fetch phase PC --> MAR (put address in PC into MAR) Fetch signal (signal memory to fetch value into MDR) MDR --> IR (move value to Instruction Register) PC + 1 --> PC (Increase address in program counter) Decode Phase IR -> Instruction decoder (decode instruction in IR) Instruction decoder will then generate the signals to activate the circuitry to carry out the instruction CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 18 Chapter 5: The Von Neumann Architecture 6

Program Execution (cont.) Execute Phase Differs from one instruction to the next. Example: LOAD X (load value in addr. X into register) IR_address -> MAR Fetch signal MDR --> R ADD X left as an exercise CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 19 Instruction Set for Our Von Neumann Machine Opcode Operation Meaning 0000 LOAD X CON(X) --> R 0001 STORE X R --> CON(X) 0010 CLEAR X 0 --> CON(X) 0011 ADD X R + CON(X) --> R 0100 INCREMENT X CON(X) + 1 --> CON(X) 0101 SUBTRACT X R - CON(X) --> R 0101 DECREMENT X CON(X) - 1 --> CON(X) COMPARE X If CON(X) > R then GT = 1 else 0 0111 If CON(X) = R then EQ = 1 else 0 If CON(X) < R then LT = 1 else 0 1000 JUMP X Get next instruction from memory location X 1001 JUMPGT X Get next instruction from memory loc. X if GT=1... JUMPxx X xx = LT / EQ / NEQ 1101 IN X Input an integer value and store in X 1110 OUT X Output, in decimal notation, content of mem. loc. X 1111 HALT Stop program execution CMPUT101 Introduction to Computing (c) Yngvi Bjornsson & Vadim Bulitko 20 Chapter 5: The Von Neumann Architecture 7