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
PerfectSwitch Class Reference

#include <PerfectSwitch.hh>

Inheritance diagram for PerfectSwitch:
Consumer

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 Consumer
 Consumer (ClockedObject *_em)
 
virtual ~Consumer ()
 
bool alreadyScheduled (Tick time)
 
void insertScheduledWakeupTime (Tick time)
 
void scheduleEventAbsolute (Tick timeAbs)
 

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
 
SimpleNetworkm_network_ptr
 
std::vector< int > m_pending_message_count
 

Additional Inherited Members

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

Detailed Description

Definition at line 59 of file PerfectSwitch.hh.

Constructor & Destructor Documentation

PerfectSwitch::PerfectSwitch ( SwitchID  sid,
Switch sw,
uint32_t  virt_nets 
)

Definition at line 52 of file PerfectSwitch.cc.

References m_round_robin_start, m_virtual_networks, and m_wakeups_wo_switch.

PerfectSwitch::~PerfectSwitch ( )

Definition at line 100 of file PerfectSwitch.cc.

PerfectSwitch::PerfectSwitch ( const PerfectSwitch obj)
private

Member Function Documentation

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

Definition at line 71 of file PerfectSwitch.cc.

References ArmISA::i, and m_in.

Referenced by Switch::addInPort().

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

Definition at line 316 of file PerfectSwitch.cc.

Referenced by Switch::resetStats().

void PerfectSwitch::collateStats ( )

Definition at line 320 of file PerfectSwitch.cc.

Referenced by Switch::collateStats().

int PerfectSwitch::getInLinks ( ) const
inline

Definition at line 73 of file PerfectSwitch.hh.

References m_in.

int PerfectSwitch::getOutLinks ( ) const
inline

Definition at line 74 of file PerfectSwitch.hh.

References m_out.

void PerfectSwitch::init ( SimpleNetwork network_ptr)

Definition at line 61 of file PerfectSwitch.cc.

References ArmISA::i, m_network_ptr, m_pending_message_count, and m_virtual_networks.

Referenced by Switch::init().

std::string PerfectSwitch::name ( )
inline

Definition at line 65 of file PerfectSwitch.hh.

References csprintf(), and m_switch_id.

void PerfectSwitch::operateMessageBuffer ( MessageBuffer b,
int  incoming,
int  vnet 
)
private
void PerfectSwitch::operateVnet ( int  vnet)
private
PerfectSwitch& PerfectSwitch::operator= ( const PerfectSwitch obj)
private
void PerfectSwitch::print ( std::ostream &  out) const
virtual

Implements Consumer.

Definition at line 326 of file PerfectSwitch.cc.

References m_switch_id.

Referenced by operator<<().

void PerfectSwitch::storeEventInfo ( int  info)
virtual

Reimplemented from Consumer.

Definition at line 310 of file PerfectSwitch.cc.

References m_pending_message_count.

void PerfectSwitch::wakeup ( )
virtual

Implements Consumer.

Definition at line 285 of file PerfectSwitch.cc.

References m_virtual_networks, m_wakeups_wo_switch, operateVnet(), and PRIORITY_SWITCH_LIMIT.

Member Data Documentation

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

Definition at line 95 of file PerfectSwitch.hh.

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

std::vector<LinkOrder> PerfectSwitch::m_link_order
private

Definition at line 99 of file PerfectSwitch.hh.

Referenced by addOutPort(), and operateMessageBuffer().

SimpleNetwork* PerfectSwitch::m_network_ptr
private

Definition at line 105 of file PerfectSwitch.hh.

Referenced by init(), and operateMessageBuffer().

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

Definition at line 96 of file PerfectSwitch.hh.

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

std::vector<int> PerfectSwitch::m_pending_message_count
private

Definition at line 106 of file PerfectSwitch.hh.

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

int PerfectSwitch::m_round_robin_start
private

Definition at line 102 of file PerfectSwitch.hh.

Referenced by operateVnet(), and PerfectSwitch().

std::vector<NetDest> PerfectSwitch::m_routing_table
private

Definition at line 98 of file PerfectSwitch.hh.

Referenced by addOutPort(), and operateMessageBuffer().

Switch* const PerfectSwitch::m_switch
private

Definition at line 92 of file PerfectSwitch.hh.

Referenced by operateMessageBuffer().

const SwitchID PerfectSwitch::m_switch_id
private

Definition at line 91 of file PerfectSwitch.hh.

Referenced by name(), and print().

uint32_t PerfectSwitch::m_virtual_networks
private

Definition at line 101 of file PerfectSwitch.hh.

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

int PerfectSwitch::m_wakeups_wo_switch
private

Definition at line 103 of file PerfectSwitch.hh.

Referenced by PerfectSwitch(), and wakeup().


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

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