diff options
Diffstat (limited to 'src/aig/gia/giaUtil.c')
-rw-r--r-- | src/aig/gia/giaUtil.c | 30 |
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 [] |