<s>
Wormhole	B-Protocol
flow	I-Protocol
control	I-Protocol
,	O
also	O
called	O
wormhole	B-Protocol
switching	I-Protocol
or	O
wormhole	B-Protocol
routing	I-Protocol
,	O
is	O
a	O
system	O
of	O
simple	O
flow	O
control	O
in	O
computer	B-Architecture
networking	I-Architecture
based	O
on	O
known	O
fixed	O
links	O
.	O
</s>
<s>
It	O
is	O
a	O
subset	O
of	O
flow	O
control	O
methods	O
called	O
Flit-Buffer	O
Flow	O
Control	O
.	O
</s>
<s>
Wormhole	B-Protocol
switching	I-Protocol
is	O
widely	O
used	O
in	O
multicomputers	O
because	O
of	O
its	O
low	O
latency	O
and	O
small	O
requirements	O
at	O
the	O
nodes	O
.	O
</s>
<s>
Wormhole	B-Protocol
routing	I-Protocol
supports	O
very	O
low-latency	O
,	O
high-speed	O
,	O
guaranteed	O
delivery	O
of	O
packets	O
suitable	O
for	O
real-time	B-Protocol
communication	I-Protocol
.	O
</s>
<s>
In	O
the	O
wormhole	B-Protocol
flow	I-Protocol
control	I-Protocol
,	O
each	O
packet	O
is	O
broken	O
into	O
small	O
pieces	O
called	O
flits	B-Protocol
(	O
flow	B-Protocol
control	I-Protocol
units	I-Protocol
or	O
flow	B-Protocol
control	I-Protocol
digits	I-Protocol
)	O
.	O
</s>
<s>
Commonly	O
,	O
the	O
first	O
flits	B-Protocol
,	O
called	O
the	O
header	O
flits	B-Protocol
,	O
holds	O
information	O
about	O
this	O
packet	O
's	O
route	O
(	O
for	O
example	O
,	O
the	O
destination	O
address	O
)	O
and	O
sets	O
up	O
the	O
routing	O
behavior	O
for	O
all	O
subsequent	O
flits	B-Protocol
associated	O
with	O
the	O
packet	O
.	O
</s>
<s>
The	O
header	O
flits	B-Protocol
are	O
followed	O
by	O
zero	O
or	O
more	O
body	O
flits	B-Protocol
which	O
contain	O
the	O
actual	O
payload	O
of	O
data	O
.	O
</s>
<s>
Some	O
final	O
flits	B-Protocol
,	O
called	O
the	O
tail	O
flits	B-Protocol
,	O
perform	O
some	O
bookkeeping	O
to	O
close	O
the	O
connection	O
between	O
the	O
two	O
nodes	O
.	O
</s>
<s>
In	O
wormhole	B-Protocol
switching	I-Protocol
,	O
each	O
buffer	O
is	O
either	O
idle	O
,	O
or	O
allocated	O
to	O
one	O
packet	O
.	O
</s>
<s>
A	O
header	O
flit	B-Protocol
can	O
be	O
forwarded	O
to	O
a	O
buffer	O
if	O
this	O
buffer	O
is	O
idle	O
.	O
</s>
<s>
A	O
body	O
or	O
trailer	O
flit	B-Protocol
can	O
be	O
forwarded	O
to	O
a	O
buffer	O
if	O
this	O
buffer	O
is	O
allocated	O
to	O
its	O
packet	O
and	O
is	O
not	O
full	O
.	O
</s>
<s>
The	O
last	O
flit	B-Protocol
frees	O
the	O
buffer	O
.	O
</s>
<s>
If	O
the	O
header	O
flit	B-Protocol
is	O
blocked	O
in	O
the	O
network	O
,	O
the	O
buffer	O
fills	O
up	O
,	O
and	O
once	O
full	O
,	O
no	O
more	O
flits	B-Protocol
can	O
be	O
sent	O
:	O
this	O
effect	O
is	O
called	O
"	O
back-pressure	O
"	O
and	O
can	O
be	O
propagated	O
back	O
to	O
the	O
source	O
.	O
</s>
<s>
Since	O
a	O
packet	O
is	O
transmitted	O
flit	B-Protocol
by	O
flit	B-Protocol
,	O
it	O
may	O
occupy	O
several	O
flit	B-Protocol
buffers	O
along	O
its	O
path	O
,	O
creating	O
a	O
worm-like	O
image	O
.	O
</s>
<s>
This	O
behaviour	O
is	O
quite	O
similar	O
to	O
cut-through	B-Protocol
switching	I-Protocol
,	O
commonly	O
called	O
"	O
virtual	O
cut-through	O
,	O
"	O
the	O
major	O
difference	O
being	O
that	O
cut-through	O
flow	O
control	O
allocates	O
buffers	O
and	O
channel	O
bandwidth	O
on	O
a	O
packet	O
level	O
,	O
while	O
wormhole	B-Protocol
flow	I-Protocol
control	I-Protocol
does	O
this	O
on	O
the	O
flit	B-Protocol
level	O
.	O
</s>
<s>
In	O
most	O
respects	O
,	O
wormhole	O
is	O
very	O
similar	O
to	O
ATM	O
or	O
MPLS	B-Protocol
forwarding	O
,	O
with	O
the	O
exception	O
that	O
the	O
cell	O
does	O
not	O
have	O
to	O
be	O
queued	O
.	O
</s>
<s>
One	O
thing	O
special	O
about	O
wormhole	B-Protocol
flow	I-Protocol
control	I-Protocol
is	O
the	O
implementation	O
of	O
virtual	O
channels	O
:	O
</s>
<s>
A	O
virtual	O
channel	O
holds	O
the	O
state	O
needed	O
to	O
coordinate	O
the	O
handling	O
of	O
the	O
flits	B-Protocol
of	O
a	O
packet	O
over	O
a	O
channel	O
.	O
</s>
<s>
The	O
virtual	O
channel	O
may	O
also	O
include	O
pointers	O
to	O
the	O
flits	B-Protocol
of	O
the	O
packet	O
that	O
are	O
buffered	O
on	O
the	O
current	O
node	O
and	O
the	O
number	O
of	O
flit	B-Protocol
buffers	O
available	O
on	O
the	O
next	O
node	O
.	O
</s>
<s>
Consider	O
the	O
2x2	O
network	O
of	O
the	O
figure	O
on	O
the	O
right	O
,	O
with	O
3	O
packets	O
to	O
be	O
sent	O
:	O
a	O
pink	O
one	O
,	O
made	O
of	O
4	O
flits	B-Protocol
,	O
'	O
UVWX	O
 '	O
