Documentation

SimulinkRealTime.target.getPCIInfo

Return information about PCI boards installed in target computer

Syntax

getPCIInfo(target_object)
getPCIInfo(target_object,'ethernet')
getPCIInfo(target_object, 'all')
getPCIInfo(target_object, 'verbose')
pci_devices = getPCIInfo(target_object, ___)
getPCIInfo(target_object, 'supported')
pci_devices_supported = getPCIInfo(target_object, 'supported')

Description

example

getPCIInfo(target_object) queries the target computer, represented by target_object, for installed PCI devices other than Ethernet controllers that the Simulink® Real-Time™ block library supports. To retrieve information about Ethernet controllers, use the 'ethernet' option.

The software displays in the Command Window information about the PCI devices that getPCIInfo found, including:

  • PCI bus number

  • Slot number (PCI device number)

  • PCI function number

  • Assigned IRQ number

  • Vendor (manufacturer) name

  • Device (board) name

  • Device type

  • Vendor PCI ID

  • Device PCI ID

  • Device release version

Before you can use this call, check that the target computer has started under the Simulink Real-Time kernel and that the Ethernet link is working. The real-time application can be loaded or the loader can be active and waiting for input. You can check these preconditions by calling the function SimulinkRealTime.pingTarget.

Before building the model, you can use getPCIInfo to find resources to enter into a driver block dialog box. Such resources include PCI bus number, slot number, and assigned IRQ number.

example

getPCIInfo(target_object,'ethernet') queries the target computer, represented by target_object, for Ethernet controllers that are installed.

example

getPCIInfo(target_object, 'all') displays information about all of the PCI devices found on the target computer represented by target_object. This information includes graphics controllers, Ethernet cards, SCSI cards, and devices that are part of the motherboard chip set (for example, PCI-to-PCI bridges).

example

getPCIInfo(target_object, 'verbose') shows the information displayed by getPCIInfo(target_object, 'all') for the target computer represented by target_object, plus information about the PCI addresses that the BIOS assigns to this board.

example

pci_devices = getPCIInfo(target_object, ___) queries the target computer represented by target_object according to the additional arguments you supplied. The call returns a structure containing information about the PCI devices that the software found on the target computer.

example

getPCIInfo(target_object, 'supported') displays a list of the PCI devices supported by the Simulink Real-Time block library. This call does not access the target computer, so the Ethernet link does not have to be active.

example

pci_devices_supported = getPCIInfo(target_object, 'supported') returns a structure containing a list of devices supported by Simulink Real-Time. This call does not access the target computer, so the Ethernet link does not have to be active.

Examples

collapse all

Start the default target computer with the Simulink Real-Time kernel. Check the connection between the development and the target computer. At the command prompt, type the command on the development computer. The command returns all supported devices other than Ethernet cards.

slrtpingtarget
target_object = slrt;
getPCIInfo(target_object)
List of installed PCI devices:

General Standards        PMC-ADADIO
     Bus 6, Slot 4, Function 0, IRQ 10
     AI AO DI DO
     VendorID 0x10b5, DeviceID 0x9080, SubVendorID 0x10b5, ...
         SubDeviceID 0x2370
     A/D Chan: 0, D/A Chan: 4, DIO Chan: 8
     Released in: R14SP2 or Earlier
     Notes: Uses Compact PCI and PCI carriers 
.
.
.

Start the default target computer with the Simulink Real-Time kernel. Check the connection between the development and target computers. At the MATLAB® command prompt, type the command on the development computer.

slrtpingtarget
target_object = slrt;
getPCIInfo(target_object, 'ethernet')
List of installed PCI devices:

Intel                    82579LM
     Bus 0, Slot 25, Function 0, IRQ 3
     Ethernet controller
     VendorID 0x8086, DeviceID 0x1502, SubVendorID 0x15bd, ...
         SubDeviceID 0x100a
     Released in: R2012b
     Notes: Intel 8254x Gigabit Ethernet series

Intel                    82574L
     Bus 5, Slot 0, Function 0, IRQ 10
     Ethernet controller
     VendorID 0x8086, DeviceID 0x10d3, SubVendorID 0x15bd, ...
         SubDeviceID 0x100a
     Released in: R2010a
     Notes: Intel 8254x Gigabit Ethernet series

Start the default target computer with the Simulink Real-Time kernel. Check the connection between the development and target computers. At the command prompt, type the command on the development computer.

slrtpingtarget
target_object = slrt;
getPCIInfo(target_object, 'all')
List of installed PCI devices:

Intel                    Unknown
     Bus 0, Slot 0, Function 0, IRQ 0
     Host Bridge
     VendorID 0x8086, DeviceID 0x0150, SubVendorID 0x8086, ...
         SubDeviceID 0x0150
