Skip to content

Commit 0e0c633

Browse files
RL agents selects empty block type when all blocks are locked
1 parent edfc3cc commit 0e0c633

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

vpr/src/place/simpleRL_move_generator.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ std::vector<int> KArmedBanditAgent::get_available_logical_blk_types_() {
9595
}
9696
}
9797

98+
// when there is no movable blocks, RL agent always selects the empty logical block
99+
// since there are no empty blocks in the netlist, the move is always aborted
100+
if (available_blk_types.empty()) {
101+
available_blk_types.push_back(device_ctx.EMPTY_LOGICAL_BLOCK_TYPE->index);
102+
}
103+
98104
return available_blk_types;
99105
}
100106

0 commit comments

Comments
 (0)