,	O
from	O
C	O
to	O
D	O
;	O
a	O
blue	O
one	O
,	O
made	O
of	O
4	O
flits	B-Protocol
'	O
abcd	O
 '	O
,	O
from	O
A	O
to	O
F	O
;	O
and	O
a	O
green	O
one	O
,	O
made	O
of	O
4	O
flits	B-Protocol
'	O
ijkl	O
 '	O
,	O
from	O
E	O
to	O
H	O
.	O
We	O
assume	O
that	O
the	O
routing	O
has	O
been	O
computed	O
,	O
as	O
drawn	O
,	O
and	O
implies	O
a	O
conflict	O
of	O
a	O
buffer	O
,	O
in	O
the	O
bottom-left	O
router	O
.	O
</s>
<s>
The	O
throughput	O
is	O
of	O
one	O
flit	B-Protocol
per	O
time	O
unit	O
.	O
</s>
<s>
First	O
,	O
consider	O
the	O
pink	O
flow	O
:	O
at	O
time	O
1	O
,	O
the	O
flit	B-Protocol
'	O
U	O
 '	O
is	O
sent	O
to	O
the	O
first	O
buffer	O
;	O
at	O
time	O
2	O
,	O
the	O
flit	B-Protocol
'	O
U	O
 '	O
goes	O
through	O
the	O
next	O
buffer	O
(	O
assuming	O
the	O
computation	O
of	O
the	O
route	O
takes	O
no	O
time	O
)	O
,	O
and	O
the	O
flit	B-Protocol
'	O
V	O
 '	O
is	O
sent	O
to	O
the	O
first	O
buffer	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
Time	O
1	O
:	O
Both	O
the	O
blue	O
and	O
green	O
flows	O
send	O
theirs	O
first	O
flits	B-Protocol
,	O
'	O
i	O
 '	O
and	O
'	O
a	O
 '	O
.	O
</s>
<s>
Time	O
2	O
:	O
The	O
flit	B-Protocol
'	O
i	O
 '	O
can	O
go	O
on	O
into	O
the	O
next	O
buffer	O
.	O
</s>
<s>
But	O
a	O
buffer	O
is	O
dedicated	O
to	O
a	O
packet	O
from	O
its	O
first	O
to	O
its	O
last	O
flit	B-Protocol
,	O
and	O
so	O
,	O
the	O
'	O
a	O
 '	O
