SST/macro
Public Member Functions | Protected Types | Protected Member Functions | List of all members
sstmac::hw::valiant_router Class Reference

The valiant_router class Enacpsulates a router that performs oblivious, global routing according to "A Scheme for Fast Parallel Computation" by Valiant. More...

#include <valiant_routing.h>

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

Public Member Functions

 valiant_router ()
 
virtual ~valiant_router ()
 
virtual void route (packet *pkt)
 
virtual void route (packet *pkt, structured_routable::path_set &paths)
 
virtual std::string to_string () const
 
virtual void finalize_init ()
 
virtual int first_stage_vc (int topology_vc)
 The topology object specifies a virtual channel based purely on geometry. More...
 
virtual int second_stage_vc (int topology_vc)
 The topology object specifies a virtual channel based purely on geometry. More...
 
- Public Member Functions inherited from sstmac::hw::minimal_router
 minimal_router ()
 
virtual ~minimal_router ()
 
std::string to_string () const
 
virtual void set_topology (topology *top)
 set_topology Set the topology to be used for route computations. More...
 
- Public Member Functions inherited from sstmac::hw::structured_router
virtual ~structured_router ()
 
virtual void set_switch (network_switch *sw)
 set_switch Set the parent switch using this router to perform route computations More...
 
void minimal_route_to_node (node_id node_addr, structured_routable::path &path)
 
void minimal_routes_to_node (node_id node_addr, structured_routable::path &current_path, structured_routable::path_set &paths)
 minimal_routes_to_node Special version of routing function that computes all possible minimal paths. More...
 
virtual void minimal_route_to_switch (switch_id sw_addr, structured_routable::path &path)
 
virtual void productive_paths_to_switch (switch_id dst, structured_routable::path_set &paths)
 

Protected Types

enum  next_action_t { minimal, intermediate_switch, final_node }
 

Protected Member Functions

 valiant_router (routing::algorithm_t algo)
 
next_action_t intermediate_step (structured_routable *rtbl, packet *pkt)
 intermediate_step More...
 
virtual next_action_t initial_step (structured_routable *rtbl, packet *pkt)
 Different for pure valiant and UGAL. More...
 
next_action_t next_routing_stage (packet *pkt)
 next_routing_stage Figure out which action is required for the packet More...
 
void configure_intermediate_path (structured_routable::path &path)
 configure_intermediate_path Once the packet has switched to Valiant, compute a path to the chosen intermediate switch More...
 
void configure_final_path (structured_routable::path &path)
 configure_final_path Once the packet has switched to Valiant and reached the intermediate switch, compute a path to the final ejection switch More...
 
void route_valiant (packet *pkt)
 route_valiant Figure out if in intermediate or final stage and make appropriate routing computation More...
 
- Protected Member Functions inherited from sstmac::hw::minimal_router
 minimal_router (routing::algorithm_t algo)
 
- Protected Member Functions inherited from sstmac::hw::structured_router
 structured_router (routing::algorithm_t algo)
 

Additional Inherited Members

- Protected Attributes inherited from sstmac::hw::structured_router
structured_topologyregtop_
 

Detailed Description

The valiant_router class Enacpsulates a router that performs oblivious, global routing according to "A Scheme for Fast Parallel Computation" by Valiant.

Definition at line 14 of file valiant_routing.h.

Member Enumeration Documentation

Enumerator
minimal 
intermediate_switch 
final_node 

Definition at line 71 of file valiant_routing.h.

Constructor & Destructor Documentation

sstmac::hw::valiant_router::valiant_router ( )
inline

Definition at line 17 of file valiant_routing.h.

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

Definition at line 21 of file valiant_routing.h.

References route().

Here is the call graph for this function:

sstmac::hw::valiant_router::valiant_router ( routing::algorithm_t  algo)
inlineprotected

Definition at line 68 of file valiant_routing.h.

Member Function Documentation

void sstmac::hw::valiant_router::configure_final_path ( structured_routable::path path)
protected

configure_final_path Once the packet has switched to Valiant and reached the intermediate switch, compute a path to the final ejection switch

Parameters
path
void sstmac::hw::valiant_router::configure_intermediate_path ( structured_routable::path path)
protected

configure_intermediate_path Once the packet has switched to Valiant, compute a path to the chosen intermediate switch

Parameters
path
virtual void sstmac::hw::valiant_router::finalize_init ( )
virtual

Reimplemented from sstmac::hw::minimal_router.

Reimplemented in sstmac::hw::ugal_router.

Referenced by to_string().

virtual int sstmac::hw::valiant_router::first_stage_vc ( int  topology_vc)
inlinevirtual

The topology object specifies a virtual channel based purely on geometry.

However, the final virtual channel depends on both geometry and routing algorithm. In this case, we need a separate set of virtual channels depending on whether we are in the first stage (routing to the intermediate switch) or the second stage (routing to the final switch).

Parameters
topology_vcThe geometry-specific virtual channel
Returns
The first stage virtual channel

Reimplemented in sstmac::hw::ugal_router.

Definition at line 48 of file valiant_routing.h.

virtual next_action_t sstmac::hw::valiant_router::initial_step ( structured_routable rtbl,
packet pkt 
)
protectedvirtual

Different for pure valiant and UGAL.

Reimplemented in sstmac::hw::ugal_router.

next_action_t sstmac::hw::valiant_router::intermediate_step ( structured_routable rtbl,
packet pkt 
)
protected

intermediate_step

Parameters
rtblThe routing interface with path information
pktThe packet corresponding to the structured_routable
Returns
The next action to take. It may be intermediate_switch or final_node depending on whether the intermediate switch has been reached or not.
next_action_t sstmac::hw::valiant_router::next_routing_stage ( packet pkt)
protected

next_routing_stage Figure out which action is required for the packet

Parameters
pktThe packet being routed
Returns
It may be intermediate_switch or final_node depending on whether the intermediate switch has been reached or not. Or it may be minimal if the packet is still on the minimal path and has not switched to Valiant.
virtual void sstmac::hw::valiant_router::route ( packet pkt)
virtual

Reimplemented from sstmac::hw::minimal_router.

Reimplemented in sstmac::hw::ugal_router.

Referenced by ~valiant_router().

virtual void sstmac::hw::valiant_router::route ( packet pkt,
structured_routable::path_set paths 
)
virtual

Reimplemented from sstmac::hw::minimal_router.

void sstmac::hw::valiant_router::route_valiant ( packet pkt)
protected

route_valiant Figure out if in intermediate or final stage and make appropriate routing computation

Parameters
pkt
virtual int sstmac::hw::valiant_router::second_stage_vc ( int  topology_vc)
inlinevirtual

The topology object specifies a virtual channel based purely on geometry.

However, the final virtual channel depends on both geometry and routing algorithm. In this case, we need a separate set of virtual channels depending on whether we are in the first stage (routing to the intermediate switch) or the second stage (routing to the final switch).

Parameters
topology_vcThe geometry-specific virtual channel
Returns
The second stage virtual channel

Reimplemented in sstmac::hw::ugal_router.

Definition at line 63 of file valiant_routing.h.

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

Reimplemented in sstmac::hw::ugal_router.

Definition at line 30 of file valiant_routing.h.

References finalize_init().

Here is the call graph for this function:


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