reducing multi-valued algebraic operations to binary

26
Reducing Multi-Valued Algebraic Operations to Binary J.-H. Roland Jiang Alan Mishchenko Robert K. Brayton Dept. of EECS University of California, Berkeley

Upload: yazid

Post on 04-Feb-2016

37 views

Category:

Documents


0 download

DESCRIPTION

Reducing Multi-Valued Algebraic Operations to Binary. J.-H. Roland Jiang Alan Mishchenko Robert K. Brayton Dept. of EECS University of California, Berkeley. Outline. Motivation Definitions Problem formulation Co-singleton transform EBD operations Experimental results Conclusions. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Reducing Multi-Valued Algebraic Operations to Binary

Reducing Multi-Valued Algebraic Operations to Binary

J.-H. Roland JiangAlan MishchenkoRobert K. Brayton

Dept. of EECSUniversity of California, Berkeley

Page 2: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Outline

MotivationDefinitionsProblem formulationCo-singleton transformEBD operationsExperimental resultsConclusions

Page 3: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Outline

MotivationDefinitionsProblem formulationCo-singleton transformEBD operationsExperimental resultsConclusions

Page 4: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Motivation: MV optimization

In high-level design, system descriptions are inherently multi-valued.

Common sub-expressions should be extracted and preserved at a higher level.

Given an MV design, there are two paths of synthesis:1. Encoding binary optimization (SIS)

– Optimizes design resting on the initial encoding– Explores optimization only on restricted design space

2. MV optimization encoding binary optimization (MVSIS)+ Preserves common sub-expressions at a higher level+ Explores larger design space– Was thought to be computationally much harder and time

consuming

Page 5: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Motivation: Speed up MV operations

Previous MV algebraic methods can be slow on large examples.

Satisfiability matrix method Graph matching method (2-cube divisors only)

Observations: Many networks had many binary nodes. Good speed-up can be obtained by gathering all these

together and applying SIS fast_extract ( fx ) method.

Question: Can we extend this to MV nodes besides binary ones ?

Page 6: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Outline

MotivationDefinitionsProblem formulationCo-singleton transformEBD operationsExperimental resultsConclusions

Page 7: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Preliminaries

Given a multi-valued function (a generalization of Boolean functions)

f(a, b, …): A × B × · · · F,we can express it in a sum-of-products (SOP) form. E.g.

f{0}(a,b) = a{2,3}b{0,1} + a{0,3}b{1,2} + a{1,2}b{0,3} + a{0,1}b{2,3}

Can think of this as a three level OR-AND-OR expression.

Page 8: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Definitions

Purely algebraic operations (used in SIS) Operations which manipulate expressions like polynomials

Semi-algebraic operations (used in MVSIS) Operations which include up to absorption rules

Boolean operations Operations which include up to cube creation/annihilation

A fact: Algebraic optimization in Approach 2 (semi-algebraic mv

opt. enc. purely algebraic bin. opt.) may correspond to Boolean optimization in Approach 1 (enc. Boolean opt.).

Page 9: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Outline

MotivationDefinitionsProblem formulation Co-singleton transformEBD operationsExperimental resultsConclusions

Page 10: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Problem formulation

Given an arbitrary multi-valued SOP expression E and an oracle which optimally factors a binary SOP input, how can we take advantage of to factor E ?

To do so, we have two criteria:1. Transform E into E’ which “looks like” binary, and2. Transform the resultant output of , say E’’, back

to an expression that “directly” reflects an optimally factored form of E.

Page 11: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Outline

MotivationDefinitionsProblem formulationCo-singleton transform EBD operationsExperimental resultsConclusions

Page 12: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Some unsuccessful naïve trials

Apply binary encoding to the MV SOP expression

For example, using 1-hot code, negative 1-hot code or any logarithmic code Satisfies the first criteria But NOT for the second (i.e. doesn’t directly

reflect a factored form)

Page 13: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

The solution: co-singleton transform Forward transformation:

Input : an MV expression EOutput: a disguised binary expression E’Begin

For each literal xS E

Replace it with i S xiEnd

(xi x{0,…,i–1, i+1,…,n} is a co-singleton literal) Backward transformation:

Input : a disguised binary expression E’Output: an MV expression EBegin

For each i T xi E’ Replace it with x{ j | j T}

End

x {0,1,2}

1

x {1,2}

x 0

x {0,2}

x 1

x {0,1}

x 2

x {0}

x 1x 2

x {1}

x 0x 2

x {}

x 0x 1x 2

x {2}

x 0x 1

Page 14: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Co-singleton transform

An example: Assume a, b are 4-valued variablesE = a{2,3}b{0,1} + a{0,3}b{1,2} + a{1,2}b{0,3} + a{0,1}b{2,3}

(forward co-singleton transform)

E’ = a0a1b2b3 + a1a2b0b3 + a0a3b1b2 + a2a3b0b1

(factoring in the binary domain)

= (a1b3 + a1b3) (a0b2 + a2b0)

(backward co-singleton transform)

