From da6838463fedf0821f542dcc3a4451bfe1ca3abd Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 27 Aug 2012 14:29:32 -0700 Subject: Added features 'map -M ' to control the use of large gates. --- src/map/mio/mio.c | 6 +++--- src/map/mio/mio.h | 3 ++- src/map/mio/mioUtils.c | 25 ++++++++++++++++++++++++- 3 files changed, 29 insertions(+), 5 deletions(-) (limited to 'src/map/mio') 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 #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 /// -- cgit v1.2.3