gem5 v24.0.0.0
|
#include <Router.hh>
Public Types | |
typedef GarnetRouterParams | Params |
Public Types inherited from gem5::ClockedObject | |
using | Params = ClockedObjectParams |
Parameters of ClockedObject. | |
Public Types inherited from gem5::SimObject | |
typedef SimObjectParams | Params |
Public Member Functions | |
Router (const Params &p) | |
~Router ()=default | |
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. | |
void | addInPort (PortDirection inport_dirn, NetworkLink *link, CreditLink *credit_link) |
void | addOutPort (PortDirection outport_dirn, NetworkLink *link, std::vector< NetDest > &routing_table_entry, int link_weight, CreditLink *credit_link, uint32_t consumerVcs) |
Cycles | get_pipe_stages () |
uint32_t | get_num_vcs () |
uint32_t | get_num_vnets () |
uint32_t | 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 () |
InputUnit * | getInputUnit (unsigned port) |
OutputUnit * | getOutputUnit (unsigned port) |
int | getBitWidth () |
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 () |
Callback to set stat parameters. | |
void | collateStats () |
void | resetStats () |
Callback to reset stats. | |
bool | get_fault_vector (int temperature, float fault_vector[]) |
bool | get_aggregate_fault_probability (int temperature, float *aggregate_fault_prob) |
bool | functionalRead (Packet *pkt, WriteMask &mask) |
uint32_t | functionalWrite (Packet *) |
Public Member Functions inherited from gem5::ruby::BasicRouter | |
PARAMS (BasicRouter) | |
BasicRouter (const Params &p) | |
void | print (std::ostream &out) const |
Public Member Functions inherited from gem5::ClockedObject | |
ClockedObject (const ClockedObjectParams &p) | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Public Member Functions inherited from gem5::SimObject | |
const Params & | params () const |
SimObject (const Params &p) | |
virtual | ~SimObject () |
virtual void | loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. | |
virtual void | initState () |
initState() is called on each SimObject when not restoring from a checkpoint. | |
virtual void | regProbePoints () |
Register probe points for this object. | |
virtual void | regProbeListeners () |
Register probe listeners for this object. | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. | |
virtual Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) |
Get a port with a given name and index. | |
virtual void | startup () |
startup() is the final initialization call before simulation. | |
DrainState | drain () override |
Provide a default implementation of the drain interface for objects that don't need draining. | |
virtual void | memWriteback () |
Write back dirty buffers to memory using functional writes. | |
virtual void | memInvalidate () |
Invalidate the contents of memory buffers. | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Public Member Functions inherited from gem5::EventManager | |
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) |
This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. | |
void | setCurTick (Tick newVal) |
EventManager (EventManager &em) | |
Event manger manages events in the event queue. | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Member Functions inherited from gem5::Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. | |
virtual void | notifyFork () |
Notify a child process of a fork. | |
Public Member Functions inherited from gem5::statistics::Group | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. | |
virtual | ~Group () |
virtual void | preDumpStats () |
Callback before stats are dumped. | |
void | addStat (statistics::Info *info) |
Register a stat with this group. | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. | |
void | mergeStatGroup (Group *block) |
Merge the contents (stats & children) of a block to this block. | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Public Member Functions inherited from gem5::Named | |
Named (const std::string &name_) | |
virtual | ~Named ()=default |
virtual std::string | name () const |
Public Member Functions inherited from gem5::Clocked | |
void | updateClockPeriod () |
Update the tick to the current tick. | |
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. | |
Cycles | curCycle () const |
Determine the current cycle, corresponding to a tick aligned to a clock edge. | |
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. | |
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 gem5::ruby::Consumer | |
Consumer (ClockedObject *em, Event::Priority ev_prio=Event::Default_Pri) | |
virtual | ~Consumer () |
virtual void | storeEventInfo (int info) |
bool | alreadyScheduled (Tick time) |
ClockedObject * | getObject () |
void | scheduleEventAbsolute (Tick timeAbs) |
void | scheduleEvent (Cycles timeDelta) |
Private Attributes | |
Cycles | m_latency |
uint32_t | m_virtual_networks |
uint32_t | m_vc_per_vnet |
uint32_t | m_num_vcs |
uint32_t | m_bit_width |
GarnetNetwork * | m_network_ptr |
RoutingUnit | routingUnit |
SwitchAllocator | switchAllocator |
CrossbarSwitch | crossbarSwitch |
std::vector< std::shared_ptr< InputUnit > > | m_input_unit |
std::vector< std::shared_ptr< OutputUnit > > | m_output_unit |
statistics::Scalar | m_buffer_reads |
statistics::Scalar | m_buffer_writes |
statistics::Scalar | m_sw_input_arbiter_activity |
statistics::Scalar | m_sw_output_arbiter_activity |
statistics::Scalar | m_crossbar_activity |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::SimObject | |
static void | serializeAll (const std::string &cpt_dir) |
Create a checkpoint by serializing all SimObjects in the system. | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. | |
static void | setSimObjectResolver (SimObjectResolver *resolver) |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
static SimObjectResolver * | getSimObjectResolver () |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Public Attributes inherited from gem5::ClockedObject | |
PowerState * | powerState |
Protected Member Functions inherited from gem5::Drainable | |
Drainable () | |
virtual | ~Drainable () |
virtual void | drainResume () |
Resume execution after a successful drain. | |
void | signalDrainDone () const |
Signal that an object is drained. | |
Protected Member Functions inherited from gem5::Clocked | |
Clocked (ClockDomain &clk_domain) | |
Create a clocked object and set the clock domain based on the parameters. | |
Clocked (Clocked &)=delete | |
Clocked & | operator= (Clocked &)=delete |
virtual | ~Clocked () |
Virtual destructor due to inheritance. | |
void | resetClock () const |
Reset the object's clock using the current global tick value. | |
virtual void | clockPeriodUpdated () |
A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. | |
Protected Attributes inherited from gem5::ruby::BasicRouter | |
uint32_t | m_id |
uint32_t | m_latency |
Protected Attributes inherited from gem5::SimObject | |
const SimObjectParams & | _params |
Cached copy of the object parameters. | |
Protected Attributes inherited from gem5::EventManager | |
EventQueue * | eventq |
A pointer to this object's event queue. | |
typedef GarnetRouterParams gem5::ruby::garnet::Router::Params |
gem5::ruby::garnet::Router::Router | ( | const Params & | p | ) |
Definition at line 51 of file Router.cc.
References m_input_unit, and m_output_unit.
|
default |
void gem5::ruby::garnet::Router::addInPort | ( | PortDirection | inport_dirn, |
NetworkLink * | link, | ||
CreditLink * | credit_link ) |
Definition at line 100 of file Router.cc.
References gem5::ruby::garnet::RoutingUnit::addInDirection(), gem5::ruby::garnet::NetworkLink::bitWidth, fatal_if, get_vc_per_vnet(), gem5::ruby::garnet::InputUnit::getCreditQueue(), m_bit_width, gem5::ruby::BasicRouter::m_id, m_input_unit, gem5::Named::name(), routingUnit, gem5::ruby::garnet::InputUnit::set_credit_link(), gem5::ruby::garnet::InputUnit::set_in_link(), gem5::ruby::garnet::NetworkLink::setLinkConsumer(), gem5::ruby::garnet::NetworkLink::setSourceQueue(), and gem5::ruby::garnet::NetworkLink::setVcsPerVnet().
void gem5::ruby::garnet::Router::addOutPort | ( | PortDirection | outport_dirn, |
NetworkLink * | link, | ||
std::vector< NetDest > & | routing_table_entry, | ||
int | link_weight, | ||
CreditLink * | credit_link, | ||
uint32_t | consumerVcs ) |
Definition at line 123 of file Router.cc.
References gem5::ruby::garnet::RoutingUnit::addOutDirection(), gem5::ruby::garnet::RoutingUnit::addRoute(), gem5::ruby::garnet::RoutingUnit::addWeight(), gem5::ruby::garnet::NetworkLink::bitWidth, fatal_if, gem5::ruby::garnet::OutputUnit::getOutQueue(), m_bit_width, m_output_unit, routingUnit, gem5::ruby::garnet::OutputUnit::set_credit_link(), gem5::ruby::garnet::OutputUnit::set_out_link(), gem5::ruby::garnet::NetworkLink::setLinkConsumer(), gem5::ruby::garnet::NetworkLink::setSourceQueue(), and gem5::ruby::garnet::NetworkLink::setVcsPerVnet().
void gem5::ruby::garnet::Router::collateStats | ( | ) |
Definition at line 222 of file Router.cc.
References crossbarSwitch, gem5::ruby::garnet::CrossbarSwitch::get_crossbar_activity(), gem5::ruby::garnet::SwitchAllocator::get_input_arbiter_activity(), gem5::ruby::garnet::SwitchAllocator::get_output_arbiter_activity(), gem5::ArmISA::i, m_buffer_reads, m_buffer_writes, m_crossbar_activity, m_input_unit, m_sw_input_arbiter_activity, m_sw_output_arbiter_activity, m_virtual_networks, and switchAllocator.
Definition at line 278 of file Router.cc.
References crossbarSwitch, gem5::ruby::garnet::CrossbarSwitch::functionalRead(), functionalRead(), gem5::ArmISA::i, m_input_unit, m_output_unit, and gem5::ArmISA::mask.
Referenced by functionalRead().
uint32_t gem5::ruby::garnet::Router::functionalWrite | ( | Packet * | pkt | ) |
Definition at line 298 of file Router.cc.
References crossbarSwitch, gem5::ruby::garnet::CrossbarSwitch::functionalWrite(), gem5::ArmISA::i, m_input_unit, and m_output_unit.
|
inline |
Definition at line 136 of file Router.hh.
References gem5::ruby::garnet::GarnetNetwork::fault_model, gem5::ruby::FaultModel::fault_prob(), gem5::ruby::BasicRouter::m_id, and m_network_ptr.
Referenced by printAggregateFaultProbability().
|
inline |
Definition at line 132 of file Router.hh.
References gem5::ruby::garnet::GarnetNetwork::fault_model, gem5::ruby::FaultModel::fault_vector(), gem5::ruby::BasicRouter::m_id, and m_network_ptr.
Referenced by printFaultVector().
|
inline |
Definition at line 91 of file Router.hh.
References gem5::ruby::BasicRouter::m_id.
Referenced by gem5::ruby::garnet::SwitchAllocator::arbitrate_outports(), gem5::ruby::garnet::OutputUnit::decrement_credit(), gem5::ruby::garnet::InputUnit::increment_credit(), gem5::ruby::garnet::OutputUnit::increment_credit(), gem5::ruby::garnet::GarnetNetwork::init(), gem5::ruby::garnet::RoutingUnit::outportCompute(), gem5::ruby::garnet::RoutingUnit::outportComputeXY(), gem5::ruby::garnet::CrossbarSwitch::wakeup(), and gem5::ruby::garnet::InputUnit::wakeup().
|
inline |
Definition at line 98 of file Router.hh.
References m_network_ptr.
Referenced by gem5::ruby::garnet::RoutingUnit::lookupRoutingTable(), gem5::ruby::garnet::RoutingUnit::outportCompute(), gem5::ruby::garnet::RoutingUnit::outportComputeXY(), gem5::ruby::garnet::OutputUnit::OutputUnit(), and gem5::ruby::garnet::SwitchAllocator::send_allowed().
|
inline |
Definition at line 89 of file Router.hh.
References m_input_unit.
Referenced by gem5::ruby::garnet::CrossbarSwitch::init(), gem5::ruby::garnet::GarnetNetwork::init(), and gem5::ruby::garnet::SwitchAllocator::init().
|
inline |
Definition at line 90 of file Router.hh.
References m_output_unit.
Referenced by gem5::ruby::garnet::GarnetNetwork::init(), and gem5::ruby::garnet::SwitchAllocator::init().
|
inline |
Definition at line 86 of file Router.hh.
References m_num_vcs.
Referenced by gem5::ruby::garnet::InputUnit::InputUnit(), and gem5::ruby::garnet::SwitchAllocator::SwitchAllocator().
|
inline |
Definition at line 87 of file Router.hh.
References m_virtual_networks.
Referenced by gem5::ruby::garnet::OutputUnit::OutputUnit().
|
inline |
Definition at line 85 of file Router.hh.
References m_latency.
Referenced by gem5::ruby::garnet::InputUnit::wakeup().
|
inline |
Definition at line 88 of file Router.hh.
References m_vc_per_vnet.
Referenced by addInPort(), gem5::ruby::garnet::GarnetNetwork::init(), and gem5::ruby::garnet::SwitchAllocator::SwitchAllocator().
|
inline |
Definition at line 114 of file Router.hh.
References m_bit_width.
Referenced by gem5::ruby::garnet::InputUnit::wakeup().
PortDirection gem5::ruby::garnet::Router::getInportDirection | ( | int | inport | ) |
Definition at line 156 of file Router.cc.
References m_input_unit.
|
inline |
Definition at line 101 of file Router.hh.
References m_input_unit.
Referenced by gem5::ruby::garnet::SwitchAllocator::arbitrate_inports(), gem5::ruby::garnet::SwitchAllocator::arbitrate_outports(), gem5::ruby::garnet::SwitchAllocator::check_for_wakeup(), gem5::ruby::garnet::SwitchAllocator::send_allowed(), and gem5::ruby::garnet::SwitchAllocator::vc_allocate().
PortDirection gem5::ruby::garnet::Router::getOutportDirection | ( | int | outport | ) |
Definition at line 150 of file Router.cc.
References m_output_unit.
|
inline |
Definition at line 108 of file Router.hh.
References m_output_unit.
Referenced by gem5::ruby::garnet::SwitchAllocator::arbitrate_outports(), gem5::ruby::garnet::SwitchAllocator::send_allowed(), gem5::ruby::garnet::SwitchAllocator::vc_allocate(), and gem5::ruby::garnet::CrossbarSwitch::wakeup().
std::string gem5::ruby::garnet::Router::getPortDirectionName | ( | PortDirection | direction | ) |
Definition at line 181 of file Router.cc.
Referenced by gem5::ruby::garnet::SwitchAllocator::arbitrate_outports(), gem5::ruby::garnet::OutputUnit::decrement_credit(), and gem5::ruby::garnet::OutputUnit::increment_credit().
void gem5::ruby::garnet::Router::grant_switch | ( | int | inport, |
flit * | t_flit ) |
Definition at line 168 of file Router.cc.
References crossbarSwitch, and gem5::ruby::garnet::CrossbarSwitch::update_sw_winner().
Referenced by gem5::ruby::garnet::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 gem5::ruby::BasicRouter.
Definition at line 63 of file Router.cc.
References crossbarSwitch, gem5::ruby::BasicRouter::init(), gem5::ruby::garnet::CrossbarSwitch::init(), gem5::ruby::garnet::SwitchAllocator::init(), and switchAllocator.
|
inline |
Definition at line 93 of file Router.hh.
References m_network_ptr.
Referenced by gem5::ruby::garnet::GarnetNetwork::GarnetNetwork().
|
inlinevirtual |
Implements gem5::ruby::Consumer.
void gem5::ruby::garnet::Router::printAggregateFaultProbability | ( | std::ostream & | out | ) |
Definition at line 267 of file Router.cc.
References BASELINE_TEMPERATURE_CELCIUS, get_aggregate_fault_probability(), and gem5::ruby::BasicRouter::m_id.
Referenced by gem5::ruby::garnet::GarnetNetwork::init().
void gem5::ruby::garnet::Router::printFaultVector | ( | std::ostream & | out | ) |
Definition at line 249 of file Router.cc.
References BASELINE_TEMPERATURE_CELCIUS, gem5::ruby::garnet::GarnetNetwork::fault_model, gem5::ruby::FaultModel::fault_type_to_string(), get_fault_vector(), gem5::ruby::BasicRouter::m_id, m_network_ptr, and gem5::ruby::FaultModel::number_of_fault_types.
Referenced by gem5::ruby::garnet::GarnetNetwork::init().
|
virtual |
Callback to set stat parameters.
This callback is typically used for complex stats (e.g., distributions) that need parameters in addition to a name and a description. Stat names and descriptions should typically be set from the constructor usingo from the constructor using the ADD_STAT macro.
Reimplemented from gem5::statistics::Group.
Definition at line 191 of file Router.cc.
References gem5::statistics::DataWrap< Derived, InfoProxyType >::flags(), m_buffer_reads, m_buffer_writes, m_crossbar_activity, m_sw_input_arbiter_activity, m_sw_output_arbiter_activity, gem5::Named::name(), gem5::statistics::DataWrap< Derived, InfoProxyType >::name(), gem5::statistics::nozero, and gem5::statistics::Group::regStats().
|
virtual |
Callback to reset stats.
Reimplemented from gem5::statistics::Group.
Definition at line 238 of file Router.cc.
References crossbarSwitch, gem5::ArmISA::i, m_input_unit, gem5::ruby::garnet::CrossbarSwitch::resetStats(), gem5::ruby::garnet::SwitchAllocator::resetStats(), and switchAllocator.
int gem5::ruby::garnet::Router::route_compute | ( | RouteInfo | route, |
int | inport, | ||
PortDirection | direction ) |
Definition at line 162 of file Router.cc.
References gem5::ruby::garnet::RoutingUnit::outportCompute(), and routingUnit.
Referenced by gem5::ruby::garnet::InputUnit::wakeup().
void gem5::ruby::garnet::Router::schedule_wakeup | ( | Cycles | time | ) |
Definition at line 174 of file Router.cc.
References gem5::ruby::Consumer::scheduleEvent().
Referenced by gem5::ruby::garnet::SwitchAllocator::check_for_wakeup(), and gem5::ruby::garnet::InputUnit::wakeup().
|
virtual |
Implements gem5::ruby::Consumer.
Definition at line 72 of file Router.cc.
References gem5::Clocked::clockEdge(), crossbarSwitch, gem5::curTick(), DPRINTF, gem5::ruby::BasicRouter::m_id, m_input_unit, m_output_unit, switchAllocator, gem5::ruby::garnet::CrossbarSwitch::wakeup(), and gem5::ruby::garnet::SwitchAllocator::wakeup().
|
private |
Definition at line 153 of file Router.hh.
Referenced by collateStats(), functionalRead(), functionalWrite(), grant_switch(), init(), resetStats(), and wakeup().
|
private |
Definition at line 148 of file Router.hh.
Referenced by addInPort(), addOutPort(), and getBitWidth().
|
private |
Definition at line 159 of file Router.hh.
Referenced by collateStats(), and regStats().
|
private |
Definition at line 160 of file Router.hh.
Referenced by collateStats(), and regStats().
|
private |
Definition at line 165 of file Router.hh.
Referenced by collateStats(), and regStats().
|
private |
Definition at line 155 of file Router.hh.
Referenced by addInPort(), collateStats(), functionalRead(), functionalWrite(), get_num_inports(), getInportDirection(), getInputUnit(), resetStats(), Router(), and wakeup().
|
private |
Definition at line 146 of file Router.hh.
Referenced by get_pipe_stages().
|
private |
Definition at line 149 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 147 of file Router.hh.
Referenced by get_num_vcs().
|
private |
Definition at line 156 of file Router.hh.
Referenced by addOutPort(), functionalRead(), functionalWrite(), get_num_outports(), getOutportDirection(), getOutputUnit(), Router(), and wakeup().
|
private |
Definition at line 162 of file Router.hh.
Referenced by collateStats(), and regStats().
|
private |
Definition at line 163 of file Router.hh.
Referenced by collateStats(), and regStats().
|
private |
Definition at line 147 of file Router.hh.
Referenced by get_vc_per_vnet().
|
private |
Definition at line 147 of file Router.hh.
Referenced by collateStats(), and get_num_vnets().
|
private |
Definition at line 151 of file Router.hh.
Referenced by addInPort(), addOutPort(), and route_compute().
|
private |
Definition at line 152 of file Router.hh.
Referenced by collateStats(), init(), resetStats(), and wakeup().