Skip to content

Commit

Permalink
Add set_max_cycles for TraceMachine
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Apr 26, 2024
1 parent 37b33a3 commit a83ab4c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/machine/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ impl<Inner: SupportMachine> TraceMachine<Inner> {
.load_program_with_metadata(program, metadata, args)
}

pub fn set_max_cycles(&mut self, cycles: u64) {
self.machine.inner_mut().set_max_cycles(cycles)
}

pub fn run(&mut self) -> Result<i8, Error> {
let mut decoder = build_decoder::<Inner::REG>(self.isa(), self.version());
self.machine.set_running(true);
Expand Down

0 comments on commit a83ab4c

Please sign in to comment.