diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-03-02 13:50:28 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-03-02 13:50:28 -0800 |
commit | eb4aa4257722d1a72401fdd477aaaff19028e290 (patch) | |
tree | 9d8b548ba0848086479ae68ec18016e48fc73e5a /src/map | |
parent | a0933b1643d216ec401983580d896ab7d70669de (diff) | |
download | abc-eb4aa4257722d1a72401fdd477aaaff19028e290.tar.gz abc-eb4aa4257722d1a72401fdd477aaaff19028e290.tar.bz2 abc-eb4aa4257722d1a72401fdd477aaaff19028e290.zip |
Enabling user-specified required times in 'map'.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/mapper/mapper.h | 1 | ||||
-rw-r--r-- | src/map/mapper/mapperCreate.c | 19 | ||||
-rw-r--r-- | src/map/mapper/mapperInt.h | 1 | ||||
-rw-r--r-- | src/map/mapper/mapperTime.c | 14 |
4 files changed, 25 insertions, 10 deletions
diff --git a/src/map/mapper/mapper.h b/src/map/mapper/mapper.h index 3fd5fd9e..29bc98ef 100644 --- a/src/map/mapper/mapper.h +++ b/src/map/mapper/mapper.h @@ -97,6 +97,7 @@ extern void Map_ManSetOutputNames( Map_Man_t * p, char ** ppNames ); extern void Map_ManSetAreaRecovery( Map_Man_t * p, int fAreaRecovery ); extern void Map_ManSetDelayTarget( Map_Man_t * p, float DelayTarget ); extern void Map_ManSetInputArrivals( Map_Man_t * p, Map_Time_t * pArrivals ); +extern void Map_ManSetOutputRequireds( Map_Man_t * p, Map_Time_t * pArrivals ); extern void Map_ManSetObeyFanoutLimits( Map_Man_t * p, int fObeyFanoutLimits ); extern void Map_ManSetNumIterations( Map_Man_t * p, int nNumIterations ); extern int Map_ManReadPass( Map_Man_t * p ); diff --git a/src/map/mapper/mapperCreate.c b/src/map/mapper/mapperCreate.c index 73ccdb19..2b1663a4 100644 --- a/src/map/mapper/mapperCreate.c +++ b/src/map/mapper/mapperCreate.c @@ -52,26 +52,28 @@ int Map_ManReadOutputNum( Map_Man_t * p ) { return Map_Node_t ** Map_ManReadInputs ( Map_Man_t * p ) { return p->pInputs; } Map_Node_t ** Map_ManReadOutputs( Map_Man_t * p ) { return p->pOutputs; } Map_Node_t * Map_ManReadConst1 ( Map_Man_t * p ) { return p->pConst1; } -Map_Time_t * Map_ManReadInputArrivals( Map_Man_t * p ) { return p->pInputArrivals;} +Map_Time_t * Map_ManReadInputArrivals( Map_Man_t * p ) { return p->pInputArrivals; } +Map_Time_t * Map_ManReadOutputRequireds( Map_Man_t * p ) { return p->pOutputRequireds; } Mio_Library_t * Map_ManReadGenLib ( Map_Man_t * p ) { return p->pSuperLib->pGenlib; } int Map_ManReadVerbose( Map_Man_t * p ) { return p->fVerbose; } float Map_ManReadAreaFinal( Map_Man_t * p ) { return p->AreaFinal; } -float Map_ManReadRequiredGlo( Map_Man_t * p ) { return p->fRequiredGlo; } +float Map_ManReadRequiredGlo( Map_Man_t * p ) { return p->fRequiredGlo; } void Map_ManSetTimeToMap( Map_Man_t * p, int Time ) { p->timeToMap = Time; } void Map_ManSetTimeToNet( Map_Man_t * p, int Time ) { p->timeToNet = Time; } void Map_ManSetTimeSweep( Map_Man_t * p, int Time ) { p->timeSweep = Time; } void Map_ManSetTimeTotal( Map_Man_t * p, int Time ) { p->timeTotal = Time; } -void Map_ManSetOutputNames( Map_Man_t * p, char ** ppNames ) { p->ppOutputNames = ppNames; } +void Map_ManSetOutputNames( Map_Man_t * p, char ** ppNames ) { p->ppOutputNames = ppNames;} void Map_ManSetAreaRecovery( Map_Man_t * p, int fAreaRecovery ) { p->fAreaRecovery = fAreaRecovery;} void Map_ManSetDelayTarget( Map_Man_t * p, float DelayTarget ) { p->DelayTarget = DelayTarget;} -void Map_ManSetInputArrivals( Map_Man_t * p, Map_Time_t * pArrivals ) { p->pInputArrivals = pArrivals;} +void Map_ManSetInputArrivals( Map_Man_t * p, Map_Time_t * pArrivals ) { p->pInputArrivals = pArrivals; } +void Map_ManSetOutputRequireds( Map_Man_t * p, Map_Time_t * pRequireds ) { p->pOutputRequireds = pRequireds; } void Map_ManSetObeyFanoutLimits( Map_Man_t * p, int fObeyFanoutLimits ) { p->fObeyFanoutLimits = fObeyFanoutLimits; } void Map_ManSetNumIterations( Map_Man_t * p, int nIterations ) { p->nIterations = nIterations; } -int Map_ManReadFanoutViolations( Map_Man_t * p ) { return p->nFanoutViolations; } -void Map_ManSetFanoutViolations( Map_Man_t * p, int nVio ) { p->nFanoutViolations = nVio; } +int Map_ManReadFanoutViolations( Map_Man_t * p ) { return p->nFanoutViolations; } +void Map_ManSetFanoutViolations( Map_Man_t * p, int nVio ) { p->nFanoutViolations = nVio; } void Map_ManSetChoiceNodeNum( Map_Man_t * p, int nChoiceNodes ) { p->nChoiceNodes = nChoiceNodes; } -void Map_ManSetChoiceNum( Map_Man_t * p, int nChoices ) { p->nChoices = nChoices; } -void Map_ManSetVerbose( Map_Man_t * p, int fVerbose ) { p->fVerbose = fVerbose; } +void Map_ManSetChoiceNum( Map_Man_t * p, int nChoices ) { p->nChoices = nChoices; } +void Map_ManSetVerbose( Map_Man_t * p, int fVerbose ) { p->fVerbose = fVerbose; } void Map_ManSetSwitching( Map_Man_t * p, int fSwitching ) { p->fSwitching = fSwitching; } /**Function************************************************************* @@ -267,6 +269,7 @@ void Map_ManFree( Map_Man_t * p ) Extra_MmFixedStop( p->mmNodes ); Extra_MmFixedStop( p->mmCuts ); ABC_FREE( p->pInputArrivals ); + ABC_FREE( p->pOutputRequireds ); ABC_FREE( p->pInputs ); ABC_FREE( p->pOutputs ); ABC_FREE( p->pBins ); diff --git a/src/map/mapper/mapperInt.h b/src/map/mapper/mapperInt.h index 08a27e68..8d1e3fb7 100644 --- a/src/map/mapper/mapperInt.h +++ b/src/map/mapper/mapperInt.h @@ -106,6 +106,7 @@ struct Map_ManStruct_t_ // info about the original circuit char ** ppOutputNames; // the primary output names Map_Time_t * pInputArrivals;// the PI arrival times + Map_Time_t * pOutputRequireds;// the PI arrival times // mapping parameters int nVarsMax; // the max number of variables diff --git a/src/map/mapper/mapperTime.c b/src/map/mapper/mapperTime.c index d12b607a..162e6f9a 100644 --- a/src/map/mapper/mapperTime.c +++ b/src/map/mapper/mapperTime.c @@ -231,7 +231,7 @@ void Map_TimeComputeRequiredGlobal( Map_Man_t * p ) ***********************************************************************/ void Map_TimeComputeRequired( Map_Man_t * p, float fRequired ) { - Map_Time_t * ptTime; + Map_Time_t * ptTime, * ptTimeA; int fPhase, i; // clean the required times @@ -250,7 +250,17 @@ void Map_TimeComputeRequired( Map_Man_t * p, float fRequired ) { fPhase = !Map_IsComplement(p->pOutputs[i]); ptTime = Map_Regular(p->pOutputs[i])->tRequired + fPhase; - ptTime->Rise = ptTime->Fall = ptTime->Worst = fRequired; + ptTimeA = Map_Regular(p->pOutputs[i])->tArrival + fPhase; + + // if external required time can be achieved, use it + if ( p->pOutputRequireds && p->pOutputRequireds[i].Worst > 0 && ptTimeA->Worst <= p->pOutputRequireds[i].Worst && p->pOutputRequireds[i].Worst <= fRequired ) + ptTime->Rise = ptTime->Fall = ptTime->Worst = p->pOutputRequireds[i].Worst; + // if external required cannot be achieved, set the earliest possible arrival time + else if ( p->pOutputRequireds && p->pOutputRequireds[i].Worst > 0 && ptTimeA->Worst > p->pOutputRequireds[i].Worst ) + ptTime->Rise = ptTime->Fall = ptTime->Worst = ptTimeA->Worst; + // otherwise, set the global required time + else + ptTime->Rise = ptTime->Fall = ptTime->Worst = fRequired; } // sorts the nodes in the decreasing order of levels |