SST/macro
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
sstmac::hw::tiled_dragonfly Class Reference

#include <tiled_dragonfly.h>

Inheritance diagram for sstmac::hw::tiled_dragonfly:
Inheritance graph
Collaboration diagram for sstmac::hw::tiled_dragonfly:
Collaboration graph

Classes

struct  connection
 

Public Member Functions

virtual std::string to_string () const
 
virtual ~tiled_dragonfly ()
 
virtual void init_factory_params (sprockit::sim_parameters *params)
 
void connect_objects (internal_connectable_map &switches)
 Given a set of connectables, connect them appropriately. More...
 
void configure_geometric_paths (std::vector< int > &redundancies)
 configure_geometric_paths For all possible geometric or structure paths, compute their redundances in terms of number of ports that go in the same geometric or structural direction, e.g. More...
 
virtual void minimal_routes_to_switch (switch_id current_sw_addr, switch_id dest_sw_addr, structured_routable::path &current_path, structured_routable::path_set &paths) const
 
virtual void minimal_routes_to_coords (const coordinates &src_coords, const coordinates &dest_coords, structured_routable::path &current_path, structured_routable::path_set &paths) const
 
virtual bool xy_connected_to_group (int myX, int myY, int myG, int dstg) const
 
switch_id endpoint_to_injection_switch (node_id nodeaddr, int ports[], int &num_ports) const
 
switch_id endpoint_to_ejection_switch (node_id nodeaddr, int ports[], int &num_ports) const
 
virtual void eject_paths_on_switch (node_id dest_addr, switch_id sw_addr, structured_routable::path_set &paths) const
 
virtual void minimal_route_to_coords (const coordinates &current_coords, const coordinates &dest_coords, structured_routable::path &path) const
 Workhorse function for implementing minimal_route_to_switch and #minimal_route_to_node. More...
 
virtual int port (int replica, int dim, int dir)
 
virtual int convert_to_port (int dim, int dir) const
 
- Public Member Functions inherited from sstmac::hw::dragonfly
dimension_t dim_for_port (int port)
 
virtual ~dragonfly ()
 
void init_common_params (sprockit::sim_parameters *params)
 
int ndimensions () const
 The number of distinct 'dimensions' in the topology. More...
 
int numX () const
 
int numY () const
 
int numG () const
 
int group_con () const
 
void get_coords (long uid, int &x, int &y, int &g) const
 
long get_uid (int x, int y, int g) const
 
switch_id switch_number (const coordinates &coords) const
 
virtual int num_switches () const
 
int num_leaf_switches () const
 Structured topologies can be direct (torus) or indirect (fat tree). More...
 
virtual int diameter () const
 
coordinates neighbor_at_port (switch_id sid, int port) const
 
virtual switch_id random_intermediate_switch (switch_id current_sw, switch_id dest_sw=switch_id(-1))
 
void configure_vc_routing (std::map< routing::algorithm_t, int > &m) const
 
virtual void productive_path (int dim, const coordinates &src, const coordinates &dst, structured_routable::path &path) const
 
int minimal_distance (const coordinates &src_coords, const coordinates &dest_coords) const
 The function accepts either source or node coordinates. More...
 
void nearest_neighbor_partners (const coordinates &src_sw_coords, int port, std::vector< node_id > &partners) const
 
void bit_complement_partners (const coordinates &src_sw_coords, int port, std::vector< node_id > &partners) const
 
void tornado_send_partners (const coordinates &src_sw_coords, int port, std::vector< node_id > &partners) const
 
void tornado_recv_partners (const coordinates &src_sw_coords, int port, std::vector< node_id > &partners) const
 
virtual void new_routing_stage (structured_routable *rtbl)
 
- Public Member Functions inherited from sstmac::hw::structured_topology
virtual ~structured_topology ()
 
virtual void build_internal_connectables (internal_connectable_map &connectables, sprockit::factory< connectable > *factory, partition *part, int my_rank, sprockit::sim_parameters *params, connectable *dummy)
 
