34 #include "debug/RubyNetwork.hh" 45 m_virtual_networks(p->virt_nets), m_vc_per_vnet(p->vcs_per_vnet),
46 m_num_vcs(m_virtual_networks * m_vc_per_vnet), m_network_ptr(nullptr),
47 routingUnit(this), switchAllocator(this), crossbarSwitch(this)
68 for (
int inport = 0; inport <
m_input_unit.size(); inport++) {
78 for (
int outport = 0; outport <
m_output_unit.size(); outport++) {
101 m_input_unit.push_back(std::shared_ptr<InputUnit>(input_unit));
109 const NetDest& routing_table_entry,
int link_weight,
120 m_output_unit.push_back(std::shared_ptr<OutputUnit>(output_unit));
184 .
name(
name() +
".crossbar_activity")
189 .
name(
name() +
".sw_input_arbiter_activity")
194 .
name(
name() +
".sw_output_arbiter_activity")
233 float fault_vector[num_fault_types];
235 out <<
"Router-" <<
m_id <<
" fault vector: " << endl;
236 for (
int fault_type_index = 0; fault_type_index < num_fault_types;
237 fault_type_index++) {
238 out <<
" - probability of (";
242 out << fault_vector[fault_type_index] << endl;
250 float aggregate_fault_prob;
252 &aggregate_fault_prob);
253 out <<
"Router-" <<
m_id <<
" fault probability: ";
254 out << aggregate_fault_prob << endl;
260 uint32_t num_functional_writes = 0;
264 num_functional_writes +=
m_input_unit[
i]->functionalWrite(pkt);
271 return num_functional_writes;
275 GarnetRouterParams::create()
Stats::Scalar m_buffer_reads
GarnetNetwork * m_network_ptr
void set_out_link(NetworkLink *link)
Cycles is a wrapper class for representing cycle counts, i.e.
PortDirection getOutportDirection(int outport)
void scheduleEvent(Cycles timeDelta)
CrossbarSwitch crossbarSwitch
void grant_switch(int inport, flit *t_flit)
int route_compute(RouteInfo route, int inport, PortDirection direction)
void resetStats()
Callback to reset stats.
void update_sw_winner(int inport, flit *t_flit)
Overload hash function for BasicBlockRange type.
uint32_t functionalWrite(Packet *pkt)
Stats::Scalar m_buffer_writes
bool get_aggregate_fault_probability(int temperature, float *aggregate_fault_prob)
std::string getPortDirectionName(PortDirection direction)
Stats::Scalar m_sw_output_arbiter_activity
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
flitBuffer * getOutQueue()
std::string fault_type_to_string(int fault_type_index)
Stats::Scalar m_sw_input_arbiter_activity
void addWeight(int link_weight)
uint32_t functionalWrite(Packet *)
double get_output_arbiter_activity()
double get_crossbar_activity()
void schedule_wakeup(Cycles time)
#define BASELINE_TEMPERATURE_CELCIUS
void addInPort(PortDirection inport_dirn, NetworkLink *link, CreditLink *credit_link)
SwitchAllocator switchAllocator
Stats::Scalar m_crossbar_activity
void setSourceQueue(flitBuffer *src_queue)
std::string PortDirection
void addRoute(const NetDest &routing_table_entry)
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
void set_credit_link(CreditLink *credit_link)
void addInDirection(PortDirection inport_dirn, int inport)
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
virtual const std::string name() const
void printFaultVector(std::ostream &out)
bool get_fault_vector(int temperature, float fault_vector[])
void addOutPort(PortDirection outport_dirn, NetworkLink *link, const NetDest &routing_table_entry, int link_weight, CreditLink *credit_link)
double get_input_arbiter_activity()
int outportCompute(RouteInfo route, int inport, PortDirection inport_dirn)
void addOutDirection(PortDirection outport_dirn, int outport)
void printAggregateFaultProbability(std::ostream &out)
void setLinkConsumer(Consumer *consumer)
std::vector< std::shared_ptr< OutputUnit > > m_output_unit
virtual void regStats()
Callback to set stat parameters.
const FlagsType nozero
Don't print if this is zero.
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
void regStats()
Callback to set stat parameters.
PortDirection getInportDirection(int inport)
std::vector< std::shared_ptr< InputUnit > > m_input_unit