ThermalBits is a Python library for inspecting combinational digital circuits from Verilog netlists, transforming them as editable DAGs, and estimating their information loss through Shannon entropy.
It helps compare original and optimized circuit structures by parsing Verilog, exporting JSON or reconstructed Verilog, rendering DAG images, applying transformations, and computing Landauer-related entropy with a bundled Rust simulator.
The main advantages are a compact Python API, direct access to the internal pi, po, and node representation, reproducible optimization flows, visual inspection support, and batch CSV reporting for experiments across many netlists.
Install the Python dependencies from the repository root:
python -m pip install -r requirements.txtFor development dependencies:
python -m pip install -r requirements-dev.txtThe entropy simulator is a Rust binary bundled under thermalbits/iron_circuit_sim/. Build it once before calling update_entropy():
cd thermalbits/iron_circuit_sim
RUSTFLAGS="-C target-cpu=native" cargo build --releaseTo build package artifacts:
python -m buildArtifacts will be created in dist/.
The complete documentation is in documentation/docs.
Start with:
To serve the documentation locally:
python -m pip install -r documentation/requirements-docs.txt
mkdocs serve -f documentation/mkdocs.yml