Skip to content

Commit 00739ed

Browse files
rename t_rr_switch_offset_inf to t_rr_switch_override_inf
1 parent 190f8b0 commit 00739ed

File tree

8 files changed

+19
-20
lines changed

8 files changed

+19
-20
lines changed

libs/libarchfpga/src/physical_types.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,18 +1872,18 @@ struct t_rr_switch_inf {
18721872
SwitchType type_ = SwitchType::INVALID;
18731873
};
18741874

1875-
struct t_rr_switch_offset_inf {
1875+
struct t_rr_switch_override_inf {
18761876
// float R = 0.f;
18771877
// float Cin = 0.;
18781878
// float Cout = 0.;
18791879
// float Cinternal = 0.;
18801880
float Tdel = 0.;
18811881

1882-
t_rr_switch_offset_inf() = default;
1883-
t_rr_switch_offset_inf(const t_rr_switch_inf& switch_inf)
1882+
t_rr_switch_override_inf() = default;
1883+
t_rr_switch_override_inf(const t_rr_switch_inf& switch_inf)
18841884
: Tdel(switch_inf.Tdel) {}
18851885

1886-
auto operator<=>(const t_rr_switch_offset_inf&) const = default;
1886+
auto operator<=>(const t_rr_switch_override_inf&) const = default;
18871887
};
18881888

18891889
/**

libs/librrgraph/src/base/rr_graph_builder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class RRGraphBuilder {
104104
RRSwitchId switch_id = RRSwitchId(rr_switch_inf_.size());
105105
rr_switch_inf_.push_back(switch_info);
106106

107-
t_rr_switch_offset_inf switch_offset_info(switch_info);
107+
t_rr_switch_override_inf switch_offset_info(switch_info);
108108
rr_switch_offset_inf_.push_back(switch_offset_info);
109109

110110
VTR_ASSERT_DEBUG(rr_switch_inf_.size() == rr_switch_offset_inf_.size());
@@ -122,7 +122,7 @@ class RRGraphBuilder {
122122
return rr_switch_inf_;
123123
}
124124

125-
inline RRSwitchOffsetInfoId add_rr_switch_offset_info(const t_rr_switch_offset_inf& switch_offset_info) {
125+
inline RRSwitchOffsetInfoId add_rr_switch_offset_info(const t_rr_switch_override_inf& switch_offset_info) {
126126
VTR_ASSERT_DEBUG(rr_switch_inf_.size() <= rr_switch_offset_inf_.size());
127127
// Allocate an ID
128128
RRSwitchOffsetInfoId switch_offset_info_id = RRSwitchOffsetInfoId(rr_switch_offset_inf_.size());
@@ -134,7 +134,7 @@ class RRGraphBuilder {
134134
node_storage_.set_edge_offset_id(edge_id, offset_id);
135135
}
136136

137-
inline vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_offset_inf>& rr_switch_offset_inf() {
137+
inline vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_override_inf>& rr_switch_offset_inf() {
138138
return rr_switch_offset_inf_;
139139
}
140140

@@ -420,7 +420,7 @@ class RRGraphBuilder {
420420
/* Detailed information about the switches, which are used in the RRGraph */
421421
vtr::vector<RRSwitchId, t_rr_switch_inf> rr_switch_inf_;
422422

423-
vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_offset_inf> rr_switch_offset_inf_;
423+
vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_override_inf> rr_switch_offset_inf_;
424424

425425
/** @warning The Metadata should stay as an independent data structure from the rest of the internal data,
426426
* e.g., node_lookup! */

libs/librrgraph/src/base/rr_graph_view.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RRGraphView::RRGraphView(const t_rr_graph_storage& node_storage,
1010
const std::vector<t_rr_rc_data>& rr_rc_data,
1111
const vtr::vector<RRSegmentId, t_segment_inf>& rr_segments,
1212
const vtr::vector<RRSwitchId, t_rr_switch_inf>& rr_switch_inf,
13-
const vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_offset_inf>& rr_switch_offset_inf)
13+
const vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_override_inf>& rr_switch_offset_inf)
1414
: node_storage_(node_storage)
1515
, node_lookup_(node_lookup)
1616
, rr_node_metadata_(rr_node_metadata)

libs/librrgraph/src/base/rr_graph_view.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class RRGraphView {
7474
const std::vector<t_rr_rc_data>& rr_rc_data,
7575
const vtr::vector<RRSegmentId, t_segment_inf>& rr_segments,
7676
const vtr::vector<RRSwitchId, t_rr_switch_inf>& rr_switch_inf,
77-
const vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_offset_inf>& rr_switch_offset_inf);
77+
const vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_override_inf>& rr_switch_offset_inf);
7878

