Skip to content

Commit c70dc7d

Browse files
committed
Always mark locations as found if empty.
- Use is_empty_type over direct comparisions. Signed-off-by: Keith Rothman <[email protected]>
1 parent 0f2f19b commit c70dc7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vpr/src/place/timing_place_lookup.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ static void generic_compute_matrix_expand(
383383

384384
t_physical_tile_type_ptr src_type = device_ctx.grid[source_x][source_y].type;
385385
bool is_allowed_type = allowed_types.empty() || allowed_types.find(src_type->name) != allowed_types.end();
386-
if (src_type == device_ctx.EMPTY_PHYSICAL_TILE_TYPE || !is_allowed_type) {
386+
if (is_empty_type(src_type) || !is_allowed_type) {
387387
for (int sink_x = start_x; sink_x <= end_x; sink_x++) {
388388
for (int sink_y = start_y; sink_y <= end_y; sink_y++) {
389389
int delta_x = abs(sink_x - source_x);
@@ -425,7 +425,8 @@ static void generic_compute_matrix_expand(
425425
}
426426

427427
t_physical_tile_type_ptr sink_type = device_ctx.grid[sink_x][sink_y].type;
428-
if (sink_type == device_ctx.EMPTY_PHYSICAL_TILE_TYPE) {
428+
if (is_empty_type(sink_type)) {
429+
found_matrix[delta_x][delta_y] = true;
429430
if (matrix[delta_x][delta_y].empty()) {
430431
//Only set empty target if we don't already have a valid delta delay
431432
matrix[delta_x][delta_y].push_back(EMPTY_DELTA);
@@ -436,7 +437,6 @@ static void generic_compute_matrix_expand(
436437
source_x, source_y,
437438
sink_x, sink_y);
438439
#endif
439-
found_matrix[delta_x][delta_y] = true;
440440
}
441441
} else {
442442
bool found_a_sink = false;

0 commit comments

Comments
 (0)