Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

LabVIEW FPGA HDL Tools

Command-line tools (nihdl) for building customized FPGA designs for use with the ni/flexrio repository. They move, generate, and process the files needed to take a top-level HDL design to a LabVIEW FPGA bitfile through either of two compile flows (see below).

Customizing a FlexRIO board? Start at flexrio-custom, not here. That repo is the front door — supported devices, machine setup, and the step-by-step exercises. This page is the tool reference for the nihdl toolchain (commands, settings, and the concepts behind them); use it to look things up while following the flexrio-custom workflows.

The two compile flows

nihdl supports two ways to turn a top-level HDL design into a LabVIEW FPGA bitfile. Both start by extending the board's open-source top-level HDL, and both run Vivado in the end — they differ in what compiles the bitfile:

  • Vivado compile flow — extend the design in HDL and compile the bitfile directly in Vivado (gen-vivado → compile-vivado). The host talks to your logic over registers and DMA FIFOs via the NI-RIO driver — no LabVIEW required.
  • LabVIEW FPGA compile flow — package your HDL as a custom LabVIEW FPGA target (gen-target → install-target), then write a VI and let LabVIEW FPGA compile the bitfile (it runs Vivado under the hood).

Host-side note: to communicate with the compiled .lvbitx from a LabVIEW FPGA host VI, open it with Open Dynamic Bitfile Reference (wire in the bitfile path and a matching FPGA Interface Dynamic Refnum) — the standard Open FPGA VI Reference node does not work with these custom targets. See Vivado Compile Flow → Opening the bitfile from a LabVIEW FPGA host VI.

In short: in the Vivado flow you drive Vivado; in the LabVIEW FPGA flow LabVIEW FPGA drives Vivado for you. See Theory of Operation for the full story.

Documentation

Doc What's in it
Theory of Operation The architecture, the supported workflows, and how the pieces fit together. Start here.
Vivado Compile Flow End-to-end walkthrough: extend the HDL, generate a Vivado project, and compile a .lvbitx directly in Vivado.
LabVIEW FPGA Target and Compile Flow End-to-end walkthrough: build and install a custom LabVIEW FPGA target, then compile in LabVIEW FPGA.
ModelSim Simulation Flow End-to-end walkthrough: build the Xilinx sim libraries, create the ModelSim project, and run a testbench.
Command Reference Every nihdl command, its options, the command flow, and per-command required settings.
Settings Reference The nihdlsettings.py model: hooks, context, --set overrides, and the full list of setters.
LVTargetCustomIO Reference The custom I/O CSV format used to define HDL ↔ LabVIEW FPGA signals.
Generated VHDL What VHDL the tools generate (window wrappers, PkgNiHdlSettings) and why — single-sourcing the facts shared by the HDL and the LabVIEW FPGA target.
Window Netlist and Constraints How the LabVIEW Window netlist is produced/consumed and how XDC constraints are processed for each compile flow (including the current_instance scoping rules).

Prerequisites

External tools

You need the external tools your flow uses:

  • Vivado — for gen-vivado, check-vivado, and compile-vivado (use the version your FlexRIO release targets).
  • LabVIEW + LabVIEW FPGA and the LabVIEW FPGA Compilation Tool for Vivado — for gen-lvbitx and custom LabVIEW FPGA targets.
  • ModelSim — only for simulation (gen-modelsim, sim-modelsim, launch-modelsim, compile-modelsim-lib). compile-modelsim-lib also needs Vivado to compile the Xilinx simulation libraries.
  • Git and Python — the tools support Python 3.10–3.14; CI tests on 3.10 through 3.14 (3.11 is also used for static analysis).

Installing the tools

nihdl is published to PyPI and is normally installed into a per-target Python virtual environment by the host repository's setup script. From a target folder that contains nihdlsettings.py (for example, c:/dev/github/flexrio-custom/targets/pxie-7903custom), run:

nisetup

This creates and activates a virtual environment and installs the version of labview-fpga-hdl-tools pinned in the repository's dependencies.toml. Re-run nisetup in every new terminal — the environment is only active for the current session, and you'll see the environment name (for example, (flexrio-custom)) in your prompt when it is active.

To install the package directly instead (for example, outside a flexrio-custom checkout):

pip install labview-fpga-hdl-tools

Required Files

Every target folder must contain a nihdlsettings.py file. It configures all paths, tool locations, and project settings via setter calls, and defines hook functions that run before/after each command. The CLI exits with an error if it is not found.

A complete starter template lives at labview_fpga_hdl_tools/nihdlsettings_default.py — copy it into your target folder as nihdlsettings.py and customize it. See the Settings Reference for details.

All nihdl commands are run from the target folder unless noted otherwise:

nihdl --help

By default nihdl prints results inline and collects any warnings and errors into a single summary at the end. Add -v (--verbose) to any command for full step-by-step status with warnings and errors also shown inline; the end summary still appears, so verbose is additive to the default. See the Command Reference for details.

Quickstart: the Vivado compile flow (tool-only)

