gem5  v20.1.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 74 of file Topology.hh.

Constructor & Destructor Documentation

◆ Topology()

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 Topology::addLink ( SwitchID  src,
SwitchID  dest,
BasicLink link,
PortDirection  src_outport_dirn = "",
PortDirection  dest_inport_dirn = "" 
)
private

◆ createLinks()

void Topology::createLinks ( Network net)

◆ extend_shortest_path()

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

Definition at line 332 of file Topology.cc.

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

Referenced by shortest_path().

◆ link_is_shortest_path_to_node()

bool 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 399 of file Topology.cc.

References Stats::dist.

Referenced by shortest_path_to_node().

◆ makeLink()

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

◆ numSwitches()

uint32_t Topology::numSwitches ( ) const
inline

Definition at line 81 of file Topology.hh.

References m_number_of_switches.

◆ print()

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

Definition at line 83 of file Topology.hh.

Referenced by operator<<().

◆ shortest_path()

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

Definition at line 390 of file Topology.cc.

References Stats::dist, and extend_shortest_path().

Referenced by createLinks().

◆ shortest_path_to_node()

NetDest 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*> Topology::m_ext_link_vector
private

Definition at line 111 of file Topology.hh.

◆ m_int_link_vector

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

Definition at line 112 of file Topology.hh.

Referenced by Topology().

◆ m_link_map

LinkMap Topology::m_link_map
private

Definition at line 114 of file Topology.hh.

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

◆ m_nodes

const uint32_t Topology::m_nodes
private

Definition at line 107 of file Topology.hh.

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

◆ m_number_of_switches

const uint32_t Topology::m_number_of_switches
private

Definition at line 108 of file Topology.hh.

Referenced by addLink(), and numSwitches().

◆ m_vnets

int Topology::m_vnets
private

Definition at line 109 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 Sep 30 2020 14:02:33 for gem5 by doxygen 1.8.17