GR740-UM-DS, Nov 2017, Version 1.7
151
www.cobham.com/gaisler
GR740
See section 31 for more information regarding the SpaceWire Time Distribution Protocol.
13.2.20 Error detection and reporting
The router can detect and report the following errors:
•
SpaceWire link errors: parity error, disconnect error, escape error, credit error (see [SPW] for
definition of these errors).
•
Packet spill due to: timeout (see section 13.2.14), packet length truncation (see section 13.2.16),
time code / distributed interrupt code truncation (see section 13.2.21.1), and spill-if-not-ready
feature (see section 13.2.10)
•
Invalid address error (see section 13.2.12)
•
Memory errors in the memory used for the routing table, RMAP command buffers, and port
transmit and receive FIFO (see section 13.2.22)
•
RMAP errors (see section 13.5.1)
•
SpaceWire Plug-and-Play errors (see section 13.5.4)
Each error type has corresponding status bits in the RTR.PSTS register (RTR.PSTSCFG for the con-
figuration port). Common for all the status bits is that they are set when the error is detected and that
they stay set until they are cleared manually.
The router can also be configured to distribute an interrupt code when an error is detected. See section
13.2.18 for more details.
13.2.21 SpaceWire-D support
13.2.21.1 Time-code and distributed interrupt code truncation
The router supports truncation of packets when it receives valid time-codes or distributed interrupt
codes. A time-code is considered valid when the value equals the internal time count plus one (mod-
ulo 64). A distributed interrupt code is considered valid if the corresponding ISR bit is flipped due to
the reception of the code. The feature can be enabled individually for each port by setting the corre-
sponding RTR.PCTRL.TS bit to 1. A filter allowing only certain time-codes and distributed interrupt
codes to spill packets, can also be configured individually for each port (see RTR.PCTRL2 register).
If a packet transfer is ongoing when a valid time-code or distributed interrupt code is received and the
code matches the filter in RTR.PCTRL2, the rest of the packet is spilled and an EEP is written to the
FIFO of the output port(s).
Time-code and distributed interrupt code truncation can also be enabled for port 0. In that case, it is
the RMAP / SpaceWire Plug-and-Play reply packet that is spilled.
13.2.22 On-chip memories
When an uncorrectable error is detected in the memories used for the routing table and the port map-
ping while a packet is being routed, the packet will be discarded.
Uncorrectable errors in the ports’ FIFO memories are not handled since they only affect the contents
of the routed packet and not the operation of the router itself. These types of errors can be detected by
the user e.g. by adding CRC checksums to SpaceWire packets. Therefore, the RTR.PSTS.ME bit for
the ports is mainly useful to gather statistics about data errors and cannot be used for error recovery.
In contrast, if the RTR.PSTSCFG.ME bits of the routing table or the port setup registers indicate a
memory error, a scrubbing operation can be started. There is also an option of having automatic scrub-
bing (see section 13.2.22.1).
For the FIFOs within the AMBA ports there is an option to spill the ongoing packet when an error
occurs. This is controlled by the RTR.AMBACTRL.ME bit.