Using flexrio-custom? Follow its Getting Started exercises instead — they are the canonical command sequence for that repo. This quickstart is for driving nihdl standalone (installed via pip, outside a flexrio-custom checkout).

Run these from your target folder (the one with nihdlsettings.py), with the Python environment active (run nisetup once per terminal — see Prerequisites):

# 1. Pull in GitHub dependencies declared in dependencies.toml
nihdl install-deps

# 2. Create the Vivado project from your settings + HDL file lists
#    (this also runs gen-hdl and gen-xdc automatically)
nihdl gen-vivado --overwrite

# 3. Fast RTL elaboration check before a full compile
nihdl check-vivado

# 4. Full compile to a bitstream and LabVIEW FPGA bitfile
#    (this runs gen-lvbitx automatically at the end)
nihdl compile-vivado

Open the project interactively at any point with nihdl launch-vivado.

Full walkthrough: Vivado Compile Flow.

The LabVIEW FPGA compile flow (custom target)

To expose your HDL to LabVIEW FPGA as a custom target, define your I/O in the custom I/O CSV, then:

# Generate target support files (BoardIO/Clock XML, Window VHDL, plugin content)
nihdl gen-target

# Close ALL LabVIEW instances, then install the generated plugin into your LabVIEW FPGA install
nihdl install-target

Close LabVIEW around install-target. Close all LabVIEW instances before running it, and (re)start LabVIEW afterward — LabVIEW only scans for target plugins at startup.

Full walkthrough: LabVIEW FPGA Target and Compile Flow.

Simulating with ModelSim

# Create the ModelSim project and compile all VHDL, then run the testbench
nihdl gen-modelsim --overwrite
nihdl sim-modelsim        # or: nihdl launch-modelsim  (GUI; --batch for headless)

Full walkthrough: ModelSim Simulation Flow — including the Xilinx simulation libraries and how the pass/fail verdict works.

For the complete command list, options, and required settings, see the Command Reference.

Validating Without External Tools

To exercise settings and file generation without launching Vivado or ModelSim, set skip flags in your nihdlsettings.py:

def pre_all(context):
    config = context.config
    # ... configure settings ...
    config.set_skip_vivado(True)
    config.set_skip_modelsim(True)

Troubleshooting / FAQ

Error: Settings file not found: ...nihdlsettings.py Run the command from the target folder that contains nihdlsettings.py, or pass --config path/to/nihdlsettings.py.

A command reports a missing required setting. Each command validates the settings it needs before running. Check the Per-Command Setting Requirements table and confirm the corresponding setter is called in pre_all(). Remember that relative paths resolve from the nihdlsettings.py file's directory.

A relative path isn't resolving the way I expect. All hooks run with the working directory set to the nihdlsettings.py file's directory, and path setters resolve relative paths from there. Use forward slashes (/) on every platform.

launch-vivado / check-vivado / compile-vivado can't find the project. Run nihdl gen-vivado --overwrite first; these commands require an existing .xpr.

gen-lvbitx warns it isn't in the right place. It is intended to run from VivadoProject/<project>.runs/impl_1. It also needs to locate createBitfile.exe; it auto-discovers the latest installed LabVIEW (2023–2030), or set set_labview_path(...) to point at a specific install.

A dependency file collides by name with a target-specific copy. Use add_exclude_hdl_file_list(...) to drop the unwanted copy from the assembled HDL file list.

Metadata

Release files for labview-fpga-hdl-tools 2.0.0.dev12

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

Source distribution (sdist)

Source distribution for labview-fpga-hdl-tools 2.0.0.dev12
File Size Uploaded
labview_fpga_hdl_tools-2.0.0.dev12.tar.gz 91.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for labview-fpga-hdl-tools 2.0.0.dev12
File Interpreter ABI Platform
labview_fpga_hdl_tools-2.0.0.dev12-py3-none-any.whl Python 3 none any Details

Total release size: 196.9 kB

Release files / labview_fpga_hdl_tools-2.0.0.dev12.tar.gz

Download URL labview_fpga_hdl_tools-2.0.0.dev12.tar.gz
Size 91.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1b84fb9dfcee0f449adfffdb264fddab8884264f242e0a70debb86a09328f59e
BLAKE2b-256 checksum
How to use checksums
db004d1035e1f191c826c91c5011af432b330067474a8cbf447121845eeddaea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Oct 2, 2026.

Transparency log

Release files / labview_fpga_hdl_tools-2.0.0.dev12-py3-none-any.whl

Download URL labview_fpga_hdl_tools-2.0.0.dev12-py3-none-any.whl
Size 105.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a25d502bd3ed1201fdbdf48503eed2fb1d1d083eb1c76e91ebb56ff06cc8ec1
BLAKE2b-256 checksum
How to use checksums
864b1f4ef38bc24cf685ad2f263883ed344aff96be907826fbb4b9125b24bbc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

2.0.0

2 release files

This release

2.0.0.dev12 This release

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.11

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.18

2 release files

0.0.17

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