summaryrefslogtreecommitdiffstats
path: root/src/base/wlc/wlcCom.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-11-13 18:28:25 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2014-11-13 18:28:25 -0800
commita34183790f64e829718c3918144af70e1398ab46 (patch)
tree690e9e91b2d47ca64cef3b472a5d60b0d0300e49 /src/base/wlc/wlcCom.c
parent968be1577b684070e6ad6c1aebd70559062d94f3 (diff)
downloadabc-a34183790f64e829718c3918144af70e1398ab46.tar.gz
abc-a34183790f64e829718c3918144af70e1398ab46.tar.bz2
abc-a34183790f64e829718c3918144af70e1398ab46.zip
Enabling AIGs with boxes for word-level and sequential designs.
Diffstat (limited to 'src/base/wlc/wlcCom.c')
-rw-r--r--src/base/wlc/wlcCom.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/base/wlc/wlcCom.c b/src/base/wlc/wlcCom.c
index 0a8b90e0..5c786838 100644
--- a/src/base/wlc/wlcCom.c
+++ b/src/base/wlc/wlcCom.c
@@ -269,13 +269,17 @@ usage:
int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Wlc_Ntk_t * pNtk = Wlc_AbcGetNtk(pAbc);
+ Vec_Int_t * vBoxIds = NULL;
Gia_Man_t * pNew = NULL;
- int c, fVerbose = 0;
+ int c, fMulti = 0, fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "mvh" ) ) != EOF )
{
switch ( c )
{
+ case 'm':
+ fMulti ^= 1;
+ break;
case 'v':
fVerbose ^= 1;
break;
@@ -290,8 +294,15 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( 1, "Abc_CommandBlast(): There is no current design.\n" );
return 0;
}
+ if ( fMulti )
+ {
+ vBoxIds = Wlc_NtkCollectMultipliers( pNtk );
+ if ( vBoxIds == NULL )
+ Abc_Print( 1, "Warning: There is no multipliers in the design.\n" );
+ }
// transform
- pNew = Wlc_NtkBitBlast( pNtk );
+ pNew = Wlc_NtkBitBlast( pNtk, vBoxIds );
+ Vec_IntFreeP( &vBoxIds );
if ( pNew == NULL )
{
Abc_Print( 1, "Abc_CommandBlast(): Bit-blasting has failed.\n" );
@@ -300,8 +311,9 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_FrameUpdateGia( pAbc, pNew );
return 0;
usage:
- Abc_Print( -2, "usage: %%blast [-vh]\n" );
+ Abc_Print( -2, "usage: %%blast [-mvh]\n" );
Abc_Print( -2, "\t performs bit-blasting of the word-level design\n" );
+ Abc_Print( -2, "\t-m : toggle creating boxes for all multipliers in the design [default = %s]\n", fMulti? "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;