CPS104 Computer Organization Lecture 1. CPS104: Computer Organization. Meat of the Course. Robert Wagner

Similar documents
CPS104 Computer Organization Lecture 1

CpE 442 Introduction To Computer Architecture Lecture 1

ECE 468 Computer Architecture and Organization Lecture 1

Computer Architecture

CISC 360. Computer Architecture. Seth Morecraft Course Web Site:

CS152 Computer Architecture and Engineering Lecture 1. August 27, 1997 Dave Patterson (http.cs.berkeley.edu/~patterson)

14:332:331. Lecture 1

EEC170 Computer Architecture. Lecture 1: Introduction to Computer Architecture

Computer Architecture = Instruction Set Architecture + Machine Organization +.. Overview

CMSC 611: Advanced Computer Architecture

Instruction Set Architecture. "Speaking with the computer"

CS61C Machine Structures. Lecture 1 Introduction. 8/27/2006 John Wawrzynek (Warzneck)

Administrative matters. EEL-4713C Computer Architecture Lecture 1. Overview. What is this class about?

EEM 486: Computer Architecture

Announcements HW1 is due on this Friday (Sept 12th) Appendix A is very helpful to HW1. Check out system calls

Math 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro

ECE 486/586. Computer Architecture. Lecture # 7

Computer Architecture. Fall Dongkun Shin, SKKU

CS3350B Computer Architecture Winter 2015

EECE 321: Computer Organization

Lecture 3 Machine Language. Instructions: Instruction Execution cycle. Speaking computer before voice recognition interfaces

Introduction. Datapath Basics

CSEE 3827: Fundamentals of Computer Systems

Chapter 4. The Processor

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

CPE300: Digital System Architecture and Design

GRE Architecture Session

EE282H: Computer Architecture and Organization. EE282H: Computer Architecture and Organization -- Course Overview

CS4200/5200. Lecture 1 Introduction. Dr. Xiaobo Zhou Department of Computer Science. UC. Colorado Springs. Compiler

CPSC 213. Introduction to Computer Systems. Introduction. Unit 0

Topic Notes: MIPS Instruction Set Architecture

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

CSE Introduction to Computer Architecture. Jeff Brown

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

CS 3410 Computer System Organization and Programming

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

Chapter 1. Computer Abstractions and Technology. Lesson 3: Understanding Performance

CS 3410 Computer System Organization and Programming

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements

Chapter 4. The Processor

CS61C : Machine Structures

CS 152 Computer Architecture and Engineering Lecture 1 Single Cycle Design

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

CS61C Machine Structures. Lecture 13 - MIPS Instruction Representation I. 9/26/2007 John Wawrzynek. www-inst.eecs.berkeley.

CpE 442 Introduction to Computer Architecture. The Role of Performance

COMPUTER ORGANIZATION (CSE 2021)

COMPUTER ORGANIZATION (CSE 2021)

Chapter 4. The Processor

Lecture Topics. Announcements. Today: The MIPS ISA (P&H ) Next: continued. Milestone #1 (due 1/26) Milestone #2 (due 2/2)

Lecture 10: Simple Data Path

Chapter 4. The Processor Designing the datapath

Reminder: tutorials start next week!

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Lecture 4: MIPS Instruction Set

Processor (I) - datapath & control. Hwansoo Han

UC Berkeley CS61C : Machine Structures

CS3350B Computer Architecture

Instruction Set Architecture (ISA)

Computer Organization

Anupam Gupta, Braydon Hall, Eugene Oh, Savanna Yee. Steve Jobs custom Apple I and other historic machines are on display at Seattle museum

Math 230 Assembly Programming (AKA Computer Organization) Spring 2008

COMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H

CSE140: Components and Design Techniques for Digital Systems

CSE 141 Computer Architecture Summer Session Lecture 3 ALU Part 2 Single Cycle CPU Part 1. Pramod V. Argade

