ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
acecInt.h File Reference
#include "aig/gia/gia.h"
#include "acec.h"
Include dependency graph for acecInt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Acec_Box_t_
 

Typedefs

typedef typedefABC_NAMESPACE_HEADER_START struct Acec_Box_t_ Acec_Box_t
 INCLUDES ///.
 

Functions

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 ///.
 
Vec_Wec_tGia_PolynCoreOrderArray (Gia_Man_t *pGia, Vec_Int_t *vAdds, Vec_Int_t *vRootBoxes)
 
Vec_Int_tAcec_MultDetectInputs (Gia_Man_t *p, Vec_Wec_t *vLeafLits, Vec_Wec_t *vRootLits)
 
Vec_Bit_tAcec_BoothFindPPG (Gia_Man_t *p)
 
Vec_Bit_tAcec_MultMarkPPs (Gia_Man_t *p)
 
void Acec_InsertFadd (Gia_Man_t *pNew, int In[3], int Out[2])
 
Gia_Man_tAcec_InsertBox (Acec_Box_t *pBox, int fAll)
 
void Acec_PrintAdders (Vec_Wec_t *vBoxes, Vec_Int_t *vAdds)
 
void Acec_TreePrintBox (Acec_Box_t *pBox, Vec_Int_t *vAdds)
 
Acec_Box_tAcec_DeriveBox (Gia_Man_t *p, Vec_Bit_t *vIgnore, int fFilterIn, int fFilterOut, int fVerbose)
 
void Acec_BoxFreeP (Acec_Box_t **ppBox)
 
void Gia_PolynAnalyzeXors (Gia_Man_t *pGia, int fVerbose)
 
Vec_Int_tGia_PolynCollectLastXor (Gia_Man_t *pGia, int fVerbose)
 
Acec_Box_tAcec_ProduceBox (Gia_Man_t *p, int fVerbose)
 

Typedef Documentation

◆ Acec_Box_t

typedef typedefABC_NAMESPACE_HEADER_START struct Acec_Box_t_ Acec_Box_t

INCLUDES ///.

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

