pub struct Sim { /* private fields */ }Expand description
Simulator state for one FrozenHir circuit.
Implementations§
Source§impl Sim
impl Sim
pub fn new(hir: FrozenHir) -> Self
pub fn with_engine(hir: FrozenHir, engine: TickEngine) -> Self
pub fn engine(&self) -> TickEngine
pub fn enable_vcd(&mut self, path: impl AsRef<Path>) -> Result<()>
Sourcepub fn enable_fst(&mut self, path: impl AsRef<Path>) -> Result<(), FstError>
pub fn enable_fst(&mut self, path: impl AsRef<Path>) -> Result<(), FstError>
Optional FST: still dumps VCD, then converts with vcd2fst (AD-24).
Sourcepub fn enable_fst_with(
&mut self,
path: impl AsRef<Path>,
converter: impl AsRef<Path>,
) -> Result<(), FstError>
pub fn enable_fst_with( &mut self, path: impl AsRef<Path>, converter: impl AsRef<Path>, ) -> Result<(), FstError>
Same as enable_fst with an explicit converter (tests / RHDL_VCD2FST).
Sourcepub fn finish_waves(&mut self) -> Result<(), FstError>
pub fn finish_waves(&mut self) -> Result<(), FstError>
Flush VCD and, if FST was requested, run the documented converter.
pub fn set_inputs(&mut self, inputs: PortValues)
pub fn ports(&self) -> &PortValues
Sourcepub fn tick(&mut self)
pub fn tick(&mut self)
One rising edge of the module Clock (AD-15). Driven by FrozenHir assigns.
pub fn coverage_report(&self) -> String
Auto Trait Implementations§
impl Freeze for Sim
impl RefUnwindSafe for Sim
impl Send for Sim
impl Sync for Sim
impl Unpin for Sim
impl UnsafeUnpin for Sim
impl UnwindSafe for Sim
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