Skip to content

Commit c680685

Browse files
committed
Updating data types
1 parent 2fd1be9 commit c680685

File tree

4 files changed

+9
-21
lines changed

4 files changed

+9
-21
lines changed

vpr/src/base/read_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2250,7 +2250,7 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
22502250
"Trade-off control the bouding value for the contestion matrix.\n"
22512251
" a value near routing channel width can be a good value.\n"
22522252
" a high value let the VPR to ignore the congestion aware placement and continue its own course of action.\n")
2253-
.default_value("1.0")
2253+
.default_value("0.5")
22542254
.show_in(argparse::ShowIn::HELP_ONLY);
22552255

22562256
place_timing_grp.add_argument(args.RecomputeCritIter, "--recompute_crit_iter")

vpr/src/place/net_cost_handler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ enum class NetUpdateState {
5454

5555
const int MAX_FANOUT_CROSSING_COUNT = 50;
5656

57-
vtr::NdMatrix<double, 2> cong_matrix;
58-
vtr::NdMatrix<double, 2> cong_matrix_new;
57+
static vtr::NdMatrix<float, 2> cong_matrix;
58+
static vtr::NdMatrix<float, 2> cong_matrix_new;
5959

6060
/**
6161
* @brief Crossing counts for nets with different #'s of pins. From

vpr/src/place/place.cpp

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static void invalidate_affected_connections(
273273

274274
static float analyze_setup_slack_cost(const PlacerSetupSlacks* setup_slacks);
275275

276-
static e_move_result assess_swap(double delta_c, double t,double cong_delta_c,double cost,const t_placer_opts& placer_opts);
276+
static e_move_result assess_swap(double delta_c, double t, double cong_delta_c, double cost, const t_placer_opts& placer_opts);
277277

278278
static void update_placement_cost_normalization_factors(t_placer_costs* costs, const t_placer_opts& placer_opts, const t_noc_opts& noc_opts);
279279

@@ -2140,24 +2140,16 @@ static int check_block_placement_consistency() {
21402140
if (physical_tile_type(bnum) != physical_tile) {
21412141
VTR_LOG_ERROR(
21422142
"Block %zu type (%s) does not match grid location (%zu,%zu, %d) type (%s).\n",
2143-
size_t(bnum), logical_block->name, i, j, layer_num, physical_tile->name);
2143+
size_t(bnum), logical_block->name, i, j, layer_num, physical_tile->name);
21442144
error++;
21452145
}
21462146

21472147
auto& loc = place_ctx.block_locs[bnum].loc;
21482148
if (loc.x != i || loc.y != j || loc.layer != layer_num
2149-
|| !is_sub_tile_compatible(physical_tile, logical_block,
2150-
loc.sub_tile)) {
2149+
|| !is_sub_tile_compatible(physical_tile, logical_block, loc.sub_tile)) {
21512150
VTR_LOG_ERROR(
21522151
"Block %zu's location is (%d,%d,%d) but found in grid at (%zu,%zu,%d,%d).\n",
2153-
size_t(bnum),
2154-
loc.x,
2155-
loc.y,
2156-
loc.sub_tile,
2157-
tile_loc.x,
2158-
tile_loc.y,
2159-
tile_loc.layer_num,
2160-
layer_num);
2152+
size_t(bnum), loc.x, loc.y, loc.sub_tile, tile_loc.x, tile_loc.y, tile_loc.layer_num, layer_num);
21612153
error++;
21622154
}
21632155
++usage_check;
@@ -2166,11 +2158,7 @@ static int check_block_placement_consistency() {
21662158
if (usage_check != place_ctx.grid_blocks.get_usage(tile_loc)) {
21672159
VTR_LOG_ERROR(
21682160
"%d block(s) were placed at location (%d,%d,%d), but location contains %d block(s).\n",
2169-
place_ctx.grid_blocks.get_usage(tile_loc),
2170-
tile_loc.x,
2171-
tile_loc.y,
2172-
tile_loc.layer_num,
2173-
usage_check);
2161+
place_ctx.grid_blocks.get_usage(tile_loc), tile_loc.x, tile_loc.y, tile_loc.layer_num, usage_check);
21742162
error++;
21752163
}
21762164
}

vpr/src/place/place_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static GridBlock init_grid_blocks() {
5050
void t_placer_costs::update_norm_factors() {
5151
if (place_algorithm.is_timing_driven()) {
5252
bb_cost_norm = 1 / bb_cost;
53-
cong_cost_norm = 1/ cong_cost;
53+
if (cong_cost) cong_cost_norm = 1/ cong_cost;
5454
//Prevent the norm factor from going to infinity
5555
timing_cost_norm = std::min(1 / timing_cost, MAX_INV_TIMING_COST);
5656
} else {

0 commit comments

Comments
 (0)