Apollo Guidance Computer 2009
Apollo Guidance Computer 2009
Guidance Computer
Architecture and Operation
Frank O’Brien
Infoage Science/History
Learning Center
Lunar Module
AGC Origins
• NASA contracted MIT to develop AGC
– Now Charles Stark Draper Laboratory
• Early work done on Polaris ballistic missile
• Vigorous debate on the interaction of man,
spacecraft and computer
• As Apollo requirements grew, computer
requirement grew even more!
AGC Requirements
• Autonomously navigate from the Earth to the Moon
• Continuously integrate State Vector
• Compute navigation fixes using stars, sun and planets
• Attitude control via digital autopilot
• Lunar landing, ascent, rendezvous
• Manually take over Saturn V booster in emergency
• Remote updates from the ground
• Real-time information display
• Multiprogramming
• Event timing at centisecond resolution
• Multiple user interfaces (“terminals”)
Infoage Science/History Learning Center
The Apollo Guidance Computer: Architecture and Operation
Logic Chips
• Fairchild introduced the “Micrologic” chip
• Two triple-input NOR gates per chip
– Resistor-Transistor Logic
• Virtually all logic implemented using the
Micrologic chips
– Single component greatly simplifies design, testing
– Greater production quantities -> better yields and
higher quality
– Several hundred thousand chips procured (!)
Micrologic chips
installed on
“Logic Stick”
Logic Assemblies
• Subassemblies (sticks) contain 120 chips (240
gates)
• Chips welded to multilayer boards
• Logic boards essentially identical
• Traditional circuit boards could not produce the
necessary logic density
• Interconnections made through wire-wraps in
the underside of the “logic tray”
AGC Hardware
• 36K (16-bit) words ROM (core rope)
• 2k (16-bit) words core RAM
• Instructions average 12-85 microseconds
• 1 cu.ft, 70 pounds, 55 watts
• 37 “Normal” instructions
• 10 “Involuntary” instructions
• 8 I/O instructions
Instruction Set
• The usual suspects – 37 instructions
– 3 bit opcode, plus (sometimes) two bit
“quarter code”, plus “Extend” mode, plus….
• “Interpreted” instructions
– Coded in Polish Notation
– Similar to “p-code”
– Trigonometric, matrix, double/triple precision
– *Huge* coding efficiency
Instruction Set
• 8 I/O – read/write instructions to I/O channels
• 10 Involuntary instructions - counters
– Example: Update from Inertial Measurement Unit
• Counters represent accelerometer and gimbal changes
– No context switch!
• Currently running program *NOT* interrupted
– Counters updated directly by hardware
– Processing resumes after involuntary instruction
(counter update) finishes
– Processing delayed only about 20 microseconds
Memory Architecture
• All memory 16 bit words
– 14 bits data, 1 bit sign, 1 bit parity
– Not byte addressable
• Read/Write memory
– Conventional coincident-current core memory
– 2K words
• Read Only Core “Ropes”
– 36K Read-only storage
– Contained all programming and some data
Memory Architecture
• Core “Ropes”
– Read-only storage
– One “core” reused 24 times for each bit (!)
– High storage density
– Software “manufactured” into the ropes
• Software frozen 10 months before launch!
• Ropes installed in spacecraft 3-4 months prior to launch
– 6 rope modules, each 6K of memory
– Rope modules easily replaced in computer
Addressing memory
• Instruction has 8 to 12 bits for addressing
• Need to address 36K for instructions, 2K for data
• Not enough bits! (need at least 16 bits -> 64k)
• Torturous memory bank addressing
– “Banks” are either 1K or 256 bytes
– Three banking registers required to address a specific
memory location
– Lots of extra code needed to manage memory banks
I/O Channels
• Mapped as memory addresses in low core
• Accessible only by I/O instructions
• All 16 bits wide
• 7 input channels
• 14 output channels
• Most are single bit status flags
Man-Machine Interactions
• Hasn’t changed in 50+ years
• Machine instructions
– Opcode - Operands
• Command line interface
– Command - Options
• Even WIMP’s use similar philosophy!
• All define an object, and the action to be
performed on that object
DSKY Components
• Electroluminescent digits (not LED/LCD)
• 2 digit displays for Program number, Verb, Noun
• 3, 5-digit displays for data, +/- signs
– No decimal points!
• Keyboard
• Warning lights
• DSKY separate from computer
Hours
Minutes
Seconds . hundredths
AGC Executive
• Multiprogramming, priority scheduled,
interrupt driven, real-time operating
system
• Several jobs running at one time
– Up to 7 “long running” jobs
– Up to 7 short, time dependent jobs
• Only one program has control of the DSKY
Error Messages
• Errors need to be communicated to crew
directly
– Software might encounter errors or crash
– Crew may give computer bad data or task
• “Program Alarm” issued, w/error light on
– Verb and Noun code indicate type of error
• Depending on severity of error, may have
to force a computer restart
Infoage Science/History Learning Center
The Apollo Guidance Computer: Architecture and Operation
Error Recovery
• All programs resister a restart address
– Program errors, hung jobs, resource shortages can all
force a computer restart
• A “restart” is the preferred recovery
– NOT the same as rebooting
– All critical data is saved, jobs terminated
– All engines and thrusters are turned off (most cases)
– Hardware is reinitialized
– Programs are reentered at predefined restart point
• Process takes only a few seconds!
Infoage Science/History Learning Center
The Apollo Guidance Computer: Architecture and Operation
Approach Phase:
Program 64
P63 Overview
• Verb 06, Noun 33: time of Ignition
– Hours, minutes, seconds
– 104:30:10.94
• Verb 06, Noun 62: Velocity info
• Flashing Verb 99: Permission to go?
– Key PRO! Ignition!
• P63 displays Verb 06, Noun 63
– Delta altitude, altitude rate, computed altitude
Current Velocity
Delta V accumulated
3 seconds until ignition! Press
PRO[ceed]
Infoage Science/History Learning Center
The Apollo Guidance Computer: Architecture and Operation
Altitude
Altitude
Approach – P64!
• Pitch over the LM to see the landing site
• Program 64 automatically selected by P63
• ~7,000 feet high, 2 miles from landing site
• Key PRO to accept and continue!
• P64 displays V06, Noun 64
– Time to go, Descent angle, rate, altitude
– Another cheat sheet velcro’ed to the panel
Altitude rate
Altitude
Forward Velocity
Altitude rate
Altitude
Epilogue
• AGC was “bleeding edge” technology
– By the end of Apollo, hopelessly outdated!
– Still, it never failed
Shameless Endorsements
• The Apollo Lunar Surface Journal
– www.hq.nasa.gov/alsj
www.infoage.org