socModelBuilder
Description
The socModelBuilder
object controls and runs the steps for
building and executing an SoC model on an SoC or FPGA board. Use this object to load existing
binaries onto the hardware board.
Creation
Syntax
Description
creates an object that you can use to build the model with the name
obj
= socModelBuilder(modelName
)modelName
.
sets properties using one or more
name-value arguments.obj
= socModelBuilder(modelName
,Name=Value
)
sets properties to their default value.obj
= socModelBuilder
Input Arguments
modelName
— Model name
character vector | string scalar
Model name, specified as a character vector or string scalar. You must specify
this input as a valid Simulink® model name. To update the model name after creating the object, use the
ModelName
property.
Example: 'soc_rfsoc_datacapture'
Data Types: char
| string
Properties
ModelName
— Model name
''
(default) | character vector | string scalar
Model name, specified as a character vector or string scalar. Use this property to
update the model name that you specify in the modelName
input argument.
Example:
'soc_rfsoc_datacapture'
Data Types: char
| string
ProjectFolder
— Folder for generated project files
'soc_prj'
(default) | character vector | string scalar
Folder for the generated project files, specified as a character vector or string
scalar. The buildModel
function places all the
generated files, including reports, executables, and bitstream, in this folder.
Example:
'soc_prj'
Data Types: char
| string
BuildType
— Model part to build
'Processor and FPGA'
(default) | 'Processor only'
| 'FPGA only'
Model part to build, specified as one of these values.
'Processor and FPGA'
— Build the processor and FPGA models in your top model.'Processor only'
— Build only the processor model in your top model.'FPGA only'
— Build only the FPGA model in your top model.
Example:
'Processor and FPGA'
Data Types: char
| string
ExternalMode
— Option to run generated software model in external mode
false
(default) | true
Option to run the generated software model in external mode, specified as one of these values.
true
— Run the generated software model in external mode. Use external mode to tune parameters on the FPGA without rebuilding the FPGA design. You can also log data from the FPGA and display the data on the host computer. For more information about external mode, see External Mode Simulations for Parameter Tuning, Signal Monitoring, and Code Execution Profiling (Simulink Coder).false
— Build a standalone application for the processor model.
Example:
false
Data Types: logical
RunExternalFPGABuild
— Option to run FPGA build process externally
true
(default) | false
Option to run the FPGA build process externally in a Windows® command or Linux® shell, specified as one of these values.
true
— Run the FPGA build process parallel to MATLAB® in an external shell.false
— Keep MATLAB busy until the FPGA build process completes.
Example: true
Data Types: logical
Object Functions
buildModel | Build SoC model |
loadBinaries | Load existing binaries onto hardware board |
Examples
Build and Load SoC Model Using Command Line Interface
Use MATLAB commands to build an SoC model by creating and configuring the
socModelBuilder
object. Load the binaries in the specified project
folder onto the Xilinx®
Zynq®
UltraScale+™ RFSoC ZCU111 Evaluation Kit.
Set the synthesis tool path to point to an installed Vivado® Design Suite. When you execute this command, use your own Xilinx Vivado installation path.
hdlsetuptoolpath('ToolName','Xilinx Vivado', ... 'ToolPath','C:\Xilinx\Vivado\2022.1\bin\vivado.bat');
Create an socModelBuilder
object for the
soc_rfsoc_datacapture
SoC model. To run the generated software
model in external mode, set ExternalMode
to
true
.
obj = socModelBuilder('soc_rfsoc_datacapture',ExternalMode=true)
obj = socModelBuilder with properties: ModelName: 'soc_rfsoc_datacapture' ProjectFolder: 'soc_prj' BuildType: 'Processor and FPGA' ExternalMode: 1 RunExternalFPGABuild: 1
Change the project folder to G:\R2023a\myProject
.
obj.ProjectFolder = 'G:\R2023a\myProject'
obj = socModelBuilder with properties: ModelName: 'soc_rfsoc_datacapture' ProjectFolder: 'G:\R2023a\myProject' BuildType: 'Processor and FPGA' ExternalMode: 1 RunExternalFPGABuild: 1
Build the model.
buildModel(obj);
Load the binaries in the G:\R2023a\myProject
project folder to
the last connected hardware board.
loadBinaries(obj);
Load the binaries in the G:\R2023a\myProject
project folder onto
the Xilinx
Zynq
UltraScale+ RFSoC ZCU111 Evaluation Kit.
hw = socHardwareBoard('Xilinx Zynq UltraScale+ RFSoC ZCU111 Evaluation Kit');
loadBinaries(obj,hw);
Version History
Introduced in R2023a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)