|
| | Gate (const std::vector< Wire_ptr > &inputs, Wire_ptr output) |
| | Constructs a gate with scalar I/O and bitwise properties enabled.
|
| | Gate () |
| | Constructs an empty gate instance for factory/serialization usage.
|
| | Component ()=default |
| | Component (std::vector< Bus > inputs, std::vector< Bus > outputs) |
| | Constructs a component with input and output buses.
|
| virtual | ~Component ()=default |
| virtual void | simulate (SILICON::simulation::Simulator &sim) |
| | Executes the component's logic.
|
| virtual void | simulate (SILICON::simulation::Simulator &sim, const SILICON::simulation::Context &context) |
| | Executes the component's logic with simulator scheduling context.
|
| virtual bool | usesStagedSequentialOutputs () const |
| | Whether zero-delay output writes should be staged during reactive passes.
|
| void | replaceBus (std::vector< Bus > &busCollection, unsigned int index, Bus newBus) |
| | Replaces a bus in the input or output collection.
|
| void | setProperty (std::string_view key, const PropertyValue &value) |
| | Sets a property value.
|
| std::optional< PropertyValue > | getProperty (std::string_view key) const |
| | Gets a property value.
|
| const PropertyMap & | getProperties () const |
| | Gets all properties.
|
| std::optional< std::reference_wrapper< const StringPropertyOptions > > | getStringPropertyOptions (std::string_view key) const |
| | Gets allowed values for a constrained string property.
|
| template<typename T> |
| void | setPropertyValue (std::string_view key, T &&value) |
| | Sets a property value with type deduction.
|
| template<typename T> |
| std::optional< T > | getPropertyValue (std::string_view key) const |
| | Gets a property value with type deduction.
|
| void | setPropertyCallback (std::string_view key, PropertyCallback callback) |
| | Sets a callback for property validation/transformation.
|
| void | setInput (unsigned int index, const Bus &bus, bool checkSize=false) |
| | Sets an input bus at a specific index.
|
| void | setInputs (const std::vector< Bus > &newInputs) |
| | Replaces all input buses.
|
| void | setOutput (unsigned int index, const Bus &bus) |
| | Sets an output bus at a specific index.
|
| void | setOutputs (const std::vector< Bus > &newOutputs) |
| | Replaces all output buses.
|
| bool | isConnectedTo (const Bus &b) const |
| | Checks if this component is connected to a bus.
|
| virtual void | clearWires () |
| | Clears all wire connections.
|
| std::vector< Bus > | getInputs () const |
| | Gets all input buses.
|
| const std::vector< Bus > & | inputBuses () const |
| | Gets all input buses without copying.
|
| std::optional< State > | unconnectedInputDefault (unsigned int input) const |
| | Gets the state used when an input has no connected wire.
|
| std::vector< Bus > | getOutputs () const |
| | Gets all output buses.
|
| const std::vector< Bus > & | outputBuses () const |
| | Gets all output buses without copying.
|
| auto | allBuses () const |
| | Borrows all buses, inputs first, without copying or deduplicating.
|
| virtual std::string_view | typeName () const =0 |
| | Gets the component type name.
|
| virtual ComponentMetadata | metadata () const |
| | Gets catalog metadata for this component type.
|
| virtual void | serializeYosys (SILICON::yosys::SerializationContext &context) const |
| | Lower this component into native Yosys netlist cells.
|
| uint64_t | addIOListener (IOObserver cb) |
| | Adds a listener for I/O changes.
|
| void | removeIOListener (uint64_t id) |
| | Removes a previously added I/O listener.
|
|
| | Gate (bool enableBitwiseProperties) |
| | Constructs an empty gate and optionally enables bitwise properties.
|
| | Gate (const std::vector< Wire_ptr > &inputs, Wire_ptr output, bool enableBitwiseProperties) |
| | Constructs a gate with I/O and optional bitwise property support.
|
| int | setSize (int width) |
| | Resizes every input bus and the output bus to the same width.
|
| template<typename T> |
| void | defineProperty (std::string key, T &&defaultValue, PropertyCallback callback=nullptr) |
| | Defines a property with a default value and optional callback.
|
| void | defineStringListProperty (std::string key, std::string defaultValue, StringPropertyOptions allowedValues, PropertyCallback callback=nullptr) |
| | Defines a string property constrained to a fixed set of values.
|
| void | notifyIOListeners () |
| | Notifies all registered I/O listeners of a change.
|
| void | validatePropertyValue (std::string_view key, const PropertyValue ¤tValue, const PropertyValue &newValue) const |
| | Validates a property value against the declared type and metadata.
|
| void | handleInputSizeChange (const unsigned int index, const unsigned int newSize) |
| | Handles input size changes. By default input size shouldn't change automatically.
|
| void | defineUnconnectedInputDefault (unsigned int input, State value) |
| | Defines the state read from an input when its wire is unconnected.
|
| State | inputState (unsigned int input, unsigned short bit=0) const |
| Wire_ptr | inputWire (unsigned int input, unsigned short bit=0) const |
template<typename Enum>
requires std::is_enum_v<Enum> |
| Wire_ptr | inputWire (Enum input, unsigned short bit=0) const |
template<typename Enum>
requires std::is_enum_v<Enum> |
| State | inputState (Enum input, unsigned short bit=0) const |
| | Reads an input bit, returning ERROR when the bus or bit is missing.
|
| Wire_ptr | outputWire (unsigned int output, unsigned short bit=0) const |
template<typename Enum>
requires std::is_enum_v<Enum> |
| Wire_ptr | outputWire (Enum output, unsigned short bit=0) const |
| | Returns an output wire, or null when the bus or bit is missing.
|
| std::size_t | outputBusSize (unsigned int output) const |
template<typename Enum>
requires std::is_enum_v<Enum> |
| std::size_t | outputBusSize (Enum output) const |
| | Returns the size of an output bus, or zero when it is missing.
|
Base class for combinational logic gates.
All gates expose delay and size properties. Multi-input gates additionally expose bitwise: when enabled, every input and the single output are resized to size bits and the gate logic is applied independently on each bit. NotGate is inherently bitwise whenever its size is greater than one. In non-bitwise mode with size greater than one, a single input bus is reduced to a scalar output, as if each bit were a separate one-bit input.
Definition at line 38 of file gates.hpp.