oagTimerSensitivity.h

Go to the documentation of this file.
00001 /************************************************************
00002 * oagTimerSensitivity.h
00003 * Authors: Santiago Mok <smok@ee.ucla.edu>
00004 *
00005 *
00006 ************************************************************/
00007 
00008 #if !defined(oagTimerSensitivity_P)
00009 #define oagTimerSensitivity_P
00010 
00011 #include <iostream>
00012 #include <vector>
00013 #include <list>
00014 #include <algorithm>
00015 #include <string.h>
00016 #include "oaDesignDB.h"
00017 #include "oagTimerTPointMaster.h"
00018 #include "oagTimerUtil.h"
00019 #include "oagTimerLibParserInt.h"
00020 #include "oagTimerTimer.h"
00021 
00022 namespace oagTimer {
00023 
00024 using namespace oa;
00025 using namespace std;
00026 /*---------------------------------------------------------*/
00027 /* Types of Sensitivity */
00028 typedef enum{
00029     SOLO_POWER,
00030     DUET_POWER_DELAY,
00031     DUET_POWER_SLACK,
00032     DUET_POWER_SLACK_RATIO
00033 } duetType;
00034 /*---------------------------------------------------------*/
00036 struct SenseData{
00037     oaModInst *inst;
00038     oaString currInst;
00039     oaString newInst;
00040     double delta;
00041     bool zero_delta_slack;
00042 
00043     /* Debug Purposes*/
00044     double delta_power;
00045     double delta_slack;
00046     DelayType delta_delay;
00047     DelayType delay_new;
00048     DelayType delay_current;
00049     DelayType slack_new;
00050     DelayType slack_current;
00051 /*    bool operator() (const SenseData &s1, const SenseData &s2){
00052         return (s1.delta < s2.delta);
00053     } */
00054 };
00056 //typedef vector<SenseData> senseDataVector;
00057 typedef list<SenseData> sensitivityList;
00058 /*---------------------------------------------------------*/
00059 class Sensitivity {
00060     public:
00061         Sensitivity(){
00062             //nothing
00063         }
00064         virtual ~Sensitivity(){
00065             //nothing
00066         }
00067 
00068     public:
00069         //void sort();
00070         virtual float getSensitivity(oaInst *inst1, oaInst *inst2) = 0;
00071         float getSensitivity(const char *inst_old, const char *inst_new);
00072         //float getDuetSensitivity(const char *inst_old, const char *inst_new,sensitivityType type);
00073         sensitivityList createSwapList(oaDesign* design,int decrease_only);
00074         void getMatchCells(vector<oaString> &list);
00075         void find_and_remove(oaModInst* currInst,sensitivityList &list);
00076         int updateSwapList(oaModInst* inst,sensitivityList &list,int decrease_only);
00077         void invalidate_swapCell(oaDesign* design,Timer* t,oaModScalarInst *m);
00078         oaOccInstTerm* findOccOutputTerm(oaDesign *design, oaModScalarInst *m);
00079 };
00080 /*---------------------------------------------------------*/
00081     
00082 }//namespace
00083 #endif

Generated on Thu Aug 25 14:24:05 2011 by  doxygen 1.3.9.1