| 
    gem5
    
   | 
 
#include <Router.hh>
  
 Public Types | |
| typedef GarnetRouterParams | Params | 
  Public Types inherited from BasicRouter | |
| typedef BasicRouterParams | Params | 
  Public Types inherited from ClockedObject | |
| typedef ClockedObjectParams | Params | 
| Parameters of ClockedObject.  More... | |
  Public Types inherited from SimObject | |
| typedef SimObjectParams | Params | 
Public Member Functions | |
| Router (const Params *p) | |
| ~Router () | |
| void | wakeup () | 
| void | print (std::ostream &out) const | 
| void | init () | 
| init() is called after all C++ SimObjects have been created and all ports are connected.  More... | |
| void | addInPort (PortDirection inport_dirn, NetworkLink *link, CreditLink *credit_link) | 
| void | addOutPort (PortDirection outport_dirn, NetworkLink *link, const NetDest &routing_table_entry, int link_weight, CreditLink *credit_link) | 
| Cycles | get_pipe_stages () | 
| int | get_num_vcs () | 
| int | get_num_vnets () | 
| int | get_vc_per_vnet () | 
| int | get_num_inports () | 
| int | get_num_outports () | 
| int | get_id () | 
| void | init_net_ptr (GarnetNetwork *net_ptr) | 
| GarnetNetwork * | get_net_ptr () | 
| std::vector< InputUnit * > & | get_inputUnit_ref () | 
| std::vector< OutputUnit * > & | get_outputUnit_ref () | 
| PortDirection | getOutportDirection (int outport) | 
| PortDirection | getInportDirection (int inport) | 
| int | route_compute (RouteInfo route, int inport, PortDirection direction) | 
| void | grant_switch (int inport, flit *t_flit) | 
| void | schedule_wakeup (Cycles time) | 
| std::string | getPortDirectionName (PortDirection direction) | 
| void | printFaultVector (std::ostream &out) | 
| void | printAggregateFaultProbability (std::ostream &out) | 
| void | regStats () | 
| Register statistics for this object.  More... | |
| void | collateStats () | 
| void | resetStats () | 
| Reset statistics associated with this object.  More... | |
| bool | get_fault_vector (int temperature, float fault_vector[]) | 
| bool | get_aggregate_fault_probability (int temperature, float *aggregate_fault_prob) | 
| uint32_t | functionalWrite (Packet *) | 
  Public Member Functions inherited from BasicRouter | |
| BasicRouter (const Params *p) | |
| const Params * | params () const | 
| void | print (std::ostream &out) const | 
  Public Member Functions inherited from ClockedObject | |
| ClockedObject (const ClockedObjectParams *p) | |
| const Params * | params () const | 
| void | serialize (CheckpointOut &cp) const override | 
| Serialize an object.  More... | |
| void | unserialize (CheckpointIn &cp) override | 
| Unserialize an object.  More... | |
| Enums::PwrState | pwrState () const | 
| std::string | pwrStateName () const | 
| std::vector< double > | pwrStateWeights () const | 
| Returns the percentage residency for each power state.  More... | |
| void | computeStats () | 
| Record stats values like state residency by computing the time difference from previous update.  More... | |
| void | pwrState (Enums::PwrState) | 
| void | regStats () override | 
| Register statistics for this object.  More... | |
  Public Member Functions inherited from SimObject | |
| const Params * | params () const | 
| SimObject (const Params *_params) | |
| virtual | ~SimObject () | 
| virtual const std::string | name () const | 
| virtual void | loadState (CheckpointIn &cp) | 
| loadState() is called on each SimObject when restoring from a checkpoint.  More... | |
| virtual void | initState () | 
| initState() is called on each SimObject when not restoring from a checkpoint.  More... | |
| virtual void | regProbePoints () | 
| Register probe points for this object.  More... | |
| virtual void | regProbeListeners () | 
| Register probe listeners for this object.  More... | |
| ProbeManager * | getProbeManager () | 
| Get the probe manager for this object.  More... | |
| virtual void | startup () | 
| startup() is the final initialization call before simulation.  More... | |
| DrainState | drain () override | 
| Provide a default implementation of the drain interface for objects that don't need draining.  More... | |
| virtual void | memWriteback () | 
| Write back dirty buffers to memory using functional writes.  More... | |
| virtual void | memInvalidate () | 
| Invalidate the contents of memory buffers.  More... | |
| void | serialize (CheckpointOut &cp) const override | 
| Serialize an object.  More... | |
| void | unserialize (CheckpointIn &cp) override | 
| Unserialize an object.  More... | |
  Public Member Functions inherited from EventManager | |
