PyDesignFlow
A technology- and tool-agnostic micro-framework for building FPGA / VLSI design flows in Python.
Quick Example
from pydesignflow import Block, Flow, task, Result
class SynthesisBlock(Block):
@task()
def synthesize(self, cwd):
# [Call synthesis tool here]
result = Result()
result.timing_met = True
result.netlist = cwd / "netlist.v"
return result
@task(requires={'syn': '.synthesize'})
def place_and_route(self, cwd, syn):
if not syn.timing_met:
raise RuntimeError("Synthesis timing not met, cannot proceed with P&R")
print(f"Using netlist: {syn.netlist}")
# [Call place & route tool here]
result = Result()
result.bitstream = cwd / "design.bit"
result.utilization = 0.75
return result
flow = Flow()
flow['fpga'] = SynthesisBlock()
if __name__ == '__main__':
flow.cli_main()
Save this as flow.py (or flow/__init__.py as basis for a multi-file design flow), then run targets from the command line:
flow fpga.place_and_route
Key Concepts
- Flow: Central object managing all design blocks, accessible via command line
- Block: Encapsulates a design component (hardware block, testbench, etc.). Define by subclassing
Block. - Task: Methods decorated with
@task()that perform design steps. A task of a specific block instance is called a Target. - Result: Data returned by tasks, serialized to JSON. At most one result per target.
- Dependencies: Tasks can depend on results from other tasks. Missing dependencies are built automatically.
Design Principles
- No source file tracking: Unlike Make, PyDesignFlow doesn't track source changes. The designer decides when to rebuild, avoiding unnecessary long tool runtimes while maintaining simplicity.
- Encapsulation: Each task gets its own output directory and should only write there.
- Flexibility: Blocks support parameters through instantiation. Single or multi-block hierarchical designs are supported.
Example Projects
- RISC-V Lab: An FPGA-based RISC-V design platform and flow for teaching SoC development, using PyDesignFlow to manage hardware synthesis, simulation, and software builds.
Related Tools
- NoTcl: Python library for automating Tcl-based FPGA/VLSI tools without Tcl scripting, complementing PyDesignFlow by providing Python interfaces to design tools.
Documentation
Full documentation: https://pydesignflow.readthedocs.io
License
Copyright 2022 - 2026 Tobias Kaiser
SPDX-License-Identifier: Apache-2.0
Metadata
Release files for pydesignflow 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pydesignflow-0.5.1.tar.gz | 37.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydesignflow-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.0 kB
Release files / pydesignflow-0.5.1.tar.gz
| Download URL | pydesignflow-0.5.1.tar.gz |
|---|---|
| Size | 37.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc1ec5e41d6dc74261ab6fab4e7a2bfcc2e320fdb8748543d2dae0422eed5b4c
|
|
BLAKE2b-256 checksum How to use checksums |
fb4ec12bd321593f868dcc46b012a508905ca9c18b5d707e54b6aff6d97c0ae2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / pydesignflow-0.5.1-py3-none-any.whl
| Download URL | pydesignflow-0.5.1-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
436185c7ead91a53e892cb5419edaf0d3af3c9e9f4435a43ea85388df8b9640d
|
|
BLAKE2b-256 checksum How to use checksums |
9dda6511bc2467fe268d8aceb6e5dfcb006ae72e4eee301f259b92a3f383c9f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|