summaryrefslogtreecommitdiffstats
path: root/src/base/wlc/wlcCom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/wlc/wlcCom.c')
-rw-r--r--src/base/wlc/wlcCom.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/base/wlc/wlcCom.c b/src/base/wlc/wlcCom.c
index 0ce8613e..57e97045 100644
--- a/src/base/wlc/wlcCom.c
+++ b/src/base/wlc/wlcCom.c
@@ -178,12 +178,20 @@ int Abc_CommandWriteWlc( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Wlc_Ntk_t * pNtk = Wlc_AbcGetNtk(pAbc);
char * pFileName = NULL;
+ int fAddCos = 0;
+ int fSplitNodes = 0;
int c, fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "anvh" ) ) != EOF )
{
switch ( c )
{
+ case 'a':
+ fAddCos ^= 1;
+ break;
+ case 'n':
+ fSplitNodes ^= 1;
+ break;
case 'v':
fVerbose ^= 1;
break;
@@ -207,12 +215,22 @@ int Abc_CommandWriteWlc( Abc_Frame_t * pAbc, int argc, char ** argv )
printf( "Output file name should be given on the command line.\n" );
return 0;
}
- Wlc_WriteVer( pNtk, pFileName );
+ if ( fSplitNodes )
+ {
+ pNtk = Wlc_NtkDupSingleNodes( pNtk );
+ Wlc_WriteVer( pNtk, pFileName, fAddCos );
+ Wlc_NtkFree( pNtk );
+ }
+ else
+ Wlc_WriteVer( pNtk, pFileName, fAddCos );
+
return 0;
usage:
- Abc_Print( -2, "usage: %%write [-vh]\n" );
+ Abc_Print( -2, "usage: %%write [-anvh]\n" );
Abc_Print( -2, "\t writes the design into a file\n" );
- Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
+ Abc_Print( -2, "\t-a : toggle adding a CO for each node [default = %s]\n", fAddCos? "yes": "no" );
+ Abc_Print( -2, "\t-n : toggle splitting into individual nodes [default = %s]\n", fSplitNodes? "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");
return 1;
}