主要内容

addNewFPGAPeripheralInterface

Class: soc.sdk.Hardware
Namespace: soc.sdk

Add new FPGA peripheral interface to hardware

Since R2026a

Description

Add-On Required: This feature requires the SoC Blockset Support Package for AMD FPGA and SoC Devices add-on.

fpgaPeripheralInterfaceObj = addNewFPGAPeripheralInterface(hardwareObj,name) creates a new soc.sdk.FPGAPeripheralInterface object, with the Name property set to name, and adds the new object to the soc.sdk.Hardware object.

example

Input Arguments

expand all

Hardware object mapped to the soc.sdk.BoardSupport object, specified as an soc.sdk.Hardware object.

Name of the FPGA peripheral interface, specified as a character vector or string.

Example: "AD9361"

Data Types: char | string

Output Arguments

expand all

FPGA peripheral interface, returned as an soc.sdk.FPGAPeripheralInterface object. This object defines the properties of an FPGA peripheral interface on hardware.

Examples

expand all

Add an FPGA peripheral interface to the soc.sdk.Hardware object. Define the FPGA peripheral interface by using the soc.sdk.FPGAPeripheralInterface object.

Create an soc.sdk.Hardware object with an internal name of MySoCHardware.

hardwareObj = soc.sdk.Hardware( ...
    "MySoCHardware" ...     % Internal board name
    )
hardwareObj = 

  Hardware with properties:

                      Clocks: {}
                 DIPSwitches: {}
      DeviceTreeIncludeFiles: {}
       DeviceTreeSourceFiles: {}
                   FPGACores: {}
    FPGAPeripheralInterfaces: {}
                 IOInterface: {}
                        LEDs: {}
                      Memory: {}
                        Name: 'MySoCHardware'
              ProcessorCores: {}
                 PushButtons: {}
                      Resets: {}

To add a new FPGA peripheral interface to the hardwareObj object, use the addNewFPGAPeripheralInterface method. This example adds an interface to connect to the AD936x transceiver.

interfaceObj = addNewFPGAPeripheralInterface(hardwareObj,"AD9361");
interfaceObj.Type = "AD936x"; 
interfaceObj.ConstraintFile = "$(TARGET_ROOT)/src/constr/AD9361.xdc";
interfaceObj.SPIChannelNumber = 1;

To remove the AD9361 FPGA peripheral interface from the hardwareObj object, use the removeFPGAPeripheralInterface method.

removeFPGAPeripheralInterface(hardwareObj,"AD9361");

Version History

Introduced in R2026a