Generate empty SystemVerilog shells with all signal types forced to logic
Project description
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.
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 Distribution
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 ab_sv_shell-0.1.0.tar.gz.
File metadata
- Download URL: ab_sv_shell-0.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfb4f8e82770b3381d2957cc79216c6c898338bfc606d0d93f3c23803b8ac40b
|
|
| MD5 |
19d3434703fc6505be6e0510a2250f97
|
|
| BLAKE2b-256 |
c90e6f64a19bc9dbf9d2a336e9a05211281936bdcafe6ee3d2cb8452382bba44
|
Provenance
The following attestation bundles were made for ab_sv_shell-0.1.0.tar.gz:
Publisher:
publish.yml on Topi-ab/sv-shell
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ab_sv_shell-0.1.0.tar.gz -
Subject digest:
dfb4f8e82770b3381d2957cc79216c6c898338bfc606d0d93f3c23803b8ac40b - Sigstore transparency entry: 1089987435
- Sigstore integration time:
-
Permalink:
Topi-ab/sv-shell@8032a6ff1b6a1e2089d31cfd30571fd88a694b04 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Topi-ab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8032a6ff1b6a1e2089d31cfd30571fd88a694b04 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ab_sv_shell-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ab_sv_shell-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b73a480d5a9ce43172ae8b2797c0cdd1726424c59c2ca97f1f86ef6c60ce7169
|
|
| MD5 |
260903ad9bff582bc559d33731260dd3
|
|
| BLAKE2b-256 |
95a5ecd21eb8d410338eea39344bbba3a3bcb4e8de3d2469e0b2869f9d693e3f
|
Provenance
The following attestation bundles were made for ab_sv_shell-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Topi-ab/sv-shell
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ab_sv_shell-0.1.0-py3-none-any.whl -
Subject digest:
b73a480d5a9ce43172ae8b2797c0cdd1726424c59c2ca97f1f86ef6c60ce7169 - Sigstore transparency entry: 1089987438
- Sigstore integration time:
-
Permalink:
Topi-ab/sv-shell@8032a6ff1b6a1e2089d31cfd30571fd88a694b04 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Topi-ab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8032a6ff1b6a1e2089d31cfd30571fd88a694b04 -
Trigger Event:
workflow_dispatch
-
Statement type: