Download presentation

Presentation is loading. Please wait.

Published byLola Ale Modified about 1 year ago

1
CUDD Overview DoRon Motter July31, 2001

2
CUDD CU Decision Diagram Package –Written by Fabio Somenzi at Univ. Colorado Able to create/manipulate BDDs, ZDDs, ADDs

3
Data Structures Nodes (DdNode *) –Reference Count, T-Edge, E- Edge, Variable Index, (value) Manager (DdManager *) –Encapsulates initialization and uniqueness of a DD Cache –Memoizes results of recursive computation

4
Uniqueness of Nodes Nodes are requested (only) via Unique Table Hashes T-Edge, E-Edge, index –DdNode * cuddUniqueInter( DdManager * DD, int index, DdNode * T, DdNode * E ) –If a node already exists, return that node. –Otherwise create new node. Nodes only shared within the same manager

5
Memory Management Each node has a reference count When a BDD is no longer needed, it is recursively dereferenced –N->ref--; if(N->ref == 0) { free(N); Cudd_RecursiveDeref(DD, cuddT(N)); Cudd_RecursiveDeref(DD, cuddE(N)); }

6
Creating BDDs BDD Variables can be created by DdNode * Cudd_bddIthVar( DdManager * dd, int i ) Retrieves the BDD variable with index i if it already exists, or creates a new BDD variable.

7
Manipulating BDDs DdNode * Cudd_bddIte( DdManager * dd, DdNode * f, DdNode * g, DdNode * h ) Cudd_bddAnd, Cudd_bddOr, Cudd_bddXor, Cudd_bddNand, Cudd_bddXnor, …

8
f = x 0 'x 1 'x 2 'x 3 '. f = Cudd_ReadOne(manager); Cudd_Ref(f); for (i = 3; i >= 0; i--) { var = Cudd_bddIthVar(manager,i); tmp = Cudd_bddAnd(manager, Cudd_Not(var),f); Cudd_Ref(tmp); Cudd_RecursiveDeref(manager,f); f = tmp; }

9
Reordering Variables Variable ordering in DD’s influences size CUDD provides methods for reordering variables –void Cudd_AutodynEnable( DdManager * unique, Cudd_ReorderingType method ) Sifting, Random, Converging Sift, Symmetric Sift, Random Pivot, None…

10
Debugging CUDD Most important topic! CUDD can print the DD to stdout. –int Cudd_PrintDebug( DdManager * dd, DdNode * f, int n, int pr ) –CUDD can also redirect stdout, etc. CUDD can dump DD’s to.dot,.blif –Often DD’s are too large to be processed by GraphViz –Often DD’s are too large to be dumped to stdout!

11
CUDD.dot output

12
Questions?

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google