Skip to main content

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.

This project is not affiliated with Verilator.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verilator_dspsim-5.42.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

verilator_dspsim-5.42.0-cp312-abi3-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.12+Windows x86-64

verilator_dspsim-5.42.0-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file verilator_dspsim-5.42.0.tar.gz.

File metadata

  • Download URL: verilator_dspsim-5.42.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for verilator_dspsim-5.42.0.tar.gz
Algorithm Hash digest
SHA256 7b2a204fcab4aef91d81276bab94f9146fcc5a20bcdc2175699daa0576f0aff6
MD5 bec3db524381847f03b140bafdda41ac
BLAKE2b-256 4612c99ab9f33849f39d5060440708f0f423558290d342c0feabfeb399a04f02

See more details on using hashes here.

Provenance

The following attestation bundles were made for verilator_dspsim-5.42.0.tar.gz:

Publisher: build_wheels.yaml on fsodari/verilator-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file verilator_dspsim-5.42.0-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for verilator_dspsim-5.42.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8e301ea4ee25a5360aa3e14499abdc3e6a00cab75f7a7c19c92f446d6108a36b
MD5 56eb563e57f68d955dde6df739050bb6
BLAKE2b-256 8fc291d1a5d1e7423c1d35ffe68b10b9cd870e1e31ea1f3915b48178c9afefdf

See more details on using hashes here.

Provenance

The following attestation bundles were made for verilator_dspsim-5.42.0-cp312-abi3-win_amd64.whl:

Publisher: build_wheels.yaml on fsodari/verilator-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file verilator_dspsim-5.42.0-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for verilator_dspsim-5.42.0-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 812efabc2353e0b6a727122b944a2d9023ae6b6936bc1ee61fde2f2fa85302d4
MD5 f8b8bc5185c186ebbf743c60694f8ef2
BLAKE2b-256 1a45559be0891d289d87484c07271d3416cb075e44034ce773ae70abb688206c

See more details on using hashes here.

Provenance

The following attestation bundles were made for verilator_dspsim-5.42.0-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yaml on fsodari/verilator-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page