diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-01-13 12:13:54 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-01-13 12:13:54 -0800 |
commit | 87f6828d50291ce87400016d57bc9b7b50700f99 (patch) | |
tree | e757e411b18b5ebbc049bbb830154abab2fadb49 /src/opt/sfm/sfmLib.c | |
parent | 8dd31fb4a96f63fb24549019ea14ec6d3dc41d8e (diff) | |
download | abc-87f6828d50291ce87400016d57bc9b7b50700f99.tar.gz abc-87f6828d50291ce87400016d57bc9b7b50700f99.tar.bz2 abc-87f6828d50291ce87400016d57bc9b7b50700f99.zip |
Adding support for delay/area tradeoff.
Diffstat (limited to 'src/opt/sfm/sfmLib.c')
-rw-r--r-- | src/opt/sfm/sfmLib.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/opt/sfm/sfmLib.c b/src/opt/sfm/sfmLib.c index 34906b56..e9a3b322 100644 --- a/src/opt/sfm/sfmLib.c +++ b/src/opt/sfm/sfmLib.c @@ -288,6 +288,7 @@ void Sfm_LibTruth8Two( Mio_Cell2_t * pCellBot, Mio_Cell2_t * pCellTop, int InTop SeeAlso [] ***********************************************************************/ +/* void Sfm_LibCellProfile( Mio_Cell2_t * pCellBot, Mio_Cell2_t * pCellTop, int InTop, int nFanins, int * Perm, int * pProf ) { int i, DelayAdd = pCellTop ? pCellTop->iDelays[InTop] : 0; @@ -299,6 +300,18 @@ void Sfm_LibCellProfile( Mio_Cell2_t * pCellBot, Mio_Cell2_t * pCellTop, int InT else // if ( Perm[i] >= (int)pCellBot->nFanins + InTop ) pProf[i] = pCellTop->iDelays[Perm[i] - (int)pCellBot->nFanins + 1]; } +*/ +void Sfm_LibCellProfile( Mio_Cell2_t * pCellBot, Mio_Cell2_t * pCellTop, int InTop, int nFanins, int * Perm, int * pProf ) +{ + int i, DelayAdd = pCellTop ? 1 : 0; + for ( i = 0; i < nFanins; i++ ) + if ( Perm[i] < (int)pCellBot->nFanins ) + pProf[i] = 1 + DelayAdd; + else if ( Perm[i] < (int)pCellBot->nFanins + InTop ) + pProf[i] = 1; + else // if ( Perm[i] >= (int)pCellBot->nFanins + InTop ) + pProf[i] = 1; +} static inline int Sfm_LibNewIsContained( Sfm_Fun_t * pObj, int * pProf, int Area, int * pProfNew, int nFanins ) { int k; |