• Keine Ergebnisse gefunden

SIMULATION OF ENABLE,PSLE (ACTIVATE DCC SUBCHANNELS) AND RCT (RESTORE CHANNELS FOR TRAPS)

CT I I. DISABLE ALL TRAPS 2. SAVE SUBROUTINE 3. LOCATION OF XEC. THE

1---....

XEC, AND THE STR TO STORAGE ENTRY IS VIA AN XEC

fP,T WHERE fP,T CONTAINS

A STR A, B. C 4. "c· = TYPE CODE TO AC YES WHERE A.B = MASK

B = INDEX

C = CODE =

I-RCT 2_ENB 3 -PSLF

CT 5

RCT TEST: IS DCC

INHIBITED?

NO

C = 1,2,3 CT 6

RELEASE DCC

INHIBITION I---~

THIS PATH IS ESSENTIAL A NO-OPe THE RCT WAS GIVEN WHEN NO PCL TRAP CONDITION EXISTED

Figure 2

Simulated Input/Output Control Program (SIC) This section 'of the paper describes the simulation techniques used to debug and to analyze the real-time Pro j e c t Mercury Goddard IBM 7090 computer and the Bermuda IBM 709 computer programs. This simula-tion package is used only with local computing equipment and is not used to test the commu-nication lines or the training of flight control personnel. It has the obvious advantage of being self -contained thus requiring no time consuming coordination with other sites. In addition, it has the features of being able to maintain proper timing constraints while also permitting the suspension of time to allow debug macros such as "core" to be performed.

SIC shares the computer with the opera-tional programs. (Figure 3) Its function is

to feed inputs at the proper times to the op-erational program and to simulate all of the controls associated with real-time inputs and outputs. To do this SIC must have a means of keeping time-at present a one millisec-0nd pulse is produced by the Data Com-munications Channel (DCC) causing a trap to SIC. Each time SIC gets control via its clock it adds afinite increment to its present estimate of time. Then based upon the new time SIC does the following: searches its input for messages that should now go to the operational program input region, tests for traps that require Simulation, logs output or actually sends out output if desired, and adjusts itself to allow the operational pro-gram another cycle. These SIC functions plus the following are described in detail below:

ENB

PSLF

NEW ENABLING MASK TO STORAGE

AND TO AC

NEW PSLF MASK TO STORAGE SET -N" TO I

RESTORE

SYNCHRONIZE TO PERMIT RANDOM RETURN TO OPERATIONAL PROGRAM (ON THE AVERAGE THIS DOES NOT COST ANY I'TIME")

I. RESTORE

2. SUBTRACT ~ At FROM PRESENT

~ \----11... TIME

3. SET FOR NEAR IMMEDIATE TRAP TO SIC

(WANT TO TRAP TO SIC AS SOON AS THE RETURN BUT DON'T WANT TO STEAL TIME THUS THE - Y2 At THE TRAP TO SIC IS REQUIRED AS ANOTHER INPUT OUTPUT COULD BE WAITING

Real-Time Simulation in Project Mercury / 59

I. SET ENABLE SWITCH TO DISABLE

~---.t 2. INSURE SIC'S CLOCK WILL

IS N AN OUTPUT SUBCHANNEL

YES

NOT BE DISABLED

NOTE: IF TRAP SHOULD HAVE OCCURRED CAN'T BE FORGOTTEN

NO

SET TIME FOR OUTPUT TRAP TO

T + AT TRAP FOR SUBCHANNEL N

Figure 2a

a) SIC Input b) SIC's Clock c) Trap Simulation

d) DCC Control Simulation e) Debug Macros

The input to SIC is on a magnetic tape and is sequenced by time of arrival. Each logical record of input represents information that would be found in an input region after an input trap. Two times are associated with each input; first is the time the record should start to enter the input area (called T A, for

"Time of Arrival"), and the second is the time the interrupt should be given (TT for

"Time of Trap"). In addition, each record also has a control word which gives the num-ber of words and the DCC sub channel of the ostensible transmission. All times are ref-erenced to launch, thus a zero T A is for the launch vehicle still on the pad.

SIC's clock maintains a descrete estimate of continuous real-:time by updating itself by a constant t after each trap.

