Application of Feynman-like notation to synthesis of circuits from memristors

103
Application of Feynman- like notation to synthesis of circuits from memristors Marek Perkowski November 5, 2012

description

Application of Feynman-like notation to synthesis of circuits from memristors. Marek Perkowski. November 5, 2012. Using the Memristor to build basic logic gates. Logic Design with Memristors. Wiliams Team at HP Basic concepts Demonstration of IMPLY Demonstration of NAND - PowerPoint PPT Presentation

Transcript of Application of Feynman-like notation to synthesis of circuits from memristors

Page 1: Application of Feynman-like notation to synthesis of circuits from  memristors

Application of Feynman-like notation to synthesis of circuits

from memristors

Marek Perkowski

November 5, 2012

Page 2: Application of Feynman-like notation to synthesis of circuits from  memristors

Using the Memristor to

build basic logic gates

Page 3: Application of Feynman-like notation to synthesis of circuits from  memristors

Logic Design with Memristors1. Wiliams Team at HP

1. Basic concepts2. Demonstration of IMPLY3. Demonstration of NAND

2. Israeli Team at Technion - Kvatinsky1. Circuit design methodology2. Performance robustness tradeoff3. Demonstration that the widely used memristor model is not pracrtical

3. Finnish team - Lehtonen1. Show theory with minimum ancilla bits2. No algorithm3. No results4. Restriction of assumption

4. Our work at PSU1. Practical model2. Practical assumptions3. More general

Optimal algorithm

Page 4: Application of Feynman-like notation to synthesis of circuits from  memristors

Leon Chua Historic Discovery• Leon Chua, The Missing Circuit Element, IEEE Proc. 1971.

Invention based on search for general principles of physics and Nature = he referst to Aristotle etc

Page 5: Application of Feynman-like notation to synthesis of circuits from  memristors

Memristors becoming practical

• Hewlett Packard 2008• D Strukov et al The Missing

Memristor found, Nature 2008

R off = high resistanceR ON = low resistance

Very simplified model of memristor

Page 6: Application of Feynman-like notation to synthesis of circuits from  memristors

So far, most of the applications of memristor are in analog design

1. Dr. Teuscher PSU – evolving CAM circuits

2. Memory Digital3. Memory analog4. Fuzzy Circuits5. Analog Circuit6. Neuromorphic Systems

Page 7: Application of Feynman-like notation to synthesis of circuits from  memristors

Y. Ho et al, Nonvolatile Memristor Memory, Device Characteristics and Design Implications, ICCAD, 2009

A. Afifi et al, Implementation of Biologically Plausible Spiking Neural Network Models on the Memristor Crossbar-based CMOS/Nano Circuits.ECCTD 2009

Page 8: Application of Feynman-like notation to synthesis of circuits from  memristors

We can do standard binary logic with memristors!

1. Logic values represented as resistances.2. RON = logic 1, ROFF = logic 0.3. Circuit uses primarily resistors

4. Memristor can be used as:1. Input storage/processing2. Output storage/processing3. Computational logic element4. Latch or memory circuit

Page 9: Application of Feynman-like notation to synthesis of circuits from  memristors

Computing with Memristive Devices

1. Memristive Devices allow for reconfigurable logic2. Will allow for reconfigurable analog circuis3. They allow high density logic4. They will be used in high density DSP and image

processing, Neural, etc. applications.5. Memristive devices will change computing paradigm.

1. CPU embedded memory2. Reboot-less power down at any time3. Extending Moore’s Law beyond CMOS Limit.

• J Borghetti et al PNAS, Vol 106, No 6, 2009.

Page 10: Application of Feynman-like notation to synthesis of circuits from  memristors

Islands of Memristors for parallel calculations, SIMD mode inside

normal MOSFET logic

Page 11: Application of Feynman-like notation to synthesis of circuits from  memristors

Memristive Stateful Logic Gate1. This gate realizes material implication p q2. Device q can be SET conditionally depending on the status of

the device p.3. “Stateful Logic”, functioning complete NAND and status

storing in device s

Needs two pulses

Needs three pulses

