diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-02-26 15:23:04 -0500 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-02-26 15:23:04 -0500 |
commit | a1c543c6c9162b30440a50d7cb00e35facd69e87 (patch) | |
tree | 42b07976e88c50b4aee80d90855a57b305f079b1 /src/aig | |
parent | 044d2f0aba58fe623496a9ec90d9999c8e8c6875 (diff) | |
download | abc-a1c543c6c9162b30440a50d7cb00e35facd69e87.tar.gz abc-a1c543c6c9162b30440a50d7cb00e35facd69e87.tar.bz2 abc-a1c543c6c9162b30440a50d7cb00e35facd69e87.zip |
User-controlable SAT sweeper.
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/gia/giaSweeper.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/aig/gia/giaSweeper.c b/src/aig/gia/giaSweeper.c index 188a021c..0b1c647a 100644 --- a/src/aig/gia/giaSweeper.c +++ b/src/aig/gia/giaSweeper.c @@ -124,6 +124,7 @@ static inline Swp_Man_t * Swp_ManStart( Gia_Man_t * pGia ) p->vCexSwp = Vec_IntAlloc( 100 ); p->pSat = sat_solver_new(); p->nSatVars = 1; + sat_solver_setnvars( p->pSat, 1000 ); Swp_ManSetObj2Lit( p, 0, (Lit = Abc_Var2Lit(p->nSatVars++, 0)) ); Lit = Abc_LitNot(Lit); sat_solver_addclause( p->pSat, &Lit, &Lit + 1 ); @@ -324,7 +325,10 @@ Gia_Man_t * Gia_SweeperExtractUserLogic( Gia_Man_t * p, Vec_Int_t * vProbeIds, V // save values vValues = Vec_IntAlloc( Gia_ManObjNum(p) ); Gia_ManForEachObj( p, pObj, i ) + { Vec_IntPush( vValues, pObj->Value ); + pObj->Value = ~0; + } // create new Gia_ManIncrementTravId( p ); vObjIds = Vec_IntAlloc( 1000 ); @@ -350,7 +354,7 @@ Gia_Man_t * Gia_SweeperExtractUserLogic( Gia_Man_t * p, Vec_Int_t * vProbeIds, V Vec_IntForEachEntry( vProbeIds, ProbeId, i ) { pObj = Gia_Lit2Obj( p, Gia_SweeperProbeLit(p, ProbeId) ); - Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(Gia_Regular(pObj)) ^ Gia_IsComplement(pObj) ); + Gia_ManAppendCo( pNew, Gia_Regular(pObj)->Value ^ Gia_IsComplement(pObj) ); } // duplicated if needed if ( Gia_ManHasDangling(pNew) ) @@ -504,7 +508,7 @@ static void Gia_ManCollectSuper_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t // stop at complements, shared, PIs, and MUXes if ( Gia_IsComplement(pObj) || pObj->fMark1 || Gia_ObjIsCi(pObj) || Gia_ObjIsMuxType(pObj) ) { - Vec_IntPushUnique( vSuper, Gia_ObjId(p, pObj) ); + Vec_IntPushUnique( vSuper, Gia_Obj2Lit(p, pObj) ); return; } Gia_ManCollectSuper_rec( p, Gia_ObjChild0(pObj), vSuper ); |