Skip to main content

AsDynamicVerilatedModel

Trait AsDynamicVerilatedModel 

Source
pub trait AsDynamicVerilatedModel<'ctx>: 'ctx {
    // Required methods
    fn eval(&mut self);
    fn read(
        &self,
        port: impl Into<String>,
    ) -> Result<VerilatorValue<'_>, DynamicVerilatedModelError>;
    fn pin(
        &mut self,
        port: impl Into<String>,
        value: impl Into<VerilatorValue<'ctx>>,
    ) -> Result<(), DynamicVerilatedModelError>;
}
Expand description

Access model ports at runtime.

Required Methods§

Source

fn eval(&mut self)

Equivalent to the Verilator eval method.

Source

fn read( &self, port: impl Into<String>, ) -> Result<VerilatorValue<'_>, DynamicVerilatedModelError>

If port is a valid port name for this model, returns the current value of the port.

Source

fn pin( &mut self, port: impl Into<String>, value: impl Into<VerilatorValue<'ctx>>, ) -> Result<(), DynamicVerilatedModelError>

If port is a valid port name for this model, and the port’s width is <= value.into().width(), sets the port to value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§