4747 * @param fp The file stream to read from.
4848 * @param filename The name of the file to read from.
4949 * @param lineno The line number currently being processed.
50- * @param verify_rr_switch_id Whether to verify the RR switch IDs in the routing file.
50+ * @param verify_route_file_switch_id Whether to verify the RR switch IDs in the routing file.
5151 * @param is_flat Whether flat-router is enabled.
5252 */
5353static void process_route (const Netlist<>& net_list,
5454 std::ifstream& fp,
5555 const char * filename,
5656 int & lineno,
57- bool verify_rr_switch_id ,
57+ bool verify_route_file_switch_id ,
5858 bool is_flat);
5959
6060/* *
@@ -64,13 +64,13 @@ static void process_route(const Netlist<>& net_list,
6464 * @param fp The file stream to read from.
6565 * @param inet The net ID to process.
6666 * @param filename The name of the file to read from.
67- * @param verify_rr_switch_id Whether to verify the RR switch IDs in the routing file.
67+ * @param verify_route_file_switch_id Whether to verify the RR switch IDs in the routing file.
6868 */
6969static void process_nodes (const Netlist<>& net_list,
7070 std::ifstream& fp,
7171 ClusterNetId inet,
7272 const char * filename,
73- bool verify_rr_switch_id ,
73+ bool verify_route_file_switch_id ,
7474 int & lineno);
7575
7676/* *
@@ -83,7 +83,7 @@ static void process_nodes(const Netlist<>& net_list,
8383 * @param input_tokens The tokens of the net.
8484 * @param filename The name of the file to read from.
8585 * @param lineno The line number currently being processed.
86- * @param verify_rr_switch_id Whether to verify the RR switch IDs in the routing file.
86+ * @param verify_route_file_switch_id Whether to verify the RR switch IDs in the routing file.
8787 * @param is_flat Whether flat-router is enabled.
8888 */
8989static void process_nets (const Netlist<>& net_list,
@@ -93,7 +93,7 @@ static void process_nets(const Netlist<>& net_list,
9393 std::vector<std::string> input_tokens,
9494 const char * filename,
9595 int & lineno,
96- bool verify_rr_switch_id ,
96+ bool verify_route_file_switch_id ,
9797 bool is_flat);
9898
9999/* *
@@ -206,7 +206,7 @@ bool read_route(const char* route_file,
206206 }
207207
208208 /* Read in every net */
209- process_route (router_net_list, fp, route_file, lineno, router_opts.verify_rr_switch_id , is_flat);
209+ process_route (router_net_list, fp, route_file, lineno, router_opts.verify_route_file_switch_id , is_flat);
210210
211211 fp.close ();
212212
@@ -242,7 +242,7 @@ static void process_route(const Netlist<>& net_list,
242242 std::ifstream& fp,
243243 const char * filename,
244244 int & lineno,
245- bool verify_rr_switch_id ,
245+ bool verify_route_file_switch_id ,
246246 bool is_flat) {
247247 std::string input;
248248 std::vector<std::string> tokens;
@@ -263,7 +263,7 @@ static void process_route(const Netlist<>& net_list,
263263 tokens,
264264 filename,
265265 lineno,
266- verify_rr_switch_id ,
266+ verify_route_file_switch_id ,
267267 is_flat);
268268 }
269269 }
@@ -278,7 +278,7 @@ static void process_nets(const Netlist<>& net_list,
278278 std::vector<std::string> input_tokens,
279279 const char * filename,
280280 int & lineno,
281- bool verify_rr_switch_id ,
281+ bool verify_route_file_switch_id ,
282282 bool is_flat) {
283283 if (input_tokens.size () > 3 && input_tokens[3 ] == " global"
284284 && input_tokens[4 ] == " net" && input_tokens[5 ] == " connecting:" ) {
@@ -316,7 +316,7 @@ static void process_nets(const Netlist<>& net_list,
316316 fp,
317317 inet,
318318 filename,
319- verify_rr_switch_id ,
319+ verify_route_file_switch_id ,
320320 lineno);
321321 }
322322 input_tokens.clear ();
@@ -326,7 +326,7 @@ static void process_nodes(const Netlist<>& net_list,
326326 std::ifstream& fp,
327327 ClusterNetId inet,
328328 const char * filename,
329- bool verify_rr_switch_id ,
329+ bool verify_route_file_switch_id ,
330330 int & lineno) {
331331 /* Not a global net. Goes through every node and add it into trace.head*/
332332 auto & device_ctx = g_vpr_ctx.mutable_device ();
@@ -519,7 +519,7 @@ static void process_nodes(const Netlist<>& net_list,
519519 oldpos = fp.tellg ();
520520 }
521521
522- if (verify_rr_switch_id ) {
522+ if (verify_route_file_switch_id ) {
523523 VTR_ASSERT (validate_traceback (head_ptr));
524524 } else {
525525 std::set<int > seen_rr_nodes;
@@ -544,22 +544,21 @@ static void update_rr_switch_id(t_trace* trace, std::set<int>& seen_rr_nodes) {
544544 return ;
545545 }
546546
547- if (trace->iswitch == OPEN) { // End of a branch
548- // Verify that the next element (branch point) has been already seen in the traceback so far
547+ if (trace->iswitch == OPEN) { // End of a branch
548+ // Verify that the next element (branch point) has been already seen in the traceback so far
549549 if (!seen_rr_nodes.count (next->index )) {
550550 VPR_FATAL_ERROR (VPR_ERROR_ROUTE, " Traceback branch point %d not found" , next->index );
551551 }
552- } else { // Midway along branch
553- // Check there is an edge connecting trace and next
554- auto & device_ctx = g_vpr_ctx.device ();
555- const auto & rr_graph = device_ctx.rr_graph ;
552+ } else { // Midway along branch
553+ // Check there is an edge connecting trace and next
554+ const auto & rr_graph = g_vpr_ctx.device ().rr_graph ;
556555 bool found = false ;
557556 for (t_edge_size iedge = 0 ; iedge < rr_graph.num_edges (RRNodeId (trace->index )); ++iedge) {
558557 int to_node = size_t (rr_graph.edge_sink_node (RRNodeId (trace->index ), iedge));
559558 if (to_node == next->index ) {
560559 found = true ;
561560
562- // Verify that the switch matches
561+ // Verify that the switch matches
563562 int rr_iswitch = rr_graph.edge_switch (RRNodeId (trace->index ), iedge);
564563 trace->iswitch = rr_iswitch;
565564 break ;
@@ -569,7 +568,7 @@ static void update_rr_switch_id(t_trace* trace, std::set<int>& seen_rr_nodes) {
569568 VPR_FATAL_ERROR (VPR_ERROR_ROUTE, " Traceback no RR edge between RR nodes %d -> %d\n " , trace->index , next->index );
570569 }
571570 }
572- // Recurse
571+ // Recurse
573572 update_rr_switch_id (next, seen_rr_nodes);
574573}
575574
0 commit comments