abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sfmWin.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [sfmWin.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [SAT-based optimization using internal don't-cares.]
8 
9  Synopsis [Structural window computation.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: sfmWin.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "sfmInt.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 ////////////////////////////////////////////////////////////////////////
31 /// FUNCTION DEFINITIONS ///
32 ////////////////////////////////////////////////////////////////////////
33 
34 /**Function*************************************************************
35 
36  Synopsis [Returns the MFFC size.]
37 
38  Description []
39 
40  SideEffects []
41 
42  SeeAlso []
43 
44 ***********************************************************************/
45 int Sfm_ObjRef_rec( Sfm_Ntk_t * p, int iObj )
46 {
47  int i, iFanin, Value, Count;
48  if ( Sfm_ObjIsPi(p, iObj) )
49  return 0;
50  assert( Sfm_ObjIsNode(p, iObj) );
51  Value = Sfm_ObjRefIncrement(p, iObj);
52  if ( Value > 1 )
53  return 0;
54  assert( Value == 1 );
55  Count = 1;
56  Sfm_ObjForEachFanin( p, iObj, iFanin, i )
57  Count += Sfm_ObjRef_rec( p, iFanin );
58  return Count;
59 }
60 int Sfm_ObjRef( Sfm_Ntk_t * p, int iObj )
61 {
62  int i, iFanin, Count = 1;
63  Sfm_ObjForEachFanin( p, iObj, iFanin, i )
64  Count += Sfm_ObjRef_rec( p, iFanin );
65  return Count;
66 }
67 int Sfm_ObjDeref_rec( Sfm_Ntk_t * p, int iObj )
68 {
69  int i, iFanin, Value, Count;
70  if ( Sfm_ObjIsPi(p, iObj) )
71  return 0;
72  assert( Sfm_ObjIsNode(p, iObj) );
73  Value = Sfm_ObjRefDecrement(p, iObj);
74  if ( Value > 0 )
75  return 0;
76  assert( Value == 0 );
77  Count = 1;
78  Sfm_ObjForEachFanin( p, iObj, iFanin, i )
79  Count += Sfm_ObjDeref_rec( p, iFanin );
80  return Count;
81 }
82 int Sfm_ObjDeref( Sfm_Ntk_t * p, int iObj )
83 {
84  int i, iFanin, Count = 1;
85  Sfm_ObjForEachFanin( p, iObj, iFanin, i )
86  Count += Sfm_ObjDeref_rec( p, iFanin );
87  return Count;
88 }
89 int Sfm_ObjMffcSize( Sfm_Ntk_t * p, int iObj )
90 {
91  int Count1, Count2;
92  if ( Sfm_ObjIsPi(p, iObj) )
93  return 0;
94  if ( Sfm_ObjFanoutNum(p, iObj) != 1 )
95  return 0;
96  assert( Sfm_ObjIsNode( p, iObj ) );
97  Count1 = Sfm_ObjDeref( p, iObj );
98  Count2 = Sfm_ObjRef( p, iObj );
99  assert( Count1 == Count2 );
100  return Count1;
101 }
102 
103 /**Function*************************************************************
104 
105  Synopsis [Working with traversal IDs.]
106 
107  Description []
108 
109  SideEffects []
110 
111  SeeAlso []
112 
113 ***********************************************************************/
114 static inline void Sfm_NtkIncrementTravId( Sfm_Ntk_t * p ) { p->nTravIds++; }
115 static inline void Sfm_ObjSetTravIdCurrent( Sfm_Ntk_t * p, int Id ) { Vec_IntWriteEntry( &p->vTravIds, Id, p->nTravIds ); }
116 static inline int Sfm_ObjIsTravIdCurrent( Sfm_Ntk_t * p, int Id ) { return (Vec_IntEntry(&p->vTravIds, Id) == p->nTravIds); }
117 static inline int Sfm_ObjIsTravIdPrevious( Sfm_Ntk_t * p, int Id ) { return (Vec_IntEntry(&p->vTravIds, Id) == p->nTravIds-1); }
118 
119 static inline void Sfm_NtkIncrementTravId2( Sfm_Ntk_t * p ) { p->nTravIds2++; }
120 static inline void Sfm_ObjSetTravIdCurrent2( Sfm_Ntk_t * p, int Id ) { Vec_IntWriteEntry( &p->vTravIds2, Id, p->nTravIds2 ); }
121 static inline int Sfm_ObjIsTravIdCurrent2( Sfm_Ntk_t * p, int Id ) { return (Vec_IntEntry(&p->vTravIds2, Id) == p->nTravIds2); }
122 
123 
124 /**Function*************************************************************
125 
126  Synopsis [Collects used internal nodes in a topological order.]
127 
128  Description [Additionally considers objects in groups as a single object
129  and collects them in a topological order together as single entity.]
130 
131  SideEffects []
132 
133  SeeAlso []
134 
135 ***********************************************************************/
136 void Sfm_NtkDfs_rec( Sfm_Ntk_t * p, int iNode, Vec_Int_t * vNodes, Vec_Wec_t * vGroups, Vec_Int_t * vGroupMap, Vec_Int_t * vBoxesLeft )
137 {
138  int i, iFanin;
139  if ( Sfm_ObjIsPi(p, iNode) )
140  return;
141  if ( Sfm_ObjIsTravIdCurrent(p, iNode) )
142  return;
143  if ( Vec_IntEntry(vGroupMap, iNode) >= 0 )
144  {
145  int k, iGroup = Abc_Lit2Var( Vec_IntEntry(vGroupMap, iNode) );
146  Vec_Int_t * vGroup = Vec_WecEntry( vGroups, iGroup );
147  Vec_IntForEachEntry( vGroup, iNode, i )
148  assert( Sfm_ObjIsNode(p, iNode) );
149  Vec_IntForEachEntry( vGroup, iNode, i )
150  Sfm_ObjSetTravIdCurrent( p, iNode );
151  Vec_IntForEachEntry( vGroup, iNode, i )
152  Sfm_ObjForEachFanin( p, iNode, iFanin, k )
153  Sfm_NtkDfs_rec( p, iFanin, vNodes, vGroups, vGroupMap, vBoxesLeft );
154  Vec_IntForEachEntry( vGroup, iNode, i )
155  Vec_IntPush( vNodes, iNode );
156  Vec_IntPush( vBoxesLeft, iGroup );
157  }
158  else
159  {
160  Sfm_ObjSetTravIdCurrent(p, iNode);
161  Sfm_ObjForEachFanin( p, iNode, iFanin, i )
162  Sfm_NtkDfs_rec( p, iFanin, vNodes, vGroups, vGroupMap, vBoxesLeft );
163  Vec_IntPush( vNodes, iNode );
164  }
165 }
166 Vec_Int_t * Sfm_NtkDfs( Sfm_Ntk_t * p, Vec_Wec_t * vGroups, Vec_Int_t * vGroupMap, Vec_Int_t * vBoxesLeft )
167 {
168  Vec_Int_t * vNodes;
169  int i;
170  Vec_IntClear( vBoxesLeft );
171  vNodes = Vec_IntAlloc( p->nObjs );
173  Sfm_NtkForEachPo( p, i )
174  Sfm_NtkDfs_rec( p, Sfm_ObjFanin(p, i, 0), vNodes, vGroups, vGroupMap, vBoxesLeft );
175  return vNodes;
176 }
177 
178 /**Function*************************************************************
179 
180  Synopsis [Check if this fanout overlaps with TFI cone of the node.]
181 
182  Description []
183 
184  SideEffects []
185 
186  SeeAlso []
187 
188 ***********************************************************************/
189 int Sfm_NtkCheckOverlap_rec( Sfm_Ntk_t * p, int iThis, int iNode )
190 {
191  int i, iFanin;
192  if ( Sfm_ObjIsTravIdCurrent2(p, iThis) || iThis == iNode )
193  return 0;
194 // if ( Sfm_ObjIsTravIdCurrent(p, iThis) )
195  if ( Sfm_ObjIsTravIdPrevious(p, iThis) )
196  return 1;
197  Sfm_ObjSetTravIdCurrent2(p, iThis);
198  Sfm_ObjForEachFanin( p, iThis, iFanin, i )
199  if ( Sfm_NtkCheckOverlap_rec(p, iFanin, iNode) )
200  return 1;
201  return 0;
202 }
203 int Sfm_NtkCheckOverlap( Sfm_Ntk_t * p, int iFan, int iNode )
204 {
206  return Sfm_NtkCheckOverlap_rec( p, iFan, iNode );
207 }
208 
209 /**Function*************************************************************
210 
211  Synopsis [Recursively collects roots of the window.]
212 
213  Description []
214 
215  SideEffects []
216 
217  SeeAlso []
218 
219 ***********************************************************************/
220 static inline int Sfm_NtkCheckRoot( Sfm_Ntk_t * p, int iNode, int nLevelMax )
221 {
222  int i, iFanout;
223  // the node is the root if one of the following is true:
224  // (1) the node has more than fanouts than the limit or has no fanouts (should not happen in general)
225  if ( Sfm_ObjFanoutNum(p, iNode) == 0 || Sfm_ObjFanoutNum(p, iNode) > p->pPars->nFanoutMax )
226  return 1;
227  // (2) the node has CO fanouts
228  // (3) the node has fanouts above the cutoff level
229  Sfm_ObjForEachFanout( p, iNode, iFanout, i )
230  if ( Sfm_ObjIsPo(p, iFanout) || Sfm_ObjLevel(p, iFanout) > nLevelMax )//|| !Sfm_NtkCheckOverlap(p, iFanout, iNode) )
231  return 1;
232  return 0;
233 }
234 void Sfm_NtkComputeRoots_rec( Sfm_Ntk_t * p, int iNode, int nLevelMax, Vec_Int_t * vRoots, Vec_Int_t * vTfo )
235 {
236  int i, iFanout;
237  assert( Sfm_ObjIsNode(p, iNode) );
238  if ( Sfm_ObjIsTravIdCurrent(p, iNode) )
239  return;
240  Sfm_ObjSetTravIdCurrent(p, iNode);
241  if ( iNode != p->iPivotNode )
242  Vec_IntPush( vTfo, iNode );
243  // check if the node should be the root
244  if ( Sfm_NtkCheckRoot( p, iNode, nLevelMax ) )
245  Vec_IntPush( vRoots, iNode );
246  else // if not, explore its fanouts
247  Sfm_ObjForEachFanout( p, iNode, iFanout, i )
248  Sfm_NtkComputeRoots_rec( p, iFanout, nLevelMax, vRoots, vTfo );
249 }
250 
251 /**Function*************************************************************
252 
253  Synopsis [Collects divisors of the node.]
254 
255  Description []
256 
257  SideEffects []
258 
259  SeeAlso []
260 
261 ***********************************************************************/
262 void Sfm_NtkAddDivisors( Sfm_Ntk_t * p, int iNode, int nLevelMax )
263 {
264  int i, iFanout;
265  Sfm_ObjForEachFanout( p, iNode, iFanout, i )
266  {
267  // skip some of the fanouts if the number is large
268  if ( p->pPars->nFanoutMax && i > p->pPars->nFanoutMax )
269  return;
270  // skip TFI nodes, PO nodes, or nodes with high logic level
271  if ( Sfm_ObjIsTravIdCurrent(p, iFanout) || Sfm_ObjIsPo(p, iFanout) || Sfm_ObjLevel(p, iFanout) > nLevelMax )
272  continue;
273  // handle single-input nodes
274  if ( Sfm_ObjFaninNum(p, iFanout) == 1 )
275  Vec_IntPush( p->vDivs, iFanout );
276  // visit node for the first time
277  else if ( !Sfm_ObjIsTravIdCurrent2(p, iFanout) )
278  {
279  assert( Sfm_ObjFaninNum(p, iFanout) > 1 );
280  Sfm_ObjSetTravIdCurrent2( p, iFanout );
281  Sfm_ObjResetFaninCount( p, iFanout );
282  }
283  // visit node again
284  else if ( Sfm_ObjUpdateFaninCount(p, iFanout) == 0 )
285  Vec_IntPush( p->vDivs, iFanout );
286  }
287 }
288 
289 /**Function*************************************************************
290 
291  Synopsis [Fixed object is useful when it has a non-fixed fanout.]
292 
293  Description []
294 
295  SideEffects []
296 
297  SeeAlso []
298 
299 ***********************************************************************/
300 static inline int Sfm_ObjIsUseful( Sfm_Ntk_t * p, int iNode )
301 {
302  int i, iFanout;
303  if ( !Sfm_ObjIsFixed(p, iNode) )
304  return 1;
305  Sfm_ObjForEachFanout( p, iNode, iFanout, i )
306  if ( !Sfm_ObjIsFixed(p, iFanout) )
307  return 1;
308  return 0;
309 }
310 
311 /**Function*************************************************************
312 
313  Synopsis [Computes structural window.]
314 
315  Description []
316 
317  SideEffects []
318 
319  SeeAlso []
320 
321 ***********************************************************************/
322 int Sfm_NtkCollectTfi_rec( Sfm_Ntk_t * p, int iNode, Vec_Int_t * vNodes )
323 {
324  int i, iFanin;
325  if ( Sfm_ObjIsTravIdCurrent( p, iNode ) )
326  return 0;
327  Sfm_ObjSetTravIdCurrent( p, iNode );
328  Sfm_ObjForEachFanin( p, iNode, iFanin, i )
329  if ( Sfm_NtkCollectTfi_rec( p, iFanin, vNodes ) )
330  return 1;
331  Vec_IntPush( vNodes, iNode );
332  return p->pPars->nWinSizeMax && (Vec_IntSize(vNodes) > p->pPars->nWinSizeMax);
333 }
334 int Sfm_NtkCreateWindow( Sfm_Ntk_t * p, int iNode, int fVerbose )
335 {
336  int i, k, iTemp;
337  abctime clkDiv, clkWin = Abc_Clock();
338 
339  assert( Sfm_ObjIsNode( p, iNode ) );
340  p->iPivotNode = iNode;
341  Vec_IntClear( p->vNodes ); // internal
342  Vec_IntClear( p->vDivs ); // divisors
343  Vec_IntClear( p->vRoots ); // roots
344  Vec_IntClear( p->vTfo ); // roots
345  Vec_IntClear( p->vOrder ); // variable order
346 
347  // collect transitive fanin
349  if ( Sfm_NtkCollectTfi_rec( p, iNode, p->vNodes ) )
350  {
351  p->nMaxDivs++;
352  p->timeWin += Abc_Clock() - clkWin;
353  return 0;
354  }
355 
356  // create divisors
357  clkDiv = Abc_Clock();
358  Vec_IntClear( p->vDivs );
359  Vec_IntAppend( p->vDivs, p->vNodes );
360  Vec_IntPop( p->vDivs );
361  // add non-topological divisors
362  if ( Vec_IntSize(p->vDivs) < p->pPars->nWinSizeMax + 0 )
363  {
365  Vec_IntForEachEntry( p->vDivs, iTemp, i )
366  if ( Vec_IntSize(p->vDivs) < p->pPars->nWinSizeMax + 0 )
367 // Sfm_NtkAddDivisors( p, iTemp, Sfm_ObjLevel(p, iNode) - 1 );
368  Sfm_NtkAddDivisors( p, iTemp, p->nLevelMax - Sfm_ObjLevelR(p, iNode) );
369  }
370  if ( Vec_IntSize(p->vDivs) > p->pPars->nWinSizeMax )
371  {
372 /*
373  k = 0;
374  Vec_IntForEachEntryStart( p->vDivs, iTemp, i, Vec_IntSize(p->vDivs) - p->pPars->nWinSizeMax )
375  Vec_IntWriteEntry( p->vDivs, k++, iTemp );
376  assert( k == p->pPars->nWinSizeMax );
377 */
378  Vec_IntShrink( p->vDivs, p->pPars->nWinSizeMax );
379  }
380  assert( Vec_IntSize(p->vDivs) <= p->pPars->nWinSizeMax );
381  p->nMaxDivs += (int)(Vec_IntSize(p->vDivs) == p->pPars->nWinSizeMax);
382  // remove node/fanins from divisors
383  // mark fanins
385  Sfm_ObjSetTravIdCurrent2( p, iNode );
386  Sfm_ObjForEachFanin( p, iNode, iTemp, i )
387  Sfm_ObjSetTravIdCurrent2( p, iTemp );
388  // compact divisors
389  k = 0;
390  Vec_IntForEachEntry( p->vDivs, iTemp, i )
391  if ( !Sfm_ObjIsTravIdCurrent2(p, iTemp) && Sfm_ObjIsUseful(p, iTemp) )
392  Vec_IntWriteEntry( p->vDivs, k++, iTemp );
393  Vec_IntShrink( p->vDivs, k );
394  assert( Vec_IntSize(p->vDivs) <= p->pPars->nWinSizeMax );
395  clkDiv = Abc_Clock() - clkDiv;
396  p->timeDiv += clkDiv;
397  p->nTotalDivs += Vec_IntSize(p->vDivs);
398 
399  // collect TFO and window roots
400  if ( p->pPars->nTfoLevMax > 0 && !Sfm_NtkCheckRoot(p, iNode, Sfm_ObjLevel(p, iNode) + p->pPars->nTfoLevMax) )
401  {
402  // explore transitive fanout
404  Sfm_NtkComputeRoots_rec( p, iNode, Sfm_ObjLevel(p, iNode) + p->pPars->nTfoLevMax, p->vRoots, p->vTfo );
405  assert( Vec_IntSize(p->vRoots) > 0 );
406  assert( Vec_IntSize(p->vTfo) > 0 );
407  // compute new leaves and nodes
409  Vec_IntForEachEntry( p->vRoots, iTemp, i )
410  if ( Sfm_NtkCollectTfi_rec( p, iTemp, p->vOrder ) )
411  {
412  Vec_IntClear( p->vRoots );
413  Vec_IntClear( p->vTfo );
414  Vec_IntClear( p->vOrder );
415  break;
416  }
417  if ( Vec_IntSize(p->vRoots) > 0 )
418  Vec_IntForEachEntry( p->vTfo, iTemp, i )
419  if ( Sfm_NtkCollectTfi_rec( p, iTemp, p->vOrder ) )
420  {
421  Vec_IntClear( p->vRoots );
422  Vec_IntClear( p->vTfo );
423  Vec_IntClear( p->vOrder );
424  break;
425  }
426  if ( Vec_IntSize(p->vRoots) > 0 )
427  Vec_IntForEachEntry( p->vDivs, iTemp, i )
428  if ( Sfm_NtkCollectTfi_rec( p, iTemp, p->vOrder ) )
429  {
430  Vec_IntClear( p->vRoots );
431  Vec_IntClear( p->vTfo );
432  Vec_IntClear( p->vOrder );
433  break;
434  }
435  }
436 
437  if ( Vec_IntSize(p->vOrder) == 0 )
438  {
439  int Temp = p->pPars->nWinSizeMax;
440  p->pPars->nWinSizeMax = 0;
442  Sfm_NtkCollectTfi_rec( p, iNode, p->vOrder );
443  Vec_IntForEachEntry( p->vDivs, iTemp, i )
444  Sfm_NtkCollectTfi_rec( p, iTemp, p->vOrder );
445  p->pPars->nWinSizeMax = Temp;
446  }
447 
448  // statistics
449  p->timeWin += Abc_Clock() - clkWin - clkDiv;
450  if ( !fVerbose )
451  return 1;
452 
453  // print stats about the window
454  printf( "%6d : ", iNode );
455  printf( "Leaves = %5d. ", 0 );
456  printf( "Nodes = %5d. ", Vec_IntSize(p->vNodes) );
457  printf( "Roots = %5d. ", Vec_IntSize(p->vRoots) );
458  printf( "Divs = %5d. ", Vec_IntSize(p->vDivs) );
459  printf( "\n" );
460  return 1;
461 }
462 void Sfm_NtkWindowTest( Sfm_Ntk_t * p, int iNode )
463 {
464  int i;
465  Sfm_NtkForEachNode( p, i )
466  Sfm_NtkCreateWindow( p, i, 1 );
467 }
468 
469 ////////////////////////////////////////////////////////////////////////
470 /// END OF FILE ///
471 ////////////////////////////////////////////////////////////////////////
472 
473 
475 
int Sfm_ObjDeref(Sfm_Ntk_t *p, int iObj)
Definition: sfmWin.c:82
static int Sfm_ObjIsUseful(Sfm_Ntk_t *p, int iNode)
Definition: sfmWin.c:300
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
Definition: vecWec.h:42
#define Sfm_ObjForEachFanin(p, Node, Fan, i)
Definition: sfmInt.h:172
void Sfm_NtkDfs_rec(Sfm_Ntk_t *p, int iNode, Vec_Int_t *vNodes, Vec_Wec_t *vGroups, Vec_Int_t *vGroupMap, Vec_Int_t *vBoxesLeft)
Definition: sfmWin.c:136
void Sfm_NtkComputeRoots_rec(Sfm_Ntk_t *p, int iNode, int nLevelMax, Vec_Int_t *vRoots, Vec_Int_t *vTfo)
Definition: sfmWin.c:234
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static int Sfm_ObjIsTravIdCurrent2(Sfm_Ntk_t *p, int Id)
Definition: sfmWin.c:121
static int Sfm_ObjFaninNum(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:139
int Sfm_ObjMffcSize(Sfm_Ntk_t *p, int iObj)
Definition: sfmWin.c:89
static int Sfm_ObjUpdateFaninCount(Sfm_Ntk_t *p, int iObj)
Definition: sfmInt.h:159
void Sfm_NtkAddDivisors(Sfm_Ntk_t *p, int iNode, int nLevelMax)
Definition: sfmWin.c:262
static int Sfm_ObjIsTravIdCurrent(Sfm_Ntk_t *p, int Id)
Definition: sfmWin.c:116
typedefABC_NAMESPACE_HEADER_START struct Sfm_Ntk_t_ Sfm_Ntk_t
INCLUDES ///.
Definition: sfm.h:41
static abctime Abc_Clock()
Definition: abc_global.h:279
int Sfm_NtkCreateWindow(Sfm_Ntk_t *p, int iNode, int fVerbose)
Definition: sfmWin.c:334
#define Sfm_NtkForEachPo(p, i)
Definition: sfmInt.h:169
static int Sfm_ObjIsNode(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:131
static void Sfm_NtkIncrementTravId2(Sfm_Ntk_t *p)
Definition: sfmWin.c:119
static int Sfm_ObjLevel(Sfm_Ntk_t *p, int iObj)
Definition: sfmInt.h:153
static void Sfm_ObjSetTravIdCurrent(Sfm_Ntk_t *p, int Id)
Definition: sfmWin.c:115
ABC_NAMESPACE_IMPL_START int Sfm_ObjRef_rec(Sfm_Ntk_t *p, int iObj)
DECLARATIONS ///.
Definition: sfmWin.c:45
static int Sfm_ObjFanin(Sfm_Ntk_t *p, int i, int k)
Definition: sfmInt.h:145
static int Sfm_NtkCheckRoot(Sfm_Ntk_t *p, int iNode, int nLevelMax)
Definition: sfmWin.c:220
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
static int Sfm_ObjIsPi(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:129
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
#define Sfm_ObjForEachFanout(p, Node, Fan, i)
Definition: sfmInt.h:173
static int Sfm_ObjIsPo(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:130
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
static int Vec_IntPop(Vec_Int_t *p)
int Sfm_ObjRef(Sfm_Ntk_t *p, int iObj)
Definition: sfmWin.c:60
int Sfm_ObjDeref_rec(Sfm_Ntk_t *p, int iObj)
Definition: sfmWin.c:67
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static void Vec_IntAppend(Vec_Int_t *vVec1, Vec_Int_t *vVec2)
static void Sfm_NtkIncrementTravId(Sfm_Ntk_t *p)
Definition: sfmWin.c:114
void Sfm_NtkWindowTest(Sfm_Ntk_t *p, int iNode)
Definition: sfmWin.c:462
static int Sfm_ObjLevelR(Sfm_Ntk_t *p, int iObj)
Definition: sfmInt.h:156
static int Sfm_ObjRefDecrement(Sfm_Ntk_t *p, int iObj)
Definition: sfmInt.h:143
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static Vec_Int_t * Vec_WecEntry(Vec_Wec_t *p, int i)
Definition: vecWec.h:142
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
int Sfm_NtkCheckOverlap(Sfm_Ntk_t *p, int iFan, int iNode)
Definition: sfmWin.c:203
int Sfm_NtkCheckOverlap_rec(Sfm_Ntk_t *p, int iThis, int iNode)
Definition: sfmWin.c:189
static void Vec_IntShrink(Vec_Int_t *p, int nSizeNew)
Definition: bblif.c:435
static void Sfm_ObjResetFaninCount(Sfm_Ntk_t *p, int iObj)
Definition: sfmInt.h:160
static int Sfm_ObjFanoutNum(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:140
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
Vec_Int_t * Sfm_NtkDfs(Sfm_Ntk_t *p, Vec_Wec_t *vGroups, Vec_Int_t *vGroupMap, Vec_Int_t *vBoxesLeft)
Definition: sfmWin.c:166
#define assert(ex)
Definition: util_old.h:213
static int Sfm_ObjIsFixed(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:132
#define Sfm_NtkForEachNode(p, i)
Definition: sfmInt.h:170
static int Sfm_ObjIsTravIdPrevious(Sfm_Ntk_t *p, int Id)
Definition: sfmWin.c:117
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
ABC_INT64_T abctime
Definition: abc_global.h:278
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
int Sfm_NtkCollectTfi_rec(Sfm_Ntk_t *p, int iNode, Vec_Int_t *vNodes)
Definition: sfmWin.c:322
static int Sfm_ObjRefIncrement(Sfm_Ntk_t *p, int iObj)
Definition: sfmInt.h:142
static void Sfm_ObjSetTravIdCurrent2(Sfm_Ntk_t *p, int Id)
Definition: sfmWin.c:120