Map Reference Board Support Features

Map Reference Deployer

The deployer is a set of tools that compiles an SoC Blockset™ model into C/C++ and HDL code. The deployer also loads the generated code from the host computer onto the processor and programmable logic of an SoC device. A deployer can be added to the new soc.sdk.BoardSupport object from reference board support. The following code shows how to use the getDeployer method to get a Deployer object from the existing reference board support.

boardSupportObj = soc.sdk.BoardSupport(...
    'My SoC Board Support',...                                % Board Support Name 
    'Board Support for Xilinx Zynq UltraScale+ MPSoC',...     % Reference
    fullfile('C:','mySoCBoardSupport')...                     % Folder
    );
deployerObj = getDeployer(boardSupportObj,'reference');

The deployer can then be mapped to a specific hardware board in the BoardSupport object by using the map method.

hardwareObj = soc.sdk.Hardware(...
    "MySoCHardware"...     % Internal Board Name
    );
map(boardSupportObj, hardwareObj, deployerObj);

After mapping, the deployer feature allows the SoC Builder tool to be used with the hardware board in the new board support. Additionally, the deployer connection is reflected in the Configuration Parameter dialog box, under Hardware Implementation > Hardware board settings > Board Parameters.

Map Reference Operating System

An operating system (OS) can be added to the new BoardSupport object from reference board support. The following code shows how to get an soc.sdk.OperatingSystem object from the MPSOC reference board support.

boardSupportObj = soc.sdk.BoardSupport(...
    'My SoC Board Support',...                                % Board Support Name 
    'Board Support for Xilinx Zynq UltraScale+ MPSoC',...     % Reference
    fullfile('C:','mySoCBoardSupport')...                     % Folder
    );
osObj = getOperatingSystem(boardSupportObj,'reference');

The OS can then be mapped to a hardware board in the BoardSupport object by using the map method.

hardwareObj = soc.sdk.Hardware(...
    "MySoCHardware"...     % Internal Board Name
    );
map(boardSupportObj,hardwareObj,osObj);

Map Reference PIL

Processor-in-Loop (PIL) tooling can be added to the new BoardSupport object from reference board support. The following code shows how to get an soc.sdk.PIL object from the existing MPSOC reference board support by using the getPIL method.

boardSupportObj = soc.sdk.BoardSupport(...
    'My SoC Board Support',...                                % Board Support Name 
    'Board Support for Xilinx Zynq UltraScale+ MPSoC',...     % Reference
    fullfile('C:','mySoCBoardSupport')...                     % Folder
    );
pilObj = getPIL(boardSupportObj,'reference');

The PIL feature can then be mapped to a specific hardware board in the BoardSupport object by using the map method. PIL requires you to specify the connectivity configuration. The reference board support provides an existing connectivity configuration, TCP/IP.

hardwareObj = soc.sdk.Hardware(...
    "MySoCHardware"...     % Internal Board Name
    );
map(boardSupportObj,hardwareObj,pilObj,'TCP/IP');

After mapping, the PIL feature will be available in Simulink® for the hardware board.

Map Reference External Mode

External mode can be added to the new BoardSupport object from reference board support. The following code shows how to get an object from the existing MPSOC reference board support by using the soc.sdk.ExternalMode method.

boardSupportObj = soc.sdk.BoardSupport(...
    'My SoC Board Support',...                                % Board Support Name 
    'Board Support for Xilinx Zynq UltraScale+ MPSoC',...     % Reference
    fullfile('C:','mySoCBoardSupport')...                     % Folder
    );
externalObj = getExternalMode(boardSupportObj,'reference');

The external mode feature can then be mapped to a hardware board in the BoardSupport object by using the map method. External mode requires you to specify the connectivity configuration. The reference board support provides an existing connectivity configuration, TCP/IP.

hardwareObj = soc.sdk.Hardware(...
    "MySoCHardware"...     % Internal Board Name
    );
map(boardSupportObj,hardwareObj,externalObj,'TCP/IP');

After mapping, the external mode will be available in Simulink for the hardware board.

Map Reference Profiler

The ability to use code instrumentation and kernel profiling can be added to the new BoardSupport object from reference board support. The following code shows how to get an soc.sdk.Profiler object from the existing MPSOC reference board support by using the getProfiler method

boardSupportObj = soc.sdk.BoardSupport(...
    'My SoC Board Support',...                                % Board Support Name 
    'Board Support for Xilinx Zynq UltraScale+ MPSoC',...     % Reference
    fullfile('C:','mySoCBoardSupport')...                     % Folder
    );
profilerObj = getProfiler(boardSupportObj,'reference');

The profiling feature can then be mapped to a hardware board in the BoardSupport object by using the map method.

hardwareObj = soc.sdk.Hardware(...
    "MySoCHardware"...     % Internal Board Name
    );
map(boardSupportObj,hardwareObj,profilerObj);

After mapping, the task profiling feature will be available in the Configuration Parameter dialog box, under Hardware Implementation > Hardware board settings > Task profiling on processor.

Test the Features Mapped to Hardware Board

After mapping all the features to your hardware board, you can optionally test the completed board support .The following code shows how to test the complete board support with hardware board.

test(boardSupportObj);