A Python wrapper around an installation of Verilator.
Project description
Verilator Python
This python package contains a pre-built installation of verilator, and a python wrapper to run verilator. It should function exactly the same as if you installed verilator through normal means.
Installing this python package will install "verilator.exe" into the python environments scripts/bin folder, so it can be ran and can easily be found by CMake.
The main goal of this project is to simplify distributing verilator and using it within a python application.
Installation
Verilator requires that the operating system used to build verilator is the same as the operating system used to run verilator, so wheels built on windows should work well.
Otherwise, you can build from source. This requires having a compatible compiler installed, and any dependencies. Read the verilator user manual for more information.
Install Options
pypi.org
pip install verilator-dspsim
from source
pip install .
cached build directory
pip install --no-build-isolation -Cbuild-dir=build -v .
editable install
pip install --no-build-isolation -Cbuild-dir=build --config-settings=editable.rebuild=true -v -e .
Example Project
The example project "example" in the root of this repository uses scikit-build-core, nanobind, and verilator to build a simple verilator simulation wrapped in a python package.
You will need to have am appropriate compiler installed. Windows: MSVC, Linux: gcc, Mac: clang? (I don't have a Mac)
-
Install the verilator package from pypi.org, or from source.
-
Build and install the example python extension
-
Run the example
pip install verilator-dspsim
pip install ./example
python -c "import example;example.run_simulation()"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file verilator_dspsim-5.30.0.tar.gz.
File metadata
- Download URL: verilator_dspsim-5.30.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d7dd58055a2bf039fd69ba864d42cf5017895a011c8e86722c97f369a0cdc40
|
|
| MD5 |
52ad95a7c52de7d96ccedd011372e81d
|
|
| BLAKE2b-256 |
e7262448939b9183dd528f50b65a9ff0622c3b6cfc75b76d5186d8a976a824e2
|
File details
Details for the file verilator_dspsim-5.30.0-cp312-abi3-win_amd64.whl.
File metadata
- Download URL: verilator_dspsim-5.30.0-cp312-abi3-win_amd64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.12+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a46e3ef0a24db0bced1394860a0a2a0296ae1debf15f73aebd63d065fc500ccd
|
|
| MD5 |
e3014e7c22b9b96281ff6ad0cb803db2
|
|
| BLAKE2b-256 |
909fd190531de76d7a5edecb02d5f98e1e2b5ef8a3426331cdb33be3775e1e70
|
File details
Details for the file verilator_dspsim-5.30.0-cp312-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: verilator_dspsim-5.30.0-cp312-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 5.6 MB
- Tags: CPython 3.12+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d51f78460de1fdba0a783ece717d65d2a50f7ea66f7c0a791f6ac29b54e37633
|
|
| MD5 |
7672fe81c2a1efbbdce8ce173a03d345
|
|
| BLAKE2b-256 |
d68e9ab76f50aa839bbde30075aaf85ee8056477085b0c387d52c3fd59401f54
|
File details
Details for the file verilator_dspsim-5.30.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: verilator_dspsim-5.30.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.12+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2f634bdcc2ba207d438f9ca214764e7035905e2e653918d157088f9848d0871
|
|
| MD5 |
2e71ad377b31e160e41f59d4dab6705a
|
|
| BLAKE2b-256 |
040ac7090aa43adae5a364b080011b447b7cdf28bbafa4be947ca9fbe5fa57fb
|