Commit ed1bf000 by Alan Mishchenko

Improvements to bit-blaster.

parent 69519f86
......@@ -1440,11 +1440,12 @@ int CmdCommandRenameFiles( Abc_Frame_t * pAbc, int argc, char **argv )
// sort by number
pOrder = Abc_QuickSortCost( Vec_IntArray(vNums), Vec_IntSize(vNums), 0 );
// rename files in that order
nDigits = Abc_Base10Log( nBase + Vec_IntSize(vNums) );
// nDigits = Abc_Base10Log( nBase + Vec_IntSize(vNums) );
nDigits = Abc_Base10Log( nBase + Vec_IntEntry(vNums, pOrder[Vec_IntSize(vNums)-1]) + 1 );
for ( i = 0; i < Vec_IntSize(vNums); i++ )
{
pOldName = (char *)Vec_PtrEntry( vNames, pOrder[i] );
sprintf( pNewName, "%s%0*d.%s", pNameNew ? pNameNew : "", nDigits, nBase+i, pNameExt );
sprintf( pNewName, "%s%0*d.%s", pNameNew ? pNameNew : "", nDigits, nBase+Vec_IntEntry(vNums, pOrder[i]), pNameExt );
printf( "%s -> %s\n", pOldName, pNewName );
rename( pOldName, pNewName );
}
......
......@@ -295,8 +295,13 @@ void Wlc_NtkPrintDistrib( Wlc_Ntk_t * p, int fVerbose )
pObj->Type == WLC_OBJ_BIT_NOT || pObj->Type == WLC_OBJ_LOGIC_NOT || pObj->Type == WLC_OBJ_ARI_MINUS )
Sign = Wlc_NtkPrintDistribMakeSign( Wlc_ObjSign(pObj), Wlc_ObjSign(Wlc_ObjFanin0(p, pObj)), 0 );
// 2-input types (including MUX)
else
else if ( Wlc_ObjFaninNum(pObj) == 1 )
Sign = Wlc_NtkPrintDistribMakeSign( Wlc_ObjSign(pObj), Wlc_ObjSign(Wlc_ObjFanin0(p, pObj)), 0 );
else
{
assert( Wlc_ObjFaninNum(pObj) >= 2 );
Sign = Wlc_NtkPrintDistribMakeSign( Wlc_ObjSign(pObj), Wlc_ObjSign(Wlc_ObjFanin0(p, pObj)), Wlc_ObjSign(Wlc_ObjFanin1(p, pObj)) );
}
// add to storage
Wlc_NtkPrintDistribAddOne( vTypes, vOccurs, pObj->Type, Sign );
}
......
......@@ -222,6 +222,8 @@ void Extra_PrintKMap(
fprintf( Output, "PrintKMap(): The on-set and the off-set overlap\n" );
return;
}
if ( nVars == 0 )
{ printf( "Function is constant %d.\n", !Cudd_IsComplement(OnSet) ); return; }
// print truth table for debugging
if ( fPrintTruth )
......
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