@@ -232,7 +232,7 @@ TEST_CASE("read_rr_graph_metadata", "[vpr]") {
232
232
vpr_free_all (arch, vpr_setup);
233
233
}
234
234
235
- TEST_CASE (" read_rr_edge_override" , " [vpr33 ]" ) {
235
+ TEST_CASE (" read_rr_edge_override" , " [vpr ]" ) {
236
236
237
237
const std::string RR_GRAPH_NAME = " test_read_rr_edge_override" ;
238
238
const std::string RR_EDGE_OVERRIDE_FILENAME = " test_read_rr_edge_override.txt" ;
@@ -264,7 +264,6 @@ TEST_CASE("read_rr_edge_override", "[vpr33]") {
264
264
const auto & device_ctx = g_vpr_ctx.device ();
265
265
auto & mutable_device_ctx = g_vpr_ctx.mutable_device ();
266
266
const auto & rr_graph = device_ctx.rr_graph ;
267
- // auto& rr_graph_builder = mutable_device_ctx.rr_graph_builder;
268
267
bool echo_enabled = getEchoEnabled () && isEchoFileEnabled (E_ECHO_RR_GRAPH_INDEXED_DATA);
269
268
const char * echo_file_name = getEchoFileName (E_ECHO_RR_GRAPH_INDEXED_DATA);
270
269
@@ -320,8 +319,6 @@ TEST_CASE("read_rr_edge_override", "[vpr33]") {
320
319
321
320
const auto & device_ctx = g_vpr_ctx.device ();
322
321
auto & mutable_device_ctx = g_vpr_ctx.mutable_device ();
323
- // const auto& rr_graph = device_ctx.rr_graph;
324
- // auto& rr_graph_builder = mutable_device_ctx.rr_graph_builder;
325
322
bool echo_enabled = getEchoEnabled () && isEchoFileEnabled (E_ECHO_RR_GRAPH_INDEXED_DATA);
326
323
const char * echo_file_name = getEchoFileName (E_ECHO_RR_GRAPH_INDEXED_DATA);
327
324
@@ -341,6 +338,57 @@ TEST_CASE("read_rr_edge_override", "[vpr33]") {
341
338
342
339
vpr_free_all (arch, vpr_setup);
343
340
}
341
+
342
+ { // Verify overridden values
343
+ t_vpr_setup vpr_setup;
344
+ t_arch arch;
345
+ t_options options;
346
+ const char * argv[] = {
347
+ " test_vpr" ,
348
+ kArchFile ,
349
+ " wire.eblif" ,
350
+ " --route_chan_width" ,
351
+ " 100" ,
352
+ " --read_rr_graph" ,
353
+ overridden_rr_graph_filename.c_str ()};
354
+
355
+ vpr_init (sizeof (argv) / sizeof (argv[0 ]), argv, &options, &vpr_setup, &arch);
356
+ vpr_create_device (vpr_setup, arch);
357
+
358
+ const auto & device_ctx = g_vpr_ctx.device ();
359
+ const auto & rr_graph = device_ctx.rr_graph ;
360
+
361
+ switch_id = rr_graph.edge_switch ((RREdgeId)12 );
362
+ REQUIRE (rr_graph.rr_switch_inf ((RRSwitchId)switch_id).Tdel == 5 .9e-11f );
363
+
364
+ switch_id = rr_graph.edge_switch ((RREdgeId)1586 );
365
+ REQUIRE (rr_graph.rr_switch_inf ((RRSwitchId)switch_id).Tdel == 4 .2e-11f );
366
+
367
+ switch_id = rr_graph.edge_switch ((RREdgeId)1111 );
368
+ REQUIRE (rr_graph.rr_switch_inf ((RRSwitchId)switch_id).Tdel == 7 .1e-11f );
369
+
370
+ switch_id = rr_graph.edge_switch ((RREdgeId)1324 );
371
+ REQUIRE (rr_graph.rr_switch_inf ((RRSwitchId)switch_id).Tdel == 9 .4e-11f );
372
+
373
+ RREdgeId edge_id;
374
+ edge_id = rr_graph.rr_nodes ().edge_id ((RRNodeId)645 , (RRNodeId)127 );
375
+ switch_id = rr_graph.edge_switch (edge_id);
376
+ REQUIRE (rr_graph.rr_switch_inf ((RRSwitchId)switch_id).Tdel == 7 .3e-11f );
377
+
378
+ edge_id = rr_graph.rr_nodes ().edge_id ((RRNodeId)591 , (RRNodeId)347 );
379
+ switch_id = rr_graph.edge_switch (edge_id);
380
+ REQUIRE (rr_graph.rr_switch_inf ((RRSwitchId)switch_id).Tdel == 7 .9e-11f );
381
+
382
+ edge_id = rr_graph.rr_nodes ().edge_id ((RRNodeId)544 , (RRNodeId)45 );
383
+ switch_id = rr_graph.edge_switch (edge_id);
384
+ REQUIRE (rr_graph.rr_switch_inf ((RRSwitchId)switch_id).Tdel == 8 .3e-11f );
385
+
386
+ edge_id = rr_graph.rr_nodes ().edge_id ((RRNodeId)37 , (RRNodeId)511 );
387
+ switch_id = rr_graph.edge_switch (edge_id);
388
+ REQUIRE (rr_graph.rr_switch_inf ((RRSwitchId)switch_id).Tdel == 9 .5e-11f );
389
+
390
+ vpr_free_all (arch, vpr_setup);
391
+ }
344
392
}
345
393
}
346
394
0 commit comments