gem5
|
#include <GarnetNetwork.hh>
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 Params * | params () 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 Params * | params () 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 Params * | params () 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... | |
ProbeManager * | getProbeManager () |
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) | |
EventQueue * | eventQueue () 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 | |
FaultModel * | fault_model |
Private Member Functions | |
GarnetNetwork (const GarnetNetwork &obj) | |
GarnetNetwork & | operator= (const GarnetNetwork &obj) |
Private Attributes | |
std::vector< VNET_type > | m_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 SimObject * | find (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) | |
Network & | operator= (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 | |
Clocked & | operator= (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 |
Definition at line 52 of file GarnetNetwork.hh.
typedef GarnetNetworkParams GarnetNetwork::Params |
Definition at line 55 of file GarnetNetwork.hh.
GarnetNetwork::GarnetNetwork | ( | const Params * | p | ) |
Definition at line 59 of file GarnetNetwork.cc.
References CTRL_VNET_, DATA_VNET_, fault_model, ArmISA::i, NetworkInterface::init_net_ptr(), Router::init_net_ptr(), m_buffers_per_ctrl_vc, m_buffers_per_data_vc, m_enable_fault_model, m_ni_flit_size, m_nis, m_num_rows, m_routers, m_routing_algorithm, m_vcs_per_vnet, Network::m_virtual_networks, m_vnet_type, Network::m_vnet_type_names, PowerISA::ni, and safe_cast().
GarnetNetwork::~GarnetNetwork | ( | ) |
Definition at line 146 of file GarnetNetwork.cc.
References m5::stl_helpers::deletePointers(), m_creditlinks, m_networklinks, m_nis, and m_routers.
|
private |
|
virtual |
Implements Network.
Definition at line 399 of file GarnetNetwork.cc.
References Clocked::curCycle(), EXT_IN_, EXT_OUT_, RubySystem::getStartCycle(), ArmISA::i, INT_, ArmISA::j, m_average_link_utilization, m_average_vc_load, m_networklinks, m_routers, m_total_ext_in_link_utilization, m_total_ext_out_link_utilization, m_total_int_link_utilization, Network::params(), ArmISA::rs, and X86ISA::type.
|
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().
|
inline |
Definition at line 81 of file GarnetNetwork.hh.
References getVCsPerVnet(), and m_vnet_type.
Referenced by OutVcState::OutVcState().
|
inline |
Definition at line 71 of file GarnetNetwork.hh.
References m_buffers_per_ctrl_vc.
Referenced by init(), and OutVcState::OutVcState().
|
inline |
Definition at line 70 of file GarnetNetwork.hh.
References m_buffers_per_data_vc.
Referenced by init(), and OutVcState::OutVcState().
|
inline |
Definition at line 68 of file GarnetNetwork.hh.
References m_ni_flit_size.
Referenced by NetworkInterface::flitisizeMessage().
|
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.
|
inline |
Definition at line 64 of file GarnetNetwork.hh.
References m_num_rows.
Referenced by init(), and RoutingUnit::outportComputeXY().
|
inline |
Definition at line 72 of file GarnetNetwork.hh.
References m_routing_algorithm.
Referenced by RoutingUnit::outportCompute().
|
inline |
Definition at line 69 of file GarnetNetwork.hh.
References m_vcs_per_vnet.
Referenced by get_vnet_type().
|
inline |
Definition at line 129 of file GarnetNetwork.hh.
References m_flit_network_latency.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 135 of file GarnetNetwork.hh.
References m_flit_queueing_latency.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 125 of file GarnetNetwork.hh.
References m_flits_injected.
Referenced by NetworkInterface::flitisizeMessage().
|
inline |
Definition at line 110 of file GarnetNetwork.hh.
References m_packets_injected.
Referenced by NetworkInterface::flitisizeMessage().
|
inline |
Definition at line 114 of file GarnetNetwork.hh.
References m_packet_network_latency.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 120 of file GarnetNetwork.hh.
References m_packet_queueing_latency.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 126 of file GarnetNetwork.hh.
References m_flits_received.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 111 of file GarnetNetwork.hh.
References m_packets_received.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 141 of file GarnetNetwork.hh.
References m_total_hops.
Referenced by NetworkInterface::incrementStats().
|
virtual |
init() is called after all C++ SimObjects have been created and all ports are connected.
Initializations that are independent of unserialization but rely on a fully instantiated and connected SimObject graph should be done here.
Reimplemented from Network.
Definition at line 102 of file GarnetNetwork.cc.
References Topology::createLinks(), FaultModel::declare_router(), fault_model, Router::get_id(), Router::get_num_inports(), Router::get_num_outports(), Router::get_vc_per_vnet(), getBuffersPerCtrlVC(), getBuffersPerDataVC(), getNumRows(), ArmISA::i, Network::init(), isFaultModelEnabled(), M5_VAR_USED, Network::m_fromNetQueues, m_nis, Network::m_nodes, m_num_cols, m_num_rows, m_routers, Network::m_toNetQueues, Network::m_topology_ptr, Router::printAggregateFaultProbability(), Router::printFaultVector(), and safe_cast().
|
inline |
Definition at line 74 of file GarnetNetwork.hh.
References m_enable_fault_model.
Referenced by init().
|
inline |
Definition at line 79 of file GarnetNetwork.hh.
References Network::m_ordered.
Referenced by NetworkInterface::scheduleOutputLink().
|
virtual |
Implements Network.
Definition at line 162 of file GarnetNetwork.cc.
References EXT_IN_, GarnetExtLink::m_credit_links, m_creditlinks, GarnetExtLink::m_network_links, m_networklinks, m_nis, Network::m_nodes, m_routers, safe_cast(), and NetworkLink::setType().
|
virtual |
Implements Network.
Definition at line 189 of file GarnetNetwork.cc.
References EXT_OUT_, GarnetExtLink::m_credit_links, m_creditlinks, GarnetExtLink::m_network_links, m_networklinks, m_nis, Network::m_nodes, m_routers, BasicLink::m_weight, safe_cast(), and NetworkLink::setType().
|
virtual |
Implements Network.
Definition at line 219 of file GarnetNetwork.cc.
References INT_, GarnetIntLink::m_credit_link, m_creditlinks, GarnetIntLink::m_network_link, m_networklinks, m_routers, BasicLink::m_weight, safe_cast(), and NetworkLink::setType().
|
private |
|
virtual |
|
virtual |
Register statistics for this object.
Reimplemented from SimObject.
Definition at line 255 of file GarnetNetwork.cc.
References csprintf(), Stats::DataWrap< Derived, InfoProxyType >::flags(), ArmISA::i, Stats::VectorBase< Derived, Stor >::init(), m_average_link_utilization, m_average_vc_load, m_avg_flit_latency, m_avg_flit_network_latency, m_avg_flit_queueing_latency, m_avg_flit_vnet_latency, m_avg_flit_vqueue_latency, m_avg_hops, m_avg_packet_latency, m_avg_packet_network_latency, m_avg_packet_queueing_latency, m_avg_packet_vnet_latency, m_avg_packet_vqueue_latency, m_flit_network_latency, m_flit_queueing_latency, m_flits_injected, m_flits_received, m_packet_network_latency, m_packet_queueing_latency, m_packets_injected, m_packets_received, m_total_ext_in_link_utilization, m_total_ext_out_link_utilization, m_total_hops, m_total_int_link_utilization, m_vcs_per_vnet, Network::m_virtual_networks, SimObject::name(), Stats::DataWrap< Derived, InfoProxyType >::name(), Stats::nozero, Stats::oneline, Stats::pdf, ClockedObject::regStats(), Stats::DataWrapVec< Derived, InfoProxyType >::subname(), Stats::sum(), and Stats::total.
FaultModel* GarnetNetwork::fault_model |
Definition at line 75 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), Router::get_aggregate_fault_probability(), Router::get_fault_vector(), init(), and Router::printFaultVector().
|
protected |
Definition at line 183 of file GarnetNetwork.hh.
Referenced by collateStats(), and regStats().
|
protected |
Definition at line 184 of file GarnetNetwork.hh.
Referenced by collateStats(), and regStats().
|
protected |
Definition at line 178 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 176 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 177 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 174 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 175 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 187 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 167 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 165 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 166 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 163 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 164 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 152 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and getBuffersPerCtrlVC().
|
protected |
Definition at line 153 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and getBuffersPerDataVC().
|
private |
Definition at line 196 of file GarnetNetwork.hh.
Referenced by makeExtInLink(), makeExtOutLink(), makeInternalLink(), and ~GarnetNetwork().
|
protected |
Definition at line 155 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and isFaultModelEnabled().
|
protected |
Definition at line 171 of file GarnetNetwork.hh.
Referenced by increment_flit_network_latency(), and regStats().
|
protected |
Definition at line 172 of file GarnetNetwork.hh.
Referenced by increment_flit_queueing_latency(), and regStats().
|
protected |
Definition at line 170 of file GarnetNetwork.hh.
Referenced by increment_injected_flits(), and regStats().
|
protected |
Definition at line 169 of file GarnetNetwork.hh.
Referenced by increment_received_flits(), and regStats().
|
private |
Definition at line 195 of file GarnetNetwork.hh.
Referenced by collateStats(), functionalWrite(), makeExtInLink(), makeExtOutLink(), makeInternalLink(), and ~GarnetNetwork().
|
protected |
Definition at line 150 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and getNiFlitSize().
|
private |
Definition at line 197 of file GarnetNetwork.hh.
Referenced by functionalWrite(), GarnetNetwork(), get_router_id(), init(), makeExtInLink(), makeExtOutLink(), and ~GarnetNetwork().
|
protected |
Definition at line 149 of file GarnetNetwork.hh.
Referenced by getNumCols(), and init().
|
protected |
Definition at line 148 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), getNumRows(), and init().
|
protected |
Definition at line 160 of file GarnetNetwork.hh.
Referenced by increment_packet_network_latency(), and regStats().
|
protected |
Definition at line 161 of file GarnetNetwork.hh.
Referenced by increment_packet_queueing_latency(), and regStats().
|
protected |
Definition at line 159 of file GarnetNetwork.hh.
Referenced by increment_injected_packets(), and regStats().
|
protected |
Definition at line 158 of file GarnetNetwork.hh.
Referenced by increment_received_packets(), and regStats().
|
private |
Definition at line 194 of file GarnetNetwork.hh.
Referenced by collateStats(), functionalWrite(), GarnetNetwork(), getNumRouters(), init(), makeExtInLink(), makeExtOutLink(), makeInternalLink(), and ~GarnetNetwork().
|
protected |
Definition at line 154 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and getRoutingAlgorithm().
|
protected |
Definition at line 180 of file GarnetNetwork.hh.
Referenced by collateStats(), and regStats().
|
protected |
Definition at line 181 of file GarnetNetwork.hh.
Referenced by collateStats(), and regStats().
|
protected |
Definition at line 186 of file GarnetNetwork.hh.
Referenced by increment_total_hops(), and regStats().
|
protected |
Definition at line 182 of file GarnetNetwork.hh.
Referenced by collateStats(), and regStats().
|
protected |
Definition at line 151 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), getVCsPerVnet(), and regStats().
|
private |
Definition at line 193 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and get_vnet_type().