pub struct RunConfig {
pub instct: i64,
pub time_divisor: u32,
pub fixed_update: bool,
pub do_sleep: bool,
pub single_step: bool,
pub trace: Option<Box<dyn Write>>,
}Expand description
Parameters that control the Emulator::run loop.
Fields§
§instct: i64Maximum number of instructions to execute. -1 means unlimited.
time_divisor: u32Time divisor applied to wall-clock time before feeding the CLINT timer.
1 = real time. Values > 1 make the CPU appear slower, which is useful
for deterministic testing (-l locks it to the instruction counter).
fixed_update: boolWhen true, the cycle counter is used as the time base instead of
wall-clock time. Produces fully deterministic execution.
do_sleep: boolWhen true, the run loop calls Platform::mini_sleep during WFI
to avoid burning host CPU. Disable with -p for maximum throughput.
single_step: boolWhen true, execute one instruction per loop iteration and call
Emulator::dump_state after each one. Enabled by -s.
trace: Option<Box<dyn Write>>Optional writer for the compact execution trace (--trace <FILE>).
When Some, every instruction is logged with the registers it modified.