flit	B-Protocol
can	O
not	O
be	O
forwarded	O
.	O
</s>
<s>
The	O
'	O
j	O
 '	O
flit	B-Protocol
can	O
replace	O
the	O
'	O
i	O
 '	O
flit	B-Protocol
.	O
</s>
<s>
The	O
'	O
b	O
 '	O
flit	B-Protocol
can	O
be	O
sent	O
.	O
</s>
<s>
The	O
blue	O
'	O
c	O
 '	O
flit	B-Protocol
can	O
not	O
be	O
forwarded	O
(	O
the	O
buffer	O
is	O
occupied	O
with	O
the	O
'	O
b	O
 '	O
and	O
'	O
a	O
 '	O
flits	B-Protocol
)	O
:	O
this	O
back-pressure	O
effect	O
reaches	O
the	O
packet	O
source	O
.	O
</s>
<s>
Wormhole	B-Protocol
flow	I-Protocol
control	I-Protocol
makes	O
more	O
efficient	O
use	O
of	O
buffers	O
than	O
cut-through	O
.	O
</s>
<s>
Where	O
cut-through	O
requires	O
many	O
packets	O
worth	O
of	O
buffer	O
space	O
,	O
the	O
wormhole	O
method	O
needs	O
very	O
few	O
flit	B-Protocol
buffers	O
(	O
comparatively	O
)	O
.	O
</s>
<s>
An	O
entire	O
packet	O
need	O
not	O
be	O
buffered	O
to	O
move	O
on	O
to	O
the	O
next	O
node	O
,	O
decreasing	O
network	B-Protocol
latency	I-Protocol
compared	O
to	O
store-and-forward	B-Protocol
switching	O
.	O
</s>
<s>
Wormhole	O
techniques	O
are	O
primarily	O
used	O
in	O
multiprocessor	B-Operating_System
systems	O
,	O
notably	O
hypercubes	O
.	O
</s>
<s>
In	O
a	O
hypercube	B-Device
computer	O
each	O
CPU	B-General_Concept
is	O
attached	O
to	O
several	O
neighbours	O
in	O
a	O
fixed	O
pattern	O
,	O
which	O
reduces	O
the	O
number	O
of	O
hops	O
from	O
one	O
CPU	B-General_Concept
to	O
another	O
.	O
</s>
<s>
Each	O
CPU	B-General_Concept
is	O
given	O
a	O
number	O
(	O
typically	O
only	O
8-bit	O
to	O
16-bit	B-Device
)	O
,	O
which	O
is	O
its	O
network	O
address	O
,	O
and	O
packets	O
to	O
CPUs	O
are	O
sent	O
with	O
this	O
number	O
in	O
the	O
header	O
.	O
</s>
<s>
This	O
reduces	O
latency	O
(	O
delay	O
)	O
noticeably	O
compared	O
to	O
store-and-forward	B-Protocol
switching	O
that	O
waits	O
for	O
the	O
whole	O
packet	O
before	O
forwarding	O
.	O
</s>
<s>
More	O
recently	O
,	O
wormhole	B-Protocol
flow	I-Protocol
control	I-Protocol
has	O
found	O
its	O
way	O
to	O
applications	O
in	O
Network	B-Architecture
On	I-Architecture
Chip	I-Architecture
systems	O
(	O
NOCs	B-Architecture
)	O
,	O
of	O
which	O
multi-core	O
processors	O
are	O
one	O
flavor	O
.	O
</s>
<s>
The	O
IEEE	O
1355	O
and	O
SpaceWire	B-Architecture
technologies	O
use	O
wormhole	O
.	O
</s>
<s>
Each	O
unidirectional	O
virtual	O
channel	O
is	O
realized	O
by	O
an	O
independently	O
managed	O
pair	O
of	O
(	O
flit	B-Protocol
)	O
buffers	O
.	O
</s>
<s>
Different	O
packets	O
can	O
then	O
share	O
the	O
physical	O
channel	O
on	O
a	O
flit-by-flit	O
basis	O
.	O
</s>
<s>
Virtual	O
channels	O
were	O
originally	O
introduced	O
to	O
avoid	O
the	O
deadlock	O
problem	O
,	O
but	O
they	O
can	O
be	O
also	O
used	O
to	O
reduce	O
wormhole	O
blocking	O
,	O
improving	O
network	B-Protocol
latency	I-Protocol
and	O
throughput	O
.	O
</s>
<s>
Upon	O
arrival	O
of	O
P1	O
,	O
the	O
physical	O
channel	O
can	O
be	O
multiplexed	O
between	O
them	O
on	O
a	O
flit-by-flit	O
basis	O
,	O
so	O
that	O
both	O
packets	O
proceed	O
with	O
half	O
speed	O
(	O
depending	O
on	O
the	O
arbitration	O
scheme	O
)	O
.	O
</s>
<s>
If	O
P0	O
is	O
a	O
full-length	O
packet	O
whereas	O
P1	O
is	O
only	O
a	O
small	O
control	O
packet	O
of	O
size	O
of	O
few	O
flits	B-Protocol
,	O
then	O
this	O
scheme	O
allows	O
P1	O
pass	O
through	O
both	O
routers	O
while	O
P0	O
is	O
slowed	O
down	O
for	O
a	O
short	O
time	O
corresponding	O
to	O
the	O
transmission	O
of	O
few	O
packets	O
.	O
</s>
<s>
Using	O
virtual	O
channels	O
to	O
reduce	O
wormhole	O
blocking	O
has	O
many	O
similarities	O
to	O
using	O
virtual	O
output	O
queueing	O
to	O
reduce	O
head-of-line	B-Protocol
blocking	I-Protocol
.	O
</s>
<s>
A	O
mix	O
of	O
source	B-Protocol
routing	I-Protocol
and	O
logical	O
routing	O
may	O
be	O
used	O
in	O
the	O
same	O
wormhole-switched	O
packet	O
.	O
</s>
<s>
The	O
value	O
of	O
the	O
first	O
byte	O
of	O
a	O
Myrinet	B-General_Concept
or	O
SpaceWire	B-Architecture
packet	O
is	O
the	O
address	O
of	O
the	O
packet	O
.	O
</s>
<s>
Each	O
SpaceWire	B-Architecture
switch	O
uses	O
the	O
address	O
to	O
decide	O
how	O
to	O
route	O
the	O
packet	O
.	O
</s>
<s>
With	O
source	B-Protocol
routing	I-Protocol
,	O
the	O
packet	O
sender	O
chooses	O
how	O
the	O
packet	O
is	O
routed	O
through	O
the	O
switch	O
.	O
</s>
<s>
If	O
the	O
first	O
byte	O
of	O
an	O
incoming	O
SpaceWire	B-Architecture
packet	O
is	O
in	O
the	O
range	O
1	O
to	O
31	O
,	O
</s>
<s>
it	O
indicates	O
the	O
corresponding	O
port	O
1	O
to	O
31	O
of	O
the	O
Spacewire	B-Architecture
switch	O
.	O
</s>
<s>
The	O
SpaceWire	B-Architecture
switch	O
then	O
discards	O
that	O
routing	O
character	O
and	O
sends	O
the	O
rest	O
of	O
the	O
packet	O
out	O
that	O
port	O
.	O
</s>
<s>
This	O
exposes	O
the	O
next	O
byte	O
of	O
the	O
original	O
packet	O
to	O
the	O
next	O
SpaceWire	B-Architecture
switch	O
.	O
</s>
<s>
The	O
packet	O
sender	O
may	O
choose	O
to	O
use	O
source	B-Protocol
routing	I-Protocol
to	O
explicitly	O
specify	O
the	O
complete	O
path	O
through	O
the	O
network	O
to	O
the	O
final	O
destination	O
in	O
this	O
fashion	O
.	O
</s>
<s>
With	O
logical	O
routing	O
,	O
the	O
Spacewire	B-Architecture
switch	O
itself	O
decides	O
how	O
to	O
route	O
the	O
packet	O
.	O
</s>
<s>
If	O
the	O
address	O
(	O
the	O
first	O
byte	O
)	O
of	O
an	O
incoming	O
SpaceWire	B-Architecture
packet	O
is	O
in	O
the	O
range	O
32	O
to	O
255	O
,	O
</s>
<s>
the	O
SpaceWire	B-Architecture
switch	O
uses	O
that	O
value	O
as	O
an	O
index	O
into	O
an	O
internal	O
routing	O
table	O
that	O
indicates	O
which	O
port(s )	O
to	O
send	O
the	O
packet	O
and	O
whether	O
to	O
delete	O
or	O
retain	O
that	O
first	O
byte	O
.	O
</s>