virtual void build_endpoint_connectables (end_point_connectable_map &connectables, sprockit::factory< connectable > *factory, partition *part, int my_rank, sprockit::sim_parameters *params)
 
virtual void build_interface_connectables (int conc, end_point_connectable_map &connectables, sprockit::factory2< connectable > *nic_factory, partition *part, int my_rank, sprockit::sim_parameters *params, sprockit::factory_type *interconnect)
 
virtual int endpoints_per_switch (switch_id addr) const
 Given a switch address, return number of nodes connected to it. More...
 
virtual int num_nodes () const
 
virtual int num_endpoints () const
 
coordinates switch_coords (switch_id swid) const
 Compute coordinates (e.g. More...
 
virtual coordinates node_coords (node_id nid) const
 Compute coordinates (e.g. More...
 
coordinates endpoint_coords (node_id nid) const
 
virtual switch_id endpoint_to_ejection_switch (node_id nodeaddr, int &switch_port) const
 
virtual switch_id endpoint_to_injection_switch (node_id nodeaddr, int &switch_port) const
 
virtual int endpoint_to_ejection_port (node_id addr) const
 
virtual int endpoint_to_injection_port (node_id addr) const
 
virtual int endpoint_to_switch_port (node_id nid) const
 
void finalize_init ()
 
virtual void productive_paths (structured_routable::path_set &paths, const coordinates &current, const coordinates &dst)
 
std::string label (node_id nid) const
 
std::string label (switch_id sid) const
 
virtual void minimal_route_to_switch (switch_id current_sw_addr, switch_id dest_sw_addr, structured_routable::path &path) const
 Implementation of topology::minimal_route_to_switch. More...
 
virtual int num_hops_to_node (node_id src, node_id dst) const
 
virtual std::vector< node_idnodes_connected_to_injection_switch (switch_id swaddr) const
 
virtual std::vector< node_idnodes_connected_to_ejection_switch (switch_id swid) const
 
virtual node_id node_addr (const coordinates &coords) const
 
virtual node_id node_addr (const coordinates &sw_coords, int port) const
 
virtual void send_partners (traffic_pattern::type_t ty, node_id src_node, std::vector< node_id > &partners) const
 
virtual void recv_partners (traffic_pattern::type_t ty, node_id src_node, std::vector< node_id > &partners) const
 

Private Types

typedef std::pair< int, int > xy_t
 
typedef std::list< xy_txy_list_t
 
typedef xy_list_t::iterator xy_list_iter
 
typedef std::vector< xy_list_t * > coor_xy_map_t
 
typedef std::vector< coor_xy_map_t * > conn_map_t
 
typedef std::map< int, xy_list_t * > coormap_xy_map_t
 
typedef std::vector< coormap_xy_map_t * > gconn_map_t
 
typedef struct sstmac::hw::tiled_dragonfly::connection connection
 

Private Member Functions

int xy_to_int (xy_t xy) const
 
void read_intragroup_connections ()
 
void read_intergroup_connections ()
 
void make_intragroup_connections (internal_connectable_map &objects)
 
void make_intergroup_connections (internal_connectable_map &objects)
 
void make_geomid ()
 
void check_switch_x (int n)
 
void check_switch_y (int n)
 
void check_switch_g (int n)
 
void check_port_x (int n)
 
void check_port_y (int n)
 
void check_switch_xyg (int x, int y, int g)
 
void check_port_xy (int x, int y)
 

Private Attributes

std::list< connectionintragrp_conns_
 
std::list< connectionintergrp_conns_
 
conn_map_t intragrp_conn_map_
 
gconn_map_t intergrp_conn_map_
 
std::string intragroup_file_
 
std::string intergroup_file_
 
int tiles_x_
 
int tiles_y_
 
int tiles_inj_
 
std::vector< int > injection_ports_
 
std::map< int, int > port_to_geomid_
 
std::vector< std::set< int > > switch_to_connected_groups_
 
int n_tiles_
 

Additional Inherited Members

- Public Types inherited from sstmac::hw::dragonfly
enum  dimension_t { x_dimension = 0, y_dimension = 1, g_dimension = 2 }
 
enum  x_vc_t { upX_vc = 0, downX_vc = 1 }
 
enum  y_vc_t { upY_vc = 0, downY_vc = 1 }
 
- Protected Member Functions inherited from sstmac::hw::dragonfly
void minimal_route_to_group (int myX, int myY, int myG, int &dim, int &dir, int dstg) const
 
virtual void find_path_to_group (int myX, int myY, int myG, int &dsty, int &dstx, int dstg) const
 
int minimal_route_to_X (int hisx) const
 
int minimal_route_to_Y (int hisy) const
 
virtual void compute_switch_coords (switch_id uid, coordinates &coords) const
 Compute coordinates (e.g. More...
 
int find_y_path_to_group (int myX, int myG, int dstg) const
 
int find_x_path_to_group (int myY, int myG, int dstg) const
 
int xyg_dir_to_group (int myX, int myY, int myG, int dir) const
 
- Protected Member Functions inherited from sstmac::hw::structured_topology
void configure_injection_geometry (std::vector< int > &redundancies)
 
virtual std::vector< node_idnodes_connected_to_switch (switch_id swaddr) const
 
 structured_topology ()
 
void partners (bool get_send_partner, traffic_pattern::type_t ty, node_id src, std::vector< node_id > &partner_list) const
 
- Static Protected Member Functions inherited from sstmac::hw::dragonfly
static std::string set_string (int x, int y, int g)
 
- Protected Attributes inherited from sstmac::hw::dragonfly
int x_
 
int y_
 
int g_
 
int group_con_
 
bool true_random_intermediate_
 
- Protected Attributes inherited from sstmac::hw::cartesian_topology
std::vector< int > red_
 The number of redundant links (ports) comprising a geometric or structure direction in the topology. More...
 
- Protected Attributes inherited from sstmac::hw::structured_topology
int eject_geometric_id_
 
int injection_redundancy_
 
bool outputgraph_
 

Detailed Description

Definition at line 21 of file tiled_dragonfly.h.

Member Typedef Documentation

typedef std::vector< coor_xy_map_t* > sstmac::hw::tiled_dragonfly::conn_map_t
private

Definition at line 29 of file tiled_dragonfly.h.

typedef std::vector< xy_list_t* > sstmac::hw::tiled_dragonfly::coor_xy_map_t
private

Definition at line 28 of file tiled_dragonfly.h.

typedef std::map<int, xy_list_t* > sstmac::hw::tiled_dragonfly::coormap_xy_map_t
private

Definition at line 30 of file tiled_dragonfly.h.

Definition at line 31 of file tiled_dragonfly.h.

typedef xy_list_t::iterator sstmac::hw::tiled_dragonfly::xy_list_iter
private

Definition at line 27 of file tiled_dragonfly.h.

typedef std::list<xy_t> sstmac::hw::tiled_dragonfly::xy_list_t
private

Definition at line 26 of file tiled_dragonfly.h.

typedef std::pair<int,int> sstmac::hw::tiled_dragonfly::xy_t
private

Definition at line 25 of file tiled_dragonfly.h.

Constructor & Destructor Documentation

virtual sstmac::hw::tiled_dragonfly::~tiled_dragonfly ( )
inlinevirtual

Member Function Documentation

void sstmac::hw::tiled_dragonfly::check_port_x ( int  n)
inlineprivate

Definition at line 162 of file tiled_dragonfly.h.

References spkt_throw_printf.

Referenced by check_port_xy().

void sstmac::hw::tiled_dragonfly::check_port_xy ( int  x,
int  y 
)
inlineprivate

Definition at line 183 of file tiled_dragonfly.h.

References check_port_x(), and check_port_y().

Here is the call graph for this function:

void sstmac::hw::tiled_dragonfly::check_port_y ( int  n)
inlineprivate

Definition at line 169 of file tiled_dragonfly.h.

References spkt_throw_printf.

Referenced by check_port_xy().

void sstmac::hw::tiled_dragonfly::check_switch_g ( int  n)
inlineprivate

Definition at line 155 of file tiled_dragonfly.h.

References sstmac::hw::dragonfly::g_, and spkt_throw_printf.

Referenced by check_switch_xyg().

void sstmac::hw::tiled_dragonfly::check_switch_x ( int  n)
inlineprivate

Definition at line 141 of file tiled_dragonfly.h.

References spkt_throw_printf, and sstmac::hw::dragonfly::x_.

Referenced by check_switch_xyg().

void sstmac::hw::tiled_dragonfly::check_switch_xyg ( int  x,
int  y,
int  g 
)
inlineprivate

Definition at line 176 of file tiled_dragonfly.h.

References check_switch_g(), check_switch_x(), and check_switch_y().

Here is the call graph for this function:

void sstmac::hw::tiled_dragonfly::check_switch_y ( int  n)
inlineprivate

Definition at line 148 of file tiled_dragonfly.h.

References spkt_throw_printf, and sstmac::hw::dragonfly::y_.

Referenced by check_switch_xyg().

void sstmac::hw::tiled_dragonfly::configure_geometric_paths ( std::vector< int > &  redundancies)
virtual

configure_geometric_paths For all possible geometric or structure paths, compute their redundances in terms of number of ports that go in the same geometric or structural direction, e.g.

might be 3 ports that all go +X on a router

Parameters
[in,out]redundancies

Reimplemented from sstmac::hw::dragonfly.

Referenced by ~tiled_dragonfly().

void sstmac::hw::tiled_dragonfly::connect_objects ( internal_connectable_map &  objects)
virtual

Given a set of connectables, connect them appropriately.

Parameters
objectsThe set of objects to connect
clonerIf in parallel mode, not all objects may exist. The factory creates missing objects.
Exceptions
value_errorIf invalid switchid is passed to cloner

Reimplemented from sstmac::hw::dragonfly.

Referenced by ~tiled_dragonfly().

virtual int sstmac::hw::tiled_dragonfly::convert_to_port ( int  dim,
int  dir 
) const
virtual

Reimplemented from sstmac::hw::dragonfly.

Referenced by ~tiled_dragonfly().

virtual void sstmac::hw::tiled_dragonfly::eject_paths_on_switch ( node_id  dest_addr,
switch_id  sw_addr,
structured_routable::path_set paths 
) const
virtual

Reimplemented from sstmac::hw::structured_topology.

Referenced by ~tiled_dragonfly().

switch_id sstmac::hw::tiled_dragonfly::endpoint_to_ejection_switch ( node_id  nodeaddr,
int  ports[],
int &  num_ports 
) const

Referenced by ~tiled_dragonfly().

switch_id sstmac::hw::tiled_dragonfly::endpoint_to_injection_switch ( node_id  nodeaddr,
int  ports[],
int &  num_ports 
) const

Referenced by ~tiled_dragonfly().

virtual void sstmac::hw::tiled_dragonfly::init_factory_params ( sprockit::sim_parameters *  params)
virtual

Reimplemented from sstmac::hw::dragonfly.

Referenced by ~tiled_dragonfly().

void sstmac::hw::tiled_dragonfly::make_geomid ( )
private

Referenced by xy_to_int().

void sstmac::hw::tiled_dragonfly::make_intergroup_connections ( internal_connectable_map &  objects)
private

Referenced by xy_to_int().

void sstmac::hw::tiled_dragonfly::make_intragroup_connections ( internal_connectable_map &  objects)
private

Referenced by xy_to_int().

virtual void sstmac::hw::tiled_dragonfly::minimal_route_to_coords ( const coordinates src_coords,
const coordinates dest_coords,
structured_routable::path path 
) const
virtual

Workhorse function for implementing minimal_route_to_switch and #minimal_route_to_node.

Given source/dest coordinates, find the minimal path.

Parameters
current_sw_addrThe addr of the current switch
dest_sw_addrThe addr of the destination switch
path[inout] A complete path descriptor to the destination switch

Reimplemented from sstmac::hw::dragonfly.

Referenced by ~tiled_dragonfly().

virtual void sstmac::hw::tiled_dragonfly::minimal_routes_to_coords ( const coordinates src_coords,
const coordinates dest_coords,
structured_routable::path current_path,
structured_routable::path_set paths 
) const
virtual

Reimplemented from sstmac::hw::structured_topology.

Referenced by ~tiled_dragonfly().

virtual void sstmac::hw::tiled_dragonfly::minimal_routes_to_switch ( switch_id  current_sw_addr,
switch_id  dest_sw_addr,
structured_routable::path current_path,
structured_routable::path_set paths 
) const
virtual

Reimplemented from sstmac::hw::cartesian_topology.

Referenced by ~tiled_dragonfly().

virtual int sstmac::hw::tiled_dragonfly::port ( int  replica,
int  dim,
int  dir 
)
virtual

Referenced by ~tiled_dragonfly().

void sstmac::hw::tiled_dragonfly::read_intergroup_connections ( )
private

Referenced by xy_to_int().

void sstmac::hw::tiled_dragonfly::read_intragroup_connections ( )
private

Referenced by xy_to_int().

virtual std::string sstmac::hw::tiled_dragonfly::to_string ( ) const
inlinevirtual

Reimplemented from sstmac::hw::dragonfly.

Definition at line 59 of file tiled_dragonfly.h.

virtual bool sstmac::hw::tiled_dragonfly::xy_connected_to_group ( int  myX,
int  myY,
int  myG,
int  dstg 
) const
virtual

Reimplemented from sstmac::hw::dragonfly.

Referenced by ~tiled_dragonfly().

int sstmac::hw::tiled_dragonfly::xy_to_int ( xy_t  xy) const
inlineprivate

Member Data Documentation

std::vector<int> sstmac::hw::tiled_dragonfly::injection_ports_
private

Definition at line 51 of file tiled_dragonfly.h.

std::string sstmac::hw::tiled_dragonfly::intergroup_file_
private

Definition at line 49 of file tiled_dragonfly.h.

gconn_map_t sstmac::hw::tiled_dragonfly::intergrp_conn_map_
mutableprivate

Definition at line 46 of file tiled_dragonfly.h.

std::list<connection> sstmac::hw::tiled_dragonfly::intergrp_conns_
private

Definition at line 44 of file tiled_dragonfly.h.

std::string sstmac::hw::tiled_dragonfly::intragroup_file_
private

Definition at line 48 of file tiled_dragonfly.h.

conn_map_t sstmac::hw::tiled_dragonfly::intragrp_conn_map_
mutableprivate

Definition at line 45 of file tiled_dragonfly.h.

std::list<connection> sstmac::hw::tiled_dragonfly::intragrp_conns_
private

Definition at line 43 of file tiled_dragonfly.h.

int sstmac::hw::tiled_dragonfly::n_tiles_
private

Definition at line 54 of file tiled_dragonfly.h.

std::map<int,int> sstmac::hw::tiled_dragonfly::port_to_geomid_
mutableprivate

Definition at line 52 of file tiled_dragonfly.h.

std::vector< std::set<int> > sstmac::hw::tiled_dragonfly::switch_to_connected_groups_
private

Definition at line 53 of file tiled_dragonfly.h.

int sstmac::hw::tiled_dragonfly::tiles_inj_
private

Definition at line 50 of file tiled_dragonfly.h.

int sstmac::hw::tiled_dragonfly::tiles_x_
private

Definition at line 50 of file tiled_dragonfly.h.

int sstmac::hw::tiled_dragonfly::tiles_y_
private

Definition at line 50 of file tiled_dragonfly.h.


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