Create the following diagram to simulate your CDL document on the host.
Customize the gray sections for your unique programming goals.
Select a CDL document to simulate in the Run FPGA Simulation node in the Properties section of the Configure tab. The inputs and outputs that appear on the node correspond to the inputs and outputs of the CDL document you select.
|The Run FPGA Simulation node simulates clock cycles on an FPGA. Because code on an FPGA often takes multiple clock cycles to produce valid data, you can use a While Loop around the Run FPGA Simulation node to ensure that the host VI runs until the CDL executes completely.|
|The For Loop repeats the code you want to test until all the test values you supply are consumed. The auto-indexing functionality of a For Loop allows the CDL document to access and process each individual element of an input array. You can then collect the result of each loop iteration with an auto-indexing output tunnel.|
|Provide test data that exercises all inputs and outputs of the CDL document and spans the range you expect the CDL document to receive from the application.
The code in the diagram example above focuses on testing the data in input, a cluster, of the CDL document. Depending on your preference, you can test all inputs and outputs in a single host VI or you can test them across multiple VIs.
|Provide results you expect the CDL document to produce for the test data provided.|
|Compare the results of the data processed by the CDL document to the results you expect to determine if logic or other code in the CDL document needs to change.|
Search LabVIEW for the following installed lessons: Programming with Clock-Driven Logic.