-
Notifications
You must be signed in to change notification settings - Fork 414
Add a new API set_node_ptc_num() to RRGraphBuilder #1865
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 all commits
8e9df79
d43fd06
3184a02
7db718a
411c891
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 |
---|---|---|
|
@@ -106,7 +106,7 @@ RRNodeId RoutingToClockConnection::create_virtual_clock_network_sink_node(int x, | |
} | ||
int ptc = max_ptc + 1; | ||
|
||
rr_graph.set_node_ptc_num(node_index, ptc); | ||
rr_graph_builder.set_node_ptc_num(node_index, ptc); | ||
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. This node is a SINK, so we should be able to use the set_node_class_num() api here now. Best to avoid the set_node_ptc_num () (which is more vague) as much as possible. |
||
rr_graph_builder.set_node_coordinates(node_index, x, y, x, y); | ||
rr_graph_builder.set_node_capacity(node_index, 1); | ||
rr_graph.set_node_cost_index(node_index, RRIndexedDataId(SINK_COST_INDEX)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1433,7 +1433,7 @@ static void build_rr_sinks_sources(RRGraphBuilder& rr_graph_builder, | |
float R = 0.; | ||
float C = 0.; | ||
L_rr_node.set_node_rc_index(inode, find_create_rr_rc_data(R, C)); | ||
L_rr_node.set_node_ptc_num(inode, iclass); | ||
rr_graph_builder.set_node_ptc_num(inode, iclass); | ||
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. Use set_node_class_num instead (this is for SINKs and SOURCEs). |
||
} | ||
|
||
/* Connect IPINS to SINKS and initialize OPINS */ | ||
|
@@ -1481,7 +1481,7 @@ static void build_rr_sinks_sources(RRGraphBuilder& rr_graph_builder, | |
float R = 0.; | ||
float C = 0.; | ||
L_rr_node.set_node_rc_index(inode, find_create_rr_rc_data(R, C)); | ||
L_rr_node.set_node_ptc_num(inode, ipin); | ||
rr_graph_builder.set_node_ptc_num(inode, ipin); | ||
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. Use set_node_pin_num() instead |
||
|
||
//Note that we store the grid tile location and side where the pin is located, | ||
//which greatly simplifies the drawing code | ||
|
@@ -1671,7 +1671,7 @@ static void build_rr_chan(RRGraphBuilder& rr_graph_builder, | |
float C = length * seg_details[track].Cmetal(); | ||
L_rr_node.set_node_rc_index(node, find_create_rr_rc_data(R, C)); | ||
|
||
L_rr_node.set_node_ptc_num(node, track); | ||
rr_graph_builder.set_node_ptc_num(node, track); | ||
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. use set_node_track_num() instead. 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. Hello @tangxifan and @vaughnbetz, 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. It is failing for all basic to strong tests. 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. @hariszafar-lm This is because the set_node_type() is called after this API. If you move the LINE 1675 before this line. it should work. |
||
L_rr_node.set_node_type(node, chan_type); | ||
L_rr_node.set_node_direction(node, seg_details[track].direction()); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -604,7 +604,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> { | |
RRNodeId node_id = node.id(); | ||
|
||
rr_graph_builder_->set_node_coordinates(node_id, xlow, ylow, xhigh, yhigh); | ||
node.set_ptc_num(ptc); | ||
rr_graph_builder_->set_node_ptc_num(node_id, ptc); | ||
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. This is the only call that really needs to set a ptc_num, no matter what type of node it is. If the node type is already set, we could replace this with an if statement that checks the type and calls the right set_node_xx_num() call, and then delete the set_node_ptc_num() method. 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. If that isn't easily doable, we can leave this call and the method. 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. @tangxifan what do you suggest on this? Either we should keep it to 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. Yes. We should keep 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. Okay, thanks for quick response |
||
return inode; | ||
} | ||
inline void finish_node_loc(int& /*inode*/) final {} | ||
|
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.
The
set_node_ptc_num
is a tricky API because theset_ptc_num
carries different meanings for different type of nodes.You can see that there are other APIs which try to clarify this, for example,
set_node_track_num()
is for CHANX and CHANY nodesset_node_pin_num()
is for OPIN and IPIN nodesset_node_class_num()
is for SOURCE and SINK nodesTherefore, I am thinking about if we should
set_node_ptc_num()
and use other APIs instead. If we cannot, I am o.k. to keep the API.@vaughnbetz Please share your thoughts.
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.
@hariszafar-lm I have talked to @vaughnbetz today. He agrees on the roadmap here. Please give a try. Also remember to fix the merging conflicts.
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.
@tangxifan Sure, I'll start it from today. thanks