31static inline int Gia_ObjIsInGla(
Gia_Man_t *
p,
Gia_Obj_t * pObj ) {
return Vec_IntEntry(
p->vGateClasses, Gia_ObjId(
p, pObj)); }
32static inline void Gia_ObjAddToGla(
Gia_Man_t *
p,
Gia_Obj_t * pObj ) { Vec_IntWriteEntry(
p->vGateClasses, Gia_ObjId(
p, pObj), 1); }
33static inline void Gia_ObjRemFromGla(
Gia_Man_t *
p,
Gia_Obj_t * pObj ) { Vec_IntWriteEntry(
p->vGateClasses, Gia_ObjId(
p, pObj), 0); }
55 int nFrames = iFrame0 ? iFrame0 + 1 : 10000000;
56 int nNodeDelta = 2000;
61 RetValue =
Saig_BmcPerform( pAig, nStart, nFrames, nNodeDelta, nTimeOut, nBTLimit, nBTLimitAll, fVerbose, 0, &iFrame, 1, 0 );
62 assert( RetValue == 0 || RetValue == -1 );
70 int i, iFrame0, iFrame;
71 int nTotal = 0, nRemoved = 0;
73 abctime clk, clkTotal = Abc_Clock();
75 assert(
p->vGateClasses != NULL );
76 vGScopy = Vec_IntDup(
p->vGateClasses );
80 iFrame0 = nFrameMax - 1;
88 if ( !Gia_ObjIsInGla(
p, pObj) )
90 if ( pObj == Gia_ObjFanin0( Gia_ManPo(
p, 0) ) )
92 if ( Gia_ObjIsAnd(pObj) )
94 if ( Gia_ObjIsInGla(
p, Gia_ObjFanin0(pObj)) && Gia_ObjIsInGla(
p, Gia_ObjFanin1(pObj)) )
97 if ( Gia_ObjIsRo(
p, pObj) )
99 if ( Gia_ObjIsInGla(
p, Gia_ObjFanin0(Gia_ObjRoToRi(
p, pObj))) )
103 printf(
"%5d : ",
nTotal );
104 printf(
"Obj =%7d ", i );
105 Gia_ObjRemFromGla(
p, pObj );
108 assert( iFrame <= nFrameMax );
110 assert( iFrame <= iFrame0 );
111 printf(
"Frame =%6d ", iFrame );
112 if ( iFrame < iFrame0 )
115 Gia_ObjAddToGla(
p, pObj );
122 printf(
"Removing " );
123 Vec_IntWriteEntry( vGScopy, Gia_ObjId(
p, pObj), 0 );
125 Abc_PrintTime( 1,
"Time", Abc_Clock() - clk );
128 Vec_IntFreeP( &
p->vGateClasses );
129 p->vGateClasses = Vec_IntDup(vGScopy);
135 Vec_IntFree( vGScopy );
136 printf(
"Tried = %d. ",
nTotal );
137 printf(
"Removed = %d. (%.2f %%) ", nRemoved, 100.0 * nRemoved / Vec_IntCountPositive(
p->vGateClasses) );
138 Abc_PrintTime( 1,
"Time", Abc_Clock() - clkTotal );
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
Gia_Man_t * Gia_ManShrinkGla(Gia_Man_t *p, int nFrameMax, int nTimeOut, int fUsePdr, int fUseSat, int fUseBdd, int fVerbose)
int Gia_IterTryImprove(Gia_Man_t *p, int nTimeOut, int iFrame0)
FUNCTION DEFINITIONS ///.
Gia_Man_t * Gia_ManDupAbsGates(Gia_Man_t *p, Vec_Int_t *vGateClasses)
void Aig_ManStop(Aig_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
int nTotal
DECLARATIONS ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int Saig_BmcPerform(Aig_Man_t *pAig, int nStart, int nFramesMax, int nNodesMax, int nTimeOut, int nConfMaxOne, int nConfMaxAll, int fVerbose, int fVerbOverwrite, int *piFrames, int fSilent, int fUseSatoko)
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
void Gia_ManStop(Gia_Man_t *p)
struct Gia_Obj_t_ Gia_Obj_t
struct Gia_Man_t_ Gia_Man_t
#define Gia_ManForEachObj1(p, pObj, i)
void Gia_ManCleanMark0(Gia_Man_t *p)