summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaUtil.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-04-27 18:37:39 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-04-27 18:37:39 -0700
commit613e8b2ad6b24369467179b15c2ab2638f9b8672 (patch)
tree4dc851dd295a5f7703cb018af20847e001712d67 /src/aig/gia/giaUtil.c
parent324d73c29a22766063df46f9e35a3cbe719a83c2 (diff)
downloadabc-613e8b2ad6b24369467179b15c2ab2638f9b8672.tar.gz
abc-613e8b2ad6b24369467179b15c2ab2638f9b8672.tar.bz2
abc-613e8b2ad6b24369467179b15c2ab2638f9b8672.zip
SAT sweeping under constraints.
Diffstat (limited to 'src/aig/gia/giaUtil.c')
-rw-r--r--src/aig/gia/giaUtil.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c
index 6f4389a8..1d122112 100644
--- a/src/aig/gia/giaUtil.c
+++ b/src/aig/gia/giaUtil.c
@@ -366,6 +366,16 @@ void Gia_ManSetPhase( Gia_Man_t * p )
Gia_ManForEachObj( p, pObj, i )
Gia_ObjSetPhase( pObj );
}
+void Gia_ManSetPhasePattern( Gia_Man_t * p, Vec_Int_t * vCiValues )
+{
+ Gia_Obj_t * pObj;
+ int i;
+ Gia_ManForEachObj( p, pObj, i )
+ if ( Gia_ObjIsCi(pObj) )
+ pObj->fPhase = Vec_IntEntry( vCiValues, Gia_ObjCioId(pObj) );
+ else
+ Gia_ObjSetPhase( pObj );
+}
/**Function*************************************************************
@@ -410,6 +420,26 @@ void Gia_ManCleanPhase( Gia_Man_t * p )
/**Function*************************************************************
+ Synopsis [Returns the number of COs whose value is 1.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+int Gia_ManCheckCoPhase( Gia_Man_t * p )
+{
+ Gia_Obj_t * pObj;
+ int i, Counter = 0;
+ Gia_ManForEachCo( p, pObj, i )
+ Counter += pObj->fPhase;
+ return Counter;
+}
+
+/**Function*************************************************************
+
Synopsis [Prepares copies for the model.]
Description []