04 Noc Flow Control
04 Noc Flow Control
Maurizio Palesi
Maurizio Palesi 1
Flow Control
Flow Control determines how the resources
of a network, such as channel bandwidth
and buffer capacity are allocated to packets
traversing a network
Goal is to use resources as efficient as
possible to allow a high throughput
An efficient flow control is a prerequisite to
achieve a good network performance
Maurizio Palesi 2
Flow Control
Flow Control can be viewed as a problem of
Resource allocation
Contention resolution
Resources in form of channels, buffers and
state must be allocated to each packet
If two packets compete for the same
channel flow control can only assign the
channel to one packet, but must also deal
with the other packet
Maurizio Palesi 3
Flow Control
Flow Control can be divided into
Bufferless flow control
Packets are either dropped or misrouted
Buffered flow control
Packets that cannot be routed via the desired
channel are stored in buffers
Maurizio Palesi 4
Circuit Switching
Maurizio Palesi 5
Circuit Switching
Maurizio Palesi 6
Buffered Flow Control
More efficient flow control can be achieved
by adding buffers
With sufficient buffers packets do not need to
be misrouted or dropped, since packets can
wait for the outgoing channel to be ready
Maurizio Palesi 7
Buffered Flow Control
Two main approaches
Packet-Buffer Flow Control
Store-And-Forward
Cut-Through
Flit-Buffer Flow Control
Wormhole Flow Control
Virtual Channel Flow Control
Maurizio Palesi 8
Data Units
Maurizio Palesi 9
Store and Forward Flow Control
Maurizio Palesi 11
Cut-Through Flow Control
Shortcomings
Very inefficient use of buffer space
As buffers are allocated in units of packets
Often we need multiple indipendent buffer sets to reduce blocking or
provide deadlock avoidance
By allocating buffers in units of packets contention latency is
increased
E.g., High-priority packet colliding with a low-priority packet
– Must wait the entire low-priority packet to be transmitted before it can
acquire the channel
Maurizio Palesi 12
Wormhole Flow Control
Wormhole flow control operates like cut-through, but with
channel and buffers allocated to flits rather than packets
Three resources are needed
A virtual channel for the packet
Body flits of a packet use the VC acquired by the head flit
One flit buffer
One flit channel bandwidth
Maurizio Palesi 13
Wormhole - Example
IP
Clock Cycle 0 IP
Maurizio Palesi 14
Wormhole - Example
H H
IP
Clock Cycle 1 IP
Maurizio Palesi 15
Wormhole - Example
B H B
IP
H
Clock Cycle 2 IP
Maurizio Palesi 16
Wormhole - Example
B H B
IP
B
H
Clock Cycle 3 IP
Maurizio Palesi 17
Wormhole - Example
B H T
IP
B
B
Clock Cycle 4 IP
Maurizio Palesi 18
Wormhole - Example
B B H
IP
T
B
Clock Cycle 5 IP
Maurizio Palesi 19
Wormhole - Example
T B B H
IP
T
Clock Cycle 6 IP
Maurizio Palesi 20
Wormhole - Example
T B B
IP
Clock Cycle 7 IP
Maurizio Palesi 21
Wormhole - Example
T B
IP
Clock Cycle 8 IP
Maurizio Palesi 22
Wormhole - Example
IP
Clock Cycle 9 IP
Maurizio Palesi 23
Wormhole - Example
IP
Clock Cycle 10 IP
Maurizio Palesi 24
Wormhole - Example
IP
Clock Cycle 11 IP
Maurizio Palesi 25
Wormhole - Example
L1 L4
L5
L2
IP
L3 IP
Maurizio Palesi 26
Wormhole Flow Control
Comparison to cut-through
Wormhole flow control makes far more efficient
use of buffer space
Throughput maybe less, since wormhole flow
control may block a channels mid-packets
Maurizio Palesi 27
Wormhole Flow Control
Maurizio Palesi 28
Virtual Channel Flow Control
In virtual channel flow-control several channels are
associated with a single physical channel
This allows to use the bandwidth that otherwise is
left idle when a packet blocks the channel
Unlike wormhole flow control subsequent flits are
not guaranteed bandwidth, since they have to
compete for bandwidth with other flits
Maurizio Palesi 29
Concept of Virtual Channels
Maurizio Palesi 30
Virtual Channel Flow Control
Maurizio Palesi 31
Virtual Channels - Example
IP
Clock Cycle 0 IP
Maurizio Palesi 32
Virtual Channels - Example
VC0 → E
B
H H
IP
Clock Cycle 1 IP
Maurizio Palesi 33
Virtual Channels - Example
VC0 → E VC0 → S
B
B
VC0 → E
IP
H
Clock Cycle 2 IP
Maurizio Palesi 34
Virtual Channels - Example
VC0 → E VC0 → S
T VC1 → E
B
BB B
VC0 → E VC0 → L IP
H
Clock Cycle 3 IP
Maurizio Palesi 35
Virtual Channels - Example
VC0 → E VC0 → S
T VC1 → L
VC1 → E
B
T B
VC0 → E VC0 → L IP
B
Clock Cycle 4 IP
Maurizio Palesi 36
Virtual Channels - Example
VC0 → E VC0 → S
VC1 → L
VC1 → E
T
T B B
VC0 → E VC0 → L IP
B
Clock Cycle 5 IP
Maurizio Palesi 37
Virtual Channels - Example
VC0 → E VC0 → S
VC1 → L
VC1 → E
T
VC0 → E VC0 → L IP
B
Clock Cycle 6 IP
Maurizio Palesi 38
Virtual Channels - Example
VC0 → S
VC1 → L
VC1 → E
T T
B
VC0 → E VC0 → L IP
B
Clock Cycle 7 IP
Maurizio Palesi 39
Virtual Channels - Example
VC1 → E VC1 → L
T
B
VC0 → L IP
T
Clock Cycle 8 IP
Maurizio Palesi 40
Virtual Channels - Example
VC1 → L
IP
T
Clock Cycle 9 IP
Maurizio Palesi 41
Virtual Channels - Example
IP
Clock Cycle 10 IP
Maurizio Palesi 42
Virtual Channels - Example
IP
Clock Cycle 11 IP
Maurizio Palesi 43
Virtual Channels - Example
L1 L4
L5
L2
IP
L3 IP
Maurizio Palesi 44