|
SILICON
|
Classes | |
| struct | ArchitectureBuildResult |
| class | CircuitDependencyGraph |
| Runtime-only graph of Circuit-to-Circuit instantiation dependencies. More... | |
| class | Document |
| struct | DocumentChange |
| class | DocumentStore |
| struct | DocumentTypeInfo |
| class | ProjectCircuitResolver |
| class | ProjectContext |
| struct | ProjectFile |
| In-memory representation of a .sil project archive. More... | |
| struct | ProjectInfo |
| Project-level data stored in project.json. More... | |
| struct | ProjectMetadata |
| Metadata stored in metadata.json. More... | |
Enumerations | |
| enum class | DocumentType { Circuit , Verilog , Sisl , RawBinary } |
| enum class | DocumentCategory { Diagram , Code , Architecture , Binary } |
| enum class | DocumentChangeKind { Added , Updated , Removed , Reset } |
Functions | |
| bool | isArchitecturePathSlug (const std::string_view name) |
| bool | isValidArchitectureName (const std::string_view name) |
| std::optional< std::string > | declaredArchitectureName (const std::string_view source) |
| std::string | renameArchitectureDeclaration (const std::string_view source, const std::string_view oldName, const std::string_view newName) |
| void | validateArchitectureDeclaration (const std::string_view directoryName, const std::string_view source) |
| std::string | architectureDirectory (const std::string_view name) |
| ArchitectureBuildResult | buildArchitecture (const std::optional< std::string > expectedName, const std::string_view source) |
| std::optional< DocumentType > | documentTypeForPath (const std::string_view path) |
| std::optional< std::string > | documentSlugForPath (const std::string_view path) |
| bool | isValidDocumentSlug (const std::string_view slug) |
| std::string | documentPathForSlug (const DocumentType type, const std::string_view slug) |
| Document | importDocument (const std::string_view sourcePath, std::string contents) |
| std::string | documentFileName (const Document &document) |
| std::shared_ptr< const std::string > | binaryContentsSnapshot (const DocumentStore &documents, const std::string_view slug) |
| constexpr const DocumentTypeInfo & | documentTypeInfo (const DocumentType type) |
| constexpr DocumentCategory | categoryOf (const DocumentType type) |
| constexpr bool | isCodeDocument (const DocumentType type) |
| std::string | currentUtcTimestamp () |
| Returns the current UTC timestamp formatted as YYYY-MM-DDTHH\:MM\:SSZ. | |
| ProjectMetadata | metadataForNewFile () |
| Creates default metadata for a new project file. | |
| ProjectFile | readProjectFile (const std::filesystem::path &path) |
| Reads and validates a Silicon .sil project archive. | |
| void | writeProjectFile (const std::filesystem::path &path, const ProjectFile &projectFile) |
| Writes a Silicon .sil project archive. | |
Variables | |
| constexpr std::array< DocumentTypeInfo, 4 > | DOCUMENT_TYPE_INFO |
| constexpr std::string_view | MIME_TYPE = "application/vnd.silicon.project+zip" |
| MIME marker stored in Silicon project archives. | |
| constexpr int | FORMAT_VERSION = 1 |
| Current version of the Silicon project archive schema. | |
| const std::string | DEFAULT_CIRCUIT_PATH |
| Default path of the initial circuit JSON file. | |
|
strong |
| Enumerator | |
|---|---|
| Diagram | |
| Code | |
| Architecture | |
| Binary | |
Definition at line 39 of file projectDocument.hpp.
|
strong |
| Enumerator | |
|---|---|
| Added | |
| Updated | |
| Removed | |
| Reset | |
Definition at line 91 of file projectDocument.hpp.
|
strong |
| Enumerator | |
|---|---|
| Circuit | |
| Verilog | |
| Sisl | |
| RawBinary | |
Definition at line 37 of file projectDocument.hpp.
|
nodiscard |
Definition at line 136 of file isaArchitecture.cpp.
|
nodiscard |
Returns an immutable copy of a project raw-binary document, or null if absent.
Definition at line 309 of file projectDocument.cpp.
|
nodiscard |
Validates that the leading declaration matches expectedName and then builds the architecture with SISL. This is the single definition of a successful architecture build shared by every consumer.
A std::nullopt expectedName skips the declaration check, which is only correct for sources whose architecture name is not known yet. A declaration mismatch is reported through ArchitectureBuildResult::error without parsing, so the source is fully parsed at most once.
Definition at line 141 of file isaArchitecture.cpp.
|
nodiscardconstexpr |
Definition at line 81 of file projectDocument.hpp.
|
nodiscard |
Returns the current UTC timestamp formatted as YYYY-MM-DDTHH\:MM\:SSZ.
Definition at line 256 of file projectFile.cpp.
|
nodiscard |
Reads only the leading declaration so unfinished imports can still be edited.
Definition at line 108 of file isaArchitecture.cpp.
|
nodiscard |
Returns the external leaf filename used when exporting a project document.
Definition at line 256 of file projectDocument.cpp.
|
nodiscard |
Definition at line 191 of file projectDocument.cpp.
|
nodiscard |
Definition at line 174 of file projectDocument.cpp.
|
nodiscard |
Definition at line 165 of file projectDocument.cpp.
|
nodiscardconstexpr |
Definition at line 72 of file projectDocument.hpp.
|
nodiscard |
Creates a project document from an external file name and payload.
Definitive extensions are preferred; otherwise the payload is inspected for a Silicon circuit or non-text binary data. Code types are extension-only.
| std::invalid_argument | if the name is invalid or the file type is unsupported. |
Definition at line 230 of file projectDocument.cpp.
|
nodiscard |
Checks that a ZIP path segment cannot escape its architecture directory.
Definition at line 31 of file isaArchitecture.cpp.
|
nodiscardconstexpr |
Definition at line 86 of file projectDocument.hpp.
|
nodiscard |
Validates an architecture identifier with SISL itself.
Definition at line 44 of file isaArchitecture.cpp.
|
nodiscard |
Definition at line 185 of file projectDocument.cpp.
|
nodiscard |
Creates default metadata for a new project file.
Definition at line 263 of file projectFile.cpp.
|
nodiscard |
Reads and validates a Silicon .sil project archive.
Only the reserved archive entries and recognized project documents are accepted.
| std::runtime_error | if the archive cannot be opened, does not contain the expected ZIP structure, has invalid JSON, references an unsupported format version, contains an unknown entry, or violates the document layout. |
Definition at line 272 of file projectFile.cpp.
|
nodiscard |
Updates a matching leading declaration while preserving the rest of the source.
Definition at line 115 of file isaArchitecture.cpp.
| void validateArchitectureDeclaration | ( | std::string_view | directoryName, |
| std::string_view | source ) |
Throws when a readable declaration disagrees with its containing directory.
Definition at line 126 of file isaArchitecture.cpp.
| void writeProjectFile | ( | const std::filesystem::path & | path, |
| const ProjectFile & | projectFile ) |
Writes a Silicon .sil project archive.
The writer emits every document listed by projectFile.
| std::runtime_error | if the project has no circuit document or the archive cannot be created/finalized. |
Definition at line 300 of file projectFile.cpp.
|
inline |
Default path of the initial circuit JSON file.
The archive layout is:
Every project contains at least one document whose type is Circuit. No circuit has project-level priority.
Definition at line 60 of file projectFile.hpp.
|
inlineconstexpr |
Definition at line 49 of file projectDocument.hpp.
|
inlineconstexpr |
Current version of the Silicon project archive schema.
Readers reject archives whose metadata.json.formatVersion differs from this value.
Definition at line 43 of file projectFile.hpp.
|
inlineconstexpr |
MIME marker stored in Silicon project archives.
A .sil file is a ZIP archive. The first entry written by Silicon is a stored, uncompressed mimetype file containing this exact value, allowing readers to reject unrelated ZIP files before parsing JSON payloads.
Definition at line 35 of file projectFile.hpp.