14
LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

Embed Size (px)

Citation preview

Page 1: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

LC-3, x86, or ???:The FIRST ISA for Students

Yale Patt

The University of Texas at Austin

WCAE Workshop, ISCA

June 9,2007

Page 2: 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)

Page 3: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

Not unlike: Which Programming Language FIRST?

• A template language (not unlike C++, JAVA)

• Good pedagogy (Pascal)

• A subset of PL-1

• C

Page 4: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

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.

Page 5: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

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

Page 6: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

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)

Page 7: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

The ISA

Page 8: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

The Data Path

Page 9: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

The State Machine

Page 10: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

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

Page 11: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

Continuing pressure to add:

• a multiply instruction

• shift instructions

• carry bit, and ADDC instruction

Page 12: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

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 ??

Page 13: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

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

Page 14: LC-3, x86, or ???: The FIRST ISA for Students Yale Patt The University of Texas at Austin WCAE Workshop, ISCA June 9,2007

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