Page 12: Application of Feynman-like notation to synthesis of circuits from  memristors

• J Burghes et al, Nature Vol 404, 2010

Page 13: Application of Feynman-like notation to synthesis of circuits from  memristors

Memristive Implication Logic• DR Stewart, GS Snider, PJ Kuekes, JJ

Yang, DR Stewart, RS Williams, Nature 464, 873 (2010)

Page 14: Application of Feynman-like notation to synthesis of circuits from  memristors

Needs two pulses for executing IMPLY

Page 15: Application of Feynman-like notation to synthesis of circuits from  memristors

Memristive Implication Logic • DR Stewart, GS Snider, PJ Kuekes, JJ Yang, DR Stewart, RS Williams, Nature 464, 873 (2010)

Needs two pulses

Page 16: Application of Feynman-like notation to synthesis of circuits from  memristors

Set to 0

0 000 010

Pq New value

Page 17: Application of Feynman-like notation to synthesis of circuits from  memristors

EXOR realized with

memristors

Page 18: Application of Feynman-like notation to synthesis of circuits from  memristors

Memristor Based XOR gate

output• 2 memristors• 3 FETs• 1 resistor• 2 steps

• First create VRST by S1=1, S2 =0

• Next create VSET by S1=0, S2=1

Input and output data are in memristors

Page 19: Application of Feynman-like notation to synthesis of circuits from  memristors

R Y

R P

R Q

Page 20: Application of Feynman-like notation to synthesis of circuits from  memristors
Page 21: Application of Feynman-like notation to synthesis of circuits from  memristors

• In this approach, the logic state is represented as resistance, where a high resistance is logical state zero, and a low resistance is logical state one.

• An example of this approach, the IMPLY logic gate, is shown in Figure 2.

Page 22: Application of Feynman-like notation to synthesis of circuits from  memristors

Using the Memristor to build basic logic gates

• NOT• OR• AND• NAND• NOR• EXOR• MUX

• Memristor

A

Bx

A B X

0 0 1

0 1 1

1 0 0

1 1 1

Page 23: Application of Feynman-like notation to synthesis of circuits from  memristors

Costs of gates with memristorsRealized

with memristors

Numbers of levels

IMPLY 1 1 +AND 3 3OR 2 2 +

NAND 2 2 +NOR 3 3EXOR 4 3XNOR

INHIBIT 2 2 +NOT 1 1 +MUX 5 3

Good for TANT, Negative gate methods

CHANGE

Page 24: Application of Feynman-like notation to synthesis of circuits from  memristors

examples

• ((abc)’+ (ab))’ + (bcd) =• ((a’ + b’ + c’) + ab)’ + bcd =• (abc) * (ab)’ + bcd =• (abc) * (a’ + b’) + bcd =• (b’c) + bcd

Page 25: Application of Feynman-like notation to synthesis of circuits from  memristors

example

• ((ab) 0) = (a’+b’)• ((ab) (ab)) = (a’+b’) + ab• (0 ab) = (ab)• (a b) = (a’+b)

Page 26: Application of Feynman-like notation to synthesis of circuits from  memristors

ab a + b

a

ba + b

a0

ab ( a + b) = a * b

0

aa + b = (a * b)b

0

All these circuits assume that value of b already exists.If it does not exist, we need two inverters (from IMPLY) to create it.

Page 27: Application of Feynman-like notation to synthesis of circuits from  memristors

ab a + b

a

ba + b

a0

ab ( a + b) = a * b

0

a

(a * b)

b0 0

All these circuits assume that value of b already exists.If it does not exist, we need two inverters (from IMPLY) to create it.

Page 28: Application of Feynman-like notation to synthesis of circuits from  memristors

Now we assume that all inputs must be

created with Stateful IMPLY technology

from scratch.

Page 29: Application of Feynman-like notation to synthesis of circuits from  memristors

NOT & OR

Page 30: Application of Feynman-like notation to synthesis of circuits from  memristors

NOT & ORNOT OR with two inputs

A

0

B

x

A

Bx

A

0x

A x

B

00

