summaryrefslogtreecommitdiffstats
path: root/src/base/cba
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-09-03 14:44:44 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2015-09-03 14:44:44 -0700
commit5ca86b65ad5e6b13e9cd6921267c9da21996bf74 (patch)
tree820adbb853eb7d1bb00b8ea18132ef9fcfd7d93d /src/base/cba
parent6352d0b626472443887d9600b5ab0e3963734737 (diff)
downloadabc-5ca86b65ad5e6b13e9cd6921267c9da21996bf74.tar.gz
abc-5ca86b65ad5e6b13e9cd6921267c9da21996bf74.tar.bz2
abc-5ca86b65ad5e6b13e9cd6921267c9da21996bf74.zip
Improvements to Cba data-structure.
Diffstat (limited to 'src/base/cba')
-rw-r--r--src/base/cba/cbaBlast.c8
-rw-r--r--src/base/cba/cbaNtk.c4
2 files changed, 5 insertions, 7 deletions
diff --git a/src/base/cba/cbaBlast.c b/src/base/cba/cbaBlast.c
index f91887ee..b14b0bcd 100644
--- a/src/base/cba/cbaBlast.c
+++ b/src/base/cba/cbaBlast.c
@@ -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 )
{
- int fVerbose = 0;
int fUseOldMultiplierBlasting = 0;
- Gia_Man_t * pTemp, * pNew, * pExtra = NULL;
+ Gia_Man_t * pTemp, * pNew;
Vec_Int_t * vTemp0, * vTemp1, * vTemp2, * vRes;
Vec_Str_t * vInit = fSeq ? Vec_StrAlloc(100) : NULL;
Vec_Int_t * vBits = &p->vFonBits;
@@ -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 * pArg0 = Cba_VecLoadFanins( p, vRes, iFon0, pFans0, nRange0, 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)
Vec_IntShrink( vRes, nRange );
}
@@ -938,7 +936,7 @@ Gia_Man_t * Cba_NtkBlast( Cba_Ntk_t * p, int fSeq )
{
nRange = Cba_FonRangeSize( p, iFon );
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++ )
Gia_ManAppendCo( pNew, pFans0[b] );
}
@@ -982,7 +980,7 @@ Gia_Man_t * Cba_NtkBlast( Cba_Ntk_t * p, int fSeq )
{
nRange = Cba_FonRangeSize( p, iFon );
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++ )
Gia_ManAppendCo( pNew, pFans0[b] );
}
diff --git a/src/base/cba/cbaNtk.c b/src/base/cba/cbaNtk.c
index d5598c43..979b59ac 100644
--- a/src/base/cba/cbaNtk.c
+++ b/src/base/cba/cbaNtk.c
@@ -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( "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) );
}
// print by occurrence
@@ -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 ", Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 1)), Cba_ObjSigned(p, iFon1) ? "s" : " " );
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 ", Cba_FonIsConst(iFon1) ? Cba_NtkConst(p, Cba_FonConst(iFon1)) : Cba_FonNameStr(p, iFon1) );
printf( "\n" );