00001
00002
00003
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
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
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
00052
00053
00054 };
00056
00057 typedef list<SenseData> sensitivityList;
00058
00059 class Sensitivity {
00060 public:
00061 Sensitivity(){
00062
00063 }
00064 virtual ~Sensitivity(){
00065
00066 }
00067
00068 public:
00069
00070 virtual float getSensitivity(oaInst *inst1, oaInst *inst2) = 0;
00071 float getSensitivity(const char *inst_old, const char *inst_new);
00072
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 }
00083 #endif