Deleted Added
sdiff udiff text old ( 10447:a465576671d4 ) new ( 10448:bc1a3b7ab5ef )
full compact
1#include "tech/TechModel.h"
2
3#include <cmath>
4
5#include "model/std_cells/StdCellLib.h"
6
7namespace DSENT
8{
9 TechModel::TechModel()
10 : Config(), m_std_cell_lib_(NULL), m_available_wire_layers_(NULL)
11 {}
12
13 TechModel::~TechModel()
14 {}
15
16 void TechModel::setStdCellLib(const StdCellLib* std_cell_lib_)
17 {
18 m_std_cell_lib_ = std_cell_lib_;
19 return;
20 }
21
22 const StdCellLib* TechModel::getStdCellLib() const
23 {
24 return m_std_cell_lib_;
25 }
26
27 TechModel* TechModel::clone() const
28 {
29 return new TechModel(*this);
30 }
31
32 void TechModel::readFile(const String& filename_)
33 {
34 // Read the main technology file
35 LibUtil::Config::readFile(filename_);
36
37 // Search for "INCLUDE" to include more technology files
38 StringMap::ConstIterator it;
39 for(it = begin(); it != end(); ++it)
40 {
41 const String& key = it->first;
42 if(key.compare(0, 8, "INCLUDE_") == 0)
43 {
44 const String& include_filename = it->second;
45 LibUtil::Config::readFile(include_filename);
46 }
47 }
48
49 // Set the available wire layers
50 const vector<String>& available_wire_layer_vector = get("Wire->AvailableLayers").split("[,]");
51 m_available_wire_layers_ = new std::set<String>;
52 for(unsigned int i = 0; i < available_wire_layer_vector.size(); ++i)
53 {
54 m_available_wire_layers_->insert(available_wire_layer_vector[i]);
55 }
56 return;
57 }
58
59 //-------------------------------------------------------------------------
60 // Transistor Related Functions
61 //-------------------------------------------------------------------------
62 //Returns the leakage current of NMOS transistors, given the transistor stakcing, transistor widths, and input combination
63 double TechModel::calculateNmosLeakageCurrent(unsigned int num_stacks_, double uni_stacked_mos_width_, unsigned int input_vector_) const
64 {

--- 244 unchanged lines hidden (view full) ---

309 //double unit_res = rho / ((width_ - 2.0 * barrier_thickness) * (metal_thickness - barrier_thickness));
310
311 double total_res = unit_res * length_;
312 return total_res;
313 }
314 //-------------------------------------------------------------------------
315
316 TechModel::TechModel(const TechModel& tech_model_)
317 : Config(tech_model_), m_std_cell_lib_(tech_model_.m_std_cell_lib_)
318 {}
319} // namespace DSENT
320