| EventManager (EventManager &em) | |
| EventManager (EventManager *em) | |
| EventManager (EventQueue *eq) | |
| EventQueue * | eventQueue () const | 
| void | schedule (Event &event, Tick when) | 
| void | deschedule (Event &event) | 
| void | reschedule (Event &event, Tick when, bool always=false) | 
| void | schedule (Event *event, Tick when) | 
| void | deschedule (Event *event) | 
| void | reschedule (Event *event, Tick when, bool always=false) | 
| void | wakeupEventQueue (Tick when=(Tick)-1) | 
| void | setCurTick (Tick newVal) | 
  Public Member Functions inherited from Serializable | |
| Serializable () | |
| virtual | ~Serializable () | 
| void | serializeSection (CheckpointOut &cp, const char *name) const | 
| Serialize an object into a new section.  More... | |
| void | serializeSection (CheckpointOut &cp, const std::string &name) const | 
| void | unserializeSection (CheckpointIn &cp, const char *name) | 
| Unserialize an a child object.  More... | |
| void | unserializeSection (CheckpointIn &cp, const std::string &name) | 
  Public Member Functions inherited from Drainable | |
| DrainState | drainState () const | 
| Return the current drain state of an object.  More... | |
| virtual void | notifyFork () | 
| Notify a child process of a fork.  More... | |
  Public Member Functions inherited from Clocked | |
| void | updateClockPeriod () const | 
| Update the tick to the current tick.  More... | |
| 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 caller to determine a future cycle.  More... | |
| Cycles | curCycle () const | 
| Determine the current cycle, corresponding to a tick aligned to a clock edge.  More... | |
| Tick | nextCycle () const | 
| Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future.  More... | |
| uint64_t | frequency () const | 
| Tick | clockPeriod () const | 
| double | voltage () const | 
| Cycles | ticksToCycles (Tick t) const | 
| Tick | cyclesToTicks (Cycles c) const | 
  Public Member Functions inherited from Consumer | |
| Consumer (ClockedObject *_em) | |
| virtual | ~Consumer () | 
| virtual void | storeEventInfo (int info) | 
| bool | alreadyScheduled (Tick time) | 
| void | insertScheduledWakeupTime (Tick time) | 
| void | scheduleEventAbsolute (Tick timeAbs) | 
Additional Inherited Members | |
  Static Public Member Functions inherited from SimObject | |
| static void | serializeAll (CheckpointOut &cp) | 
| Serialize all SimObjects in the system.  More... | |
| static SimObject * | find (const char *name) | 
| Find the SimObject with the given name and return a pointer to it.  More... | |
  Static Public Member Functions inherited from Serializable | |
| static const std::string & | currentSection () | 
| Get the fully-qualified name of the active section.  More... | |
| static void | serializeAll (const std::string &cpt_dir) | 
| static void | unserializeGlobals (CheckpointIn &cp) | 
  Static Public Attributes inherited from Serializable | |
| static int | ckptCount = 0 | 
| static int | ckptMaxCount = 0 | 
| static int | ckptPrevCount = -1 | 
  Protected Member Functions inherited from Drainable | |
| Drainable () | |
| virtual | ~Drainable () | 
| virtual void | drainResume () | 
| Resume execution after a successful drain.  More... | |
| void | signalDrainDone () const | 
| Signal that an object is drained.  More... | |
  Protected Member Functions inherited from Clocked | |
