Commit 5ca86b65 by Alan Mishchenko

Improvements to Cba data-structure.

parent 6352d0b6
...@@ -2053,7 +2053,7 @@ void Nf_ManSetDefaultPars( Jf_Par_t * pPars ) ...@@ -2053,7 +2053,7 @@ void Nf_ManSetDefaultPars( Jf_Par_t * pPars )
pPars->nCutNum = 16; pPars->nCutNum = 16;
pPars->nProcNum = 0; pPars->nProcNum = 0;
pPars->nRounds = 5; pPars->nRounds = 5;
pPars->nRoundsEla = 1; pPars->nRoundsEla = 0;
pPars->nRelaxRatio = 0; pPars->nRelaxRatio = 0;
pPars->nCoarseLimit = 3; pPars->nCoarseLimit = 3;
pPars->nAreaTuner = 1; pPars->nAreaTuner = 1;
......
...@@ -581,9 +581,8 @@ void Cba_BlastSqrt( Gia_Man_t * pNew, int * pNum, int nNum, Vec_Int_t * vTmp, Ve ...@@ -581,9 +581,8 @@ void Cba_BlastSqrt( Gia_Man_t * pNew, int * pNum, int nNum, Vec_Int_t * vTmp, Ve
***********************************************************************/ ***********************************************************************/
Gia_Man_t * Cba_NtkBlast( Cba_Ntk_t * p, int fSeq ) Gia_Man_t * Cba_NtkBlast( Cba_Ntk_t * p, int fSeq )
{ {
int fVerbose = 0;
int fUseOldMultiplierBlasting = 0; int fUseOldMultiplierBlasting = 0;
Gia_Man_t * pTemp, * pNew, * pExtra = NULL; Gia_Man_t * pTemp, * pNew;
Vec_Int_t * vTemp0, * vTemp1, * vTemp2, * vRes; Vec_Int_t * vTemp0, * vTemp1, * vTemp2, * vRes;
Vec_Str_t * vInit = fSeq ? Vec_StrAlloc(100) : NULL; Vec_Str_t * vInit = fSeq ? Vec_StrAlloc(100) : NULL;
Vec_Int_t * vBits = &p->vFonBits; Vec_Int_t * vBits = &p->vFonBits;
...@@ -855,7 +854,6 @@ Gia_Man_t * Cba_NtkBlast( Cba_Ntk_t * p, int fSeq ) ...@@ -855,7 +854,6 @@ Gia_Man_t * Cba_NtkBlast( Cba_Ntk_t * p, int fSeq )
int nRangeMax = Abc_MaxInt( nRange, Abc_MaxInt(nRange0, nRange1) ); int nRangeMax = Abc_MaxInt( nRange, Abc_MaxInt(nRange0, nRange1) );
int * pArg0 = Cba_VecLoadFanins( p, vRes, iFon0, pFans0, nRange0, nRangeMax, fSigned01 ); int * pArg0 = Cba_VecLoadFanins( p, vRes, iFon0, pFans0, nRange0, nRangeMax, fSigned01 );
int * pArg1 = Cba_VecLoadFanins( p, vTemp1, iFon1, pFans1, nRange1, nRangeMax, fSigned01 ); int * pArg1 = Cba_VecLoadFanins( p, vTemp1, iFon1, pFans1, nRange1, nRangeMax, fSigned01 );
int Carry = 0;
Cba_BlastSubtract( pNew, pArg0, pArg1, nRange ); // result is in pFan0 (vRes) Cba_BlastSubtract( pNew, pArg0, pArg1, nRange ); // result is in pFan0 (vRes)
Vec_IntShrink( vRes, nRange ); Vec_IntShrink( vRes, nRange );
} }
...@@ -938,7 +936,7 @@ Gia_Man_t * Cba_NtkBlast( Cba_Ntk_t * p, int fSeq ) ...@@ -938,7 +936,7 @@ Gia_Man_t * Cba_NtkBlast( Cba_Ntk_t * p, int fSeq )
{ {
nRange = Cba_FonRangeSize( p, iFon ); nRange = Cba_FonRangeSize( p, iFon );
pFans0 = Cba_FonIsReal(iFon) ? Vec_IntEntryP( vBits, Cba_FonCopy(p, iFon) ) : NULL; pFans0 = Cba_FonIsReal(iFon) ? Vec_IntEntryP( vBits, Cba_FonCopy(p, iFon) ) : NULL;
pFans0 = Cba_VecLoadFanins( p, vTemp0, iFon, pFans0, nRange0, nRange0, Cba_FonSigned(p, iFon) ); pFans0 = Cba_VecLoadFanins( p, vTemp0, iFon, pFans0, nRange, nRange, Cba_FonSigned(p, iFon) );
for ( b = 0; b < nRange; b++ ) for ( b = 0; b < nRange; b++ )
Gia_ManAppendCo( pNew, pFans0[b] ); Gia_ManAppendCo( pNew, pFans0[b] );
} }
...@@ -982,7 +980,7 @@ Gia_Man_t * Cba_NtkBlast( Cba_Ntk_t * p, int fSeq ) ...@@ -982,7 +980,7 @@ Gia_Man_t * Cba_NtkBlast( Cba_Ntk_t * p, int fSeq )
{ {
nRange = Cba_FonRangeSize( p, iFon ); nRange = Cba_FonRangeSize( p, iFon );
pFans0 = Cba_FonIsReal(iFon) ? Vec_IntEntryP( vBits, Cba_FonCopy(p, iFon) ) : NULL; pFans0 = Cba_FonIsReal(iFon) ? Vec_IntEntryP( vBits, Cba_FonCopy(p, iFon) ) : NULL;
pFans0 = Cba_VecLoadFanins( p, vTemp0, iFon, pFans0, nRange0, nRange0, Cba_FonSigned(p, iFon) ); pFans0 = Cba_VecLoadFanins( p, vTemp0, iFon, pFans0, nRange, nRange, Cba_FonSigned(p, iFon) );
for ( b = 0; b < nRange; b++ ) for ( b = 0; b < nRange; b++ )
Gia_ManAppendCo( pNew, pFans0[b] ); Gia_ManAppendCo( pNew, pFans0[b] );
} }
......
...@@ -204,7 +204,7 @@ void Cba_NtkPrintDistrib( Cba_Ntk_t * p, int fVerbose ) ...@@ -204,7 +204,7 @@ void Cba_NtkPrintDistrib( Cba_Ntk_t * p, int fVerbose )
{ {
printf( "Warning: %d objects of the design have non-zero-based ranges.\n", nCountRange ); printf( "Warning: %d objects of the design have non-zero-based ranges.\n", nCountRange );
printf( "In particular, object %6d with name \"%s\" has range %d=[%d:%d]\n", printf( "In particular, object %6d with name \"%s\" has range %d=[%d:%d]\n",
iRnObj, Cba_FonName(p, Cba_ObjFon0(p, iRnObj)), iRnObj, Cba_FonNameStr(p, Cba_ObjFon0(p, iRnObj)),
Cba_ObjRangeSize(p, iRnObj), Cba_ObjLeft(p, iRnObj), Cba_ObjRight(p, iRnObj) ); Cba_ObjRangeSize(p, iRnObj), Cba_ObjLeft(p, iRnObj), Cba_ObjRight(p, iRnObj) );
} }
// print by occurrence // print by occurrence
...@@ -256,7 +256,7 @@ void Cba_NtkPrintNodes( Cba_Ntk_t * p, int Type ) ...@@ -256,7 +256,7 @@ void Cba_NtkPrintNodes( Cba_Ntk_t * p, int Type )
printf( "%3d%s %s ", Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)), Cba_ObjSigned(p, iFon0) ? "s" : " ", pTypeNames[Type] ); printf( "%3d%s %s ", Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)), Cba_ObjSigned(p, iFon0) ? "s" : " ", pTypeNames[Type] );
printf( "%3d%s ", Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 1)), Cba_ObjSigned(p, iFon1) ? "s" : " " ); printf( "%3d%s ", Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 1)), Cba_ObjSigned(p, iFon1) ? "s" : " " );
printf( " : " ); printf( " : " );
printf( "%-12s = ", Cba_ObjName(p, i) ); printf( "%-12s = ", Cba_ObjNameStr(p, i) );
printf( "%-12s %s ", Cba_FonIsConst(iFon0) ? Cba_NtkConst(p, Cba_FonConst(iFon0)) : Cba_FonNameStr(p, iFon0), pTypeNames[Type] ); printf( "%-12s %s ", Cba_FonIsConst(iFon0) ? Cba_NtkConst(p, Cba_FonConst(iFon0)) : Cba_FonNameStr(p, iFon0), pTypeNames[Type] );
printf( "%-12s ", Cba_FonIsConst(iFon1) ? Cba_NtkConst(p, Cba_FonConst(iFon1)) : Cba_FonNameStr(p, iFon1) ); printf( "%-12s ", Cba_FonIsConst(iFon1) ? Cba_NtkConst(p, Cba_FonConst(iFon1)) : Cba_FonNameStr(p, iFon1) );
printf( "\n" ); printf( "\n" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment