StdCell.cc revision 10447:a465576671d4
12292SN/A#include "model/std_cells/StdCell.h" 210333Smitch.hayenga@arm.com 310239Sbinhpham@cs.rutgers.edu#include "model/timing_graph/ElectricalNet.h" 48707Sandreas.hansson@arm.com#include "model/timing_graph/ElectricalDriver.h" 58707Sandreas.hansson@arm.com#include "model/timing_graph/ElectricalLoad.h" 68707Sandreas.hansson@arm.com 78707Sandreas.hansson@arm.com#include <cmath> 88707Sandreas.hansson@arm.com#include <algorithm> 98707Sandreas.hansson@arm.com 108707Sandreas.hansson@arm.comnamespace DSENT 118707Sandreas.hansson@arm.com{ 128707Sandreas.hansson@arm.com StdCell::StdCell(const String& instance_name_, const TechModel* tech_model_) 138707Sandreas.hansson@arm.com : ElectricalModel(instance_name_, tech_model_) 148707Sandreas.hansson@arm.com { 152727Sktlim@umich.edu initParameters(); 162292SN/A initProperties(); 172292SN/A } 182292SN/A 192292SN/A StdCell::~StdCell() 202292SN/A { 212292SN/A 222292SN/A } 232292SN/A 242292SN/A 252292SN/A void StdCell::initParameters() 262292SN/A { 272292SN/A addParameterName("AvailableDrivingStrengths"); 282292SN/A return; 292292SN/A } 302292SN/A 312292SN/A void StdCell::initProperties() 322292SN/A { 332292SN/A addPropertyName("DrivingStrength"); 342292SN/A return; 352292SN/A } 362292SN/A 372292SN/A // Get PMOS to NMOS ratio 382292SN/A double StdCell::getPToNRatio() const 392292SN/A { 402689Sktlim@umich.edu return m_p_to_n_ratio_; 412689Sktlim@umich.edu } 422292SN/A 432292SN/A void StdCell::setPToNRatio(double p_to_n_ratio_) 449944Smatt.horsnell@ARM.com { 459944Smatt.horsnell@ARM.com m_p_to_n_ratio_ = p_to_n_ratio_; 469944Smatt.horsnell@ARM.com } 472329SN/A 482980Sgblack@eecs.umich.edu // Get height of the standard cell taken by active transistors 492329SN/A double StdCell::getActiveHeight() const 502329SN/A { 5113449Sgabeblack@google.com return m_active_height_; 522292SN/A } 539444SAndreas.Sandberg@ARM.com 548232Snate@binkert.org void StdCell::setActiveHeight(double active_height_) 558232Snate@binkert.org { 568232Snate@binkert.org m_active_height_ = active_height_; 576221Snate@binkert.org } 582292SN/A 596221Snate@binkert.org // Get total height of the standard cell including overheads 605529Snate@binkert.org double StdCell::getTotalHeight() const 612292SN/A { 625529Snate@binkert.org return m_total_height_; 638707Sandreas.hansson@arm.com } 6413560Snikos.nikoleris@arm.com 654329Sktlim@umich.edu void StdCell::setTotalHeight(double total_height_) 664329Sktlim@umich.edu { 6713472Srekai.gonzalezalberquilla@arm.com m_total_height_ = total_height_; 6813472Srekai.gonzalezalberquilla@arm.com } 6913472Srekai.gonzalezalberquilla@arm.com 7013472Srekai.gonzalezalberquilla@arm.com} // namespace DSENT 7110333Smitch.hayenga@arm.com 722292SN/A