ECE 15B COMPUTER ORGANIZATION

CS 3410: Intro to Computer System Organization and Programming

COMPUTER ORGANIZATION AND DESIGN

Computer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#:

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

CS430 - Computer Architecture William J. Taffe Fall 2002 using slides from. CS61C - Machine Structures Dave Patterson Fall 2000

Chapter 1 Introduction. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

CS3350B Computer Architecture MIPS Introduction

378: Machine Organization and Assembly Language

CS31001 COMPUTER ORGANIZATION AND ARCHITECTURE. Debdeep Mukhopadhyay, CSE, IIT Kharagpur. Instructions and Addressing

Truth Table! Review! Use this table and techniques we learned to transform from 1 to another! ! Gate Diagram! Today!

EE382 Processor Design. Class Objectives

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

Final Lecture. A few minutes to wrap up and add some perspective

Computer Architecture = CS/ECE 552: Introduction to Computer Architecture. 552 In Context. Why Study Computer Architecture?

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

EITF20: Computer Architecture Part2.2.1: Pipeline-1

Computer Technology & Abstraction

CSE Introduction to Computer Architecture

Chapter 4. The Processor

Instructors. ECE 152 Introduction to Computer Architecture. Undergrad Teaching Assistants. Course Website. Textbook.

How What When Why CSC3501 FALL07 CSC3501 FALL07. Louisiana State University 1- Introduction - 1. Louisiana State University 1- Introduction - 2

Chapter 4. The Processor. Computer Architecture and IC Design Lab

CPSC 213. Introduction to Computer Systems. About the Course. Course Policies. Reading. Introduction. Unit 0

5 Computer Organization

ECE 154A Introduction to. Fall 2012

CS61CL Machine Structures. Lec 5 Instruction Set Architecture

3/12/2014. Single Cycle (Review) CSE 2021: Computer Organization. Single Cycle with Jump. Multi-Cycle Implementation. Why Multi-Cycle?

URL: Offered by: Should already know: Will learn: 01 1 EE 4720 Computer Architecture

CS61C Machine Structures. Lecture 1 Introduction. 8/25/2003 Brian Harvey. John Wawrzynek (Warznek) www-inst.eecs.berkeley.

Computer Architecture EE 4720 Midterm Examination

Lecture 1: Course Introduction and Overview Prof. Randy H. Katz Computer Science 252 Spring 1996

ECE 15B Computer Organization Spring 2011

Data paths for MIPS instructions

Transcription:

CPS104 Computer Organization Lecture 1 Robert Wagner Slides available on: http://www.cs.duke.edu/~raw/cps104/lectures 1 CPS104: Computer Organization Instructor: Robert Wagner Office: LSRC D336, 660-6536 raw@cs.duke.edu Office Hours: Tue. & Thur., 3:30-4:30 or by appt. TA: TA Office: TA Office Phone: TA Office Hours: UTAs: Text: Computer Organization & Design: The Hardware / Software Interface (2nd printing). Web page: http://www.cs.duke.edu/~raw/cps104/ Newsgroup: duke.cs.cps104 2 Meat of the Course What is a Stored Program Digital Computer? What are the actions it can REALLY perform? How can these actions be used? How can hardware to perform them be designed? How do these internal details affect programs you write? Computer arithmetic vs. human Performance (execution-time speed) Why learn how hardware is built? Underlying technology changes over time Be better prepared for changes Understand why some operations are slow Decide for yourself if a new technology would make them more usable 3 1

Course Outline: Introduction to Computer organization and brief history. C and C++ Instruction Set Architecture. Assembly level programming. Relation to HLL programming. Instruction and data type representations. Addressing, procedure calls and Exceptions. Digital Logic: Digital Gates and Boolean Algebra. Arithmetic and Logic circuits 4 Course Outline (continue): The Central Processing Unit (CPU). The ALU. The data path. Controlling the CPU. The Memory Hierarchy. Cache Memory. Virtual Memory and Paging. Interrupts. Pipelining (if there is time). I/O Devices and Networks. Advanced Computer Architecture (if there is time) 5 Grading Grade breakdown Midterm Exam: 15% Final Exam: 35% Homework Assignments 50% Late homework policy: No sad stories! No cooperation on homework (Unless specified in the assignment). 3% reduction for each day late. Grades e-mailed: Written/email request for changes to grades. 6 2

