summaryrefslogtreecommitdiffstats
path: root/src/map/mio
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/mio
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/mio')
-rw-r--r--src/map/mio/mio.c6
-rw-r--r--src/map/mio/mio.h3
-rw-r--r--src/map/mio/mioUtils.c25
3 files changed, 29 insertions, 5 deletions
diff --git a/src/map/mio/mio.c b/src/map/mio/mio.c
index bdb618c1..64a066f8 100644
--- a/src/map/mio/mio.c
+++ b/src/map/mio/mio.c
@@ -161,7 +161,7 @@ int Mio_CommandReadLiberty( Abc_Frame_t * pAbc, int argc, char **argv )
pErr = Abc_FrameReadErr(pAbc);
// set the defaults
- fVerbose = 1;
+ fVerbose = 0;
Extra_UtilGetoptReset();
while ( (c = Extra_UtilGetopt(argc, argv, "vh")) != EOF )
{
@@ -295,7 +295,7 @@ int Mio_CommandReadLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
}
// add the fixed number (wire delay) to all delays in the library
if ( WireDelay != 0.0 )
- Mio_LibraryShift( pLib, WireDelay );
+ Mio_LibraryShiftDelay( pLib, WireDelay );
// free the current superlib because it depends on the old Mio library
if ( Abc_FrameReadLibSuper() )
@@ -309,7 +309,7 @@ int Mio_CommandReadLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
Abc_FrameSetLibGen( pLib );
// set the new network
- pLib = (Mio_Library_t *)Amap_LibReadAndPrepare( FileName, 1, 0 );
+ pLib = (Mio_Library_t *)Amap_LibReadAndPrepare( FileName, 0, 0 );
if ( pLib == NULL )
{
fprintf( pErr, "Reading GENLIB library has failed.\n" );
diff --git a/src/map/mio/mio.h b/src/map/mio/mio.h
index 0aba261a..a7b3f669 100644
--- a/src/map/mio/mio.h
+++ b/src/map/mio/mio.h
@@ -149,7 +149,8 @@ extern void Mio_DeriveGateDelays( Mio_Gate_t * pGate,
float ** ptPinDelays, int nPins, int nInputs, float tDelayZero,
float * ptDelaysRes, float * ptPinDelayMax );
extern Mio_Gate_t * Mio_GateCreatePseudo( int nInputs );
-extern void Mio_LibraryShift( Mio_Library_t * pLib, double Shift );
+extern void Mio_LibraryShiftDelay( Mio_Library_t * pLib, double Shift );
+extern void Mio_LibraryShiftArea( Mio_Library_t * pLib, double Shift );
ABC_NAMESPACE_HEADER_END
diff --git a/src/map/mio/mioUtils.c b/src/map/mio/mioUtils.c
index d7f6c329..c2022186 100644
--- a/src/map/mio/mioUtils.c
+++ b/src/map/mio/mioUtils.c
@@ -16,6 +16,7 @@
***********************************************************************/
+#include <math.h>
#include "mioInt.h"
#include "base/main/main.h"
#include "exp.h"
@@ -591,7 +592,7 @@ Mio_Gate_t * Mio_GateCreatePseudo( int nInputs )
SeeAlso []
***********************************************************************/
-void Mio_LibraryShift( Mio_Library_t * pLib, double Shift )
+void Mio_LibraryShiftDelay( Mio_Library_t * pLib, double Shift )
{
Mio_Gate_t * pGate;
Mio_Pin_t * pPin;
@@ -607,6 +608,28 @@ void Mio_LibraryShift( Mio_Library_t * pLib, double Shift )
}
}
+/**Function*************************************************************
+
+ Synopsis [Multiply areas of all gates by values proportional to fanin count.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Mio_LibraryShiftArea( Mio_Library_t * pLib, double Shift )
+{
+ Mio_Gate_t * pGate;
+ Mio_LibraryForEachGate( pLib, pGate )
+ {
+// printf( "Before %8.3f ", pGate->dArea );
+ pGate->dArea *= pow( pGate->nInputs, Shift );
+// printf( "After %8.3f Inputs = %d. Factor = %8.3f\n", pGate->dArea, pGate->nInputs, pow( pGate->nInputs, Shift ) );
+ }
+}
+
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///