FPGA-in-the-Loop
R2026bCreating 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 Wizard | Generate an FPGA-in-the-loop (FIL) block or System object from existing HDL files |
| Logic Analyzer | Visualize, measure, and analyze transitions and states over time |
Tools
| FPGA Board Manager | Create and manage custom FPGA boards for FPGA-in-the-loop workflows |
| New FPGA Board Wizard | Create, configure, and add custom board for FPGA-in-the-loop workflows |
| FPGA Board Editor | Edit 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) |
jtagchain | Detect and program FPGA through JTAG interface (Since R2026b) |
Functions
programFPGA | Load programming file associated with FILSimulation or FILFreeRunning system
object onto FPGA |
writePort | Send data to DUT ports (Since R2024b) |
readPort | Receive data from DUT ports (Since R2024b) |
Blocks
| FIL Simulation | Simulate 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
- Prepare DUT For FIL Interface Generation
DUT guidelines for FIL simulation of blocks and System objects. - Install Support for AMD FPGA and SoC Devices
Instructions to install support for AMD® FPGA and SoC devices. - Set Up FPGA Design Software Tools
Set the MATLAB path to AMD, Microchip, and Intel® software. - Set Up AMD FPGA and SoC Devices
Configure and verify your hardware connection, using the hardware setup tool. - Manual Hardware Setup
Describes the steps necessary to prep hardware and hardware tools for FIL. - Configure Logic Analyzer
Adjust settings in the Logic Analyzer.
Generate FIL Interface from Legacy Code
- Block Generation with the FIL Wizard
Generate a FPGA-in-the-Loop block from existing HDL source files, then include the FPGA implementation in a Simulink simulation. - System Object Generation with the FIL Wizard
Generate a FPGA-in-the-Loop System object from existing HDL source files, then include the FPGA implementation in a MATLAB simulation. - Verify HDL Implementation of PID Controller Using FPGA-in-the-Loop for AMD Devices
This example shows you how to set up an FPGA-in-the-Loop (FIL) application.
Free Running FIL
- What Is Free-Running FPGA-in-the-Loop?
Introduction and requirements for free-running FIL. - Execute Free-Running FPGA-in-the-Loop
Generate a free-running FPGA-in-the-Loop System object, then include the FPGA implementation in a MATLAB simulation. - Execute Free-Running FPGA-in-the-Loop Using HDL Workflow Advisor
Generate a free-running FPGA-in-the-Loop System object by using the HDL Workflow Advisor, then include the FPGA implementation in a MATLAB simulation.
Generate FIL System Object from MATLAB Code (requires HDL Coder license)
- FIL Simulation with CLI Commands for MATLAB
Generate an FPGA-in-the-loop System object and testbench using CLI commands.
Generate FIL Block from Simulink Model (requires HDL Coder license)
- Generate Test Bench and Enable Code Coverage Using the HDL Workflow Advisor (HDL Coder)
Generate test bench and code coverage for generated HDL code using the HDL Workflow Advisor. - FIL Simulation with HDL Workflow Advisor for Simulink
Generate an FPGA-in-the-loop model using HDL Workflow Advisor.
Custom FPGA Board Definition
- FPGA Board Customization
Create board definition files for FPGA verification projects. - Create Custom FPGA Board Definition
Run the New FPGA Board Wizard to setup a custom board. - Customize AMD FPGA Board
How to customize board definition files.
Troubleshooting
Fixes for common error messages and issues.








