abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
aigObj.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [aigObj.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [AIG package.]
8 
9  Synopsis [Adding/removing objects.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - April 28, 2007.]
16 
17  Revision [$Id: aigObj.c,v 1.00 2007/04/28 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "aig.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 ////////////////////////////////////////////////////////////////////////
31 /// FUNCTION DEFINITIONS ///
32 ////////////////////////////////////////////////////////////////////////
33 
34 /**Function*************************************************************
35 
36  Synopsis [Creates primary input.]
37 
38  Description []
39 
40  SideEffects []
41 
42  SeeAlso []
43 
44 ***********************************************************************/
46 {
47  Aig_Obj_t * pObj;
48  pObj = Aig_ManFetchMemory( p );
49  pObj->Type = AIG_OBJ_CI;
50  Vec_PtrPush( p->vCis, pObj );
51  p->nObjs[AIG_OBJ_CI]++;
52  return pObj;
53 }
54 
55 /**Function*************************************************************
56 
57  Synopsis [Creates primary output with the given driver.]
58 
59  Description []
60 
61  SideEffects []
62 
63  SeeAlso []
64 
65 ***********************************************************************/
67 {
68  Aig_Obj_t * pObj;
69  pObj = Aig_ManFetchMemory( p );
70  pObj->Type = AIG_OBJ_CO;
71  Vec_PtrPush( p->vCos, pObj );
72  Aig_ObjConnect( p, pObj, pDriver, NULL );
73  p->nObjs[AIG_OBJ_CO]++;
74  return pObj;
75 }
76 
77 
78 /**Function*************************************************************
79 
80  Synopsis [Create the new node assuming it does not exist.]
81 
82  Description []
83 
84  SideEffects []
85 
86  SeeAlso []
87 
88 ***********************************************************************/
90 {
91  Aig_Obj_t * pObj;
92  assert( !Aig_IsComplement(pGhost) );
93  assert( Aig_ObjIsHash(pGhost) );
94 // assert( pGhost == &p->Ghost );
95  // get memory for the new object
96  pObj = Aig_ManFetchMemory( p );
97  pObj->Type = pGhost->Type;
98  // add connections
99  Aig_ObjConnect( p, pObj, pGhost->pFanin0, pGhost->pFanin1 );
100  // update node counters of the manager
101  p->nObjs[Aig_ObjType(pObj)]++;
102  assert( pObj->pData == NULL );
103  // create the power counter
104  if ( p->vProbs )
105  {
106  float Prob0 = Abc_Int2Float( Vec_IntEntry( p->vProbs, Aig_ObjFaninId0(pObj) ) );
107  float Prob1 = Abc_Int2Float( Vec_IntEntry( p->vProbs, Aig_ObjFaninId1(pObj) ) );
108  Prob0 = Aig_ObjFaninC0(pObj)? 1.0 - Prob0 : Prob0;
109  Prob1 = Aig_ObjFaninC1(pObj)? 1.0 - Prob1 : Prob1;
110  Vec_IntSetEntry( p->vProbs, pObj->Id, Abc_Float2Int(Prob0 * Prob1) );
111  }
112  return pObj;
113 }
114 
115 /**Function*************************************************************
116 
117  Synopsis [Connect the object to the fanin.]
118 
119  Description []
120 
121  SideEffects []
122 
123  SeeAlso []
124 
125 ***********************************************************************/
126 void Aig_ObjConnect( Aig_Man_t * p, Aig_Obj_t * pObj, Aig_Obj_t * pFan0, Aig_Obj_t * pFan1 )
127 {
128  assert( !Aig_IsComplement(pObj) );
129  assert( !Aig_ObjIsCi(pObj) );
130  // add the first fanin
131  pObj->pFanin0 = pFan0;
132  pObj->pFanin1 = pFan1;
133  // increment references of the fanins and add their fanouts
134  if ( pFan0 != NULL )
135  {
136  assert( Aig_ObjFanin0(pObj)->Type > 0 );
137  Aig_ObjRef( Aig_ObjFanin0(pObj) );
138  if ( p->pFanData )
139  Aig_ObjAddFanout( p, Aig_ObjFanin0(pObj), pObj );
140  }
141  if ( pFan1 != NULL )
142  {
143  assert( Aig_ObjFanin1(pObj)->Type > 0 );
144  Aig_ObjRef( Aig_ObjFanin1(pObj) );
145  if ( p->pFanData )
146  Aig_ObjAddFanout( p, Aig_ObjFanin1(pObj), pObj );
147  }
148  // set level and phase
149  pObj->Level = Aig_ObjLevelNew( pObj );
150  pObj->fPhase = Aig_ObjPhaseReal(pFan0) & Aig_ObjPhaseReal(pFan1);
151  // add the node to the structural hash table
152  if ( p->pTable && Aig_ObjIsHash(pObj) )
153  Aig_TableInsert( p, pObj );
154  // add the node to the dynamically updated topological order
155 // if ( p->pOrderData && Aig_ObjIsNode(pObj) )
156 // Aig_ObjOrderInsert( p, pObj->Id );
157  assert( !Aig_ObjIsNode(pObj) || pObj->Level > 0 );
158 }
159 
160 /**Function*************************************************************
161 
162  Synopsis [Disconnects the object from the fanins.]
163 
164  Description []
165 
166  SideEffects []
167 
168  SeeAlso []
169 
170 ***********************************************************************/
172 {
173  assert( !Aig_IsComplement(pObj) );
174  // remove connections
175  if ( pObj->pFanin0 != NULL )
176  {
177  if ( p->pFanData )
178  Aig_ObjRemoveFanout( p, Aig_ObjFanin0(pObj), pObj );
180  }
181  if ( pObj->pFanin1 != NULL )
182  {
183  if ( p->pFanData )
184  Aig_ObjRemoveFanout( p, Aig_ObjFanin1(pObj), pObj );
186  }
187  // remove the node from the structural hash table
188  if ( p->pTable && Aig_ObjIsHash(pObj) )
189  Aig_TableDelete( p, pObj );
190  // add the first fanin
191  pObj->pFanin0 = NULL;
192  pObj->pFanin1 = NULL;
193  // remove the node from the dynamically updated topological order
194 // if ( p->pOrderData && Aig_ObjIsNode(pObj) )
195 // Aig_ObjOrderRemove( p, pObj->Id );
196 }
197 
198 /**Function*************************************************************
199 
200  Synopsis [Deletes the node.]
201 
202  Description []
203 
204  SideEffects []
205 
206  SeeAlso []
207 
208 ***********************************************************************/
210 {
211  assert( !Aig_IsComplement(pObj) );
212  assert( !Aig_ObjIsTerm(pObj) );
213  assert( Aig_ObjRefs(pObj) == 0 );
214  if ( p->pFanData && Aig_ObjIsBuf(pObj) )
215  Vec_PtrRemove( p->vBufs, pObj );
216  p->nObjs[pObj->Type]--;
217  Vec_PtrWriteEntry( p->vObjs, pObj->Id, NULL );
218  Aig_ManRecycleMemory( p, pObj );
219 }
220 
221 /**Function*************************************************************
222 
223  Synopsis [Deletes the MFFC of the node.]
224 
225  Description []
226 
227  SideEffects []
228 
229  SeeAlso []
230 
231 ***********************************************************************/
232 void Aig_ObjDelete_rec( Aig_Man_t * p, Aig_Obj_t * pObj, int fFreeTop )
233 {
234  Aig_Obj_t * pFanin0, * pFanin1;
235  assert( !Aig_IsComplement(pObj) );
236  if ( Aig_ObjIsConst1(pObj) || Aig_ObjIsCi(pObj) )
237  return;
238  assert( !Aig_ObjIsCo(pObj) );
239  pFanin0 = Aig_ObjFanin0(pObj);
240  pFanin1 = Aig_ObjFanin1(pObj);
241  Aig_ObjDisconnect( p, pObj );
242  if ( fFreeTop )
243  Aig_ObjDelete( p, pObj );
244  if ( pFanin0 && !Aig_ObjIsNone(pFanin0) && Aig_ObjRefs(pFanin0) == 0 )
245  Aig_ObjDelete_rec( p, pFanin0, 1 );
246  if ( pFanin1 && !Aig_ObjIsNone(pFanin1) && Aig_ObjRefs(pFanin1) == 0 )
247  Aig_ObjDelete_rec( p, pFanin1, 1 );
248 }
249 
250 /**Function*************************************************************
251 
252  Synopsis [Deletes the node.]
253 
254  Description []
255 
256  SideEffects []
257 
258  SeeAlso []
259 
260 ***********************************************************************/
262 {
263  assert( Aig_ObjIsCo(pObj) );
265  pObj->pFanin0 = NULL;
266  p->nObjs[pObj->Type]--;
267  Vec_PtrWriteEntry( p->vObjs, pObj->Id, NULL );
268  Aig_ManRecycleMemory( p, pObj );
269 }
270 
271 /**Function*************************************************************
272 
273  Synopsis [Replaces the first fanin of the node by the new fanin.]
274 
275  Description []
276 
277  SideEffects []
278 
279  SeeAlso []
280 
281 ***********************************************************************/
282 void Aig_ObjPatchFanin0( Aig_Man_t * p, Aig_Obj_t * pObj, Aig_Obj_t * pFaninNew )
283 {
284  Aig_Obj_t * pFaninOld;
285  assert( !Aig_IsComplement(pObj) );
286  assert( Aig_ObjIsCo(pObj) );
287  pFaninOld = Aig_ObjFanin0(pObj);
288  // decrement ref and remove fanout
289  if ( p->pFanData )
290  Aig_ObjRemoveFanout( p, pFaninOld, pObj );
291  Aig_ObjDeref( pFaninOld );
292  // update the fanin
293  pObj->pFanin0 = pFaninNew;
294  pObj->Level = Aig_ObjLevelNew( pObj );
295  pObj->fPhase = Aig_ObjPhaseReal(pObj->pFanin0);
296  // increment ref and add fanout
297  if ( p->pFanData )
298  Aig_ObjAddFanout( p, Aig_ObjFanin0(pObj), pObj );
299  Aig_ObjRef( Aig_ObjFanin0(pObj) );
300  // get rid of old fanin
301  if ( !Aig_ObjIsCi(pFaninOld) && !Aig_ObjIsConst1(pFaninOld) && Aig_ObjRefs(pFaninOld) == 0 )
302  Aig_ObjDelete_rec( p, pFaninOld, 1 );
303 }
304 
305 /**Function*************************************************************
306 
307  Synopsis [Verbose printing of the AIG node.]
308 
309  Description []
310 
311  SideEffects []
312 
313  SeeAlso []
314 
315 ***********************************************************************/
317 {
318  int fShowFanouts = 0;
319  Aig_Obj_t * pTemp;
320  if ( pObj == NULL )
321  {
322  printf( "Object is NULL." );
323  return;
324  }
325  if ( Aig_IsComplement(pObj) )
326  {
327  printf( "Compl " );
328  pObj = Aig_Not(pObj);
329  }
330  assert( !Aig_IsComplement(pObj) );
331  printf( "Node %4d : ", Aig_ObjId(pObj) );
332  if ( Aig_ObjIsConst1(pObj) )
333  printf( "constant 1" );
334  else if ( Aig_ObjIsCi(pObj) )
335  printf( "PI" );
336  else if ( Aig_ObjIsCo(pObj) )
337  printf( "PO( %4d%s )", Aig_ObjFanin0(pObj)->Id, (Aig_ObjFaninC0(pObj)? "\'" : " ") );
338  else if ( Aig_ObjIsBuf(pObj) )
339  printf( "BUF( %d%s )", Aig_ObjFanin0(pObj)->Id, (Aig_ObjFaninC0(pObj)? "\'" : " ") );
340  else
341  printf( "AND( %4d%s, %4d%s )",
342  Aig_ObjFanin0(pObj)->Id, (Aig_ObjFaninC0(pObj)? "\'" : " "),
343  Aig_ObjFanin1(pObj)->Id, (Aig_ObjFaninC1(pObj)? "\'" : " ") );
344  printf( " (refs = %3d)", Aig_ObjRefs(pObj) );
345  if ( fShowFanouts && p->pFanData )
346  {
347  Aig_Obj_t * pFanout;
348  int i;
349  int iFan = -1; // Suppress "might be used uninitialized"
350  printf( "\nFanouts:\n" );
351  Aig_ObjForEachFanout( p, pObj, pFanout, iFan, i )
352  {
353  printf( " " );
354  printf( "Node %4d : ", Aig_ObjId(pFanout) );
355  if ( Aig_ObjIsCo(pFanout) )
356  printf( "PO( %4d%s )", Aig_ObjFanin0(pFanout)->Id, (Aig_ObjFaninC0(pFanout)? "\'" : " ") );
357  else if ( Aig_ObjIsBuf(pFanout) )
358  printf( "BUF( %d%s )", Aig_ObjFanin0(pFanout)->Id, (Aig_ObjFaninC0(pFanout)? "\'" : " ") );
359  else
360  printf( "AND( %4d%s, %4d%s )",
361  Aig_ObjFanin0(pFanout)->Id, (Aig_ObjFaninC0(pFanout)? "\'" : " "),
362  Aig_ObjFanin1(pFanout)->Id, (Aig_ObjFaninC1(pFanout)? "\'" : " ") );
363  printf( "\n" );
364  }
365  return;
366  }
367  // there are choices
368  if ( p->pEquivs && p->pEquivs[pObj->Id] )
369  {
370  // print equivalence class
371  printf( " { %4d ", pObj->Id );
372  for ( pTemp = p->pEquivs[pObj->Id]; pTemp; pTemp = p->pEquivs[pTemp->Id] )
373  printf( " %4d%s", pTemp->Id, (pTemp->fPhase != pObj->fPhase)? "\'" : " " );
374  printf( " }" );
375  return;
376  }
377  // this is a secondary node
378  if ( p->pReprs && p->pReprs[pObj->Id] )
379  printf( " class of %d", pObj->Id );
380 }
381 
382 /**Function*************************************************************
383 
384  Synopsis [Replaces node with a buffer fanin by a node without them.]
385 
386  Description []
387 
388  SideEffects []
389 
390  SeeAlso []
391 
392 ***********************************************************************/
393 void Aig_NodeFixBufferFanins( Aig_Man_t * p, Aig_Obj_t * pObj, int fUpdateLevel )
394 {
395  Aig_Obj_t * pFanReal0, * pFanReal1, * pResult;
396  p->nBufFixes++;
397  if ( Aig_ObjIsCo(pObj) )
398  {
400  pFanReal0 = Aig_ObjReal_rec( Aig_ObjChild0(pObj) );
401  assert( Aig_ObjPhaseReal(Aig_ObjChild0(pObj)) == Aig_ObjPhaseReal(pFanReal0) );
402  Aig_ObjPatchFanin0( p, pObj, pFanReal0 );
403  return;
404  }
405  assert( Aig_ObjIsNode(pObj) );
407  // get the real fanins
408  pFanReal0 = Aig_ObjReal_rec( Aig_ObjChild0(pObj) );
409  pFanReal1 = Aig_ObjReal_rec( Aig_ObjChild1(pObj) );
410  // get the new node
411  if ( Aig_ObjIsNode(pObj) )
412  pResult = Aig_Oper( p, pFanReal0, pFanReal1, Aig_ObjType(pObj) );
413 // else if ( Aig_ObjIsLatch(pObj) )
414 // pResult = Aig_Latch( p, pFanReal0, Aig_ObjInit(pObj) );
415  else
416  assert( 0 );
417  // replace the node with buffer by the node without buffer
418  Aig_ObjReplace( p, pObj, pResult, fUpdateLevel );
419 }
420 
421 /**Function*************************************************************
422 
423  Synopsis [Returns the number of dangling nodes removed.]
424 
425  Description []
426 
427  SideEffects []
428 
429  SeeAlso []
430 
431 ***********************************************************************/
432 int Aig_ManPropagateBuffers( Aig_Man_t * p, int fUpdateLevel )
433 {
434  Aig_Obj_t * pObj;
435  int nSteps;
436  assert( p->pFanData );
437  for ( nSteps = 0; Vec_PtrSize(p->vBufs) > 0; nSteps++ )
438  {
439  // get the node with a buffer fanin
440  for ( pObj = (Aig_Obj_t *)Vec_PtrEntryLast(p->vBufs); Aig_ObjIsBuf(pObj); pObj = Aig_ObjFanout0(p, pObj) );
441  // replace this node by a node without buffer
442  Aig_NodeFixBufferFanins( p, pObj, fUpdateLevel );
443  // stop if a cycle occured
444  if ( nSteps > 1000000 )
445  {
446  printf( "Error: A cycle is encountered while propagating buffers.\n" );
447  break;
448  }
449  }
450  return nSteps;
451 }
452 
453 /**Function*************************************************************
454 
455  Synopsis [Replaces one object by another.]
456 
457  Description [The new object (pObjNew) should be used instead of the old
458  object (pObjOld). If the new object is complemented or used, the buffer
459  is added and the new object remains in the manager; otherwise, the new
460  object is deleted.]
461 
462  SideEffects []
463 
464  SeeAlso []
465 
466 ***********************************************************************/
467 void Aig_ObjReplace( Aig_Man_t * p, Aig_Obj_t * pObjOld, Aig_Obj_t * pObjNew, int fUpdateLevel )
468 {
469  Aig_Obj_t * pObjNewR = Aig_Regular(pObjNew);
470  // the object to be replaced cannot be complemented
471  assert( !Aig_IsComplement(pObjOld) );
472  // the object to be replaced cannot be a terminal
473  assert( !Aig_ObjIsCi(pObjOld) && !Aig_ObjIsCo(pObjOld) );
474  // the object to be used cannot be a buffer or a PO
475  assert( !Aig_ObjIsBuf(pObjNewR) && !Aig_ObjIsCo(pObjNewR) );
476  // the object cannot be the same
477  assert( pObjOld != pObjNewR );
478  // make sure object is not pointing to itself
479  assert( pObjOld != Aig_ObjFanin0(pObjNewR) );
480  assert( pObjOld != Aig_ObjFanin1(pObjNewR) );
481  if ( pObjOld == Aig_ObjFanin0(pObjNewR) || pObjOld == Aig_ObjFanin1(pObjNewR) )
482  {
483  printf( "Aig_ObjReplace(): Internal error!\n" );
484  exit(1);
485  }
486  // recursively delete the old node - but leave the object there
487  pObjNewR->nRefs++;
488  Aig_ObjDelete_rec( p, pObjOld, 0 );
489  pObjNewR->nRefs--;
490  // if the new object is complemented or already used, create a buffer
491  p->nObjs[pObjOld->Type]--;
492  if ( Aig_IsComplement(pObjNew) || Aig_ObjRefs(pObjNew) > 0 || !Aig_ObjIsNode(pObjNew) )
493  {
494  pObjOld->Type = AIG_OBJ_BUF;
495  Aig_ObjConnect( p, pObjOld, pObjNew, NULL );
496  p->nBufReplaces++;
497  }
498  else
499  {
500  Aig_Obj_t * pFanin0 = pObjNew->pFanin0;
501  Aig_Obj_t * pFanin1 = pObjNew->pFanin1;
502  int LevelOld = pObjOld->Level;
503  pObjOld->Type = pObjNew->Type;
504  Aig_ObjDisconnect( p, pObjNew );
505  Aig_ObjConnect( p, pObjOld, pFanin0, pFanin1 );
506  // delete the new object
507  Aig_ObjDelete( p, pObjNew );
508  // update levels
509  if ( p->pFanData )
510  {
511  pObjOld->Level = LevelOld;
512  Aig_ManUpdateLevel( p, pObjOld );
513  }
514  if ( fUpdateLevel )
515  {
516  Aig_ObjClearReverseLevel( p, pObjOld );
517  Aig_ManUpdateReverseLevel( p, pObjOld );
518  }
519  }
520  p->nObjs[pObjOld->Type]++;
521  // store buffers if fanout is allocated
522  if ( p->pFanData && Aig_ObjIsBuf(pObjOld) )
523  {
524  Vec_PtrPush( p->vBufs, pObjOld );
525  p->nBufMax = Abc_MaxInt( p->nBufMax, Vec_PtrSize(p->vBufs) );
526  Aig_ManPropagateBuffers( p, fUpdateLevel );
527  }
528 }
529 
530 ////////////////////////////////////////////////////////////////////////
531 /// END OF FILE ///
532 ////////////////////////////////////////////////////////////////////////
533 
534 
536 
#define Aig_ObjForEachFanout(p, pObj, pFanout, iFan, i)
Definition: aig.h:427
VOID_HACK exit()
static int Aig_ObjLevelNew(Aig_Obj_t *pObj)
Definition: aig.h:324
void Aig_ObjDelete_rec(Aig_Man_t *p, Aig_Obj_t *pObj, int fFreeTop)
Definition: aigObj.c:232
unsigned Level
Definition: aig.h:82
static Aig_Type_t Aig_ObjType(Aig_Obj_t *pObj)
Definition: aig.h:272
static int Aig_ObjFaninId0(Aig_Obj_t *pObj)
Definition: aig.h:304
static Aig_Obj_t * Aig_ManFetchMemory(Aig_Man_t *p)
Definition: aig.h:368
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
static Aig_Obj_t * Aig_ObjChild0(Aig_Obj_t *pObj)
Definition: aig.h:310
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Aig_ObjDeref(Aig_Obj_t *pObj)
Definition: aig.h:302
void Aig_ObjPatchFanin0(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pFaninNew)
Definition: aigObj.c:282
Definition: aig.h:61
Aig_Obj_t * pFanin1
Definition: aig.h:76
Aig_Obj_t * Aig_ObjReal_rec(Aig_Obj_t *pObj)
Definition: aigUtil.c:476
unsigned int Type
Definition: aig.h:77
void * pData
Definition: aig.h:87
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
static int Aig_IsComplement(Aig_Obj_t *p)
Definition: aig.h:249
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
Definition: aig.h:246
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static void Vec_IntSetEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:418
static void Aig_ObjRef(Aig_Obj_t *pObj)
Definition: aig.h:301
int Aig_ManPropagateBuffers(Aig_Man_t *p, int fUpdateLevel)
Definition: aigObj.c:432
static Aig_Obj_t * Aig_Not(Aig_Obj_t *p)
Definition: aig.h:247
static int Aig_ObjFaninId1(Aig_Obj_t *pObj)
Definition: aig.h:305
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
void Aig_ManUpdateReverseLevel(Aig_Man_t *p, Aig_Obj_t *pObjNew)
Definition: aigTiming.c:247
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
Aig_Obj_t * Aig_Oper(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1, Aig_Type_t Type)
Definition: aigOper.c:83
void Aig_TableDelete(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aigTable.c:196
void Aig_ObjPrint(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aigObj.c:316
static void Vec_PtrRemove(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:714
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
Definition: aig.h:280
static int Aig_ObjIsBuf(Aig_Obj_t *pObj)
Definition: aig.h:277
void Aig_NodeFixBufferFanins(Aig_Man_t *p, Aig_Obj_t *pObj, int fUpdateLevel)
Definition: aigObj.c:393
static int Aig_ObjIsTerm(Aig_Obj_t *pObj)
Definition: aig.h:281
static int Abc_Float2Int(float Val)
Definition: abc_global.h:249
static void Aig_ManRecycleMemory(Aig_Man_t *p, Aig_Obj_t *pEntry)
Definition: aig.h:378
static void * Vec_PtrEntryLast(Vec_Ptr_t *p)
Definition: vecPtr.h:413
static int Aig_ObjIsNone(Aig_Obj_t *pObj)
Definition: aig.h:273
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
void Aig_ObjClearReverseLevel(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aigTiming.c:83
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
static Aig_Obj_t * Aig_ObjChild1(Aig_Obj_t *pObj)
Definition: aig.h:311
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
Definition: aig.h:274
static int Aig_ObjPhaseReal(Aig_Obj_t *pObj)
Definition: aig.h:299
Definition: aig.h:69
void Aig_ObjDelete(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aigObj.c:209
void Aig_ObjReplace(Aig_Man_t *p, Aig_Obj_t *pObjOld, Aig_Obj_t *pObjNew, int fUpdateLevel)
Definition: aigObj.c:467
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
Definition: aig.h:306
void Aig_ObjRemoveFanout(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pFanout)
Definition: aigFanout.c:154
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
void Aig_ObjDeletePo(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aigObj.c:261
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Definition: aigObj.c:66
unsigned int fPhase
Definition: aig.h:78
static Aig_Obj_t * Aig_ObjFanout0(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:327
void Aig_ObjDisconnect(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aigObj.c:171
ABC_NAMESPACE_IMPL_START Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigObj.c:45
static float Abc_Int2Float(int Num)
Definition: abc_global.h:250
void Aig_TableInsert(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aigTable.c:173
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
Definition: aig.h:307
static int Aig_ObjId(Aig_Obj_t *pObj)
Definition: aig.h:286
Definition: aig.h:60
#define assert(ex)
Definition: util_old.h:213
static int Aig_ObjRefs(Aig_Obj_t *pObj)
Definition: aig.h:300
Aig_Obj_t * Aig_ObjCreate(Aig_Man_t *p, Aig_Obj_t *pGhost)
Definition: aigObj.c:89
void Aig_ObjConnect(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pFan0, Aig_Obj_t *pFan1)
Definition: aigObj.c:126
void Aig_ObjAddFanout(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pFanout)
Definition: aigFanout.c:107
void Aig_ManUpdateLevel(Aig_Man_t *p, Aig_Obj_t *pObjNew)
Definition: aigTiming.c:195
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
Definition: aig.h:275
Aig_Obj_t * pFanin0
Definition: aig.h:75
int Id
Definition: aig.h:85
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
Definition: aig.h:276
unsigned int nRefs
Definition: aig.h:81
static int Aig_ObjIsHash(Aig_Obj_t *pObj)
Definition: aig.h:282