@@ -15,15 +15,44 @@ class RouterLookahead {
1515 public:
1616 /* *
1717 * @brief Get expected cost from node to target_node.
18+ *
1819 * @attention Either compute or read methods must be invoked before invoking get_expected_cost.
20+ *
1921 * @param node The source node from which the cost to the target node is obtained.
2022 * @param target_node The target node to which the cost is obtained.
2123 * @param params Contain the router parameter such as connection criticality, etc. Used to calculate the cost based on the delay and congestion costs.
2224 * @param R_upstream Upstream resistance to get to the "node".
25+ *
2326 * @return
2427 */
2528 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+ */
2646 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+ */
2756 void scale_delay_and_cong_by_criticality (float & delay, float & cong, const t_conn_cost_params& params) const ;
2857
2958 /* *
0 commit comments