Main Content

FPGA-in-the-Loop

R2026b
Test designs in real hardware

Creating an FPGA-in-the-loop link between the simulator and the board enables you to:

  • Verify HDL implementations directly against algorithms in MATLAB® or Simulink®.

  • Apply data and test scenarios from MATLAB or Simulink to the HDL design on the FPGA.

  • Integrate existing HDL code with models under development in MATLAB or Simulink.

Before you can use FPGA-in-the-loop (FIL) simulation, you must download the SoC Blockset™ Support Package for AMD FPGA and SoC Devices. See Install Support for AMD FPGA and SoC Devices. Alternatively, you can manually create custom board definition files for use with FIL simulation. See FPGA Board Customization.

After you download the support package, select a simulation workflow. See FPGA-in-the-Loop Simulation Workflows. To learn how FIL simulation works, see FPGA-in-the-Loop Simulation.

Apps

FPGA-in-the-Loop WizardGenerate an FPGA-in-the-loop (FIL) block or System object from existing HDL files
Logic AnalyzerVisualize, measure, and analyze transitions and states over time

Tools

FPGA Board ManagerCreate and manage custom FPGA boards for FPGA-in-the-loop workflows
New FPGA Board WizardCreate, configure, and add custom board for FPGA-in-the-loop workflows
FPGA Board EditorEdit custom board definition for FPGA-in-the-loop workflows

Objects

hdlverifier.FILSimulation FIL simulation with MATLAB
hdlverifier.FILFreeRunning Free-running FIL simulation with MATLAB (Since R2024b)
jtagchainDetect and program FPGA through JTAG interface (Since R2026b)

Functions

programFPGA Load programming file associated with FILSimulation or FILFreeRunning system object onto FPGA
writePortSend data to DUT ports (Since R2024b)
readPortReceive data from DUT ports (Since R2024b)

Blocks

FIL Simulation blockFIL SimulationSimulate HDL code on FPGA hardware from Simulink

Topics

Overview

  • FPGA-in-the-Loop Simulation Workflows
    Choose between generating a block or System object™, and decide whether to use the FIL Wizard or HDL Workflow Advisor.
  • FPGA-in-the-Loop Simulation
    FPGA-in-the-loop (FIL) simulation provides the capability to use Simulink or MATLAB software for testing designs in real hardware for any existing HDL code.

FIL Requirements and Preparation

Generate FIL Interface from Legacy Code

Free Running FIL

Generate FIL System Object from MATLAB Code (requires HDL Coder license)

Generate FIL Block from Simulink Model (requires HDL Coder license)

Custom FPGA Board Definition

Troubleshooting

Troubleshooting FIL

Fixes for common error messages and issues.

Featured Examples