21 #ifndef ABC__map__scl__sclSize_h
22 #define ABC__map__scl__sclSize_h
202 p->pNtk->pSCLib = NULL;
379 float Diff, Multi = 1.5, Eval = 0;
385 Eval += 0.5 * (Diff > 0 ? Diff : Multi * Diff);
393 float Rise, Fall, Multi = 1.0, Eval = 0;
401 Eval += 0.5 * Rise + 0.5 * Fall;
444 return (
float)(Total / Count);
512 static char FileNameOld[1000] = {0};
513 static int nNodesOld, nAreaOld, nDelayOld;
516 pTable = fopen( pFileName,
"a+" );
517 if (
strcmp( FileNameOld, p->pNtk->pName ) )
519 sprintf( FileNameOld,
"%s", p->pNtk->pName );
520 fprintf( pTable,
"\n" );
525 fprintf( pTable,
"%d ", (nAreaOld = (
int)p->SumArea) );
526 fprintf( pTable,
"%d ", (nDelayOld = (
int)p->ReportDelay) );
531 fprintf( pTable,
" " );
532 fprintf( pTable,
"%.1f ", 100.0 *
Abc_NtkNodeNum(p->pNtk) / nNodesOld );
533 fprintf( pTable,
"%.1f ", 100.0 * (
int)p->SumArea / nAreaOld );
534 fprintf( pTable,
"%.1f ", 100.0 * (
int)p->ReportDelay / nDelayOld );
535 fprintf( pTable,
"%.2f", 1.0*(
Abc_Clock() - clk)/CLOCKS_PER_SEC );
int Abc_SclCountNearCriticalNodes(SC_Man *p)
#define Abc_NtkForEachNode1(pNtk, pNode, i)
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
static float Abc_SclGetMaxDelay(SC_Man *p)
static float Abc_SclReadMaxDelay(SC_Man *p)
static SC_Pair * Abc_SclObjDept(SC_Man *p, Abc_Obj_t *pObj)
static SC_Lib * Abc_SclObjLib(Abc_Obj_t *p)
GLOBAL VARIABLES ///.
void Abc_SclMinsizePerform(SC_Lib *pLib, Abc_Ntk_t *p, int fUseMax, int fVerbose)
int Abc_SclTimeIncUpdate(SC_Man *p)
static float Abc_SclObjGetSlack(SC_Man *p, Abc_Obj_t *pObj, float D)
void Abc_SclDnsizePerform(SC_Lib *pLib, Abc_Ntk_t *pNtk, SC_SizePars *pPars)
static void Abc_SclLoadStore3(SC_Man *p, Abc_Obj_t *pObj)
Abc_Obj_t * Abc_SclFindCriticalCo(SC_Man *p, int *pfRise)
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
void Abc_SclAddWireLoad(SC_Man *p, Abc_Obj_t *pObj, int fSubtr)
static SC_Man * Abc_SclManAlloc(SC_Lib *pLib, Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
void Abc_SclTimePerform(SC_Lib *pLib, Abc_Ntk_t *pNtk, int nTreeCRatio, int fUseWireLoads, int fShowAll, int fPrintPath, int fDumpStats)
Abc_Ntk_t * Abc_SclBufferPhase(Abc_Ntk_t *pNtk, int fVerbose)
static void Abc_SclConeStore(SC_Man *p, Vec_Int_t *vCone)
static SC_Pair * Abc_SclObjLoad(SC_Man *p, Abc_Obj_t *pObj)
static void Vec_FltWriteEntry(Vec_Flt_t *p, int i, float Entry)
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
void Abc_NodeInvUpdateFanPolarity(Abc_Obj_t *pObj)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static void Vec_QueCheck(Vec_Que_t *p)
void Abc_SclUpsizePerform(SC_Lib *pLib, Abc_Ntk_t *pNtk, SC_SizePars *pPars)
static void Abc_SclConeRestore(SC_Man *p, Vec_Int_t *vCone)
static Vec_Wec_t * Vec_WecStart(int nSize)
static void Abc_SclObjSetCell(Abc_Obj_t *p, SC_Cell *pCell)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
static int Abc_NtkHasMapping(Abc_Ntk_t *pNtk)
static void Abc_SclObjSetInDrive(SC_Man *p, Abc_Obj_t *pObj, float c)
int Abc_SclIsInv(Abc_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Que_t_ Vec_Que_t
INCLUDES ///.
static Vec_Flt_t * Vec_FltAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Vec_QueTop(Vec_Que_t *p)
static double Abc_SclObjTimeOne(SC_Man *p, Abc_Obj_t *pObj, int fRise)
#define Abc_NtkForEachCo(pNtk, pCo, i)
void Abc_SclPrintGateSizes(SC_Lib *pLib, Abc_Ntk_t *p)
float Abc_SclFindWireLoad(Vec_Flt_t *vWireCaps, int nFans)
typedefABC_NAMESPACE_HEADER_START struct SC_Man_ SC_Man
INCLUDES ///.
SC_Man * Abc_SclManStart(SC_Lib *pLib, Abc_Ntk_t *pNtk, int fUseWireLoads, int fDept, float DUser, int nTreeCRatio)
static abctime Abc_Clock()
static Vec_Int_t * Vec_IntStartFull(int nSize)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static void Vec_FltFreeP(Vec_Flt_t **p)
static float Abc_MaxFloat(float a, float b)
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
int Abc_SclCheckNtk(Abc_Ntk_t *p, int fVerbose)
static void Vec_FltPush(Vec_Flt_t *p, float Entry)
static int Abc_SclGetBufInvCount(Abc_Ntk_t *pNtk)
void Abc_SclTimeCone(SC_Man *p, Vec_Int_t *vCone)
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
static float Abc_SclObjInDrive(SC_Man *p, Abc_Obj_t *pObj)
static void Abc_SclLoadStore(SC_Man *p, Abc_Obj_t *pObj)
static Abc_Obj_t * Abc_NtkCo(Abc_Ntk_t *pNtk, int i)
static int Abc_SclObjCellId(Abc_Obj_t *p)
static Vec_Flt_t * Vec_FltStart(int nSize)
static void Vec_FltClear(Vec_Flt_t *p)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static void Abc_SclLoadRestore(SC_Man *p, Abc_Obj_t *pObj)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
static void Vec_QueFreeP(Vec_Que_t **p)
static float Abc_SclGetTotalArea(Abc_Ntk_t *pNtk)
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
static void Abc_SclManFree(SC_Man *p)
static Vec_Int_t * Vec_IntStart(int nSize)
static SC_Pair * Abc_SclObjTime(SC_Man *p, Abc_Obj_t *pObj)
void Abc_SclMioGates2SclGates(SC_Lib *pLib, Abc_Ntk_t *p)
DECLARATIONS ///.
static void Abc_SclConeClean(SC_Man *p, Vec_Int_t *vCone)
void Abc_SclUpdateLoadSplit(SC_Man *p, Abc_Obj_t *pBuffer, Abc_Obj_t *pFanout)
static void Abc_SclDumpStats(SC_Man *p, char *pFileName, abctime Time)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Abc_NtkForEachObjVec(vIds, pNtk, pObj, i)
void Abc_SclTimeNtkPrint(SC_Man *p, int fShowAll, int fPrintPath)
static double Abc_SclObjSlewMax(SC_Man *p, Abc_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
void Abc_SclTimeNtkRecompute(SC_Man *p, float *pArea, float *pDelay, int fReverse, float DUser)
Abc_Ntk_t * Abc_SclUnBufferPhase(Abc_Ntk_t *pNtk, int fVerbose)
void Abc_SclTimeIncInsert(SC_Man *p, Abc_Obj_t *pObj)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Vec_Int_t * Abc_SclExtractBarBufs(Abc_Ntk_t *pNtk)
static float Abc_SclObjGetSlackR(SC_Man *p, Abc_Obj_t *pObj, float D)
Abc_Ntk_t * Abc_SclBufferingPerform(Abc_Ntk_t *pNtk, SC_Lib *pLib, SC_BusPars *pPars)
static void Vec_IntFreeP(Vec_Int_t **p)
static SC_Cell * SC_LibCell(SC_Lib *p, int i)
void Abc_SclSclGates2MioGates(SC_Lib *pLib, Abc_Ntk_t *p)
Abc_Obj_t * Abc_SclFindMostCriticalFanin(SC_Man *p, int *pfRise, Abc_Obj_t *pNode)
Vec_Flt_t * Abc_SclFindWireCaps(SC_WireLoad *pWL, int nFanoutMax)
DECLARATIONS ///.
static void Abc_SclEvalStore(SC_Man *p, Vec_Int_t *vCone)
#define ABC_NAMESPACE_HEADER_END
void Abc_SclTimeIncUpdateLevel(Abc_Obj_t *pObj)
#define Abc_NtkForEachNode(pNtk, pNode, i)
static double Abc_SclObjSlackMax(SC_Man *p, Abc_Obj_t *pObj, float D)
Abc_Ntk_t * Abc_SclUnBufferPerform(Abc_Ntk_t *pNtk, int fVerbose)
static SC_Pair * Abc_SclObjSlew(SC_Man *p, Abc_Obj_t *pObj)
void Abc_SclPrintBuffers(SC_Lib *pLib, Abc_Ntk_t *pNtk, int fVerbose)
static float Abc_SclObjLoadAve(SC_Man *p, Abc_Obj_t *pObj)
static int Vec_IntSize(Vec_Int_t *p)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
static void Abc_SclLoadRestore3(SC_Man *p, Abc_Obj_t *pObj)
static float ** Vec_FltArrayP(Vec_Flt_t *p)
static float Abc_SclEvalPerform(SC_Man *p, Vec_Int_t *vCone)
static float Abc_SclObjGetSlackF(SC_Man *p, Abc_Obj_t *pObj, float D)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
static float Abc_SclGetMaxDelayNodeFanins(SC_Man *p, Abc_Obj_t *pNode)
#define ABC_CALLOC(type, num)
static void Abc_SclObjDupFanin(SC_Man *p, Abc_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Flt_t_ Vec_Flt_t
INCLUDES ///.
Abc_Ntk_t * Abc_SclPerformBuffering(Abc_Ntk_t *p, int DegreeR, int Degree, int fUseInvs, int fVerbose)
static void Vec_WecFreeP(Vec_Wec_t **p)
void Abc_SclReportDupFanins(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
static float Vec_FltEntry(Vec_Flt_t *p, int i)
static float Abc_SclObjTimeMax(SC_Man *p, Abc_Obj_t *pObj)
static float Abc_SclGetAverageSize(Abc_Ntk_t *pNtk)
void Abc_SclUpdateLoad(SC_Man *p, Abc_Obj_t *pObj, SC_Cell *pOld, SC_Cell *pNew)
static SC_Cell * Abc_SclObjResiable(SC_Man *p, Abc_Obj_t *pObj, int fUpsize)
static int Vec_FltSize(Vec_Flt_t *p)
ABC_DLL int Abc_NtkLevel(Abc_Ntk_t *pNtk)
static Vec_Que_t * Vec_QueAlloc(int nCap)
MACRO DEFINITIONS ///.
static float Abc_SclEvalPerformLegal(SC_Man *p, Vec_Int_t *vCone, float D)
void Abc_SclInsertBarBufs(Abc_Ntk_t *pNtk, Vec_Int_t *vBufs)
static void Vec_QuePush(Vec_Que_t *p, int v)
static void Abc_SclManCleanTime(SC_Man *p)
void Abc_NodeInvUpdateObjFanoutPolarity(Abc_Obj_t *pObj, Abc_Obj_t *pFanout)
Abc_Ntk_t * Abc_SclBufPerform(Abc_Ntk_t *pNtk, int FanMin, int FanMax, int fBufPis, int fSkipDup, int fVerbose)
static void Vec_QueSetPriority(Vec_Que_t *p, float **pCosts)
int Abc_SclCountMinSize(SC_Lib *pLib, Abc_Ntk_t *p, int fUseMax)
void Abc_SclComputeLoad(SC_Man *p)
static double Abc_SclObjLoadMax(SC_Man *p, Abc_Obj_t *pObj)
static SC_Cell * Abc_SclObjCell(Abc_Obj_t *p)