Skip to content

Commit 88e7b1e

Browse files
authored
Merge pull request #2804 from verilog-to-routing/temp_manual_move_fix
Fix segmentation fault when moving blocks manually
2 parents 1876d05 + 07053fe commit 88e7b1e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

vpr/src/place/manual_move_generator.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ e_create_move ManualMoveGenerator::propose_move(t_pl_blocks_to_be_moved& blocks_
2727
float /*rlim*/,
2828
const t_placer_opts& /*placer_opts*/,
2929
const PlacerCriticalities* /*criticalities*/) {
30-
auto& place_ctx = g_vpr_ctx.placement();
31-
auto& cluster_ctx = g_vpr_ctx.clustering();
32-
auto& device_ctx = g_vpr_ctx.device();
33-
auto& block_locs = placer_state_.get().block_locs();
30+
const auto& place_ctx = g_vpr_ctx.placement();
31+
const auto& cluster_ctx = g_vpr_ctx.clustering();
32+
const auto& device_ctx = g_vpr_ctx.device();
33+
const auto& blk_loc_registry = placer_state_.get().blk_loc_registry();
34+
const auto& block_locs = blk_loc_registry.block_locs();
3435

3536
int block_id = -1;
3637
t_pl_loc to;
@@ -65,7 +66,7 @@ e_create_move ManualMoveGenerator::propose_move(t_pl_blocks_to_be_moved& blocks_
6566
return e_create_move::ABORT;
6667
}
6768

68-
e_create_move create_move = ::create_move(blocks_affected, b_from, to, place_ctx.blk_loc_registry());
69+
e_create_move create_move = ::create_move(blocks_affected, b_from, to, blk_loc_registry);
6970
return create_move;
7071
}
7172

0 commit comments

Comments
 (0)