Skip to content

RRGraphView edges(), num_edges(), configurable_edges(), non_configurable_edges(), num_configurable_edges(), num_non_configurable_edges() Implementation #1917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
91eb4b5
Added API for num_configurable_edges
behzadmehmood-rs Nov 18, 2021
f0210f1
Updated formatting for rr_node.cpp
behzadmehmood-rs Nov 19, 2021
0ae6368
Removed num_configurable_edges function from rr_node_impl.h
behzadmehmood-rs Nov 19, 2021
1f22e38
Added comment for num_configurable_edges
behzadmehmood-rs Nov 19, 2021
cad8da6
API added for edges()
behzadmehmood-rs Nov 22, 2021
cac4434
Added comment for edges() API
behzadmehmood-rs Nov 22, 2021
6164123
Removed edges() from rr_node_impl.h
behzadmehmood-rs Nov 22, 2021
25ec80c
Adding num_edges() API
behzadmehmood-rs Nov 24, 2021
83fbf86
Added num_edges() API
behzadmehmood-rs Nov 24, 2021
8d77256
removed num_edges() from rr_node_impl.h
behzadmehmood-rs Nov 24, 2021
5527733
Merge branch 'master' into api_num_configurable_edges
behzadmehmood-rs Nov 25, 2021
dc4a62f
num_non_configurable_edges() API added
behzadmehmood-rs Nov 26, 2021
5795252
configurable_edges() API added
behzadmehmood-rs Nov 26, 2021
46ac27e
Added non_configurable_edges() API
behzadmehmood-rs Nov 29, 2021
6d14f83
Removed globals from rr_graph_uxsdcxx_serializer.h
behzadmehmood-rs Dec 2, 2021
8efc261
Updated formatting for rr_graph_uxsdcxx_serializer.h
behzadmehmood-rs Dec 2, 2021
88c5785
Typo fixed in rr_graph.cpp
behzadmehmood-rs Dec 7, 2021
09bbfab
A cached version of RRGraphView added in rr_graph_uxsdcxx_serializer.h.
behzadmehmood-rs Dec 7, 2021
95ca4bd
formatting has been set
umariqbal-rs Dec 7, 2021
0e8ff51
rr_graph made constant in EdgeWalker()
behzadmehmood-rs Dec 8, 2021
6b834d8
Changes reverted for validate()
behzadmehmood-rs Dec 14, 2021
a4a5abf
Formatting updated
behzadmehmood-rs Dec 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions vpr/src/device/rr_graph_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ class RRGraphView {
return node_storage_.node_side_string(node);
}

inline t_edge_size num_configurable_edges(RRNodeId node) const {
return node_storage_.num_configurable_edges(node);
}

/** @brief Get the cost index of a routing resource node. This function is inlined for runtime optimization. */
RRIndexedDataId node_cost_index(RRNodeId node) const {
return node_storage_.node_cost_index(node);
Expand Down
7 changes: 6 additions & 1 deletion vpr/src/route/rr_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "rr_graph_storage.h"
#include "globals.h"
#include "vpr_error.h"
#include "rr_graph.h"

//Returns the max 'length' over the x or y direction
short t_rr_node::length() const {
Expand All @@ -20,9 +21,13 @@ bool t_rr_node::edge_is_configurable(t_edge_size iedge) const {

bool t_rr_node::validate() const {
//Check internal assumptions about RR node are valid
auto& device_ctx = g_vpr_ctx.device();

const auto& rr_graph = device_ctx.rr_graph;

t_edge_size iedge = 0;
for (auto edge : edges()) {
if (edge < num_configurable_edges()) {
if (edge < rr_graph.num_configurable_edges(RRNodeId(id_))) {
if (!edge_is_configurable(edge)) {
VPR_FATAL_ERROR(VPR_ERROR_ROUTE, "RR Node non-configurable edge found in configurable edge list");
}
Expand Down
4 changes: 0 additions & 4 deletions vpr/src/route/rr_node_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ inline t_edge_size t_rr_node::num_non_configurable_edges() const {
return storage_->num_non_configurable_edges(id_);
}

inline t_edge_size t_rr_node::num_configurable_edges() const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. Can you double check this removal in the #1916?

return storage_->num_configurable_edges(id_);
}

inline int t_rr_node::edge_sink_node(t_edge_size iedge) const {
size_t inode = (size_t)storage_->edge_sink_node(id_, iedge);
return inode;
Expand Down