Top Banner
MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley
23

MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Dec 22, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

MVSIS Front End

219b Project PresentationSpring 2000

Minxi Gao, EECS, UC Berkeley

Page 2: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Outline

Motivation

Experiment results

Implementation

Theory

Problem definition

Page 3: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Motivation

MVSIS Front End

– multi level minimization• decomposition, substitution, collapsing, elimination, factorization – was not done

– 2 level minimization:• espresso-mv, node don’t care minimization – was done

– visualization of network-node information• node factored form, value, kernels… - need first to finish

multi-level minimization – was not done

Page 4: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Problem definition How to factor a multi-valued logic

function?

How to divide a multi-valued logic function given a divisor?

))(( }2,1,0{}0{}3{}3,2,1{}3,1{}2,1,0{

}2,1,0{}3,2,1{}0{}3{}3,2,1{}1{}0{}3{}2,1,0{

cacbca

cbacbcaca

Example:

Page 5: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Theory

Satisfiability-matrix based kernel searching (factorization)– Can do both kernel searching (factorization)

and division

Direct method for multi-valued division– Only applies to division – Similar to the weak-division in the binary

setting

Page 6: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Satisfiability-matrix

Given a matrix M and its entries– Value condition

• Value val of a variable var satisfies the value condition if it appears in all combinations of the rows and columns that it appears in M

– Satisfiability• M is satisfiable if all values of all variables

of the entries in M satisfy the value condition

Page 7: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

An example

1 21 2 3 3

1 1 X1{0,1}X2

{1,2}

22 X1{1}X2

{1,4} X1{0,1}X2

{4}

– All values of X1 satisfy the value condition. Value 4 of X2 satisfies the value condition

X1{0,1}X2

{2,3}

X1{1}X2

{1,3} X1

{0,1}X2{2,3}

Page 8: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Obtain factorization

, ,

, ,

( )( ) ( )( )

( )( )

ij r i c j r cij ij

ij r i c j

M e e e e

M e e

Then if M is satisfiable ,

Place as many cubes of F as possible in M so that M is satisfiable:

– F= (er)(ec) + R– R is the remainder and contains the cubes

that will make M not satisfiable if put in M

er,i=supercube(all cubes in row i) ec,j=supercube(all cubes in column j)

– supercube({ci}): smallest cube containing all ci

Page 9: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Techniques

Pre-select number of rows Fill M in column order, check satisfiability at

position

Branch and bound search Exponential but good heuristics have

been used to speed up the search

Page 10: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

An example

1 21 2

11

22 b{1,2,3} c{3}

a{0}b{1,2,3}

c{0}

F = a{0,1,2}c{3} + b{1,2,3} c{3} + a{0}b{1,2,3} c{0} +a{0}c{1}

= a{0,1,2} b{0,1,2,3}c{3} + b{1,2,3} c{3}

+ a{0}b{1,2,3} c{0} +a{0} b{0,1,2,3}c{1}

a{0,1,2} b{0,1,2,3}c{3}

a{0} b{0,1,2,3} c{1}

Page 11: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

An example

a{0,1,2} b{0,1,2,3}c{3} a{0} b{0,1,2,3}

c{1}

b{1,2,3} c{3} a{0}b{1,2,3}

c{0}

F = a{0,1,2} c{3} + b{1,2,3} c{3} + a{0}b{1,2,3} c{0} +a{0} c{1}

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

c{0,3})

c{3} a{0}c{0,1}

a{0,1,2} c{1,3}

b{1,2,3} c{0,3}

Page 12: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Direct method for exact division

• Similar to WEAK_DIV in SIS • Given:

– F =a{0,1,2}c{3}+b{1,2,3} c{3} +a{0}c{1}+ a{0}b{1,2,3} c{0}

– d =c{3}+a{0}c{0,1,2}

• Candidate cubes: contained in divisor cube– c{3}: – a{0}c{0,1,2}:

a{0,1,2}c{3}

, a{0}c{1}, a{0}b{1,2,3}

c{0}

b{1,2,3} c{3}

Page 13: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Direct method for exact division

Candidate quotient cubes:– c{3}: a{0,1,2}c S1, b{1,2,3} c S2

– a{0}c{0,1,2}: a S3c S4, a S5b{1,2,3} c S6

– {3}S1{0,1,2,3}, {3}S2{0,1,2,3}, {0}S3 {0,1,2,3}, {1} S4 {1,3}, {0} S5{0,1,2,3}, {0}S6 {0,3}

Take quotient cubes in common (compatible)– c{3}: – a{0}c{0,1,2}:

Result:– F =(c{3} +a{0}c{0,1,2})(a{0,1,2} c{1,3} +b{1,2,3} c{0,3})

a{0,1,2}c{1,3}, a{0,1,2}c{1,3},

b{1,2,3} c{0,3}

b{1,2,3} c{0,3}

Page 14: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Direct method for exact division

Run time for direct method:– 2-cube divisor:

• Can be reduced to maximum matching problem: maximum number of edges in a graph none of which share a vertex

• n3, have been implemented, result show it is fast

– >2-cube divisor• can be reduced to covering problem• Have not been implemented yet.

Page 15: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Implementation MV-SIS multi-level minimization

packages related to algebraic factorization and division– kernel extraction– factorization– decomposition– collapsing– substitution– elimination

Page 16: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Implementation

Kernelling and factorization– Satisfiability-matrix based method

Substitution– Direct method

Collapsing Elimination

– Compute the value of a node: number of cubes before and after elimination

– Collapse if value is less than thresh hold given by the user

Page 17: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Decomposition Best-kernel based method

– Divide these kernels into all other nodes to compute their value

– Choose the best one, extract it into a new node

– Find all 2-cube kernels in all nodes by making each pair of cubes cube-free

– Divide the new node into all other nodes

Page 18: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Visualization commands mv_print n1

– print SOP form of the function at node n1, print the whole network if n1 not specified

mv_print_io n1– print fanins and fanouts of n1. Print PI and PO if n1

not specified mv_print_factor n1

– print factored form of n1. print the whole network if n1 not specified

mv_print_value n1– print the value of n1, print the whole network if n1

not specified

Page 19: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Experimental results Multi-valued PLA examples:

– All 2-cube kernel method decomposition

PLA Run time/sec Num cubes saved

C1908_40_20.club 2 613->523, 15%

Apex6_40_25.club 1.8 505->429, 15%

Frg2_60_25.club 6 699->507, 27%

Pair_40_15.club 10 1418->1279, 10%

Toolarge_25_20.club 0.35 403->312, 23%

Page 20: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Experimental results• Hand-made examples

• Test examples from last year’s project and an adder_mod4 example

• All 2-cube kernel method decomposition

Example methodNum cubes

saved

test3Eliminate 0->dcomp-

>eliminate 0286->107,

63%

test3 Collapse->decomp 488->71, 85%

test2 Eliminate 0->decomp 73->42, 42%

Adder_mod4 Decomp 32->24, 25%

Adder_mod5 Decomp 40->34, 15%

Page 21: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Experimental results Machine_learning examples:

– All 2-cube kernel method decomposition

Name Num cubes saved

balance.mv 153->121, 21%

car.mv 58->45, 22%

employ2.mv 60->33, 45%

nursery.mv 144->53, 63%

pal3.mv 36->18, 50%

Page 22: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.

Conclusion

Multi-level minimization in MVSIS is efficient and fast

We have built a SIS version with MV layer with a menu of optimization commands

Page 23: MVSIS Front End 219b Project Presentation Spring 2000 Minxi Gao, EECS, UC Berkeley.