Page 31: Application of Feynman-like notation to synthesis of circuits from  memristors

NOT

A

0x

A x

BC

A

0

NOT is a one WM gate

A

Page 32: Application of Feynman-like notation to synthesis of circuits from  memristors

B

2-input OR is a two WM gate

A0

B

X=A+BB0

0

A+B

B

0

B

2-input OR

AB

0

A0

0

Page 33: Application of Feynman-like notation to synthesis of circuits from  memristors

NAND & AND

NAND & AND

Page 34: Application of Feynman-like notation to synthesis of circuits from  memristors

NAND & AND

NAND

A

0

B

x

A

Bx

NAND & AND

Page 35: Application of Feynman-like notation to synthesis of circuits from  memristors

BC

A

0

0

2-input AND is a two ancilla gate

2-input NAND is a one ancilla gate

0 NAND(a,b)

AND(a,b)

0

NAND & AND

Page 36: Application of Feynman-like notation to synthesis of circuits from  memristors

0

b

c

d

Working (memorizing) memristor (ba) =b’+a

(c(ba) c) = (c’+(b’+a)=(bc)’+a

(bcd)’+0

0

y

z

v

(yzv)’ + 0

0

Realization of a Sum of positive Products

bcd+yzv

Imply serves as inverter

NAND(b,c,d)

NAND(y,z,v)

1

2

1

2

Two Working Memristors

SOP

Page 37: Application of Feynman-like notation to synthesis of circuits from  memristors

Inhibit gate A * B’ = (A’ + B)’ 2 gates

BC

A

0

0

2-input INHIBIT is a two WM gate

A’ Two working bits

B’

A’ + B

0A * B’ = (A’ + B)’

Page 38: Application of Feynman-like notation to synthesis of circuits from  memristors

PSE gates

Page 39: Application of Feynman-like notation to synthesis of circuits from  memristors

BC

A

A

0

0

PS is a two WM gate

0

0 X=(AB)’C

(AB) (AB) + C’

(AB)’

Page 40: Application of Feynman-like notation to synthesis of circuits from  memristors

ABC DE

F

BC

A

0

(A+B+C)=X

D

0

X’+D’+E’+F’=(XDEF)’

EF

A

0 0

B

C

X

XDEF

X= (A+B+C)

0 0

PSE gate has 2 WM

Page 41: Application of Feynman-like notation to synthesis of circuits from  memristors

NOR Gates

Page 42: Application of Feynman-like notation to synthesis of circuits from  memristors

NORBC

A

A0 0

0

NOR is a two WM bit gate

A A+B

B0

(A+B)’

Page 43: Application of Feynman-like notation to synthesis of circuits from  memristors

EXOR Gates

Page 44: Application of Feynman-like notation to synthesis of circuits from  memristors

EXOR = 8 literals in NAND = 8 IMPLY

B

A

0

EXOR is a three WM gate

0

A’B + A B’

A’

A’

B’

B

A

AA + B’

0 A’B

0 B’

B B + A’0

Page 45: Application of Feynman-like notation to synthesis of circuits from  memristors

SYNTHESIS WITH EXORS WITH NO

LIMIT ON NUMBER OF ANCILLA BITS

Page 46: Application of Feynman-like notation to synthesis of circuits from  memristors

B

A

0

0

A’B + A B’

A’

AA + B’

0 A’B

0 B’

B B + A’0

C

0

0

A’B + A B’

A’

AA + B’

0 A’B

0 B’

B B + A’0

First Working Memristor

Second Working Memristor

Third Working Memristor

Fourth Working Memristor

This circuit has 4 working memristors and 16 IMPLY gates

Page 47: Application of Feynman-like notation to synthesis of circuits from  memristors

B

A

0

0

A’B + A B’

A’

AA + B’

0 A’B

0 B’

B B + A’0

Page 48: Application of Feynman-like notation to synthesis of circuits from  memristors

MUX

Page 49: Application of Feynman-like notation to synthesis of circuits from  memristors

MUXB

0

MUX is a three ancilla gate

0

A

C

(AB)’

AB + A’C

A

A’

B

C

(A’C)’0

0A’

A

(A+C’)’

7 WM expected

Page 50: Application of Feynman-like notation to synthesis of circuits from  memristors

Circuits from reversible gates versus circuits from memristor material implications

Similarities• No fanout• In-gate memory exists

Differences• No inverter• Different gates

Page 51: Application of Feynman-like notation to synthesis of circuits from  memristors

Examples of typical multi-input gates

Page 52: Application of Feynman-like notation to synthesis of circuits from  memristors

B

0

C

A

A A + B A + B + C = (ABC)

Realization of positive product (negated)

which is multi-input NAND

Page 53: Application of Feynman-like notation to synthesis of circuits from  memristors

0

A A + B A + B + C

Realization of positive product (negated)

which is multi-input OR

A

B

C

Page 54: Application of Feynman-like notation to synthesis of circuits from  memristors

Gates from AND and OR similar to PS

Gate

Page 55: Application of Feynman-like notation to synthesis of circuits from  memristors

(A+B+C) DEA

B

CD

E

A

B

CD

E D’ + E’ + (ABC)

PSE gate with not negated inputs

TANT IMPLICANT

DE * (A+B+C)

Various gates similar to PSE

Page 56: Application of Feynman-like notation to synthesis of circuits from  memristors

BC

A

A A + B

(ABC)

0

D

00

E

D + E= (DE)(ABC)

We loose info and initialize to zero

DE + (ABC)

Sum of any number of positive products is a two-ancilla gate

Page 57: Application of Feynman-like notation to synthesis of circuits from  memristors

AND/OR gate (PS gate)

Page 58: Application of Feynman-like notation to synthesis of circuits from  memristors

ABC

DEFA

BC

DEF

A

B

C

DEF

A+B+C

Page 59: Application of Feynman-like notation to synthesis of circuits from  memristors

METHOD 1:Example of synthesis

using the step-by-step realization

method with KMaps

Page 60: Application of Feynman-like notation to synthesis of circuits from  memristors

Using the Memristor to build OTHER

gates

Page 61: Application of Feynman-like notation to synthesis of circuits from  memristors

Example of synthesis based

on mappingMapping from an existing

circuit networkCan be solved using dynamic programming

Page 62: Application of Feynman-like notation to synthesis of circuits from  memristors

MATERIAL NOT FOR

NOWSlides below have errors

Page 63: Application of Feynman-like notation to synthesis of circuits from  memristors

Ashenhurst Curtis Decomposition

Page 64: Application of Feynman-like notation to synthesis of circuits from  memristors

Ashenhurst-Curtis Decomposition

arbitrary

arbitrary

Page 65: Application of Feynman-like notation to synthesis of circuits from  memristors

Ashenhurst-Curtis Decomposition with symmetric predecessor

arbitrary

symmetric

Page 66: Application of Feynman-like notation to synthesis of circuits from  memristors

Ashenhurst-Curtis Decomposition with symmetric predecessor

symmetric

Arbitrary remainder

Page 67: Application of Feynman-like notation to synthesis of circuits from  memristors

Ashenhurst-Curtis Decomposition with symmetric predecessor and successor

symmetric

symmetric

Page 68: Application of Feynman-like notation to synthesis of circuits from  memristors

METHOD 2:

Bi-Decomposition of Binary Single-Output

Circuits

Page 69: Application of Feynman-like notation to synthesis of circuits from  memristors

Boolean Operations

Page 70: Application of Feynman-like notation to synthesis of circuits from  memristors

Graphical OR decomposition

1. We arbitrarily partitionate all input variables to sets {a,b} and {c,d}

2. We assume OR gate

3. We find function g on variables a and b only

4. We calculate the reminder function g on variables c and d and may be more

Page 71: Application of Feynman-like notation to synthesis of circuits from  memristors

First variant of synthesis

Student should show how this function is realized on memristors to minimize the number of working transistors (Ancilla)

Page 72: Application of Feynman-like notation to synthesis of circuits from  memristors

Second variant of synthesis

We assume AND Decomposition

Page 73: Application of Feynman-like notation to synthesis of circuits from  memristors
Page 74: Application of Feynman-like notation to synthesis of circuits from  memristors
Page 75: Application of Feynman-like notation to synthesis of circuits from  memristors
Page 76: Application of Feynman-like notation to synthesis of circuits from  memristors
Page 77: Application of Feynman-like notation to synthesis of circuits from  memristors
Page 78: Application of Feynman-like notation to synthesis of circuits from  memristors

Our final algorithm (initial ideas)

1. Use METHOD 2 - bi-decomposition, first try OR decomposition, next AND, next EXOR.

2. Count width of circuit at every stage.3. If the desired width is exceeded continue

function using METHOD 1.

1. Anika, give examples of combined method on function of 5 variables or 6 variables. 2.

Write the pseudo-code of the final algorithm before programming.

Page 79: Application of Feynman-like notation to synthesis of circuits from  memristors

The method to analyze all circuits in bi-

decomposition, and how to realize them with

memristors

Page 80: Application of Feynman-like notation to synthesis of circuits from  memristors

\/

* \/

\/

* *

\/

+ \/

Or\/

* \/

\/

* \/

\/

+ \/

IMPLY

IMPLY

NAND

IMPLYNAND

X Y

NOT

X Y’

X Y Z V

exor

X Y Z’ V

Page 81: Application of Feynman-like notation to synthesis of circuits from  memristors

+

* \/

+

* *

+

+ +

+

* \/

+

* *

+

+ +

exor Please complete

Page 82: Application of Feynman-like notation to synthesis of circuits from  memristors

+

* \/

+

* *

+

+ +

+

* \/

+

* *

+

+ +

exor Please complete

Page 83: Application of Feynman-like notation to synthesis of circuits from  memristors

+

* *

+ + + +* ** ** ** *

Page 84: Application of Feynman-like notation to synthesis of circuits from  memristors

+

* *

+ + + +* ** ** ** *

Can we evaluate quickly how many two-input NAND and IMPLY gates and how many ancilla we need directly from a tree?

a b c d e f g hi j k l

mn

p r

Page 85: Application of Feynman-like notation to synthesis of circuits from  memristors

+

* *

+ ++ +

a bc

d gh i k

Page 86: Application of Feynman-like notation to synthesis of circuits from  memristors

* *

+ ++ +

a bc

d gh

i k

EXOR

0

EXOR(A,B)

BA

0

EXOR(A,B)

a

h

bc

d

g

ki

a+b

0

c+d g+h i+k

Page 87: Application of Feynman-like notation to synthesis of circuits from  memristors

Memristors vs reversible

a

b

c

d

Working (memorizing) memristor (ab) = a’+b

((ab) c) = (a’+b)’+c)=(ab’+c)

