Compiling an FPGA VI can take minutes to hours. However, you can test the logic of an FPGA VI before compiling it by running the FPGA VI on a development computer with simulated I/O. When you use this test method, LabVIEW generates random data for the inputs or uses a custom VI test bench that you create to provide I/O. You also can use the FPGA Desktop Execution Node to communicate with FPGA resources that you select and to debug your FPGA design. For some FPGA targets, you also can run the FPGA VI on a development computer with real I/O.
When you run the FPGA VI on the development computer, you can use all traditional LabVIEW debugging techniques, such as probes, execution highlighting, breakpoints, and single-stepping, as well as debugging techniques that are specific to the FPGA host VI context.
|Tip National Instruments recommends that you debug and verify your FPGA design in software before compiling to avoid unnecessary compiles.|
To debug your FPGA design on a development computer with simulated I/O, select from the following options:
Use Sampling probes in host VIs or FPGA VIs to check intermediate values on a wire as a VI runs and to view changes in signal data over time, such as when you need to debug signals from a single-cycle Timed Loop. When you use a Sampling probe in a host VI, you must first specify a sampling source for the probe.
You cannot use the Sampling Probe Watch Window to change data. The probe has no effect on the way a VI runs.
Before debugging an FPGA VI using a test bench, you can test the logic of the VI without compiling it by running the FPGA VI on a development computer using random data for the FPGA I/O read. This test method saves compilation time, makes tests easier to repeat, and decreases the number of modifications necessary to create a test bench for additional debugging.
The FPGA Desktop Execution Node runs an FPGA VI on a development computer with simulated I/O for a specified number of clock ticks. Use this node to communicate with FPGA resources that you select and to debug your FPGA design.
Complete the following steps to debug an FPGA VI using the FPGA Desktop Execution Node:
|Note You also can right-click the FPGA target and select Execute VI on»Development Computer with Simulated I/O.|
You can create a custom VI with simulated I/O in LabVIEW for use as a test bench for your FPGA VI. You can use a custom VI as a test bench to create the data coming from a particular input or monitor an output. Every time an FPGA VI reads an input by calling an FPGA I/O Node, LabVIEW uses the custom VI you specify to provide the data. Using custom VIs for FPGA I/O creates a repeatable scenario for testing and makes it possible to change the data for a particular input. You also can use custom VIs for FPGA I/O to monitor an output from FPGA I/O Nodes.
(Statechart) You also can debug statecharts for an FPGA target on the development computer.
If you use certain FPGA resources and you execute the FPGA VI on the development computer with simulated I/O, the resource uses simulated time instead of real time. Simulated time might be faster than real time depending on the number of events that occur during the simulation. For example, if you add a Wait (Simulated Time) VI to the block diagram and set the delay to 1000 ms, LabVIEW does not attempt to delay one second of real time. Instead, LabVIEW delays as long as necessary before executing the next scheduled action in the simulation.
The following resources use simulated time on the development computer: