Upload
aldous-melton
View
214
Download
1
Embed Size (px)
Citation preview
LC-3, x86, or ???:The FIRST ISA for Students
Yale Patt
The University of Texas at Austin
WCAE Workshop, ISCA
June 9,2007
What are the choices:
• Mickey-mouse – the Art History model (Names withheld to protect the guilty)
• A rich but small ISA that students can really grok and use (LC-3)
• A subset of an existing ISA (Tiny MC 68000)
• A serious ISA (x86)
Not unlike: Which Programming Language FIRST?
• A template language (not unlike C++, JAVA)
• Good pedagogy (Pascal)
• A subset of PL-1
• C
Objectives:
• Valvano: Students are “wowed” by seeing things work.
• Valvano: Students can build on their first ISA in later courses.
• Bryant, O’Halloran: Students learn best by developing and evaluating real programs that run on real machines.
• Me: Students can easily understand it.• Me: Students can sink their teeth into it.
Why we chose the LC-3 (and before that, the LC-2)
• A subset of a real ISA is not without glitches• A clean sheet of paper lets us make
every decision pedagogically• We can still get the “wow” effect
(on a Simulator) [e.g.,NIM]• Students can debug their own programs• We can still build on this in later courses
LC-3: How it has evolved
• LC-1: Single accumulator, one cc (N), 8 opcodes• LC-2 ( Initially): 4 registers, N,Z cc, 16 opcodes• LC-2 (Revised): 8 registers, N,Z,P cc, 16 opcodes• LC-3 (Initially):
– Stack grows to zero– PC+offset, rather than PC’offset– Reg+sext offset, rather than Reg+zext offset
• LC-3 (Revised): Privileged memory (two models – fixed, selectable)
The ISA
The Data Path
The State Machine
LC-3: What we left out:
• endian-ness
• lots of data types
(just one: 16 bit 2’s comp. integer)– No floating point– No bytes (ergo, no byte loads/stores)
• lots of addressing modes
Continuing pressure to add:
• a multiply instruction
• shift instructions
• carry bit, and ADDC instruction
What we have learned
• Don’t succumb (Keep it lean)• One page ISA means Students learn• It can be rich without being complex• Simulation can create “Wow”
(You don’t need a *real* machine)• Follow-on activity
(already: LC-3b, VLSI, Compilers)• With “privilege”: O/S ??
The LC-3b
• Senior/1st Yr Grad Architecture Course• Students add VM Support• Students add I/E handling Support• ISA
– NOT XOR– Word addressing Byte addressing (ergo, endian-ness)– LDI, STI are scrapped– Comprehensive SHF instruction added
About students
• Computer Architecture can beginwith freshmen
• Freshmen can handle serious stuff• Students don’t need glitz• Students will debug their own programs• Students are used to memorizing
– BUT you can take them out of that comfort zoneEngineering Education: No substitute for
Design it wrong, Debug it yourself,Fix it, See the working result