The backend of the LEAP framework
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file leap_backend-0.1.0.tar.gz.
File metadata
- Download URL: leap_backend-0.1.0.tar.gz
- Upload date:
- Size: 33.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2d178d49e0bdb70cf1c23b15363b3352a06b4a3d81f6ea04a61593fd709b531
|
|
| MD5 |
64cd7b2b4b990cd674cb736cbdd207be
|
|
| BLAKE2b-256 |
224fa14929b926035a8f0a47d0a626139a21b922dea898586f3118488c21329b
|
File details
Details for the file leap_backend-0.1.0-py3-none-any.whl.
File metadata
- Download URL: leap_backend-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f13e212754a1baae28ffce7f83df55e78255dbad6d83270afe94e130dbe050ec
|
|
| MD5 |
b12055d702e4d7ece0e974bfea9075cb
|
|
| BLAKE2b-256 |
fd8b7dfca27b48a42da078d4614eaa03ef59fdaf12b20ed99f1daec3ff5f1cb6
|