To initiate the traps the DCC's we use have a simulation switch which when "on" transmits a pulse every millisecond which under pro-gram control can be used to cause a trap.

Prior to getting a DCC a special device was attached to aDSU of the 709 which could cause traps at variable intervals the smallest being 5 milliseconds.

In using the clock there are two variables;

the actual number of machine cycles between traps and the value of t assigned to represent the interval. ASSigning t a value greater than the actual time between pulses in effect simu-lates a computer that has less computing speed than the one being used as the total number of machine cycles in a simulated time period would be less than the number in a real period and visa versa. This is a very useful feature. It permits simulation of Ber-muda's 709 and Goddard's 7090 andGoddard's 7090 on the Space Center's 709. It also has been used to test the capacity of the system by increasing t until failures occurred.

60 / Computers - Key to Total Systems Control

SIC FLOW CHART

TIME ESTIMATE-INPUT-

I/O

TRAPS

ENTRY CONDITIONS: interval between traps the more accurate the simulation of real-time, howe v e r, since smaller increments require more passes through SIC the longer the simulation run will take.

In our version of SIC it was desirable to start runs not necessarily at the beginning of the input tape and also to vary the value as-signed to t. To do this, the time to start the run and the value assigned to t are put in the storage entry keys at the start of a run. The option to change the t during a run has been added to some versions of SIC.

There are two returns from SIC when it is entered by a clock trap. If no input/output traps require Simulation, the return is to the point in the operational program from whence the clock;trap occurred, however, if a trap is required,' it is simulated as having occurred

at the same point in the operational program as the clock trap to SIC.

SIC has an interrupt table which deter-mines whether a trap is required. This table has an entry for each subchannel of DCC (only DCC traps are simulated in this version of SIC) and the value of the entry is the time for the next trap. If no traps are set up the value is set to the maximum. Input traps are set up in the table from the time of trap asso-ciated with each input record. Output traps are set up when the instruction to produce output is simulated (this is discussed later).

The interrupt table is interrogated with every trap to SIC and if a time is found that is less than or equal to the present estimate of time (and the DCC is enabled and not inhibited and the subchannel activated) a trap is simulated and the time to trap for that subchannel set to the maximum. Only one trap can be simu-lated at a time (same as in the real case) thus

Real-Time Simulation in Project Mercury / 61

SC 13 SC 14

TEST: HAS SEQUENCER

1 - - - -. . STOPPED? (THIS VARIES NO

SET FOR NO TRAP RETURN

I. RESTORE

2. SYNCHRONIZE~-'---ITRAP""'RETURN SIC'S CLOCK

FROM DCC TO DCC)

YES

SC 19

NO L...---i

STOP SEQ'N AT YES SUBCHANNEL N

SC 23 J. SET FOR TRAP

SIMULATION 2. RESET TTN TO

MAXIMUM

NO

Figure 2c if one trap is found, the rest of the table is not

interrogated. If more traps are waiting they will occur only after the operational program has processed the first one and enabled the computer. If SIC does not do this in time, the next message will be in the input region. With present versions of SIC this fact is not noted (as indeed, it would not be noted in the real-time case), however, in the generalized ver-sion shown in the flow diagrams a path is pro-vided for special operations if this happens.

There are three instructions that control the trap features of the DeC device. The in-structions and their functions are:

1. ENB A, T = Enable per contents of A, T.

This allows traps to occur over the I/O channels of the 709(0) specified by the mask in A, T. The DeC is considered one of the I/O channels of the 709(0) computer.

2. PSLF B, T = Allows inputs or outputs (depending upon the DeC sub channel) to occur and permits the DeC to trap if it is enabled. The mask in B, T contains a bit for each of the 32 subchan-nels. If the bit in position i is 1, subchannel i is ac-tivated, if zero, deacti-vated. No traps can occur unless the DeC itself is enabled and the subchan-nel activated.

3. ReT

=

Restore c h ann e 1 trap-this res tor e s the trap conditions to what they were prior to the last trap.

The instruction, by itself, does not refer to a new enabling mask.

62 / Computers - Key to Total Systems Control

DATA DATA

SIC

BUFFER BUFFER

INTERNAL CLOCK

REAL TIME INTERRUPT

MONITOR OUTPUT