mirror of
https://github.com/YosysHQ/abc.git
synced 2026-09-03 16:29:14 +02:00
Renamed reference counting APIs in GIA package.
This commit is contained in:
+10
-10
@@ -93,7 +93,7 @@ void Gia_ManComputeDoms( Gia_Man_t * p )
|
||||
{
|
||||
if ( i == 0 || Gia_ObjIsCi(pObj) )
|
||||
continue;
|
||||
if ( pObj->fMark1 || (p->pRefs && Gia_ObjIsAnd(pObj) && Gia_ObjRefs(p, pObj) == 0) )
|
||||
if ( pObj->fMark1 || (p->pRefs && Gia_ObjIsAnd(pObj) && Gia_ObjRefNum(p, pObj) == 0) )
|
||||
continue;
|
||||
if ( Gia_ObjIsCo(pObj) )
|
||||
{
|
||||
@@ -173,7 +173,7 @@ Vec_Int_t * Gia_ManCollectDoms( Gia_Man_t * p )
|
||||
{
|
||||
if ( !pObj->fMark1 )
|
||||
continue;
|
||||
if ( p->pRefs && Gia_ObjRefs(p, pObj) == 0 )
|
||||
if ( p->pRefs && Gia_ObjRefNum(p, pObj) == 0 )
|
||||
continue;
|
||||
iDom = Gia_ObjDom(p, pObj);
|
||||
if ( iDom == -1 )
|
||||
@@ -238,7 +238,7 @@ void Gia_ManCountFanoutlessFlops( Gia_Man_t * p )
|
||||
int Counter = 0;
|
||||
Gia_ManCreateRefs( p );
|
||||
Gia_ManForEachRo( p, pObj, i )
|
||||
if ( Gia_ObjRefs(p, pObj) == 0 )
|
||||
if ( Gia_ObjRefNum(p, pObj) == 0 )
|
||||
Counter++;
|
||||
printf( "Fanoutless flops = %d.\n", Counter );
|
||||
ABC_FREE( p->pRefs );
|
||||
@@ -305,11 +305,11 @@ int Abs_GiaObjDeref_rec( Gia_Man_t * p, Gia_Obj_t * pNode )
|
||||
return 0;
|
||||
assert( Gia_ObjIsAnd(pNode) );
|
||||
pFanin = Gia_ObjFanin0(pNode);
|
||||
assert( Gia_ObjRefs(p, pFanin) > 0 );
|
||||
assert( Gia_ObjRefNum(p, pFanin) > 0 );
|
||||
if ( Gia_ObjRefDec(p, pFanin) == 0 )
|
||||
Counter += Abs_GiaObjDeref_rec( p, pFanin );
|
||||
pFanin = Gia_ObjFanin1(pNode);
|
||||
assert( Gia_ObjRefs(p, pFanin) > 0 );
|
||||
assert( Gia_ObjRefNum(p, pFanin) > 0 );
|
||||
if ( Gia_ObjRefDec(p, pFanin) == 0 )
|
||||
Counter += Abs_GiaObjDeref_rec( p, pFanin );
|
||||
return Counter + 1;
|
||||
@@ -347,14 +347,14 @@ int Abs_GiaSortNodes( Gia_Man_t * p, Vec_Int_t * vSupp )
|
||||
int nSize = Vec_IntSize(vSupp);
|
||||
int i, RetValue;
|
||||
Gia_ManForEachObjVec( vSupp, p, pObj, i )
|
||||
if ( i < nSize && Gia_ObjRefs(p, pObj) == 0 && !Gia_ObjIsRo(p, pObj) ) // add removable leaves
|
||||
if ( i < nSize && Gia_ObjRefNum(p, pObj) == 0 && !Gia_ObjIsRo(p, pObj) ) // add removable leaves
|
||||
{
|
||||
assert( pObj->fMark1 );
|
||||
Vec_IntPush( vSupp, Gia_ObjId(p, pObj) );
|
||||
}
|
||||
RetValue = Vec_IntSize(vSupp) - nSize;
|
||||
Gia_ManForEachObjVec( vSupp, p, pObj, i )
|
||||
if ( i < nSize && !(Gia_ObjRefs(p, pObj) == 0 && !Gia_ObjIsRo(p, pObj)) ) // add non-removable leaves
|
||||
if ( i < nSize && !(Gia_ObjRefNum(p, pObj) == 0 && !Gia_ObjIsRo(p, pObj)) ) // add non-removable leaves
|
||||
Vec_IntPush( vSupp, Gia_ObjId(p, pObj) );
|
||||
assert( Vec_IntSize(vSupp) == 2 * nSize );
|
||||
memmove( Vec_IntArray(vSupp), Vec_IntArray(vSupp) + nSize, sizeof(int) * nSize );
|
||||
@@ -413,7 +413,7 @@ void Abs_ManSupport2_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vSupp )
|
||||
if ( Gia_ObjIsTravIdCurrent(p, pObj) )
|
||||
return;
|
||||
Gia_ObjSetTravIdCurrent(p, pObj);
|
||||
if ( pObj->fMark1 || Gia_ObjIsRo(p, pObj) || Gia_ObjRefs(p, pObj) > 0 )
|
||||
if ( pObj->fMark1 || Gia_ObjIsRo(p, pObj) || Gia_ObjRefNum(p, pObj) > 0 )
|
||||
{
|
||||
Vec_IntPush( vSupp, Gia_ObjId(p, pObj) );
|
||||
return;
|
||||
@@ -464,7 +464,7 @@ int Abs_ManSupport3( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vSupp )
|
||||
if ( !Gia_ObjIsAnd(pTemp) )
|
||||
continue;
|
||||
assert( !pTemp->fMark1 );
|
||||
assert( Gia_ObjRefs(p, pTemp) > 0 );
|
||||
assert( Gia_ObjRefNum(p, pTemp) > 0 );
|
||||
pFan0 = Gia_ObjFanin0(pTemp);
|
||||
pFan1 = Gia_ObjFanin1(pTemp);
|
||||
if ( Gia_ObjIsTravIdCurrent(p, pFan0) && Gia_ObjIsTravIdCurrent(p, pFan1) )
|
||||
@@ -630,7 +630,7 @@ void Abs_RpmPerformMark( Gia_Man_t * p, int nCutMax, int fVerbose, int fVeryVerb
|
||||
Gia_ManForEachObjVec( vDoms, p, pObj, i )
|
||||
{
|
||||
assert( !pObj->fMark1 );
|
||||
assert( Gia_ObjRefs( p, pObj ) > 0 );
|
||||
assert( Gia_ObjRefNum( p, pObj ) > 0 );
|
||||
// dereference root node
|
||||
nNodes = Abs_GiaObjDeref_rec( p, pObj );
|
||||
/*
|
||||
|
||||
@@ -857,7 +857,7 @@ int Cec_ManSimClassesPrepare( Cec_ManSim_t * p, int LevelMax )
|
||||
p->pAig->pReprs = ABC_CALLOC( Gia_Rpr_t, Gia_ManObjNum(p->pAig) );
|
||||
p->pAig->pNexts = ABC_CALLOC( int, Gia_ManObjNum(p->pAig) );
|
||||
// create references
|
||||
Gia_ManSetRefs( p->pAig );
|
||||
Gia_ManCreateValueRefs( p->pAig );
|
||||
// set starting representative of internal nodes to be constant 0
|
||||
if ( p->pPars->fLatchCorr )
|
||||
Gia_ManForEachObj( p->pAig, pObj, i )
|
||||
@@ -908,7 +908,7 @@ int Cec_ManSimClassesPrepare( Cec_ManSim_t * p, int LevelMax )
|
||||
int Cec_ManSimClassesRefine( Cec_ManSim_t * p )
|
||||
{
|
||||
int i;
|
||||
Gia_ManSetRefs( p->pAig );
|
||||
Gia_ManCreateValueRefs( p->pAig );
|
||||
p->nWords = p->pPars->nWords;
|
||||
for ( i = 0; i < p->pPars->nRounds; i++ )
|
||||
{
|
||||
|
||||
@@ -548,7 +548,7 @@ int Cec_ManResimulateCounterExamples( Cec_ManSim_t * pSim, Vec_Int_t * vCexStore
|
||||
Vec_Ptr_t * vSimInfo;
|
||||
int RetValue = 0, iStart = 0;
|
||||
vPairs = Gia_ManCorrCreateRemapping( pSim->pAig );
|
||||
Gia_ManSetRefs( pSim->pAig );
|
||||
Gia_ManCreateValueRefs( pSim->pAig );
|
||||
// pSim->pPars->nWords = 63;
|
||||
pSim->pPars->nFrames = nFrames;
|
||||
vSimInfo = Vec_PtrAllocSimInfo( Gia_ManRegNum(pSim->pAig) + Gia_ManPiNum(pSim->pAig) * nFrames, pSim->pPars->nWords );
|
||||
@@ -584,7 +584,7 @@ int Cec_ManResimulateCounterExamplesComb( Cec_ManSim_t * pSim, Vec_Int_t * vCexS
|
||||
{
|
||||
Vec_Ptr_t * vSimInfo;
|
||||
int RetValue = 0, iStart = 0;
|
||||
Gia_ManSetRefs( pSim->pAig );
|
||||
Gia_ManCreateValueRefs( pSim->pAig );
|
||||
pSim->pPars->nFrames = 1;
|
||||
vSimInfo = Vec_PtrAllocSimInfo( Gia_ManCiNum(pSim->pAig), pSim->pPars->nWords );
|
||||
while ( iStart < Vec_IntSize(vCexStore) )
|
||||
|
||||
@@ -191,7 +191,7 @@ int Cec_ManSeqResimulateInfo( Gia_Man_t * pAig, Vec_Ptr_t * vSimInfo, Abc_Cex_t
|
||||
pParsSim->nFrames = (Vec_PtrSize(vSimInfo) - Gia_ManRegNum(pAig)) / Gia_ManPiNum(pAig);
|
||||
pParsSim->nWords = Vec_PtrReadWordsSimInfo( vSimInfo );
|
||||
pParsSim->fCheckMiter = fCheckMiter;
|
||||
Gia_ManSetRefs( pAig );
|
||||
Gia_ManCreateValueRefs( pAig );
|
||||
pSim = Cec_ManSimStart( pAig, pParsSim );
|
||||
if ( pBestState )
|
||||
pSim->pBestState = pBestState;
|
||||
|
||||
@@ -197,7 +197,7 @@ p->timePat += clock() - clk;
|
||||
clk = clock();
|
||||
if ( vInfo != NULL )
|
||||
{
|
||||
Gia_ManSetRefs( p->pAig );
|
||||
Gia_ManCreateValueRefs( p->pAig );
|
||||
for ( i = 0; i < pPat->nSeries; i++ )
|
||||
{
|
||||
Cec_ManFraCreateInfo( pSim, pSim->vCiSimInfo, vInfo, i );
|
||||
|
||||
Reference in New Issue
Block a user