summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-09-28 11:32:26 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-09-28 11:32:26 -0700
commitfbc9c00fd15057c6372e399cd6bf443da70e490c (patch)
tree730229ddcf367aba1831c43727b49d9f42fcce70 /src/base
parent69bd355467df6347b6f071c58346c61f44be05e5 (diff)
downloadabc-fbc9c00fd15057c6372e399cd6bf443da70e490c.tar.gz
abc-fbc9c00fd15057c6372e399cd6bf443da70e490c.tar.bz2
abc-fbc9c00fd15057c6372e399cd6bf443da70e490c.zip
Renaming DSD commands (dsd_tune -> dsd_match; dsd_clean -> dsd_filter).
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abc/abcUtil.c40
-rw-r--r--src/base/abci/abc.c20
-rw-r--r--src/base/wlc/wlcWriteVer.c2
3 files changed, 51 insertions, 11 deletions
diff --git a/src/base/abc/abcUtil.c b/src/base/abc/abcUtil.c
index 7b805386..bf3ce301 100644
--- a/src/base/abc/abcUtil.c
+++ b/src/base/abc/abcUtil.c
@@ -1003,6 +1003,45 @@ int Abc_NtkLogicMakeSimpleCos2( Abc_Ntk_t * pNtk, int fDuplicate )
SeeAlso []
***********************************************************************/
+void Abc_NtkLogicMakeSimpleCosTest( Abc_Ntk_t * pNtk, int fDuplicate )
+{
+ int nObjs = Abc_NtkObjNumMax(pNtk);
+ unsigned * pType = ABC_CALLOC( unsigned, nObjs );
+ Abc_Obj_t * pNode;
+ int i, Counts[4] = {0}, Consts[2] = {0}, Inputs[2] = {0};
+ // collect info
+ Abc_NtkForEachCo( pNtk, pNode, i )
+ {
+ if ( Abc_ObjFaninId0(pNode) == 0 )
+ Consts[Abc_ObjFaninC0(pNode)]++;
+ if ( Abc_ObjIsCi(Abc_ObjFanin0(pNode)) )
+ Inputs[Abc_ObjFaninC0(pNode)]++;
+ pType[Abc_ObjFaninId0(pNode)] |= (1 << Abc_ObjFaninC0(pNode));
+ }
+ // count the numbers
+ for ( i = 0; i < nObjs; i++ )
+ Counts[pType[i]]++;
+ for ( i = 0; i < 4; i++ )
+ printf( "%d = %d ", i, Counts[i] );
+ for ( i = 0; i < 2; i++ )
+ printf( "c%d = %d ", i, Consts[i] );
+ for ( i = 0; i < 2; i++ )
+ printf( "i%d = %d ", i, Inputs[i] );
+ printf( "\n" );
+ ABC_FREE( pType );
+}
+
+/**Function*************************************************************
+
+ Synopsis [Transforms the network to have simple COs.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
int Abc_NtkLogicMakeSimpleCos( Abc_Ntk_t * pNtk, int fDuplicate )
{
Vec_Ptr_t * vDrivers, * vCoTerms;
@@ -1010,6 +1049,7 @@ int Abc_NtkLogicMakeSimpleCos( Abc_Ntk_t * pNtk, int fDuplicate )
int i, k, LevelMax, nTotal = 0;
assert( Abc_NtkIsLogic(pNtk) );
LevelMax = Abc_NtkLevel(pNtk);
+// Abc_NtkLogicMakeSimpleCosTest( pNtk, fDuplicate );
// fix constant drivers
Abc_NtkForEachCo( pNtk, pNode, i )
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 1a25829c..2ad21d80 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -240,9 +240,9 @@ static int Abc_CommandDsdSave ( Abc_Frame_t * pAbc, int argc, cha
static int Abc_CommandDsdLoad ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandDsdFree ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandDsdPs ( Abc_Frame_t * pAbc, int argc, char ** argv );
-static int Abc_CommandDsdTune ( Abc_Frame_t * pAbc, int argc, char ** argv );
+static int Abc_CommandDsdMatch ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandDsdMerge ( Abc_Frame_t * pAbc, int argc, char ** argv );
-static int Abc_CommandDsdClean ( Abc_Frame_t * pAbc, int argc, char ** argv );
+static int Abc_CommandDsdFilter ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandScut ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandInit ( Abc_Frame_t * pAbc, int argc, char ** argv );
@@ -833,9 +833,9 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "DSD manager", "dsd_load", Abc_CommandDsdLoad, 0 );
Cmd_CommandAdd( pAbc, "DSD manager", "dsd_free", Abc_CommandDsdFree, 0 );
Cmd_CommandAdd( pAbc, "DSD manager", "dsd_ps", Abc_CommandDsdPs, 0 );
- Cmd_CommandAdd( pAbc, "DSD manager", "dsd_tune", Abc_CommandDsdTune, 0 );
+ Cmd_CommandAdd( pAbc, "DSD manager", "dsd_match", Abc_CommandDsdMatch, 0 );
Cmd_CommandAdd( pAbc, "DSD manager", "dsd_merge", Abc_CommandDsdMerge, 0 );
- Cmd_CommandAdd( pAbc, "DSD manager", "dsd_clean", Abc_CommandDsdClean, 0 );
+ Cmd_CommandAdd( pAbc, "DSD manager", "dsd_filter", Abc_CommandDsdFilter, 0 );
// Cmd_CommandAdd( pAbc, "Sequential", "scut", Abc_CommandScut, 0 );
Cmd_CommandAdd( pAbc, "Sequential", "init", Abc_CommandInit, 1 );
@@ -16055,7 +16055,7 @@ usage:
SeeAlso []
***********************************************************************/
-int Abc_CommandDsdTune( Abc_Frame_t * pAbc, int argc, char ** argv )
+int Abc_CommandDsdMatch( Abc_Frame_t * pAbc, int argc, char ** argv )
{
char * pStruct = NULL;
int c, fVerbose = 0, fFast = 0, fAdd = 0, fSpec = 0, LutSize = 0, nConfls = 10000, nProcs = 1;
@@ -16133,8 +16133,8 @@ int Abc_CommandDsdTune( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
usage:
- Abc_Print( -2, "usage: dsd_tune [-KCP num] [-fasvh] [-S str]\n" );
- Abc_Print( -2, "\t tunes DSD manager for the given LUT size\n" );
+ Abc_Print( -2, "usage: dsd_match [-KCP num] [-fasvh] [-S str]\n" );
+ Abc_Print( -2, "\t matches DSD structures with the given cell\n" );
Abc_Print( -2, "\t-K num : LUT size used for tuning [default = %d]\n", LutSize );
Abc_Print( -2, "\t-C num : the maximum number of conflicts [default = %d]\n", nConfls );
Abc_Print( -2, "\t-P num : the maximum number of processes [default = %d]\n", nProcs );
@@ -16229,7 +16229,7 @@ usage:
SeeAlso []
***********************************************************************/
-int Abc_CommandDsdClean( Abc_Frame_t * pAbc, int argc, char ** argv )
+int Abc_CommandDsdFilter( Abc_Frame_t * pAbc, int argc, char ** argv )
{
If_DsdMan_t * pDsd = (If_DsdMan_t *)Abc_FrameReadManDsd();
int c, nLimit = 0, nLutSize = -1, fCleanOccur = 0, fCleanMarks = 0, fVerbose = 0;
@@ -16287,8 +16287,8 @@ int Abc_CommandDsdClean( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
usage:
- Abc_Print( -2, "usage: dsd_clean [-LK num] [-omvh]\n" );
- Abc_Print( -2, "\t modifying parameters of the DSD manager\n" );
+ Abc_Print( -2, "usage: dsd_filter [-LK num] [-omvh]\n" );
+ Abc_Print( -2, "\t filtering structured and modifying parameters of DSD manager\n" );
Abc_Print( -2, "\t-L num : remove structures with fewer occurrences that this [default = %d]\n", nLimit );
Abc_Print( -2, "\t-K num : new LUT size to set for the DSD manager [default = %d]\n", nLutSize );
Abc_Print( -2, "\t-o : toggles cleaning occurrence counters [default = %s]\n", fCleanOccur? "yes": "no" );
diff --git a/src/base/wlc/wlcWriteVer.c b/src/base/wlc/wlcWriteVer.c
index afc1f9ba..c2a22af9 100644
--- a/src/base/wlc/wlcWriteVer.c
+++ b/src/base/wlc/wlcWriteVer.c
@@ -299,7 +299,7 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p )
fprintf( pFile, "CPL_FF" );
if ( Wlc_ObjRange(pObj) > 1 )
fprintf( pFile, "#%d", Wlc_ObjRange(pObj) );
- fprintf( pFile, " %reg%d (", i );
+ fprintf( pFile, " reg%d (", i );
fprintf( pFile, " .q( %s ),", pName );
fprintf( pFile, " .qbar()," );
fprintf( pFile, " .d( %s ),", Wlc_ObjName(p, Wlc_ObjId(p, Wlc_ObjFoToFi(p, pObj))) );