An SoC application model developed using the SoC Blockset™combines multiple subsystems and reference models. Each subsystem and reference model maps to a particular feature of an SoC device. Organization of the models and shared configuration settings requires a Simulink® project.
Create a new SoC Blockset project named SampleSoCApplication
. Creating a new
project automatically creates a new project folder with the same name. For more
information on creating projects, see Create a New Project From a Folder.
Open a new Simulink model. Save the model as soc_hwsw_top.slx
into the
project folder.
In MATLAB®, on the Project tab, in the
Tools section, select Run Checks > Add Files and add the soc_hwsw_top.slx
model file to the
project.
In Simulink, configure the soc_hwsw_top.slx
model to as an SoC
application. On the Apps tab, under Setup to Run on
Hardware, click System on Chip (SoC).
In the System on Chip (SoC) pop-up window, select Hardware Board > Xilinx Zynq ZC706 evaluation kit. Click Finish.
Note
You can optionally choose any of the available hardware boards based to suit your system requirements.
On the System on Chip tab, click Hardware
Settings. On the Configuration Parameters
dialog box, in the Solver tab, set Solver selection > Type to Variable-step
. Click
OK.
Create three box areas and label them as FPGA
,
Memory
, and Processor
. For more
information on creating box areas, see Box and Label Areas of a Model. In the following sections, these areas are
populated for various aspects of your SoC application.
Create a new MATLAB function to initialize variables used throughout the project.
function soc_hwsw_init % Initialize the model wide variables and set them in base workspace. SourceSTime = 1e-7; FrameSize = 1000; ProcSTime = SourceSTime*FrameSize; FPGASTime = SourceSTime; FPGAFrameSize = 1; assignin('base','ProcSTime',ProcSTime); assignin('base','FPGASTime',FPGASTime); assignin('base','SourceSTime',SourceSTime); assignin('base','FPGAFrameSize',FPGAFrameSize); assignin('base','FrameSize',FrameSize); end
In the project folder, save the file as soc_hwsw_init.m
in a
new subfolder, utilities
and add the file to project.
Software and Task Management on Processor