FileName [acecInt.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [CEC for arithmetic circuits.]

Synopsis [Internal declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

Id
acecInt.h,v 1.00 2005/06/20 00:00:00 alanmi Exp

] PARAMETERS ///

Definition at line 40 of file acecInt.h.

Function Documentation

◆ Acec_BoothFindPPG()

Vec_Bit_t * Acec_BoothFindPPG ( Gia_Man_t * p)
extern

Definition at line 656 of file acecMult.c.

657{
658 Vec_Bit_t * vIgnore = Vec_BitStart( Gia_ManObjNum(p) );
659 Vec_Int_t * vMap = Acec_MultFindPPs( p );
660 int i, Entry;
661 Vec_IntForEachEntry( vMap, Entry, i )
662 Vec_BitWriteEntry( vIgnore, Entry, 1 );
663 Vec_IntFree( vMap );
664 return vIgnore;
665}
Vec_Int_t * Acec_MultFindPPs(Gia_Man_t *p)
Definition acecMult.c:588
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
Cube * p
Definition exorList.c:222
typedefABC_NAMESPACE_HEADER_START struct Vec_Bit_t_ Vec_Bit_t
INCLUDES ///.
Definition vecBit.h:42
#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:

◆ Acec_BoxFreeP()

void Acec_BoxFreeP ( Acec_Box_t ** ppBox)
extern

Definition at line 54 of file acecTree.c.

55{
56 if ( *ppBox )
57 Acec_BoxFree( *ppBox );
58 *ppBox = NULL;
59}
ABC_NAMESPACE_IMPL_START void Acec_BoxFree(Acec_Box_t *pBox)
DECLARATIONS ///.
Definition acecTree.c:45
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acec_DeriveBox()

Acec_Box_t * Acec_DeriveBox ( Gia_Man_t * p,
Vec_Bit_t * vIgnore,
int fFilterIn,
int fFilterOut,
int fVerbose )
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 754 of file acecTree.c.

755{
756 Acec_Box_t * pBox = NULL;
757 Vec_Int_t * vAdds = Ree_ManComputeCuts( p, NULL, fVerbose );
758 Vec_Wec_t * vTrees = Acec_TreeFindTrees( p, vAdds, vIgnore, fFilterIn, fFilterOut );
759 if ( vTrees && Vec_WecSize(vTrees) > 0 )
760 {
761 pBox = Acec_CreateBox( p, vAdds, Vec_WecEntry(vTrees, 0) );
762 Acec_VerifyBoxLeaves( pBox, vIgnore );
763 }
764 if ( pBox )//&& fVerbose )
765 printf( "Processing tree %d: Ranks = %d. Adders = %d. Leaves = %d. Roots = %d.\n",
766 0, Vec_WecSize(pBox->vAdds), Vec_WecSizeSize(pBox->vAdds),
767 Vec_WecSizeSize(pBox->vLeafLits), Vec_WecSizeSize(pBox->vRootLits) );
768 if ( pBox && fVerbose )
769 Acec_TreePrintBox( pBox, vAdds );
770 //Acec_PrintAdders( pBox0->vAdds, vAdds );
771 //Acec_MultDetectInputs( p, pBox->vLeafLits, pBox->vRootLits );
772 Vec_WecFreeP( &vTrees );
773 Vec_IntFree( vAdds );
774 return pBox;
775}
typedefABC_NAMESPACE_HEADER_START struct Acec_Box_t_ Acec_Box_t
INCLUDES ///.
Definition acecInt.h:40
void Acec_TreePrintBox(Acec_Box_t *pBox, Vec_Int_t *vAdds)
Definition acecTree.c:586
Acec_Box_t * Acec_CreateBox(Gia_Man_t *p, Vec_Int_t *vAdds, Vec_Int_t *vTree)
Definition acecTree.c:607
Vec_Wec_t * Acec_TreeFindTrees(Gia_Man_t *p, Vec_Int_t *vAdds, Vec_Bit_t *vIgnore, int fFilterIn, int fFilterOut)
Definition acecTree.c:503
void Acec_VerifyBoxLeaves(Acec_Box_t *pBox, Vec_Bit_t *vIgnore)
Definition acecTree.c:72
Vec_Int_t * Ree_ManComputeCuts(Gia_Man_t *p, Vec_Int_t **pvXors, int fVerbose)
Definition acecRe.c:408
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
Definition vecWec.h:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acec_InsertBox()

Gia_Man_t * Acec_InsertBox ( Acec_Box_t * pBox,
int fAll )
extern

Definition at line 156 of file acecNorm.c.

157{
158 Gia_Man_t * p = pBox->pGia;
159 Gia_Man_t * pNew;
160 Gia_Obj_t * pObj;
161 Vec_Int_t * vRootRanks, * vLevel, * vTemp;
162 int i, k, iLit, iLitNew;
163 pNew = Gia_ManStart( Gia_ManObjNum(p) );
164 pNew->pName = Abc_UtilStrsav( p->pName );
165 pNew->pSpec = Abc_UtilStrsav( p->pSpec );
167 Gia_ManConst0(p)->Value = 0;
168 Gia_ManForEachCi( p, pObj, i )
169 pObj->Value = Gia_ManAppendCi( pNew );
170 // implement tree
171 if ( fAll )
172 vRootRanks = Acec_BuildTree( pNew, p, pBox->vLeafLits, NULL );
173 else
174 {
175 assert( pBox->vShared != NULL );
176 assert( pBox->vUnique != NULL );
177 vRootRanks = Acec_BuildTree( pNew, p, pBox->vShared, NULL );
178 vRootRanks = Acec_BuildTree( pNew, p, pBox->vUnique, vTemp = vRootRanks );
179 Vec_IntFree( vTemp );
180 }
181 // update polarity of literals
182 Vec_WecForEachLevel( pBox->vRootLits, vLevel, i )
183 Vec_IntForEachEntry( vLevel, iLit, k )
184 {
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) );
188 }
189 Vec_IntFree( vRootRanks );
190 // construct the outputs
191 Gia_ManForEachCo( p, pObj, i )
192 Acec_InsertBox_rec( pNew, p, Gia_ObjFanin0(pObj) );
193 Gia_ManForEachCo( p, pObj, i )
194 pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
195 Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) );
196 return pNew;
197}
int Acec_InsertBox_rec(Gia_Man_t *pNew, Gia_Man_t *p, Gia_Obj_t *pObj)
Definition acecNorm.c:118
Vec_Int_t * Acec_BuildTree(Gia_Man_t *pNew, Gia_Man_t *p, Vec_Wec_t *vLeafLits, Vec_Int_t *vRootLits)
Definition acecNorm.c:127
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Definition giaMan.c:764
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
Definition giaMan.c:57
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
void Gia_ManFillValue(Gia_Man_t *p)
Definition giaUtil.c:369
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
#define Gia_ManForEachCo(p, pObj, i)
Definition gia.h:1236
#define Gia_ManForEachCi(p, pObj, i)
Definition gia.h:1228
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
#define Vec_WecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
Definition vecWec.h:55
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acec_InsertFadd()

