9/9/14
CS 240, Fall 2014! WELLESLEY CS! CS 240, Fall 2014! WELLESLEY CS! Childhood dream? Pilot. First me on a plane? This past summer. High school gradua ng class: 11 students. CS 240 Administrivia, Sept. 9 Drums + bass + guitar Swimming 3d prin ng Shakespeare Society Water polo ¢ Everything is on the website: h p://cs.wellesley.edu/~cs240/ Performed in bungra group in UK for an audience of 3500. § PS1 due Friday – how’s it going? a cappella USGS stream gauge expert § Readings – ge ng more relevant Figure skater Social network research § Google Group: ask ques ons, link for anonymous feedback Volunteer coordinator Interviewing this fall Financial regulator ¢ Double-check your textbook: President of Hawai’i Club Computer Organiza on and Design: The Hardware/So ware Interface Study abroad in Paris Study abroad in Budapest § NOT: Computer Architecture: A Quan ta ve Approach, same authors. Cogni ve science research If all else fails I’ll start a restaurant. § Abacus, not columns. Animal rescue Alterna ve break program ¢ MIPS card in front cover El Table Trekked Inca Trail
¢ Office Hours: Food poisoning on small island in the middle of nowhere in Indonesia. § Monday 4-6, Tuesday 9-10, 3-4, Thursday 4-5:30, Friday 11:30-12:30 Has a twin here ¢ Names Rowing Tennis Literature Society ¢ What you do Researching stereotype threat. Built a 40-foot boat and paddled it out on the Charles to watch fireworks.
CS 240, Fall 2014! WELLESLEY CS! CS 240, Fall 2014! Program, Applica on WELLESLEY CS!
Today Programming Language
¢ MIPS instruc on set (part 1) § Design principles § Arithme c
§ Data transfer (memory access) So ware § Transla on from Java/C § Immediate operands You are here. Instruc on Set Architecture ¢ Bitwise boolean algebra and logical operators § Java § MIPS § Bit vector manipula ons
Devices (transistors, etc.) Hardware Solid-State Physics
1 9/9/14
CS 240, Fall 2014! WELLESLEY CS! CS 240, Fall 2014! WELLESLEY CS!
Instruc on Set Architecture General ISA Design Decisions
¢ The ISA defines: ¢ Registers § The system state (registers, memory, program counter, etc.) § How many registers are there? § The instruc ons the CPU can execute § How wide are they? § The effect that each instruc on has on the system state
MIPS Memory! ¢ Memory MIPS private regs! (232-1)! . . . § How do you specify a memory loca on? PC! (A+24)! IR! (A+20)! MIPS user regs! (A+16)! ¢ $zero! 0 0 0 0 Instruc ons (A+12)! $v0! § What instruc ons are available? What do they do? . . . (A+8)! $a0! (A+4)! § . . . How are they encoded? $t0! (A)! . . . $t1! (12)! $t2! . . . (8)! $s0! (4)! $s1! . . . (0)! 5 6
CS 240, Fall 2014! WELLESLEY CS! CS 240, Fall 2014! WELLESLEY CS!
MIPS Three Basic Kinds of Instruc ons
¢ Early 1980s: MIPS designed by John Hennessy et al. at Stanford. ¢ Perform arithme c or logic on register data. (Today, Friday) § a = b + c; x = y << z; i = j & k; ¢ 1984: MIPS Computer Systems. (Later MIPS Technologies) ¢ 1996: Nintendo 64 – most famous MIPS processor? ¢ ¢ 2013: Sold to Imagina on Technologies. Transfer data between memory and register. (Today) § Load data from memory into register § $register = Memory[address] § Store data from register into memory ¢ Reduced Instruc on Set Computer (RISC) § Memory[address] = $register § vs. Complex Instruc on Set Computer (CISC)
¢ Control what instruc on is executed next. (Next week) § Uncondi onal jumps § Condi onal branches
7 8
2 9/9/14
CS 240, Fall 2014! WELLESLEY CS! CS 240, Fall 2014! WELLESLEY CS!
One general instruc on format: Design principle: Smaller is faster.
¢