Skip to content

Commit

Permalink
fix failing test in test_xy_routing
Browse files Browse the repository at this point in the history
  • Loading branch information
soheilshahrouz committed Mar 4, 2024
1 parent 64336c8 commit 0eedd87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion vpr/src/noc/turn_model_routing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void TurnModelRouting::route_flow(NocRouterId src_router_id,
if (next_link) {
flow_route.push_back(next_link);
} else {
VPR_FATAL_ERROR(VPR_ERROR_OTHER, "No route could be found from starting router with ID:'%d'"
VPR_FATAL_ERROR(VPR_ERROR_OTHER, "No route could be found from starting router with ID:'%d' "
"and the destination router with ID:'%d' using the XY-Routing algorithm.",
src_router.get_router_user_id(),
dst_router.get_router_user_id());
Expand Down
10 changes: 3 additions & 7 deletions vpr/test/test_xy_routing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#include "xy_routing.h"

namespace {

/**
* @brief Compares two vectors of NocLinks. These vectors represent
* two routes between a start and destination routers. This function
Expand Down Expand Up @@ -274,7 +272,7 @@ TEST_CASE("test_route_flow when it fails in a mesh topology.", "[vpr_noc_xy_rout
// creating the XY routing object
XYRouting routing_algorithm;

SECTION("Test case where the xy routing algorithm fails to find a horziontal link to traverse.") {
SECTION("Test case where the xy routing algorithm fails to find a horizontal link to traverse.") {
/*
* The route we will test will be starting at router 3 and end at
* router 0. We will delete the link connecting router 2 to router 1.
Expand Down Expand Up @@ -338,7 +336,7 @@ TEST_CASE("test_route_flow when it fails in a non mesh topology.", "[vpr_noc_xy_
* just pinpong between routers 0 and 3.
*
* The purpose of this test case is to make sure that this situation is
* appropristely handled through an error.
* appropriately handled through an error.
*
* This is a map of what the NoC looks like, where the numbers indicate the NoC router id.
*
Expand Down Expand Up @@ -379,6 +377,4 @@ TEST_CASE("test_route_flow when it fails in a non mesh topology.", "[vpr_noc_xy_
// now use the XY router to find a route. We expect this to fail to check that.
REQUIRE_THROWS_WITH(routing_algorithm.route_flow(start_router_id, sink_router_id, traffic_flow_id, found_path, noc_model),
"No route could be found from starting router with ID:'3' and the destination router with ID:'1' using the XY-Routing algorithm.");
}

} // namespace
}

0 comments on commit 0eedd87

Please sign in to comment.