Go to the documentation of this file.
37 #include "debug/RubyNetwork.hh"
81 i !=
p->routers.end(); ++
i) {
82 Router* router = safe_cast<Router*>(*
i);
91 i !=
p->netifs.end(); ++
i) {
94 ni->init_net_ptr(
this);
132 Router* router = safe_cast<Router*>(*
i);
133 int router_id M5_VAR_USED =
139 assert(router_id == router->
get_id());
160 GarnetExtLink* garnet_link = safe_cast<GarnetExtLink*>(link);
189 DPRINTF(RubyNetwork,
"Enable external bridge for %s\n",
190 garnet_link->
name());
194 dest,
m_routers[dest]->get_vc_per_vnet());
196 m_nis[local_src]->addOutPort(net_link, credit_link, dest,
201 DPRINTF(RubyNetwork,
"Enable internal bridge for %s\n",
202 garnet_link->
name());
204 addInPort(dst_inport_dirn,
208 m_routers[dest]->addInPort(dst_inport_dirn, net_link, credit_link);
229 GarnetExtLink* garnet_link = safe_cast<GarnetExtLink*>(link);
258 DPRINTF(RubyNetwork,
"Enable external bridge for %s\n",
259 garnet_link->
name());
264 m_nis[local_dest]->addInPort(net_link, credit_link);
268 DPRINTF(RubyNetwork,
"Enable internal bridge for %s\n",
269 garnet_link->
name());
271 addOutPort(src_outport_dirn,
273 routing_table_entry, link->
m_weight,
278 addOutPort(src_outport_dirn, net_link,
296 GarnetIntLink* garnet_link = safe_cast<GarnetIntLink*>(link);
307 std::max(
m_routers[dest]->get_vc_per_vnet(),
324 DPRINTF(RubyNetwork,
"Enable destination bridge for %s\n",
325 garnet_link->
name());
326 m_routers[dest]->addInPort(dst_inport_dirn,
329 m_routers[dest]->addInPort(dst_inport_dirn, net_link, credit_link);
333 DPRINTF(RubyNetwork,
"Enable source bridge for %s\n",
334 garnet_link->
name());
341 m_routers[src]->addOutPort(src_outport_dirn, net_link,
361 return m_nis[local_ni]->get_router_id(vnet);
384 .
name(
name() +
".packet_network_latency")
390 .
name(
name() +
".packet_queueing_latency")
402 .
name(
name() +
".average_packet_vnet_latency")
408 .
name(
name() +
".average_packet_vqueue_latency")
414 .
name(
name() +
".average_packet_network_latency");
419 .
name(
name() +
".average_packet_queueing_latency");
424 .
name(
name() +
".average_packet_latency");
443 .
name(
name() +
".flit_network_latency")
449 .
name(
name() +
".flit_queueing_latency")
461 .
name(
name() +
".average_flit_vnet_latency")
466 .
name(
name() +
".average_flit_vqueue_latency")
472 .
name(
name() +
".average_flit_network_latency");
477 .
name(
name() +
".average_flit_queueing_latency");
482 .
name(
name() +
".average_flit_latency");
493 .
name(
name() +
".ext_in_link_utilization");
495 .
name(
name() +
".ext_out_link_utilization");
497 .
name(
name() +
".int_link_utilization");
499 .
name(
name() +
".avg_link_utilization");
511 double time_delta = double(
curCycle() -
rs->getStartCycle());
525 (double(activity) / time_delta);
528 for (
int j = 0;
j < vc_load.size();
j++) {
556 out <<
"[GarnetNetwork]";
560 GarnetNetworkParams::create()
568 uint32_t num_functional_writes = 0;
571 num_functional_writes +=
m_routers[
i]->functionalWrite(pkt);
574 for (
unsigned int i = 0;
i <
m_nis.size(); ++
i) {
575 num_functional_writes +=
m_nis[
i]->functionalWrite(pkt);
582 return num_functional_writes;
std::vector< std::string > m_vnet_type_names
Stats::Scalar m_average_link_utilization
Stats::Formula m_avg_packet_vnet_latency
virtual void regStats()
Callback to set stat parameters.
void resetStats()
Callback to reset stats.
std::vector< VNET_type > m_vnet_type
std::vector< NetworkInterface * > m_nis
Stats::Vector m_packet_network_latency
Stats::Vector m_flits_injected
int get_router_id(int ni, int vnet)
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
void printAggregateFaultProbability(std::ostream &out)
Stats::Scalar m_total_ext_out_link_utilization
std::vector< std::vector< MessageBuffer * > > m_toNetQueues
void makeExtInLink(NodeID src, SwitchID dest, BasicLink *link, std::vector< NetDest > &routing_table_entry)
std::vector< Router * > m_routers
NetworkBridge * extNetBridge[2]
const char * garnetVersion
void setType(link_type type)
GarnetNetworkParams Params
static uint32_t m_virtual_networks
uint32_t get_vc_per_vnet()
CreditLink * m_credit_link
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
uint32_t getBuffersPerCtrlVC()
Stats::Scalar m_total_hops
Stats::Vector m_flit_network_latency
void printFaultVector(std::ostream &out)
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Stats::Formula m_avg_hops
CreditLink * m_credit_links[2]
Stats::Formula m_avg_flit_network_latency
NetworkBridge * dstNetBridge
void makeInternalLink(SwitchID src, SwitchID dest, BasicLink *link, std::vector< NetDest > &routing_table_entry, PortDirection src_outport_dirn, PortDirection dest_inport_dirn)
NodeID getLocalNodeID(NodeID global_id) const
const FlagsType oneline
Print all values on a single line.
Stats::Formula m_avg_packet_latency
Stats::Vector m_packets_received
NetworkLink * m_network_links[2]
Stats::Formula m_avg_packet_vqueue_latency
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
bool isFaultModelEnabled() const
void print(std::ostream &out) const
Stats::Scalar m_total_int_link_utilization
bool m_enable_fault_model
uint32_t m_buffers_per_data_vc
NetworkBridge * srcNetBridge
void makeExtOutLink(SwitchID src, NodeID dest, BasicLink *link, std::vector< NetDest > &routing_table_entry)
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
Derived & init(size_type size)
Set this vector to have the given size.
Stats::Formula m_avg_flit_vqueue_latency
const FlagsType nozero
Don't print if this is zero.
std::vector< std::vector< MessageBuffer * > > m_fromNetQueues
const Params * params() const
virtual const std::string name() const
int declare_router(int number_of_inputs, int number_of_outputs, int number_of_vcs_per_vnet, int number_of_buff_per_data_vc, int number_of_buff_per_ctrl_vc)
uint32_t getBuffersPerDataVC()
Stats::Vector m_flit_queueing_latency
Stats::Vector m_average_vc_load
NetworkLink * m_network_link
NetworkBridge * extCredBridge[2]
Stats::Formula m_avg_packet_network_latency
NetworkBridge * intCredBridge[2]
Stats::Formula m_avg_flit_queueing_latency
uint32_t m_max_vcs_per_vnet
Overload hash function for BasicBlockRange type.
const FlagsType pdf
Print the percent of the total that this entry represents.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void createLinks(Network *net)
uint32_t m_buffers_per_ctrl_vc
GarnetNetwork(const Params *p)
Stats::Formula m_avg_flit_latency
std::string PortDirection
Stats::Formula m_avg_flit_vnet_latency
std::vector< CreditLink * > m_creditlinks
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
NetworkBridge * intNetBridge[2]
void regStats()
Callback to set stat parameters.
void init_net_ptr(GarnetNetwork *net_ptr)
Stats::Vector m_packets_injected
Stats::Vector m_flits_received
Stats::Formula m_avg_packet_queueing_latency
Stats::Vector m_packet_queueing_latency
const FlagsType total
Print the total.
uint32_t functionalWrite(Packet *pkt)
Function for performing a functional write.
Stats::Scalar m_total_ext_in_link_utilization
std::vector< NetworkLink * > m_networklinks
std::string csprintf(const char *format, const Args &...args)
NetworkBridge * srcCredBridge
NetworkBridge * dstCredBridge
Topology * m_topology_ptr
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17