gem5  v21.1.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
gem5::ruby::Throttle Class Reference

#include <Throttle.hh>

Inheritance diagram for gem5::ruby::Throttle:
gem5::ruby::Consumer

Classes

struct  ThrottleStats
 

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 statistics::ScalargetUtilization () const
 
const statistics::VectorgetMsgCount (unsigned int type) const
 
int getLinkBandwidth () const
 
Cycles getLatency () const
 
void clearStats ()
 
void collateStats ()
 
void regStats ()
 
void print (std::ostream &out) const
 
- Public Member Functions inherited from gem5::ruby::Consumer
 Consumer (ClockedObject *_em)
 
virtual ~Consumer ()
 
virtual void storeEventInfo (int info)
 
bool alreadyScheduled (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
 
double m_link_utilization_proxy
 
gem5::ruby::Throttle::ThrottleStats throttleStats
 

Detailed Description

Definition at line 58 of file Throttle.hh.

Constructor & Destructor Documentation

◆ Throttle() [1/2]

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

◆ ~Throttle()

gem5::ruby::Throttle::~Throttle ( )
inline

Definition at line 64 of file Throttle.hh.

◆ Throttle() [2/2]

gem5::ruby::Throttle::Throttle ( const Throttle obj)
private

Member Function Documentation

◆ addLinks()

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

◆ clearStats()

void gem5::ruby::Throttle::clearStats ( )

Definition at line 236 of file Throttle.cc.

References m_link_utilization_proxy.

◆ collateStats()

void gem5::ruby::Throttle::collateStats ( )

◆ getLatency()

Cycles gem5::ruby::Throttle::getLatency ( ) const
inline

Definition at line 82 of file Throttle.hh.

References m_link_latency.

◆ getLinkBandwidth()

int gem5::ruby::Throttle::getLinkBandwidth ( ) const
inline

Definition at line 79 of file Throttle.hh.

References m_endpoint_bandwidth, and m_link_bandwidth_multiplier.

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

◆ getMsgCount()

const statistics::Vector& gem5::ruby::Throttle::getMsgCount ( unsigned int  type) const
inline

◆ getUtilization()

const statistics::Scalar& gem5::ruby::Throttle::getUtilization ( ) const
inline

◆ init()

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

Referenced by regStats().

◆ name()

std::string gem5::ruby::Throttle::name ( )
inline

Definition at line 66 of file Throttle.hh.

References gem5::csprintf(), and m_switch_id.

◆ operateVnet()

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

◆ operator=()

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

◆ print()

void gem5::ruby::Throttle::print ( std::ostream &  out) const
virtual

Implements gem5::ruby::Consumer.

Definition at line 252 of file Throttle.cc.

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

Referenced by gem5::ruby::operator<<().

◆ regStats()

void gem5::ruby::Throttle::regStats ( )

◆ wakeup()

void gem5::ruby::Throttle::wakeup ( )
virtual

Member Data Documentation

◆ m_endpoint_bandwidth

int gem5::ruby::Throttle::m_endpoint_bandwidth
private

Definition at line 111 of file Throttle.hh.

Referenced by getLinkBandwidth(), and Throttle().

◆ m_in

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

Definition at line 99 of file Throttle.hh.

Referenced by addLinks(), and wakeup().

◆ m_link_bandwidth_multiplier

int gem5::ruby::Throttle::m_link_bandwidth_multiplier
private

Definition at line 108 of file Throttle.hh.

Referenced by getLinkBandwidth(), and Throttle().

◆ m_link_latency

Cycles gem5::ruby::Throttle::m_link_latency
private

Definition at line 109 of file Throttle.hh.

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

◆ m_link_utilization_proxy

double gem5::ruby::Throttle::m_link_utilization_proxy
private

Definition at line 114 of file Throttle.hh.

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

◆ m_node

NodeID gem5::ruby::Throttle::m_node
private

Definition at line 106 of file Throttle.hh.

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

◆ m_out

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

Definition at line 100 of file Throttle.hh.

Referenced by addLinks(), and wakeup().

◆ m_ruby_system

RubySystem* gem5::ruby::Throttle::m_ruby_system
private

Definition at line 112 of file Throttle.hh.

Referenced by collateStats(), and operateVnet().

◆ m_switch

Switch* gem5::ruby::Throttle::m_switch
private

Definition at line 105 of file Throttle.hh.

Referenced by operateVnet().

◆ m_switch_id

const int gem5::ruby::Throttle::m_switch_id
private

Definition at line 104 of file Throttle.hh.

Referenced by addLinks(), and name().

◆ m_units_remaining

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

Definition at line 102 of file Throttle.hh.

Referenced by addLinks(), and operateVnet().

◆ m_vnets

unsigned int gem5::ruby::Throttle::m_vnets
private

Definition at line 101 of file Throttle.hh.

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

◆ m_wakeups_wo_switch

int gem5::ruby::Throttle::m_wakeups_wo_switch
private

Definition at line 110 of file Throttle.hh.

Referenced by Throttle(), and wakeup().

◆ throttleStats

gem5::ruby::Throttle::ThrottleStats gem5::ruby::Throttle::throttleStats
private

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

Generated on Tue Sep 21 2021 12:32:10 for gem5 by doxygen 1.8.17