abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
abcHaig.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [abcHaig.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Network and node package.]
8 
9  Synopsis [Implements history AIG for combinational rewriting.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: abcHaig.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "base/abc/abc.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 ////////////////////////////////////////////////////////////////////////
31 /// FUNCTION DEFINITIONS ///
32 ////////////////////////////////////////////////////////////////////////
33 
34 
35 /**Function*************************************************************
36 
37  Synopsis [Collects the nodes in the classes.]
38 
39  Description []
40 
41  SideEffects []
42 
43  SeeAlso []
44 
45 ***********************************************************************/
47 {
48  Vec_Ptr_t * vObjs;
49  Hop_Obj_t * pObj;
50  int i;
51  vObjs = Vec_PtrAlloc( 4098 );
52  Vec_PtrForEachEntry( Hop_Obj_t *, p->vObjs, pObj, i )
53  {
54  if ( pObj->pData == NULL )
55  continue;
56  pObj->pData = Hop_ObjRepr( pObj );
57  Vec_PtrPush( vObjs, pObj );
58  }
59  return vObjs;
60 }
61 
62 /**Function*************************************************************
63 
64  Synopsis [Creates classes.]
65 
66  Description []
67 
68  SideEffects []
69 
70  SeeAlso []
71 
72 ***********************************************************************/
74 {
75  Vec_Ptr_t * vClasses;
76  Hop_Obj_t * pObj, * pRepr;
77  int i;
78 
79  // count classes
80  vClasses = Vec_PtrAlloc( 4098 );
81  Vec_PtrForEachEntry( Hop_Obj_t *, vMembers, pObj, i )
82  {
83  pRepr = (Hop_Obj_t *)pObj->pData;
84  assert( pRepr->pData == NULL );
85  if ( pRepr->fMarkA == 0 ) // new
86  {
87  pRepr->fMarkA = 1;
88  Vec_PtrPush( vClasses, pRepr );
89  }
90  }
91 
92  // set representatives as representatives
93  Vec_PtrForEachEntry( Hop_Obj_t *, vClasses, pObj, i )
94  {
95  pObj->fMarkA = 0;
96  pObj->pData = pObj;
97  }
98 
99  // go through the members and update
100  Vec_PtrForEachEntry( Hop_Obj_t *, vMembers, pObj, i )
101  {
102  pRepr = (Hop_Obj_t *)pObj->pData;
103  if ( ((Hop_Obj_t *)pRepr->pData)->Id > pObj->Id )
104  pRepr->pData = pObj;
105  }
106 
107  // change representatives of the class
108  Vec_PtrForEachEntry( Hop_Obj_t *, vMembers, pObj, i )
109  {
110  pRepr = (Hop_Obj_t *)pObj->pData;
111  pObj->pData = pRepr->pData;
112  assert( ((Hop_Obj_t *)pObj->pData)->Id <= pObj->Id );
113  }
114 
115  // update classes
116  Vec_PtrForEachEntry( Hop_Obj_t *, vClasses, pObj, i )
117  {
118  pRepr = (Hop_Obj_t *)pObj->pData;
119  assert( pRepr->pData == pRepr );
120 // pRepr->pData = NULL;
121  Vec_PtrWriteEntry( vClasses, i, pRepr );
122  Vec_PtrPush( vMembers, pObj );
123  }
124 
125  Vec_PtrForEachEntry( Hop_Obj_t *, vMembers, pObj, i )
126  if ( pObj->pData == pObj )
127  pObj->pData = NULL;
128 
129 /*
130  Vec_PtrForEachEntry( Hop_Obj_t *, vMembers, pObj, i )
131  {
132  printf( "ObjId = %4d : ", pObj->Id );
133  if ( pObj->pData == NULL )
134  {
135  printf( "NULL" );
136  }
137  else
138  {
139  printf( "%4d", ((Hop_Obj_t *)pObj->pData)->Id );
140  assert( ((Hop_Obj_t *)pObj->pData)->Id <= pObj->Id );
141  }
142  printf( "\n" );
143  }
144 */
145  return vClasses;
146 }
147 
148 /**Function*************************************************************
149 
150  Synopsis [Counts how many data members have non-trivial fanout.]
151 
152  Description []
153 
154  SideEffects []
155 
156  SeeAlso []
157 
158 ***********************************************************************/
160 {
161  Hop_Obj_t * pObj;
162  int i, Counter = 0;
163  Vec_PtrForEachEntry( Hop_Obj_t *, p->vObjs, pObj, i )
164  {
165  if ( pObj->pData == NULL )
166  continue;
167  if ( Hop_ObjRefs(pObj) > 0 )
168  Counter++;
169  }
170  printf( "The number of class members with fanouts = %5d.\n", Counter );
171  return Counter;
172 }
173 
174 
175 /**Function*************************************************************
176 
177  Synopsis []
178 
179  Description []
180 
181  SideEffects []
182 
183  SeeAlso []
184 
185 ***********************************************************************/
186 static inline Hop_Obj_t * Hop_ObjReprHop( Hop_Obj_t * pObj )
187 {
188  Hop_Obj_t * pRepr;
189  assert( pObj->pNext != NULL );
190  if ( pObj->pData == NULL )
191  return pObj->pNext;
192  pRepr = (Hop_Obj_t *)pObj->pData;
193  assert( pRepr->pData == pRepr );
194  return Hop_NotCond( pRepr->pNext, pObj->fPhase ^ pRepr->fPhase );
195 }
196 
197 /**Function*************************************************************
198 
199  Synopsis []
200 
201  Description []
202 
203  SideEffects []
204 
205  SeeAlso []
206 
207 ***********************************************************************/
208 static inline Hop_Obj_t * Hop_ObjChild0Hop( Hop_Obj_t * pObj ) { return Hop_NotCond( Hop_ObjReprHop(Hop_ObjFanin0(pObj)), Hop_ObjFaninC0(pObj) ); }
209 static inline Hop_Obj_t * Hop_ObjChild1Hop( Hop_Obj_t * pObj ) { return Hop_NotCond( Hop_ObjReprHop(Hop_ObjFanin1(pObj)), Hop_ObjFaninC1(pObj) ); }
210 
211 /**Function*************************************************************
212 
213  Synopsis [Stops history AIG.]
214 
215  Description []
216 
217  SideEffects []
218 
219  SeeAlso []
220 
221 ***********************************************************************/
223 {
224  Hop_Man_t * pNew;
225  Hop_Obj_t * pObj;
226  int i, Counter = 0;
227  Vec_PtrForEachEntry( Hop_Obj_t *, p->vObjs, pObj, i )
228  pObj->pNext = NULL;
229  // start the HOP package
230  pNew = Hop_ManStart();
231  pNew->vObjs = Vec_PtrAlloc( p->nCreated );
232  Vec_PtrPush( pNew->vObjs, Hop_ManConst1(pNew) );
233  // map the constant node
234  Hop_ManConst1(p)->pNext = Hop_ManConst1(pNew);
235  // map the CIs
236  Hop_ManForEachPi( p, pObj, i )
237  pObj->pNext = Hop_ObjCreatePi(pNew);
238  // map the internal nodes
239  Vec_PtrForEachEntry( Hop_Obj_t *, p->vObjs, pObj, i )
240  {
241  if ( !Hop_ObjIsNode(pObj) )
242  continue;
243  pObj->pNext = Hop_And( pNew, Hop_ObjChild0Hop(pObj), Hop_ObjChild1Hop(pObj) );
244 // assert( !Hop_IsComplement(pObj->pNext) );
245  if ( Hop_ManConst1(pNew) == Hop_Regular(pObj->pNext) )
246  Counter++;
247  if ( pObj->pData ) // member of the class
248  Hop_Regular(pObj->pNext)->pData = Hop_Regular(((Hop_Obj_t *)pObj->pData)->pNext);
249  }
250 // printf( " Counter = %d.\n", Counter );
251  // transfer the POs
252  Hop_ManForEachPo( p, pObj, i )
253  Hop_ObjCreatePo( pNew, Hop_ObjChild0Hop(pObj) );
254  // check the new manager
255  if ( !Hop_ManCheck(pNew) )
256  {
257  printf( "Abc_NtkHaigReconstruct: Check for History AIG has failed.\n" );
258  Hop_ManStop(pNew);
259  return NULL;
260  }
261  return pNew;
262 }
263 
264 
265 /**Function*************************************************************
266 
267  Synopsis [Returns 1 if pOld is in the TFI of pNew.]
268 
269  Description []
270 
271  SideEffects []
272 
273  SeeAlso []
274 
275 ***********************************************************************/
277 {
278  if ( pNode == NULL )
279  return 0;
280  if ( pNode == pOld )
281  return 1;
282  // check the trivial cases
283  if ( Abc_ObjIsCi(pNode) )
284  return 0;
285  assert( Abc_ObjIsNode(pNode) );
286  // if this node is already visited, skip
287  if ( Abc_NodeIsTravIdCurrent( pNode ) )
288  return 0;
289  // mark the node as visited
290  Abc_NodeSetTravIdCurrent( pNode );
291  // check the children
292  if ( Abc_NtkHaigCheckTfi_rec( Abc_ObjFanin0(pNode), pOld ) )
293  return 1;
294  if ( Abc_NtkHaigCheckTfi_rec( Abc_ObjFanin1(pNode), pOld ) )
295  return 1;
296  // check equivalent nodes
297  return Abc_NtkHaigCheckTfi_rec( (Abc_Obj_t *)pNode->pData, pOld );
298 }
299 
300 /**Function*************************************************************
301 
302  Synopsis [Returns 1 if pOld is in the TFI of pNew.]
303 
304  Description []
305 
306  SideEffects []
307 
308  SeeAlso []
309 
310 ***********************************************************************/
311 int Abc_NtkHaigCheckTfi( Abc_Ntk_t * pNtk, Abc_Obj_t * pOld, Abc_Obj_t * pNew )
312 {
313  assert( !Abc_ObjIsComplement(pOld) );
314  assert( !Abc_ObjIsComplement(pNew) );
316  return Abc_NtkHaigCheckTfi_rec( pNew, pOld );
317 }
318 
319 /**Function*************************************************************
320 
321  Synopsis []
322 
323  Description []
324 
325  SideEffects []
326 
327  SeeAlso []
328 
329 ***********************************************************************/
330 static inline Abc_Obj_t * Hop_ObjChild0Next( Hop_Obj_t * pObj ) { return Abc_ObjNotCond( (Abc_Obj_t *)Hop_ObjFanin0(pObj)->pNext, Hop_ObjFaninC0(pObj) ); }
331 static inline Abc_Obj_t * Hop_ObjChild1Next( Hop_Obj_t * pObj ) { return Abc_ObjNotCond( (Abc_Obj_t *)Hop_ObjFanin1(pObj)->pNext, Hop_ObjFaninC1(pObj) ); }
332 
333 /**Function*************************************************************
334 
335  Synopsis [Stops history AIG.]
336 
337  Description []
338 
339  SideEffects []
340 
341  SeeAlso []
342 
343 ***********************************************************************/
345 {
346  Abc_Ntk_t * pNtkAig;
347  Abc_Obj_t * pObjOld, * pObjAbcThis, * pObjAbcRepr;
348  Hop_Obj_t * pObj;
349  int i;
350  assert( p->nCreated == Vec_PtrSize(p->vObjs) );
351 
352  // start the new network
353  pNtkAig = Abc_NtkStartFrom( pNtk, ABC_NTK_STRASH, ABC_FUNC_AIG );
354 
355  // transfer new nodes to the PIs of HOP
356  Hop_ManConst1(p)->pNext = (Hop_Obj_t *)Abc_AigConst1( pNtkAig );
357  Hop_ManForEachPi( p, pObj, i )
358  pObj->pNext = (Hop_Obj_t *)Abc_NtkCi( pNtkAig, i );
359 
360  // construct new nodes
361  Vec_PtrForEachEntry( Hop_Obj_t *, p->vObjs, pObj, i )
362  {
363  if ( !Hop_ObjIsNode(pObj) )
364  continue;
365  pObj->pNext = (Hop_Obj_t *)Abc_AigAnd( (Abc_Aig_t *)pNtkAig->pManFunc, Hop_ObjChild0Next(pObj), Hop_ObjChild1Next(pObj) );
366  assert( !Hop_IsComplement(pObj->pNext) );
367  }
368 
369  // set the COs
370  Abc_NtkForEachCo( pNtk, pObjOld, i )
372 
373  // construct choice nodes
374  Vec_PtrForEachEntry( Hop_Obj_t *, p->vObjs, pObj, i )
375  {
376  // skip the node without choices
377  if ( pObj->pData == NULL )
378  continue;
379  // skip the representative of the class
380  if ( pObj->pData == pObj )
381  continue;
382  // do not create choices for constant 1 and PIs
383  if ( !Hop_ObjIsNode((Hop_Obj_t *)pObj->pData) )
384  continue;
385  // get the corresponding new nodes
386  pObjAbcThis = (Abc_Obj_t *)pObj->pNext;
387  pObjAbcRepr = (Abc_Obj_t *)((Hop_Obj_t *)pObj->pData)->pNext;
388  // the new node cannot be already in the class
389  assert( pObjAbcThis->pData == NULL );
390  // the new node cannot have fanouts
391  assert( Abc_ObjFanoutNum(pObjAbcThis) == 0 );
392  // these should be different nodes
393  assert( pObjAbcRepr != pObjAbcThis );
394  // do not create choices if there is a path from pObjAbcThis to pObjAbcRepr
395  if ( !Abc_NtkHaigCheckTfi( pNtkAig, pObjAbcRepr, pObjAbcThis ) )
396  {
397  // find the last node in the class
398  while ( pObjAbcRepr->pData )
399  pObjAbcRepr = (Abc_Obj_t *)pObjAbcRepr->pData;
400  // add the new node at the end of the list
401  pObjAbcRepr->pData = pObjAbcThis;
402  }
403  }
404 
405  // finish the new network
406 // Abc_NtkFinalize( pNtk, pNtkAig );
407 // Abc_AigCleanup( pNtkAig->pManFunc );
408  // check correctness of the network
409  if ( !Abc_NtkCheck( pNtkAig ) )
410  {
411  printf( "Abc_NtkHaigUse: The network check has failed.\n" );
412  Abc_NtkDelete( pNtkAig );
413  return NULL;
414  }
415  return pNtkAig;
416 }
417 
418 /**Function*************************************************************
419 
420  Synopsis [Resets representatives.]
421 
422  Description []
423 
424  SideEffects []
425 
426  SeeAlso []
427 
428 ***********************************************************************/
430 {
431  Vec_Ptr_t * vMembers, * vClasses;
432 
433  // collect members of the classes and make them point to reprs
434  vMembers = Abc_NtkHaigCollectMembers( pMan );
435  printf( "Collected %6d class members.\n", Vec_PtrSize(vMembers) );
436 
437  // create classes
438  vClasses = Abc_NtkHaigCreateClasses( vMembers );
439  printf( "Collected %6d classes. (Ave = %5.2f)\n", Vec_PtrSize(vClasses),
440  (float)(Vec_PtrSize(vMembers))/Vec_PtrSize(vClasses) );
441 
442  Vec_PtrFree( vMembers );
443  Vec_PtrFree( vClasses );
444 }
445 
446 /**Function*************************************************************
447 
448  Synopsis [Resets representatives.]
449 
450  Description []
451 
452  SideEffects []
453 
454  SeeAlso []
455 
456 ***********************************************************************/
458 {
459  Hop_Obj_t * pObj, * pRepr;
460  int i, nClasses, nMembers, nFanouts, nNormals;
461  // clear self-classes
462  Vec_PtrForEachEntry( Hop_Obj_t *, p->vObjs, pObj, i )
463  {
464  // fix the strange situation of double-loop
465  pRepr = (Hop_Obj_t *)pObj->pData;
466  if ( pRepr && pRepr->pData == pObj )
467  pRepr->pData = pRepr;
468  // remove self-loops
469  if ( pObj->pData == pObj )
470  pObj->pData = NULL;
471  }
472  // set representatives
473  Vec_PtrForEachEntry( Hop_Obj_t *, p->vObjs, pObj, i )
474  {
475  if ( pObj->pData == NULL )
476  continue;
477  // get representative of the node
478  pRepr = Hop_ObjRepr( pObj );
479  pRepr->pData = pRepr;
480  // set the representative
481  pObj->pData = pRepr;
482  }
483  // make each class point to the smallest topological order
484  Vec_PtrForEachEntry( Hop_Obj_t *, p->vObjs, pObj, i )
485  {
486  if ( pObj->pData == NULL )
487  continue;
488  pRepr = Hop_ObjRepr( pObj );
489  if ( pRepr->Id > pObj->Id )
490  {
491  pRepr->pData = pObj;
492  pObj->pData = pObj;
493  }
494  else
495  pObj->pData = pRepr;
496  }
497  // count classes, members, and fanouts - and verify
498  nMembers = nClasses = nFanouts = nNormals = 0;
499  Vec_PtrForEachEntry( Hop_Obj_t *, p->vObjs, pObj, i )
500  {
501  if ( pObj->pData == NULL )
502  continue;
503  // count members
504  nMembers++;
505  // count the classes and fanouts
506  if ( pObj->pData == pObj )
507  nClasses++;
508  else if ( Hop_ObjRefs(pObj) > 0 )
509  nFanouts++;
510  else
511  nNormals++;
512  // compare representatives
513  pRepr = Hop_ObjRepr( pObj );
514  assert( pObj->pData == pRepr );
515  assert( pRepr->Id <= pObj->Id );
516  }
517 // printf( "Nodes = %7d. Member = %7d. Classes = %6d. Fanouts = %6d. Normals = %6d.\n",
518 // Hop_ManNodeNum(p), nMembers, nClasses, nFanouts, nNormals );
519  return nFanouts;
520 }
521 
522 /**Function*************************************************************
523 
524  Synopsis [Transform HOP manager into the one without loops.]
525 
526  Description []
527 
528  SideEffects []
529 
530  SeeAlso []
531 
532 ***********************************************************************/
534 {
535  Abc_Ntk_t * pNtkAig;
536  Hop_Man_t * pManTemp;
537 
538  // iteratively reconstruct the HOP manager to create choice nodes
539  while ( Abc_NtkHaigResetReprs( pMan ) )
540  {
541  pMan = Abc_NtkHaigReconstruct( pManTemp = pMan );
542  Hop_ManStop( pManTemp );
543  }
544 
545  // traverse in the topological order and create new AIG
546  pNtkAig = Abc_NtkHaigRecreateAig( pNtk, pMan );
547  Hop_ManStop( pMan );
548  return pNtkAig;
549 }
550 
551 ////////////////////////////////////////////////////////////////////////
552 /// END OF FILE ///
553 ////////////////////////////////////////////////////////////////////////
554 
555 
557 
Hop_Obj_t * Hop_ObjRepr(Hop_Obj_t *pObj)
Definition: hopObj.c:241
int Hop_ManCheck(Hop_Man_t *p)
DECLARATIONS ///.
Definition: hopCheck.c:45
static Hop_Obj_t * Hop_ObjFanin1(Hop_Obj_t *pObj)
Definition: hop.h:183
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Abc_Obj_t * Abc_ObjFanin1(Abc_Obj_t *pObj)
Definition: abc.h:374
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
Definition: abc.h:351
static int Hop_ObjRefs(Hop_Obj_t *pObj)
Definition: hop.h:176
static Hop_Obj_t * Hop_ManConst1(Hop_Man_t *p)
Definition: hop.h:132
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
Definition: abcAig.c:683
Hop_Obj_t * Hop_And(Hop_Man_t *p, Hop_Obj_t *p0, Hop_Obj_t *p1)
Definition: hopOper.c:104
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static Hop_Obj_t * Hop_ObjChild0Hop(Hop_Obj_t *pObj)
Definition: abcHaig.c:208
static int Hop_ObjIsNode(Hop_Obj_t *pObj)
Definition: hop.h:160
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
Definition: abc.h:365
int Id
Definition: hop.h:80
#define Hop_ManForEachPi(p, pObj, i)
ITERATORS ///.
Definition: hop.h:259
#define Hop_ManForEachPo(p, pObj, i)
Definition: hop.h:262
Abc_Ntk_t * Abc_NtkHaigRecreateAig(Abc_Ntk_t *pNtk, Hop_Man_t *p)
Definition: abcHaig.c:344
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition: abc.h:519
static Abc_Obj_t * Abc_NtkCi(Abc_Ntk_t *pNtk, int i)
Definition: abc.h:317
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition: abcCheck.c:61
static int Hop_ObjFaninC1(Hop_Obj_t *pObj)
Definition: hop.h:181
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
int Abc_NtkHaigCheckTfi(Abc_Ntk_t *pNtk, Abc_Obj_t *pOld, Abc_Obj_t *pNew)
Definition: abcHaig.c:311
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
Definition: abc.h:373
int Abc_NtkHaigResetReprs(Hop_Man_t *p)
Definition: abcHaig.c:457
Definition: hop.h:65
DECLARATIONS ///.
Definition: abcAig.c:52
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition: abcNtk.c:1233
unsigned int fMarkA
Definition: hop.h:77
void Hop_ManStop(Hop_Man_t *p)
Definition: hopMan.c:84
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Definition: abcFanio.c:84
void * pManFunc
Definition: abc.h:191
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
Definition: abc.h:355
unsigned int fPhase
Definition: hop.h:76
ABC_DLL Abc_Obj_t * Abc_AigAnd(Abc_Aig_t *pMan, Abc_Obj_t *p0, Abc_Obj_t *p1)
Definition: abcAig.c:700
ABC_DLL Abc_Ntk_t * Abc_NtkStartFrom(Abc_Ntk_t *pNtk, Abc_NtkType_t Type, Abc_NtkFunc_t Func)
Definition: abcNtk.c:106
Abc_Obj_t * pCopy
Definition: abc.h:148
static Hop_Obj_t * Hop_ObjChild1Hop(Hop_Obj_t *pObj)
Definition: abcHaig.c:209
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
static Hop_Obj_t * Hop_ManPo(Hop_Man_t *p, int i)
Definition: hop.h:135
if(last==0)
Definition: sparse_int.h:34
Hop_Man_t * Hop_ManStart()
DECLARATIONS ///.
Definition: hopMan.c:45
static int Hop_IsComplement(Hop_Obj_t *p)
Definition: hop.h:129
static int Counter
Abc_Ntk_t * Abc_NtkHopRemoveLoops(Abc_Ntk_t *pNtk, Hop_Man_t *pMan)
Definition: abcHaig.c:533
Hop_Obj_t * pNext
Definition: hop.h:71
void * pData
Definition: hop.h:68
static Hop_Obj_t * Hop_ObjFanin0(Hop_Obj_t *pObj)
Definition: hop.h:182
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
int Abc_NtkHaigCountFans(Hop_Man_t *p)
Definition: abcHaig.c:159
int Abc_NtkHaigCheckTfi_rec(Abc_Obj_t *pNode, Abc_Obj_t *pOld)
Definition: abcHaig.c:276
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
Definition: abc.h:411
ABC_NAMESPACE_IMPL_START Vec_Ptr_t * Abc_NtkHaigCollectMembers(Hop_Man_t *p)
DECLARATIONS ///.
Definition: abcHaig.c:46
static int Hop_ObjFaninC0(Hop_Obj_t *pObj)
Definition: hop.h:180
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
static Hop_Obj_t * Hop_NotCond(Hop_Obj_t *p, int c)
Definition: hop.h:128
Hop_Man_t * Abc_NtkHaigReconstruct(Hop_Man_t *p)
Definition: abcHaig.c:222
static void Abc_NtkIncrementTravId(Abc_Ntk_t *p)
Definition: abc.h:406
Vec_Ptr_t * Abc_NtkHaigCreateClasses(Vec_Ptr_t *vMembers)
Definition: abcHaig.c:73
Abc_Obj_t * pNext
Definition: abc.h:131
static Abc_Obj_t * Abc_ObjNotCond(Abc_Obj_t *p, int c)
Definition: abc.h:325
#define assert(ex)
Definition: util_old.h:213
Hop_Obj_t * Hop_ObjCreatePo(Hop_Man_t *p, Hop_Obj_t *pDriver)
Definition: hopObj.c:67
void * pData
Definition: abc.h:145
static Abc_Obj_t * Hop_ObjChild1Next(Hop_Obj_t *pObj)
Definition: abcHaig.c:331
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
static Hop_Obj_t * Hop_Regular(Hop_Obj_t *p)
Definition: hop.h:126
static int Abc_ObjIsComplement(Abc_Obj_t *p)
Definition: abc.h:322
Hop_Obj_t * Hop_ObjCreatePi(Hop_Man_t *p)
DECLARATIONS ///.
Definition: hopObj.c:45
static Hop_Obj_t * Hop_ObjReprHop(Hop_Obj_t *pObj)
Definition: abcHaig.c:186
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
Definition: hop.h:49
void Abc_NtkHaigResetReprsOld(Hop_Man_t *pMan)
Definition: abcHaig.c:429
static Abc_Obj_t * Hop_ObjChild0Next(Hop_Obj_t *pObj)
Definition: abcHaig.c:330
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
Definition: abc.h:409
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223