Visible to Intel only — GUID: fkt1589498587678
Ixiasoft
Visible to Intel only — GUID: fkt1589498587678
Ixiasoft
9.1. Queue Control (QCSR)
QCSR space contains queue control and status information. This register space of 1 MB can support up to 2048 H2D and 2048 D2H queues, where each queue is allocated 256 bytes of register space. The memory space allocated to each function is enough for each function to have allocated all the DMA Channels. However, the actual number depends on the parameters input at IP generation time.
Address [7:0] : Registers for the queues
Address [18:8]: Queue number
Address [19]: 0 = D2H, 1=H2D
The following registers are defined for H2D/D2H queues. The base address for H2D and D2H are different, but registers (H2D and D2H) has the same address offsets.
Register Name | Address Offset | Access Type | Description |
---|---|---|---|
Q_CTRL | 8’h00 | R/W | Control Register |
RESERVED | 8’h04 | RESERVED | |
Q_START_ADDR_L | 8’h08 | R/W | Lower 32-bit of queue base address in system memory. This is the beginning of the linked-list of 4KB pages containing the descriptors. |
Q_START_ADDR_H | 8’h0C | R/W | Upper 32-bit of queue base address in system memory. This is the beginning of the linked-list of 4KB pages containing the descriptors. |
Q_SIZE | 8’h10 | R/W | Number of max entries in a queue. Powers of 2 only. |
Q_TAIL_POINTER | 8’h14 | R/W | Current pointer to the last valid descriptor queue entry in the host memory. |
Q_HEAD_POINTER | 8’h18 | RO | Current pointer to the last descriptor that was fetched. Updated by Descriptor Fetch Engine. |
Q_COMPLETED_POINTER | 8’h1C | RO | Last completed pointer after DMA is done. Software can poll this for status if Writeback is disabled. |
Q_CONSUMED_HEAD_ADDR_L | 8’h20 | R/W | Lower 32-bit of the system address where the ring consumed pointer is stored. This address is used for comsumed pointer writeback. |
Q_CONSUMED_HEAD_ADDR_H | 8’h24 | R/W | Upper 32-bit of the system address where the ring consumed pointer is stored. This address is used for comsumed pointer writeback. |
Q_BATCH_DELAY | 8’h28 | R/W | Delay the descriptor fetch until the time elapsed from a prior fetch exceeds the delayvalue in this register to maximize fetching efficiency. |
Q_DATA_DRP_ERR_CTR | 8’h40 | RW | Data drop error counter |
Q_PYLD_CNT | 8’h44 | R/W | 20-bit payload count. DMA payload size in bytes and must be 64 byte aligned. Max 1 MB, with 20’h0 indicating 1 MB. The value set in this register must be the same as used by Host SW to populate the PYLD_CNT field of descriptors for the respective channel. Applicable only for D2H AVST 1 port mode. Unused in all other modes |
Q_RESET | 8’h48 | R/W | Request reset for the queue by writing 1’b1 to this register, and poll for value of 1’b0 when reset has been completed by hardware. Hardware clears this bit after completing the reset of a queue. Similar process occurs when FLR reset is detected for a VF. |
The following registers are defined for each implemented H2D and D2H queue. The total QCSR address space for each H2D/D2H is 256B and requires 8-bit of address.
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:10] | rsvd | Reserved | ||
[9] | q_intr_en | R/W | 0 | If set, upon completion generate a MSI-X interrupt. |
[8] | q_wb_en | R/W | 0 | If set, upon completion, do a write back. |
[7:1] | rsvd | Reserved | ||
[0] | q_en | R/W | 0 | Enable. Once it is enabled, the DMA starts fetching pending descriptors and executing them. |
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:0] | q_strt_addr_l | R/W | 0 | After software allocate the descriptor ring buffer, it writes the lower 32-bit allocated address to this register. The descriptor fetch engine use this address and the pending head/tail pointer to fetch the descriptors. |
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:0] | q_strt_addr_h | R/W | 0 | After software allocate the descriptor ring buffer, it writes the upper 32-bit allocated address to this register. The descriptor fetch engine use this address and the pending head/tail pointer to fetch the descriptors. |
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:5] | rsvd | Reserved | ||
[4:0] | q_size | R/W | 1 | Size of the descriptor ring in power of 2 and max value of 16. The unit is number of descriptors. Hardware defaults to using a value of 1 if an illegal value is written. A value of 1 means queue size of 2 (2^1). A value is 16 (0x10) means queue size of 64K (2^16). |
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:16] | rsvd | Reserved | ||
[15:0] | q_tl_ptr | R/W | 0 | After software sets up a last valid descriptor in the descriptor buffer, it programs this register with the position of the last (tail) valid descriptor that is ready to be executed. The DMA Descriptor Engine fetches descriptors from the buffer upto this position of the buffer.
Note: Writing 0x0 to Q_TAIL_POINTER is illegal.
|
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:16] | rsvd | Reserved
Note: Bit 24 is not reserved. For bit [24] q_err_during_desc_fetch H2D : Cmplto/UR etc… D2H : Cmplto/UR etc…
|
||
[15:0] | q_hd_ptr | R/W | 0 | After DMA Descriptor Fetch Engine fetches the descriptors from the descriptor buffer, upto the tail pointer, it updates this register with that last fetched descriptor position. The fetch engine only fetches descriptors if the head and tail pointer is not equal. |
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:16] | rsvd | Reserved | ||
[15:0] | q_cmpl_ptr | R/W | 0 | This register is updated by hardware to store the last descriptor position (pointer) that DMA has completed, that is all data for that descriptor and previous descriptors have arrived at the intended destinations. Software can poll this register to find out the status of the DMA for a specific queue. |
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:0] | q_cnsm_hd_addr_l | R/W | 0 | Software programs this register with the lower 32-bit address location where the writeback targets after DMA is completed for a descriptor with writeback bit enabled. |
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:0] | q_cnsm_hd_addr_h | R/W | 0 | Software programs this register with the upper 32-bit address location where the writeback targets after DMA is completed for a set of descriptors. |
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:20] | rsvd | Reserved | ||
[19:0] | q_batch_dscr_delay | R/W | 0 | Software programs this register with the amount of time between fetches for descriptors. Each unit is 2ns. |
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:21] | rsvd | - | - | - |
[20] | q_d2h_data_drop_err_st | R/W | 0 | D2H data drop error status for a channel. This bit is set when packets are received for a channel that is not enabled or when packets are dropped for a channel that is enabled. |
[19] | rsvd | - | - | - |
[18] | rsvd | - | - | - |
[17] | q_data_err_mm | R/W | 0 | Data error status for a channel in AVMM mode |
[16] | q_data_err_st | R/W | 0 | Data error status for a channel in AVST mode |
[15:0] | q_data_drp_err_cnt | R/W | 0 | Data drop error count. The error count is updated by the hardware and count increments whenever the D2H side drops a packet. The error count saturates at all 1s and needs software to clear.
Data drop example cases:
Note: For packets received for a channel that is enabled, TID update is done by software. However, the descriptors that are not yet fetched, are not dropped.
|
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:20] | rsvd | Reserved | ||
[19:0] | q_pyld_cnt | R/W | 0 | 20-bit payload count. DMA payload size in bytes. Max 1 MB, with 20’h0 indicating 1 MB. This value has to be same as set in the descriptors payload count field. Applicable only for D2H AVST 1 port mode. Unused in all other modes |
Bit [31:0] | Name | R/W | Default | Description |
---|---|---|---|---|
[31:1] | rsvd | Reserved | ||
[0] | q_reset | R/W | 0 | Request reset for the queue by writing 1’b1 to this register, and poll for value of 1’b0 when reset has been completed by hardware. Hardware clears this bit after completing the reset of a queue. |