|
SILICON
|
Namespaces | |
| namespace | yosys_component_detail |
Classes | |
| class | ActiveKeyGuard |
| class | AndGate |
| class | BoundaryIoComponent |
| class | Bus |
| class | CallbackRegistry |
| class | Circuit |
| Represents a digital circuit as a directed graph of components. More... | |
| struct | CircuitConnection |
| Directed logical connection between one component output bus and one input bus. More... | |
| struct | CircuitPort |
| Named bus exposed by a circuit boundary component or topology fallback. More... | |
| class | CircuitResolver |
| class | Component |
| Base class for all digital circuit components. More... | |
| struct | ComponentMetadata |
| class | ComponentRegistry |
| class | ConstantComponent |
| Drives a one-bit constant used by imported hardware netlists. More... | |
| class | DFlipFlop |
| D-type flip-flop. More... | |
| class | DLatch |
| Active-high, level-sensitive D latch. More... | |
| class | DummyBusInputComponent |
| Logical model behind the graphical bus input. More... | |
| class | DummyBusOutputComponent |
| Logical model behind the graphical bus output. More... | |
| class | DummyInputComponent |
| Logical model behind the graphical single-bit input. More... | |
| class | DummyOutputComponent |
| Logical model behind the graphical single-bit output. More... | |
| struct | EdgeProperty |
| Property stored in each edge of the circuit graph. More... | |
| class | EFlipFlop |
| Enabled D-type flip-flop. More... | |
| class | FlipFlop |
| Base class for edge-triggered storage elements with async clear/preset. More... | |
| class | Gate |
| Base class for combinational logic gates. More... | |
| class | JKFlipFlop |
| JK flip-flop. More... | |
| class | NandGate |
| class | NorGate |
| class | NotGate |
| class | OrGate |
| struct | ParsedBusValue |
| A bit-vector together with the textual interpretation that produced it. More... | |
| class | Register |
| class | ROM |
| class | SerializationContext |
| Mutable module-building interface passed to component serializers. More... | |
| struct | SourceFile |
| class | SubcircuitComponent |
| struct | SubcircuitDefinition |
| struct | TransparentStringEqual |
| Transparent equality functor for string-like keys. More... | |
| struct | TransparentStringHash |
| Transparent hash functor for string-like keys. More... | |
| struct | VertexProperty |
| Property stored in each vertex of the circuit graph. More... | |
| class | Wire |
| class | XorGate |
Concepts | |
| concept | HasType |
| Concept to check if a type has a Type static member. | |
Typedefs | |
| using | CircuitGraph |
| Boost graph type representing the circuit topology. | |
| using | VertexDescriptor = boost::graph_traits<CircuitGraph>::vertex_descriptor |
| Descriptor type for vertices in the circuit graph. | |
| using | EdgeDescriptor = boost::graph_traits<CircuitGraph>::edge_descriptor |
| Descriptor type for edges in the circuit graph. | |
| using | PropertyValue = std::variant<int, bool, std::string, BusValue> |
| Variant type for component properties. | |
| using | PropertyMap |
| Map from property names to their values. | |
| using | PropertyCallback = std::function<PropertyValue(const PropertyValue&)> |
| Callback function for property validation/transformation. | |
| using | PropertyCallbackMap |
| Map from property names to their callback functions. | |
| using | StringPropertyOptions = std::vector<std::string> |
| Allowed values for a constrained string property. | |
| using | StringPropertyOptionsMap |
| Map from property names to constrained string values. | |
| using | Component_ptr = std::shared_ptr<Component> |
| using | Component_weakPtr = std::weak_ptr<Component> |
| using | Component_set = std::set<Component_ptr, std::owner_less<Component_ptr>> |
| using | Wire_ptr = std::shared_ptr<Wire> |
| using | BusValue = std::vector<State> |
| using | BigInt = boost::multiprecision::cpp_int |
| using | Json |
Enumerations | |
| enum class | ComponentCategory { Gates , Multiplexers , Arithmetic , FlipFlops , Register , Memory , Subcircuits , Inputs , Outputs , Utils } |
| enum class | PortRole { None , Input , Output } |
| Declares whether a component represents a public circuit boundary port. More... | |
| enum class | State : unsigned char { LOW = '0' , HIGH = '1' , UNKNOWN = 'X' , ERROR = 'E' } |
| enum class | Signedness : bool { UNSIGNED = false , SIGNED = true } |
| enum class | BusValueFormat { Raw , Signed , Unsigned , Hex , Oct , Bin , Unknown } |
Functions | |
| uint64_t | deserializePortId (const nlohmann::json &value) |
| uint64_t | deserializeBoundaryPortId (const nlohmann::json &component) |
| Circuit | deserializeCircuitDocument (const std::string_view contents, const ComponentRegistry ®istry, const CircuitResolver *resolver) |
| SubcircuitDefinition | parseCircuitDocument (const std::string_view contents, const ComponentRegistry ®istry, const CircuitResolver *resolver) |
| PropertyValue | requireNonNegative (std::string_view name, const PropertyValue &value) |
| Validates that an integer property value is non-negative. | |
| PropertyValue | requireValidSize (std::string_view name, const PropertyValue &value) |
| Validates that an integer property value is a valid bus size. | |
| template<typename T> | |
| void | registerComponent (ComponentRegistry ®istry) |
| void | registerAllComponents (ComponentRegistry ®istry) |
| std::string_view | componentCategoryName (const ComponentCategory category) |
| State | operator&& (const State &a, const State &b) |
| State | operator|| (const State &a, const State &b) |
| State | operator! (const State &a) |
| State | operator^ (const State &a, const State &b) |
| std::string | to_str (State s) |
| BusValue | operator+ (const BusValue &a, const BusValue &b) |
| BusValue | twosComplement (const BusValue &n) |
| std::partial_ordering | compare (const BusValue &lhs, const BusValue &rhs, const Signedness signedness) |
| BusValue | shift (const BusValue &v, const ptrdiff_t amount, const Signedness signedness) |
| BusValue | multiply (const BusValue &a, const BusValue &b, const Signedness signedness) |
| std::pair< BusValue, BusValue > | divide (const BusValue &a, const BusValue &b, Signedness signedness) |
| void | configureOrthogonalRouter (Avoid::Router &router, qreal gridSize) |
| Applies SILICON's shared orthogonal-routing policy to a libavoid router. | |
| std::vector< QPointF > | extractOrthogonalRoute (Avoid::ConnRef &connector, qreal gridSize) |
| Extracts, grid-snaps, and canonicalizes a libavoid display route. | |
| bool | isOrthogonalRoute (std::span< const QPointF > points) |
| Returns whether every consecutive route segment is axis-aligned. | |
| bool | orthogonalRouteSelfIntersects (std::span< const QPointF > points) |
| Detects crossings, touches, or retraced portions within one route. | |
| bool | orthogonalRouteCrossesObstacleInterior (const std::span< const QPointF > route, const std::span< const QRectF > obstacles) |
| bool | pointOnOrthogonalRoute (QPointF point, std::span< const QPointF > route) |
Returns whether point lies on an orthogonal polyline. | |
| bool | orthogonalRoutesTouch (std::span< const QPointF > first, std::span< const QPointF > second) |
| Returns whether an endpoint of either route lies on the other route. | |
| bool | orthogonalRoutesShareSegment (std::span< const QPointF > first, std::span< const QPointF > second) |
| Returns true when two orthogonal polylines share a positive-length segment. | |
| bool | orthogonalRoutesIntersect (std::span< const QPointF > first, std::span< const QPointF > second) |
| Returns true when two routes overlap or form an ambiguous endpoint junction. | |
| std::size_t | orthogonalRouteCrossingCount (std::span< const QPointF > first, std::span< const QPointF > second) |
| Counts strict, perpendicular interior crossings between two routes. | |
| std::size_t | orthogonalRouteIncidentArmCount (QPointF point, const std::vector< std::vector< QPointF > > &routes) |
Counts the distinct orthogonal arms incident to point. | |
| std::vector< QPointF > | canonicalizeOrthogonalRoute (std::vector< QPointF > points) |
| Removes consecutive duplicates and redundant collinear interior points. | |
| std::vector< std::vector< QPointF > > | mergeOrthogonalRoutes (const std::vector< std::vector< QPointF > > &routes, const std::function< bool()> &progress={}) |
| Unions several routes of one net into maximal terminal-to-junction paths. | |
| std::vector< QPointF > | routeOrthogonalWire (const QPointF start, const QPointF end, const std::vector< QRectF > &obstacleRects, const qreal gridSize) |
| std::string | formatInteger (const BigInt &value, const BusValueFormat format, const std::size_t bitWidth) |
| std::optional< BigInt > | parseInteger (std::string_view text, const BusValueFormat format, const std::size_t bitWidth) |
| BusValue | maxValueForBusWidth (const std::size_t width) |
| BusValue | busValueFromInteger (const BigInt &value, std::size_t width) |
Builds an LSB-first BusValue from the low width bits of an integer. Negative values use two's complement and sign extension; nonnegative values use zero extension. Values are truncated to width bits; zero width is empty. | |
| BigInt | integerFromBusValue (const BusValue &value, Signedness signedness=Signedness::UNSIGNED) |
| Decodes an LSB-first BusValue as an unsigned arbitrary-precision integer. Empty values yield zero. UNKNOWN or ERROR bits throw std::invalid_argument. | |
| BusValue | busValueFromBits (std::string_view bits) |
| Strictly decodes an MSB-first raw string containing 0, 1, X, or E. | |
| std::string | formatValue (const BusValue &value, BusValueFormat format, std::size_t fixedWidth=0) |
| Format an LSB-first BusValue for display. | |
| ParsedBusValue | valueFromStr (std::string_view text) |
| Parse user-facing decimal, hexadecimal, octal, binary, or four-state text. | |
| std::optional< BusValue > | resizeParsedValue (const ParsedBusValue &parsed, std::size_t width) |
| Adapts a parsed textual value to an exact destination width. | |
| using BigInt = boost::multiprecision::cpp_int |
Definition at line 31 of file num_formatting.hpp.
| using CircuitGraph |
Boost graph type representing the circuit topology.
Boost graph type representing the circuit topology.
Definition at line 89 of file circuit.hpp.
| typedef std::shared_ptr< Component > Component_ptr = std::shared_ptr<Component> |
Definition at line 33 of file component_registry.hpp.
| using Component_set = std::set<Component_ptr, std::owner_less<Component_ptr>> |
| using Component_weakPtr = std::weak_ptr<Component> |
| using EdgeDescriptor = boost::graph_traits<CircuitGraph>::edge_descriptor |
Descriptor type for edges in the circuit graph.
Definition at line 97 of file circuit.hpp.
| using Json |
Definition at line 44 of file netlist.hpp.
| using PropertyCallback = std::function<PropertyValue(const PropertyValue&)> |
Callback function for property validation/transformation.
Definition at line 149 of file component.hpp.
| using PropertyCallbackMap |
Map from property names to their callback functions.
Definition at line 152 of file component.hpp.
| using PropertyMap |
Map from property names to their values.
Definition at line 145 of file component.hpp.
| using PropertyValue = std::variant<int, bool, std::string, BusValue> |
Variant type for component properties.
Supports configuration scalars, strings, and native logic-bus values.
Definition at line 142 of file component.hpp.
| using StringPropertyOptions = std::vector<std::string> |
Allowed values for a constrained string property.
Definition at line 157 of file component.hpp.
| using StringPropertyOptionsMap |
Map from property names to constrained string values.
Definition at line 160 of file component.hpp.
| using VertexDescriptor = boost::graph_traits<CircuitGraph>::vertex_descriptor |
Descriptor type for vertices in the circuit graph.
Definition at line 94 of file circuit.hpp.
|
strong |
| Enumerator | |
|---|---|
| Raw | |
| Signed | |
| Unsigned | |
| Hex | |
| Oct | |
| Bin | |
| Unknown | |
Definition at line 33 of file num_formatting.hpp.
|
strong |
| Enumerator | |
|---|---|
| Gates | |
| Multiplexers | |
| Arithmetic | |
| FlipFlops | |
| Register | |
| Memory | |
| Subcircuits | |
| Inputs | |
| Outputs | |
| Utils | |
Definition at line 47 of file component.hpp.
|
strong |
Declares whether a component represents a public circuit boundary port.
This is deliberately separate from ComponentCategory : catalog categories may contain components that are not module ports (for example, constants in Inputs).
| Enumerator | |
|---|---|
| None | |
| Input | |
| Output | |
Definition at line 66 of file component.hpp.
|
strong |
|
strong |
|
nodiscard |
Strictly decodes an MSB-first raw string containing 0, 1, X, or E.
Definition at line 295 of file num_formatting.cpp.
Builds an LSB-first BusValue from the low width bits of an integer. Negative values use two's complement and sign extension; nonnegative values use zero extension. Values are truncated to width bits; zero width is empty.
Definition at line 257 of file num_formatting.cpp.
|
nodiscard |
Removes consecutive duplicates and redundant collinear interior points.
Definition at line 380 of file wireRouting.cpp.
|
nodiscard |
| std::string_view componentCategoryName | ( | const ComponentCategory | category | ) |
Definition at line 97 of file component_registry.cpp.
| void configureOrthogonalRouter | ( | Avoid::Router & | router, |
| qreal | gridSize ) |
Applies SILICON's shared orthogonal-routing policy to a libavoid router.
Both interactive wire previews and full-circuit autoplacement use this policy so segment costs, shared-path avoidance, and nudging remain consistent.
Definition at line 69 of file wireRouting.cpp.
|
nodiscard |
Read a boundary component's ID, deriving a stable ID for documents without one.
Definition at line 46 of file circuitDocument.cpp.
|
nodiscard |
Parses persisted Circuit document contents while preserving every component, including the boundary I/O components used by document-level serializers.
Definition at line 62 of file circuitDocument.cpp.
|
nodiscard |
Read canonical nonzero numeric port IDs.
Read a canonical nonzero numeric port ID during deserialization.
Definition at line 36 of file circuitDocument.cpp.
|
nodiscard |
|
nodiscard |
Extracts, grid-snaps, and canonicalizes a libavoid display route.
Definition at line 87 of file wireRouting.cpp.
|
nodiscard |
Format the low bitWidth bits of an arbitrary-precision integer. Prefixes are omitted; binary output is padded to the full bit width. A zero bit width throws std::invalid_argument.
Definition at line 166 of file num_formatting.cpp.
|
nodiscard |
Format an LSB-first BusValue for display.
Definition at line 311 of file num_formatting.cpp.
|
nodiscard |
Decodes an LSB-first BusValue as an unsigned arbitrary-precision integer. Empty values yield zero. UNKNOWN or ERROR bits throw std::invalid_argument.
Definition at line 272 of file num_formatting.cpp.
|
nodiscard |
Returns whether every consecutive route segment is axis-aligned.
Definition at line 115 of file wireRouting.cpp.
|
nodiscard |
Definition at line 252 of file num_formatting.cpp.
|
nodiscard |
Unions several routes of one net into maximal terminal-to-junction paths.
Shared and intersecting segments are split into a graph and redundant cycles are removed before joining degree-two vertices. Returned paths have distinct endpoints.
| progress | Optional continuation check; false discards all merged paths. |
| std::invalid_argument | If an input route has coincident endpoints. |
Definition at line 402 of file wireRouting.cpp.
|
nodiscard |
|
nodiscard |
Returns whether a route enters the interior of any obstacle rectangle.
Definition at line 174 of file wireRouting.cpp.
|
nodiscard |
Counts strict, perpendicular interior crossings between two routes.
Definition at line 311 of file wireRouting.cpp.
|
nodiscard |
Counts the distinct orthogonal arms incident to point.
Definition at line 341 of file wireRouting.cpp.
|
nodiscard |
Detects crossings, touches, or retraced portions within one route.
Definition at line 124 of file wireRouting.cpp.
|
nodiscard |
Returns true when two routes overlap or form an ambiguous endpoint junction.
Definition at line 268 of file wireRouting.cpp.
|
nodiscard |
Returns true when two orthogonal polylines share a positive-length segment.
Definition at line 230 of file wireRouting.cpp.
|
nodiscard |
Returns whether an endpoint of either route lies on the other route.
Definition at line 219 of file wireRouting.cpp.
|
nodiscard |
Parses persisted Circuit document contents without constructing graphical objects. Boundary I/O components define the reusable interface and are removed from the returned implementation circuit.
Definition at line 75 of file circuitDocument.cpp.
|
nodiscard |
Parse an integer in the explicitly selected format and return its width-limited two's-complement bit pattern. Invalid and out-of-range values return nullopt.
Definition at line 198 of file num_formatting.cpp.
|
nodiscard |
Returns whether point lies on an orthogonal polyline.
Definition at line 195 of file wireRouting.cpp.
| void registerAllComponents | ( | ComponentRegistry & | registry | ) |
Definition at line 41 of file component_registration.cpp.
|
inline |
Definition at line 34 of file component_registration.cpp.
|
nodiscard |
Validates that an integer property value is non-negative.
| name | Property name or descriptive prefix used in the error message |
| value | The property value to validate |
| std::invalid_argument | When the value is negative |
Definition at line 29 of file component.cpp.
|
nodiscard |
Validates that an integer property value is a valid bus size.
| name | Property name or descriptive prefix used in the error message |
| value | The property value to validate |
| std::invalid_argument | When the value is below 1 or exceeds the maximum supported bus width |
Definition at line 38 of file component.cpp.
|
nodiscard |
Adapts a parsed textual value to an exact destination width.
Signed decimal values use two's-complement fit and sign extension. Other formats use unsigned fit and zero extension, except a scalar raw UNKNOWN expands to all UNKNOWN bits. A value that cannot be represented returns std::nullopt.
Definition at line 394 of file num_formatting.cpp.
|
nodiscard |
Definition at line 572 of file wireRouting.cpp.
|
nodiscard |
|
nodiscard |
Parse user-facing decimal, hexadecimal, octal, binary, or four-state text.
Unprefixed binary/four-state text is interpreted as an MSB-first raw value; other unprefixed digits are unsigned decimal. A leading + or - selects signed decimal. Invalid text returns BusValueFormat::Unknown.
Definition at line 355 of file num_formatting.cpp.