ElectricalDriver.h revision 10447
1#ifndef __DSENT_MODEL_ELECTRICAL_DRIVER_H__
2#define __DSENT_MODEL_ELECTRICAL_DRIVER_H__
3
4#include "util/CommonType.h"
5#include "model/timing_graph/ElectricalTimingNode.h"
6
7namespace DSENT
8{
9    class ElectricalModel;
10
11    class ElectricalDriver : public ElectricalTimingNode
12    {
13        public:
14            ElectricalDriver(const String& instance_name_, ElectricalModel* model_, bool sizable_);
15            virtual ~ElectricalDriver();
16
17        public:
18            // Set the output resistance of this driver
19            void setOutputRes(double output_res_);
20            // Get the output resistance of this driver
21            double getOutputRes() const;
22            // Calculate delay due to total load capacitance
23            double calculateDelay() const;
24            // Calculate transition
25            double calculateTransition() const;
26            // get maximum of upstream drive resistance
27            double getMaxUpstreamRes() const;
28
29            // Get whether the driver is sizable
30            bool isSizable() const;
31            // Return true if the instance has minimum driving strength
32            bool hasMinDrivingStrength() const;
33            // Return true if the instance has maximum driving strength
34            bool hasMaxDrivingStrength() const;
35            // Increase driving strength index by 1
36            void increaseDrivingStrength();
37            // Decrease driving strength index by 1
38            void decreaseDrivingStrength();
39
40            bool isDriver() const;
41
42        private:
43            // Disable copy constructor
44            ElectricalDriver(const ElectricalDriver& port_);
45
46        private:
47            // Name of this instance
48            String m_instance_name_;
49            // Output resistance
50            double m_output_res_;
51            // Sizable flag
52            bool m_sizable_;
53    };
54} // namespace DSENT
55
56#endif // __DSENT_MODEL_ELECTRICAL_DRIVER_H__
57
58