The Compilation Recipe Export command provides a standardized, machine-readable way to export the compilation order and all compilation details, such as library mapping and language levels, of your Sigasi project.
This feature is essential for integrating your Sigasi project with external tools, such as simulators, synthesis tools, linters, or any custom script that requires an ordered list of HDL files. The command generates a JSON file that precisely describes the project structure, ensuring that your external tools can compile your design in the correct order with the correct settings.
How to Use
- Ensure you have a Sigasi project open and properly configured in your VS Code workspace.
- Open the VS Code Command Palette (
Ctrl+Shift+P
). - Type
Sigasi: Compilation Recipe Export
and press Enter. - You will be prompted to select a path format for the output:
- Absolute: All paths are absolute, starting from the file system root (e.g.,
C:\...
or/home/...
). - Relative: All paths will be relative to the project’s root directory (e.g.,
src/vhdl/alu.vhd
).
- Absolute: All paths are absolute, starting from the file system root (e.g.,
- The file
compilation-recipe.json
will be automatically created in the project’s root directory.
Compilation Recipe JSON Format
The generated file follows a structured JSON format defined by a schema. Below is a detailed explanation of each field.
Top-Level Object
The root object contains metadata about the recipe and the project.
Key | Type | Description |
---|---|---|
version | String | The version of the compilation recipe schema. |
generatedBy | String | Identifies the tool that created the file (e.g., "Sigasi" ). |
arguments | Array of Strings | The arguments that were used to generate the compilation plan. |
creationTime | String | The date and time when the recipe was created in ISO 8601 format. |
project | Object | Contains information about the source Sigasi project. |
targets | Array | An array of one or more compilation targets. |
Project Object
This object provides context about the project from which the recipe was exported.
Key | Type | Description |
---|---|---|
name | String | The name of the Sigasi project. |
path | String | The path to the root directory of the project. This will be an absolute path or a relative path depending on the choice made during export. |
Target Object
A target defines a specific compilation configuration. The targets
array contains one or more of these objects.
Key | Type | Description |
---|---|---|
name | String | The name of the compilation target (e.g., "default" ). |
fileGroups | Array | An array of file groups. The order of these groups is significant for compilation. |
File Group Object
Files are grouped by their target library, language version, and other compilation settings. The order of these groups and the order of files within each group represents the recommended compilation order.
Key | Type | Description |
---|---|---|
library | String | The name of the HDL library into which the files in this group should be compiled (e.g., my_lib , work ). |
languageLevel | String | The HDL language version for this group. Possible values include: "VHDL-1993" , "VHDL-2002" , "VHDL-2008" , "VHDL-2019" , "Verilog-2005" , "SystemVerilog-2012" , "SystemVerilog-2017" , and "SystemVerilog-2021" . |
includeDirectories | Array of Strings | (Optional) An array of paths to include directories for Verilog/SystemVerilog include directives. These paths will be absolute or relative based on the export setting. |
defines | Object | (Optional) An object containing Verilog macro definitions as key-value pairs (e.g., { "MY_DEFINE": "value" } ). |
conditionalVariables | Object | (Optional) An object containing custom VHDL conditional analysis variables as key-value pairs. |
files | Array | An array of file objects that belong to this group. |
File Object
This object represents a single source file to be compiled.
Key | Type | Description |
---|---|---|
path | String | The path to the HDL source file. This will be an absolute path or a path relative to the project root, depending on the choice made during export. |
sourceType | String | The origin of the file. Can be: "Project" (file is part of the user’s project), "Dependency" (file comes from a dependency), or "ExternalLibrary" (file is from an external source). |
Use Cases
The primary purpose of the compilation recipe is to enable automation and integration with other EDA tools.
Custom Simulation Scripts: Write a Python, Tcl, or other script to parse the
compilation-recipe.json
file. The script can read thefileGroups
,files
,defines
, andincludeDirectories
to generate a precise compilation script for your chosen simulator, e.g., ModelSim/Questa, Vivado Xsim, GHDL, VCS.CI/CD Pipelines: This recipe is ideal for automation. In a Continuous Integration (CI/CD) environment, you can use the Sigasi CLI tool to programmatically generate the
compilation-recipe.json
file. This allows for seamless integration into your automated build and test pipelines, ensuring that your CI system always uses the exact file list and compilation order defined in your Sigasi project without requiring manually maintained scripts.Third-Party Tool Integration: Use the recipe to feed your project’s file structure into linters, formal verification tools, or code formatters that require a structured input of source files and their compilation context.