Commit d05f83b2 by Alan Mishchenko

Improvement in SOP balancing.

parent 2a399042
......@@ -681,7 +681,7 @@ int Gia_ManNodeIfSopToGia( Gia_Man_t * pNew, If_Man_t * p, If_Cut_t * pCut, Vec_
SeeAlso []
***********************************************************************/
int Gia_ManBuildFromMini( Gia_Man_t * pNew, Vec_Int_t * vLeaves, Vec_Int_t * vAig, int fHash )
int Gia_ManBuildFromMiniInt( Gia_Man_t * pNew, Vec_Int_t * vLeaves, Vec_Int_t * vAig, int fHash )
{
assert( Vec_IntSize(vAig) > 0 );
assert( Vec_IntEntryLast(vAig) < 2 );
......@@ -719,6 +719,14 @@ int Gia_ManBuildFromMini( Gia_Man_t * pNew, Vec_Int_t * vLeaves, Vec_Int_t * vAi
return iLit;
}
}
int Gia_ManBuildFromMini( Gia_Man_t * pNew, If_Man_t * pIfMan, If_Cut_t * pCut, Vec_Int_t * vLeaves, Vec_Int_t * vAig, int fHash, int fUseDsd )
{
if ( fUseDsd )
If_DsdCutBalanceAig( pIfMan, pCut, vAig );
else
If_CutDelaySopArray3( pIfMan, pCut, vAig );
return Gia_ManBuildFromMiniInt( pNew, vLeaves, vAig, fHash );
}
/**Function*************************************************************
......@@ -762,12 +770,9 @@ Gia_Man_t * Gia_ManFromIfAig( If_Man_t * pIfMan )
Vec_IntPush( vLeaves, pIfLeaf->iCopy );
// get the functionality
if ( pIfMan->pPars->fDelayOpt )
pIfObj->iCopy = Gia_ManNodeIfSopToGia( pNew, pIfMan, pCutBest, vLeaves, fHash );
pIfObj->iCopy = Gia_ManBuildFromMini( pNew, pIfMan, pCutBest, vLeaves, vAig, fHash, 0 );
else if ( pIfMan->pPars->fDsdBalance )
{
If_DsdCutBalanceAig( pIfMan, pCutBest, vAig );
pIfObj->iCopy = Gia_ManBuildFromMini( pNew, vLeaves, vAig, fHash );
}
pIfObj->iCopy = Gia_ManBuildFromMini( pNew, pIfMan, pCutBest, vLeaves, vAig, fHash, 1 );
else if ( pIfMan->pPars->fUserRecLib )
pIfObj->iCopy = Abc_RecToGia3( pNew, pIfMan, pCutBest, vLeaves, fHash );
else assert( 0 );
......
......@@ -466,8 +466,7 @@ int If_CutPinDelaysSopArray3IntInt( Vec_Int_t * vCover, int * pTimes, int nSuppA
Vec_IntForEachEntry( vCover, Entry, i )
{
nCounterAnd = 0;
// for ( k = 0; k < nSuppAll; k++ )
for ( k = nSuppAll-1; k >= 0; k-- )
for ( k = 0; k < nSuppAll; k++ )
{
Literal = 3 & (Entry >> (k << 1));
if ( Literal == 1 || Literal == 2 ) // neg or pos literal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment