This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Type definition for PCI configuration space structure


typedef struct xpcPCIDeviceStruct{
    uint32_T BaseAddress[6];
    uint32_T VirtAddress[6];
    uint32_T Length[6];
    uint16_T AddressSpaceIndicator[6];
    uint16_T MemoryType[6];
    uint16_T Prefetchable[6];
    uint16_T InterruptLine;
    uint16_T VendorId;
    uint16_T DeviceId;
    uint16_T SubDeviceId;
    uint16_T SubVendorId;
} xpcPCIDevice;

Header File




Physical base addresses that the PCI BIOS assigns.


Virtual address of device. You can enter the return value from xpcReserveMemoryRegion. See Description for details.


Length of each region. This value contains the number of bytes that the board segment responds to during the configuration space read. This value can be larger than the space required by the registers as specified in the manufacturer documentation.


Indicates whether the board is I/O port mapped or memory-mapped. Values are one of the following. Check this value in the manufacturer documentation.




I/O port mapped


Type of memory. This field is relevant only if AddressSpaceIndicator has a value of 0.


Located anywhere in the 32-bit address space


Located below 1 MB


Located anywhere in the 64-bit address space


Indicates whether the memory is prefetchable. Typically, this field is not required.


Contains the assigned interrupt line, values from 0 through 15. The BIOS assigns this value. You need this value only if you are writing an interrupt driver.


Contains vendor ID.


Contains device ID.


Contains subdevice ID.


Contains subvendor ID.


The xpcPCIDevice structure defines the PCI configuration space structure. The following are additional notes on the BaseAddress field:

  • The PCI specification allows the definition of up to six different base addresses (addressable regions). Most boards respond to one or two of these addresses. Base addresses are filled in during the BIOS plug and play initialization, before the Simulink® Real-Time™ kernel starts to execute. The designer of the board decides how many address spaces are defined and what they are used for. Many boards use one address space to contain all of the registers for the board, other boards separate functions into different address spaces. See the board manufacturer documentation for this information.

  • For memory-mapped segments, call the xpcReserveMemoryRegion function to convert the physical address in BaseAddress to a virtual address. The CPU uses this address to read and write the segment. You can then optionally save this address in the VirtAddress field. Save the address if you have several segments and you want to pass them to a board access library.

Was this topic helpful?