(((ab) c) d)=( (ab’+c) d) = ((ab’)+c)’ +d =(ab’)’ * c’ + d == (a’+b)c’+d==a’c’ + bc’ + d

Page 88: Application of Feynman-like notation to synthesis of circuits from  memristors

a=0

b

c

d

(ab) = a’+b

((ab) c) = (a’+b)’+c)=(ab’+c)

(((ab) c) d)=( (ab’+c) d) = ((ab’)+c)’ +d =(ab’)’ * c’ + d == (a’+b)c’+d==a’c’ + bc’ + d

Example of circuit synthesis with negations along the bit line

=0’c’ + bc’ + d

Page 89: Application of Feynman-like notation to synthesis of circuits from  memristors

a

b

c

d

(ab) = a’+b

((ab) c) = (a’+b)’+c)=(ab’+c)

(((ab) c) d)=( (ab’+c) d) = ((ab’)+c)’ +d =(ab’)’ * c’ + d == (a’+b)c’+d==a’c’ + bc’ + d

The same circuit in my new notation

1 2

1 2

1 2Working

bits

Page 90: Application of Feynman-like notation to synthesis of circuits from  memristors

a

b

c

d

(ab) = a’+b

((ab) c) = (a’+b)’+c)=(ab’+c)

(((ab) c) d)=( (ab’+c) d) = ((ab’)+c)’ +d =(ab’)’ * c’ + d == (a’+b)c’+d==a’c’ + bc’ + d

