abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
giaClp.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [giaClp.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Scalable AIG package.]
8 
9  Synopsis [Collapsing AIG.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: gia.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "gia.h"
22 #include "misc/extra/extraBdd.h"
23 #include "bdd/dsd/dsd.h"
24 
26 
27 ////////////////////////////////////////////////////////////////////////
28 /// DECLARATIONS ///
29 ////////////////////////////////////////////////////////////////////////
30 
31 extern int Abc_ConvertZddToSop( DdManager * dd, DdNode * zCover, char * pSop, int nFanins, Vec_Str_t * vCube, int fPhase );
32 extern int Abc_CountZddCubes( DdManager * dd, DdNode * zCover );
33 extern int Abc_NtkDeriveFlatGiaSop( Gia_Man_t * pGia, int * gFanins, char * pSop );
34 extern int Gia_ManFactorNode( Gia_Man_t * p, char * pSop, Vec_Int_t * vLeaves );
35 
36 ////////////////////////////////////////////////////////////////////////
37 /// FUNCTION DEFINITIONS ///
38 ////////////////////////////////////////////////////////////////////////
39 
40 /**Function*************************************************************
41 
42  Synopsis []
43 
44  Description []
45 
46  SideEffects []
47 
48  SeeAlso []
49 
50 ***********************************************************************/
51 Vec_Ptr_t * Gia_GetFakeNames( int nNames )
52 {
53  Vec_Ptr_t * vNames;
54  char Buffer[5];
55  int i;
56 
57  vNames = Vec_PtrAlloc( nNames );
58  for ( i = 0; i < nNames; i++ )
59  {
60  if ( nNames < 26 )
61  {
62  Buffer[0] = 'a' + i;
63  Buffer[1] = 0;
64  }
65  else
66  {
67  Buffer[0] = 'a' + i%26;
68  Buffer[1] = '0' + i/26;
69  Buffer[2] = 0;
70  }
71  Vec_PtrPush( vNames, Extra_UtilStrsav(Buffer) );
72  }
73  return vNames;
74 }
75 
76 /**Function*************************************************************
77 
78  Synopsis []
79 
80  Description []
81 
82  SideEffects []
83 
84  SeeAlso []
85 
86 ***********************************************************************/
87 int Gia_ManRebuildIsop( DdManager * dd, DdNode * bLocal, Gia_Man_t * pNew, Vec_Int_t * vFanins, Vec_Str_t * vSop, Vec_Str_t * vCube )
88 {
89  char * pSop;
90  DdNode * bCover, * zCover, * zCover0, * zCover1;
91  int nFanins = Vec_IntSize(vFanins);
92  int fPhase, nCubes, nCubes0, nCubes1;
93 
94  // get the ZDD of the negative polarity
95  bCover = Cudd_zddIsop( dd, Cudd_Not(bLocal), Cudd_Not(bLocal), &zCover0 );
96  Cudd_Ref( zCover0 );
97  Cudd_Ref( bCover );
98  Cudd_RecursiveDeref( dd, bCover );
99  nCubes0 = Abc_CountZddCubes( dd, zCover0 );
100 
101  // get the ZDD of the positive polarity
102  bCover = Cudd_zddIsop( dd, bLocal, bLocal, &zCover1 );
103  Cudd_Ref( zCover1 );
104  Cudd_Ref( bCover );
105  Cudd_RecursiveDeref( dd, bCover );
106  nCubes1 = Abc_CountZddCubes( dd, zCover1 );
107 
108  // compare the number of cubes
109  if ( nCubes1 <= nCubes0 )
110  { // use positive polarity
111  nCubes = nCubes1;
112  zCover = zCover1;
113  Cudd_RecursiveDerefZdd( dd, zCover0 );
114  fPhase = 1;
115  }
116  else
117  { // use negative polarity
118  nCubes = nCubes0;
119  zCover = zCover0;
120  Cudd_RecursiveDerefZdd( dd, zCover1 );
121  fPhase = 0;
122  }
123  if ( nCubes > 1000 )
124  {
125  Cudd_RecursiveDerefZdd( dd, zCover );
126  return -1;
127  }
128 
129  // allocate memory for the cover
130  Vec_StrGrow( vSop, (nFanins + 3) * nCubes + 1 );
131  pSop = Vec_StrArray( vSop );
132  pSop[(nFanins + 3) * nCubes] = 0;
133  // create the SOP
134  Vec_StrFill( vCube, nFanins, '-' );
135  Vec_StrPush( vCube, '\0' );
136  Abc_ConvertZddToSop( dd, zCover, pSop, nFanins, vCube, fPhase );
137  Cudd_RecursiveDerefZdd( dd, zCover );
138 
139  // perform factoring
140 // return Abc_NtkDeriveFlatGiaSop( pNew, Vec_IntArray(vFanins), pSop );
141  return Gia_ManFactorNode( pNew, pSop, vFanins );
142 }
143 int Gia_ManRebuildNode( Dsd_Manager_t * pManDsd, Dsd_Node_t * pNodeDsd, Gia_Man_t * pNew, DdManager * ddNew, Vec_Int_t * vFanins, Vec_Str_t * vSop, Vec_Str_t * vCube )
144 {
145  DdManager * ddDsd = Dsd_ManagerReadDd( pManDsd );
146  DdNode * bLocal, * bTemp;
147  Dsd_Node_t * pFaninDsd;
148  Dsd_Type_t Type;
149  int i, nDecs, iLit = -1;
150 
151  // add the fanins
152  Type = Dsd_NodeReadType( pNodeDsd );
153  nDecs = Dsd_NodeReadDecsNum( pNodeDsd );
154  assert( nDecs > 1 );
155  Vec_IntClear( vFanins );
156  for ( i = 0; i < nDecs; i++ )
157  {
158  pFaninDsd = Dsd_NodeReadDec( pNodeDsd, i );
159  iLit = Dsd_NodeReadMark( Dsd_Regular(pFaninDsd) );
160  iLit = Abc_LitNotCond( iLit, Dsd_IsComplement(pFaninDsd) );
161  assert( Type == DSD_NODE_OR || !Dsd_IsComplement(pFaninDsd) );
162  Vec_IntPush( vFanins, iLit );
163  }
164 
165  // create the local function depending on the type of the node
166  switch ( Type )
167  {
168  case DSD_NODE_CONST1:
169  {
170  iLit = 1;
171  break;
172  }
173  case DSD_NODE_OR:
174  {
175  iLit = 0;
176  for ( i = 0; i < nDecs; i++ )
177  iLit = Gia_ManHashOr( pNew, iLit, Vec_IntEntry(vFanins, i) );
178  break;
179  }
180  case DSD_NODE_EXOR:
181  {
182  iLit = 0;
183  for ( i = 0; i < nDecs; i++ )
184  iLit = Gia_ManHashXor( pNew, iLit, Vec_IntEntry(vFanins, i) );
185  break;
186  }
187  case DSD_NODE_PRIME:
188  {
189  bLocal = Dsd_TreeGetPrimeFunction( ddDsd, pNodeDsd ); Cudd_Ref( bLocal );
190  bLocal = Extra_TransferLevelByLevel( ddDsd, ddNew, bTemp = bLocal ); Cudd_Ref( bLocal );
191  Cudd_RecursiveDeref( ddDsd, bTemp );
192  // bLocal is now in the new BDD manager
193  iLit = Gia_ManRebuildIsop( ddNew, bLocal, pNew, vFanins, vSop, vCube );
194  Cudd_RecursiveDeref( ddNew, bLocal );
195  break;
196  }
197  default:
198  {
199  assert( 0 );
200  break;
201  }
202  }
203  Dsd_NodeSetMark( pNodeDsd, iLit );
204  return iLit;
205 }
207 {
208  Gia_Man_t * pNew;
209  Dsd_Node_t ** ppNodesDsd;
210  Dsd_Node_t * pNodeDsd;
211  int i, nNodesDsd, iLit = -1;
212  Vec_Str_t * vSop, * vCube;
213  Vec_Int_t * vFanins;
214 
215  vFanins = Vec_IntAlloc( 1000 );
216  vSop = Vec_StrAlloc( 10000 );
217  vCube = Vec_StrAlloc( 1000 );
218 
219  pNew = Gia_ManStart( 2*Gia_ManObjNum(p) );
220  pNew->pName = Abc_UtilStrsav( p->pName );
221  pNew->pSpec = Abc_UtilStrsav( p->pSpec );
222  Gia_ManHashAlloc( pNew );
223 
224  // save the CI nodes in the DSD nodes
225  Dsd_NodeSetMark( Dsd_ManagerReadConst1(pManDsd), 1 );
226  for ( i = 0; i < Gia_ManCiNum(p); i++ )
227  {
228  pNodeDsd = Dsd_ManagerReadInput( pManDsd, i );
229  Dsd_NodeSetMark( pNodeDsd, Gia_ManAppendCi( pNew ) );
230  }
231 
232  // collect DSD nodes in DFS order (leaves and const1 are not collected)
233  ppNodesDsd = Dsd_TreeCollectNodesDfs( pManDsd, &nNodesDsd );
234  for ( i = 0; i < nNodesDsd; i++ )
235  {
236  iLit = Gia_ManRebuildNode( pManDsd, ppNodesDsd[i], pNew, ddNew, vFanins, vSop, vCube );
237  if ( iLit == -1 )
238  break;
239  }
240  ABC_FREE( ppNodesDsd );
241  Vec_IntFree( vFanins );
242  Vec_StrFree( vSop );
243  Vec_StrFree( vCube );
244  if ( iLit == -1 )
245  {
246  Gia_ManStop( pNew );
247  return Gia_ManDup(p);
248  }
249 
250  // set the pointers to the CO drivers
251  for ( i = 0; i < Gia_ManCoNum(p); i++ )
252  {
253  pNodeDsd = Dsd_ManagerReadRoot( pManDsd, i );
254  iLit = Dsd_NodeReadMark( Dsd_Regular(pNodeDsd) );
255  iLit = Abc_LitNotCond( iLit, Dsd_IsComplement(pNodeDsd) );
256  Gia_ManAppendCo( pNew, iLit );
257  }
258  Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) );
259  return pNew;
260 }
261 
262 /**Function*************************************************************
263 
264  Synopsis []
265 
266  Description []
267 
268  SideEffects []
269 
270  SeeAlso []
271 
272 ***********************************************************************/
274 {
275  DdNode * bFunc; int i;
276  Vec_PtrForEachEntry( DdNode *, vFuncs, bFunc, i )
277  if ( bFunc )
278  Cudd_RecursiveDeref( dd, bFunc );
279  Vec_PtrFree( vFuncs );
280 }
281 void Gia_ObjCollapseDeref( Gia_Man_t * p, DdManager * dd, Vec_Ptr_t * vFuncs, int Id )
282 {
283  if ( Gia_ObjRefDecId(p, Id) )
284  return;
285  Cudd_RecursiveDeref( dd, (DdNode *)Vec_PtrEntry(vFuncs, Id) );
286  Vec_PtrWriteEntry( vFuncs, Id, NULL );
287 }
288 Vec_Ptr_t * Gia_ManCollapse( Gia_Man_t * p, DdManager * dd, int nBddLimit, int fVerbose )
289 {
290  Vec_Ptr_t * vFuncs;
291  DdNode * bFunc0, * bFunc1, * bFunc;
292  Gia_Obj_t * pObj;
293  int i, Id;
294  Gia_ManCreateRefs( p );
295  // assign constant node
296  vFuncs = Vec_PtrStart( Gia_ManObjNum(p) );
297  if ( Gia_ObjRefNumId(p, 0) > 0 )
299  // assign elementary variables
300  Gia_ManForEachCiId( p, Id, i )
301  if ( Gia_ObjRefNumId(p, Id) > 0 )
302  Vec_PtrWriteEntry( vFuncs, Id, Cudd_bddIthVar(dd,i) ), Cudd_Ref(Cudd_bddIthVar(dd,i));
303  // create BDD for AND nodes
304  Gia_ManForEachAnd( p, pObj, i )
305  {
306  bFunc0 = Cudd_NotCond( (DdNode *)Vec_PtrEntry(vFuncs, Gia_ObjFaninId0(pObj, i)), Gia_ObjFaninC0(pObj) );
307  bFunc1 = Cudd_NotCond( (DdNode *)Vec_PtrEntry(vFuncs, Gia_ObjFaninId1(pObj, i)), Gia_ObjFaninC1(pObj) );
308  bFunc = Cudd_bddAndLimit( dd, bFunc0, bFunc1, nBddLimit );
309  if ( bFunc == NULL )
310  {
311  Gia_ManCollapseDeref( dd, vFuncs );
312  return NULL;
313  }
314  Cudd_Ref( bFunc );
315  Vec_PtrWriteEntry( vFuncs, i, bFunc );
316  Gia_ObjCollapseDeref( p, dd, vFuncs, Gia_ObjFaninId0(pObj, i) );
317  Gia_ObjCollapseDeref( p, dd, vFuncs, Gia_ObjFaninId1(pObj, i) );
318  }
319  // create BDD for outputs
320  Gia_ManForEachCoId( p, Id, i )
321  {
322  pObj = Gia_ManCo( p, i );
323  bFunc0 = Cudd_NotCond( (DdNode *)Vec_PtrEntry(vFuncs, Gia_ObjFaninId0(pObj, Id)), Gia_ObjFaninC0(pObj) );
324  Vec_PtrWriteEntry( vFuncs, Id, bFunc0 ); Cudd_Ref( bFunc0 );
325  Gia_ObjCollapseDeref( p, dd, vFuncs, Gia_ObjFaninId0(pObj, Id) );
326  }
327  assert( Vec_PtrSize(vFuncs) == Vec_PtrCountZero(vFuncs) + Gia_ManCoNum(p) );
328  // compact
329  Gia_ManForEachCoId( p, Id, i )
330  Vec_PtrWriteEntry( vFuncs, i, Vec_PtrEntry(vFuncs, Id) );
331  Vec_PtrShrink( vFuncs, Gia_ManCoNum(p) );
332  return vFuncs;
333 }
334 
335 /**Function*************************************************************
336 
337  Synopsis []
338 
339  Description []
340 
341  SideEffects []
342 
343  SeeAlso []
344 
345 ***********************************************************************/
347 {
348  Gia_Man_t * pNew;
349  DdManager * dd, * ddNew;
350  Dsd_Manager_t * pManDsd;
351  Vec_Ptr_t * vFuncs;
352  // derive global BDDs
355  vFuncs = Gia_ManCollapse( p, dd, 10000, 0 );
356  Cudd_AutodynDisable( dd );
357  if ( vFuncs == NULL )
358  {
359  Extra_StopManager( dd );
360  return Gia_ManDup(p);
361  }
362  // start ISOP manager
364  Cudd_zddVarsFromBddVars( ddNew, 2 );
365 // Cudd_ReduceHeap( dd, CUDD_REORDER_SYMM_SIFT, 100 );
366  if ( fVerbose )
367  printf( "Ins = %d. Outs = %d. Shared BDD nodes = %d. Peak live nodes = %d. Peak nodes = %d.\n",
368  Gia_ManCiNum(p), Gia_ManCoNum(p),
369  Cudd_SharingSize( (DdNode **)Vec_PtrArray(vFuncs), Vec_PtrSize(vFuncs) ),
371  // perform decomposition
372  pManDsd = Dsd_ManagerStart( dd, Gia_ManCiNum(p), 0 );
373  Dsd_Decompose( pManDsd, (DdNode **)Vec_PtrArray(vFuncs), Vec_PtrSize(vFuncs) );
374  if ( fVerbose )
375  {
376  Vec_Ptr_t * vNamesCi = Gia_GetFakeNames( Gia_ManCiNum(p) );
377  Vec_Ptr_t * vNamesCo = Gia_GetFakeNames( Gia_ManCoNum(p) );
378  char ** ppNamesCi = (char **)Vec_PtrArray( vNamesCi );
379  char ** ppNamesCo = (char **)Vec_PtrArray( vNamesCo );
380  Dsd_TreePrint( stdout, pManDsd, ppNamesCi, ppNamesCo, 0, -1 );
381  Vec_PtrFreeFree( vNamesCi );
382  Vec_PtrFreeFree( vNamesCo );
383  }
384 
385  pNew = Gia_ManRebuild( p, pManDsd, ddNew );
386  Dsd_ManagerStop( pManDsd );
387  // return manager
388  Gia_ManCollapseDeref( dd, vFuncs );
389  Extra_StopManager( dd );
390  Extra_StopManager( ddNew );
391  return pNew;
392 }
394 {
395  Gia_Man_t * pNew;
396  pNew = Gia_ManCollapseTest( p, 0 );
397  Gia_ManPrintStats( p, NULL );
398  Gia_ManPrintStats( pNew, NULL );
399  Gia_ManStop( pNew );
400 }
401 
402 ////////////////////////////////////////////////////////////////////////
403 /// END OF FILE ///
404 ////////////////////////////////////////////////////////////////////////
405 
406 
408 
void Gia_ManCreateRefs(Gia_Man_t *p)
Definition: giaUtil.c:715
static Vec_Ptr_t * Vec_PtrStart(int nSize)
Definition: vecPtr.h:106
void Cudd_RecursiveDerefZdd(DdManager *table, DdNode *n)
Definition: cuddRef.c:385
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
int Gia_ManRebuildNode(Dsd_Manager_t *pManDsd, Dsd_Node_t *pNodeDsd, Gia_Man_t *pNew, DdManager *ddNew, Vec_Int_t *vFanins, Vec_Str_t *vSop, Vec_Str_t *vCube)
Definition: giaClp.c:143
#define CUDD_UNIQUE_SLOTS
Definition: cudd.h:97
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
Definition: giaDup.c:552
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
Definition: cuddRef.c:154
Definition: cudd.h:278
void Dsd_ManagerStop(Dsd_Manager_t *dMan)
Definition: dsdMan.c:100
#define Cudd_Not(node)
Definition: cudd.h:367
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
Definition: giaMan.c:389
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
Definition: gia.h:452
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
Definition: gia.h:703
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Gia_ManHashXor(Gia_Man_t *p, int iLit0, int iLit1)
Definition: giaHash.c:658
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static char * Vec_StrArray(Vec_Str_t *p)
Definition: vecStr.h:272
Dsd_Node_t ** Dsd_TreeCollectNodesDfs(Dsd_Manager_t *dMan, int *pnNodes)
Definition: dsdTree.c:555
DdManager * Dsd_ManagerReadDd(Dsd_Manager_t *pMan)
Definition: dsdApi.c:96
DdNode * Cudd_ReadLogicZero(DdManager *dd)
Definition: cuddAPI.c:1058
static int Gia_ManAppendCi(Gia_Man_t *p)
Definition: gia.h:583
Dsd_Node_t * Dsd_ManagerReadInput(Dsd_Manager_t *pMan, int i)
Definition: dsdApi.c:94
static void Vec_PtrFreeFree(Vec_Ptr_t *p)
Definition: vecPtr.h:569
static int Gia_ObjRefNumId(Gia_Man_t *p, int Id)
Definition: gia.h:518
int Abc_NtkDeriveFlatGiaSop(Gia_Man_t *pGia, int *gFanins, char *pSop)
Definition: abcHieCec.c:131
int Dsd_NodeReadDecsNum(Dsd_Node_t *p)
Definition: dsdApi.c:58
static int Gia_ObjRefDecId(Gia_Man_t *p, int Id)
Definition: gia.h:520
#define CUDD_CACHE_SLOTS
Definition: cudd.h:98
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
DdNode * Cudd_bddAndLimit(DdManager *dd, DdNode *f, DdNode *g, unsigned int limit)
Definition: cuddBddIte.c:346
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Definition: giaMan.c:628
static Vec_Str_t * Vec_StrAlloc(int nCap)
Definition: bblif.c:495
void Extra_StopManager(DdManager *dd)
Definition: extraBddMisc.c:223
static void Vec_StrPush(Vec_Str_t *p, char Entry)
Definition: vecStr.h:535
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
int Cudd_ReadPeakLiveNodeCount(DdManager *dd)
Definition: cuddAPI.c:3151
Dsd_Node_t * Dsd_ManagerReadRoot(Dsd_Manager_t *pMan, int i)
Definition: dsdApi.c:93
static int Abc_LitNotCond(int Lit, int c)
Definition: abc_global.h:267
Definition: gia.h:75
char * Extra_UtilStrsav(const char *s)
#define Gia_ManForEachCiId(p, Id, i)
Definition: gia.h:1018
Gia_Man_t * Gia_ManCollapseTest(Gia_Man_t *p, int fVerbose)
Definition: giaClp.c:346
void Gia_ManCollapseTestTest(Gia_Man_t *p)
Definition: giaClp.c:393
Dsd_Node_t * Dsd_ManagerReadConst1(Dsd_Manager_t *pMan)
Definition: dsdApi.c:95
static void Vec_StrGrow(Vec_Str_t *p, int nCapMin)
Definition: vecStr.h:404
DdNode * Extra_TransferLevelByLevel(DdManager *ddSource, DdManager *ddDestination, DdNode *f)
Definition: extraBddMisc.c:112
Vec_Ptr_t * Gia_ManCollapse(Gia_Man_t *p, DdManager *dd, int nBddLimit, int fVerbose)
Definition: giaClp.c:288
char * pName
Definition: gia.h:97
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static void Vec_StrFree(Vec_Str_t *p)
Definition: bblif.c:616
ABC_NAMESPACE_IMPL_START int Abc_ConvertZddToSop(DdManager *dd, DdNode *zCover, char *pSop, int nFanins, Vec_Str_t *vCube, int fPhase)
DECLARATIONS ///.
Definition: abcFunc.c:471
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static void Vec_StrFill(Vec_Str_t *p, int nSize, char Fill)
Definition: vecStr.h:423
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
DdManager * Cudd_Init(unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int cacheSize, unsigned long maxMemory)
Definition: cuddInit.c:125
char * pSpec
Definition: gia.h:98
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
Definition: giaMan.c:52
#define Gia_ManForEachAnd(p, pObj, i)
Definition: gia.h:1002
DdNode * Cudd_zddIsop(DdManager *dd, DdNode *L, DdNode *U, DdNode **zdd_I)
Definition: cuddZddIsop.c:136
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
STRUCTURE DEFINITIONS ///.
Definition: dsdInt.h:40
Dsd_Manager_t * Dsd_ManagerStart(DdManager *dd, int nSuppMax, int fVerbose)
FUNCTION DECLARATIONS ///.
Definition: dsdMan.c:47
#define Dsd_Regular(p)
Definition: dsd.h:69
static int Vec_PtrCountZero(Vec_Ptr_t *p)
Definition: vecPtr.h:343
void Gia_ObjCollapseDeref(Gia_Man_t *p, DdManager *dd, Vec_Ptr_t *vFuncs, int Id)
Definition: giaClp.c:281
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
#define Dsd_IsComplement(p)
MACRO DEFINITIONS ///.
Definition: dsd.h:68
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
DdNode * Dsd_TreeGetPrimeFunction(DdManager *dd, Dsd_Node_t *pNode)
FUNCTION DEFINITIONS ///.
Definition: dsdLocal.c:54
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
void Cudd_AutodynDisable(DdManager *unique)
Definition: cuddAPI.c:708
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
long Cudd_ReadNodeCount(DdManager *dd)
Definition: cuddAPI.c:3179
static Gia_Obj_t * Gia_ManCo(Gia_Man_t *p, int v)
Definition: gia.h:404
Vec_Ptr_t * Gia_GetFakeNames(int nNames)
FUNCTION DEFINITIONS ///.
Definition: giaClp.c:51
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
int Dsd_NodeReadMark(Dsd_Node_t *p)
Definition: dsdApi.c:59
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
Gia_Man_t * Gia_ManRebuild(Gia_Man_t *p, Dsd_Manager_t *pManDsd, DdManager *ddNew)
Definition: giaClp.c:206
#define ABC_FREE(obj)
Definition: abc_global.h:232
void Gia_ManCollapseDeref(DdManager *dd, Vec_Ptr_t *vFuncs)
Definition: giaClp.c:273
Definition: gia.h:95
DdNode * Cudd_bddIthVar(DdManager *dd, int i)
Definition: cuddAPI.c:416
#define Cudd_NotCond(node, c)
Definition: cudd.h:383
int Cudd_zddVarsFromBddVars(DdManager *dd, int multiplicity)
Definition: cuddAPI.c:519
#define assert(ex)
Definition: util_old.h:213
enum Dsd_Type_t_ Dsd_Type_t
Definition: dsd.h:61
void Cudd_AutodynEnable(DdManager *unique, Cudd_ReorderingType method)
Definition: cuddAPI.c:669
void Gia_ManHashAlloc(Gia_Man_t *p)
Definition: giaHash.c:99
int Abc_CountZddCubes(DdManager *dd, DdNode *zCover)
Definition: abcFunc.c:593
void Dsd_Decompose(Dsd_Manager_t *dMan, DdNode **pbFuncs, int nFuncs)
DECOMPOSITION FUNCTIONS ///.
Definition: dsdProc.c:113
void Cudd_Ref(DdNode *n)
Definition: cuddRef.c:129
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
Definition: gia.h:451
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
Dsd_Type_t Dsd_NodeReadType(Dsd_Node_t *p)
FUNCTION DEFINITIONS ///.
Definition: dsdApi.c:53
Dsd_Node_t * Dsd_NodeReadDec(Dsd_Node_t *p, int i)
Definition: dsdApi.c:57
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
int Gia_ManFactorNode(Gia_Man_t *p, char *pSop, Vec_Int_t *vLeaves)
Definition: giaFx.c:99
static void Vec_PtrShrink(Vec_Ptr_t *p, int nSizeNew)
Definition: vecPtr.h:528
int Gia_ManRebuildIsop(DdManager *dd, DdNode *bLocal, Gia_Man_t *pNew, Vec_Int_t *vFanins, Vec_Str_t *vSop, Vec_Str_t *vCube)
Definition: giaClp.c:87
char * Abc_UtilStrsav(char *s)
Definition: starter.c:47
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
Definition: gia.h:461
int Gia_ManHashOr(Gia_Man_t *p, int iLit0, int iLit1)
Definition: giaHash.c:611
void Dsd_NodeSetMark(Dsd_Node_t *p, int Mark)
Definition: dsdApi.c:77
static void ** Vec_PtrArray(Vec_Ptr_t *p)
Definition: vecPtr.h:279
int Cudd_SharingSize(DdNode **nodeArray, int n)
Definition: cuddUtil.c:544
#define Gia_ManForEachCoId(p, Id, i)
Definition: gia.h:1026
static int Gia_ManObjNum(Gia_Man_t *p)
Definition: gia.h:388
void Dsd_TreePrint(FILE *pFile, Dsd_Manager_t *dMan, char *pInputNames[], char *pOutputNames[], int fShortNames, int Output)
Definition: dsdTree.c:641
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
Definition: gia.h:460
static int Gia_ManCoNum(Gia_Man_t *p)
Definition: gia.h:384
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387