LEAP-Backend
This is the backend for the LEAP project. It contains the folloinwg necessary algorithms to process the subject graph.
- blif handles the read/write of BLIF files and provides interface to manipulate the logic network.
- cute is a packge for cut enumeration.
- map is the LUT mapping algorithm with Boolean simulation.
- milp contains several MILP models for timing regulation whose optimization is powered by Gurobi.
Installation
-
(recommended) Download backend as a submodule of the main project.
-
Install and use it elsewhere.
pip install -e .
Getting Started
The example can be executed using python examples/mapbuf.py. This example:
- Takes the BLIF file
examples/add2/add2.blifas input (synthesized fromexamples/add2/add2.v). - Reads the schedulability constraints from
examples/add2/add2.json. - Maps the logic network to a LUT-based FPGA with
maxLeaves=3andclockPeriod=1ns(1 LUT level is0.7ns). - Writes the optimized BLIF file to
examples/add2/add2_opt.blif.
if __name__ == "__main__":
from backend import *
input_file = "examples/add2/add2.blif"
input_sched_constr = "examples/add2/add2.json"
output_file = "examples/add2/add2_opt.blif"
graph = read_blif(input_file)
model = MapBufModel(graph, json.load(open(input_sched_constr)), 1, {"maxLeaves": 3})
model.solve()
model.dumpGraph(output_file)
import subprocess
# CEC check works if no buffer is inserted
# subprocess.run(f"abc -c 'cec {input_file} {output_file}'", shell=True)
subprocess.run(f"abc -c 'read {output_file}; print_stats'", shell=True)
An advanced example can be found in examples/mem. Where:
- The DIP specifies
mem_addrandmem_rd_enhas the same label. - The CIP specifies the
mem_dataarrives at least 1 cycle aftermem_addrandmem_rd_en.
Metadata
Release files for leap-backend 0.1.0
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 | Actions |
|---|---|---|---|---|
| leap_backend-0.1.0.tar.gz | 33.3 kB | Without provenance | Details for leap_backend-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| leap_backend-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for leap_backend-0.1.0-py3-none-any.whl |
Total release size: 59.5 kB
Release files / leap_backend-0.1.0.tar.gz
| Download URL | leap_backend-0.1.0.tar.gz |
|---|---|
| Size | 33.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2d178d49e0bdb70cf1c23b15363b3352a06b4a3d81f6ea04a61593fd709b531
|
|
BLAKE2b-256 checksum How to use checksums |
224fa14929b926035a8f0a47d0a626139a21b922dea898586f3118488c21329b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / leap_backend-0.1.0-py3-none-any.whl
| Download URL | leap_backend-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f13e212754a1baae28ffce7f83df55e78255dbad6d83270afe94e130dbe050ec
|
|
BLAKE2b-256 checksum How to use checksums |
fd8b7dfca27b48a42da078d4614eaa03ef59fdaf12b20ed99f1daec3ff5f1cb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for leap-backend 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.