gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Throttle Class Reference

#include <Throttle.hh>

Inheritance diagram for Throttle:
Consumer

Public Member Functions

 Throttle (int sID, RubySystem *rs, NodeID node, Cycles link_latency, int link_bandwidth_multiplier, int endpoint_bandwidth, Switch *em)
 
 ~Throttle ()
 
std::string name ()
 
void addLinks (const std::vector< MessageBuffer * > &in_vec, const std::vector< MessageBuffer * > &out_vec)
 
void wakeup ()
 
const Stats::ScalargetUtilization () const
 
const Stats::VectorgetMsgCount (unsigned int type) const
 
int getLinkBandwidth () const
 
Cycles getLatency () const
 
void clearStats ()
 
void collateStats ()
 
void regStats (std::string name)
 
void print (std::ostream &out) const
 
- Public Member Functions inherited from Consumer
 Consumer (ClockedObject *_em)
 
virtual ~Consumer ()
 
virtual void storeEventInfo (int info)
 
bool alreadyScheduled (Tick time)
 
void insertScheduledWakeupTime (Tick time)
 
void scheduleEventAbsolute (Tick timeAbs)
 

Private Member Functions

void init (NodeID node, Cycles link_latency, int link_bandwidth_multiplier, int endpoint_bandwidth)
 
void operateVnet (int vnet, int &bw_remainin, bool &schedule_wakeup, MessageBuffer *in, MessageBuffer *out)
 
 Throttle (const Throttle &obj)
 
Throttleoperator= (const Throttle &obj)
 

Private Attributes

std::vector< MessageBuffer * > m_in
 
std::vector< MessageBuffer * > m_out
 
unsigned int m_vnets
 
std::vector< int > m_units_remaining
 
const int m_switch_id
 
Switchm_switch
 
NodeID m_node
 
int m_link_bandwidth_multiplier
 
Cycles m_link_latency
 
int m_wakeups_wo_switch
 
int m_endpoint_bandwidth
 
RubySystemm_ruby_system
 
Stats::Scalar m_link_utilization
 
Stats::Vector m_msg_counts [MessageSizeType_NUM]
 
Stats::Formula m_msg_bytes [MessageSizeType_NUM]
 
double m_link_utilization_proxy
 

Additional Inherited Members

- Protected Member Functions inherited from Consumer
void scheduleEvent (Cycles timeDelta)
 

Detailed Description

Definition at line 52 of file Throttle.hh.

Constructor & Destructor Documentation

Throttle::Throttle ( int  sID,
RubySystem rs,
NodeID  node,
Cycles  link_latency,
int  link_bandwidth_multiplier,
int  endpoint_bandwidth,
Switch em 
)
Throttle::~Throttle ( )
inline

Definition at line 58 of file Throttle.hh.

Throttle::Throttle ( const Throttle obj)
private

Member Function Documentation

void Throttle::addLinks ( const std::vector< MessageBuffer * > &  in_vec,
const std::vector< MessageBuffer * > &  out_vec 
)

Definition at line 70 of file Throttle.cc.

References m_in, m_node, m_out, m_switch_id, m_units_remaining, m_vnets, and MessageBuffer::setConsumer().

Referenced by Switch::addOutPort().

void Throttle::clearStats ( )

Definition at line 228 of file Throttle.cc.

References m_link_utilization_proxy.

void Throttle::collateStats ( )
Cycles Throttle::getLatency ( ) const
inline

Definition at line 76 of file Throttle.hh.

References m_link_latency.

int Throttle::getLinkBandwidth ( ) const
inline

Definition at line 73 of file Throttle.hh.

References m_endpoint_bandwidth, and m_link_bandwidth_multiplier.

Referenced by operateVnet(), print(), and wakeup().

const Stats::Vector& Throttle::getMsgCount ( unsigned int  type) const
inline

Definition at line 70 of file Throttle.hh.

References m_msg_counts, and X86ISA::type.

const Stats::Scalar& Throttle::getUtilization ( ) const
inline

Definition at line 68 of file Throttle.hh.

References m_link_utilization.

void Throttle::init ( NodeID  node,
Cycles  link_latency,
int  link_bandwidth_multiplier,
int  endpoint_bandwidth 
)
private

Referenced by regStats().

std::string Throttle::name ( )
inline

Definition at line 60 of file Throttle.hh.

References csprintf(), and m_switch_id.

Referenced by regStats().

void Throttle::operateVnet ( int  vnet,
int &  bw_remainin,
bool &  schedule_wakeup,
MessageBuffer in,
MessageBuffer out 
)
private
Throttle& Throttle::operator= ( const Throttle obj)
private
void Throttle::print ( std::ostream &  out) const
virtual

Implements Consumer.

Definition at line 243 of file Throttle.cc.

References ccprintf(), getLinkBandwidth(), and m_node.

Referenced by operator<<().

void Throttle::regStats ( std::string  name)
void Throttle::wakeup ( )
virtual

Member Data Documentation

int Throttle::m_endpoint_bandwidth
private

Definition at line 105 of file Throttle.hh.

Referenced by getLinkBandwidth(), and Throttle().

std::vector<MessageBuffer*> Throttle::m_in
private

Definition at line 93 of file Throttle.hh.

Referenced by addLinks(), and wakeup().

int Throttle::m_link_bandwidth_multiplier
private

Definition at line 102 of file Throttle.hh.

Referenced by getLinkBandwidth(), and Throttle().

Cycles Throttle::m_link_latency
private

Definition at line 103 of file Throttle.hh.

Referenced by getLatency(), operateVnet(), and Throttle().

Stats::Scalar Throttle::m_link_utilization
private

Definition at line 109 of file Throttle.hh.

Referenced by collateStats(), getUtilization(), and regStats().

double Throttle::m_link_utilization_proxy
private

Definition at line 113 of file Throttle.hh.

Referenced by clearStats(), collateStats(), Throttle(), and wakeup().

Stats::Formula Throttle::m_msg_bytes[MessageSizeType_NUM]
private

Definition at line 111 of file Throttle.hh.

Referenced by regStats().

Stats::Vector Throttle::m_msg_counts[MessageSizeType_NUM]
private

Definition at line 110 of file Throttle.hh.

Referenced by getMsgCount(), operateVnet(), and regStats().

NodeID Throttle::m_node
private

Definition at line 100 of file Throttle.hh.

Referenced by addLinks(), operateVnet(), print(), and regStats().

std::vector<MessageBuffer*> Throttle::m_out
private

Definition at line 94 of file Throttle.hh.

Referenced by addLinks(), and wakeup().

RubySystem* Throttle::m_ruby_system
private

Definition at line 106 of file Throttle.hh.

Referenced by collateStats(), and operateVnet().

Switch* Throttle::m_switch
private

Definition at line 99 of file Throttle.hh.

Referenced by operateVnet().

const int Throttle::m_switch_id
private

Definition at line 98 of file Throttle.hh.

Referenced by addLinks(), and name().

std::vector<int> Throttle::m_units_remaining
private

Definition at line 96 of file Throttle.hh.

Referenced by addLinks(), and operateVnet().

unsigned int Throttle::m_vnets
private

Definition at line 95 of file Throttle.hh.

Referenced by addLinks(), Throttle(), and wakeup().

int Throttle::m_wakeups_wo_switch
private

Definition at line 104 of file Throttle.hh.

Referenced by Throttle(), and wakeup().


The documentation for this class was generated from the following files:

Generated on Fri Jun 9 2017 13:04:21 for gem5 by doxygen 1.8.6