Skip to content

Commit

Permalink
Updating code.
Browse files Browse the repository at this point in the history
  • Loading branch information
behzadmehmood committed Jul 31, 2024
1 parent 363291f commit 73f9a79
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
11 changes: 5 additions & 6 deletions vpr/src/place/net_cost_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ enum class NetUpdateState {

const int MAX_FANOUT_CROSSING_COUNT = 50;

double cong_matrix[400][400];
double cong_matrix_new[400][400];

/**
* @brief Crossing counts for nets with different #'s of pins. From
* ICCAD 94 pp. 690 - 695 (with linear interpolation applied by me).
Expand Down Expand Up @@ -458,10 +461,6 @@ static double get_net_cost(ClusterNetId net_id, const t_bb& bb);
*/
static double get_net_wirelength_estimate(ClusterNetId net_id, const t_bb& bb);

static void get_cong_matrix(ClusterNetId net_id, const t_bb& bb);

static double get_cong_cost(double chan_width)

/**
* @brief To mitigate round-off errors, every once in a while, the costs of nets are summed up from scratch.
* This functions is called to do that for bb cost. It doesn't calculate the BBs from scratch, it would only add the costs again.
Expand Down Expand Up @@ -1846,7 +1845,7 @@ static double get_net_wirelength_estimate(ClusterNetId net_id, const t_bb& bb) {
return (ncost);
}

static void get_cong_matrix(ClusterNetId net_id, const t_bb& bb) {
void get_cong_matrix(ClusterNetId net_id, const t_bb& bb) {
/* Finds the cost due to one net by looking at its coordinate bounding *
* box. */
// auto& cluster_ctx = g_vpr_ctx.clustering();
Expand All @@ -1865,7 +1864,7 @@ static void get_cong_matrix(ClusterNetId net_id, const t_bb& bb) {
}


static double get_cong_cost(double chan_width) {
double get_cong_cost(double chan_width) {
auto& device_ctx = g_vpr_ctx.device();
double max = 0.0;
double avg = 1e-4,var=0.0;
Expand Down
4 changes: 4 additions & 0 deletions vpr/src/place/net_cost_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,7 @@ void init_try_swap_net_cost_structs(size_t num_nets, bool cube_bb);
* @brief Free (layer_)ts_bb_edge_new, (layer_)ts_bb_coord_new, ts_layer_sink_pin_count, and ts_nets_to_update data structures.
*/
void free_try_swap_net_cost_structs();

void get_cong_matrix(ClusterNetId net_id, const t_bb& bb);

double get_cong_cost(double chan_width);
3 changes: 0 additions & 3 deletions vpr/src/place/place.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ static int num_swap_accepted = 0;
static int num_swap_aborted = 0;
static int num_ts_called = 0;

double cong_matrix[400][400];
double cong_matrix_new[400][400];

float congestion_tradeoff = 1.0;

std::unique_ptr<FILE, decltype(&vtr::fclose)> f_move_stats_file(nullptr,
Expand Down

0 comments on commit 73f9a79

Please sign in to comment.