Skip to content

Commit a9f1a43

Browse files
committed
[lib][rr_graph] add edge_crr_id_ to rr_graph_storage
1 parent a5fcbc8 commit a9f1a43

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

libs/librrgraph/src/base/rr_graph_storage.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ void t_rr_graph_storage::reserve_edges(size_t num_edges) {
1818
edge_remapped_.reserve(num_edges);
1919
}
2020

21-
void t_rr_graph_storage::emplace_back_edge(RRNodeId src, RRNodeId dest, short edge_switch, bool remapped) {
21+
void t_rr_graph_storage::emplace_back_edge(RRNodeId src, RRNodeId dest, short edge_switch, bool remapped, std::string crr_id) {
2222
// Cannot mutate edges once edges have been read!
2323
VTR_ASSERT(!edges_read_);
2424
edge_src_node_.emplace_back(src);
2525
edge_dest_node_.emplace_back(dest);
2626
edge_switch_.emplace_back(edge_switch);
2727
edge_remapped_.emplace_back(remapped);
28+
edge_crr_id_.emplace_back(crr_id);
2829
}
2930

3031
// Typical node to edge ratio. This allows a preallocation guess for the edges
@@ -56,7 +57,8 @@ void t_rr_graph_storage::alloc_and_load_edges(const t_rr_edge_info_set* rr_edges
5657
new_edge.from_node,
5758
new_edge.to_node,
5859
new_edge.switch_type,
59-
new_edge.remapped);
60+
new_edge.remapped,
61+
new_edge.crr_id);
6062
}
6163
}
6264

libs/librrgraph/src/base/rr_graph_storage.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ class t_rr_graph_storage {
826826
* of the node. Also, the information about switches is fly-weighted and are accessible with IDs. Thus,
827827
* the number of rr switch types can be higher than the number of arch switch types.
828828
*/
829-
void emplace_back_edge(RRNodeId src, RRNodeId dest, short edge_switch, bool remapped);
829+
void emplace_back_edge(RRNodeId src, RRNodeId dest, short edge_switch, bool remapped, std::string crr_id);
830830

831831
/** @brief Adds a batch of edges.*/
832832
void alloc_and_load_edges(const t_rr_edge_info_set* rr_edges_to_create);
@@ -1093,6 +1093,8 @@ class t_rr_graph_storage {
10931093
*/
10941094
vtr::vector<RREdgeId, bool> edge_remapped_;
10951095

1096+
vtr::vector<RREdgeId, std::string> edge_crr_id_;
1097+
10961098
/** @brief
10971099
* The following data structures are only used for tileable routing resource graph.
10981100
* The tileable flag is set to true by tileable routing resource graph builder.

0 commit comments

Comments
 (0)