| Clocked (ClockDomain &clk_domain) | |
| Create a clocked object and set the clock domain based on the parameters.  More... | |
| Clocked (Clocked &)=delete | |
| Clocked & | operator= (Clocked &)=delete | 
| virtual | ~Clocked () | 
| Virtual destructor due to inheritance.  More... | |
| void | resetClock () const | 
| Reset the object's clock using the current global tick value.  More... | |
  Protected Member Functions inherited from Consumer | |
| void | scheduleEvent (Cycles timeDelta) | 
  Protected Attributes inherited from BasicRouter | |
| uint32_t | m_id | 
| uint32_t | m_latency | 
  Protected Attributes inherited from ClockedObject | |
| Enums::PwrState | _currPwrState | 
| To keep track of the current power state.  More... | |
| Tick | prvEvalTick | 
| Stats::Scalar | numPwrStateTransitions | 
| Stats::Distribution | pwrStateClkGateDist | 
| Stats::Vector | pwrStateResidencyTicks | 
  Protected Attributes inherited from SimObject | |
| const SimObjectParams * | _params | 
| Cached copy of the object parameters.  More... | |
  Protected Attributes inherited from EventManager | |
| EventQueue * | eventq | 
| A pointer to this object's event queue.  More... | |
| typedef GarnetRouterParams Router::Params | 
| Router::Router | ( | const Params * | p | ) | 
Definition at line 50 of file Router.cc.
References m_input_unit, m_latency, m_num_vcs, m_output_unit, m_routing_unit, m_sw_alloc, m_switch, m_vc_per_vnet, and m_virtual_networks.
| Router::~Router | ( | ) | 
Definition at line 66 of file Router.cc.
References m5::stl_helpers::deletePointers(), m_input_unit, m_output_unit, m_routing_unit, m_sw_alloc, and m_switch.
| void Router::addInPort | ( | PortDirection | inport_dirn, | 
| NetworkLink * | link, | ||
| CreditLink * | credit_link | ||
| ) | 
Definition at line 112 of file Router.cc.
References RoutingUnit::addInDirection(), InputUnit::getCreditQueue(), m_input_unit, m_routing_unit, InputUnit::set_credit_link(), InputUnit::set_in_link(), NetworkLink::setLinkConsumer(), and NetworkLink::setSourceQueue().
| void Router::addOutPort | ( | PortDirection | outport_dirn, | 
| NetworkLink * | link, | ||
| const NetDest & | routing_table_entry, | ||
| int | link_weight, | ||
| CreditLink * | credit_link | ||
| ) | 
Definition at line 129 of file Router.cc.
References RoutingUnit::addOutDirection(), RoutingUnit::addRoute(), RoutingUnit::addWeight(), OutputUnit::getOutQueue(), m_output_unit, m_routing_unit, OutputUnit::set_credit_link(), OutputUnit::set_out_link(), NetworkLink::setLinkConsumer(), and NetworkLink::setSourceQueue().
| void Router::collateStats | ( | ) | 
Definition at line 222 of file Router.cc.
References CrossbarSwitch::get_crossbar_activity(), SwitchAllocator::get_input_arbiter_activity(), SwitchAllocator::get_output_arbiter_activity(), ArmISA::i, ArmISA::j, m_buffer_reads, m_buffer_writes, m_crossbar_activity, m_input_unit, m_sw_alloc, m_sw_input_arbiter_activity, m_sw_output_arbiter_activity, m_switch, and m_virtual_networks.
| uint32_t Router::functionalWrite | ( | Packet * | pkt | ) | 
Definition at line 276 of file Router.cc.
References CrossbarSwitch::functionalWrite(), ArmISA::i, m_input_unit, m_output_unit, and m_switch.
      
  | 
  inline | 
Definition at line 111 of file Router.hh.
References GarnetNetwork::fault_model, FaultModel::fault_prob(), BasicRouter::m_id, and m_network_ptr.
Referenced by printAggregateFaultProbability().
      
  | 
  inline | 
