sv-shell
sv-shell is a Python library and Linux CLI that reads a single Verilog/SystemVerilog file and generates an empty SystemVerilog shell that contains only the module declaration and port list (plus parameter port list, if present). Port types are forced to logic.
It uses pyslang (py-slang) AST parsing.
Install (PyPI)
python3 -m pip install ab-sv-shell
Install (Local Development)
python3 -m pip install -e .
CLI
sv-shell path/to/design.sv
sv-shell path/to/design.sv -o shell.sv
sv-shell path/to/design.sv --module my_module
Library
from sv_shell import generate_shell_from_file
shell = generate_shell_from_file("path/to/design.sv")
print(shell)
Example
Example files are included in examples/:
- Input Verilog:
examples/counter.v - Generated SystemVerilog shell:
examples/counter_shell.sv
Run the example (counter.v) from this repository root:
python3 -m venv .venv
. .venv/bin/activate
pip install -e .
sv-shell examples/counter.v -o examples/counter_shell.sv
cat examples/counter_shell.sv
Maintainer Notes
Release and PyPI publishing steps are documented in RELEASING.md.
License
Project source code is licensed under LGPL-3.0-or-later.
Generated output files do not include injected SPDX/copyright lines, so existing
copyright / licensing on your original source is applied to the generated file.
Metadata
Release files for ab-sv-shell 0.1.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 | |
|---|---|---|---|
| ab_sv_shell-0.1.0.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ab_sv_shell-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.6 kB
Release files / ab_sv_shell-0.1.0.tar.gz
| Download URL | ab_sv_shell-0.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfb4f8e82770b3381d2957cc79216c6c898338bfc606d0d93f3c23803b8ac40b
|
|
BLAKE2b-256 checksum How to use checksums |
c90e6f64a19bc9dbf9d2a336e9a05211281936bdcafe6ee3d2cb8452382bba44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 12, 2026.
Transparency logRelease files / ab_sv_shell-0.1.0-py3-none-any.whl
| Download URL | ab_sv_shell-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b73a480d5a9ce43172ae8b2797c0cdd1726424c59c2ca97f1f86ef6c60ce7169
|
|
BLAKE2b-256 checksum How to use checksums |
95a5ecd21eb8d410338eea39344bbba3a3bcb4e8de3d2469e0b2869f9d693e3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 12, 2026.
Transparency log