Using Xilinx ISE Design Suite to Prepare Verilog Modules for Integration Into LabVIEW FPGA

Publish Date: Oct 08, 2018 | 6 Ratings | 2.00 out of 5 | Print | 2 Customer Reviews | Submit your review

Overview

Two of the most commonly used hardware description languages are VHDL and Verilog. LabVIEW FPGA natively supports integration of IP written in VHDL. However, it is not possible to natively integrate IP written in Verilog. This tutorial shows how to use the Xilinx ISE Design Suite to prepare an existing Verilog module for integration into LabVIEW FPGA through one of the following methods:

  • Component-Level IP (CLIP) - executes in parallel, independent of VI dataflow
  • IP Integration Node (IPIN) - executes as defined by VI dataflow
Note: If you use the Xilinx Vivado Design Suite, refer to Using Xilinx Vivado Design Suite to Prepare Verilog Modules for Integration Into LabVIEW FPGA.

Table of Contents

  1. Required Software and Files
  2. Verilog Module
  3. Integration Options
  4. Setting Up an ISE Project
  5. Adding a Top Level Source
  6. Synthesizing the Design
  7. Creating the VHDL Simulation Model
  8. Creating a VHDL Wrapper
  9. Integrating the IP into LabVIEW

1. Required Software and Files

To complete this tutorial, you must have the following software installed:

  • LabVIEW Development Environment
  • LabVIEW FPGA Module
  • LabVIEW FPGA Module Xilinx Compilation Tool for ISE
  • A licensed copy of Xilinx ISE Design Suite (for HDL development)

You must download and extract the attached zip folder which will be the working directory for the tutorial. The folder contains all the HDL files that will be used throughout the tutorial and a completed LabVIEW FPGA project with IP integrated through both CLIP and IPIN.

Back to Top

2. Verilog Module

For the purpose of this tutorial, a simple Verilog module has been provided as a starting point. The file can be found in the attached files at the following location: 
..\verilog_integration_tut\Adder.v.

Adder.v instantiates a clock driven, 8-bit adder with an asynchronous reset and clock enable. The following table shows the port definition for the component.

 

Port Direction Description
clk in Input clock that drives component
clkEn in Enable signal for clock-gating
aReset in Asynchronous reset
dataInA (7:0) in 8-bit input data port A
dataInB (7:0) in 8-bit input data port B
dataOut (7:0) out 8-bit output data port

 

Back to Top

3. Integration Options

To integrate external or third-party IP into LabVIEW FPGA you can use Component-Level IP (CLIP) or the IP Integration Node (IPIN). While both allow the integration of code external to LabVIEW, these options have different use cases and limitations. NI recommends that you refer to the LabVIEW Help for the different design requirements before integrating any external IP.

One difference that is relevant to this tutorial is that the top-level synthesis file for CLIP must be a VHDL file while IPIN can use netlists as the top-level synthesis file. This means the generating a VHDL wrapper is required for CLIP but optional for IPIN. However, IPIN might require a VHDL wrapper in specific scenarios. For example, when a top-level port type of the Verilog module is not supported in LabVIEW.

 

Back to Top

4. Setting Up an ISE Project

To prepare a Verilog module for integration into LabVIEW FPGA, you must first create a project and configure it properly in the Xilinx ISE Design Suite. 

  1. Open Xilinx ISE Design Suite from Start » All Programs » Xilinx ISE.
  2. Click File » New Project and configure the Create New Project page as shown below.



  1. Click Next.
  2. In the Project Settings page, configure the Family, Device, Package, and Speed settings as needed for your FPGA target. You can find the details for each target in the General section of the FPGA Target Properties window in LabVIEW. In this tutorial we will be preparing IP for use on a PXIe-7965R (FlexRIO).

  3. Select VHDL as the Preferred Language to ensure that files are always generated in VHDL.


  4. Click Next until you reach the Project Summary page and then click Finish.

 

Back to Top

5. Adding a Top Level Source

  1. In the Design Implementation view, right-click the FPGA target and select Add Source.


  2. Browse to the Adder.v Verilog module in the working directory and click Open.

  3. Click OK to add the Verilog module to the project.

 

Back to Top

6. Synthesizing the Design

