Python bindings for LibrEDA.
- Rust 93.9%
- Python 6.1%
| .reuse | Partial binding for netlist. | |
| LICENSES | REUSE compliance. | |
| src | upgrade to pyo3 0.26 | |
| .gitignore | REUSE compliance. | |
| Cargo.toml | upgrade to pyo3 0.26 | |
| README.md | Update install instructions. | |
| test.py | fix method name and spelling | |
libreda-python
Work-in-progress
Python binding for libreda-db.
Install
Create a Python virtual environment:
python -m venv myPythonEnv
source myPythonEnv/bin/activate
# Install maturin (build tool for Rust-based Python packages)
pip install maturin
Download and install libreda-python:
# LibrEDA consists of many Rust libraries. The workspace bundles them together.
git clone --recursive https://codeberg.org/LibrEDA/libreda-rs-workspace libreda
cd libreda/libreda-python
# Install in development mode.
maturin develop
Run a Python shell and import libreda:
python
import libreda as db
chip = db.Chip()
my_cell = chip.create_cell("A")
# Write verilog.
writer = db.io.VerilogWriter()
writer.write_netlist(chip, "output.v")
# Read verilog.
reader = db.io.VerilogReader()
netlist = reader.read_netlist("output.v")