#include "darInt.h"
Go to the source code of this file.
Functions | |
Dar_Man_t * | Dar_ManStart (Aig_Man_t *pAig, Dar_RwrPar_t *pPars) |
void | Dar_ManStop (Dar_Man_t *p) |
void | Dar_ManPrintStats (Dar_Man_t *p) |
void Dar_ManPrintStats | ( | Dar_Man_t * | p | ) |
Function*************************************************************
Synopsis [Stops the AIG manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 90 of file darMan.c.
00091 { 00092 unsigned pCanons[222]; 00093 int Gain, i; 00094 extern void Kit_DsdPrintFromTruth( unsigned * pTruth, int nVars ); 00095 00096 Gain = p->nNodesInit - Aig_ManNodeNum(p->pAig); 00097 printf( "Tried = %8d. Beg = %8d. End = %8d. Gain = %6d. (%6.2f %%). Cut mem = %d Mb\n", 00098 p->nNodesTried, p->nNodesInit, Aig_ManNodeNum(p->pAig), Gain, 100.0*Gain/p->nNodesInit, p->nCutMemUsed ); 00099 printf( "Cuts = %8d. Tried = %8d. Used = %8d. Bad = %5d. Skipped = %5d. Ave = %.2f.\n", 00100 p->nCutsAll, p->nCutsTried, p->nCutsUsed, p->nCutsBad, p->nCutsSkipped, 00101 (float)p->nCutsUsed/Aig_ManNodeNum(p->pAig) ); 00102 00103 printf( "Bufs = %5d. BufMax = %5d. BufReplace = %6d. BufFix = %6d. Levels = %4d.\n", 00104 Aig_ManBufNum(p->pAig), p->pAig->nBufMax, p->pAig->nBufReplaces, p->pAig->nBufFixes, Aig_ManLevels(p->pAig) ); 00105 PRT( "Cuts ", p->timeCuts ); 00106 PRT( "Eval ", p->timeEval ); 00107 PRT( "Other ", p->timeOther ); 00108 PRT( "TOTAL ", p->timeTotal ); 00109 00110 if ( !p->pPars->fVeryVerbose ) 00111 return; 00112 Dar_LibReturnCanonicals( pCanons ); 00113 for ( i = 0; i < 222; i++ ) 00114 { 00115 if ( p->ClassGains[i] == 0 && p->ClassTimes[i] == 0 ) 00116 continue; 00117 printf( "%3d : ", i ); 00118 printf( "G = %6d (%5.2f %%) ", p->ClassGains[i], Gain? 100.0*p->ClassGains[i]/Gain : 0.0 ); 00119 printf( "S = %8d (%5.2f %%) ", p->ClassSubgs[i], p->nTotalSubgs? 100.0*p->ClassSubgs[i]/p->nTotalSubgs : 0.0 ); 00120 printf( "R = %7d ", p->ClassGains[i]? p->ClassSubgs[i]/p->ClassGains[i] : 9999999 ); 00121 // Kit_DsdPrintFromTruth( pCanons + i, 4 ); 00122 // PRTP( "T", p->ClassTimes[i], p->timeEval ); 00123 printf( "\n" ); 00124 } 00125 }
Dar_Man_t* Dar_ManStart | ( | Aig_Man_t * | pAig, | |
Dar_RwrPar_t * | pPars | |||
) |
CFile****************************************************************
FileName [darMan.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [DAG-aware AIG rewriting.]
Synopsis [AIG manager.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - April 28, 2007.]
Revision [
] DECLARATIONS /// FUNCTION DEFINITIONS ///Function*************************************************************
Synopsis [Starts the rewriting manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 42 of file darMan.c.
00043 { 00044 Dar_Man_t * p; 00045 // start the manager 00046 p = ALLOC( Dar_Man_t, 1 ); 00047 memset( p, 0, sizeof(Dar_Man_t) ); 00048 p->pPars = pPars; 00049 p->pAig = pAig; 00050 // prepare the internal memory manager 00051 p->pMemCuts = Aig_MmFixedStart( p->pPars->nCutsMax * sizeof(Dar_Cut_t), 1024 ); 00052 // other data 00053 p->vLeavesBest = Vec_PtrAlloc( 4 ); 00054 return p; 00055 }
void Dar_ManStop | ( | Dar_Man_t * | p | ) |
Function*************************************************************
Synopsis [Stops the rewriting manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 68 of file darMan.c.
00069 { 00070 if ( p->pPars->fVerbose ) 00071 Dar_ManPrintStats( p ); 00072 if ( p->pMemCuts ) 00073 Aig_MmFixedStop( p->pMemCuts, 0 ); 00074 if ( p->vLeavesBest ) 00075 Vec_PtrFree( p->vLeavesBest ); 00076 free( p ); 00077 }