zuspec-synth
ISA-agnostic multi-level synthesis (MLS) core for the Zuspec framework.
Overview
zuspec-synth provides the core synthesis passes that transform a high-level
dataclass-based processor description into synthesisable SystemVerilog. The
library is ISA-agnostic: it contains no RISC-V–specific logic. All
architecture-specific stage generation (fetch, decode, execute, …) lives in
plugin passes supplied by the consumer (e.g. zuspec-example-mls-riscv).
Core passes
| Pass | Description |
|---|---|
ElaboratePass |
Instantiate and elaborate the processor component |
FSMExtractPass |
Extract FSM/activity logic from dataclass actions |
SchedulePass |
Schedule operations onto pipeline stages |
LowerPass |
Lower IR to a form suitable for SV emission |
SVEmitPass |
Emit SystemVerilog from the lowered IR |
CertEmitPass |
Write a JSON synthesis certificate (deadlock check; ISA compliance optional) |
Plugin extension points
Consumer packages inject ISA-specific behaviour by adding passes to the
PassManager chain after LowerPass and before SVEmitPass.
SynthIR.stage_sv
The key extension point for stage generation. A plugin pass (e.g.
RVStageGeneratePass) populates:
ir.stage_sv[stage_name] = ["module FetchStage (", " ...", ");", ...]
SVEmitPass (via mls.py) checks ir.stage_sv[stage.name] first; if
present, those lines are used verbatim. Otherwise, a generic structural
placeholder module is emitted (useful for ISA-agnostic smoke tests).
SynthIR.lowered_sv
Populated by domain-node lowering passes (e.g. RVFieldLowerPass,
RVConstraintDecodeLowerPass, RVBodySynthLowerPass) with per-unit SV
snippets that the stage generators incorporate.
Typical pass chain
ir = PassManager([
ElaboratePass(MyCore, cfg),
MyISAIdentifyPass(...), # plugin: tag IR nodes with ISA semantics
FSMExtractPass(synth_cfg),
SchedulePass(synth_cfg),
LowerPass(synth_cfg),
MyISAStageIntroducePass(), # plugin: add domain nodes
MyISAFieldLowerPass(), # plugin: lower field-extraction nodes
MyISAStageGeneratePass(), # plugin: populate ir.stage_sv
SVEmitPass(synth_cfg, output_path),
]).run(SynthIR())
Running tests
cd packages/zuspec-synth
python3 -m pytest tests/ -q
CLI Plugin
zuspec-synth registers itself automatically with zuspec-cli when both packages are installed.
Registered components
| Name | Type | Description |
|---|---|---|
synth |
Command | zuspec synth — synthesize a constraint-action class to RTL |
compute-support |
Transform | Compute active bit-ranges for each constraint |
build-cubes |
Transform | Enumerate minterms and build per-output truth tables |
odc |
Transform | Compute observability don't-cares |
minimize |
Transform | SOP minimisation via Quine-McCluskey |
python |
Frontend | Load a @zdc.dataclass action class by module:Class reference |
Python frontend usage
# Synthesize a Python @zdc.dataclass action to RTL
zuspec synth --fe python mymodule:MyDecodeClass -o out.sv
The --top argument must be in module:ClassName form. The module must be
importable (i.e. on sys.path or PYTHONPATH).
Optimization flags
zuspec synth --fe python mymod:MyClass --no-odc --no-minimize -o out.sv
--no-odc skips the observability don't-care pass; --no-minimize skips
Quine-McCluskey minimisation (useful for debugging).
Metadata
Release files for zuspec-synth 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zuspec_synth-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for zuspec_synth-0.1.0-py3-none-any.whl |
Release files / zuspec_synth-0.1.0-py3-none-any.whl
| Download URL | zuspec_synth-0.1.0-py3-none-any.whl |
|---|---|
| Size | 381.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6163948a5416e8c4d7891253b612ea0a4889d1e0b1b3711c53f00913559b2a53
|
|
BLAKE2b-256 checksum How to use checksums |
87bf234b3c1fc457e49016c766f9fafcc954bb5be51ed82f0758e11ec800283b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for zuspec-synth 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.