abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
dchChoice.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [dchChoice.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Choice computation for tech-mapping.]
8 
9  Synopsis [Contrustion of choices.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 29, 2008.]
16 
17  Revision [$Id: dchChoice.c,v 1.00 2008/07/29 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "dchInt.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 ////////////////////////////////////////////////////////////////////////
31 /// FUNCTION DEFINITIONS ///
32 ////////////////////////////////////////////////////////////////////////
33 
34 /**Function*************************************************************
35 
36  Synopsis [Counts support nodes.]
37 
38  Description []
39 
40  SideEffects []
41 
42  SeeAlso []
43 
44 ***********************************************************************/
46 {
47  int Count;
48  if ( Aig_ObjIsTravIdCurrent( p, pObj ) )
49  return 0;
50  Aig_ObjSetTravIdCurrent( p, pObj );
51  if ( Aig_ObjIsCi(pObj) )
52  return 1;
53  assert( Aig_ObjIsNode(pObj) );
54  Count = Dch_ObjCountSupp_rec( p, Aig_ObjFanin0(pObj) );
55  Count += Dch_ObjCountSupp_rec( p, Aig_ObjFanin1(pObj) );
56  return Count;
57 }
59 {
61  return Dch_ObjCountSupp_rec( p, pObj );
62 }
63 
64 /**Function*************************************************************
65 
66  Synopsis [Counts the number of representatives.]
67 
68  Description []
69 
70  SideEffects []
71 
72  SeeAlso []
73 
74 ***********************************************************************/
76 {
77  Aig_Obj_t * pObj, * pRepr;
78  int i, nReprs = 0;
79  Aig_ManForEachObj( pAig, pObj, i )
80  {
81  pRepr = Aig_ObjRepr( pAig, pObj );
82  if ( pRepr == NULL )
83  continue;
84  assert( pRepr->Id < pObj->Id );
85  nReprs++;
86  }
87  return nReprs;
88 }
90 {
91  Aig_Obj_t * pObj, * pEquiv;
92  int i, nEquivs = 0;
93  Aig_ManForEachObj( pAig, pObj, i )
94  {
95  pEquiv = Aig_ObjEquiv( pAig, pObj );
96  if ( pEquiv == NULL )
97  continue;
98  assert( pEquiv->Id < pObj->Id );
99  nEquivs++;
100  }
101  return nEquivs;
102 }
103 
104 /**Function*************************************************************
105 
106  Synopsis [Marks the TFI of the node.]
107 
108  Description [Returns 1 if there is a CI not marked with previous ID.]
109 
110  SideEffects []
111 
112  SeeAlso []
113 
114 ***********************************************************************/
116 {
117  int RetValue;
118  if ( pObj == NULL )
119  return 0;
120  if ( Aig_ObjIsTravIdCurrent( p, pObj ) )
121  return 0;
122  if ( Aig_ObjIsCi(pObj) )
123  {
124  RetValue = !Aig_ObjIsTravIdPrevious( p, pObj );
125  Aig_ObjSetTravIdCurrent( p, pObj );
126  return RetValue;
127  }
128  assert( Aig_ObjIsNode(pObj) );
129  Aig_ObjSetTravIdCurrent( p, pObj );
130  RetValue = Dch_ObjMarkTfi_rec( p, Aig_ObjFanin0(pObj) );
131  RetValue += Dch_ObjMarkTfi_rec( p, Aig_ObjFanin1(pObj) );
132 // RetValue += Dch_ObjMarkTfi_rec( p, Aig_ObjEquiv(p, pObj) );
133  return (RetValue > 0);
134 }
136 {
137  // mark support of the representative node (pRepr)
139  Dch_ObjMarkTfi_rec( p, pRepr );
140  // detect if the new node (pObj) depends on additional variables
142  if ( Dch_ObjMarkTfi_rec( p, pObj ) )
143  return 1;//, printf( "1" );
144  // detect if the representative node (pRepr) depends on additional variables
146  if ( Dch_ObjMarkTfi_rec( p, pRepr ) )
147  return 1;//, printf( "2" );
148  // skip the choice if this is what is happening
149  return 0;
150 }
151 
152 /**Function*************************************************************
153 
154  Synopsis [Make sure reprsentative nodes do not have representatives.]
155 
156  Description []
157 
158  SideEffects []
159 
160  SeeAlso []
161 
162 ***********************************************************************/
164 {
165  int fPrintConst = 0;
166  Aig_Obj_t * pObj;
167  int i, fProb = 0;
168  int Class0 = 0, ClassCi = 0;
169  Aig_ManForEachObj( p, pObj, i )
170  {
171  if ( Aig_ObjRepr(p, pObj) == NULL )
172  continue;
173  if ( !Aig_ObjIsNode(pObj) )
174  printf( "Obj %d is not an AND but it has a repr %d.\n", i, Aig_ObjId(Aig_ObjRepr(p, pObj)) ), fProb = 1;
175  else if ( Aig_ObjRepr(p, Aig_ObjRepr(p, pObj)) )
176  printf( "Obj %d has repr %d with a repr %d.\n", i, Aig_ObjId(Aig_ObjRepr(p, pObj)), Aig_ObjId(Aig_ObjRepr(p, Aig_ObjRepr(p, pObj))) ), fProb = 1;
177  }
178  if ( !fProb )
179  printf( "Representive verification successful.\n" );
180  else
181  printf( "Representive verification FAILED.\n" );
182  if ( !fPrintConst )
183  return;
184  // count how many representatives are const0 or a CI
185  Aig_ManForEachObj( p, pObj, i )
186  {
187  if ( Aig_ObjRepr(p, pObj) == Aig_ManConst1(p) )
188  Class0++;
189  if ( Aig_ObjRepr(p, pObj) && Aig_ObjIsCi(Aig_ObjRepr(p, pObj)) )
190  ClassCi++;
191  }
192  printf( "Const0 nodes = %d. ConstCI nodes = %d.\n", Class0, ClassCi );
193 }
194 
195 /**Function*************************************************************
196 
197  Synopsis [Verify correctness of choices.]
198 
199  Description []
200 
201  SideEffects []
202 
203  SeeAlso []
204 
205 ***********************************************************************/
206 void Dch_CheckChoices( Aig_Man_t * p, int fSkipRedSupps )
207 {
208  Aig_Obj_t * pObj;
209  int i, fProb = 0;
210  Aig_ManCleanMarkA( p );
211  Aig_ManForEachNode( p, pObj, i )
212  {
213  if ( p->pEquivs[i] != NULL )
214  {
215  if ( pObj->fMarkA == 1 )
216  printf( "node %d participates in more than one choice class\n", i ), fProb = 1;
217  pObj->fMarkA = 1;
218  // check redundancy
219  if ( fSkipRedSupps && Dch_ObjCheckSuppRed( p, pObj, p->pEquivs[i]) )
220  printf( "node %d and repr %d have diff supports\n", pObj->Id, p->pEquivs[i]->Id );
221  // consider the next one
222  pObj = p->pEquivs[i];
223  if ( p->pEquivs[Aig_ObjId(pObj)] == NULL )
224  {
225  if ( pObj->fMarkA == 1 )
226  printf( "repr %d has final node %d participates in more than one choice class\n", i, pObj->Id ), fProb = 1;
227  pObj->fMarkA = 1;
228  }
229  // consider the non-head ones
230  if ( pObj->nRefs > 0 )
231  printf( "node %d belonging to choice has fanout %d\n", pObj->Id, pObj->nRefs );
232  }
233  if ( p->pReprs && p->pReprs[i] != NULL )
234  {
235  if ( pObj->nRefs > 0 )
236  printf( "node %d has representative %d and fanout count %d\n", pObj->Id, p->pReprs[i]->Id, pObj->nRefs ), fProb = 1;
237  }
238  }
239  Aig_ManCleanMarkA( p );
240  if ( !fProb )
241  printf( "Verification of choice AIG succeeded.\n" );
242  else
243  printf( "Verification of choice AIG FAILED.\n" );
244 }
245 
246 /**Function*************************************************************
247 
248  Synopsis [Checks for combinational loops in the AIG.]
249 
250  Description [Returns 1 if combinational loop is detected.]
251 
252  SideEffects []
253 
254  SeeAlso []
255 
256 ***********************************************************************/
257 int Aig_ManCheckAcyclic_rec( Aig_Man_t * p, Aig_Obj_t * pNode, int fVerbose )
258 {
259  Aig_Obj_t * pFanin;
260  int fAcyclic;
261  if ( Aig_ObjIsCi(pNode) || Aig_ObjIsConst1(pNode) )
262  return 1;
263  assert( Aig_ObjIsNode(pNode) );
264  // make sure the node is not visited
265  assert( !Aig_ObjIsTravIdPrevious(p, pNode) );
266  // check if the node is part of the combinational loop
267  if ( Aig_ObjIsTravIdCurrent(p, pNode) )
268  {
269  if ( fVerbose )
270  Abc_Print( 1, "Network \"%s\" contains combinational loop!\n", p->pSpec? p->pSpec : NULL );
271  if ( fVerbose )
272  Abc_Print( 1, "Node \"%d\" is encountered twice on the following path to the COs:\n", Aig_ObjId(pNode) );
273  return 0;
274  }
275  // mark this node as a node on the current path
276  Aig_ObjSetTravIdCurrent( p, pNode );
277 
278  // visit the transitive fanin
279  pFanin = Aig_ObjFanin0(pNode);
280  // check if the fanin is visited
281  if ( !Aig_ObjIsTravIdPrevious(p, pFanin) )
282  {
283  // traverse the fanin's cone searching for the loop
284  if ( !(fAcyclic = Aig_ManCheckAcyclic_rec(p, pFanin, fVerbose)) )
285  {
286  // return as soon as the loop is detected
287  if ( fVerbose )
288  Abc_Print( 1, " %d ->", Aig_ObjId(pFanin) );
289  return 0;
290  }
291  }
292 
293  // visit the transitive fanin
294  pFanin = Aig_ObjFanin1(pNode);
295  // check if the fanin is visited
296  if ( !Aig_ObjIsTravIdPrevious(p, pFanin) )
297  {
298  // traverse the fanin's cone searching for the loop
299  if ( !(fAcyclic = Aig_ManCheckAcyclic_rec(p, pFanin, fVerbose)) )
300  {
301  // return as soon as the loop is detected
302  if ( fVerbose )
303  Abc_Print( 1, " %d ->", Aig_ObjId(pFanin) );
304  return 0;
305  }
306  }
307 
308  // visit choices
309  if ( Aig_ObjRepr(p, pNode) == NULL && Aig_ObjEquiv(p, pNode) != NULL )
310  {
311  for ( pFanin = Aig_ObjEquiv(p, pNode); pFanin; pFanin = Aig_ObjEquiv(p, pFanin) )
312  {
313  // check if the fanin is visited
314  if ( Aig_ObjIsTravIdPrevious(p, pFanin) )
315  continue;
316  // traverse the fanin's cone searching for the loop
317  if ( (fAcyclic = Aig_ManCheckAcyclic_rec(p, pFanin, fVerbose)) )
318  continue;
319  // return as soon as the loop is detected
320  if ( fVerbose )
321  Abc_Print( 1, " %d", Aig_ObjId(pFanin) );
322  if ( fVerbose )
323  Abc_Print( 1, " (choice of %d) -> ", Aig_ObjId(pNode) );
324  return 0;
325  }
326  }
327  // mark this node as a visited node
328  Aig_ObjSetTravIdPrevious( p, pNode );
329  return 1;
330 }
331 int Aig_ManCheckAcyclic( Aig_Man_t * p, int fVerbose )
332 {
333  Aig_Obj_t * pNode;
334  int fAcyclic;
335  int i;
336  // set the traversal ID for this DFS ordering
339  // pNode->TravId == pNet->nTravIds means "pNode is on the path"
340  // pNode->TravId == pNet->nTravIds - 1 means "pNode is visited but is not on the path"
341  // pNode->TravId < pNet->nTravIds - 1 means "pNode is not visited"
342  // traverse the network to detect cycles
343  fAcyclic = 1;
344  Aig_ManForEachCo( p, pNode, i )
345  {
346  pNode = Aig_ObjFanin0(pNode);
347  if ( Aig_ObjIsTravIdPrevious(p, pNode) )
348  continue;
349  // traverse the output logic cone
350  if ( (fAcyclic = Aig_ManCheckAcyclic_rec(p, pNode, fVerbose)) )
351  continue;
352  // stop as soon as the first loop is detected
353  if ( fVerbose )
354  Abc_Print( 1, " CO %d\n", i );
355  break;
356  }
357  return fAcyclic;
358 }
359 
360 
361 /**Function*************************************************************
362 
363  Synopsis [Returns 1 if the choice node of pRepr is in the TFI of pObj.]
364 
365  Description []
366 
367  SideEffects []
368 
369  SeeAlso []
370 
371 ***********************************************************************/
373 {
374  // check the trivial cases
375  if ( pObj == NULL )
376  return 0;
377  if ( Aig_ObjIsCi(pObj) )
378  return 0;
379  if ( pObj->fMarkA )
380  return 1;
381  // skip the visited node
382  if ( Aig_ObjIsTravIdCurrent( p, pObj ) )
383  return 0;
384  Aig_ObjSetTravIdCurrent( p, pObj );
385  // check the children
386  if ( Dch_ObjCheckTfi_rec( p, Aig_ObjFanin0(pObj) ) )
387  return 1;
388  if ( Dch_ObjCheckTfi_rec( p, Aig_ObjFanin1(pObj) ) )
389  return 1;
390  // check equivalent nodes
391  return Dch_ObjCheckTfi_rec( p, Aig_ObjEquiv(p, pObj) );
392 }
393 int Dch_ObjCheckTfi( Aig_Man_t * p, Aig_Obj_t * pObj, Aig_Obj_t * pRepr )
394 {
395  Aig_Obj_t * pTemp;
396  int RetValue;
397  assert( !Aig_IsComplement(pObj) );
398  assert( !Aig_IsComplement(pRepr) );
399  // mark nodes of the choice node
400  for ( pTemp = pRepr; pTemp; pTemp = Aig_ObjEquiv(p, pTemp) )
401  pTemp->fMarkA = 1;
402  // traverse the new node
404  RetValue = Dch_ObjCheckTfi_rec( p, pObj );
405  // unmark nodes of the choice node
406  for ( pTemp = pRepr; pTemp; pTemp = Aig_ObjEquiv(p, pTemp) )
407  pTemp->fMarkA = 0;
408  return RetValue;
409 }
410 
411 /**Function*************************************************************
412 
413  Synopsis [Returns representatives of fanin in approapriate polarity.]
414 
415  Description []
416 
417  SideEffects []
418 
419  SeeAlso []
420 
421 ***********************************************************************/
422 static inline Aig_Obj_t * Aig_ObjGetRepr( Aig_Man_t * p, Aig_Obj_t * pObj )
423 {
424  Aig_Obj_t * pRepr;
425  if ( (pRepr = Aig_ObjRepr(p, Aig_Regular(pObj))) )
426  return Aig_NotCond( pRepr, Aig_Regular(pObj)->fPhase ^ pRepr->fPhase ^ Aig_IsComplement(pObj) );
427  return pObj;
428 }
429 static inline Aig_Obj_t * Aig_ObjChild0CopyRepr( Aig_Man_t * p, Aig_Obj_t * pObj ) { return Aig_ObjGetRepr( p, Aig_ObjChild0Copy(pObj) ); }
430 static inline Aig_Obj_t * Aig_ObjChild1CopyRepr( Aig_Man_t * p, Aig_Obj_t * pObj ) { return Aig_ObjGetRepr( p, Aig_ObjChild1Copy(pObj) ); }
431 
432 /**Function*************************************************************
433 
434  Synopsis [Derives the AIG with choices from representatives.]
435 
436  Description []
437 
438  SideEffects []
439 
440  SeeAlso []
441 
442 ***********************************************************************/
443 void Dch_DeriveChoiceAigNode( Aig_Man_t * pAigNew, Aig_Man_t * pAigOld, Aig_Obj_t * pObj, int fSkipRedSupps )
444 {
445  Aig_Obj_t * pRepr, * pObjNew, * pReprNew;
446  assert( !Aig_IsComplement(pObj) );
447  // get the representative
448  pRepr = Aig_ObjRepr( pAigOld, pObj );
449  if ( pRepr != NULL && (Aig_ObjIsConst1(pRepr) || Aig_ObjIsCi(pRepr)) )
450  {
451  assert( pRepr->pData != NULL );
452  pObj->pData = Aig_NotCond( (Aig_Obj_t *)pRepr->pData, pObj->fPhase ^ pRepr->fPhase );
453  return;
454  }
455  // get the new node
456  pObjNew = Aig_And( pAigNew,
457  Aig_ObjChild0CopyRepr(pAigNew, pObj),
458  Aig_ObjChild1CopyRepr(pAigNew, pObj) );
459  pObjNew = Aig_ObjGetRepr( pAigNew, pObjNew );
460 // assert( Aig_ObjRepr( pAigNew, pObjNew ) == NULL );
461  // assign the copy
462  assert( pObj->pData == NULL );
463  pObj->pData = pObjNew;
464  // skip those without reprs
465  if ( pRepr == NULL )
466  return;
467  assert( pRepr->Id < pObj->Id );
468  assert( Aig_ObjIsNode(pRepr) );
469  // get the corresponding new nodes
470  pObjNew = Aig_Regular((Aig_Obj_t *)pObj->pData);
471  pReprNew = Aig_Regular((Aig_Obj_t *)pRepr->pData);
472  // skip earlier nodes
473  if ( pReprNew->Id >= pObjNew->Id )
474  return;
475  assert( pReprNew->Id < pObjNew->Id );
476  // set the representatives
477  Aig_ObjSetRepr( pAigNew, pObjNew, pReprNew );
478  // skip used nodes
479  if ( pObjNew->nRefs > 0 )
480  return;
481  assert( pObjNew->nRefs == 0 );
482  // skip choices that can lead to combo loops
483  if ( Dch_ObjCheckTfi( pAigNew, pObjNew, pReprNew ) )
484  return;
485  // don't add choice if structural support of pObjNew and pReprNew differ
486  if ( fSkipRedSupps && Dch_ObjCheckSuppRed(pAigNew, pObjNew, pReprNew) )
487  return;
488  // add choice to the end of the list
489  while ( pAigNew->pEquivs[pReprNew->Id] != NULL )
490  pReprNew = pAigNew->pEquivs[pReprNew->Id];
491  assert( pAigNew->pEquivs[pReprNew->Id] == NULL );
492  pAigNew->pEquivs[pReprNew->Id] = pObjNew;
493 }
494 Aig_Man_t * Dch_DeriveChoiceAigInt( Aig_Man_t * pAig, int fSkipRedSupps )
495 {
496  Aig_Man_t * pChoices;
497  Aig_Obj_t * pObj;
498  int i;
499  // start recording equivalences
500  pChoices = Aig_ManStart( Aig_ManObjNumMax(pAig) );
501  pChoices->pEquivs = ABC_CALLOC( Aig_Obj_t *, Aig_ManObjNumMax(pAig) );
502  pChoices->pReprs = ABC_CALLOC( Aig_Obj_t *, Aig_ManObjNumMax(pAig) );
503  // map constants and PIs
504  Aig_ManCleanData( pAig );
505  Aig_ManConst1(pAig)->pData = Aig_ManConst1(pChoices);
506  Aig_ManForEachCi( pAig, pObj, i )
507  pObj->pData = Aig_ObjCreateCi( pChoices );
508  // construct choices for the internal nodes
509  assert( pAig->pReprs != NULL );
510  Aig_ManForEachNode( pAig, pObj, i )
511  Dch_DeriveChoiceAigNode( pChoices, pAig, pObj, fSkipRedSupps );
512  Aig_ManForEachCo( pAig, pObj, i )
513  Aig_ObjCreateCo( pChoices, Aig_ObjChild0CopyRepr(pChoices, pObj) );
514  Aig_ManSetRegNum( pChoices, Aig_ManRegNum(pAig) );
515  return pChoices;
516 }
517 Aig_Man_t * Dch_DeriveChoiceAig( Aig_Man_t * pAig, int fSkipRedSupps )
518 {
519  int fCheck = 0;
520  Aig_Man_t * pChoices, * pTemp;
521  // verify
522  if ( fCheck )
523  Aig_ManCheckReprs( pAig );
524  // compute choices
525  pChoices = Dch_DeriveChoiceAigInt( pAig, fSkipRedSupps );
526  ABC_FREE( pChoices->pReprs );
527  // verify
528  if ( fCheck )
529  Dch_CheckChoices( pChoices, fSkipRedSupps );
530  // find correct topo order with choices
531  pChoices = Aig_ManDupDfs( pTemp = pChoices );
532  Aig_ManStop( pTemp );
533  // verify
534  if ( fCheck )
535  Dch_CheckChoices( pChoices, fSkipRedSupps );
536  return pChoices;
537 }
538 
539 ////////////////////////////////////////////////////////////////////////
540 /// END OF FILE ///
541 ////////////////////////////////////////////////////////////////////////
542 
543 
545 
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Definition: aigObj.c:66
static int Aig_ObjIsTravIdPrevious(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:296
static Aig_Obj_t * Aig_ObjGetRepr(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: dchChoice.c:422
int Dch_ObjCheckTfi_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: dchChoice.c:372
static Aig_Obj_t * Aig_ObjRepr(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:330
ABC_NAMESPACE_IMPL_START int Dch_ObjCountSupp_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
DECLARATIONS ///.
Definition: dchChoice.c:45
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:295
void * pData
Definition: aig.h:87
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Definition: aigMan.c:47
Aig_Man_t * Aig_ManDupDfs(Aig_Man_t *p)
Definition: aigDup.c:563
Aig_Man_t * Dch_DeriveChoiceAig(Aig_Man_t *pAig, int fSkipRedSupps)
Definition: dchChoice.c:517
static int Aig_IsComplement(Aig_Obj_t *p)
Definition: aig.h:249
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: aig.h:393
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
Definition: aig.h:246
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigObj.c:45
unsigned int fMarkA
Definition: aig.h:79
#define Aig_ManForEachCo(p, pObj, i)
Definition: aig.h:398
static Aig_Obj_t * Aig_ObjChild0CopyRepr(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: dchChoice.c:429
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:293
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition: aigOper.c:104
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigUtil.c:44
int Dch_ObjCheckSuppRed(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pRepr)
Definition: dchChoice.c:135
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
Definition: aig.h:280
int Aig_ManCheckAcyclic(Aig_Man_t *p, int fVerbose)
Definition: dchChoice.c:331
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
static void Aig_ObjSetRepr(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pRepr)
Definition: aig.h:331
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
Definition: aigMan.c:438
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
Definition: aig.h:274
static Aig_Obj_t * Aig_ObjEquiv(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:328
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
Definition: aig.h:313
Definition: aig.h:69
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
Definition: aig.h:312
static void Abc_Print(int level, const char *format,...)
Definition: abc_global.h:313
int Dch_DeriveChoiceCountEquivs(Aig_Man_t *pAig)
Definition: dchChoice.c:89
void Aig_ManCheckReprs(Aig_Man_t *p)
Definition: dchChoice.c:163
static int Aig_ManObjNumMax(Aig_Man_t *p)
Definition: aig.h:259
static void Aig_ObjSetTravIdPrevious(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:294
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
void Dch_CheckChoices(Aig_Man_t *p, int fSkipRedSupps)
Definition: dchChoice.c:206
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
void Dch_DeriveChoiceAigNode(Aig_Man_t *pAigNew, Aig_Man_t *pAigOld, Aig_Obj_t *pObj, int fSkipRedSupps)
Definition: dchChoice.c:443
unsigned int fPhase
Definition: aig.h:78
#define Aig_ManForEachObj(p, pObj, i)
Definition: aig.h:403
#define ABC_FREE(obj)
Definition: abc_global.h:232
int Aig_ManCheckAcyclic_rec(Aig_Man_t *p, Aig_Obj_t *pNode, int fVerbose)
Definition: dchChoice.c:257
void Aig_ManCleanMarkA(Aig_Man_t *p)
Definition: aigUtil.c:148
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
int Dch_ObjCheckTfi(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pRepr)
Definition: dchChoice.c:393
Aig_Man_t * Dch_DeriveChoiceAigInt(Aig_Man_t *pAig, int fSkipRedSupps)
Definition: dchChoice.c:494
int Dch_DeriveChoiceCountReprs(Aig_Man_t *pAig)
FUNCTION DECLARATIONS ///.
Definition: dchChoice.c:75
static int Aig_ObjId(Aig_Obj_t *pObj)
Definition: aig.h:286
#define assert(ex)
Definition: util_old.h:213
int Dch_ObjCountSupp(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: dchChoice.c:58
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
Definition: aig.h:248
int Dch_ObjMarkTfi_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: dchChoice.c:115
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
Definition: aig.h:275
void Aig_ManCleanData(Aig_Man_t *p)
Definition: aigUtil.c:205
int Id
Definition: aig.h:85
static Aig_Obj_t * Aig_ObjChild1CopyRepr(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: dchChoice.c:430
unsigned int nRefs
Definition: aig.h:81