abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mfsCore.c File Reference
#include "mfsInt.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START int Abc_NtkMfsSolveSatResub (Mfs_Man_t *p, Abc_Obj_t *pNode, int iFanin, int fOnlyRemove, int fSkipUpdate)
 DECLARATIONS ///. More...
 
void Abc_NtkMfsParsDefault (Mfs_Par_t *pPars)
 FUNCTION DEFINITIONS ///. More...
 
int Abc_WinNode (Mfs_Man_t *p, Abc_Obj_t *pNode)
 
void Abc_NtkMfsPowerResub (Mfs_Man_t *p, Mfs_Par_t *pPars)
 
int Abc_NtkMfsResub (Mfs_Man_t *p, Abc_Obj_t *pNode)
 
int Abc_NtkMfsNode (Mfs_Man_t *p, Abc_Obj_t *pNode)
 
int Abc_NtkMfs (Abc_Ntk_t *pNtk, Mfs_Par_t *pPars)
 

Function Documentation

int Abc_NtkMfs ( Abc_Ntk_t pNtk,
Mfs_Par_t pPars 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 377 of file mfsCore.c.

378 {
379  extern Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters );
380 
381  Bdc_Par_t Pars = {0}, * pDecPars = &Pars;
382  ProgressBar * pProgress;
383  Mfs_Man_t * p;
384  Abc_Obj_t * pObj;
385  Vec_Vec_t * vLevels;
386  Vec_Ptr_t * vNodes;
387  int i, k, nNodes, nFaninMax;
388  abctime clk = Abc_Clock(), clk2;
389  int nTotalNodesBeg = Abc_NtkNodeNum(pNtk);
390  int nTotalEdgesBeg = Abc_NtkGetTotalFanins(pNtk);
391 
392  assert( Abc_NtkIsLogic(pNtk) );
393  nFaninMax = Abc_NtkGetFaninMax(pNtk);
394  if ( pPars->fResub )
395  {
396  if ( nFaninMax > 8 )
397  {
398  printf( "Nodes with more than %d fanins will not be processed.\n", 8 );
399  nFaninMax = 8;
400  }
401  }
402  else
403  {
404  if ( nFaninMax > MFS_FANIN_MAX )
405  {
406  printf( "Nodes with more than %d fanins will not be processed.\n", MFS_FANIN_MAX );
407  nFaninMax = MFS_FANIN_MAX;
408  }
409  }
410  // perform the network sweep
411 // Abc_NtkSweep( pNtk, 0 );
412  // convert into the AIG
413  if ( !Abc_NtkToAig(pNtk) )
414  {
415  fprintf( stdout, "Converting to AIGs has failed.\n" );
416  return 0;
417  }
418  assert( Abc_NtkHasAig(pNtk) );
419 
420  // start the manager
421  p = Mfs_ManAlloc( pPars );
422  p->pNtk = pNtk;
423  p->nFaninMax = nFaninMax;
424 
425  // precomputer power-aware metrics
426  if ( pPars->fPower )
427  {
428  extern Vec_Int_t * Abc_NtkPowerEstimate( Abc_Ntk_t * pNtk, int fProbOne );
429  if ( pPars->fResub )
430  p->vProbs = Abc_NtkPowerEstimate( pNtk, 0 );
431  else
432  p->vProbs = Abc_NtkPowerEstimate( pNtk, 1 );
433 #if 0
434  printf( "Total switching before = %7.2f.\n", Abc_NtkMfsTotalSwitching(pNtk) );
435 #else
437 #endif
438  }
439 
440  if ( pNtk->pExcare )
441  {
442  Abc_Ntk_t * pTemp;
443  if ( Abc_NtkPiNum((Abc_Ntk_t *)pNtk->pExcare) != Abc_NtkCiNum(pNtk) )
444  printf( "The PI count of careset (%d) and logic network (%d) differ. Careset is not used.\n",
445  Abc_NtkPiNum((Abc_Ntk_t *)pNtk->pExcare), Abc_NtkCiNum(pNtk) );
446  else
447  {
448  pTemp = Abc_NtkStrash( (Abc_Ntk_t *)pNtk->pExcare, 0, 0, 0 );
449  p->pCare = Abc_NtkToDar( pTemp, 0, 0 );
450  Abc_NtkDelete( pTemp );
452  }
453  }
454  if ( p->pCare != NULL )
455  printf( "Performing optimization with %d external care clauses.\n", Aig_ManCoNum(p->pCare) );
456  // prepare the BDC manager
457  if ( !pPars->fResub )
458  {
459  pDecPars->nVarsMax = (nFaninMax < 3) ? 3 : nFaninMax;
460  pDecPars->fVerbose = pPars->fVerbose;
461  p->vTruth = Vec_IntAlloc( 0 );
462  p->pManDec = Bdc_ManAlloc( pDecPars );
463  }
464 
465  // label the register outputs
466  if ( p->pCare )
467  {
468  Abc_NtkForEachCi( pNtk, pObj, i )
469  pObj->pData = (void *)(ABC_PTRUINT_T)i;
470  }
471 
472  // compute levels
473  Abc_NtkLevel( pNtk );
474  Abc_NtkStartReverseLevels( pNtk, pPars->nGrowthLevel );
475 
476  // compute don't-cares for each node
477  nNodes = 0;
478  p->nTotalNodesBeg = nTotalNodesBeg;
479  p->nTotalEdgesBeg = nTotalEdgesBeg;
480  if ( pPars->fResub )
481  {
482 #if 0
483  printf( "TotalSwitching (%7.2f --> ", Abc_NtkMfsTotalSwitching(pNtk) );
484 #endif
485  if (pPars->fPower)
486  {
487  Abc_NtkMfsPowerResub( p, pPars);
488  } else
489  {
490  pProgress = Extra_ProgressBarStart( stdout, Abc_NtkObjNumMax(pNtk) );
491  Abc_NtkForEachNode( pNtk, pObj, i )
492  {
493  if ( p->pPars->nDepthMax && (int)pObj->Level > p->pPars->nDepthMax )
494  continue;
495  if ( Abc_ObjFaninNum(pObj) < 2 || Abc_ObjFaninNum(pObj) > nFaninMax )
496  continue;
497  if ( !p->pPars->fVeryVerbose )
498  Extra_ProgressBarUpdate( pProgress, i, NULL );
499  if ( pPars->fResub )
500  Abc_NtkMfsResub( p, pObj );
501  else
502  Abc_NtkMfsNode( p, pObj );
503  }
504  Extra_ProgressBarStop( pProgress );
505 #if 0
506  printf( " %7.2f )\n", Abc_NtkMfsTotalSwitching(pNtk) );
507 #endif
508  }
509  } else
510  {
511 #if 0
512  printf( "Total switching before = %7.2f, ----> ", Abc_NtkMfsTotalSwitching(pNtk) );
513 #endif
514  pProgress = Extra_ProgressBarStart( stdout, Abc_NtkNodeNum(pNtk) );
515  vLevels = Abc_NtkLevelize( pNtk );
516  Vec_VecForEachLevelStart( vLevels, vNodes, k, 1 )
517  {
518  if ( !p->pPars->fVeryVerbose )
519  Extra_ProgressBarUpdate( pProgress, nNodes, NULL );
520  p->nNodesGainedLevel = 0;
521  p->nTotConfLevel = 0;
522  p->nTimeOutsLevel = 0;
523  clk2 = Abc_Clock();
524  Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
525  {
526  if ( p->pPars->nDepthMax && (int)pObj->Level > p->pPars->nDepthMax )
527  break;
528  if ( Abc_ObjFaninNum(pObj) < 2 || Abc_ObjFaninNum(pObj) > nFaninMax )
529  continue;
530  if ( pPars->fResub )
531  Abc_NtkMfsResub( p, pObj );
532  else
533  Abc_NtkMfsNode( p, pObj );
534  }
535  nNodes += Vec_PtrSize(vNodes);
536  if ( pPars->fVerbose )
537  {
538  /*
539  printf( "Lev = %2d. Node = %5d. Ave gain = %5.2f. Ave conf = %5.2f. T/o = %6.2f %% ",
540  k, Vec_PtrSize(vNodes),
541  1.0*p->nNodesGainedLevel/Vec_PtrSize(vNodes),
542  1.0*p->nTotConfLevel/Vec_PtrSize(vNodes),
543  100.0*p->nTimeOutsLevel/Vec_PtrSize(vNodes) );
544  ABC_PRT( "Time", Abc_Clock() - clk2 );
545  */
546  }
547  }
548  Extra_ProgressBarStop( pProgress );
549  Vec_VecFree( vLevels );
550 #if 0
551  printf( " %7.2f.\n", Abc_NtkMfsTotalSwitching(pNtk) );
552 #endif
553  }
554  Abc_NtkStopReverseLevels( pNtk );
555 
556  // perform the sweeping
557  if ( !pPars->fResub )
558  {
559  extern void Abc_NtkBidecResyn( Abc_Ntk_t * pNtk, int fVerbose );
560 // Abc_NtkSweep( pNtk, 0 );
561 // Abc_NtkBidecResyn( pNtk, 0 );
562  }
563 
564  p->nTotalNodesEnd = Abc_NtkNodeNum(pNtk);
566 
567  // undo labesl
568  if ( p->pCare )
569  {
570  Abc_NtkForEachCi( pNtk, pObj, i )
571  pObj->pData = NULL;
572  }
573 
574  if ( pPars->fPower )
575  {
576 #if 1
578 // printf( "Total switching after = %7.2f.\n", Abc_NtkMfsTotalSwitching(pNtk) );
579 #else
580  printf( "Total switching after = %7.2f.\n", Abc_NtkMfsTotalSwitching(pNtk) );
581 #endif
582  }
583 
584  // free the manager
585  p->timeTotal = Abc_Clock() - clk;
586  Mfs_ManStop( p );
587  return 1;
588 }
ABC_DLL Vec_Vec_t * Abc_NtkLevelize(Abc_Ntk_t *pNtk)
Definition: abcDfs.c:1239
Vec_Int_t * vProbs
Definition: mfsInt.h:97
static int Abc_NtkIsLogic(Abc_Ntk_t *pNtk)
Definition: abc.h:250
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
void Abc_NtkMfsPowerResub(Mfs_Man_t *p, Mfs_Par_t *pPars)
Definition: mfsCore.c:154
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
Definition: abc.h:284
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
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
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
int nTotalNodesEnd
Definition: mfsInt.h:121
Mfs_Par_t * pPars
Definition: mfsInt.h:53
#define Vec_VecForEachLevelStart(vGlob, vVec, i, LevelStart)
Definition: vecVec.h:57
ABC_DLL Abc_Ntk_t * Abc_NtkStrash(Abc_Ntk_t *pNtk, int fAllNodes, int fCleanup, int fRecord)
Definition: abcStrash.c:265
int nNodesGainedLevel
Definition: mfsInt.h:85
Bdc_Man_t * Bdc_ManAlloc(Bdc_Par_t *pPars)
MACRO DEFINITIONS ///.
Definition: bdcCore.c:68
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
Definition: abc.h:364
ABC_DLL int Abc_NtkGetFaninMax(Abc_Ntk_t *pNtk)
Definition: abcUtil.c:453
Bdc_Man_t * pManDec
Definition: mfsInt.h:82
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
Definition: abc.h:287
static abctime Abc_Clock()
Definition: abc_global.h:279
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static void Vec_VecFree(Vec_Vec_t *p)
Definition: vecVec.h:347
ABC_DLL int Abc_NtkGetTotalFanins(Abc_Ntk_t *pNtk)
Definition: abcUtil.c:487
ABC_DLL float Abc_NtkMfsTotalSwitching(Abc_Ntk_t *pNtk)
Definition: abcPrint.c:132
ABC_DLL void Abc_NtkStopReverseLevels(Abc_Ntk_t *pNtk)
Definition: abcTiming.c:1190
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition: abcNtk.c:1233
unsigned Level
Definition: abc.h:142
void Mfs_ManStop(Mfs_Man_t *p)
Definition: mfsMan.c:170
Vec_Ptr_t * vSuppsInv
Definition: mfsInt.h:56
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
Definition: abc.h:293
static int Aig_ManCoNum(Aig_Man_t *p)
Definition: aig.h:252
int nTimeOutsLevel
Definition: mfsInt.h:115
DECLARATIONS ///.
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
Vec_Int_t * Abc_NtkPowerEstimate(Abc_Ntk_t *pNtk, int fProbOne)
Definition: abcSpeedup.c:669
Aig_Man_t * Abc_NtkToDar(Abc_Ntk_t *pNtk, int fExors, int fRegisters)
Definition: abcDar.c:233
void * pExcare
Definition: abc.h:202
int Abc_NtkMfsNode(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsCore.c:306
if(last==0)
Definition: sparse_int.h:34
int nFaninMax
Definition: mfsInt.h:57
ABC_DLL void Abc_NtkStartReverseLevels(Abc_Ntk_t *pNtk, int nMaxLevelIncrease)
Definition: abcTiming.c:1162
void Extra_ProgressBarStop(ProgressBar *p)
abctime timeTotal
Definition: mfsInt.h:134
#define Abc_NtkForEachNode(pNtk, pNode, i)
Definition: abc.h:461
Vec_Ptr_t * Aig_ManSupportsInverse(Aig_Man_t *p)
Definition: aigPart.c:385
float TotalSwitchingBeg
Definition: mfsInt.h:124
int nTotConfLevel
Definition: mfsInt.h:95
Mfs_Man_t * Mfs_ManAlloc(Mfs_Par_t *pPars)
DECLARATIONS ///.
Definition: mfsMan.c:45
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition: abc.h:515
Definition: bdc.h:45
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
Definition: abc.h:285
void Abc_NtkBidecResyn(Abc_Ntk_t *pNtk, int fVerbose)
Definition: abcBidec.c:110
Abc_Ntk_t * pNtk
Definition: mfsInt.h:54
ProgressBar * Extra_ProgressBarStart(FILE *pFile, int nItemsTotal)
FUNCTION DEFINITIONS ///.
ABC_DLL int Abc_NtkToAig(Abc_Ntk_t *pNtk)
Definition: abcFunc.c:1192
#define assert(ex)
Definition: util_old.h:213
static void Extra_ProgressBarUpdate(ProgressBar *p, int nItemsCur, char *pString)
Definition: extra.h:243
static int Abc_NtkHasAig(Abc_Ntk_t *pNtk)
Definition: abc.h:255
float TotalSwitchingEnd
Definition: mfsInt.h:125
Aig_Man_t * pCare
Definition: mfsInt.h:55
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
int Abc_NtkMfsResub(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsCore.c:236
ABC_INT64_T abctime
Definition: abc_global.h:278
Vec_Int_t * vTruth
Definition: mfsInt.h:81
ABC_DLL int Abc_NtkLevel(Abc_Ntk_t *pNtk)
Definition: abcDfs.c:1265
int nTotalEdgesEnd
Definition: mfsInt.h:123
#define MFS_FANIN_MAX
INCLUDES ///.
Definition: mfsInt.h:47
int Abc_NtkMfsNode ( Mfs_Man_t p,
Abc_Obj_t pNode 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 306 of file mfsCore.c.

307 {
308  Hop_Obj_t * pObj;
309  int RetValue;
310  float dProb;
311  extern Hop_Obj_t * Abc_NodeIfNodeResyn( Bdc_Man_t * p, Hop_Man_t * pHop, Hop_Obj_t * pRoot, int nVars, Vec_Int_t * vTruth, unsigned * puCare, float dProb );
312 
313  int nGain;
314  abctime clk;
315  p->nNodesTried++;
316  // prepare data structure for this node
317  Mfs_ManClean( p );
318  // compute window roots, window support, and window nodes
319 clk = Abc_Clock();
320  p->vRoots = Abc_MfsComputeRoots( pNode, p->pPars->nWinTfoLevs, p->pPars->nFanoutsMax );
323 p->timeWin += Abc_Clock() - clk;
324  // count the number of patterns
325 // p->dTotalRatios += Abc_NtkConstraintRatio( p, pNode );
326  // construct AIG for the window
327 clk = Abc_Clock();
328  p->pAigWin = Abc_NtkConstructAig( p, pNode );
329 p->timeAig += Abc_Clock() - clk;
330  // translate it into CNF
331 clk = Abc_Clock();
332  p->pCnf = Cnf_DeriveSimple( p->pAigWin, Abc_ObjFaninNum(pNode) );
333 p->timeCnf += Abc_Clock() - clk;
334  // create the SAT problem
335 clk = Abc_Clock();
336  p->pSat = (sat_solver *)Cnf_DataWriteIntoSolver( p->pCnf, 1, 0 );
337  if ( p->pSat && p->pPars->fOneHotness )
339  if ( p->pSat == NULL )
340  return 0;
341  // solve the SAT problem
342  RetValue = Abc_NtkMfsSolveSat( p, pNode );
343  p->nTotConfLevel += p->pSat->stats.conflicts;
344 p->timeSat += Abc_Clock() - clk;
345  if ( RetValue == 0 )
346  {
347  p->nTimeOutsLevel++;
348  p->nTimeOuts++;
349  return 0;
350  }
351  // minimize the local function of the node using bi-decomposition
352  assert( p->nFanins == Abc_ObjFaninNum(pNode) );
353  dProb = p->pPars->fPower? ((float *)p->vProbs->pArray)[pNode->Id] : -1.0;
354  pObj = Abc_NodeIfNodeResyn( p->pManDec, (Hop_Man_t *)pNode->pNtk->pManFunc, (Hop_Obj_t *)pNode->pData, p->nFanins, p->vTruth, p->uCare, dProb );
355  nGain = Hop_DagSize((Hop_Obj_t *)pNode->pData) - Hop_DagSize(pObj);
356  if ( nGain >= 0 )
357  {
358  p->nNodesDec++;
359  p->nNodesGained += nGain;
360  p->nNodesGainedLevel += nGain;
361  pNode->pData = pObj;
362  }
363  return 1;
364 }
Vec_Int_t * vProbs
Definition: mfsInt.h:97
int Hop_DagSize(Hop_Obj_t *pObj)
Definition: hopDfs.c:279
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
Vec_Ptr_t * vSupp
Definition: mfsInt.h:60
Vec_Ptr_t * vRoots
Definition: mfsInt.h:59
Mfs_Par_t * pPars
Definition: mfsInt.h:53
int nNodesGainedLevel
Definition: mfsInt.h:85
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
Definition: abc.h:364
abctime timeCnf
Definition: mfsInt.h:131
Bdc_Man_t * pManDec
Definition: mfsInt.h:82
int nNodesGained
Definition: mfsInt.h:84
static abctime Abc_Clock()
Definition: abc_global.h:279
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
stats_t stats
Definition: satSolver.h:156
Definition: hop.h:65
abctime timeAig
Definition: mfsInt.h:129
Vec_Ptr_t * vNodes
Definition: mfsInt.h:61
Aig_Man_t * pAigWin
Definition: mfsInt.h:87
int Abc_NtkMfsSolveSat(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsSat.c:95
int Abc_NtkAddOneHotness(Mfs_Man_t *p)
Definition: mfsSat.c:155
int nNodesDec
Definition: mfsInt.h:83
Aig_Man_t * Abc_NtkConstructAig(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsStrash.c:233
void * pManFunc
Definition: abc.h:191
int nTimeOutsLevel
Definition: mfsInt.h:115
unsigned uCare[(MFS_FANIN_MAX<=5)?1:1<<(MFS_FANIN_MAX-5)]
Definition: mfsInt.h:102
ABC_DLL Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
Definition: abcDfs.c:859
Vec_Ptr_t * Abc_MfsComputeRoots(Abc_Obj_t *pNode, int nWinTfoMax, int nFanoutLimit)
Definition: mfsWin.c:99
int nFanins
Definition: mfsInt.h:99
int nNodesTried
Definition: mfsInt.h:108
int nTotConfLevel
Definition: mfsInt.h:95
ABC_INT64_T conflicts
Definition: satVec.h:154
Abc_Ntk_t * pNtk
Definition: abc.h:130
abctime timeWin
Definition: mfsInt.h:127
void * Cnf_DataWriteIntoSolver(Cnf_Dat_t *p, int nFrames, int fInit)
Definition: cnfMan.c:463
Cnf_Dat_t * Cnf_DeriveSimple(Aig_Man_t *p, int nOutputs)
Definition: cnfWrite.c:587
int Id
Definition: abc.h:132
Abc_Ntk_t * pNtk
Definition: mfsInt.h:54
abctime timeSat
Definition: mfsInt.h:132
Hop_Obj_t * Abc_NodeIfNodeResyn(Bdc_Man_t *p, Hop_Man_t *pHop, Hop_Obj_t *pRoot, int nVars, Vec_Int_t *vTruth, unsigned *puCare, float dProb)
FUNCTION DEFINITIONS ///.
Definition: abcBidec.c:49
#define assert(ex)
Definition: util_old.h:213
sat_solver * pSat
Definition: mfsInt.h:89
void Mfs_ManClean(Mfs_Man_t *p)
Definition: mfsMan.c:75
Cnf_Dat_t * pCnf
Definition: mfsInt.h:88
void * pData
Definition: abc.h:145
ABC_DLL Vec_Ptr_t * Abc_NtkDfsNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
Definition: abcDfs.c:120
ABC_INT64_T abctime
Definition: abc_global.h:278
Vec_Int_t * vTruth
Definition: mfsInt.h:81
static void ** Vec_PtrArray(Vec_Ptr_t *p)
Definition: vecPtr.h:279
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
Definition: hop.h:49
int nTimeOuts
Definition: mfsInt.h:114
void Abc_NtkMfsParsDefault ( Mfs_Par_t pPars)

FUNCTION DEFINITIONS ///.

MACRO DEFINITIONS ///.

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 47 of file mfsCore.c.

48 {
49  memset( pPars, 0, sizeof(Mfs_Par_t) );
50  pPars->nWinTfoLevs = 2;
51  pPars->nFanoutsMax = 30;
52  pPars->nDepthMax = 20;
53  pPars->nWinMax = 300;
54  pPars->nGrowthLevel = 0;
55  pPars->nBTLimit = 5000;
56  pPars->fRrOnly = 0;
57  pPars->fResub = 1;
58  pPars->fArea = 0;
59  pPars->fMoreEffort = 0;
60  pPars->fSwapEdge = 0;
61  pPars->fOneHotness = 0;
62  pPars->fVerbose = 0;
63  pPars->fVeryVerbose = 0;
64 }
char * memset()
typedefABC_NAMESPACE_HEADER_START struct Mfs_Par_t_ Mfs_Par_t
INCLUDES ///.
Definition: mfs.h:42
void Abc_NtkMfsPowerResub ( Mfs_Man_t p,
Mfs_Par_t pPars 
)

Definition at line 154 of file mfsCore.c.

155 {
156  int i, k;
157  Abc_Obj_t *pFanin, *pNode;
158  Abc_Ntk_t *pNtk = p->pNtk;
159  int nFaninMax = Abc_NtkGetFaninMax(p->pNtk);
160 
161  Abc_NtkForEachNode( pNtk, pNode, k )
162  {
163  if ( p->pPars->nDepthMax && (int)pNode->Level > p->pPars->nDepthMax )
164  continue;
165  if ( Abc_ObjFaninNum(pNode) < 2 || Abc_ObjFaninNum(pNode) > nFaninMax )
166  continue;
167  if (Abc_WinNode(p, pNode) ) // something wrong
168  continue;
169 
170  // solve the SAT problem
171  // Abc_NtkMfsEdgePower( p, pNode );
172  // try replacing area critical fanins
173  Abc_ObjForEachFanin( pNode, pFanin, i )
174  if ( Abc_MfsObjProb(p, pFanin) >= 0.35 && Abc_NtkMfsSolveSatResub( p, pNode, i, 0, 0 ) )
175  continue;
176  }
177 
178  Abc_NtkForEachNode( pNtk, pNode, k )
179  {
180  if ( p->pPars->nDepthMax && (int)pNode->Level > p->pPars->nDepthMax )
181  continue;
182  if ( Abc_ObjFaninNum(pNode) < 2 || Abc_ObjFaninNum(pNode) > nFaninMax )
183  continue;
184  if (Abc_WinNode(p, pNode) ) // something wrong
185  continue;
186 
187  // solve the SAT problem
188  // Abc_NtkMfsEdgePower( p, pNode );
189  // try replacing area critical fanins
190  Abc_ObjForEachFanin( pNode, pFanin, i )
191  if ( Abc_MfsObjProb(p, pFanin) >= 0.35 && Abc_NtkMfsSolveSatResub( p, pNode, i, 0, 0 ) )
192  continue;
193  }
194 
195  Abc_NtkForEachNode( pNtk, pNode, k )
196  {
197  if ( p->pPars->nDepthMax && (int)pNode->Level > p->pPars->nDepthMax )
198  continue;
199  if ( Abc_ObjFaninNum(pNode) < 2 || Abc_ObjFaninNum(pNode) > nFaninMax )
200  continue;
201  if (Abc_WinNode(p, pNode) ) // something wrong
202  continue;
203 
204  Abc_ObjForEachFanin( pNode, pFanin, i )
205  if ( Abc_MfsObjProb(p, pFanin) >= 0.2 && Abc_NtkMfsSolveSatResub( p, pNode, i, 1, 0 ) )
206  continue;
207  }
208 /*
209  Abc_NtkForEachNode( pNtk, pNode, k )
210  {
211  if ( p->pPars->nDepthMax && (int)pNode->Level > p->pPars->nDepthMax )
212  continue;
213  if ( Abc_ObjFaninNum(pNode) < 2 || Abc_ObjFaninNum(pNode) > nFaninMax - 2)
214  continue;
215  if (Abc_WinNode(p, pNode) ) // something wrong
216  continue;
217 
218  Abc_ObjForEachFanin( pNode, pFanin, i )
219  if ( Abc_MfsObjProb(p, pFanin) >= 0.37 && Abc_NtkMfsSolveSatResub2( p, pNode, i, -1 ) )
220  continue;
221  }
222 */
223 }
ABC_NAMESPACE_IMPL_START int Abc_NtkMfsSolveSatResub(Mfs_Man_t *p, Abc_Obj_t *pNode, int iFanin, int fOnlyRemove, int fSkipUpdate)
DECLARATIONS ///.
Definition: mfsResub.c:165
int Abc_WinNode(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsCore.c:87
Mfs_Par_t * pPars
Definition: mfsInt.h:53
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
Definition: abc.h:364
ABC_DLL int Abc_NtkGetFaninMax(Abc_Ntk_t *pNtk)
Definition: abcUtil.c:453
static float Abc_MfsObjProb(Mfs_Man_t *p, Abc_Obj_t *pObj)
Definition: mfsInt.h:137
unsigned Level
Definition: abc.h:142
if(last==0)
Definition: sparse_int.h:34
#define Abc_NtkForEachNode(pNtk, pNode, i)
Definition: abc.h:461
#define Abc_ObjForEachFanin(pObj, pFanin, i)
Definition: abc.h:524
Abc_Ntk_t * pNtk
Definition: mfsInt.h:54
int Abc_NtkMfsResub ( Mfs_Man_t p,
Abc_Obj_t pNode 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 236 of file mfsCore.c.

237 {
238  abctime clk;
239  p->nNodesTried++;
240  // prepare data structure for this node
241  Mfs_ManClean( p );
242  // compute window roots, window support, and window nodes
243 clk = Abc_Clock();
244  p->vRoots = Abc_MfsComputeRoots( pNode, p->pPars->nWinTfoLevs, p->pPars->nFanoutsMax );
247 p->timeWin += Abc_Clock() - clk;
248  if ( p->pPars->nWinMax && Vec_PtrSize(p->vNodes) > p->pPars->nWinMax )
249  {
250  p->nMaxDivs++;
251  return 1;
252  }
253  // compute the divisors of the window
254 clk = Abc_Clock();
255  p->vDivs = Abc_MfsComputeDivisors( p, pNode, Abc_ObjRequiredLevel(pNode) - 1 );
256  p->nTotalDivs += Vec_PtrSize(p->vDivs) - Abc_ObjFaninNum(pNode);
257 p->timeDiv += Abc_Clock() - clk;
258  // construct AIG for the window
259 clk = Abc_Clock();
260  p->pAigWin = Abc_NtkConstructAig( p, pNode );
261 p->timeAig += Abc_Clock() - clk;
262  // translate it into CNF
263 clk = Abc_Clock();
264  p->pCnf = Cnf_DeriveSimple( p->pAigWin, 1 + Vec_PtrSize(p->vDivs) );
265 p->timeCnf += Abc_Clock() - clk;
266  // create the SAT problem
267 clk = Abc_Clock();
268  p->pSat = Abc_MfsCreateSolverResub( p, NULL, 0, 0 );
269  if ( p->pSat == NULL )
270  {
271  p->nNodesBad++;
272  return 1;
273  }
274 //clk = Abc_Clock();
275 // if ( p->pPars->fGiaSat )
276 // Abc_NtkMfsConstructGia( p );
277 //p->timeGia += Abc_Clock() - clk;
278  // solve the SAT problem
279  if ( p->pPars->fPower )
280  Abc_NtkMfsEdgePower( p, pNode );
281  else if ( p->pPars->fSwapEdge )
282  Abc_NtkMfsEdgeSwapEval( p, pNode );
283  else
284  {
285  Abc_NtkMfsResubNode( p, pNode );
286  if ( p->pPars->fMoreEffort )
287  Abc_NtkMfsResubNode2( p, pNode );
288  }
289 p->timeSat += Abc_Clock() - clk;
290 // if ( p->pPars->fGiaSat )
291 // Abc_NtkMfsDeconstructGia( p );
292  return 1;
293 }
Vec_Ptr_t * Abc_MfsComputeDivisors(Mfs_Man_t *p, Abc_Obj_t *pNode, int nLevDivMax)
BASIC TYPES ///.
Definition: mfsDiv.c:193
Vec_Ptr_t * vSupp
Definition: mfsInt.h:60
Vec_Ptr_t * vRoots
Definition: mfsInt.h:59
Mfs_Par_t * pPars
Definition: mfsInt.h:53
int Abc_NtkMfsResubNode(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsResub.c:539
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
Definition: abc.h:364
abctime timeCnf
Definition: mfsInt.h:131
static abctime Abc_Clock()
Definition: abc_global.h:279
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
abctime timeAig
Definition: mfsInt.h:129
Vec_Ptr_t * vNodes
Definition: mfsInt.h:61
Vec_Ptr_t * vDivs
Definition: mfsInt.h:62
Aig_Man_t * pAigWin
Definition: mfsInt.h:87
int Abc_NtkMfsEdgeSwapEval(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsResub.c:488
int nNodesBad
Definition: mfsInt.h:112
Aig_Man_t * Abc_NtkConstructAig(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsStrash.c:233
ABC_DLL int Abc_ObjRequiredLevel(Abc_Obj_t *pObj)
Definition: abcTiming.c:1102
abctime timeDiv
Definition: mfsInt.h:128
ABC_DLL Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
Definition: abcDfs.c:859
Vec_Ptr_t * Abc_MfsComputeRoots(Abc_Obj_t *pNode, int nWinTfoMax, int nFanoutLimit)
Definition: mfsWin.c:99
int nNodesTried
Definition: mfsInt.h:108
abctime timeWin
Definition: mfsInt.h:127
int Abc_NtkMfsResubNode2(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsResub.c:585
Cnf_Dat_t * Cnf_DeriveSimple(Aig_Man_t *p, int nOutputs)
Definition: cnfWrite.c:587
int nTotalDivs
Definition: mfsInt.h:113
Abc_Ntk_t * pNtk
Definition: mfsInt.h:54
sat_solver * Abc_MfsCreateSolverResub(Mfs_Man_t *p, int *pCands, int nCands, int fInvert)
Definition: mfsInter.c:88
abctime timeSat
Definition: mfsInt.h:132
int Abc_NtkMfsEdgePower(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsResub.c:508
sat_solver * pSat
Definition: mfsInt.h:89
void Mfs_ManClean(Mfs_Man_t *p)
Definition: mfsMan.c:75
Cnf_Dat_t * pCnf
Definition: mfsInt.h:88
ABC_DLL Vec_Ptr_t * Abc_NtkDfsNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
Definition: abcDfs.c:120
ABC_INT64_T abctime
Definition: abc_global.h:278
static void ** Vec_PtrArray(Vec_Ptr_t *p)
Definition: vecPtr.h:279
int nMaxDivs
Definition: mfsInt.h:117
ABC_NAMESPACE_IMPL_START int Abc_NtkMfsSolveSatResub ( Mfs_Man_t p,
Abc_Obj_t pNode,
int  iFanin,
int  fOnlyRemove,
int  fSkipUpdate 
)

DECLARATIONS ///.

CFile****************************************************************

FileName [mfsCore.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [The good old minimization with complete don't-cares.]

Synopsis [Core procedures of this package.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id:
mfsCore.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]

Function*************************************************************

Synopsis [Performs resubstitution for the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 165 of file mfsResub.c.

166 {
167  int fVeryVerbose = 0;//p->pPars->fVeryVerbose && Vec_PtrSize(p->vDivs) < 200;// || pNode->Id == 556;
168  unsigned * pData;
169  int pCands[MFS_FANIN_MAX];
170  int RetValue, iVar, i, nCands, nWords, w;
171  abctime clk;
172  Abc_Obj_t * pFanin;
173  Hop_Obj_t * pFunc;
174  assert( iFanin >= 0 );
175  p->nTryRemoves++;
176 
177  // clean simulation info
178  Vec_PtrFillSimInfo( p->vDivCexes, 0, p->nDivWords );
179  p->nCexes = 0;
180  if ( p->pPars->fVeryVerbose )
181  {
182 // printf( "\n" );
183  printf( "%5d : Lev =%3d. Leaf =%3d. Node =%3d. Divs =%3d. Fanin = %4d (%d/%d), MFFC = %d\n",
184  pNode->Id, pNode->Level, Vec_PtrSize(p->vSupp), Vec_PtrSize(p->vNodes), Vec_PtrSize(p->vDivs)-Abc_ObjFaninNum(pNode),
185  Abc_ObjFaninId(pNode, iFanin), iFanin, Abc_ObjFaninNum(pNode),
186  Abc_ObjFanoutNum(Abc_ObjFanin(pNode, iFanin)) == 1 ? Abc_NodeMffcLabel(Abc_ObjFanin(pNode, iFanin)) : 0 );
187  }
188 
189  // try fanins without the critical fanin
190  nCands = 0;
191  Vec_PtrClear( p->vMfsFanins );
192  Abc_ObjForEachFanin( pNode, pFanin, i )
193  {
194  if ( i == iFanin )
195  continue;
196  Vec_PtrPush( p->vMfsFanins, pFanin );
197  iVar = Vec_PtrSize(p->vDivs) - Abc_ObjFaninNum(pNode) + i;
198  pCands[nCands++] = toLitCond( Vec_IntEntry( p->vProjVarsSat, iVar ), 1 );
199  }
200  RetValue = Abc_NtkMfsTryResubOnce( p, pCands, nCands );
201  if ( RetValue == -1 )
202  return 0;
203  if ( RetValue == 1 )
204  {
205  if ( p->pPars->fVeryVerbose )
206  printf( "Node %d: Fanin %d can be removed.\n", pNode->Id, iFanin );
207  p->nNodesResub++;
208  p->nNodesGainedLevel++;
209  if ( fSkipUpdate )
210  return 1;
211 clk = Abc_Clock();
212  // derive the function
213  pFunc = Abc_NtkMfsInterplate( p, pCands, nCands );
214  if ( pFunc == NULL )
215  return 0;
216  // update the network
217  Abc_NtkMfsUpdateNetwork( p, pNode, p->vMfsFanins, pFunc );
218 p->timeInt += Abc_Clock() - clk;
219  p->nRemoves++;
220  return 1;
221  }
222 
223  if ( fOnlyRemove || p->pPars->fRrOnly )
224  return 0;
225 
226  p->nTryResubs++;
227  if ( fVeryVerbose )
228  {
229  for ( i = 0; i < 9; i++ )
230  printf( " " );
231  for ( i = 0; i < Vec_PtrSize(p->vDivs)-Abc_ObjFaninNum(pNode); i++ )
232  printf( "%d", i % 10 );
233  for ( i = 0; i < Abc_ObjFaninNum(pNode); i++ )
234  if ( i == iFanin )
235  printf( "*" );
236  else
237  printf( "%c", 'a' + i );
238  printf( "\n" );
239  }
240  iVar = -1;
241  while ( 1 )
242  {
243  if ( fVeryVerbose )
244  {
245  printf( "%3d: %3d ", p->nCexes, iVar );
246  for ( i = 0; i < Vec_PtrSize(p->vDivs); i++ )
247  {
248  pData = (unsigned *)Vec_PtrEntry( p->vDivCexes, i );
249  printf( "%d", Abc_InfoHasBit(pData, p->nCexes-1) );
250  }
251  printf( "\n" );
252  }
253 
254  // find the next divisor to try
255  nWords = Abc_BitWordNum(p->nCexes);
256  assert( nWords <= p->nDivWords );
257  for ( iVar = 0; iVar < Vec_PtrSize(p->vDivs)-Abc_ObjFaninNum(pNode); iVar++ )
258  {
259  if ( p->pPars->fPower )
260  {
261  Abc_Obj_t * pDiv = (Abc_Obj_t *)Vec_PtrEntry(p->vDivs, iVar);
262  // only accept the divisor if it is "cool"
263  if ( Abc_MfsObjProb(p, pDiv) >= 0.15 )
264  continue;
265  }
266  pData = (unsigned *)Vec_PtrEntry( p->vDivCexes, iVar );
267  for ( w = 0; w < nWords; w++ )
268  if ( pData[w] != ~0 )
269  break;
270  if ( w == nWords )
271  break;
272  }
273  if ( iVar == Vec_PtrSize(p->vDivs)-Abc_ObjFaninNum(pNode) )
274  return 0;
275 
276  pCands[nCands] = toLitCond( Vec_IntEntry(p->vProjVarsSat, iVar), 1 );
277  RetValue = Abc_NtkMfsTryResubOnce( p, pCands, nCands+1 );
278  if ( RetValue == -1 )
279  return 0;
280  if ( RetValue == 1 )
281  {
282  if ( p->pPars->fVeryVerbose )
283  printf( "Node %d: Fanin %d can be replaced by divisor %d.\n", pNode->Id, iFanin, iVar );
284  p->nNodesResub++;
285  p->nNodesGainedLevel++;
286  if ( fSkipUpdate )
287  return 1;
288 clk = Abc_Clock();
289  // derive the function
290  pFunc = Abc_NtkMfsInterplate( p, pCands, nCands+1 );
291  if ( pFunc == NULL )
292  return 0;
293  // update the network
294  Vec_PtrPush( p->vMfsFanins, Vec_PtrEntry(p->vDivs, iVar) );
295  Abc_NtkMfsUpdateNetwork( p, pNode, p->vMfsFanins, pFunc );
296 p->timeInt += Abc_Clock() - clk;
297  p->nResubs++;
298  return 1;
299  }
300  if ( p->nCexes >= p->pPars->nWinMax )
301  break;
302  }
303  if ( p->pPars->fVeryVerbose )
304  printf( "Node %d: Cannot find replacement for fanin %d.\n", pNode->Id, iFanin );
305  return 0;
306 }
int nResubs
Definition: mfsInt.h:107
Vec_Int_t * vProjVarsSat
Definition: mfsInt.h:65
static int Abc_InfoHasBit(unsigned *p, int i)
Definition: abc_global.h:258
Vec_Ptr_t * vSupp
Definition: mfsInt.h:60
int nRemoves
Definition: mfsInt.h:106
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
Definition: abc.h:365
Mfs_Par_t * pPars
Definition: mfsInt.h:53
int nNodesGainedLevel
Definition: mfsInt.h:85
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
Definition: abc.h:364
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static void Vec_PtrFillSimInfo(Vec_Ptr_t *vInfo, int iWord, int nWords)
Definition: vecPtr.h:986
static abctime Abc_Clock()
Definition: abc_global.h:279
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
int nWords
Definition: abcNpn.c:127
Definition: hop.h:65
Vec_Ptr_t * vNodes
Definition: mfsInt.h:61
Vec_Ptr_t * vDivs
Definition: mfsInt.h:62
static float Abc_MfsObjProb(Mfs_Man_t *p, Abc_Obj_t *pObj)
Definition: mfsInt.h:137
unsigned Level
Definition: abc.h:142
static lit toLitCond(int v, int c)
Definition: satVec.h:143
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
Hop_Obj_t * Abc_NtkMfsInterplate(Mfs_Man_t *p, int *pCands, int nCands)
Definition: mfsInter.c:329
ABC_DLL int Abc_NodeMffcLabel(Abc_Obj_t *pNode)
Definition: abcRefs.c:437
int nDivWords
Definition: mfsInt.h:68
Vec_Ptr_t * vDivCexes
Definition: mfsInt.h:67
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
int nCexes
Definition: mfsInt.h:69
int nTryRemoves
Definition: mfsInt.h:104
#define Abc_ObjForEachFanin(pObj, pFanin, i)
Definition: abc.h:524
int Id
Definition: abc.h:132
Vec_Ptr_t * vMfsFanins
Definition: mfsInt.h:93
int nNodesResub
Definition: mfsInt.h:109
static int Abc_BitWordNum(int nBits)
Definition: abc_global.h:255
#define assert(ex)
Definition: util_old.h:213
static void Vec_PtrClear(Vec_Ptr_t *p)
Definition: vecPtr.h:545
int Abc_NtkMfsTryResubOnce(Mfs_Man_t *p, int *pCands, int nCands)
Definition: mfsResub.c:101
abctime timeInt
Definition: mfsInt.h:133
static int Abc_ObjFaninId(Abc_Obj_t *pObj, int i)
Definition: abc.h:366
static Abc_Obj_t * Abc_ObjFanin(Abc_Obj_t *pObj, int i)
Definition: abc.h:372
ABC_INT64_T abctime
Definition: abc_global.h:278
ABC_NAMESPACE_IMPL_START void Abc_NtkMfsUpdateNetwork(Mfs_Man_t *p, Abc_Obj_t *pObj, Vec_Ptr_t *vMfsFanins, Hop_Obj_t *pFunc)
DECLARATIONS ///.
Definition: mfsResub.c:45
int nTryResubs
Definition: mfsInt.h:105
#define MFS_FANIN_MAX
INCLUDES ///.
Definition: mfsInt.h:47
int Abc_WinNode ( Mfs_Man_t p,
Abc_Obj_t pNode 
)

Definition at line 87 of file mfsCore.c.

88 {
89 // abctime clk;
90 // Abc_Obj_t * pFanin;
91 // int i;
92 
93  p->nNodesTried++;
94  // prepare data structure for this node
95  Mfs_ManClean( p );
96  // compute window roots, window support, and window nodes
97  p->vRoots = Abc_MfsComputeRoots( pNode, p->pPars->nWinTfoLevs, p->pPars->nFanoutsMax );
100  if ( p->pPars->nWinMax && Vec_PtrSize(p->vNodes) > p->pPars->nWinMax )
101  return 1;
102  // compute the divisors of the window
103  p->vDivs = Abc_MfsComputeDivisors( p, pNode, Abc_ObjRequiredLevel(pNode) - 1 );
104  p->nTotalDivs += Vec_PtrSize(p->vDivs) - Abc_ObjFaninNum(pNode);
105  // construct AIG for the window
106  p->pAigWin = Abc_NtkConstructAig( p, pNode );
107  // translate it into CNF
108  p->pCnf = Cnf_DeriveSimple( p->pAigWin, 1 + Vec_PtrSize(p->vDivs) );
109  // create the SAT problem
110  p->pSat = Abc_MfsCreateSolverResub( p, NULL, 0, 0 );
111  if ( p->pSat == NULL )
112  {
113  p->nNodesBad++;
114  return 1;
115  }
116  return 0;
117 }
Vec_Ptr_t * Abc_MfsComputeDivisors(Mfs_Man_t *p, Abc_Obj_t *pNode, int nLevDivMax)
BASIC TYPES ///.
Definition: mfsDiv.c:193
Vec_Ptr_t * vSupp
Definition: mfsInt.h:60
Vec_Ptr_t * vRoots
Definition: mfsInt.h:59
Mfs_Par_t * pPars
Definition: mfsInt.h:53
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
Definition: abc.h:364
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
Vec_Ptr_t * vNodes
Definition: mfsInt.h:61
Vec_Ptr_t * vDivs
Definition: mfsInt.h:62
Aig_Man_t * pAigWin
Definition: mfsInt.h:87
int nNodesBad
Definition: mfsInt.h:112
Aig_Man_t * Abc_NtkConstructAig(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition: mfsStrash.c:233
ABC_DLL int Abc_ObjRequiredLevel(Abc_Obj_t *pObj)
Definition: abcTiming.c:1102
ABC_DLL Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
Definition: abcDfs.c:859
Vec_Ptr_t * Abc_MfsComputeRoots(Abc_Obj_t *pNode, int nWinTfoMax, int nFanoutLimit)
Definition: mfsWin.c:99
int nNodesTried
Definition: mfsInt.h:108
Cnf_Dat_t * Cnf_DeriveSimple(Aig_Man_t *p, int nOutputs)
Definition: cnfWrite.c:587
int nTotalDivs
Definition: mfsInt.h:113
Abc_Ntk_t * pNtk
Definition: mfsInt.h:54
sat_solver * Abc_MfsCreateSolverResub(Mfs_Man_t *p, int *pCands, int nCands, int fInvert)
Definition: mfsInter.c:88
sat_solver * pSat
Definition: mfsInt.h:89
void Mfs_ManClean(Mfs_Man_t *p)
Definition: mfsMan.c:75
Cnf_Dat_t * pCnf
Definition: mfsInt.h:88
ABC_DLL Vec_Ptr_t * Abc_NtkDfsNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
Definition: abcDfs.c:120
static void ** Vec_PtrArray(Vec_Ptr_t *p)
Definition: vecPtr.h:279