-
Notifications
You must be signed in to change notification settings - Fork 428
Refactor: Move intra-cluster RR graph code into dedicated files #3281
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I really like this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Soheil!
/* Connection not at end of the CHANX segment. */ | ||
x1 = draw_coords->tile_x[chany_x] + draw_coords->get_tile_width(); | ||
if (rr_graph.node_direction(chanx_node) != Direction::BIDIR && (SwitchType)switch_type != SwitchType::SHORT) { | ||
if (rr_graph.node_direction(chanx_node) != Direction::BIDIR && (e_switch_type)switch_type != e_switch_type::SHORT) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it’s an easy change, I’d suggest updating the function’s parameter type from short to e_switch_type to avoid casting here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few lines below, switch_type
is passed to draw_rr_switch()
as an RRSwitchId
. I think switch_type
is actually a switch id that should be used to retreive a t_rr_switch_inf
. Could you please read the code and see if my understanding is correct? If so, casting it to e_switch_type
is a mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code does look funny. Do we have a special switch index that means short? We seem to be using the same variable as a switch index and a switch type ... is this a bug? It might not cause fatal problems, as it just stops some drawing code, but it seems suspicious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed the merge, but here are some suggestions for commenting updates that could be done in a follow-up PR.
/* Connection not at end of the CHANX segment. */ | ||
x1 = draw_coords->tile_x[chany_x] + draw_coords->get_tile_width(); | ||
if (rr_graph.node_direction(chanx_node) != Direction::BIDIR && (SwitchType)switch_type != SwitchType::SHORT) { | ||
if (rr_graph.node_direction(chanx_node) != Direction::BIDIR && (e_switch_type)switch_type != e_switch_type::SHORT) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code does look funny. Do we have a special switch index that means short? We seem to be using the same variable as a switch index and a switch type ... is this a bug? It might not cause fatal problems, as it just stops some drawing code, but it seems suspicious.
…ing_comments Address remaining comments from #3281
Moves all functions that create nodes and edges for intra-cluster routing resources to separate files.