AN 973: Three-phase Boost Bidirectional AC/DC Converter for Electric Vehicle (EV) Charging

ID 733436
Date 6/23/2022
Public

6.2. Generating HDL and QPF Using MATLAB GUI Tools

This section provides instructions to generate an Intel® Quartus® Prime software project and VHDL code for the fixed-point model described in the bidir_rectifier.slx file.

Follow these steps:

  1. Launch the MATLAB model in the matlab/Simulink/bidir_rectifier.slx directory. The MATLAB and Simulink window launches.
  2. In the MATLAB interface, select the parameters.m file and click Run. This sets some necessary variables to synthesize the model.
    Figure 20. Setting Up Model Variables
  3. Launch the Simulink window where you can see the model that is synthesized and used to generate an Intel® Quartus® Prime software project and VHDL code (bidir_rectifier_fixed).
  4. In the Simulink window, navigate to the HDL CODE tab and click Workflow Advisor. A warning of a missing ./top.vhd appears. Ignore the warning.
    Figure 21. Workflow Advisor and Simulink GUI
  5. Expand the HDL Workflow Advisor tasks menu in the left-hand pane.
  6. Select 1.1 Set Target Device and Synthesis Tool to configure the target FPGA device and perform one of the following:
    • For Intel® MAX® 10 FPGA Development Kit: Select the value for Family as MAX 10 and Device as 10M50DAF484C6GES.
    • For Cyclone® V SoC Development Kit: Select the value for Family as Cyclone V and Device as 5CSXFC6D6F31C6.
  7. Change the Project folder to a desired project location and name.
  8. In the left-hand pane, select 4.1 Create Project.
    Figure 22. Running Tasks in HDL Workflow Advisor
  9. For Additional source files, select one of the following:
    • For Intel® MAX® 10 FPGA Development Kit: <local_path>/M10/top.vhd
    • For Cyclone® V SoC Development Kit: <local_path>/C5/top.vhd
  10. For Additional project creation Tcl files, select one of the following:
    • For Intel® MAX® 10 FPGA Development Kit: <local>/matlab/Simulink/m10/add_to_project.tcl
    • For Cyclone® V SoC Development Kit: <local>/matlab/Simulink/c5/add_to_project.tcl
  11. Run tasks 1, 2, 3, and 4.1 by clicking Run This Task.
  12. Navigate to the project folder that you selected in step 7. The newly created Intel® Quartus® Prime software project is located in the quartus_prj directory and the generated VHDL code for the Simulink model is located in the hdlsrc directory.
  13. Navigate to the quartus_prj directory and open the bidir_rectifier_fixed_quartus.qpf file with the Intel® Quartus® Prime software.
  14. Compile the design, generate a SOF file, and program your board as described in Downloading and Installing the Design. Use Signal Tap logic analyzer to view the waveforms created by the generated VHDL code programmed in your board.