gem5 v24.0.0.0
Loading...
Searching...
No Matches
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 (int sID, RubySystem *rs, NodeID node, Cycles link_latency, const std::vector< int > &vnet_channels, const std::vector< int > &vnet_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::FormulagetUtilization () const
 
const statistics::VectorgetMsgCount (unsigned int type) const
 
int getLinkBandwidth (int vnet) const
 
int getTotalLinkBandwidth () const
 
int getChannelCnt (int vnet) const
 
Cycles getLatency () const
 
void print (std::ostream &out) const
 
- Public Member Functions inherited from gem5::ruby::Consumer
 Consumer (ClockedObject *em, Event::Priority ev_prio=Event::Default_Pri)
 
virtual ~Consumer ()
 
virtual void storeEventInfo (int info)
 
bool alreadyScheduled (Tick time)
 
ClockedObjectgetObject ()
 
void scheduleEventAbsolute (Tick timeAbs)
 
void scheduleEvent (Cycles timeDelta)
 

Private Member Functions

 Throttle (int sID, RubySystem *rs, NodeID node, Cycles link_latency, int endpoint_bandwidth, Switch *em)
 
void init (NodeID node, Cycles link_latency, int link_bandwidth_multiplier, int endpoint_bandwidth)
 
void operateVnet (int vnet, int channel, int &total_bw_remaining, bool &bw_saturated, bool &output_blocked, 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< std::vector< int > > m_units_remaining
 
const int m_switch_id
 
Switchm_switch
 
NodeID m_node
 
bool m_physical_vnets
 
std::vector< int > m_link_bandwidth_multiplier
 
std::vector< int > m_vnet_channels
 
Cycles m_link_latency
 
int m_wakeups_wo_switch
 
int m_endpoint_bandwidth
 
RubySystemm_ruby_system
 
gem5::ruby::Throttle::ThrottleStats throttleStats
 

Detailed Description

Definition at line 70 of file Throttle.hh.

Constructor & Destructor Documentation

◆ Throttle() [1/4]

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

Definition at line 68 of file Throttle.cc.

References m_endpoint_bandwidth, m_link_latency, m_vnets, and m_wakeups_wo_switch.

◆ Throttle() [2/4]

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

Definition at line 83 of file Throttle.cc.

References gem5_assert, and m_link_bandwidth_multiplier.

◆ Throttle() [3/4]

gem5::ruby::Throttle::Throttle ( int sID,
RubySystem * rs,
NodeID node,
Cycles link_latency,
const std::vector< int > & vnet_channels,
const std::vector< int > & vnet_bandwidth_multiplier,
int endpoint_bandwidth,
Switch * em )

◆ ~Throttle()

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

Definition at line 83 of file Throttle.hh.

◆ Throttle() [4/4]

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 )

◆ getChannelCnt()

int gem5::ruby::Throttle::getChannelCnt ( int vnet) const

Definition at line 159 of file Throttle.cc.

References m_physical_vnets, and m_vnet_channels.

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

◆ getLatency()

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

Definition at line 104 of file Throttle.hh.

References m_link_latency.

◆ getLinkBandwidth()

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

◆ getMsgCount()

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

◆ getTotalLinkBandwidth()

int gem5::ruby::Throttle::getTotalLinkBandwidth ( ) const

Definition at line 148 of file Throttle.cc.

References getChannelCnt(), getLinkBandwidth(), gem5::ArmISA::i, m_physical_vnets, m_vnets, and gem5::RiscvISA::sum.

Referenced by print(), and wakeup().

◆ getUtilization()

const statistics::Formula & 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

◆ name()

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

Definition at line 85 of file Throttle.hh.

References gem5::csprintf(), and m_switch_id.

◆ operateVnet()

◆ operator=()

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

◆ print()

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

◆ wakeup()

Member Data Documentation

◆ m_endpoint_bandwidth

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

Definition at line 133 of file Throttle.hh.

Referenced by getLinkBandwidth(), and Throttle().

◆ m_in

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

Definition at line 119 of file Throttle.hh.

Referenced by addLinks(), and wakeup().

◆ m_link_bandwidth_multiplier

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

Definition at line 129 of file Throttle.hh.

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

◆ m_link_latency

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

Definition at line 131 of file Throttle.hh.

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

◆ m_node

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

Definition at line 126 of file Throttle.hh.

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

◆ m_out

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

Definition at line 120 of file Throttle.hh.

Referenced by addLinks(), and wakeup().

◆ m_physical_vnets

bool gem5::ruby::Throttle::m_physical_vnets
private

◆ m_ruby_system

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

Definition at line 134 of file Throttle.hh.

Referenced by operateVnet().

◆ m_switch

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

Definition at line 125 of file Throttle.hh.

Referenced by operateVnet().

◆ m_switch_id

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

Definition at line 124 of file Throttle.hh.

Referenced by addLinks(), and name().

◆ m_units_remaining

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

Definition at line 122 of file Throttle.hh.

Referenced by addLinks(), and operateVnet().

◆ m_vnet_channels

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

Definition at line 130 of file Throttle.hh.

Referenced by getChannelCnt(), and Throttle().

◆ m_vnets

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

Definition at line 121 of file Throttle.hh.

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

◆ m_wakeups_wo_switch

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

Definition at line 132 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 Jun 18 2024 16:24:22 for gem5 by doxygen 1.11.0