cyclic combinational circuits theory marc d. riedel california institute of technology marrella...
Post on 20-Dec-2015
213 views
TRANSCRIPT
Cyclic Combinational CircuitsCyclic Combinational CircuitsTheoryTheory
Marc D. RiedelCalifornia Institute of Technology
Marrella splendens Cyclic circuit
...
...
...
...
(500 million year old Trilobite) (novel construct)
Theory
Prove that cyclic implementations can have fewer gates than equivalent acyclic ones.
cycliccircuit
acycliccircuit
(optimal)
functions, n variables,m fan-in gatesd
gates n more than gatesn
Rivest’s Circuit
Example due to Rivest:
1x 2x 3x 1x 2x 3x
1fa a 2fa a 3fa a 4fa a 5fa a 6fa a
0 0
Example due to Rivest:
Rivest’s Circuit
2x 3x 2x 3x
1fa a 2fa a 3fa a 4fa a 5fa a 6fa a
1x 1x
Rivest’s Circuit
0 0
0
Example due to Rivest:
2x 3x 2x 3x
1fa a 2fa a 3fa a 4fa a 5fa a 6fa a
Rivest’s Circuit
Example due to Rivest:
1x 2x 3x 1x 2x 3x
1fa a 2fa a 3fa a 4fa a 5fa a 6fa a
0 0
0
1 1
Example due to Rivest:
Rivest’s Circuit
2x 3x 2x 3x
1fa a 2fa a 3fa a 4fa a 5fa a 6fa a
1x 1x
1
1 1
Example due to Rivest:
Rivest’s Circuit
2x 3x 2x 3x
1fa a 2fa a 3fa a 5fa a 6fa a4fa a
4fa a
Example due to Rivest:
1x 1x1 1
Rivest’s Circuit
2x 3x 2x 3x
1fa a 2fa a 3fa a 5fa a 6fa a1
Rivest’s Circuit
Example due to Rivest:
)( 321 xxx )( 312 xxx )( 213 xxx
321 xxx 312 xxx 213 xxx
1x 2x 3x 1x 2x 3x
3 inputs, 6 fan-in two gates. 6 distinct functions, each dependent on all 3 variables.
Addition: ORMultiplication: AND
A feedback circuit with fewer gates than any equivalent feed-forward circuit.
Rivest’s Circuit
1x 2x 3x 1x 2x 3x
1fa a 2fa a 3fa a 4fa a 5fa a 6fa a
3 inputs, 6 fan-in two gates.
6 distinct functions.
6/7 Construction
Cyclic Circuit: 6 functions, 3 variables, 6 fan-in 2 gates.
AND OR AND OR AND OR
1x 2x 3x 1x 2x 3x
1f 2f 3f 4f 5f 6f)( 321 xxx )( 312 xxx )( 213 xxx
321 xxx 312 xxx 213 xxx
Acyclic Circuit: at least 7 fan-in 2 gates.
Rivest’s Circuit
Individually, each function requires 2 fan-in two gates:
)( 321 xxx
)( 3211 xxxf a 3122 xxxf a )( 2133 xxxf a
3214 xxxf a )( 3125 xxxf a 2136 xxxf a
1x2x
3x
An equivalent feed-forward circuit requires 7 fan-in two gates.
1fa a1x
2x
3x
6fa a
2fa a
5fa a
4fa a
3fa a
1x
2x
3x
2x
3x
Rivest’s Circuit
n inputs 2n fan-in two gates,
2n distinct functions.
1x nx 1x nx
1fa a
nfa a1nfa a
nf2a a
1fa a...
...
...
...
a
2fa a
Rivest’s Circuit
1n gates
12 n gates
An equivalent feed-forward circuit requires fan-in two gates.
23 n
nf2a
Rivest’s Circuit
n inputs 2n fan-in two gates,
2n distinct functions.
A feedback circuit with the number of gates of any equivalent feed-forward circuit.
32
1x nx 1x nx
1fa a
nfa a1nfa a
nf2a a
Fan-in Lower Bound
An acyclic circuit with
d
v
m
in -fan
ablesinput vari
functionsoutput
Question:
must have at least how many gates?
Fan-in Lower Bound
An acyclic circuit with
d
v
m
in -fan
ablesinput vari
functionsoutput
Claim:
gates. 11
1
md
vmust have at least
Fan-in Lower Bound
At least one output function does not depend upon any other.
To compute this function, consider a tree of fan-in d gates.
1x 2x 3x
variablesd
Fan-in Lower Bound
At least one output function does not depend upon any other.
To compute this function, consider a tree of fan-in d gates.
1x 2x variables1 dd
5x3x 4x
Fan-in Lower Bound
At least one output function does not depend upon any other.
To compute this function, consider a tree of fan-in d gates.
1x 2x s variable)1( kkdin general, with k nodes,
5x3x 4x
Fan-in Lower Bound
At least one output function does not depend upon any other.
To compute this function, consider a tree of fan-in d gates.
1x 2xvkkd )1(set
1
1
d
vkthen
needed nodes 1
1least at
d
v
5x3x 4x
Fan-in Lower Bound
An acyclic circuit with
d
v
m
in -fan
ablesinput vari
functionsoutput
Claim:
gates. 11
1
md
vmust have at least
1fa a...
...
...
...
a
2fa a
Rivest’s Circuit
1n gates
12 n gates
An equivalent feed-forward circuit requires fan-in two gates.
23 n
nf2a
fan-in 2 gates.1mm
To implement a function of variables, we need at least
nfa
1f a
Acyclic Lower Bound
For the other functions, we need at least gates.
1n
1n
2fa a
functions, n variables,m fan-in gates2
“first” function
other functions
1x
2x
mx
fan-in gates2fan-in gatesd
nfa
1f a
Acyclic Lower Bound
2fa a
functions, n variables,m
“first” function
other functions
1x
2x
mx
fan-in 2 gates.Require at least 2 nm fan-in d gates.Require at least 11
1
nd
m
Constructions/Lower Bounds
variables fan-in cyclic acyclicmin. # gates
functions
6 3 2 6 7
2 5 4 2 3
3 12 6 3 5
today’stalk
Best construction (asymptotic): n 2n
6/7 Construction(Rivest’s Circuit)
Cyclic Circuit: 6 functions, 3 variables, 6 fan-in 2 gates.
AND OR AND OR AND OR
1x 2x 3x 1x 2x 3x
1f 2f 3f 4f 5f 6f)( 321 xxx )( 312 xxx )( 213 xxx
321 xxx 312 xxx 213 xxx
Acyclic Circuit: at least 7 fan-in 2 gates.
Rivest’s Circuit
n inputs 2n fan-in two gates,
2n distinct functions.
A feedback circuit with the number of gates of any equivalent feed-forward circuit.
32
1x nx 1x nx
1fa a
nfa a1nfa a
nf2a a
Questions
1. Is feedback more than a theoretical curiosity, even a general principle?
322. Can we improve upon the bound of ?
3. Can we optimize real circuits with feedback?
Prior Work
• Kautz first discussed the concept of feedback in logic circuits (1970).
• Huffman discussed feedback in threshold networks (1971).
• Rivest presented the first, and only viable, example of a combinational circuit with feedback (1977).
Prior Work
F(X) G(X)e.g., add e.g., shift
Stok discussed feedback at the level of functional units (1992).
Malik (1994) and Shiple et al. (1996) proposed techniques for analysis.
X
G(F(X))
Y
F(G(Y))
Questions
1. Is feedback more than a theoretical curiosity, even a general principle?
322. Can we improve upon the bound of ?
3. Can we optimize real circuits with feedback?
Key Contributions
2. Efficient symbolic algorithm for analysis (both functional and timing).
1. A family of feedback circuits that are asymptotically the size of equivalent feed-forward circuits.
21
3. A general methodology for synthesis.
Example
43218 )( xxxxf
43215 xxxxf
43214 )( xxxxf
34213 xxxxf
43212 xxxxf
)( 43211 xxxxf
34217 )( xxxxf
43216 xxxxf
a
not symmetrical
4 inputs
8 gates
8 distinct functions
x4
x3
x2
x1
x4
x3
x2
x1
Examples, multiple cycles
x1
x1
x1
x1
x2
x2
x3
x3
321311 2xxxxxxf a
3212 xxxf a
a )( 3123 xxxf
2134 xxxf a
a )( 3215 xxxf
a3216 xxxf a
aa )( 3127 xxxf
aa
1138 xxxf
aa )( 3219 xxxf
, 3 inputs9 gates , 9 distinct functions
Example
x1 x2 x3 x4 x5 x1 x2 x3 x4 x5
1f 2f 3f 4f 5f 6f 7f 8f 9f 10fa
11f 12f 13f 14f 15f 16fa 17f 18f 19f 20fa
, 5 inputs 20 gates , 20 distinct functions.
(“stacked” Rivest circuits)
Theory
• Exhibit a cyclic circuit that is optimal in terms of the number of gates, say with C(n) gates, for n variables.
• Prove a lower bound on the size of an acyclic circuit implementing the same functions, say A(n) gates.
Strategy:
Main Result:
)(2
1)( nAnC
6/7 Construction(Rivest’s Circuit)
Cyclic Circuit: 6 functions, 3 variables, 6 fan-in 2 gates.
AND OR AND OR AND OR
1x 2x 3x 1x 2x 3x
1f 2f 3f 4f 5f 6f)( 321 xxx )( 312 xxx )( 213 xxx
321 xxx 312 xxx 213 xxx
Acyclic Circuit: at least 7 fan-in 2 gates.
2/3 Construction
Cyclic Circuit: 2 functions, 5 variables, 2 fan-in 4 gates.
cgab decf
cdeabf decabg
a
bc
c
de
Acyclic Circuit: at least 3 fan-in 4 gates.
cdeab decab
a
b
c
c
d
e
1z 2z
2G1G
Single Cycle
Example
czabG 11 czdeG 22
a
b
c
c
d
e
1z 2z
2G1G
5 inputs, 2 fan-in four gates, 2 outputsEach output function depends on all 5 input variables.
Single Cycle
cdeab decab
czabG 11 czdeG 22 abcf 11 g , decf 22 g ,
a
b
c
c
d
e
1z 2z
2G1G
5 inputs, 2 fan-in four gates, 2 outputs.Each output function depends on all 5 input variables.
Single Cycle
Any acyclic implementation would require at least 3 such gates.
cdeab decab
1fa a1x
2x
3x
6fa a
2fa a
5fa a
4fa a
3fa a
1x
2x
3x
2x
3x
Acyclic Circuit: at least 7 fan-in 2 gates.
2/3 Construction
Cyclic Circuit: 2 functions, 5 variables, 2 fan-in 4 gates.
cgab decf
cdeabf decabg
a
bc
c
de
Acyclic Circuit: at least 3 fan-in 4 gates.
3/5 ConstructionCyclic Circuit: 3 functions, 12 variables, 3 fan-in 6 gates.
Acyclic Circuit: at least 5 fan-in 6 gates.
a,c,e,g,i
b,d,f,h,j
a,b,k,l
31 )( faigecaf
32 )( fbjhfdbf
21213 ffbafbfaklf
½ Example
Generalization: family of feedback circuits ½ the size of equivalent feed-forward circuits.
3111 ff a
a
3222 ff a
a
213231333 fffff a
a
Xiiii offunctionsare,,, nxxxX ,,, 21
(sketch)
X
X
X