84 i != p->routers.end(); ++
i) {
94 i != p->netifs.end(); ++
i) {
139 assert(router_id == router->
get_id());
163 const NetDest& routing_table_entry)
178 m_routers[dest]->addInPort(dst_inport_dirn, net_link, credit_link);
179 m_nis[src]->addOutPort(net_link, credit_link, dest);
190 const NetDest& routing_table_entry)
207 m_routers[src]->addOutPort(src_outport_dirn, net_link,
210 m_nis[dest]->addInPort(net_link, credit_link);
220 const NetDest& routing_table_entry,
234 m_routers[dest]->addInPort(dst_inport_dirn, net_link, credit_link);
235 m_routers[src]->addOutPort(src_outport_dirn, net_link,
251 return m_nis[
ni]->get_router_id();
274 .
name(
name() +
".packet_network_latency")
280 .
name(
name() +
".packet_queueing_latency")
292 .
name(
name() +
".average_packet_vnet_latency")
298 .
name(
name() +
".average_packet_vqueue_latency")
304 .
name(
name() +
".average_packet_network_latency");
309 .
name(
name() +
".average_packet_queueing_latency");
314 .
name(
name() +
".average_packet_latency");
320 .
init(m_virtual_networks)
326 .
init(m_virtual_networks)
332 .
init(m_virtual_networks)
333 .
name(
name() +
".flit_network_latency")
338 .
init(m_virtual_networks)
339 .
name(
name() +
".flit_queueing_latency")
351 .
name(
name() +
".average_flit_vnet_latency")
356 .
name(
name() +
".average_flit_vqueue_latency")
362 .
name(
name() +
".average_flit_network_latency");
367 .
name(
name() +
".average_flit_queueing_latency");
372 .
name(
name() +
".average_flit_latency");
383 .
name(
name() +
".ext_in_link_utilization");
385 .
name(
name() +
".ext_out_link_utilization");
387 .
name(
name() +
".int_link_utilization");
389 .
name(
name() +
".avg_link_utilization");
412 else if (type ==
INT_)
416 (double(activity) / time_delta);
419 for (
int j = 0;
j < vc_load.size();
j++) {
433 out <<
"[GarnetNetwork]";
437 GarnetNetworkParams::create()
445 uint32_t num_functional_writes = 0;
448 num_functional_writes +=
m_routers[
i]->functionalWrite(pkt);
451 for (
unsigned int i = 0;
i <
m_nis.size(); ++
i) {
452 num_functional_writes +=
m_nis[
i]->functionalWrite(pkt);
459 return num_functional_writes;
Stats::Formula m_avg_flit_queueing_latency
GarnetNetworkParams Params
void print(std::ostream &out) const
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.
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
Stats::Scalar m_total_int_link_utilization
void regStats()
Register statistics for this object.
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.
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
Stats::Formula m_avg_packet_queueing_latency
Derived & init(size_type size)
Set this vector to have the given size.
Topology * m_topology_ptr
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
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
const Params * params() const
void deletePointers(C< T, A > &container)
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
static const int NumArgumentRegs M5_VAR_USED
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)
void printFaultVector(std::ostream &out)
Stats::Scalar m_total_hops
virtual const std::string name() const
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
bool isFaultModelEnabled() const
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
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)
std::vector< std::vector< MessageBuffer * > > m_fromNetQueues
Stats::Vector m_flit_queueing_latency
Stats::Formula m_avg_flit_vnet_latency
void regStats() override
Register statistics for this object.
Stats::Vector m_packet_queueing_latency
bool m_enable_fault_model