Computer Architecture

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

CMPUT101 Introduction to Computing - Summer 2002

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

CMPUT101 Introduction to Computing - Summer 2002

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

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

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

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

Von Neumann Architecture

Chapter 5: Computer Systems Organization

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

Computer Architecture (part 2)

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

Information Science 1

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

The Stored Program Computer

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

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

Question 1: What criteria define Von Neumann architecture? Identify clearly and coherently. Solution

Dec Hex Bin ORG ; ZERO. Introduction To Computing

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

Chapter 4 The Von Neumann Model

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

CC411: Introduction To Microprocessors

Chapter 4 The Von Neumann Model

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

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

CS1004: Intro to CS in Java, Spring 2005

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

THE MICROPROCESSOR Von Neumann s Architecture Model

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to

AS/A Level Computing Syllabus 2011

Chapter 2 Data Manipulation

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

Teaching London Computing

Systems Architecture

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

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

von Neumann Architecture Basic Computer System Early Computers Microprocessor Reading Assignment An Introduction to Computer Architecture

Basic Computer System. von Neumann Architecture. Reading Assignment. An Introduction to Computer Architecture. EEL 4744C: Microprocessor Applications

Computer Organization

Computer Architecture Review CS 595

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan

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

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

LC-3 Architecture. (Ch4 ish material)

CC312: Computer Organization

CS 101, Mock Computer Architecture

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

Tutorial 4: Computer Organization


Introduction to CPU architecture using the M6800 microprocessor

Running Applications

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

Chapter One. Introduction to Computer System

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

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

Cambridge International Examinations Cambridge Ordinary Level

Intermediate Programming & Design (C++) Notation

Computer Systems Organization

Unit - II. Computer Concepts and C Programming 06CCP13. Unit II

SCRAM Introduction. Philipp Koehn. 19 February 2018

Central Processing Unit. Steven R. Bagley

COSC121: Computer Systems: Review

Chapter 6 (Lect 3) Counters Continued. Unused States Ring counter. Implementing with Registers Implementing with Counter and Decoder

Copyright 2000 N. AYDIN. All rights reserved. 1

Wednesday, February 4, Chapter 4

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

COMPUTER STRUCTURE AND ORGANIZATION

CPSC 121: Models of Computation

Computer Architecture 2/26/01 Lecture #

Computer Architecture and Data Manipulation. Von Neumann Architecture

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

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

Basic Computer Architecture

Computer Architecture and Organization (CS-507)

Binghamton University. CS-120 Summer LC3 Memory. Text: Introduction to Computer Systems : Sections 5.1.1, 5.3

2. Computer Evolution and Performance

What is the typical configuration of a computer sold today? 1-1

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

System Unit Components Chapter2

Chapter 7: Processor and Memory

Computer Architecture and Assembly Language. Spring

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 01, SPRING 2013

Hardware Level Organization

Chapter 4. Computer Organization


Chapter 2 Instruction Set Architecture

CMSC 104 -Lecture 2 John Y. Park, adapted by C Grasso

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

Year 10 OCR GCSE Computer Science (9-1)

Computer Systems Architecture

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Finite State Machines (FSMs) and RAMs and CPUs. COS 116, Spring 2011 Sanjeev Arora

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

Microprocessors. Microprocessors and rpeanut. Memory. Eric McCreath

Microprocessors and rpeanut. Eric McCreath

Chapter 02: Computer Organization. Lesson 02: Functional units and components in a computer organization- Part 1: Processor

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Transcription:

Computer Architecture Topics: Machine Organization Machine Cycle Program Execution Machine Language Types of Memory & Access Von Neumann Design 1) Two key ideas 1) The stored program concept 1) instructions are represented in binary and stored, like data, in memory 2) Instructions are sequentially executed 2 Chapter 5 The Von Neumann Architecture 1

Data and programs are represented in binary Von Neumann design Stored program concept Instructions in binary to be interpreted as directly executable actions» Machine instruction set» Directly executable primitives ->circuits Sequential execution of instructions Fetch an instruction Decode the instruction Execute the instruction 7 The Von Neumann Architecture: A simple schematic 1. Random Access Memory 4. Input-Output Processor 1. (CPU) 2.Control unit 3.ALU 8 Chapter 5 The Von Neumann Architecture 4

9 Random Access Memory Two features Every memory cell has a unique address Takes the same amount of time to access every cell Unit of retrieval is the entire cell Memory Size = # memory cells 1 memory cell = 8 bits (1 byte) 1000 memory cells = 1000 bytes kilobyte 1 million memory cells megabyte (..1,048,576 = 2 20 ) 1 billion memory cells gigabyte ( 1,073741,824 = 2 30 ) 10 Chapter 5 The Von Neumann Architecture 5

