152 assert( p->pPiDrive != NULL );
153 assert( p->pPiDrive->n_inputs == 1 );
240 printf(
"Fanout profile (%d):\n",
Vec_PtrSize(vFanouts) );
305 printf(
"Fanouts %d and %d are out of order.\n", i, i+1 );
328 printf(
"%12s ", pCell->
pName );
329 printf(
"(%2d/%2d) ", pCell->
Order, pCell->
nGates );
339 float LoadWirePrev, LoadWireThis, LoadNew, Load = 0;
347 Load +=
Bus_SclObjCin( pFanout ) - LoadWirePrev + LoadWireThis;
355 if ( p->pPars->fAddBufs )
379 assert( LoadNew - Load < 1 && Load - LoadNew < 1 );
394 float GainGate, GainInv, Load, LoadNew, Cin, DeptMax = 0;
395 GainGate = p->pPars->fAddBufs ? pow( Gain, 2.0 ) : Gain;
396 GainInv = p->pPars->fAddBufs ? pow( Gain, 2.0 ) : Gain;
403 printf(
"Buffering could not be completed because the gain value (%d) is too low.\n", p->pPars->GainRatio );
422 if ( !p->pPars->fSizeOnly && (
Abc_ObjFanoutNum(pObj) > p->pPars->nDegree || Load > GainGate * Cin) )
431 if ( p->pPars->fVeryVerbose )
434 if ( p->pPars->fVeryVerbose )
439 while (
Vec_PtrSize(p->vFanouts) > p->pPars->nDegree || (
Vec_PtrSize(p->vFanouts) > 1 && Load > GainGate * Cin) );
446 assert( LoadNew - Load < 1 && Load - LoadNew < 1 );
454 if ( p->pPars->fVeryVerbose )
466 SC_Pair ArrOut, SlewOut, LoadIn = { Load, Load };
468 DeptCur += 0.5 * ArrOut.
fall + 0.5 * ArrOut.
rise;
472 if ( p->pPars->fVerbose )
474 printf(
"WireLoads = %d Degree = %d Target slew =%4d ps Gain2 =%5d Buf = %6d Delay =%7.0f ps ",
475 p->pPars->fUseWireLoads, p->pPars->nDegree, p->pPars->Slew, p->pPars->GainRatio,
ABC_DLL float Abc_FrameReadMaxLoad()
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
static void Bus_SclObjSetCin(Abc_Obj_t *p, float cap)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
ABC_DLL char * Abc_FrameReadDrivingCell()
void Abc_NtkPrintFanoutProfile(Abc_Obj_t *pObj)
int Abc_SclIsInv(Abc_Obj_t *pObj)
static float Bus_SclObjCin(Abc_Obj_t *p)
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
static void Vec_FltWriteEntry(Vec_Flt_t *p, int i, float Entry)
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
static float * Vec_FltEntryP(Vec_Flt_t *p, int i)
static void Vec_IntFillExtra(Vec_Int_t *p, int nSize, int Fill)
int Abc_SclCheckNtk(Abc_Ntk_t *p, int fVerbose)
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
void Bus_SclCheckSortedFanout(Vec_Ptr_t *vFanouts)
float Abc_SclFindWireLoad(Vec_Flt_t *vWireCaps, int nFans)
ABC_DLL int Abc_NodeFindFanin(Abc_Obj_t *pNode, Abc_Obj_t *pFanin)
static void Abc_SclObjSetCell(Abc_Obj_t *p, SC_Cell *pCell)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
void Bus_ManReadInOutLoads(Bus_Man_t *p)
Abc_Obj_t * Abc_SclAddOneInv(Bus_Man_t *p, Abc_Obj_t *pObj, Vec_Ptr_t *vFanouts, float Gain)
static void Vec_PtrSort(Vec_Ptr_t *p, int(*Vec_PtrSortCompare)()) ___unused
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static void Vec_IntSetEntry(Vec_Int_t *p, int i, int Entry)
static Vec_Flt_t * Vec_FltAlloc(int nCap)
FUNCTION DEFINITIONS ///.
float Abc_NtkComputeFanoutLoad(Bus_Man_t *p, Vec_Ptr_t *vFanouts)
#define Abc_NtkForEachCo(pNtk, pCo, i)
static float SC_CellPinCapAve(SC_Cell *p)
static abctime Abc_Clock()
static float Abc_NtkComputeEdgeDept(Abc_Obj_t *pFanout, int iFanin, float Slew)
static int Abc_MaxInt(int a, int b)
static int Vec_PtrSize(Vec_Ptr_t *p)
static float Bus_SclObjETime(Abc_Obj_t *p)
typedefABC_NAMESPACE_IMPL_START struct Bus_Man_t_ Bus_Man_t
DECLARATIONS ///.
void Abc_NtkComputeFanoutInfo(Abc_Obj_t *pObj, float Slew)
static void Vec_FltFill(Vec_Flt_t *p, int nSize, float Entry)
static float Bus_SclObjDept(Abc_Obj_t *p)
static void Vec_FltFreeP(Vec_Flt_t **p)
static float Abc_MaxFloat(float a, float b)
static void Vec_FltPush(Vec_Flt_t *p, float Entry)
#define ABC_SWAP(Type, a, b)
void Bus_ManStop(Bus_Man_t *p)
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
ABC_NAMESPACE_IMPL_START Vec_Flt_t * Abc_SclFindWireCaps(SC_WireLoad *pWL, int nFanoutMax)
DECLARATIONS ///.
void Abc_SclReportDupFanins(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
static void Abc_PrintTime(int level, const char *pStr, abctime time)
ABC_DLL void Abc_ObjPatchFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFaninOld, Abc_Obj_t *pFaninNew)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
static float Abc_SclGetTotalArea(Abc_Ntk_t *pNtk)
SC_WireLoad * Abc_SclFindWireLoadModel(SC_Lib *p, float Area)
static int Abc_MinInt(int a, int b)
Abc_Ntk_t * Abc_SclBufferingPerform(Abc_Ntk_t *pNtk, SC_Lib *pLib, SC_BusPars *pPars)
void Abc_SclMioGates2SclGates(SC_Lib *pLib, Abc_Ntk_t *p)
DECLARATIONS ///.
float Abc_NtkComputeNodeDeparture(Abc_Obj_t *pObj, float Slew)
void Abc_SclOneNodePrint(Bus_Man_t *p, Abc_Obj_t *pObj)
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeInv(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeBuf(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
static void Bus_SclObjUpdateDept(Abc_Obj_t *p, float time)
SC_Cell * Abc_SclFindSmallestGate(SC_Cell *p, float CinMin)
static SC_Cell * SC_LibCell(SC_Lib *p, int i)
void Abc_SclSclGates2MioGates(SC_Lib *pLib, Abc_Ntk_t *p)
ABC_DLL Abc_Ntk_t * Abc_NtkDupDfs(Abc_Ntk_t *pNtk)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
void Bus_SclInsertFanout(Vec_Ptr_t *vFanouts, Abc_Obj_t *pObj)
static float Bus_SclObjLoad(Abc_Obj_t *p)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
void Abc_NtkPrintFanoutProfileVec(Abc_Obj_t *pObj, Vec_Ptr_t *vFanouts)
void Abc_SclBufSize(Bus_Man_t *p, float Gain)
#define Vec_PtrForEachEntryStop(Type, vVec, pEntry, i, Stop)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
SC_Cell * Abc_SclFindInvertor(SC_Lib *p, int fFindBuff)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static float SC_CellPinCap(SC_Cell *p, int i)
int Abc_SclCellFind(SC_Lib *p, char *pName)
SC_WireLoad * Abc_SclFetchWireLoadModel(SC_Lib *p, char *pName)
int Bus_SclCompareFanouts(Abc_Obj_t **pp1, Abc_Obj_t **pp2)
#define ABC_CALLOC(type, num)
static void Bus_SclObjSetLoad(Abc_Obj_t *p, float cap)
typedefABC_NAMESPACE_HEADER_START struct Vec_Flt_t_ Vec_Flt_t
INCLUDES ///.
static void Vec_PtrFreeP(Vec_Ptr_t **p)
static Bus_Man_t * Bus_SclObjMan(Abc_Obj_t *p)
static void Bus_SclObjSetETime(Abc_Obj_t *p, float time)
static float Vec_FltEntry(Vec_Flt_t *p, int i)
ABC_DLL int Abc_NtkGetFanoutMax(Abc_Ntk_t *pNtk)
static int Abc_ObjFaninPhase(Abc_Obj_t *p, int i)
#define Abc_NtkForEachObjReverse(pNtk, pNode, i)
static float Scl_LibPinArrivalEstimate(SC_Cell *pCell, int iPin, float Slew, float Load)
ABC_DLL void Abc_NodeCollectFanouts(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Bus_Man_t * Bus_ManStart(Abc_Ntk_t *pNtk, SC_Lib *pLib, SC_BusPars *pPars)
FUNCTION DEFINITIONS ///.
static int Vec_FltSize(Vec_Flt_t *p)
static void Vec_PtrShrink(Vec_Ptr_t *p, int nSizeNew)
char * Abc_UtilStrsav(char *s)
float Abc_NtkComputeNodeLoad(Bus_Man_t *p, Abc_Obj_t *pObj)
static void ** Vec_PtrArray(Vec_Ptr_t *p)
void Abc_NodeInvUpdateFanPolarity(Abc_Obj_t *pObj)
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)