CPSC 121: Models of Computation

Similar documents
Example: NFA to DFA Conversion

Computer Architecture 2/26/01 Lecture #

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

Microcomputer Architecture and Programming

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

Von Neumann Architecture

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

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

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

C.P.U Organization. Memory Unit. Central Processing Unit (C.P.U) Input-Output Processor (IOP) Figure (1) Digital Computer Block Diagram

Lecture Topics. Announcements. Today: Single-Cycle Processors (P&H ) Next: continued. Milestone #3 (due 2/9) Milestone #4 (due 2/23)

COMPUTER STRUCTURE AND ORGANIZATION

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

EE 3170 Microcontroller Applications

Computer Architecture

Introduction to CPU architecture using the M6800 microprocessor

CSE140: Components and Design Techniques for Digital Systems

Information Science 1

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

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

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

There are four registers involved in the fetch cycle: MAR, MBR, PC, and IR.

CS 150 Introduction to Computer Science 1

Running Applications

Microprocessors/Microcontrollers

Fundamentals of Programming Session 1

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Admin. ! Assignment 3. ! due Monday at 11:59pm! one small error in 5b (fast division) that s been fixed. ! Midterm next Thursday in-class (10/1)

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

Computer Architecture (part 2)

} Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = / 2; 3. int x = 5 / ; 4. double x = 5 / 2.

Tutorial 4: Computer Organization

Computer Architecture and Assembly Language. Spring

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

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

ECE 341 Midterm Exam

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

session 7. Datapath Design

Teaching London Computing

Admin CS41B MACHINE. Midterm topics. Admin 2/11/16. Midterm next Thursday in-class (2/18) SML. recursion. math. David Kauchak CS 52 Spring 2016

2010 Summer Answers [OS I]

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

Information Science 1

The due date for submitting this assignment has passed. 1) Which of the following statements regarding a microcomputer, a

Chapter 2 Data Manipulation

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

Register Are Two Names For The Same Place

CSC258: Computer Organization. Memory Systems

CSC 220: Computer Organization Unit 12 CPU programming

Cpr E 281 FINAL PROJECT ELECTRICAL AND COMPUTER ENGINEERING IOWA STATE UNIVERSITY. FINAL Project. Objectives. Project Selection

COMPUTER ORGANIZATION AND ARCHITECTURE

The Stored Program Computer

Introduction to Computers - Chapter 4

Chapter 5: Computer Systems Organization

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

Physics 2660: Fundamentals of Scientific Computing. Lecture 7 Instructor: Prof. Chris Neu

COMP3221: Microprocessors and. Embedded Systems

ASSIGNMENT ECE514 (COMPUTER ORGANIZATION) ASSIGNMENT NO. 3

CS1004: Intro to CS in Java, Spring 2005

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text

Segment 1A. Introduction to Microcomputer and Microprocessor

Chapter 4. MARIE: An Introduction to a Simple Computer 4.8 MARIE 4.8 MARIE A Discussion on Decoding

CS 151 Midterm. (Last Name) (First Name)

1a Computers, Problem Solving!

Chapter 3 - Top Level View of Computer Function

CMPUT101 Introduction to Computing - Summer 2002

Midterms Save the Dates!

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

Computer Architecture and Organization:

Computer Organization and Levels of Abstraction

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics

Computer Systems Organization

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

Announcements. This week: no lab, no quiz, just midterm

IA Digital Electronics - Supervision I

CMPUT101 Introduction to Computing - Summer 2002

Register-Level Design

Systems Architecture

Computer Organization

378: Machine Organization and Assembly Language

11/22/1999 7pm - 9pm. Name: Login Name: Preceptor Name: Precept Number:

1 ( 10 points) 6 min.

ECE369. Chapter 5 ECE369

CS 101, Mock Computer Architecture

CSE 141 Computer Architecture Spring Lectures 11 Exceptions and Introduction to Pipelining. Announcements

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

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

CPU Structure and Function

BASIC COMPUTER ORGANIZATION. Operating System Concepts 8 th Edition

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

Chapter 4. MARIE: An Introduction to a Simple Computer

Department of Computer and Mathematical Sciences. Lab 4: Introduction to MARIE

Midterm Examination - Answers October 25, 2012 In Class Instructor: Joseph Vybihal

