48
Cyclic Combinational Circuits Cyclic Combinational Circuits Theory Theory Marc D. Riedel California Institute of Technology Marrella splendens Cyclic circuit ... ... ... ... (500 million year old Trilobite) (novel construct)

Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

Cyclic Combinational CircuitsCyclic Combinational CircuitsTheoryTheory

Marc D. RiedelCalifornia Institute of Technology

Marrella splendens Cyclic circuit

...

...

...

...

(500 million year old Trilobite) (novel construct)

Page 2: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 3: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 4: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 5: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 6: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 7: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 8: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 9: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 10: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 11: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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.

Page 12: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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.

Page 13: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 14: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 15: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

Rivest’s Circuit

n inputs 2n fan-in two gates,

2n distinct functions.

1x nx 1x nx

1fa a

nfa a1nfa a

nf2a a

Page 16: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 17: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 18: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

Fan-in Lower Bound

An acyclic circuit with

d

v

m

in -fan

ablesinput vari

functionsoutput

Question:

must have at least how many gates?

Page 19: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 20: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 21: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 22: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 23: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 24: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 25: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 26: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 27: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 28: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 29: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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.

Page 30: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 31: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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?

Page 32: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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).

Page 33: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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))

Page 34: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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?

Page 35: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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.

Page 36: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 37: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 38: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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)

Page 39: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 40: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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.

Page 41: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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.

Page 42: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

cdeab decab

a

b

c

c

d

e

1z 2z

2G1G

Single Cycle

Example

czabG 11 czdeG 22

Page 43: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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 ,

Page 44: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 45: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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.

Page 46: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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.

Page 47: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

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

Page 48: Cyclic Combinational Circuits Theory Marc D. Riedel California Institute of Technology Marrella splendensCyclic circuit (500 million year old Trilobite)(novel

½ 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