TDES2 contains the address pointer to the first buffer of the descriptor.
Table 41-9 Transmit Descriptor 2
Bit
Description
31:0
Buffer 1 Address Pointer
These bits indicate the physical address of Buffer 1. There is no limitation on the buffer address alignment.
Transmit Descriptor 3 (TDES3)
TDES3 contains the address pointer either to the second buffer of the descriptor or the next descriptor.
Table 41-10 Transmit Descriptor 3
Bit
Description
31:0
Buffer 2 Address Pointer (Next Descriptor Address)
Indicates the physical address of Buffer 2 when a descriptor ring structure is used. If the Second Address Chained (TDES1[24]) bit is set, this address contains the pointer to the physical memory where the Next
Descriptor is present. The buffer address pointer must be aligned to the bus width only when TDES1[24] is set. (LSBs are ignored internally.)
Only
Programming Guide
DMA Initialization – Descriptors
The following operations must be performed to initialize the DMA.
Provide a software reset. This will reset all of the GMAC internal registers and logic. (GMAC_OP_MODE[0]).
T-chip
Wait for the completion of the reset process (poll GMAC_OP_MODE[0], which is only cleared after the reset operation is completed).
Program the following fields to initialize the Bus Mode Register by setting values in register GMAC_BUS_MODE
Mixed Burst and AAL
Fixed burst or undefined burst
Burst length values and burst mode values.
Descriptor Length (only valid if Ring Mode is used)
Tx and Rx DMA Arbitration scheme
Program the AXI Interface options in the register GMAC_BUS_MODE
If fixed burst-length is enabled, then select the maximum burst-length possible on the AXI bus (Bits[7:1])
A proper descriptor chain for transmit and receive must be created. It should also ensure that the receive descriptors are owned by DMA (bit 31 of descriptor should be set). When OSF mode is used, at least two descriptors are required.
Software should create three or more different transmit or receive descriptors in the chain before reusing any of the descriptors.
Initialize receive and transmit descriptor list address with the base address of transmit and receive descriptor (register GMAC_RX_DESC_LIST_ADDR and GMAC_TX_DESC_LIST_ADDR).
Program the following fields to initialize the mode of operation by setting values in register
GMAC_OP_MODE
Receive and Transmit Store And Forward
Receive and Transmit Threshold Control (RTC and TTC)
Hardware Flow Control enable
Flow Control Activation and De-activation thresholds for MTL Receive and Transmit FIFO (RFA and RFD)
Error Frame and undersized good frame forwarding enable
OSF Mode
Clear the interrupt requests, by writing to those bits of the status register (interrupt bits only) which are set. For example, by writing 1 into bit 16 - normal interrupt summary will clear this bit (register GMAC_STATUS).
Enable the interrupts by programming the interrupt enable register GMAC_INT_ENA.
Start the Receive and Transmit DMA by setting SR (bit 1) and ST (bit 13) of the control register GMAC_OP_MODE.