Skip to content

Noc cost normalization #2485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8dc44da
Merge branch 'init_noc_sa' into noc_congestion_model
soheilshahrouz Jan 22, 2024
04413bc
Merge branch 'noc_qor_doc_issue' into noc_congestion_model
soheilshahrouz Jan 22, 2024
508206c
Avoid passing place_ctx.block_locs as argument in a function call hie…
soheilshahrouz Jan 22, 2024
0bb3ffc
Add bandwidth and congestion to NoCLink
soheilshahrouz Jan 22, 2024
60a740b
Replaced pointers to g_vpr_ctx.noc().noc_traffic_flows_storage with r…
soheilshahrouz Jan 22, 2024
1519e60
compute NoC congestion cost difference for router swap
soheilshahrouz Jan 22, 2024
79b1391
fix syntax errors in NoC tests
soheilshahrouz Jan 22, 2024
774670a
Use NocDeltaCost instead of passing 3 arguments
soheilshahrouz Jan 22, 2024
c7e3cb6
Add operator+=() to t_placer_costs.
soheilshahrouz Jan 22, 2024
8fcdda5
Updated commit_noc_costs(), allocate_and_load_noc_placement_structs()…
soheilshahrouz Jan 23, 2024
3946029
Modified noc_place_utils.cpp to compute congestion cost
soheilshahrouz Jan 23, 2024
37a739e
Use std::unique_ptr to hold the pointer to the routing algorithm.
soheilshahrouz Jan 23, 2024
7a01eff
Add calculate_noc_cost()
soheilshahrouz Jan 23, 2024
e43ef3d
Add --noc_congestion_weighting command line option
soheilshahrouz Jan 23, 2024
b2ec184
Compute and print NoC congestion metrics.
soheilshahrouz Jan 25, 2024
017da60
Add get_total_congestion_bandwidth_ratio()
soheilshahrouz Jan 25, 2024
2ad4b69
Fix NoC test failure
soheilshahrouz Jan 26, 2024
41af9bc
Remove init_chan() call
soheilshahrouz Jan 26, 2024
e9a27b4
Update normalization factors during NoC initial placement
soheilshahrouz Jan 26, 2024
f7731d2
pass strings by reference
soheilshahrouz Jan 26, 2024
4a22e5b
Print NoC metrics in print_place_status()
soheilshahrouz Jan 29, 2024
5726f98
revert renormalization in initial noc placement
soheilshahrouz Jan 29, 2024
f93cfd9
Merge branch 'master' into noc_congestion_model
soheilshahrouz Jan 29, 2024
3d41245
Update test_check_noc_placement_costs to test congestion
soheilshahrouz Jan 30, 2024
5458ba8
Update test_initial_noc_placement to check congested links
soheilshahrouz Jan 30, 2024
5eed8ae
Update test_initial_comp_cost_functions to check congestion cost comp…
soheilshahrouz Jan 30, 2024
304de90
Update test_find_affected_noc_routers_and_update_noc_costs, test_comm…
soheilshahrouz Jan 30, 2024
0827d99
Updated test_find_affected_noc_routers_and_update_noc_costs to check …
soheilshahrouz Jan 30, 2024
4896984
Comment some functions and data structures
soheilshahrouz Jan 31, 2024
6bede42
Separate NoC cost computation and normalization
soheilshahrouz Feb 1, 2024
4770634
Update unit tests
soheilshahrouz Feb 1, 2024
b5a4c81
NoC cost weighting factors add up to 1
soheilshahrouz Feb 1, 2024
4b9d804
Update normalization factors during NoC initial placement
soheilshahrouz Feb 1, 2024
37426cb
parse new noc metrics
soheilshahrouz Feb 2, 2024
2d3e642
Add include_temp to vtr task syntax
soheilshahrouz Feb 2, 2024
a440aa5
update PWD environment variable before spawning a subprocess
soheilshahrouz Feb 2, 2024
a0de5f1
Revert "Add include_temp to vtr task syntax"
soheilshahrouz Feb 2, 2024
c33a6a8
revert renormalization during init noc placement
soheilshahrouz Feb 7, 2024
2f078fe
remove ununsed functions
soheilshahrouz Feb 7, 2024
bc3557c
updated default NoC placement weighting factors
soheilshahrouz Feb 7, 2024
e59bc3c
Merge branch 'master' into noc_cost_norm
soheilshahrouz Feb 7, 2024
e752132
Merge branch 'master' into noc_cost_norm
soheilshahrouz Feb 12, 2024
619d9e7
removed unused arguments
soheilshahrouz Feb 12, 2024
a92ba80
applied PR comments
soheilshahrouz Feb 13, 2024
b9add7f
moved comments from source file to header
soheilshahrouz Feb 13, 2024
581c3a4
fix pylint errors
soheilshahrouz Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/libarchfpga/src/physical_types_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ std::vector<std::string> block_type_class_index_to_pin_names(t_physical_tile_typ
bool is_flat);