CS501_Current Mid term whole paper Solved with references by MASOOM FAIRY

Microprogrammed Control Approach

OO software systems are systems of interacting objects.

Dec Hex Bin ORG ; ZERO. Introduction To Computing


N.B. These pastpapers may rely on the knowledge gained from the previous chapters.

Transcription:

Instructor: Bob Woodham woodham@cs.ubc.ca Department of Computer Science University of British Columbia Lecture Notes 2009/2010, Section 203

Menu March 22, 2010 Topics: A Simple Computer High-level design Pre-class reading: Today: Review Lab 1 On-line handouts (links given) Wikipedia articles (links given) Reminders: No new lab this week (midterm week) 2nd Midterm Wednesday, March 24, 7:00 8:00pm Final exam Thursday, Apr 29, noon, OSBO A Bob s course office hours, Friday, 10:30 noon, ICCS 119 Bring iclickers to class READ the WebCT Vista course announcements board www: http://www.ugrad.cs.ubc.ca/~cs121/ WebCT Vista: http://www.vista.ubc.ca

Suggested Wikipedia Articles... 1 A processor register 2 The Fetch-Decode-Execute Instruction Cycle with links to descriptions of: 1 the Program Counter (PC) 2 the Instruction Register (IR) 3 an opcode 4 the Arithmetic Logic Unit (ALU) 3 A central processing unit s machine code 4 microcode 5 main memory

A Simple Computer (cont d) In-class discussion of the simple computer makes use of the following on-line handouts: 1 Annotated version of cpu.v 2 Summary of Opcodes for our CPU 3 A Simple Program 4 Data Bus Operation

Simple Computer: Major Components The simple computer has four major components: 1 Memory where data and instructions are stored 2 Program Counter (PC) location (in memory) where the next instruction to execute comes from 3 microcontroller (the traffic cop ) route data to/from other components ensure that instructions are performed correctly 4 Arithmetic Logic Unit (ALU) where data manipulation occurs (e.g., add, subtract, multiply, divide, remainder)

Simple Computer: Data Pathways All registers and data communication are based on fixed width, n-bit data pathways. There are two major data pathways: 1 a 32-bit wide data bus 2 a 16-bit wide control bus

Simple Computer: Special Purpose Registers There are several special purpose registers that are central to the simple computer s operation. Two are: 1 Accumulator (ACC) (32 bits) stores one of the operands and receives the result of all ALU operations 2 Program Counter (PC) (32 bits) location (in memory) where the next instruction to execute comes from

A Fetch Decode Execute (FDE) Computer Here are the three steps (repeated) by a FDE machine: 1 Fetch (i.e., read) the next machine language instruction to execute 2 Decode the machine language instruction to determine what is to be done (i.e., what the instruction requires) what additional data, if any, is required (from memory) to execute the instruction 3 Execute the microcode instructions to complete the executions of the original machine language instruction Steps 1, 2 and 3 repeat indefinitely...

Simple Computer: Memory read/write random access memory (RAM) bits implemented with flip-flops (as we have seen) we re going to want lots of bits... organize bits of memory into 32 bit words each 32 bit word has a (numeric) memory address refer (sequentially) to memory location 0, memory location 1,...

Simple Computer: Memory Address Register There are several special purpose registers that are central to the simple computer s operation. A third is: 3 Memory Address Register (MAR) (32 bits) the 32 bit address of the word in memory selected for read or write The Memory Address Register (MAR) is a register in the memory module

Simple Computer: Arithmetic Logic Unit (ALU) performs what we typically think of as computations ALU performs (32 bit integer) +,,,, mod (aka remainder) ALU has (only) one special purpose register, a 32 bit Accumulator (ACC)

Simple Computer: microcontroller and Program Counter (PC) the microcontroller implements the FSM to: perform the fetch step perform the decode step control the execute step includes the Program Counter (PC) (32 bits) location (in memory) where the next instruction to execute comes from

Simple Computer: Instruction Register There are several special purpose registers that are central to the simple computer s operation. A fourth is: 4 Instruction Register (IR) (32 bits) contains the instruction currently being decoded/executed The Instruction Register (IR) is a register in the microcontroller module

Simple Computer and TkGate TkGate lets us: load instructions and data from a file into the simple computer s memory (RAM) load instructions and data from a file into the simple computer s microcontroller memory (ROM)