summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-08-01 08:59:02 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-08-01 08:59:02 -0700
commite7ddde3f5a92e75496a7bd5d95315ef8cce7bd18 (patch)
tree3b00d983b93c901ebb789d7060d816ad38514528
parente3e4a987925879bd6d116733194d93ccf0527c62 (diff)
downloadabc-e7ddde3f5a92e75496a7bd5d95315ef8cce7bd18.tar.gz
abc-e7ddde3f5a92e75496a7bd5d95315ef8cce7bd18.tar.bz2
abc-e7ddde3f5a92e75496a7bd5d95315ef8cce7bd18.zip
Scalable gate-level abstraction.
-rw-r--r--src/aig/gia/giaAbsGla2.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/aig/gia/giaAbsGla2.c b/src/aig/gia/giaAbsGla2.c
index 2960ddff..d82bd609 100644
--- a/src/aig/gia/giaAbsGla2.c
+++ b/src/aig/gia/giaAbsGla2.c
@@ -240,9 +240,9 @@ int Ga2_ManMarkup( Gia_Man_t * p, int N )
Vec_Int_t * vLeaves;
Gia_Obj_t * pObj;
int i, k, Leaf, CountMarks;
+
vLeaves = Vec_IntAlloc( 100 );
-/*
// label nodes with multiple fanouts and inputs MUXes
Gia_ManForEachObj( p, pObj, i )
{
@@ -278,9 +278,9 @@ int Ga2_ManMarkup( Gia_Man_t * p, int N )
if ( Vec_IntSize(vLeaves) > N )
Ga2_ManBreakTree_rec( p, pObj, 1, N );
}
-*/
- Gia_ManForEachObj( p, pObj, i )
- pObj->fPhase = !Gia_ObjIsCo(pObj);
+
+// Gia_ManForEachObj( p, pObj, i )
+// pObj->fPhase = !Gia_ObjIsCo(pObj);
// verify that the tree is split correctly
Vec_IntFreeP( &p->vMapping );
@@ -708,6 +708,14 @@ void Ga2_ManAddAbsClauses( Ga2_Man_t * p, int f )
Lit = Abc_LitNot( Lit );
sat_solver2_addclause( p->pSat, &Lit, &Lit + 1, -1 );
}
+ // add variables for the leaves
+ Gia_ManForEachObjVec( p->vValues, p->pGia, pObj, i )
+ {
+ if ( !i ) continue;
+ if ( i == p->LimAbs )
+ break;
+ Ga2_ManAddToAbsOneStatic( p, pObj, f );
+ }
Gia_ManForEachObjVec( p->vAbs, p->pGia, pObj, i )
if ( i >= p->LimAbs )
Ga2_ManAddToAbsOneStatic( p, pObj, f );
@@ -1225,7 +1233,10 @@ int Ga2_ManPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
// add static clauses to this timeframe
Ga2_ManAddAbsClauses( p, f );
// get the output literal
- Lit = Ga2_ManUnroll_rec( p, Gia_ManPo(pAig,0), f );
+// Lit = Ga2_ManUnroll_rec( p, Gia_ManPo(pAig,0), f );
+ Lit = Ga2_ObjFindLit( p, Gia_ObjFanin0(Gia_ManPo(pAig,0)), f );
+ assert( Lit >= 0 );
+ Lit = Abc_LitNotCond( Lit, Gia_ObjFaninC0(Gia_ManPo(pAig,0)) );
// check for counter-examples
nVarsOld = p->nSatVars;
for ( c = 0; ; c++ )