Main Content

Getting Started with the HDL Workflow Advisor

The HDL Workflow Advisor guides you through the stages of generating HDL code for a Simulink® subsystem and the FPGA design process, such as:

  • Checking the model for HDL code generation compatibility and automatically fixing incompatible settings.

  • Generation of HDL code, a test bench, and scripts to build and run the code and test bench.

  • Generation of cosimulation or SystemVerilog DPI test benches and code coverage (requires HDL Verifier™).

  • Synthesis and timing analysis through integration with third-party synthesis tools.

  • Back-annotation of the model with critical path information and other information obtained during synthesis.

  • Complete automated workflows for selected FPGA development target devices, including FPGA-in-the-loop simulation (requires HDL Verifier), and the Simulink Real-Time™ FPGA I/O workflow.

Open the HDL Workflow Advisor

To start the HDL Workflow Advisor from a Simulink model:

  1. In the Apps tab, select HDL Coder. The HDL Code tab appears.

  2. Select the DUT Subsystem in your model, and make sure that this Subsystem name appears in the Code for option. To remember the selection, you can pin this option. Click Workflow Advisor.

To start the HDL Workflow Advisor for a model from the command line, enter hdladvisor(system). system is a handle or name of the model or subsystem that you want to check. For more information, see the hdladvisor function reference page.

For how to use the HDL Workflow Advisor to generate HDL code from a MATLAB® script, see Basic HDL Code Generation and FPGA Synthesis from MATLAB.

HDL Workflow Advisor is not available in Simulink Online™.

In the HDL Workflow Advisor, the left pane lists the folders in the hierarchy. Each folder represents a group or category of related tasks. Expanding the folders shows available tasks in each folder. From the left pane, you can select a folder or an individual task. The HDL Workflow Advisor displays information about the selected folder or task in the right pane. The contents of the right pane depend on the selected folder or task. For some tasks, the right pane contains simple controls for running the task and a display area for status messages and other task results. For other tasks that involve setting code or test bench generation parameters, the right pane displays several parameter and option settings.

Run Tasks in the HDL Workflow Advisor

In the HDL Workflow Advisor window, you can run individual tasks, a group of tasks, or all the tasks in the workflow. To run a task, all tasks before it must have run successfully.

To learn more about each individual task, right-click that task, and select What's This?

To generate HDL code, run the workflow to the Generate RTL Code and Testbench task. To run the workflow to a specific task inside a subfolder, expand that folder, and then right-click the task and select Run To Selected Task.

To rerun a task that you have already run, click Reset This Task. HDL Coder™ then resets the task and all tasks that follow it. For example, to customize the basic options for generating HDL code after running the Generate RTL Code and Testbench task, right-click the Set Basic Options task and select Reset This Task. You can then set the basic options on the model and click Run This Task to rerun the task.

To run all the tasks in the HDL Workflow Advisor with the default settings, in the HDL Workflow Advisor window, select Run > Run All. To run a group of tasks in a specific folder, select that folder and click Run All.

Fix HDL Workflow Advisor Warnings or Failures

In the HDL Workflow Advisor, if a task terminates due to a warning or failure condition, the right pane shows the warning or failure information in a Result subpane. The Result subpane displays model settings that you can use to fix the warnings. For some tasks, use the Action subpane to apply those recommended actions.

Save and Restore the HDL Workflow Advisor State

By default, the HDL Coder software saves the state of the most recent HDL Workflow Advisor session. The next time that you activate the HDL Workflow Advisor, it returns to that state. You can also save the current settings of the HDL Workflow Advisor to a named restore point. Later, you can restore the same settings by loading the restore point data into the HDL Workflow Advisor.

The save and restore process does not:

  • Include operations that you perform outside the HDL Workflow Advisor.

  • Save or restore the state of HDL Workflow Advisor tasks involving third-party tools.

To save the Workflow Advisor state, in the HDL Workflow Advisor Window, select File > Save Restore Point As. Enter a Name and Description, and then click Save. You can save more than one restore point.

To restore a Workflow Advisor state, in the HDL Workflow Advisor, select File > Load Restore Point. Select the restore point that you want to load and click Load. When you load a restore point, the HDL Workflow Advisor warns that the restoration overwrites the current settings.

View and Save HDL Workflow Advisor Reports

When you run tasks in the HDL Workflow Advisor, HDL Coder generates an HTML report of the task results. Each folder in the HDL Workflow Advisor contains a report for the checks within that folder and its subfolders. To access reports, select a folder, such as Prepare Model for HDL Code Generation, and in the Report subpane, click Save As. If you rerun HDL Workflow Advisor, the report is updated in the working folder.

This report shows typical results after running the Prepare Model For HDL Code Generation tasks.

As you run checks, the HDL Workflow Advisor updates the reports with the latest information for each check in the folder. When you run the checks at different times, timestamps appear at the top right of the report to indicate when checks have been run. Checks that occurred during previous runs have a timestamp following the check name. You can filter checks in the report. For example, you can filter out tasks that are Not Run from the report, or you can filter the report to show tasks that Passed, and so on. To view the report for a folder each time the tasks in a folder are run, select Show report after run.

See Also

Functions

Classes

Related Topics