Skip to content

Commit 7e2ca97

Browse files
sfkhalidvaughnbetz
authored andcommitted
Updated some comments related to reading in constraints file
1 parent cf92a16 commit 7e2ca97

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

vpr/src/base/read_place.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,11 @@ void read_place(const char* net_file,
139139
place_ctx.placement_id = vtr::secure_digest_file(place_file);
140140
}
141141

142+
/** Reads in blocks whose locations are specified in a constraints file. Constraint file is in .place format.
143+
* All blocks specified in this file will be locked down at their specified x, y, subtile locations.
144+
* (Will not be moved by optimizers during placement
145+
*/
142146
void read_user_block_loc(const char* constraints_file) {
143-
/* Reads in the locations of the blocks from a file. */
144147
t_hash **hash_table, *h_ptr;
145148
int xtmp, ytmp;
146149
FILE* fp;

vpr/src/place/initial_placement.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,12 @@ static void initial_placement_blocks(std::vector<std::vector<int>>& free_locatio
321321
}
322322

323323
for (auto blk_id : sorted_blocks) {
324-
if (place_ctx.block_locs[blk_id].loc.x != -1) { // -1 is a sentinel for an empty block
325-
// block placed.
324+
/* -1 is a sentinel for a non-placed block, which the code in this routine will choose a location for.
325+
* If the x value is not -1, we assume something else has already placed this block and we should leave it there.
326+
* For example, if the user constrained it to a certain location, the block has already been placed.
327+
*/
328+
if (place_ctx.block_locs[blk_id].loc.x != -1) {
329+
//put VTR assert
326330
continue;
327331
}
328332

0 commit comments

Comments
 (0)