79 i != p->routers.end(); ++
i) {
89 i != p->netifs.end(); ++
i) {
128 int router_id M5_VAR_USED =
134 assert(router_id == router->
get_id());
150 const NetDest& routing_table_entry)
165 m_routers[dest]->addInPort(dst_inport_dirn, net_link, credit_link);
166 m_nis[src]->addOutPort(net_link, credit_link, dest);
177 const NetDest& routing_table_entry)
194 m_routers[src]->addOutPort(src_outport_dirn, net_link,
197 m_nis[dest]->addInPort(net_link, credit_link);
207 const NetDest& routing_table_entry,
221 m_routers[dest]->addInPort(dst_inport_dirn, net_link, credit_link);
222 m_routers[src]->addOutPort(src_outport_dirn, net_link,
238 return m_nis[
ni]->get_router_id();
261 .
name(
name() +
".packet_network_latency")
267 .
name(
name() +
".packet_queueing_latency")
279 .
name(
name() +
".average_packet_vnet_latency")
285 .
name(
name() +
".average_packet_vqueue_latency")
291 .
name(
name() +
".average_packet_network_latency");
296 .
name(
name() +
".average_packet_queueing_latency");
301 .
name(
name() +
".average_packet_latency");
307 .
init(m_virtual_networks)
313 .
init(m_virtual_networks)
319 .
init(m_virtual_networks)
320 .
name(
name() +
".flit_network_latency")
325 .
init(m_virtual_networks)
326 .
name(
name() +
".flit_queueing_latency")
338 .
name(
name() +
".average_flit_vnet_latency")
343 .
name(
name() +
".average_flit_vqueue_latency")
349 .
name(
name() +
".average_flit_network_latency");
354 .
name(
name() +
".average_flit_queueing_latency");
359 .
name(
name() +
".average_flit_latency");
370 .
name(
name() +
".ext_in_link_utilization");
372 .
name(
name() +
".ext_out_link_utilization");
374 .
name(
name() +
".int_link_utilization");
376 .
name(
name() +
".avg_link_utilization");
399 else if (type ==
INT_)
403 (double(activity) / time_delta);
406 for (
int j = 0;
j < vc_load.size();
j++) {
420 out <<
"[GarnetNetwork]";
424 GarnetNetworkParams::create()
432 uint32_t num_functional_writes = 0;
435 num_functional_writes +=
m_routers[
i]->functionalWrite(pkt);
438 for (
unsigned int i = 0;
i <
m_nis.size(); ++
i) {
439 num_functional_writes +=
m_nis[
i]->functionalWrite(pkt);
446 return num_functional_writes;
Stats::Formula m_avg_flit_queueing_latency
GarnetNetworkParams Params
const FlagsType pdf
Print the percent of the total that this entry represents.
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
bool isFaultModelEnabled() const
std::vector< CreditLink * > m_creditlinks
NetworkLink * m_network_links[2]
Stats::Vector m_packets_injected
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...
Stats::Vector m_flits_injected
void setType(link_type type)
std::vector< std::vector< MessageBuffer * > > m_toNetQueues
void init_net_ptr(GarnetNetwork *net_ptr)
Stats::Formula m_avg_packet_latency
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)
Stats::Formula m_avg_packet_network_latency
Stats::Vector m_flits_received
uint32_t m_buffers_per_ctrl_vc
Stats::Vector m_average_vc_load
NetworkLink * m_network_link
Overload hash function for BasicBlockRange type.
Stats::Scalar m_total_int_link_utilization
void regStats()
Callback to set stat parameters.
std::vector< std::string > m_vnet_type_names
Stats::Scalar m_total_ext_out_link_utilization
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Stats::Formula m_avg_packet_queueing_latency
Derived & init(size_type size)
Set this vector to have the given size.
const Params * params() const
Topology * m_topology_ptr
void makeExtInLink(NodeID src, SwitchID dest, BasicLink *link, const NetDest &routing_table_entry)
std::vector< Router * > m_routers
Stats::Vector m_packet_network_latency
uint32_t getBuffersPerCtrlVC()
std::string csprintf(const char *format, const Args &...args)
GarnetNetwork(const Params *p)
std::vector< VNET_type > m_vnet_type
const FlagsType oneline
Print all values on a single line.
std::string PortDirection
CreditLink * m_credit_link
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
std::vector< NetworkInterface * > m_nis
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
int get_router_id(int ni)
const FlagsType total
Print the total.
CreditLink * m_credit_links[2]
Stats::Formula m_avg_hops
Stats::Scalar m_average_link_utilization
Stats::Vector m_packets_received
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
uint32_t getBuffersPerDataVC()
Stats::Formula m_avg_packet_vqueue_latency
void makeInternalLink(SwitchID src, SwitchID dest, BasicLink *link, const NetDest &routing_table_entry, PortDirection src_outport_dirn, PortDirection dest_inport_dirn)
virtual const std::string name() const
void printFaultVector(std::ostream &out)
Stats::Scalar m_total_hops
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Stats::Vector m_flit_network_latency
Stats::Formula m_avg_flit_vqueue_latency
Stats::Formula m_avg_flit_network_latency
std::vector< NetworkLink * > m_networklinks
void printAggregateFaultProbability(std::ostream &out)
uint32_t functionalWrite(Packet *pkt)
Function for performing a functional write.
void init_net_ptr(GarnetNetwork *net_ptr)
Stats::Formula m_avg_flit_latency
Stats::Formula m_avg_packet_vnet_latency
uint32_t m_buffers_per_data_vc
virtual void regStats()
Callback to set stat parameters.
Stats::Scalar m_total_ext_in_link_utilization
void makeExtOutLink(SwitchID src, NodeID dest, BasicLink *link, const NetDest &routing_table_entry)
static uint32_t m_virtual_networks
const FlagsType nozero
Don't print if this is zero.
void createLinks(Network *net)
void print(std::ostream &out) const
std::vector< std::vector< MessageBuffer * > > m_fromNetQueues
Stats::Vector m_flit_queueing_latency
Stats::Formula m_avg_flit_vnet_latency
Stats::Vector m_packet_queueing_latency
bool m_enable_fault_model