gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
GarnetNetwork Class Reference

#include <GarnetNetwork.hh>

Inheritance diagram for GarnetNetwork:
Network ClockedObject SimObject Clocked EventManager Serializable Drainable

Public Types

typedef GarnetNetworkParams Params
 
- Public Types inherited from Network
typedef RubyNetworkParams Params
 
- Public Types inherited from ClockedObject
typedef ClockedObjectParams Params
 Parameters of ClockedObject. More...
 
- Public Types inherited from SimObject
typedef SimObjectParams Params
 

Public Member Functions

 GarnetNetwork (const Params *p)
 
 ~GarnetNetwork ()
 
void init ()
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
int getNumRows () const
 
int getNumCols ()
 
uint32_t getNiFlitSize () const
 
uint32_t getVCsPerVnet () const
 
uint32_t getBuffersPerDataVC ()
 
uint32_t getBuffersPerCtrlVC ()
 
int getRoutingAlgorithm () const
 
bool isFaultModelEnabled () const
 
bool isVNetOrdered (int vnet) const
 
VNET_type get_vnet_type (int vc)
 
int getNumRouters ()
 
int get_router_id (int ni)
 
void makeExtOutLink (SwitchID src, NodeID dest, BasicLink *link, const NetDest &routing_table_entry)
 
void makeExtInLink (NodeID src, SwitchID dest, BasicLink *link, const NetDest &routing_table_entry)
 
void makeInternalLink (SwitchID src, SwitchID dest, BasicLink *link, const NetDest &routing_table_entry, PortDirection src_outport_dirn, PortDirection dest_inport_dirn)
 
uint32_t functionalWrite (Packet *pkt)
 Function for performing a functional write. More...
 
void collateStats ()
 
void regStats ()
 Register statistics for this object. More...
 
void print (std::ostream &out) const
 
void increment_injected_packets (int vnet)
 
void increment_received_packets (int vnet)
 
void increment_packet_network_latency (Cycles latency, int vnet)
 
void increment_packet_queueing_latency (Cycles latency, int vnet)
 
void increment_injected_flits (int vnet)
 
void increment_received_flits (int vnet)
 
void increment_flit_network_latency (Cycles latency, int vnet)
 
void increment_flit_queueing_latency (Cycles latency, int vnet)
 
void increment_total_hops (int hops)
 
- Public Member Functions inherited from Network
 Network (const Params *p)
 
const Paramsparams () const
 
virtual ~Network ()
 
int getNumNodes () const
 
void setToNetQueue (NodeID id, bool ordered, int netNumber, std::string vnet_type, MessageBuffer *b)
 
virtual void setFromNetQueue (NodeID id, bool ordered, int netNumber, std::string vnet_type, MessageBuffer *b)
 
virtual void checkNetworkAllocation (NodeID id, bool ordered, int network_num, std::string vnet_type)
 
virtual bool functionalRead (Packet *pkt)
 
- Public Member Functions inherited from ClockedObject
 ClockedObject (const ClockedObjectParams *p)
 
const Paramsparams () const
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
Enums::PwrState pwrState () const
 
std::string pwrStateName () const
 
std::vector< double > pwrStateWeights () const
 Returns the percentage residency for each power state. More...
 
void computeStats ()
 Record stats values like state residency by computing the time difference from previous update. More...
 
void pwrState (Enums::PwrState)
 
void regStats () override
 Register statistics for this object. More...
 
- Public Member Functions inherited from SimObject
const Paramsparams () const
 
 SimObject (const Params *_params)
 
virtual ~SimObject ()
 
virtual const std::string name () const
 
virtual void loadState (CheckpointIn &cp)
 loadState() is called on each SimObject when restoring from a checkpoint. More...
 
virtual void initState ()
 initState() is called on each SimObject when not restoring from a checkpoint. More...
 
virtual void resetStats ()
 Reset statistics associated with this object. More...
 
