18
Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working Group on Logic Design Tempus Project CD-JEP-16160-2001; Athens, April 21st. 2003

Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Embed Size (px)

Citation preview

Page 1: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Spectral Techniques

in Logic Design

Claudio Moraga

University of Dortmund Germany

Radomir S. Stanković

Technical University of Niš Serbia

Tempus Working Group on Logic Design

Tempus Project CD-JEP-16160-2001; Athens, April 21st. 2003

Page 2: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

 

Introduction

B = {0,1}

(B, ) : Boolean Algebra

(B, · ) : Galois Field GF(2), Boolean Ring, (with x x’ = 1)

Extensions to Bn

Logic design:

Problem Circuit

“AND-OR-NOT” Logic ;

Reed-Muller expressions

Zhegalkin polynomials

Truth table Normal Forms Minimization

Fourier transform of functions Bn B Walsh transform

© cm

“AND-EXOR” Logic

Page 3: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Symmetries and Co-Symmetries

Let C(i,k) denote the context of z with respect to the i-th and k-th

components.

C(i,k) = { z Bn| zi=a, zk=b, a,b {0, 1} }. The elements of C(i,k)

will be simply denoted by z(ab). Similarly for the context of w.

Definition: f : Bn {0, 1} has:

E{zi, zk} f(z(11)) = f(z(00)) EC{zi, zk} f(z(11)) = f ’(z(00))

N{zi, zk} f(z(10)) = f(z(01)) NC{zi, zk} f(z(10)) = f ’(z(01))

P{zi (zk)} f(z(11)) = f(z(01)) PC{zi (zk)} f(z(11)) = f ’(z(01))

P{zi (z’k)} f(z(10)) = f(z(00)) PC{zi (z’k)} f(z(10)) = f ’(z(00))

© cm

Page 4: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Spectral characterization of Symmetries

f: Bn {0, 1} has:

E{zi, zj} S(w(10)) = -S(w(01)) EC{zi, zj} S(w(00)) = -S(w(11))

N{zi, zj} S(w(10)) = S(w(01)) NC{zi, zj} S(w(00)) = S(w(11))

M{zi, zj} S(w(10)) = S(w(01))

=0

MC{zi, zj} S(w(00)) = S(w(11)) = 0

P{zi (zj)} S(w(11)) = S(w(10)) PC{zi (zj)} S(w(00)) = S(w(01))

P{zi (z’j)} S(w(11)) = - S(w(10)) PC{zi (z’j)} S(w(00)) = - S(w(01))

Notation: f S. S denotes the Walsh spectrum of f

© cm

Page 5: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Test of Partial Symmetries [P{zi(zj‘) } S(w(11)) = (-)S(w(10))]

f (z) z1 z0 16S (w) w1 w0 00 01 10 11 00 01 10 11

00 1 0 1 0 00 - 4 - 4 0 0 z3 z2 01 0 1 1 1 w3 w2 01 - 4 - 4 0 0 10 1 1 1 1 10 0 0 4 4 11 1 0 0 0 11 8 -8 - 4 - 4

i=1, j=2, P{z1(z’2)}

i=1, j=0, P{z1(z0)}

w2 = w1 = 1 w1 = w0 = 1 w 6 7 14 15 3 7 11 15

w 2j 2 3 10 11 2 6 10 14

2n S(w) 0 0 - 4 - 4 0 0 4 - 4

2n S(w 2j) 0 0 4 4 0 0 4 - 4

1 2 30 4 5 6 7 8 9 10 11

12 13 14 15

© cm

Page 6: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Using (Partial) Symmetries

P{z1(z’2)} f(z) | = f(z)| z1=1 z1=0

z2=0 z2=0

* if (z2 = 0) then f(z) indep. of z1

P{z1(z0)} f(z) | = f(z) | z1=1 z1=0

z0=1 z0=1

* if (z0 = 1) then f(z) indep. of z1

* if (z2 = 0) or (z0 = 1) then f(z) is indep. of z1

* if (z2 = 0) or (z0 = 1) and z1 =0 then z1 :=1 (else z1 = z1)

OR

z0

z1

z2

z3

© cm

Page 7: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Example

f (z) z1 z0 00 01 10 11

00 1 0 1 0 f(z) = z’2z’0 z’3z1z’0 z’3z2z0 z3 z2 01 0 1 1 1 z3z’1z’0 z3z’2 10 1 1 1 1

11 1 0 0 0 c = (19, 2)

(max fan-in 5)

c = (20, 3) (max fan-in 4)

f(z) = z2 z3 z’0z’2(z1 z3) z’0z’1

c = (14, 3) (max fan-in 3)

© cm

Page 8: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

g (z) z1 z0 00 01 10 11

00 1 0 z3 z2 01 0 1 1 10 1 1

11 1 0 0

z0 z1 z2 z3

OR

g

f(z)

g (z) z1 z0 00 01 10 11

00 0 0 1 0 z3 z2 01 0 0 1 1 10 1 1 1 1 11 1 1 0 0

z0 z1 z2 z3

& OR

f(z)

&

&

&

OR

(max fan-in 4)c = (18, 3)

© cm

Page 9: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

g (z) z1 z0 00 01 10 11

00 1 0 z3 z2 01 0 1 1 10 1 1 11 1 0 0

