Scheduling Mechanisms for SpaceWire Networks Ilya Korobkov, Elena Podgornova, Dmitry Raszhivin, Valentin Olenev, Irina Lavrovskaya {ilya.korobkov, alena.podgornova, dmitry.raszhivin, valentin.olenev, irina.lavrovskaya}@guap.ru Saint-Petersburg State University of Aerospace Instrumentation
Introduction Time multiplexing and scheduling are used to: obtain guaranteed transmission characteristics; avoid conflicts with simultaneous network resource usage; avoid network overloads; plan networking over time (it s useful for long-term in-orbit operations). 2/18
TDMA-based network protocols We conducted an analysis of different communication protocols that use different approaches to solve the time multiplexing problem: TTCAN; FlexRay; TTP/C; TTEthernet; SpaceWire-D; STP-ISS. Basing on this research we focused on two mechanisms that are suitable for SpaceWire networks. 3/18
STP-ISS scheduling mechanism (1/5) There is a single schedule for the whole SpaceWire network. It gives an opportunity for the node to send data only during particular time-slots. An epoch is a constant number (N TS ) of time-slots. Time-slot defines by time-slot duration (D TS ). The epoch duration (D E ) is calculated in the following way: D E =D TS * N TS Each node has a time-slot timer (T TS ) which counts duration of the current time-slot for a node. Synchronization according to the scheduling mechanism is performed once in an epoch. The time-slot timer T TS should be set to the time-slot duration D TS. Each node is permitted to send packets during particular time-slots in accordance with the schedule. 4/18
STP-ISS scheduling mechanism (2/5) The time-code relevancy window defines a number of timeslots (K) in the end of the one epoch and in the beginning of the next epoch during which the received time-code is considered as relevant. epoch #X epoch #X+1 time-slot #N TS -K/2-1 last K/2 time-slots of the epoch first K/2 time-slots of the epoch time-slot #K/2 time-slot #K/2+1 time code Time-code relevancy window...... time code irrelevant irrelevant T D ТS D ТS D... ТS D ТS D ТS... D ТS D ТS K time-code relevancy window size K*D ТS 5/18
STP-ISS scheduling mechanism (3/5) If the time-code is received during first K/2 time-slots of the epoch, the new time-slot duration value is calculated according to the equation: epoch X D TS _ new D TS t N TS epoch #X+1 time-slot #N TS -1 incomplete time-slot #0 time-slot #0 time-slot #1 D ТS_new = D ТS + t/n TS timecode D ТS T D ТS t D ТS_new D ТS_new 6/18
STP-ISS scheduling mechanism (4/5) If the next time-code is received during last K/2 time-slots of the epoch, the new time-slot duration value is calculated according to the equation: D TS _ new t N TS epoch #X epoch #X+1 time-slot #N TS -2 terminated time-slot #N TS -1 time-slot #0 time-slot #1 time-code D ТS_new = t/n TS t T D ТS D ТS D ТS_new 7/18
STP-ISS scheduling mechanism (5/5) Reception of three irrelevant time-codes in three consecutive epochs means that the internal time counter and the counter of the time master are significantly asynchronous. Reception of the third irrelevant time-code should determine the beginning of a new epoch. The node should terminate the time-slot timer and wait for reception of the next time-code. After reception of the next time-code the node should update the time-slot duration value according to the equation: t DTS _ new, NTS where Δt is the time value, that is counted starting from the moment of third irrelevant time-code reception and finishing with the next time-code reception. Then the node can continue data transmission according to the schedule. 8/18
Number of packets Advantages of STP-ISS scheduling mechanism It prevents conflicts of network resources usage. It decreases the network capacity. It provides uniform data transmission. 250 200 150 100 50 0 without scheduling mechanism STP-ISS scheduling mechanism Transmitted packets distribution by nodes 9/18
SpaceWire-D-SUAI SpaceWire-D-SUAI is a set of services that works over SpaceWire: Epoch ogranization; Port Guardian; Shadow master; Dynamic and static segments. 10/18
Epoch ogranization (1/2) There is a router synchronization problem: Two routers were turned on at different time moments. When the second router receives the first (his) time code, it would be treated as the start point for the first time-slot. At the same time this time-code would be subsequent for the first router that started before the second one, and the routers come out of synchronization. Epoch consists of 4 timeslots Router 1 Router 2 1 2 3 4 1 2 3 4 1 2 3 1 2... 11/18
Epoch ogranization (2/2) Let s limit the number of time-slots in epoch by the values that are the power of two: 2, 4, 8, 16, 32, 64; All routers should know the value of power n: for 2 time-slots n=1; for 4 slots n=2; for 8 slots n=3 etc. All network participants can determine time-slot number while receiving new time-code if value n is pre-defined for them. Number of time-slots=2 n Router 1 Router 2 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 9 5 mod 4 = 1 12/18
Port guardian Port guardian is used to protect the network from faulty nodes that try to transmit data at appropriate time-slots. Often such a "watch dog" is implemented as a separate device or chip in order to increase fault tolerance. Port guardian guarantees that the node would not transmit data during wrong time-slots and eliminates «babbling idiot» problem. Node 1 Node 4 Node 2 Node 3 trusted switch trusted switch Node 5 Node 6 fct data buffer buffer 13/18
Shadow master Shadow master is one of possible solutions to increase time distribution fault-tolerance. This backup master can send time-codes in addition to the primary time master Node 1 Node 2 Time master Node 4 Node 5 Node 3 Time shadow master Node 6 14/18
Dynamic and static segments It is necessary to integrate scheduled traffic and event-triggered traffic to effectively utilize psychical resources of the network. An epoch is divided into two parts: static and dynamic. Scheduled data transmission goes during static segment. The last slot in the epoch - dynamic - is designed to clean the routers' buffers of data, which has not been sent, to transmit an EEP or EOP symbol and to prepare the conversion to the static segment 1 2 3 4 5 6 7 8 9 static dynamic 15/18
Conformance of scheduling mechanisms with OSI model OSI model layers Mission Specific Application Application Presentation Session RMAP JRDDP... STP-ISS with scheduling Transport SpaceWire-D-SUAI SpaceWire Network Data Link Physical 16/18
Features of STP-ISS Scheduling Mechanism and SpaceWire-D-SUAI Features Scheduling STP-ISS scheduling mechanism SpaceWire-D-SUAI Epoch size Not limited Limited Traffic scheduling Schedules only STP-ISS protocol traffic Schedules traffic for all transport protocols Babbling idiot problem No Yes Supports the silent mode during which all blocked packets will reach their destinations Possible in case of appropriate schedule Yes 17/18
Thank you! 18/18