50 int i, gateId, bufferId;
54 printf(
"Cannot find buffer in the current library. Quitting.\n" );
77 int i,
Counter = 0, CounterAll = 0;
87 Counter += (pObj->
pData == NULL);
92 printf(
"Could not find %d (out of %d) gates in the current library.\n", Counter, CounterAll );
108 #define ABC_SCL_MAX_SIZE 64
119 Counters[pCell->
Order]++;
121 TotArea += pCell->
area;
124 printf(
"Total gates = %d. Total area = %.1f\n", nGates, TotArea );
127 if ( Counters[i] == 0 )
129 printf(
"Cell size = %d. ", i );
130 printf(
"Count = %6d ", Counters[i] );
131 printf(
"(%5.1f %%) ", 100.0 * Counters[i] / nGates );
132 printf(
"Area = %12.1f ", Areas[i] );
133 printf(
"(%5.1f %%) ", 100.0 * Areas[i] / TotArea );
159 SC_Cell * pCell, * pBest = pRepr;
160 float AreaBest = pRepr->
area;
163 if ( AreaBest < pCell->area )
165 AreaBest = pCell->
area;
173 SC_Cell * pCell, * pRepr = NULL, * pBest = NULL;
212 Counter += ( gateId ==
Vec_IntEntry(vMinCells, gateId) );
231 char Buffer[1000], * pToken;
232 FILE * pFile = fopen( pFileName,
"rb" );
233 while ( fgets( Buffer, 1000, pFile ) )
235 pToken =
strtok( Buffer,
" \t\r\n" );
236 if ( pToken == NULL )
238 if ( !
strcmp(pToken,
"set_driving_cell") )
244 else if ( !
strcmp(pToken,
"set_load") )
251 printf(
"Unrecognized token \"%s\".\n", pToken );
273 if ( pBuffer == NULL )
275 printf(
"Cannot find buffer in the current library. Quitting.\n" );
282 pObj->
pData = pBuffer;
Mio_Gate_t * Mio_LibraryReadBuf(Mio_Library_t *pLib)
#define Abc_NtkForEachNode1(pNtk, pNode, i)
ABC_DLL float Abc_FrameReadMaxLoad()
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Mio_Gate_t * Mio_LibraryReadGateByName(Mio_Library_t *pLib, char *pName, char *pOutName)
void Abc_SclSclGates2MioGates(SC_Lib *pLib, Abc_Ntk_t *p)
ABC_DLL char * Abc_FrameReadDrivingCell()
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Abc_SclInsertBarBufs(Abc_Ntk_t *pNtk, Vec_Int_t *vBufs)
void Abc_SclReadTimingConstr(Abc_Frame_t *pAbc, char *pFileName, int fVerbose)
Vec_Int_t * Abc_SclFindMinAreas(SC_Lib *pLib, int fUseMax)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
static int Abc_ObjIsBarBuf(Abc_Obj_t *pObj)
#define SC_LibForEachCellClass(p, pCell, i)
#define SC_RingForEachCell(pRing, pCell, i)
static int Vec_PtrSize(Vec_Ptr_t *p)
static Vec_Int_t * Vec_IntStartFull(int nSize)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
ABC_DLL void Abc_FrameSetMaxLoad(float Load)
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Abc_NtkForEachObjVec(vIds, pNtk, pObj, i)
static int Vec_IntEntry(Vec_Int_t *p, int i)
#define ABC_NAMESPACE_IMPL_END
Vec_Int_t * Abc_SclExtractBarBufs(Abc_Ntk_t *pNtk)
ABC_NAMESPACE_IMPL_START void Abc_SclMioGates2SclGates(SC_Lib *pLib, Abc_Ntk_t *p)
DECLARATIONS ///.
STRUCTURE DEFINITIONS ///.
static void Vec_IntPush(Vec_Int_t *p, int Entry)
#define Abc_NtkForEachBarBuf(pNtk, pNode, i)
static void Vec_IntFreeP(Vec_Int_t **p)
static SC_Cell * SC_LibCell(SC_Lib *p, int i)
void Abc_SclManPrintGateSizes(SC_Lib *pLib, Abc_Ntk_t *p, Vec_Int_t *vGates)
void Abc_SclPrintGateSizes(SC_Lib *pLib, Abc_Ntk_t *p)
#define ABC_NAMESPACE_IMPL_START
int Abc_SclCountMinSize(SC_Lib *pLib, Abc_Ntk_t *p, int fUseMax)
SC_Cell * Abc_SclFindMaxAreaCell(SC_Cell *pRepr)
int Abc_SclCellFind(SC_Lib *p, char *pName)
void Abc_SclMinsizePerform(SC_Lib *pLib, Abc_Ntk_t *p, int fUseMax, int fVerbose)
static void Vec_IntFree(Vec_Int_t *p)
ABC_DLL void Abc_FrameSetDrivingCell(char *pName)
char * Abc_UtilStrsav(char *s)
char * Mio_GateReadName(Mio_Gate_t *pGate)
static SC_Cell * Abc_SclObjCell(Abc_Obj_t *p)