1 1 1 0

1 1 1 0

1 1 1 0

0 1 1 0

1 - - 01 - - 0

1 - - 0

0 - - 0

0 - - 10 - - 1

0 - - 1

1 - - 1

1

1

1

0

d

cbGraphical Illustration of the method with negations in the bit line

Page 91: Application of Feynman-like notation to synthesis of circuits from  memristors

pmi p = p + mi

0mi

0 mj

mi S1

S2

S3

mj

0mj mi

mi

Page 92: Application of Feynman-like notation to synthesis of circuits from  memristors

AND/OR

A

0

B

X=(AB)’

A

Bx

0

C0

CD

X=(AB)’C

A

0

B

X=(AB)’

0

C0

X=(AB)’C = (A’+B’)C

X=AB

X=AB+C’

Page 93: Application of Feynman-like notation to synthesis of circuits from  memristors

MUXA

C

B

0

A

B

C

0

(A’B)+(AC)(A+C’)’= A’C

A’+B’ = (AB)’

AB +A’C

Page 94: Application of Feynman-like notation to synthesis of circuits from  memristors

MUX

B

0

MUX is a three ancilla gate

0MUX

A

C

0

0

A

B

C

X

X

Can we build a less expensive MUX?

Page 95: Application of Feynman-like notation to synthesis of circuits from  memristors

