gem5  v21.1.0.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gem5::ruby::PerfectSwitch Class Reference

#include <PerfectSwitch.hh>

Inheritance diagram for gem5::ruby::PerfectSwitch:

Public Member Functions

 PerfectSwitch (SwitchID sid, Switch *, uint32_t)
 ~PerfectSwitch ()
std::string name ()
void init (SimpleNetwork *)
void addInPort (const std::vector< MessageBuffer * > &in)
void addOutPort (const std::vector< MessageBuffer * > &out, const NetDest &routing_table_entry)
int getInLinks () const
int getOutLinks () const
void wakeup ()
void storeEventInfo (int info)
void clearStats ()
void collateStats ()
void print (std::ostream &out) const
- Public Member Functions inherited from gem5::ruby::Consumer
 Consumer (ClockedObject *_em)
virtual ~Consumer ()
bool alreadyScheduled (Tick time)
ClockedObjectgetObject ()
void scheduleEventAbsolute (Tick timeAbs)
void scheduleEvent (Cycles timeDelta)

Private Member Functions

 PerfectSwitch (const PerfectSwitch &obj)
PerfectSwitchoperator= (const PerfectSwitch &obj)
void operateVnet (int vnet)
void operateMessageBuffer (MessageBuffer *b, int incoming, int vnet)

Private Attributes

const SwitchID m_switch_id
Switch *const m_switch
std::vector< std::vector< MessageBuffer * > > m_in
std::vector< std::vector< MessageBuffer * > > m_out
std::vector< NetDestm_routing_table
std::vector< LinkOrderm_link_order
uint32_t m_virtual_networks
int m_round_robin_start
int m_wakeups_wo_switch
std::vector< int > m_pending_message_count

Detailed Description

Definition at line 65 of file PerfectSwitch.hh.

Constructor & Destructor Documentation

◆ PerfectSwitch() [1/2]

gem5::ruby::PerfectSwitch::PerfectSwitch ( SwitchID  sid,
Switch sw,
uint32_t  virt_nets 

Definition at line 57 of file

References m_round_robin_start, m_virtual_networks, and m_wakeups_wo_switch.

◆ ~PerfectSwitch()

gem5::ruby::PerfectSwitch::~PerfectSwitch ( )

Definition at line 105 of file

◆ PerfectSwitch() [2/2]

gem5::ruby::PerfectSwitch::PerfectSwitch ( const PerfectSwitch obj)

Member Function Documentation

◆ addInPort()

void gem5::ruby::PerfectSwitch::addInPort ( const std::vector< MessageBuffer * > &  in)

Definition at line 76 of file

References gem5::ArmISA::i, and m_in.

Referenced by gem5::ruby::Switch::addInPort().

◆ addOutPort()

void gem5::ruby::PerfectSwitch::addOutPort ( const std::vector< MessageBuffer * > &  out,
const NetDest routing_table_entry 

Definition at line 91 of file

References gem5::MipsISA::l, m_link_order, m_out, and m_routing_table.

Referenced by gem5::ruby::Switch::addOutPort().

◆ clearStats()

void gem5::ruby::PerfectSwitch::clearStats ( )

Definition at line 321 of file

Referenced by gem5::ruby::Switch::resetStats().

◆ collateStats()

void gem5::ruby::PerfectSwitch::collateStats ( )

Definition at line 325 of file

Referenced by gem5::ruby::Switch::collateStats().

◆ getInLinks()

int gem5::ruby::PerfectSwitch::getInLinks ( ) const

Definition at line 79 of file PerfectSwitch.hh.

References m_in.

◆ getOutLinks()

int gem5::ruby::PerfectSwitch::getOutLinks ( ) const

Definition at line 80 of file PerfectSwitch.hh.

References m_out.

◆ init()

void gem5::ruby::PerfectSwitch::init ( SimpleNetwork network_ptr)

◆ name()

std::string gem5::ruby::PerfectSwitch::name ( )

Definition at line 71 of file PerfectSwitch.hh.

References gem5::csprintf(), and m_switch_id.

◆ operateMessageBuffer()

void gem5::ruby::PerfectSwitch::operateMessageBuffer ( MessageBuffer b,
int  incoming,
int  vnet 

◆ operateVnet()

void gem5::ruby::PerfectSwitch::operateVnet ( int  vnet)

Definition at line 110 of file

References m_in, m_pending_message_count, m_round_robin_start, and operateMessageBuffer().

Referenced by wakeup().

◆ operator=()

PerfectSwitch& gem5::ruby::PerfectSwitch::operator= ( const PerfectSwitch obj)

◆ print()

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

Implements gem5::ruby::Consumer.

Definition at line 331 of file

References m_switch_id.

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

◆ storeEventInfo()

void gem5::ruby::PerfectSwitch::storeEventInfo ( int  info)

Reimplemented from gem5::ruby::Consumer.

Definition at line 315 of file

References m_pending_message_count.

◆ wakeup()

void gem5::ruby::PerfectSwitch::wakeup ( )

Member Data Documentation

◆ m_in

std::vector<std::vector<MessageBuffer*> > gem5::ruby::PerfectSwitch::m_in

Definition at line 101 of file PerfectSwitch.hh.

Referenced by addInPort(), getInLinks(), and operateVnet().

◆ m_link_order

std::vector<LinkOrder> gem5::ruby::PerfectSwitch::m_link_order

Definition at line 105 of file PerfectSwitch.hh.

Referenced by addOutPort(), and operateMessageBuffer().

◆ m_network_ptr

SimpleNetwork* gem5::ruby::PerfectSwitch::m_network_ptr

Definition at line 111 of file PerfectSwitch.hh.

Referenced by init(), and operateMessageBuffer().

◆ m_out

std::vector<std::vector<MessageBuffer*> > gem5::ruby::PerfectSwitch::m_out

Definition at line 102 of file PerfectSwitch.hh.

Referenced by addOutPort(), getOutLinks(), and operateMessageBuffer().

◆ m_pending_message_count

std::vector<int> gem5::ruby::PerfectSwitch::m_pending_message_count

Definition at line 112 of file PerfectSwitch.hh.

Referenced by init(), operateMessageBuffer(), operateVnet(), and storeEventInfo().

◆ m_round_robin_start

int gem5::ruby::PerfectSwitch::m_round_robin_start

Definition at line 108 of file PerfectSwitch.hh.

Referenced by operateVnet(), and PerfectSwitch().

◆ m_routing_table

std::vector<NetDest> gem5::ruby::PerfectSwitch::m_routing_table

Definition at line 104 of file PerfectSwitch.hh.

Referenced by addOutPort(), and operateMessageBuffer().

◆ m_switch

Switch* const gem5::ruby::PerfectSwitch::m_switch

Definition at line 98 of file PerfectSwitch.hh.

Referenced by operateMessageBuffer().

◆ m_switch_id

const SwitchID gem5::ruby::PerfectSwitch::m_switch_id

Definition at line 97 of file PerfectSwitch.hh.

Referenced by name(), and print().

◆ m_virtual_networks

uint32_t gem5::ruby::PerfectSwitch::m_virtual_networks

Definition at line 107 of file PerfectSwitch.hh.

Referenced by init(), operateMessageBuffer(), PerfectSwitch(), and wakeup().

◆ m_wakeups_wo_switch

int gem5::ruby::PerfectSwitch::m_wakeups_wo_switch

Definition at line 109 of file PerfectSwitch.hh.

Referenced by PerfectSwitch(), and wakeup().

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

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