Skip to content

Commit 7c841f5

Browse files
committed
making formatting changes
1 parent 421e4be commit 7c841f5

16 files changed

+83
-39
lines changed

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4957,9 +4957,9 @@ static bool parse_noc_router_connection_list(pugi::xml_node router_tag, const pu
49574957
}
49584958

49594959
// make sure that the current router isn't connected to itself
4960-
if (router_id == converted_connection){
4960+
if (router_id == converted_connection) {
49614961
archfpga_throw(loc_data.filename_c_str(), loc_data.line(router_tag),
4962-
"The router with id:%d was added to its own connection list. A router cannot connect to itself.", router_id);
4962+
"The router with id:%d was added to its own connection list. A router cannot connect to itself.", router_id);
49634963
}
49644964

49654965
// if we are here then a legal router id was supplied, so store it

vpr/src/base/noc_link.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@
4343

4444
class NocLink {
4545
private:
46-
4746
// the two routers that are connected by this link
4847
NocRouterId source_router; /*!< The router which has this link as an outgoing edge*/
49-
NocRouterId sink_router; /*!< The router which uses this link as an incoming edge*/
48+
NocRouterId sink_router; /*!< The router which uses this link as an incoming edge*/
5049

5150
double bandwidth_usage; /*!< Represents the bandwidth of the data being transmitted on the link. Units in bps*/
5251

vpr/src/base/noc_router.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ClusterBlockId NocRouter::get_router_block_ref(void) const {
2727
}
2828

2929
// setters
30-
void NocRouter::set_router_block_ref(ClusterBlockId router_block_ref_id){
30+
void NocRouter::set_router_block_ref(ClusterBlockId router_block_ref_id) {
3131
router_block_ref = router_block_ref_id;
3232
return;
3333
}

vpr/src/base/noc_router.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class NocRouter {
4646
int router_grid_position_x; /*<! Represents the horizontal grid position on the device the physical router tile is located*/
4747
int router_grid_position_y; /*<! Represents the vertical grid position on the device the physical router is located*/
4848

49-
ClusterBlockId router_block_ref;/*<! A unique identifier that represents a router block in the clustered netlist that is placed on the physical router*/
49+
ClusterBlockId router_block_ref; /*<! A unique identifier that represents a router block in the clustered netlist that is placed on the physical router*/
5050

5151
public:
5252
NocRouter(int id, int grid_position_x, int grid_position_y);

vpr/src/base/noc_storage.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
#include "noc_storage.h"
33

4-
54
NocStorage::NocStorage() {
65
clear_noc();
76
}
@@ -79,17 +78,17 @@ void NocStorage::add_link(NocRouterId source, NocRouterId sink) {
7978
return;
8079
}
8180

82-
void NocStorage::set_noc_link_bandwidth(double link_bandwidth){
81+
void NocStorage::set_noc_link_bandwidth(double link_bandwidth) {
8382
noc_link_bandwidth = link_bandwidth;
8483
return;
8584
}
8685

87-
void NocStorage::set_noc_link_latency(double link_latency){
86+
void NocStorage::set_noc_link_latency(double link_latency) {
8887
noc_link_latency = link_latency;
8988
return;
9089
}
9190

92-
void NocStorage::set_noc_router_latency(double router_latency){
91+
void NocStorage::set_noc_router_latency(double router_latency) {
9392
noc_router_latency = router_latency;
9493
return;
9594
}
@@ -148,7 +147,6 @@ NocLinkId NocStorage::get_parallel_link(NocLinkId current_link) const {
148147
}
149148

150149
void NocStorage::echo_noc(char* file_name) const {
151-
152150
FILE* fp;
153151
fp = vtr::fopen(file_name, "w");
154152

@@ -184,10 +182,9 @@ void NocStorage::echo_noc(char* file_name) const {
184182

185183
// go through the outgoing links of the current router and print the connecting router
186184
for (auto link_id = router_connections.begin(); link_id != router_connections.end(); link_id++) {
187-
188185
const NocRouterId connecting_router_id = get_single_noc_link(*link_id).get_sink_router();
189-
190-
fprintf(fp, " %d", get_single_noc_router(connecting_router_id).get_router_user_id());
186+
187+
fprintf(fp, " %d", get_single_noc_router(connecting_router_id).get_router_user_id());
191188
}
192189

193190
fprintf(fp, "\n\n");
@@ -196,5 +193,4 @@ void NocStorage::echo_noc(char* file_name) const {
196193
fclose(fp);
197194

198195
return;
199-
200196
}

vpr/src/base/noc_storage.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ constexpr NocLinkId INVALID_LINK_ID(-1);
5252

5353
class NocStorage {
5454
private:
55-
5655
vtr::vector<NocRouterId, NocRouter> router_storage; /*<! Contains all the routers in the NoC*/
5756

5857
// list of outgoing links for each router
@@ -64,8 +63,7 @@ class NocStorage {
6463
*/
6564
vtr::vector<NocRouterId, std::vector<NocLinkId>> router_link_list;
6665

67-
vtr::vector<NocLinkId, NocLink> link_storage;/*<! Contains all the links in the NoC*/
68-
66+
vtr::vector<NocLinkId, NocLink> link_storage; /*<! Contains all the links in the NoC*/
6967

7068
/**
7169
* @brief The user provides an ID for the router when describing the NoC
@@ -172,9 +170,8 @@ class NocStorage {
172170

173171
double get_noc_router_latency(void) const;
174172

175-
176173
// getters for routers
177-
174+
178175
/**
179176
* @brief Given a unique router identifier, get the corresponding router
180177
* within the NoC. The router cannot be modified, so the intended use

vpr/src/base/setup_noc.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "vtr_math.h"
1010
#include "echo_files.h"
1111

12-
1312
void setup_noc(const t_arch& arch) {
1413
// variable to store all the noc router tiles within the FPGA device
1514
// physical routers
@@ -119,7 +118,7 @@ void generate_noc(const t_arch& arch, NocContext& noc_ctx, std::vector<t_noc_rou
119118
}
120119

121120
void create_noc_routers(const t_noc_inf& noc_info, NocStorage* noc_model, std::vector<t_noc_router_tile_position>& noc_router_tiles) {
122-
// keep track of the shortest distance between a user described router (noc description in the arch file) and a physical router on the FPGA
121+
// keep track of the shortest distance between a user described router (noc description in the arch file) and a physical router on the FPGA
123122
double shortest_distance;
124123
double curr_calculated_distance;
125124
// stores the index of a physical router within the noc_router_tiles that is closest to a given user described router
@@ -140,7 +139,7 @@ void create_noc_routers(const t_noc_inf& noc_info, NocStorage* noc_model, std::v
140139
int error_case_physical_router_index_1;
141140
int error_case_physical_router_index_2;
142141

143-
// keep track of the router assignments (store the user router id that was assigned to each physical router tile)
142+
// keep track of the router assignments (store the user router id that was assigned to each physical router tile)
144143
// this is used in error checking, after determining the closest physical router for a user described router in the arch file, the datastructure below can be used to check if that physical router was already assigned previously
145144
std::vector<int> router_assignments;
146145
router_assignments.resize(noc_router_tiles.size(), PHYSICAL_ROUTER_NOT_ASSIGNED);
@@ -245,4 +244,3 @@ void create_noc_links(const t_noc_inf* noc_info, NocStorage* noc_model) {
245244

246245
return;
247246
}
248-

vpr/src/base/setup_noc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*
99
*/
1010

11-
1211
/**
1312
* @file
1413
* @brief This is the setup_noc header file. The main purpose of

vpr/src/base/vpr_context.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ struct NocContext : public Context {
427427
* The NoC model is created once from the architecture file description.
428428
*/
429429
NocStorage noc_model;
430-
431430
};
432431

433432
/**

vpr/src/draw/draw_noc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ NocLinkType determine_noc_link_type(ezgl::point2d link_start_point, ezgl::point2
363363
// get the dot product of the two connecting line
364364
double dot_product_of_link_and_horizontal_line = (x_coord_end - x_coord_start) * (x_coord_horziontal_end - x_coord_horizontal_start) + (y_coord_end - y_coord_start) * (y_coord_horizontal_end - y_coord_horizontal_start);
365365
// calculate the angle
366-
double angle = acos(dot_product_of_link_and_horizontal_line /(link_magnitude * HORIZONTAL_LINE_LENGTH));
366+
double angle = acos(dot_product_of_link_and_horizontal_line / (link_magnitude * HORIZONTAL_LINE_LENGTH));
367367

368368
// the angle is in the first or fourth quandrant of the unit circle
369369
if ((angle > 0) && (angle < (PI_RADIAN / 2))) {

vpr/src/draw/draw_noc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ void determine_direction_to_shift_noc_links(vtr::vector<NocLinkId, NocLinkShift>
212212
*/
213213
NocLinkType determine_noc_link_type(ezgl::point2d link_start_point, ezgl::point2d link_end_point);
214214

215-
216215
/**
217216
* @brief Given the starting and end coordinates of a line that represents a
218217
* NoC link, the line shifted to a new set of coordinates based on its

vpr/src/draw/draw_toggle_functions.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,7 @@ void toggle_router_expansion_costs(GtkWidget* /*widget*/, gint /*response_id*/,
378378
application.refresh_drawing();
379379
}
380380

381-
void toggle_noc_display(GtkWidget* /*widget*/, gint /*response_id*/, gpointer /*data*/)
382-
{
381+
void toggle_noc_display(GtkWidget* /*widget*/, gint /*response_id*/, gpointer /*data*/) {
383382
/* this is the callback function for runtime created toggle_noc_display button
384383
* which is written in button.cpp */
385384
t_draw_state* draw_state = get_draw_state_vars();

vpr/test/packing_pin_util.rpt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#Packing pin usage report
2+
Type: io
3+
Input Pin Usage:
4+
Max: 1.00 (0.50)
5+
Avg: 0.50 (0.25)
6+
Min: 0.00 (0.00)
7+
Histogram:
8+
[ 0: 0.2) 1 ( 50.0%) |**************************************************
9+
[ 0.2: 0.4) 0 ( 0.0%) |
10+
[ 0.4: 0.6) 0 ( 0.0%) |
11+
[ 0.6: 0.8) 0 ( 0.0%) |
12+
[ 0.8: 1) 1 ( 50.0%) |**************************************************
13+
[ 1: 1.2) 0 ( 0.0%) |
14+
[ 1.2: 1.4) 0 ( 0.0%) |
15+
[ 1.4: 1.6) 0 ( 0.0%) |
16+
[ 1.6: 1.8) 0 ( 0.0%) |
17+
[ 1.8: 2) 0 ( 0.0%) |
18+
Output Pin Usage:
19+
Max: 1.00 (1.00)
20+
Avg: 0.50 (0.50)
21+
Min: 0.00 (0.00)
22+
Histogram:
23+
[ 0: 0.1) 1 ( 50.0%) |**************************************************
24+
[ 0.1: 0.2) 0 ( 0.0%) |
25+
[ 0.2: 0.3) 0 ( 0.0%) |
26+
[ 0.3: 0.4) 0 ( 0.0%) |
27+
[ 0.4: 0.5) 0 ( 0.0%) |
28+
[ 0.5: 0.6) 0 ( 0.0%) |
29+
[ 0.6: 0.7) 0 ( 0.0%) |
30+
[ 0.7: 0.8) 0 ( 0.0%) |
31+
[ 0.8: 0.9) 0 ( 0.0%) |
32+
[ 0.9: 1) 1 ( 50.0%) |**************************************************
33+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#Timing report of worst 1 path(s)
2+
# Unit scale: 1e-09 seconds
3+
# Output precision: 3
4+
5+
#Path 1
6+
Startpoint: di.inpad[0] (.input clocked by virtual_io_clock)
7+
Endpoint : out:do.outpad[0] (.output clocked by virtual_io_clock)
8+
Path Type : setup
9+
10+
Point Incr Path
11+
--------------------------------------------------------------------------------
12+
clock virtual_io_clock (rise edge) 0.000 0.000
13+
clock source latency 0.000 0.000
14+
input external delay 0.000 0.000
15+
di.inpad[0] (.input) 0.000 0.000
16+
out:do.outpad[0] (.output) 1.338 1.338
17+
data arrival time 1.338
18+
19+
clock virtual_io_clock (rise edge) 0.000 0.000
20+
clock source latency 0.000 0.000
21+
clock uncertainty 0.000 0.000
22+
output external delay 0.000 0.000
23+
data required time 0.000
24+
--------------------------------------------------------------------------------
25+
data required time 0.000
26+
data arrival time -1.338
27+
--------------------------------------------------------------------------------
28+
slack (VIOLATED) -1.338
29+
30+
31+
#End of timing report

vpr/test/test_noc_storage.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ TEST_CASE("test_adding_routers_to_noc_storage", "[vpr_noc]") {
5353
converted_id = (NocRouterId)router_number;
5454
NocRouter router_to_verify = test_noc.get_single_noc_router(converted_id);
5555

56-
5756
// compare all the router properties
5857
REQUIRE(golden_set[router_number].get_router_user_id() == router_to_verify.get_router_user_id());
5958

@@ -163,21 +162,19 @@ TEST_CASE("test_add_link", "[vpr_noc]") {
163162

164163
// verify that the links were added properly to the NoC
165164
for (int link_number = 0; link_number < total_num_of_links; link_number++) {
166-
167165
// converting current link to the index used by the NocStorage class
168166
link_id = (NocLinkId)link_number;
169167
// using the link index, get it from the NoC
170168
NocLink current_link_to_test = test_noc.get_single_noc_link(link_id);
171169

172170
// now get the source and sink routers of the test link
173-
NocRouter test_link_source_router = test_noc.get_single_noc_router(current_link_to_test.get_source_router());
174-
NocRouter test_link_sink_router = test_noc.get_single_noc_router(current_link_to_test.get_sink_router());
171+
NocRouter test_link_source_router = test_noc.get_single_noc_router(current_link_to_test.get_source_router());
172+
NocRouter test_link_sink_router = test_noc.get_single_noc_router(current_link_to_test.get_sink_router());
175173

176174
// now get the source and sink routers of the golde link
177175
NocRouter golden_link_source_router = test_noc.get_single_noc_router(golden_set[link_number].get_source_router());
178176
NocRouter golden_link_sink_router = test_noc.get_single_noc_router(golden_set[link_number].get_sink_router());
179177

180-
181178
// verify the test link by checking that the source and sink routers match the golden reference link
182179
REQUIRE(golden_link_source_router.get_router_user_id() == test_link_source_router.get_router_user_id());
183180
REQUIRE(golden_link_sink_router.get_router_user_id() == test_link_sink_router.get_router_user_id());

vpr/test/test_setup_noc.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -683,16 +683,13 @@ TEST_CASE("test_create_noc_links", "[vpr_setup_noc]") {
683683
router_connection = noc_info.router_list[router_id - 1].connection_list.begin();
684684

685685
for (auto noc_link = noc_model.get_noc_router_connections(current_source_router_id).begin(); noc_link != noc_model.get_noc_router_connections(current_source_router_id).begin(); noc_link++) {
686-
687686
// get the connecting link
688687
NocLink connecting_link = noc_model.get_single_noc_link(*noc_link);
689-
688+
690689
// get the destination router
691690
current_destination_router_id = connecting_link.get_sink_router();
692691
NocRouter current_destination_router = noc_model.get_single_noc_router(current_destination_router_id);
693692

694-
695-
696693
REQUIRE((current_destination_router.get_router_user_id()) == (*router_connection));
697694

698695
router_connection++;

0 commit comments

Comments
 (0)