![]() |
![]() |
|
![]() |
![]() |
Encyclopedia :
A :
AP :
APO :
Apollo Guidance Computer |
|
|
Apollo Guidance ComputerThe Apollo Guidance Computer (AGC) was the first recognizably modern embedded system. It was developed for the Apollo program by the MIT Instrumentation Laboratory under Charles Stark Draper, with hardware design led by Eldon C. Hall (see References). Based upon MIT documents, early architectural work seems to come from J.H. Laning Jr., Albert Hopkins, Ramon Alonso [1], and Hugh Blair-Smith [1]. The actual flight hardware was fabricated by Raytheon, whose Herb Thaler [1] was also on the architectural team.
AGC in ApolloEach flight to the moon had two AGCs, one each in the command module and the lunar module. The AGC ran each spacecraft's Primary Guidance, Navigation and Control System, called by the acronym PGNCS (pronounced "pings"). Each moon mission also had two additional computers: DescriptionThe Apollo flight computer was the first to use integrated circuits (ICs). The Block I version used 4,100 ICs, each containing a single 3-input NOR logic gate. The later Block II version used dual 3-input NOR gates in a flat-pack; approximately 5,600 gates in all. The gates were made using resistor-transistor logic (RTL). They were interconnected by a technique called wire wrap, in which the circuits are pushed into sockets, the sockets have square posts, and wire is wrapped around the posts. The edges of the posts bite the wire with tons of pressure per square inch, causing gas-tight connections that are more reliable than soldered PC boards. The wiring was then embedded in cast epoxy plastic. The decision to use a single IC design throughout the AGC avoided problems that plagued another early IC computer design, the Minuteman II guidance computer. The computer's RAM was magnetic core memory (4K words) and ROM was implemented as core rope memory (32K words). Both had cycle times of 12 microseconds. The memory word length was 16 bits; 15 bits of data and 1 odd-parity bit. The CPU-internal 16-bit word format was 14 bits of data, 1 overflow bit, and 1 sign bit (one's complement representation). TimingThe AGC was controlled by a 2.048 MHz crystal clock. The clock was divided by two to produce a four-phase 1.024 MHz clock which the AGC used to perform internal operations. The 1.024 MHz clock was also divided by two to produce a 512 kHz signal called the MASTER FREQUENCY; this signal was used to synchronize external Apollo spacecraft systems. The MASTER FREQUENCY was further divided through a SCALER, first by five using a ring counter to produce a 102.4 kHz signal. This was then divided by two through 17 successive stages called F1 (51.2 kHz) through F17 (0.78125 Hz). The F10 stage (100 Hz) was fed back into the AGC to increment the real-time clock and other involuntary counters using PINC (discussed below). The F17 stage was used to intermittently run the AGC when it was operating in the STANDBY mode. Central registersThe AGC had four 16-bit registerss for general computational use. These were called the "central registers": DV instruction, and to hold the return address after TC instructionsMP instructions There were also four locations in core memory, at addresses 20-23, dubbed "editing locations" because whatever was stored there would emerge shifted or rotated by one bit position. This was common to Block I and Block II AGCs. Other registersThe AGC had additional registers that were used internally in the course of operation. These were: Instruction set The instruction format was 3 bits for opcode, 12 bits for address. Block I had 11 instructions: The Block I AGC instructions consisted of the following: Instructions were implemented in groups of 12 steps, called timing pulses. The timing pulses were named TP1 through TP12. Each set of 12 timing pulses was called an instruction subsequence. Simple instructions, such as TC, executed in a single subsequence of 12 pulses. More complex instructions required several subsequences. The multiply instruction ( Each timing pulse in a subsequence could trigger up to 5 control pulses. The control pulses were the signals which did the actual work of the instruction, such as reading the contents of a register onto the bus, or writing data from the bus into a register. MemoryBlock I AGC memory was organized into 1024 word banks. The lowest bank (bank 0) was erasable memory (RAM). All banks above bank 0 were fixed memory (ROM). Each AGC instruction had a 12-bit address field. The lower bits (1-10) addressed the memory inside each bank. Bits 11 and 12 selected the bank: 00 selected the erasable memory bank; 01 selected the lowest bank (bank 1) of fixed memory; 10 selected the next one (bank 2); and 11 selected a BANK register that could be used to select any bank above 2. Banks 1 and 2 were called "fixed-fixed" memory, because they were always available, regardless of the contents of the BANK register. Banks 3 and above were called "fixed-switchable" because the selected bank was determined by the BANK register. The Block I AGC initially had 12K words of fixed memory, but this was later increased to 24K. Block II had 32K of fixed memory and 4K of erasable memory. The AGC transferred data to and from memory through the G register in a process called the "memory cycle." The memory cycle took 12 timing pulses (11.72 microseconds). The cycle began at timing pulse 1 (TP1) when the AGC loaded the memory address to be fetched into the S register. The memory hardware retrieved the data word from memory at the address specified by the S register. Words from erasable memory were deposited into the G register by timing pulse 6 (TP6); words from fixed memory were available by timing pulse 7. The retrieved memory word was then available in the G register for AGC access during timing pulses 7 through 10. After timing pulse 10, the data in the G register was written back to memory. The AGC memory cycle occurred continuously during AGC operation. Instructions needing memory data had to access it during timing pulses 7-10. If the AGC changed the memory word in the G register, the changed word was written back to memory after timing pulse 10. In this way, data words cycled continuously from memory to the G register and then back again to memory. The lower 15 bits of each memory word held AGC instructions or data. Each word protected by a 16th "odd parity" bit. This bit was set to 1 or 0 by a parity generator circuit so a count of the 1's in each memory word would always produce an odd number. A parity checking circuit tested the parity bit during each memory cycle; if the bit didn't match the expected value, the memory word was assumed to be corrupted and a PARITY ALARM panel light was illuminated. Interrupts and involuntary countersThe AGC had five vectored interrupts. DSRUPT was triggered at regular intervals to update the user display (DSKY). ERRUPT was generated by various hardware failures or alarms. KEYRUPT signaled a key press from the user's keyboard. T3RUPT was generated at regular intervals from a hardware timer to update the AGC's real-time clock. UPRUPT was generated each time a 16-bit word of uplink data was loaded into the AGC. The AGC responded to each interrupt by temporarily suspending the current program, executing a short interrupt service routine, and then resuming the interrupted program. The AGC also had 20 involuntary counters. These were memory locations which functioned as up/down counters, or shift registers. The counters would increment, decrement, or shift in response to internal inputs. The increment (PINC), decrement (MINC), or shift (SHINC) was handled by one subsequence of microinstructions inserted between any two regular instructions. Interrupts could be triggered when the counters overflowed. The T3RUPT and DSRUPT interrupts were produced when their counters, driven by a 100 Hz hardware clock, overflowed after executing many PINC subsequences. The UPRUPT interrupt was triggered after its counter, executing the SHINC subsequence, had shifted 16 bits of uplink data into the AGC. Standby modeThe AGC had a power-saving mode controlled by a STANDBY ALLOWED switch. This mode turned off the AGC power, except for the 2.048 MHz clock and SCALER. The F17 signal from the SCALER turned the AGC power and the AGC back on at 1.28 second intervals. In this mode, the AGC performed essential functions, checked the STANDBY ALLOWED switch, and--if still enabled--turned off the power and went back to sleep until the next F17 signal. In the standby mode, the AGC slept most of the time; therefore it was not awake to perform the PINC instruction needed to update the AGC's real time clock at 10 ms intervals. To compensate, one of the functions performed by the AGC each time it awoke in the standby mode was to update the real time clock by 1.28 seconds. The standby mode was designed to reduce power by 5 to 10 kW during midcourse flight when the AGC was not needed. However, in practice, the AGC was left on during all phases of the mission and this feature was never used. Data BusesThe AGC had a 16-bit read bus and a 16-bit write bus. Data from central registers (A, Q, Z, or LP), or other internal registers could be gated onto the read bus with a control signal. The read bus connected to the write bus through a non-inverting buffer, so any data appearing on the read bus also appeared on the write bus. Other control signals could copy write bus data back into the registers. Data transfers worked like this: To move the address of the next instruction from the B register to the S register, an RB (read B) control signal was issued; this caused the address to move from register B to the read bus, and then to the write bus. A WS (write S) control signal moved the address from the write bus into the S register. Several registers could be read onto the read bus simultaneously. When this occurred, data from each register was inclusive-ORed onto the bus. This inclusive-OR feature was used to implement the MASK instruction, which was a logical AND operation. Because the AGC had no native ability to do a logical AND, but could do a logical OR through the bus and could compliment (invert) data through the C register, DeMorgan's theorem was used to implement the equivalent of a logical AND. This was accomplished by inverting both operands, performing a logical OR through the bus, and then inverting the result. SoftwareAGC software was written in AGC assembly language. There was a simple real-time operating system consisting of the EXEC, a batch job-scheduling system that could run up to 8 'jobs' at a time using non-preemptive multi-tasking (each job had to periodically surrender control back to the EXEC). There was also an interrupt-driven component called the WAITLIST which could schedule multiple timer-driven 'tasks'. The tasks were short threads of execution which could reschedule themselves for reexecution on the WAITLIST, or could kick off a longer operation by starting a 'job' with the EXEC. The EXEC jobs were priority-based. The lowest priority job, called the dummy job, was always present. It did diagnostic checks and ran a green "COMPUTER ACTIVITY" light on the DSKY display. When the dummy job was running, the computer had nothing better to do, so the light was turned off. The dummy job exited if there was some higher priority job to be done, and this was indicated by the COMPUTER ACTIVITY light being illuminated. The AGC also had a sophisticated software interpreter that implemented a virtual machine with more complex and capable instructions than the native AGC. Interpreted code, which featured double precision scalar and vector arithmetic — even an A set of interrupt-driven user interface routines called PINBALL provided keyboard and display services for the jobs and tasks running on the AGC. User interface
The command module (CM) had two DSKYs; one located on the main instrument panel and another located in the lower equipment bay near a sextant used for aligning the inertial guidance platform. Both DSKYs were driven by the same AGC. The lunar module (LM) had a single DSKY for its AGC. The Block IIA Block II version of the AGC was designed in 1966. It retained the basic Block I architecture, but increased erasable memory from 1K to 2K words. Fixed memory was expanded from 24K to 36K. Instructions were expanded from 11 to 34 and I/O channels were implemented to replace the I/O registers on Block I. The Block II version is the one that actually flew to the moon. Block I was used during the unmanned Apollo 4 and 6 flights, and was slated for the ill-fated Apollo I. The decision to expand the memory and instruction set for Block II, but to retain the Block I's restrictive 3-bit op code and 12-bit address had interesting design consequences. Various tricks were employed to squeeze in additional instructions, such as having special memory addresses which, when referenced, would implement a certain function. For instance, an PGNCS troubleThe PGNC System malfunctioned during the first live lunar descent, with the AGC showing a 1201 alarm ("Executive overflow - no vacant areas") and a 1202 alarm ("Executive overflow - no core sets") [1]. In both cases these errors were caused by spurious data from the rendezvous radar, which had been left on during the descent. These errors automatically aborted the computer's current task, but the frequency of radar data ensured that the abort signals were being sent at too great a rate for the CPU to cope [1]. Fortunately for Apollo 11, the AGC software failed safe, shedding low-priority tasks and prompting Neil Armstrong to shift to a more manually controlled mode. The inertial guidance tasks continued to operate reliably. The degree of overload was minimal, because the software had been "scrubbed" down to leave very nearly 15% spare time, and the 6400 bit/s pulse trains from the radar induced PINCss that wasted exactly 15% of the AGC's time. On the instructions of Steve Bales and Jack Garman, the errors were over-ruled, and the mission was a success. Amongst the computer's other error codes was the very first '404_error', albeit that error 00404 was shorthand for "IMU orientation unknown". Notes
|
|
|
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License. |
|
| © 2008 Chamas Enterprises Inc. |