mirror of
https://codeberg.org/LibrEDA/libreda-python
synced 2026-05-29 00:21:40 +08:00
main
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")
Description
Languages
Rust
93.9%
Python
6.1%