CS64 Computer Organization

Similar documents
Instructors: Randy H. Katz David A. PaHerson hhp://inst.eecs.berkeley.edu/~cs61c/fa10. Fall Lecture #1. Agenda

Agenda. Old School CS61c. Agenda. New School CS61c 8/26/10. CS 61C: Great Ideas in Computer Architecture (Machine Structures)

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

ECE 15B COMPUTER ORGANIZATION

CS61C Machine Structures. Lecture 8 - Introduction to the MIPS Processor and Assembly Language. 9/14/2007 John Wawrzynek

EECE 321: Computer Organization

CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro

ELEC 5200/6200. Computer Architecture & Design. Victor P. Nelson Broun 326

Intro to Math 230 Assembly Language Programming. Lecture # 01 01/15/08

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

Handouts. (CSC-3501) Lecture 1 (15 Jan 2008) Seung-Jong Park (Jay) Class information. Schedule (check online frequently)

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

I ve been getting this a lot lately So, what are you teaching this term? Computer Organization. Do you mean, like keeping your computer in place?

ECE232: Hardware Organization and Design

CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro

14:332:331. Lecture 1

ECE232: Hardware Organization and Design

CSE : Introduction to Computer Architecture

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 1: Introduction

CS 61C: Great Ideas in Computer Architecture Introduction to Assembly Language and RISC-V Instruction Set Architecture

ECE 154A. Architecture. Dmitri Strukov

מבנה מחשבים Amar Lior Based on lectures notes from Arie Schlesinger

Computer Architecture. Fall Dongkun Shin, SKKU

ECE 15B Computer Organization Spring 2011

Computer Architecture Computer Architecture. Computer Architecture. What is Computer Architecture? Grading

CPE300: Digital System Architecture and Design. Fall 2011 MW 17:30-18:45 CBC C316

Computer Architecture

W1005 Intro to CS and Programming in MATLAB. Brief History of Compu?ng. Fall 2014 Instructor: Ilia Vovsha. hip://

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

CS 3410 Computer System Organization and Programming

CS 3410 Computer System Organization and Programming

levels (layers) of abstraction I stand on the shoulders of giants Lecture #1 Introduction Are Computers Smart? Where does CS61C fit in?

Erik Jonsson School of Engineering and Computer Science THE UNIVERSITY OF TEXAS AT DALLAS HISTORY OF EE 2310

CSE Introduction to Computer Architecture

Computer Architecture. Introduction. Lynn Choi Korea University

CPS104 Computer Organization Lecture 1

CS 61C: Great Ideas in Computer Architecture Introduction to Assembly Language and MIPS Instruction Set Architecture

Computer Systems & Architecture

CS61C : Machine Structures

EEC170 Computer Architecture. Lecture 1: Introduction to Computer Architecture

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

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

Are Computers Smart? To a programmer: Lecture #1 Introduction & Numbers Andy Carle. Are Computers Smart? What are Machine Structures?

CSSE232 Computer Architecture. Introduc5on

IT 252 Computer Organization and Architecture. Introduction. Chia-Chi Teng

CS61C : Machine Structures

Computer Architecture

EC 413 Computer Organization

EE108B Lecture 2 MIPS Assembly Language I. Christos Kozyrakis Stanford University

ECE 250 / CPS 250 Computer Architecture. Introduction

Computer Architecture

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

What is Computer Architecture? CSE Introduction to Computer Architecture. Why do I care? Which is faster? Allan Snavely

CS 352H Computer Systems Architecture Exam #1 - Prof. Keckler October 11, 2007

Lecture 3: Instruction Set Architecture

CS61C C/Assembler Operators and Operands Lecture 2 January 22, 1999 Dave Patterson (http.cs.berkeley.edu/~patterson)

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

CPE300: Digital System Architecture and Design

Chapter 2. OS Overview

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

Reduced Instruction Set Computers

Computer Architecture!

Computer Architecture Dr. Charles Kim Howard University

EE108B: Digital Systems II EE108B. Digital Systems II. Major Topics. What EE108b is About

Please put your cellphone on vibrate

CS 110 Computer Architecture Lecture 5: Intro to Assembly Language, MIPS Intro

EEM 486: Computer Architecture

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

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

Computer Architecture

Modern Instruc?on Sets

Instructions: MIPS arithmetic. MIPS arithmetic. Chapter 3 : MIPS Downloaded from:

CSE Introduction to Computer Architecture. Jeff Brown

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from David Culler, UC Berkeley CS252, Spr 2002

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. MIPS Assembly

CMPSCI 201: Architecture and Assembly Language

Chapter 2 Instruction: Language of the Computer

Review of instruction set architectures

CS Computer Architecture Spring Lecture 01: Introduction

Instructor: Randy H. Katz hap://inst.eecs.berkeley.edu/~cs61c/fa13. Fall Lecture #7. Warehouse Scale Computer

Instruction Set Architectures. CS301 Prof. Szajda

EECE 417 Computer Systems Architecture

