Module exchanger

Module exchanger 

Source
Expand description

The Exchange Element governs data exchange between memory (via the M register) and other parts of the central compute unit (including the arithmetic element) via the E register.

The way in which the exchange element behaves is governed by the โ€œSystem Configurationโ€ which is a 9-bit value loaded from the F-memory. Which specific value is loaded from the F-memory is determined by the 5-bit configuration field within the current instruction; the instruction is loaded into the N register).

The standard set-up of the F-memory is described in Table 7-2 of the User Guide.

Structsยง

QuarterActivity ๐Ÿ”’
SystemConfiguration ๐Ÿ”’
The SystemConfiguration value specifies a global state of the computer which determines how the Arithmetic Element (in modern wording, arithmetic unit) communicates with memory. The basic outline is given in Fig. 9 (page 20) of โ€œA Functional Description of the Lincoln TX-2 Computerโ€ by John M. Frankovitch and H. Philip Peterson. A more complete description (including the corresponding F-memory values) is given in tables 7-2 and 7-2A of the TX-2 Userโ€™s Handbook (pp 192-193 in my PDF copy).

Enumsยง

ExchangeDirection ๐Ÿ”’
The Exchange Element behaves differently in the M->E (i.e. load) direction and the E->M (i.e. store) direction. This enumeration specifies the direction of the current transfer.
Permutation ๐Ÿ”’
SubwordForm ๐Ÿ”’

Functionsยง

apply_sign ๐Ÿ”’
exchanged_value_for_load ๐Ÿ”’
Perform an exchange operation suitable for a load operation; that is, emulate the operation of the exchange unit during e.g. LDA.
exchanged_value_for_load_without_sign_extension ๐Ÿ”’
Perform an exchange operation in the M->E direction, but without sign extension of the inactive quarters of the target.
exchanged_value_for_store ๐Ÿ”’
Perform an exchange operation suitable for a store operation; that is, emulate the operation of the exchange unit diring e.g. STE.
fetch_quarter ๐Ÿ”’
Determine which quarter of source gets permuted into target_quarter (numbered from zero), without regard to activity. Return the value of that quarter, shifted down into the lowest quarter (Q1, aka. quarter 0 when using u8 to indicate quarters).
permutation_source ๐Ÿ”’
Compute the quarter number (starting at 0) of the source word from which the values for target_quarter (also starting at 0) would be taken if it were active.
permute ๐Ÿ”’
Copy bits from source to dest, permuting them according to permutation. Only active quarters are modified.
quarter_mask ๐Ÿ”’
sign_extend ๐Ÿ”’
Perform sign extension. From User Handbook, figure 13-14, โ€œThe sign bit of an active quarter of a partially-active subword is extended to the left until an active quarter is again met, this must be interpreted in terms of the possible partially active subwordsโ€. I donโ€™t know what the second part of this sentence means. The accompanying diagram shows the sign bit being extended into quarters that are to the right of an active quarter (in order words the leftward extension wraps after it hits q4).
sign_extend_quarters ๐Ÿ”’
standard_plugboard_f_memory_settings ๐Ÿ”’