Netlist Carpentry
Netlist Carpentry is a Python library that allows you to access and modify a digital circuit in an accessible way. It covers the following use cases:
- Navigate through your circuit and introduce custom checks
- Implement new algorithms that do optimizations or modifications with your circuit
- ...
It uses Yosys to get the circuit from a behavioral code and converts it into a pythonic structure along with a networkx graph. This allows for using standard graph algorithms on the circuit as well as pretty-printing facilities.
Once in Python, the structure can be examined and modified. Netlist carpentry internally tracks all the changes and lets you write out your modified circuit to Verilog. Back in verilog, the most simulation or synthesis tools can be used.
A simple example:
import netlist_carpentry
# Load your Circuit
circuit = netlist_carpentry.read("simpleAdder.v")
# Define your top module
circuit.set_top('simpleAdder')
print(f"The top module '{top_module.name}' has the following items:")
for instance_name, instance_object in top_module.instances.items():
print(f"\tInstance '{instance_name}'.")
for port_name, port_object in top_module.ports.items():
print(f"\tPort '{port_name}', which is an {port_object.direction} port and {port_object.width} bit wide!")
for wire_name, wire_object in top_module.wires.items():
print(f"\tWire '{wire_name}', which is {wire_object.width} bit wide!")
Netlist Carpentry is designed for making the access to the circuit as easy as possible. The runtime-performance was not always in focus -- so don't expect it to work as fast as a custom-knitted C++ software. If you want to propose changes, please submit an issue or even a pull request.
Installation
Install the package via...
pip install netlist-carpentry
... and have fun!
The package requires at least Python 3.9 (recommended is 3.12).
Alternatively, you can clone this repository and install the package in editable mode.
Examples
Examples on how to use Netlist Carpentry (and how it can be integrated into design workflows) can be found in docs/src/user_guide along with the documentation.
Most of them are Jupyter Notebooks, meaning they can be executed and modified to experiment with Netlist Carpentry.
They can also be viewed in the online documentation.
Development Guide
A guide on how to expand or modify the tool is also given.
Visit docs/src/dev_guide or the online development guide for more information.
Citation
If you use Netlist Carpentry in your research, please consider citing it:
Citations of individual versions are also possible using the version-specific DOIs on the Zenodo-Site. Please use the link of the DOI-badge for more information.
Acknowledgement
The DI-Meta-X project where this software has been developed is funded by the German Federal Ministry of Research, Technology and Space under the reference 16ME0976. Responsibility for the content of this publication lies with the author.
Metadata
Release files for netlist-carpentry 0.6.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 |
|---|---|---|---|---|
| netlist_carpentry-0.6.0.tar.gz | 3.2 MB | Without provenance | Details for netlist_carpentry-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netlist_carpentry-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for netlist_carpentry-0.6.0-py3-none-any.whl |
Total release size: 3.5 MB
Release files / netlist_carpentry-0.6.0.tar.gz
| Download URL | netlist_carpentry-0.6.0.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3545c67b3de931ec1a14e952dcf2e30eb0a6ba5c139d2c66d3353411f85a9b26
|
|
BLAKE2b-256 checksum How to use checksums |
e1347b71d1cd5a11556d1a924bda1488074137487599d92dd9066e6b7f253714
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / netlist_carpentry-0.6.0-py3-none-any.whl
| Download URL | netlist_carpentry-0.6.0-py3-none-any.whl |
|---|---|
| Size | 272.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1018b41b84d58eac83e51e9a1f86beafbb2c3b6e4cb56e9af343c49c5278c4b3
|
|
BLAKE2b-256 checksum How to use checksums |
704c88727f8d750c158b6af22d9188de5bc3b56f21540796dc40cd22052bc57e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for netlist-carpentry 0.6.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.