gem5  v20.1.0.0
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)
 
ClockedObjectgetObject ()
 
void scheduleEventAbsolute (Tick timeAbs)
 
void scheduleEvent (Cycles timeDelta)
 

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
 

Detailed Description

Definition at line 52 of file Throttle.hh.

Constructor & Destructor Documentation

◆ Throttle() [1/2]

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

◆ ~Throttle()

Throttle::~Throttle ( )
inline

Definition at line 58 of file Throttle.hh.

◆ Throttle() [2/2]

Throttle::Throttle ( const Throttle obj)
private

Member Function Documentation

◆ addLinks()

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

◆ clearStats()

void Throttle::clearStats ( )

Definition at line 228 of file Throttle.cc.

References m_link_utilization_proxy.

◆ collateStats()

void Throttle::collateStats ( )

◆ getLatency()

Cycles Throttle::getLatency ( ) const
inline

Definition at line 76 of file Throttle.hh.

References m_link_latency.

◆ getLinkBandwidth()

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().

◆ getMsgCount()

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

Definition at line 70 of file Throttle.hh.

References m_msg_counts, and type.

◆ getUtilization()

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

Definition at line 68 of file Throttle.hh.

References m_link_utilization.

◆ init()

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

Referenced by regStats().

◆ name()

std::string Throttle::name ( )
inline

Definition at line 60 of file Throttle.hh.

References csprintf(), and m_switch_id.

Referenced by regStats().

◆ operateVnet()

void Throttle::operateVnet ( int  vnet,
int &  bw_remainin,
bool &  schedule_wakeup,
MessageBuffer in,
MessageBuffer out 
)
private

◆ operator=()

Throttle& Throttle::operator= ( const Throttle obj)
private

◆ print()

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<<().

◆ regStats()

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

◆ wakeup()

void Throttle::wakeup ( )
virtual

Member Data Documentation

◆ m_endpoint_bandwidth

int Throttle::m_endpoint_bandwidth
private

Definition at line 105 of file Throttle.hh.

Referenced by getLinkBandwidth(), and Throttle().

◆ m_in

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

Definition at line 93 of file Throttle.hh.

Referenced by addLinks(), and wakeup().

◆ m_link_bandwidth_multiplier

int Throttle::m_link_bandwidth_multiplier
private

Definition at line 102 of file Throttle.hh.

Referenced by getLinkBandwidth(), and Throttle().

◆ m_link_latency

Cycles Throttle::m_link_latency
private

Definition at line 103 of file Throttle.hh.

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

◆ m_link_utilization

Stats::Scalar Throttle::m_link_utilization
private

Definition at line 109 of file Throttle.hh.

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

◆ m_link_utilization_proxy

double Throttle::m_link_utilization_proxy
private

Definition at line 113 of file Throttle.hh.

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

◆ m_msg_bytes

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

Definition at line 111 of file Throttle.hh.

Referenced by regStats().

◆ m_msg_counts

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

Definition at line 110 of file Throttle.hh.

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

◆ m_node

NodeID Throttle::m_node
private

Definition at line 100 of file Throttle.hh.

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

◆ m_out

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

Definition at line 94 of file Throttle.hh.

Referenced by addLinks(), and wakeup().

◆ m_ruby_system

RubySystem* Throttle::m_ruby_system
private

Definition at line 106 of file Throttle.hh.

Referenced by collateStats(), and operateVnet().

◆ m_switch

Switch* Throttle::m_switch
private

Definition at line 99 of file Throttle.hh.

Referenced by operateVnet().

◆ m_switch_id

const int Throttle::m_switch_id
private

Definition at line 98 of file Throttle.hh.

Referenced by addLinks(), and name().

◆ m_units_remaining

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

Definition at line 96 of file Throttle.hh.

Referenced by addLinks(), and operateVnet().

◆ m_vnets

unsigned int Throttle::m_vnets
private

Definition at line 95 of file Throttle.hh.

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

◆ m_wakeups_wo_switch

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 Wed Sep 30 2020 14:02:33 for gem5 by doxygen 1.8.17