Skip to content

Commit 213123a

Browse files
committed
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-verilog-to-routing into read_rr_graph_run_flat
2 parents 9642bb4 + 49de5fb commit 213123a

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

vpr/src/base/read_options.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1633,7 +1633,7 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
16331633
.show_in(argparse::ShowIn::HELP_ONLY);
16341634

16351635
file_grp.add_argument(args.read_initial_place_file, "--read_initial_place_file")
1636-
.help("Writes out the the placement chosen by the initial placement algorithm to the specified file")
1636+
.help("Reads the initial placement and continues the rest of the placement process from there.")
16371637
.metavar("INITIAL_PLACE_FILE")
16381638
.show_in(argparse::ShowIn::HELP_ONLY);
16391639

vpr/src/base/read_place.cpp

+8
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

vpr/src/place/initial_placement.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1187,12 +1187,13 @@ void initial_placement(const t_placer_opts& placer_opts,
11871187
clear_all_grid_locs();
11881188

11891189
/* Go through cluster blocks to calculate the tightest placement
1190-
* floorplan constraint for each constrained block
1191-
*/
1190+
* floorplan constraint for each constrained block
1191+
*/
11921192
propagate_place_constraints();
11931193

11941194
/*Mark the blocks that have already been locked to one spot via floorplan constraints
1195-
* as fixed, so they do not get moved during initial placement or later during the simulated annealing stage of placement*/
1195+
* as fixed, so they do not get moved during initial placement or later during the simulated annealing stage of placement
1196+
*/
11961197
mark_fixed_blocks();
11971198

11981199
// Compute and store compressed floorplanning constraints

vpr/src/place/place.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ void try_place(const Netlist<>& net_list,
462462
if (!placer_opts.write_initial_place_file.empty()) {
463463
print_place(nullptr,
464464
nullptr,
465-
(placer_opts.write_initial_place_file).c_str());
465+
placer_opts.write_initial_place_file.c_str());
466466
}
467467

468468
#ifdef ENABLE_ANALYTIC_PLACE

0 commit comments

Comments
 (0)