54 pNtk->
pName = Abc_UtilStrsav(
p->pName );
55 pNtk->
pSpec = Abc_UtilStrsav(
p->pSpec );
56 pObj = Aig_ManConst1(
p);
100 Vec_PtrWriteEntry( vNodes, i, pNode->pCopy );
126 if ( Gia_ObjIsTravIdCurrent(
p, pObj) )
128 Gia_ObjSetTravIdCurrent(
p, pObj);
129 if ( Gia_ObjIsCi(pObj) )
131 Vec_IntPush( vLeaves, Gia_ObjId(
p, pObj) );
134 assert( Gia_ObjIsAnd(pObj) );
137 Vec_IntPush( vNodes, Gia_ObjId(
p, pObj) );
162 pNtk->
pName = Abc_UtilStrsav(
p->pName );
167 vMaps = Vec_IntAlloc( Vec_IntSize(vNodes) + Abc_MaxInt(Vec_IntSize(vPPis), Vec_IntSize(vLeaves)) + 1 );
170 pObj = Gia_ManConst0(
p);
172 ppCopies[Gia_ObjId(
p,pObj)] =
Nwk_ManCreateNode( pNtk, 0, Gia_ObjRefNum(
p,pObj) + (Vec_IntSize(vLeaves) > Vec_IntSize(vPPis) ? Vec_IntSize(vLeaves) - Vec_IntSize(vPPis) : 0) );
173 Vec_IntPush( vMaps, Gia_ObjId(
p,pObj) );
177 assert( Vec_IntSize(vMaps) == Nwk_ObjId(ppCopies[Gia_ObjId(
p,pObj)]) );
178 Vec_IntPush( vMaps, Gia_ObjId(
p,pObj) );
180 for ( i = Vec_IntSize(vLeaves); i < Vec_IntSize(vPPis); i++ )
183 Vec_IntPush( vMaps, -1 );
188 Nwk_ObjAddFanin( ppCopies[Gia_ObjId(
p,pObj)], ppCopies[Gia_ObjFaninId0p(
p,pObj)] );
189 Nwk_ObjAddFanin( ppCopies[Gia_ObjId(
p,pObj)], ppCopies[Gia_ObjFaninId1p(
p,pObj)] );
190 assert( Vec_IntSize(vMaps) == Nwk_ObjId(ppCopies[Gia_ObjId(
p,pObj)]) );
191 Vec_IntPush( vMaps, Gia_ObjId(
p,pObj) );
195 assert( ppCopies[Gia_ObjId(
p,pObj)] != NULL );
198 for ( i = Vec_IntSize(vPPis); i < Vec_IntSize(vLeaves); i++ )
200 assert( Vec_IntSize(vMaps) == Vec_IntSize(vNodes) + Abc_MaxInt(Vec_IntSize(vPPis), Vec_IntSize(vLeaves)) + 1 );
223 Vec_Int_t * vPPis, * vNodes, * vLeaves, * vNodes2, * vLeaves2, * vMapInv;
230 vNodes = Vec_IntAlloc( 100 );
231 vLeaves = Vec_IntAlloc( 100 );
244 vNodes2 = Vec_IntAlloc( 100 );
245 vLeaves2 = Vec_IntAlloc( 100 );
249 pObj = Gia_ManObj(
p, Vec_IntEntry(vMapInv, Nwk_ObjId(pNode)) );
250 if ( Gia_ObjIsConst0(pObj) )
255 printf(
"Min-cut: %d -> %d. Nodes %d -> %d. ", Vec_IntSize(vPPis)+1, Vec_PtrSize(vMinCut), Vec_IntSize(vNodes), Vec_IntSize(vNodes2) );
256 Vec_IntFree( vPPis );
257 Vec_PtrFree( vMinCut );
258 Vec_IntFree( vMapInv );
262 Vec_IntSort( vNodes, 0 );
263 Vec_IntSort( vNodes2, 0 );
264 vCommon = Vec_IntAlloc( Vec_IntSize(vNodes) );
265 vDiff0 = Vec_IntAlloc( 100 );
266 vDiff1 = Vec_IntAlloc( 100 );
267 Vec_IntTwoSplit( vNodes, vNodes2, vCommon, vDiff0, vDiff1 );
269 printf(
"Common = %d. Diff0 = %d. Diff1 = %d.\n", Vec_IntSize(vCommon), Vec_IntSize(vDiff0), Vec_IntSize(vDiff1) );
273 Vec_IntWriteEntry(
p->vGateClasses, iObjId, 1 );
275 Vec_IntFree( vLeaves );
276 Vec_IntFree( vNodes );
277 Vec_IntFree( vLeaves2 );
278 Vec_IntFree( vNodes2 );
280 Vec_IntFree( vCommon );
281 Vec_IntFree( vDiff0 );
282 Vec_IntFree( vDiff1 );
287 if ( Vec_IntEntry(
p->vGateClasses, i ) == 0 )
289 assert( Gia_ObjIsConst0(pObj) || Gia_ObjIsRo(
p, pObj) || Gia_ObjIsAnd(pObj) );
#define ABC_ALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
void Gia_ManGlaCollect(Gia_Man_t *p, Vec_Int_t *vGateClasses, Vec_Int_t **pvPis, Vec_Int_t **pvPPis, Vec_Int_t **pvFlops, Vec_Int_t **pvNodes)
#define Aig_ManForEachObj(p, pObj, i)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
struct Aig_Obj_t_ Aig_Obj_t
#define Aig_ManForEachNode(p, pObj, i)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
#define Aig_ManForEachCo(p, pObj, i)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
struct Gia_Obj_t_ Gia_Obj_t
struct Gia_Man_t_ Gia_Man_t
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
void Gia_ManCreateRefs(Gia_Man_t *p)
void Gia_ManIncrementTravId(Gia_Man_t *p)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
void Hop_ManStop(Hop_Man_t *p)
ABC_DLL void Nwk_ManFree(Nwk_Man_t *p)
struct Nwk_Man_t_ Nwk_Man_t
void Nwk_ManDeriveMinCut(Gia_Man_t *p, int fVerbose)
Nwk_Man_t * Nwk_ManCreateFromGia(Gia_Man_t *p, Vec_Int_t *vPPis, Vec_Int_t *vNodes, Vec_Int_t *vLeaves, Vec_Int_t **pvMapInv)
Vec_Ptr_t * Nwk_ManDeriveRetimingCut(Aig_Man_t *p, int fForward, int fVerbose)
FUNCTION DECLARATIONS ///.
ABC_NAMESPACE_IMPL_START Nwk_Man_t * Nwk_ManDeriveFromAig(Aig_Man_t *p)
DECLARATIONS ///.
ABC_NAMESPACE_IMPL_END ABC_NAMESPACE_IMPL_START void Nwk_ManColleacReached_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vNodes, Vec_Int_t *vLeaves)
ABC_DLL Nwk_Obj_t * Nwk_ManCreateNode(Nwk_Man_t *pMan, int nFanins, int nFanouts)
ABC_DLL Vec_Ptr_t * Nwk_ManRetimeCutBackward(Nwk_Man_t *pMan, int nLatches, int fVerbose)
ABC_DLL int Nwk_ManPiNum(Nwk_Man_t *pNtk)
ABC_DLL Nwk_Obj_t * Nwk_ManCreateCi(Nwk_Man_t *pMan, int nFanouts)
ABC_DLL Nwk_Obj_t * Nwk_ManCreateCo(Nwk_Man_t *pMan)
typedefABC_NAMESPACE_HEADER_START struct Nwk_Obj_t_ Nwk_Obj_t
INCLUDES ///.
ABC_DLL Nwk_Man_t * Nwk_ManAlloc()
DECLARATIONS ///.
ABC_DLL void Nwk_ObjAddFanin(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanin)
ABC_DLL int Nwk_ManPoNum(Nwk_Man_t *pNtk)
ABC_DLL Vec_Ptr_t * Nwk_ManRetimeCutForward(Nwk_Man_t *pMan, int nLatches, int fVerbose)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.