Struct lc3_ensemble::sim::SimFlags
source · pub struct SimFlags {
pub strict: bool,
pub use_real_halt: bool,
pub machine_init: MachineInitStrategy,
pub debug_frames: bool,
}Expand description
Configuration flags for Simulator.
These can be modified after the Simulator is created with Simulator::new
and their effects should still apply.
Read the field descriptions for more details.
Fields§
§strict: boolWhether strict mode is enabled.
Strict mode adds additional integrity checks to the simulator, such as verifying initialization state is normal for provided data.
use_real_halt: boolWhether to use the real HALT trap.
There are two implementations of HALT within Simulator:
- virtual HALT: On execution of
HALTorTRAP x25, the simulator is automatically halted before executing any true TRAP routine. - real HALT: On execution of
HALTorTRAP x25, the TRAP routine for HALT implemented in the OS is run and executed as usual.
Real HALT is useful for maintaining integrity to the LC-3 ISA, whereas virtual HALT preserves the state of the machine prior to calling the OS’s HALT routine.
machine_init: MachineInitStrategyThe creation strategy for uninitialized Words.
This is used to initialize the mem and reg_file fields.
debug_frames: boolWhether to store debugging information about call frames.
This flag only goes into effect after a Simulator::new or Simulator::reset call.
Trait Implementations§
source§impl Default for SimFlags
impl Default for SimFlags
source§fn default() -> Self
fn default() -> Self
The default flags.
They are defined as follows:
strict: falseuse_real_halt: falsemachine_init: defaultMachineInitStrategydebug_frames: false
source§impl PartialEq for SimFlags
impl PartialEq for SimFlags
impl Copy for SimFlags
impl Eq for SimFlags
impl StructuralPartialEq for SimFlags
Auto Trait Implementations§
impl Freeze for SimFlags
impl RefUnwindSafe for SimFlags
impl Send for SimFlags
impl Sync for SimFlags
impl Unpin for SimFlags
impl UnwindSafe for SimFlags
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)