|
SILICON
|
#include <wire.hpp>
Public Member Functions | |
| Wire () | |
| Wire (State s) | |
| Wire (uint64_t id, State s) | |
| Wire (const Wire &other) | |
| Copies a wire while preserving its existing identifier and authorization. | |
| Wire & | operator= (const Wire &other) |
| Assigns state, authorization, and identifier from another wire. | |
| State | getCurrentState () const |
| Reads the current state safely while simulation may update it. | |
| uint64_t | getId () const |
| void | forceSetCurrentState (State newState) |
| void | clearAuthorizedComponent () |
| Clears the component currently authorized to drive this wire. | |
| void | forceSetCurrentState (State newState, const Component_weakPtr &authorizedBy) |
| Forces the wire state without authorization check. | |
| void | setCurrentState (State newState, const Component_weakPtr &requestedBy) |
Static Public Member Functions | |
| static void | safeSetCurrentState (const std::weak_ptr< Wire > &w, State newState, const Component_weakPtr &requestedBy) |
| static State | safeGetCurrentState (const std::weak_ptr< Wire > &w) |
Private Attributes | |
| std::atomic< State > | currentState |
| State shared between the simulation worker and UI readers. | |
| Component_weakPtr | authorizedComponent |
| uint64_t | id |
Static Private Attributes | |
| static std::atomic< uint64_t > | nextId {0} |
| Wire | ( | const Wire & | other | ) |
| void clearAuthorizedComponent | ( | ) |
Clears the component currently authorized to drive this wire.
Runtime elaboration uses this when a source-level root wire is intentionally shared with newly cloned runtime components. The next runtime driver then claims authorization through the normal state-update path.
| void forceSetCurrentState | ( | State | newState, |
| const Component_weakPtr & | authorizedBy ) |
|
nodiscard |
|
static |
| void setCurrentState | ( | State | newState, |
| const Component_weakPtr & | requestedBy ) |
|
private |
|
private |