LabVIEW FPGA HDL Tools
Project description
This is a prototype set of tools for developing HDL on LabVIEW FPGA targets.
Command Line Tools
The LabVIEW FPGA HDL Tools are accessed by running nihdl commands at the command prompt
Type nihdl --help for a list of commands
Environment Setup
From the targets folder (e.g. c:/dev/git/flexrio/targets), run:
pip install -r requirements.txt
This will install the LV FPGA HDL Tools module as well as any other dependent modules using pip
Project Settings File
The tools use the projectsettings.ini file to specify file paths and other configurations. It is broken up into multiple sections.
GeneralSettings
- TargetFamily - NI device product family (e.g. FlexRIO, cRIO)
- BaseTarget - The NI product model number that is being customized (e.g. PXIe-7903)
- LabVIEWPath - The disk path where LabVIEW is installed
VivadoProjectSettings
This section is used by the create-project and launch-vivado commands
- TopLevelEntity - Top level entity (same as its HDL file name) that gets set in the Vivado project
- VivadoProjectName - The name of the Vivado project that is created (no spaces allowed)
- VivadoToolsPath - Path to where the Vivado tools are installed. You may point to the tools installed by NI LabVIEW FPGA Comile Tools or your own Vivado installation folder.
- VivadoProjectFilesLits - Text files containing relative paths of source files that will be included in the Vivado project. Specifying a directory path within the text file will recursively include all files within it.
- UseGeneratedLVWindowFiles - Boolean (True/False) to specify whether to use the window netlist and supporting files specfied in TheWindowFolder. If set to False, the Vivado project will use a default stub for TheWindow.vhd which will produce a successful (but non-functional) bitfile.
LVFPGATargetSettings
This section is used by the gen-target and install-target commands
Inputs
- LVTargetBoardIO - Path to CSV file that specifies names and datatypes of custom board IO that will appear on the generated custom LV FPGA target
- IncludeCLIPSocket - Boolean (True/False) to specify whether to include the CLIP socket on the generated custom LV FPGA target
- IncludeLVTargetBoardIO - Boolean (True/False) to specify whether to include the custom LV Target Board IO on the generated custom LV FPGA target
- LVTargetName - The LabVIEW project display name of your customized FPGA target. This is also used to create the folder that contains the custom LV FPGA target plugin.
- LVTargetGUID - Global Unique Identifer for your custom LV FPGA target plugin - generate one here https://www.guidgenerator.com/
- LVTargetInstallFolder - Folder where the custom LV FPGA target plugin is installed. For now, this must be set to "C:\Program Files\NI\LVAddons\flexrioii\1\Targets\NI\FPGA\RIO\79XXR" for the PXIe-7903. In the future we may support locations outside of NI\LVAddons
Templates
- WindowVhdlTemplate - Path to the mako template for TheWindow.vhd. This file is processed depending on the settings in the Inputs above.
- TargetXMLTemplates - List of paths to the mako templates for the target resource XML. These files are processed depending on the settings in the Inputs above.
Outputs
- WindowVhdlOutput - Stub for TheWindow.vhd used to make signal connections in the top-level HDL file and for early synthesis. This file will be overridden by TheWindow.vhd that is generated by LabVIEW FPGA during the Export Top VI workflow.
- WindowInstantiationExample - Instantiation example to help with connecting the many ports of TheWindow.vhd. This code is not intended to be a complete cut-and-paste into the top level HDL file. The LVTargetBoardIO signal port assignments will be most useful.
- LVTargetPluginFolder - Folder where the outputs of the custom target generation script are placed
- BoardIOXML - Custom board IO resource XML for the custom LV FPGA target
- ClockXML - Clock resource XML for the custom LV FPGA target
CLIPMigrationSettings
This section is used by the migrate-clip command
Inputs
- CLIPXML - Path to the CLIP's XML file
- CLIPHDLTop - Path to the CLIP's top-level HDL file
- CLIPXDCIn - Path(s) to the CLIP's XDC constraint files (this setting supports multiple paths)
- CLIPInstancePath - Instantiation path to the top-level entity of the CLIP within the design hierarchy of the FPGA's top-level entity. If entity "MyCLIP" is place directly in the FPGA's top level entity, then this setting would simply be "MyCLIP". If it is placed deeper in the FPGA hiearchy, then that path is specified here. This is used to process XDC constraint files.
Outputs
- LVTargetBoardIO - The LabVIEW interface IO of the CLIP XML becomes board IO on the generated custom LV FPGA target. This CSV file is output from the CLIP migration process and will serve as an input to the generate custom LV FPGA target process.
- CLIPInstantiationExample - Instantiation example to help with connecting the many ports of the CLIP. This code is not intended to be a complete cut-and-paste into the top level HDL file and will require some adjustments when using it.
- CLIPtoWindowSignalDefinitions - Signal definitions for all of the ports in the CLIP entity. This is used to copy/paste the signal definitions for the ports that connect between the CLIP and TheWindow.vhd. These signals will need to be defined in the top-level HDL entity.
- CLIPXDCOutFolder - The CLIP XML is processed to use the new CLIPInstancePath to set the correct entity hierarchy within the constraints. The contents of these XDC files will be merged into the target's XDC files.
LVWindowNetListSettings
This section is used by the get-netlist command
Inputs
- VivadoProjectExportFolder - Path to the Vivado Project Export created from the LabVIEW FPGA project
- VivadoProjectName - Name of the Vivado project created by Vivado Project Export << probalby cna get rid of htis and just automatically find the XPR in that folder - the file name is auto-generated by LV and not obvious
Outputs
- TheWindowFolder - The Window netlist and constraints are extracted from the Vivado Project Export and placed into this folder. The contents of this folder are pulled into the GitHub Vivado project.
Create Vivado Project
From the target folder, run:
nihdl create-project
This runs the createvivadoproject.py script to generate the Vivado project. It includes all files from VivadoProjectFilesLits in projectsettings.ini
If this is not the first time creating the Vivado project, one of these command line options are required:
-- overwrite - Overwrites the existing Vivado project and creates a new one
-- update - Only updates the files in the existing Vivado project
Migrate CLIP
In LabVIEW FPGA, the CLIP HDL is defined by an XML file that specifies its ports. The ports are grouped into three interfaces:
- LabVIEW - These ports appear in the LabVIEW project as CLIP IO
- Socket - These ports are automatically connected by LabVIEW FPGA to the ports on TheWindow.vhd that connect to the FPGA top-level fixed logic
- Fabric - These ports are automatically connected by LabVIEW FPGA to the ports on TheWindow.vhd that connect to the FPGA top-level fixed logic
When the CLIP HDL is instantiated directly in the top-level HDL file, the CLIP LabVIEW interfaces become Board IO LabVIEW interfaces. And the Socket/Fabric interfaces to the CLIP are manually connected in the top-level HDL.
To make this migration process easier, we use the CLIP migration script to process the CLIP's files and generate code that is used to instantiate the CLIP HDL directly into the top-level FPGA design.
From the target folder, run:
nihdl migrate-clip
Summary of the inputs/outputs of that script:
Generate LV Target Support
From the target folder, run:
nihdl gen-target
This runs the genlvtargetsupport.py script to create a custom LV FPGA target plugin. The output of this script is placed in the target's objects directory.
Install LV Target Support
From the target folder, run:
nihdl install-target
This runs the installlvtargetsupport.py script to install the custom LV FPGA target plugin into the LVAddons folder. This allows the LabVIEW to discover this new custom FPGA target so that you can add it to the LabVIEW project.
Get LV Window Netlist Files
To bring the netlist for the LabVIEW FPGA top-level VI into the GitHub Vivado project flow, you must first perform a Vivado Project Export of the top-level LabVIEW FPGA VI.
After you have the Vivado Project Export, go to the GitHub target folder and run:
nihdl get-netlist
This runs the getwindownetlist.py script to extract the netlist for the LV FPGA top-level VI as well as HDL packages and metadata files needed to build the FPGA bitfile using the GitHub Vivado workflow.
Files are placed into TheWindowFolder specified in projectsettings.ini
The following files are extracted from the Vivado Project Export:
- TheWindow.edf - netlist for the LV FPGA window containing your top-level VI's code
- Pkg*.vhd - various package files generated by LabVIEW FPGA
- TheWindowConstraints.xdc - constraints specific to the HDL in the window netlist that get automatically merged into the custom FPGA target's constraints file
- CodeGenerationResults.txt - metadata (e.g. NI-RIO host interface FIFOs, controls, indicators) produced by LabVIEW FPGA needed to generate the bitfile .lvbitx for download by the NI-RIO driver
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file labview_fpga_hdl_tools-0.0.14.tar.gz.
File metadata
- Download URL: labview_fpga_hdl_tools-0.0.14.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
765247fad3d94c0e0e53524312a9cfe8ba21fffcb2ec445947718d25f2a54258
|
|
| MD5 |
66787b453fed5f76807bc2677aeaf8f3
|
|
| BLAKE2b-256 |
e8b559812ca6fe544dc5946ee07650331f8777eb37fcc0478a8f83ae398b4122
|
Provenance
The following attestation bundles were made for labview_fpga_hdl_tools-0.0.14.tar.gz:
Publisher:
publish.yml on ni/labview-fpga-hdl-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labview_fpga_hdl_tools-0.0.14.tar.gz -
Subject digest:
765247fad3d94c0e0e53524312a9cfe8ba21fffcb2ec445947718d25f2a54258 - Sigstore transparency entry: 484560546
- Sigstore integration time:
-
Permalink:
ni/labview-fpga-hdl-tools@0ea1977d1a432148d8cc28d60e42c062950376c4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ni
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0ea1977d1a432148d8cc28d60e42c062950376c4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file labview_fpga_hdl_tools-0.0.14-py3-none-any.whl.
File metadata
- Download URL: labview_fpga_hdl_tools-0.0.14-py3-none-any.whl
- Upload date:
- Size: 39.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5154cb27a87502c9344b0f77fae647fe01b3289d37630eb53398443effde2eb1
|
|
| MD5 |
5ae6daa153f54aeb699164c29f8e42de
|
|
| BLAKE2b-256 |
ed851a648353bb135aca6f5d842449e2f8ca4e6f9aacb8dd4b97d934d8bfa7be
|
Provenance
The following attestation bundles were made for labview_fpga_hdl_tools-0.0.14-py3-none-any.whl:
Publisher:
publish.yml on ni/labview-fpga-hdl-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labview_fpga_hdl_tools-0.0.14-py3-none-any.whl -
Subject digest:
5154cb27a87502c9344b0f77fae647fe01b3289d37630eb53398443effde2eb1 - Sigstore transparency entry: 484560566
- Sigstore integration time:
-
Permalink:
ni/labview-fpga-hdl-tools@0ea1977d1a432148d8cc28d60e42c062950376c4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ni
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0ea1977d1a432148d8cc28d60e42c062950376c4 -
Trigger Event:
workflow_dispatch
-
Statement type: