summaryrefslogtreecommitdiffstats
path: root/src/map/amap
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-08-27 14:29:32 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-08-27 14:29:32 -0700
commitda6838463fedf0821f542dcc3a4451bfe1ca3abd (patch)
treec05d193c0ba8b43ec590654b72c67fbd9adbde2a /src/map/amap
parent9abe8b66c9f828501fc61564e91968d96c4e7507 (diff)
downloadabc-da6838463fedf0821f542dcc3a4451bfe1ca3abd.tar.gz
abc-da6838463fedf0821f542dcc3a4451bfe1ca3abd.tar.bz2
abc-da6838463fedf0821f542dcc3a4451bfe1ca3abd.zip
Added features 'map -M <float>' to control the use of large gates.
Diffstat (limited to 'src/map/amap')
-rw-r--r--src/map/amap/amapLiberty.c19
-rw-r--r--src/map/amap/amapParse.c5
2 files changed, 15 insertions, 9 deletions
diff --git a/src/map/amap/amapLiberty.c b/src/map/amap/amapLiberty.c
index 34bd5303..e3391e66 100644
--- a/src/map/amap/amapLiberty.c
+++ b/src/map/amap/amapLiberty.c
@@ -345,7 +345,7 @@ char * Amap_LibertyGetStringFormula( Amap_Tree_t * p, Amap_Pair_t Pair )
SeeAlso []
***********************************************************************/
-int Amap_LibertyPrintGenlib( Amap_Tree_t * p, char * pFileName )
+int Amap_LibertyPrintGenlib( Amap_Tree_t * p, char * pFileName, int fVerbose )
{
FILE * pFile;
Amap_Item_t * pCell, * pArea, * pFunc, * pPin, * pOutput;
@@ -390,24 +390,28 @@ int Amap_LibertyPrintGenlib( Amap_Tree_t * p, char * pFileName )
continue;
if ( Amap_LibertyCellIsFlop(p, pCell) )
{
- printf( "Amap_LibertyPrintGenlib() skipped sequential cell \"%s\".\n", Amap_LibertyGetString(p, pCell->Head) );
+ if ( fVerbose )
+ printf( "Amap_LibertyPrintGenlib() skipped sequential cell \"%s\".\n", Amap_LibertyGetString(p, pCell->Head) );
continue;
}
Counter = Amap_LibertyCellCountOutputs( p, pCell );
if ( Counter == 0 )
{
- printf( "Amap_LibertyPrintGenlib() skipped cell \"%s\" without logic function.\n", Amap_LibertyGetString(p, pCell->Head) );
+ if ( fVerbose )
+ printf( "Amap_LibertyPrintGenlib() skipped cell \"%s\" without logic function.\n", Amap_LibertyGetString(p, pCell->Head) );
continue;
}
if ( Counter > 1 )
{
- printf( "Amap_LibertyPrintGenlib() skipped multi-output cell \"%s\".\n", Amap_LibertyGetString(p, pCell->Head) );
+ if ( fVerbose )
+ printf( "Amap_LibertyPrintGenlib() skipped multi-output cell \"%s\".\n", Amap_LibertyGetString(p, pCell->Head) );
continue;
}
pArea = Amap_LibertyCellArea( p, pCell );
if ( pArea == NULL )
{
- printf( "Amap_LibertyPrintGenlib() skipped cell \"%s\" with unspecified area.\n", Amap_LibertyGetString(p, pCell->Head) );
+ if ( fVerbose )
+ printf( "Amap_LibertyPrintGenlib() skipped cell \"%s\" with unspecified area.\n", Amap_LibertyGetString(p, pCell->Head) );
continue;
}
pOutput = Amap_LibertyCellOutput( p, pCell );
@@ -415,7 +419,8 @@ int Amap_LibertyPrintGenlib( Amap_Tree_t * p, char * pFileName )
pForm = Amap_LibertyGetStringFormula( p, pFunc->Head );
if ( !strcmp(pForm, "0") || !strcmp(pForm, "1") )
{
- printf( "Amap_LibertyPrintGenlib() skipped cell \"%s\" with constant formula \"%s\".\n", Amap_LibertyGetString(p, pCell->Head), pForm );
+ if ( fVerbose )
+ printf( "Amap_LibertyPrintGenlib() skipped cell \"%s\" with constant formula \"%s\".\n", Amap_LibertyGetString(p, pCell->Head), pForm );
continue;
}
@@ -900,7 +905,7 @@ int Amap_LibertyParse( char * pFileName, char * pFileGenlib, int fVerbose )
if ( fVerbose )
printf( "Parsing finished successfully.\n" );
// Amap_LibertyPrintLiberty( p, "temp_.lib" );
- Amap_LibertyPrintGenlib( p, "temp.genlib" );
+ Amap_LibertyPrintGenlib( p, "temp.genlib", fVerbose );
RetValue = 1;
}
else
diff --git a/src/map/amap/amapParse.c b/src/map/amap/amapParse.c
index d81411bc..f2a38db6 100644
--- a/src/map/amap/amapParse.c
+++ b/src/map/amap/amapParse.c
@@ -434,7 +434,8 @@ int Amap_LibParseEquations( Amap_Lib_t * p, int fVerbose )
pTruth = Hop_ManConvertAigToTruth( pMan, pObj, pGate->nPins, vTruth, 0 );
if ( Kit_TruthSupportSize(pTruth, pGate->nPins) < (int)pGate->nPins )
{
- printf( "Skipping gate \"%s\" because its output \"%s\" does not depend on all input variables.\n", pGate->pName, pGate->pForm );
+ if ( fVerbose )
+ printf( "Skipping gate \"%s\" because its output \"%s\" does not depend on all input variables.\n", pGate->pName, pGate->pForm );
continue;
}
pGate->pFunc = (unsigned *)Aig_MmFlexEntryFetch( p->pMemGates, sizeof(unsigned)*Abc_TruthWordNum(pGate->nPins) );
@@ -459,7 +460,7 @@ int Amap_LibParseEquations( Amap_Lib_t * p, int fVerbose )
***********************************************************************/
void Amap_LibParseTest( char * pFileName )
{
- int fVerbose = 1;
+ int fVerbose = 0;
Amap_Lib_t * p;
clock_t clk = clock();
p = Amap_LibReadFile( pFileName, fVerbose );