Skip to content

Commit 4a4eb96

Browse files
committed
[vpr] code cleanup
1 parent 2280445 commit 4a4eb96

File tree

7 files changed

+14
-15
lines changed

7 files changed

+14
-15
lines changed

libs/librrgraph/src/base/check_rr_graph.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void check_rr_graph(const RRGraphView& rr_graph,
4747
const DeviceGrid& grid,
4848
const t_chan_width& chan_width,
4949
const t_graph_type graph_type,
50-
int virtual_clock_network_root_idx) {
50+
const int virtual_clock_network_root_idx) {
5151
e_route_type route_type = DETAILED;
5252
if (graph_type == GRAPH_GLOBAL) {
5353
route_type = GLOBAL;
@@ -291,8 +291,8 @@ void check_rr_node(const RRGraphView& rr_graph,
291291
const vtr::vector<RRIndexedDataId, t_rr_indexed_data>& rr_indexed_data,
292292
const DeviceGrid& grid,
293293
const t_chan_width& chan_width,
294-
enum e_route_type route_type,
295-
int inode) {
294+
const enum e_route_type route_type,
295+
const int inode) {
296296
/* This routine checks that the rr_node is inside the grid and has a valid
297297
* pin number, etc.
298298
*/

libs/librrgraph/src/base/check_rr_graph.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ void check_rr_graph(const RRGraphView& rr_graph,
1111
const DeviceGrid& grid,
1212
const t_chan_width& chan_width,
1313
const t_graph_type graph_type,
14-
int virtual_clock_network_root_idx);
14+
const int virtual_clock_network_root_idx);
1515

1616
void check_rr_node(const RRGraphView& rr_graph,
1717
const vtr::vector<RRIndexedDataId, t_rr_indexed_data>& rr_indexed_data,
1818
const DeviceGrid& grid,
1919
const t_chan_width& chan_width,
20-
enum e_route_type route_type,
21-
int inode);
20+
const enum e_route_type route_type,
21+
const int inode);
2222

2323
#endif

libs/librrgraph/src/base/rr_graph_type.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef GRAPH_TYPE_H
2-
#define GRAPH_TYPE_H
1+
#ifndef RR_GRAPH_TYPE_H
2+
#define RR_GRAPH_TYPE_H
33

44
#include <vector>
55
#include "physical_types.h"

libs/librrgraph/src/io/rr_graph_writer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void write_rr_graph(RRGraphBuilder* rr_graph_builder,
4040
const char* file_name,
4141
const int virtual_clock_network_root_idx,
4242
bool echo_enabled,
43-
const char* echo__file_name) {
43+
const char* echo_file_name) {
4444

4545
RrGraphSerializer reader(
4646
/*graph_type=*/t_graph_type(),
@@ -51,7 +51,7 @@ void write_rr_graph(RRGraphBuilder* rr_graph_builder,
5151
/*read_rr_graph_filename=*/nullptr,
5252
/*read_edge_metadata=*/false,
5353
echo_enabled,
54-
echo__file_name,
54+
echo_file_name,
5555
chan_width,
5656
&rr_graph_builder->rr_nodes(),
5757
rr_graph_builder,

libs/librrgraph/src/io/rr_graph_writer.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "rr_graph_type.h"
1111
#include "rr_graph_builder.h"
1212
#include "rr_graph_view.h"
13-
#include "rr_graph_fwd.h"
1413
#include "device_grid.h"
1514
#include "physical_types.h"
1615

@@ -27,6 +26,6 @@ void write_rr_graph(RRGraphBuilder* rr_graph_builder,
2726
const char* file_name,
2827
const int virtual_clock_network_root_idx,
2928
bool echo_enabled,
30-
const char* echo__file_name);
29+
const char* echo_file_name);
3130

3231
#endif

libs/librrgraph/src/utils/describe_rr_node.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef DESCRIBE_RR_NODE
2-
#define DESCRIBE_RR_NODE
1+
#ifndef DESCRIBE_RR_NODE_H
2+
#define DESCRIBE_RR_NODE_H
33

44
#include <string>
55
#include "rr_graph_view.h"

utils/fasm/src/fasm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ void FasmWriterVisitor::walk_route_tree(const RRGraphBuilder& rr_graph_builder,
635635

636636
void FasmWriterVisitor::walk_routing() {
637637
auto& route_ctx = g_vpr_ctx.mutable_routing();
638-
auto& device_ctx = g_vpr_ctx.mutable_device();
638+
const auto& device_ctx = g_vpr_ctx.device();
639639

640640
for(const auto &trace : route_ctx.trace) {
641641
t_trace *head = trace.head;

0 commit comments

Comments
 (0)