Appendix a: configuration space decoding, A.1 mandatory definitions, A.2 mandatory module functions – Teledyne LeCroy PETracer PCI Express Edge User Manual User Manual

Page 183: Appendix a configuration space decoding

Advertising
background image

PETracer Edge User Manual Appendix A: Configuration Space Decoding

Teledyne LeCroy

175

Appendix A: Configuration Space

Decoding

The decoded capability structures in the Configuration Space Viewer and Editor are
based on programmed definitions in the PETracer software and on Configuration Space
Decode Scripts.
Configuration Space Decode Scripts are tools to define capability structures and instruct
the Configuration Space Viewer or Editor how to decode them. These scripts are in the
\CfgSpaceScripts sub-directory below the \Scripts directory in the application directory.
You can write Configuration Space Decode Scripts using the CATC Scripting Language
(CSL). See the Teledyne LeCroy Analyzers File Based Decoding Manual for reference.
PCI Express Configuration Space Decode Scripts have the file extension .pecfgdec.

A.1 Mandatory Definitions

Configuration Space Decode Scripts must set the following reserved variables.

CapabilityName: Name of the capability structure

CapabilityID: ID of the capability structure

ExtAddSpace: Set to 1 if Extended Configuration Space.

Otherwise, set to 0 for PCI.

A.2 Mandatory Module Functions

Modules are collections of functions and data dedicated to decoding a specific capability
structure. Each module has one primary Configuration Space Decode Script file
(extension .pecfgdec) and optionally has include files (.inc).
A module function is an entry-point into a decoding module. To help display a
capability structure, the application calls a module function.
The Configuration Space Editor and Viewer support only the DecodeRegister( offset )
and GetSize( ) functions.

DecodeRegister( offset )

The application calls this function while decoding a specific DWORD offset of the
specified CapabilityID. The offset is the decoding entry point, where the decoding path
starts.
The Configuration Space Editor calls this function to determine how to decode the
assigned configuration space. The offset parameter is the DWORD to decode.

An offset of 0 indicates bytes 00h-03h, an offset of 1 indicates bytes 04h-07h, and so on.
Note: The Configuration Space Editor can only decode one DWORD at a time.

GetSize()

This function returns the size of the capability structure specified by CapabilityID.

Advertising