GR740-UM-DS, Nov 2017, Version 1.7
416
www.cobham.com/gaisler
GR740
35.6.2 Setting up the core for transmission
Four steps need to be performed before transmissions can be done with the core. First the link inter-
face must be enabled and started by writing the appropriate value to the ctrl register. Then the address
to the descriptor table needs to be written to the transmitter descriptor table address register and one or
more descriptors must also be enabled in the table. Finally, the txen bit in the DMA control register is
written with a one which triggers the transmission. These steps will be covered in more detail in the
next sections.
35.6.3 Enabling descriptors
The descriptor table address register works in the same way as the receiver’s corresponding register
which was covered in section 35.5. The maximum size is 1024 bytes as for the receiver but since the
descriptor size is 16 bytes the number of descriptors is 64.
To transmit packets one or more descriptors have to be initialized in memory which is done in the fol-
lowing way: The number of bytes to be transmitted and a pointer to the data has to be set. There are
two different length and address fields in the transmit descriptors because there are separate pointers
for header and data. If a length field is zero the corresponding part of a packet is skipped and if both
are zero no packet is sent. The maximum header length is 255 bytes and the maximum data length is
16 MiB - 1. When the pointer and length fields have been set the enable bit should be set to enable the
descriptor. This must always be done last. The other control bits must also be set before enabling the
descriptor.
The transmit descriptors are 16 bytes in size so the maximum number in a single table is 64. The dif-
ferent fields of the descriptor together with the memory offsets are shown in the tables below.
The HC bit should be set if RMAP CRC should be calculated and inserted for the header field and
correspondingly the DC bit should be set for the data field. The header CRC will be calculated from
the data fetched from the header pointer and the data CRC is generated from data fetched from the
data pointer. The CRCs are appended after the corresponding fields. The NON-CRC bytes field is set
to the number of bytes in the beginning of the header field that should not be included in the CRC cal-
culation.
The CRCs are sent even if the corresponding length is zero, but when both lengths are zero no packet
is sent not even an EOP.
35.6.4 Starting transmissions
When the descriptors have been initialized, the transmit enable bit in the DMA control register has to
be set to tell the core to start transmitting. New descriptors can be activated in the table on the fly
(while transmission is active). Each time a set of descriptors is added the transmit enable bit in the
corresponding DMA channel control/status register should be set. This has to be done because each
time the core encounters a disabled descriptor this register bit is set to 0.
Table 546.
GRSPW transmit descriptor word 0 (address offset 0x0)
31
18 17 16 15 14 13 12 11
8
7
0
RESERVED
DC HC LE IE WR EN
NONCRCLEN
HEADERLEN
31: 18
RESERVED
17
Append data CRC (DC) - Append CRC calculated according to the RMAP specification after the
data sent from the data pointer. The CRC covers all the bytes from this pointer. A null CRC will
be sent if the length of the data field is zero.
16
Append header CRC (HC) - Append CRC calculated according to the RMAP specification after the
data sent from the header pointer. The CRC covers all bytes from this pointer except a number of
bytes in the beginning specified by the non-crc bytes field. The CRC will not be sent if the header
length field is zero.