ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
acecCo.c File Reference
#include "acecInt.h"
#include "misc/vec/vecWec.h"
Include dependency graph for acecCo.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Gia_PolynCoreNonXors_rec (Gia_Man_t *pGia, Gia_Obj_t *pObj, Vec_Int_t *vXorPairs)
 DECLARATIONS ///.
 
Vec_Int_tGia_PolynAddHaRoots (Gia_Man_t *pGia)
 
Vec_Wec_tGia_PolynComputeMap (Vec_Int_t *vAdds, int nObjs)
 
Vec_Int_tGia_PolynCoreOrder_int (Gia_Man_t *pGia, Vec_Int_t *vAdds, Vec_Wec_t *vMap, Vec_Int_t *vRoots, Vec_Int_t **pvIns)
 
Vec_Int_tGia_PolynCoreOrder (Gia_Man_t *pGia, Vec_Int_t *vAdds, Vec_Int_t *vAddCos, Vec_Int_t **pvIns, Vec_Int_t **pvOuts)
 ITERATORS ///.
 
void Gia_PolyCollectRoots_rec (Vec_Int_t *vAdds, Vec_Wec_t *vMap, Vec_Bit_t *vMarks, int iBox, Vec_Int_t *vRoots)
 
void Gia_PolyCollectRoots (Vec_Int_t *vAdds, Vec_Wec_t *vMap, Vec_Bit_t *vMarks, int iBox, Vec_Int_t *vRoots)
 
Vec_Wec_tGia_PolynCoreOrderArray (Gia_Man_t *pGia, Vec_Int_t *vAdds, Vec_Int_t *vRootBoxes)
 
void Gia_PolynCoreCollect_rec (Gia_Man_t *pGia, int iObj, Vec_Int_t *vNodes, Vec_Bit_t *vVisited)
 
Vec_Int_tGia_PolynCoreCollect (Gia_Man_t *pGia, Vec_Int_t *vAdds, Vec_Int_t *vOrder)
 
void Gia_PolynCorePrintCones (Gia_Man_t *pGia, Vec_Int_t *vLeaves, int fVerbose)
 
int Gia_PolynCoreDupTreePlus_rec (Gia_Man_t *pNew, Gia_Man_t *p, Gia_Obj_t *pObj)
 
Gia_Man_tGia_PolynCoreDupTree (Gia_Man_t *p, Vec_Int_t *vAddCos, Vec_Int_t *vLeaves, Vec_Int_t *vNodes, int fAddCones)
 
Gia_Man_tGia_PolynCoreDetectTest_int (Gia_Man_t *pGia, Vec_Int_t *vAddCos, int fAddCones, int fVerbose)
 
Gia_Man_tGia_PolynCoreDetectTest (Gia_Man_t *pGia, int fAddExtra, int fAddCones, int fVerbose)
 

Function Documentation

◆ Gia_PolyCollectRoots()

void Gia_PolyCollectRoots ( Vec_Int_t * vAdds,
Vec_Wec_t * vMap,
Vec_Bit_t * vMarks,
int iBox,
Vec_Int_t * vRoots )

Definition at line 215 of file acecCo.c.

216{
217 Vec_IntClear( vRoots );
218 Vec_IntPush( vRoots, Vec_IntEntry(vAdds, 6*iBox+3) );
219 Vec_IntPush( vRoots, Vec_IntEntry(vAdds, 6*iBox+4) );
220 Gia_PolyCollectRoots_rec( vAdds, vMap, vMarks, iBox, vRoots );
221}
void Gia_PolyCollectRoots_rec(Vec_Int_t *vAdds, Vec_Wec_t *vMap, Vec_Bit_t *vMarks, int iBox, Vec_Int_t *vRoots)
Definition acecCo.c:198
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolyCollectRoots_rec()

void Gia_PolyCollectRoots_rec ( Vec_Int_t * vAdds,
Vec_Wec_t * vMap,
Vec_Bit_t * vMarks,
int iBox,
Vec_Int_t * vRoots )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 198 of file acecCo.c.

