Advanced Digital Design - Vienna University of Technology
Download
Report
Transcript Advanced Digital Design - Vienna University of Technology
Advanced Digital Design
Static Data-flow Structures
by A. Steininger and J. Lechner
Vienna University of Technology
1
Outline
Recap: Handshake Protocols
Data-flow Abstraction
from handshakes to tokens
latches & pipelines
flow control elements
function blocks
Implementation
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
2
recall
Asynchronous Circuits
request
SRC
f(x)
SNK
acknowledge
local handshake protocol
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
3
Handshake Protocols
recall
Handshake style
4-phase / Return-To-Zero
2-phase / Non-Return-To-Zero
Timing model
Bundled data
Delay-Insensitive
Choice of protocol affects speed,
area, power
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
4
Comparing the Styles
recall
handshake style
data
coding
single rail
multirail
signaling
4-phase
2-phase
(RTZ)
(NRZ)
bundled data
NCL
LEDR
level
transition
single rail
multirail
delay model
bounded
QDI
ACK
explicit handshake
REQ
explicit
Lecture
Digital
Design"
Lecture"Advanced
"Advanced
Digital
Design"
© A. Steininger & J. Lechner / TU Vienna
compl. det.
5
Data-flow Abstraction
Asynchronous data-flow circuits
components communicate via channels
channels may implement any
protocol/coding
Building blocks (components):
Latches
Flow control elements:
Join, Fork, Merge, MUX, DEMUX
Functional blocks
RTL-like modeling of asyn. circuits
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
6
Latches – The Concept
the ONLY components with active
part in handshaking:
process requests from „upstream“
latches => overwrite old data
issue requests to „downstream“ latches
=> provide new data
Abstraction: Tokens and Bubbles
Tokens: new data to be captured,
move downstream
Bubbles: „old“ data to be overwritten,
move upstream
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
7
Latches - Symbols
Tokens marked with circles
E.g., 4-phase protocol
E … empty codeword (NULL)
V … value codeword (DATA)
Token
Bubble
Token
Bubble
E
E
V
V
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
8
Latches – Switching Rule
Latch L1 may store data iff:
all direct successor latches
(downstream) have consumed
(stored and acknowledged) L1‘s
current value
L1 thus stores a bubble
all direct predecessor latches
(upstream) provide new data
L1‘s predecessor(s) store a token
then the token moves on to L1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
9
Latches – Pipelines
L
a
t
c
h
f(x)
L
a
t
c
h
f(x)
L
a
t
c
h
f(x)
L
a
t
c
h
Token
Token
Bubble
Token
V
E
V
V
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
10
Elastic Pipeline
recall
RIN
C
C
AOUT
C
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
ROUT
11
Elastic Pipeline
initial state
RIN
C
C
AOUT
ROUT
C
E
Lecture "Advanced Digital Design"
E
E
© A. Steininger & J. Lechner / TU Vienna
12
Elastic Pipeline
request (rising edge) / token
RIN
C
C
AOUT
ROUT
C
V
E
Lecture "Advanced Digital Design"
E
E
© A. Steininger & J. Lechner / TU Vienna
13
Elastic Pipeline
request/token passes stage 1
RIN
C
C
AOUT
ROUT
C
V
Lecture "Advanced Digital Design"
E
E
© A. Steininger & J. Lechner / TU Vienna
14
Elastic Pipeline
request/token passes stage 2
RIN
C
C
AOUT
ROUT
C
V
Lecture "Advanced Digital Design"
V
E
© A. Steininger & J. Lechner / TU Vienna
15
Elastic Pipeline
request/token passes stage 3 => output
RIN
C
C
AOUT
ROUT
C
V
Lecture "Advanced Digital Design"
V
V
© A. Steininger & J. Lechner / TU Vienna
16
Elastic Pipeline
further request/token
RIN
C
C
AOUT
ROUT
C
E
V
Lecture "Advanced Digital Design"
V
V
© A. Steininger & J. Lechner / TU Vienna
17
Elastic Pipeline
new request/token passes stage 1
RIN
C
C
AOUT
ROUT
C
E
Lecture "Advanced Digital Design"
V
V
© A. Steininger & J. Lechner / TU Vienna
18
Elastic Pipeline
new request/token passes stage 2
RIN
C
C
AOUT
ROUT
C
E
Lecture "Advanced Digital Design"
E
V
© A. Steininger & J. Lechner / TU Vienna
19
Elastic Pipeline
new request/token blocked for stage 3
RIN
C
C
AOUT
ROUT
C
E
Lecture "Advanced Digital Design"
E
V
© A. Steininger & J. Lechner / TU Vienna
20
Elastic Pipeline
one more request/token …
RIN
C
C
AOUT
ROUT
C
V
E
Lecture "Advanced Digital Design"
E
V
© A. Steininger & J. Lechner / TU Vienna
21
Elastic Pipeline
… passes stage 1 only
RIN
C
C
AOUT
ROUT
C
V
Lecture "Advanced Digital Design"
E
V
© A. Steininger & J. Lechner / TU Vienna
22
Elastic Pipeline
ACK consumes the rightmost token
RIN
C
C
AOUT
ROUT
C
V
Lecture "Advanced Digital Design"
E
V
© A. Steininger & J. Lechner / TU Vienna
V
23
Elastic Pipeline
bubble moves upstream …
RIN
C
C
AOUT
ROUT
C
V
Lecture "Advanced Digital Design"
E
E
© A. Steininger & J. Lechner / TU Vienna
24
Elastic Pipeline
… up to stage 1
RIN
C
C
AOUT
ROUT
C
V
Lecture "Advanced Digital Design"
V
E
© A. Steininger & J. Lechner / TU Vienna
25
Pipeline - Rings
Cycles for iterative computations
Initialization of registers:
At least one bubble
At least one value and one empty token
Wrong initialization causes a deadlock
V
Lecture "Advanced Digital Design"
V
© A. Steininger & J. Lechner / TU Vienna
E
26
Control Flow Elements
Transparent for handshaking
Unconditional: Join, Fork, Merge
Conditional: MUX, DEMUX
Join
Fork
MUX
DEMUX
MERGE
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
27
Control Flow - Join
Join synchronizes inputs
Requests are passed on when
all inputs are available
Missing input
All inputs ready
V
E
Lecture "Advanced Digital Design"
V
E
V
© A. Steininger & J. Lechner / TU Vienna
28
Control Flow - Join
Join synchronizes inputs
Requests are passed on when
all inputs are available
Missing input
All inputs ready
V
V
E
Join blocks execution
Lecture "Advanced Digital Design"
Tokens passed on
© A. Steininger & J. Lechner / TU Vienna
29
Control Flow - Fork
Requests are passed on to
multiple successor stages
E
Lecture "Advanced Digital Design"
V
© A. Steininger & J. Lechner / TU Vienna
30
30
Control Flow - Fork
Requests are passed on to
multiple successor stages
Lecture "Advanced Digital Design"
E
V
E
V
© A. Steininger & J. Lechner / TU Vienna
31
Control Flow - Merge
Passes input tokens to output
Mutually exclusive inputs!
Full handshake routine needs to
be performed
0
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
32
Control Flow - Merge
Passes input tokens to output
Mutually exclusive inputs!
Full handshake routine needs to
be performed
Token arrives at
input 0
V
0
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
33
Control Flow - Merge
Passes input tokens to output
Mutually exclusive inputs!
Full handshake routine needs to
be performed
Value token is
passed on
0
1
Lecture "Advanced Digital Design"
V
© A. Steininger & J. Lechner / TU Vienna
34
Control Flow - Merge
Passes input tokens to output
Mutually exclusive inputs!
Full handshake routine needs to
be performed
0
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
Value token is
consumed, receiver
sends ack and
demands empty
token
35
Control Flow - Merge
Passes input tokens to output
Mutually exclusive inputs!
Full handshake routine needs to
be performed
Empty token arrives
E
0
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
36
Control Flow - Merge
Passes input tokens to output
Mutually exclusive inputs!
Full handshake routine needs to
be performed
Empty token is
forwarded
0
1
Lecture "Advanced Digital Design"
E
© A. Steininger & J. Lechner / TU Vienna
37
Control Flow - MUX
Passes selected input to output
The complete handshake routine
needs to be performed before
another input can be selected
0
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
38
Control Flow - MUX
Passes selected input to output
The complete handshake routine
needs to be performed before
another input can be selected
0
Input 0 is selected
V
0
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
39
Control Flow - MUX
Passes selected input to output
The complete handshake routine
needs to be performed before
another input can be selected
Value token is
passed on
0
1
Lecture "Advanced Digital Design"
V
© A. Steininger & J. Lechner / TU Vienna
40
Control Flow - MUX
Passes selected input to output
The complete handshake routine
needs to be performed before
another input can be selected
0
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
Value token is
consumed, receiver
sends ack and
demands empty
tokens
41
Control Flow - MUX
Passes selected input to output
The complete handshake routine
needs to be performed before
another input can be selected
E
Empty tokens arrive
E
0
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
42
Control Flow - MUX
Passes selected input to output
The complete handshake routine
needs to be performed before
another input can be selected
Empty token is
forwarded
0
1
Lecture "Advanced Digital Design"
E
© A. Steininger & J. Lechner / TU Vienna
43
Control Flow - DEMUX
Passes input to selected output
The complete handshake routine
needs to be performed before
another output can be selected
0
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
44
Control Flow - DEMUX
Passes input to selected output
The complete handshake routine
needs to be performed before
another output can be selected
0
Output 0 is selected
V
Lecture "Advanced Digital Design"
0
1
© A. Steininger & J. Lechner / TU Vienna
45
Control Flow - DEMUX
Passes input to selected output
The complete handshake routine
needs to be performed before
another output can be selected
Value token is
passed on to output 0
0
V
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
46
Control Flow - DEMUX
Passes input to selected output
The complete handshake routine
needs to be performed before
another output can be selected
0
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
Value token is
consumed, receiver
sends ack and
demands empty
tokens
47
Control Flow - DEMUX
Passes input to selected output
The complete handshake routine
needs to be performed before
another output can be selected
E
Empty tokens arrive
E
Lecture "Advanced Digital Design"
0
1
© A. Steininger & J. Lechner / TU Vienna
48
Control Flow - DEMUX
Passes input to selected output
The complete handshake routine
needs to be performed before
another output can be selected
Empty token is
transferred to output 0
0
E
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
49
Functional Blocks
Combinational logic
Perform computation
1.
2.
3.
Block waits for tokens on inputs
Performs function
Issues output tokens containing the
results
Implicit Join/Fork
Explicit Join/Fork
F
F
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
50
Functional Blocks
Transparent for handshaking
Relay handshaking signals unmodified
For every input request exactly one
request must be produced at output
Ack
F
Data
Data
The function block is transparent for the
latches in terms of handshaking
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
51
Functional Blocks
Strongly indicating: function block
waits for tokens on all inputs
before producing output tokens
Worst-case latency: slowest input
determines speed
Weakly indicating: function block
may produce some output tokens
as soon as they can be computed
(based on some subset of inputs)
Actual-case latency
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
52
Implementation
Many different implementation styles
Implementation depends on used
handshake protocol
Different area complexity
4-phase/2-phase
Bundled data/DI encoding
4-phase ≤ 2-phase
Bundled data ≤ DI encoding
Protocols may be mixed
Optimization of performance/area/power
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
53
Implementation
Function blocks
Example: Full adder
Control Flow
MUX
DEMUX
Fork
Join
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
54
Adder -Bundled Data
Single rail implementation
Matched delay
E.g., inverter chain
Asymmetric delays for 4-phase
Ack
Req
a
b
cin
Lecture "Advanced Digital Design"
Matched Delay
Full Adder
© A. Steininger & J. Lechner / TU Vienna
sum
cout
55
Adder – Dual Rail I
Delay-insensitive Minterm Synthesis (DIMS)
For dual-rail 4-phase functions
DNF built with Muller C-gates
a
b
cin
sum
cout
F
F
F
F
F
F
F
T
T
F
F
T
F
T
F
F
T
T
F
T
T
F
F
T
F
T
F
T
F
T
T
T
F
F
T
T
T
T
T
T
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
Source: [Sparso 06]
56
Adder – Dual Rail II
NCL threshold gates with hysteresis
Proposed by Theseus Logic, Inc.
High when m-of-n inputs high
Low when all inputs low
Source:
[Sparso 06]
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
57
Join - Bundled Data
4-phase join
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
Source: [Sparso 06]
58
Fork - Bundled Data
4-phase fork
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
Source: [Sparso 06]
59
Join - Dual Rail
4-phase join
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
Source: [Sparso 06]
60
Fork - Dual Rail
4-phase fork
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
Source: [Sparso 06]
61
MUX - Bundled Data
0
4-phase MUX
Source: [Sparso 06]
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
62
DEMUX - Bundled Data
0
4-phase DEMUX
Source: [Sparso 06]
1
Lecture "Advanced Digital Design"
© A. Steininger & J. Lechner / TU Vienna
63