void Acec_InsertFadd ( Gia_Man_t * pNew,
int In[3],
int Out[2] )
extern

Definition at line 53 of file acecNorm.c.

54{
55 int In2[2], Out1[2], Out2[2];
56 Acec_InsertHadd( pNew, In, Out1 );
57 In2[0] = Out1[0];
58 In2[1] = In[2];
59 Acec_InsertHadd( pNew, In2, Out2 );
60 Out[0] = Out2[0];
61 Out[1] = Gia_ManAppendOr2( pNew, Out1[1], Out2[1] );
62}
ABC_NAMESPACE_IMPL_START void Acec_InsertHadd(Gia_Man_t *pNew, int In[2], int Out[2])
DECLARATIONS ///.
Definition acecNorm.c:45
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acec_MultDetectInputs()

Vec_Int_t * Acec_MultDetectInputs ( Gia_Man_t * p,
Vec_Wec_t * vLeafLits,
Vec_Wec_t * vRootLits )
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 431 of file acecMult.c.

432{
433 Vec_Int_t * vInputs = Vec_IntAlloc( 100 );
434 Vec_Int_t * vSupp = Vec_IntAlloc( 100 );
435 Vec_Wrd_t * vTemp = Vec_WrdStart( Gia_ManObjNum(p) );
436 Vec_Int_t * vRanks = Vec_IntStart( Gia_ManObjNum(p) );
437 Vec_Int_t * vCounts = Vec_IntStart( Gia_ManObjNum(p) );
438 Vec_Int_t * vLevel;
439 int i, k, iLit, iObj, j, Entry;
440
441 ABC_FREE( p->pRefs );
443 Gia_ManForEachCiId( p, iObj, i )
444 printf( "%d=%d ", iObj, Gia_ObjRefNumId(p, iObj) );
445 printf( "\n" );
446 Gia_ManForEachAndId( p, iObj )
447 if ( Gia_ObjRefNumId(p, iObj) >= 4 )
448 printf( "%d=%d ", iObj, Gia_ObjRefNumId(p, iObj) );
449 printf( "\n" );
450
451 Vec_WecForEachLevel( vLeafLits, vLevel, i )
452 Vec_IntForEachEntry( vLevel, iLit, k )
453 {
454 word Truth = Gia_ObjComputeTruth6Cis( p, iLit, vSupp, vTemp );
455 if ( Vec_IntSize(vSupp) >= 0 )
456 {
457 printf( "Leaf = %4d : ", Abc_Lit2Var(iLit) );
458 printf( "Rank = %2d ", i );
459 printf( "Supp = %2d ", Vec_IntSize(vSupp) );
460 Extra_PrintHex( stdout, (unsigned*)&Truth, Vec_IntSize(vSupp) );
461 if ( Vec_IntSize(vSupp) == 4 ) printf( " " );
462 if ( Vec_IntSize(vSupp) == 3 ) printf( " " );
463 if ( Vec_IntSize(vSupp) <= 2 ) printf( " " );
464 printf( " " );
465 Vec_IntPrint( vSupp );
466 /*
467 if ( Truth == 0xF335ACC0F335ACC0 )
468 {
469 int iObj = Abc_Lit2Var(iLit);
470 Gia_Man_t * pGia0 = Gia_ManDupAndCones( p, &iObj, 1, 1 );
471 Gia_ManShow( pGia0, NULL, 0, 0, 0 );
472 Gia_ManStop( pGia0 );
473 }
474 */
475 }
476 // support rank counts
477 Vec_IntForEachEntry( vSupp, Entry, j )
478 {
479 Vec_IntAddToEntry( vRanks, Entry, i );
480 Vec_IntAddToEntry( vCounts, Entry, 1 );
481 }
482 if ( k == Vec_IntSize(vLevel)-1 )
483 printf( "\n" );
484 }
485
486 Vec_IntForEachEntry( vCounts, Entry, j )
487 if ( Entry )
488 printf( "%d=%d(%.2f) ", j, Entry, 1.0*Vec_IntEntry(vRanks, j)/Entry );
489 printf( "\n" );
490
491 Vec_IntFree( vSupp );
492 Vec_WrdFree( vTemp );
493 Vec_IntFree( vRanks );
494 Vec_IntFree( vCounts );
495 return vInputs;
496}
#define ABC_FREE(obj)
Definition abc_global.h:267
void Extra_PrintHex(FILE *pFile, unsigned *pTruth, int nVars)
void Gia_ManCreateRefs(Gia_Man_t *p)
Definition giaUtil.c:779
word Gia_ObjComputeTruth6Cis(Gia_Man_t *p, int iLit, Vec_Int_t *vSupp, Vec_Wrd_t *vTemp)
Definition giaTruth.c:345
#define Gia_ManForEachAndId(p, i)
Definition gia.h:1216
#define Gia_ManForEachCiId(p, Id, i)
Definition gia.h:1230
unsigned __int64 word
DECLARATIONS ///.
Definition kitPerm.c:36
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
Definition vecWrd.h:42
Here is the call graph for this function:

