Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

hwbuild.yml

Place a hwbuild.yml in your project root to define default synthesis parameters. The CLI reads it automatically when you ssynth job submit a directory.

All CLI flags override hwbuild.yml values.

Example

top_module: top
target:
  family: ice40
  device: hx8k
  package: ct256
sources:
  - "src/*.v"
  - "lib/**/*.sv"
constraints:
  - pins.pcf
  - timing.pcf
seeds: 4
pick: best_timing
priority: standard
parallelism: 2
steps:
  - synth
  - pnr
  - bitstream
max_runtime: "2h"
max_memory: "8GB"
profile: <PROFILE_ID>
tool_args:
  yosys_args:
    extra_passes:
      - abc9
      - opt
  nextpnr_args:
    extra_flags:
      - --tmg-ripup
  bitstream_args:
    extra_flags:
      - --compress
synth_script: synth.ys

Fields

FieldTypeDescription
top_modulestringTop-level module name. Alias: top
target.familystringice40 or ecp5
target.devicestringDevice code (e.g., hx8k, 85k)
target.packagestringPackage code (e.g., ct256, CABGA554)
target.boardstringOptional board name
sourceslistFile paths or globs for HDL sources. If omitted, all .v, .sv, .vhd, .vhdl files are discovered recursively.
constraintslistConstraint files relative to project root. Multiple files supported (e.g., separate pin and timing constraints).
seedsintegerNumber of seeds (1-128, plan-limited)
pickstringbest_timing or best_area
prioritystringinteractive, standard, or batch
parallelismintegerConcurrent seed count (1-16, plan-limited)
stepslistSubset of: synth, pnr, bitstream. Omit steps for quick validation (e.g., synth only).
max_runtimestringDuration: "2h", "30m", "1h30m" (max 7 days)
max_memorystringMemory: "8GB", "4096MB" (512 MB to 128 GB)
profilestringBuild profile ID. Inherits target and tool args from the profile.
tool_argsobjectPer-tool arguments. Merged on top of profile args (see below).
synth_scriptstringPath to a custom Yosys .ys script. Replaces auto-generated synthesis commands.

Tool arguments

The tool_args object lets you pass extra arguments to each pipeline tool:

tool_args:
  yosys_args:
    extra_passes:     # Yosys passes run after synthesis
      - abc9
      - opt
      - flatten
  nextpnr_args:
    extra_flags:      # Flags appended to the nextpnr command
      - --tmg-ripup
      - --placer-heap-timingweight
      - "50"
  bitstream_args:
    extra_flags:      # Flags appended to icepack/ecppack
      - --compress

All arguments are validated against an allowlist. Shell metacharacters are rejected.

When both a profile and tool_args are specified, per-tool merge applies: if the job provides a non-empty list for a tool, it replaces the profile’s list for that tool. Empty lists inherit from the profile.

Source file discovery

If sources is omitted, SuperSynth discovers HDL files recursively:

  • Verilog: .v
  • SystemVerilog: .sv
  • VHDL: .vhd, .vhdl

Include directories are automatically collected from the parent directories of discovered source files and passed to Yosys as -I flags.

VHDL files are compiled with GHDL (--std=08) before Yosys synthesis. Mixed Verilog/VHDL projects are supported — VHDL is processed first, then Verilog sources are read.

Target resolution order

  1. CLI --target flag
  2. hwbuild.yml target section
  3. Build profile’s target (if profile specified)
  4. Project’s default target
  5. Error if none specified