Top Banner
Grouping Heuristics for Word-Level Decision Diagrams Rolf Drechsler Marc Herbstritt Bernd Becker Institute of Computer Science University of Freiburg 79110 Freiburg, Germany
23

Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Dec 18, 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: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Grouping Heuristics forWord-Level Decision Diagrams

Rolf Drechsler Marc Herbstritt Bernd Becker

Institute of Computer Science

University of Freiburg

79110 Freiburg, Germany

Page 2: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Outline

Introduction Word-Level Decision Diagrams (WLDDs) Variable Grouping Topology-based Heuristic Experimental results Conclusions

Page 3: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Motivation

Formal verification is important task

Very popular: Binary Decision Diagrams (BDDs) Bryant 1986Represent functions (bit-level)Many extensions: FDDs, KFDDs, ...

But: not applicable to some important functions,

i.e. arithmetic functions like multipliers

Introduction of Word-Level Decision Diagramspossible to verify large mutlipliers

mn BBf :

Page 4: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Word-Level Decision Diagrams(WLDDs)

Represent functions Directed acyclic graphs Variables are encountered in same order Canonical representation Graph size depends on

variable ordering decomposition type choice grouping (in the case of multi-output circuits)

ZBf n :

Page 5: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

WLDD types

EVBDDs: Lay and Sastry 1992 additive weights, Shannon decomposition

MTBDDs: Clarke et. al 1993 Integer leaf values, Shannon decomposition

*BMDs: Bryant and Chen 1994 multiplicative weights, pos. Davio decomposition

K*BMDs: Drechsler et al. 1996 additive and multiplicative weights,

Shannon/pos. Davio/neg. Davio decomposition

Page 6: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Decomposition Types

Bit-Level:

xx fxfx

)( xxx ffxf

xx fxfx )1(

)( xxx ffxf

)()1( xxx ffxf )( xxx ffxf

Word-Level:

Shannon:

pos. Davio:

neg. Davio:

Page 7: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Example WLDD

213 xxf

MTBDD EVBDD

Page 8: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Example WLDD

210 42 xxxf

MTBDD

EVBDD

*BMD

Page 9: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Variable Grouping3 possibilities:

Consider only single primary outputs Group all outputs by using a weighted sum

Divide the set of outputs in more than one set and group the individual sets by a weighted sum

1

0

2n

i

iix

reduction or blowup is obtained

Page 10: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Example Multiplier function as *BMD (Bryant 1995)

grouped outputs:

linear size

bit-wise representation:

exponential size

Page 11: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Example

Consider MTBDDs for functions

bit-wise representation:

linear size

weighted sum representation

exponential size

BBx ni :

Page 12: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Topology-based Heuristic

Starting with the largest output

largest output: the output with the largest support w.r.t.

the primary inputs Group all outputs together that depend on the same

variables (or on a subset) until no further grouping is possible

Consider the next largest output until no output left

Main idea:

Group the outputs together thatdepend on the same variables

Page 13: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Step by step

Initialization Evaluation of Support Matrix Variable Grouping

Heuristic H1Heuristic H2

Notation: Netlist: G Number of primary inputs: #PI Number of primary outputs: #PO

Page 14: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Initialization

Initialization Evaluation of Support MatrixEvaluation of Support Matrix Variable GroupingVariable Grouping

Assign array of length #PI to each gate in the netlist G Compute the support by traversing the netlist

in topological order.

I.e. the support for the primary outputs is computed

Runtime:

|)|(# GPIO

Page 15: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Evaluation of Support Matrix

Compute the Output Correspondence Matrix (OCM)Matrix dimensions:Matrix is symmetric

1. Step: setting all entries to 0

Runtime: 2. Step: Compute which outputs are defined over

the same support

Runtime: Overall runtime: InitializationInitialization

Evaluation of Support Matrix Variable GroupingVariable Grouping

)(# 2POO

)#(# 2 PIPOO

)#(# 2 PIPOO

POPO ##

Page 16: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

OCM Computation

for( i = 0; i < #PO; i++ )

for( j = 0; j < #PO; j++ )

for( l = 0; l < #PI; l++ )

if( i-th and j-th primary output is dependent on input l )

OCM[i][j] = OCM[i][j]+1;

InitializationInitialization Evaluation of Support Matrix Variable GroupingVariable Grouping

Page 17: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Variable Grouping

Heuristic H1:Include an output variable,

if its support is contained

in the largest one of the

actual group

InitializationInitialization Evaluation of Support MatrixEvaluation of Support Matrix Variable Grouping

Heuristic H2:

Include an output variable,

if its support is contained

in the support of all output

variables that are in the

actual group

Group the output variables dependent on the OCM

Page 18: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Runtime Analysis

Initialization:

Evaluation of Support Matrix:

Overall runtime:

|)|(# GPIO

)#(# 2 PIPOO

))##|,|(max(# 2 PIPOGPIO

Page 19: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Example

H1 results in one group:

(PO1, PO2, PO3)

InitializationInitialization Evaluation of Support MatrixEvaluation of Support Matrix Variable Grouping

H2 results in two groups:

(PO1, PO2),

(PO3)

Page 20: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Experimental Results (1)name #PO H1 H2

alu2 6 1 3

alu4 8 1 3

apex6 99 76 93

apex7 37 24 30

x1 35 20 31

x3 99 76 93

addm4 8 1 1

max1024 6 1 1

rd84 4 1 1

adder16 16 1 1

mult5 10 1 1

Grouping results

H1 is word-oriented

H2 is bit-oriented

Page 21: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Experimental Results (2)

name no grouping Heuristic H1 Heuristic H2*BMD S-K*BMD *BMD S-K*BMD *BMD S-K*BMD

alu2 358 223 288 345 160 219

alu4 2807 1250 1567 2178 546 1256

apex6 1170 1625 1015 6173 1082 1690

apex7 927 5343 805 39656 860 4950

x1 1729 1581 1779 1925 1722 1581

x3 1383 1771 1248 9204 1313 1893

Variable ordering: Interleaving H1 should be applied in Davio dominated WLDDs H2 should be used for Shannon-based WLDDs

(Table entries denote number of nodes of the resulting WLDD)

Page 22: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Experimental Results (3)name no grouping Heuristic H1 Heuristic H2

*BMD S-K*BMD *BMD S-K*BMD *BMD S-K*BMD

addm4 296 189 170 110 170 110

max46 208 85 208 85 208 85

max128 379 129 119 45 119 45

max512 481 237 314 131 314 131

max1024 1058 339 674 180 674 180

rd53 26 16 11 10 11 10

rd73 52 30 27 19 27 19

rd84 71 41 33 26 33 26

adder2 9 6 6 5 6 5

adder4 46 39 43 44 43 44

adder8 320 278 233 240 233 240

adder16 6610 5894 3961 3760 3961 3760

mult2 11 13 6 8 6 8

mult3 48 48 9 32 9 32

mult4 215 177 12 65 12 65

mult5 857 607 14 130 14 130

Page 23: Grouping Heuristics for Word-Level Decision Diagrams Rolf DrechslerMarc HerbstrittBernd Becker Institute of Computer Science University of Freiburg 79110.

Conclusions

We presented heuristics for output grouping for Word-Level Decision Diagrams

Due to this grouping large reductions are possible (up to an exponential factor)

Grouping is dependent on the decomposition type choice

Current and future work: Incorporate output grouping in variable ordering and

decomposition type choice processConsideration of mixed DTLs for each group