gem5
v20.1.0.0
|
#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 ()=default | |
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 | getBuffersPerDataVC () |
uint32_t | getBuffersPerCtrlVC () |
int | getRoutingAlgorithm () const |
bool | isFaultModelEnabled () const |
bool | isVNetOrdered (int vnet) const |
VNET_type | get_vnet_type (int vnet) |
int | getNumRouters () |
int | get_router_id (int ni, int vnet) |
void | makeExtOutLink (SwitchID src, NodeID dest, BasicLink *link, std::vector< NetDest > &routing_table_entry) |
void | makeExtInLink (NodeID src, SwitchID dest, BasicLink *link, std::vector< NetDest > &routing_table_entry) |
void | makeInternalLink (SwitchID src, SwitchID dest, BasicLink *link, std::vector< 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 () |
Callback to set stat parameters. More... | |
void | resetStats () |
Callback to reset stats. More... | |
void | print (std::ostream &out) const |
void | increment_injected_packets (int vnet) |
void | increment_received_packets (int vnet) |
void | increment_packet_network_latency (Tick latency, int vnet) |
void | increment_packet_queueing_latency (Tick latency, int vnet) |
void | increment_injected_flits (int vnet) |
void | increment_received_flits (int vnet) |
void | increment_flit_network_latency (Tick latency, int vnet) |
void | increment_flit_queueing_latency (Tick 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 () |
void | init () override |
init() is called after all C++ SimObjects have been created and all ports are connected. More... | |
int | getNumNodes () const |
void | setToNetQueue (NodeID global_id, bool ordered, int netNumber, std::string vnet_type, MessageBuffer *b) |
virtual void | setFromNetQueue (NodeID global_id, bool ordered, int netNumber, std::string vnet_type, MessageBuffer *b) |
virtual void | checkNetworkAllocation (NodeID local_id, bool ordered, int network_num, std::string vnet_type) |
virtual bool | functionalRead (Packet *pkt) |
NodeID | addressToNodeID (Addr addr, MachineType mtype) |
Map an address to the correct NodeID. More... | |
Port & | getPort (const std::string &, PortID idx=InvalidPortID) override |
Get a port with a given name and index. More... | |
NodeID | getLocalNodeID (NodeID global_id) const |
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... | |
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 | 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 | |
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) |
This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. More... | |
void | setCurTick (Tick newVal) |
EventManager (EventManager &em) | |
Event manger manages events in the event queue. More... | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
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 Stats::Group | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. More... | |
virtual | ~Group () |
virtual void | preDumpStats () |
Callback before stats are dumped. More... | |
void | addStat (Stats::Info *info) |
Register a stat with this group. More... | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. More... | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. More... | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. More... | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. More... | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Public Member Functions inherited from Clocked | |
void | updateClockPeriod () |
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 | |
const char * | garnetVersion = "3.0" |
FaultModel * | fault_model |
Public Attributes inherited from ClockedObject | |
PowerState * | powerState |
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 () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
Serializes all the SimObjects. More... | |
static void | unserializeGlobals (CheckpointIn &cp) |
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... | |
virtual void | clockPeriodUpdated () |
A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. 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 50 of file GarnetNetwork.hh.
typedef GarnetNetworkParams GarnetNetwork::Params |
Definition at line 53 of file GarnetNetwork.hh.
GarnetNetwork::GarnetNetwork | ( | const Params * | p | ) |
Definition at line 56 of file GarnetNetwork.cc.
References CTRL_VNET_, DATA_VNET_, fault_model, garnetVersion, ArmISA::i, inform, Router::init_net_ptr(), m_buffers_per_ctrl_vc, m_buffers_per_data_vc, m_enable_fault_model, m_max_vcs_per_vnet, m_ni_flit_size, m_nis, m_num_rows, m_routers, m_routing_algorithm, Network::m_virtual_networks, m_vnet_type, Network::m_vnet_type_names, PowerISA::ni, and MipsISA::p.
|
default |
|
private |
|
virtual |
Implements Network.
Definition at line 508 of file GarnetNetwork.cc.
References Clocked::curCycle(), EXT_IN_, EXT_OUT_, 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 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 566 of file GarnetNetwork.cc.
References ArmISA::i, m_networklinks, m_nis, and m_routers.
int GarnetNetwork::get_router_id | ( | int | ni, |
int | vnet | ||
) |
Definition at line 357 of file GarnetNetwork.cc.
References Network::getLocalNodeID(), and m_nis.
Referenced by NetworkInterface::flitisizeMessage().
|
inline |
Definition at line 80 of file GarnetNetwork.hh.
References m_vnet_type.
Referenced by OutVcState::OutVcState().
|
inline |
Definition at line 70 of file GarnetNetwork.hh.
References m_buffers_per_ctrl_vc.
Referenced by init(), and OutVcState::OutVcState().
|
inline |
Definition at line 69 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.
|
inline |
Definition at line 65 of file GarnetNetwork.hh.
References m_num_cols.
Referenced by RoutingUnit::outportComputeXY().
int GarnetNetwork::getNumRouters | ( | ) |
Definition at line 350 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 71 of file GarnetNetwork.hh.
References m_routing_algorithm.
Referenced by RoutingUnit::outportCompute().
|
inline |
Definition at line 128 of file GarnetNetwork.hh.
References m_flit_network_latency.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 134 of file GarnetNetwork.hh.
References m_flit_queueing_latency.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 124 of file GarnetNetwork.hh.
References m_flits_injected.
Referenced by NetworkInterface::flitisizeMessage().
|
inline |
Definition at line 109 of file GarnetNetwork.hh.
References m_packets_injected.
Referenced by NetworkInterface::flitisizeMessage().
|
inline |
Definition at line 113 of file GarnetNetwork.hh.
References m_packet_network_latency.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 119 of file GarnetNetwork.hh.
References m_packet_queueing_latency.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 125 of file GarnetNetwork.hh.
References m_flits_received.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 110 of file GarnetNetwork.hh.
References m_packets_received.
Referenced by NetworkInterface::incrementStats().
|
inline |
Definition at line 140 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 SimObject.
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(), 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(), and Router::printFaultVector().
|
inline |
Definition at line 73 of file GarnetNetwork.hh.
References m_enable_fault_model.
Referenced by init().
|
inline |
Definition at line 78 of file GarnetNetwork.hh.
References Network::m_ordered.
Referenced by NetworkInterface::scheduleOutputPort().
|
virtual |
Implements Network.
Definition at line 154 of file GarnetNetwork.cc.
References DPRINTF, EXT_IN_, GarnetExtLink::extBridgeEn, GarnetExtLink::extCredBridge, GarnetExtLink::extNetBridge, Network::getLocalNodeID(), GarnetExtLink::intBridgeEn, GarnetExtLink::intCredBridge, GarnetExtLink::intNetBridge, GarnetExtLink::m_credit_links, m_creditlinks, m_max_vcs_per_vnet, GarnetExtLink::m_network_links, m_networklinks, m_nis, Network::m_nodes, m_routers, SimObject::name(), and NetworkLink::setType().
|
virtual |
Implements Network.
Definition at line 220 of file GarnetNetwork.cc.
References DPRINTF, EXT_OUT_, GarnetExtLink::extBridgeEn, GarnetExtLink::extCredBridge, GarnetExtLink::extNetBridge, Network::getLocalNodeID(), GarnetExtLink::intBridgeEn, GarnetExtLink::intCredBridge, GarnetExtLink::intNetBridge, GarnetExtLink::m_credit_links, m_creditlinks, m_max_vcs_per_vnet, GarnetExtLink::m_network_links, m_networklinks, m_nis, Network::m_nodes, m_routers, BasicLink::m_weight, SimObject::name(), and NetworkLink::setType().
|
virtual |
Implements Network.
Definition at line 291 of file GarnetNetwork.cc.
References DPRINTF, GarnetIntLink::dstBridgeEn, GarnetIntLink::dstCredBridge, GarnetIntLink::dstNetBridge, INT_, GarnetIntLink::m_credit_link, m_creditlinks, m_max_vcs_per_vnet, GarnetIntLink::m_network_link, m_networklinks, m_routers, BasicLink::m_weight, SimObject::name(), NetworkLink::setType(), GarnetIntLink::srcBridgeEn, GarnetIntLink::srcCredBridge, and GarnetIntLink::srcNetBridge.
|
private |
|
virtual |
|
virtual |
Callback to set stat parameters.
This callback is typically used for complex stats (e.g., distributions) that need parameters in addition to a name and a description. Stat names and descriptions should typically be set from the constructor usingo from the constructor using the ADD_STAT macro.
Reimplemented from Stats::Group.
Definition at line 365 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_max_vcs_per_vnet, 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, Network::m_virtual_networks, SimObject::name(), Stats::DataWrap< Derived, InfoProxyType >::name(), Stats::nozero, Stats::oneline, Stats::pdf, Stats::Group::regStats(), Stats::DataWrapVec< Derived, InfoProxyType >::subname(), RiscvISA::sum, and Stats::total.
|
virtual |
Callback to reset stats.
Reimplemented from Stats::Group.
Definition at line 540 of file GarnetNetwork.cc.
References ArmISA::i, m_creditlinks, m_networklinks, and m_routers.
FaultModel* GarnetNetwork::fault_model |
Definition at line 74 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), Router::get_aggregate_fault_probability(), Router::get_fault_vector(), init(), and Router::printFaultVector().
const char* GarnetNetwork::garnetVersion = "3.0" |
Definition at line 59 of file GarnetNetwork.hh.
Referenced by GarnetNetwork().
|
protected |
Definition at line 182 of file GarnetNetwork.hh.
Referenced by collateStats(), and regStats().
|
protected |
Definition at line 183 of file GarnetNetwork.hh.
Referenced by collateStats(), and regStats().
|
protected |
Definition at line 177 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 175 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 176 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 173 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 174 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 186 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 166 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 164 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 165 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 162 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 163 of file GarnetNetwork.hh.
Referenced by regStats().
|
protected |
Definition at line 151 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and getBuffersPerCtrlVC().
|
protected |
Definition at line 152 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and getBuffersPerDataVC().
|
private |
Definition at line 195 of file GarnetNetwork.hh.
Referenced by makeExtInLink(), makeExtOutLink(), makeInternalLink(), and resetStats().
|
protected |
Definition at line 154 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and isFaultModelEnabled().
|
protected |
Definition at line 170 of file GarnetNetwork.hh.
Referenced by increment_flit_network_latency(), and regStats().
|
protected |
Definition at line 171 of file GarnetNetwork.hh.
Referenced by increment_flit_queueing_latency(), and regStats().
|
protected |
Definition at line 169 of file GarnetNetwork.hh.
Referenced by increment_injected_flits(), and regStats().
|
protected |
Definition at line 168 of file GarnetNetwork.hh.
Referenced by increment_received_flits(), and regStats().
|
protected |
Definition at line 150 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), makeExtInLink(), makeExtOutLink(), makeInternalLink(), and regStats().
|
private |
Definition at line 194 of file GarnetNetwork.hh.
Referenced by collateStats(), functionalWrite(), makeExtInLink(), makeExtOutLink(), makeInternalLink(), and resetStats().
|
protected |
Definition at line 149 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and getNiFlitSize().
|
private |
Definition at line 196 of file GarnetNetwork.hh.
Referenced by functionalWrite(), GarnetNetwork(), get_router_id(), init(), makeExtInLink(), and makeExtOutLink().
|
protected |
Definition at line 148 of file GarnetNetwork.hh.
Referenced by getNumCols(), and init().
|
protected |
Definition at line 147 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), getNumRows(), and init().
|
protected |
Definition at line 159 of file GarnetNetwork.hh.
Referenced by increment_packet_network_latency(), and regStats().
|
protected |
Definition at line 160 of file GarnetNetwork.hh.
Referenced by increment_packet_queueing_latency(), and regStats().
|
protected |
Definition at line 158 of file GarnetNetwork.hh.
Referenced by increment_injected_packets(), and regStats().
|
protected |
Definition at line 157 of file GarnetNetwork.hh.
Referenced by increment_received_packets(), and regStats().
|
private |
Definition at line 193 of file GarnetNetwork.hh.
Referenced by collateStats(), functionalWrite(), GarnetNetwork(), getNumRouters(), init(), makeExtInLink(), makeExtOutLink(), makeInternalLink(), and resetStats().
|
protected |
Definition at line 153 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and getRoutingAlgorithm().
|
protected |
Definition at line 179 of file GarnetNetwork.hh.
Referenced by collateStats(), and regStats().
|
protected |
Definition at line 180 of file GarnetNetwork.hh.
Referenced by collateStats(), and regStats().
|
protected |
Definition at line 185 of file GarnetNetwork.hh.
Referenced by increment_total_hops(), and regStats().
|
protected |
Definition at line 181 of file GarnetNetwork.hh.
Referenced by collateStats(), and regStats().
|
private |
Definition at line 192 of file GarnetNetwork.hh.
Referenced by GarnetNetwork(), and get_vnet_type().