diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-16 22:50:39 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-16 22:50:39 -0700 |
commit | 2ba12a76ff7992b5d1221d5926605d928691c053 (patch) | |
tree | b3d3c43333bdc6a6a4f8cd8b70249f97f3cd3398 /src/map/if | |
parent | e446cfca15442c2da04a8c4c94ba0b2efaf16dce (diff) | |
download | abc-2ba12a76ff7992b5d1221d5926605d928691c053.tar.gz abc-2ba12a76ff7992b5d1221d5926605d928691c053.tar.bz2 abc-2ba12a76ff7992b5d1221d5926605d928691c053.zip |
Adding new switch to &if to relax the delay.
Diffstat (limited to 'src/map/if')
-rw-r--r-- | src/map/if/if.h | 2 | ||||
-rw-r--r-- | src/map/if/ifUtil.c | 22 |
2 files changed, 17 insertions, 7 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h index 5bcdb110..e2dd3352 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -102,6 +102,7 @@ struct If_Par_t_ int nNonDecLimit; // the max size of non-dec nodes float DelayTarget; // delay target float Epsilon; // value used in comparison floating point numbers + int nRelaxRatio; // delay relaxation ratio int fPreprocess; // preprossing int fArea; // area-oriented mapping int fFancy; // a fancy feature @@ -141,6 +142,7 @@ struct If_Par_t_ int nLatchesCoBox; // the number of white box inputs among the COs int fLiftLeaves; // shift the leaves for seq mapping int fUseCoAttrs; // use CO attributes + float DelayTargetNew;// new delay target float FinalDelay; // final delay after mapping If_LibLut_t * pLutLib; // the LUT library float * pTimesArr; // arrival times diff --git a/src/map/if/ifUtil.c b/src/map/if/ifUtil.c index efc6fba3..eca5fbc6 100644 --- a/src/map/if/ifUtil.c +++ b/src/map/if/ifUtil.c @@ -182,13 +182,11 @@ void If_ManComputeRequired( If_Man_t * p ) { // get the global required times p->RequiredGlo = If_ManDelayMax( p, 0 ); -/* - //////////////////////////////////////// - // redefine the delay target (positive number means percentage) - if ( p->pPars->DelayTarget > 0 ) - p->pPars->DelayTarget = p->RequiredGlo * (100.0 + p->pPars->DelayTarget) / 100.0; - //////////////////////////////////////// -*/ + + // find new delay target + if ( p->pPars->nRelaxRatio && p->pPars->DelayTargetNew == 0 ) + p->pPars->DelayTargetNew = p->RequiredGlo * (100.0 + p->pPars->nRelaxRatio) / 100.0; + // update the required times according to the target if ( p->pPars->DelayTarget != -1 ) { @@ -210,6 +208,8 @@ void If_ManComputeRequired( If_Man_t * p ) p->RequiredGlo = p->pPars->DelayTarget; } } + else if ( p->pPars->DelayTargetNew > 0 ) // relax the required times + p->RequiredGlo = p->pPars->DelayTargetNew; // do not propagate required times if area minimization is requested if ( p->pPars->fAreaOnly ) return; @@ -239,6 +239,11 @@ void If_ManComputeRequired( If_Man_t * p ) { // get the global required times p->RequiredGlo = If_ManDelayMax( p, 0 ); + + // find new delay target + if ( p->pPars->nRelaxRatio && p->pPars->DelayTargetNew == 0 ) + p->pPars->DelayTargetNew = p->RequiredGlo * (100.0 + p->pPars->nRelaxRatio) / 100.0; + // update the required times according to the target if ( p->pPars->DelayTarget != -1 ) { @@ -260,6 +265,9 @@ void If_ManComputeRequired( If_Man_t * p ) p->RequiredGlo = p->pPars->DelayTarget; } } + else if ( p->pPars->DelayTargetNew > 0 ) // relax the required times + p->RequiredGlo = p->pPars->DelayTargetNew; + // do not propagate required times if area minimization is requested if ( p->pPars->fAreaOnly ) return; |