Read Completion Boundary - 3.4 English

Versal Adaptive SoC CPM Mode for PCI Express Product Guide (PG346)

Document ID
Release Date
3.4 English

A memory read can be answered with multiple completions, which when put together return all requested data. To make room for packet-header overhead, the user application must allocate enough space for the maximum number of completions that might be returned.

To make this process easier, the PCI Express Base Specification quantizes the length of all completion packets such that each completion must start and end on a naturally aligned read completion boundary (RCB), unless, it services the starting or ending address of the original request. Requests which cross the address boundaries at integer multiples of RCB bytes can be completed using more than one completion, but the returned data must not be fragmented except along the following address boundaries:

  • The first completion must start with the address specified in the request, and must end at one of the following:
    • The address specified in the request plus the length specified by the request (for example, the entire request).
    • An address boundary between the start and end of the request at an integer multiple of RCB bytes.
  • The final completion must end with the address specified in the request plus the length specified by the request.
  • All completions between, but not including, the first and final completions must be an integer multiple of RCB bytes in length.

The programmed value of RCB is provided on cfg_rcb_status[3:0]. The bit index are associated to the physical function numbers; for example, cfg_rcb_status[0] and cfg_rcb_status[1] are associated with physical functions 0 and 1 respectively (Per Function Link Control register [3]). If the user application does not read the RCB value, it must use the default value of 64 bytes.

Table 1. Read Completion Boundary Settings

cfg_rcb_status[0] or cfg_rcb_status[1] or cfg_rcb_status[2] or cfg_rcb_status[3]

Read Completion Boundary
Bytes DW QW Credits
0 64 16 8 4
1 128 32 16 8

When calculating the number of completion credits a non-posted request requires, you must determine how many RCB-bounded blocks the completion response might be required, which is the same as the number of completion header credits required.