summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifCut.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2006-12-10 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2006-12-10 08:01:00 -0800
commitae037e45038cca6f0b86abea50692399a03b01be (patch)
tree6419a88dd09a51011be3fa98199775ae3cf68fae /src/map/if/ifCut.c
parentb9abf9c00c02feb52a2c796199343acebe20d8ef (diff)
downloadabc-ae037e45038cca6f0b86abea50692399a03b01be.tar.gz
abc-ae037e45038cca6f0b86abea50692399a03b01be.tar.bz2
abc-ae037e45038cca6f0b86abea50692399a03b01be.zip
Version abc61210
Diffstat (limited to 'src/map/if/ifCut.c')
-rw-r--r--src/map/if/ifCut.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/src/map/if/ifCut.c b/src/map/if/ifCut.c
index 06a020a6..5366aaf5 100644
--- a/src/map/if/ifCut.c
+++ b/src/map/if/ifCut.c
@@ -423,13 +423,15 @@ float If_CutFlow( If_Man_t * p, If_Cut_t * pCut )
If_Obj_t * pLeaf;
float Flow;
int i;
- assert( pCut->nLeaves > 1 );
+ assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
Flow = If_CutLutArea(p, pCut);
If_CutForEachLeaf( p, pCut, pLeaf, i )
{
if ( pLeaf->nRefs == 0 )
Flow += If_ObjCutBest(pLeaf)->Area;
- else
+ else if ( p->pPars->fSeqMap ) // seq
+ Flow += If_ObjCutBest(pLeaf)->Area / pLeaf->nRefs;
+ else
{
assert( pLeaf->EstRefs > p->fEpsilon );
Flow += If_ObjCutBest(pLeaf)->Area / pLeaf->EstRefs;
@@ -453,7 +455,7 @@ float If_CutAverageRefs( If_Man_t * p, If_Cut_t * pCut )
{
If_Obj_t * pLeaf;
int nRefsTotal, i;
- assert( pCut->nLeaves > 1 );
+ assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
nRefsTotal = 0;
If_CutForEachLeaf( p, pCut, pLeaf, i )
nRefsTotal += pLeaf->nRefs;
@@ -569,7 +571,7 @@ void If_CutPrintTiming( If_Man_t * p, If_Cut_t * pCut )
float If_CutAreaDerefed( If_Man_t * p, If_Cut_t * pCut, int nLevels )
{
float aResult, aResult2;
- assert( pCut->nLeaves > 1 );
+ assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
aResult2 = If_CutRef( p, pCut, nLevels );
aResult = If_CutDeref( p, pCut, nLevels );
assert( aResult == aResult2 );
@@ -590,7 +592,7 @@ float If_CutAreaDerefed( If_Man_t * p, If_Cut_t * pCut, int nLevels )
float If_CutAreaRefed( If_Man_t * p, If_Cut_t * pCut, int nLevels )
{
float aResult, aResult2;
- assert( pCut->nLeaves > 1 );
+ assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
aResult2 = If_CutDeref( p, pCut, nLevels );
aResult = If_CutRef( p, pCut, nLevels );
assert( aResult == aResult2 );
@@ -599,6 +601,27 @@ float If_CutAreaRefed( If_Man_t * p, If_Cut_t * pCut, int nLevels )
/**Function*************************************************************
+ Synopsis [Moves the cut over the latch.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void If_CutLift( If_Cut_t * pCut )
+{
+ unsigned i;
+ for ( i = 0; i < pCut->nLeaves; i++ )
+ {
+ assert( (pCut->pLeaves[i] & 255) < 255 );
+ pCut->pLeaves[i]++;
+ }
+}
+
+/**Function*************************************************************
+
Synopsis [Computes area of the first level.]
Description [The cut need to be derefed.]