diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-09-08 19:53:49 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-09-08 19:53:49 -0700 |
commit | 97751e43b71792ded1947d98945e1e832325be6d (patch) | |
tree | 2b88dea48591c73d70bc4172f449de9a6b77bd5b /src/map/mapper | |
parent | f623b04da47aaa2810c06b880f85354becef288e (diff) | |
download | abc-97751e43b71792ded1947d98945e1e832325be6d.tar.gz abc-97751e43b71792ded1947d98945e1e832325be6d.tar.bz2 abc-97751e43b71792ded1947d98945e1e832325be6d.zip |
New constraint manager and memory reporting 'ps'.
Diffstat (limited to 'src/map/mapper')
-rw-r--r-- | src/map/mapper/mapperMatch.c | 13 | ||||
-rw-r--r-- | src/map/mapper/mapperTime.c | 38 |
2 files changed, 41 insertions, 10 deletions
diff --git a/src/map/mapper/mapperMatch.c b/src/map/mapper/mapperMatch.c index 2b31d73a..e5e12fa8 100644 --- a/src/map/mapper/mapperMatch.c +++ b/src/map/mapper/mapperMatch.c @@ -18,6 +18,9 @@ #include "mapperInt.h" +#include "misc/util/utilNam.h" +#include "map/scl/sclCon.h" + ABC_NAMESPACE_IMPL_START @@ -356,7 +359,15 @@ void Map_MappingSetPiArrivalTimes( Map_Man_t * p ) { pNode = p->pInputs[i]; // set the arrival time of the positive phase - pNode->tArrival[1] = p->pInputArrivals[i]; + if ( Scl_ConIsRunning() ) + { + float Time = Scl_ConGetInArrFloat( i ); + pNode->tArrival[1].Fall = Time; + pNode->tArrival[1].Rise = Time; + pNode->tArrival[1].Worst = Time; + } + else + pNode->tArrival[1] = p->pInputArrivals[i]; pNode->tArrival[1].Rise += p->pNodeDelays ? p->pNodeDelays[pNode->Num] : 0; pNode->tArrival[1].Fall += p->pNodeDelays ? p->pNodeDelays[pNode->Num] : 0; pNode->tArrival[1].Worst += p->pNodeDelays ? p->pNodeDelays[pNode->Num] : 0; diff --git a/src/map/mapper/mapperTime.c b/src/map/mapper/mapperTime.c index b5a9ecde..7e805538 100644 --- a/src/map/mapper/mapperTime.c +++ b/src/map/mapper/mapperTime.c @@ -18,6 +18,9 @@ #include "mapperInt.h" +#include "misc/util/utilNam.h" +#include "map/scl/sclCon.h" + ABC_NAMESPACE_IMPL_START //////////////////////////////////////////////////////////////////////// @@ -381,8 +384,9 @@ void Map_TimePropagateRequired( Map_Man_t * p ) } void Map_TimeComputeRequiredGlobal( Map_Man_t * p ) { + int fUseConMan = Scl_ConIsRunning() && Scl_ConHasOutReqs(); Map_Time_t * ptTime, * ptTimeA; - int fPhase, i; + int fPhase, i; // update the required times according to the target p->fRequiredGlo = Map_TimeComputeArrivalMax( p ); if ( p->DelayTarget != -1 ) @@ -416,15 +420,31 @@ void Map_TimeComputeRequiredGlobal( Map_Man_t * p ) ptTime = Map_Regular(p->pOutputs[i])->tRequired + fPhase; 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 <= p->fRequiredGlo ) - 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 + if ( fUseConMan ) + { + float Value = Scl_ConGetOutReqFloat(i); + // if external required time can be achieved, use it + if ( Value > 0 && ptTimeA->Worst <= Value )//&& Value <= p->fRequiredGlo ) + ptTime->Rise = ptTime->Fall = ptTime->Worst = Value; + // if external required cannot be achieved, set the earliest possible arrival time + else if ( Value > 0 && ptTimeA->Worst > Value ) + ptTime->Rise = ptTime->Fall = ptTime->Worst = ptTimeA->Worst; + // otherwise, set the global required time + else + ptTime->Rise = ptTime->Fall = ptTime->Worst = p->fRequiredGlo; + } else - ptTime->Rise = ptTime->Fall = ptTime->Worst = p->fRequiredGlo; + { + // 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 <= p->fRequiredGlo ) + 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 = p->fRequiredGlo; + } } // visit nodes in the reverse topological order Map_TimePropagateRequired( p ); |