Chapter 1. Computer Abstractions and Technology

CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro. Machine Interpreta4on

CS3350B Computer Architecture

Inf2C - Computer Systems Lecture 1 Course overview & the big picture

CS 152 Computer Architecture and Engineering Lecture 1 Single Cycle Design

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Introduc)on to Machine Language

levels (layers) of abstraction

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

Modern Instruc?on Sets

CS61C : Machine Structures

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

MIPS Instruction Set Architecture (1)

9/9/12. New- School Machine Structures (It s a bit more complicated!) CS 61C: Great Ideas in Computer Architecture IntroducMon to Machine Language

CS61C : Machine Structures

CS 61C: Great Ideas in Computer Architecture. Lecture 5: Intro to Assembly Language, MIPS Intro. Instructor: Sagar Karandikar

CS 2630 Computer Organization. What did we accomplish in 15 weeks? Brandon Myers University of Iowa

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

CSEE 3827: Fundamentals of Computer Systems

Transcription:

CS64 Computer Organization Lecture 1 Prof. Heather Zheng (1) Your computer never complains about the # of languages you use.. 1

(2) The same program runs on almost all the computers? 2

How Computer Operates http://www.staff.ncl.ac.uk/roger.broughton/museum/iomedia/pc.htm Levels of Representa5on temp = v[k];! v[k] = v[k+1];! v[k+1] = temp;! High Level Language Program (e.g., C)! Compiler! Assembly Language Program (e.g.,mips)! Assembler! Machine Language Program (MIPS)! lw lw sw sw 0000 1010 1100 0101 1001 1111 0110 1000 1100 0101 1010 0000 $t0, 0($2) $t1, 4($2) $t1, 0($2) $t0, 4($2) 0110 1000 1111 1001 1010 0000 0101 1100 1111 1001 1000 0110 0101 1100 0000 1010 1000 0110 1001 1111! Machine Interpretation! Hardware Architecture Description (Logic, Logisim, etc.)! Architecture Implementation! Logic Circuit Description (Logisim, etc.)! 3

Levels of Representa5on High Level Language Program (e.g., C)! Compiler! Assembly Language Program (e.g.,mips)! Assembler! Machine Language Program (MIPS)! Machine Interpretation! Hardware Architecture Description (Logic, Logisim, etc.)! Architecture Implementation! Logic Circuit Description (Logisim, etc.)! temp = v[k];! v[k] = v[k+1];! v[k+1] = temp;! lw $t0, 0($2) lw $t1, 4($2) sw $t1, 0($2) sw $t0, 4($2) 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! Abstrac5ons Software! Hardware! Application (ex: browser)! Compiler! Assembler! Operating! System! (Mac OSX)! Processor! Memory! I/O system! Datapath & Control! Digital Design! Circuit Design! transistors! Instruction Set! Architecture (ISA)! * Coordina5on across many levels (layers) of abstrac0on * ISA can free hardware/so9ware from each other 4

Levels of Representa5on High Level Language Program (e.g., C)! Compiler! Assembly Language Program (e.g.,mips)! Assembler! Machine Language Program (MIPS)! Machine Interpretation! Hardware Architecture Description (Logic, Logisim, etc.)! temp = v[k];! v[k] = v[k+1];! v[k+1] = temp;! lw $t0, 0($2) lw $t1, 4($2) sw $t1, 0($2) sw $t0, 4($2) 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! Assembly programming Architecture Implementation! Logic Circuit Description (Logisim, etc.)! Digital logic design Linking SoAware & Hardware software Assembly programming Digital logic design hardware 5

WHY DO I CARE? From a Programmer s Perspec5ve Most people learn to program in a high level language (e.g. Java, C++, etc.) Abstracts hardware to reduce programming complexity Difficult or impossible to do some programming tasks efficiently Lower- level languages needed for low- level programming Lower- level means more control and flexibility Improve Your SoIware s Efficiency and Speed 6

From a Hardware Designer s Perspec5ve Understand the interac5on between hardware and soaware Build a proper goal of hardware design Improve Your Hardware s Performance Avoid Unnecessary Complexity à Reduce Cost Lecture Schedule 7

General Class Info When, where and who Lecture: TTh 11-12:15pm, SH 1430 Discussion (required): Friday, 12-12:50 (SH1609), 1-1:50 (LSB 1101) Website: hpp://www.cs.ucsb.edu/~htzheng/teach/cs64s11 Professor: Heather Zheng, htzheng@cs.ucsb.edu TA: Gang Wang (gangw@cs.ucsb.edu), Wendy Chun (wendy_chun@umail.ucsb.edu) Office Hours: Prof. Zheng: TBD (HFH 1121) TA: TBD General Class Info (2) Prerequisites Engineering 3 or CS 5AA- ZZ or 16; and, Mathema5cs 3C Not open if you have received credit for ECE 15B or 15 Textbooks R - - Charles H. Roth, Jr. and Larry Kinney, Fundamentals of Logic Design, 6th Edi5on B - - Robert L. Brijon: MIPS Assembly Language Programming Class handouts 8