///@brief Returns the physical tile type matching a given physical tile type name, or nullptr (if not found)
t_physical_tile_type_ptr find_tile_type_by_name(std::string name, const std::vector<t_physical_tile_type>& types);
t_physical_tile_type_ptr find_tile_type_by_name(const std::string& name, const std::vector<t_physical_tile_type>& types);

int find_pin_class(t_physical_tile_type_ptr type, std::string port_name, int pin_index_in_port, e_pin_type pin_type);

Expand Down
1 change: 1 addition & 0 deletions vpr/src/base/SetupVPR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ static void SetupNocOpts(const t_options& Options, t_noc_opts* NocOpts) {
NocOpts->noc_placement_weighting = Options.noc_placement_weighting;
NocOpts->noc_latency_constraints_weighting = Options.noc_latency_constraints_weighting;
NocOpts->noc_latency_weighting = Options.noc_latency_weighting;
NocOpts->noc_congestion_weighting = Options.noc_congestion_weighting;
NocOpts->noc_swap_percentage = Options.noc_swap_percentage;
NocOpts->noc_placement_file_name = Options.noc_placement_file_name;

Expand Down
1 change: 1 addition & 0 deletions vpr/src/base/ShowSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ static void ShowNocOpts(const t_noc_opts& NocOpts) {
VTR_LOG("NocOpts.noc_placement_weighting: %f\n", NocOpts.noc_placement_weighting);
VTR_LOG("NocOpts.noc_latency_constraints_weighting: %f\n", NocOpts.noc_latency_constraints_weighting);
VTR_LOG("NocOpts.noc_latency_weighting: %f\n", NocOpts.noc_latency_weighting);
VTR_LOG("NocOpts.noc_congestion_weighting: %f\n", NocOpts.noc_congestion_weighting);
VTR_LOG("NocOpts.noc_swap_percentage: %d%%\n", NocOpts.noc_swap_percentage);
VTR_LOG("NocOpts.noc_routing_algorithm: %s\n", NocOpts.noc_placement_file_name.c_str());
VTR_LOG("\n");
Expand Down
25 changes: 11 additions & 14 deletions vpr/src/base/place_and_route.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <climits>
#include <cstdlib>
#include <cmath>
#include <algorithm>

#include "vtr_util.h"
#include "vtr_memory.h"
Expand Down Expand Up @@ -425,7 +426,7 @@ int binary_search_place_and_route(const Netlist<>& placement_net_list,
* is used to determine if the channel width should be rounded to an
* even number.
*/
t_chan_width init_chan(int cfactor, t_chan_width_dist chan_width_dist, t_graph_type graph_directionality) {
t_chan_width init_chan(int cfactor, const t_chan_width_dist& chan_width_dist, t_graph_type graph_directionality) {
auto& device_ctx = g_vpr_ctx.mutable_device();
auto& grid = device_ctx.grid;

Expand Down Expand Up @@ -460,19 +461,15 @@ t_chan_width init_chan(int cfactor, t_chan_width_dist chan_width_dist, t_graph_t
}
}

chan_width.max = 0;
chan_width.x_max = chan_width.y_max = INT_MIN;
chan_width.x_min = chan_width.y_min = INT_MAX;
for (size_t i = 0; i < grid.height(); ++i) {
chan_width.x_max = std::max(chan_width.x_max, chan_width.x_list[i]);
chan_width.x_min = std::min(chan_width.x_min, chan_width.x_list[i]);
}
chan_width.max = std::max(chan_width.max, chan_width.x_max);
for (size_t i = 0; i < grid.width(); ++i) {
chan_width.y_max = std::max(chan_width.y_max, chan_width.y_list[i]);
chan_width.y_min = std::min(chan_width.y_min, chan_width.y_list[i]);
}
chan_width.max = std::max(chan_width.max, chan_width.y_max);
auto minmax = std::minmax_element(chan_width.x_list.begin(), chan_width.x_list.end());
chan_width.x_min = *minmax.first;
chan_width.x_max = *minmax.second;

minmax = std::minmax_element(chan_width.y_list.begin(), chan_width.y_list.end());
chan_width.y_min = *minmax.first;
chan_width.y_max = *minmax.second;

chan_width.max = std::max(chan_width.x_max, chan_width.y_max);

#ifdef VERBOSE
VTR_LOG("\n");
Expand Down
4 changes: 3 additions & 1 deletion vpr/src/base/place_and_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ int binary_search_place_and_route(const Netlist<>& placement_net_list,
std::shared_ptr<RoutingDelayCalculator> delay_calc,
bool is_flat);

t_chan_width init_chan(int cfactor, t_chan_width_dist chan_width_dist, t_graph_type graph_directionality);
t_chan_width init_chan(int cfactor,
const t_chan_width_dist& chan_width_dist,
t_graph_type graph_directionality);

void post_place_sync();

Expand Down
Loading