Pre-release custom FlexRIO code for use with LabVIEW FPGA HDL Tools
- This repository contains examples of customized FlexRIO FPGA devices
- These examples use the LabVIEW FPGA HDL Tools to manage dependencies, create Vivado projects and integrate custom HDL with LabVIEW
- These examples depends on a number of other repositorires that contain FlexRIO and shared HDL source code. These dependencies are installed (cloned) by the LabVIEW FPGA HDL Tools.
- You can perform workflows for customizing LabVIEW FPGA targets with HDL
- Use HDL-only and Vivado to build a bitfile and communicate with it from the NI-RIO driver on a host PC
- Use HDL to make a custom LabVIEW FPGA target that can be extended in LabVIEW FPGA and use the standard LabVIEW FPGA bitfile generation workflow
- Use LabVIEW FPGA to make a top-level VI that is exported as a netlist and brought into your custom HDL to build in Vivado
- You can communicate between the NI-RIO driver on a host PC and custom HDL directly using
- Registers
- DMA FIFOs (future - not yet supported)
- The PXIe-7903 is currently the only FlexRIO FPGA target supported by these workflows
- All of this is pre-release and not supported by NI
- Use the Issues and Discussions sections in this repository to collaborate with the developers and other lead users
- Use the Issues and Discussions sections in this repository to collaborate with the developers and other lead users
Follow these steps to setup your machine to use the LabVIEW FPGA HDL Tools with this flexrio-custom GitHub repository
Use NI Package Manager to install the following software:
- LabVIEW 2023 (or newer)
- LabVIEW FPGA 2023 (or newer)
- LabVIEW FPGA Compilation tool for Vivado 2021.1
- FlexRIO 2025 (or newer)
Install the following 3rd party software:
- Install latest version Git – https://git-scm.com/downloads
- Install Python (version 3.11.8 officially tested) – https://www.python.org/downloads/
In a dev folder (e.g. c:\dev\github) clone the repo:
git clone https://github.com/ni/flexrio-custom
List tags for all the releases:
git tag
Checkout the repo at a specific tag/version:
git checkout tags/26.x.y
(main branch may be unstable; we recommend checking out the latest version that does not have "dev" in the name)
cd C:\dev\github\flexrio-custom\targets\pxie-7903custom
All command line operations are performed from within a target folder
pip install -r requirements.txt
This will install the correct version of the tools that the checked out version of the repository is using
nihdl --help
nihdl install-deps
This will download the dependencies specified in the dependencies.toml file found here:
C:\dev\github\flexrio-custom\dependencies.toml
That's it! Your computer is setup to use the LabVIEW FPGA HDL Tools to make custom FlexRIO FPGA devices
https://github.com/ni/labview-fpga-hdl-tools/blob/main/README.md
cd C:\dev\github\flexrio-custom\targets\pxie-7903custom
nihdl create-project
nihdl launch-vivado
In Vivado, click "Generate Bitstream" in left-hand tools menu
C:\dev\github\flexrio-custom\targets\pxie-7903custom-mycopy
Set LVTargetName to PXIe-7903custom-mycopy
Run nihdl get-guid to generate a new GUID
Copy the new GUID into the LVTargetGUID setting
Open rtl-lvfpga/SasquatchTopTemplate
Find HdlSharedCommonHostRegs_inst and set kSigniature to x"7903FEED"
nihdl create-project
nihdl launch-vivado
In Vivado, click "Generate Bitstream" in left-hand tools menu
nihdl gen-target
nihdl install-target
Use the NI-RIO API to download and run the bitfile
Make sure to use the Open Dynamic Bitfile Reference (and not the normal Open FPGA VI Reference)
Use the read/write register subVI's from the hdl-shared repo to access the FPGA's registers
C:\dev\github\flexrio-custom\deps\hdl-shared\host_interfaces\register\LabVIEW
Here is an example VI that demonstrates this:
C:\dev\github\flexrio-custom\targets\pxie-7903custom\docs\Examples\Custom_FPGA_Target_Host_Example.vi
Use the following register map for the common registers:
| Register | Offset | Access |
|---|---|---|
| kSignatureOffset | 0 | read-only |
| kVersionOffset | 4 | read-only |
| kOldestCompatibleVersionOffset` | 8 | read-only |
| kScratchOffset | 12 | read-write |
The PXIe-7903Aurora example has the socketed CLIP node instantiated in the FPGA top-level entity to make a custom LabVIEW FPGA target with it. Read the CLIP Migration Hands-On Guide that walks you through how this was done.
C:\dev\github\flexrio-custom\targets\pxie-7903aurora\docs\CLIP Migration Hands-On Guide.pdf
- Root repo folder
.github- CI workflows and repo automationdeps- checked-out GitHub dependencies installed bynihdl install-depsdocs- documentation (docs/public)targets- FPGA target projectspxie-7903custom- example custom PXIe-7903 device (consider this to be the "Hello World" example)projectsettings.ini- tool configurationrequirements.txt- target-specific Python dependency entrypointlvFpgaTarget- LabVIEW FPGA target plugin source fileslvWindowNetlist- extracted/generated LabVIEW window netlist contentrtl-lvfpga- target HDL sourcesxdc- timing constraintsVivadoProject- Vivado project filesobjects- generated outputs from HDL toolsvivadoprojectsources.txt- source list used for Vivado project generation
pxie-7903aurora- example of migrating the Aurora CLIP to make a custom Aurora PXIe-7903 device
dependencies.toml- dependency version specification fornihdl install-depsrequirements.txt- top-level Python dependencies (defines version dependency of LabVIEW FPGA HDL Tools)