108 if ( Counter < (
int)pGate->
nPins )
109 Counter = pGate->
nPins;
126 char * pPhaseNames[10] = {
"UNKNOWN",
"INV",
"NONINV" };
127 fprintf( pFile,
" PIN " );
128 fprintf( pFile,
"%9s ", pPin->
pName );
129 fprintf( pFile,
"%10s ", pPhaseNames[pPin->
Phase] );
130 fprintf( pFile,
"%6d ", (
int)pPin->
dLoadInput );
131 fprintf( pFile,
"%6d ", (
int)pPin->
dLoadMax );
136 fprintf( pFile,
"\n" );
153 fprintf( pFile,
"GATE " );
154 fprintf( pFile,
"%12s ", pGate->
pName );
155 fprintf( pFile,
"%10.2f ", pGate->
dArea );
159 if ( pGate->
pFunc == NULL )
160 printf(
"Truth table is not available.\n" );
183 fprintf( pFile,
"# The genlib library \"%s\".\n", pLib->pName );
201 double Diff = (*pp1)->dArea - (*pp2)->dArea;
245 if ( pGate->
nPins <= 5 && pGate->
pFunc[0] == uTruth )
273 if ( pGate->
pFunc == NULL || pGate->
pTwin != NULL )
277 if ( pGate2->
pFunc == NULL || pGate2->
pTwin != NULL )
307 vArray = fAllGates? p->vGates : p->vSelect;
310 printf(
"%3d :%12s %d %9.2f ", i, pGate->
pName, pGate->
nPins, pGate->
dArea );
333 if ( pBuffer == NULL )
342 printf(
"Read %d gates from file \"%s\".\n",
Vec_PtrSize(p->vGates), pFileName );
354 printf(
"Selected %d functionally unique gates. ",
Vec_PtrSize(p->vSelect) );
362 printf(
"Created %d rules and %d matches. ", p->nNodes, p->nSets );
Amap_Lib_t * Amap_LibReadFile(char *pFileName, int fVerbose)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Amap_LibForEachGate(pLib, pGate, i)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
#define Amap_GateForEachPin(pGate, pPin)
Amap_Gat_t * Amap_LibFindGate(Amap_Lib_t *p, unsigned uTruth)
Amap_Lib_t * Amap_LibReadAndPrepare(char *pFileName, char *pBuffer, int fVerbose, int fVeryVerbose)
void Amap_LibFree(Amap_Lib_t *p)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define ABC_ALLOC(type, num)
static Vec_Ptr_t * Vec_PtrDup(Vec_Ptr_t *pVec)
static int Abc_TruthWordNum(int nVars)
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
static abctime Abc_Clock()
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
int Amap_LibCompareGatesByArea(Amap_Gat_t **pp1, Amap_Gat_t **pp2)
void Amap_LibPrintSelectedGates(Amap_Lib_t *p, int fAllGates)
Vec_Ptr_t * Amap_LibSortGatesByArea(Amap_Lib_t *pLib)
#define ABC_NAMESPACE_IMPL_END
void Amap_LibWritePin(FILE *pFile, Amap_Pin_t *pPin)
#define ABC_NAMESPACE_IMPL_START
#define Vec_PtrForEachEntryStop(Type, vVec, pEntry, i, Stop)
int Amap_LibNumPinsMax(Amap_Lib_t *p)
typedefABC_NAMESPACE_HEADER_START struct Amap_Lib_t_ Amap_Lib_t
INCLUDES ///.
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Vec_Ptr_t * Amap_LibSelectGates(Amap_Lib_t *p, int fVerbose)
Aig_MmFlex_t * Aig_MmFlexStart()
void Aig_MmFlexStop(Aig_MmFlex_t *p, int fVerbose)
Amap_Lib_t * Amap_LibReadBuffer(char *pBuffer, int fVerbose)
int Amap_LibParseEquations(Amap_Lib_t *p, int fVerbose)
ABC_NAMESPACE_IMPL_START Amap_Lib_t * Amap_LibAlloc()
DECLARATIONS ///.
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
void Amap_LibCreateRules(Amap_Lib_t *p, int fVeryVerbose)
void Amap_LibWrite(FILE *pFile, Amap_Lib_t *pLib, int fPrintDsd)
char * Abc_UtilStrsav(char *s)
static void ** Vec_PtrArray(Vec_Ptr_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)
void Amap_LibWriteGate(FILE *pFile, Amap_Gat_t *pGate, int fPrintDsd)