StdCell.h revision 10447:a465576671d4
18012Ssaidi@eecs.umich.edu#ifndef __DSENT_MODEL_STD_CELLS_STDCELL_H__ 28029Snate@binkert.org#define __DSENT_MODEL_STD_CELLS_STDCELL_H__ 38029Snate@binkert.org 48013Sbinkertn@umich.edu#include "util/CommonType.h" 58029Snate@binkert.org#include "model/ElectricalModel.h" 68029Snate@binkert.org 78029Snate@binkert.orgnamespace DSENT 88029Snate@binkert.org{ 98029Snate@binkert.org class StdCell : public ElectricalModel 108029Snate@binkert.org { 118029Snate@binkert.org public: 128029Snate@binkert.org StdCell(const String& instance_name_, const TechModel* tech_model_); 138029Snate@binkert.org virtual ~StdCell(); 148029Snate@binkert.org 158013Sbinkertn@umich.edu public: 168029Snate@binkert.org // Set a list of parameters needed to construct model 178029Snate@binkert.org virtual void initParameters(); 188029Snate@binkert.org // Set a list of properties needed to update model 198029Snate@binkert.org virtual void initProperties(); 208029Snate@binkert.org 218029Snate@binkert.org // Get PMOS to NMOS ratio 228029Snate@binkert.org double getPToNRatio() const; 238029Snate@binkert.org void setPToNRatio(double p_to_n_ratio_); 248029Snate@binkert.org // Get height of the standard cell taken by active transistors 258029Snate@binkert.org double getActiveHeight() const; 268029Snate@binkert.org void setActiveHeight(double active_height_); 278013Sbinkertn@umich.edu // Get total height of the standard cell including overheads 288012Ssaidi@eecs.umich.edu double getTotalHeight() const; 297997Ssaidi@eecs.umich.edu void setTotalHeight(double total_height_); 307997Ssaidi@eecs.umich.edu 318013Sbinkertn@umich.edu // Construct the full model of the standard cell and cache 327997Ssaidi@eecs.umich.edu // its contents to use for future copies of the standard cell 337997Ssaidi@eecs.umich.edu virtual void cacheStdCell(StdCellLib* cell_lib_, double drive_strength_) = 0; 347997Ssaidi@eecs.umich.edu 357997Ssaidi@eecs.umich.edu protected: 367997Ssaidi@eecs.umich.edu // Build the model, note that this is only available if the 377997Ssaidi@eecs.umich.edu // standard cell has been cached (via cacheStdCellModel) 387997Ssaidi@eecs.umich.edu virtual void constructModel() = 0; 397997Ssaidi@eecs.umich.edu virtual void updateModel() = 0; 407997Ssaidi@eecs.umich.edu 417997Ssaidi@eecs.umich.edu private: 427997Ssaidi@eecs.umich.edu // The PMOS to NMOS ratio 437997Ssaidi@eecs.umich.edu double m_p_to_n_ratio_; 447997Ssaidi@eecs.umich.edu // The height of the standard cell taken by active transitors 457997Ssaidi@eecs.umich.edu double m_active_height_; 467997Ssaidi@eecs.umich.edu // The total height of the standard cell including overheads 477997Ssaidi@eecs.umich.edu double m_total_height_; 487997Ssaidi@eecs.umich.edu 497997Ssaidi@eecs.umich.edu }; // class StdCell 507997Ssaidi@eecs.umich.edu} // namespace DSENT 517997Ssaidi@eecs.umich.edu 527997Ssaidi@eecs.umich.edu#endif // __DSENT_MODEL_STD_CELLS_STDCELL_H__ 537997Ssaidi@eecs.umich.edu 547997Ssaidi@eecs.umich.edu