rpkbin — IC Design & Verification Utilities
rpkbin is a Python toolkit for IC design and verification workflows: bit/register mapping, bit-true fixed-point simulation, spreadsheet extraction, control-flow modeling, compiler-backend experiments, and observable batch execution.
Why rpkbin?
The package keeps small, hardware-oriented utilities composable instead of forcing a single end-to-end framework. Each module exposes a focused Python API, while Wave adds a CLI and live/headless controls for longer-running jobs.
Quick start
The shortest path from a clean checkout to a working result is the Wave smoke flow.
-
Install Python 3.11+ and the Wave extra.
python -m pip install -e ".[wave]"
-
Generate a starter wave file with a parser example.
rpk-wave init hello --profile parser
Expected output:
[Wave] Created hello.wave.py Edit the file, then run: rpk-wave run hello.wave.py -
Run it in headless mode and print the lightweight performance summary.
rpk-wave run hello.wave.py --no-tui --perf
A successful run includes:
[Wave][perf] summary [Wave][perf] total lines=2 parser=2 ...
The timing fields vary by machine; the process exits with code
0when the batch succeeds.
Installation and feature extras
The core install provides the package, NumPy, and Click. Optional functionality is installed with extras:
| Extra | Enables | Main dependency |
|---|---|---|
wave |
Wave CLI, TUI, parsers, hooks, PTY jobs | Textual, prompt-toolkit, Rich |
excel |
Excel Extractor | openpyxl, xlrd, rapidfuzz |
cfg / dot |
NetworkX analysis / CFG.export_dot() |
networkx / pydot |
jax |
NumBV JAX backend | JAX |
python -m pip install -e "." # core
python -m pip install -e ".[excel]" # Excel Extractor
python -m pip install -e ".[all]" # all listed extras except jax
python -m pip install -e ".[all,jax]" # everything, including JAX
The package requires Python >=3.11. The authoritative dependency and entry-point definitions are in pyproject.toml.
Common usage
Bit-true fixed-point arithmetic
from rpkbin.numbv import Format, scalar
fmt = Format(8, 4)
a = scalar(1.25, fmt=fmt)
b = scalar(0.5, fmt=fmt)
print((a + b).val)
1.75
Use the function-level API (add, mul, sum, dot, mac) when each pipeline stage needs an explicit output format. See NumBV.
Concurrent Python and shell jobs
from rpkbin.job_manager import JobManager, FuncJob
job = FuncJob("hello", lambda: "ok")
with JobManager(max_workers=1) as manager:
manager.add(job)
manager.wait()
print(job.status, job.result)
done ok
Use Wave when the same jobs need parsers, hooks, PTY support, logs, or an interactive TUI.
Module guide
| Status | Module | Use it for |
|---|---|---|
| Stable | MapBV, NumBV, StageTracker, Job Manager, Wave | Register/bit views, fixed-point simulation, stage reporting, concurrent jobs, and observable workflows |
| Beta | CFG, Excel Extractor | Low-level flow/layout analysis and template-based Excel extraction |
| Experimental | Codegen, Debug & DAP | Compiler-backend experiments and target-neutral debugger/DAP integration contracts |
Each module has a short English/Traditional Chinese entry point under docs/; the longer *.md pages are the detailed references.
Architecture
At the top level, callers choose a focused module. Wave is layered on Job Manager; Codegen is a target-neutral HIR-to-pseudo-ASM backend and does not parse a DSL or encode a real MCU instruction set.
Python / Excel / HIR input
│
├─ MapBV · NumBV · Excel Extractor · CFG · StageTracker
│
├─ Wave CLI/TUI ──> Job Manager ──> local commands / Python callables
│
└─ Codegen: HIR ─> validate ─> LIR ─> rewrite ─> allocate ─> Target ─> pseudo ASM
See architecture.md for responsibilities, session boundaries, invariants, and trade-offs.
Reference
| Need | Start here |
|---|---|
| Wave commands, options, and exit codes | CLI reference |
| Codegen HIR/LIR constructs and pipeline errors | Syntax reference |
| Module-specific API and examples | The relevant page under docs/ |
Known limitations and troubleshooting
- Installing
rpkbinwithout an extra does not install Wave, Excel, NetworkX, pydot, or JAX. Install the extra for the module you use. - NumBV selects its process-global backend before creating
NumBVobjects; JAX is optional and is not included by.[all]. - Codegen is experimental. It intentionally excludes DSL parsing, real MCU ISAs, assemblers, linkers, binary encoding, production spilling, and a one-call module-to-ASM pipeline. Check status.md before depending on it.
- Debug & DAP is experimental. Targets retain execution semantics, source mapping, breakpoint-condition evaluation, register schemas, and memory serialization;
rpkbin.debugonly supplies the integration contract and stdio DAP lifecycle. - Wave defaults to the full-screen TUI in an interactive terminal. Use
--no-tuiin CI or when only batch completion is required; install thewaveextra first. - If a Wave job fails, inspect its status and logs in the TUI/headless controls; the CLI returns a non-zero status when the batch is unsuccessful.
Contributing
rpkbin is published as an MIT-licensed public package. For bugs, proposals, or pull requests, use the GitHub repository. See CONTRIBUTING.md for local development and documentation checks.
License
The package is released under the MIT License.
Testing
From the repository root:
python -m pytest tests/ -v
Metadata
Release files for rpkbin 0.1.16
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 | |
|---|---|---|---|---|
| rpkbin-0.1.16.tar.gz | 257.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rpkbin-0.1.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 541.4 kB
Release files / rpkbin-0.1.16.tar.gz
| Download URL | rpkbin-0.1.16.tar.gz |
|---|---|
| Size | 257.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11e65e225232d8009070d82ffc824539cf7cf6c115e7131ff680a6538518267d
|
|
BLAKE2b-256 checksum How to use checksums |
7ae9ee4c5862e62182d4c51dcd7c1f015f865df9c5c3aebf6e26e3ee42bebd83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 20, 2026.
Transparency logRelease files / rpkbin-0.1.16-py3-none-any.whl
| Download URL | rpkbin-0.1.16-py3-none-any.whl |
|---|---|
| Size | 283.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1ae500aaaff136f66da5895ea2612b2965a3c8e633587aa076ce6baec55e1f7
|
|
BLAKE2b-256 checksum How to use checksums |
da4c36078fc87978f55af576f6aeb0ba734fc64d5ef2ca3a3c481029a3a04744
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 20, 2026.
Transparency logSecurity for rpkbin 0.1.16
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for rpkbin-0.1.16.tar.gz
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 Aug 20, 2026.
Transparency logA 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.