GR740-UM-DS, Nov 2017, Version 1.7
163
www.cobham.com/gaisler
GR740
needs to be aborted because of congestion on the SpaceWire network. If the congestion is on the AHB
bus this will not help (This should not be a problem since AHB slaves should have a maximum of 16
waitstates). The aborted packet will have its LE bit set in the descriptor. The transmit enable register
bit is also cleared and no new transmissions are done until the transmitter is enabled again.
13.4.5.7.2 AHB error
When an AHB error is encountered during transmission, the currently active DMA channel is dis-
abled and the transmitter goes to the idle mode. A bit in the control/status register of the DMA chan-
nel is set to indicate this error condition and, if enabled, an interrupt will also be generated. Further
error handling depends on what state the transmitter DMA engine was in when the AHB error
occurred. If the descriptor was read, the packet transmission had not started yet and therefore no more
actions are required. See also the AMBA ERROR propagation description in section 5.10.
If the AHB error occurs during packet transmission, the packet is truncated and an EEP is inserted.
Lastly, if it occurs while status information is written to the descriptor, the descriptor is not closed cor-
rectly and is thus staying enabled and not indicating any errors although the packet transmission has
been successful.
The client using the channel has to correct the AHB error condition and enable the channel again. No
more AHB transfers are done again from the same unit (receiver or transmitter) which was active
during the AHB error until the error state is cleared and the unit is enabled again.
13.4.6 RMAP target
The Remote Memory Access Protocol (RMAP) is used to implement access to resources on the AHB
bus via the SpaceWire Links, e.g. for reading and writing to memory, registers and FIFOs. This sec-
tion describes the target implementation.
13.4.6.1 Fundamentals of the protocol
RMAP is a protocol, which is designed to provide remote access via a SpaceWire network to memory
mapped resources on a SpaceWire node. It provides three operations: write, read and read-modify-
write. These operations are posted operations which means that a source does not wait for an
acknowledge or reply. It also implies that any number of operations can be outstanding at any time
and that no timeout mechanism is implemented in the protocol. Timeouts must be implemented in the
user application which sends the commands. Data payloads of up to 16 MiB - 1 is supported in the
protocol. A destination can be requested to send replies and to verify data before executing an opera-
tion. A complete description of the protocol is found in the RMAP standard [RMAP].
13.4.6.2 Implementation
The port includes a target for RMAP commands, which processes all incoming packets with protocol
ID = 0x01, type field (bit 7 and 6 of the 3rd byte in the packet) equal to 01b and an address falling in
the range set by the default address and mask register. When such a packet is detected, it is not stored
to the DMA channel but is instead passed to the RMAP receiver.
The target implements all three commands defined in [RMAP], with some restrictions. Support is
only provided for 32-bit big-endian systems. This means that the first byte received is the msb in a
word. The target will not receive RMAP packets using the extended protocol ID which are always
dumped to the DMA channel.
The RMAP receiver processes commands. If they are correct and accepted, the operation is performed
on the AHB bus and a reply is generated. If an acknowledge is requested, the RMAP transmitter auto-
matically sends the reply. RMAP transmissions have priority over DMA channel transmissions.
There is a user accessible destination key register, which is compared to the destination key field in
incoming packets. If there is a mismatch and a reply has been requested, the error code in the reply is
set to 3. Replies are sent if and only if the ack field is set to ‘1’.