Go to the documentation of this file.
35 #include "debug/RubyNetwork.hh"
46 m_virtual_networks(
p->virt_nets), m_vc_per_vnet(
p->vcs_per_vnet),
47 m_num_vcs(m_virtual_networks * m_vc_per_vnet), m_bit_width(
p->
width),
48 m_network_ptr(nullptr), routingUnit(this), switchAllocator(this),
71 for (
int inport = 0; inport <
m_input_unit.size(); inport++) {
81 for (
int outport = 0; outport <
m_output_unit.size(); outport++) {
97 " not match that of Router%d(%d). Consider inserting SerDes "
110 m_input_unit.push_back(std::shared_ptr<InputUnit>(input_unit));
119 CreditLink *credit_link, uint32_t consumerVcs)
122 " Consider inserting SerDes Units");
135 m_output_unit.push_back(std::shared_ptr<OutputUnit>(output_unit));
199 .
name(
name() +
".crossbar_activity")
204 .
name(
name() +
".sw_input_arbiter_activity")
209 .
name(
name() +
".sw_output_arbiter_activity")
246 float fault_vector[num_fault_types];
248 out <<
"Router-" <<
m_id <<
" fault vector: " << endl;
249 for (
int fault_type_index = 0; fault_type_index < num_fault_types;
250 fault_type_index++) {
251 out <<
" - probability of (";
255 out << fault_vector[fault_type_index] << endl;
263 float aggregate_fault_prob;
265 &aggregate_fault_prob);
266 out <<
"Router-" <<
m_id <<
" fault probability: ";
267 out << aggregate_fault_prob << endl;
273 uint32_t num_functional_writes = 0;
277 num_functional_writes +=
m_input_unit[
i]->functionalWrite(pkt);
284 return num_functional_writes;
288 GarnetRouterParams::create()
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
virtual void regStats()
Callback to set stat parameters.
uint32_t m_virtual_networks
Stats::Scalar m_sw_input_arbiter_activity
flitBuffer * getOutQueue()
Stats::Scalar m_buffer_reads
void printAggregateFaultProbability(std::ostream &out)
virtual void setVcsPerVnet(uint32_t consumerVcs)
uint32_t functionalWrite(Packet *pkt)
void addRoute(std::vector< NetDest > &routing_table_entry)
Stats::Scalar m_crossbar_activity
void update_sw_winner(int inport, flit *t_flit)
uint32_t get_vc_per_vnet()
SwitchAllocator switchAllocator
CrossbarSwitch crossbarSwitch
void addWeight(int link_weight)
void printFaultVector(std::ostream &out)
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
void schedule_wakeup(Cycles time)
void set_credit_link(CreditLink *credit_link)
void addInPort(PortDirection inport_dirn, NetworkLink *link, CreditLink *credit_link)
void set_out_link(NetworkLink *link)
double get_input_arbiter_activity()
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...
double get_crossbar_activity()
void grant_switch(int inport, flit *t_flit)
void addInDirection(PortDirection inport_dirn, int inport)
int route_compute(RouteInfo route, int inport, PortDirection direction)
#define BASELINE_TEMPERATURE_CELCIUS
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
std::string getPortDirectionName(PortDirection direction)
const FlagsType nozero
Don't print if this is zero.
GarnetNetwork * m_network_ptr
void setLinkConsumer(Consumer *consumer)
virtual const std::string name() const
std::string fault_type_to_string(int fault_type_index)
bool get_aggregate_fault_probability(int temperature, float *aggregate_fault_prob)
void resetStats()
Callback to reset stats.
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
void setSourceQueue(flitBuffer *src_queue, ClockedObject *srcClockObject)
Overload hash function for BasicBlockRange type.
uint32_t functionalWrite(Packet *)
PortDirection getOutportDirection(int outport)
bool get_fault_vector(int temperature, float fault_vector[])
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Cycles is a wrapper class for representing cycle counts, i.e.
std::string PortDirection
Stats::Scalar m_buffer_writes
void addOutPort(PortDirection outport_dirn, NetworkLink *link, std::vector< NetDest > &routing_table_entry, int link_weight, CreditLink *credit_link, uint32_t consumerVcs)
void regStats()
Callback to set stat parameters.
void addOutDirection(PortDirection outport_dirn, int outport)
int outportCompute(RouteInfo route, int inport, PortDirection inport_dirn)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
PortDirection getInportDirection(int inport)
Stats::Scalar m_sw_output_arbiter_activity
std::vector< std::shared_ptr< InputUnit > > m_input_unit
std::vector< std::shared_ptr< OutputUnit > > m_output_unit
double get_output_arbiter_activity()
void scheduleEvent(Cycles timeDelta)
Tick curTick()
The current simulated tick.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17