Skip to main content

PyDesignFlow

A technology- and tool-agnostic micro-framework for building FPGA / VLSI design flows in Python.

License ORDeC on PyPI Read the Docs

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.
  • 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.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydesignflow 0.6.0
File Size Uploaded Provenance Actions
pydesignflow-0.6.0.tar.gz 39.9 kB Without provenance Details for pydesignflow-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pydesignflow 0.6.0
File Interpreter ABI Platform Actions
pydesignflow-0.6.0-py3-none-any.whl Python 3 none any Details for pydesignflow-0.6.0-py3-none-any.whl

Total release size: 68.0 kB

Release files / pydesignflow-0.6.0.tar.gz

Download URL pydesignflow-0.6.0.tar.gz
Size 39.9 kB
Tags Source
SHA-256 checksum
How to use checksums
93cb1c118d9b9a1e55ab20717fc3a6455f8f51e42eb8d29da4b70b86cb697997
BLAKE2b-256 checksum
How to use checksums
63125b7d13f9ba0bf60ddbd6d9d23501479c184b5c332818bae67a58e953a6f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / pydesignflow-0.6.0-py3-none-any.whl

Download URL pydesignflow-0.6.0-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e797c70b005a40f61774958b635e705aee37fa052fb6dc66cab0920eeb0e1b52
BLAKE2b-256 checksum
How to use checksums
8633cbaed1de8413b2e938a334e5ba3360d9c28884d0de83f0fdb4e4753864e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for pydesignflow 0.6.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page