ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
mapperCreate.c
Go to the documentation of this file.
1
18
19#include "mapperInt.h"
20
22
23
27
28static void Map_TableCreate( Map_Man_t * p );
29static void Map_TableResize( Map_Man_t * p );
30
31// hash key for the structural hash table
32static inline unsigned Map_HashKey2( Map_Node_t * p0, Map_Node_t * p1, int TableSize ) { return (unsigned)(((ABC_PTRUINT_T)(p0) + (ABC_PTRUINT_T)(p1) * 12582917) % TableSize); }
33
37
49int Map_ManReadInputNum( Map_Man_t * p ) { return p->nInputs; }
50int Map_ManReadOutputNum( Map_Man_t * p ) { return p->nOutputs; }
51int Map_ManReadBufNum( Map_Man_t * p ) { return Map_NodeVecReadSize(p->vMapBufs); }
52Map_Node_t ** Map_ManReadInputs ( Map_Man_t * p ) { return p->pInputs; }
53Map_Node_t ** Map_ManReadOutputs( Map_Man_t * p ) { return p->pOutputs; }
56Map_Node_t * Map_ManReadConst1 ( Map_Man_t * p ) { return p->pConst1; }
57Map_Time_t * Map_ManReadInputArrivals( Map_Man_t * p ) { return p->pInputArrivals; }
58Map_Time_t * Map_ManReadOutputRequireds( Map_Man_t * p ) { return p->pOutputRequireds; }
59Mio_Library_t * Map_ManReadGenLib ( Map_Man_t * p ) { return p->pSuperLib->pGenlib; }
60int Map_ManReadVerbose( Map_Man_t * p ) { return p->fVerbose; }
61float Map_ManReadAreaFinal( Map_Man_t * p ) { return p->AreaFinal; }
62float Map_ManReadRequiredGlo( Map_Man_t * p ) { return p->fRequiredGlo; }
63void Map_ManSetOutputNames( Map_Man_t * p, char ** ppNames ) { p->ppOutputNames = ppNames;}
64void Map_ManSetAreaRecovery( Map_Man_t * p, int fAreaRecovery ) { p->fAreaRecovery = fAreaRecovery;}
65void Map_ManSetDelayTarget( Map_Man_t * p, float DelayTarget ) { p->DelayTarget = DelayTarget;}
66void Map_ManSetInputArrivals( Map_Man_t * p, Map_Time_t * pArrivals ) { p->pInputArrivals = pArrivals; }
67void Map_ManSetOutputRequireds( Map_Man_t * p, Map_Time_t * pRequireds ) { p->pOutputRequireds = pRequireds; }
68void Map_ManSetObeyFanoutLimits( Map_Man_t * p, int fObeyFanoutLimits ) { p->fObeyFanoutLimits = fObeyFanoutLimits; }
69void Map_ManSetNumIterations( Map_Man_t * p, int nIterations ) { p->nIterations = nIterations; }
70int Map_ManReadFanoutViolations( Map_Man_t * p ) { return p->nFanoutViolations; }
71void Map_ManSetFanoutViolations( Map_Man_t * p, int nVio ) { p->nFanoutViolations = nVio; }
72void Map_ManSetChoiceNodeNum( Map_Man_t * p, int nChoiceNodes ) { p->nChoiceNodes = nChoiceNodes; }
73void Map_ManSetChoiceNum( Map_Man_t * p, int nChoices ) { p->nChoices = nChoices; }
74void Map_ManSetVerbose( Map_Man_t * p, int fVerbose ) { p->fVerbose = fVerbose; }
75void Map_ManSetSwitching( Map_Man_t * p, int fSwitching ) { p->fSwitching = fSwitching; }
76void Map_ManSetSkipFanout( Map_Man_t * p, int fSkipFanout ) { p->fSkipFanout = fSkipFanout; }
77void Map_ManSetUseProfile( Map_Man_t * p ) { p->fUseProfile = 1; }
78void Map_ManCreateAigIds( Map_Man_t * p, int nObjs ) { p->pAigNodeIDs = ABC_CALLOC( int, nObjs ); }
79
91Map_Man_t * Map_NodeReadMan( Map_Node_t * p ) { return p->p; }
92char * Map_NodeReadData( Map_Node_t * p, int fPhase ) { return fPhase? p->pData1 : p->pData0; }
93int Map_NodeReadNum( Map_Node_t * p ) { return p->Num; }
94int Map_NodeReadLevel( Map_Node_t * p ) { return Map_Regular(p)->Level; }
95int Map_NodeReadAigId( Map_Node_t * p ) { return p->p->pAigNodeIDs[p->Num]; }
96Map_Cut_t * Map_NodeReadCuts( Map_Node_t * p ) { return p->pCuts; }
97Map_Cut_t * Map_NodeReadCutBest( Map_Node_t * p, int fPhase ) { return p->pCutBest[fPhase]; }
98Map_Node_t * Map_NodeReadOne( Map_Node_t * p ) { return p->p1; }
99Map_Node_t * Map_NodeReadTwo( Map_Node_t * p ) { return p->p2; }
100void Map_NodeSetData( Map_Node_t * p, int fPhase, char * pData ) { if (fPhase) p->pData1 = pData; else p->pData0 = pData; }
101void Map_NodeSetNextE( Map_Node_t * p, Map_Node_t * pNextE ) { p->pNextE = pNextE; }
102void Map_NodeSetRepr( Map_Node_t * p, Map_Node_t * pRepr ) { p->pRepr = pRepr; }
103void Map_NodeSetSwitching( Map_Node_t * p, float Switching ) { p->Switching = Switching; }
104void Map_NodeSetAigId( Map_Node_t * p, int Id ) { p->p->pAigNodeIDs[p->Num] = Id; }
105
106;
107
108
120int Map_NodeIsConst( Map_Node_t * p ) { return (Map_Regular(p))->Num == -1; }
121int Map_NodeIsVar( Map_Node_t * p ) { return (Map_Regular(p))->p1 == NULL && (Map_Regular(p))->Num >= 0; }
122int Map_NodeIsBuf( Map_Node_t * p ) { return (Map_Regular(p))->p1 != NULL && (Map_Regular(p))->p2 == NULL; }
123int Map_NodeIsAnd( Map_Node_t * p ) { return (Map_Regular(p))->p1 != NULL && (Map_Regular(p))->p2 != NULL; }
124int Map_NodeComparePhase( Map_Node_t * p1, Map_Node_t * p2 ) { assert( !Map_IsComplement(p1) ); assert( !Map_IsComplement(p2) ); return p1->fInv ^ p2->fInv; }
125
137Map_Super_t * Map_CutReadSuperBest( Map_Cut_t * p, int fPhase ) { return p->M[fPhase].pSuperBest;}
138Map_Super_t * Map_CutReadSuper0( Map_Cut_t * p ) { return p->M[0].pSuperBest;}
139Map_Super_t * Map_CutReadSuper1( Map_Cut_t * p ) { return p->M[1].pSuperBest;}
140int Map_CutReadLeavesNum( Map_Cut_t * p ) { return p->nLeaves; }
141Map_Node_t ** Map_CutReadLeaves( Map_Cut_t * p ) { return p->ppLeaves; }
142unsigned Map_CutReadPhaseBest( Map_Cut_t * p, int fPhase ) { return p->M[fPhase].uPhaseBest;}
143unsigned Map_CutReadPhase0( Map_Cut_t * p ) { return p->M[0].uPhaseBest;}
144unsigned Map_CutReadPhase1( Map_Cut_t * p ) { return p->M[1].uPhaseBest;}
145Map_Cut_t * Map_CutReadNext( Map_Cut_t * p ) { return p->pNext; }
146
158char * Map_SuperReadFormula( Map_Super_t * p ) { return p->pFormula; }
159Mio_Gate_t * Map_SuperReadRoot( Map_Super_t * p ) { return p->pRoot; }
160int Map_SuperReadNum( Map_Super_t * p ) { return p->Num; }
161Map_Super_t ** Map_SuperReadFanins( Map_Super_t * p ) { return p->pFanins; }
162int Map_SuperReadFaninNum( Map_Super_t * p ) { return p->nFanins; }
163Map_Super_t * Map_SuperReadNext( Map_Super_t * p ) { return p->pNext; }
164int Map_SuperReadNumPhases( Map_Super_t * p ) { return p->nPhases; }
165unsigned char * Map_SuperReadPhases( Map_Super_t * p ) { return p->uPhases; }
166int Map_SuperReadFanoutLimit( Map_Super_t * p ) { return p->nFanLimit;}
167
169float Map_SuperLibReadAreaInv( Map_SuperLib_t * p ) { return p->AreaInv; }
171int Map_SuperLibReadVarsMax( Map_SuperLib_t * p ) { return p->nVarsMax; }
172
173
192Map_Man_t * Map_ManCreate( int nInputs, int nOutputs, int fVerbose )
193{
194 Map_Man_t * p;
195 int i;
196
197 // derive the supergate library
198 if ( Abc_FrameReadLibSuper() == NULL )
199 {
200 printf( "The supergate library is not specified. Use \"read_super\".\n" );
201 return NULL;
202 }
203
204 // start the manager
205 p = ABC_ALLOC( Map_Man_t, 1 );
206 memset( p, 0, sizeof(Map_Man_t) );
207 p->pSuperLib = (Map_SuperLib_t *)Abc_FrameReadLibSuper();
208 p->nVarsMax = p->pSuperLib->nVarsMax;
209 p->fVerbose = fVerbose;
210 p->fEpsilon = (float)0.001;
211 assert( p->nVarsMax > 0 );
212
213 if ( p->nVarsMax == 5 )
214 Extra_Truth4VarN( &p->uCanons, &p->uPhases, &p->pCounters, 8 );
215
216 // start various data structures
217 Map_TableCreate( p );
218 Map_MappingSetupTruthTables( p->uTruths );
219 Map_MappingSetupTruthTablesLarge( p->uTruthsLarge );
220// printf( "Node = %d bytes. Cut = %d bytes. Super = %d bytes.\n", sizeof(Map_Node_t), sizeof(Map_Cut_t), sizeof(Map_Super_t) );
221 p->mmNodes = Extra_MmFixedStart( sizeof(Map_Node_t) );
222 p->mmCuts = Extra_MmFixedStart( sizeof(Map_Cut_t) );
223
224 // make sure the constant node will get index -1
225 p->nNodes = -1;
226 // create the constant node
227 p->pConst1 = Map_NodeCreate( p, NULL, NULL );
228 p->vMapObjs = Map_NodeVecAlloc( 100 );
229 p->vMapBufs = Map_NodeVecAlloc( 100 );
230 p->vVisited = Map_NodeVecAlloc( 100 );
231
232 // create the PI nodes
233 p->nInputs = nInputs;
234 p->pInputs = ABC_ALLOC( Map_Node_t *, nInputs );
235 for ( i = 0; i < nInputs; i++ )
236 p->pInputs[i] = Map_NodeCreate( p, NULL, NULL );
237
238 // create the place for the output nodes
239 p->nOutputs = nOutputs;
240 p->pOutputs = ABC_ALLOC( Map_Node_t *, nOutputs );
241 memset( p->pOutputs, 0, sizeof(Map_Node_t *) * nOutputs );
242 return p;
243}
244
257{
258// int i;
259// for ( i = 0; i < p->vMapObjs->nSize; i++ )
260// Map_NodeVecFree( p->vMapObjs->pArray[i]->vFanouts );
261// Map_NodeVecFree( p->pConst1->vFanouts );
262 Map_NodeVecFree( p->vMapObjs );
263 Map_NodeVecFree( p->vMapBufs );
264 Map_NodeVecFree( p->vVisited );
265 if ( p->uCanons ) ABC_FREE( p->uCanons );
266 if ( p->uPhases ) ABC_FREE( p->uPhases );
267 if ( p->pCounters ) ABC_FREE( p->pCounters );
268 Extra_MmFixedStop( p->mmNodes );
269 Extra_MmFixedStop( p->mmCuts );
270 ABC_FREE( p->pAigNodeIDs );
271 ABC_FREE( p->pNodeDelays );
272 ABC_FREE( p->pInputArrivals );
273 ABC_FREE( p->pOutputRequireds );
274 ABC_FREE( p->pInputs );
275 ABC_FREE( p->pOutputs );
276 ABC_FREE( p->pBins );
277 ABC_FREE( p->ppOutputNames );
278 ABC_FREE( p );
279}
280
281
294{
295 Map_Node_t * pNode;
296 int k;
297 assert( p->pNodeDelays == NULL );
298 p->pNodeDelays = ABC_CALLOC( float, p->vMapObjs->nSize );
299 for ( k = 0; k < p->vMapObjs->nSize; k++ )
300 {
301 pNode = p->vMapObjs->pArray[k];
302 if ( pNode->nRefs == 0 )
303 continue;
304 p->pNodeDelays[k] = 0.014426 * LogFan * p->pSuperLib->tDelayInv.Worst * log( (double)pNode->nRefs ); // 1.4426 = 1/ln(2)
305// printf( "%d = %d (%.2f) ", k, pNode->nRefs, p->pNodeDelays[k] );
306 }
307// printf( "\n" );
308}
309
310
323{
324 printf( "N-canonical = %d. Matchings = %d. Phases = %d. ", p->nCanons, p->nMatches, p->nPhases );
325 printf( "Choice nodes = %d. Choices = %d.\n", p->nChoiceNodes, p->nChoices );
326 ABC_PRT( "ToMap", p->timeToMap );
327 ABC_PRT( "Cuts ", p->timeCuts );
328 ABC_PRT( "Truth", p->timeTruth );
329 ABC_PRT( "Match", p->timeMatch );
330 ABC_PRT( "Area ", p->timeArea );
331 ABC_PRT( "Sweep", p->timeSweep );
332 ABC_PRT( "ToNet", p->timeToNet );
333 ABC_PRT( "TOTAL", p->timeTotal );
334 if ( p->time1 ) { ABC_PRT( "time1", p->time1 ); }
335 if ( p->time2 ) { ABC_PRT( "time2", p->time2 ); }
336 if ( p->time3 ) { ABC_PRT( "time3", p->time3 ); }
337}
338
350void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, abctime Time )
351{
352 FILE * pTable;
353 pTable = fopen( "map_stats.txt", "a+" );
354 fprintf( pTable, "%s ", pName );
355 fprintf( pTable, "%4.2f ", Area );
356 fprintf( pTable, "%4.2f ", Delay );
357 fprintf( pTable, "%4.2f\n", (float)(Time)/(float)(CLOCKS_PER_SEC) );
358 fclose( pTable );
359}
360
374{
375 Map_Node_t * pNode;
376 // create the node
377 pNode = (Map_Node_t *)Extra_MmFixedEntryFetch( p->mmNodes );
378 memset( pNode, 0, sizeof(Map_Node_t) );
379 pNode->tRequired[0].Rise = pNode->tRequired[0].Fall = pNode->tRequired[0].Worst = MAP_FLOAT_LARGE;
380 pNode->tRequired[1].Rise = pNode->tRequired[1].Fall = pNode->tRequired[1].Worst = MAP_FLOAT_LARGE;
381 pNode->p1 = p1;
382 pNode->p2 = p2;
383 pNode->p = p;
384 // set the number of this node
385 pNode->Num = p->nNodes++;
386 // place to store the fanouts
387// pNode->vFanouts = Map_NodeVecAlloc( 5 );
388 // store this node in the internal array
389 if ( pNode->Num >= 0 )
390 Map_NodeVecPush( p->vMapObjs, pNode );
391 else
392 pNode->fInv = 1;
393 // set the level of this node
394 if ( p1 )
395 {
396#ifdef MAP_ALLOCATE_FANOUT
397 // create the fanout info
399 if ( p2 )
401#endif
402
403 if ( p2 )
404 {
405 pNode->Level = 1 + MAP_MAX(Map_Regular(pNode->p1)->Level, Map_Regular(pNode->p2)->Level);
407 }
408 else
409 {
410 pNode->Level = Map_Regular(pNode->p1)->Level;
411 pNode->fInv = Map_NodeIsSimComplement(p1);
412 }
413 }
414 // reference the inputs (will be used to compute the number of fanouts)
415 if ( p1 ) Map_NodeRef(p1);
416 if ( p2 ) Map_NodeRef(p2);
417
418 pNode->nRefEst[0] = pNode->nRefEst[1] = -1;
419 return pNode;
420}
421
433void Map_TableCreate( Map_Man_t * pMan )
434{
435 assert( pMan->pBins == NULL );
436 pMan->nBins = Abc_PrimeCudd(5000);
437 pMan->pBins = ABC_ALLOC( Map_Node_t *, pMan->nBins );
438 memset( pMan->pBins, 0, sizeof(Map_Node_t *) * pMan->nBins );
439 pMan->nNodes = 0;
440}
441
457{
458 Map_Node_t * pEnt;
459 unsigned Key;
460
461 if ( p1 == p2 )
462 return p1;
463 if ( p1 == Map_Not(p2) )
464 return Map_Not(pMan->pConst1);
465 if ( Map_NodeIsConst(p1) )
466 {
467 if ( p1 == pMan->pConst1 )
468 return p2;
469 return Map_Not(pMan->pConst1);
470 }
471 if ( Map_NodeIsConst(p2) )
472 {
473 if ( p2 == pMan->pConst1 )
474 return p1;
475 return Map_Not(pMan->pConst1);
476 }
477
478 if ( Map_Regular(p1)->Num > Map_Regular(p2)->Num )
479 pEnt = p1, p1 = p2, p2 = pEnt;
480
481 Key = Map_HashKey2( p1, p2, pMan->nBins );
482 for ( pEnt = pMan->pBins[Key]; pEnt; pEnt = pEnt->pNext )
483 if ( pEnt->p1 == p1 && pEnt->p2 == p2 )
484 return pEnt;
485 // resize the table
486 if ( pMan->nNodes >= 2 * pMan->nBins )
487 {
488 Map_TableResize( pMan );
489 Key = Map_HashKey2( p1, p2, pMan->nBins );
490 }
491 // create the new node
492 pEnt = Map_NodeCreate( pMan, p1, p2 );
493 // add the node to the corresponding linked list in the table
494 pEnt->pNext = pMan->pBins[Key];
495 pMan->pBins[Key] = pEnt;
496 return pEnt;
497}
498
499
511void Map_TableResize( Map_Man_t * pMan )
512{
513 Map_Node_t ** pBinsNew;
514 Map_Node_t * pEnt, * pEnt2;
515 int nBinsNew, Counter, i;
516 abctime clk;
517 unsigned Key;
518
519clk = Abc_Clock();
520 // get the new table size
521 nBinsNew = Abc_PrimeCudd(2 * pMan->nBins);
522 // allocate a new array
523 pBinsNew = ABC_ALLOC( Map_Node_t *, nBinsNew );
524 memset( pBinsNew, 0, sizeof(Map_Node_t *) * nBinsNew );
525 // rehash the entries from the old table
526 Counter = 0;
527 for ( i = 0; i < pMan->nBins; i++ )
528 for ( pEnt = pMan->pBins[i], pEnt2 = pEnt? pEnt->pNext: NULL; pEnt;
529 pEnt = pEnt2, pEnt2 = pEnt? pEnt->pNext: NULL )
530 {
531 Key = Map_HashKey2( pEnt->p1, pEnt->p2, nBinsNew );
532 pEnt->pNext = pBinsNew[Key];
533 pBinsNew[Key] = pEnt;
534 Counter++;
535 }
536 assert( Counter == pMan->nNodes - pMan->nInputs );
537 if ( pMan->fVerbose )
538 {
539// printf( "Increasing the unique table size from %6d to %6d. ", pMan->nBins, nBinsNew );
540// ABC_PRT( "Time", Abc_Clock() - clk );
541 }
542 // replace the table and the parameters
543 ABC_FREE( pMan->pBins );
544 pMan->pBins = pBinsNew;
545 pMan->nBins = nBinsNew;
546}
547
548
549
562{
563 Map_Node_t * pNode = Map_NodeCreate( p, p1, NULL );
564 Map_NodeVecPush( p->vMapBufs, pNode );
565 return pNode;
566}
567
580void Map_NodeSetChoice( Map_Man_t * pMan, Map_Node_t * pNodeOld, Map_Node_t * pNodeNew )
581{
582 pNodeNew->pNextE = pNodeOld->pNextE;
583 pNodeOld->pNextE = pNodeNew;
584 pNodeNew->pRepr = pNodeOld;
585}
586
587
588
592
594
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_PRT(a, t)
Definition abc_global.h:255
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
#define ABC_FREE(obj)
Definition abc_global.h:267
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_DLL void * Abc_FrameReadLibSuper()
Definition mainFrame.c:61
Cube * p
Definition exorList.c:222
char * Extra_MmFixedEntryFetch(Extra_MmFixed_t *p)
void Extra_MmFixedStop(Extra_MmFixed_t *p)
Extra_MmFixed_t * Extra_MmFixedStart(int nEntrySize)
void Extra_Truth4VarN(unsigned short **puCanons, char ***puPhases, char **ppCounters, int nPhasesMax)
void Map_ManSetOutputNames(Map_Man_t *p, char **ppNames)
Mio_Library_t * Map_ManReadGenLib(Map_Man_t *p)
unsigned char * Map_SuperReadPhases(Map_Super_t *p)
int Map_NodeReadNum(Map_Node_t *p)
unsigned Map_CutReadPhaseBest(Map_Cut_t *p, int fPhase)
void Map_NodeSetData(Map_Node_t *p, int fPhase, char *pData)
int Map_ManReadVerbose(Map_Man_t *p)
Map_Super_t * Map_CutReadSuper1(Map_Cut_t *p)
Map_Super_t * Map_SuperReadNext(Map_Super_t *p)
unsigned Map_CutReadPhase0(Map_Cut_t *p)
float Map_ManReadAreaFinal(Map_Man_t *p)
void Map_NodeSetChoice(Map_Man_t *pMan, Map_Node_t *pNodeOld, Map_Node_t *pNodeNew)
int Map_NodeComparePhase(Map_Node_t *p1, Map_Node_t *p2)
Map_Cut_t * Map_NodeReadCutBest(Map_Node_t *p, int fPhase)
void Map_ManSetOutputRequireds(Map_Man_t *p, Map_Time_t *pRequireds)
int Map_ManReadFanoutViolations(Map_Man_t *p)
void Map_ManPrintTimeStats(Map_Man_t *p)
Map_Node_t * Map_NodeReadTwo(Map_Node_t *p)
int Map_ManReadInputNum(Map_Man_t *p)
FUNCTION DEFINITIONS ///.
void Map_ManSetVerbose(Map_Man_t *p, int fVerbose)
int Map_NodeIsBuf(Map_Node_t *p)
void Map_NodeSetRepr(Map_Node_t *p, Map_Node_t *pRepr)
int Map_NodeReadAigId(Map_Node_t *p)
void Map_ManSetUseProfile(Map_Man_t *p)
int Map_NodeReadLevel(Map_Node_t *p)
int Map_CutReadLeavesNum(Map_Cut_t *p)
int Map_SuperReadFaninNum(Map_Super_t *p)
int Map_NodeIsConst(Map_Node_t *p)
Map_Cut_t * Map_NodeReadCuts(Map_Node_t *p)
Map_Time_t * Map_ManReadOutputRequireds(Map_Man_t *p)
void Map_ManSetSwitching(Map_Man_t *p, int fSwitching)
Mio_Gate_t * Map_SuperReadRoot(Map_Super_t *p)
Mio_Library_t * Map_SuperLibReadGenLib(Map_SuperLib_t *p)
Map_Node_t ** Map_ManReadOutputs(Map_Man_t *p)
void Map_ManSetObeyFanoutLimits(Map_Man_t *p, int fObeyFanoutLimits)
int Map_ManReadBufNum(Map_Man_t *p)
Map_Node_t * Map_ManReadConst1(Map_Man_t *p)
Map_Node_t ** Map_ManReadInputs(Map_Man_t *p)
Map_Super_t * Map_CutReadSuper0(Map_Cut_t *p)
unsigned Map_CutReadPhase1(Map_Cut_t *p)
Map_Node_t * Map_NodeCreate(Map_Man_t *p, Map_Node_t *p1, Map_Node_t *p2)
Map_Node_t ** Map_ManReadBufs(Map_Man_t *p)
Map_Node_t * Map_ManReadBufDriver(Map_Man_t *p, int i)
void Map_ManSetChoiceNodeNum(Map_Man_t *p, int nChoiceNodes)
int Map_NodeIsVar(Map_Node_t *p)
int Map_SuperReadNumPhases(Map_Super_t *p)
Map_Node_t * Map_NodeAnd(Map_Man_t *pMan, Map_Node_t *p1, Map_Node_t *p2)
void Map_ManCreateNodeDelays(Map_Man_t *p, int LogFan)
void Map_NodeSetSwitching(Map_Node_t *p, float Switching)
Map_Super_t * Map_CutReadSuperBest(Map_Cut_t *p, int fPhase)
int Map_SuperReadNum(Map_Super_t *p)
Map_Node_t * Map_NodeBuf(Map_Man_t *p, Map_Node_t *p1)
void Map_ManSetAreaRecovery(Map_Man_t *p, int fAreaRecovery)
char * Map_SuperReadFormula(Map_Super_t *p)
Map_Man_t * Map_NodeReadMan(Map_Node_t *p)
void Map_ManSetSkipFanout(Map_Man_t *p, int fSkipFanout)
char * Map_NodeReadData(Map_Node_t *p, int fPhase)
Map_Man_t * Map_ManCreate(int nInputs, int nOutputs, int fVerbose)
FUNCTION DEFINITIONS ///.
Map_Node_t * Map_NodeReadOne(Map_Node_t *p)
void Map_ManSetChoiceNum(Map_Man_t *p, int nChoices)
void Map_ManSetFanoutViolations(Map_Man_t *p, int nVio)
void Map_ManFree(Map_Man_t *p)
float Map_SuperLibReadAreaInv(Map_SuperLib_t *p)
void Map_NodeSetAigId(Map_Node_t *p, int Id)
void Map_ManSetInputArrivals(Map_Man_t *p, Map_Time_t *pArrivals)
void Map_ManPrintStatsToFile(char *pName, float Area, float Delay, abctime Time)
void Map_NodeSetNextE(Map_Node_t *p, Map_Node_t *pNextE)
Map_Cut_t * Map_CutReadNext(Map_Cut_t *p)
int Map_SuperLibReadVarsMax(Map_SuperLib_t *p)
Map_Super_t ** Map_SuperReadFanins(Map_Super_t *p)
int Map_SuperReadFanoutLimit(Map_Super_t *p)
Map_Node_t ** Map_CutReadLeaves(Map_Cut_t *p)
int Map_NodeIsAnd(Map_Node_t *p)
Map_Time_t Map_SuperLibReadDelayInv(Map_SuperLib_t *p)
void Map_ManSetDelayTarget(Map_Man_t *p, float DelayTarget)
int Map_ManReadOutputNum(Map_Man_t *p)
void Map_ManCreateAigIds(Map_Man_t *p, int nObjs)
Map_Time_t * Map_ManReadInputArrivals(Map_Man_t *p)
void Map_ManSetNumIterations(Map_Man_t *p, int nIterations)
float Map_ManReadRequiredGlo(Map_Man_t *p)
#define MAP_MAX(a, b)
Definition mapperInt.h:58
Map_NodeVec_t * Map_NodeVecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition mapperVec.c:45
#define Map_NodeRef(p)
Definition mapperInt.h:75
void Map_NodeVecFree(Map_NodeVec_t *p)
Definition mapperVec.c:68
int Map_NodeVecReadSize(Map_NodeVec_t *p)
Definition mapperVec.c:122
#define Map_NodeIsSimComplement(p)
Definition mapperInt.h:84
void Map_NodeVecPush(Map_NodeVec_t *p, Map_Node_t *Entry)
Definition mapperVec.c:190
void Map_NodeAddFaninFanout(Map_Node_t *pFanin, Map_Node_t *pFanout)
Map_Node_t ** Map_NodeVecReadArray(Map_NodeVec_t *p)
Definition mapperVec.c:106
#define MAP_FLOAT_LARGE
Definition mapperInt.h:61
#define Map_Not(p)
Definition mapper.h:69
void Map_MappingSetupTruthTablesLarge(unsigned uTruths[][32])
typedefABC_NAMESPACE_HEADER_START struct Map_ManStruct_t_ Map_Man_t
INCLUDES ///.
Definition mapper.h:40
struct Map_CutStruct_t_ Map_Cut_t
Definition mapper.h:43
struct Map_SuperStruct_t_ Map_Super_t
Definition mapper.h:45
Map_Node_t * Map_NodeCreate(Map_Man_t *p, Map_Node_t *p1, Map_Node_t *p2)
struct Map_SuperLibStruct_t_ Map_SuperLib_t
Definition mapper.h:46
struct Map_TimeStruct_t_ Map_Time_t
Definition mapper.h:49
void Map_MappingSetupTruthTables(unsigned uTruths[][2])
#define Map_Regular(p)
Definition mapper.h:68
#define Map_IsComplement(p)
GLOBAL VARIABLES ///.
Definition mapper.h:67
struct Map_NodeStruct_t_ Map_Node_t
Definition mapper.h:41
struct Mio_LibraryStruct_t_ Mio_Library_t
Definition mio.h:42
struct Mio_GateStruct_t_ Mio_Gate_t
Definition mio.h:43
Map_Node_t * pNextE
Definition mapperInt.h:227
Map_Node_t * pRepr
Definition mapperInt.h:228
Map_Time_t tRequired[2]
Definition mapperInt.h:240
Map_Man_t * p
Definition mapperInt.h:208
Map_Node_t * pNext
Definition mapperInt.h:209
Map_Node_t * p2
Definition mapperInt.h:226
Map_Node_t * p1
Definition mapperInt.h:225
#define assert(ex)
Definition util_old.h:213
char * memset()