From 0d1786d82952aa6381bac1b5d8aa3d0c6acc7f5a Mon Sep 17 00:00:00 2001 From: Mathias Soeken Date: Tue, 16 Aug 2016 18:32:42 +0200 Subject: Don't output if not verbose. --- src/base/exor/exor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/exor/exor.c b/src/base/exor/exor.c index db93d034..e800744c 100644 --- a/src/base/exor/exor.c +++ b/src/base/exor/exor.c @@ -825,8 +825,8 @@ int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut ) char Buffer[1000]; sprintf( Buffer, "%s", pFileNameOut ? pFileNameOut : "temp.esop" ); WriteResultIntoFile( Buffer ); - //if ( g_CoverInfo.Verbosity ) - printf( "Minimized cover has been written into file <%s>\n", Buffer ); + if ( g_CoverInfo.Verbosity ) + printf( "Minimized cover has been written into file <%s>\n", Buffer ); } /////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 2f149364eb80e162c85d79d461885482d17dd1ba Mon Sep 17 00:00:00 2001 From: Mathias Soeken Date: Tue, 16 Aug 2016 18:33:53 +0200 Subject: Provide number of max cubes as parameter. --- src/base/abci/abc.c | 20 ++++++++++++++++---- src/base/exor/exor.c | 7 ++++--- src/base/exor/exor.h | 1 + 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 2dab60c9..a3b40084 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -40401,13 +40401,13 @@ usage: ***********************************************************************/ int Abc_CommandAbc9Exorcism( Abc_Frame_t * pAbc, int argc, char ** argv ) { - extern int Abc_ExorcismMain( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut, int Quality, int Verbosity, int fUseQCost ); + extern int Abc_ExorcismMain( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut, int Quality, int Verbosity, int nCubesMax, int fUseQCost ); extern Gia_Man_t * Eso_ManCompute( Gia_Man_t * pGia, int fVerbose, Vec_Wec_t ** pvRes ); Vec_Wec_t * vEsop = NULL; char * pFileNameOut = NULL; - int c, Quality = 2, Verbosity = 0, fUseQCost = 0, fVerbose = 0; + int c, Quality = 2, Verbosity = 0, nCubesMax = 20000, fUseQCost = 0, fVerbose = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "QVqvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "QVCqvh" ) ) != EOF ) { switch ( c ) { @@ -40433,6 +40433,17 @@ int Abc_CommandAbc9Exorcism( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( Verbosity < 0 ) goto usage; break; + case 'C': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-C\" should be followed by an integer.\n" ); + goto usage; + } + nCubesMax = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + if ( nCubesMax < 0 ) + goto usage; + break; case 'q': fUseQCost ^= 1; break; @@ -40455,7 +40466,7 @@ int Abc_CommandAbc9Exorcism( Abc_Frame_t * pAbc, int argc, char ** argv ) pFileNameOut = argv[globalUtilOptind]; // generate starting cover and run minimization Eso_ManCompute( pAbc->pGia, fVerbose, &vEsop ); - Abc_ExorcismMain( vEsop, Gia_ManCiNum(pAbc->pGia), Gia_ManCoNum(pAbc->pGia), pFileNameOut, Quality, Verbosity, fUseQCost ); + Abc_ExorcismMain( vEsop, Gia_ManCiNum(pAbc->pGia), Gia_ManCoNum(pAbc->pGia), pFileNameOut, Quality, Verbosity, nCubesMax, fUseQCost ); Vec_WecFree( vEsop ); return 0; @@ -40466,6 +40477,7 @@ usage: Abc_Print( -2, " increasing this number improves quality and adds to runtime\n"); Abc_Print( -2, " -V N : verbosity level [default = %d]\n", Verbosity); Abc_Print( -2, " 0 = no output; 1 = outline; 2 = verbose\n"); + Abc_Print( -2, " -C N : maximum number of cubes in startign cover [default = %s]\n", nCubesMax ); // Abc_Print( -2, " -q : toggle using quantum cost [default = %s]\n", fUseQCost? "yes": "no" ); Abc_Print( -2, " : the output file name in ESOP-PLA format\n"); Abc_Print( -2, "\n" ); diff --git a/src/base/exor/exor.c b/src/base/exor/exor.c index e800744c..9aec90d7 100644 --- a/src/base/exor/exor.c +++ b/src/base/exor/exor.c @@ -742,9 +742,9 @@ int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut ) printf( "The number of cubes in the starting cover is %d\n", g_CoverInfo.nCubesBefore ); } - if ( g_CoverInfo.nCubesBefore > 20000 ) + if ( g_CoverInfo.nCubesBefore > g_CoverInfo.nCubesMax ) { - printf( "\nThe size of the starting cover is more than 20000 cubes. Quitting...\n" ); + printf( "\nThe size of the starting cover is more than %d cubes. Quitting...\n", g_CoverInfo.nCubesMax ); return 0; } @@ -852,11 +852,12 @@ int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut ) SeeAlso [] ***********************************************************************/ -int Abc_ExorcismMain( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut, int Quality, int Verbosity, int fUseQCost ) +int Abc_ExorcismMain( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut, int Quality, int Verbosity, int nCubesMax, int fUseQCost ) { memset( &g_CoverInfo, 0, sizeof(cinfo) ); g_CoverInfo.Quality = Quality; g_CoverInfo.Verbosity = Verbosity; + g_CoverInfo.nCubesMax = nCubesMax; g_CoverInfo.fUseQCost = fUseQCost; if ( g_CoverInfo.Verbosity ) { diff --git a/src/base/exor/exor.h b/src/base/exor/exor.h index 15a62bbe..afd9cc08 100644 --- a/src/base/exor/exor.h +++ b/src/base/exor/exor.h @@ -112,6 +112,7 @@ typedef struct cinfo_tag int Verbosity; // verbosity level int Quality; // quality + int nCubesMax; // maximum number of cubes in starting cover int fUseQCost; // use q-cost instead of literal count abctime TimeRead; // reading time -- cgit v1.2.3 From 85c751fbb89658ea7688015fbbd55dac2317dc5c Mon Sep 17 00:00:00 2001 From: Mathias Soeken Date: Tue, 16 Aug 2016 18:46:45 +0200 Subject: Functions to compute T-count. --- src/base/exor/exor.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/base/exor/exor.c b/src/base/exor/exor.c index 9aec90d7..7ae190ce 100644 --- a/src/base/exor/exor.c +++ b/src/base/exor/exor.c @@ -116,6 +116,43 @@ int ComputeQCostBits( Cube * p ) nLits += nLitsN; return QCost[Abc_MinInt(nLits, 7)][Abc_MinInt(nLitsN, 7)]; } +int ToffoliGateCount( int controls, int lines ) +{ + switch ( controls ) + { + case 0u: + case 1u: + return 0; + break; + case 2u: + return 1; + break; + case 3u: + return 4; + break; + case 4u: + return ( ( ( lines + 1 ) / 2 ) >= controls ) ? 8 : 10; + break; + default: + return ( ( ( lines + 1 ) / 2 ) >= controls ) ? 4 * ( controls - 2 ) : 8 * ( controls - 3 ); + } +} +int ComputeQCostTcount( Vec_Int_t * vCube ) +{ + return 7 * ToffoliGateCount( Vec_IntSize( vCube ), g_CoverInfo.nVarsIn + 1 ); +} +int ComputeQCostTcountBits( Cube * p ) +{ + extern varvalue GetVar( Cube* pC, int Var ); + int v, nLits = 0; + for ( v = 0; v < g_CoverInfo.nVarsIn; v++ ) + if ( GetVar( p, v ) != VAR_ABS ) + nLits++; + return 7 * ToffoliGateCount( nLits, g_CoverInfo.nVarsIn + 1 ); + + /* maybe just: 7 * ToffoliGateCount( p->a, g_CoverInfo.nVarsIn + 1 ); */ +} + /**Function************************************************************* -- cgit v1.2.3 From 433b9fe722abea70066527ecf89489834c492332 Mon Sep 17 00:00:00 2001 From: Mathias Soeken Date: Tue, 16 Aug 2016 18:55:20 +0200 Subject: Missing code for CLI integration. --- src/base/abci/abc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index a3b40084..0e06d22a 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -40471,13 +40471,13 @@ int Abc_CommandAbc9Exorcism( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - Abc_Print( -2, "usage: &exorcism [-Q N] [-V N] \n" ); + Abc_Print( -2, "usage: &exorcism [-Q N] [-V N] [-C N] \n" ); Abc_Print( -2, " performs heuristic exclusive sum-of-project minimization\n" ); Abc_Print( -2, " -Q N : minimization quality [default = %d]\n", Quality); Abc_Print( -2, " increasing this number improves quality and adds to runtime\n"); Abc_Print( -2, " -V N : verbosity level [default = %d]\n", Verbosity); Abc_Print( -2, " 0 = no output; 1 = outline; 2 = verbose\n"); - Abc_Print( -2, " -C N : maximum number of cubes in startign cover [default = %s]\n", nCubesMax ); + Abc_Print( -2, " -C N : maximum number of cubes in startign cover [default = %d]\n", nCubesMax ); // Abc_Print( -2, " -q : toggle using quantum cost [default = %s]\n", fUseQCost? "yes": "no" ); Abc_Print( -2, " : the output file name in ESOP-PLA format\n"); Abc_Print( -2, "\n" ); -- cgit v1.2.3 From 118eea846560750b60f69f11a9e546378a7c9bc7 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 17 Aug 2016 21:26:16 +0900 Subject: Changes to report quantum cost in Exorcism. --- src/aig/gia/giaEsop.c | 2 +- src/base/abci/abc.c | 4 ++-- src/base/exor/exor.c | 48 +++++++++++++++++++++++++++++++++++++++++------- src/base/exor/exor.h | 6 ++++++ src/base/exor/exorLink.c | 20 +++++++++++--------- src/base/exor/exorList.c | 7 +++++++ src/base/exor/exorUtil.c | 14 ++++++++++---- 7 files changed, 78 insertions(+), 23 deletions(-) diff --git a/src/aig/gia/giaEsop.c b/src/aig/gia/giaEsop.c index db69bf02..13627c0c 100644 --- a/src/aig/gia/giaEsop.c +++ b/src/aig/gia/giaEsop.c @@ -167,7 +167,7 @@ Vec_Wec_t * Eso_ManCoverDerive( Eso_Man_t * p, Vec_Ptr_t * vCover ) } } } - assert( Vec_WecSize(vRes) == Vec_WecCap(vRes) ); + assert( Abc_MaxInt(Vec_WecSize(vRes), 8) == Vec_WecCap(vRes) ); return vRes; } Gia_Man_t * Eso_ManCoverConvert( Eso_Man_t * p, Vec_Ptr_t * vCover ) diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 2dab60c9..8032a426 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -40460,13 +40460,13 @@ int Abc_CommandAbc9Exorcism( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - Abc_Print( -2, "usage: &exorcism [-Q N] [-V N] \n" ); + Abc_Print( -2, "usage: &exorcism [-Q N] [-V N] [-q] \n" ); Abc_Print( -2, " performs heuristic exclusive sum-of-project minimization\n" ); Abc_Print( -2, " -Q N : minimization quality [default = %d]\n", Quality); Abc_Print( -2, " increasing this number improves quality and adds to runtime\n"); Abc_Print( -2, " -V N : verbosity level [default = %d]\n", Verbosity); Abc_Print( -2, " 0 = no output; 1 = outline; 2 = verbose\n"); -// Abc_Print( -2, " -q : toggle using quantum cost [default = %s]\n", fUseQCost? "yes": "no" ); + Abc_Print( -2, " -q : toggle using quantum cost [default = %s]\n", fUseQCost? "yes": "no" ); Abc_Print( -2, " : the output file name in ESOP-PLA format\n"); Abc_Print( -2, "\n" ); return 1; diff --git a/src/base/exor/exor.c b/src/base/exor/exor.c index db93d034..2b8f0903 100644 --- a/src/base/exor/exor.c +++ b/src/base/exor/exor.c @@ -90,16 +90,48 @@ static int QCost[16][16] = { 56, 56, 56, 56, 58, 60, 62, 64}, // 7 { 0 } }; -int CountNegLits( Vec_Int_t * vCube ) +int GetQCost( int nVars, int nNegs ) { - int i, Entry, nLits = 0; - Vec_IntForEachEntry( vCube, Entry, i ) - nLits += Abc_LitIsCompl(Entry); - return nLits; + int Extra; + assert( nVars >= nNegs ); + if ( nVars == 0 ) + return 1; + if ( nVars == 1 ) + { + if ( nNegs == 0 ) return 1; + if ( nNegs == 1 ) return 2; + } + if ( nVars == 2 ) + { + if ( nNegs <= 1 ) return 5; + if ( nNegs == 2 ) return 6; + } + if ( nVars == 3 ) + { + if ( nNegs <= 1 ) return 14; + if ( nNegs == 2 ) return 16; + if ( nNegs == 3 ) return 18; + } + Extra = nNegs - nVars/2; + return 20 + 12 * (nVars - 4) + (Extra > 0 ? 2 * Extra : 0); + +} +void GetQCostTest() +{ + int i, k, Limit = 10; + for ( i = 0; i < Limit; i++ ) + { + for ( k = 0; k <= i; k++ ) + printf( "%4d ", GetQCost(i, k) ); + printf( "\n" ); + } } int ComputeQCost( Vec_Int_t * vCube ) { - return QCost[Abc_MinInt(Vec_IntSize(vCube), 7)][Abc_MinInt(CountNegLits(vCube), 7)]; + int i, Entry, nLitsN = 0; + Vec_IntForEachEntry( vCube, Entry, i ) + nLitsN += Abc_LitIsCompl(Entry); + return GetQCost( Vec_IntSize(vCube), nLitsN ); } int ComputeQCostBits( Cube * p ) { @@ -114,7 +146,7 @@ int ComputeQCostBits( Cube * p ) nLits++; } nLits += nLitsN; - return QCost[Abc_MinInt(nLits, 7)][Abc_MinInt(nLitsN, 7)]; + return GetQCost( nLits, nLitsN ); } /**Function************************************************************* @@ -858,6 +890,8 @@ int Abc_ExorcismMain( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOu g_CoverInfo.Quality = Quality; g_CoverInfo.Verbosity = Verbosity; g_CoverInfo.fUseQCost = fUseQCost; + if ( fUseQCost ) + s_fDecreaseLiterals = 1; if ( g_CoverInfo.Verbosity ) { printf( "\nEXORCISM, Ver.4.7: Exclusive Sum-of-Product Minimizer\n" ); diff --git a/src/base/exor/exor.h b/src/base/exor/exor.h index 15a62bbe..019b66c5 100644 --- a/src/base/exor/exor.h +++ b/src/base/exor/exor.h @@ -167,6 +167,12 @@ extern int FindDiffVars( int *pDiffVars, Cube* pC1, Cube* pC2 ); // determines the variables that are different in cubes pC1 and pC2 // returns the number of variables +extern int ComputeQCost( Vec_Int_t * vCube ); +extern int ComputeQCostBits( Cube * p ); + +extern int CountLiterals(); +extern int CountQCost(); + //////////////////////////////////////////////////////////////////////// /// VARVALUE and CUBEDIST enum typedefs /// //////////////////////////////////////////////////////////////////////// diff --git a/src/base/exor/exorLink.c b/src/base/exor/exorLink.c index fef0d4ca..2d260a27 100644 --- a/src/base/exor/exorLink.c +++ b/src/base/exor/exorLink.c @@ -335,7 +335,6 @@ static int DiffVarBits[5]; static drow MaskLiterals; // the base for counting literals static int StartingLiterals; -static int StartingQCost; // the number of literals in each cube static int CubeLiterals[32]; static int BitShift; @@ -525,9 +524,6 @@ int ExorLinkCubeIteratorStart( Cube** pGroup, Cube* pC1, Cube* pC2, cubedist Dis NewZ += BIT_COUNT(Temp); } } - // set the number of literals - ELCubes[CubeNum]->a = StartingLiterals + CubeLiterals[CubeNum]; - ELCubes[CubeNum]->z = NewZ; // set the variables that should be there for ( i = 0; i < nDiffVarsIn; i++ ) @@ -536,6 +532,11 @@ int ExorLinkCubeIteratorStart( Cube** pGroup, Cube* pC1, Cube* pC2, cubedist Dis ELCubes[CubeNum]->pCubeDataIn[ DiffVarWords[i] ] |= ( Value << DiffVarBits[i] ); } + // set the number of literals + ELCubes[CubeNum]->a = StartingLiterals + CubeLiterals[CubeNum]; + ELCubes[CubeNum]->z = NewZ; + ELCubes[CubeNum]->q = ComputeQCostBits( ELCubes[CubeNum] ); + // assign the ID ELCubes[CubeNum]->ID = g_CoverInfo.cIDs++; // skip through zero-ID @@ -645,11 +646,6 @@ int ExorLinkCubeIteratorNext( Cube** pGroup ) NewZ += BIT_COUNT(Temp); } } - // set the number of literals and output ones - ELCubes[CubeNum]->a = StartingLiterals + CubeLiterals[CubeNum]; - ELCubes[CubeNum]->z = NewZ; - - assert( NewZ != 255 ); // set the variables that should be there for ( i = 0; i < nDiffVarsIn; i++ ) @@ -658,6 +654,12 @@ int ExorLinkCubeIteratorNext( Cube** pGroup ) ELCubes[CubeNum]->pCubeDataIn[ DiffVarWords[i] ] |= ( Value << DiffVarBits[i] ); } + // set the number of literals and output ones + ELCubes[CubeNum]->a = StartingLiterals + CubeLiterals[CubeNum]; + ELCubes[CubeNum]->z = NewZ; + ELCubes[CubeNum]->q = ComputeQCostBits( ELCubes[CubeNum] ); + assert( NewZ != 255 ); + // assign the ID ELCubes[CubeNum]->ID = g_CoverInfo.cIDs++; // skip through zero-ID diff --git a/src/base/exor/exorList.c b/src/base/exor/exorList.c index 6dc9f231..18b11c6f 100644 --- a/src/base/exor/exorList.c +++ b/src/base/exor/exorList.c @@ -393,6 +393,8 @@ SUCCESS: printf( " NoResh= %4d", s_cAttempts - s_cReshapes ); printf( " Cubes= %3d", g_CoverInfo.nCubesInUse ); printf( " (%d)", s_nCubesBefore - g_CoverInfo.nCubesInUse ); + printf( " Lits= %5d", CountLiterals() ); + printf( " QCost = %6d", CountQCost() ); printf( "\n" ); } @@ -510,6 +512,8 @@ END_OF_LOOP: {} printf( " NoResh= %4d", s_cAttempts - s_cReshapes ); printf( " Cubes= %3d", g_CoverInfo.nCubesInUse ); printf( " (%d)", s_nCubesBefore - g_CoverInfo.nCubesInUse ); + printf( " Lits= %5d", CountLiterals() ); + printf( " QCost = %6d", CountQCost() ); printf( "\n" ); } @@ -619,6 +623,8 @@ END_OF_LOOP: {} printf( " NoResh= %4d", s_cAttempts - s_cReshapes ); printf( " Cubes= %3d", g_CoverInfo.nCubesInUse ); printf( " (%d)", s_nCubesBefore - g_CoverInfo.nCubesInUse ); + printf( " Lits= %5d", CountLiterals() ); + printf( " QCost = %6d", CountQCost() ); printf( "\n" ); } @@ -709,6 +715,7 @@ int CheckForCloseCubes( Cube* p, int fAddCube ) p->a--; if ( s_DiffVarValueP_new == VAR_NEG || s_DiffVarValueP_new == VAR_POS ) p->a++; + p->q = ComputeQCostBits(p); } // move q to the free cube list diff --git a/src/base/exor/exorUtil.c b/src/base/exor/exorUtil.c index 45c9542b..105a6490 100644 --- a/src/base/exor/exorUtil.c +++ b/src/base/exor/exorUtil.c @@ -75,7 +75,15 @@ extern varvalue GetVar( Cube* pC, int Var ); /////////////////////////////////////////////////////////////////// int CountLiterals() -// nCubesAlloc is the number of allocated cubes +{ + Cube* p; + int LitCounter = 0; + for ( p = IterCubeSetStart( ); p; p = IterCubeSetNext() ) + LitCounter += p->a; + return LitCounter; +} + +int CountLiteralsCheck() { Cube* p; int Value, v; @@ -109,9 +117,7 @@ int CountLiterals() } int CountQCost() -// nCubesAlloc is the number of allocated cubes { - extern int ComputeQCostBits( Cube * p ); Cube* p; int QCost = 0; int QCostControl = 0; @@ -191,7 +197,7 @@ int WriteResultIntoFile( char * pFileName ) time( <ime ); TimeStr = asctime( localtime( <ime ) ); // get the number of literals - g_CoverInfo.nLiteralsAfter = CountLiterals(); + g_CoverInfo.nLiteralsAfter = CountLiteralsCheck(); g_CoverInfo.QCostAfter = CountQCost(); fprintf( pFile, "# EXORCISM-4 output for command line arguments: " ); fprintf( pFile, "\"-Q %d -V %d\"\n", g_CoverInfo.Quality, g_CoverInfo.Verbosity ); -- cgit v1.2.3 From 621fbcbd4dcb21e62a2c84c5664b0fcf0d0ee0fe Mon Sep 17 00:00:00 2001 From: Bruno Schmitt Date: Thu, 18 Aug 2016 16:36:55 -0300 Subject: Small bug fix in FXCH. --- src/opt/fxch/FxchMan.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/opt/fxch/FxchMan.c b/src/opt/fxch/FxchMan.c index 19ce1461..522cc5b8 100644 --- a/src/opt/fxch/FxchMan.c +++ b/src/opt/fxch/FxchMan.c @@ -395,7 +395,7 @@ static inline void Fxch_ManExtractDivFromCubePairs( Fxch_Man_t* pFxchMan, Vec_IntForEachEntryDouble( pFxchMan->vPairs, iCube0, iCube1, i ) { int j, Lit, - RetValue, + RetValue, fCompl = 0; int * pOutputID0, * pOutputID1; @@ -431,9 +431,9 @@ static inline void Fxch_ManExtractDivFromCubePairs( Fxch_Man_t* pFxchMan, /* Update Lit -> Cube mapping */ Vec_IntForEachEntry( pFxchMan->vDiv, Lit, j ) { - Vec_IntRemove( Vec_WecEntry( pFxchMan->vLits, Abc_Lit2Var( Lit ) ), + Vec_IntRemove( Vec_WecEntry( pFxchMan->vLits, Abc_Lit2Var( Lit ) ), Vec_WecLevelId( pFxchMan->vCubes, vCube0 ) ); - Vec_IntRemove( Vec_WecEntry( pFxchMan->vLits, Abc_LitNot( Abc_Lit2Var( Lit ) ) ), + Vec_IntRemove( Vec_WecEntry( pFxchMan->vLits, Abc_LitNot( Abc_Lit2Var( Lit ) ) ), Vec_WecLevelId( pFxchMan->vCubes, vCube0 ) ); } @@ -447,7 +447,7 @@ static inline void Fxch_ManExtractDivFromCubePairs( Fxch_Man_t* pFxchMan, /* Create new cube */ vCube = Vec_WecPushLevel( pFxchMan->vCubes ); Vec_IntAppend( vCube, vCube0Copy ); - Vec_IntPushArray( pFxchMan->vOutputID, pFxchMan->pTempOutputID, pFxchMan->nSizeOutputID ); + Vec_IntPushArray( pFxchMan->vOutputID, pFxchMan->pTempOutputID, pFxchMan->nSizeOutputID ); Vec_IntPush( pFxchMan->vCubesToUpdate, Vec_WecLevelId( pFxchMan->vCubes, vCube ) ); /* Update Lit -> Cube mapping */ @@ -489,7 +489,7 @@ static inline void Fxch_ManExtractDivFromCubePairs( Fxch_Man_t* pFxchMan, { Vec_Int_t* vLitP = Vec_WecEntry( pFxchMan->vLits, Vec_WecSize( pFxchMan->vLits ) - 2 ), * vLitN = Vec_WecEntry( pFxchMan->vLits, Vec_WecSize( pFxchMan->vLits ) - 1 ); - + assert( vCube ); if ( Vec_IntSize( pFxchMan->vDiv ) == 2 || fCompl ) { @@ -514,11 +514,11 @@ static inline int Fxch_ManCreateCube( Fxch_Man_t* pFxchMan, int Lit1 ) { int Level, - iVarNew, + iVarNew, j; Vec_Int_t* vCube0, * vCube1; - + /* Create a new variable */ iVarNew = pFxchMan->nVars; pFxchMan->nVars++; @@ -526,7 +526,7 @@ static inline int Fxch_ManCreateCube( Fxch_Man_t* pFxchMan, /* Clear temporary outputID vector */ for ( j = 0; j < pFxchMan->nSizeOutputID; j++ ) pFxchMan->pTempOutputID[j] = 0; - + /* Create new Lit hash keys */ Vec_IntPush( pFxchMan->vLitHashKeys, Gia_ManRandom(0) & 0x3FFFFFF ); Vec_IntPush( pFxchMan->vLitHashKeys, Gia_ManRandom(0) & 0x3FFFFFF ); @@ -657,7 +657,7 @@ void Fxch_ManUpdate( Fxch_Man_t* pFxchMan, } else Fxch_ManExtractDivFromCubePairs( pFxchMan, 0 ); - + assert( Vec_IntSize( pFxchMan->vCubesToUpdate ) ); /* Add cost */ @@ -670,7 +670,7 @@ void Fxch_ManUpdate( Fxch_Man_t* pFxchMan, } /* Deal with SCC */ - if ( Vec_IntSize( pFxchMan->vSCC ) && pFxchMan->nExtDivs < 17 ) + if ( Vec_IntSize( pFxchMan->vSCC ) ) { Vec_IntUniqifyPairs( pFxchMan->vSCC ); assert( Vec_IntSize( pFxchMan->vSCC ) % 2 == 0 ); -- cgit v1.2.3