Expand description
This crate decodes instructions and emulates the arithmetic unit, the exchange unit, memory and the CPU side of the I/O system.
All the work is done in non-blocking function calls into this library.
The modules within this crate do not directly map to the elements of the TX-2 machine.
TX-2 Element | Feature | Implementation |
---|---|---|
Control Element | Start/Stop control, CODABO, STARTOVER, Sequencing the stages of instructions | control |
Control Element | Alarms | alarmunit |
In/Out Element | All | io |
Program Element | Sequence flags, Index register storage, Instruction decoding, Instruction, executrion, Deferred addressing | control |
Program Element | Sequence selection and switching | control |
Program Element | Registers N, P, Q, K | control |
Program Element | Configuration memory | control |
Program Element | Jumps | control |
Arithmetic Element | Register A, B, C, D, Arithmetic operations, | control |
Arithmetic Element | Registers Y and Z | Not yet implemented |
Exchange Element | Load/store process | exchanger |
Exchange Element | Register E | exchanger |
Exchange Element | Register M | memory |
Exchange Element | Quarter activity, subword form, sign extension | exchanger |
In/Out Element | Connecting/disconnecting peripherals, raising the flag of sequences for which I/O is ready | io |
Memory Element | Memory storage | exchanger |
Console | Toggle Start Point Register | control::ControlUnit |
ModulesΒ§
- alarm π
- TX-2 alarms.
- alarmunit π
- The TX-2 can βmaskβ some alarms, and whether or not this is
happening is controlled by the
AlarmUnit
. - bugreport π
- Generate bug-report URLs.
- changelog π
- A collection of orderable values which the caller can efficiently drain in one go.
- context π
- This module manages the context in which the emulator is performing a single operation.
- control π
- Emulates the principal central components of the TX-2.
- diagnostics π
- Diagnostic information for log messages and alarms.
- event π
- Input and output events.
- exchanger π
- 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.
- io π
- This module simulates the CPU behaviours which relate to I/O devices (connect/disconnect, the ways the IOS and TSD instructions with devices).
- memory π
- This module emulates the TX-2βs STUV memory.
- tx2 π
- Emulation of the TX-2 computer.
- types π
- Simple types used in several places in the crate.
StructsΒ§
- Alarm
- Describes an alarm which is active.
- Alarm
Status - The status of an alarm.
- Context
- State shared between the emulator and the UI.
- Control
Registers - Registers from various elements of the TX-2.
- Control
Unit ControlUnit
simulates the operation of the Control Element of the TX-2 computer.- Device
Manager - Manages a collection of devices. Does not actually correspond to a tangible physical component of the TX-2 system.
- Extended
Connected Unit Status - Status information for a unit which is actually connected.
- Extended
Unit State - The state of a unit (hardware belonging to a sequence).
- Masked
Word - A value of which bits 0..width are significant (0 being the least
significant bit). Hence a six-bit value would be
MaskedWord { width: 6, value: u13!(0o77) }
- Memory
Configuration MemoryConfiguration
indicates how the emulated TX-2βs memory is configured.- Memory
Unit - Tx2
Tx2
emulates the TX-2 computer, with peripherals.- Unmasked
Alarm - Describes an alarm which is active and is not masked (meaning that it is actually firing).
EnumsΒ§
- Alarm
Details AlarmsDetails
variant names are from Userβs Handbook section 5-2.2; full names are taken from section 10-2.5.1 (vol 2) of the Technical Manual.- Alarm
Kind - Describes the kinds of alarm that exist in the TX-2.
- Flag
Change - Signals that a flag has changed (and why).
- Input
Event - An input event.
- Input
Event Error - A failed input event.
- Input
Flag Raised - Indicates whether or not a unitβs input flag is raised.
- Output
Event - An output event.
- Panic
OnUnmasked Alarm - Reset
Mode - RunMode
- Transfer
Mode - Determines how TSD instructions for Lincoln Writer seuenced behave.
- UpdateE
- Determines whether a memory operation updates the E register.
ConstantsΒ§
FunctionsΒ§
- bug_
report_ url - Provide a URL at which a human can report a bug.
- set_
up_ peripherals