199{
200 int k;
201 for ( k = 0; k < 3; k++ )
202 {
203 int i, Index, Sum, Carry = Vec_IntEntry( vAdds, 6*iBox+k );
204 Vec_Int_t * vLevel = Vec_WecEntry( vMap, Carry );
205 if ( Carry == 0 )
206 continue;
207 Vec_IntForEachEntryDouble( vLevel, Index, Sum, i )
208 if ( Vec_IntEntry(vAdds, 6*Index+4) == Carry && !Vec_BitEntry(vMarks, Sum) )
209 {
210 Vec_IntPush( vRoots, Sum );
211 Gia_PolyCollectRoots_rec( vAdds, vMap, vMarks, Index, vRoots );
212 }
213 }
214}
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
Definition vecInt.h:72
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynAddHaRoots()

Vec_Int_t * Gia_PolynAddHaRoots ( Gia_Man_t * pGia)

Definition at line 57 of file acecCo.c.

58{
59 int i, iFan0, iFan1;
60 Vec_Int_t * vNewOuts = Vec_IntAlloc( 100 );
61 Vec_Int_t * vXorPairs = Vec_IntAlloc( 100 );
62 Gia_Obj_t * pObj = Gia_ManCo( pGia, Gia_ManCoNum(pGia)-1 );
63 Gia_PolynCoreNonXors_rec( pGia, Gia_ObjFanin0(pObj), vXorPairs );
64 // add new outputs
65 Gia_ManSetPhase( pGia );
66 Vec_IntForEachEntryDouble( vXorPairs, iFan0, iFan1, i )
67 {
68 Gia_Obj_t * pFan0 = Gia_ManObj( pGia, iFan0 );
69 Gia_Obj_t * pFan1 = Gia_ManObj( pGia, iFan1 );
70 int iLit0 = Abc_Var2Lit( iFan0, pFan0->fPhase );
71 int iLit1 = Abc_Var2Lit( iFan1, pFan1->fPhase );
72 int iRoot = Gia_ManAppendAnd( pGia, iLit0, iLit1 );
73 Vec_IntPush( vNewOuts, Abc_Lit2Var(iRoot) );
74 }
75 Vec_IntFree( vXorPairs );
76 Vec_IntReverseOrder( vNewOuts );
77// Vec_IntPop( vNewOuts );
78 return vNewOuts;
79}
ABC_NAMESPACE_IMPL_START void Gia_PolynCoreNonXors_rec(Gia_Man_t *pGia, Gia_Obj_t *pObj, Vec_Int_t *vXorPairs)
DECLARATIONS ///.
Definition acecCo.c:45
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
void Gia_ManSetPhase(Gia_Man_t *p)
Definition giaUtil.c:420
unsigned fPhase
Definition gia.h:87
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynComputeMap()

Vec_Wec_t * Gia_PolynComputeMap ( Vec_Int_t * vAdds,
int nObjs )

Function*************************************************************

Synopsis [Detects the order of adders.]

Description []

SideEffects []

SeeAlso []

Definition at line 93 of file acecCo.c.

94{
95 // map nodes driven by adders into adder indexes
96 Vec_Wec_t * vMap = Vec_WecStart( nObjs ); int i;
97 for ( i = 0; 6*i < Vec_IntSize(vAdds); i++ )
98 {
99 int Entry1 = Vec_IntEntry( vAdds, 6*i + 3 );
100 int Entry2 = Vec_IntEntry( vAdds, 6*i + 4 );
101 Vec_WecPush( vMap, Entry1, i );
102 Vec_WecPush( vMap, Entry1, Entry2 );
103 Vec_WecPush( vMap, Entry2, i );
104 Vec_WecPush( vMap, Entry2, Entry1 );
105 }
106 return vMap;
107}
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
Definition vecWec.h:42
Here is the caller graph for this function:

◆ Gia_PolynCoreCollect()

Vec_Int_t * Gia_PolynCoreCollect ( Gia_Man_t * pGia,
Vec_Int_t * vAdds,
Vec_Int_t * vOrder )

