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 |
Re-exportsยง
pub use alarm::Alarm;pub use alarm::AlarmDetails;pub use alarm::AlarmKind;pub use alarm::UnmaskedAlarm;pub use alarmunit::AlarmStatus;pub use bugreport::bug_report_url;pub use context::Context;pub use control::ControlRegisters;pub use control::ControlUnit;pub use control::PanicOnUnmaskedAlarm;pub use control::ResetMode;pub use control::RunMode;pub use io::DeviceManager;pub use io::ExtendedConnectedUnitStatus;pub use io::ExtendedUnitState;pub use io::InputFlagRaised;pub use io::set_up_peripherals;pub use memory::MemoryConfiguration;pub use memory::MemoryUnit;pub use tx2::Tx2;
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ยง
- 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) }
Enumsยง
- Flag
Change - Signals that a flag has changed (and why).
- Input
Event - An input event.
- Input
Event Error - A failed input event.
- Output
Event - An output event.
- Transfer
Mode - Determines how TSD instructions for Lincoln Writer seuenced behave.
- UpdateE
- Determines whether a memory operation updates the E register.