diff options
-rw-r--r-- | src/aig/gia/giaNf.c | 11 | ||||
-rw-r--r-- | src/aig/gia/giaPf.c | 11 | ||||
-rw-r--r-- | src/base/abc/abcDfs.c | 10 | ||||
-rw-r--r-- | src/base/cba/cba.h | 4 | ||||
-rw-r--r-- | src/base/cmd/cmd.c | 1 | ||||
-rw-r--r-- | src/sat/bsat/satSolver2.c | 2 |
6 files changed, 22 insertions, 17 deletions
diff --git a/src/aig/gia/giaNf.c b/src/aig/gia/giaNf.c index 7c82e70d..83000f94 100644 --- a/src/aig/gia/giaNf.c +++ b/src/aig/gia/giaNf.c @@ -38,6 +38,7 @@ ABC_NAMESPACE_IMPL_START #define NF_LEAF_MAX 6 #define NF_CUT_MAX 32 #define NF_NO_LEAF 31 +#define NF_NO_FUNC 0x3FFFFFF #define NF_INFINITY FLT_MAX typedef struct Nf_Cut_t_ Nf_Cut_t; @@ -46,7 +47,7 @@ struct Nf_Cut_t_ word Sign; // signature int Delay; // delay float Flow; // flow - unsigned iFunc : 26; // function + unsigned iFunc : 26; // function (NF_NO_FUNC) unsigned Useless : 1; // function unsigned nLeaves : 5; // leaf number (NF_NO_LEAF) int pLeaves[NF_LEAF_MAX+1]; // leaves @@ -645,7 +646,7 @@ static inline int Nf_CutMergeOrder( Nf_Cut_t * pCut0, Nf_Cut_t * pCut1, Nf_Cut_t pC[i] = pC0[i]; } pCut->nLeaves = nLutSize; - pCut->iFunc = -1; + pCut->iFunc = NF_NO_FUNC; pCut->Sign = pCut0->Sign | pCut1->Sign; return 1; } @@ -679,7 +680,7 @@ FlushCut0: while ( i < nSize0 ) pC[c++] = pC0[i++]; pCut->nLeaves = c; - pCut->iFunc = -1; + pCut->iFunc = NF_NO_FUNC; pCut->Sign = pCut0->Sign | pCut1->Sign; return 1; @@ -688,7 +689,7 @@ FlushCut1: while ( k < nSize1 ) pC[c++] = pC1[k++]; pCut->nLeaves = c; - pCut->iFunc = -1; + pCut->iFunc = NF_NO_FUNC; pCut->Sign = pCut0->Sign | pCut1->Sign; return 1; } @@ -712,7 +713,7 @@ static inline int Nf_CutMergeOrderMux( Nf_Cut_t * pCut0, Nf_Cut_t * pCut1, Nf_Cu if (x2 == xMin) i2++; } pCut->nLeaves = c; - pCut->iFunc = -1; + pCut->iFunc = NF_NO_FUNC; pCut->Sign = pCut0->Sign | pCut1->Sign | pCut2->Sign; return 1; } diff --git a/src/aig/gia/giaPf.c b/src/aig/gia/giaPf.c index 21c94cd5..703e3912 100644 --- a/src/aig/gia/giaPf.c +++ b/src/aig/gia/giaPf.c @@ -38,6 +38,7 @@ ABC_NAMESPACE_IMPL_START #define PF_LEAF_MAX 6 #define PF_CUT_MAX 32 #define PF_NO_LEAF 31 +#define PF_NO_FUNC 0x3FFFFFF #define PF_INFINITY FLT_MAX typedef struct Pf_Cut_t_ Pf_Cut_t; @@ -46,7 +47,7 @@ struct Pf_Cut_t_ word Sign; // signature int Delay; // delay float Flow; // flow - unsigned iFunc : 26; // function + unsigned iFunc : 26; // function (PF_NO_FUNC) unsigned Useless : 1; // function unsigned nLeaves : 5; // leaf number (PF_NO_LEAF) int pLeaves[PF_LEAF_MAX+1]; // leaves @@ -600,7 +601,7 @@ static inline int Pf_CutMergeOrder( Pf_Cut_t * pCut0, Pf_Cut_t * pCut1, Pf_Cut_t pC[i] = pC0[i]; } pCut->nLeaves = nLutSize; - pCut->iFunc = -1; + pCut->iFunc = PF_NO_FUNC; pCut->Sign = pCut0->Sign | pCut1->Sign; return 1; } @@ -634,7 +635,7 @@ FlushCut0: while ( i < nSize0 ) pC[c++] = pC0[i++]; pCut->nLeaves = c; - pCut->iFunc = -1; + pCut->iFunc = PF_NO_FUNC; pCut->Sign = pCut0->Sign | pCut1->Sign; return 1; @@ -643,7 +644,7 @@ FlushCut1: while ( k < nSize1 ) pC[c++] = pC1[k++]; pCut->nLeaves = c; - pCut->iFunc = -1; + pCut->iFunc = PF_NO_FUNC; pCut->Sign = pCut0->Sign | pCut1->Sign; return 1; } @@ -667,7 +668,7 @@ static inline int Pf_CutMergeOrderMux( Pf_Cut_t * pCut0, Pf_Cut_t * pCut1, Pf_Cu if (x2 == xMin) i2++; } pCut->nLeaves = c; - pCut->iFunc = -1; + pCut->iFunc = PF_NO_FUNC; pCut->Sign = pCut0->Sign | pCut1->Sign | pCut2->Sign; return 1; } diff --git a/src/base/abc/abcDfs.c b/src/base/abc/abcDfs.c index 811a6929..8784ec1a 100644 --- a/src/base/abc/abcDfs.c +++ b/src/base/abc/abcDfs.c @@ -88,11 +88,13 @@ Vec_Ptr_t * Abc_NtkDfs( Abc_Ntk_t * pNtk, int fCollectAll ) // start the array of nodes vNodes = Vec_PtrAlloc( 100 ); if ( pNtk->nBarBufs2 > 0 ) - Abc_NtkForEachBarBuf( pNtk, pObj, i ) { - Abc_NodeSetTravIdCurrent( pObj ); - Abc_NtkDfs_rec( Abc_ObjFanin0Ntk(Abc_ObjFanin0(pObj)), vNodes ); - Vec_PtrPush( vNodes, pObj ); + Abc_NtkForEachBarBuf( pNtk, pObj, i ) + { + Abc_NodeSetTravIdCurrent( pObj ); + Abc_NtkDfs_rec( Abc_ObjFanin0Ntk(Abc_ObjFanin0(pObj)), vNodes ); + Vec_PtrPush( vNodes, pObj ); + } } Abc_NtkForEachCo( pNtk, pObj, i ) { diff --git a/src/base/cba/cba.h b/src/base/cba/cba.h index 33030f35..b9a02a01 100644 --- a/src/base/cba/cba.h +++ b/src/base/cba/cba.h @@ -294,8 +294,8 @@ static inline void Cba_ObjSetName( Cba_Ntk_t * p, int i, int x ) { a static inline void Cba_ObjSetCopy( Cba_Ntk_t * p, int i, int x ) { assert(Cba_ObjCopy(p, i) == -1); Vec_IntSetEntry( &p->vCopy, i, x ); } static inline int Cba_ObjGetConst( Cba_Ntk_t * p, int i ) { assert(Cba_ObjIsCi(p, i)); return Cba_ObjIsBo(p, i) && Cba_ObjIsConst(p, i-1) ? Cba_ObjType(p, i-1) : 0; } -static inline int Cba_BoxBiNum( Cba_Ntk_t * p, int i ) { int s = i-1; assert(Cba_ObjIsBox(p, i)); while (--i >= 0 && Cba_ObjIsBi(p, i)); return s - i; } -static inline int Cba_BoxBoNum( Cba_Ntk_t * p, int i ) { int s = i+1; assert(Cba_ObjIsBox(p, i)); while (++i < Cba_NtkObjNum(p) && Cba_ObjIsBo(p, i)); return i - s; } +static inline int Cba_BoxBiNum( Cba_Ntk_t * p, int i ) { int s = i-1; assert(Cba_ObjIsBox(p, i)); while (--i >= 0 && Cba_ObjIsBi(p, i)) {} return s - i; } +static inline int Cba_BoxBoNum( Cba_Ntk_t * p, int i ) { int s = i+1; assert(Cba_ObjIsBox(p, i)); while (++i < Cba_NtkObjNum(p) && Cba_ObjIsBo(p, i)) {} return i - s; } static inline int Cba_BoxSize( Cba_Ntk_t * p, int i ) { return 1 + Cba_BoxBiNum(p, i) + Cba_BoxBoNum(p, i); } static inline int Cba_BoxBi( Cba_Ntk_t * p, int b, int i ) { assert(Cba_ObjIsBox(p, b)); return b - 1 - i; } static inline int Cba_BoxBo( Cba_Ntk_t * p, int b, int i ) { assert(Cba_ObjIsBox(p, b)); return b + 1 + i; } diff --git a/src/base/cmd/cmd.c b/src/base/cmd/cmd.c index 8b536a5f..55402fc5 100644 --- a/src/base/cmd/cmd.c +++ b/src/base/cmd/cmd.c @@ -2316,6 +2316,7 @@ int CmdCommandCapo( Abc_Frame_t * pAbc, int argc, char **argv ) pProgNameGnuplotUnix = Cmd_FlagReadByName(pAbc, "gnuplotunix"); // check if Gnuplot is available + pProgNameGnuplot = NULL; if ( (pFile = fopen( pProgNameGnuplotWin, "r" )) ) pProgNameGnuplot = pProgNameGnuplotWin; else if ( (pFile = fopen( pProgNameGnuplotUnix, "r" )) ) diff --git a/src/sat/bsat/satSolver2.c b/src/sat/bsat/satSolver2.c index 96656b5b..7a4470f1 100644 --- a/src/sat/bsat/satSolver2.c +++ b/src/sat/bsat/satSolver2.c @@ -67,7 +67,7 @@ static inline int irand(double* seed, int size) { //================================================================================================= // Variable datatype + minor functions: -static const int var0 = 1; +//static const int var0 = 1; static const int var1 = 0; static const int varX = 3; |