The HDL Workflow Advisor offers a workflow so that you can checks you algorithm for HDL compatibility, generate HDL code, verify the code, and then deploy the code to your target platform.
You can run the Workflow Advisor for your MATLAB® algorithm or Simulink® model. Before you deploy the code to a target hardware platform, install the
synthesis tool and specify the path to that synthesis tool by using the hdlsetuptoolpath
function. See Tool Setup.
Before you specify the target workflow, when you run the Workflow Advisor from MATLAB, specify the design and test bench files, define the input types, and run fixed-point conversion.
To specify the target workflow:
On the MATLAB toolstrip, from the Apps tab, select the HDL Coder app.
Select the MATLAB design and test bench files and click the Workflow Advisor button.
In the Workflow Advisor, on the Select Code Generation Target task, select the Workflow.
The steps after code generation target selection change depending on your target workflow.
When you run the Workflow Advisor from your Simulink model, irrespective of the target workflow, you run the steps to prepare the model for HDL code generation, and then generate code.
Open the Simulink model for which you want to run the workflow.
On the Simulink toolstrip, from the Apps tab, select the HDL Coder app.
On the HDL Code tab, click the Workflow Advisor button.
In the HDL Workflow Advisor, on the Set Target Device and Synthesis Tool task, select the Target workflow.
The steps in the Workflow Advisor change depending on the Target workflow, Target platform, and Synthesis tool. The following sections describe more about each of these workflows.
Generate HDL code from your Simulink model or MATLAB algorithm, verify the HDL code, and deploy the code to a generic ASIC or FPGA device. You can select from a family of devices that belong to these synthesis tools as listed in Generic ASIC/FPGA Hardware.
By using this workflow, you can:
Generate HDL code for your fixed-point MATLAB algorithm or your HDL-compatible Simulink model.
Generate an HDL test bench and cosimulation test bench (requires HDL Verifier™), and scripts to build and run the code and test bench. You can also generate a SystemVerilog DPI test benches and code coverage when running the Simulink HDL Workflow Advisor (requires HDL Verifier).
Perform FPGA synthesis and timing analysis and rapidly prototype your design on generic FPGA platforms through integration with third-party synthesis tools.
Back-annotate the model with critical path information and other information obtained during synthesis, and optimize your design for area and speed.
Note
If you select Intel Quartus Pro
or
Microsemi Libero SoC
as the Synthesis
tool, the Annotate Model with Synthesis Result
task is not available. To see the critical path, run the workflow to synthesis and
then open the timing reports.
To learn more, see:
Deploy your Simulink model or MATLAB algorithm onto standalone FPGA boards and SoC platforms. To use this workflow,
you must select VHDL
as the Language. You
can select from one of these synthesis tools as listed in FPGA Turnkey Hardware.
Use this workflow to:
Choose boards from the FPGA Board Manager that are Turnkey Enabled or create your own custom boards for deployment.
Generate HDL code for the entire FPGA design, the DUT algorithm, and the FPGA wrapper top-level HDL code. You can also specify the pin mapping constraints.
Perform FPGA synthesis and timing analysis and rapidly prototype your design on FPGA and SoC platforms through integration with third-party synthesis tools.
For an example, see Getting Started with FPGA Turnkey Workflow.
Generate RTL code and a custom HDL IP core from your Simulink model or MATLAB algorithm. Before you run the workflow, partition your design into components that run on software and components that run on hardware. See Hardware-Software Co-Design Workflow for SoC Platforms.
The IP core is a shareable and reusable HDL component that consists of IP core definition files, HDL code generated for your algorithm, C header file with the register address map, and the IP core report. See:
You can select from one of these synthesis tools as listed in IP Core Generation Hardware.
Use this workflow to:
Generate a generic board-independent Xilinx® or Intel® HDL IP core.
Integrate the IP core into a reference design to target standalone FPGA boards or SoC platforms with Xilinx Vivado® IP integrator or Intel Qsys.
Communicate with the generated HDL IP core by using embedded ARM processor or from MATLAB by using the HDL Verifier MATLAB as AXI Master. See Set Up for MATLAB AXI Master (HDL Verifier).
You can integrate the HDL IP core into HDL Coder™ provided reference designs such as the default system reference
design
or into a reference design that you created. To learn more, see:
Generate HDL code from your Simulink model and deploy the code onto Speedgoat FPGA I/O modules. This workflow
requires Xilinx
Vivado and uses the IP Core Generation
workflow infrastructure as
mentioned in Simulink Real-Time FPGA I/O: Speedgoat Target Hardware.
To run the Simulink Real-Time FPGA I/O
workflow, install the
Speedgoat Library and the Speedgoat
HDL Coder Integration Packages. After you install the integration packages, you can
choose the Target platform and then run the workflow to:
Generate a reusable and shareable IP core.
Integrate the IP core into the Speedgoat reference design.
Generate an FPGA bitstream and download the bitstream to the target hardware.
Generate a Simulink Real-Time™ model. The model is an interface subsystem model that contains the blocks to program the FPGA and communicate with the board during real-time execution.
To learn more, see IP Core Generation Workflow for Speedgoat Simulink-Programmable I/O Modules.
Test your Simulink model or MATLAB algorithm on a target FPGA. This workflow requires HDL Verifier. You can select from one of these synthesis tools as listed in FPGA-in-the-Loop Hardware.
Use this workflow to:
Choose boards from the FPGA Board Manager that are FIL Enabled or create your own custom boards for verification. See FPGA Board Customization.
Generate HDL code for your fixed-point MATLAB algorithm or your HDL-compatible Simulink model.
Perform FPGA implementation and connect to the target FPGA board using Ethernet, JTAG, or PCI Express for FIL simulation.
To learn more, see:
FIL Simulation with HDL Workflow Advisor for Simulink (HDL Verifier)
FIL Simulation with HDL Workflow Advisor for MATLAB (HDL Verifier)