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ยง
- Quarter
Activity ๐ - System
Configuration ๐ - 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ยง
- Exchange
Direction ๐ - 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 ๐
- Subword
Form ๐
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 intotarget_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
todest
, permuting them according topermutation
. 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