SILICON
Loading...
Searching...
No Matches
Context Struct Reference

Context describing why a component is being evaluated. More...

#include <component.hpp>

Public Member Functions

bool changed (const core::Wire_ptr &wire) const
 Returns true when a wire has a captured previous state different from now.
std::optional< core::State > previousState (const core::Wire_ptr &wire) const
 Returns the state a wire had before this reactive evaluation, if captured.

Public Attributes

bool initialEvaluation = false
 True for initial or otherwise full-plan evaluation.
std::span< const core::Bus > changedBuses {}
 Buses that caused a reactive forward-cone evaluation.
std::unordered_map< uint64_t, core::State > previousWireStates {}
 Wire states captured before the reactive mutation that caused this pass.

Detailed Description

Context describing why a component is being evaluated.

Components that do not need scheduling context can keep implementing the legacy simulate(Simulator&) overload. Timing-aware components can override the overload that receives this structure.

Definition at line 90 of file component.hpp.

Member Function Documentation

◆ changed()

bool changed ( const core::Wire_ptr & wire) const
inlinenodiscard

Returns true when a wire has a captured previous state different from now.

Definition at line 101 of file component.hpp.

◆ previousState()

std::optional< core::State > previousState ( const core::Wire_ptr & wire) const
inlinenodiscard

Returns the state a wire had before this reactive evaluation, if captured.

Definition at line 108 of file component.hpp.

Member Data Documentation

◆ changedBuses

std::span<const core::Bus> changedBuses {}

Buses that caused a reactive forward-cone evaluation.

Definition at line 95 of file component.hpp.

◆ initialEvaluation

bool initialEvaluation = false

True for initial or otherwise full-plan evaluation.

Definition at line 92 of file component.hpp.

◆ previousWireStates

std::unordered_map<uint64_t, core::State> previousWireStates {}

Wire states captured before the reactive mutation that caused this pass.

Definition at line 98 of file component.hpp.


The documentation for this struct was generated from the following file: