- Open a System Generator model, then open the System Generator token. This populates the token with all the available compilation targets.
- In the
MATLAB®
Command Window, modify the
path as per your requirements, then enter the following command:
xilinx.environment.addCompilationTarget('Impl', 'U:\demo')
This provides a template derived class for you to edit.
- In the MATLAB Command Window, enter the
following
command:
xilinx.environment.rehashCompilationTarget
This ensures that the new compilation target is picked up by the System Generator token.
- Close and then re-open the System Generator
token. You now see the compilation target, Impl on the token as shown below.Figure 1. Selecting Impl
- At this point, selecting Impl does not perform any customized operations on the System Generator token. It is equivalent to an HDL Netlist compilation target.
- Open U:\demo\Impl\@Impl\Impl.m in the MATLAB Editor.
- Populate the
setup_sysgen_token()
function as per the requirements. Using this approach, you can control how the System Generator token should look, including the enabled/disabled fields when the user-defined custom compilation is selected.
- In the MATLAB Command Window,
you should enter the following command:
xilinx.environment.rehashCompilationTarget
This ensures that the updated class definition of Impl is used.
- Close and then re-open the System Generator token. Select Impl from the list of Compilation targets.
- The System Generator token
appears as follows:Figure 2. Selecting Verilog, and Flow Quick
- Observe that the Hardware description language field and the Implementation strategy field are fixed to what you set in the Impl class and are disabled for user modification.
- All the user specified files and additional Tcl commands to be run
are known before the
Vivado®
IDE project is
created. The next step is to populate the
pre_project_creation()
function as indicated below:
- In the MATLAB Command Window,
enter the following command:
xilinx.environment.rehashCompilationTarget
This ensures that the updated class definition of Impl is used.
- Close and then re-open the System Generator token. Select Impl from the list of Compilation targets.
- Click Generate. Once the process is finished, you can see the implementation results by opening up the Vivado IDE project.