After the Verilog module is added to the project, it must be synthesized into a supported netlist format that can be used by a VHDL module. This tutorial uses the NGC format.

  1. In the Design Implementation view, click Adder (Adder.v).
  2. In the Processes view, right-click Sythesize-XST and select Process Properties..

  3. Select the Xilinx Specific Options category in the Process Properties window.
  4. Set the Add I/O Buffers property to FALSE. There will be no direct FPGA pin connections when we use this component within a LabVIEW FPGA design, making these buffers unnecessary.

  5. Set the value of the Pack I/O Registers Into IOBs property to No.


  6. Click Apply to save changes and click OK to exit the Process Properties window.
  7. In the Processes view, right-click Synthesize-XST and click Run.


  8. During Synthesis, a Xilinx NGC netlist file named Adder.ngc is created. This netlist is synthesized code which defines the component that will be wrapped. In the working directory for the ISE project, find the Adder.ngc file and note its location.

 

Back to Top

7. Creating the VHDL Simulation Model

Creating a VHDL simulation model allows you to accurately simulate the behavior of a Verilog module from a VHDL context.

Note: This step is required only if you plan to simulate Component-Level IP in a third-party simulator such as Xilinx ISIM. In the case of the IP Integration Node, the simulation behavior can be set to a Post-synthesis model for simulation purposes within the LabVIEW environment. As Component-Level IP cannot be directly simulated within LabVIEW FPGA, excluding the netlist from the simulation model will allow full functionality for most use cases. For more information on debugging LabVIEW FPGA code through simulation, see Testing and Debugging LabVIEW FPGA Code.

  1. Expand Synthesize-XST, right-click Generate Post-Synthesis Simulation Model and select Run.


  2. A post-synthesis VHDL simulation model is created. In the working directory, find Adder_synthesis.vhd and note its location.

 

Back to Top

8. Creating a VHDL Wrapper

To integrate an NGC netlist into LabVIEW FPGA, you must create a VHDL wrapper file that instantiates the component. Creating this file generally is not difficult, but it may require some knowledge of the VHDL language.

  1. In the Design Implementation view, right-click the FPGA target and select New Source.
  2. Create a new VHDL module by configuring the window as shown below.


  3. Click Next to proceed to the Define Module page. Configure the page as shown below. Ensure that the ports defined for the VHDL wrapper module match the ports defined in the original Verilog module. Wrapper modules require a set of ports that correspond to the original IP.


  4. Click Next until you reach the Summary page and then click Finish.
  5. Instantiate the Adder component in the architecture declarations of the VHDL module as shown below.

  6. Map the ports from the Adder component to the top-level ports of the AdderWrapper.

  7. Click File » Save.

 

Back to Top

9. Integrating the IP into LabVIEW

Once you have synthesized the Verilog module into a netlist and created a VHDL wrapper, the standard IP integration procedure for either CLIP or IP Integration Node applies.

  1. Gather the required HDL and synthesis files. You will need the VHDL wrapper and all netlists as well as their simulation models. For this design you will need the following files:
    • AdderWrapper.vhd - The VHDL wrapper created in this tutorial for the Verilog Module. This will be the top-level module.
    • Adder.ngc - The synthesized netlist for the Verilog Module.
    • Adder_synthesis.vhd - The simulation model for the Verilog Module netlist. To use this when importing the IP into LabVIEW, set the simulation behavior of Adder.ngc to User-Defined and select this file.
  2. Follow the steps in the Importing External IP Into LabVIEW FPGA Tutorial to integrate the IP into LabVIEW FPGA. Use the files listed above when choosing synthesis files.

 

Additional Links

Importing External IP Into LabVIEW FPGA

Using Xilinx Vivado Design Suite to Prepare Verilog Modules for Integration Into LabVIEW FPGA

Compatibility between Xilinx Compilation Tools and NI FPGA Hardware

 

 

Back to Top

Customer Reviews
2 Reviews | Submit your review

Tutorial is incomplete/missing  - Apr 28, 2017

The tutorial stops before the synthesis of the verilog module.

Tutorial is Incomplete  - Nov 19, 2016

and no link to download example

Bookmark & Share


Downloads


Ratings

Rate this document

Answered Your Question?
Yes No

Submit