@@ -240,6 +240,16 @@ static void alloc_and_load_for_fast_vertical_cost_update(float place_cost_exp, v
240240 const auto & rr_graph = device_ctx.rr_graph ;
241241 vtr::NdMatrix<float , 2 > tile_num_inter_die_conn ({device_ctx.grid .width (),
242242 device_ctx.grid .height ()}, 0 );
243+
244+ const int grid_height = device_ctx.grid .height ();
245+ const int grid_width = device_ctx.grid .width ();
246+
247+
248+ chanz_place_cost_fac = vtr::NdOffsetMatrix<float , 4 >({{{0 , grid_width-1 },
249+ {0 , grid_height-1 },
250+ {0 , grid_width-1 },
251+ {0 , grid_height-1 }}}
252+ );
243253
244254 for (const auto & src_rr_node : rr_graph.nodes ()) {
245255 for (const auto & rr_edge_idx : rr_graph.configurable_edges (src_rr_node)) {
@@ -265,10 +275,10 @@ static void alloc_and_load_for_fast_vertical_cost_update(float place_cost_exp, v
265275 }
266276 }
267277
268- for (int x_high = 1 ; x_high < (int )device_ctx.grid .width (); x_high++) {
269- for (int y_high = 1 ; y_high < (int )device_ctx.grid .height (); y_high++) {
270- for (int x_low = 0 ; x_low < x_high; x_low++) {
271- for (int y_low = 0 ; y_low < y_high; y_low++) {
278+ for (int x_high = 0 ; x_high < (int )device_ctx.grid .width (); x_high++) {
279+ for (int y_high = 0 ; y_high < (int )device_ctx.grid .height (); y_high++) {
280+ for (int x_low = 0 ; x_low <= x_high; x_low++) {
281+ for (int y_low = 0 ; y_low <= y_high; y_low++) {
272282 int num_inter_die_conn = 0 ;
273283 for (int x = x_low; x <= x_high; x++) {
274284 for (int y = y_low; y <= y_high; y++) {
0 commit comments