Definition at line 264 of file acecCo.c.

265{
266 Vec_Int_t * vNodes = Vec_IntAlloc( 1000 );
267 Vec_Bit_t * vVisited = Vec_BitStart( Gia_ManObjNum(pGia) );
268 int i, Index, Entry1, Entry2, Entry3;
269 Vec_IntForEachEntryReverse( vOrder, Index, i )
270 {
271 // mark inputs
272 Entry1 = Vec_IntEntry( vAdds, 6*Index + 0 );
273 Entry2 = Vec_IntEntry( vAdds, 6*Index + 1 );
274 Entry3 = Vec_IntEntry( vAdds, 6*Index + 2 );
275 Vec_BitWriteEntry( vVisited, Entry1, 1 );
276 Vec_BitWriteEntry( vVisited, Entry2, 1 );
277 Vec_BitWriteEntry( vVisited, Entry3, 1 );
278 // traverse from outputs
279 Entry1 = Vec_IntEntry( vAdds, 6*Index + 3 );
280 Entry2 = Vec_IntEntry( vAdds, 6*Index + 4 );
281 Gia_PolynCoreCollect_rec( pGia, Entry1, vNodes, vVisited );
282 Gia_PolynCoreCollect_rec( pGia, Entry2, vNodes, vVisited );
283 }
284 Vec_BitFree( vVisited );
285 return vNodes;
286}
void Gia_PolynCoreCollect_rec(Gia_Man_t *pGia, int iObj, Vec_Int_t *vNodes, Vec_Bit_t *vVisited)
Definition acecCo.c:255
typedefABC_NAMESPACE_HEADER_START struct Vec_Bit_t_ Vec_Bit_t
INCLUDES ///.
Definition vecBit.h:42
#define Vec_IntForEachEntryReverse(vVec, pEntry, i)
Definition vecInt.h:62
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynCoreCollect_rec()

void Gia_PolynCoreCollect_rec ( Gia_Man_t * pGia,
int iObj,
Vec_Int_t * vNodes,
Vec_Bit_t * vVisited )

Function*************************************************************

Synopsis [Collect internal node order.]

Description []

SideEffects []

SeeAlso []

Definition at line 255 of file acecCo.c.

256{
257 if ( Vec_BitEntry(vVisited, iObj) )
258 return;
259 Vec_BitSetEntry( vVisited, iObj, 1 );
260 Gia_PolynCoreCollect_rec( pGia, Gia_ObjFaninId0p(pGia, Gia_ManObj(pGia, iObj)), vNodes, vVisited );
261 Gia_PolynCoreCollect_rec( pGia, Gia_ObjFaninId1p(pGia, Gia_ManObj(pGia, iObj)), vNodes, vVisited );
262 Vec_IntPush( vNodes, iObj );
263}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynCoreDetectTest()

Gia_Man_t * Gia_PolynCoreDetectTest ( Gia_Man_t * pGia,
int fAddExtra,
int fAddCones,
int fVerbose )

Definition at line 414 of file acecCo.c.

415{
416 Vec_Int_t * vAddCos = fAddExtra ? Gia_PolynAddHaRoots( pGia ) : Vec_IntAlloc(0);
417 Gia_Man_t * pNew = Gia_PolynCoreDetectTest_int( pGia, vAddCos, fAddCones, fVerbose );
418 printf( "On top of %d COs, created %d new adder outputs.\n", Gia_ManCoNum(pGia), Vec_IntSize(vAddCos) );
419 Vec_IntFree( vAddCos );
420 return pNew;
421}
Gia_Man_t * Gia_PolynCoreDetectTest_int(Gia_Man_t *pGia, Vec_Int_t *vAddCos, int fAddCones, int fVerbose)
Definition acecCo.c:388
Vec_Int_t * Gia_PolynAddHaRoots(Gia_Man_t *pGia)
Definition acecCo.c:57
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
Here is the call graph for this function:

