00001
00002
00003
00004
00005
00006
00007
00008
00009 #if !defined(oagTimerElmoreWireModel_P)
00010 #define oagTimerElmoreWireModel_P
00011
00012 #include "oaDesignDB.h"
00013 #include "oagTimerWireModel.h"
00014
00015 #include "oagTimerLibParserInt.h"
00016 #include <map>
00017 #include <vector>
00018
00019 namespace oagTimer {
00020
00021 using namespace oa;
00022 using namespace std;
00023
00024 struct _inputTermsData{
00025 oaFloat res;
00026 oaFloat elmoreValue;
00027 vector<oaNode*> topNode;
00028 };
00029 struct _pathData{
00030 oaFloat totalRes;
00031 oaFloat totalDownCap;
00032 oaFloat totalElmoreValue;
00033 };
00034 struct nodeData{
00035 oaNode *current;
00036 vector<oaFloat> _res;
00037 vector<oaNode*> _nextNode;
00038
00039
00040
00041
00042
00043
00044 };
00045
00046 typedef map<oaNode*,double> inputPinMap;
00047 typedef map<oaNode*,_pathData> _PathMap;
00048 typedef map<oaNode*,_inputTermsData> _inputPinMap;
00049 typedef map<oaNode*,oaTerm*> termMap;
00050 typedef map<oaNode*,oaInstTerm*> instTermMap;
00051 typedef map<oaTerm*,DelayType> _outputMap;
00052 typedef map<oaInstTerm*,DelayType> _inputMap;
00053
00054 class ElmoreWireModel : public WireModel{
00055 public:
00056
00057 ElmoreWireModel();
00058
00059
00060 ~ElmoreWireModel();
00061
00062 private:
00063
00064 bool isPinNode(oaNode *node);
00065
00071 double getInputPinCap(oaNode* n);
00079 void storeTopPath(oaNode *currentNode, oaFloat _res, oaFloat _elm);
00080
00087 void storeInpPin(oaNode *currNode, oaFloat _res, oaFloat _elm);
00093 void updateTopPathElmoreValue(oaFloat _currCap);
00094
00096 bool isTopPathNode(oaNode *node);
00097
00098
00099 void clearCurrentPath();
00100
00101
00102 void clearPathCap();
00103
00104
00105 void clearAll();
00106
00112
00113 void findNext(nodeData &node, oaNode *previousNode);
00114
00122 void oaTraversePath(oaNode* parentNode, oaNode *previousNode);
00123
00127 oaTerm *getTerm(oaNode *n);
00128
00129
00133 oaInstTerm *getInstTerm(oaNode *n);
00134
00135 public:
00139 double ElmoreWireModel::getWireCapEff(double netLoad, double netRes, DelayType Td, DelayType Tx);
00140
00144 double ElmoreWireModel::getWireRes(oaNet *net);
00145
00152 void setUnit(const char* time,const char* cap);
00153
00154 DelayType getWireCap(oaNet *net);
00155 DelayType getWireDelay(oaNet *net);
00156 DelayType getWireDelay(oaNet *net, _outputMap &outputPin, _inputMap &inputPin);
00157
00158 public:
00159 oaNode *parentNode;
00160 private:
00161 oaFloat
00162 _currPathRes, _currNodeCap, _currPathCap, _retPathCap, _currElmorePath;
00163 oaAnalysisPoint *_currentAP;
00164 vector<oaNode*> _currNodeVector;
00165 inputPinMap inputPinCap;
00166 _PathMap topPath;
00167 _PathMap luMap;
00168 _inputPinMap inputTerm;
00169 termMap _terms;
00170 instTermMap _instTerms;
00171 bool branch;
00172 bool pinBranch;
00173 double time_factor, cap_factor;
00174
00175 };
00176
00177 }
00178
00179 #endif