Skip to main content

pysystemc - SystemC python binding using cppyy

pysystemc — Python and SystemC with logic gates in a simulation chip

Category Status
CI/CD Publish Documentation workflow
Project GitHub PyPI GitHub tag
Docs Read the Docs
Meta License Stars Forks Contributors
Standards Python SemVer Keep a Changelog

Python bindings for SystemC using cppyy. Write Python testbenches and modules while using the native C++ simulation kernel and on-demand template instantiation. The PyPI distribution is pysystemc; the Python import namespace is amal.eda.systemc.

Why Python and cppyy?

SystemC provides a C++ simulation kernel, typed channels, and a rich modeling library. Python adds a convenient way to assemble models and experiment with them. You can change stimulus, testbench logic, logging, waveform selection, and model connections in Python, then rerun the simulation without rebuilding the existing C++ model libraries.

cppyy makes native C++ classes and templates accessible from Python. For example, sc_uint[17], sc_biguint[137], and sc_signal[sc_uint[17]] can be requested when a script runs, rather than requiring a binding library with a predefined list of types and widths. Its Cling interpreter compiles the necessary template specializations and bridge code on demand. This still involves compilation, but it happens within the running Python environment instead of a separate C++ build-and-link cycle.

Python modules can register methods and threads with the native SystemC kernel, while existing C++ models continue to execute as C++. This lets a testbench load configuration files, generate parameterized stimulus, inspect results, and use Python analysis tools around the same simulation. SystemC still controls time, delta cycles, and process scheduling; Python callbacks add overhead when the simulation crosses the language boundary.

This flexibility is especially useful during exploration and verification: change a test scenario or a traced signal in a script and rerun it. Changes to the implementation of a compiled C++ model still require rebuilding that model. SystemC's elaboration rules also still apply: most structural connections are made before simulation starts. Dynamic processes can be spawned during a run, but arbitrary structural changes and Python process reset are not currently supported by these bindings.

Quickstart

Load Python 3.14 and install uv, then run:

make setup
make example-hello-py
make example-counter-py
make test

Setup installs dependencies and builds SystemC 2.3.4 with pthreads. Existing UV_* environment settings are honored. To run the C++ hello example, use make example-hello-cpp.

Detailed setup, validation, and logging instructions are in the documentation.

Examples

examples/run_sysc_cpp.py loads C++ source files and runs them through the native SystemC startup wrapper.

There are a few C++ and Python examples in examples/ directory.

Some examples adapted from:

For build options, header repair, logging controls, and validation, see the development guide.

References

Metadata

Release files for pysystemc 0.2.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 pysystemc 0.2.3
File Size Uploaded
pysystemc-0.2.3.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysystemc 0.2.3
File Interpreter ABI Platform
pysystemc-0.2.3-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details

Total release size: 3.4 MB

Release files / pysystemc-0.2.3.tar.gz

Download URL pysystemc-0.2.3.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
245dcfc546c2749d69fc7a70ed9d6739f1f83fef9c0ef5333d334b0054c6c7c4
BLAKE2b-256 checksum
How to use checksums
fec4615e8ebfe596ce64be9e4a2da74fcd99bb3b2a2628f2319e3f0cbbda8108
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / pysystemc-0.2.3-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL pysystemc-0.2.3-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 3.4 MB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
18b8da2e5af0b86baad98a637b6adde88412e230b689f8e1bfd131f53617a0b7
BLAKE2b-256 checksum
How to use checksums
f73c65187ad7b66aa740314539ad3b8f6f7fbf613336f724ea201b4ce717c506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.3 This release

2 release files

0.2.1

2 release files

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