|
SILICON
|
Namespaces | |
| namespace | attributes |
| namespace | cells |
| namespace | detail |
Classes | |
| class | ModuleDependencyGraph |
| Module-instantiation dependency graph for a Yosys JSON design. More... | |
| struct | ScriptResult |
| class | SerializationContext |
| Mutable module-building interface passed to component serializers. More... | |
| struct | ToolOptions |
Typedefs | |
| using | Json = nlohmann::ordered_json |
Functions | |
| ModuleDependencyGraph | moduleDependencyGraph (std::string_view json) |
| Build a module dependency graph from a Yosys write_json document. | |
| Circuit | deserialize (std::string_view json, std::optional< std::string_view > moduleName=std::nullopt) |
| Deserialize one supported Yosys write_json module into a Silicon circuit. | |
| std::string | serialize (const Circuit &circuit, const std::string_view moduleName) |
| Serialize a complete Silicon circuit as Yosys write_json-compatible JSON. | |
| ScriptResult | runScript (const std::string_view script, const ToolOptions &options) |
| std::string | readVerilog (const std::string_view source, const ToolOptions &options) |
| std::string | readVerilog (const std::span< const SILICON::core::SourceFile > sources, const std::string_view entryPath, const ToolOptions &options) |
| std::string | elaborateHierarchy (const std::string_view json, const ToolOptions &options) |
| std::string | writeVerilog (std::string_view json, const ToolOptions &options) |
| using Json = nlohmann::ordered_json |
Definition at line 44 of file netlist.hpp.
|
nodiscard |
Deserialize one supported Yosys write_json module into a Silicon circuit.
When moduleName is absent, the sole module or unique module carrying the Yosys top attribute is selected. Input must already use the canonical cells supported by the direct importer; call elaborateHierarchy() first for raw frontend JSON. Cells naming another non-blackbox module in the same design become project subcircuit placeholders. Unsupported or ambiguous designs fail atomically.
Definition at line 1832 of file deserialization.cpp.
|
nodiscard |
Legalize raw Yosys JSON into the canonical subset accepted by deserialize.
Definition at line 461 of file yosys_tool.cpp.
|
nodiscard |
Build a module dependency graph from a Yosys write_json document.
Edges point from an instantiating module to the declared modules it instantiates. Malformed documents throw std::runtime_error with an Invalid Yosys JSON prefix.
Definition at line 1764 of file deserialization.cpp.
|
nodiscard |
Definition at line 408 of file yosys_tool.cpp.
|
nodiscard |
Read Verilog, resolve parameterized instances, and return raw Yosys JSON.
Definition at line 401 of file yosys_tool.cpp.
|
nodiscard |
Definition at line 322 of file yosys_tool.cpp.
|
nodiscard |
Serialize a complete Silicon circuit as Yosys write_json-compatible JSON.
| circuit | The circuit to serialize. |
| moduleName | The Yosys module name to assign to the top-level circuit. The circuit itself owns no name; the caller supplies one (e.g. derived from the project document slug). |
Definition at line 443 of file netlist.cpp.
|
nodiscard |
Run the Yosys Verilog backend and return its raw source output.
Definition at line 494 of file yosys_tool.cpp.