summaryrefslogtreecommitdiffstats
path: root/src/opt/sfm/sfmLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/opt/sfm/sfmLib.c')
-rw-r--r--src/opt/sfm/sfmLib.c13
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;