summaryrefslogtreecommitdiffstats
path: root/src/map/mio/mio.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-10-12 18:29:15 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2015-10-12 18:29:15 -0700
commit20c46b5a452c08f949929c02d93a060f79144d79 (patch)
tree1a66c6d0ac2bebd5b765a34627da61ebec2ea7be /src/map/mio/mio.c
parentd25473b30722d1567345e2f10e22baa94272085c (diff)
downloadabc-20c46b5a452c08f949929c02d93a060f79144d79.tar.gz
abc-20c46b5a452c08f949929c02d93a060f79144d79.tar.bz2
abc-20c46b5a452c08f949929c02d93a060f79144d79.zip
Experiments with precomputation and matching.
Diffstat (limited to 'src/map/mio/mio.c')
-rw-r--r--src/map/mio/mio.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/map/mio/mio.c b/src/map/mio/mio.c
index d99d267a..6dd6e93f 100644
--- a/src/map/mio/mio.c
+++ b/src/map/mio/mio.c
@@ -443,7 +443,7 @@ int Mio_CommandWriteGenlib( Abc_Frame_t * pAbc, int argc, char **argv )
printf( "Error! Cannot open file \"%s\" for writing the library.\n", pFileName );
return 1;
}
- Mio_WriteLibrary( pFile, (Mio_Library_t *)Abc_FrameReadLibGen(), 0 );
+ Mio_WriteLibrary( pFile, (Mio_Library_t *)Abc_FrameReadLibGen(), 0, 0 );
fclose( pFile );
printf( "The current genlib library is written into file \"%s\".\n", pFileName );
return 0;
@@ -472,7 +472,8 @@ int Mio_CommandPrintGenlib( Abc_Frame_t * pAbc, int argc, char **argv )
{
FILE * pOut, * pErr;
Abc_Ntk_t * pNet;
- int fVerbose;
+ int fShort = 0;
+ int fVerbose = 0;
int c;
pNet = Abc_FrameReadNtk(pAbc);
@@ -480,12 +481,14 @@ int Mio_CommandPrintGenlib( Abc_Frame_t * pAbc, int argc, char **argv )
pErr = Abc_FrameReadErr(pAbc);
// set the defaults
- fVerbose = 1;
Extra_UtilGetoptReset();
- while ( (c = Extra_UtilGetopt(argc, argv, "vh")) != EOF )
+ while ( (c = Extra_UtilGetopt(argc, argv, "svh")) != EOF )
{
switch (c)
{
+ case 's':
+ fShort ^= 1;
+ break;
case 'v':
fVerbose ^= 1;
break;
@@ -501,12 +504,13 @@ int Mio_CommandPrintGenlib( Abc_Frame_t * pAbc, int argc, char **argv )
printf( "Library is not available.\n" );
return 1;
}
- Mio_WriteLibrary( stdout, (Mio_Library_t *)Abc_FrameReadLibGen(), 0 );
+ Mio_WriteLibrary( stdout, (Mio_Library_t *)Abc_FrameReadLibGen(), 0, fShort );
return 0;
usage:
- fprintf( pErr, "\nusage: print_genlib [-vh]\n");
+ fprintf( pErr, "\nusage: print_genlib [-svh]\n");
fprintf( pErr, "\t print the current genlib library\n" );
+ fprintf( pErr, "\t-s : toggles writing short form [default = %s]\n", fShort? "yes" : "no" );
fprintf( pErr, "\t-v : toggles enabling of verbose output [default = %s]\n", fVerbose? "yes" : "no" );
fprintf( pErr, "\t-h : print the command usage\n");
return 1;