Measuring While Loop Execution Rate
- Updated2025-09-18
- 1 minute(s) read
Complete the following steps to measure the execution time of a While Loop in an FPGA VI.
- Add a While Loop to the block diagram.
- Right-click the conditional terminal of the While Loop and select either Create Constant or Create Control from the shortcut menu, depending on the needs of the application.
- Add the code you want to execute to the While Loop.
- Add a Tick Count Express VI to the While Loop and click the OK button in the Configure Tick Count dialog box.
- Right-click the While Loop and select Add Shift Register from the shortcut menu.
- Add a Subtract function to the While Loop.
- Wire the Tick Count terminal of the Tick Count Express VI to the right shift register on the While Loop and to the x terminal of the Subtract function.
- Wire the left shift register to the y terminal of the Subtract function.
- Right-click the x–y terminal of the Subtract function and select Create»Indicator.
- Run the VI. The value shown in the x–y indicator is the While Loop execution rate.