29 #define MAP_TABLE_HASH(u1,u2,nSize) (((u1) + 2003 * (u2)) % nSize)
101 for ( pEnt = p->
pBins[Key]; pEnt; pEnt = pEnt->
pNext )
102 if ( pEnt->
uTruth[0] == uTruthC[0] && pEnt->
uTruth[1] == uTruthC[1] )
110 pEnt->
uTruth[0] = uTruthC[0];
111 pEnt->
uTruth[1] = uTruthC[1];
114 p->
pBins[Key] = pEnt;
146 for ( pEnt = p->
pBins[Key]; pEnt; pEnt = pEnt->
pNext )
147 if ( pEnt->
uTruth[0] == uTruth[0] && pEnt->
uTruth[1] == uTruth[1] )
152 pEnt->
uTruth[0] = uTruth[0];
153 pEnt->
uTruth[1] = uTruth[1];
158 p->
pBins[Key] = pEnt;
189 if ( pEnt->
uTruth[0] == uTruth[0] && pEnt->
uTruth[1] == uTruth[1] )
213 for ( pEnt = p->
pBins[Key]; pEnt; pEnt = pEnt->
pNext )
214 if ( pEnt->
uTruth[0] == uTruth[0] && pEnt->
uTruth[1] == uTruth[1] )
246 for ( i = 0; i < p->
nBins; i++ )
247 for ( pEnt = p->
pBins[i], pEnt2 = pEnt? pEnt->
pNext: NULL; pEnt;
248 pEnt = pEnt2, pEnt2 = pEnt? pEnt->
pNext: NULL )
251 pEnt->
pNext = pBinsNew[Key];
252 pBinsNew[Key] = pEnt;
275 if ( (*ppS1)->nUsed > (*ppS2)->nUsed )
277 if ( (*ppS1)->nUsed < (*ppS2)->nUsed )
296 if ( (*ppS1)->Area > (*ppS2)->Area )
299 if ( (*ppS1)->Area < (*ppS2)->Area )
325 for ( i = 0; i < p->
nBins; i++ )
326 for ( pEnt = p->
pBins[i]; pEnt; pEnt = pEnt->
pNext )
327 for ( pSuper = pEnt->
pGates; pSuper; pSuper = pSuper->
pNext )
328 ppSupers[nSupers++] = pSuper;
331 qsort( (
void *)ppSupers, nSupers,
sizeof(
Map_Super_t *),
337 for ( i = 0; i < 10; i++ )
339 if ( ppSupers[i]->nUsed == 0 )
341 printf(
"%5d : ", ppSupers[i]->nUsed );
342 printf(
"%5d ", ppSupers[i]->Num );
343 printf(
"A = %5.2f ", ppSupers[i]->Area );
344 printf(
"D = %5.2f ", ppSupers[i]->tDelayMax.Rise );
345 printf(
"%s", ppSupers[i]->pFormula );
370 for ( i = 0; i < p->
nBins; i++ )
371 for ( pEnt = p->
pBins[i]; pEnt; pEnt = pEnt->
pNext )
375 for ( pSuper = pEnt->
pGates; pSuper; pSuper = pSuper->
pNext )
380 ppSupers[nSupers++] = pSuper;
386 qsort( (
void *)ppSupers, nSupers,
sizeof(
Map_Super_t *),
390 for ( k = 0; k < nSupers; k++ )
393 pEnt->
pGates = ppSupers[k];
static int Abc_PrimeCudd(unsigned int p)
Map_Super_t * Map_SuperTableLookupC(Map_SuperLib_t *p, unsigned uTruth[])
void Map_SuperTableSortSupergates(Map_HashTable_t *p, int nSupersMax)
#define MAP_TABLE_HASH(u1, u2, nSize)
DECLARATIONS ///.
#define ABC_ALLOC(type, num)
void Map_SuperTableFree(Map_HashTable_t *p)
int Map_SuperTableInsertC(Map_HashTable_t *p, unsigned uTruthC[], Map_Super_t *pGate)
static void Map_SuperTableResize(Map_HashTable_t *pLib)
void Map_SuperTableSortSupergatesByDelay(Map_HashTable_t *p, int nSupersMax)
Map_HashTable_t * Map_SuperTableCreate(Map_SuperLib_t *pLib)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_END
int Map_SuperTableCompareGatesInList(Map_Super_t **ppS1, Map_Super_t **ppS2)
Map_Super_t * Map_SuperTableLookup(Map_HashTable_t *p, unsigned uTruth[], unsigned *puPhase)
Extra_MmFixed_t * mmEntries
#define ABC_NAMESPACE_IMPL_START
int Map_SuperTableInsert(Map_HashTable_t *p, unsigned uTruth[], Map_Super_t *pGate, unsigned uPhase)
Map_HashTable_t * tTableC
int Map_SuperTableCompareSupergates(Map_Super_t **ppS1, Map_Super_t **ppS2)