From 9aa14da341e56260927d5addfd4d79b55bb60346 Mon Sep 17 00:00:00 2001 From: Muhammad Haris Zafar Date: Wed, 27 Oct 2021 12:08:10 +0500 Subject: [PATCH 1/2] Adding api partition_edges to rr_graph_builder.h --- vpr/src/device/rr_graph_builder.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vpr/src/device/rr_graph_builder.h b/vpr/src/device/rr_graph_builder.h index c8baa9619c4..60515a615bc 100644 --- a/vpr/src/device/rr_graph_builder.h +++ b/vpr/src/device/rr_graph_builder.h @@ -117,6 +117,12 @@ class RRGraphBuilder { return node_storage_.count_rr_switches(num_arch_switches, arch_switch_inf, arch_switch_fanins); } + /** @brief Sorts edge data such that configurable edges appears before + * non-configurable edges. */ + inline void partition_edges() { + node_storage_.partition_edges(); + } + /* -- Internal data storage -- */ private: /* TODO: When the refactoring effort finishes, From ab12a82c2d24389a13127028afc66e990e3b436f Mon Sep 17 00:00:00 2001 From: Muhammad Haris Zafar Date: Wed, 27 Oct 2021 12:09:43 +0500 Subject: [PATCH 2/2] Replacing api partition_edges from respective .cpp/.h files --- vpr/src/route/rr_graph.cpp | 2 +- vpr/src/route/rr_graph_uxsdcxx_serializer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vpr/src/route/rr_graph.cpp b/vpr/src/route/rr_graph.cpp index ad680ae714c..e96ea5ec22a 100644 --- a/vpr/src/route/rr_graph.cpp +++ b/vpr/src/route/rr_graph.cpp @@ -726,7 +726,7 @@ static void build_rr_graph(const t_graph_type graph_type, //Partition the rr graph edges for efficient access to configurable/non-configurable //edge subsets. Must be done after RR switches have been allocated - device_ctx.rr_nodes.partition_edges(); + device_ctx.rr_graph_builder.partition_edges(); //Save the channel widths for the newly constructed graph device_ctx.chan_width = nodes_per_chan; diff --git a/vpr/src/route/rr_graph_uxsdcxx_serializer.h b/vpr/src/route/rr_graph_uxsdcxx_serializer.h index 23f2e22abe5..140c1ce9203 100644 --- a/vpr/src/route/rr_graph_uxsdcxx_serializer.h +++ b/vpr/src/route/rr_graph_uxsdcxx_serializer.h @@ -956,7 +956,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase { // configurable/non-configurable edge subsets. Must be done after RR // switches have been allocated. rr_nodes_->mark_edges_as_rr_switch_ids(); - rr_nodes_->partition_edges(); + rr_graph_builder_->partition_edges(); for (int source_node = 0; source_node < (ssize_t)rr_nodes_->size(); ++source_node) { int num_edges = rr_nodes_->num_edges(RRNodeId(source_node));