Skip to content

Commit f75afe0

Browse files
add prints
1 parent 859198c commit f75afe0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

vpr/test/test_odd_even_routing.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "channel_dependency_graph.h"
66

77
#include <random>
8+
#include <iostream>
89

910
namespace {
1011

@@ -232,6 +233,8 @@ TEST_CASE("test_route_flow", "[vpr_noc_odd_even_routing]") {
232233

233234
NocTrafficFlows traffic_flow_storage;
234235

236+
std::cout << "Before for loop" << std::endl;
237+
235238
for (int i = 0; i < 100; i++) {
236239
auto src_blk_id = (ClusterBlockId)dist(rand_num_gen);
237240

@@ -240,20 +243,28 @@ TEST_CASE("test_route_flow", "[vpr_noc_odd_even_routing]") {
240243
dst_blk_id = (ClusterBlockId)dist(rand_num_gen);
241244
} while (src_blk_id == dst_blk_id);
242245

246+
std::cout << "before call i: " << i << std::endl;
243247
traffic_flow_storage.create_noc_traffic_flow("dummy_name_1", "dummy_name_2", src_blk_id, dst_blk_id, 1, 1, 1);
248+
std::cout << "after call i: " << i << std::endl;
244249
}
245250

251+
252+
std::cout << "before finished "<< std::endl;
246253
traffic_flow_storage.finished_noc_traffic_flows_setup();
254+
std::cout << "after finished "<< std::endl;
247255

248256
vtr::vector<NocTrafficFlowId, std::vector<NocLinkId>> traffic_flow_routes(traffic_flow_storage.get_number_of_traffic_flows());
249257

250258
for (const auto& [id, traffic_flow] : traffic_flow_storage.get_all_traffic_flows().pairs()) {
251259

260+
std::cout << (size_t)id << " " << (size_t)traffic_flow.source_router_cluster_id << " " << (size_t)traffic_flow.sink_router_cluster_id << std::endl;
252261
NocRouterId src_router_id = noc_model.get_router_at_grid_location(block_locs[traffic_flow.source_router_cluster_id].loc);
253262
NocRouterId dst_router_id = noc_model.get_router_at_grid_location(block_locs[traffic_flow.sink_router_cluster_id].loc);
254263

264+
std::cout <<"before route" << std::endl;
255265
REQUIRE_NOTHROW(routing_algorithm.route_flow(src_router_id, dst_router_id,
256266
id, traffic_flow_routes[id], noc_model));
267+
std::cout <<"after route" << std::endl;
257268
}
258269

259270
ChannelDependencyGraph cdg(noc_model, traffic_flow_storage, traffic_flow_routes, block_locs);

0 commit comments

Comments
 (0)