◆ Gia_PolynCoreDetectTest_int()

Gia_Man_t * Gia_PolynCoreDetectTest_int ( Gia_Man_t * pGia,
Vec_Int_t * vAddCos,
int fAddCones,
int fVerbose )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 388 of file acecCo.c.

389{
390 extern Vec_Int_t * Ree_ManComputeCuts( Gia_Man_t * p, Vec_Int_t ** pvXors, int fVerbose );
391 abctime clk = Abc_Clock();
392 Gia_Man_t * pNew;
393 Vec_Int_t * vAdds = Ree_ManComputeCuts( pGia, NULL, 1 );
394 Vec_Int_t * vLeaves, * vRoots, * vOrder = Gia_PolynCoreOrder( pGia, vAdds, vAddCos, &vLeaves, &vRoots );
395 Vec_Int_t * vNodes = Gia_PolynCoreCollect( pGia, vAdds, vOrder );
396
397 //Gia_ManShow( pGia, vNodes, 0 );
398
399 printf( "Detected %d FAs/HAs. Roots = %d. Leaves = %d. Nodes = %d. Adds = %d. ",
400 Vec_IntSize(vAdds)/6, Vec_IntSize(vLeaves), Vec_IntSize(vRoots), Vec_IntSize(vNodes), Vec_IntSize(vOrder) );
401 Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
402
403 Gia_PolynCorePrintCones( pGia, vLeaves, fVerbose );
404
405 pNew = Gia_PolynCoreDupTree( pGia, vAddCos, vLeaves, vNodes, fAddCones );
406
407 Vec_IntFree( vAdds );
408 Vec_IntFree( vLeaves );
409 Vec_IntFree( vRoots );
410 Vec_IntFree( vOrder );
411 Vec_IntFree( vNodes );
412 return pNew;
413}
ABC_INT64_T abctime
Definition abc_global.h:332
Vec_Int_t * Gia_PolynCoreOrder(Gia_Man_t *pGia, Vec_Int_t *vAdds, Vec_Int_t *vAddCos, Vec_Int_t **pvIns, Vec_Int_t **pvOuts)
ITERATORS ///.
Definition acecCo.c:163
Gia_Man_t * Gia_PolynCoreDupTree(Gia_Man_t *p, Vec_Int_t *vAddCos, Vec_Int_t *vLeaves, Vec_Int_t *vNodes, int fAddCones)
Definition acecCo.c:344
Vec_Int_t * Gia_PolynCoreCollect(Gia_Man_t *pGia, Vec_Int_t *vAdds, Vec_Int_t *vOrder)
Definition acecCo.c:264
void Gia_PolynCorePrintCones(Gia_Man_t *pGia, Vec_Int_t *vLeaves, int fVerbose)
Definition acecCo.c:299
Vec_Int_t * Ree_ManComputeCuts(Gia_Man_t *p, Vec_Int_t **pvXors, int fVerbose)
Definition acecRe.c:408
Cube * p
Definition exorList.c:222
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynCoreDupTree()

Gia_Man_t * Gia_PolynCoreDupTree ( Gia_Man_t * p,
Vec_Int_t * vAddCos,
Vec_Int_t * vLeaves,
Vec_Int_t * vNodes,
int fAddCones )

Definition at line 344 of file acecCo.c.

