AEROFLEX GAISLER
14
RT-SPW-ROUTER
Copyright Aeroflex Gaisler AB
June 2012, Version 1.2
available means that no other packet transmission is active at the moment and also for SpaceWire
links that the link is in run-state. For path addresses the bit corresponding to the path address will
always be set. This is done as specified in the standard which requires a packet with a path address to
be transmitted on the port with the same number as the address. The standard does not mention what
should happen when group adaptive routing is used for path addresses but in this router the bit corre-
sponding to the port number of the path address is always set so that the packet can be transmitted on
that port also when group adaptive routing is used.
For logical addresses the corresponding routing table entry and port setup register must be valid for
the packet to be routed (otherwise it is discarded). There is no default port as with path addresses so at
least one bit in the port setup register must be 1 for the packet to be routed otherwise it is discarded.
3.2.5
Packet distribution
Packet distribution can be used to implement multicast and broadcast addresses. Packets with logical
address 50 can for example be configured to be transmitted on ports 1, 2 and 3 while address 51 can
be configured to be transmitted on all ports (broadcast).
When packet distribution is enabled the group adaptive routing register is used to determine the ports
that a packet should be transmitted on. Packet distribution is enabled for a path or logical address by
setting bit 0 in the corresponding port setup register to 1. The packet will be transmitted on all the
ports with a bit set to 1 in the register. This means that if one of the ports enabled for packet distribu-
tion is busy the router will wait for it to become free before transmitting on any of the ports. Due to
the wormhole routing implementation the slowest link will determine the speed at which a packet is
transmitted on all the ports.
When packet distribution is used with path addresses the port with the same number as the address
will always be enabled (as for group adaptive routing).
3.2.6
Port disable
The disable port bit in the port’s control register can be used to disable a port for data traffic. It will
behave just like if the physical port was not existing. Packets transmitted to it will be spilt and the
invalid address bit on the source port is set. Packets received to the port will be silently discarded, no
status bits are set.
All ports except the configuration port (0) and port 1 can be disabled to prevent the situation of all
ports being locked out from happening.
3.2.7
Timers
Timers are individually enabled for each port by writing the timer enable bit in the port control regis-
ter. When timers are enabled during packet transmission on a port the timer is reset each time a char-
acter is transmitted. If the timer expires the packet will be discarded and an EEP is inserted on all the
ports to which the packet was transmitted (can be more than one if packet distribution was used). It
does not matter if it is the output port or source port which is stalling. The blocking situation is always
detected at the source port which handles the spilling. It also does not matter if the stall is caused by
the link being stopped or lack of credits, the discard mechanism is always the same. When the timers
are not implemented or disabled the source and destination ports will always block until the blocking
situation is resolved.
The timers use a global prescaler and an individual timer per port. Both the prescaler and the individ-
ual timer tick rate can be configured through the configuration port.