gem5
v20.1.0.0
|
#include <RoutingUnit.hh>
Public Member Functions | |
RoutingUnit (Router *router) | |
int | outportCompute (RouteInfo route, int inport, PortDirection inport_dirn) |
void | addRoute (std::vector< NetDest > &routing_table_entry) |
void | addWeight (int link_weight) |
int | lookupRoutingTable (int vnet, NetDest net_dest) |
void | addInDirection (PortDirection inport_dirn, int inport) |
void | addOutDirection (PortDirection outport_dirn, int outport) |
int | outportComputeXY (RouteInfo route, int inport, PortDirection inport_dirn) |
int | outportComputeCustom (RouteInfo route, int inport, PortDirection inport_dirn) |
bool | supportsVnet (int vnet, std::vector< int > sVnets) |
Private Attributes | |
Router * | m_router |
std::vector< std::vector< NetDest > > | m_routing_table |
std::vector< int > | m_weight_table |
std::map< PortDirection, int > | m_inports_dirn2idx |
std::map< int, PortDirection > | m_inports_idx2dirn |
std::map< int, PortDirection > | m_outports_idx2dirn |
std::map< PortDirection, int > | m_outports_dirn2idx |
Definition at line 43 of file RoutingUnit.hh.
RoutingUnit::RoutingUnit | ( | Router * | router | ) |
Definition at line 39 of file RoutingUnit.cc.
References m_router, m_routing_table, and m_weight_table.
void RoutingUnit::addInDirection | ( | PortDirection | inport_dirn, |
int | inport | ||
) |
Definition at line 139 of file RoutingUnit.cc.
References m_inports_dirn2idx, and m_inports_idx2dirn.
Referenced by Router::addInPort().
void RoutingUnit::addOutDirection | ( | PortDirection | outport_dirn, |
int | outport | ||
) |
Definition at line 146 of file RoutingUnit.cc.
References m_outports_dirn2idx, and m_outports_idx2dirn.
Referenced by Router::addOutPort().
void RoutingUnit::addRoute | ( | std::vector< NetDest > & | routing_table_entry | ) |
Definition at line 47 of file RoutingUnit.cc.
References m_routing_table, and ArmISA::v.
Referenced by Router::addOutPort().
void RoutingUnit::addWeight | ( | int | link_weight | ) |
Definition at line 58 of file RoutingUnit.cc.
References m_weight_table.
Referenced by Router::addOutPort().
int RoutingUnit::lookupRoutingTable | ( | int | vnet, |
NetDest | net_dest | ||
) |
Definition at line 87 of file RoutingUnit.cc.
References X86ISA::exit, fatal, Router::get_net_ptr(), INFINITE_, NetDest::intersectionIsNotEmpty(), m_router, m_routing_table, and m_weight_table.
Referenced by outportCompute().
int RoutingUnit::outportCompute | ( | RouteInfo | route, |
int | inport, | ||
PortDirection | inport_dirn | ||
) |
Definition at line 159 of file RoutingUnit.cc.
References CUSTOM_, RouteInfo::dest_router, Router::get_id(), Router::get_net_ptr(), GarnetNetwork::getRoutingAlgorithm(), lookupRoutingTable(), m_router, RouteInfo::net_dest, outportComputeCustom(), outportComputeXY(), TABLE_, RouteInfo::vnet, and XY_.
Referenced by Router::route_compute().
int RoutingUnit::outportComputeCustom | ( | RouteInfo | route, |
int | inport, | ||
PortDirection | inport_dirn | ||
) |
int RoutingUnit::outportComputeXY | ( | RouteInfo | route, |
int | inport, | ||
PortDirection | inport_dirn | ||
) |
Definition at line 198 of file RoutingUnit.cc.
References RouteInfo::dest_router, Router::get_id(), Router::get_net_ptr(), GarnetNetwork::getNumCols(), GarnetNetwork::getNumRows(), m_outports_dirn2idx, m_router, and panic.
Referenced by outportCompute().
bool RoutingUnit::supportsVnet | ( | int | vnet, |
std::vector< int > | sVnets | ||
) |
Definition at line 64 of file RoutingUnit.cc.
|
private |
Definition at line 85 of file RoutingUnit.hh.
Referenced by addInDirection().
|
private |
Definition at line 86 of file RoutingUnit.hh.
Referenced by addInDirection().
|
private |
Definition at line 88 of file RoutingUnit.hh.
Referenced by addOutDirection(), and outportComputeXY().
|
private |
Definition at line 87 of file RoutingUnit.hh.
Referenced by addOutDirection().
|
private |
Definition at line 78 of file RoutingUnit.hh.
Referenced by lookupRoutingTable(), outportCompute(), outportComputeXY(), and RoutingUnit().
|
private |
Definition at line 81 of file RoutingUnit.hh.
Referenced by addRoute(), lookupRoutingTable(), and RoutingUnit().
|
private |
Definition at line 82 of file RoutingUnit.hh.
Referenced by addWeight(), lookupRoutingTable(), and RoutingUnit().