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.30.5.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

verilator_dspsim-5.30.5-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: verilator_dspsim-5.30.5.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for verilator_dspsim-5.30.5.tar.gz
Algorithm Hash digest
SHA256 78a3e24c87ce34641332d65c003fbe639dfb6bf518c52430dffc1cd730c75d97
MD5 4e2067b66ef9eade29ad4ded9d7a0070
BLAKE2b-256 8d6947931f402f8ce43e6c0c062eb66563ece580d75339e9e6f56bfd58c4bb9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for verilator_dspsim-5.30.5.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.30.5-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for verilator_dspsim-5.30.5-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85d81979a027a377364e779c72965112400a96ea26eb40fc12e152348d1fade6
MD5 251d4e647f1bf3302df14a41679c6374
BLAKE2b-256 814495efb11a8402db28c9d4219275ddc7e95fcb9d1148517731976e9943a166

See more details on using hashes here.

Provenance

The following attestation bundles were made for verilator_dspsim-5.30.5-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_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