-
Notifications
You must be signed in to change notification settings - Fork 414
RRGraphView edge_sink_node()/edge_switch() Implementation #1930
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
Changes from 13 commits
975e37d
1f27d87
2203367
6d73d49
f28874f
8a3abba
e76f49c
ddaf9b1
026c13c
272d531
5fda3ee
3d8c9e9
e3c30e0
b73359f
61e0a9b
ae49c2c
353a0c4
d2de2b0
c4beebe
bccca16
52a60bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1167,16 +1167,16 @@ bool directconnect_exists(int src_rr_node, int sink_rr_node) { | |
|
||
//TODO: This is a constant depth search, but still may be too slow | ||
for (t_edge_size i_src_edge = 0; i_src_edge < rr_nodes[src_rr_node].num_edges(); ++i_src_edge) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
int opin_rr_node = rr_nodes[src_rr_node].edge_sink_node(i_src_edge); | ||
int opin_rr_node = size_t(rr_graph.edge_sink_node(RRNodeId(src_rr_node), i_src_edge)); | ||
|
||
if (rr_graph.node_type(RRNodeId(opin_rr_node)) != OPIN) continue; | ||
|
||
for (t_edge_size i_opin_edge = 0; i_opin_edge < rr_nodes[opin_rr_node].num_edges(); ++i_opin_edge) { | ||
int ipin_rr_node = rr_nodes[opin_rr_node].edge_sink_node(i_opin_edge); | ||
int ipin_rr_node = size_t(rr_graph.edge_sink_node(RRNodeId(opin_rr_node), i_opin_edge)); | ||
if (rr_graph.node_type(RRNodeId(ipin_rr_node)) != IPIN) continue; | ||
|
||
for (t_edge_size i_ipin_edge = 0; i_ipin_edge < rr_nodes[ipin_rr_node].num_edges(); ++i_ipin_edge) { | ||
if (sink_rr_node == rr_nodes[ipin_rr_node].edge_sink_node(i_ipin_edge)) { | ||
if (size_t(sink_rr_node) == size_t(rr_graph.edge_sink_node(RRNodeId(ipin_rr_node), i_ipin_edge))) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the for loop (starting from LINE 1169), we can change the data type of
I see in LINE 1174, the |
||
return true; | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -822,8 +822,8 @@ static void power_usage_routing(t_power_usage* power_usage, | |
} | ||
|
||
for (t_edge_size edge_idx = 0; edge_idx < node.num_edges(); edge_idx++) { | ||
umariqbal-rs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const auto& next_node_id = node.edge_sink_node(edge_idx); | ||
if (next_node_id != OPEN) { | ||
const auto& next_node_id = size_t(rr_graph.edge_sink_node(RRNodeId(trace->index), edge_idx)); | ||
if (next_node_id != size_t(OPEN)) { | ||
t_rr_node_power* next_node_power = &rr_node_power[next_node_id]; | ||
|
||
switch (rr_graph.node_type(RRNodeId(next_node_id))) { | ||
|
@@ -982,9 +982,9 @@ static void power_usage_routing(t_power_usage* power_usage, | |
connectionbox_fanout = 0; | ||
switchbox_fanout = 0; | ||
for (t_edge_size iedge = 0; iedge < node.num_edges(); iedge++) { | ||
if (node.edge_switch(iedge) == routing_arch->wire_to_rr_ipin_switch) { | ||
if (rr_graph.edge_switch(rr_node, iedge) == routing_arch->wire_to_rr_ipin_switch) { | ||
connectionbox_fanout++; | ||
} else if (node.edge_switch(iedge) == routing_arch->delayless_switch) { | ||
} else if (rr_graph.edge_switch(rr_node, iedge) == routing_arch->delayless_switch) { | ||
/* Do nothing */ | ||
} else { | ||
switchbox_fanout++; | ||
|
@@ -1226,9 +1226,9 @@ void power_routing_init(const t_det_routing_arch* routing_arch) { | |
case CHANX: | ||
case CHANY: | ||
for (t_edge_size iedge = 0; iedge < node.num_edges(); iedge++) { | ||
umariqbal-rs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if (node.edge_switch(iedge) == routing_arch->wire_to_rr_ipin_switch) { | ||
if (rr_graph.edge_switch(RRNodeId(rr_node_idx), iedge) == routing_arch->wire_to_rr_ipin_switch) { | ||
fanout_to_IPIN++; | ||
} else if (node.edge_switch(iedge) != routing_arch->delayless_switch) { | ||
} else if (rr_graph.edge_switch(RRNodeId(rr_node_idx), iedge) != routing_arch->delayless_switch) { | ||
fanout_to_seg++; | ||
} | ||
} | ||
|
@@ -1261,11 +1261,11 @@ void power_routing_init(const t_det_routing_arch* routing_arch) { | |
auto node = device_ctx.rr_nodes[rr_node_idx]; | ||
|
||
for (t_edge_size edge_idx = 0; edge_idx < node.num_edges(); edge_idx++) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. |
||
if (node.edge_sink_node(edge_idx) != OPEN) { | ||
if (rr_node_power[node.edge_sink_node(edge_idx)].driver_switch_type == OPEN) { | ||
rr_node_power[node.edge_sink_node(edge_idx)].driver_switch_type = node.edge_switch(edge_idx); | ||
if (size_t(rr_graph.edge_sink_node(RRNodeId(rr_node_idx), edge_idx)) != size_t(OPEN)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using the new API, you do not need the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure I will do that on Monday. |
||
if (rr_node_power[size_t(rr_graph.edge_sink_node(RRNodeId(rr_node_idx), edge_idx))].driver_switch_type == OPEN) { | ||
rr_node_power[size_t(rr_graph.edge_sink_node(RRNodeId(rr_node_idx), edge_idx))].driver_switch_type = rr_graph.edge_switch(RRNodeId(rr_node_idx), edge_idx); | ||
} else { | ||
VTR_ASSERT(rr_node_power[node.edge_sink_node(edge_idx)].driver_switch_type == node.edge_switch(edge_idx)); | ||
VTR_ASSERT(rr_node_power[size_t(rr_graph.edge_sink_node(RRNodeId(rr_node_idx), edge_idx))].driver_switch_type == rr_graph.edge_switch(RRNodeId(rr_node_idx), edge_idx)); | ||
} | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -310,7 +310,7 @@ static bool check_adjacent(int from_node, int to_node) { | |
reached = false; | ||
|
||
for (t_edge_size iconn = 0; iconn < device_ctx.rr_nodes[from_node].num_edges(); iconn++) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
if (device_ctx.rr_nodes[from_node].edge_sink_node(iconn) == to_node) { | ||
if (size_t(rr_graph.edge_sink_node(RRNodeId(from_node), iconn)) == size_t(to_node)) { | ||
reached = true; | ||
break; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.