Grading Policy Grading Homework : 20% Lab : 25% Quiz: 10% (5-7) Randomly scheduled throughout the quarter Simple ques5ons, no ajendance = 0 Midterm: 20% Final: 25% Academic conduct Verbal discussion of homework assignments is fine No sharing of wrijen assignments or lab assignments Chea5ng will not be tolerated! And will be treated seriously and punished harshly Homework and Lab Homework 3-5 total No late HW submissions accepted Labs 3-4 Use PCSPIM to do assembly programming Mul5- level logic design Sugges5on: start early One- 5me 2- day extension coupon 9

Discussion group Google Group (CS64S11) as the discussion forum / mailing list hjp://groups.google.com/group/cs64s11 I will mass add everyone using your umail account Before April 1, email gangw@cs.ucsb.edu With your name and preferred email account so that we will add you to the group History and Basic Concepts INTRODUCTION TO COMPUTER SYSTEMS 10

History of Computer Abacus C. 3000 B.C. Transistors - 1947 IBM PC - 1981 Apple II -- 1977 11

Moore s Law 2X transistors/chip per 1.5-2 years http://www.guarddawg.net/guarddawg/mooreslaw.jpg The Rate of Technology Advance 2X every 2.0 years in memory size; every 1.5 years in processor speed; every 1.0 year in disk capacity; Moore s Law enables processor 2X transistors/chip per 1.5 years 12

COMPUTER BASICS 5 components of any Computer Computer! Processor!! Control! ( brain )! Datapath! ( brawn )! Memory!!! (where! programs,! data! live when! running)! Devices! Input! Output! Hello World! Keyboard, Mouse! Disk (where! programs,! data! live when! not running)! Display, Printer! 13

Opening up a computer box Can you find the 5 classic components? I/O Mouse, Keyboard, Monitor, Printer.. Memory ROM, RAM, DRAM, Cache Hard disk, FLASH Processor- Motherboard CPU Basic job of a CPU: execute lots of instruc5ons. HOW DO WE COMMAND A CPU? 14

Instruc5ons Language of the Machine Arithme5c such as add and subtract Logic instruc5ons such as and, or, and not Data instruc5ons such as move, load, and store Control flow instruc5ons such as goto, if... goto, More restricted - Different CPUs implement different sets of instruc5ons. The set of instruc5ons a par5cular CPU implements is an Instruc5on Set Architecture (ISA). Examples: Intel 80x86 (Pen5um 4), IBM/Motorola PowerPC (Macintosh), MIPS ( Nintendo, Silicon Graphics, Sony), Intel IA64,... Instruc5on Set Architectures(1/2) Describes the aspects of a computer architecture visible to a programmer The na5ve datatypes, instruc5ons, registers, addressing modes, memory architecture, interrupt and excep5on handling, and external I/O (if any). ISA is dis5nguished from the microarchitecture, which is the set of processor design techniques used to implement the instruc5on set. Computers with different microarchitecture can share a common instruc5on set. For example, the Intel Pen5um and the AMD Athlon implement nearly iden5cal versions of the x86 instruc5on set, but have radically different internal design 15

Instruc5on Set Architectures(2/2) Early trend was to add more instruc5ons to new CPUs to do elaborate opera5ons VAX architecture had an instruc5on to mul5ply polynomials! Complex Instruc5on Set Compu5ng (CISC) RISC philosophy (Cocke IBM, Pajerson, Hennessy, 1980s) Reduced Instruc5on Set Compu5ng (RISC) Keep the instruc5on set small and simple, makes it easier to build fast hardware. Let soaware do complicated opera5ons by composing simpler ones. Simpler is Faster! MIPS Architecture MIPS semiconductor company that built one of the first commercial RISC architectures Nintendo 64, playsta5on, PL2, PSP, HP printers, Cisco routers, use MIPS processors. Why MIPS instead of Intel 80x86? MIPS is simple, elegant. Don t want to get bogged down in grijy details. MIPS widely used in embedded apps, x86 lijle used in embedded, and more embedded computers than PCs By the late 1990s it was es5mated that one in three RISC chips produced were MIPS- based designs. 16

MIPS Programming and Emula5on MIPS assembly language = MIPS instruc5ons A freely available "MIPS R2000/R3000 Simulator" called SPIM UNIX or GNU/Linux; Mac OS X; MS Windows 95, 98, NT, 2000, XP; and DOS) Good for learning MIPS assembly language programming and the general concepts of RISC- assembly language programming Informa5on PLEASE READ! hjp://www.cs.wisc.edu/~larus/spim.html We will be using PCSPIM to do projects 17

TODO: Tutorial on PCSPIM Read hjp://www.cs.wisc.edu/~larus/spim.html Especially hjp://www.cs.wisc.edu/~larus/pcspim.pdf Highly recommended tutorial videos h5p://users.ece.gatech.edu/~sudha/2030/temp/ spim/spim- tutorial.html Install and Get to know PCSPIM PCSPIM 18