File tree 2 files changed +15
-6
lines changed 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,10 @@ bool t_rr_node::edge_is_configurable(t_edge_size iedge) const {
21
21
22
22
bool t_rr_node::validate () const {
23
23
// Check internal assumptions about RR node are valid
24
- auto & device_ctx = g_vpr_ctx.device ();
25
-
26
- const auto & rr_graph = device_ctx.rr_graph ;
27
24
28
25
t_edge_size iedge = 0 ;
29
- for (auto edge : rr_graph. edges (RRNodeId (id_) )) {
30
- if (edge < rr_graph. num_configurable_edges (RRNodeId (id_) )) {
26
+ for (auto edge : edges ()) {
27
+ if (edge < num_configurable_edges ()) {
31
28
if (!edge_is_configurable (edge)) {
32
29
VPR_FATAL_ERROR (VPR_ERROR_ROUTE, " RR Node non-configurable edge found in configurable edge list" );
33
30
}
@@ -39,7 +36,7 @@ bool t_rr_node::validate() const {
39
36
++iedge;
40
37
}
41
38
42
- if (iedge != rr_graph. num_edges (RRNodeId (id_) )) {
39
+ if (iedge != num_edges ()) {
43
40
VPR_FATAL_ERROR (VPR_ERROR_ROUTE, " RR Node Edge iteration does not match edge size" );
44
41
}
45
42
Original file line number Diff line number Diff line change @@ -71,6 +71,18 @@ inline t_rr_node t_rr_graph_storage::back() {
71
71
return t_rr_node (this , RRNodeId (size () - 1 ));
72
72
}
73
73
74
+ inline t_edge_size t_rr_node::num_edges () const {
75
+ return storage_->num_edges (id_);
76
+ }
77
+
78
+ inline edge_idx_range t_rr_node::edges () const {
79
+ return storage_->edges (id_);
80
+ }
81
+
82
+ inline t_edge_size t_rr_node::num_configurable_edges () const {
83
+ return storage_->num_configurable_edges (id_);
84
+ }
85
+
74
86
inline int t_rr_node::edge_sink_node (t_edge_size iedge) const {
75
87
size_t inode = (size_t )storage_->edge_sink_node (id_, iedge);
76
88
return inode;
You can’t perform that action at this time.
0 commit comments