Skip to main content

Sim

Struct Sim 

Source
pub struct Sim { /* private fields */ }
Expand description

Simulator state for one FrozenHir circuit.

Implementations§

Source§

impl Sim

Source

pub fn new(hir: FrozenHir) -> Self

Source

pub fn with_engine(hir: FrozenHir, engine: TickEngine) -> Self

Source

pub fn engine(&self) -> TickEngine

Source

pub fn enable_vcd(&mut self, path: impl AsRef<Path>) -> Result<()>

Source

pub fn enable_fst(&mut self, path: impl AsRef<Path>) -> Result<(), FstError>

Optional FST: still dumps VCD, then converts with vcd2fst (AD-24).

Source

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).

Source

pub fn finish_waves(&mut self) -> Result<(), FstError>

Flush VCD and, if FST was requested, run the documented converter.

Source

pub fn set_inputs(&mut self, inputs: PortValues)

Source

pub fn ports(&self) -> &PortValues

Source

pub fn tick(&mut self)

One rising edge of the module Clock (AD-15). Driven by FrozenHir assigns.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.