SST/macro
ugal_routing.h
Go to the documentation of this file.
1 #ifndef sstmac_hardware_network_topology_routing_UGAL_ROUTING_H
2 #define sstmac_hardware_network_topology_routing_UGAL_ROUTING_H
3 
5 
6 namespace sstmac {
7 namespace hw {
8 
9 /**
10  * @brief The ugal_router class
11  * Encapsulates a router that performs Univeral Globally Adaptive Load-balanced
12  * routing as described in PhD Thesis "Load-balanced in routing in interconnection networks"
13  * by A Singh.
14  */
15 class ugal_router :
16  public valiant_router
17 {
18 
19  public:
21  valiant_router(routing::ugal){}
22 
23  virtual void
24  init_factory_params(sprockit::sim_parameters* params);
25 
26  std::string
27  to_string() const {
28  return "ugal";
29  }
30 
31  void route(packet* pkt);
32 
33  virtual void
34  finalize_init();
35 
36  protected:
38  structured_routable* rtbl,
39  packet* pkt);
40 
41  /**
42  The topology object specifies a virtual channel based purely on geometry.
43  However, the final virtual channel depends on both geometry and
44  routing algorithm. In this case, we need a separate set of
45  virtual channels depending on whether we are in the first
46  stage (routing to the intermediate switch) or the second stage
47  (routing to the final switch).
48  @param topology_vc The geometry-specific virtual channel
49  @return The second stage virtual channel
50  */
51  virtual int
52  first_stage_vc(int topology_vc) {
53  return 3 * topology_vc;
54  }
55 
56  /**
57  The topology object specifies a virtual channel based purely on geometry.
58  However, the final virtual channel depends on both geometry and
59  routing algorithm. In this case, we need a separate set of
60  virtual channels depending on whether we are in the first
61  stage (routing to the intermediate switch) or the second stage
62  (routing to the final switch).
63  @param topology_vc The geometry-specific virtual channel
64  @return The second stage virtual channel
65  */
66  virtual int
67  second_stage_vc(int topology_vc) {
68  return 3 * topology_vc + 1;
69  }
70 
71  /**
72  In adition to the valiant stages, ugal has a minimal stage.
73  This requires another set of virtual channels.
74  @param topology_vc The geometry-specific virtual channel
75  @return The zero stage virtual channel
76  */
77  int
78  zero_stage_vc(int topology_vc) {
79  return 3 * topology_vc + 2;
80  }
81 
82  protected:
85 
86 
87 };
88 
89 }
90 }
91 
92 
93 #endif // UGAL_ROUTING_H
94 
virtual int second_stage_vc(int topology_vc)
The topology object specifies a virtual channel based purely on geometry.
Definition: ugal_routing.h:67
next_action_t initial_step(structured_routable *rtbl, packet *pkt)
Different for pure valiant and UGAL.
void route(packet *pkt)
std::string to_string() const
Definition: ugal_routing.h:27
The valiant_router class Enacpsulates a router that performs oblivious, global routing according to "...
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
virtual int first_stage_vc(int topology_vc)
The topology object specifies a virtual channel based purely on geometry.
Definition: ugal_routing.h:52
int zero_stage_vc(int topology_vc)
In adition to the valiant stages, ugal has a minimal stage.
Definition: ugal_routing.h:78
virtual void init_factory_params(sprockit::sim_parameters *params)
The ugal_router class Encapsulates a router that performs Univeral Globally Adaptive Load-balanced ro...
Definition: ugal_routing.h:15
virtual void finalize_init()