What Is Free-Running FPGA-in-the-Loop? - MATLAB & Simulink (original) (raw)

Main Content

Introduction to Free-Running Mode

Lockstep mode and free-running mode are the two ways in which you can synchronize MATLAB® with the DUT executing on an FPGA.

Lockstep mode is the default option and it is implicit in FIL simulation. In this mode, the DUT on the FPGA operates in lockstep with MATLAB. For each step update, MATLAB must send data to all DUT input ports and receive processed data from all DUT output ports. The hardware clock toggles only upon an active data transfer. Since every clock cycle execution in the DUT corresponds to a sample step in MATLAB, lockstep mode provides cycle-accurate simulation. This level of accuracy is essential for verifying that the behavior of the DUT on the FPGA matches the simulation behavior.

In free-running mode, the DUT on the FPGA runs asynchronously with MATLAB. The hardware clock runs continuously inside the FPGA itself. Unlike lockstep mode, free-running mode requires the DUT to have data accompanied by control signals that indicate when the data is valid (see Requirements For Free-Running Mode). MATLAB can either send data or receive data in an independent manner. Although this mode does not provide cycle-accurate simulation, it can accelerate many streaming applications, as it allows the DUT to run at full speed and communicate with MATLAB only upon request.

Block diagram of host computer connected to an FPGA board

Requirements For Free-Running Mode

Free-running clock mode has the following requirements in addition to the requirements for the lockstep FIL workflow. Other than the clock, reset, and clock enable port, DUT ports are divided into four categories:

For more information about requirements for the lockstep FIL workflow, see Apply FIL System Object Requirements.

Block diagram of DUT with interfaces for single write, streaming write, single read, and streaming read

Input Streaming Data

This timing diagram shows an example DUT with din1 anddin2 as streaming data ports:

Timing diagram of streaming input. The din1 and din2 signals have relevant data as long as the din_valid signal is asserted.

Output Streaming Data

This timing diagram shows an example DUT with dout1 anddout2 as streaming data ports:

Timing diagram of streaming output. The dout1 and dout2 signals have relevant data as long as the dout_valid signal is asserted.

Input Control Data

Output Control Data

When to Use Free-Running FIL

To decide if you can benefit from free-running mode, consider the following:

To learn more about how to accelerate your application by using free-running mode, see Accelerate NR LDPC Decoder for Streaming Data Using FPGA-in-the-Loop.

Supported Interfaces and Boards

Free-running FIL supports these interfaces:

The feature is supported on these SoC boards:

See Also

Topics