Function Map Table - 3.4 English - PG347

Versal Adaptive SoC CPM DMA and Bridge Mode for PCI Express Product Guide (PG347)

Document ID
PG347
Release Date
2024-11-22
Version
3.4 English

The Function Map Table is used to allocate queues to each function. The index into the RAM is the function number. Each entry contains the base number of the physical QID and the number of queues allocated to the function. It provides a function based, queue access protection mechanism by translating and checking accesses to logical queues (through QDMA_TRQ_SEL_QUEUE_PF and QDMA_TRQ_SEL_QUEUE_VF address space) to their physical queues. Direct register accesses to queue space beyond what is allocated to the function in the table will be canceled and an error will be logged.

Function map can be accessed through the indirect context register space QMDA_IND_CTXT_CMD registers, with QDMA_IND_CTXT_CMD.sel = 0xC. When accessed through indirect context register space, the context structure is defined by the Function Map Context Structure table. Along with FMAP table programming in the IP, you must program the FMAP table in the Mailbox IP. This is needed for function level reset (FLR) procedure.

FMAP Programing in QDMA IP

  1. Program Function Map Context structure in QDMA_IND_CTXT_DATA (0x804 - 0x820) registers as listed in the following table.
  2. Program QDMA_IND_CTXT_CMD registers
    1. [19:7] : function number
    2. [6:5] : 2'h1 (write a context data)
    3. [4:1] : 4'hC (FMAP)

For more information on QDMA_IND_CTXT_CMD (0x844), refer qdma_v5_0_pf_registers.csv available in the Register Reference File.

Because these spaces exist only in the PF address map, only a physical function can modify this table.

Table 1. Function Map Context Structure (0xC)
Bits Bit Width Field Name Description
[255:44]     Reserved. Set to 0.
[44:32] 13 Qid_max Maximum number of queues this function has.
[31:12]     Reserved. Set to 0.
[11:0] 12 Qid_base The base queue ID for the function.

FMAP Programing in Mailbox IP

FMAP table in Mailbox can be only updated from PF. FMAP table in mailbox is at 0x43100 + (function number *4).

Address
  • Function 0 FMAP address is at 0x43100
  • And remaining 255 function can follow 0x43100 + (func*4)
Data
Look at the following table for the data description.
Table 2. Function Map Table in Mailbox
Bits Bit Width Field Name Description
[31:22]     Reserved.
[23:12] 12 Old_max Maximum number of queues this function has.
[11:0] 12 Old_max The base queue ID for the function.