E = (a{0,2,3}b{0,1,2} + a{0,1,2}b{0,2,3}) (a{1,2,3}b{0,1,3} + a{0,1,3}b{1,2,3})

Page 15: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Co-singleton transform

Co-singleton transform produces a bijection between an MV expression and a “binary” expression.

Co-singleton transform is of time complexity linear in the size of the input expression.

Co-singleton transform is optimally compact. Only n bits are used for an n-valued MV variable.

Co-singleton transform vs. negative 1-hot encoding Co-singleton transform is NOT an encoding in the sense

that its “binary codes” for the values of an MV variable are non-disjoint.

Co-singleton transform = negative 1-hot coding + some minimization w.r.t unused codes

Page 16: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Closure properties

Let F be a factored form of an MV SOP expression E, and F’ and E’ be the co-singleton transformed versions of F and E respectively.

Theorem 1If F is a purely algebraic factorization of E, then F’ is a purely algebraic factorization of E’.

Theorem 2If F is a semi-algebraic factorization of E, then F’ can be derived from E’ using only semi-algebraic operations

Theorem 3If F’ is a semi-algebraic factorization of E’, then F is a semi-algebraic factorization of E.

CorollarySemi-algebraic operations are closed under the co-singleton transform, but not for purely algebraic operations.

Page 17: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Outline

MotivationDefinitionsProblem formulationCo-singleton transformEBD operationsExperimental resultsConclusions

Page 18: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

EBD operations

EBD: Execution in Binary-in-Disguise Procedure:

Apply co-singleton transformApply binary operationsApply inverse co-singleton transform

Binary operations:Factorization and decompositionAlgebraic divisionCommon divisor extraction (Non-algebraic operations)

In the following discussion, binary operations are meant to be those used in SIS, and therefore are purely algebraic.

Page 19: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

EBD operations vs. MV operations

Different results In MV cases, results are maximally lowered.

In EBD cases, results are maximally raised. Procedures exist to make them similar.

Due to the implementation, there are results that can be obtained by one method, but not by the other.

Page 20: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Outline

MotivationDefinitionsProblem formulationCo-singleton transformEBD operationsExperimental resultsConclusions

Page 21: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Experimental results

Constructed a script (MV-script, similar to script.rugged in SIS).

Replaced all MV algebraic operations with their equivalent EBD operation to obtain EBD-script.

Measured total time and final number of literals in all factored forms of MV network.

Page 22: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Experimental results

circuitname

EBDtime

EBDlits

MVtime

MVlits

vg2 2.9 87 2.6 85sse 2.1 128 2.2 120b12 2.4 70 2.3 70cht 1.8 163 1.9 164sqrt8 1.1 67 1.2 56clip 5.3 134 7.6 129duke2 10.7 497 24.6 488sand 23.6 545 47.5 525f51m 1.8 108 2.4 97sao2 2.4 109 4 110

circuitname

EBDtime

EBDlits

MVtime

MVlits

term1 5.2 147 6.2 1429sym 3 72 4.6 120alu2 12.5 266 19.4 278sct 1.9 83 2 90t481 14.2 36 63.9 40ttt2 3.1 233 4.4 221bw 3.2 194 4.4 194rd84 5.3 87 9.5 106squar5

1.4 58 1.4 58

z4ml 1.2 38 1.4 38

Page 23: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Experimental results

circuitname

EBDtime

EBDlits

MVtime

MVlits

C432 46.3 185 49.3 195planet 24.7 605 63.5 611vda 32.3 763 96 777cps 93.3 1479 364.1 1524dk16 7.0 248 9.3 238S953 18.6 510 29.6 516k2 269.2 1426 3351 1428monk1t

0.9 7 0.8 7

sleep 36.6 33 63.7 37car 1.2 43 1.3 44

circuitname

EBDtime

EBDlits

MVtime

MVlits

balance 8.1 182 84.1 217conv35c

1.2 83 1 72

employ1

1.7 42 1.5 36

mm3 0.9 23 0.8 23mm5 5.3 137 8.5 130pal3x 4 114 4.5 100aluack 1.4 91 1.4 76iris 1.3 12 1.3 12mm4 2 75 2.3 60monks2t

1.2 51 1.2 43

Page 24: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Experimental results

EBD method is significantly faster than MV method, especially for large examples.

EBD results sometimes have little loss in quality due to the fact that there is no semi-algebraic capabilities in the binary domain.

Page 25: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Outline

MotivationDefinitionsProblem formulationCo-singleton transformEBD operationsExperimental resultsConclusions

Page 26: Reducing Multi-Valued Algebraic Operations to Binary

06/03/2003 DATE’03

Conclusions

EBD algebraic operations do not give same results as MV algebraic operations

MV result is maximally “lowered”; EBD result is maximally “raised”

Due to the fact that binary operations are purely algebraic

Binary semi-algebraic operations need to be revisited

EBD operations are significantly faster, especially on large examples.

When used in a full script, the quality of EBD results is comparable with that of MV results.