Homework-0 Send me (raw@cs.duke.edu) email message with: your name, year, major and a short description of your computer science / Engineering background. Readings: Chapter-1, next time we start on Chapter-3. 7 Course Organization All programs in this course will be written in C -- not C++ -- unless otherwise specified. The programs must compile and run using gcc, without use of any libraries. Programs in this course will be graded on correctness, understandability, speed, and elegance Correctness requires that you understand what the problem requires, and build a program to produce the required results -- and nothing else Elegance = minimum number of C words -- comments don t count Most projects done in teams Every team member is responsible for understanding the entire project Quizzes will be given in class to test this Consider splitting your team into 2 competitive parts, each working somewhat independently. The 2 versions can be tested against one another for correctness (same answers), speed, and elegance 8 Course Problems Can t make midterm Tell us early and we will schedule alternate time Late homework problems: As a result of feedback, going to grade almost immediately so that can give results back quickly => late homework is a hassle What is cheating? Studying together in groups is encouraged All written work must be your own. Programs that are substantially the same as others will receive a grade of 0! Common examples of cheating: running out of time on a assignment and then pick up someone else's output,, person asks to borrow solution just to take a look, copying an exam question,... 9 3

CPS104: So what's in it for me? In-depth understanding of the inner-workings of modern computers, their evolution, and tradeoffs present at the hardware/software boundary. Understanding of the reality underlying theoretical computer models Insight into fast/slow operations that are easy/hard to implement Better understanding of operating System and compiler functions Designer's "Intellectual" toolbox. 10 Things We Hope You Will Learn from 104 A computer is NOT magic in a box. It is important to understand principles. All computers work in similar ways. The more you understand how it works, the better you can use the tool. Keep it simple and make it work (applies to both programs and hardware designs) Fully test everything individually and then together Retest everything whenever you make any changes Last minute changes are big no no s Planning is very important: Murphy s Law: things DO break at the last minute Don t make your plan based on the best case scenarios plan to look at more than one design -- START EARLY Never give up! It is not over until you give up. 11 Depth of Knowledge Expected We expect you to learn the material well enough to solve problems Exams and homework will test your ability to APPLY knowledge to examples that differ from those presented in class We expect you to learn how to write simple programs in C, and Assembly Language, to design gate-level circuits, and to be able to modify hardware designs made up of circuits for useful building blocks We will also expect you to be able to understand and simulate the performance of major components like the CPU, the cache, the virtual memory system, and I/O devices -- either mentally, or by writing a computer program which simulates the device 12 4

Big Ideas Underlying Computer Hardware Represent EVERYTHING in the same way: as sequences of 1 s and 0 s Interpret as binary integers, or printable characters, or bit patterns Provide a few fundamental operations on bit patterns Add, negate : definitions based on binary integer interpretation If (n<0) then goto L : tests one bit for value 1 Load and Store: move bit-sequences between locations Shift : Move bits around within one bit-sequence Build useful operations from combinations of the fundamental ones for and while loops Multiplication and Division Array indexing Concept of hierarchical design replicated when useful software is developed: useful operations become methods 13 What is "Computer Architecture" Coordination of levels of abstraction Application Compiler Operating System Firmware Instr. Set Proc. I/O system Digital Design Circuit Design Instruction Set Architecture Under a set of rapidly changing Forces 14 Review: Levels of Representation Library: Classes and methods C++ High Level Language Program Compiler Assembly Language Program Assembler temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; lw $15, 0($2) lw $16, 4($2) sw $16, 0($2) sw $15, 4($2) Machine Language Program Control Signal Specification Machine Interpretation 0000 1001 1100 0110 1010 1111 0101 1000 1010 1111 0101 1000 0000 1001 1100 0110 1100 0110 1010 1111 0101 1000 0000 1001 0101 1000 0000 1001 1100 0110 1010 1111 15 5

