@@ -1192,57 +1192,55 @@ static int findFirstInteger(const std::string& str) {
1192
1192
}
1193
1193
}
1194
1194
1195
-
1196
-
1197
- void print_noc_grid () {
1198
-
1199
- auto & place_ctx = g_vpr_ctx.placement ();
1200
- auto & cluster_ctx = g_vpr_ctx.clustering ();
1201
- auto & noc_ctx = g_vpr_ctx.noc ();
1202
- const int num_layers = g_vpr_ctx.device ().grid .get_num_layers ();
1203
-
1204
- const auto router_block_type = cluster_ctx.clb_nlist .block_type (noc_ctx.noc_traffic_flows_storage .get_router_clusters_in_netlist ()[0 ]);
1205
- const auto & compressed_noc_grid = place_ctx.compressed_block_grids [router_block_type->index ];
1206
-
1207
- static int grid_arr[10 ][10 ];
1208
-
1209
- for (int i = 0 ; i < 10 ; i++) {
1210
- for (int j = 0 ; j < 10 ; j++) {
1211
- grid_arr[i][j] = -1 ;
1212
- }
1213
- }
1214
-
1215
- const std::vector<ClusterBlockId>& router_bids = noc_ctx.noc_traffic_flows_storage .get_router_clusters_in_netlist ();
1216
-
1217
- // Iterate over all routers
1218
- for (auto router_bid : router_bids) {
1219
-
1220
- std::string router_name = cluster_ctx.clb_nlist .block_name (router_bid);
1221
- int router_id = findFirstInteger (router_name);
1222
-
1223
- auto compressed_loc = get_compressed_loc_approx (compressed_noc_grid,place_ctx.block_locs [router_bid].loc , num_layers);
1224
-
1225
- int placed_router_x = compressed_loc[0 ].x ;
1226
- int placed_router_y = compressed_loc[0 ].y ;
1227
- grid_arr[placed_router_x][placed_router_y] = router_id;
1228
- }
1229
-
1230
- std::cout << std::endl;
1231
- for (int i = 0 ; i < 10 ; i++) {
1232
- for (int j = 0 ; j < 10 ; j++) {
1233
- if (grid_arr[j][i] >= 0 ) {
1234
- std::cout << std::setw (2 ) << std::setfill (' 0' ) << grid_arr[j][i] << " \t " ;
1235
- } else {
1236
- std::cout << std::setw (2 ) << std::setfill (' ' ) << " X-" << " \t " ;
1237
- }
1238
-
1239
- }
1240
- std::cout << std::endl;
1241
- }
1242
-
1243
- std::cout << std::endl;
1244
-
1245
- }
1195
+ // void print_noc_grid() {
1196
+ //
1197
+ // auto& place_ctx = g_vpr_ctx.placement();
1198
+ // auto& cluster_ctx = g_vpr_ctx.clustering();
1199
+ // auto& noc_ctx = g_vpr_ctx.noc();
1200
+ // const int num_layers = g_vpr_ctx.device().grid.get_num_layers();
1201
+ //
1202
+ // const auto router_block_type = cluster_ctx.clb_nlist.block_type(noc_ctx.noc_traffic_flows_storage.get_router_clusters_in_netlist()[0]);
1203
+ // const auto& compressed_noc_grid = place_ctx.compressed_block_grids[router_block_type->index];
1204
+ //
1205
+ // static int grid_arr[10][10];
1206
+ //
1207
+ // for (int i = 0; i < 10; i++) {
1208
+ // for (int j = 0; j < 10; j++) {
1209
+ // grid_arr[i][j] = -1;
1210
+ // }
1211
+ // }
1212
+ //
1213
+ // const std::vector<ClusterBlockId>& router_bids = noc_ctx.noc_traffic_flows_storage.get_router_clusters_in_netlist();
1214
+ //
1215
+ // // Iterate over all routers
1216
+ // for (auto router_bid : router_bids) {
1217
+ //
1218
+ // std::string router_name = cluster_ctx.clb_nlist.block_name(router_bid);
1219
+ // int router_id = findFirstInteger(router_name);
1220
+ //
1221
+ // auto compressed_loc = get_compressed_loc_approx(compressed_noc_grid,place_ctx.block_locs[router_bid].loc, num_layers);
1222
+ //
1223
+ // int placed_router_x = compressed_loc[0].x;
1224
+ // int placed_router_y = compressed_loc[0].y;
1225
+ // grid_arr[placed_router_x][placed_router_y] = router_id;
1226
+ // }
1227
+ //
1228
+ // std::cout << std::endl;
1229
+ // for (int i = 0; i < 10; i++) {
1230
+ // for (int j = 0; j < 10; j++) {
1231
+ // if (grid_arr[j][i] >= 0) {
1232
+ // std::cout << std::setw(2) << std::setfill('0') << grid_arr[j][i] << "\t";
1233
+ // } else {
1234
+ // std::cout << std::setw(2) << std::setfill(' ') << "X-" << "\t";
1235
+ // }
1236
+ //
1237
+ // }
1238
+ // std::cout << std::endl;
1239
+ // }
1240
+ //
1241
+ // std::cout << std::endl;
1242
+ //
1243
+ // }
1246
1244
1247
1245
static void initial_noc_placement (const t_noc_opts& noc_opts) {
1248
1246
auto & place_ctx = g_vpr_ctx.placement ();
@@ -1347,8 +1345,6 @@ static void initial_noc_placement(const t_noc_opts& noc_opts) {
1347
1345
// populate internal data structures to maintain route, bandwidth usage, and latencies
1348
1346
initial_noc_routing ();
1349
1347
1350
- print_noc_grid ();
1351
-
1352
1348
// Only NoC related costs are considered
1353
1349
t_placer_costs costs;
1354
1350
@@ -1434,7 +1430,6 @@ void initial_placement(enum e_pad_loc_type pad_loc_type, const char* constraints
1434
1430
if (noc_opts.noc ) {
1435
1431
// NoC routers are placed before other blocks
1436
1432
initial_noc_placement (noc_opts);
1437
- print_noc_grid ();
1438
1433
}
1439
1434
1440
1435
// Assign scores to blocks and placement macros according to how difficult they are to place
0 commit comments