Skip to main content

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

CLIP in LV FPGA

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.

CLIP in Top Level

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:

Migrate CLIP Files

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labview_fpga_hdl_tools-0.0.15.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labview_fpga_hdl_tools-0.0.15-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file labview_fpga_hdl_tools-0.0.15.tar.gz.

File metadata

  • Download URL: labview_fpga_hdl_tools-0.0.15.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

Hashes for labview_fpga_hdl_tools-0.0.15.tar.gz
Algorithm Hash digest
SHA256 9a4aef4bb2ddb03f44a54cebff1d713718cc1fdd44239b60d549bb0278ffed0f
MD5 eebb7c3e6dd4c7d939b71e0d6126cced
BLAKE2b-256 0d0890ef10abe37a67f294b4b20b4bd85c8737c28c1e89325947cf43017056ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for labview_fpga_hdl_tools-0.0.15.tar.gz:

Publisher: publish.yml on ni/labview-fpga-hdl-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file labview_fpga_hdl_tools-0.0.15-py3-none-any.whl.

File metadata

File hashes

Hashes for labview_fpga_hdl_tools-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 629ce15e0b513d72a1b1d9e55691d2847eae0784c80bbfca1a95240a130bef03
MD5 9f219e5267f82c87f02a7caf3a086bff
BLAKE2b-256 c6fcdb5cb0a89da83b7066fe968b3e3db2ce9da50c1a063eee08138b9c6e0b7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for labview_fpga_hdl_tools-0.0.15-py3-none-any.whl:

Publisher: publish.yml on ni/labview-fpga-hdl-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page