svcc (Python)
SystemVerilog to SystemC conversion for RTL, with formal checks of the result.
Status: 0.1, 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(CLIsvcc rtl2sc): converts synthesizable SystemVerilog RTL to C++17 SystemC (SC_MODULEs). The design is elaborated bysvlang; every expression carries its width and signedness, and the emitter truncates explicitly wherever C++ would compute in a wider type.rtl_prove_json(CLIsvcc 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(CLIsvcc 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 (
initialblocks, 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. Designs outside the model are reported as NOT COVERED (exit code 3), never as passing.
- Real designs. Every module of 15 open-source designs (2,184 modules, among them ibex,
cv32e40p, cva6, OpenTitan, Caliptra, common_cells) was tried as a top. 1,191 converted;
all of them compile against SystemC, and 1,170 match Verilator over 3,000 random steps.
The remaining differences are listed in the repository
(
benchmarks/results/rtl_stress.md); the ones that weresvcc's mapping of derived clocks are now rejected with an error.
Known limits
- Two-state.
xandzread 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). A gated clock, a clock made by other 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.
- Front end.
svlangis the meaning of SystemVerilog for both the conversion and the proof, so ansvlangdefect 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 2,184-module stress run, the modules that
still differ from Verilator are
popcountandprim_pad_attr(the Verilator reference is wrong or sees different source),stream_muxwith a placeholder parameter of 0 (undefined in two-state), andfpnew_cast_multi/fpnew_opgroup_blockfrom cvfpu, which are not yet explained. (lfsrandcc_lfsrdiffered because of an svlang defect fixed in svlang 0.5.1, which this release uses; they now match.) - 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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| svcc-0.1.0.tar.gz | 198.5 kB | Without provenance | Details for svcc-0.1.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| svcc-0.1.0-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.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| svcc-0.1.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for svcc-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
Total release size: 10.9 MB
Release files / svcc-0.1.0.tar.gz
| Download URL | svcc-0.1.0.tar.gz |
|---|---|
| Size | 198.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d9eebf78a6e5e2854bc61e1dfbd3bb9fdfdc3a9079f00e9fc80bd22d34380f9
|
|
BLAKE2b-256 checksum How to use checksums |
74b3aa60326daff71bc064b991613f9d0e69890a1bac02b99cd22ccf7e10321b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / svcc-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | svcc-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
70d82bd2281e7e637f6b9c533c3405d87d57c76711f1c0604f8421908fe47956
|
|
BLAKE2b-256 checksum How to use checksums |
ed7bf78ce940c451c864b9724c530e9e466295dc6e626c7f7bd2ae02d0425851
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / svcc-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | svcc-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.0 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d801a694a4bc718f24e5ae94f67796b82cc12c407f0e18ac24c7ed4856aaa5fb
|
|
BLAKE2b-256 checksum How to use checksums |
2a472223c01ad10178b5bad6be86cb1c1c0d6519d0c2927d94cf2e4673ce17a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for svcc 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.