summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2009-02-20 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2009-02-20 08:01:00 -0800
commitc03f9b516bed2c06ec2bfc78617eba5fc9a11c32 (patch)
tree58b8a5447d5ae7554fd5e9599f1fbe5a4f072617 /src/base
parent28d4f8696dd2cf60f71fca5d83e5f038678f4828 (diff)
downloadabc-c03f9b516bed2c06ec2bfc78617eba5fc9a11c32.tar.gz
abc-c03f9b516bed2c06ec2bfc78617eba5fc9a11c32.tar.bz2
abc-c03f9b516bed2c06ec2bfc78617eba5fc9a11c32.zip
Version abc90220
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abci/abc.c55
-rw-r--r--src/base/abci/abcFxu.c2
2 files changed, 47 insertions, 10 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 90acce0f..e7187a9f 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -14501,7 +14501,7 @@ usage:
fprintf( pErr, "\t-L num : max number of levels to consider (0=all) [default = %d]\n", pPars->nMaxLevs );
fprintf( pErr, "\t-N num : number of last POs treated as constraints (0=none) [default = %d]\n", pPars->nConstrs );
fprintf( pErr, "\t-S num : additional simulation frames for c-examples (0=none) [default = %d]\n", pPars->nFramesAddSim );
- fprintf( pErr, "\t-I num : iteration number to stop and output SR-model (0=none) [default = %d]\n", pPars->nItersStop );
+ fprintf( pErr, "\t-I num : iteration number to stop and output SR-model (-1=none) [default = %d]\n", pPars->nItersStop );
fprintf( pErr, "\t-V num : min var num needed to recycle the SAT solver [default = %d]\n", pPars->nSatVarMax2 );
fprintf( pErr, "\t-M num : min call num needed to recycle the SAT solver [default = %d]\n", pPars->nRecycleCalls2 );
fprintf( pErr, "\t-p : toggle alighning polarity of SAT variables [default = %s]\n", pPars->fPolarFlip? "yes": "no" );
@@ -22365,6 +22365,12 @@ int Abc_CommandAbc9Cof( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1;
}
pAbc->pAig = Gia_ManDupCofactored( pTemp = pAbc->pAig, iVar );
+ if ( pAbc->pAig == NULL )
+ {
+ pAbc->pAig = pTemp;
+ printf( "Abc_CommandAbc9Cof(): Transformation has failed.\n" );
+ return 1;
+ }
Gia_ManStop( pTemp );
return 0;
@@ -23017,12 +23023,36 @@ usage:
***********************************************************************/
int Abc_CommandAbc9Embed( Abc_Frame_t * pAbc, int argc, char ** argv )
{
+ int nDims = 30;
+ int fCluster = 0;
+ int fDump = 0;
+ int fVerbose = 0;
int c;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "h" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "Ddcvh" ) ) != EOF )
{
switch ( c )
{
+ case 'D':
+ if ( globalUtilOptind >= argc )
+ {
+ fprintf( stdout, "Command line switch \"-D\" should be followed by an integer.\n" );
+ goto usage;
+ }
+ nDims = atoi(argv[globalUtilOptind]);
+ globalUtilOptind++;
+ if ( nDims < 0 )
+ goto usage;
+ break;
+ case 'c':
+ fCluster ^= 1;
+ break;
+ case 'd':
+ fDump ^= 1;
+ break;
+ case 'v':
+ fVerbose ^= 1;
+ break;
case 'h':
goto usage;
default:
@@ -23034,15 +23064,19 @@ int Abc_CommandAbc9Embed( Abc_Frame_t * pAbc, int argc, char ** argv )
printf( "Abc_CommandAbc9Test(): There is no AIG.\n" );
return 1;
}
- Gia_ManSolveProblem( pAbc->pAig, 30, 2 );
+ Gia_ManSolveProblem( pAbc->pAig, nDims, 2, fCluster, fDump, fVerbose );
return 0;
usage:
- fprintf( stdout, "usage: &embed [-h]\n" );
- fprintf( stdout, "\t fast placement based on the technique introduced by\n" );
- fprintf( stdout, "\t D. Harel and Y. Koren, \"Graph drawing by high-dimensional\n" );
- fprintf( stdout, "\t embedding\", J. Graph Algs & Apps, Vol 8(2), pp. 195-217 (2004)\n" );
- fprintf( stdout, "\t-h : print the command usage\n");
+ fprintf( stdout, "usage: &embed [-D num] [-dcvh]\n" );
+ fprintf( stdout, "\t fast placement based on high-dimensional embedding from\n" );
+ fprintf( stdout, "\t D. Harel and Y. Koren, \"Graph drawing by high-dimensional\n" );
+ fprintf( stdout, "\t embedding\", J. Graph Algs & Apps, 2004, Vol 8(2), pp. 195-217\n" );
+ fprintf( stdout, "\t-D num : the number of dimensions for embedding [default = %d]\n", nDims );
+ fprintf( stdout, "\t-d : toggle dumping placement into a Gnuplot file [default = %s]\n", fDump? "yes":"no");
+ fprintf( stdout, "\t-c : toggle clustered representation [default = %s]\n", fCluster? "yes":"no");
+ fprintf( stdout, "\t-v : toggle verbose output [default = %s]\n", fVerbose? "yes":"no");
+ fprintf( stdout, "\t-h : print the command usage\n");
return 1;
}
@@ -23060,6 +23094,8 @@ usage:
int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
{
int c;
+ extern void Gia_SatSolveTest( Gia_Man_t * p );
+
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "h" ) ) != EOF )
{
@@ -23081,7 +23117,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Sat_ManTest( pAbc->pAig, Gia_ManCo(pAbc->pAig, 0), 0 );
// Gia_ManTestDistance( pAbc->pAig );
// For_ManExperiment( pAbc->pAig );
- Gia_ManSolveProblem( pAbc->pAig, 30, 2 );
+ Gia_ManSolveProblem( pAbc->pAig, 30, 2, 1, 0, 1 );
+// Gia_SatSolveTest( pAbc->pAig );
return 0;
usage:
diff --git a/src/base/abci/abcFxu.c b/src/base/abci/abcFxu.c
index 850a6e24..1596e774 100644
--- a/src/base/abci/abcFxu.c
+++ b/src/base/abci/abcFxu.c
@@ -192,7 +192,7 @@ void Abc_NtkFxuFreeInfo( Fxu_Data_t * p )
/**Function*************************************************************
- Synopsis [Recostructs the network after FX.]
+ Synopsis [Reconstructs the network after FX.]
Description []