Skip to main content

lfpga

A package manager for FPGA/HDL development. Resolve, fetch and assemble open IP cores from the LibFPGA registry into a source list your simulator or synthesis tool can consume.

The registry is the pypi.org of FPGA IP: curated, ownership-claimed, and toolchain-verified. lfpga is the pip, and its superpower is that every package can carry an earned verification badge (lints clean, synthesizes, testbench passes).

$ lfpga init my-soc
$ lfpga add libfpga
Found libfpga: https://github.com/libfpga/libfpga
  license MIT · verilog · ✓ lint, synth, testbench, formal
$ lfpga add picorv32
$ lfpga install
  libfpga        a4ef4a3fa4ac  1 files  ✓ lint, synth, testbench, formal
  picorv32       e9c4c5b8...   1 files  unverified

Wrote lfpga.lock and build/sources.f (2 source files).

Then point your tool at the generated filelist:

$ verilator --lint-only -f build/sources.f
$ iverilog -o sim.vvp -f build/sources.f
# Vivado: read_verilog -f build/sources.f (via -f)

Why a package manager for FPGA is different

FPGA IP is source, not binaries: there is no ABI and no linking, so lfpga vendors declared HDL files and hands them to the tool of your choice. It does not replace your simulator or synthesizer; it produces the inputs they expect. See the design notes for the full rationale (name collisions, fuzzy versioning, filesets, vendor primitives).

Install

pip install lfpga        # Python 3.11+

Commands

Command What it does
lfpga init [name] Create a libfpga.yaml here
lfpga search <text> Search the registry for cores
lfpga info <name> Show a core's registry metadata
lfpga add <pkg> Add a dependency (name, name@rev, or a git URL)
lfpga install Resolve, pin (lfpga.lock), fetch, and write build/sources.f
lfpga list Show the locked dependencies and their badges
lfpga sources [--format vivado|quartus|verilator] Emit a source list, or a Vivado/Quartus build script
lfpga sim [--tool iverilog|verilator] Run a simulation (deps + your testbench)
lfpga synth [--top M] Synthesize with Yosys and report area
lfpga import <.core|Bender.yml> Import a FuseSoC or Bender project
lfpga publish [repo] List your core in the registry and queue verification

Publish your core

If you maintain an open FPGA core, one command lists it in the LibFPGA registry and queues it for the verification toolchain (Verilator lint, Yosys synth, an Icarus testbench):

$ lfpga publish
Publishing https://github.com/you/your-core to the LibFPGA registry...
✓ Listed as 'your-core'  →  https://libfpga.com/cores/your-core
  Queued for verification: lint, synth, testbench.
  Claim it to prove ownership: https://libfpga.com/cores/your-core/claim

Add the badge to your README:
  [![lfpga](https://libfpga.com/cores/your-core/badge.svg)](https://libfpga.com/cores/your-core)

It reads the libfpga.yaml committed on your default branch, so make sure it is pushed. Badges are always earned by the toolchain, never self-declared.

Keep it fresh in CI

Drop this into .github/workflows/lfpga.yml and every push re-lists your core and refreshes its badge (no secrets needed):

name: LibFPGA
on:
  push:
    branches: [main]
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: libfpga/lfpga@v0.5.0

Private cores (Pro)

Keep your own IP in a private registry: add a private core at libfpga.com/account (Pro), then set an API token so lfpga can resolve and install it. Private cores never appear in the public registry, search or sitemap.

export LFPGA_TOKEN=lfpga_...      # a Pro API token from libfpga.com/account
lfpga add my-axi-dma             # resolves your private core
lfpga install

The token is sent as Authorization: Bearer and only unlocks cores you own.

The manifest (libfpga.yaml)

One file, like Cargo.toml: it both declares your dependencies and (if you publish) describes this repo as a package for the registry.

name: my-soc
dependencies:
  libfpga: "*"                       # latest default branch
  picorv32: { rev: v1.0.3 }          # pin a tag, branch or commit
  libfpga-myhdl: { modules: [lfpga_mac] }   # sub-select from a repo
  private-mac: { git: "https://github.com/acme/mac.git" }

The lockfile (lfpga.lock)

Commit it. Because HDL builds are source-and-elaborate, reproducibility is lockfile-first: it pins the exact commit and the exact build sources, so a build is identical across machines and over time.

Status

Actively developed. Resolution is transitive: each package's own libfpga.yaml dependencies are pulled in, de-duplicated across the graph, and checked for version conflicts (cycle-safe). Plus lfpga search / lfpga info for discovery and lfpga publish to list your own core. It also generates Vivado and Quartus build scripts from the resolved graph (lfpga sources --format vivado|quartus). On the roadmap: invoking the vendor tools directly.

MIT licensed. Part of LibFPGA.

Metadata

Release files for lfpga 0.8.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 lfpga 0.8.0
File Size Uploaded
lfpga-0.8.0.tar.gz 27.1 kB Details

Built distribution (wheel)

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

Total release size: 52.7 kB

Release files / lfpga-0.8.0.tar.gz

Download URL lfpga-0.8.0.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7ec211741c2fb59730bf5bc15f3eb2bd6516879fdd00d05b4011378fbf9f59d4
BLAKE2b-256 checksum
How to use checksums
4b961f4fd94255be22a72e9712c355c9f4fac4f3d82ce38276fb006d0bd2fb74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

Release files / lfpga-0.8.0-py3-none-any.whl

Download URL lfpga-0.8.0-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca92a4894e04761f1189388cb06639e3e24f9ab82ba8e8f2917d0f4ffacee020
BLAKE2b-256 checksum
How to use checksums
500977af9896d30ff403c75393524967788d7e943605040c304db42eede9d942
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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