5
5
#include " channel_dependency_graph.h"
6
6
7
7
#include < random>
8
+ #include < iostream>
8
9
9
10
namespace {
10
11
@@ -232,6 +233,8 @@ TEST_CASE("test_route_flow", "[vpr_noc_odd_even_routing]") {
232
233
233
234
NocTrafficFlows traffic_flow_storage;
234
235
236
+ std::cout << " Before for loop" << std::endl;
237
+
235
238
for (int i = 0 ; i < 100 ; i++) {
236
239
auto src_blk_id = (ClusterBlockId)dist (rand_num_gen);
237
240
@@ -240,20 +243,28 @@ TEST_CASE("test_route_flow", "[vpr_noc_odd_even_routing]") {
240
243
dst_blk_id = (ClusterBlockId)dist (rand_num_gen);
241
244
} while (src_blk_id == dst_blk_id);
242
245
246
+ std::cout << " before call i: " << i << std::endl;
243
247
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;
244
249
}
245
250
251
+
252
+ std::cout << " before finished " << std::endl;
246
253
traffic_flow_storage.finished_noc_traffic_flows_setup ();
254
+ std::cout << " after finished " << std::endl;
247
255
248
256
vtr::vector<NocTrafficFlowId, std::vector<NocLinkId>> traffic_flow_routes (traffic_flow_storage.get_number_of_traffic_flows ());
249
257
250
258
for (const auto & [id, traffic_flow] : traffic_flow_storage.get_all_traffic_flows ().pairs ()) {
251
259
260
+ std::cout << (size_t )id << " " << (size_t )traffic_flow.source_router_cluster_id << " " << (size_t )traffic_flow.sink_router_cluster_id << std::endl;
252
261
NocRouterId src_router_id = noc_model.get_router_at_grid_location (block_locs[traffic_flow.source_router_cluster_id ].loc );
253
262
NocRouterId dst_router_id = noc_model.get_router_at_grid_location (block_locs[traffic_flow.sink_router_cluster_id ].loc );
254
263
264
+ std::cout <<" before route" << std::endl;
255
265
REQUIRE_NOTHROW (routing_algorithm.route_flow (src_router_id, dst_router_id,
256
266
id, traffic_flow_routes[id], noc_model));
267
+ std::cout <<" after route" << std::endl;
257
268
}
258
269
259
270
ChannelDependencyGraph cdg (noc_model, traffic_flow_storage, traffic_flow_routes, block_locs);
0 commit comments