Instructions The most elementary order a programmer can give to a computer Logical form: A subroutine call Built in to the hardware performs very specific operations uses arguments which locate its operands within the computer Operands are stored in memory Located by the number (Address or Location) which identifies the pigeonhole where they are stored Instructions are themselves stored in memory Are represented in one memory location (or Word), as a sequence of fields, each of which holds a logically separate part of the instruction: OP DEST SRCA SRCB Each field holds a number, which is used when the hardware interprets the instruction -- according to that instruction s definition 16 Instruction Set Architecture... the attributes of a [computing] system as seen by the programmer, i.e. the conceptual structure and functional behavior, as distinct from the organization of the data flows and control, the logic design, and the physical implementation. Amdahl, Blaaw, and Brooks, 1964 SOFTWARE -- Organization of Programmable Storage -- Data Types & Data Structures: Encoding & Representations -- Instruction Formats -- Instruction (or Operation Code) Set -- Modes of Addressing and Accessing Data Items and Instructions -- Exceptional Conditions 17 Instruction Set Interface software instruction set hardware 18 6

MIPS I Instruction Set Architecture Instruction Categories Load/Store Computational Jump and Branch Floating Point Memory Management Special R0 - R31 PC HI LO 3 Instruction Formats: all 32 bits wide OP rs rt rd sa funct OP OP rs rt immediate jump target 19 Organization ISA Level FUs & Interconnect Logic Designer's View -- Capabilities & Performance Characteristics of Principal Functional Units (e.g., Registers, ALU, Shifters, Logic Units,...) -- Ways in which these components are interconnected -- nature of information flows between components -- logic and means by which such information flow is controlled. Choreography of FUs to realize the ISA Register Transfer Level Description 20 Execution Cycle Instruction Fetch Instruction Decode Operand Fetch Execute Obtain instruction from program storage Determine required actions and instruction size Locate and obtain operand data Compute result value or status Result Store Deposit results in storage for later use Next Instruction Determine successor instruction 21 7

Performance Trends 1000 100 Supercomputers Mainframes Performance 10 1 Minicomputers Microprocessors 0.1 1965 1970 1975 1980 1985 1990 1995 2000 Year 22 Processor Performance 300 250 200 RISC 150 100 50 RISC introduction Intel x86 35%/yr 0 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 Year 23 Processor and Caches SPARCstation 20 MBus Module MBus Processor MBus Slot 1 Registers Datapath MBus Slot 0 Internal Cache Control External Cache 24 8

Memory SPARCstation 20 Memory Controller SIMM Slot 0 SIMM Slot 1 SIMM Slot 2 SIMM Slot 3 SIMM Slot 4 SIMM Slot 5 SIMM Slot 6 SIMM Slot 7 Memory Bus SIMM 25 Input and Output (I/O) Devices SCSI Bus: Standard I/O Devices SPARCstation 20 : High Speed I/O Devices External Bus: Low Speed I/O Device Disk Slot 1 Slot 3 Tape Slot 0 Slot 2 SEC MACIO SCSI Bus Keyboard & Mouse Floppy Disk External Bus 26 Summary All computers consist of five components Processor: (1) datapath and (2) control (3) Memory (4) Input devices and (5) Output devices Not all memory is created equally Cache: fast (expensive) memory is placed closer to the processor Main memory: inexpensive, slower memory--we can have more Input and output (I/O) devices have the messiest organization Wide range of speed: graphics vs. keyboard Wide range of requirements: speed, standard, cost... etc. Least amount of research (so far) 27 9