pub struct Sim<T> { /* private fields */ }
Expand description
The Sim
struct is used to communicate with a simulation. Every testbench
will be provided with a copy of this struct, and will use it to communicate
with the core simulation.
Implementations§
Source§impl<T> Sim<T>
impl<T> Sim<T>
pub fn init(&self) -> Result<Box<T>>
pub fn watch<S>(&mut self, check: S, x: Box<T>) -> Result<Box<T>>
pub fn clock(&mut self, delta: u64, x: Box<T>) -> Result<Box<T>>
pub fn wait(&mut self, delta: u64, x: Box<T>) -> Result<Box<T>>
pub fn done(&self, x: Box<T>) -> Result<()>
pub fn halt(&self, x: Box<T>) -> Result<()>
pub fn time(&self) -> u64
Auto Trait Implementations§
impl<T> Freeze for Sim<T>
impl<T> RefUnwindSafe for Sim<T>
impl<T> Send for Sim<T>where
T: Send,
impl<T> Sync for Sim<T>where
T: Send,
impl<T> Unpin for Sim<T>
impl<T> UnwindSafe for Sim<T>
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