Definition at line 107 of file Router.hh.
References GarnetNetwork::fault_model, FaultModel::fault_vector(), BasicRouter::m_id, and m_network_ptr.
Referenced by printFaultVector().
      
  | 
  inline | 
Definition at line 81 of file Router.hh.
References BasicRouter::m_id.
Referenced by SwitchAllocator::arbitrate_outports(), OutputUnit::decrement_credit(), OutputUnit::increment_credit(), GarnetNetwork::init(), RoutingUnit::outportCompute(), RoutingUnit::outportComputeXY(), and CrossbarSwitch::wakeup().
      
  | 
  inline | 
Definition at line 89 of file Router.hh.
References m_input_unit.
Referenced by SwitchAllocator::init().
      
  | 
  inline | 
Definition at line 88 of file Router.hh.
References m_network_ptr.
Referenced by RoutingUnit::lookupRoutingTable(), RoutingUnit::outportCompute(), RoutingUnit::outportComputeXY(), OutputUnit::OutputUnit(), and SwitchAllocator::send_allowed().
      
  | 
  inline | 
Definition at line 79 of file Router.hh.
References m_input_unit.
Referenced by SwitchAllocator::init(), CrossbarSwitch::init(), and GarnetNetwork::init().
      
  | 
  inline | 
Definition at line 80 of file Router.hh.
References m_output_unit.
Referenced by SwitchAllocator::init(), and GarnetNetwork::init().
      
  | 
  inline | 
Definition at line 76 of file Router.hh.
References m_num_vcs.
Referenced by CrossbarSwitch::CrossbarSwitch(), InputUnit::InputUnit(), OutputUnit::OutputUnit(), and SwitchAllocator::SwitchAllocator().
      
  | 
  inline | 
Definition at line 77 of file Router.hh.
References m_virtual_networks.
      
  | 
  inline | 
Definition at line 90 of file Router.hh.
References m_output_unit.
Referenced by SwitchAllocator::init(), and CrossbarSwitch::init().
      
  | 
  inline | 
      
  | 
  inline | 
Definition at line 78 of file Router.hh.
References m_vc_per_vnet.
Referenced by GarnetNetwork::init(), InputUnit::InputUnit(), OutputUnit::OutputUnit(), and SwitchAllocator::SwitchAllocator().
| PortDirection Router::getInportDirection | ( | int | inport | ) | 
Definition at line 156 of file Router.cc.
References m_input_unit.
| PortDirection Router::getOutportDirection | ( | int | outport | ) | 
Definition at line 150 of file Router.cc.
References m_output_unit.
| std::string Router::getPortDirectionName | ( | PortDirection | direction | ) | 
Definition at line 181 of file Router.cc.
Referenced by SwitchAllocator::arbitrate_outports().
| void Router::grant_switch | ( | int | inport, | 
| flit * | t_flit | ||
| ) | 
Definition at line 168 of file Router.cc.
References m_switch, and CrossbarSwitch::update_sw_winner().
Referenced by SwitchAllocator::arbitrate_outports().
      
  | 
  virtual | 
init() is called after all C++ SimObjects have been created and all ports are connected.
Initializations that are independent of unserialization but rely on a fully instantiated and connected SimObject graph should be done here.
Reimplemented from BasicRouter.
Definition at line 76 of file Router.cc.
References BasicRouter::init(), SwitchAllocator::init(), CrossbarSwitch::init(), m_sw_alloc, and m_switch.
      
  | 
  inline | 
Definition at line 83 of file Router.hh.
References m_network_ptr.
Referenced by GarnetNetwork::GarnetNetwork().
      
  | 
  inlinevirtual | 
| void Router::printAggregateFaultProbability | ( | std::ostream & | out | ) | 
Definition at line 265 of file Router.cc.
References BASELINE_TEMPERATURE_CELCIUS, get_aggregate_fault_probability(), and BasicRouter::m_id.
Referenced by GarnetNetwork::init().
| void Router::printFaultVector | ( | std::ostream & | out | ) | 
Definition at line 247 of file Router.cc.
References BASELINE_TEMPERATURE_CELCIUS, GarnetNetwork::fault_model, FaultModel::fault_type_to_string(), get_fault_vector(), BasicRouter::m_id, m_network_ptr, and FaultModel::number_of_fault_types.
Referenced by GarnetNetwork::init().
      
  | 
  virtual | 