345{
346 Gia_Man_t * pNew;
347 Gia_Obj_t * pObj;
348 int i;
349 assert( Gia_ManRegNum(p) == 0 );
351 pNew = Gia_ManStart( Gia_ManObjNum(p) );
352 pNew->pName = Abc_UtilStrsav( p->pName );
353 pNew->pSpec = Abc_UtilStrsav( p->pSpec );
354 Gia_ManConst0(p)->Value = 0;
355 if ( fAddCones )
356 {
357 Gia_ManForEachPi( p, pObj, i )
358 pObj->Value = Gia_ManAppendCi(pNew);
359 Gia_ManForEachObjVec( vLeaves, p, pObj, i )
360 pObj->Value = Gia_PolynCoreDupTreePlus_rec( pNew, p, pObj );
361 }
362 else
363 {
364 Gia_ManForEachObjVec( vLeaves, p, pObj, i )
365 pObj->Value = Gia_ManAppendCi(pNew);
366 }
367 Gia_ManForEachObjVec( vNodes, p, pObj, i )
368 pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
369 Gia_ManForEachCo( p, pObj, i )
370 Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
371 Gia_ManForEachObjVec( vAddCos, p, pObj, i )
372 Gia_ManAppendCo( pNew, pObj->Value );
373 return pNew;
374
375}
int Gia_PolynCoreDupTreePlus_rec(Gia_Man_t *pNew, Gia_Man_t *p, Gia_Obj_t *pObj)
Definition acecCo.c:335
#define Gia_ManForEachPi(p, pObj, i)
Definition gia.h:1248
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
Definition giaMan.c:57
void Gia_ManFillValue(Gia_Man_t *p)
Definition giaUtil.c:369
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
Definition gia.h:1194
#define Gia_ManForEachCo(p, pObj, i)
Definition gia.h:1236
char * pSpec
Definition gia.h:100
char * pName
Definition gia.h:99
unsigned Value
Definition gia.h:89
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynCoreDupTreePlus_rec()

int Gia_PolynCoreDupTreePlus_rec ( Gia_Man_t * pNew,
Gia_Man_t * p,
Gia_Obj_t * pObj )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 335 of file acecCo.c.

336{
337 if ( ~pObj->Value )
338 return pObj->Value;
339 assert( Gia_ObjIsAnd(pObj) );
340 Gia_PolynCoreDupTreePlus_rec( pNew, p, Gia_ObjFanin0(pObj) );
341 Gia_PolynCoreDupTreePlus_rec( pNew, p, Gia_ObjFanin1(pObj) );
342 return pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
343}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynCoreNonXors_rec()

ABC_NAMESPACE_IMPL_START void Gia_PolynCoreNonXors_rec ( Gia_Man_t * pGia,
Gia_Obj_t * pObj,
Vec_Int_t * vXorPairs )

DECLARATIONS ///.

CFile****************************************************************

