Skip to main content

svcc (Python)

SystemVerilog to SystemC conversion for RTL, with formal checks of the result.

Status: 0.1.3, early release. The RTL conversion path is the part of svcc that has been checked on real designs. Read "What is checked" and "Known limits" before relying on it.

What it does

  • rtl_to_sc (CLI svcc rtl2sc): converts synthesizable SystemVerilog RTL to C++17 SystemC (SC_MODULEs). The design is elaborated by svlang; every expression carries its width and signedness, and the emitter truncates explicitly wherever C++ would compute in a wider type.
  • rtl_prove_json (CLI svcc rtl-prove): proves the generated SystemC equal to the source with Z3. The generated header is read back with C++ arithmetic rules, so a C++ width error is a counterexample.
  • CLI only, svcc rtl-cosim: compiles the generated SystemC against a real SystemC library and runs it against Verilator on the same random stimulus. This is simulation evidence, not a proof.
  • prove_sec_json (CLI svcc prove-sec): sequential equivalence between two RTL designs, or between an untimed C++ function and pipelined RTL some cycles later (C2RTL).

The accepted subset and the mapping are in docs/rtl_subset.md; what each check proves and assumes is in docs/formal_gates.md.

Install

pip install svcc

Wheels are built for CPython 3.9 and later (abi3). The proof functions need z3 on PATH. The svcc command-line tool, including rtl-cosim, is in the Rust crate (cargo install svcc).

import json, svcc

src = open("counter.sv").read()
header = svcc.rtl_to_sc("counter.sv", src, ["counter"])   # C++17 SystemC text
for item in json.loads(svcc.rtl_prove_json("counter.sv", src)):
    print(item)                                            # Proved / Skipped / NotCovered

Errors (a construct outside the subset, a parse error) raise ValueError with the source location. Also available: sv_to_sc, sc_to_sv, prove_equivalent_json, prove_sec_json, and svcc.__version__.

What is checked

  • Fail closed. A construct outside the subset is an error with a source location, not a guess. Skipped constructs (initial blocks, assertions, system tasks) are reported as notes.
  • Proof. For a design in the proof model, the generated SystemC is proved equal to the source for all runs from equal start states (by induction), or for a bounded number of cycles when induction does not close. On the command line a bounded result is not a proof: it exits 2 and prints [BND ] ... (bounded); in the JSON it is BoundedNoDifference. Designs outside the model are reported as NOT COVERED (exit code 3), never as passing.
  • Real designs. Every module of 16 open-source code bases (2,184 modules, among them ibex, cv32e40p, cva6, OpenTitan, Caliptra, common_cells) was tried as a top. In the latest run, 1,185 converted and match Verilator over 3,000 random steps, and 5 differ. This is simulation only; the proof was not run on these designs. Details are in benchmarks/results/rtl_stress.md and paper/rtl-tv/numbers.tex.

Known limits

  • Two-state. x and z read as 0, in the conversion and in the proof. A design that relies on X behaviour is outside the model.
  • Clocks. A register may be clocked by an input port, a plain copy of it, or a register output (a divider written with nonblocking assignments). Since 0.1.1, clock-gating cells, clock buffers and inverters become clock enables on the root clock. Any other clock made by logic, or a clock written with a blocking assignment, is rejected: SystemC would run it one delta cycle late. Signals written by blocks on different clocks are rejected.
  • Proof model. One clock; an asynchronous reset is treated as taking effect at the clock step. Designs with several clocks are simulated, not proved. The proof does not model SystemC delta-cycle scheduling: a hand-written header with a process on an internal copy of a clock can pass it. Use rtl-cosim for scheduling.
  • Front end. svlang is the meaning of SystemVerilog for both the conversion and the proof, so an svlang defect can affect both sides of a proof alike. This release uses svlang 0.5.1, which fixes the three elaboration defects the stress run found.
  • Not supported: interfaces, inout, unpacked structs, hierarchical references, tasks, foreach, arrays local to a process, gate primitives, among others (see the subset page).
  • Known differences on real designs. In the latest 2,184-module stress run, the modules that differ from Verilator are stream_mux with a placeholder parameter of 0 (undefined in two-state) and two configurations each of fpnew_cast_multi and fpnew_fma_multi from cvfpu, which are not yet explained.
  • Other directions. The UVM/verification-class translation (sv2sc, sc2sv) and the SystemC-to-SystemVerilog direction ship in this package but have not had the same scrutiny on real code as the RTL path. Treat their output as a starting point.

License

Apache-2.0. Copyright 2026 Mayur Kubavat.

Metadata

Release files for svcc 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for svcc 0.1.3
File Size Uploaded Provenance Actions
svcc-0.1.3.tar.gz 249.7 kB Without provenance Details for svcc-0.1.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for svcc 0.1.3
File Interpreter ABI Platform Actions
svcc-0.1.3-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for svcc-0.1.3-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
svcc-0.1.3-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for svcc-0.1.3-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 11.7 MB

Release files / svcc-0.1.3.tar.gz

Download URL svcc-0.1.3.tar.gz
Size 249.7 kB
Tags Source
SHA-256 checksum
How to use checksums
35750fcc3d2c91060cb68c1b7a289c165980e8de2d2ee68d3b084da22acd353f
BLAKE2b-256 checksum
How to use checksums
c3faf970d1cd72aa7621a416ace981bc60756db9f3287ed3d90b54d155bdb69d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / svcc-0.1.3-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL svcc-0.1.3-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 6.0 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
c1720654ea50d04ff1ec15d70cb95aa65a01cff8c3d9fc80c69c3360e0df0d2b
BLAKE2b-256 checksum
How to use checksums
04edf9c3d2c9b62f6745c360b80b527aec1cb8968afe521bad6ddc848ebf12a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / svcc-0.1.3-cp39-abi3-macosx_11_0_arm64.whl

Download URL svcc-0.1.3-cp39-abi3-macosx_11_0_arm64.whl
Size 5.4 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ab48faae2067f609e87a78fb17e9db1b57f36a72888fb64711112679c04ce883
BLAKE2b-256 checksum
How to use checksums
b2774a9d8d63edca806b8ea566e4fec7804a1a59635da5c3bee2de55070736f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for svcc 0.1.3

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.

Release history Release notifications | RSS feed

This release

0.1.3 This release

3 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page