Commit 77fde55b by Niklas Een

Added switch for netlist type to 'send_aig'. Changed defautl to &-space. Fixed…

Added switch for netlist type to 'send_aig'. Changed defautl to &-space. Fixed printf -> Abc_Print in some places.
parent 7da6ef1c
...@@ -2266,11 +2266,11 @@ int Abc_CommandPrintStatus( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -2266,11 +2266,11 @@ int Abc_CommandPrintStatus( Abc_Frame_t * pAbc, int argc, char ** argv )
goto usage; goto usage;
} }
} }
printf( "Status = %d Frames = %d ", pAbc->Status, pAbc->nFrames ); Abc_Print( 1,"Status = %d Frames = %d ", pAbc->Status, pAbc->nFrames );
if ( pAbc->pCex == NULL ) if ( pAbc->pCex == NULL )
printf( "Cex is not defined.\n" ); Abc_Print( 1,"Cex is not defined.\n" );
else else
printf( "Cex: PIs = %d Regs = %d PO = %d Frame = %d Bits = %d\n", Abc_Print( 1,"Cex: PIs = %d Regs = %d PO = %d Frame = %d Bits = %d\n",
pAbc->pCex->nPis, pAbc->pCex->nRegs, pAbc->pCex->nPis, pAbc->pCex->nRegs,
pAbc->pCex->iPo, pAbc->pCex->iFrame, pAbc->pCex->iPo, pAbc->pCex->iFrame,
pAbc->pCex->nBits ); pAbc->pCex->nBits );
...@@ -3887,7 +3887,7 @@ usage: ...@@ -3887,7 +3887,7 @@ usage:
Abc_Print( -2, "\t-w : toggle detailed printout of decomposed functions [default = %s]\n", pPars->fVeryVerbose? "yes": "no" ); Abc_Print( -2, "\t-w : toggle detailed printout of decomposed functions [default = %s]\n", pPars->fVeryVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -4766,7 +4766,7 @@ usage: ...@@ -4766,7 +4766,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -4793,7 +4793,7 @@ int Abc_CommandTestDec( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -4793,7 +4793,7 @@ int Abc_CommandTestDec( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
DecType = atoi(argv[globalUtilOptind]); DecType = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( DecType < 0 ) if ( DecType < 0 )
goto usage; goto usage;
break; break;
case 'N': case 'N':
...@@ -4804,7 +4804,7 @@ int Abc_CommandTestDec( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -4804,7 +4804,7 @@ int Abc_CommandTestDec( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nVarNum = atoi(argv[globalUtilOptind]); nVarNum = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nVarNum < 0 ) if ( nVarNum < 0 )
goto usage; goto usage;
break; break;
case 'v': case 'v':
...@@ -4818,12 +4818,12 @@ int Abc_CommandTestDec( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -4818,12 +4818,12 @@ int Abc_CommandTestDec( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
if ( argc != globalUtilOptind + 1 ) if ( argc != globalUtilOptind + 1 )
{ {
printf( "Input file is not given.\n" ); Abc_Print( 1,"Input file is not given.\n" );
return 0; return 0;
} }
if ( nVarNum >= 0 && nVarNum < 6 ) if ( nVarNum >= 0 && nVarNum < 6 )
{ {
printf( "The number of variables cannot be less than 6.\n" ); Abc_Print( 1,"The number of variables cannot be less than 6.\n" );
return 0; return 0;
} }
// get the output file name // get the output file name
...@@ -4848,14 +4848,14 @@ usage: ...@@ -4848,14 +4848,14 @@ usage:
Abc_Print( -2, "\t or a binary file with an array of truth tables (in this case,\n"); Abc_Print( -2, "\t or a binary file with an array of truth tables (in this case,\n");
Abc_Print( -2, "\t -N <num> is required to determine how many functions are stored)\n"); Abc_Print( -2, "\t -N <num> is required to determine how many functions are stored)\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -4884,7 +4884,7 @@ int Abc_CommandTestNpn( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -4884,7 +4884,7 @@ int Abc_CommandTestNpn( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
NpnType = atoi(argv[globalUtilOptind]); NpnType = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( NpnType < 0 ) if ( NpnType < 0 )
goto usage; goto usage;
break; break;
case 'N': case 'N':
...@@ -4895,7 +4895,7 @@ int Abc_CommandTestNpn( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -4895,7 +4895,7 @@ int Abc_CommandTestNpn( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nVarNum = atoi(argv[globalUtilOptind]); nVarNum = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nVarNum < 0 ) if ( nVarNum < 0 )
goto usage; goto usage;
break; break;
case 'd': case 'd':
...@@ -4915,12 +4915,12 @@ int Abc_CommandTestNpn( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -4915,12 +4915,12 @@ int Abc_CommandTestNpn( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
if ( argc != globalUtilOptind + 1 ) if ( argc != globalUtilOptind + 1 )
{ {
printf( "Input file is not given.\n" ); Abc_Print( 1,"Input file is not given.\n" );
return 0; return 0;
} }
if ( nVarNum >= 0 && nVarNum < 6 ) if ( nVarNum >= 0 && nVarNum < 6 )
{ {
printf( "The number of variables cannot be less than 6.\n" ); Abc_Print( 1,"The number of variables cannot be less than 6.\n" );
return 0; return 0;
} }
// get the output file name // get the output file name
...@@ -4948,7 +4948,7 @@ usage: ...@@ -4948,7 +4948,7 @@ usage:
Abc_Print( -2, "\t or a binary file with an array of truth tables (in this case,\n"); Abc_Print( -2, "\t or a binary file with an array of truth tables (in this case,\n");
Abc_Print( -2, "\t -N <num> is required to determine how many functions are stored)\n"); Abc_Print( -2, "\t -N <num> is required to determine how many functions are stored)\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -5953,7 +5953,7 @@ usage: ...@@ -5953,7 +5953,7 @@ usage:
if ( nPartSize == 0 ) if ( nPartSize == 0 )
strcpy( Buffer, "unused" ); strcpy( Buffer, "unused" );
else else
sprintf( Buffer, "%d", nPartSize ); sprintf(Buffer, "%d", nPartSize );
Abc_Print( -2, "usage: miter [-P <num>] [-cimtnh] <file1> <file2>\n" ); Abc_Print( -2, "usage: miter [-P <num>] [-cimtnh] <file1> <file2>\n" );
Abc_Print( -2, "\t computes the miter of the two circuits\n" ); Abc_Print( -2, "\t computes the miter of the two circuits\n" );
Abc_Print( -2, "\t-P <num> : output partition size [default = %s]\n", Buffer ); Abc_Print( -2, "\t-P <num> : output partition size [default = %s]\n", Buffer );
...@@ -6125,9 +6125,9 @@ int Abc_CommandOrPos( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -6125,9 +6125,9 @@ int Abc_CommandOrPos( Abc_Frame_t * pAbc, int argc, char ** argv )
Aig_ManStop( pMan ); Aig_ManStop( pMan );
// perform expansion // perform expansion
if ( Abc_NtkPoNum(pNtk) != Abc_NtkPoNum(pNtkRes) ) if ( Abc_NtkPoNum(pNtk) != Abc_NtkPoNum(pNtkRes) )
printf( "Expanded %d outputs into %d outputs using OR decomposition.\n", Abc_NtkPoNum(pNtk), Abc_NtkPoNum(pNtkRes) ); Abc_Print( 1,"Expanded %d outputs into %d outputs using OR decomposition.\n", Abc_NtkPoNum(pNtk), Abc_NtkPoNum(pNtkRes) );
else else
printf( "The output(s) cannot be structurally decomposed.\n" ); Abc_Print( 1,"The output(s) cannot be structurally decomposed.\n" );
// clear counter-example // clear counter-example
if ( pAbc->pCex ) if ( pAbc->pCex )
ABC_FREE( pAbc->pCex ); ABC_FREE( pAbc->pCex );
...@@ -8760,7 +8760,7 @@ int Abc_CommandGen( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -8760,7 +8760,7 @@ int Abc_CommandGen( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0; return 0;
} }
// read the file just produced // read the file just produced
sprintf( Command, "read %s", FileName ); sprintf(Command, "read %s", FileName );
Cmd_CommandExecute( pAbc, Command ); Cmd_CommandExecute( pAbc, Command );
return 0; return 0;
...@@ -9145,7 +9145,7 @@ int Abc_CommandOutdec( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -9145,7 +9145,7 @@ int Abc_CommandOutdec( Abc_Frame_t * pAbc, int argc, char ** argv )
globalUtilOptind++; globalUtilOptind++;
if ( nLits < 1 || nLits > 2 ) if ( nLits < 1 || nLits > 2 )
{ {
printf( "Currently, command \"outdec\" works for 1-lit and 2-lit primes only.\n" ); Abc_Print( 1,"Currently, command \"outdec\" works for 1-lit and 2-lit primes only.\n" );
goto usage; goto usage;
} }
break; break;
...@@ -11583,7 +11583,7 @@ usage: ...@@ -11583,7 +11583,7 @@ usage:
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
Synopsis [] Synopsis []
...@@ -11624,7 +11624,7 @@ usage: ...@@ -11624,7 +11624,7 @@ usage:
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
Synopsis [] Synopsis []
...@@ -11638,8 +11638,11 @@ usage: ...@@ -11638,8 +11638,11 @@ usage:
***********************************************************************/ ***********************************************************************/
int Abc_CommandSendAig( Abc_Frame_t * pAbc, int argc, char ** argv ) int Abc_CommandSendAig( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
extern int Gia_ManToBridgeAbsNetlist( FILE * pFile, Gia_Man_t * p ); extern int Gia_ManToBridgeAbsNetlist( FILE * pFile, Gia_Man_t * p, int msg_type );
int c, fAndSpace = 0; const int BRIDGE_NETLIST = 106;
const int BRIDGE_ABS_NETLIST = 107;
int c, fAndSpace = 1, fAbsNetlist = 0;
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "a" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "a" ) ) != EOF )
{ {
...@@ -11648,6 +11651,9 @@ int Abc_CommandSendAig( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -11648,6 +11651,9 @@ int Abc_CommandSendAig( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'a': case 'a':
fAndSpace ^= 1; fAndSpace ^= 1;
break; break;
case 'b':
fAbsNetlist ^= 1;
break;
default: default:
goto usage; goto usage;
} }
...@@ -11664,7 +11670,7 @@ int Abc_CommandSendAig( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -11664,7 +11670,7 @@ int Abc_CommandSendAig( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "There is no AIG in the &-space.\n" ); Abc_Print( -1, "There is no AIG in the &-space.\n" );
return 1; return 1;
} }
Gia_ManToBridgeAbsNetlist( stdout, pAbc->pGia ); Gia_ManToBridgeAbsNetlist( stdout, pAbc->pGia, fAbsNetlist ? BRIDGE_ABS_NETLIST : BRIDGE_NETLIST );
} }
else else
{ {
...@@ -11684,7 +11690,7 @@ int Abc_CommandSendAig( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -11684,7 +11690,7 @@ int Abc_CommandSendAig( Abc_Frame_t * pAbc, int argc, char ** argv )
pAig = Abc_NtkToDar( pAbc->pNtkCur, 0, 1 ); pAig = Abc_NtkToDar( pAbc->pNtkCur, 0, 1 );
pGia = Gia_ManFromAig( pAig ); pGia = Gia_ManFromAig( pAig );
Aig_ManStop( pAig ); Aig_ManStop( pAig );
Gia_ManToBridgeAbsNetlist( stdout, pGia ); Gia_ManToBridgeAbsNetlist( stdout, pGia, fAbsNetlist ? BRIDGE_ABS_NETLIST : BRIDGE_NETLIST );
Gia_ManStop( pGia ); Gia_ManStop( pGia );
} }
return 0; return 0;
...@@ -11693,10 +11699,11 @@ usage: ...@@ -11693,10 +11699,11 @@ usage:
Abc_Print( -2, "usage: send_aig -a\n" ); Abc_Print( -2, "usage: send_aig -a\n" );
Abc_Print( -2, "\t sends current AIG to the bridge\n" ); Abc_Print( -2, "\t sends current AIG to the bridge\n" );
Abc_Print( -2, "\t-a : toggle sending AIG from &-space [default = %s]\n", fAndSpace? "yes": "no" ); Abc_Print( -2, "\t-a : toggle sending AIG from &-space [default = %s]\n", fAndSpace? "yes": "no" );
Abc_Print( -2, "\t-b : toggle sending netlist tagged as \"abstraction\". [default = %s]\n", fAbsNetlist? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
Synopsis [] Synopsis []
...@@ -11742,7 +11749,7 @@ usage: ...@@ -11742,7 +11749,7 @@ usage:
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
Synopsis [] Synopsis []
...@@ -11951,7 +11958,7 @@ int Abc_CommandFraig( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -11951,7 +11958,7 @@ int Abc_CommandFraig( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0; return 0;
usage: usage:
sprintf( Buffer, "%d", pParams->nBTLimit ); sprintf(Buffer, "%d", pParams->nBTLimit );
Abc_Print( -2, "usage: fraig [-R num] [-D num] [-C num] [-rscpvtah]\n" ); Abc_Print( -2, "usage: fraig [-R num] [-D num] [-C num] [-rscpvtah]\n" );
Abc_Print( -2, "\t transforms a logic network into a functionally reduced AIG\n" ); Abc_Print( -2, "\t transforms a logic network into a functionally reduced AIG\n" );
Abc_Print( -2, "\t (known bugs: takes an UNSAT miter and returns a SAT one)\n"); Abc_Print( -2, "\t (known bugs: takes an UNSAT miter and returns a SAT one)\n");
...@@ -12493,7 +12500,7 @@ usage: ...@@ -12493,7 +12500,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -12743,7 +12750,7 @@ usage: ...@@ -12743,7 +12750,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -12780,7 +12787,7 @@ int Abc_CommandRecStart2( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -12780,7 +12787,7 @@ int Abc_CommandRecStart2( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nVars = atoi(argv[globalUtilOptind]); nVars = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nVars < 1 ) if ( nVars < 1 )
goto usage; goto usage;
break; break;
case 'C': case 'C':
...@@ -12791,7 +12798,7 @@ int Abc_CommandRecStart2( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -12791,7 +12798,7 @@ int Abc_CommandRecStart2( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nCuts = atoi(argv[globalUtilOptind]); nCuts = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nCuts < 1 ) if ( nCuts < 1 )
goto usage; goto usage;
break; break;
case 't': case 't':
...@@ -12823,7 +12830,7 @@ int Abc_CommandRecStart2( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -12823,7 +12830,7 @@ int Abc_CommandRecStart2( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( nArgcNew != 1 ) if ( nArgcNew != 1 )
Abc_Print( 1, "File name is not given on the command line. Start a new record.\n" ); Abc_Print( 1, "File name is not given on the command line. Start a new record.\n" );
else else
{ {
// get the input file name // get the input file name
FileName = pArgvNew[0]; FileName = pArgvNew[0];
// fix the wrong symbol // fix the wrong symbol
...@@ -12866,7 +12873,7 @@ usage: ...@@ -12866,7 +12873,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -12909,7 +12916,7 @@ usage: ...@@ -12909,7 +12916,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -12955,7 +12962,7 @@ usage: ...@@ -12955,7 +12962,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -13007,7 +13014,7 @@ usage: ...@@ -13007,7 +13014,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -13025,7 +13032,7 @@ int Abc_CommandRecDump2( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13025,7 +13032,7 @@ int Abc_CommandRecDump2( Abc_Frame_t * pAbc, int argc, char ** argv )
//pNtk = Abc_FrameReadNtk(pAbc); //pNtk = Abc_FrameReadNtk(pAbc);
// set defaults // set defaults
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
if ( !Abc_NtkRecIsRunning2() ) if ( !Abc_NtkRecIsRunning2() )
{ {
Abc_Print( -1, "The AIG subgraph recording is not started.\n" ); Abc_Print( -1, "The AIG subgraph recording is not started.\n" );
...@@ -13055,11 +13062,11 @@ int Abc_CommandRecDump2( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13055,11 +13062,11 @@ int Abc_CommandRecDump2( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1; return 1;
} }
else else
{ {
// get the input file name // get the input file name
FileName = pArgvNew[0]; FileName = pArgvNew[0];
Gia_WriteAiger( pGia, FileName, 0, 0 ); Gia_WriteAiger( pGia, FileName, 0, 0 );
} }
return 0; return 0;
usage: usage:
...@@ -13073,7 +13080,7 @@ usage: ...@@ -13073,7 +13080,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -13097,7 +13104,7 @@ int Abc_CommandRecFilter2( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13097,7 +13104,7 @@ int Abc_CommandRecFilter2( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nLimit = atoi(argv[globalUtilOptind]); nLimit = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nLimit < 0 ) if ( nLimit < 0 )
goto usage; goto usage;
break; break;
case 'h': case 'h':
...@@ -13113,7 +13120,7 @@ int Abc_CommandRecFilter2( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13113,7 +13120,7 @@ int Abc_CommandRecFilter2( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
if (!Abc_NtkRecIsInTrimMode2()) if (!Abc_NtkRecIsInTrimMode2())
Abc_Print( 0, "This command works fine only in trim mode. Please call \"rec_start2 -t\" first.\n" ); Abc_Print( 0, "This command works fine only in trim mode. Please call \"rec_start2 -t\" first.\n" );
Abc_NtkRecFilter2(nLimit); Abc_NtkRecFilter2(nLimit);
return 0; return 0;
...@@ -13131,7 +13138,7 @@ usage: ...@@ -13131,7 +13138,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -13171,7 +13178,7 @@ int Abc_CommandRecMerge2( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13171,7 +13178,7 @@ int Abc_CommandRecMerge2( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1; return 1;
} }
else else
{ {
// get the input file name // get the input file name
FileName = pArgvNew[0]; FileName = pArgvNew[0];
// fix the wrong symbol // fix the wrong symbol
...@@ -13211,7 +13218,7 @@ usage: ...@@ -13211,7 +13218,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -13241,7 +13248,7 @@ int Abc_CommandRecStart3( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13241,7 +13248,7 @@ int Abc_CommandRecStart3( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nVars = atoi(argv[globalUtilOptind]); nVars = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nVars < 1 ) if ( nVars < 1 )
goto usage; goto usage;
break; break;
case 'C': case 'C':
...@@ -13252,7 +13259,7 @@ int Abc_CommandRecStart3( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13252,7 +13259,7 @@ int Abc_CommandRecStart3( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nCuts = atoi(argv[globalUtilOptind]); nCuts = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nCuts < 1 ) if ( nCuts < 1 )
goto usage; goto usage;
break; break;
case 'f': case 'f':
...@@ -13282,7 +13289,7 @@ int Abc_CommandRecStart3( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13282,7 +13289,7 @@ int Abc_CommandRecStart3( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( nArgcNew != 1 ) if ( nArgcNew != 1 )
Abc_Print( 1, "File name is not given on the command line. Starting a new record.\n" ); Abc_Print( 1, "File name is not given on the command line. Starting a new record.\n" );
else else
{ {
// get the input file name // get the input file name
FileName = pArgvNew[0]; FileName = pArgvNew[0];
// fix the wrong symbol // fix the wrong symbol
...@@ -13327,7 +13334,7 @@ usage: ...@@ -13327,7 +13334,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -13368,7 +13375,7 @@ usage: ...@@ -13368,7 +13375,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -13412,7 +13419,7 @@ usage: ...@@ -13412,7 +13419,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -13464,7 +13471,7 @@ usage: ...@@ -13464,7 +13471,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -13509,11 +13516,11 @@ int Abc_CommandRecDump3( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13509,11 +13516,11 @@ int Abc_CommandRecDump3( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1; return 1;
} }
else else
{ {
// get the input file name // get the input file name
FileName = pArgvNew[0]; FileName = pArgvNew[0];
Gia_WriteAiger( pGia, FileName, 0, 0 ); Gia_WriteAiger( pGia, FileName, 0, 0 );
} }
return 0; return 0;
usage: usage:
...@@ -13528,7 +13535,7 @@ usage: ...@@ -13528,7 +13535,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -13568,7 +13575,7 @@ int Abc_CommandRecMerge3( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13568,7 +13575,7 @@ int Abc_CommandRecMerge3( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1; return 1;
} }
else else
{ {
// get the input file name // get the input file name
FileName = pArgvNew[0]; FileName = pArgvNew[0];
// fix the wrong symbol // fix the wrong symbol
...@@ -13654,7 +13661,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13654,7 +13661,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
DelayTarget = (float)atof(argv[globalUtilOptind]); DelayTarget = (float)atof(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( DelayTarget <= 0.0 ) if ( DelayTarget <= 0.0 )
goto usage; goto usage;
break; break;
case 'A': case 'A':
...@@ -13665,7 +13672,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13665,7 +13672,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
AreaMulti = (float)atof(argv[globalUtilOptind]); AreaMulti = (float)atof(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
// if ( AreaMulti < 0.0 ) // if ( AreaMulti < 0.0 )
// goto usage; // goto usage;
break; break;
case 'B': case 'B':
...@@ -13676,7 +13683,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13676,7 +13683,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
DelayMulti = (float)atof(argv[globalUtilOptind]); DelayMulti = (float)atof(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
// if ( DelayMulti < 0.0 ) // if ( DelayMulti < 0.0 )
// goto usage; // goto usage;
break; break;
case 'a': case 'a':
...@@ -13763,14 +13770,14 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -13763,14 +13770,14 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv )
usage: usage:
if ( DelayTarget == -1 ) if ( DelayTarget == -1 )
sprintf( Buffer, "not used" ); sprintf(Buffer, "not used" );
else else
sprintf( Buffer, "%.3f", DelayTarget ); sprintf(Buffer, "%.3f", DelayTarget );
Abc_Print( -2, "usage: map [-DAB float] [-arspvh]\n" ); Abc_Print( -2, "usage: map [-DAB float] [-arspvh]\n" );
Abc_Print( -2, "\t performs standard cell mapping of the current network\n" ); Abc_Print( -2, "\t performs standard cell mapping of the current network\n" );
Abc_Print( -2, "\t-D float : sets the global required times [default = %s]\n", Buffer ); Abc_Print( -2, "\t-D float : sets the global required times [default = %s]\n", Buffer );
Abc_Print( -2, "\t-A float : \"area multiplier\" to bias gate selection [default = %.2f]\n", AreaMulti ); Abc_Print( -2, "\t-A float : \"area multiplier\" to bias gate selection [default = %.2f]\n", AreaMulti );
Abc_Print( -2, "\t-B float : \"delay multiplier\" to bias gate selection [default = %.2f]\n", DelayMulti ); Abc_Print( -2, "\t-B float : \"delay multiplier\" to bias gate selection [default = %.2f]\n", DelayMulti );
Abc_Print( -2, "\t-a : toggles area-only mapping [default = %s]\n", fAreaOnly? "yes": "no" ); Abc_Print( -2, "\t-a : toggles area-only mapping [default = %s]\n", fAreaOnly? "yes": "no" );
Abc_Print( -2, "\t-r : toggles area recovery [default = %s]\n", fRecovery? "yes": "no" ); Abc_Print( -2, "\t-r : toggles area recovery [default = %s]\n", fRecovery? "yes": "no" );
Abc_Print( -2, "\t-s : toggles sweep after mapping [default = %s]\n", fSweep? "yes": "no" ); Abc_Print( -2, "\t-s : toggles sweep after mapping [default = %s]\n", fSweep? "yes": "no" );
...@@ -14348,13 +14355,13 @@ int Abc_CommandFpga( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -14348,13 +14355,13 @@ int Abc_CommandFpga( Abc_Frame_t * pAbc, int argc, char ** argv )
usage: usage:
if ( DelayTarget == -1 ) if ( DelayTarget == -1 )
sprintf( Buffer, "best possible" ); sprintf(Buffer, "best possible" );
else else
sprintf( Buffer, "%.2f", DelayTarget ); sprintf(Buffer, "%.2f", DelayTarget );
if ( nLutSize == -1 ) if ( nLutSize == -1 )
sprintf( LutSize, "library" ); sprintf(LutSize, "library" );
else else
sprintf( LutSize, "%d", nLutSize ); sprintf(LutSize, "%d", nLutSize );
Abc_Print( -2, "usage: fpga [-D float] [-K num] [-aplvh]\n" ); Abc_Print( -2, "usage: fpga [-D float] [-K num] [-aplvh]\n" );
Abc_Print( -2, "\t performs FPGA mapping of the current network\n" ); Abc_Print( -2, "\t performs FPGA mapping of the current network\n" );
Abc_Print( -2, "\t-a : toggles area recovery [default = %s]\n", fRecovery? "yes": "no" ); Abc_Print( -2, "\t-a : toggles area recovery [default = %s]\n", fRecovery? "yes": "no" );
...@@ -14485,9 +14492,9 @@ int Abc_CommandFpgaFast( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -14485,9 +14492,9 @@ int Abc_CommandFpgaFast( Abc_Frame_t * pAbc, int argc, char ** argv )
usage: usage:
if ( DelayTarget == -1 ) if ( DelayTarget == -1 )
sprintf( Buffer, "not used" ); sprintf(Buffer, "not used" );
else else
sprintf( Buffer, "%.2f", DelayTarget ); sprintf(Buffer, "%.2f", DelayTarget );
Abc_Print( -2, "usage: ffpga [-K num] [-avh]\n" ); Abc_Print( -2, "usage: ffpga [-K num] [-avh]\n" );
Abc_Print( -2, "\t performs fast FPGA mapping of the current network\n" ); Abc_Print( -2, "\t performs fast FPGA mapping of the current network\n" );
Abc_Print( -2, "\t-a : toggles area recovery [default = %s]\n", fRecovery? "yes": "no" ); Abc_Print( -2, "\t-a : toggles area recovery [default = %s]\n", fRecovery? "yes": "no" );
...@@ -14948,13 +14955,13 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -14948,13 +14955,13 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
usage: usage:
if ( pPars->DelayTarget == -1 ) if ( pPars->DelayTarget == -1 )
sprintf( Buffer, "best possible" ); sprintf(Buffer, "best possible" );
else else
sprintf( Buffer, "%.2f", pPars->DelayTarget ); sprintf(Buffer, "%.2f", pPars->DelayTarget );
if ( pPars->nLutSize == -1 ) if ( pPars->nLutSize == -1 )
sprintf( LutSize, "library" ); sprintf(LutSize, "library" );
else else
sprintf( LutSize, "%d", pPars->nLutSize ); sprintf(LutSize, "%d", pPars->nLutSize );
Abc_Print( -2, "usage: if [-KCFAG num] [-DEW float] [-S str] [-qarlepmsdbugyojikcvh]\n" ); Abc_Print( -2, "usage: if [-KCFAG num] [-DEW float] [-S str] [-qarlepmsdbugyojikcvh]\n" );
Abc_Print( -2, "\t performs FPGA technology mapping of the network\n" ); Abc_Print( -2, "\t performs FPGA technology mapping of the network\n" );
Abc_Print( -2, "\t-K num : the number of LUT inputs (2 < num < %d) [default = %s]\n", IF_MAX_LUTSIZE+1, LutSize ); Abc_Print( -2, "\t-K num : the number of LUT inputs (2 < num < %d) [default = %s]\n", IF_MAX_LUTSIZE+1, LutSize );
...@@ -17746,7 +17753,7 @@ int Abc_CommandSim3( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -17746,7 +17753,7 @@ int Abc_CommandSim3( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nRounds = atoi(argv[globalUtilOptind]); nRounds = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nRounds < 0 ) if ( nRounds < 0 )
goto usage; goto usage;
break; break;
case 'S': case 'S':
...@@ -17757,7 +17764,7 @@ int Abc_CommandSim3( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -17757,7 +17764,7 @@ int Abc_CommandSim3( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nRestart = atoi(argv[globalUtilOptind]); nRestart = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nRestart < 0 ) if ( nRestart < 0 )
goto usage; goto usage;
break; break;
case 'N': case 'N':
...@@ -18699,7 +18706,7 @@ usage: ...@@ -18699,7 +18706,7 @@ usage:
if ( nPartSize == 0 ) if ( nPartSize == 0 )
strcpy( Buffer, "unused" ); strcpy( Buffer, "unused" );
else else
sprintf( Buffer, "%d", nPartSize ); sprintf(Buffer, "%d", nPartSize );
Abc_Print( -2, "usage: cec [-T num] [-C num] [-I num] [-P num] [-psnvh] <file1> <file2>\n" ); Abc_Print( -2, "usage: cec [-T num] [-C num] [-I num] [-P num] [-psnvh] <file1> <file2>\n" );
Abc_Print( -2, "\t performs combinational equivalence checking\n" ); Abc_Print( -2, "\t performs combinational equivalence checking\n" );
Abc_Print( -2, "\t-T num : approximate runtime limit in seconds [default = %d]\n", nSeconds ); Abc_Print( -2, "\t-T num : approximate runtime limit in seconds [default = %d]\n", nSeconds );
...@@ -19230,7 +19237,7 @@ int Abc_CommandDProve( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -19230,7 +19237,7 @@ int Abc_CommandDProve( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( pSecPar->fReadUnsolved && pSecPar->nSMnumber >= 0 ) if ( pSecPar->fReadUnsolved && pSecPar->nSMnumber >= 0 )
{ {
char FileName[100]; char FileName[100];
sprintf( FileName, "sm%02d.aig", pSecPar->nSMnumber ); sprintf(FileName, "sm%02d.aig", pSecPar->nSMnumber );
pNtk = Io_Read( FileName, Io_ReadFileType(FileName), 1 ); pNtk = Io_Read( FileName, Io_ReadFileType(FileName), 1 );
if ( pNtk == NULL ) if ( pNtk == NULL )
Abc_Print( -1, "Cannot read back unsolved reduced sequential miter \"%s\",\n", FileName ); Abc_Print( -1, "Cannot read back unsolved reduced sequential miter \"%s\",\n", FileName );
...@@ -19806,7 +19813,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -19806,7 +19813,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nInsLimit = atoi(argv[globalUtilOptind]); nInsLimit = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nInsLimit < 0 ) if ( nInsLimit < 0 )
goto usage; goto usage;
break; break;
case 'L': case 'L':
...@@ -19817,7 +19824,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -19817,7 +19824,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nLearnedStart = atoi(argv[globalUtilOptind]); nLearnedStart = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nLearnedStart < 0 ) if ( nLearnedStart < 0 )
goto usage; goto usage;
break; break;
case 'D': case 'D':
...@@ -19828,7 +19835,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -19828,7 +19835,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nLearnedDelta = atoi(argv[globalUtilOptind]); nLearnedDelta = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nLearnedDelta < 0 ) if ( nLearnedDelta < 0 )
goto usage; goto usage;
break; break;
case 'E': case 'E':
...@@ -19839,7 +19846,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -19839,7 +19846,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nLearnedPerce = atoi(argv[globalUtilOptind]); nLearnedPerce = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nLearnedPerce < 0 ) if ( nLearnedPerce < 0 )
goto usage; goto usage;
break; break;
case 'p': case 'p':
...@@ -20829,9 +20836,9 @@ int Abc_CommandBmc3( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -20829,9 +20836,9 @@ int Abc_CommandBmc3( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( pPars->fSolveAll && pPars->fDropSatOuts ) if ( pPars->fSolveAll && pPars->fDropSatOuts )
{ {
if ( pNtk->vSeqModelVec == NULL ) if ( pNtk->vSeqModelVec == NULL )
printf( "The array of counter-examples is not available.\n" ); Abc_Print( 1,"The array of counter-examples is not available.\n" );
else if ( Vec_PtrSize(pNtk->vSeqModelVec) != Abc_NtkPoNum(pNtk) ) else if ( Vec_PtrSize(pNtk->vSeqModelVec) != Abc_NtkPoNum(pNtk) )
printf( "The array size does not match the number of outputs.\n" ); Abc_Print( 1,"The array size does not match the number of outputs.\n" );
else else
{ {
extern void Abc_NtkDropSatOutputs( Abc_Ntk_t * pNtk, Vec_Ptr_t * vCexes, int fVerbose ); extern void Abc_NtkDropSatOutputs( Abc_Ntk_t * pNtk, Vec_Ptr_t * vCexes, int fVerbose );
...@@ -21013,7 +21020,7 @@ int Abc_CommandBmcInter( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -21013,7 +21020,7 @@ int Abc_CommandBmcInter( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
if ( Abc_NtkConstrNum(pNtk) > 0 ) if ( Abc_NtkConstrNum(pNtk) > 0 )
{ {
printf( "Cannot solve multiple-output miter with constraints.\n" ); Abc_Print( 1,"Cannot solve multiple-output miter with constraints.\n" );
return 0; return 0;
} }
if ( pPars->fUseSeparate ) if ( pPars->fUseSeparate )
...@@ -21588,7 +21595,7 @@ int Abc_CommandInduction( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -21588,7 +21595,7 @@ int Abc_CommandInduction( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( fGetCex ) if ( fGetCex )
{ {
Abc_FrameReplaceCex( pAbc, &pNtk->pSeqModel ); Abc_FrameReplaceCex( pAbc, &pNtk->pSeqModel );
printf( "The current CEX in ABC is set to be the CEX to induction.\n" ); Abc_Print( 1,"The current CEX in ABC is set to be the CEX to induction.\n" );
} }
return 0; return 0;
usage: usage:
...@@ -21904,7 +21911,7 @@ int Abc_CommandUnfold( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -21904,7 +21911,7 @@ int Abc_CommandUnfold( Abc_Frame_t * pAbc, int argc, char ** argv )
pNtkRes = Abc_NtkDarUnfold( pNtk, nFrames, nConfs, nProps, fStruct, fOldAlgo, fVerbose ); pNtkRes = Abc_NtkDarUnfold( pNtk, nFrames, nConfs, nProps, fStruct, fOldAlgo, fVerbose );
if ( pNtkRes == NULL ) if ( pNtkRes == NULL )
{ {
printf( "Transformation has failed.\n" ); Abc_Print( 1,"Transformation has failed.\n" );
return 0; return 0;
} }
// replace the current network // replace the current network
...@@ -21986,7 +21993,7 @@ int Abc_CommandFold( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -21986,7 +21993,7 @@ int Abc_CommandFold( Abc_Frame_t * pAbc, int argc, char ** argv )
pNtkRes = Abc_NtkDarFold( pNtk, fCompl, fVerbose ); pNtkRes = Abc_NtkDarFold( pNtk, fCompl, fVerbose );
if ( pNtkRes == NULL ) if ( pNtkRes == NULL )
{ {
printf( "Transformation has failed.\n" ); Abc_Print( 1,"Transformation has failed.\n" );
return 0; return 0;
} }
// replace the current network // replace the current network
...@@ -22410,12 +22417,12 @@ int Abc_CommandReconcile( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -22410,12 +22417,12 @@ int Abc_CommandReconcile( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
if ( argc != globalUtilOptind + 2 ) if ( argc != globalUtilOptind + 2 )
{ {
printf( "Does not seen to have two files names as arguments.\n" ); Abc_Print( 1,"Does not seen to have two files names as arguments.\n" );
return 1; return 1;
} }
if ( pAbc->pCex == NULL ) if ( pAbc->pCex == NULL )
{ {
printf( "There is no current counter-example.\n" ); Abc_Print( 1,"There is no current counter-example.\n" );
return 1; return 1;
} }
...@@ -22438,7 +22445,7 @@ int Abc_CommandReconcile( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -22438,7 +22445,7 @@ int Abc_CommandReconcile( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_NtkDelete( pNtk2 ); Abc_NtkDelete( pNtk2 );
if ( pCex == NULL ) if ( pCex == NULL )
{ {
printf( "Counter-example computation has failed.\n" ); Abc_Print( 1,"Counter-example computation has failed.\n" );
Abc_NtkDelete( pNtk1 ); Abc_NtkDelete( pNtk1 );
return 1; return 1;
} }
...@@ -22563,7 +22570,7 @@ int Abc_CommandCexMin( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -22563,7 +22570,7 @@ int Abc_CommandCexMin( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_CexFree( vCexNew ); Abc_CexFree( vCexNew );
// Abc_FrameReplaceCex( pAbc, &vCexNew ); // Abc_FrameReplaceCex( pAbc, &vCexNew );
// printf( "Implementation of this command is not finished.\n" ); // Abc_Print( 1,"Implementation of this command is not finished.\n" );
} }
return 0; return 0;
...@@ -24173,7 +24180,7 @@ int Abc_CommandAbc9Sim3( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -24173,7 +24180,7 @@ int Abc_CommandAbc9Sim3( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nRestart = atoi(argv[globalUtilOptind]); nRestart = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nRestart < 0 ) if ( nRestart < 0 )
goto usage; goto usage;
break; break;
case 'N': case 'N':
...@@ -24728,7 +24735,7 @@ int Abc_CommandAbc9Equiv3( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -24728,7 +24735,7 @@ int Abc_CommandAbc9Equiv3( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nRestart = atoi(argv[globalUtilOptind]); nRestart = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nRestart < 0 ) if ( nRestart < 0 )
goto usage; goto usage;
break; break;
case 'N': case 'N':
...@@ -26159,8 +26166,8 @@ int Abc_CommandAbc9Srm( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26159,8 +26166,8 @@ int Abc_CommandAbc9Srm( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Srm(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9Srm(): There is no AIG.\n" );
return 1; return 1;
} }
sprintf( pFileName, "gsrm%s.aig", fSpeculate? "" : "s" ); sprintf(pFileName, "gsrm%s.aig", fSpeculate? "" : "s" );
sprintf( pFileName2, "gsyn%s.aig", fSpeculate? "" : "s" ); sprintf(pFileName2, "gsyn%s.aig", fSpeculate? "" : "s" );
pTemp = Gia_ManSpecReduce( pAbc->pGia, fDualOut, fSynthesis, fSpeculate, fSkipSome, fVerbose ); pTemp = Gia_ManSpecReduce( pAbc->pGia, fDualOut, fSynthesis, fSpeculate, fSkipSome, fVerbose );
if ( pTemp ) if ( pTemp )
{ {
...@@ -26260,7 +26267,7 @@ int Abc_CommandAbc9Srm2( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26260,7 +26267,7 @@ int Abc_CommandAbc9Srm2( Abc_Frame_t * pAbc, int argc, char ** argv )
pFileName1 = argv[globalUtilOptind]; pFileName1 = argv[globalUtilOptind];
pFileName2 = argv[globalUtilOptind+1]; pFileName2 = argv[globalUtilOptind+1];
// create file name // create file name
sprintf( pFileName, "gsrm.aig" ); sprintf(pFileName, "gsrm.aig" );
pTemp = Gia_ManDup( pAbc->pGia ); pTemp = Gia_ManDup( pAbc->pGia );
// copy equivalences // copy equivalences
pTemp->pReprs = ABC_ALLOC( Gia_Rpr_t, Gia_ManObjNum(pTemp) ); pTemp->pReprs = ABC_ALLOC( Gia_Rpr_t, Gia_ManObjNum(pTemp) );
...@@ -26832,10 +26839,10 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26832,10 +26839,10 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nLutSize = atoi(argv[globalUtilOptind]); pPars->nLutSize = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nLutSize < 0 ) if ( pPars->nLutSize < 0 )
goto usage; goto usage;
// if the LUT size is specified, disable library // if the LUT size is specified, disable library
pPars->pLutLib = NULL; pPars->pLutLib = NULL;
break; break;
case 'C': case 'C':
if ( globalUtilOptind >= argc ) if ( globalUtilOptind >= argc )
...@@ -26845,7 +26852,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26845,7 +26852,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nCutsMax = atoi(argv[globalUtilOptind]); pPars->nCutsMax = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nCutsMax < 0 ) if ( pPars->nCutsMax < 0 )
goto usage; goto usage;
break; break;
case 'F': case 'F':
...@@ -26856,7 +26863,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26856,7 +26863,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nFlowIters = atoi(argv[globalUtilOptind]); pPars->nFlowIters = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nFlowIters < 0 ) if ( pPars->nFlowIters < 0 )
goto usage; goto usage;
break; break;
case 'A': case 'A':
...@@ -26867,7 +26874,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26867,7 +26874,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nAreaIters = atoi(argv[globalUtilOptind]); pPars->nAreaIters = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nAreaIters < 0 ) if ( pPars->nAreaIters < 0 )
goto usage; goto usage;
break; break;
case 'G': case 'G':
...@@ -26878,7 +26885,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26878,7 +26885,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nGateSize = atoi(argv[globalUtilOptind]); pPars->nGateSize = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nGateSize < 2 ) if ( pPars->nGateSize < 2 )
goto usage; goto usage;
break; break;
case 'D': case 'D':
...@@ -26889,7 +26896,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26889,7 +26896,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->DelayTarget = (float)atof(argv[globalUtilOptind]); pPars->DelayTarget = (float)atof(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->DelayTarget <= 0.0 ) if ( pPars->DelayTarget <= 0.0 )
goto usage; goto usage;
break; break;
case 'E': case 'E':
...@@ -26900,7 +26907,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26900,7 +26907,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->Epsilon = (float)atof(argv[globalUtilOptind]); pPars->Epsilon = (float)atof(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->Epsilon < 0.0 || pPars->Epsilon > 1.0 ) if ( pPars->Epsilon < 0.0 || pPars->Epsilon > 1.0 )
goto usage; goto usage;
break; break;
case 'W': case 'W':
...@@ -26911,7 +26918,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26911,7 +26918,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->WireDelay = (float)atof(argv[globalUtilOptind]); pPars->WireDelay = (float)atof(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->WireDelay < 0.0 ) if ( pPars->WireDelay < 0.0 )
goto usage; goto usage;
break; break;
case 'S': case 'S':
...@@ -26922,7 +26929,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26922,7 +26929,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->pLutStruct = argv[globalUtilOptind]; pPars->pLutStruct = argv[globalUtilOptind];
globalUtilOptind++; globalUtilOptind++;
if ( strlen(pPars->pLutStruct) != 2 && strlen(pPars->pLutStruct) != 3 ) if ( strlen(pPars->pLutStruct) != 2 && strlen(pPars->pLutStruct) != 3 )
{ {
Abc_Print( -1, "Command line switch \"-S\" should be followed by a 2- or 3-char string (e.g. \"44\" or \"555\").\n" ); Abc_Print( -1, "Command line switch \"-S\" should be followed by a 2- or 3-char string (e.g. \"44\" or \"555\").\n" );
goto usage; goto usage;
...@@ -27038,7 +27045,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -27038,7 +27045,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "This feature only works for {4,5,6}-LUTs.\n" ); Abc_Print( -1, "This feature only works for {4,5,6}-LUTs.\n" );
return 1; return 1;
} }
pPars->fCutMin = 1; pPars->fCutMin = 1;
} }
if ( pPars->fEnableCheck07 + pPars->fEnableCheck08 + pPars->fEnableCheck10 + (pPars->pLutStruct != NULL) > 1 ) if ( pPars->fEnableCheck07 + pPars->fEnableCheck08 + pPars->fEnableCheck10 + (pPars->pLutStruct != NULL) > 1 )
...@@ -27054,7 +27061,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -27054,7 +27061,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1; return 1;
} }
pPars->pFuncCell = If_CutPerformCheck07; pPars->pFuncCell = If_CutPerformCheck07;
pPars->fCutMin = 1; pPars->fCutMin = 1;
} }
if ( pPars->fEnableCheck08 ) if ( pPars->fEnableCheck08 )
{ {
...@@ -27064,7 +27071,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -27064,7 +27071,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1; return 1;
} }
pPars->pFuncCell = If_CutPerformCheck08; pPars->pFuncCell = If_CutPerformCheck08;
pPars->fCutMin = 1; pPars->fCutMin = 1;
} }
if ( pPars->fEnableCheck10 ) if ( pPars->fEnableCheck10 )
{ {
...@@ -27074,7 +27081,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -27074,7 +27081,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1; return 1;
} }
pPars->pFuncCell = If_CutPerformCheck10; pPars->pFuncCell = If_CutPerformCheck10;
pPars->fCutMin = 1; pPars->fCutMin = 1;
} }
if ( pPars->pLutStruct ) if ( pPars->pLutStruct )
{ {
...@@ -27084,7 +27091,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -27084,7 +27091,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1; return 1;
} }
pPars->pFuncCell = If_CutPerformCheck16; pPars->pFuncCell = If_CutPerformCheck16;
pPars->fCutMin = 1; pPars->fCutMin = 1;
} }
// enable truth table computation if cut minimization is selected // enable truth table computation if cut minimization is selected
...@@ -27119,7 +27126,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -27119,7 +27126,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars->fExpRed = 0; pPars->fExpRed = 0;
pPars->fUsePerm = 1; pPars->fUsePerm = 1;
pPars->pLutLib = NULL; pPars->pLutLib = NULL;
pPars->nLutSize = pPars->nGateSize; pPars->nLutSize = pPars->nGateSize;
} }
// complain if truth tables are requested but the cut size is too large // complain if truth tables are requested but the cut size is too large
...@@ -27140,14 +27147,14 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -27140,14 +27147,14 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0; return 0;
usage: usage:
if ( pPars->DelayTarget == -1 ) if ( pPars->DelayTarget == -1 )
sprintf( Buffer, "best possible" ); sprintf(Buffer, "best possible" );
else else
sprintf( Buffer, "%.2f", pPars->DelayTarget ); sprintf(Buffer, "%.2f", pPars->DelayTarget );
if ( pPars->nLutSize == -1 ) if ( pPars->nLutSize == -1 )
sprintf( LutSize, "library" ); sprintf(LutSize, "library" );
else else
sprintf( LutSize, "%d", pPars->nLutSize ); sprintf(LutSize, "%d", pPars->nLutSize );
Abc_Print( -2, "usage: &if [-KCFAG num] [-DEW float] [-S str] [-qarlepmsdbgyojikcvh]\n" ); Abc_Print( -2, "usage: &if [-KCFAG num] [-DEW float] [-S str] [-qarlepmsdbgyojikcvh]\n" );
Abc_Print( -2, "\t performs FPGA technology mapping of the network\n" ); Abc_Print( -2, "\t performs FPGA technology mapping of the network\n" );
Abc_Print( -2, "\t-K num : the number of LUT inputs (2 < num < %d) [default = %s]\n", IF_MAX_LUTSIZE+1, LutSize ); Abc_Print( -2, "\t-K num : the number of LUT inputs (2 < num < %d) [default = %s]\n", IF_MAX_LUTSIZE+1, LutSize );
...@@ -27155,10 +27162,10 @@ usage: ...@@ -27155,10 +27162,10 @@ usage:
Abc_Print( -2, "\t-F num : the number of area flow recovery iterations (num >= 0) [default = %d]\n", pPars->nFlowIters ); Abc_Print( -2, "\t-F num : the number of area flow recovery iterations (num >= 0) [default = %d]\n", pPars->nFlowIters );
Abc_Print( -2, "\t-A num : the number of exact area recovery iterations (num >= 0) [default = %d]\n", pPars->nAreaIters ); Abc_Print( -2, "\t-A num : the number of exact area recovery iterations (num >= 0) [default = %d]\n", pPars->nAreaIters );
Abc_Print( -2, "\t-G num : the max AND/OR gate size for mapping (0 = unused) [default = %d]\n", pPars->nGateSize ); Abc_Print( -2, "\t-G num : the max AND/OR gate size for mapping (0 = unused) [default = %d]\n", pPars->nGateSize );
Abc_Print( -2, "\t-D float : sets the delay constraint for the mapping [default = %s]\n", Buffer ); Abc_Print( -2, "\t-D float : sets the delay constraint for the mapping [default = %s]\n", Buffer );
Abc_Print( -2, "\t-E float : sets epsilon used for tie-breaking [default = %f]\n", pPars->Epsilon ); Abc_Print( -2, "\t-E float : sets epsilon used for tie-breaking [default = %f]\n", pPars->Epsilon );
Abc_Print( -2, "\t-W float : sets wire delay between adjects LUTs [default = %f]\n", pPars->WireDelay ); Abc_Print( -2, "\t-W float : sets wire delay between adjects LUTs [default = %f]\n", pPars->WireDelay );
Abc_Print( -2, "\t-S str : string representing the LUT structure [default = %s]\n", pPars->pLutStruct ? pPars->pLutStruct : "not used" ); Abc_Print( -2, "\t-S str : string representing the LUT structure [default = %s]\n", pPars->pLutStruct ? pPars->pLutStruct : "not used" );
Abc_Print( -2, "\t-q : toggles preprocessing using several starting points [default = %s]\n", pPars->fPreprocess? "yes": "no" ); Abc_Print( -2, "\t-q : toggles preprocessing using several starting points [default = %s]\n", pPars->fPreprocess? "yes": "no" );
Abc_Print( -2, "\t-a : toggles area-oriented mapping [default = %s]\n", pPars->fArea? "yes": "no" ); Abc_Print( -2, "\t-a : toggles area-oriented mapping [default = %s]\n", pPars->fArea? "yes": "no" );
// Abc_Print( -2, "\t-f : toggles one fancy feature [default = %s]\n", pPars->fFancy? "yes": "no" ); // Abc_Print( -2, "\t-f : toggles one fancy feature [default = %s]\n", pPars->fFancy? "yes": "no" );
...@@ -27532,7 +27539,7 @@ usage: ...@@ -27532,7 +27539,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -27558,7 +27565,7 @@ int Abc_CommandAbc9Rpm( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -27558,7 +27565,7 @@ int Abc_CommandAbc9Rpm( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nCutMax = atoi(argv[globalUtilOptind]); nCutMax = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nCutMax < 0 ) if ( nCutMax < 0 )
goto usage; goto usage;
break; break;
case 'a': case 'a':
...@@ -27580,8 +27587,8 @@ int Abc_CommandAbc9Rpm( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -27580,8 +27587,8 @@ int Abc_CommandAbc9Rpm( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "Abc_CommandAbc9Rpm(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9Rpm(): There is no AIG.\n" );
return 0; return 0;
} }
if ( fUseOldAlgo ) if ( fUseOldAlgo )
pTemp = Abs_RpmPerformOld( pAbc->pGia, fVerbose ); pTemp = Abs_RpmPerformOld( pAbc->pGia, fVerbose );
else else
pTemp = Abs_RpmPerform( pAbc->pGia, nCutMax, fVerbose, fVeryVerbose ); pTemp = Abs_RpmPerform( pAbc->pGia, nCutMax, fVerbose, fVeryVerbose );
...@@ -28488,7 +28495,7 @@ usage: ...@@ -28488,7 +28495,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -28516,7 +28523,7 @@ int Abc_CommandAbc9CexMin( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28516,7 +28523,7 @@ int Abc_CommandAbc9CexMin( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
iFrameStart = atoi(argv[globalUtilOptind]); iFrameStart = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( iFrameStart < 0 ) if ( iFrameStart < 0 )
goto usage; goto usage;
break; break;
case 'N': case 'N':
...@@ -28527,7 +28534,7 @@ int Abc_CommandAbc9CexMin( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28527,7 +28534,7 @@ int Abc_CommandAbc9CexMin( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nRealPis = atoi(argv[globalUtilOptind]); nRealPis = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nRealPis < 0 ) if ( nRealPis < 0 )
goto usage; goto usage;
break; break;
case 'j': case 'j':
...@@ -28549,7 +28556,7 @@ int Abc_CommandAbc9CexMin( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28549,7 +28556,7 @@ int Abc_CommandAbc9CexMin( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "Abc_CommandAbc9CexMin(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9CexMin(): There is no AIG.\n" );
return 1; return 1;
} }
if ( Gia_ManRegNum(pAbc->pGia) == 0 ) if ( Gia_ManRegNum(pAbc->pGia) == 0 )
{ {
Abc_Print( -1, "Abc_CommandAbc9CexMin(): The network is combinational.\n" ); Abc_Print( -1, "Abc_CommandAbc9CexMin(): The network is combinational.\n" );
...@@ -28559,7 +28566,7 @@ int Abc_CommandAbc9CexMin( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28559,7 +28566,7 @@ int Abc_CommandAbc9CexMin( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "Abc_CommandAbc9CexMin(): There is no counter-example.\n" ); Abc_Print( -1, "Abc_CommandAbc9CexMin(): There is no counter-example.\n" );
return 1; return 1;
} }
pCexNew = Gia_ManCexMin( pAbc->pGia, pAbc->pCex, iFrameStart, nRealPis, fJustMax, fUseAll, fVerbose ); pCexNew = Gia_ManCexMin( pAbc->pGia, pAbc->pCex, iFrameStart, nRealPis, fJustMax, fUseAll, fVerbose );
if ( pCexNew ) if ( pCexNew )
Abc_FrameReplaceCex( pAbc, &pCexNew ); Abc_FrameReplaceCex( pAbc, &pCexNew );
...@@ -28575,7 +28582,7 @@ usage: ...@@ -28575,7 +28582,7 @@ usage:
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" ); Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -28583,7 +28590,7 @@ usage: ...@@ -28583,7 +28590,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -28611,7 +28618,7 @@ int Abc_CommandAbc9AbsDerive( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28611,7 +28618,7 @@ int Abc_CommandAbc9AbsDerive( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "Abc_CommandAbc9AbsDerive(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9AbsDerive(): There is no AIG.\n" );
return 1; return 1;
} }
if ( Gia_ManRegNum(pAbc->pGia) == 0 ) if ( Gia_ManRegNum(pAbc->pGia) == 0 )
{ {
Abc_Print( -1, "The network is combinational.\n" ); Abc_Print( -1, "The network is combinational.\n" );
...@@ -28639,7 +28646,7 @@ usage: ...@@ -28639,7 +28646,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -28667,7 +28674,7 @@ int Abc_CommandAbc9AbsRefine( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28667,7 +28674,7 @@ int Abc_CommandAbc9AbsRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nFfToAddMax = atoi(argv[globalUtilOptind]); nFfToAddMax = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nFfToAddMax < 0 ) if ( nFfToAddMax < 0 )
goto usage; goto usage;
break; break;
case 't': case 't':
...@@ -28689,7 +28696,7 @@ int Abc_CommandAbc9AbsRefine( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28689,7 +28696,7 @@ int Abc_CommandAbc9AbsRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "Abc_CommandAbc9AbsRefine(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9AbsRefine(): There is no AIG.\n" );
return 1; return 1;
} }
if ( Gia_ManRegNum(pAbc->pGia) == 0 ) if ( Gia_ManRegNum(pAbc->pGia) == 0 )
{ {
Abc_Print( -1, "The network is combinational.\n" ); Abc_Print( -1, "The network is combinational.\n" );
...@@ -28699,7 +28706,7 @@ int Abc_CommandAbc9AbsRefine( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28699,7 +28706,7 @@ int Abc_CommandAbc9AbsRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "Abc_CommandAbc9AbsRefine(): There is no counter-example.\n" ); Abc_Print( -1, "Abc_CommandAbc9AbsRefine(): There is no counter-example.\n" );
return 1; return 1;
} }
pAbc->Status = Gia_ManCexAbstractionRefine( pAbc->pGia, pAbc->pCex, nFfToAddMax, fTryFour, fSensePath, fVerbose ); pAbc->Status = Gia_ManCexAbstractionRefine( pAbc->pGia, pAbc->pCex, nFfToAddMax, fTryFour, fSensePath, fVerbose );
Abc_FrameReplaceCex( pAbc, &pAbc->pGia->pCexSeq ); Abc_FrameReplaceCex( pAbc, &pAbc->pGia->pCexSeq );
return 0; return 0;
...@@ -28713,7 +28720,7 @@ usage: ...@@ -28713,7 +28720,7 @@ usage:
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" ); Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -28749,7 +28756,7 @@ int Abc_CommandAbc9GlaDerive( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28749,7 +28756,7 @@ int Abc_CommandAbc9GlaDerive( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "Abc_CommandAbc9GlaDerive(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9GlaDerive(): There is no AIG.\n" );
return 1; return 1;
} }
/* /*
if ( Gia_ManRegNum(pAbc->pGia) == 0 ) if ( Gia_ManRegNum(pAbc->pGia) == 0 )
{ {
...@@ -28766,7 +28773,7 @@ int Abc_CommandAbc9GlaDerive( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28766,7 +28773,7 @@ int Abc_CommandAbc9GlaDerive( Abc_Frame_t * pAbc, int argc, char ** argv )
Gia_ManStop( pTemp ); Gia_ManStop( pTemp );
pTemp = Gia_ManDupAbsGates( pAbc->pGia, pAbc->pGia->vGateClasses ); pTemp = Gia_ManDupAbsGates( pAbc->pGia, pAbc->pGia->vGateClasses );
Abc_CommandUpdate9( pAbc, pTemp ); Abc_CommandUpdate9( pAbc, pTemp );
// printf( "This command is currently not enabled.\n" ); // Abc_Print( 1,"This command is currently not enabled.\n" );
return 0; return 0;
usage: usage:
...@@ -28808,7 +28815,7 @@ int Abc_CommandAbc9GlaRefine( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28808,7 +28815,7 @@ int Abc_CommandAbc9GlaRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
iFrameStart = atoi(argv[globalUtilOptind]); iFrameStart = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( iFrameStart < 0 ) if ( iFrameStart < 0 )
goto usage; goto usage;
break; break;
case 'G': case 'G':
...@@ -28819,7 +28826,7 @@ int Abc_CommandAbc9GlaRefine( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28819,7 +28826,7 @@ int Abc_CommandAbc9GlaRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
iFrameExtra = atoi(argv[globalUtilOptind]); iFrameExtra = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( iFrameExtra < 0 ) if ( iFrameExtra < 0 )
goto usage; goto usage;
break; break;
case 'm': case 'm':
...@@ -28838,7 +28845,7 @@ int Abc_CommandAbc9GlaRefine( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28838,7 +28845,7 @@ int Abc_CommandAbc9GlaRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "Abc_CommandAbc9GlaRefine(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9GlaRefine(): There is no AIG.\n" );
return 1; return 1;
} }
if ( Gia_ManRegNum(pAbc->pGia) == 0 ) if ( Gia_ManRegNum(pAbc->pGia) == 0 )
{ {
Abc_Print( -1, "The network is combinational.\n" ); Abc_Print( -1, "The network is combinational.\n" );
...@@ -28848,7 +28855,7 @@ int Abc_CommandAbc9GlaRefine( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28848,7 +28855,7 @@ int Abc_CommandAbc9GlaRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "Abc_CommandAbc9GlaRefine(): There is no counter-example.\n" ); Abc_Print( -1, "Abc_CommandAbc9GlaRefine(): There is no counter-example.\n" );
return 1; return 1;
} }
pAbc->Status = Gia_ManNewRefine( pAbc->pGia, pAbc->pCex, iFrameStart, iFrameExtra, fVerbose ); pAbc->Status = Gia_ManNewRefine( pAbc->pGia, pAbc->pCex, iFrameStart, iFrameExtra, fVerbose );
Abc_FrameReplaceCex( pAbc, &pAbc->pGia->pCexSeq ); Abc_FrameReplaceCex( pAbc, &pAbc->pGia->pCexSeq );
return 0; return 0;
...@@ -28862,14 +28869,14 @@ usage: ...@@ -28862,14 +28869,14 @@ usage:
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" ); Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -28896,7 +28903,7 @@ int Abc_CommandAbc9GlaShrink( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28896,7 +28903,7 @@ int Abc_CommandAbc9GlaShrink( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nFrameMax = atoi(argv[globalUtilOptind]); nFrameMax = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nFrameMax < 0 ) if ( nFrameMax < 0 )
goto usage; goto usage;
break; break;
case 'T': case 'T':
...@@ -28907,7 +28914,7 @@ int Abc_CommandAbc9GlaShrink( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28907,7 +28914,7 @@ int Abc_CommandAbc9GlaShrink( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nTimeOut = atoi(argv[globalUtilOptind]); nTimeOut = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nTimeOut < 0 ) if ( nTimeOut < 0 )
goto usage; goto usage;
break; break;
case 'p': case 'p':
...@@ -28932,7 +28939,7 @@ int Abc_CommandAbc9GlaShrink( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28932,7 +28939,7 @@ int Abc_CommandAbc9GlaShrink( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "Abc_CommandAbc9GlaShrink(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9GlaShrink(): There is no AIG.\n" );
return 1; return 1;
} }
if ( pAbc->pGia->vGateClasses == NULL ) if ( pAbc->pGia->vGateClasses == NULL )
{ {
Abc_Print( -1, "Abc_CommandAbc9GlaShrink(): There is no gate-level abstraction.\n" ); Abc_Print( -1, "Abc_CommandAbc9GlaShrink(): There is no gate-level abstraction.\n" );
...@@ -28952,7 +28959,7 @@ usage: ...@@ -28952,7 +28959,7 @@ usage:
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" ); Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -28960,7 +28967,7 @@ usage: ...@@ -28960,7 +28967,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -28984,7 +28991,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28984,7 +28991,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nFramesMax = atoi(argv[globalUtilOptind]); pPars->nFramesMax = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nFramesMax < 0 ) if ( pPars->nFramesMax < 0 )
goto usage; goto usage;
break; break;
case 'S': case 'S':
...@@ -28995,7 +29002,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28995,7 +29002,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nFramesStart = atoi(argv[globalUtilOptind]); pPars->nFramesStart = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nFramesStart < 0 ) if ( pPars->nFramesStart < 0 )
goto usage; goto usage;
break; break;
case 'C': case 'C':
...@@ -29006,7 +29013,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29006,7 +29013,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nConfLimit = atoi(argv[globalUtilOptind]); pPars->nConfLimit = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nConfLimit < 0 ) if ( pPars->nConfLimit < 0 )
goto usage; goto usage;
break; break;
case 'L': case 'L':
...@@ -29017,7 +29024,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29017,7 +29024,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nLearnedStart = atoi(argv[globalUtilOptind]); pPars->nLearnedStart = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nLearnedStart < 0 ) if ( pPars->nLearnedStart < 0 )
goto usage; goto usage;
break; break;
case 'D': case 'D':
...@@ -29028,7 +29035,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29028,7 +29035,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nLearnedDelta = atoi(argv[globalUtilOptind]); pPars->nLearnedDelta = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nLearnedDelta < 0 ) if ( pPars->nLearnedDelta < 0 )
goto usage; goto usage;
break; break;
case 'E': case 'E':
...@@ -29039,7 +29046,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29039,7 +29046,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nLearnedPerce = atoi(argv[globalUtilOptind]); pPars->nLearnedPerce = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nLearnedPerce < 0 ) if ( pPars->nLearnedPerce < 0 )
goto usage; goto usage;
break; break;
case 'T': case 'T':
...@@ -29050,7 +29057,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29050,7 +29057,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nTimeOut = atoi(argv[globalUtilOptind]); pPars->nTimeOut = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nTimeOut < 0 ) if ( pPars->nTimeOut < 0 )
goto usage; goto usage;
break; break;
case 'R': case 'R':
...@@ -29061,7 +29068,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29061,7 +29068,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nRatioMin = atoi(argv[globalUtilOptind]); pPars->nRatioMin = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nRatioMin < 0 ) if ( pPars->nRatioMin < 0 )
goto usage; goto usage;
break; break;
case 'P': case 'P':
...@@ -29072,7 +29079,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29072,7 +29079,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nRatioMax = atoi(argv[globalUtilOptind]); pPars->nRatioMax = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nRatioMax < 0 ) if ( pPars->nRatioMax < 0 )
goto usage; goto usage;
break; break;
case 'B': case 'B':
...@@ -29083,7 +29090,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29083,7 +29090,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nFramesNoChangeLim = atoi(argv[globalUtilOptind]); pPars->nFramesNoChangeLim = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nFramesNoChangeLim < 0 ) if ( pPars->nFramesNoChangeLim < 0 )
goto usage; goto usage;
break; break;
case 'A': case 'A':
...@@ -29151,7 +29158,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29151,7 +29158,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "There is no AIG.\n" ); Abc_Print( -1, "There is no AIG.\n" );
return 0; return 0;
} }
/* /*
if ( Gia_ManRegNum(pAbc->pGia) == 0 ) if ( Gia_ManRegNum(pAbc->pGia) == 0 )
{ {
Abc_Print( -1, "The network is combinational.\n" ); Abc_Print( -1, "The network is combinational.\n" );
...@@ -29211,7 +29218,7 @@ usage: ...@@ -29211,7 +29218,7 @@ usage:
Abc_Print( -2, "\t-w : toggle printing more verbose information [default = %s]\n", pPars->fVeryVerbose? "yes": "no" ); Abc_Print( -2, "\t-w : toggle printing more verbose information [default = %s]\n", pPars->fVeryVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -29219,7 +29226,7 @@ usage: ...@@ -29219,7 +29226,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -29243,7 +29250,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29243,7 +29250,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nFramesMax = atoi(argv[globalUtilOptind]); pPars->nFramesMax = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nFramesMax < 0 ) if ( pPars->nFramesMax < 0 )
goto usage; goto usage;
break; break;
case 'S': case 'S':
...@@ -29254,7 +29261,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29254,7 +29261,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nFramesStart = atoi(argv[globalUtilOptind]); pPars->nFramesStart = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nFramesStart < 0 ) if ( pPars->nFramesStart < 0 )
goto usage; goto usage;
break; break;
case 'P': case 'P':
...@@ -29265,7 +29272,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29265,7 +29272,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nFramesPast = atoi(argv[globalUtilOptind]); pPars->nFramesPast = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nFramesPast < 0 ) if ( pPars->nFramesPast < 0 )
goto usage; goto usage;
break; break;
case 'C': case 'C':
...@@ -29276,7 +29283,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29276,7 +29283,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nConfLimit = atoi(argv[globalUtilOptind]); pPars->nConfLimit = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nConfLimit < 0 ) if ( pPars->nConfLimit < 0 )
goto usage; goto usage;
break; break;
case 'L': case 'L':
...@@ -29287,7 +29294,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29287,7 +29294,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nLearnedStart = atoi(argv[globalUtilOptind]); pPars->nLearnedStart = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nLearnedStart < 0 ) if ( pPars->nLearnedStart < 0 )
goto usage; goto usage;
break; break;
case 'D': case 'D':
...@@ -29298,7 +29305,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29298,7 +29305,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nLearnedDelta = atoi(argv[globalUtilOptind]); pPars->nLearnedDelta = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nLearnedDelta < 0 ) if ( pPars->nLearnedDelta < 0 )
goto usage; goto usage;
break; break;
case 'E': case 'E':
...@@ -29309,7 +29316,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29309,7 +29316,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nLearnedPerce = atoi(argv[globalUtilOptind]); pPars->nLearnedPerce = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nLearnedPerce < 0 ) if ( pPars->nLearnedPerce < 0 )
goto usage; goto usage;
break; break;
case 'T': case 'T':
...@@ -29320,7 +29327,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29320,7 +29327,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nTimeOut = atoi(argv[globalUtilOptind]); pPars->nTimeOut = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nTimeOut < 0 ) if ( pPars->nTimeOut < 0 )
goto usage; goto usage;
break; break;
case 'R': case 'R':
...@@ -29331,7 +29338,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29331,7 +29338,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->nRatioMin = atoi(argv[globalUtilOptind]); pPars->nRatioMin = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nRatioMin < 0 ) if ( pPars->nRatioMin < 0 )
goto usage; goto usage;
break; break;
case 'A': case 'A':
...@@ -29368,7 +29375,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29368,7 +29375,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Print( -1, "There is no AIG.\n" ); Abc_Print( -1, "There is no AIG.\n" );
return 0; return 0;
} }
if ( Gia_ManRegNum(pAbc->pGia) == 0 ) if ( Gia_ManRegNum(pAbc->pGia) == 0 )
{ {
Abc_Print( -1, "The network is combinational.\n" ); Abc_Print( -1, "The network is combinational.\n" );
...@@ -29414,14 +29421,14 @@ usage: ...@@ -29414,14 +29421,14 @@ usage:
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", pPars->fVerbose? "yes": "no" ); Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", pPars->fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
/**Function************************************************************* /**Function*************************************************************
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -29472,7 +29479,7 @@ usage: ...@@ -29472,7 +29479,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -29495,7 +29502,7 @@ int Abc_CommandAbc9Gla2Vta( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29495,7 +29502,7 @@ int Abc_CommandAbc9Gla2Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
nFrames = atoi(argv[globalUtilOptind]); nFrames = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( nFrames < 0 ) if ( nFrames < 0 )
goto usage; goto usage;
break; break;
case 'v': case 'v':
...@@ -29541,7 +29548,7 @@ usage: ...@@ -29541,7 +29548,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -29592,7 +29599,7 @@ usage: ...@@ -29592,7 +29599,7 @@ usage:
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
......
...@@ -94,10 +94,10 @@ int Abc_NtkCompareAndSaveBest( Abc_Ntk_t * pNtk ) ...@@ -94,10 +94,10 @@ int Abc_NtkCompareAndSaveBest( Abc_Ntk_t * pNtk )
{ {
ABC_FREE( ParsBest.pName ); ABC_FREE( ParsBest.pName );
ParsBest.pName = Extra_UtilStrsav( pNtk->pName ); ParsBest.pName = Extra_UtilStrsav( pNtk->pName );
ParsBest.Depth = ParsNew.Depth; ParsBest.Depth = ParsNew.Depth;
ParsBest.Flops = ParsNew.Flops; ParsBest.Flops = ParsNew.Flops;
ParsBest.Nodes = ParsNew.Nodes; ParsBest.Nodes = ParsNew.Nodes;
ParsBest.nPis = ParsNew.nPis; ParsBest.nPis = ParsNew.nPis;
ParsBest.nPos = ParsNew.nPos; ParsBest.nPos = ParsNew.nPos;
// writ the network // writ the network
Io_Write( pNtk, "best.blif", IO_FILE_BLIF ); Io_Write( pNtk, "best.blif", IO_FILE_BLIF );
...@@ -193,7 +193,6 @@ float Abc_NtkGetArea( Abc_Ntk_t * pNtk ) ...@@ -193,7 +193,6 @@ float Abc_NtkGetArea( Abc_Ntk_t * pNtk )
***********************************************************************/ ***********************************************************************/
void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDumpResult, int fUseLutLib, int fPrintMuxes, int fPower, int fGlitch ) void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDumpResult, int fUseLutLib, int fPrintMuxes, int fPower, int fGlitch )
{ {
FILE * pFile = stdout;
int Num; int Num;
if ( fSaveBest ) if ( fSaveBest )
Abc_NtkCompareAndSaveBest( pNtk ); Abc_NtkCompareAndSaveBest( pNtk );
...@@ -209,59 +208,59 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum ...@@ -209,59 +208,59 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
// if ( Abc_NtkIsStrash(pNtk) ) // if ( Abc_NtkIsStrash(pNtk) )
// Abc_AigCountNext( pNtk->pManFunc ); // Abc_AigCountNext( pNtk->pManFunc );
fprintf( pFile, "%-13s:", pNtk->pName ); Abc_Print( 1,"%-13s:", pNtk->pName );
fprintf( pFile, " i/o =%5d/%5d", Abc_NtkPiNum(pNtk), Abc_NtkPoNum(pNtk) ); Abc_Print( 1," i/o =%5d/%5d", Abc_NtkPiNum(pNtk), Abc_NtkPoNum(pNtk) );
if ( Abc_NtkConstrNum(pNtk) ) if ( Abc_NtkConstrNum(pNtk) )
fprintf( pFile, "(c=%d)", Abc_NtkConstrNum(pNtk) ); Abc_Print( 1,"(c=%d)", Abc_NtkConstrNum(pNtk) );
if ( pNtk->nRealPos ) if ( pNtk->nRealPos )
fprintf( pFile, "(p=%d)", Abc_NtkPoNum(pNtk) - pNtk->nRealPos ); Abc_Print( 1,"(p=%d)", Abc_NtkPoNum(pNtk) - pNtk->nRealPos );
fprintf( pFile, " lat =%5d", Abc_NtkLatchNum(pNtk) ); Abc_Print( 1," lat =%5d", Abc_NtkLatchNum(pNtk) );
if ( Abc_NtkIsNetlist(pNtk) ) if ( Abc_NtkIsNetlist(pNtk) )
{ {
fprintf( pFile, " net =%5d", Abc_NtkNetNum(pNtk) ); Abc_Print( 1," net =%5d", Abc_NtkNetNum(pNtk) );
fprintf( pFile, " nd =%5d", Abc_NtkNodeNum(pNtk) ); Abc_Print( 1," nd =%5d", Abc_NtkNodeNum(pNtk) );
fprintf( pFile, " wbox =%3d", Abc_NtkWhiteboxNum(pNtk) ); Abc_Print( 1," wbox =%3d", Abc_NtkWhiteboxNum(pNtk) );
fprintf( pFile, " bbox =%3d", Abc_NtkBlackboxNum(pNtk) ); Abc_Print( 1," bbox =%3d", Abc_NtkBlackboxNum(pNtk) );
} }
else if ( Abc_NtkIsStrash(pNtk) ) else if ( Abc_NtkIsStrash(pNtk) )
{ {
fprintf( pFile, " and =%7d", Abc_NtkNodeNum(pNtk) ); Abc_Print( 1," and =%7d", Abc_NtkNodeNum(pNtk) );
if ( (Num = Abc_NtkGetChoiceNum(pNtk)) ) if ( (Num = Abc_NtkGetChoiceNum(pNtk)) )
fprintf( pFile, " (choice = %d)", Num ); Abc_Print( 1," (choice = %d)", Num );
if ( fPrintMuxes ) if ( fPrintMuxes )
{ {
extern int Abc_NtkCountMuxes( Abc_Ntk_t * pNtk ); extern int Abc_NtkCountMuxes( Abc_Ntk_t * pNtk );
Num = Abc_NtkGetExorNum(pNtk); Num = Abc_NtkGetExorNum(pNtk);
fprintf( pFile, " (exor = %d)", Num ); Abc_Print( 1," (exor = %d)", Num );
fprintf( pFile, " (mux = %d)", Abc_NtkCountMuxes(pNtk)-Num ); Abc_Print( 1," (mux = %d)", Abc_NtkCountMuxes(pNtk)-Num );
fprintf( pFile, " (pure and = %d)", Abc_NtkNodeNum(pNtk) - (Abc_NtkCountMuxes(pNtk) * 3) ); Abc_Print( 1," (pure and = %d)", Abc_NtkNodeNum(pNtk) - (Abc_NtkCountMuxes(pNtk) * 3) );
} }
} }
else else
{ {
fprintf( pFile, " nd =%6d", Abc_NtkNodeNum(pNtk) ); Abc_Print( 1," nd =%6d", Abc_NtkNodeNum(pNtk) );
fprintf( pFile, " edge =%7d", Abc_NtkGetTotalFanins(pNtk) ); Abc_Print( 1," edge =%7d", Abc_NtkGetTotalFanins(pNtk) );
} }
if ( Abc_NtkIsStrash(pNtk) || Abc_NtkIsNetlist(pNtk) ) if ( Abc_NtkIsStrash(pNtk) || Abc_NtkIsNetlist(pNtk) )
{ {
} }
else if ( Abc_NtkHasSop(pNtk) ) else if ( Abc_NtkHasSop(pNtk) )
{ {
fprintf( pFile, " cube =%6d", Abc_NtkGetCubeNum(pNtk) ); Abc_Print( 1," cube =%6d", Abc_NtkGetCubeNum(pNtk) );
// fprintf( pFile, " lit(sop) = %5d", Abc_NtkGetLitNum(pNtk) ); // Abc_Print( 1," lit(sop) = %5d", Abc_NtkGetLitNum(pNtk) );
if ( fFactored ) if ( fFactored )
fprintf( pFile, " lit(fac) =%6d", Abc_NtkGetLitFactNum(pNtk) ); Abc_Print( 1," lit(fac) =%6d", Abc_NtkGetLitFactNum(pNtk) );
} }
else if ( Abc_NtkHasAig(pNtk) ) else if ( Abc_NtkHasAig(pNtk) )
fprintf( pFile, " aig =%6d", Abc_NtkGetAigNodeNum(pNtk) ); Abc_Print( 1," aig =%6d", Abc_NtkGetAigNodeNum(pNtk) );
else if ( Abc_NtkHasBdd(pNtk) ) else if ( Abc_NtkHasBdd(pNtk) )
fprintf( pFile, " bdd =%6d", Abc_NtkGetBddNodeNum(pNtk) ); Abc_Print( 1," bdd =%6d", Abc_NtkGetBddNodeNum(pNtk) );
else if ( Abc_NtkHasMapping(pNtk) ) else if ( Abc_NtkHasMapping(pNtk) )
{ {
fprintf( pFile, " area =%5.2f", Abc_NtkGetMappedArea(pNtk) ); Abc_Print( 1," area =%5.2f", Abc_NtkGetMappedArea(pNtk) );
fprintf( pFile, " delay =%5.2f", Abc_NtkDelayTrace(pNtk, NULL, NULL, 0) ); Abc_Print( 1," delay =%5.2f", Abc_NtkDelayTrace(pNtk, NULL, NULL, 0) );
} }
else if ( !Abc_NtkHasBlackbox(pNtk) ) else if ( !Abc_NtkHasBlackbox(pNtk) )
{ {
...@@ -271,27 +270,27 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum ...@@ -271,27 +270,27 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
if ( Abc_NtkIsStrash(pNtk) ) if ( Abc_NtkIsStrash(pNtk) )
{ {
extern int Abc_NtkGetMultiRefNum( Abc_Ntk_t * pNtk ); extern int Abc_NtkGetMultiRefNum( Abc_Ntk_t * pNtk );
fprintf( pFile, " lev =%3d", Abc_AigLevel(pNtk) ); Abc_Print( 1," lev =%3d", Abc_AigLevel(pNtk) );
// fprintf( pFile, " ff = %5d", Abc_NtkNodeNum(pNtk) + 2 * (Abc_NtkCoNum(pNtk)+Abc_NtkGetMultiRefNum(pNtk)) ); // Abc_Print( 1," ff = %5d", Abc_NtkNodeNum(pNtk) + 2 * (Abc_NtkCoNum(pNtk)+Abc_NtkGetMultiRefNum(pNtk)) );
// fprintf( pFile, " var = %5d", Abc_NtkCiNum(pNtk) + Abc_NtkCoNum(pNtk)+Abc_NtkGetMultiRefNum(pNtk) ); // Abc_Print( 1," var = %5d", Abc_NtkCiNum(pNtk) + Abc_NtkCoNum(pNtk)+Abc_NtkGetMultiRefNum(pNtk) );
} }
else else
fprintf( pFile, " lev =%3d", Abc_NtkLevel(pNtk) ); Abc_Print( 1," lev =%3d", Abc_NtkLevel(pNtk) );
if ( fUseLutLib && Abc_FrameReadLibLut() ) if ( fUseLutLib && Abc_FrameReadLibLut() )
fprintf( pFile, " delay =%5.2f", Abc_NtkDelayTraceLut(pNtk, 1) ); Abc_Print( 1," delay =%5.2f", Abc_NtkDelayTraceLut(pNtk, 1) );
if ( fUseLutLib && Abc_FrameReadLibLut() ) if ( fUseLutLib && Abc_FrameReadLibLut() )
fprintf( pFile, " area =%5.2f", Abc_NtkGetArea(pNtk) ); Abc_Print( 1," area =%5.2f", Abc_NtkGetArea(pNtk) );
if ( fPower ) if ( fPower )
fprintf( pFile, " power =%7.2f", Abc_NtkMfsTotalSwitching(pNtk) ); Abc_Print( 1," power =%7.2f", Abc_NtkMfsTotalSwitching(pNtk) );
if ( fGlitch ) if ( fGlitch )
{ {
extern float Abc_NtkMfsTotalGlitching( Abc_Ntk_t * pNtk ); extern float Abc_NtkMfsTotalGlitching( Abc_Ntk_t * pNtk );
if ( Abc_NtkIsLogic(pNtk) && Abc_NtkGetFaninMax(pNtk) <= 6 ) if ( Abc_NtkIsLogic(pNtk) && Abc_NtkGetFaninMax(pNtk) <= 6 )
fprintf( pFile, " glitch =%7.2f %%", Abc_NtkMfsTotalGlitching(pNtk) ); Abc_Print( 1," glitch =%7.2f %%", Abc_NtkMfsTotalGlitching(pNtk) );
else else
printf( "\nCurrently computes glitching only for K-LUT networks with K <= 6." ); printf( "\nCurrently computes glitching only for K-LUT networks with K <= 6." );
} }
fprintf( pFile, "\n" ); Abc_Print( 1,"\n" );
{ {
// extern int Abc_NtkPrintSubraphSizes( Abc_Ntk_t * pNtk ); // extern int Abc_NtkPrintSubraphSizes( Abc_Ntk_t * pNtk );
...@@ -379,7 +378,7 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum ...@@ -379,7 +378,7 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
// if ( Abc_NtkHasSop(pNtk) ) // if ( Abc_NtkHasSop(pNtk) )
// printf( "The total number of cube pairs = %d.\n", Abc_NtkGetCubePairNum(pNtk) ); // printf( "The total number of cube pairs = %d.\n", Abc_NtkGetCubePairNum(pNtk) );
fflush( stdout ); fflush( stdout );
} }
...@@ -399,25 +398,25 @@ void Abc_NtkPrintIo( FILE * pFile, Abc_Ntk_t * pNtk, int fPrintFlops ) ...@@ -399,25 +398,25 @@ void Abc_NtkPrintIo( FILE * pFile, Abc_Ntk_t * pNtk, int fPrintFlops )
Abc_Obj_t * pObj; Abc_Obj_t * pObj;
int i; int i;
fprintf( pFile, "Primary inputs (%d): ", Abc_NtkPiNum(pNtk) ); fprintf( pFile, "Primary inputs (%d): ", Abc_NtkPiNum(pNtk) );
Abc_NtkForEachPi( pNtk, pObj, i ) Abc_NtkForEachPi( pNtk, pObj, i )
fprintf( pFile, " %s", Abc_ObjName(pObj) ); fprintf( pFile, " %s", Abc_ObjName(pObj) );
// fprintf( pFile, " %s(%d)", Abc_ObjName(pObj), Abc_ObjFanoutNum(pObj) ); // fprintf( pFile, " %s(%d)", Abc_ObjName(pObj), Abc_ObjFanoutNum(pObj) );
fprintf( pFile, "\n" ); fprintf( pFile, "\n" );
fprintf( pFile, "Primary outputs (%d):", Abc_NtkPoNum(pNtk) ); fprintf( pFile, "Primary outputs (%d):", Abc_NtkPoNum(pNtk) );
Abc_NtkForEachPo( pNtk, pObj, i ) Abc_NtkForEachPo( pNtk, pObj, i )
fprintf( pFile, " %s", Abc_ObjName(pObj) ); fprintf( pFile, " %s", Abc_ObjName(pObj) );
fprintf( pFile, "\n" ); fprintf( pFile, "\n" );
if ( !fPrintFlops ) if ( !fPrintFlops )
return; return;
fprintf( pFile, "Latches (%d): ", Abc_NtkLatchNum(pNtk) ); fprintf( pFile, "Latches (%d): ", Abc_NtkLatchNum(pNtk) );
Abc_NtkForEachLatch( pNtk, pObj, i ) Abc_NtkForEachLatch( pNtk, pObj, i )
fprintf( pFile, " %s(%s=%s)", Abc_ObjName(pObj), fprintf( pFile, " %s(%s=%s)", Abc_ObjName(pObj),
Abc_ObjName(Abc_ObjFanout0(pObj)), Abc_ObjName(Abc_ObjFanin0(pObj)) ); Abc_ObjName(Abc_ObjFanout0(pObj)), Abc_ObjName(Abc_ObjFanin0(pObj)) );
fprintf( pFile, "\n" ); fprintf( pFile, "\n" );
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -444,7 +443,7 @@ void Abc_NtkPrintLatch( FILE * pFile, Abc_Ntk_t * pNtk ) ...@@ -444,7 +443,7 @@ void Abc_NtkPrintLatch( FILE * pFile, Abc_Ntk_t * pNtk )
return; return;
} }
for ( i = 0; i < 4; i++ ) for ( i = 0; i < 4; i++ )
InitNums[i] = 0; InitNums[i] = 0;
Counter0 = Counter1 = Counter2 = 0; Counter0 = Counter1 = Counter2 = 0;
Abc_NtkForEachLatch( pNtk, pLatch, i ) Abc_NtkForEachLatch( pNtk, pLatch, i )
...@@ -487,7 +486,7 @@ void Abc_NtkPrintLatch( FILE * pFile, Abc_Ntk_t * pNtk ) ...@@ -487,7 +486,7 @@ void Abc_NtkPrintLatch( FILE * pFile, Abc_Ntk_t * pNtk )
} }
} }
// fprintf( pFile, "%-15s: ", pNtk->pName ); // fprintf( pFile, "%-15s: ", pNtk->pName );
fprintf( pFile, "Total latches = %5d. Init0 = %d. Init1 = %d. InitDC = %d. Const data = %d.\n", fprintf( pFile, "Total latches = %5d. Init0 = %d. Init1 = %d. InitDC = %d. Const data = %d.\n",
Abc_NtkLatchNum(pNtk), InitNums[1], InitNums[2], InitNums[3], Counter0 ); Abc_NtkLatchNum(pNtk), InitNums[1], InitNums[2], InitNums[3], Counter0 );
// fprintf( pFile, "Const fanin = %3d. DC init = %3d. Matching init = %3d. ", Counter0, Counter1, Counter2 ); // fprintf( pFile, "Const fanin = %3d. DC init = %3d. Matching init = %3d. ", Counter0, Counter1, Counter2 );
// fprintf( pFile, "Self-feed latches = %2d.\n", -1 ); //Abc_NtkCountSelfFeedLatches(pNtk) ); // fprintf( pFile, "Self-feed latches = %2d.\n", -1 ); //Abc_NtkCountSelfFeedLatches(pNtk) );
...@@ -498,7 +497,7 @@ void Abc_NtkPrintLatch( FILE * pFile, Abc_Ntk_t * pNtk ) ...@@ -498,7 +497,7 @@ void Abc_NtkPrintLatch( FILE * pFile, Abc_Ntk_t * pNtk )
Synopsis [Prints the distribution of fanins/fanouts in the network.] Synopsis [Prints the distribution of fanins/fanouts in the network.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -565,7 +564,7 @@ void Abc_NtkPrintFanio( FILE * pFile, Abc_Ntk_t * pNtk ) ...@@ -565,7 +564,7 @@ void Abc_NtkPrintFanio( FILE * pFile, Abc_Ntk_t * pNtk )
Synopsis [Prints the distribution of fanins/fanouts in the network.] Synopsis [Prints the distribution of fanins/fanouts in the network.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -658,7 +657,7 @@ void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t * pNtk, int fMffc ) ...@@ -658,7 +657,7 @@ void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t * pNtk, int fMffc )
fprintf( pFile, "%15d : ", k ); fprintf( pFile, "%15d : ", k );
else else
{ {
sprintf( Buffer, "%d - %d", (int)pow((double)10, k/10) * (k%10), (int)pow((double)10, k/10) * (k%10+1) - 1 ); sprintf( Buffer, "%d - %d", (int)pow((double)10, k/10) * (k%10), (int)pow((double)10, k/10) * (k%10+1) - 1 );
fprintf( pFile, "%15s : ", Buffer ); fprintf( pFile, "%15s : ", Buffer );
} }
if ( vFanins->pArray[k] == 0 ) if ( vFanins->pArray[k] == 0 )
...@@ -675,8 +674,8 @@ void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t * pNtk, int fMffc ) ...@@ -675,8 +674,8 @@ void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t * pNtk, int fMffc )
Vec_IntFree( vFanins ); Vec_IntFree( vFanins );
Vec_IntFree( vFanouts ); Vec_IntFree( vFanouts );
fprintf( pFile, "Fanins: Max = %d. Ave = %.2f. Fanouts: Max = %d. Ave = %.2f.\n", fprintf( pFile, "Fanins: Max = %d. Ave = %.2f. Fanouts: Max = %d. Ave = %.2f.\n",
nFaninsMax, 1.0*nFaninsAll/Abc_NtkNodeNum(pNtk), nFaninsMax, 1.0*nFaninsAll/Abc_NtkNodeNum(pNtk),
nFanoutsMax, 1.0*nFanoutsAll/Abc_NtkNodeNum(pNtk) ); nFanoutsMax, 1.0*nFanoutsAll/Abc_NtkNodeNum(pNtk) );
/* /*
Abc_NtkForEachCi( pNtk, pNode, i ) Abc_NtkForEachCi( pNtk, pNode, i )
...@@ -692,7 +691,7 @@ void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t * pNtk, int fMffc ) ...@@ -692,7 +691,7 @@ void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t * pNtk, int fMffc )
Synopsis [Prints the fanins/fanouts of a node.] Synopsis [Prints the fanins/fanouts of a node.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -705,18 +704,18 @@ void Abc_NodePrintFanio( FILE * pFile, Abc_Obj_t * pNode ) ...@@ -705,18 +704,18 @@ void Abc_NodePrintFanio( FILE * pFile, Abc_Obj_t * pNode )
if ( Abc_ObjIsPo(pNode) ) if ( Abc_ObjIsPo(pNode) )
pNode = Abc_ObjFanin0(pNode); pNode = Abc_ObjFanin0(pNode);
fprintf( pFile, "Node %s", Abc_ObjName(pNode) ); fprintf( pFile, "Node %s", Abc_ObjName(pNode) );
fprintf( pFile, "\n" ); fprintf( pFile, "\n" );
fprintf( pFile, "Fanins (%d): ", Abc_ObjFaninNum(pNode) ); fprintf( pFile, "Fanins (%d): ", Abc_ObjFaninNum(pNode) );
Abc_ObjForEachFanin( pNode, pNode2, i ) Abc_ObjForEachFanin( pNode, pNode2, i )
fprintf( pFile, " %s", Abc_ObjName(pNode2) ); fprintf( pFile, " %s", Abc_ObjName(pNode2) );
fprintf( pFile, "\n" ); fprintf( pFile, "\n" );
fprintf( pFile, "Fanouts (%d): ", Abc_ObjFaninNum(pNode) ); fprintf( pFile, "Fanouts (%d): ", Abc_ObjFaninNum(pNode) );
Abc_ObjForEachFanout( pNode, pNode2, i ) Abc_ObjForEachFanout( pNode, pNode2, i )
fprintf( pFile, " %s", Abc_ObjName(pNode2) ); fprintf( pFile, " %s", Abc_ObjName(pNode2) );
fprintf( pFile, "\n" ); fprintf( pFile, "\n" );
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -724,7 +723,7 @@ void Abc_NodePrintFanio( FILE * pFile, Abc_Obj_t * pNode ) ...@@ -724,7 +723,7 @@ void Abc_NodePrintFanio( FILE * pFile, Abc_Obj_t * pNode )
Synopsis [Prints the MFFCs of the nodes.] Synopsis [Prints the MFFCs of the nodes.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -745,7 +744,7 @@ void Abc_NtkPrintMffc( FILE * pFile, Abc_Ntk_t * pNtk ) ...@@ -745,7 +744,7 @@ void Abc_NtkPrintMffc( FILE * pFile, Abc_Ntk_t * pNtk )
Synopsis [Prints the factored form of one node.] Synopsis [Prints the factored form of one node.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -765,7 +764,7 @@ void Abc_NtkPrintFactor( FILE * pFile, Abc_Ntk_t * pNtk, int fUseRealNames ) ...@@ -765,7 +764,7 @@ void Abc_NtkPrintFactor( FILE * pFile, Abc_Ntk_t * pNtk, int fUseRealNames )
Synopsis [Prints the factored form of one node.] Synopsis [Prints the factored form of one node.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -806,7 +805,7 @@ void Abc_NodePrintFactor( FILE * pFile, Abc_Obj_t * pNode, int fUseRealNames ) ...@@ -806,7 +805,7 @@ void Abc_NodePrintFactor( FILE * pFile, Abc_Obj_t * pNode, int fUseRealNames )
Synopsis [Prints the level stats of the PO node.] Synopsis [Prints the level stats of the PO node.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -866,7 +865,7 @@ void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListN ...@@ -866,7 +865,7 @@ void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListN
for ( i = 0; i < nIntervals; i++ ) for ( i = 0; i < nIntervals; i++ )
{ {
nOutsSum += pLevelCounts[i]; nOutsSum += pLevelCounts[i];
printf( "[%8.2f - %8.2f] : COs = %4d. %5.1f %%\n", printf( "[%8.2f - %8.2f] : COs = %4d. %5.1f %%\n",
DelayDelta * i, DelayDelta * (i+1), pLevelCounts[i], 100.0 * nOutsSum/nOutsTotal ); DelayDelta * i, DelayDelta * (i+1), pLevelCounts[i], 100.0 * nOutsSum/nOutsTotal );
} }
ABC_FREE( pLevelCounts ); ABC_FREE( pLevelCounts );
...@@ -912,7 +911,7 @@ void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListN ...@@ -912,7 +911,7 @@ void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListN
// print stats for each output // print stats for each output
Abc_NtkForEachCo( pNtk, pNode, i ) Abc_NtkForEachCo( pNtk, pNode, i )
{ {
fprintf( pFile, "CO %4d : %*s ", i, Length, Abc_ObjName(pNode) ); fprintf( pFile, "CO %4d : %*s ", i, Length, Abc_ObjName(pNode) );
Abc_NodePrintLevel( pFile, pNode ); Abc_NodePrintLevel( pFile, pNode );
} }
} }
...@@ -922,7 +921,7 @@ void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListN ...@@ -922,7 +921,7 @@ void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListN
Synopsis [Prints the factored form of one node.] Synopsis [Prints the factored form of one node.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -965,7 +964,7 @@ void Abc_NodePrintLevel( FILE * pFile, Abc_Obj_t * pNode ) ...@@ -965,7 +964,7 @@ void Abc_NodePrintLevel( FILE * pFile, Abc_Obj_t * pNode )
Synopsis [Prints the factored form of one node.] Synopsis [Prints the factored form of one node.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -977,12 +976,12 @@ void Abc_NodePrintKMap( Abc_Obj_t * pNode, int fUseRealNames ) ...@@ -977,12 +976,12 @@ void Abc_NodePrintKMap( Abc_Obj_t * pNode, int fUseRealNames )
if ( fUseRealNames ) if ( fUseRealNames )
{ {
vNamesIn = Abc_NodeGetFaninNames(pNode); vNamesIn = Abc_NodeGetFaninNames(pNode);
Extra_PrintKMap( stdout, (DdManager *)pNode->pNtk->pManFunc, (DdNode *)pNode->pData, Cudd_Not(pNode->pData), Extra_PrintKMap( stdout, (DdManager *)pNode->pNtk->pManFunc, (DdNode *)pNode->pData, Cudd_Not(pNode->pData),
Abc_ObjFaninNum(pNode), NULL, 0, (char **)vNamesIn->pArray ); Abc_ObjFaninNum(pNode), NULL, 0, (char **)vNamesIn->pArray );
Abc_NodeFreeNames( vNamesIn ); Abc_NodeFreeNames( vNamesIn );
} }
else else
Extra_PrintKMap( stdout, (DdManager *)pNode->pNtk->pManFunc, (DdNode *)pNode->pData, Cudd_Not(pNode->pData), Extra_PrintKMap( stdout, (DdManager *)pNode->pNtk->pManFunc, (DdNode *)pNode->pData, Cudd_Not(pNode->pData),
Abc_ObjFaninNum(pNode), NULL, 0, NULL ); Abc_ObjFaninNum(pNode), NULL, 0, NULL );
} }
...@@ -992,7 +991,7 @@ void Abc_NodePrintKMap( Abc_Obj_t * pNode, int fUseRealNames ) ...@@ -992,7 +991,7 @@ void Abc_NodePrintKMap( Abc_Obj_t * pNode, int fUseRealNames )
Synopsis [Prints statistics about gates used in the network.] Synopsis [Prints statistics about gates used in the network.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -1047,13 +1046,13 @@ void Abc_NtkPrintGates( Abc_Ntk_t * pNtk, int fUseLibrary ) ...@@ -1047,13 +1046,13 @@ void Abc_NtkPrintGates( Abc_Ntk_t * pNtk, int fUseLibrary )
if ( Counter == 0 ) if ( Counter == 0 )
continue; continue;
Area = Counter * Mio_GateReadArea( ppGates[i] ); Area = Counter * Mio_GateReadArea( ppGates[i] );
printf( "%-*s Fanin = %2d Instance = %8d Area = %10.2f %6.2f %%\n", printf( "%-*s Fanin = %2d Instance = %8d Area = %10.2f %6.2f %%\n",
nGateNameLen, Mio_GateReadName( ppGates[i] ), nGateNameLen, Mio_GateReadName( ppGates[i] ),
Mio_GateReadPinNum( ppGates[i] ), Mio_GateReadPinNum( ppGates[i] ),
Counter, Area, 100.0 * Area / AreaTotal ); Counter, Area, 100.0 * Area / AreaTotal );
} }
printf( "%-*s Instance = %8d Area = %10.2f %6.2f %%\n", printf( "%-*s Instance = %8d Area = %10.2f %6.2f %%\n",
nGateNameLen, "TOTAL", nGateNameLen, "TOTAL",
CounterTotal, AreaTotal, 100.0 ); CounterTotal, AreaTotal, 100.0 );
return; return;
} }
...@@ -1115,7 +1114,7 @@ void Abc_NtkPrintGates( Abc_Ntk_t * pNtk, int fUseLibrary ) ...@@ -1115,7 +1114,7 @@ void Abc_NtkPrintGates( Abc_Ntk_t * pNtk, int fUseLibrary )
Synopsis [Prints statistics about gates used in the network.] Synopsis [Prints statistics about gates used in the network.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -1180,7 +1179,7 @@ void Abc_NtkPrintStrSupports( Abc_Ntk_t * pNtk, int fMatrix ) ...@@ -1180,7 +1179,7 @@ void Abc_NtkPrintStrSupports( Abc_Ntk_t * pNtk, int fMatrix )
{ {
vSupp = Abc_NtkNodeSupport( pNtk, &pObj, 1 ); vSupp = Abc_NtkNodeSupport( pNtk, &pObj, 1 );
vNodes = Abc_NtkDfsNodes( pNtk, &pObj, 1 ); vNodes = Abc_NtkDfsNodes( pNtk, &pObj, 1 );
printf( "%5d %20s : Cone = %5d. Supp = %5d.\n", printf( "%5d %20s : Cone = %5d. Supp = %5d.\n",
i, Abc_ObjName(pObj), vNodes->nSize, vSupp->nSize ); i, Abc_ObjName(pObj), vNodes->nSize, vSupp->nSize );
Vec_PtrFree( vNodes ); Vec_PtrFree( vNodes );
Vec_PtrFree( vSupp ); Vec_PtrFree( vSupp );
...@@ -1227,41 +1226,41 @@ void Abc_ObjPrint( FILE * pFile, Abc_Obj_t * pObj ) ...@@ -1227,41 +1226,41 @@ void Abc_ObjPrint( FILE * pFile, Abc_Obj_t * pObj )
fprintf( pFile, "Object %5d : ", pObj->Id ); fprintf( pFile, "Object %5d : ", pObj->Id );
switch ( pObj->Type ) switch ( pObj->Type )
{ {
case ABC_OBJ_NONE: case ABC_OBJ_NONE:
fprintf( pFile, "NONE " ); fprintf( pFile, "NONE " );
break; break;
case ABC_OBJ_CONST1: case ABC_OBJ_CONST1:
fprintf( pFile, "Const1 " ); fprintf( pFile, "Const1 " );
break; break;
case ABC_OBJ_PI: case ABC_OBJ_PI:
fprintf( pFile, "PI " ); fprintf( pFile, "PI " );
break; break;
case ABC_OBJ_PO: case ABC_OBJ_PO:
fprintf( pFile, "PO " ); fprintf( pFile, "PO " );
break; break;
case ABC_OBJ_BI: case ABC_OBJ_BI:
fprintf( pFile, "BI " ); fprintf( pFile, "BI " );
break; break;
case ABC_OBJ_BO: case ABC_OBJ_BO:
fprintf( pFile, "BO " ); fprintf( pFile, "BO " );
break; break;
case ABC_OBJ_NET: case ABC_OBJ_NET:
fprintf( pFile, "Net " ); fprintf( pFile, "Net " );
break; break;
case ABC_OBJ_NODE: case ABC_OBJ_NODE:
fprintf( pFile, "Node " ); fprintf( pFile, "Node " );
break; break;
case ABC_OBJ_LATCH: case ABC_OBJ_LATCH:
fprintf( pFile, "Latch " ); fprintf( pFile, "Latch " );
break; break;
case ABC_OBJ_WHITEBOX: case ABC_OBJ_WHITEBOX:
fprintf( pFile, "Whitebox" ); fprintf( pFile, "Whitebox" );
break; break;
case ABC_OBJ_BLACKBOX: case ABC_OBJ_BLACKBOX:
fprintf( pFile, "Blackbox" ); fprintf( pFile, "Blackbox" );
break; break;
default: default:
assert(0); assert(0);
break; break;
} }
// print the fanins // print the fanins
...@@ -1366,7 +1365,7 @@ extern int Gli_ObjNumGlitches( Gli_Man_t * p, int iNode ); ...@@ -1366,7 +1365,7 @@ extern int Gli_ObjNumGlitches( Gli_Man_t * p, int iNode );
Synopsis [Returns the percentable of increased power due to glitching.] Synopsis [Returns the percentable of increased power due to glitching.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -1394,7 +1393,7 @@ float Abc_NtkMfsTotalGlitching( Abc_Ntk_t * pNtk ) ...@@ -1394,7 +1393,7 @@ float Abc_NtkMfsTotalGlitching( Abc_Ntk_t * pNtk )
vTruth = Vec_IntAlloc( 1 << 12 ); vTruth = Vec_IntAlloc( 1 << 12 );
// derive network for glitch computation // derive network for glitch computation
p = Gli_ManAlloc( Vec_PtrSize(vNodes) + Abc_NtkCiNum(pNtk) + Abc_NtkCoNum(pNtk), p = Gli_ManAlloc( Vec_PtrSize(vNodes) + Abc_NtkCiNum(pNtk) + Abc_NtkCoNum(pNtk),
Abc_NtkLatchNum(pNtk), Abc_NtkGetTotalFanins(pNtk) + Abc_NtkCoNum(pNtk) ); Abc_NtkLatchNum(pNtk), Abc_NtkGetTotalFanins(pNtk) + Abc_NtkCoNum(pNtk) );
Abc_NtkForEachObj( pNtk, pObj, i ) Abc_NtkForEachObj( pNtk, pObj, i )
pObj->iTemp = -1; pObj->iTemp = -1;
...@@ -1435,7 +1434,7 @@ float Abc_NtkMfsTotalGlitching( Abc_Ntk_t * pNtk ) ...@@ -1435,7 +1434,7 @@ float Abc_NtkMfsTotalGlitching( Abc_Ntk_t * pNtk )
Synopsis [Prints K-map of 6-var function represented by truth table.] Synopsis [Prints K-map of 6-var function represented by truth table.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -1517,7 +1516,7 @@ void Abc_Show6VarFunc( word F0, word F1 ) ...@@ -1517,7 +1516,7 @@ void Abc_Show6VarFunc( word F0, word F1 )
Synopsis [Prints K-map of 6-var function represented by truth table.] Synopsis [Prints K-map of 6-var function represented by truth table.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -1548,4 +1547,3 @@ void Abc_NtkShow6VarFunc( char * pF0, char * pF1 ) ...@@ -1548,4 +1547,3 @@ void Abc_NtkShow6VarFunc( char * pF0, char * pF1 )
ABC_NAMESPACE_IMPL_END ABC_NAMESPACE_IMPL_END
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
Revision [$Id: cmd.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $] Revision [$Id: cmd.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/ ***********************************************************************/
#ifdef WIN32 #ifdef WIN32
#include <process.h> #include <process.h>
#else #else
#include <unistd.h> #include <unistd.h>
#endif #endif
...@@ -75,7 +75,7 @@ extern int Cmd_CommandAbcLoadPlugIn( Abc_Frame_t * pAbc, int argc, char ** argv ...@@ -75,7 +75,7 @@ extern int Cmd_CommandAbcLoadPlugIn( Abc_Frame_t * pAbc, int argc, char ** argv
******************************************************************************/ ******************************************************************************/
void Cmd_Init( Abc_Frame_t * pAbc ) void Cmd_Init( Abc_Frame_t * pAbc )
{ {
pAbc->tCommands = st__init_table(strcmp, st__strhash); pAbc->tCommands = st__init_table(strcmp, st__strhash);
pAbc->tAliases = st__init_table(strcmp, st__strhash); pAbc->tAliases = st__init_table(strcmp, st__strhash);
pAbc->tFlags = st__init_table(strcmp, st__strhash); pAbc->tFlags = st__init_table(strcmp, st__strhash);
...@@ -92,18 +92,18 @@ void Cmd_Init( Abc_Frame_t * pAbc ) ...@@ -92,18 +92,18 @@ void Cmd_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "Basic", "source", CmdCommandSource, 0 ); Cmd_CommandAdd( pAbc, "Basic", "source", CmdCommandSource, 0 );
Cmd_CommandAdd( pAbc, "Basic", "set", CmdCommandSetVariable, 0 ); Cmd_CommandAdd( pAbc, "Basic", "set", CmdCommandSetVariable, 0 );
Cmd_CommandAdd( pAbc, "Basic", "unset", CmdCommandUnsetVariable, 0 ); Cmd_CommandAdd( pAbc, "Basic", "unset", CmdCommandUnsetVariable, 0 );
Cmd_CommandAdd( pAbc, "Basic", "undo", CmdCommandUndo, 0 ); Cmd_CommandAdd( pAbc, "Basic", "undo", CmdCommandUndo, 0 );
Cmd_CommandAdd( pAbc, "Basic", "recall", CmdCommandRecall, 0 ); Cmd_CommandAdd( pAbc, "Basic", "recall", CmdCommandRecall, 0 );
Cmd_CommandAdd( pAbc, "Basic", "empty", CmdCommandEmpty, 0 ); Cmd_CommandAdd( pAbc, "Basic", "empty", CmdCommandEmpty, 0 );
#if defined(WIN32) && !defined(__cplusplus) #if defined(WIN32) && !defined(__cplusplus)
Cmd_CommandAdd( pAbc, "Basic", "ls", CmdCommandLs, 0 ); Cmd_CommandAdd( pAbc, "Basic", "ls", CmdCommandLs, 0 );
Cmd_CommandAdd( pAbc, "Basic", "scrgen", CmdCommandScrGen, 0 ); Cmd_CommandAdd( pAbc, "Basic", "scrgen", CmdCommandScrGen, 0 );
#endif #endif
Cmd_CommandAdd( pAbc, "Basic", "version", CmdCommandVersion, 0 ); Cmd_CommandAdd( pAbc, "Basic", "version", CmdCommandVersion, 0 );
Cmd_CommandAdd( pAbc, "Various", "sis", CmdCommandSis, 1 ); Cmd_CommandAdd( pAbc, "Various", "sis", CmdCommandSis, 1 );
Cmd_CommandAdd( pAbc, "Various", "mvsis", CmdCommandMvsis, 1 ); Cmd_CommandAdd( pAbc, "Various", "mvsis", CmdCommandMvsis, 1 );
Cmd_CommandAdd( pAbc, "Various", "capo", CmdCommandCapo, 0 ); Cmd_CommandAdd( pAbc, "Various", "capo", CmdCommandCapo, 0 );
Cmd_CommandAdd( pAbc, "Various", "starter", CmdCommandStarter, 0 ); Cmd_CommandAdd( pAbc, "Various", "starter", CmdCommandStarter, 0 );
Cmd_CommandAdd( pAbc, "Various", "load_plugin", Cmd_CommandAbcLoadPlugIn, 0 ); Cmd_CommandAdd( pAbc, "Various", "load_plugin", Cmd_CommandAbcLoadPlugIn, 0 );
...@@ -193,7 +193,7 @@ int CmdCommandTime( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -193,7 +193,7 @@ int CmdCommandTime( Abc_Frame_t * pAbc, int argc, char **argv )
pAbc->TimeTotal += pAbc->TimeCommand; pAbc->TimeTotal += pAbc->TimeCommand;
fprintf( pAbc->Out, "elapse: %3.2f seconds, total: %3.2f seconds\n", fprintf( pAbc->Out, "elapse: %3.2f seconds, total: %3.2f seconds\n",
pAbc->TimeCommand, pAbc->TimeTotal ); pAbc->TimeCommand, pAbc->TimeTotal );
/* /*
{ {
...@@ -247,12 +247,20 @@ int CmdCommandEcho( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -247,12 +247,20 @@ int CmdCommandEcho( Abc_Frame_t * pAbc, int argc, char **argv )
} }
} }
for ( i = globalUtilOptind; i < argc; i++ ) if (pAbc->Out == stdout){
fprintf( pAbc->Out, "%s ", argv[i] ); for ( i = globalUtilOptind; i < argc; i++ )
if ( n ) Abc_Print( 1, "%s ", argv[i] );
fprintf( pAbc->Out, "\n" ); if ( n )
else Abc_Print( 1, "\n" );
}else{
for ( i = globalUtilOptind; i < argc; i++ )
fprintf( pAbc->Out, "%s ", argv[i] );
if ( n )
fprintf( pAbc->Out, "\n" );
fflush ( pAbc->Out ); fflush ( pAbc->Out );
}
return 0; return 0;
usage: usage:
...@@ -427,7 +435,7 @@ int CmdCommandAlias( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -427,7 +435,7 @@ int CmdCommandAlias( Abc_Frame_t * pAbc, int argc, char **argv )
return 0; return 0;
} }
// delete any existing alias // delete any existing alias
key = argv[1]; key = argv[1];
if ( st__delete( pAbc->tAliases, &key, &value ) ) if ( st__delete( pAbc->tAliases, &key, &value ) )
CmdCommandAliasFree( ( Abc_Alias * ) value ); CmdCommandAliasFree( ( Abc_Alias * ) value );
...@@ -900,7 +908,7 @@ int CmdCommandUndo( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -900,7 +908,7 @@ int CmdCommandUndo( Abc_Frame_t * pAbc, int argc, char **argv )
// if there are no arguments on the command line // if there are no arguments on the command line
// set the current network to be the network from the previous step // set the current network to be the network from the previous step
if ( argc == 1 ) if ( argc == 1 )
return CmdCommandRecall( pAbc, argc, argv ); return CmdCommandRecall( pAbc, argc, argv );
fprintf( pAbc->Err, "usage: undo\n" ); fprintf( pAbc->Err, "usage: undo\n" );
...@@ -934,7 +942,7 @@ int CmdCommandRecall( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -934,7 +942,7 @@ int CmdCommandRecall( Abc_Frame_t * pAbc, int argc, char **argv )
return 0; return 0;
} }
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "h" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "h" ) ) != EOF )
{ {
...@@ -946,18 +954,18 @@ int CmdCommandRecall( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -946,18 +954,18 @@ int CmdCommandRecall( Abc_Frame_t * pAbc, int argc, char **argv )
goto usage; goto usage;
} }
} }
// get the number of networks to save // get the number of networks to save
pValue = Cmd_FlagReadByName( pAbc, "savesteps" ); pValue = Cmd_FlagReadByName( pAbc, "savesteps" );
// if the value of steps to save is not set, assume 1-level undo // if the value of steps to save is not set, assume 1-level undo
if ( pValue == NULL ) if ( pValue == NULL )
nNetsToSave = 1; nNetsToSave = 1;
else else
nNetsToSave = atoi(pValue); nNetsToSave = atoi(pValue);
// if there are no arguments on the command line // if there are no arguments on the command line
// set the current network to be the network from the previous step // set the current network to be the network from the previous step
if ( argc == 1 ) if ( argc == 1 )
{ {
// get the previously saved network // get the previously saved network
pNtk = Abc_NtkBackup(pAbc->pNtkCur); pNtk = Abc_NtkBackup(pAbc->pNtkCur);
...@@ -989,13 +997,13 @@ int CmdCommandRecall( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -989,13 +997,13 @@ int CmdCommandRecall( Abc_Frame_t * pAbc, int argc, char **argv )
fprintf( pAbc->Out, "Cannot recall step %d.\n", iStep ); fprintf( pAbc->Out, "Cannot recall step %d.\n", iStep );
else if ( iStep == 0 ) else if ( iStep == 0 )
Abc_FrameDeleteAllNetworks( pAbc ); Abc_FrameDeleteAllNetworks( pAbc );
else else
{ {
// scroll backward through the list of networks // scroll backward through the list of networks
// to determine if such a network exist // to determine if such a network exist
iStepFound = 0; iStepFound = 0;
for ( pNtk = pAbc->pNtkCur; pNtk; pNtk = Abc_NtkBackup(pNtk) ) for ( pNtk = pAbc->pNtkCur; pNtk; pNtk = Abc_NtkBackup(pNtk) )
if ( (iStepFound = Abc_NtkStep(pNtk)) == iStep ) if ( (iStepFound = Abc_NtkStep(pNtk)) == iStep )
break; break;
if ( pNtk == NULL ) if ( pNtk == NULL )
{ {
...@@ -1058,7 +1066,7 @@ int CmdCommandEmpty( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -1058,7 +1066,7 @@ int CmdCommandEmpty( Abc_Frame_t * pAbc, int argc, char **argv )
goto usage; goto usage;
} }
} }
Abc_FrameDeleteAllNetworks( pAbc ); Abc_FrameDeleteAllNetworks( pAbc );
Abc_FrameRestart( pAbc ); Abc_FrameRestart( pAbc );
return 0; return 0;
...@@ -1107,7 +1115,7 @@ int CmdCommandUndo( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -1107,7 +1115,7 @@ int CmdCommandUndo( Abc_Frame_t * pAbc, int argc, char **argv )
} }
id = atoi(argv[globalUtilOptind]); id = atoi(argv[globalUtilOptind]);
pNtkTemp = Cmd_HistoryGetSnapshot(pAbc, id); pNtkTemp = Cmd_HistoryGetSnapshot(pAbc, id);
if (!pNtkTemp) if (!pNtkTemp)
fprintf( pAbc->Err, "Snapshot %d does not exist\n", id); fprintf( pAbc->Err, "Snapshot %d does not exist\n", id);
else else
pAbc->pNtk = Abc_NtkDup(pNtkTemp, Abc_NtkMan(pNtkTemp)); pAbc->pNtk = Abc_NtkDup(pNtkTemp, Abc_NtkMan(pNtkTemp));
...@@ -1130,8 +1138,8 @@ typedef unsigned long _fsize_t; // Could be 64 bits for Win32 ...@@ -1130,8 +1138,8 @@ typedef unsigned long _fsize_t; // Could be 64 bits for Win32
struct _finddata_t { struct _finddata_t {
unsigned attrib; unsigned attrib;
time_t time_create; // -1 for FAT file systems time_t time_create; // -1 for FAT file systems
time_t time_access; // -1 for FAT file systems time_t time_access; // -1 for FAT file systems
time_t time_write; time_t time_write;
_fsize_t size; _fsize_t size;
char name[260]; char name[260];
...@@ -1149,7 +1157,7 @@ extern int _findclose( long handle ); ...@@ -1149,7 +1157,7 @@ extern int _findclose( long handle );
Synopsis [Command to print the contents of the current directory (Windows).] Synopsis [Command to print the contents of the current directory (Windows).]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -1243,7 +1251,7 @@ usage: ...@@ -1243,7 +1251,7 @@ usage:
fprintf( pAbc->Err, " print the file names in the current directory\n" ); fprintf( pAbc->Err, " print the file names in the current directory\n" );
fprintf( pAbc->Err, " -l : print in the long format [default = short]\n" ); fprintf( pAbc->Err, " -l : print in the long format [default = short]\n" );
fprintf( pAbc->Err, " -b : print only .mv files [default = all]\n" ); fprintf( pAbc->Err, " -b : print only .mv files [default = all]\n" );
return 1; return 1;
} }
...@@ -1252,7 +1260,7 @@ usage: ...@@ -1252,7 +1260,7 @@ usage:
Synopsis [Generates the script for running ABC.] Synopsis [Generates the script for running ABC.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -1381,14 +1389,14 @@ int CmdCommandScrGen( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -1381,14 +1389,14 @@ int CmdCommandScrGen( Abc_Frame_t * pAbc, int argc, char **argv )
if ( c_file.name[nFileNameCur-1] == '.' ) if ( c_file.name[nFileNameCur-1] == '.' )
continue; continue;
if ( nFileNameCur > 2 && if ( nFileNameCur > 2 &&
c_file.name[nFileNameCur-1] == 's' && c_file.name[nFileNameCur-1] == 's' &&
c_file.name[nFileNameCur-2] == '.' ) c_file.name[nFileNameCur-2] == '.' )
continue; continue;
if ( nFileNameCur > 4 && if ( nFileNameCur > 4 &&
c_file.name[nFileNameCur-1] == 't' && c_file.name[nFileNameCur-1] == 't' &&
c_file.name[nFileNameCur-2] == 'x' && c_file.name[nFileNameCur-2] == 'x' &&
c_file.name[nFileNameCur-3] == 't' && c_file.name[nFileNameCur-3] == 't' &&
c_file.name[nFileNameCur-4] == '.' ) c_file.name[nFileNameCur-4] == '.' )
continue; continue;
if ( nFileNameMax < nFileNameCur ) if ( nFileNameMax < nFileNameCur )
nFileNameMax = nFileNameCur; nFileNameMax = nFileNameCur;
...@@ -1407,7 +1415,7 @@ int CmdCommandScrGen( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -1407,7 +1415,7 @@ int CmdCommandScrGen( Abc_Frame_t * pAbc, int argc, char **argv )
printf( "No files in directory: %s\n", pDirStr ); printf( "No files in directory: %s\n", pDirStr );
} }
fprintf( pFile, "# Script file produced by ABC on %s\n", Extra_TimeStamp() ); fprintf( pFile, "# Script file produced by ABC on %s\n", Extra_TimeStamp() );
fprintf( pFile, "# Command line was: scrgen -F %s -D %s -C \"%s\"%s%s\n", fprintf( pFile, "# Command line was: scrgen -F %s -D %s -C \"%s\"%s%s\n",
pFileStr, pDirStr, pComStr, pWriteStr?" -W ":"", pWriteStr?pWriteStr:"" ); pFileStr, pDirStr, pComStr, pWriteStr?" -W ":"", pWriteStr?pWriteStr:"" );
do do
{ {
...@@ -1416,14 +1424,14 @@ int CmdCommandScrGen( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -1416,14 +1424,14 @@ int CmdCommandScrGen( Abc_Frame_t * pAbc, int argc, char **argv )
if ( c_file.name[nFileNameCur-1] == '.' ) if ( c_file.name[nFileNameCur-1] == '.' )
continue; continue;
if ( nFileNameCur > 2 && if ( nFileNameCur > 2 &&
c_file.name[nFileNameCur-1] == 's' && c_file.name[nFileNameCur-1] == 's' &&
c_file.name[nFileNameCur-2] == '.' ) c_file.name[nFileNameCur-2] == '.' )
continue; continue;
if ( nFileNameCur > 4 && if ( nFileNameCur > 4 &&
c_file.name[nFileNameCur-1] == 't' && c_file.name[nFileNameCur-1] == 't' &&
c_file.name[nFileNameCur-2] == 'x' && c_file.name[nFileNameCur-2] == 'x' &&
c_file.name[nFileNameCur-3] == 't' && c_file.name[nFileNameCur-3] == 't' &&
c_file.name[nFileNameCur-4] == '.' ) c_file.name[nFileNameCur-4] == '.' )
continue; continue;
sprintf( Line, "r %s%s%-*s ; %s", pDirStr?pDirStr:"", pDirStr?"/":"", nFileNameMax, c_file.name, pComStr ); sprintf( Line, "r %s%s%-*s ; %s", pDirStr?pDirStr:"", pDirStr?"/":"", nFileNameMax, c_file.name, pComStr );
for ( c = (int)strlen(Line)-1; c >= 0; c-- ) for ( c = (int)strlen(Line)-1; c >= 0; c-- )
...@@ -1467,7 +1475,7 @@ usage: ...@@ -1467,7 +1475,7 @@ usage:
fprintf( pAbc->Err, "\t-c : toggle placing file in current/target dir [default = %s]\n", fUseCurrent? "current": "target" ); fprintf( pAbc->Err, "\t-c : toggle placing file in current/target dir [default = %s]\n", fUseCurrent? "current": "target" );
fprintf( pAbc->Err, "\t-h : print the command usage\n\n"); fprintf( pAbc->Err, "\t-h : print the command usage\n\n");
fprintf( pAbc->Err, "\tExample : scrgen -F test1.s -D a/in -C \"ps; st; ps\" -W a/out\n" ); fprintf( pAbc->Err, "\tExample : scrgen -F test1.s -D a/in -C \"ps; st; ps\" -W a/out\n" );
return 1; return 1;
} }
#endif #endif
...@@ -1615,7 +1623,7 @@ usage: ...@@ -1615,7 +1623,7 @@ usage:
fprintf( pErr, " Example 1: sis eliminate 0\n" ); fprintf( pErr, " Example 1: sis eliminate 0\n" );
fprintf( pErr, " Example 2: sis \"ps; rd; fx; ps\"\n" ); fprintf( pErr, " Example 2: sis \"ps; rd; fx; ps\"\n" );
fprintf( pErr, " Example 3: sis source script.rugged\n" ); fprintf( pErr, " Example 3: sis source script.rugged\n" );
return 1; // error exit return 1; // error exit
} }
...@@ -1758,7 +1766,7 @@ usage: ...@@ -1758,7 +1766,7 @@ usage:
fprintf( pErr, " Example 1: mvsis fraig_sweep\n" ); fprintf( pErr, " Example 1: mvsis fraig_sweep\n" );
fprintf( pErr, " Example 2: mvsis \"ps; fxu; ps\"\n" ); fprintf( pErr, " Example 2: mvsis \"ps; fxu; ps\"\n" );
fprintf( pErr, " Example 3: mvsis source mvsis.rugged\n" ); fprintf( pErr, " Example 3: mvsis source mvsis.rugged\n" );
return 1; // error exit return 1; // error exit
} }
...@@ -1767,7 +1775,7 @@ usage: ...@@ -1767,7 +1775,7 @@ usage:
Synopsis [Computes dimentions of the graph.] Synopsis [Computes dimentions of the graph.]
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -2010,7 +2018,7 @@ usage: ...@@ -2010,7 +2018,7 @@ usage:
fprintf( pErr, " (prints the default usage message of the Capo binary)\n" ); fprintf( pErr, " (prints the default usage message of the Capo binary)\n" );
fprintf( pErr, " Please refer to the Capo webpage for additional information:\n" ); fprintf( pErr, " Please refer to the Capo webpage for additional information:\n" );
fprintf( pErr, " http://vlsicad.eecs.umich.edu/BK/PDtools/\n" ); fprintf( pErr, " http://vlsicad.eecs.umich.edu/BK/PDtools/\n" );
return 1; // error exit return 1; // error exit
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -2122,4 +2130,3 @@ int CmdCommandVersion( Abc_Frame_t * pAbc, int argc, char **argv ) ...@@ -2122,4 +2130,3 @@ int CmdCommandVersion( Abc_Frame_t * pAbc, int argc, char **argv )
ABC_NAMESPACE_IMPL_END ABC_NAMESPACE_IMPL_END
...@@ -276,10 +276,19 @@ static inline void Abc_Print( int level, const char * format, ... ) ...@@ -276,10 +276,19 @@ static inline void Abc_Print( int level, const char * format, ... )
{ {
extern ABC_DLL int Abc_FrameIsBridgeMode(); extern ABC_DLL int Abc_FrameIsBridgeMode();
va_list args; va_list args;
if ( level == ABC_ERROR )
printf( "Error: " ); if ( ! Abc_FrameIsBridgeMode() ){
else if ( level == ABC_WARNING ) if ( level == ABC_ERROR )
printf( "Warning: " ); printf( "Error: " );
else if ( level == ABC_WARNING )
printf( "Warning: " );
}else{
if ( level == ABC_ERROR )
Gia_ManToBridgeText( stdout, strlen("Error: "), (unsigned char*)"Error: " );
else if ( level == ABC_WARNING )
Gia_ManToBridgeText( stdout, strlen("Warning: "), (unsigned char*)"Warning: " );
}
va_start( args, format ); va_start( args, format );
if ( Abc_FrameIsBridgeMode() ) if ( Abc_FrameIsBridgeMode() )
{ {
......
...@@ -33,6 +33,7 @@ ABC_NAMESPACE_IMPL_START ...@@ -33,6 +33,7 @@ ABC_NAMESPACE_IMPL_START
#define BRIDGE_TEXT_MESSAGE 999996 #define BRIDGE_TEXT_MESSAGE 999996
#define BRIDGE_RESULTS 101 #define BRIDGE_RESULTS 101
#define BRIDGE_NETLIST 106
#define BRIDGE_ABS_NETLIST 107 #define BRIDGE_ABS_NETLIST 107
#define BRIDGE_BAD_ABS 105 #define BRIDGE_BAD_ABS 105
...@@ -150,11 +151,11 @@ int Gia_ManToBridgeText( FILE * pFile, int Size, unsigned char * pBuffer ) ...@@ -150,11 +151,11 @@ int Gia_ManToBridgeText( FILE * pFile, int Size, unsigned char * pBuffer )
Gia_CreateHeader( pFile, BRIDGE_TEXT_MESSAGE, Size, pBuffer ); Gia_CreateHeader( pFile, BRIDGE_TEXT_MESSAGE, Size, pBuffer );
return 1; return 1;
} }
int Gia_ManToBridgeAbsNetlist( FILE * pFile, Gia_Man_t * p ) int Gia_ManToBridgeAbsNetlist( FILE * pFile, Gia_Man_t * p, int pkg_type )
{ {
Vec_Str_t * vBuffer; Vec_Str_t * vBuffer;
vBuffer = Gia_ManToBridgeVec( p ); vBuffer = Gia_ManToBridgeVec( p );
Gia_CreateHeader( pFile, BRIDGE_ABS_NETLIST, Vec_StrSize(vBuffer), (unsigned char *)Vec_StrArray(vBuffer) ); Gia_CreateHeader( pFile, pkg_type, Vec_StrSize(vBuffer), (unsigned char *)Vec_StrArray(vBuffer) );
Vec_StrFree( vBuffer ); Vec_StrFree( vBuffer );
return 1; return 1;
} }
...@@ -359,7 +360,7 @@ Gia_Man_t * Gia_ManFromBridgeReadBody( int Size, unsigned char * pBuffer, Vec_I ...@@ -359,7 +360,7 @@ Gia_Man_t * Gia_ManFromBridgeReadBody( int Size, unsigned char * pBuffer, Vec_I
Synopsis [] Synopsis []
Description [] Description []
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
...@@ -449,7 +450,7 @@ Gia_Man_t * Gia_ManFromBridge( FILE * pFile, Vec_Int_t ** pvInit ) ...@@ -449,7 +450,7 @@ Gia_Man_t * Gia_ManFromBridge( FILE * pFile, Vec_Int_t ** pvInit )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
void Gia_ManToBridgeAbsNetlistTest( char * pFileName, Gia_Man_t * p ) void Gia_ManToBridgeAbsNetlistTest( char * pFileName, Gia_Man_t * p, int msg_type )
{ {
FILE * pFile = fopen( pFileName, "wb" ); FILE * pFile = fopen( pFileName, "wb" );
if ( pFile == NULL ) if ( pFile == NULL )
...@@ -457,7 +458,7 @@ void Gia_ManToBridgeAbsNetlistTest( char * pFileName, Gia_Man_t * p ) ...@@ -457,7 +458,7 @@ void Gia_ManToBridgeAbsNetlistTest( char * pFileName, Gia_Man_t * p )
printf( "Cannot open output file \"%s\".\n", pFileName ); printf( "Cannot open output file \"%s\".\n", pFileName );
return; return;
} }
Gia_ManToBridgeAbsNetlist( pFile, p ); Gia_ManToBridgeAbsNetlist( pFile, p, msg_type );
fclose ( pFile ); fclose ( pFile );
} }
...@@ -488,7 +489,7 @@ void Gia_ManFromBridgeTest( char * pFileName ) ...@@ -488,7 +489,7 @@ void Gia_ManFromBridgeTest( char * pFileName )
Gia_ManPrintStats( p, 0, 0 ); Gia_ManPrintStats( p, 0, 0 );
Gia_WriteAiger( p, "temp.aig", 0, 0 ); Gia_WriteAiger( p, "temp.aig", 0, 0 );
Gia_ManToBridgeAbsNetlistTest( "par_.dump", p ); Gia_ManToBridgeAbsNetlistTest( "par_.dump", p, BRIDGE_ABS_NETLIST );
Gia_ManStop( p ); Gia_ManStop( p );
} }
......
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