Skip to content

Commit 192f639

Browse files
remove detailed_link_bandwidth_ and its getter
1 parent 43636d8 commit 192f639

File tree

5 files changed

+20
-36
lines changed

5 files changed

+20
-36
lines changed

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,7 +2545,7 @@ static void ProcessBlockTypeLocs(t_grid_def& grid_def,
25452545
right_edge.y.start_expr = "0";
25462546
right_edge.y.end_expr = "H - 1";
25472547

2548-
t_grid_loc_def bottom_edge(type_name, priority); //Exclucing corners
2548+
t_grid_loc_def bottom_edge(type_name, priority); //Excluding corners
25492549
bottom_edge.x.start_expr = "1";
25502550
bottom_edge.x.end_expr = "W - 2";
25512551
bottom_edge.y.start_expr = "0";
@@ -3496,9 +3496,6 @@ static void ProcessSubTiles(pugi::xml_node Node,
34963496
// used to assign indices to subtiles
34973497
int subtile_index = 0;
34983498

3499-
// used to find duplicate port names
3500-
std::unordered_map<std::string, t_physical_tile_port> tile_port_names;
3501-
35023499
CurSubTile = get_first_child(Node, "sub_tile", loc_data);
35033500

35043501
while (CurSubTile) {

vpr/src/noc/bfs_routing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class BFSRouting : public NocRouting {
4242
* Identifies the ending point of the route within the NoC.This represents a
4343
* physical router on the FPGA.
4444
* @param traffic_flow_id The unique ID for the traffic flow being routed.
45-
* @param flow_route Stores the path returned by this fuction
45+
* @param flow_route Stores the path returned by this function
4646
* as a series of NoC links found by
4747
* a NoC routing algorithm between two routers in a traffic flow.
4848
* The function will clear any

vpr/src/noc/noc_storage.cpp

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@ const std::vector<NocLinkId>& NocStorage::get_noc_router_connections(NocRouterId
1111
return router_link_list[id];
1212
}
1313

14-
const vtr::vector<NocRouterId, NocRouter>& NocStorage::get_noc_routers(void) const {
14+
const vtr::vector<NocRouterId, NocRouter>& NocStorage::get_noc_routers() const {
1515
return router_storage;
1616
}
1717

1818
int NocStorage::get_number_of_noc_routers(void) const {
1919
return router_storage.size();
2020
}
2121

22-
const vtr::vector<NocLinkId, NocLink>& NocStorage::get_noc_links(void) const {
22+
const vtr::vector<NocLinkId, NocLink>& NocStorage::get_noc_links() const {
2323
return link_storage;
2424
}
2525

26-
vtr::vector<NocLinkId, NocLink>& NocStorage::get_mutable_noc_links(void) {
26+
vtr::vector<NocLinkId, NocLink>& NocStorage::get_mutable_noc_links() {
2727
return link_storage;
2828
}
2929

30-
int NocStorage::get_number_of_noc_links(void) const {
30+
int NocStorage::get_number_of_noc_links() const {
3131
return link_storage.size();
3232
}
3333

34-
double NocStorage::get_noc_link_latency(void) const {
34+
double NocStorage::get_noc_link_latency() const {
3535
return noc_link_latency;
3636
}
3737

38-
double NocStorage::get_noc_router_latency(void) const {
38+
double NocStorage::get_noc_router_latency() const {
3939
return noc_router_latency;
4040
}
4141

@@ -47,10 +47,6 @@ bool NocStorage::get_detailed_link_latency() const {
4747
return detailed_link_latency_;
4848
}
4949

50-
bool NocStorage::get_detailed_link_bandwidth() const {
51-
return detailed_link_bandwidth_;
52-
}
53-
5450
const NocRouter& NocStorage::get_single_noc_router(NocRouterId id) const {
5551
return router_storage[id];
5652
}
@@ -225,12 +221,6 @@ void NocStorage::finished_building_noc() {
225221
return a.get_latency() != b.get_latency();
226222
});
227223
detailed_link_latency_ = (link_latency_it != link_storage.end());
228-
229-
auto link_bandwidth_it = std::adjacent_find(link_storage.begin(), link_storage.end(),
230-
[](const NocLink& a, const NocLink& b) {
231-
return a.get_bandwidth() != b.get_bandwidth();
232-
});
233-
detailed_link_bandwidth_ = (link_bandwidth_it != link_storage.end());
234224
}
235225

236226
void NocStorage::clear_noc() {
@@ -252,7 +242,7 @@ NocRouterId NocStorage::convert_router_id(int id) const {
252242
return result->second;
253243
}
254244

255-
void NocStorage::make_room_for_noc_router_link_list(void) {
245+
void NocStorage::make_room_for_noc_router_link_list() {
256246
VTR_ASSERT_MSG(!built_noc, "NoC already built, cannot modify further.");
257247
router_link_list.resize(router_storage.size());
258248
}

vpr/src/noc/noc_storage.h

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,6 @@ class NocStorage {
142142
*/
143143
bool detailed_link_latency_;
144144

145-
/**
146-
* @brief When set true, specifies that some NoC links have different
147-
* bandwidth than others. When set false, all the NoC link have the same
148-
* bandwidth.
149-
*/
150-
bool detailed_link_bandwidth_;
151-
152145
/**
153146
* @brief A constant reference to this vector is returned by get_noc_links(...).
154147
* This is used to avoid memory allocation whenever get_noc_links(...) is called.
@@ -200,13 +193,13 @@ class NocStorage {
200193
*
201194
* @return A vector of routers.
202195
*/
203-
const vtr::vector<NocRouterId, NocRouter>& get_noc_routers(void) const;
196+
const vtr::vector<NocRouterId, NocRouter>& get_noc_routers() const;
204197

205198
/**
206199
* @return An integer representing the total number of routers within the
207200
* NoC.
208201
*/
209-
int get_number_of_noc_routers(void) const;
202+
int get_number_of_noc_routers() const;
210203

211204
/**
212205
* @brief Get all the links in the NoC. The links themselves cannot
@@ -215,7 +208,7 @@ class NocStorage {
215208
*
216209
* @return A vector of links.
217210
*/
218-
const vtr::vector<NocLinkId, NocLink>& get_noc_links(void) const;
211+
const vtr::vector<NocLinkId, NocLink>& get_noc_links() const;
219212

220213
/**
221214
* @brief Get all the links in the NoC. The links themselves can
@@ -368,7 +361,7 @@ class NocStorage {
368361
* tile that this router represents.
369362
*/
370363
void add_router(int id,
371-
int grid_position_x, int grid_position_y, int layer_poisition,
364+
int grid_position_x, int grid_position_y, int layer_position,
372365
double latency);
373366

374367
/**
@@ -477,7 +470,7 @@ class NocStorage {
477470
* number of routers in the NoC.
478471
*
479472
*/
480-
void make_room_for_noc_router_link_list(void);
473+
void make_room_for_noc_router_link_list();
481474

482475
/**
483476
* @brief Two links are considered parallel when the source router of one

vpr/src/place/noc_place_utils.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ std::vector<NocLinkId>& route_traffic_flow(NocTrafficFlowId traffic_flow_id,
173173
* @param traffic_flow_bandwidth The bandwidth of a traffic flow. This will
174174
* be used to update bandwidth usage of the links.
175175
*/
176-
void update_traffic_flow_link_usage(const std::vector<NocLinkId>& traffic_flow_route, NocStorage& noc_model, int inc_or_dec, double traffic_flow_bandwidth);
176+
void update_traffic_flow_link_usage(const std::vector<NocLinkId>& traffic_flow_route,
177+
NocStorage& noc_model,
178+
int inc_or_dec,
179+
double traffic_flow_bandwidth);
177180

178181
/**
179182
* @brief Goes through all the traffic flows associated to a moved
@@ -355,7 +358,8 @@ int check_noc_placement_costs(const t_placer_costs& costs, double error_toleranc
355358
* its priority.
356359
* @return The computed aggregate bandwidth for the provided traffic flow
357360
*/
358-
double calculate_traffic_flow_aggregate_bandwidth_cost(const std::vector<NocLinkId>& traffic_flow_route, const t_noc_traffic_flow& traffic_flow_info);
361+
double calculate_traffic_flow_aggregate_bandwidth_cost(const std::vector<NocLinkId>& traffic_flow_route,
362+
const t_noc_traffic_flow& traffic_flow_info);
359363

360364
/**
361365
* @brief Determines the latency cost of a routed traffic flow.

0 commit comments

Comments
 (0)