Memory Address Memory Cells 20 bits to represent an address? -> 2 20 (1,048,576) unique patterns Can reference 1,048,576 memory cells address space 00000 00000 00000 01011 Cell 0 Cell 1 Cell 2 Cell 3 Cell 4 Cell 5 Cell 6 Cell 7 Cell 8 Cell 9 Cell 10 Cell 11 1 1 0 0 1 0 1 1 0 1 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 1 11 CPU s Control Unit Controls the basic machine cycle FETCH DECODE EXECUTE an instruction from RAM identify what primitive machine instruction it is activate appropriate circuits 12 Chapter 5 The Von Neumann Architecture 6

Basic Memory Operations between CPU and RAM : Fetch & Store Address Contents 00000101 00001111 Fetch (address) Fetch (00000101) nondestructive copy Store(address, value) Store (00000101, 00010000) destructive replacement e.g. set x to x + 1 13 Decomposing Fetch & Store: Memory Registers Address bus Data bus Memory Address Register 00000 00000 00000 00110 Memory Data Register 10000001 cell 0 1 2 00000 00000 00000 00110 2 n - 1 address 1 1 0 0 1 0 1 1 0 1 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 1 14 Chapter 5 The Von Neumann Architecture 7

Breaking down fetch and store MAR Memory decoder circuit 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. 15 Decoding Memory Addresses: a 4-bit example (simplified - 1 dimensional) 0 0 1 1 4 to 16 bit decoder circuit Line 0 line 3... 1 1 0 0 1 0 1 1 0 1 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 Line 15 16 Chapter 5 The Von Neumann Architecture 8

Overall RAM Organization MAR Memory Cells CPU Decoding Circuits Fetch-Store Signal MDR Fetch- Store Controller 17 Size (width) of Address Bus in bits must map to address space Address Bus/Data Bus if address space = 2 n, then address bus is n bits wide Size (width) of Data bus Single unit of modification is the memory cell but multiple memory cell contents moved to/from CPU width of data bus = size of MDR (typically 16, 32) word size 18 Chapter 5 The Von Neumann Architecture 9

Instructions have a binary representation Programs = instructions implemented in control unit as circuits E.g. Add circuit test-for-equality circuit Representing instructions in binary (preview) Two key ideas Machine instruction set Operation codes (op-codes) 3 Example Imagine we are controlling a simple robot Small set of executable primitive actions robot can do: step one step forward turn 90 degrees stop raise arms lower arms sense obstacle turn warning light on or off Robot s instruction set 4 Chapter 5 The Von Neumann Architecture 2

Code English Action Op Codes for robot 000 step step forward 001 turn turn 90 degrees 010 raise arms arms go up, unless obstacle is sensed. If obstacle sensed,warning light goes on 011 lower arms arms lowered 101 if warning light on, go to a particular go to instruction <#> instruction if this condition holds 100 go to instruction <#> go to a particular instruction, no matter what 110 turn light off warning light off 111 halt 5 Program to walk robot to a wall, and stop opcode operand 1. 010 00000 raise arms 2. 101 00110 if warning light on, go to step 6 3. 011 00000 lower arms 4. 000 00000 step forward 5. 100 00001 go to step 1 6. 110 00000 turn off light 7. 111 00000 stop Besides op codes, instructions may need to represent other information 6 Chapter 5 The Von Neumann Architecture 3

Continuing now with Basic Machine Cycle Fetch an instruction from memory to the CPU Decode The instruction in the CPU Execute the instruction 19 Op Codes (revisited): simplified example 8 bits 16 bits 16 bits 16 bits Operation Code Address Field 1 Address Field 2 Address Field 3 Add X, Y add contents held at locations X and Y and put the result back into location X 00001001 0000000000001011 0000000100001011 0000000000000000 Set x to x + 10 20 Chapter 5 The Von Neumann Architecture 10

Address bus Control Unit Registers Data bus... Program Counter Register Instruction address Instruction Register Op Code Address Fields + 1 Instruction Decoder Circuit Line 000 (add) Enable add circuits Line 010 (load) enable load circuits 21 Machine Cycle (3) Fetch An instruction from memory to CPU Address taken from PC register Deposit instruction in Instruction Register Advance the PC to the next address Decode OpCode in Instruction Register decoded into one of the machine instruction primitives add the contents of addresses X and Y and place back in X Execute 22 Chapter 5 The Von Neumann Architecture 11

Execution requires fetches/stores Add values at addresses 1 and 2 and store value back in address 1 (set x to x + y) Set the fetch signal Send address 1 out on address bus, fetch those contents on data bus Send address 2 out on address bus, fetch those contents on data bus Do the add operation and get a result Set store signal Send address 1 on address bus, send result back on data bus 23 24 Chapter 5 The Von Neumann Architecture 12