FileName [acecCo.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [CEC for arithmetic circuits.]

Synopsis [Core procedures.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
acecCo.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Collect non-XOR inputs.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file acecCo.c.

46{
47 extern int Gia_ManSuppSizeOne( Gia_Man_t * p, Gia_Obj_t * pObj );
48 Gia_Obj_t * pFan0, * pFan1;
49 if ( !Gia_ObjRecognizeExor(pObj, &pFan0, &pFan1) )
50 return;
51 Gia_PolynCoreNonXors_rec( pGia, Gia_Regular(pFan0), vXorPairs );
52 Gia_PolynCoreNonXors_rec( pGia, Gia_Regular(pFan1), vXorPairs );
53 //if ( Gia_ManSuppSizeOne(pGia, pObj) > 4 )
54 //if ( Gia_ObjId(pGia, pObj) >= 73 )
55 Vec_IntPushTwo( vXorPairs, Gia_ObjId(pGia, Gia_Regular(pFan0)), Gia_ObjId(pGia, Gia_Regular(pFan1)) );
56}
int Gia_ManSuppSizeOne(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition giaDfs.c:283
int Gia_ObjRecognizeExor(Gia_Obj_t *pObj, Gia_Obj_t **ppFan0, Gia_Obj_t **ppFan1)
Definition giaUtil.c:1018
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynCoreOrder()

Vec_Int_t * Gia_PolynCoreOrder ( Gia_Man_t * pGia,
Vec_Int_t * vAdds,
Vec_Int_t * vAddCos,
Vec_Int_t ** pvIns,
Vec_Int_t ** pvOuts )

ITERATORS ///.

FUNCTION DECLARATIONS ///

Definition at line 163 of file acecCo.c.

164{
165 Vec_Int_t * vOrder;
166 Vec_Wec_t * vMap = Gia_PolynComputeMap( vAdds, Gia_ManObjNum(pGia) );
167 Vec_Int_t * vRoots = Vec_IntAlloc( Gia_ManCoNum(pGia) );
168 int i, Driver;
169 // collect roots
170 Gia_ManForEachCoDriverId( pGia, Driver, i )
171 Vec_IntPush( vRoots, Driver );
172 // collect additional outputs
173 if ( vAddCos )
174 Vec_IntForEachEntry( vAddCos, Driver, i )
175 Vec_IntPush( vRoots, Driver );
176 // remember roots
177 if ( pvOuts )
178 *pvOuts = Vec_IntDup( vRoots );
179 // create order
180 vOrder = Gia_PolynCoreOrder_int( pGia, vAdds, vMap, vRoots, pvIns );
181 Vec_IntFree( vRoots );
182 Vec_WecFree( vMap );
183 printf( "Collected %d boxes.\n", Vec_IntSize(vOrder) );
184 return vOrder;
185}
Vec_Wec_t * Gia_PolynComputeMap(Vec_Int_t *vAdds, int nObjs)
Definition acecCo.c:93
Vec_Int_t * Gia_PolynCoreOrder_int(Gia_Man_t *pGia, Vec_Int_t *vAdds, Vec_Wec_t *vMap, Vec_Int_t *vRoots, Vec_Int_t **pvIns)
Definition acecCo.c:108
#define Gia_ManForEachCoDriverId(p, DriverId, i)
Definition gia.h:1246
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynCoreOrder_int()

Vec_Int_t * Gia_PolynCoreOrder_int ( Gia_Man_t * pGia,
Vec_Int_t * vAdds,
Vec_Wec_t * vMap,
Vec_Int_t * vRoots,
Vec_Int_t ** pvIns )

Definition at line 108 of file acecCo.c.

109{
110 Vec_Int_t * vOrder = Vec_IntAlloc( 1000 );
111 Vec_Bit_t * vIsRoot = Vec_BitStart( Gia_ManObjNum(pGia) );
112 int i, k, Index = -1, Driver, Entry1, Entry2 = -1;
113 // mark roots
114 Vec_IntForEachEntry( vRoots, Driver, i )
115 Vec_BitWriteEntry( vIsRoot, Driver, 1 );
116 // collect boxes
117 while ( 1 )
118 {
119 // iterate through boxes driving this one
120 Vec_IntForEachEntry( vRoots, Entry1, i )
121 {
122 Vec_Int_t * vLevel = Vec_WecEntry( vMap, Entry1 );
123 Vec_IntForEachEntryDouble( vLevel, Index, Entry2, k )
124 if ( Vec_BitEntry(vIsRoot, Entry2) )
125 break;
126 if ( k == Vec_IntSize(vLevel) )
127 continue;
128 assert( Vec_BitEntry(vIsRoot, Entry1) );
129 assert( Vec_BitEntry(vIsRoot, Entry2) );
130 // collect adder
131 Vec_IntPush( vOrder, Index );
132 // clean marks
133 Vec_BitWriteEntry( vIsRoot, Entry1, 0 );
134 Vec_BitWriteEntry( vIsRoot, Entry2, 0 );
135 Vec_IntRemove( vRoots, Entry1 );
136 Vec_IntRemove( vRoots, Entry2 );
137 // set new marks
138 Entry1 = Vec_IntEntry( vAdds, 6*Index + 0 );
139 Entry2 = Vec_IntEntry( vAdds, 6*Index + 1 );
140 Driver = Vec_IntEntry( vAdds, 6*Index + 2 );
141 Vec_BitWriteEntry( vIsRoot, Entry1, 1 );
142 Vec_BitWriteEntry( vIsRoot, Entry2, 1 );
143 Vec_BitWriteEntry( vIsRoot, Driver, 1 );
144 Vec_IntPushUnique( vRoots, Entry1 );
145 Vec_IntPushUnique( vRoots, Entry2 );
146 Vec_IntPushUnique( vRoots, Driver );
147 break;
148 }
149 if ( i == Vec_IntSize(vRoots) )
150 break;
151 }
152 // collect remaining leaves
153 if ( pvIns )
154 {
155 *pvIns = Vec_IntAlloc( Vec_BitSize(vIsRoot) );
156 Vec_BitForEachEntryStart( vIsRoot, Driver, i, 1 )
157 if ( Driver )
158 Vec_IntPush( *pvIns, i );
159 }
160 Vec_BitFree( vIsRoot );
161 return vOrder;
162}
if(last==0)
Definition sparse_int.h:34
#define Vec_BitForEachEntryStart(vVec, Entry, i, Start)
Definition vecBit.h:56
Here is the caller graph for this function:

◆ Gia_PolynCoreOrderArray()

Vec_Wec_t * Gia_PolynCoreOrderArray ( Gia_Man_t * pGia,
Vec_Int_t * vAdds,
Vec_Int_t * vRootBoxes )

Definition at line 222 of file acecCo.c.

223{
225 Vec_Bit_t * vMarks = Acec_ManPoolGetPointed( pGia, vAdds );
226 Vec_Wec_t * vMap = Gia_PolynComputeMap( vAdds, Gia_ManObjNum(pGia) );
227 Vec_Wec_t * vRes = Vec_WecStart( Vec_IntSize(vRootBoxes) );
228 Vec_Int_t * vRoots = Vec_IntAlloc( 64 );
229 Vec_Int_t * vOrder;
230 int i, iBox;
231 Vec_IntForEachEntry( vRootBoxes, iBox, i )
232 {
233 Gia_PolyCollectRoots( vAdds, vMap, vMarks, iBox, vRoots );
234 vOrder = Gia_PolynCoreOrder_int( pGia, vAdds, vMap, vRoots, NULL );
235 Vec_IntAppend( Vec_WecEntry(vRes, i), vOrder );
236 Vec_IntFree( vOrder );
237 }
238 Vec_BitFree( vMarks );
239 Vec_IntFree( vRoots );
240 Vec_WecFree( vMap );
241 return vRes;
242}
void Gia_PolyCollectRoots(Vec_Int_t *vAdds, Vec_Wec_t *vMap, Vec_Bit_t *vMarks, int iBox, Vec_Int_t *vRoots)
Definition acecCo.c:215
Vec_Bit_t * Acec_ManPoolGetPointed(Gia_Man_t *p, Vec_Int_t *vAdds)
Definition acecPool.c:353
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynCorePrintCones()

void Gia_PolynCorePrintCones ( Gia_Man_t * pGia,
Vec_Int_t * vLeaves,
int fVerbose )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 299 of file acecCo.c.

300{
301 int i, iObj;
302 if ( fVerbose )
303 {
304 Vec_IntForEachEntry( vLeaves, iObj, i )
305 {
306 printf( "%4d : ", i );
307 printf( "Supp = %3d ", Gia_ManSuppSize(pGia, &iObj, 1) );
308 printf( "Cone = %3d ", Gia_ManConeSize(pGia, &iObj, 1) );
309 printf( "\n" );
310 }
311 }
312 else
313 {
314 int SuppMax = 0, ConeMax = 0;
315 Vec_IntForEachEntry( vLeaves, iObj, i )
316 {
317 SuppMax = Abc_MaxInt( SuppMax, Gia_ManSuppSize(pGia, &iObj, 1) );
318 ConeMax = Abc_MaxInt( ConeMax, Gia_ManConeSize(pGia, &iObj, 1) );
319 }
320 printf( "Remaining cones: Count = %d. SuppMax = %d. ConeMax = %d.\n", Vec_IntSize(vLeaves), SuppMax, ConeMax );
321 }
322}
int Gia_ManSuppSize(Gia_Man_t *p, int *pNodes, int nNodes)
Definition giaDfs.c:324
int Gia_ManConeSize(Gia_Man_t *p, int *pNodes, int nNodes)
Definition giaDfs.c:375
Here is the call graph for this function:
Here is the caller graph for this function: