summaryrefslogtreecommitdiffstats
path: root/src/base/io/io.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-01-21 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2008-01-21 08:01:00 -0800
commitd4fecf91efcd090caa9a5cbfb05059361e84c4ec (patch)
tree87dfc18934e7460a3be8c7cea0a587756e66aeb2 /src/base/io/io.c
parent61850d5942fcff634b16696bf3ca7ee0fc465d1c (diff)
downloadabc-d4fecf91efcd090caa9a5cbfb05059361e84c4ec.tar.gz
abc-d4fecf91efcd090caa9a5cbfb05059361e84c4ec.tar.bz2
abc-d4fecf91efcd090caa9a5cbfb05059361e84c4ec.zip
Version abc80121
Diffstat (limited to 'src/base/io/io.c')
-rw-r--r--src/base/io/io.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/base/io/io.c b/src/base/io/io.c
index ed314fcd..fe88a285 100644
--- a/src/base/io/io.c
+++ b/src/base/io/io.c
@@ -1174,17 +1174,22 @@ int IoCommandWriteAiger( Abc_Frame_t * pAbc, int argc, char **argv )
{
char * pFileName;
int fWriteSymbols;
+ int fCompact;
int c;
- fWriteSymbols = 1;
+ fCompact = 1;
+ fWriteSymbols = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "sh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "sch" ) ) != EOF )
{
switch ( c )
{
case 's':
fWriteSymbols ^= 1;
break;
+ case 'c':
+ fCompact ^= 1;
+ break;
case 'h':
goto usage;
default:
@@ -1196,23 +1201,19 @@ int IoCommandWriteAiger( Abc_Frame_t * pAbc, int argc, char **argv )
// get the output file name
pFileName = argv[globalUtilOptind];
// call the corresponding file writer
- if ( fWriteSymbols )
- Io_Write( pAbc->pNtkCur, pFileName, IO_FILE_AIGER );
- else
+ if ( !Abc_NtkIsStrash(pAbc->pNtkCur) )
{
- if ( !Abc_NtkIsStrash(pAbc->pNtkCur) )
- {
- fprintf( stdout, "Writing this format is only possible for structurally hashed AIGs.\n" );
- return 1;
- }
- Io_WriteAiger( pAbc->pNtkCur, pFileName, 0 );
+ fprintf( stdout, "Writing this format is only possible for structurally hashed AIGs.\n" );
+ return 1;
}
+ Io_WriteAiger( pAbc->pNtkCur, pFileName, fWriteSymbols, fCompact );
return 0;
usage:
- fprintf( pAbc->Err, "usage: write_aiger [-sh] <file>\n" );
+ fprintf( pAbc->Err, "usage: write_aiger [-sch] <file>\n" );
fprintf( pAbc->Err, "\t write the network in the AIGER format (http://fmv.jku.at/aiger)\n" );
fprintf( pAbc->Err, "\t-s : toggle saving I/O names [default = %s]\n", fWriteSymbols? "yes" : "no" );
+ fprintf( pAbc->Err, "\t-c : toggle writing more compactly [default = %s]\n", fCompact? "yes" : "no" );
fprintf( pAbc->Err, "\t-h : print the help massage\n" );
fprintf( pAbc->Err, "\tfile : the name of the file to write (extension .aig)\n" );
return 1;