Register statistics for this object.
Reimplemented from SimObject.
Definition at line 191 of file Router.cc.
References Stats::DataWrap< Derived, InfoProxyType >::flags(), m_buffer_reads, m_buffer_writes, m_crossbar_activity, m_sw_input_arbiter_activity, m_sw_output_arbiter_activity, SimObject::name(), Stats::DataWrap< Derived, InfoProxyType >::name(), Stats::nozero, and ClockedObject::regStats().
      
  | 
  virtual | 
Reset statistics associated with this object.
Reimplemented from SimObject.
Definition at line 237 of file Router.cc.
References ArmISA::i, ArmISA::j, m_input_unit, and m_virtual_networks.
| int Router::route_compute | ( | RouteInfo | route, | 
| int | inport, | ||
| PortDirection | direction | ||
| ) | 
Definition at line 162 of file Router.cc.
References m_routing_unit, and RoutingUnit::outportCompute().
Referenced by InputUnit::wakeup().
| void Router::schedule_wakeup | ( | Cycles | time | ) | 
Definition at line 174 of file Router.cc.
References Consumer::scheduleEvent().
Referenced by SwitchAllocator::check_for_wakeup(), and InputUnit::wakeup().
      
  | 
  virtual | 
Implements Consumer.
Definition at line 85 of file Router.cc.
References DPRINTF, BasicRouter::m_id, m_input_unit, m_output_unit, m_sw_alloc, m_switch, SwitchAllocator::wakeup(), and CrossbarSwitch::wakeup().
      
  | 
  private | 
Definition at line 131 of file Router.hh.
Referenced by collateStats(), and regStats().
      
  | 
  private | 
Definition at line 132 of file Router.hh.
Referenced by collateStats(), and regStats().
      
  | 
  private | 
Definition at line 137 of file Router.hh.
Referenced by collateStats(), and regStats().
      
  | 
  private | 
Definition at line 124 of file Router.hh.
Referenced by addInPort(), collateStats(), functionalWrite(), get_inputUnit_ref(), get_num_inports(), getInportDirection(), resetStats(), Router(), wakeup(), and ~Router().
      
  | 
  private | 
Definition at line 120 of file Router.hh.
Referenced by get_pipe_stages(), and Router().
      
  | 
  private | 
Definition at line 122 of file Router.hh.
Referenced by get_aggregate_fault_probability(), get_fault_vector(), get_net_ptr(), init_net_ptr(), and printFaultVector().
      
  | 
  private | 
Definition at line 121 of file Router.hh.
Referenced by get_num_vcs(), and Router().
      
  | 
  private | 
Definition at line 125 of file Router.hh.
Referenced by addOutPort(), functionalWrite(), get_num_outports(), get_outputUnit_ref(), getOutportDirection(), Router(), wakeup(), and ~Router().
      
  | 
  private | 
Definition at line 126 of file Router.hh.
Referenced by addInPort(), addOutPort(), route_compute(), Router(), and ~Router().
      
  | 
  private | 
      
  | 
  private | 
Definition at line 134 of file Router.hh.
Referenced by collateStats(), and regStats().
      
  | 
  private | 
Definition at line 135 of file Router.hh.
Referenced by collateStats(), and regStats().
      
  | 
  private | 
Definition at line 128 of file Router.hh.
Referenced by collateStats(), functionalWrite(), grant_switch(), init(), Router(), wakeup(), and ~Router().
      
  | 
  private | 
Definition at line 121 of file Router.hh.
Referenced by get_vc_per_vnet(), and Router().
      
  | 
  private | 
Definition at line 121 of file Router.hh.
Referenced by collateStats(), get_num_vnets(), resetStats(), and Router().