Specifications

RX62N Group Ethernet Transmit and Receive Settings
4.3 22BDescriptor Definition in Sample Program
The EDMAC does not use the padding area of the descriptor. It can be used freely by the user. The sample program
uses this area to specify the start address of the next descriptor, creating a linked structure in software.
Figure 4.17 shows the transmit and receive descriptors, and the buffers, used by the sample program.
Receive Descriptors
status
Char *buf_p RX_BUFF
RX_BUFF
RX_BUFF
Discript *next
bufsize size
status
Char *buf_p
Discript *next
bufsize size
status
Char *buf_p
Discript *next
bufsize size
Transmit Descriptors
status
Char *buf_p TX_BUFF
TX_BUFF
TX_BUFF
Discript *next
bufsize size
status
Char *buf_p
Discript *next
bufsize size
status
Char *buf_p
Discript *next
bufsize size
Figure 4.17 Transmit and Receive Descriptors, and Buffers
The descriptors comprise the transmit descriptors TD0, TD1, and TD2, which are 32-bit units, and the receive
descriptors RD0, RD1, and RD2, which are also 32-bit units. The sample program defines RBL, the upper 16 bits of the
32-bit unit RD1 (TBL, the upper 16 bits of the 32-bit unit TD1), as the structure member bufsize, and the lower 16 bits
of RD1 as the structure member size. The other 32-bit units are defined as members of 32-bit size.
When allocated in the RAM, the descriptors operate according to the endian setting of the bus. (The on-chip RAM
uses the endian mode of the CPU.) The EDMAC accesses the descriptors in 32-bit units. Therefore, bufsize and size
must be allocated in the RAM according to the conditions below to ensure that their contents match when accessed in
32-bit or 16-bit units. No such conditions apply to the other members because they are defined as 32-bit size.
When the RAM to which a descriptor is allocated is set to big-endian mode
Set the address allocation of the 32-bit unit RD1 (TD1) such that the member bufsize defined for the upper 16 bits is
assigned the low-order address and the member size defined for the lower 16 bits is assigned the high-order address.
When the RAM to which a descriptor is allocated is set to little-endian mode
Set the address allocation of the 32-bit unit RD1 (TD1) such that the member bufsize defined for the upper 16 bits is
assigned the high-order address and the member size defined for the lower 16 bits is assigned the low-order address.
The descriptors of the sample program are defined as structures using macros defined by the compiler, as described
below.
R01AN0629EJ0101 Rev.1.01 Page 32 of 52
Mar 31, 2011