31static void Abc_NtkPrintCuts(
void *
p,
Abc_Ntk_t * pNtk,
int fSeq );
32static void Abc_NtkPrintCuts_(
void *
p,
Abc_Ntk_t * pNtk,
int fSeq );
41 Vec_Int_t * vAttrs = Vec_IntStart( Abc_NtkObjNumMax(pNtk) + 1 );
52 Vec_IntWriteEntry( vAttrs, pObj->
Id, 1 );
80 clock_t clk = clock();
87 assert( Abc_NtkIsStrash(pNtk) );
89 pParams->
nIdsMax = Abc_NtkObjNumMax( pNtk );
102 if ( Abc_ObjFanoutNum(pObj) > 0 )
106 vChoices = Vec_IntAlloc( 100 );
111 if ( Abc_ObjIsCo(pObj) )
113 if ( pParams->
fDrop )
120 Extra_ProgressBarUpdate( pProgress, i, NULL );
124 if ( pParams->
fDrop )
130 if ( Abc_AigNodeIsChoice(pObj) )
132 Vec_IntClear( vChoices );
133 for ( pNode = pObj; pNode; pNode = pNode->
pData )
134 Vec_IntPush( vChoices, pNode->
Id );
139 Vec_PtrFree( vNodes );
140 Vec_IntFree( vChoices );
141PRT(
"Total", clock() - clk );
167 clock_t clk = clock();
170 assert( Abc_NtkIsStrash(pNtk) );
178 if ( Abc_ObjFanoutNum(pObj) > 0 )
186 if ( Abc_ObjIsCo(pObj) )
197 Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) );
205 Vec_PtrFree( vNodes );
348 int fDagNode, fTriv, TreeCode = 0;
350 assert( Abc_ObjFaninNum(pObj) == 2 );
358 fTriv = fDagNode || !fDag;
362 pFanin = Abc_ObjFanin0(pObj);
364 pFanin = Abc_ObjFanin1(pObj);
375 fDagNode = Vec_IntEntry( vNodeAttrs, pObj->
Id );
378 fTriv = !Vec_IntEntry( vNodeAttrs, pObj->
Id );
380 pFanin = Abc_ObjFanin0(pObj);
381 TreeCode |= Vec_IntEntry( vNodeAttrs, pFanin->
Id );
382 pFanin = Abc_ObjFanin1(pObj);
383 TreeCode |= (Vec_IntEntry( vNodeAttrs, pFanin->
Id ) << 1);
387 Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj), fTriv, TreeCode );
405 assert( Abc_ObjFaninNum(pObj) == 2 );
406 fTriv = pObj->
fMarkC ? 0 : fTriv;
409 Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj), Seq_ObjFaninL0(pObj), Seq_ObjFaninL1(pObj), fTriv, CutSetNum );
455void Abc_NtkPrintCuts(
void *
p,
Abc_Ntk_t * pNtk,
int fSeq )
461 printf(
"Cuts of the network:\n" );
481void Abc_NtkPrintCuts_(
void *
p,
Abc_Ntk_t * pNtk,
int fSeq )
486 pObj = Abc_NtkObj( pNtk, 2 * Abc_NtkObjNum(pNtk) / 3 );
void Abc_NtkBalanceAttach(Abc_Ntk_t *pNtk)
void Abc_NtkBalanceDetach(Abc_Ntk_t *pNtk)
struct Abc_Obj_t_ Abc_Obj_t
ABC_DLL Vec_Ptr_t * Abc_AigDfs(Abc_Ntk_t *pNtk, int fCollectAll, int fCollectCos)
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
struct Abc_Ntk_t_ Abc_Ntk_t
ABC_DLL Vec_Int_t * Abc_NtkFanoutCounts(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NodeIsMuxControlType(Abc_Obj_t *pNode)
#define Abc_NtkForEachCi(pNtk, pCi, i)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
void * Abc_NodeGetCutsRecursive(void *p, Abc_Obj_t *pObj, int fDag, int fTree)
int nTotal
DECLARATIONS ///.
void * Abc_NodeReadCuts(void *p, Abc_Obj_t *pObj)
Cut_Man_t * Abc_NtkCuts(Abc_Ntk_t *pNtk, Cut_Params_t *pParams)
void Abc_NodeFreeCuts(void *p, Abc_Obj_t *pObj)
void * Abc_NodeGetCuts(void *p, Abc_Obj_t *pObj, int fDag, int fTree)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
ABC_NAMESPACE_IMPL_START typedef char ProgressBar
void Cut_OracleTryDroppingCuts(Cut_Oracle_t *p, int Node)
void Cut_CutPrintList(Cut_Cut_t *pList, int fSeq)
void Cut_ManIncrementDagNodes(Cut_Man_t *p)
void Cut_NodeTryDroppingCuts(Cut_Man_t *p, int Node)
Cut_Cut_t * Cut_NodeComputeCuts(Cut_Man_t *p, int Node, int Node0, int Node1, int fCompl0, int fCompl1, int fTriv, int TreeCode)
Cut_Cut_t * Cut_OracleComputeCuts(Cut_Oracle_t *p, int Node, int Node0, int Node1, int fCompl0, int fCompl1)
struct Cut_ParamsStruct_t_ Cut_Params_t
void Cut_NodeSetTriv(Cut_Man_t *p, int Node)
void Cut_NodeComputeCutsSeq(Cut_Man_t *p, int Node, int Node0, int Node1, int fCompl0, int fCompl1, int nLat0, int nLat1, int fTriv, int CutSetNum)
Cut_Cut_t * Cut_NodeUnionCuts(Cut_Man_t *p, Vec_Int_t *vNodes)
void Cut_ManSetNodeAttrs(Cut_Man_t *p, Vec_Int_t *vFanCounts)
int Cut_OracleReadDrop(Cut_Oracle_t *p)
Cut_Man_t * Cut_ManStart(Cut_Params_t *pParams)
FUNCTION DEFINITIONS ///.
struct Cut_ManStruct_t_ Cut_Man_t
BASIC TYPES ///.
Cut_Cut_t * Cut_NodeReadCutsNew(Cut_Man_t *p, int Node)
MACRO DEFINITIONS ///.
void Cut_OracleSetFanoutCounts(Cut_Oracle_t *p, Vec_Int_t *vFanCounts)
Vec_Int_t * Cut_ManReadNodeAttrs(Cut_Man_t *p)
void Cut_OracleNodeSetTriv(Cut_Oracle_t *p, int Node)
struct Cut_OracleStruct_t_ Cut_Oracle_t
void Cut_NodeFreeCuts(Cut_Man_t *p, int Node)
void Cut_ManSetFanoutCounts(Cut_Man_t *p, Vec_Int_t *vFanCounts)
struct Cut_CutStruct_t_ Cut_Cut_t
Cut_Params_t * Cut_ManReadParams(Cut_Man_t *p)
void Abc_NtkCutsOracle(Abc_Ntk_t *pNtk, Cut_Oracle_t *p)
Cut_Man_t * Abc_NtkSeqCuts(Abc_Ntk_t *pNtk, Cut_Params_t *pParams)
void Abc_NodeGetCutsSeq(void *p, Abc_Obj_t *pObj, int fTriv)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.