File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,11 @@ void read_place(const char* net_file,
139
139
place_ctx.placement_id = vtr::secure_digest_file (place_file);
140
140
}
141
141
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
+ */
142
146
void read_user_block_loc (const char * constraints_file) {
143
- /* Reads in the locations of the blocks from a file. */
144
147
t_hash **hash_table, *h_ptr;
145
148
int xtmp, ytmp;
146
149
FILE* fp;
Original file line number Diff line number Diff line change @@ -321,8 +321,12 @@ static void initial_placement_blocks(std::vector<std::vector<int>>& free_locatio
321
321
}
322
322
323
323
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
326
330
continue ;
327
331
}
328
332
You can’t perform that action at this time.
0 commit comments