Device Driver Blocks
R2026bCreate device driver block to access specific features of hardware board
A device driver block is a specialized MATLAB System (Simulink) block that generates custom C/C++ code when you deploy a model to an AMD® SoC device. It enables access to board-level features, such as communication protocols and hardware libraries, which are not available in SoC Blockset™ Support Package for AMD FPGA and SoC Devices.
Create a device driver block by using a template System object™ and share the completed block with others.
Topics
Overview
- Prerequisites
Learn the system requirements and recommended skills to develop device driver blocks for ARM® Cortex®-A based hardware boards. - Structure of Device Driver System Object
Understand the concepts and operation of device driver blocks implemented using System object. - Simulation with Device Driver Blocks
Choose and implement a data simulation mode for device driver blocks. - Sharing Device Driver Blocks with Other Users
Package and distribute your device driver blocks.
Digital Write Block Generation
- Create a Digital Write Block
Create a Digital Write block using a System object.
- STEP 1: Create a Project Folder
- STEP 2: Write the Hardware-Specific C/C++ Code
- STEP 3: Select a System Object Template
- STEP 4: Specify the Initialization, Output, and Termination Behavior
- STEP 5: Test System Object on MATLAB Command Line
- STEP 6: Create the MATLAB System Block
- STEP 7: Generate Code and Deploy the Model to the Hardware
Digital Read Block Generation
- Create a Digital Read Block
Create a Digital Read block using a System object.
- STEP 1: Create a Project Folder
- STEP 2: Write the Hardware Specific C/C++ Code
- STEP 3: Select System Object Template
- STEP 4: Specify the Initialization, Output, and Termination
- STEP 5: Set Output Port Properties
- STEP 6: Test System Object
About Block Mask
- Block Mask
Create block masks for your device driver blocks.
- STEP 1: Add Description for Users
- STEP 2: Add Pin Number Property
- STEP 3: Add Push Button to View Pin Map