47
47
* @param fp The file stream to read from.
48
48
* @param filename The name of the file to read from.
49
49
* @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.
51
51
* @param is_flat Whether flat-router is enabled.
52
52
*/
53
53
static void process_route (const Netlist<>& net_list,
54
54
std::ifstream& fp,
55
55
const char * filename,
56
56
int & lineno,
57
- bool verify_rr_switch_id ,
57
+ bool verify_route_file_switch_id ,
58
58
bool is_flat);
59
59
60
60
/* *
@@ -64,13 +64,13 @@ static void process_route(const Netlist<>& net_list,
64
64
* @param fp The file stream to read from.
65
65
* @param inet The net ID to process.
66
66
* @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.
68
68
*/
69
69
static void process_nodes (const Netlist<>& net_list,
70
70
std::ifstream& fp,
71
71
ClusterNetId inet,
72
72
const char * filename,
73
- bool verify_rr_switch_id ,
73
+ bool verify_route_file_switch_id ,
74
74
int & lineno);
75
75
76
76
/* *
@@ -83,7 +83,7 @@ static void process_nodes(const Netlist<>& net_list,
83
83
* @param input_tokens The tokens of the net.
84
84
* @param filename The name of the file to read from.
85
85
* @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.
87
87
* @param is_flat Whether flat-router is enabled.
88
88
*/
89
89
static void process_nets (const Netlist<>& net_list,
@@ -93,7 +93,7 @@ static void process_nets(const Netlist<>& net_list,
93
93
std::vector<std::string> input_tokens,
94
94
const char * filename,
95
95
int & lineno,
96
- bool verify_rr_switch_id ,
96
+ bool verify_route_file_switch_id ,
97
97
bool is_flat);
98
98
99
99
/* *
@@ -206,7 +206,7 @@ bool read_route(const char* route_file,
206
206
}
207
207
208
208
/* 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);
210
210
211
211
fp.close ();
212
212
@@ -242,7 +242,7 @@ static void process_route(const Netlist<>& net_list,
242
242
std::ifstream& fp,
243
243
const char * filename,
244
244
int & lineno,
245
- bool verify_rr_switch_id ,
245
+ bool verify_route_file_switch_id ,
246
246
bool is_flat) {
247
247
std::string input;
248
248
std::vector<std::string> tokens;
@@ -263,7 +263,7 @@ static void process_route(const Netlist<>& net_list,
263
263
tokens,
264
264
filename,
265
265
lineno,
266
- verify_rr_switch_id ,
266
+ verify_route_file_switch_id ,
267
267
is_flat);
268
268
}
269
269
}
@@ -278,7 +278,7 @@ static void process_nets(const Netlist<>& net_list,
278
278
std::vector<std::string> input_tokens,
279
279
const char * filename,
280
280
int & lineno,
281
- bool verify_rr_switch_id ,
281
+ bool verify_route_file_switch_id ,
282
282
bool is_flat) {
283
283
if (input_tokens.size () > 3 && input_tokens[3 ] == " global"
284
284
&& input_tokens[4 ] == " net" && input_tokens[5 ] == " connecting:" ) {
@@ -316,7 +316,7 @@ static void process_nets(const Netlist<>& net_list,
316
316
fp,
317
317
inet,
318
318
filename,
319
- verify_rr_switch_id ,
319
+ verify_route_file_switch_id ,
320
320
lineno);
321
321
}
322
322
input_tokens.clear ();
@@ -326,7 +326,7 @@ static void process_nodes(const Netlist<>& net_list,
326
326
std::ifstream& fp,
327
327
ClusterNetId inet,
328
328
const char * filename,
329
- bool verify_rr_switch_id ,
329
+ bool verify_route_file_switch_id ,
330
330
int & lineno) {
331
331
/* Not a global net. Goes through every node and add it into trace.head*/
332
332
auto & device_ctx = g_vpr_ctx.mutable_device ();
@@ -519,7 +519,7 @@ static void process_nodes(const Netlist<>& net_list,
519
519
oldpos = fp.tellg ();
520
520
}
521
521
522
- if (verify_rr_switch_id ) {
522
+ if (verify_route_file_switch_id ) {
523
523
VTR_ASSERT (validate_traceback (head_ptr));
524
524
} else {
525
525
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) {
544
544
return ;
545
545
}
546
546
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
549
549
if (!seen_rr_nodes.count (next->index )) {
550
550
VPR_FATAL_ERROR (VPR_ERROR_ROUTE, " Traceback branch point %d not found" , next->index );
551
551
}
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 ;
556
555
bool found = false ;
557
556
for (t_edge_size iedge = 0 ; iedge < rr_graph.num_edges (RRNodeId (trace->index )); ++iedge) {
558
557
int to_node = size_t (rr_graph.edge_sink_node (RRNodeId (trace->index ), iedge));
559
558
if (to_node == next->index ) {
560
559
found = true ;
561
560
562
- // Verify that the switch matches
561
+ // Verify that the switch matches
563
562
int rr_iswitch = rr_graph.edge_switch (RRNodeId (trace->index ), iedge);
564
563
trace->iswitch = rr_iswitch;
565
564
break ;
@@ -569,7 +568,7 @@ static void update_rr_switch_id(t_trace* trace, std::set<int>& seen_rr_nodes) {
569
568
VPR_FATAL_ERROR (VPR_ERROR_ROUTE, " Traceback no RR edge between RR nodes %d -> %d\n " , trace->index , next->index );
570
569
}
571
570
}
572
- // Recurse
571
+ // Recurse
573
572
update_rr_switch_id (next, seen_rr_nodes);
574
573
}
575
574
0 commit comments