
GR716-DS-UM, May 2019, Version 1.29
287
www.cobham.com/gaisler
GR716
To enable a descriptor the enable (EN) bit should be set and after this is done, the descriptor should
not be touched until the enable bit has been cleared by the core.
31.4.3 Packet mode
In packet mode, each descriptor corresponds to one received packet. The maximum length of a packet
can be 65535 bytes. There is no check for too long packets. Reception of any too long packet will
result in indeterministic behavior. The length of the received packet is automatically written into
descriptor word 0.
31.4.4 Framing mode
In framing mode, each pair of descriptors correspond to one fixed length field as the CCSDS Teleme-
try Transfer Frame Data Field. The first descriptor defines the length (fixed for a field) and position in
memory where the data is to be stored. The second descriptor in a pair defines the fixed length (2
bytes) and position of the memory where the First Header Pointer (FHP) calculated for the data
received in a field belonging to the previous descriptor is to be stored. The First Header Pointer is cal-
culated according to CCSDS: if the first packet starts at the beginning of the field then it is all zeros, if
no packet starts in the field then it is all ones, any other location of the start of the first packet in a field
is its count from the start of the field minus one. The First Header Pointer write-back is enabled by
setting the FHP bit in the descriptor word 0. Normally the start location of First Header Pointer is two
bytes in front of the field when CCSDS Telemetry Transfer Frames are used.
31.4.5 Starting transmission
Enabling a descriptor is not enough to start transmission. A pointer to the memory area holding the
descriptors must first be set in the core. This is done in the descriptor pointer register. The address
must be aligned to a 16 kByte boundary. Bits 31 to 14 hold the base address of descriptor area while
bits 13 to 4 form a pointer to an individual descriptor. The first descriptor should be located at the base
address and when it has been used by the core, the pointer field is incremented by 16 to point at the
next descriptor. The pointer will automatically wrap back to zero when the next 16 kByte boundary
has been reached. The WR bit in the descriptors can be set to make the pointer wrap back to zero
before the 16 kByte boundary.
The pointer field has also been made writable for maximum flexibility but care should be taken when
writing to the descriptor pointer register. It should never be touched when reception is active.
The final step to activate the reception is to set the enable bit in the DMA control register. This tells
the core that there are more active descriptors in the descriptor table. This bit should always be set
when new descriptors are enabled, even if transmission is already active. The descriptors must always
be enabled before the transmission enable bit is set.
31.4.6 Descriptor handling after transmission
When the reception of a packet (or field in framing mode) has finished, status is written to the first
word in the corresponding descriptor, while the second word is left untouched. The other bits in the
first descriptor word are set to zero after reception. The enable bit should be used as the indicator
when a descriptor can be used again, which is when it has been cleared by the core.
If the Cyclic Redundancy Code (CRC) bit is set, a CRC calculated over all but the two last octets, will
be checked and the results stored in the descriptor. The CRC is defined in
There are multiple bits in the DMA status register that hold status information.
Table 346.
GRPWRX descriptor word 1 (address offset 0x4)
31
0
ADDRESS
31: 0
Address (ADDRESS) - Pointer to the buffer area to where data will be stored.