z0 z1 z2 z3

OR

g

f(z)

g (z) z1 z0 00 01 10 11

00 1 1 1 0 z3 z2 01 0 0 1 1 10 1 0 1 1 11 1 1 0 0

OR

&

OR

f(z) z0

z1

z2

z3

c = (12, 4) (max fan-in 3)© cm

Page 10: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Test of Partial Symmetries [P{zi(zj‘) } S(w(11)) = (-)S(w(10))]

f (z) z1 z0 16S (w) w1 w0 00 01 10 11 00 01 10 11

00 1 0 1 0 00 - 4 - 4 0 0 z3 z2 01 0 1 1 1 w3 w2 01 - 4 - 4 0 0 10 1 1 1 1 10 0 0 4 4 11 1 0 0 0 11 8 -8 - 4 - 4

S(1111) = S(1110) possibly P{z1(z0)}, P{z2(z0)}, P{z3(z0)}

S(1111) = -S(1011) possibly P{z1(z‘2)}, P{z0(z‘2)}, P{z3(z‘2)},

|S(1111)| |S(1101)| impossible: P{z3(z1)}, P{z2(z1)}, P{z0(z1)},

P{z3(z‘1)}, P{z2(z‘1)}, P{z0(z‘1)}

|S(1111)| |S(0111)| impossible: P{z2(z3)}, P{z1(z3)}, P{z0(z3)},

P{z2(z‘3)}, P{z1(z‘3)}, P{z0(z‘3)}

© cm

Page 11: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Spectral Logic Design (Here: restricted to the Walsh Xform.)

1. Fundamentals

The Walsh functions, properties

The Walsh transform; fast algorithms

Spectral decision diagrams

Walsh spectrum of logic functions, properties

2. Spectral Logic Design based on symmetries and co-symmetries

3. Spectral Logic Design based on autocorrelations

4. Spectral Logic Design using minterm exchange

5. Spectral Logic Design based on linearizations

(1 Semester, 2 hrs a week)

Version including Reed Muller, Haar and Arithmetic transforms: 1 Semester, 4 hrs a week

© cm

Page 12: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working
Page 13: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Walsh (Hadamard) Functions

jj

1- n

1j

n zw zw, let z w,

B

1n

1jjjjj

1n

1j

zwzww.z

w 1)(1)((-1)]zw,)1exp[((z) πχ

1n

1j

zwjj

1n

1j

jj1)()zw,h(zwh

Definition:

h : B {1, -1}; x B h(x) = (-1)x = 1 – 2x

h(0) = 1 h(1) = -1

Furthermore, h : (B, ) ({1, -1}, · )

x, y B h(x y) = h(x)·h(y)

© cm

Page 14: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Matrix representation of Walsh functions

Define X(n) = [ i(j)] , where i,j {0, 1, ..., 2n-1}

X (1) 1 1

1 1

and X(2)

1 1 1 1

1 1 1 1

1 1 1 1

1 1 1 1

Then:

i.e. X(2) = X(1) X(1) X(n) = X(n-1) X(1) = X(1) X(n-1)

Moreover: X(1) = 2 (X(1))-1 X(n) = 2n (X(n))-1

© cm

Page 15: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Walsh spectrum of Boolean functions

Let f: Bn {0, 1}. z, w B holds the following:

S(w) = 2 -n hf(z) w(z) zBn

f(z) = h-1 S(w) w(z) wBn

R(w) = 2 -n f(z) w(z) zBn

f(z) = R(w) w(z) wBn

f S

f R

S = 2-n X(n) hF

hF = X(n) S .

R = 2-n X(n) F F = X(n) R

© cm

Page 16: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

The ”Butterfly“ algorithms

f(1)

f(0)

1-1

1 1 =

f(1)

f(0)(1)X

f(0) f(0) + f(1) f(1) f(0) - f(1)

f(3)

f(2) –

f(1)

f(0)f(3)

f(2) +

f(1)

f(0)

=

f(3)

f(2)

f(1)

f(0)

=

f(3)

f(2)

f(1)

f(0)

(1)(1)

(1)(1)

(1)(1)(2)

XX

XX

XXX

f(0) f(0) + f(1) + f(2) + f(3) = R(0)

f(1) f(0) – f(1) + f(2) – f(3) = R(1)

f(2) f(0) + f(1) – f(2) – f(3) = R(2)

f(3) f(0) – f(1) – f(2) + f(3) = R(3)

© cm

Page 17: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working

Properties

Let L be a non singular matrix in (Bn, , · ).

Moreover let f,g: Bn {0, 1}; w, z, b Bn; f Sf and g Sg

P1: (f(z))’ - Sf

P2: f(L · z) Sf (w · L-1)

P3: f(z 2k) w(2k) Sf (w) (0 < k < n)

P4: f(z) zj Sf(w 2j)

P5: f(z) g(z) (Sf * Sg )(w)

P6: h(zj) 2j (z)

P7: h: ( L, ) ({w }, · )

with L = {£:Bn {0, 1} | b Bn, £(z) = <b,z>}

© cm

Page 18: Spectral Techniques in Logic Design Claudio Moraga University of Dortmund Germany Radomir S. Stanković Technical University of Niš Serbia Tempus Working