TechModel.h revision 10447:a465576671d4
1#ifndef __DSENT_TECH_TECH_MODEL_H__ 2#define __DSENT_TECH_TECH_MODEL_H__ 3 4#include <vector> 5#include <set> 6 7#include "libutil/Config.h" 8#include "libutil/String.h" 9 10namespace DSENT 11{ 12 class StdCellLib; 13 14 using std::set; 15 using std::vector; 16 using LibUtil::String; 17 18 class TechModel : public LibUtil::Config 19 { 20 public: 21 typedef std::set<String>::const_iterator ConstWireLayerIterator; 22 23 public: 24 TechModel(); 25 virtual ~TechModel(); 26 27 public: 28 // Set the pointer to a standard cell library 29 void setStdCellLib(const StdCellLib* std_cell_lib_); 30 // Get the pointer to the standard cell library 31 const StdCellLib* getStdCellLib() const; 32 33 // Return a cloned copy of this instance 34 virtual TechModel* clone() const; 35 // Override readFile function to include multiple technology files 36 virtual void readFile(const String& filename_); 37 38 // Transistor 39 // Returns the leakage current of NMOS transistors, given the transistor stakcing, transistor widths, and input combination 40 double calculateNmosLeakageCurrent(unsigned int num_stacks_, double uni_stacked_mos_width_, unsigned int input_vector_) const; 41 double calculateNmosLeakageCurrent(unsigned int num_stacks_, const vector<double>& stacked_mos_widths_, unsigned int input_vector_) const; 42 // Returns the leakage current of PMOS transistors, given the transistor stakcing, transistor widths, and input combination 43 double calculatePmosLeakageCurrent(unsigned int num_stacks_, double uni_stacked_mos_width_, unsigned int input_vector_) const; 44 double calculatePmosLeakageCurrent(unsigned int num_stacks_, const vector<double>& stacked_mos_widths_, unsigned int input_vector_) const; 45 // Returns the leakage current, given the transistor stakcing, transistor widths, input combination, 46 // and technology information (vdd, subthreshold swing, subthreshold dibl swing) 47 double calculateLeakageCurrentFactor(unsigned int num_stacks_, const vector<double>& stacked_mos_widths_, unsigned int input_vector_, double vdd_, double subthreshold_swing_, double dibl_swing_) const; 48 49 // Wire 50 // Check if the wire layer exist 51 bool isWireLayerExist(const String& layer_name_) const; 52 const std::set<String>* getAvailableWireLayers() const; 53 // Return wire capacitance for given wire layer, wire width, wire spacing, and wire length 54 double calculateWireCapacitance(const String& layer_name_, double width_, double spacing_, double length_) const; 55 // Return wire resistance for given wire layer, wire width, and wire length 56 double calculateWireResistance(const String& layer_name_, double width_, double length_) const; 57 58 private: 59 // Private copy constructor. Use clone to perform copy operation 60 TechModel(const TechModel& tech_model_); 61 62 private: 63 // A pointer to a standard cell library 64 const StdCellLib* m_std_cell_lib_; 65 // A set of available wire layers 66 std::set<String>* m_available_wire_layers_; 67 }; // class TechModel 68} // namespace DSENT 69 70#endif // __DSENT_TECH_TECH_MODEL_H__ 71 72