◆ Acec_MultMarkPPs()

Vec_Bit_t * Acec_MultMarkPPs ( Gia_Man_t * p)
extern

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

Synopsis [Mark nodes whose function is exactly that of a Booth PP.]

Description []

SideEffects []

SeeAlso []

Definition at line 509 of file acecMult.c.

510{
511 word Saved[32] = {
512 ABC_CONST(0xF335ACC0F335ACC0),
513 ABC_CONST(0x35C035C035C035C0),
514 ABC_CONST(0xD728D728D728D728),
515 ABC_CONST(0xFD80FD80FD80FD80),
516 ABC_CONST(0xACC0ACC0ACC0ACC0),
517 ABC_CONST(0x7878787878787878),
518 ABC_CONST(0x2828282828282828),
519 ABC_CONST(0xD0D0D0D0D0D0D0D0),
520 ABC_CONST(0x8080808080808080),
521 ABC_CONST(0x8888888888888888),
522 ABC_CONST(0xAAAAAAAAAAAAAAAA),
523 ABC_CONST(0x5555555555555555),
524
525 ABC_CONST(0xD5A8D5A8D5A8D5A8),
526 ABC_CONST(0x2A572A572A572A57),
527 ABC_CONST(0xF3C0F3C0F3C0F3C0),
528 ABC_CONST(0x5858585858585858),
529 ABC_CONST(0xA7A7A7A7A7A7A7A7),
530 ABC_CONST(0x2727272727272727),
531 ABC_CONST(0xD8D8D8D8D8D8D8D8)
532 };
533
534 Vec_Bit_t * vRes = Vec_BitStart( Gia_ManObjNum(p) );
535 Vec_Wrd_t * vTemp = Vec_WrdStart( Gia_ManObjNum(p) );
536 Vec_Int_t * vSupp = Vec_IntAlloc( 100 );
537 int i, iObj, nProds = 0;
539 Gia_ManForEachAndId( p, iObj )
540 {
541 word Truth = Gia_ObjComputeTruth6Cis( p, Abc_Var2Lit(iObj, 0), vSupp, vTemp );
542 if ( Vec_IntSize(vSupp) > 6 )
543 continue;
544 vSupp->nSize = Abc_Tt6MinBase( &Truth, vSupp->pArray, vSupp->nSize );
545 if ( Vec_IntSize(vSupp) > 5 )
546 continue;
547 for ( i = 0; i < 32 && Saved[i]; i++ )
548 {
549 if ( Truth == Saved[i] || Truth == ~Saved[i] )
550 {
551 Vec_BitWriteEntry( vRes, iObj, 1 );
552 nProds++;
553 break;
554 }
555 }
556 }
558 printf( "Collected %d pps.\n", nProds );
559 Vec_IntFree( vSupp );
560 Vec_WrdFree( vTemp );
561 return vRes;
562}
#define ABC_CONST(number)
PARAMETERS ///.
Definition abc_global.h:240
void Gia_ManCleanMark0(Gia_Man_t *p)
Definition giaUtil.c:256
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acec_PrintAdders()

void Acec_PrintAdders ( Vec_Wec_t * vBoxes,
Vec_Int_t * vAdds )
extern

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

Synopsis [Derives one adder tree.]

Description []

SideEffects []

