summaryrefslogtreecommitdiffstats
path: root/src/base/wlc
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2016-05-20 13:50:19 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2016-05-20 13:50:19 -0700
commit555ed0b1589570219e5bf71789a234105b353815 (patch)
tree8aab7247cc92a6cce0e82c49fc748f72a699c563 /src/base/wlc
parentc6a290ee971481d7f8792a96772deb77b6885206 (diff)
downloadabc-555ed0b1589570219e5bf71789a234105b353815.tar.gz
abc-555ed0b1589570219e5bf71789a234105b353815.tar.bz2
abc-555ed0b1589570219e5bf71789a234105b353815.zip
Enabling AIGs without structural hashing.
Diffstat (limited to 'src/base/wlc')
-rw-r--r--src/base/wlc/wlc.h2
-rw-r--r--src/base/wlc/wlcBlast.c7
-rw-r--r--src/base/wlc/wlcCom.c12
-rw-r--r--src/base/wlc/wlcReadVer.c2
-rw-r--r--src/base/wlc/wlcSim.c2
5 files changed, 16 insertions, 9 deletions
diff --git a/src/base/wlc/wlc.h b/src/base/wlc/wlc.h
index 453cb157..b023e17d 100644
--- a/src/base/wlc/wlc.h
+++ b/src/base/wlc/wlc.h
@@ -252,7 +252,7 @@ extern Vec_Int_t * Wlc_NtkFindUifableMultiplierPairs( Wlc_Ntk_t * p );
extern Wlc_Ntk_t * Wlc_NtkAbstractNodes( Wlc_Ntk_t * pNtk, Vec_Int_t * vNodes );
extern Wlc_Ntk_t * Wlc_NtkUifNodePairs( Wlc_Ntk_t * pNtk, Vec_Int_t * vPairs );
/*=== wlcBlast.c ========================================================*/
-extern Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds );
+extern Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds, int fGiaSimple );
/*=== wlcCom.c ========================================================*/
extern void Wlc_SetNtk( Abc_Frame_t * pAbc, Wlc_Ntk_t * pNtk );
/*=== wlcNtk.c ========================================================*/
diff --git a/src/base/wlc/wlcBlast.c b/src/base/wlc/wlcBlast.c
index 6ddd7a60..adce0d57 100644
--- a/src/base/wlc/wlcBlast.c
+++ b/src/base/wlc/wlcBlast.c
@@ -716,7 +716,7 @@ void Wlc_BlastSquare( Gia_Man_t * pNew, int * pNum, int nNum, Vec_Int_t * vTmp,
SeeAlso []
***********************************************************************/
-Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds )
+Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds, int fGiaSimple )
{
int fVerbose = 0;
int fUseOldMultiplierBlasting = 0;
@@ -740,7 +740,9 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds )
// create AIG manager
pNew = Gia_ManStart( 5 * Wlc_NtkObjNum(p) + 1000 );
pNew->pName = Abc_UtilStrsav( p->pName );
- Gia_ManHashAlloc( pNew );
+ pNew->fGiaSimple = fGiaSimple;
+ if ( !fGiaSimple )
+ Gia_ManHashAlloc( pNew );
// prepare for AIG with boxes
if ( vBoxIds )
{
@@ -770,6 +772,7 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds )
// create AIG manager for logic of the boxes
pExtra = Gia_ManStart( Wlc_NtkObjNum(p) );
Gia_ManHashAlloc( pExtra );
+ assert( !fGiaSimple );
}
// blast in the topological order
Wlc_NtkForEachObj( p, pObj, i )
diff --git a/src/base/wlc/wlcCom.c b/src/base/wlc/wlcCom.c
index 1584e346..bbb897ea 100644
--- a/src/base/wlc/wlcCom.c
+++ b/src/base/wlc/wlcCom.c
@@ -328,12 +328,15 @@ 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, fMulti = 0, fVerbose = 0;
+ int c, fGiaSimple = 0, fMulti = 0, fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "mvh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "cmvh" ) ) != EOF )
{
switch ( c )
{
+ case 'c':
+ fGiaSimple ^= 1;
+ break;
case 'm':
fMulti ^= 1;
break;
@@ -358,7 +361,7 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( 1, "Warning: There is no multipliers in the design.\n" );
}
// transform
- pNew = Wlc_NtkBitBlast( pNtk, vBoxIds );
+ pNew = Wlc_NtkBitBlast( pNtk, vBoxIds, fGiaSimple );
Vec_IntFreeP( &vBoxIds );
if ( pNew == NULL )
{
@@ -368,8 +371,9 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_FrameUpdateGia( pAbc, pNew );
return 0;
usage:
- Abc_Print( -2, "usage: %%blast [-mvh]\n" );
+ Abc_Print( -2, "usage: %%blast [-cmvh]\n" );
Abc_Print( -2, "\t performs bit-blasting of the word-level design\n" );
+ Abc_Print( -2, "\t-c : toggle using AIG w/o const propagation and strashing [default = %s]\n", fGiaSimple? "yes": "no" );
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");
diff --git a/src/base/wlc/wlcReadVer.c b/src/base/wlc/wlcReadVer.c
index 0aedef30..eaecf449 100644
--- a/src/base/wlc/wlcReadVer.c
+++ b/src/base/wlc/wlcReadVer.c
@@ -1287,7 +1287,7 @@ void Io_ReadWordTest( char * pFileName )
return;
Wlc_WriteVer( pNtk, "test.v", 0, 0 );
- pNew = Wlc_NtkBitBlast( pNtk, NULL );
+ pNew = Wlc_NtkBitBlast( pNtk, NULL, 0 );
Gia_AigerWrite( pNew, "test.aig", 0, 0 );
Gia_ManStop( pNew );
diff --git a/src/base/wlc/wlcSim.c b/src/base/wlc/wlcSim.c
index b0cea038..6cd081a5 100644
--- a/src/base/wlc/wlcSim.c
+++ b/src/base/wlc/wlcSim.c
@@ -129,7 +129,7 @@ Vec_Ptr_t * Wlc_NtkSimulate( Wlc_Ntk_t * p, Vec_Int_t * vNodes, int nWords, int
{
Gia_Obj_t * pObj;
Vec_Ptr_t * vOne, * vRes;
- Gia_Man_t * pGia = Wlc_NtkBitBlast( p, NULL );
+ Gia_Man_t * pGia = Wlc_NtkBitBlast( p, NULL, 0 );
Wlc_Obj_t * pWlcObj;
int f, i, k, w, nBits, Counter = 0;
// allocate simulation info for one timeframe