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,
pub ignore_privilege: 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.
By default, this flag is false.
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.
By default, this flag is false.
machine_init: MachineInitStrategyThe creation strategy for uninitialized Words.
This is used to initialize the mem and reg_file fields.
By default, this flag is MachineInitStrategy::default.
debug_frames: boolWhether to store debugging information about call frames.
This flag only goes into effect after a Simulator::new or Simulator::reset call.
By default, this flag is false.
ignore_privilege: boolIf true, privilege checks are ignored and the simulator runs as though the executor has supervisor level privilege.
By default, this flag is false.
Trait Implementations§
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)