TA: Michael Henson
What is a Computer?
Big box with lots of lights?
Display with large letters?
Little box with no lights?
Lump in the cable?
5 Classic Computer Components
Inside the Case
RAM -> Random Access Memory
DRAM -> Dynamic Random Access Memory
SRAM -> Static Random Access Memory
ROM -> Read-only Memory
Volatile / Non-Volatile -> needs power or not
Magnetic -> stores bits as magnetized regions
Pentium III Xeon
You only need switches and wires!
What the user wanted.
What the programmer designed.
What the programmer thought about.
What the language allowed.
Abstraction: C to ASM
Abstraction: ASM to Binary
Instruction Set Archtecture
... 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 controls, the logic design, and the physical implementation.[BR] – Amdahl, Blaaw, and Brooks, 1964
interface between hardware and low-level software
standardizes instructions, machine language bit patterns, etc.
advantage: different implementations of the same architecture
disadvantage: sometimes prevents using new innovations
Modern instruction set architectures: 80x86/Pentium/K6, PowerPC, DEC Alpha, MIPS, SPARC, HP
CISC versus RISC
ISA’s originally for humans to use
Small memory size was critical thus complex instructions
High-level-language architectures (B5000)
RISC says do a few things well; only supply what the compiler will use; rely on compiler to get it right.
Why look at MIPS?
Why not one that matters like Intel?
The Really Big Ideas
Just bits for data and program
Program is a sequence of instruction words
Data-type determined by instruction
Large linear "array" of memory
Small number of "variables" (registers)
Program and data have the same representation
Programs can manipulate programs
Programs can manipulate themselves!
Bits not the only way (Lisp)
char byte short int pointer quad float double
Instruction determines type of operands
Add (int), Add.s (float), Add.d (double)
Free to reinterpret at will
How big is a char?
What's a pointer?
Large (usually) linear array
Only read with load instructions
lw $t5, 100($a3) -> t5 = mem[100 + a3]
Only modified with store instructions
sw $s0, 24($t3) -> mem[24 + t3] = s0
CISC machines have lots of ways to read and write memory
Address is always in bytes
Words on 4 byte boundary (how man 0's?)
Short only on 2 byte boundary
Doubles only on 8 byte boundary
CISC allowed them anywhere (Why?)
It's an ABSTRACTION!
Variables for our programs
The ONLY operands for most instructions
A very small number (32 in MIPS) (Why?)
All 32 bits
What about new 64 bit ISA's?
Where we are headed
Programming the MIPS ISA (Chapter 2)
Arithmetic and how to build an ALU (Chapter 3)
Performance issues (Chapter 4)
Just a bit on processor implementation (Chapter 5)
Pipelining to improve performance (Chapter 6)
Memory Hierarchy: caches and virtual memory (Chapter 7)
Old Fashioned Farmer's Days at [" http://maps.google.com/maps?spn=0.407765,0.634701&saddr=chapel+hill,+nc&daddr=Snow+Camp+Rd+%26+Silk+Hope+Liberty+Rd,+Siler+City,+NC+27344&hl=en" Silk Hope]
United We Funk: Cancelled!