pub trait SimulationExecutor {
type Backend: SimBackend;
// Required methods
fn backend(&self) -> &Self::Backend;
fn backend_mut(&mut self) -> &mut Self::Backend;
fn eval_comb(&mut self) -> Result<(), SimulatorErrorCode>;
fn eval_apply_ff_at(
&mut self,
event: <Self::Backend as SimBackend>::Event,
) -> Result<(), SimulatorErrorCode>;
fn eval_only_ff_at(
&mut self,
event: <Self::Backend as SimBackend>::Event,
) -> Result<(), SimulatorErrorCode>;
fn apply_ff_at(
&mut self,
event: <Self::Backend as SimBackend>::Event,
) -> Result<(), SimulatorErrorCode>;
// Provided methods
fn stage_external_event(
&mut self,
_event: <Self::Backend as SimBackend>::Event,
_timestamp: u64,
) -> Result<(), SimulatorErrorCode> { ... }
fn fire_external_event(
&mut self,
_event: <Self::Backend as SimBackend>::Event,
_timestamp: u64,
) -> Result<(), SimulatorErrorCode> { ... }
fn finish_timed_step(&mut self, _timestamp: u64) { ... }
}Expand description
Backend execution hooks needed by the timed simulation engine.
The facade implements this contract to retain policy such as runtime-event decoration and waveform capture outside the backend-independent scheduler.
Required Associated Types§
type Backend: SimBackend
Required Methods§
fn backend(&self) -> &Self::Backend
fn backend_mut(&mut self) -> &mut Self::Backend
fn eval_comb(&mut self) -> Result<(), SimulatorErrorCode>
fn eval_apply_ff_at( &mut self, event: <Self::Backend as SimBackend>::Event, ) -> Result<(), SimulatorErrorCode>
fn eval_only_ff_at( &mut self, event: <Self::Backend as SimBackend>::Event, ) -> Result<(), SimulatorErrorCode>
fn apply_ff_at( &mut self, event: <Self::Backend as SimBackend>::Event, ) -> Result<(), SimulatorErrorCode>
Provided Methods§
Sourcefn stage_external_event(
&mut self,
_event: <Self::Backend as SimBackend>::Event,
_timestamp: u64,
) -> Result<(), SimulatorErrorCode>
fn stage_external_event( &mut self, _event: <Self::Backend as SimBackend>::Event, _timestamp: u64, ) -> Result<(), SimulatorErrorCode>
Snapshot external-component inputs immediately before an event domain evaluates its sequential logic.
Sourcefn fire_external_event(
&mut self,
_event: <Self::Backend as SimBackend>::Event,
_timestamp: u64,
) -> Result<(), SimulatorErrorCode>
fn fire_external_event( &mut self, _event: <Self::Backend as SimBackend>::Event, _timestamp: u64, ) -> Result<(), SimulatorErrorCode>
Fire external-component hooks after the event domain commits and before the following combinational settle.
Sourcefn finish_timed_step(&mut self, _timestamp: u64)
fn finish_timed_step(&mut self, _timestamp: u64)
Called after the state for a simulation timestamp has stabilized.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".