StdCell.h revision 10447
1#ifndef __DSENT_MODEL_STD_CELLS_STDCELL_H__
2#define __DSENT_MODEL_STD_CELLS_STDCELL_H__
3
4#include "util/CommonType.h"
5#include "model/ElectricalModel.h"
6
7namespace DSENT
8{
9    class StdCell : public ElectricalModel
10    {
11        public:
12            StdCell(const String& instance_name_, const TechModel* tech_model_);
13            virtual ~StdCell();
14
15        public:
16            // Set a list of parameters needed to construct model
17            virtual void initParameters();
18            // Set a list of properties needed to update model
19            virtual void initProperties();
20
21            // Get PMOS to NMOS ratio
22            double getPToNRatio() const;
23            void setPToNRatio(double p_to_n_ratio_);
24            // Get height of the standard cell taken by active transistors
25            double getActiveHeight() const;
26            void setActiveHeight(double active_height_);
27            // Get total height of the standard cell including overheads
28            double getTotalHeight() const;
29            void setTotalHeight(double total_height_);
30
31            // Construct the full model of the standard cell and cache
32            // its contents to use for future copies of the standard cell
33            virtual void cacheStdCell(StdCellLib* cell_lib_, double drive_strength_) = 0;
34
35        protected:
36            // Build the model, note that this is only available if the
37            // standard cell has been cached (via cacheStdCellModel)
38            virtual void constructModel() = 0;
39            virtual void updateModel() = 0;
40
41        private:
42            // The PMOS to NMOS ratio
43            double m_p_to_n_ratio_;
44            // The height of the standard cell taken by active transitors
45            double m_active_height_;
46            // The total height of the standard cell including overheads
47            double m_total_height_;
48
49    }; // class StdCell
50} // namespace DSENT
51
52#endif // __DSENT_MODEL_STD_CELLS_STDCELL_H__
53
54