virtual void regProbePoints ()
 Register probe points for this object. More...
 
virtual void regProbeListeners ()
 Register probe listeners for this object. More...
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object. More...
 
virtual void startup ()
 startup() is the final initialization call before simulation. More...
 
DrainState drain () override
 Provide a default implementation of the drain interface for objects that don't need draining. More...
 
virtual void memWriteback ()
 Write back dirty buffers to memory using functional writes. More...
 
virtual void memInvalidate ()
 Invalidate the contents of memory buffers. More...
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from EventManager
 EventManager (EventManager &em)
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
EventQueueeventQueue () const
 
void schedule (Event &event, Tick when)
 
void deschedule (Event &event)
 
void reschedule (Event &event, Tick when, bool always=false)
 
void schedule (Event *event, Tick when)
 
void deschedule (Event *event)
 
void reschedule (Event *event, Tick when, bool always=false)
 
void wakeupEventQueue (Tick when=(Tick)-1)
 
void setCurTick (Tick newVal)
 
- Public Member Functions inherited from Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 
- Public Member Functions inherited from Drainable
DrainState drainState () const
 Return the current drain state of an object. More...
 
virtual void notifyFork ()
 Notify a child process of a fork. More...
 
- Public Member Functions inherited from Clocked
void updateClockPeriod () const
 Update the tick to the current tick. More...
 
Tick clockEdge (Cycles cycles=Cycles(0)) const
 Determine the tick when a cycle begins, by default the current one, but the argument also enables the caller to determine a future cycle. More...
 
Cycles curCycle () const
 Determine the current cycle, corresponding to a tick aligned to a clock edge. More...
 
Tick nextCycle () const
 Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future. More...
 
uint64_t frequency () const
 
Tick clockPeriod () const
 
double voltage () const
 
Cycles ticksToCycles (Tick t) const
 
Tick cyclesToTicks (Cycles c) const
 

Public Attributes

FaultModelfault_model
 

Protected Attributes

int m_num_rows
 
int m_num_cols
 
uint32_t m_ni_flit_size
 
uint32_t m_vcs_per_vnet
 
uint32_t m_buffers_per_ctrl_vc
 
uint32_t m_buffers_per_data_vc
 
int m_routing_algorithm
 
bool m_enable_fault_model
 
Stats::Vector m_packets_received
 
Stats::Vector m_packets_injected
 
Stats::Vector m_packet_network_latency
 
Stats::Vector m_packet_queueing_latency
 
Stats::Formula m_avg_packet_vnet_latency
 
Stats::Formula m_avg_packet_vqueue_latency
 
Stats::Formula m_avg_packet_network_latency
 
Stats::Formula m_avg_packet_queueing_latency
 
Stats::Formula m_avg_packet_latency
 
Stats::Vector m_flits_received
 
Stats::Vector m_flits_injected
 
Stats::Vector m_flit_network_latency
 
Stats::Vector m_flit_queueing_latency
 
Stats::Formula m_avg_flit_vnet_latency
 
Stats::Formula m_avg_flit_vqueue_latency
 
Stats::Formula m_avg_flit_network_latency
 
Stats::Formula m_avg_flit_queueing_latency
 
Stats::Formula m_avg_flit_latency
 
Stats::Scalar m_total_ext_in_link_utilization
 
Stats::Scalar m_total_ext_out_link_utilization
 
Stats::Scalar m_total_int_link_utilization
 
Stats::Scalar m_average_link_utilization
 
Stats::Vector m_average_vc_load
 
Stats::Scalar m_total_hops
 
Stats::Formula m_avg_hops
 
- Protected Attributes inherited from Network
uint32_t m_nodes
 
std::vector< std::string > m_vnet_type_names
 
Topologym_topology_ptr
 
std::vector< std::vector
< MessageBuffer * > > 
m_toNetQueues
 
std::vector< std::vector
< MessageBuffer * > > 
m_fromNetQueues
 