.
.
.
Intel                    82579LM
     Bus 0, Slot 25, Function 0, IRQ 3
     Ethernet controller
     VendorID 0x8086, DeviceID 0x1502, SubVendorID 0x15bd, ...
         SubDeviceID 0x100a
     Released in: R2012b
     Notes: Intel 8254x Gigabit Ethernet series.
.
.
.

Start the default target computer with the Simulink Real-Time kernel. Check the connection between the development and target computers. At the command prompt, type the command on the development computer.

slrtpingtarget
target_object = slrt;
getPCIInfo(target_object, 'verbose')
List of installed PCI devices:

Intel                    Unknown
     Bus 0, Slot 0, Function 0, IRQ 0
     Host Bridge
     VendorID 0x8086, DeviceID 0x0150, SubVendorID 0x8086, ...
         SubDeviceID 0x0150
     BaseClass 6, SubClass 0

Intel                    Unknown
     Bus 0, Slot 1, Function 0, IRQ 10
     PCI-to-PCI Bridge
     VendorID 0x8086, DeviceID 0x0151, SubVendorID 0x0000, ...
         SubDeviceID 0x0000
     BaseClass 6, SubClass 4
     BAR BaseAddress AddressSpace       MemoryType PreFetchable
      2)       10100       Memory   32-bit decoder           no
      3)          F0       Memory   32-bit decoder           no
      4)        FFF0       Memory   32-bit decoder           no
      5)       1FFF0          I/O                              
.
.
.

Start the default target computer with the Simulink Real-Time kernel. Check the connection between the development and target computers. At the command prompt, type the command on the development computer. The command returns all supported devices other than Ethernet cards. Display a structure in the vector.

slrtpingtarget
target_object = slrt;
pci_devices = getPCIInfo(target_object);
pci_devices(16)
ans = 

  struct with fields:

              Bus: 6
             Slot: 4
         Function: 0
         VendorID: '10B5'
         DeviceID: '9080'
      SubVendorID: '10B5'
      SubDeviceID: '2370'
        BaseClass: '11'
         SubClass: '80'
        Interrupt: 10
    BaseAddresses: [1×6 struct]
       VendorName: 'General Standards'
          Release: 'R14SP2 or Earlier'
            Notes: 'Uses Compact PCI and PCI carriers'
       DeviceName: 'PMC-ADADIO'
       DeviceType: 'AI AO DI DO'
           ADChan: '0'
           DAChan: '4'
          DIOChan: '8' 

Start the default target computer with the Simulink Real-Time kernel. Check the connection between the development and target computers. At the command prompt, type the command on the development computer. Display the first structure in the vector.

slrtpingtarget
target_object = slrt;
pci_devices = getPCIInfo(target_object, 'all');
pci_devices(1)
ans = 

  struct with fields:

              Bus: 0
             Slot: 0
         Function: 0
         VendorID: '8086'
         DeviceID: '150'
      SubVendorID: '8086'
      SubDeviceID: '150'
        BaseClass: '6'
         SubClass: '0'
        Interrupt: 0
    BaseAddresses: [1×6 struct]
       VendorName: 'Intel'
          Release: ''
            Notes: ''
       DeviceName: 'Unknown'
       DeviceType: 'Host Bridge'
           ADChan: ''
           DAChan: ''
          DIOChan: ''

Start the default target computer with the Simulink Real-Time kernel. To get the target_object, use SimulinkealTime.target. Check the connection between the development and target computers. At the command prompt, type the command on the development computer. Display the first structure in the vector.

SimulinkRealTime.pingTarget('TargetPC1')
pci_devices = getPCIInfo(target_object,'verbose');
pci_devices(1)
ans = 

  struct with fields:

              Bus: 0
             Slot: 0
         Function: 0
         VendorID: '8086'
         DeviceID: '150'
      SubVendorID: '8086'
      SubDeviceID: '150'
        BaseClass: '6'
         SubClass: '0'
        Interrupt: 0
    BaseAddresses: [1×6 struct]
       VendorName: 'Intel'
          Release: ''
            Notes: ''
       DeviceName: 'Unknown'
       DeviceType: 'Host Bridge'
           ADChan: ''
           DAChan: ''
          DIOChan: ''

At the command prompt, type the commands on the development computer. The target computer does not have to be active.

target_object = SimulinkRealTime.target
getPCIInfo(target_object, 'supported')
List of supported PCI devices:

Vendor                    Device                    Type...

