61 if ( fMaxArr < pArr->rise ) fMaxArr = pArr->
rise, *pfRise = 1, pPivot = pObj;
62 if ( fMaxArr < pArr->fall ) fMaxArr = pArr->
fall, *pfRise = 0, pPivot = pObj;
78 if ( fMaxArr < pArr->rise ) fMaxArr = pArr->
rise, *pfRise = 1, pPivot = pFanin;
79 if ( fMaxArr < pArr->fall ) fMaxArr = pArr->
fall, *pfRise = 0, pPivot = pFanin;
102 *pfRise = (pArr->
rise >= pArr->
fall);
123 printf(
"%-*s ", Length, pCell ? pCell->
pName :
"pi" );
124 printf(
"A =%7.2f ", pCell ? pCell->
area : 0.0 );
125 printf(
"D%s =", fRise ?
"r" :
"f" );
138 int fReversePath = 1;
139 int i, nLength = 0, fRise = 0;
142 p->ReportDelay = maxDelay;
145 printf(
"WireLoad = \"%s\" ", p->pWLoadUsed ? p->pWLoadUsed->pName :
"none" );
146 SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 14 );
148 SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 7 );
150 SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 10 );
151 printf(
"Cap =%5.1f ff ", p->EstLoadAve );
152 SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 7 );
154 SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 11 );
156 SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 7 );
158 SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 13 );
159 printf(
"Delay =%9.2f ps ", maxDelay );
160 SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 7 );
164 Abc_Print( 1,
"WireLoad = \"%s\" ", p->pWLoadUsed ? p->pWLoadUsed->pName :
"none" );
167 Abc_Print( 1,
"%sCap =%5.1f ff%s ",
"\033[1;32m", p->EstLoadAve,
"\033[0m" );
171 Abc_Print( 1,
"%sDelay =%9.2f ps%s ",
"\033[1;35m", maxDelay,
"\033[0m" );
191 int iStart = -1, iEnd = -1;
211 printf(
"Path%3d --", i-- );
240 if ( pTemp == pPrev )
243 if ( pTemp == pPivot )
245 printf(
"Start-point = pi%0*d. End-point = po%0*d.\n",
300 if ( p->pPiDrive != NULL )
314 float LoadRise = pLoad->
rise;
315 float LoadFall = pLoad->
fall;
338 if ( p->EstLoadMax && Value > 1 )
340 pLoad->
rise = p->EstLoadAve * p->EstLoadMax;
341 pLoad->
fall = p->EstLoadAve * p->EstLoadMax;
345 float EstDelta = p->EstLinear * log( Value );
346 DeptRise = pDepOut->
rise;
347 DeptFall = pDepOut->
fall;
348 pDepOut->
rise += EstDelta;
349 pDepOut->
fall += EstDelta;
364 if ( p->EstLoadMax && Value > 1 )
366 pLoad->
rise = LoadRise;
367 pLoad->
fall = LoadFall;
371 pDepOut->
rise = DeptRise;
372 pDepOut->
fall = DeptFall;
377 float EstDelta = p->EstLinear * log( Value );
378 pArrOut->
rise += EstDelta;
379 pArrOut->
fall += EstDelta;
415 if ( fReverse && DUser > 0 && D < DUser )
486 float E = (float)0.1;
516 float E = (float)0.1;
538 printf(
"Level of node %d is out of date!\n", i );
558 RetValue = p->nIncUpdates;
570 if ( LevelNew == (
int)pObj->
Level )
572 pObj->
Level = LevelNew;
604 pLoad->
rise = pLoad->
fall = MaxLoad;
616 assert( p->pPiDrive != NULL );
617 assert( p->pPiDrive->n_inputs == 1 );
638 p->EstLoadMax = 0.01 * nTreeCRatio;
655 p->SumArea = p->SumArea0;
656 p->MaxDelay = p->MaxDelay0;
824 for ( i = 0; i < nOffset; i++ )
826 printf(
"%6d: %-16s (%2d:%3d:%3d) ",
878 int fUseWireLoads = 0;
static int Abc_ObjIsBuffer(Abc_Obj_t *pObj)
int Abc_SclCountNearCriticalNodes(SC_Man *p)
#define Abc_NtkForEachNode1(pNtk, pNode, i)
ABC_DLL float Abc_FrameReadMaxLoad()
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
void Abc_SclPrintBuffers(SC_Lib *pLib, Abc_Ntk_t *pNtk, int fVerbose)
static float Abc_SclReadMaxDelay(SC_Man *p)
static SC_Pair * Abc_SclObjDept(SC_Man *p, Abc_Obj_t *pObj)
void Abc_SclTimeNtkRecompute(SC_Man *p, float *pArea, float *pDelay, int fReverse, float DUser)
static SC_Timing * Scl_CellPinTime(SC_Cell *pCell, int iPin)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static void Abc_SclTimeIncAddFanins(SC_Man *p, Abc_Obj_t *pObj)
static float Abc_SclObjGetSlack(SC_Man *p, Abc_Obj_t *pObj, float D)
ABC_DLL char * Abc_FrameReadDrivingCell()
void Abc_SclTimeNode(SC_Man *p, Abc_Obj_t *pObj, int fDept)
static SC_Man * Abc_SclManAlloc(SC_Lib *pLib, Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
void Abc_SclPrintFaninPairs(SC_Man *p, Abc_Ntk_t *pNtk)
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
static SC_Pair * Abc_SclObjLoad(SC_Man *p, Abc_Obj_t *pObj)
void Abc_SclTimeIncInsert(SC_Man *p, Abc_Obj_t *pObj)
static void Vec_FltWriteEntry(Vec_Flt_t *p, int i, float Entry)
static void Abc_SclTimeCi(SC_Man *p, Abc_Obj_t *pObj)
static float Abc_AbsFloat(float a)
void Abc_SclManReadSlewAndLoad(SC_Man *p, Abc_Ntk_t *pNtk)
Abc_Obj_t * Abc_SclFindMostCriticalFanin(SC_Man *p, int *pfRise, Abc_Obj_t *pNode)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Abc_SclComputeLoad(SC_Man *p)
#define Vec_PtrForEachEntryReverse(Type, vVec, pEntry, i)
static int Abc_ObjIsLatch(Abc_Obj_t *pObj)
void Abc_SclTimeIncUpdateLevel_rec(Abc_Obj_t *pObj)
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
ABC_DLL void Abc_ObjPrint(FILE *pFile, Abc_Obj_t *pObj)
ABC_DLL int Abc_NodeFindFanin(Abc_Obj_t *pNode, Abc_Obj_t *pFanin)
static void Scl_LibPinDeparture(SC_Timing *pTime, SC_Pair *pDepIn, SC_Pair *pSlewIn, SC_Pair *pLoad, SC_Pair *pDepOut)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
static int Abc_ObjIsPi(Abc_Obj_t *pObj)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static double Abc_SclObjTimeOne(SC_Man *p, Abc_Obj_t *pObj, int fRise)
#define Abc_NtkForEachCo(pNtk, pCo, i)
#define Abc_NtkForEachNodeReverse1(pNtk, pNode, i)
static float SC_CellPinCapAve(SC_Cell *p)
typedefABC_NAMESPACE_HEADER_START struct SC_Man_ SC_Man
INCLUDES ///.
static int Abc_MaxInt(int a, int b)
static int Vec_PtrSize(Vec_Ptr_t *p)
void Abc_SclTimeIncUpdateLevel(Abc_Obj_t *pObj)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static int Abc_SclGetBufInvCount(Abc_Ntk_t *pNtk)
int Abc_SclTimeIncUpdate(SC_Man *p)
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
static float Abc_SclGetTotalArea(Abc_Ntk_t *pNtk)
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
SC_WireLoad * Abc_SclFindWireLoadModel(SC_Lib *p, float Area)
static void Abc_SclManFree(SC_Man *p)
float Abc_SclCountNonBufferLoadInt(SC_Man *p, Abc_Obj_t *pObj)
static void Abc_SclDeptObj(SC_Man *p, Abc_Obj_t *pObj)
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)
float Abc_SclCountNonBufferLoad(SC_Man *p, Abc_Obj_t *pObj)
int Abc_SclCheckCommonInputs(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
static void Abc_SclDumpStats(SC_Man *p, char *pFileName, abctime Time)
#define Vec_WecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
float Abc_SclCountNonBufferDelay(SC_Man *p, Abc_Obj_t *pObj)
static void SC_PairClean(SC_Pair *d)
GLOBAL VARIABLES ///.
static int Abc_ObjLevel(Abc_Obj_t *pObj)
static void Abc_SclTimeFanin(SC_Man *p, SC_Timing *pTime, Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
#define Abc_NtkForEachObjVec(vIds, pNtk, pObj, i)
static double Abc_SclObjSlewMax(SC_Man *p, Abc_Obj_t *pObj)
int Abc_SclCountBufferFanouts(Abc_Obj_t *pObj)
static int Abc_Base10Log(unsigned n)
#define ABC_NAMESPACE_IMPL_END
int Abc_SclCountNonBufferFanouts(Abc_Obj_t *pObj)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
void Abc_SclTimePerform(SC_Lib *pLib, Abc_Ntk_t *pNtk, int nTreeCRatio, int fUseWireLoads, int fShowAll, int fPrintPath, int fDumpStats)
static void Abc_SclTimeIncUpdateClean(SC_Man *p)
static SC_Pin * SC_CellPin(SC_Cell *p, int i)
float Abc_SclCountNonBufferDelayInt(SC_Man *p, Abc_Obj_t *pObj)
static SC_Cell * SC_LibCell(SC_Lib *p, int i)
static void Abc_Print(int level, const char *format,...)
int Abc_SclCountBufferFanoutsInt(Abc_Obj_t *pObj)
void Abc_SclTimeIncCheckLevel(Abc_Ntk_t *pNtk)
static void Abc_SclTimeIncAddNode(SC_Man *p, Abc_Obj_t *pObj)
int Abc_SclHasBufferFanout(Abc_Obj_t *pObj)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_NAMESPACE_IMPL_START
void Abc_SclTimeCone(SC_Man *p, Vec_Int_t *vCone)
static Vec_Int_t * Vec_WecEntry(Vec_Wec_t *p, int i)
static double Abc_SclObjSlackMax(SC_Man *p, Abc_Obj_t *pObj, float D)
static SC_Pair * Abc_SclObjSlew(SC_Man *p, Abc_Obj_t *pObj)
static float Abc_SclObjLoadAve(SC_Man *p, Abc_Obj_t *pObj)
static int Abc_NtkIsMappedLogic(Abc_Ntk_t *pNtk)
static int Vec_IntSize(Vec_Int_t *p)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
static Abc_Obj_t * Abc_NtkPo(Abc_Ntk_t *pNtk, int i)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int SC_PairEqualE(SC_Pair *d, SC_Pair *s, float E)
int Abc_SclCellFind(SC_Lib *p, char *pName)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
static void Abc_SclTimeNodePrint(SC_Man *p, Abc_Obj_t *pObj, int fRise, int Length, float maxDelay)
SC_WireLoad * Abc_SclFetchWireLoadModel(SC_Lib *p, char *pName)
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
static void Vec_QueUpdate(Vec_Que_t *p, int v)
static void Scl_LibPinArrival(SC_Timing *pTime, SC_Pair *pArrIn, SC_Pair *pSlewIn, SC_Pair *pLoad, SC_Pair *pArrOut, SC_Pair *pSlewOut)
static void Abc_SclObjDupFanin(SC_Man *p, Abc_Obj_t *pObj)
Abc_Obj_t * Abc_SclFindMostCriticalFanin2(SC_Man *p, int *pfRise, Abc_Obj_t *pNode)
ABC_NAMESPACE_IMPL_START Abc_Obj_t * Abc_SclFindCriticalCo(SC_Man *p, int *pfRise)
DECLARATIONS ///.
#define Vec_WecForEachLevelReverse(vGlob, vVec, i)
#define Abc_NtkForEachNodeReverse(pNtk, pNode, i)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
static float Abc_SclObjLoadValue(SC_Man *p, Abc_Obj_t *pObj)
void Abc_SclPrintBufferTrees(SC_Man *p, Abc_Ntk_t *pNtk)
static void Abc_SclTimeIncUpdateDeparture(SC_Man *p)
static float Abc_SclObjTimeMax(SC_Man *p, Abc_Obj_t *pObj)
static float Abc_SclGetAverageSize(Abc_Ntk_t *pNtk)
static void SC_PairMove(SC_Pair *d, SC_Pair *s)
#define Abc_NtkForEachPo(pNtk, pPo, i)
static void Abc_SclTimeIncUpdateArrival(SC_Man *p)
static void Abc_SclTimeIncAddFanouts(SC_Man *p, Abc_Obj_t *pObj)
static void Vec_IntClear(Vec_Int_t *p)
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
void Abc_SclPrintBuffersInt(SC_Man *p, Abc_Obj_t *pObj, int nOffset)
char * Abc_UtilStrsav(char *s)
int Abc_SclCountNonBufferFanoutsInt(Abc_Obj_t *pObj)
char * Mio_GateReadName(Mio_Gate_t *pGate)
static void Abc_SclDeptFanin(SC_Man *p, SC_Timing *pTime, Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
static void Abc_SclManCleanTime(SC_Man *p)
ABC_DLL int Abc_ObjLevelNew(Abc_Obj_t *pObj)
int Abc_SclCountMinSize(SC_Lib *pLib, Abc_Ntk_t *p, int fUseMax)
void Abc_SclPrintBuffersOne(SC_Man *p, Abc_Obj_t *pObj, int nOffset)
#define Abc_NtkForEachPi(pNtk, pPi, i)
static double Abc_SclObjLoadMax(SC_Man *p, Abc_Obj_t *pObj)
static void Vec_PtrFree(Vec_Ptr_t *p)
static SC_Cell * Abc_SclObjCell(Abc_Obj_t *p)
static void Scl_LibHandleInputDriver(SC_Cell *pCell, SC_Pair *pLoadIn, SC_Pair *pArrOut, SC_Pair *pSlewOut)
SC_Man * Abc_SclManStart(SC_Lib *pLib, Abc_Ntk_t *pNtk, int fUseWireLoads, int fDept, float DUser, int nTreeCRatio)
void Abc_SclTimeNtkPrint(SC_Man *p, int fShowAll, int fPrintPath)