122 if ( M1act < M1req && M2act > M2req )
124 if ( M2act < M2req && M1act > M1req )
172 for ( pSuper = pMatch->
pSupers, Counter = 0; pSuper; pSuper = pSuper->
pNext, Counter++ )
183 for ( i = 0; i < (int)pSuper->
nPhases; i++ )
188 if (
p->fMappingMode == 0 )
201 if (
p->fMappingMode == 2 ||
p->fMappingMode == 3 )
203 else if (
p->fMappingMode == 4 )
222 if (
p->fMappingMode == 0 )
234 if (
p->fMappingMode == 2 ||
p->fMappingMode == 3 )
236 else if (
p->fMappingMode == 4 )
260 float Area2, fWorstLimit;
264 if (
p->fMappingMode != 0 && pCutBest == NULL )
270 if (
p->fMappingMode != 0 )
281 if (
p->fMappingMode == 2 ||
p->fMappingMode == 3 )
283 pMatch = pCutBest->
M + fPhase;
284 if ( pNode->
nRefAct[fPhase] > 0 ||
290 else if (
p->fMappingMode == 4 )
292 pMatch = pCutBest->
M + fPhase;
293 if ( pNode->
nRefAct[fPhase] > 0 ||
302 MatchBest = pCutBest->
M[fPhase];
313 pMatch = pCut->
M + fPhase;
328 if (
p->fMappingMode == 0 )
333 if ( pCutBest == NULL )
338 pCutBest->
M[fPhase] = MatchBest;
341 if (
p->fMappingMode >= 2 &&
345 if (
p->fMappingMode == 2 ||
p->fMappingMode == 3 )
347 else if (
p->fMappingMode == 4 )
375 for ( i = 0; i <
p->nInputs; i++ )
377 pNode =
p->pInputs[i];
379 if ( Scl_ConIsRunning() )
381 float Time = Scl_ConGetInArrFloat( i );
387 pNode->
tArrival[1] =
p->pInputArrivals[i];
415 return tArrInv.
Worst;
432 float tWorst0Using1, tWorst1Using0;
433 int fUsePhase1, fUsePhase0;
440 if (
p->fMappingMode == 1 )
457 if ( pMatchBest0->
tArrive.
Worst > tWorst0Using1 +
p->fEpsilon )
459 else if ( pMatchBest1->
tArrive.
Worst > tWorst1Using0 +
p->fEpsilon )
469 fUsePhase0 = fUsePhase1 = 0;
470 if (
p->fMappingMode == 2 )
472 fUsePhase0 = (pNode->
tRequired[1].
Worst > tWorst1Using0 + 3*
p->pSuperLib->tDelayInv.Worst +
p->fEpsilon);
473 fUsePhase1 = (pNode->
tRequired[0].
Worst > tWorst0Using1 + 3*
p->pSuperLib->tDelayInv.Worst +
p->fEpsilon);
475 else if (
p->fMappingMode == 3 ||
p->fMappingMode == 4 )
477 fUsePhase0 = (pNode->
tRequired[1].
Worst > tWorst1Using0 +
p->fEpsilon);
478 fUsePhase1 = (pNode->
tRequired[0].
Worst > tWorst0Using1 +
p->fEpsilon);
480 if ( !fUsePhase0 && !fUsePhase1 )
484 if ( fUsePhase0 && fUsePhase1 )
492 assert( fUsePhase0 ^ fUsePhase1 );
498 if (
p->fMappingMode >= 2 && pNode->
nRefAct[1] > 0 )
503 if (
p->fMappingMode >= 2 && pNode->
nRefAct[0] == 0 )
509 if (
p->fMappingMode >= 2 && pNode->
nRefAct[0] > 0 )
514 if (
p->fMappingMode >= 2 && pNode->
nRefAct[1] == 0 )
587 assert(
p->fMappingMode >= 0 &&
p->fMappingMode <= 4 );
590 if (
p->fMappingMode == 0 )
594 if (
p->fMappingMode == 0 )
596 else if (
p->fMappingMode == 1 )
602 for ( i = 0; i <
p->vMapObjs->nSize; i++ )
604 pNode =
p->vMapObjs->pArray[i];
621 printf(
"\nError: A node in the mapping graph does not have feasible cuts.\n" );
641 printf(
"\nError: Could not match both phases of AIG node %d.\n", pNode->
Num );
642 printf(
"Please make sure that the supergate library has equivalents of AND2 or NAND2.\n" );
643 printf(
"If such supergates exist in the library, report a bug.\n" );
654 Extra_ProgressBarUpdate( pProgress, i,
"Matches ..." );
#define ABC_INFINITY
MACRO DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START typedef char ProgressBar
float Map_CutGetAreaDerefed(Map_Cut_t *pCut, int fPhase)
float Map_SwitchCutRef(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
void Map_MappingEstimateRefsInit(Map_Man_t *p)
float Map_CutDeref(Map_Cut_t *pCut, int fPhase, int fProfile)
void Map_MappingEstimateRefs(Map_Man_t *p)
float Map_CutRef(Map_Cut_t *pCut, int fPhase, int fProfile)
float Map_CutGetAreaFlow(Map_Cut_t *pCut, int fPhase)
float Map_SwitchCutGetDerefed(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
FUNCTION DEFINITIONS ///.
float Map_SwitchCutDeref(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
float Map_TimeCutComputeArrival(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase, float tWorstCaseLimit)
int Map_MatchNodePhase(Map_Man_t *p, Map_Node_t *pNode, int fPhase)
int Map_MappingMatches(Map_Man_t *p)
void Map_NodeTransferArrivalTimes(Map_Man_t *p, Map_Node_t *pNode)
ABC_NAMESPACE_IMPL_START void Map_MatchClean(Map_Match_t *pMatch)
DECLARATIONS ///.
float Map_TimeMatchWithInverter(Map_Man_t *p, Map_Match_t *pMatch)
void Map_MappingSetPiArrivalTimes(Map_Man_t *p)
void Map_NodeTryDroppingOnePhase(Map_Man_t *p, Map_Node_t *pNode)
int Map_MatchCompare(Map_Man_t *pMan, Map_Match_t *pM1, Map_Match_t *pM2, int fDoingArea)
int Map_MatchNodeCut(Map_Man_t *p, Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase, float fWorstLimit)
typedefABC_NAMESPACE_HEADER_START struct Map_ManStruct_t_ Map_Man_t
INCLUDES ///.
int Map_NodeIsBuf(Map_Node_t *p)
struct Map_MatchStruct_t_ Map_Match_t
struct Map_CutStruct_t_ Map_Cut_t
struct Map_SuperStruct_t_ Map_Super_t
struct Map_TimeStruct_t_ Map_Time_t
int Map_NodeIsAnd(Map_Node_t *p)
#define Map_IsComplement(p)
GLOBAL VARIABLES ///.
struct Map_NodeStruct_t_ Map_Node_t
int Mio_GateReadProfile(Mio_Gate_t *pGate)
int Mio_GateReadProfile2(Mio_Gate_t *pGate)