Skip to content

Commit 1d89851

Browse files
committed
[vpr][place] check constraint location when intial placement file is read
1 parent 4a6043d commit 1d89851

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vpr/src/base/read_place.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,14 @@ void read_place_body(std::ifstream& placement_file,
305305
loc.layer = block_layer;
306306

307307
if (seen_blocks[blk_id] == 0) {
308+
if (is_place_file && place_ctx.block_locs[blk_id].is_fixed) {
309+
const auto& contraint_loc = place_ctx.block_locs[blk_id].loc;
310+
if (loc != contraint_loc) {
311+
VPR_THROW(VPR_ERROR_PLACE,
312+
"The new location assigned to cluster #%d is (%d,%d,%d,%d), which is inconsistent with the location specified in the constraint file (%d,%d,%d,%d).",
313+
blk_id, loc.x, loc.y, loc.layer, loc.sub_tile, contraint_loc.x, contraint_loc.y, contraint_loc.layer, contraint_loc.sub_tile);
314+
}
315+
}
308316
set_block_location(blk_id, loc);
309317
}
310318

0 commit comments

Comments
 (0)