|
30 | 30 | # include "mmap_file.h"
|
31 | 31 | #endif
|
32 | 32 |
|
| 33 | +/** |
| 34 | + * @brief Parses a line from the RR edge attribute override file. |
| 35 | + * |
| 36 | + * @details Expected formats: |
| 37 | + * edge_id Tdel [R] [Cin] [Cout] [Cinternal] |
| 38 | + * (source_node_id, sink_node_id) Tdel [R] [Cin] [Cout] [Cinternal] |
| 39 | + * Attributes in [brackets] are optional. |
| 40 | + * |
| 41 | + * @param line The line to parse. |
| 42 | + * @param overridden_values Parsed override values. |
| 43 | + * @param rr_graph The RR graph for edge lookup using source-sink nodes. |
| 44 | + * @return The RR edge whose attributes are to be overridden. |
| 45 | + */ |
| 46 | +static RREdgeId process_rr_edge_override(const std::string& line, |
| 47 | + std::vector<float>& overridden_values, |
| 48 | + const RRGraphView& rr_graph); |
| 49 | + |
33 | 50 | /************************ Subroutine definitions ****************************/
|
34 | 51 | /* loads the given RR_graph file into the appropriate data structures
|
35 | 52 | * as specified by read_rr_graph_name. Set up correct routing data
|
|
39 | 56 | * parameters are a workaround to passing the data structures of DeviceContext.
|
40 | 57 | * Needs a solution to reduce the number of parameters passed in.*/
|
41 | 58 |
|
| 59 | + |
42 | 60 | void load_rr_file(RRGraphBuilder* rr_graph_builder,
|
43 | 61 | RRGraphView* rr_graph,
|
44 | 62 | const std::vector<t_physical_tile_type>& physical_tile_types,
|
@@ -117,9 +135,9 @@ void load_rr_file(RRGraphBuilder* rr_graph_builder,
|
117 | 135 | }
|
118 | 136 | }
|
119 | 137 |
|
120 |
| -RREdgeId process_line(const std::string& line, |
121 |
| - std::vector<float>& overridden_values, |
122 |
| - const RRGraphView& rr_graph) { |
| 138 | +static RREdgeId process_rr_edge_override(const std::string& line, |
| 139 | + std::vector<float>& overridden_values, |
| 140 | + const RRGraphView& rr_graph) { |
123 | 141 | std::istringstream iss(line);
|
124 | 142 | char ch;
|
125 | 143 | RREdgeId edge_id;
|
@@ -231,7 +249,7 @@ void load_rr_edge_overrides(std::string_view filename,
|
231 | 249 |
|
232 | 250 | if (!line.empty()) {
|
233 | 251 | overridden_values.clear();
|
234 |
| - RREdgeId edge_id = process_line(line, overridden_values, rr_graph); |
| 252 | + RREdgeId edge_id = process_rr_edge_override(line, overridden_values, rr_graph); |
235 | 253 | RRSwitchId curr_switch_id = (RRSwitchId)rr_graph.edge_switch(edge_id);
|
236 | 254 | t_rr_switch_inf switch_override_info = rr_graph.rr_switch_inf(curr_switch_id);
|
237 | 255 |
|
|
0 commit comments