Capabilities templates
PCIe Modeling Library  /  DML template reference  / 

Extended Capabilities templates

These are templates for PCIe Extended Capabilities. They are designed to be applied on a group. For convenience there exists a template defining_xyz_capability for each capability xyz which defines a group xyz with the xyz_capability applied. Most templates only define the registers with their standard access restrictions. If additional behavior is needed, the user of the template must implement this manually.

Each extended capability template uses the following parameters:

Advanced Error Reporting (AER) Capability registers

Virtual Channel (VC) Capability registers

Device Serial Number (DSN) Capability registers

Device Power Budgeting (DPB) Capability registers

Uses the following parameters:

Root Complex Event Collector Endpoint Association (RCECEA) Capability registers

Uses the following parameters:

Multi-Function Virtual Channel (MFVC) Capability registers

RCRB Header (RCRB) Capability registers

Vendor-Specific Extended Capability (VSEC) registers

Access Control Services (ACS) Capability registers

Alternate Routing ID (ARI) Capability registers

Address Translation Service (ATS) Capability registers

This is a partially functional template; the user must implement the method invalidate_received.

Methods

Multicast (MC) Capability registers

Page Request Service (PRS) Capability registers

Methods

Resizable BAR (RBAR) Capability registers

The standard PCIe templates for Base Address Registers automatically find and use the size configured in instances of this template, when enabled.

Uses the following parameters:

VF Resizable BAR (VFRBAR) Capability registers

This template works just like the Resizable Bar (RBAR) template, but is detected and used by the standard PCIe templates for Virtual Function Base Address Registers instead.

Dynamic Power Allocation (DPA) Capability registers

Uses the following parameters:

Transaction Processing Hints (TPH) Requester Extended Capability registers

Uses the following parameters:

Latency Tolerance Reporting (LTR) Capability registers

Secondary PCI Express (SPE) Capability registers

Uses the following parameters:

PASID Extended Capability Structure registers

LN Requester Extended Capability registers

Downstream Port Containment (DPC) Extended Capability registers

Uses the following parameters:

L1 PM Substates Extended Capability registers

Fields to be added upon request.

Precision Time Management (PTM) Capability registers

Fields to be added upon request

M-PCIe Extended Capability registers

FRS Queueing Extended Capability registers

Fields to be added upon request

Readiness Time Reporting Extended Capability registers

Fields to be added upon request

Physical Layer 16.0 GT/s Extended Capability registers

Uses the following parameters:

Lane Margining at the Receiver Extended Capability registers

Uses the following parameters:

Physical Layer 32.0 GT/s Extended Capability registers

Uses the following parameters:

Physical Layer 64.0 GT/s Extended Capability registers

Uses the following parameters:

Designated Vendor-Specific Extended Capability (DVSEC) registers

Hierarchy ID Extended Capability registers

Native PCIe Enclosure Management (NPEM) Extended Capability registers

Alternate Protocol Extended Capability registers

Fields to be added upon request

System Firmware Intermediary (SFI) Extended Capability registers

Fields and access restrictions to be added upon request

Single Root I/O Virtualization (SR-IOV) Extended Capability registers

This is a partially functional template; users must implement the methods get_offset and get_stride, create an array of DML-objects that simulate the configuration header for each virtual function, and add instances of the vf_base_address template for each VF BAR that is implemented by the physical function.

Uses the following parameters:

Methods

Device 3 Extended Capability registers

Flit Logging Extended Capability registers

Flit Performance Measurement Extended Capability registers

Uses the following parameters:

Flit Error Injection Extended Capability registers

Shadow Functions Extended Capability registers

Uses the following parameters:

Data Object Exchange Extended Capability registers

Uses the following parameters:

Methods

DOE Templates

The doe_protocol template should be used to define user-defined DOE protocols. These should be added to a doe_capability instance accordingly. The way this is done is by adding them to the protocols group in the doe_capability. Example:

template doe_custom_protocol is doe_protocol {
    param vendor_id = 0x1234;
    param data_object_type = 0;

    shared method handle_request(const uint32 *req, uint18 req_len,
                                 uint32 * const res, uint18 res_len) {
        return 0;
    }
}

bank pcie_config {
    ...
    is defining_doe_capability;
    group doe {
        group protocols {
            group custom_protocol is doe_custom_protocol;
        }
    }
    ...
}

Methods

The implementation of this abstract method should handle a DOE request for the implemented protocol. This method must at some point (or schedule an event that at some point) call the method response_ready(res_len) (or response_error() which is defined in the instantiating template doe_capability. This should be done when the response has been written to the \p res buffer. The call should contain the length of the response.

@note The size of the response buffer is the param mailbox_len

@param[in] res The request buffer
@param[in] req_len The length of the request
@param[in] req_res The length of the response buffer
@param[out] res The response buffer

Integrity and Data Encryption Extended Capability registers

Null Extended Capability registers

Virtual Function Type 0 Bank

Can be used to implement Virtual Functions, used by SR-IOV capability. Inherits the config_bank template. Note that this template must use the vf_base_address template to implement its Base Address Registers.

Virtual Function Base Address

Can be used to implement Base Address Registers in the SR-IOV capability header. Inherits the template memory_base_address. Expects the parameter map_obj to be an array of mappable objects, one for each Virtual Function.

Capabilities templates