SeeAlso [] `

Definition at line 570 of file acecTree.c.

571{
572 Vec_Int_t * vLevel;
573 int i, k, iBox;
574 Vec_WecForEachLevel( vBoxes, vLevel, i )
575 {
576 printf( " %4d : %2d {", i, Vec_IntSize(vLevel) );
577 Vec_IntForEachEntry( vLevel, iBox, k )
578 {
579 printf( " %s%d=(%d,%d)", Vec_IntEntry(vAdds, 6*iBox+2) == 0 ? "*":"", iBox,
580 Vec_IntEntry(vAdds, 6*iBox+3), Vec_IntEntry(vAdds, 6*iBox+4) );
581 //printf( "(%d,%d,%d)", Vec_IntEntry(vAdds, 6*iBox+0), Vec_IntEntry(vAdds, 6*iBox+1), Vec_IntEntry(vAdds, 6*iBox+2) );
582 }
583 printf( " }\n" );
584 }
585}
Here is the caller graph for this function:

◆ Acec_ProduceBox()

Acec_Box_t * Acec_ProduceBox ( Gia_Man_t * p,
int fVerbose )
extern

Definition at line 375 of file acecXor.c.

376{
377 extern void Acec_TreeVerifyConnections( Gia_Man_t * p, Vec_Int_t * vAdds, Vec_Wec_t * vBoxes );
378
379 abctime clk = Abc_Clock();
380 Acec_Box_t * pBox = NULL;
381 Vec_Int_t * vXors, * vAdds = Ree_ManComputeCuts( p, &vXors, 0 );
382 Vec_Int_t * vTemp, * vXorRoots = Acec_FindXorRoots( p, vXors );
383 Vec_Int_t * vRanks = Acec_RankTrees( p, vXors, vXorRoots );
384 Vec_Wec_t * vXorLeaves, * vAddBoxes = NULL;
385
387
388 //Acec_CheckXors( p, vXors );
389
390 //Ree_ManPrintAdders( vAdds, 1 );
391 if ( fVerbose )
392 printf( "Detected %d full-adders and %d half-adders. Found %d XOR-cuts. ", Ree_ManCountFadds(vAdds), Vec_IntSize(vAdds)/6-Ree_ManCountFadds(vAdds), Vec_IntSize(vXors)/4 );
393 if ( fVerbose )
394 Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
395
396 vXorRoots = Acec_OrderTreeRoots( p, vAdds, vTemp = vXorRoots, vRanks );
397 Vec_IntFree( vTemp );
398 Vec_IntFree( vRanks );
399
400 vRanks = Acec_RankTrees( p, vXors, vXorRoots );
401 vXorLeaves = Acec_FindXorLeaves( p, vXors, vAdds, vXorRoots, vRanks, &vAddBoxes );
402 Vec_IntFree( vRanks );
403
404 //printf( "XOR roots after reordering: \n" );
405 //Vec_IntPrint( vXorRoots );
406 //printf( "XOR leaves: \n" );
407 //Vec_WecPrint( vXorLeaves, 0 );
408 //printf( "Adder boxes: \n" );
409 //Vec_WecPrint( vAddBoxes, 0 );
410
411 Acec_TreeVerifyConnections( p, vAdds, vAddBoxes );
412
413 pBox = Acec_FindBox( p, vAdds, vAddBoxes, vXorLeaves, vXorRoots );
414 //Vec_WecFree( vAddBoxes );
415
416 if ( fVerbose )
417 Acec_TreePrintBox( pBox, vAdds );
418
419 Vec_IntFree( vXorRoots );
420 Vec_WecFree( vXorLeaves );
421
422 Vec_IntFree( vXors );
423 Vec_IntFree( vAdds );
424
425 return pBox;
426}
ABC_INT64_T abctime
Definition abc_global.h:332
void Acec_TreePrintBox(Acec_Box_t *pBox, Vec_Int_t *vAdds)
Definition acecTree.c:586
void Acec_TreeVerifyConnections(Gia_Man_t *p, Vec_Int_t *vAdds, Vec_Wec_t *vBoxes)
Definition acecTree.c:336
Vec_Int_t * Acec_OrderTreeRoots(Gia_Man_t *p, Vec_Int_t *vAdds, Vec_Int_t *vXorRoots, Vec_Int_t *vRanks)
Definition acecXor.c:77
Vec_Int_t * Acec_FindXorRoots(Gia_Man_t *p, Vec_Int_t *vXors)
Definition acecXor.c:176
Vec_Wec_t * Acec_FindXorLeaves(Gia_Man_t *p, Vec_Int_t *vXors, Vec_Int_t *vAdds, Vec_Int_t *vXorRoots, Vec_Int_t *vRanks, Vec_Wec_t **pvAddBoxes)
Definition acecXor.c:228
Vec_Int_t * Acec_RankTrees(Gia_Man_t *p, Vec_Int_t *vXors, Vec_Int_t *vXorRoots)
Definition acecXor.c:187
Acec_Box_t * Acec_FindBox(Gia_Man_t *p, Vec_Int_t *vAdds, Vec_Wec_t *vAddBoxes, Vec_Wec_t *vXorLeaves, Vec_Int_t *vXorRoots)
Definition acecXor.c:286
int Ree_ManCountFadds(Vec_Int_t *vAdds)
Definition acecRe.c:556
int Gia_ManLevelNum(Gia_Man_t *p)
Definition giaUtil.c:546
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acec_TreePrintBox()

void Acec_TreePrintBox ( Acec_Box_t * pBox,
Vec_Int_t * vAdds )
extern

Definition at line 586 of file acecTree.c.

587{
588 printf( "Adders:\n" );
589 Acec_PrintAdders( pBox->vAdds, vAdds );
590 printf( "Inputs:\n" );
591 Vec_WecPrintLits( pBox->vLeafLits );
592 printf( "Outputs:\n" );
593 Vec_WecPrintLits( pBox->vRootLits );
594// printf( "Node %d has level %d.\n", 3715, Gia_ObjLevelId(pBox->pGia, 3715) );
595// printf( "Node %d has level %d.\n", 167, Gia_ObjLevelId(pBox->pGia, 167) );
596// printf( "Node %d has level %d.\n", 278, Gia_ObjLevelId(pBox->pGia, 278) );
597// printf( "Node %d has level %d.\n", 597, Gia_ObjLevelId(pBox->pGia, 597) );
598}
void Acec_PrintAdders(Vec_Wec_t *vBoxes, Vec_Int_t *vAdds)
Definition acecTree.c:570
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_PolynAnalyzeXors()

void Gia_PolynAnalyzeXors ( Gia_Man_t * pGia,
int fVerbose )
extern

Definition at line 69 of file acecUtil.c.

70{
71 int i, iDriver, Count = 0;
72 Vec_Int_t * vXors = Vec_IntAlloc( 100 );
73 if ( pGia->pMuxes == NULL )
74 {
75 printf( "AIG does not have XORs extracted.\n" );
76 return;
77 }
78 assert( pGia->pMuxes );
79 Gia_ManForEachCoDriverId( pGia, iDriver, i )
80 {
81 Vec_IntClear( vXors );
83 Gia_PolynCollectXors_rec( pGia, iDriver, vXors );
84 //printf( "%3d : ", i );
85 //Vec_IntPrint( vXors );
86 printf( "%d=%d ", i, Vec_IntSize(vXors) );
87 Count += Vec_IntSize(vXors);
88 }
89 printf( "Total = %d.\n", Count );
90 Vec_IntFree( vXors );
91}
ABC_NAMESPACE_IMPL_START void Gia_PolynCollectXors_rec(Gia_Man_t *pGia, int iObj, Vec_Int_t *vXors)
DECLARATIONS ///.
Definition acecUtil.c:45
#define Gia_ManForEachCoDriverId(p, DriverId, i)
Definition gia.h:1246
void Gia_ManIncrementTravId(Gia_Man_t *p)
Definition giaUtil.c:190
unsigned * pMuxes
Definition gia.h:106
Here is the call graph for this function:

◆ Gia_PolynCollectLastXor()

Vec_Int_t * Gia_PolynCollectLastXor ( Gia_Man_t * pGia,
int fVerbose )
extern

Definition at line 57 of file acecUtil.c.

58{
59 Vec_Int_t * vXors = Vec_IntAlloc( 100 );
60 Gia_Obj_t * pObj = Gia_ManCo( pGia, Gia_ManCoNum(pGia)-1 );
61 ABC_FREE( pGia->pRefs );
62 Gia_ManCreateRefs( pGia );
64 Gia_PolynCollectXors_rec( pGia, Gia_ObjFaninId0p(pGia, pObj), vXors );
65 Vec_IntReverseOrder( vXors );
66 ABC_FREE( pGia->pRefs );
67 return vXors;
68}
int * pRefs
Definition gia.h:118
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 )
extern

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
Here is the call graph for this function:
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 )
extern

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: