Skip to content

Commit e933685

Browse files
committed
[vpr][route][crr] add crr_id to Connection
1 parent 42b9dd4 commit e933685

File tree

1 file changed

+23
-20
lines changed
  • vpr/src/route/rr_graph_generation/tileable_rr_graph/crr_generator

1 file changed

+23
-20
lines changed

vpr/src/route/rr_graph_generation/tileable_rr_graph/crr_generator/crr_common.h

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -149,28 +149,31 @@ struct Sizing {
149149
* It is used to store the connection information and to compare connections.
150150
*/
151151
class Connection {
152-
public:
153-
Connection(RRNodeId sink_node, RRNodeId src_node, int delay_ps) noexcept
154-
: sink_node_(sink_node)
155-
, src_node_(src_node)
156-
, delay_ps_(delay_ps) {}
157-
158-
RRNodeId sink_node() const { return sink_node_; }
159-
RRNodeId src_node() const { return src_node_; }
160-
int delay_ps() const { return delay_ps_; }
161-
162-
bool operator<(const Connection& other) const {
163-
return std::tie(sink_node_, src_node_, delay_ps_) < std::tie(other.sink_node_, other.src_node_, other.delay_ps_);
164-
}
152+
public:
153+
Connection(RRNodeId sink_node, RRNodeId src_node, int delay_ps, std::string crr_id) noexcept
154+
: sink_node_(sink_node)
155+
, src_node_(src_node)
156+
, delay_ps_(delay_ps)
157+
, crr_id_(crr_id_) {}
158+
159+
RRNodeId sink_node() const { return sink_node_; }
160+
RRNodeId src_node() const { return src_node_; }
161+
int delay_ps() const { return delay_ps_; }
162+
std::string crr_id() const { return crr_id_; }
163+
164+
bool operator<(const Connection& other) const {
165+
return std::tie(sink_node_, src_node_, delay_ps_) < std::tie(other.sink_node_, other.src_node_, other.delay_ps_);
166+
}
165167

166-
bool operator==(const Connection& other) const {
167-
return sink_node_ == other.sink_node_ && src_node_ == other.src_node_ && delay_ps_ == other.delay_ps_;
168-
}
168+
bool operator==(const Connection& other) const {
169+
return sink_node_ == other.sink_node_ && src_node_ == other.src_node_ && delay_ps_ == other.delay_ps_;
170+
}
169171

170-
private:
171-
RRNodeId sink_node_;
172-
RRNodeId src_node_;
173-
int delay_ps_;
172+
private:
173+
RRNodeId sink_node_;
174+
RRNodeId src_node_;
175+
int delay_ps_;
176+
std::string crr_id_;
174177
};
175178

176179
// Node hash type for lookups

0 commit comments

Comments
 (0)