@@ -15,15 +15,44 @@ class RouterLookahead {
15
15
public:
16
16
/* *
17
17
* @brief Get expected cost from node to target_node.
18
+ *
18
19
* @attention Either compute or read methods must be invoked before invoking get_expected_cost.
20
+ *
19
21
* @param node The source node from which the cost to the target node is obtained.
20
22
* @param target_node The target node to which the cost is obtained.
21
23
* @param params Contain the router parameter such as connection criticality, etc. Used to calculate the cost based on the delay and congestion costs.
22
24
* @param R_upstream Upstream resistance to get to the "node".
25
+ *
23
26
* @return
24
27
*/
25
28
virtual float get_expected_cost (RRNodeId node, RRNodeId target_node, const t_conn_cost_params& params, float R_upstream) const = 0;
29
+
30
+ /* *
31
+ * @brief Get expected (delay, congestion) from node to target_node.
32
+ *
33
+ * @attention Either compute or read methods must be invoked before invoking get_expected_delay_and_cong.
34
+ *
35
+ * @param node The source node from which the cost to the target node is obtained.
36
+ * @param target_node The target node to which the cost is obtained.
37
+ * @param params Contain the router parameter such as connection criticality, etc.
38
+ * @param R_upstream Upstream resistance to get to the "node".
39
+ *
40
+ * @return (delay, congestion)
41
+ *
42
+ * @warning (delay, congestion) are NOT multiplied by (params.criticality, 1. - params.criticality), respectively.
43
+ * scale_delay_and_cong_by_criticality should be called after this function before adding these to calculate the
44
+ * expected total cost.
45
+ */
26
46
virtual std::pair<float , float > get_expected_delay_and_cong (RRNodeId node, RRNodeId target_node, const t_conn_cost_params& params, float R_upstream) const = 0;
47
+
48
+ /* *
49
+ * @brief Multiply delay by params.criticality and cong by (1. - params.criticality). Used in conjunction with
50
+ * get_expected_delay_and_cong to calculate the total expected cost.
51
+ *
52
+ * @param delay
53
+ * @param cong
54
+ * @param params
55
+ */
27
56
void scale_delay_and_cong_by_criticality (float & delay, float & cong, const t_conn_cost_params& params) const ;
28
57
29
58
/* *
0 commit comments