Skip to content

Commit af7b58f

Browse files
committed
ensured that all the helper functions in setup noc are limited to be used in setup_noc.cpp
1 parent 601a652 commit af7b58f

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

vpr/src/base/setup_noc.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
#include "vpr_error.h"
99
#include "vtr_math.h"
1010

11+
static void identify_and_store_noc_router_tile_positions(const DeviceGrid& device_grid, std::vector<t_noc_router_tile_position>& list_of_noc_router_tiles, std::string noc_router_tile_name);
12+
13+
static void generate_noc(const t_arch& arch, NocContext& noc_ctx, std::vector<t_noc_router_tile_position>& list_of_noc_router_tiles);
14+
15+
static void create_noc_routers(const t_noc_inf& noc_info, NocStorage* noc_model, std::vector<t_noc_router_tile_position>& list_of_noc_router_tiles);
16+
17+
static void create_noc_links(const t_noc_inf* noc_info, NocStorage* noc_model);
18+
1119

1220
void setup_noc(const t_arch& arch)
1321
{
@@ -49,7 +57,7 @@ void setup_noc(const t_arch& arch)
4957

5058
}
5159

52-
void identify_and_store_noc_router_tile_positions(const DeviceGrid& device_grid, std::vector<t_noc_router_tile_position>& list_of_noc_router_tiles, std::string noc_router_tile_name)
60+
static void identify_and_store_noc_router_tile_positions(const DeviceGrid& device_grid, std::vector<t_noc_router_tile_position>& list_of_noc_router_tiles, std::string noc_router_tile_name)
5361
{
5462
int grid_width = device_grid.width();
5563
int grid_height = device_grid.height();
@@ -129,7 +137,7 @@ void generate_noc(const t_arch& arch, NocContext& noc_ctx, std::vector<t_noc_rou
129137

130138
}
131139

132-
void create_noc_routers(const t_noc_inf& noc_info, NocStorage* noc_model , std::vector<t_noc_router_tile_position>& list_of_noc_router_tiles)
140+
static void create_noc_routers(const t_noc_inf& noc_info, NocStorage* noc_model , std::vector<t_noc_router_tile_position>& list_of_noc_router_tiles)
133141
{
134142
// keep track of the shortest distance between a logical router and the curren physical router tile
135143
// also keep track of the corresponding physical router tile index (within the list)
@@ -241,7 +249,7 @@ void create_noc_routers(const t_noc_inf& noc_info, NocStorage* noc_model , std::
241249
return;
242250
}
243251

244-
void create_noc_links(const t_noc_inf* noc_info, NocStorage* noc_model){
252+
static void create_noc_links(const t_noc_inf* noc_info, NocStorage* noc_model){
245253
// the ids used to represent the routers in the NoC are not the same as the ones provided by the user in the arch desc file.
246254
// while going through the router connections, the user provided router ids are converted and then stored below before being used
247255
// in the links.

vpr/src/base/setup_noc.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,5 @@ struct t_noc_router_tile_position {
3131

3232
void setup_noc(const t_arch& arch);
3333

34-
void identify_and_store_noc_router_tile_positions(const DeviceGrid& device_grid, std::vector<t_noc_router_tile_position>& list_of_noc_router_tiles, std::string noc_router_tile_name);
35-
36-
void generate_noc(const t_arch& arch, NocContext& noc_ctx, std::vector<t_noc_router_tile_position>& list_of_noc_router_tiles);
37-
38-
void create_noc_routers(const t_noc_inf& noc_info, NocStorage* noc_model, std::vector<t_noc_router_tile_position>& list_of_noc_router_tiles);
39-
40-
void create_noc_links(const t_noc_inf* noc_info, NocStorage* noc_model);
41-
42-
43-
44-
45-
46-
47-
48-
4934

5035
#endif

0 commit comments

Comments
 (0)