gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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_routers, 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, const NetDest &routing_table_entry)
 
void extend_shortest_path (Matrix &current_dist, Matrix &latencies, Matrix &inter_switches)
 
std::vector< std::vector< int > > 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)
 
NetDest shortest_path_to_node (SwitchID src, SwitchID next, const Matrix &weights, const Matrix &dist)
 

Private Attributes

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

Detailed Description

Definition at line 66 of file Topology.hh.

Constructor & Destructor Documentation

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

Member Function Documentation

void Topology::addLink ( SwitchID  src,
SwitchID  dest,
BasicLink link,
PortDirection  src_outport_dirn = "",
PortDirection  dest_inport_dirn = "" 
)
private
void Topology::createLinks ( Network net)
void Topology::extend_shortest_path ( Matrix current_dist,
Matrix latencies,
Matrix inter_switches 
)
private

Definition at line 220 of file Topology.cc.

References ArmISA::i, ArmISA::j, MipsISA::k, and X86ISA::size().

Referenced by shortest_path().

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

Definition at line 267 of file Topology.cc.

Referenced by shortest_path_to_node().

void Topology::makeLink ( Network net,
SwitchID  src,
SwitchID  dest,
const NetDest routing_table_entry 
)
private
uint32_t Topology::numSwitches ( ) const
inline

Definition at line 72 of file Topology.hh.

References m_number_of_switches.

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

Definition at line 74 of file Topology.hh.

Referenced by operator<<().

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

Definition at line 258 of file Topology.cc.

References Stats::dist, and extend_shortest_path().

Referenced by createLinks().

NetDest Topology::shortest_path_to_node ( SwitchID  src,
SwitchID  next,
const Matrix weights,
const Matrix dist 
)
private

Definition at line 275 of file Topology.cc.

References NetDest::add(), ArmISA::d, DPRINTF, ArmISA::i, link_is_shortest_path_to_node(), and ArmISA::m.

Referenced by createLinks().

Member Data Documentation

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

Definition at line 99 of file Topology.hh.

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

Definition at line 100 of file Topology.hh.

Referenced by Topology().

LinkMap Topology::m_link_map
private

Definition at line 102 of file Topology.hh.

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

const uint32_t Topology::m_nodes
private

Definition at line 96 of file Topology.hh.

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

const uint32_t Topology::m_number_of_switches
private

Definition at line 97 of file Topology.hh.

Referenced by addLink(), and numSwitches().


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

Generated on Fri Jun 9 2017 13:04:21 for gem5 by doxygen 1.8.6