summaryrefslogtreecommitdiffstats
path: root/src/aig/mfx/mfxResub.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2009-01-18 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2009-01-18 08:01:00 -0800
commitf936cc0680c98ffe51b3a1716c996072d5dbf76c (patch)
tree784a2a809fb6b972ec6a8e2758ab758ca590d01a /src/aig/mfx/mfxResub.c
parentc9ad5880cc61787dec6d018111b63023407ce0e6 (diff)
downloadabc-f936cc0680c98ffe51b3a1716c996072d5dbf76c.tar.gz
abc-f936cc0680c98ffe51b3a1716c996072d5dbf76c.tar.bz2
abc-f936cc0680c98ffe51b3a1716c996072d5dbf76c.zip
Version abc90118
Diffstat (limited to 'src/aig/mfx/mfxResub.c')
-rw-r--r--src/aig/mfx/mfxResub.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/aig/mfx/mfxResub.c b/src/aig/mfx/mfxResub.c
index 006656ee..312ae226 100644
--- a/src/aig/mfx/mfxResub.c
+++ b/src/aig/mfx/mfxResub.c
@@ -206,6 +206,8 @@ p->timeInt += clock() - clk;
iVar = -1;
while ( 1 )
{
+ float * pProbab = (float *)(p->vProbs? p->vProbs->pArray : NULL);
+ assert( (pProbab != NULL) == p->pPars->fPower );
if ( fVeryVerbose )
{
printf( "%3d: %2d ", p->nCexes, iVar );
@@ -222,6 +224,13 @@ p->timeInt += clock() - clk;
assert( nWords <= p->nDivWords );
for ( iVar = 0; iVar < Vec_PtrSize(p->vDivs)-Nwk_ObjFaninNum(pNode); iVar++ )
{
+ if ( p->pPars->fPower )
+ {
+ Nwk_Obj_t * pDiv = Vec_PtrEntry(p->vDivs, iVar);
+ // only accept the divisor if it is "cool"
+ if ( pProbab[Nwk_ObjId(pDiv)] >= 0.2 )
+ continue;
+ }
pData = Vec_PtrEntry( p->vDivCexes, iVar );
for ( w = 0; w < nWords; w++ )
if ( pData[w] != ~0 )
@@ -431,6 +440,33 @@ int Mfx_EdgeSwapEval( Mfx_Man_t * p, Nwk_Obj_t * pNode )
/**Function*************************************************************
+ Synopsis [Evaluates the possibility of replacing given edge by another edge.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+int Mfx_EdgePower( Mfx_Man_t * p, Nwk_Obj_t * pNode )
+{
+ Nwk_Obj_t * pFanin;
+ float * pProbab = (float *)p->vProbs->pArray;
+ int i;
+ // try replacing area critical fanins
+ Nwk_ObjForEachFanin( pNode, pFanin, i )
+ if ( pProbab[pFanin->Id] >= 0.4 )
+ {
+ if ( Mfx_SolveSatResub( p, pNode, i, 0, 0 ) )
+ return 1;
+ }
+ return 0;
+}
+
+
+/**Function*************************************************************
+
Synopsis [Performs resubstitution for the node.]
Description []