1 0

0 1

a 0 1

b 0 1

1 0

0 1

a 0 1

b 0 1

Realize best positive product

1 0

0 -

a 0 1

b 0 1

Create the reminder function

Invert the remainder function

0 1

1 -

a 0 1

b 0 1

Realize best positive product

0 1

1 -

a 0 1

b 0 1

0 -

1 -

a 0 1

b 0 1

Create the reminder function

Invert the remainder function

1 -

0 -

a 0 1

b 0 1

There are no positive products so invert

0 -

1 -

a 0 1

b 0 1

a

bout0

aa* b = X a* b + ab

Simplified schematics for AB + X

Simplified schematics for inverter

Page 96: Application of Feynman-like notation to synthesis of circuits from  memristors

a

b

out

0

a

a* b a* b + aba+b

(AB)’(AB)

inverter

0

Real Circuit for the last example, showing all details

Page 97: Application of Feynman-like notation to synthesis of circuits from  memristors

AB0

0

BA

0

C

0

C

Three input EXOR is a

Three Ancilla Gate

Page 98: Application of Feynman-like notation to synthesis of circuits from  memristors

SYNTHESIS WITH EXORS WITH NO LIMIT ON NUMBER OF ANCILLA BITS

AB0

C0

Page 99: Application of Feynman-like notation to synthesis of circuits from  memristors

1. In their design there are 21 memristors2. We need 2 two-input exors. Exor has 4 gates.3. 2*4 = 8. Our design has 8 gates not 21.4. But we have fan-out of two

AB0

C

• Conclusion. When we want to decrease the number of ancilla bits we need:

1. Methods with many exors are not good as they would require copying elements.

2. Methods are good if they naturally create trees

0

Page 100: Application of Feynman-like notation to synthesis of circuits from  memristors

AB0

C

C

0

AB0

1. But we have fan-out of two2. So we replicate the first EXOR , and we have only 12 gates, not 21 as in their design

Can we design three-input EXOR as a two-ancilla gate?

Page 101: Application of Feynman-like notation to synthesis of circuits from  memristors

AB0

C

C

AB0

Synthesis with copying to get a tree

0

A XOR B

A XOR B

Page 102: Application of Feynman-like notation to synthesis of circuits from  memristors

C

EXOR

BA

0EXOR(A,B)

0

Example of coloring to show that exor of three inputs must have three ancilla, all in red are one ancilla but blue and green cannot be combined

Page 103: Application of Feynman-like notation to synthesis of circuits from  memristors

C

EXOR

BA

0EXOR(A,B)

0

BA

0EXOR(A,B)