00001
00002
00003
00004
00005
00006
00007
00008
00009 #if !defined(oagTimerDP_P)
00010 #define oagTimerDP_P
00011
00012 #include "oaDesignDB.h"
00013 #include "oagTimerTimer.h"
00014 #include "oagTimerUtil.h"
00015
00016 #include <map>
00017 #include <vector>
00018 namespace oagTimer{
00019
00020 class DP{
00021 public:
00022 DP(oaDesign *d, Timer *t);
00023 ~DP();
00024 void run();
00025
00026 private:
00027 void DpRelaxation();
00028 void DpRestoration();
00029 oaString getSolution(CellData *c);
00030 oaString resolveInconsistency(CellData *c);
00031 void mergeFanoutSolutions(oaOccInstTerm *outPin);
00032 void merge(oaOccInstTerm *outPin, oaIter<oaOccInstTerm> itIter, DPData *d);
00033 void pruneSolutions(vector<DPData*> &d);
00034
00039 void copyDPData(DPData *src, DPData *dst);
00040 void copyVecData(vector<DPData*> &src, vector<DPData*> &dst);
00041
00049 double getMaxArr(oaOccInstTerm *in, oaString prospSize);
00050
00051 void clearDPDataVec(vector<DPData*> &vec);
00052 void clearDPData(DPData *v);
00053
00054
00055 void printMap(map<oaOccInstTerm*,oaString> m);
00056 void printDPData(vector<DPData*> d);
00057 void printDPGraph();
00058
00059 private:
00060 oaDesign *design;
00061 Timer *timing;
00062 vector<oaModInst*> G;
00063 map<oaModInst*,oaString> currSizing;
00064 map<oaModInst*,oaString> bestDesign;
00065 bool iterRefine;
00066 map<oaOccInst*, oaString> dpSolutions;
00067
00068 bool flag;
00069 int count;
00070
00071 double targetDelay;
00072 };
00073
00074 }
00075 #endif