210 likes | 441 Views
Building a Computer from Scratch: A Hardware Lab Sequence for Computer Science Students. Michael Black American University mblack@american.edu CCSC East ~ October 10, 2008. Presentation Overview. The Problem with Computer Organization Objectives Challenges Lab Sequence Student Response
E N D
Building a Computer from Scratch: A Hardware Lab Sequence for Computer Science Students • Michael Black • American University • mblack@american.edu • CCSC East ~ October 10, 2008
Presentation Overview • The Problem with Computer Organization • Objectives • Challenges • Lab Sequence • Student Response • Future Work
Computer Organization • A dense course: • microprocessor, cache, assembly language, instruction set design, datapath/control, some digital design • 4-credit course • 50-minute laboratory period / week
Student Profile • No prior electronic experience • Sophomore and junior students • Have had one introductory programming course • 8 to 16 students • CS Majors, CS Minors, and non-majors
The Problem • Computer Science students view computer architecture as abstract • Just lines on a chalkboard • Difficulty visualizing information as electrical signals • Computer Organization ought to be tangible!
Typical Approaches • FPGAs • Microcontrollers • Single board experimental computers Same problem: • Students isolated from hardware details
Goals • Computer organization digital lab experience • Similar to engineering students • Breadboards, chips, wiring... • Focus on computer design, not just digital • They should build a computer • Complement classroom material
Approach • Build a computer from discrete components • Students connect: • CPU • ROM and RAM • external interface
Why "Retro"? • More exposure to hardware • Well documented, inexpensive components • 8085 CPU, 2716 EPROM • Build a "real" computer • labs replicate commercial computers from late 70s
Challenges • Lack of any electrical experience • Need introductory skill-building labs • Limited Time • Can't spend time teaching test equipment • Limited Equipment • Breadboard/power supply unit, chips, wires
Lab Sequence • 3 Skill-Building Labs • Wiring chips on a breadboard • Logic Gates • Memory - Traffic Light Controller • 2 labs building the computer • CPU & Memory • Interface and Software
Lab 1: Wiring Chips • One-week module • Give students chips, they determine function • Teaches: • Connecting wires • Powering a chip
Lab 2: Make a 2-Bit Counter • Longest lab - about 3 weeks • Components: • build 2-bit adder • build D flip flop • combine to form 2-bit counter • Students learn: • to think "electrically" • to wire meticulously
Lab 3: Traffic Light • Components: • Construct a state machine modeling T-intersection • Burn transition table to ROM • Connect ROM to LEDs • Teaches: • Memory • State machines • Reinforces good wiring practices
Lab 4: Simple Computer • Components: • 8085 + ROM • Program to count down from 15 • Minimum needed to see it work
Lab 5: I/O • Components: • add RAM • add RS-232 port • write program to read numbers and subtract them • write Tic-Tac-Toe game
Materials • Breadboards and Power Supply units • Heathikit ET-3200: available on surplus market • EPROMs & EPROM programmer • Available on eBay • Logic gates, 8085 chip, wire, LEDs • Order from electronics catalogs • Tools • nothing beyond a wire cutter & screwdriver
Expected vs. Actual Response • Expected: • Resistance to hands-on experience • No test equipment = circuit failure and frustrations • Actual: • Very enthusiastic, uniformly positive response on evaluations • Lack of test equipment taught students to reason when their circuits failed
Future Work • Reduce time spent on the second lab • Add an extra lab module to the course • Input/output: PS/2 keyboard, LCD or VGA display • Write a monitor program to control computer from the terminal • USB interface for drive or peripherals