ADLINK                    PCI-6208A                 AO DI DO ...
B&B Electronics (Quatech) DSCP-200/300 (PXI)        Serial Ports...
.
.
.
Speedgoat                 IO333-325K-SFP (XMC-FPGA) DI DO (LVDS/...
Speedgoat                 IO333-410K-SFP (XMC-FPGA) DI DO (LVDS/...

At the command prompt, type the commands on the development computer. The target computer does not have to be active.

target_object = SimulinkRealTime.target
pci_devices_supported = getPCIInfo(target_object, 'supported');
pci_devices_supported(1)
ans = 

  struct with fields:

       VendorID: '144A'
       DeviceID: '6208'
    SubVendorID: '-1'
    SubDeviceID: '-1'
     DeviceName: 'PCI-6208A'
     VendorName: 'ADLINK'
     DeviceType: 'AO DI DO'
         DAChan: '8'
         ADChan: '0'
        DIOChan: '4'
        Release: 'R14SP2 or Earlier'
          Notes: 'PCI-6208A features 8 current outputs with ...
                 ranges of 0-20 mA, 4-20 mA, and 5-25 mA'

Input Arguments

collapse all

Object that represents the target computer. Before calling this function, make sure that you start the target computer with the Simulink Real-Time kernel and apply the required Ethernet link settings.

Example: tg

Output Arguments

collapse all

The vector that getPCIInfo returns when you call it without an argument contains information only for those PCI devices that the Simulink Real-Time library blocks support.

The vectors returned by getPCIInfo with the arguments 'all' and 'verbose' contain information about all PCI devices in the target computer. The vectors are identical.

The fields in this structure are:

Bus and Slot uniquely identify a device in the target computer.

Slot and Bus uniquely identify a device in the target computer.

Function uniquely identifies the function of a device in the target computer.

Hexadecimal numeric character vector containing the identifier that the PCI standards organization assigns to the manufacturer of this device or bus adapter.

Hexadecimal numeric character vector containing the identifier that the manufacturer assigns to this device or bus adapter.

Hexadecimal numeric character vector containing the identifier that the PCI standards organization assigns to the manufacturer of the entire subsystem (board).

Hexadecimal numeric character vector containing the identifier that the manufacturer assigns to this subsystem (board).

Hexadecimal numeric character vector containing the standard PCI base classification of this device or bus adapter. BaseClass and SubClass identify the type and function of the device.

Hexadecimal numeric character vector containing the standard PCI subclass classification of this device or bus adapter. SubClass and BaseClass identify the type and function of the device.

Provides the board-level interrupt that the device or bus adapter uses to trigger I/O with the target computer CPU.

For each BAR that this device or bus adapter uses, the vector contains a structure with the following fields:

  • 0 — Memory address

  • 1 — I/O address

Hexadecimal character vector containing the base memory address that the device uses.

Not used if AddressSpaceIndicator is 1 (I/O address).

  • 0 — 32-bit address decode

  • 1 — 64-bit address decode

Not used if AddressSpaceIndicator is 1 (I/O address).

  • 0 — Address cannot be prefetched

  • 1 — Address can be prefetched

Identifies the vendor of the specific device or bus adapter. Set to 'Unknown' for unknown devices or bus adapters.

If the Simulink Real-Time block library supports the device, it contains the MATLAB and Simulink release version in which the driver was released. Otherwise, it contains an empty vector.

Contains additional description of the device or bus adapter.

Identifies the specific device or bus adapter. Set to 'Unknown' for unknown devices or bus adapters.

Contains abbreviations such as 'DI' (digital input) that indicate the function or functions of the device or bus adapter.

Decimal numeric character vector containing the number of analog inputs to the device.

Decimal numeric character vector containing the number of analog outputs from the device.

Decimal numeric character vector containing the number of digital inputs and outputs to and from the device.

Vector of information about the devices and bus adapters that the blocks in the Simulink Real-Time block library represent.

The fields are as follows:

Hexadecimal numeric character vector containing the identifier that the PCI standards organization assigns to the manufacturer of this device or bus adapter.

Hexadecimal numeric character vector containing the identifier that the manufacturer assigns to this device or bus adapter.

Hexadecimal numeric character vector containing the identifier that the PCI standards organization assigns to the manufacturer of the entire subsystem (board).

Hexadecimal numeric character vector containing the identifier that the manufacturer assigns to this subsystem (board).

Identifies the specific device or bus adapter. Set to 'Unknown' for unknown devices or bus adapters.

Identifies the vendor of the specific device or bus adapter. Set to 'Unknown' for unknown devices or bus adapters.

Contains abbreviations such as 'DI' (digital input) that indicate the function or functions of the device or bus adapter.

Decimal numeric character vector containing the number of analog outputs from the device.

Decimal numeric character vector containing the number of analog inputs to the device.

Decimal numeric character vector containing the number of digital inputs and outputs to and from the device.

If the Simulink Real-Time block library supports the device, it contains the MATLAB and Simulink release version in which the driver was released. Otherwise, it contains an empty vector.

Contains additional description of the device or bus adapter.

Introduced in R2014a

Was this topic helpful?