ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
ivyRwr.c
Go to the documentation of this file.
1
20
21#include "ivy.h"
22#include "bool/deco/deco.h"
23#include "opt/rwt/rwt.h"
24
26
27
31
32static unsigned Ivy_NodeGetTruth( Ivy_Obj_t * pObj, int * pNums, int nNums );
33static int Ivy_NodeRewrite( Ivy_Man_t * pMan, Rwt_Man_t * p, Ivy_Obj_t * pNode, int fUpdateLevel, int fUseZeroCost );
34static Dec_Graph_t * Rwt_CutEvaluate( Ivy_Man_t * pMan, Rwt_Man_t * p, Ivy_Obj_t * pRoot,
35 Vec_Ptr_t * vFaninsCur, int nNodesSaved, int LevelMax, int * pGainBest, unsigned uTruth );
36
37static int Ivy_GraphToNetworkCount( Ivy_Man_t * p, Ivy_Obj_t * pRoot, Dec_Graph_t * pGraph, int NodeMax, int LevelMax );
38static void Ivy_GraphUpdateNetwork( Ivy_Man_t * p, Ivy_Obj_t * pRoot, Dec_Graph_t * pGraph, int fUpdateLevel, int nGain );
39
43
55int Ivy_ManRewritePre( Ivy_Man_t * p, int fUpdateLevel, int fUseZeroCost, int fVerbose )
56{
57 Rwt_Man_t * pManRwt;
58 Ivy_Obj_t * pNode;
59 int i, nNodes, nGain;
60 abctime clk, clkStart = Abc_Clock();
61 // start the rewriting manager
62 pManRwt = Rwt_ManStart( 0 );
63 p->pData = pManRwt;
64 if ( pManRwt == NULL )
65 return 0;
66 // create fanouts
67 if ( fUpdateLevel && p->fFanout == 0 )
69 // compute the reverse levels if level update is requested
70 if ( fUpdateLevel )
72 // set the number of levels
73// p->nLevelMax = Ivy_ManLevels( p );
74 // resynthesize each node once
75 nNodes = Ivy_ManObjIdMax(p);
76 Ivy_ManForEachNode( p, pNode, i )
77 {
78 // fix the fanin buffer problem
79 Ivy_NodeFixBufferFanins( p, pNode, 1 );
80 if ( Ivy_ObjIsBuf(pNode) )
81 continue;
82 // stop if all nodes have been tried once
83 if ( i > nNodes )
84 break;
85 // for each cut, try to resynthesize it
86 nGain = Ivy_NodeRewrite( p, pManRwt, pNode, fUpdateLevel, fUseZeroCost );
87 if ( nGain > 0 || (nGain == 0 && fUseZeroCost) )
88 {
89 Dec_Graph_t * pGraph = (Dec_Graph_t *)Rwt_ManReadDecs(pManRwt);
90 int fCompl = Rwt_ManReadCompl(pManRwt);
91/*
92 {
93 Ivy_Obj_t * pObj;
94 int i;
95 printf( "USING: (" );
96 Vec_PtrForEachEntry( Ivy_Obj_t *, Rwt_ManReadLeaves(pManRwt), pObj, i )
97 printf( "%d ", Ivy_ObjFanoutNum(Ivy_Regular(pObj)) );
98 printf( ") Gain = %d.\n", nGain );
99 }
100 if ( nGain > 0 )
101 { // print stats on the MFFC
102 extern void Ivy_NodeMffcConeSuppPrint( Ivy_Obj_t * pNode );
103 printf( "Node %6d : Gain = %4d ", pNode->Id, nGain );
104 Ivy_NodeMffcConeSuppPrint( pNode );
105 }
106*/
107 // complement the FF if needed
108clk = Abc_Clock();
109 if ( fCompl ) Dec_GraphComplement( pGraph );
110 Ivy_GraphUpdateNetwork( p, pNode, pGraph, fUpdateLevel, nGain );
111 if ( fCompl ) Dec_GraphComplement( pGraph );
112Rwt_ManAddTimeUpdate( pManRwt, Abc_Clock() - clk );
113 }
114 }
115Rwt_ManAddTimeTotal( pManRwt, Abc_Clock() - clkStart );
116 // print stats
117 if ( fVerbose )
118 Rwt_ManPrintStats( pManRwt );
119 // delete the managers
120 Rwt_ManStop( pManRwt );
121 p->pData = NULL;
122 // fix the levels
123 if ( fUpdateLevel )
124 Vec_IntFree( p->vRequired ), p->vRequired = NULL;
125 else
127 // check
128 if ( (i = Ivy_ManCleanup(p)) )
129 printf( "Cleanup after rewriting removed %d dangling nodes.\n", i );
130 if ( !Ivy_ManCheck(p) )
131 printf( "Ivy_ManRewritePre(): The check has failed.\n" );
132 return 1;
133}
134
153int Ivy_NodeRewrite( Ivy_Man_t * pMan, Rwt_Man_t * p, Ivy_Obj_t * pNode, int fUpdateLevel, int fUseZeroCost )
154{
155 int fVeryVerbose = 0;
156 Dec_Graph_t * pGraph;
157 Ivy_Store_t * pStore;
158 Ivy_Cut_t * pCut;
159 Ivy_Obj_t * pFanin;
160 unsigned uPhase;
161 unsigned uTruthBest = 0; // Suppress "might be used uninitialized"
162 unsigned uTruth;
163 char * pPerm;
164 int Required, nNodesSaved;
165 int nNodesSaveCur = -1; // Suppress "might be used uninitialized"
166 int i, c, GainCur = -1, GainBest = -1;
167 abctime clk, clk2;
168
169 p->nNodesConsidered++;
170 // get the required times
171 Required = fUpdateLevel? Vec_IntEntry( pMan->vRequired, pNode->Id ) : 1000000;
172 // get the node's cuts
173clk = Abc_Clock();
174 pStore = Ivy_NodeFindCutsAll( pMan, pNode, 5 );
175p->timeCut += Abc_Clock() - clk;
176
177 // go through the cuts
178clk = Abc_Clock();
179 for ( c = 1; c < pStore->nCuts; c++ )
180 {
181 pCut = pStore->pCuts + c;
182 // consider only 4-input cuts
183 if ( pCut->nSize != 4 )
184 continue;
185 // skip the cuts with buffers
186 for ( i = 0; i < (int)pCut->nSize; i++ )
187 if ( Ivy_ObjIsBuf( Ivy_ManObj(pMan, pCut->pArray[i]) ) )
188 break;
189 if ( i != pCut->nSize )
190 {
191 p->nCutsBad++;
192 continue;
193 }
194 p->nCutsGood++;
195 // get the fanin permutation
196clk2 = Abc_Clock();
197 uTruth = 0xFFFF & Ivy_NodeGetTruth( pNode, pCut->pArray, pCut->nSize ); // truth table
198p->timeTruth += Abc_Clock() - clk2;
199 pPerm = p->pPerms4[ (int) p->pPerms[uTruth] ];
200 uPhase = p->pPhases[uTruth];
201 // collect fanins with the corresponding permutation/phase
202 Vec_PtrClear( p->vFaninsCur );
203 Vec_PtrFill( p->vFaninsCur, (int)pCut->nSize, 0 );
204 for ( i = 0; i < (int)pCut->nSize; i++ )
205 {
206 pFanin = Ivy_ManObj( pMan, pCut->pArray[(int)pPerm[i]] );
207 assert( Ivy_ObjIsNode(pFanin) || Ivy_ObjIsCi(pFanin) );
208 pFanin = Ivy_NotCond(pFanin, ((uPhase & (1<<i)) > 0) );
209 Vec_PtrWriteEntry( p->vFaninsCur, i, pFanin );
210 }
211clk2 = Abc_Clock();
212/*
213 printf( "Considering: (" );
214 Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i )
215 printf( "%d ", Ivy_ObjFanoutNum(Ivy_Regular(pFanin)) );
216 printf( ")\n" );
217*/
218 // mark the fanin boundary
219 Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i )
220 Ivy_ObjRefsInc( Ivy_Regular(pFanin) );
221 // label MFFC with current ID
223 nNodesSaved = Ivy_ObjMffcLabel( pMan, pNode );
224 // unmark the fanin boundary
225 Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i )
226 Ivy_ObjRefsDec( Ivy_Regular(pFanin) );
227p->timeMffc += Abc_Clock() - clk2;
228
229 // evaluate the cut
230clk2 = Abc_Clock();
231 pGraph = Rwt_CutEvaluate( pMan, p, pNode, p->vFaninsCur, nNodesSaved, Required, &GainCur, uTruth );
232p->timeEval += Abc_Clock() - clk2;
233
234 // check if the cut is better than the current best one
235 if ( pGraph != NULL && GainBest < GainCur )
236 {
237 // save this form
238 nNodesSaveCur = nNodesSaved;
239 GainBest = GainCur;
240 p->pGraph = pGraph;
241 p->fCompl = ((uPhase & (1<<4)) > 0);
242 uTruthBest = uTruth;
243 // collect fanins in the
244 Vec_PtrClear( p->vFanins );
245 Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i )
246 Vec_PtrPush( p->vFanins, pFanin );
247 }
248 }
249p->timeRes += Abc_Clock() - clk;
250
251 if ( GainBest == -1 )
252 return -1;
253
254// printf( "%d", nNodesSaveCur - GainBest );
255/*
256 if ( GainBest > 0 )
257 {
258 if ( Rwt_CutIsintean( pNode, p->vFanins ) )
259 printf( "b" );
260 else
261 {
262 printf( "Node %d : ", pNode->Id );
263 Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFanins, pFanin, i )
264 printf( "%d ", Ivy_Regular(pFanin)->Id );
265 printf( "a" );
266 }
267 }
268*/
269/*
270 if ( GainBest > 0 )
271 if ( p->fCompl )
272 printf( "c" );
273 else
274 printf( "." );
275*/
276
277 // copy the leaves
278 Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFanins, pFanin, i )
279 Dec_GraphNode((Dec_Graph_t *)p->pGraph, i)->pFunc = pFanin;
280
281 p->nScores[p->pMap[uTruthBest]]++;
282 p->nNodesGained += GainBest;
283 if ( fUseZeroCost || GainBest > 0 )
284 p->nNodesRewritten++;
285
286 // report the progress
287 if ( fVeryVerbose && GainBest > 0 )
288 {
289 printf( "Node %6d : ", Ivy_ObjId(pNode) );
290 printf( "Fanins = %d. ", p->vFanins->nSize );
291 printf( "Save = %d. ", nNodesSaveCur );
292 printf( "Add = %d. ", nNodesSaveCur-GainBest );
293 printf( "GAIN = %d. ", GainBest );
294 printf( "Cone = %d. ", p->pGraph? Dec_GraphNodeNum((Dec_Graph_t *)p->pGraph) : 0 );
295 printf( "Class = %d. ", p->pMap[uTruthBest] );
296 printf( "\n" );
297 }
298 return GainBest;
299}
300
312unsigned Ivy_NodeGetTruth_rec( Ivy_Obj_t * pObj, int * pNums, int nNums )
313{
314 static unsigned uMasks[5] = { 0xAAAAAAAA, 0xCCCCCCCC, 0xF0F0F0F0, 0xFF00FF00, 0xFFFF0000 };
315 unsigned uTruth0, uTruth1;
316 int i;
317 for ( i = 0; i < nNums; i++ )
318 if ( pObj->Id == pNums[i] )
319 return uMasks[i];
320 assert( Ivy_ObjIsNode(pObj) || Ivy_ObjIsBuf(pObj) );
321 uTruth0 = Ivy_NodeGetTruth_rec( Ivy_ObjFanin0(pObj), pNums, nNums );
322 if ( Ivy_ObjFaninC0(pObj) )
323 uTruth0 = ~uTruth0;
324 if ( Ivy_ObjIsBuf(pObj) )
325 return uTruth0;
326 uTruth1 = Ivy_NodeGetTruth_rec( Ivy_ObjFanin1(pObj), pNums, nNums );
327 if ( Ivy_ObjFaninC1(pObj) )
328 uTruth1 = ~uTruth1;
329 return uTruth0 & uTruth1;
330}
331
332
344unsigned Ivy_NodeGetTruth( Ivy_Obj_t * pObj, int * pNums, int nNums )
345{
346 assert( nNums < 6 );
347 return Ivy_NodeGetTruth_rec( pObj, pNums, nNums );
348}
349
361Dec_Graph_t * Rwt_CutEvaluate( Ivy_Man_t * pMan, Rwt_Man_t * p, Ivy_Obj_t * pRoot, Vec_Ptr_t * vFaninsCur, int nNodesSaved, int LevelMax, int * pGainBest, unsigned uTruth )
362{
363 Vec_Ptr_t * vSubgraphs;
364 Dec_Graph_t * pGraphBest = NULL; // Suppress "might be used uninitialized"
365 Dec_Graph_t * pGraphCur;
366 Rwt_Node_t * pNode, * pFanin;
367 int nNodesAdded, GainBest, i, k;
368 // find the matching class of subgraphs
369 vSubgraphs = Vec_VecEntry( p->vClasses, p->pMap[uTruth] );
370 p->nSubgraphs += vSubgraphs->nSize;
371 // determine the best subgraph
372 GainBest = -1;
373 Vec_PtrForEachEntry( Rwt_Node_t *, vSubgraphs, pNode, i )
374 {
375 // get the current graph
376 pGraphCur = (Dec_Graph_t *)pNode->pNext;
377 // copy the leaves
378 Vec_PtrForEachEntry( Rwt_Node_t *, vFaninsCur, pFanin, k )
379 Dec_GraphNode(pGraphCur, k)->pFunc = pFanin;
380 // detect how many unlabeled nodes will be reused
381 nNodesAdded = Ivy_GraphToNetworkCount( pMan, pRoot, pGraphCur, nNodesSaved, LevelMax );
382 if ( nNodesAdded == -1 )
383 continue;
384 assert( nNodesSaved >= nNodesAdded );
385 // count the gain at this node
386 if ( GainBest < nNodesSaved - nNodesAdded )
387 {
388 GainBest = nNodesSaved - nNodesAdded;
389 pGraphBest = pGraphCur;
390 }
391 }
392 if ( GainBest == -1 )
393 return NULL;
394 *pGainBest = GainBest;
395 return pGraphBest;
396}
397
398
413int Ivy_GraphToNetworkCount( Ivy_Man_t * p, Ivy_Obj_t * pRoot, Dec_Graph_t * pGraph, int NodeMax, int LevelMax )
414{
415 Dec_Node_t * pNode, * pNode0, * pNode1;
416 Ivy_Obj_t * pAnd, * pAnd0, * pAnd1;
417 int i, Counter, LevelNew, LevelOld;
418 // check for constant function or a literal
419 if ( Dec_GraphIsConst(pGraph) || Dec_GraphIsVar(pGraph) )
420 return 0;
421 // set the levels of the leaves
422 Dec_GraphForEachLeaf( pGraph, pNode, i )
423 pNode->Level = Ivy_Regular((Ivy_Obj_t *)pNode->pFunc)->Level;
424 // compute the AIG size after adding the internal nodes
425 Counter = 0;
426 Dec_GraphForEachNode( pGraph, pNode, i )
427 {
428 // get the children of this node
429 pNode0 = Dec_GraphNode( pGraph, pNode->eEdge0.Node );
430 pNode1 = Dec_GraphNode( pGraph, pNode->eEdge1.Node );
431 // get the AIG nodes corresponding to the children
432 pAnd0 = (Ivy_Obj_t *)pNode0->pFunc;
433 pAnd1 = (Ivy_Obj_t *)pNode1->pFunc;
434 if ( pAnd0 && pAnd1 )
435 {
436 // if they are both present, find the resulting node
437 pAnd0 = Ivy_NotCond( pAnd0, pNode->eEdge0.fCompl );
438 pAnd1 = Ivy_NotCond( pAnd1, pNode->eEdge1.fCompl );
439 pAnd = Ivy_TableLookup( p, Ivy_ObjCreateGhost(p, pAnd0, pAnd1, IVY_AND, IVY_INIT_NONE) );
440 // return -1 if the node is the same as the original root
441 if ( Ivy_Regular(pAnd) == pRoot )
442 return -1;
443 }
444 else
445 pAnd = NULL;
446 // count the number of added nodes
447 if ( pAnd == NULL || Ivy_ObjIsTravIdCurrent(p, Ivy_Regular(pAnd)) )
448 {
449 if ( ++Counter > NodeMax )
450 return -1;
451 }
452 // count the number of new levels
453 LevelNew = 1 + RWT_MAX( pNode0->Level, pNode1->Level );
454 if ( pAnd )
455 {
456 if ( Ivy_Regular(pAnd) == p->pConst1 )
457 LevelNew = 0;
458 else if ( Ivy_Regular(pAnd) == Ivy_Regular(pAnd0) )
459 LevelNew = (int)Ivy_Regular(pAnd0)->Level;
460 else if ( Ivy_Regular(pAnd) == Ivy_Regular(pAnd1) )
461 LevelNew = (int)Ivy_Regular(pAnd1)->Level;
462 LevelOld = (int)Ivy_Regular(pAnd)->Level;
463// assert( LevelNew == LevelOld );
464 }
465 if ( LevelNew > LevelMax )
466 return -1;
467 pNode->pFunc = pAnd;
468 pNode->Level = LevelNew;
469 }
470 return Counter;
471}
472
486{
487 Ivy_Obj_t * pAnd0, * pAnd1;
488 Dec_Node_t * pNode = NULL; // Suppress "might be used uninitialized"
489 int i;
490 // check for constant function
491 if ( Dec_GraphIsConst(pGraph) )
492 return Ivy_NotCond( Ivy_ManConst1(p), Dec_GraphIsComplement(pGraph) );
493 // check for a literal
494 if ( Dec_GraphIsVar(pGraph) )
495 return Ivy_NotCond( (Ivy_Obj_t *)Dec_GraphVar(pGraph)->pFunc, Dec_GraphIsComplement(pGraph) );
496 // build the AIG nodes corresponding to the AND gates of the graph
497 Dec_GraphForEachNode( pGraph, pNode, i )
498 {
499 pAnd0 = Ivy_NotCond( (Ivy_Obj_t *)Dec_GraphNode(pGraph, pNode->eEdge0.Node)->pFunc, pNode->eEdge0.fCompl );
500 pAnd1 = Ivy_NotCond( (Ivy_Obj_t *)Dec_GraphNode(pGraph, pNode->eEdge1.Node)->pFunc, pNode->eEdge1.fCompl );
501 pNode->pFunc = Ivy_And( p, pAnd0, pAnd1 );
502 }
503 // complement the result if necessary
504 return Ivy_NotCond( (Ivy_Obj_t *)pNode->pFunc, Dec_GraphIsComplement(pGraph) );
505}
506
518void Ivy_GraphUpdateNetwork( Ivy_Man_t * p, Ivy_Obj_t * pRoot, Dec_Graph_t * pGraph, int fUpdateLevel, int nGain )
519{
520 Ivy_Obj_t * pRootNew;
521 int nNodesNew, nNodesOld, Required;
522 Required = fUpdateLevel? Vec_IntEntry( p->vRequired, pRoot->Id ) : 1000000;
523 nNodesOld = Ivy_ManNodeNum(p);
524 // create the new structure of nodes
525 pRootNew = Ivy_GraphToNetwork( p, pGraph );
526 assert( (int)Ivy_Regular(pRootNew)->Level <= Required );
527// if ( Ivy_Regular(pRootNew)->Level == Required )
528// printf( "Difference %d.\n", Ivy_Regular(pRootNew)->Level - Required );
529 // remove the old nodes
530// Ivy_AigReplace( pMan->pManFunc, pRoot, pRootNew, fUpdateLevel );
531/*
532 if ( Ivy_IsComplement(pRootNew) )
533 printf( "c" );
534 else
535 printf( "d" );
536 if ( Ivy_ObjRefs(Ivy_Regular(pRootNew)) > 0 )
537 printf( "%d", Ivy_ObjRefs(Ivy_Regular(pRootNew)) );
538 printf( " " );
539*/
540 Ivy_ObjReplace( p, pRoot, pRootNew, 1, 0, 1 );
541 // compare the gains
542 nNodesNew = Ivy_ManNodeNum(p);
543 assert( nGain <= nNodesOld - nNodesNew );
544 // propagate the buffer
546}
547
559void Ivy_GraphUpdateNetwork3( Ivy_Man_t * p, Ivy_Obj_t * pRoot, Dec_Graph_t * pGraph, int fUpdateLevel, int nGain )
560{
561 Ivy_Obj_t * pRootNew, * pFanin;
562 int nNodesNew, nNodesOld, i, nRefsOld;
563 nNodesOld = Ivy_ManNodeNum(p);
564
565//printf( "Before = %d. ", Ivy_ManNodeNum(p) );
566 // mark the cut
567 Vec_PtrForEachEntry( Ivy_Obj_t *, ((Rwt_Man_t *)p->pData)->vFanins, pFanin, i )
568 Ivy_ObjRefsInc( Ivy_Regular(pFanin) );
569 // deref the old cone
570 nRefsOld = pRoot->nRefs;
571 pRoot->nRefs = 0;
572 Ivy_ObjDelete_rec( p, pRoot, 0 );
573 pRoot->nRefs = nRefsOld;
574 // unmark the cut
575 Vec_PtrForEachEntry( Ivy_Obj_t *, ((Rwt_Man_t *)p->pData)->vFanins, pFanin, i )
576 Ivy_ObjRefsDec( Ivy_Regular(pFanin) );
577//printf( "Deref = %d. ", Ivy_ManNodeNum(p) );
578
579 // create the new structure of nodes
580 pRootNew = Ivy_GraphToNetwork( p, pGraph );
581//printf( "Create = %d. ", Ivy_ManNodeNum(p) );
582 // remove the old nodes
583// Ivy_AigReplace( pMan->pManFunc, pRoot, pRootNew, fUpdateLevel );
584/*
585 if ( Ivy_IsComplement(pRootNew) )
586 printf( "c" );
587 else
588 printf( "d" );
589 if ( Ivy_ObjRefs(Ivy_Regular(pRootNew)) > 0 )
590 printf( "%d", Ivy_ObjRefs(Ivy_Regular(pRootNew)) );
591 printf( " " );
592*/
593 Ivy_ObjReplace( p, pRoot, pRootNew, 0, 0, 1 );
594//printf( "Replace = %d. ", Ivy_ManNodeNum(p) );
595
596 // delete remaining dangling nodes
597 Vec_PtrForEachEntry( Ivy_Obj_t *, ((Rwt_Man_t *)p->pData)->vFanins, pFanin, i )
598 {
599 pFanin = Ivy_Regular(pFanin);
600 if ( !Ivy_ObjIsNone(pFanin) && Ivy_ObjRefs(pFanin) == 0 )
601 Ivy_ObjDelete_rec( p, pFanin, 1 );
602 }
603//printf( "Deref = %d. ", Ivy_ManNodeNum(p) );
604//printf( "\n" );
605
606 // compare the gains
607 nNodesNew = Ivy_ManNodeNum(p);
608 assert( nGain <= nNodesOld - nNodesNew );
609}
610
611
615
616
618
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
struct Dec_Node_t_ Dec_Node_t
Definition dec.h:49
#define Dec_GraphForEachLeaf(pGraph, pLeaf, i)
ITERATORS ///.
Definition dec.h:98
#define Dec_GraphForEachNode(pGraph, pAnd, i)
Definition dec.h:101
struct Dec_Graph_t_ Dec_Graph_t
Definition dec.h:68
Cube * p
Definition exorList.c:222
void Ivy_GraphUpdateNetwork3(Ivy_Man_t *p, Ivy_Obj_t *pRoot, Dec_Graph_t *pGraph, int fUpdateLevel, int nGain)
Definition ivyRwr.c:559
unsigned Ivy_NodeGetTruth_rec(Ivy_Obj_t *pObj, int *pNums, int nNums)
Definition ivyRwr.c:312
Ivy_Obj_t * Ivy_GraphToNetwork(Ivy_Man_t *p, Dec_Graph_t *pGraph)
Definition ivyRwr.c:485
int Ivy_ManRewritePre(Ivy_Man_t *p, int fUpdateLevel, int fUseZeroCost, int fVerbose)
FUNCTION DEFINITIONS ///.
Definition ivyRwr.c:55
int Ivy_ManCheck(Ivy_Man_t *p)
DECLARATIONS ///.
Definition ivyCheck.c:45
struct Ivy_Cut_t_ Ivy_Cut_t
Definition ivy.h:155
int Ivy_ObjMffcLabel(Ivy_Man_t *p, Ivy_Obj_t *pObj)
Definition ivyUtil.c:359
typedefABC_NAMESPACE_HEADER_START struct Ivy_Man_t_ Ivy_Man_t
INCLUDES ///.
Definition ivy.h:46
@ IVY_INIT_NONE
Definition ivy.h:66
Vec_Int_t * Ivy_ManRequiredLevels(Ivy_Man_t *p)
Definition ivyDfs.c:250
void Ivy_ManIncrementTravId(Ivy_Man_t *p)
DECLARATIONS ///.
Definition ivyUtil.c:45
Ivy_Obj_t * Ivy_TableLookup(Ivy_Man_t *p, Ivy_Obj_t *pObj)
FUNCTION DEFINITIONS ///.
Definition ivyTable.c:71
void Ivy_ManResetLevels(Ivy_Man_t *p)
Definition ivyUtil.c:292
int Ivy_ManCleanup(Ivy_Man_t *p)
Definition ivyMan.c:265
#define Ivy_ManForEachNode(p, pObj, i)
Definition ivy.h:402
struct Ivy_Store_t_ Ivy_Store_t
Definition ivy.h:165
struct Ivy_Obj_t_ Ivy_Obj_t
Definition ivy.h:47
void Ivy_ObjReplace(Ivy_Man_t *p, Ivy_Obj_t *pObjOld, Ivy_Obj_t *pObjNew, int fDeleteOld, int fFreeTop, int fUpdateLevel)
Definition ivyObj.c:328
int Ivy_ManPropagateBuffers(Ivy_Man_t *p, int fUpdateLevel)
Definition ivyMan.c:414
Ivy_Store_t * Ivy_NodeFindCutsAll(Ivy_Man_t *p, Ivy_Obj_t *pObj, int nLeaves)
Definition ivyCut.c:892
@ IVY_AND
Definition ivy.h:58
void Ivy_NodeFixBufferFanins(Ivy_Man_t *p, Ivy_Obj_t *pNode, int fUpdateLevel)
Definition ivyObj.c:442
void Ivy_ManStartFanout(Ivy_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition ivyFanout.c:136
void Ivy_ObjDelete_rec(Ivy_Man_t *p, Ivy_Obj_t *pObj, int fFreeTop)
Definition ivyObj.c:299
Ivy_Obj_t * Ivy_And(Ivy_Man_t *p, Ivy_Obj_t *p0, Ivy_Obj_t *p1)
Definition ivyOper.c:84
struct Rwt_Man_t_ Rwt_Man_t
Definition rwt.h:55
void Rwt_ManPrintStats(Rwt_Man_t *p)
Definition rwtMan.c:183
struct Rwt_Node_t_ Rwt_Node_t
Definition rwt.h:56
int Rwt_ManReadCompl(Rwt_Man_t *p)
Definition rwtMan.c:285
void Rwt_ManAddTimeUpdate(Rwt_Man_t *p, abctime Time)
Definition rwtMan.c:317
void * Rwt_ManReadDecs(Rwt_Man_t *p)
Definition rwtMan.c:253
#define RWT_MAX(a, b)
Definition rwt.h:53
void Rwt_ManAddTimeTotal(Rwt_Man_t *p, abctime Time)
Definition rwtMan.c:333
void Rwt_ManStop(Rwt_Man_t *p)
Definition rwtMan.c:149
Rwt_Man_t * Rwt_ManStart(int fPrecompute)
Definition rwtMan.c:87
Dec_Edge_t eEdge1
Definition dec.h:53
void * pFunc
Definition dec.h:56
unsigned Level
Definition dec.h:57
Dec_Edge_t eEdge0
Definition dec.h:52
short nSize
Definition ivy.h:159
int pArray[IVY_CUT_INPUT]
Definition ivy.h:161
int Id
Definition ivy.h:75
int nRefs
Definition ivy.h:85
Ivy_Cut_t pCuts[IVY_CUT_LIMIT]
Definition ivy.h:172
int nCuts
Definition ivy.h:168
Rwt_Node_t * pNext
Definition rwt.h:118
#define assert(ex)
Definition util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55