gem5  v22.1.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gem5::ruby::Topology Class Reference

#include <Topology.hh>

Public Member Functions

 Topology (uint32_t num_nodes, uint32_t num_routers, uint32_t num_vnets, const std::vector< BasicExtLink * > &ext_links, const std::vector< BasicIntLink * > &int_links)
 
uint32_t numSwitches () const
 
void createLinks (Network *net)
 
void print (std::ostream &out) const
 

Private Member Functions

void addLink (SwitchID src, SwitchID dest, BasicLink *link, PortDirection src_outport_dirn="", PortDirection dest_inport_dirn="")
 
void makeLink (Network *net, SwitchID src, SwitchID dest, std::vector< NetDest > &routing_table_entry)
 
void extend_shortest_path (Matrix &current_dist, Matrix &latencies, Matrix &inter_switches)
 
Matrix shortest_path (const Matrix &weights, Matrix &latencies, Matrix &inter_switches)
 
bool link_is_shortest_path_to_node (SwitchID src, SwitchID next, SwitchID final, const Matrix &weights, const Matrix &dist, int vnet)
 
NetDest shortest_path_to_node (SwitchID src, SwitchID next, const Matrix &weights, const Matrix &dist, int vnet)
 

Private Attributes

const uint32_t m_nodes
 
const uint32_t m_number_of_switches
 
int m_vnets
 
std::vector< BasicExtLink * > m_ext_link_vector
 
std::vector< BasicIntLink * > m_int_link_vector
 
LinkMap m_link_map
 

Detailed Description

Definition at line 78 of file Topology.hh.

Constructor & Destructor Documentation

◆ Topology()

gem5::ruby::Topology::Topology ( uint32_t  num_nodes,
uint32_t  num_routers,
uint32_t  num_vnets,
const std::vector< BasicExtLink * > &  ext_links,
const std::vector< BasicIntLink * > &  int_links 
)

Member Function Documentation

◆ addLink()

void gem5::ruby::Topology::addLink ( SwitchID  src,
SwitchID  dest,
BasicLink link,
PortDirection  src_outport_dirn = "",
PortDirection  dest_inport_dirn = "" 
)
private

◆ createLinks()

void gem5::ruby::Topology::createLinks ( Network net)

◆ extend_shortest_path()

void gem5::ruby::Topology::extend_shortest_path ( Matrix current_dist,
Matrix latencies,
Matrix inter_switches 
)
private

Definition at line 336 of file Topology.cc.

References gem5::ArmISA::i, gem5::ArmISA::j, gem5::MipsISA::k, m_vnets, and gem5::VegaISA::v.

Referenced by shortest_path().

◆ link_is_shortest_path_to_node()

bool gem5::ruby::Topology::link_is_shortest_path_to_node ( SwitchID  src,
SwitchID  next,
SwitchID  final,
const Matrix weights,
const Matrix dist,
int  vnet 
)
private

Definition at line 403 of file Topology.cc.

References gem5::statistics::dist.

Referenced by shortest_path_to_node().

◆ makeLink()

void gem5::ruby::Topology::makeLink ( Network net,
SwitchID  src,
SwitchID  dest,
std::vector< NetDest > &  routing_table_entry 
)
private

◆ numSwitches()

uint32_t gem5::ruby::Topology::numSwitches ( ) const
inline

Definition at line 85 of file Topology.hh.

References m_number_of_switches.

◆ print()

void gem5::ruby::Topology::print ( std::ostream &  out) const
inline

Definition at line 87 of file Topology.hh.

Referenced by gem5::ruby::operator<<().

◆ shortest_path()

Matrix gem5::ruby::Topology::shortest_path ( const Matrix weights,
Matrix latencies,
Matrix inter_switches 
)
private

Definition at line 394 of file Topology.cc.

References gem5::statistics::dist, and extend_shortest_path().

Referenced by createLinks().

◆ shortest_path_to_node()

NetDest gem5::ruby::Topology::shortest_path_to_node ( SwitchID  src,
SwitchID  next,
const Matrix weights,
const Matrix dist,
int  vnet 
)
private

Member Data Documentation

◆ m_ext_link_vector

std::vector<BasicExtLink*> gem5::ruby::Topology::m_ext_link_vector
private

Definition at line 115 of file Topology.hh.

◆ m_int_link_vector

std::vector<BasicIntLink*> gem5::ruby::Topology::m_int_link_vector
private

Definition at line 116 of file Topology.hh.

Referenced by Topology().

◆ m_link_map

LinkMap gem5::ruby::Topology::m_link_map
private

Definition at line 118 of file Topology.hh.

Referenced by addLink(), createLinks(), and makeLink().

◆ m_nodes

const uint32_t gem5::ruby::Topology::m_nodes
private

Definition at line 111 of file Topology.hh.

Referenced by addLink(), makeLink(), and Topology().

◆ m_number_of_switches

const uint32_t gem5::ruby::Topology::m_number_of_switches
private

Definition at line 112 of file Topology.hh.

Referenced by addLink(), and numSwitches().

◆ m_vnets

int gem5::ruby::Topology::m_vnets
private

Definition at line 113 of file Topology.hh.

Referenced by createLinks(), extend_shortest_path(), and makeLink().


The documentation for this class was generated from the following files:

Generated on Wed Dec 21 2022 10:24:23 for gem5 by doxygen 1.9.1