Contact us Start a Trial

Compilation Recipe Export

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

  1. Ensure you have a Sigasi project open and properly configured in your VS Code workspace.
  2. Open the VS Code Command Palette (Ctrl+Shift+P).
  3. Type Sigasi: Compilation Recipe Export and press Enter.
  4. 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).
  5. 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.

KeyTypeDescription
versionStringThe version of the compilation recipe schema.
generatedByStringIdentifies the tool that created the file (e.g., "Sigasi").
argumentsArray of StringsThe arguments that were used to generate the compilation plan.
creationTimeStringThe date and time when the recipe was created in ISO 8601 format.
projectObjectContains information about the source Sigasi project.
targetsArrayAn array of one or more compilation targets.

Project Object

This object provides context about the project from which the recipe was exported.

KeyTypeDescription
nameStringThe name of the Sigasi project.
pathStringThe 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.

KeyTypeDescription
nameStringThe name of the compilation target (e.g., "default").
fileGroupsArrayAn 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.

KeyTypeDescription
libraryStringThe name of the HDL library into which the files in this group should be compiled (e.g., my_lib, work).
languageLevelStringThe 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".
includeDirectoriesArray 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.
definesObject(Optional) An object containing Verilog macro definitions as key-value pairs (e.g., { "MY_DEFINE": "value" }).
conditionalVariablesObject(Optional) An object containing custom VHDL conditional analysis variables as key-value pairs.
filesArrayAn array of file objects that belong to this group.

File Object

This object represents a single source file to be compiled.

KeyTypeDescription
pathStringThe 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.
sourceTypeStringThe 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 the fileGroups, files, defines, and includeDirectories 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.