00001 /************************************************************ 00002 * oagTimerPowerSenseOpt.h 00003 * Gate sizing algorithm based on power sensitivity 00004 * with incremental timing analysis 00005 * by: Santiago Mok <smok@ee.ucla.edu> 00006 * advised by: Prof. Puneet Gupta 00007 * Electrical Engr Dept, UCLA 00008 * 00009 ************************************************************/ 00010 00011 #if !defined(oagTimerPowerSenseOpt_P) 00012 #define oagTimerPowerSenseOpt_P 00013 00014 #include "string.h" 00015 #include <vector> 00016 #include "oaDesignDB.h" 00017 #include "oagTimerSensitivity.h" 00018 #include "oagTimerTimer.h" 00019 #include "oagTimerUtil.h" 00020 00021 00022 namespace oagTimer { 00023 00024 /*---------------------------------------------------------*/ 00025 00026 using namespace oa; 00027 using namespace std; 00028 /*---------------------------------------------------------*/ 00029 bool compare_psense (SenseData a, SenseData b){ 00030 if(a.delta < b.delta) 00031 return true; 00032 else 00033 return false; 00034 } 00035 /*---------------------------------------------------------*/ 00036 class PowerSenseOpt { 00037 public: 00038 PowerSenseOpt(); 00039 ~PowerSenseOpt(); 00040 00041 public: 00042 void Opt(oaDesign* des, Timer *t, duetType type); 00043 00044 private: 00045 sensitivityList createSwapList(oaDesign *des, bool decrease_only); 00046 void reverseSwap(SenseData s); 00047 void printCurrList(sensitivityList list); 00048 private: 00049 oaDesign *design; 00050 Timer *timing; 00051 Util *u; 00052 }; 00053 /*---------------------------------------------------------*/ 00054 } //namespace 00055 #endif