std::vector< bool > m_ordered
 
- Protected Attributes inherited from ClockedObject
Enums::PwrState _currPwrState
 To keep track of the current power state. More...
 
Tick prvEvalTick
 
Stats::Scalar numPwrStateTransitions
 
Stats::Distribution pwrStateClkGateDist
 
Stats::Vector pwrStateResidencyTicks
 
- Protected Attributes inherited from SimObject
const SimObjectParams * _params
 Cached copy of the object parameters. More...
 
- Protected Attributes inherited from EventManager
EventQueueeventq
 A pointer to this object's event queue. More...
 

Private Member Functions

 GarnetNetwork (const GarnetNetwork &obj)
 
GarnetNetworkoperator= (const GarnetNetwork &obj)
 

Private Attributes

std::vector< VNET_typem_vnet_type
 
std::vector< Router * > m_routers
 
std::vector< NetworkLink * > m_networklinks
 
std::vector< CreditLink * > m_creditlinks
 
std::vector< NetworkInterface * > m_nis
 

Additional Inherited Members

- Static Public Member Functions inherited from Network
static uint32_t getNumberOfVirtualNetworks ()
 
static uint32_t MessageSizeType_to_int (MessageSizeType size_type)
 
- Static Public Member Functions inherited from SimObject
static void serializeAll (CheckpointOut &cp)
 Serialize all SimObjects in the system. More...
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it. More...
 
- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Get the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 
static void unserializeGlobals (CheckpointIn &cp)
 
- Static Public Attributes inherited from Serializable
static int ckptCount = 0
 
static int ckptMaxCount = 0
 
static int ckptPrevCount = -1
 
- Protected Member Functions inherited from Network
 Network (const Network &obj)
 
Networkoperator= (const Network &obj)
 
- Protected Member Functions inherited from Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain. More...
 
void signalDrainDone () const
 Signal that an object is drained. More...
 
- Protected Member Functions inherited from Clocked
 Clocked (ClockDomain &clk_domain)
 Create a clocked object and set the clock domain based on the parameters. More...
 
 Clocked (Clocked &)=delete
 
Clockedoperator= (Clocked &)=delete
 
virtual ~Clocked ()
 Virtual destructor due to inheritance. More...
 
void resetClock () const
 Reset the object's clock using the current global tick value. More...
 
- Static Protected Attributes inherited from Network
static uint32_t m_virtual_networks
 
static uint32_t m_control_msg_size
 
static uint32_t m_data_msg_size
 

Detailed Description

Definition at line 52 of file GarnetNetwork.hh.

Member Typedef Documentation

typedef GarnetNetworkParams GarnetNetwork::Params

Definition at line 55 of file GarnetNetwork.hh.

Constructor & Destructor Documentation

GarnetNetwork::GarnetNetwork ( const Params p)
GarnetNetwork::~GarnetNetwork ( )
GarnetNetwork::GarnetNetwork ( const GarnetNetwork obj)
private

Member Function Documentation

void GarnetNetwork::collateStats ( )
virtual
uint32_t GarnetNetwork::functionalWrite ( Packet pkt)
virtual

Function for performing a functional write.

The return value indicates the number of messages that were written.

Reimplemented from Network.

Definition at line 443 of file GarnetNetwork.cc.

References ArmISA::i, m_networklinks, m_nis, and m_routers.

int GarnetNetwork::get_router_id ( int  ni)

Definition at line 249 of file GarnetNetwork.cc.

References m_nis, and PowerISA::ni.

Referenced by NetworkInterface::flitisizeMessage().

VNET_type GarnetNetwork::get_vnet_type ( int  vc)
inline

Definition at line 81 of file GarnetNetwork.hh.

References getVCsPerVnet(), and m_vnet_type.

Referenced by OutVcState::OutVcState().

uint32_t GarnetNetwork::getBuffersPerCtrlVC ( )
inline

Definition at line 71 of file GarnetNetwork.hh.

References m_buffers_per_ctrl_vc.

Referenced by init(), and OutVcState::OutVcState().

uint32_t GarnetNetwork::getBuffersPerDataVC ( )
inline

Definition at line 70 of file GarnetNetwork.hh.

References m_buffers_per_data_vc.

Referenced by init(), and OutVcState::OutVcState().

uint32_t GarnetNetwork::getNiFlitSize ( ) const
inline

Definition at line 68 of file GarnetNetwork.hh.

References m_ni_flit_size.

Referenced by NetworkInterface::flitisizeMessage().

int GarnetNetwork::getNumCols ( )
inline

Definition at line 65 of file GarnetNetwork.hh.

References m_num_cols.

Referenced by RoutingUnit::outportComputeXY().

int GarnetNetwork::getNumRouters ( )

Definition at line 242 of file GarnetNetwork.cc.

References m_routers.

int GarnetNetwork::getNumRows ( ) const
inline

Definition at line 64 of file GarnetNetwork.hh.

References m_num_rows.

Referenced by init(), and RoutingUnit::outportComputeXY().

int GarnetNetwork::getRoutingAlgorithm ( ) const
inline

Definition at line 72 of file GarnetNetwork.hh.

References m_routing_algorithm.

Referenced by RoutingUnit::outportCompute().

uint32_t GarnetNetwork::getVCsPerVnet ( ) const
inline

Definition at line 69 of file GarnetNetwork.hh.

References m_vcs_per_vnet.

Referenced by get_vnet_type().

void GarnetNetwork::increment_flit_network_latency ( Cycles  latency,
int  vnet 
)
inline

Definition at line 129 of file GarnetNetwork.hh.

References m_flit_network_latency.

Referenced by NetworkInterface::incrementStats().

void GarnetNetwork::increment_flit_queueing_latency ( Cycles  latency,
int  vnet 
)
inline

Definition at line 135 of file GarnetNetwork.hh.

References m_flit_queueing_latency.

Referenced by NetworkInterface::incrementStats().

void GarnetNetwork::increment_injected_flits ( int  vnet)
inline

Definition at line 125 of file GarnetNetwork.hh.

References m_flits_injected.

Referenced by NetworkInterface::flitisizeMessage().

void GarnetNetwork::increment_injected_packets ( int  vnet)
inline

Definition at line 110 of file GarnetNetwork.hh.

References m_packets_injected.

Referenced by NetworkInterface::flitisizeMessage().

void GarnetNetwork::increment_packet_network_latency ( Cycles  latency,
int  vnet 
)
inline

Definition at line 114 of file GarnetNetwork.hh.

References m_packet_network_latency.

Referenced by NetworkInterface::incrementStats().

void GarnetNetwork::increment_packet_queueing_latency ( Cycles  latency,
int  vnet 
)
inline

Definition at line 120 of file GarnetNetwork.hh.

References m_packet_queueing_latency.

Referenced by NetworkInterface::incrementStats().

void GarnetNetwork::increment_received_flits ( int  vnet)
inline

Definition at line 126 of file GarnetNetwork.hh.

References m_flits_received.

Referenced by NetworkInterface::incrementStats().

void GarnetNetwork::increment_received_packets ( int  vnet)
inline

Definition at line 111 of file GarnetNetwork.hh.

References m_packets_received.

Referenced by NetworkInterface::incrementStats().

void GarnetNetwork::increment_total_hops ( int  hops)
inline

Definition at line 141 of file GarnetNetwork.hh.

References m_total_hops.

Referenced by NetworkInterface::incrementStats().

void GarnetNetwork::init ( )
virtual
bool GarnetNetwork::isFaultModelEnabled ( ) const
inline

Definition at line 74 of file GarnetNetwork.hh.

References m_enable_fault_model.

Referenced by init().

bool GarnetNetwork::isVNetOrdered ( int  vnet) const
inline

Definition at line 79 of file GarnetNetwork.hh.

References Network::m_ordered.

Referenced by NetworkInterface::scheduleOutputLink().

void GarnetNetwork::makeExtInLink ( NodeID  src,
SwitchID  dest,
BasicLink link,
const NetDest routing_table_entry 
)
virtual
void GarnetNetwork::makeExtOutLink ( SwitchID  src,
NodeID  dest,
BasicLink link,
const NetDest routing_table_entry 
)
virtual
void GarnetNetwork::makeInternalLink ( SwitchID  src,
SwitchID  dest,
BasicLink link,
const NetDest routing_table_entry,
PortDirection  src_outport_dirn,
PortDirection  dest_inport_dirn 
)
virtual
GarnetNetwork& GarnetNetwork::operator= ( const GarnetNetwork obj)
private
void GarnetNetwork::print ( std::ostream &  out) const
virtual

Implements Network.

Definition at line 431 of file GarnetNetwork.cc.

Referenced by operator<<().

void GarnetNetwork::regStats ( )
virtual

Member Data Documentation

FaultModel* GarnetNetwork::fault_model
Stats::Scalar GarnetNetwork::m_average_link_utilization
protected

Definition at line 183 of file GarnetNetwork.hh.

Referenced by collateStats(), and regStats().

Stats::Vector GarnetNetwork::m_average_vc_load
protected

Definition at line 184 of file GarnetNetwork.hh.

Referenced by collateStats(), and regStats().

Stats::Formula GarnetNetwork::m_avg_flit_latency
protected

Definition at line 178 of file GarnetNetwork.hh.

Referenced by regStats().

Stats::Formula GarnetNetwork::m_avg_flit_network_latency
protected

Definition at line 176 of file GarnetNetwork.hh.

Referenced by regStats().

Stats::Formula GarnetNetwork::m_avg_flit_queueing_latency
protected

Definition at line 177 of file GarnetNetwork.hh.

Referenced by regStats().

Stats::Formula GarnetNetwork::m_avg_flit_vnet_latency
protected

Definition at line 174 of file GarnetNetwork.hh.

Referenced by regStats().

Stats::Formula GarnetNetwork::m_avg_flit_vqueue_latency
protected

Definition at line 175 of file GarnetNetwork.hh.

Referenced by regStats().

Stats::Formula GarnetNetwork::m_avg_hops
protected

Definition at line 187 of file GarnetNetwork.hh.

Referenced by regStats().

Stats::Formula GarnetNetwork::m_avg_packet_latency
protected

Definition at line 167 of file GarnetNetwork.hh.

Referenced by regStats().

Stats::Formula GarnetNetwork::m_avg_packet_network_latency
protected

Definition at line 165 of file GarnetNetwork.hh.

Referenced by regStats().

Stats::Formula GarnetNetwork::m_avg_packet_queueing_latency
protected

Definition at line 166 of file GarnetNetwork.hh.

Referenced by regStats().

Stats::Formula GarnetNetwork::m_avg_packet_vnet_latency
protected

Definition at line 163 of file GarnetNetwork.hh.

Referenced by regStats().

Stats::Formula GarnetNetwork::m_avg_packet_vqueue_latency
protected

Definition at line 164 of file GarnetNetwork.hh.

Referenced by regStats().

uint32_t GarnetNetwork::m_buffers_per_ctrl_vc
protected

Definition at line 152 of file GarnetNetwork.hh.

Referenced by GarnetNetwork(), and getBuffersPerCtrlVC().

uint32_t GarnetNetwork::m_buffers_per_data_vc
protected

Definition at line 153 of file GarnetNetwork.hh.

Referenced by GarnetNetwork(), and getBuffersPerDataVC().

std::vector<CreditLink *> GarnetNetwork::m_creditlinks
private

Definition at line 196 of file GarnetNetwork.hh.

Referenced by makeExtInLink(), makeExtOutLink(), makeInternalLink(), and ~GarnetNetwork().

bool GarnetNetwork::m_enable_fault_model
protected

Definition at line 155 of file GarnetNetwork.hh.

Referenced by GarnetNetwork(), and isFaultModelEnabled().

Stats::Vector GarnetNetwork::m_flit_network_latency
protected

Definition at line 171 of file GarnetNetwork.hh.

Referenced by increment_flit_network_latency(), and regStats().

Stats::Vector GarnetNetwork::m_flit_queueing_latency
protected

Definition at line 172 of file GarnetNetwork.hh.

Referenced by increment_flit_queueing_latency(), and regStats().

Stats::Vector GarnetNetwork::m_flits_injected
protected

Definition at line 170 of file GarnetNetwork.hh.

Referenced by increment_injected_flits(), and regStats().

Stats::Vector GarnetNetwork::m_flits_received
protected

Definition at line 169 of file GarnetNetwork.hh.

Referenced by increment_received_flits(), and regStats().

std::vector<NetworkLink *> GarnetNetwork::m_networklinks
private
uint32_t GarnetNetwork::m_ni_flit_size
protected

Definition at line 150 of file GarnetNetwork.hh.

Referenced by GarnetNetwork(), and getNiFlitSize().

std::vector<NetworkInterface *> GarnetNetwork::m_nis
private
int GarnetNetwork::m_num_cols
protected

Definition at line 149 of file GarnetNetwork.hh.

Referenced by getNumCols(), and init().

int GarnetNetwork::m_num_rows
protected

Definition at line 148 of file GarnetNetwork.hh.

Referenced by GarnetNetwork(), getNumRows(), and init().

Stats::Vector GarnetNetwork::m_packet_network_latency
protected

Definition at line 160 of file GarnetNetwork.hh.

Referenced by increment_packet_network_latency(), and regStats().

Stats::Vector GarnetNetwork::m_packet_queueing_latency
protected

Definition at line 161 of file GarnetNetwork.hh.

Referenced by increment_packet_queueing_latency(), and regStats().

Stats::Vector GarnetNetwork::m_packets_injected
protected

Definition at line 159 of file GarnetNetwork.hh.

Referenced by increment_injected_packets(), and regStats().

Stats::Vector GarnetNetwork::m_packets_received
protected

Definition at line 158 of file GarnetNetwork.hh.

Referenced by increment_received_packets(), and regStats().

std::vector<Router *> GarnetNetwork::m_routers
private
int GarnetNetwork::m_routing_algorithm
protected

Definition at line 154 of file GarnetNetwork.hh.

Referenced by GarnetNetwork(), and getRoutingAlgorithm().

Stats::Scalar GarnetNetwork::m_total_ext_in_link_utilization
protected

Definition at line 180 of file GarnetNetwork.hh.

Referenced by collateStats(), and regStats().

Stats::Scalar GarnetNetwork::m_total_ext_out_link_utilization
protected

Definition at line 181 of file GarnetNetwork.hh.

Referenced by collateStats(), and regStats().

Stats::Scalar GarnetNetwork::m_total_hops
protected

Definition at line 186 of file GarnetNetwork.hh.

Referenced by increment_total_hops(), and regStats().

Stats::Scalar GarnetNetwork::m_total_int_link_utilization
protected

Definition at line 182 of file GarnetNetwork.hh.

Referenced by collateStats(), and regStats().

uint32_t GarnetNetwork::m_vcs_per_vnet
protected

Definition at line 151 of file GarnetNetwork.hh.

Referenced by GarnetNetwork(), getVCsPerVnet(), and regStats().

std::vector<VNET_type > GarnetNetwork::m_vnet_type
private

Definition at line 193 of file GarnetNetwork.hh.

Referenced by GarnetNetwork(), and get_vnet_type().


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

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