48 Out[1] = Gia_ManAppendAnd2( pNew, In[0], In[1] );
49 And = Gia_ManAppendAnd2( pNew, Abc_LitNot(In[0]), Abc_LitNot(In[1]) );
50 Or = Gia_ManAppendOr2( pNew, Out[1], And );
51 Out[0] = Abc_LitNot( Or );
55 int In2[2], Out1[2], Out2[2];
61 Out[1] = Gia_ManAppendOr2( pNew, Out1[1], Out2[1] );
65 Vec_Int_t * vRootRanks = Vec_IntAlloc( Vec_WecSize(vLeafMap) + 5 );
70 if ( Vec_IntSize(vLevel) == 0 )
72 Vec_IntPush( vRootRanks, 0 );
75 while ( Vec_IntSize(vLevel) > 1 )
77 if ( Vec_IntSize(vLevel) == 2 )
78 Vec_IntPush( vLevel, 0 );
83 In[0] = Vec_IntEntry( vLevel, 0 );
84 Vec_IntDrop( vLevel, 0 );
86 In[1] = Vec_IntEntry( vLevel, 0 );
87 Vec_IntDrop( vLevel, 0 );
89 In[2] = Vec_IntEntry( vLevel, 0 );
90 Vec_IntDrop( vLevel, 0 );
93 Vec_IntPush( vLevel, Out[0] );
94 if ( i+1 < Vec_WecSize(vLeafMap) )
95 vLevel = Vec_WecEntry(vLeafMap, i+1);
97 vLevel = Vec_WecPushLevel(vLeafMap);
98 Vec_IntPush( vLevel, Out[1] );
99 vLevel = Vec_WecEntry(vLeafMap, i);
101 assert( Vec_IntSize(vLevel) == 1 );
102 Vec_IntPush( vRootRanks, Vec_IntEntry(vLevel, 0) );
122 assert( Gia_ObjIsAnd(pObj) );
125 return (pObj->
Value = Gia_ManAppendAnd2( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) ));
129 Vec_Wec_t * vLeafMap = Vec_WecStart( Vec_WecSize(vLeafLits) );
131 int i, k, iLit, iLitNew;
136 if ( i < Vec_WecSize(vLeafMap) )
137 vLevel = Vec_WecEntry(vLeafMap, i);
139 vLevel = Vec_WecPushLevel(vLeafMap);
140 Vec_IntPush( vLevel, iLit );
146 Gia_Obj_t * pObj = Gia_ManObj(
p, Abc_Lit2Var(iLit) );
148 iLitNew = Abc_LitNotCond( iLitNew, Abc_LitIsCompl(iLit) );
149 Vec_WecPush( vLeafMap, i, iLitNew );
153 Vec_WecFree( vLeafMap );
161 Vec_Int_t * vRootRanks, * vLevel, * vTemp;
162 int i, k, iLit, iLitNew;
164 pNew->
pName = Abc_UtilStrsav(
p->pName );
165 pNew->
pSpec = Abc_UtilStrsav(
p->pSpec );
167 Gia_ManConst0(
p)->Value = 0;
169 pObj->
Value = Gia_ManAppendCi( pNew );
175 assert( pBox->vShared != NULL );
176 assert( pBox->vUnique != NULL );
178 vRootRanks =
Acec_BuildTree( pNew,
p, pBox->vUnique, vTemp = vRootRanks );
179 Vec_IntFree( vTemp );
185 pObj = Gia_ManObj(
p, Abc_Lit2Var(iLit) );
186 iLitNew = k ? 0 : Vec_IntEntry( vRootRanks, i );
187 pObj->
Value = Abc_LitNotCond( iLitNew, Abc_LitIsCompl(iLit) );
189 Vec_IntFree( vRootRanks );
194 pObj->
Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
216 Vec_BitFreeP( &vIgnore );
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
Acec_Box_t * Acec_DeriveBox(Gia_Man_t *p, Vec_Bit_t *vIgnore, int fFilterIn, int fFilterOut, int fVerbose)
Vec_Bit_t * Acec_BoothFindPPG(Gia_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Acec_Box_t_ Acec_Box_t
INCLUDES ///.
void Acec_BoxFreeP(Acec_Box_t **ppBox)
void Acec_InsertFadd(Gia_Man_t *pNew, int In[3], int Out[2])
Gia_Man_t * Acec_Normalize(Gia_Man_t *pGia, int fBooth, int fVerbose)
int Acec_InsertBox_rec(Gia_Man_t *pNew, Gia_Man_t *p, Gia_Obj_t *pObj)
Vec_Int_t * Acec_BuildTree(Gia_Man_t *pNew, Gia_Man_t *p, Vec_Wec_t *vLeafLits, Vec_Int_t *vRootLits)
Gia_Man_t * Acec_InsertBox(Acec_Box_t *pBox, int fAll)
ABC_NAMESPACE_IMPL_START void Acec_InsertHadd(Gia_Man_t *pNew, int In[2], int Out[2])
DECLARATIONS ///.
Vec_Int_t * Acec_InsertTree(Gia_Man_t *pNew, Vec_Wec_t *vLeafMap)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
struct Gia_Obj_t_ Gia_Obj_t
void Gia_ManFillValue(Gia_Man_t *p)
struct Gia_Man_t_ Gia_Man_t
#define Gia_ManForEachCo(p, pObj, i)
#define Gia_ManForEachCi(p, pObj, i)
typedefABC_NAMESPACE_HEADER_START struct Vec_Bit_t_ Vec_Bit_t
INCLUDES ///.
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
#define Vec_WecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.