Intuition The one core idea
SpaceWire is a way to send a single stream of bits down a wire so fast and so reliably that a spacecraft's cameras and computers can talk without a heavy cable harness — and it does this by cleverly sending two wires that between them always produce exactly one clock edge per bit , so the receiver rebuilds the clock for free. (Throughout this page, a clock edge — also called a tick — means the instant a signal changes from low to high or high to low; that instant is what a receiver uses to decide "now is when I read the bit.") Every symbol below exists to serve that one goal: move bits fast, recover timing without a clock wire, catch errors, and route packets with almost no delay.
Before you can read the parent SpaceWire note, you must own every symbol it throws at you. We build each from nothing, in an order where each idea leans on the one before it.
A bit is the smallest piece of information: it is either 0 or 1 . Nothing smaller exists in digital electronics.
Picture a light switch. Off = 0, on = 1. That's the whole alphabet a wire understands.
Definition Bit period and the symbol
b n
The bit period is the fixed slice of time the wire holds one bit before moving to the next. We number the bit periods 0 , 1 , 2 , … and write b n for the bit value (0 or 1) sent during bit period n — so b 0 is the first bit, b 1 the second, and so on. We call the number of bits sent per second the bit rate R . Then the bit period is R 1 seconds. For example, at R = 100 million bits per second, each bit period is 100 000 000 1 second = 10 nanoseconds.
Look at the figure: time runs left to right, and the wire's voltage is drawn as a line that sits high (1) or low (0) . Each grey column is one bit period, labelled with its b n value. This picture is the stage on which everything else happens.
Intuition Why we care about the bit period
To read a bit, the receiver must know when to look. Look too early or too late and you read the neighbour's bit. So the whole game of "recovering a clock" (Section 6) is: how does the receiver find the boundary between these grey columns without a separate clock wire?
Definition Serial transmission
Serial means bits go down one wire, one after another in time. Parallel means 8 (or more) wires each carry one bit at the same instant .
In the figure, the parallel bus (top) needs 8 wires side by side; the serial link (bottom) needs one. On a spacecraft every wire adds mass (fuel cost) and every wire is another thing a cosmic ray can corrupt. Parallel wires also suffer skew : wire 3 might be a hair longer than wire 5, so their bits arrive at slightly different times and the receiver grabs a garbled byte.
Intuition Why SpaceWire chose serial
Serial trades "many wires at once" for "one wire faster." No inter-wire skew, less mass, fewer failure points. See Serial vs Parallel Communication and the mass argument in MIL-STD-1553 (an older, heavier parallel-ish bus) and CAN Bus .
A wire carries a voltage — think of it as water pressure. High pressure = 1, low = 0. But in space, radiation and electrical noise push extra "pressure" onto a single wire and flip the reading.
Definition Differential signaling
Instead of one wire measured against ground, differential uses two wires carrying opposite voltages . The receiver reads the difference between them. If noise hits, it lands on both wires equally and cancels in the subtraction.
The figure shows wire+ going up while wire− goes down. Their difference (bottom trace) is clean even after a noise spike lands on both. LVDS (Low Voltage Differential Signaling) is the specific low-power, low-voltage flavour SpaceWire uses. "Low voltage" means small swings → little power (~10 mW per link), which matters when solar panels are your only outlet.
Intuition Why differential for space
A single-wire signal is defenceless against Cosmic Ray Effects on Electronics . Differential cancels common noise. Full details live in LVDS Signaling .
Common mistake "LVDS is one wire"
No — LVDS is always a twisted pair (two wires). SpaceWire uses two such pairs (Data and Strobe), so a SpaceWire link is four wires in each direction.
The parent note uses two symbols constantly: ⊕ and the overbar .
⊕
XOR ("exclusive or") answers: are these two bits different? It outputs 1 if the inputs differ , 0 if they are the same .
a
b
a ⊕ b
0
0
0
0
1
1
1
0
1
1
1
0
Definition NOT / overbar, written
x
The overbar flips a bit: 0 = 1 and 1 = 0 . So a ⊕ b means "1 if the bits are the SAME " — it's XOR's mirror.
the tool here
We need one operation that says "did something change?" That is exactly the question of edge-detection and clock-recovery. Addition, AND, OR don't isolate "difference" — only XOR does. That's why the parent's clock-recovery formula is Data ⊕ Strobe : it fires whenever the two lines disagree, i.e. on every transition.
A parity bit is one extra bit tacked onto a group, chosen so the group has a fixed count-of-ones property. Even parity : the parity bit is chosen so the total number of 1s (data bits plus the parity bit) is even. Odd parity : chosen so that total is odd.
Worked example Parity of the byte
0xA7 = 1010 0111
The eight bits are 1 , 0 , 1 , 0 , 0 , 1 , 1 , 1 .
XOR them all: X = 1 ⊕ 0 ⊕ 1 ⊕ 0 ⊕ 0 ⊕ 1 ⊕ 1 ⊕ 1 = 1 (there are five 1s — odd).
Even parity: P even = X = 1 , making the total count six (even). ✓
Odd parity: P odd = X = 0 , leaving the count at five (odd). ✓
The value that drives the choice is the XOR-of-all-eight X = 1 . XOR all eight, never six.
Intuition Why parity, and why here
A single cosmic ray flips one bit. Flipping one bit flips the count-of-ones' parity, so the receiver's parity check fails and it knows something broke → see Cosmic Ray Effects on Electronics . It's the cheapest possible error detector : one extra bit per group.
Common mistake Parity misses double errors
Simple parity only detects an odd number of flipped bits. If two bits flip (or any even number), the count-of-ones changes by an even amount, so the parity is unchanged and the error slips through undetected. That is why SpaceWire also uses disconnect / timeout detection and higher-level checks — parity alone is not enough for a fully reliable link.
Now the two named wires of SpaceWire.
Definition Data and Strobe signals
Data is the wire that literally carries the bit value b n in bit period n : Data ( n ) = b n (recall b n from Section 1 — the 0/1 sent in period n ). Strobe is a companion wire whose only job is to toggle precisely when Data does NOT — so that in every bit period, exactly one of the two lines changes.
Trace the figure top to bottom: Data changes on the bit boundaries where the value changes ; on a run of identical bits (see the flat stretch of Data), Strobe picks up the slack and toggles instead. The bottom trace (their XOR) produces one edge per column — that is your recovered clock.
Intuition Why go to this trouble instead of a clock wire
A separate clock wire drifts against the data wire as cables heat, cool, and take radiation damage — the tick and the bit stop lining up (skew ), and you read garbage. Data-Strobe guarantees the tick is manufactured from the same two wires the data rides on, so they can never drift apart.
The XOR gives ticks, but on power-up (or after a glitch stops traffic) the receiver has to lock onto those ticks before it can trust any bit.
Definition Edge-alignment / phase locking
Synchronization is the receiver adjusting when it samples so that it reads Data in the middle of each bit period, not on the edge (where the value is changing and ambiguous). The offset between "where I sample now" and "the middle of the bit" is the phase error; the receiver nudges its sampling instant to drive that error to zero.
Here is the startup sequence, step by step:
Watch for edges. With no traffic, both lines idle. The first thing the receiver does is watch the two lines for any transition — each transition is one recovered-clock tick.
Recover the tick, then delay to the middle. A transition marks a bit boundary . Sampling exactly on a boundary is dangerous (value is settling), so the receiver waits about half a bit period after each tick and samples Data there — the safest, most stable point.
Send NULLs first (never data). On link start, both ends transmit a stream of NULL control characters (defined in Section 7), not real data. NULLs are a fixed, known pattern, so the receiver can confirm "I am reading a sensible, repeating pattern → my sampling phase is correct" before any payload flows.
Handshake and go. Once each end sees a steady run of good NULLs (correct parity, expected bits), the link declares itself connected , flow-control credit is exchanged, and real characters may follow. This staged start is why SpaceWire is safely hot-swappable — you can plug a live cable and it re-synchronizes cleanly.
Intuition Why NULLs before data
If the very first thing on the wire were real payload, a receiver that hadn't yet locked its phase would misread it and there'd be no way to tell. A known idle pattern is a tuning fork : the receiver aligns to it first, then trusts what follows. After a break in traffic the same NULL handshake re-runs.
Before packets, SpaceWire groups bits into characters — the smallest unit the link actually frames and sends. Every character starts with a parity bit and a data-control flag bit that says which kind of character this is.
Definition The data-control flag bit
The data-control flag is a single bit at the front of every character that tells the receiver how to interpret what follows :
flag = 0 → a data character : the next 8 bits are payload (a data byte).
flag = 1 → a control character : the next 2 bits are a control code naming one of the special characters (NULL, FCT, EOP, EEP).
Without this one flag the receiver could not tell "here comes a byte of camera data" from "here comes an end-of-packet marker" — they would look identical on the wire. That is its entire purpose.
So the whole character alphabet is: data bytes , FCT , EOP , EEP , ESC , and NULL (= ESC+FCT-code). Control characters are short (parity + flag + 2 bits); data characters are long (parity + flag + 8 bits).
A packet is a sequence of characters with a shape: a destination address at the front, cargo (the payload data characters) in the middle, and an end marker (EOP or EEP) at the tail.
Intuition Why address goes first
If the address arrives first, a switch can decide where to send the packet before the rest arrives — it doesn't have to store the whole thing. That is the seed of wormhole routing (next).
A hop is one pass through a switch. If a packet crosses 3 switches to reach its target, that's n = 3 hops.
L )
Latency is the delay between sending and receiving. The parent's formula
L total = L header + n × L hop
reads: total delay = time to push the header through, plus one small forwarding delay L hop per switch.
Definition Wormhole vs store-and-forward
Store-and-forward : each switch waits for the whole packet, then forwards it. Wormhole : the switch forwards the header the instant it arrives and lets the body stream through behind it, like a train whose engine is already miles ahead while the last carriage is still leaving the station.
Compare in Wormhole Routing vs Store-and-Forward . The payoff — low, predictable delay — is exactly what Real-Time Determinism demands.
Definition Flow control & credit
Flow control stops a fast sender from overflowing a slow receiver's buffer. The receiver hands out credit — permission to send a fixed amount. Each FCT (Flow Control Token, one short control character from Section 7) it sends grants credit for 8 data characters .
Definition Round-trip time (RTT)
RTT is the time for a signal to go to the far end and come back . Since credit must travel back down the cable, RTT decides how much buffer you need to keep the wire busy.
Worked example One-way delay on a 10 m cable
Signal speed ≈ 2 × 1 0 8 m/s.
t one-way = 2 × 1 0 8 m/s 10 m = 5 × 1 0 − 8 s = 50 ns
So RTT ≈ 100 ns for 10 m of cable. (The parent's ~1 μs example assumes a longer path plus processing delays.)
Common mistake "An FCT is 10 bytes"
No — an FCT is a single control character (a few bit-times). It merely grants credit for 8 data characters; it is not itself 8 characters of data.
Higher-level protocols like RMAP Protocol ride inside the cargo — they assume all of the above already works.
receiver sync NULL handshake
characters data FCT EOP EEP ESC NULL
Cover the right side and answer aloud.
What is the bit rate R , and what is a bit period? R is the number of bits sent per second; the bit period is 1/ R seconds — the time one bit occupies the wire.
What does the symbol b n mean? The bit value (0 or 1) sent during bit period n ; b 0 is the first bit, b 1 the second, and so on.
Why does SpaceWire use serial instead of parallel? Less mass, no inter-wire skew, fewer failure points — one wire faster beats many wires at once.
What is a clock edge (tick)? The instant a signal changes low→high or high→low; the receiver uses that instant to decide when to read the bit.
What does differential/LVDS signaling defeat? Common-mode noise (e.g. radiation glitches) — it lands on both wires and cancels in the difference.
What question does a ⊕ b answer? "Are these two bits different?" — output 1 if they differ, 0 if same.
What does the overbar x do? Flips the bit: 0 = 1 , 1 = 0 .
For byte 0xA7, what is the XOR of all eight bits? 1 (there are five 1s, an odd count).
Given X = D 0 ⊕ ⋯ ⊕ D 7 , what are the even and odd parity bits? P even = X and P odd = X .
What kind of error does simple parity FAIL to detect? Any even number of bit-flips (e.g. a double error) — the count-of-ones is unchanged so parity looks fine.
How does the transmitter compute Strobe? Strobe ( n ) = Strobe ( n − 1 ) ⊕ ( Data ( n ) ⊕ Data ( n − 1 )) — toggle Strobe whenever Data stayed the same.
What is the seed (initial condition) for the Strobe recurrence? At idle before the first bit, Data ( − 1 ) = 0 and Strobe ( − 1 ) = 0 , so Strobe ( 0 ) is well-defined.
How does the receiver rebuild the clock? RecoveredClock = Data ⊕ Strobe , one tick per bit.
How does the receiver sync on startup? It watches for edges, samples ~half a bit period after each tick, and locks phase on a stream of known NULL characters before any data flows.
What is the data-control flag bit? A leading bit: flag=0 means a data character (8 payload bits follow); flag=1 means a control character (2 control-code bits follow).
Name the control characters and NULL. FCT (code 00), EOP (01), EEP (10), ESC (11); NULL = ESC followed by FCT-code, sent as idle.
Difference between EOP and EEP? EOP = normal end of packet; EEP = packet ended because of an error.
What does one FCT grant? Credit for 8 data characters.
What sets how much buffer you need to keep the link full? The round-trip time (RTT) — credit must travel back across the cable.
One-way delay of a 10 m cable at 2 × 1 0 8 m/s? 50 ns (so RTT ≈ 100 ns).