pub struct MachineAssign<DL>{
pub id: u64,
pub scheduler: Scheduler<DL>,
pub expand_cycles: u64,
pub expand_syscalls: Vec<Box<dyn Syscalls<CoreMachine>>>,
}
Fields§
§id: u64
§scheduler: Scheduler<DL>
§expand_cycles: u64
§expand_syscalls: Vec<Box<dyn Syscalls<CoreMachine>>>
Implementations§
Source§impl<DL> MachineAssign<DL>
impl<DL> MachineAssign<DL>
pub fn new( id: u64, args: &[Bytes], scheduler: Scheduler<DL>, ) -> Result<Self, Error>
pub fn consume_cycles(&mut self, cycles: u64) -> Result<(), Error>
pub fn exit_code(&self) -> i8
pub fn step(&mut self, decoder: &mut Decoder) -> Result<(), Error>
pub fn wait(&mut self) -> Result<(), Error>
pub fn done(&mut self) -> Result<(), Error>
Trait Implementations§
Source§impl<DL> CoreMachine for MachineAssign<DL>
impl<DL> CoreMachine for MachineAssign<DL>
type REG = u64
type MEM = <DefaultCoreMachine<u64, WXorXMemory<FlatMemory<u64>>> as CoreMachine>::MEM
fn pc(&self) -> &Self::REG
fn update_pc(&mut self, pc: Self::REG)
fn commit_pc(&mut self)
fn memory(&self) -> &Self::MEM
fn memory_mut(&mut self) -> &mut Self::MEM
fn registers(&self) -> &[Self::REG]
fn set_register(&mut self, idx: usize, value: Self::REG)
fn version(&self) -> u32
fn isa(&self) -> u8
Source§impl<DL> Display for MachineAssign<DL>
impl<DL> Display for MachineAssign<DL>
Source§impl<DL> Machine for MachineAssign<DL>
impl<DL> Machine for MachineAssign<DL>
Source§impl<DL> SupportMachine for MachineAssign<DL>
impl<DL> SupportMachine for MachineAssign<DL>
fn cycles(&self) -> u64
fn set_cycles(&mut self, cycles: u64)
fn max_cycles(&self) -> u64
fn set_max_cycles(&mut self, cycles: u64)
fn running(&self) -> bool
fn set_running(&mut self, running: bool)
fn reset(&mut self, max_cycles: u64)
fn reset_signal(&mut self) -> bool
fn code(&self) -> &Bytes
fn add_cycles(&mut self, cycles: u64) -> Result<(), Error>
fn add_cycles_no_checking(&mut self, cycles: u64) -> Result<(), Error>
fn load_elf_inner( &mut self, program: &Bytes, update_pc: bool, ) -> Result<u64, Error>
fn load_elf(&mut self, program: &Bytes, update_pc: bool) -> Result<u64, Error>
fn load_binary_inner( &mut self, program: &Bytes, metadata: &ProgramMetadata, update_pc: bool, ) -> Result<u64, Error>
fn load_binary( &mut self, program: &Bytes, metadata: &ProgramMetadata, update_pc: bool, ) -> Result<u64, Error>
fn initialize_stack( &mut self, args: impl ExactSizeIterator<Item = Result<Bytes, Error>>, stack_start: u64, stack_size: u64, ) -> Result<u64, Error>
Auto Trait Implementations§
impl<DL> Freeze for MachineAssign<DL>
impl<DL> !RefUnwindSafe for MachineAssign<DL>
impl<DL> Send for MachineAssign<DL>
impl<DL> Sync for MachineAssign<DL>
impl<DL> Unpin for MachineAssign<DL>
impl<DL> !UnwindSafe for MachineAssign<DL>
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
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more