www.ti.com
EMAC Functional Architecture
2.5.4Transmit Buffer Descriptor Format
A transmit (TX) buffer descriptor (Figure 9) is a contiguous block of four
Example 1 shows the transmit buffer descriptor described by a C structure.
|
|
|
|
| Figure 9. Transmit Descriptor Format | |||
(a) Word 0 |
|
|
|
|
|
|
| |
31 |
|
|
|
|
|
|
| 0 |
|
|
|
|
|
| Next Descriptor Pointer |
| |
(b) Word 1 |
|
|
|
|
|
|
| |
31 |
|
|
|
|
|
|
| 0 |
|
|
|
|
|
| Buffer Pointer |
| |
(c) Word 2 |
|
|
|
|
|
|
| |
31 |
|
|
|
|
| 16 | 15 | 0 |
|
|
| Buffer Offset |
|
|
| Buffer Length | |
(d) Word 3 |
|
|
|
|
|
|
| |
31 | 30 | 29 | 28 | 27 | 26 | 25 |
| 16 |
SOP | EOP | OWNER | EOQ | TDOWN | PASS |
|
| Reserved |
|
|
|
| CMPLT | CRC |
|
|
|
15 |
|
|
|
|
|
|
| 0 |
|
|
|
|
|
| Packet Length |
|
Example 1. Transmit Descriptor in C Structure Format
/*
//EMAC Descriptor
//The following is the format of a single buffer descriptor
//on the EMAC.
*/ |
|
|
|
typedef struct _EMAC_Desc { |
|
| |
struct _EMAC_Desc *pNext; | /* Pointer to next descriptor in chain | */ | |
Uint8 | *pBuffer; | /* Pointer to data buffer | */ |
Uint32 | BufOffLen; | /* Buffer Offset(MSW) and Length(LSW) | */ |
Uint32 | PktFlgLen; | /* Packet Flags(MSW) and Length(LSW) | */ |
} EMAC_Desc; |
|
/* Packet Flags */ |
|
#define EMAC_DSC_FLAG_SOP | 0x80000000u |
#define EMAC_DSC_FLAG_EOP | 0x40000000u |
#define EMAC_DSC_FLAG_OWNER | 0x20000000u |
#define EMAC_DSC_FLAG_EOQ | 0x10000000u |
#define EMAC_DSC_FLAG_TDOWNCMPLT | 0x08000000u |
#define EMAC_DSC_FLAG_PASSCRC | 0x04000000u |
30 | Ethernet Media Access Controller (EMAC)/Management Data Input/Output (MDIO) | SPRU975B |
|
| Submit Documentation Feedback |