StdCell.cc revision 10447:a465576671d4
1#include "model/std_cells/StdCell.h"
2
3#include "model/timing_graph/ElectricalNet.h"
4#include "model/timing_graph/ElectricalDriver.h"
5#include "model/timing_graph/ElectricalLoad.h"
6
7#include <cmath>
8#include <algorithm>
9
10namespace DSENT
11{
12    StdCell::StdCell(const String& instance_name_, const TechModel* tech_model_)
13        : ElectricalModel(instance_name_, tech_model_)
14    {
15        initParameters();
16        initProperties();
17    }
18
19    StdCell::~StdCell()
20    {
21
22    }
23
24
25    void StdCell::initParameters()
26    {
27        addParameterName("AvailableDrivingStrengths");
28        return;
29    }
30
31    void StdCell::initProperties()
32    {
33        addPropertyName("DrivingStrength");
34        return;
35    }
36
37    // Get PMOS to NMOS ratio
38    double StdCell::getPToNRatio() const
39    {
40        return m_p_to_n_ratio_;
41    }
42
43    void StdCell::setPToNRatio(double p_to_n_ratio_)
44    {
45        m_p_to_n_ratio_ = p_to_n_ratio_;
46    }
47
48    // Get height of the standard cell taken by active transistors
49    double StdCell::getActiveHeight() const
50    {
51        return m_active_height_;
52    }
53
54    void StdCell::setActiveHeight(double active_height_)
55    {
56        m_active_height_ = active_height_;
57    }
58
59    // Get total height of the standard cell including overheads
60    double StdCell::getTotalHeight() const
61    {
62        return m_total_height_;
63    }
64
65    void StdCell::setTotalHeight(double total_height_)
66    {
67        m_total_height_ = total_height_;
68    }
69
70} // namespace DSENT
71
72