7979
/* Disable copy constructors and copy assignment operator
8080
* This is to avoid accidental copy because it could be an expensive operation considering that the
@@ -668,7 +668,7 @@ class RRGraphView {
668668
/// switch info for rr edges
669669
const vtr::vector<RRSwitchId, t_rr_switch_inf>& rr_switch_inf_;
670670
/// switch offset info for edges
671-
const vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_offset_inf>& rr_switch_offset_inf_;
671+
const vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_override_inf>& rr_switch_offset_inf_;
672672
};
673673

674674
#endif

libs/librrgraph/src/io/rr_graph_reader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void load_rr_edge_attribute_offset_file(RRGraphBuilder& rr_graph_builder,
126126
VTR_LOG_ERROR("Failed to open RR edge offset file: %s ", rr_edge_attribute_offset_filename.data());
127127
}
128128

129-
std::map<t_rr_switch_offset_inf, RRSwitchOffsetInfoId> unique_edge_offsets;
129+
std::map<t_rr_switch_override_inf, RRSwitchOffsetInfoId> unique_edge_offsets;
130130
std::string line;
131131
bool first_line = true;
132132
while (std::getline(file, line)) {
@@ -139,7 +139,7 @@ void load_rr_edge_attribute_offset_file(RRGraphBuilder& rr_graph_builder,
139139

140140
std::istringstream iss(line);
141141
int edge_id;
142-
t_rr_switch_offset_inf rr_switch_detailed_inf;
142+
t_rr_switch_override_inf rr_switch_detailed_inf;
143143

144144
if (!(iss >> edge_id >> rr_switch_detailed_inf.Tdel)) {
145145
throw std::runtime_error("Invalid line format: " + line);

libs/librrgraph/src/io/rr_graph_uxsdcxx_serializer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
285285
RRGraphBuilder* rr_graph_builder,
286286
RRGraphView* rr_graph,
287287
vtr::vector<RRSwitchId, t_rr_switch_inf>* rr_switch_inf,
288-
vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_offset_inf>* rr_switch_offset_inf,
288+
vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_override_inf>* rr_switch_offset_inf,
289289
vtr::vector<RRIndexedDataId, t_rr_indexed_data>* rr_indexed_data,
290290
std::vector<t_rr_rc_data>* rr_rc_data,
291291
const std::vector<t_arch_switch_inf>& arch_switch_inf,
@@ -630,8 +630,8 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
630630
rr_switch_offset_inf_->reserve(rr_switch_inf_->size());
631631
std::ranges::transform(*rr_switch_inf_,
632632
std::back_inserter(*rr_switch_offset_inf_),
633-
[](const t_rr_switch_inf& rr_sw) noexcept -> t_rr_switch_offset_inf {
634-
return t_rr_switch_offset_inf{rr_sw};
633+
[](const t_rr_switch_inf& rr_sw) noexcept -> t_rr_switch_override_inf {
634+
return t_rr_switch_override_inf{rr_sw};
635635
});
636636
}
637637

@@ -2169,7 +2169,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
21692169
RRGraphBuilder* rr_graph_builder_;
21702170
RRGraphView* rr_graph_;
21712171
vtr::vector<RRSwitchId, t_rr_switch_inf>* rr_switch_inf_;
2172-
vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_offset_inf>* rr_switch_offset_inf_;
2172+
vtr::vector<RRSwitchOffsetInfoId, t_rr_switch_override_inf>* rr_switch_offset_inf_;
21732173
vtr::vector<RRIndexedDataId, t_rr_indexed_data>* rr_indexed_data_;
21742174
t_rr_node_indices* rr_node_indices_;
21752175
std::string* read_rr_graph_filename_;

vpr/src/route/rr_graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ void load_rr_switch_from_arch_switch(RRGraphBuilder& rr_graph_builder,
18651865
const float R_minW_pmos) {
18661866
const t_arch_switch_inf& arch_switch = arch_sw_inf.at(arch_switch_idx);
18671867
t_rr_switch_inf& rr_switch_to_be_updated = rr_graph_builder.rr_switch()[RRSwitchId(rr_switch_idx)];
1868-
t_rr_switch_offset_inf& rr_switch_offset_to_be_updated = rr_graph_builder.rr_switch_offset_inf()[RRSwitchOffsetInfoId (rr_switch_idx)];
1868+
t_rr_switch_override_inf& rr_switch_offset_to_be_updated = rr_graph_builder.rr_switch_offset_inf()[RRSwitchOffsetInfoId (rr_switch_idx)];
18691869

18701870
/* copy over the arch switch to rr_switch_inf[rr_switch_idx], but with the changed Tdel value */
18711871
rr_switch_to_be_updated.set_type(arch_switch.type());

vpr/src/route/rr_graph2.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,6 @@ std::vector<t_seg_details> alloc_and_load_seg_details(int* max_chan_width,
400400
* (3) stagger the connection and switch boxes on different long lines, *
401401
* as they will not be staggered by different segment start points. */
402402

403-
int cur_track;
404403
int fac;
405404
std::vector<t_seg_details> seg_details;
406405

@@ -431,7 +430,7 @@ std::vector<t_seg_details> alloc_and_load_seg_details(int* max_chan_width,
431430
seg_details.resize(*max_chan_width);
432431

433432
/* Setup the seg_details data */
434-
cur_track = 0;
433+
size_t cur_track = 0;
435434
for (size_t i = 0; i < segment_inf.size(); ++i) {
436435
int first_track = cur_track;
437436

0 commit comments

Comments
 (0)