GR740-UM-DS, Nov 2017, Version 1.7
148
www.cobham.com/gaisler
GR740
Time-codes can globally be enabled / disabled through the RTR.TC register, as well as individually
enabled / disabled per port through corresponding RTR.PCTRL.TE bits. If time-codes are disabled for
a port, all incoming time-codes on this port are discarded and no time-codes are forwarded to this
port.
The router can be configured to either filter out all incoming time-codes that do not have the two con-
trol flags (bit 7:6) set to “00” or to discard the control flags and allow them to have any value. This
configuration is done through the RTR.RTRCFG.TF bit. The control flags of the last received time-
code can also be read from the RTR.TC register. Note that if interrupt distribution is globally enabled
(RTR.RTRCTRL.IE = 1), only control flags “00” are considered as time-codes, no matter of the value
of the RTR.RTRCFG.TF bit.
13.2.18 SpaceWire distributed interrupt support
The router supports SpaceWire distributed interrupts. It can be configured to operate in two modes,
interrupt with acknowledgment mode and extended interrupt mode. In the interrupt with acknowledg-
ment mode, 32 interrupt numbers are supported, whereas the extended interrupt mode supports 64
interrupt numbers. The operation mode is configured through the RTR.RTRCFG.EE bit.
A distributed interrupt code is a control code that has the control flags (bits 7:6) always set to “10”.
•
Interrupt with acknowledgment mode:
A distributed interrupt code that has bit 5 set to 0 is called
an interrupt code, and bits 4:0 specify an interrupt number between 0 and 31. When operating in
the interrupt with acknowledgment mode, a distributed interrupt code with bit 5 set to 1 is called
an interrupt acknowledgment code, which is used to acknowledge the interrupt with the interrupt
number specified by bits 4:0.
•
Extended interrupt mode:
When operating in the extended interrupt mode, a distributed interrupt
code with bit 5 set to 1 is called an extended interrupt code, and bits 4:0 specify an interrupt num-
ber between 32 and 63. If bit 5 is set to 0, bits 4:0 specify an interrupt number between 0 and 31.
The interrupt codes and extended interrupt codes are generated by the source of the interrupt event,
while the interrupt acknowledgment code is sent by the interrupt handler for the corresponding inter-
rupt number.
The router has two 32-bit ISR register (RTR.ISR0 and RTR.ISR1) where each bit corresponds to one
interrupt number. A bit in the ISR registers is set to 1 when an interrupt code or extended interrupt
code with the corresponding interrupt number is received. A bit in the ISR registers is set to 0 when an
interrupt acknowledgment code with the corresponding interrupt number is received. Therefore, the
ISR registers reflect the status of all interrupt numbers. Each interrupt number has also its own timer
which is used to clear the ISR register bit if an interrupt acknowledgment code is not received before
the timer expires (for example if operating in the extended interrupt mode), as well as an optional
timer which is used to control how fast a bit in the RTR.ISR register is allowed to toggle. See section
13.2.18.2 for more details on the ISR timers. Note that although it is possible to clear the bits in the
ISR registers, these registers should normally only be used for diagnostics and FDIR.
The reset value of the distributed interrupt support is controlled via GPIO pins [7:6], see section 3.1.
13.2.18.1 Receiving and transmitting distributed interrupt codes
When a distributed interrupt code is received on a port or the auxiliary time-code / distributed inter-
rupt code interface, the following requirements must be fulfilled in order for the code to be distrib-
uted:
1. Interrupt distribution is globally enabled (RTR.RTRCTRL.IE = 1) and enabled for the port that
received the code (corresponding RTR.PCTRL.IC = 1).
2. If the received code is an interrupt code, the RTR.PCTRL2.IR bit for the port must be set to 1. If the
received code is an interrupt acknowledgment code or extended interrupt code, the RTR.PCTRL2.AR
bit for the port must be set to 1.