-
Notifications
You must be signed in to change notification settings - Fork 430
3D OPIN-CHANZ connectivity #3323
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
base: master
Are you sure you want to change the base?
Conversation
AmirhosseinPoolad
left a comment
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.
What a PR, Soheil. Had some thoughts, mostly on styling. I did not review rr_graph_chan_chan_edges.cpp/h and rr_graph_opin_chan_edges.cpp/h as you said it was only moving the code to a new file.
Also only reviewed add_edges_opin_chanz_per_side and add_edges_opin_chanz_per_block in rr_graph_sg for the same reason.
| scatter_wire_candidates.size()); | ||
|
|
||
| continue; | ||
| // continue; |
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.
Remove commented out code
| seg_idx = get_parallel_seg_index(drive_seg_idx, indices_map, e_parallel_axis::X_AXIS); | ||
| drive_seg_idx = (seg_idx >= 0) ? seg_idx : drive_seg_idx; | ||
|
|
||
| get_parallel_seg_index(left_seg_idx, e_parallel_axis::X_AXIS, indices_map); | ||
| seg_idx = get_parallel_seg_index(left_seg_idx, indices_map, e_parallel_axis::X_AXIS); | ||
| left_seg_idx = (seg_idx >= 0) ? seg_idx : left_seg_idx; | ||
|
|
||
| get_parallel_seg_index(right_seg_idx, e_parallel_axis::X_AXIS, indices_map); | ||
| seg_idx = get_parallel_seg_index(right_seg_idx, indices_map, e_parallel_axis::X_AXIS); | ||
| right_seg_idx = (seg_idx >= 0) ? seg_idx : right_seg_idx; |
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.
Rename drive_seg_idx, left_seg_idx and right_seg_idx to have underlines after them. Not clear in a glance that they're private fields and not consistent with the rest of the code base.
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.
Explain the logic of this code. Not sure why we are doing the set either the reutnred value or the old value as the new value and that looks like new behaviour. It should be explained.
| t_rr_edge_info_set& rr_edges_to_create, | ||
| const vtr::NdMatrix<std::vector<t_bottleneck_link>, 2>& interdie_3d_links); | ||
|
|
||
| void add_edges_opin_chanz_per_block(const RRGraphView& rr_graph, |
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.
doxygen
| <!-- Gather 30 connections from the end of L4 wires at all four sides of a switchblock location --> | ||
| <wireconn num_conns="0" from_type="L1" from_switchpoint="1" side="rltb"/> | ||
| </gather> | ||
| <scatter> | ||
| <!-- Scatter 30 connections to the start of L4 wires at all four sides of a switchblock location --> | ||
| <wireconn num_conns="30" to_type="L1" to_switchpoint="0" side="rtlb"/> | ||
| </scatter> | ||
| <sg_link_list> | ||
| <!-- Link going up one layer, using the 'seg4_inter_die_driver' multiplexer to gather connections from the bottom layer and using the LZ node/wire to move up one layer --> | ||
| <sg_link name="L_UP" z_offset="1" x_offset="0" y_offset="0" mux="segz_driver" seg_type="LZ"/> | ||
| <!-- Link going down one layer, using the 'seg4_inter_die_driver' multiplexer to gather connections from the top layer and using the LZ node/wire to down up one layer --> | ||
| <sg_link name="L_DOWN" z_offset="-1" mux="segz_driver" seg_type="LZ"/> | ||
| </sg_link_list> | ||
| <!-- Instantiate 6 'L_UP' and 6 'L_DOWN' sg_links per switchblock location everywhere on the device --> |
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.
Update the comments here to represent the architecture.
| <!-- Specify a scatter-gather pattern for 3D connections. --> | ||
| <scatter_gather_list> | ||
| <sg_pattern name="name" type="unidir"> | ||
| <gather> | ||
| <!-- Gather 30 connections from the end of L4 wires at all four sides of a switchblock location --> | ||
| <wireconn num_conns="0" from_type="L4" from_switchpoint="3" side="rltb"/> | ||
| </gather> | ||
| <scatter> | ||
| <!-- Scatter 30 connections to the start of L4 wires at all four sides of a switchblock location --> | ||
| <wireconn num_conns="30" to_type="L4" to_switchpoint="0" side="rtl"/> | ||
| </scatter> | ||
| <sg_link_list> | ||
| <!-- Link going up one layer, using the 'seg4_inter_die_driver' multiplexer to gather connections from the bottom layer and using the LZ node/wire to move up one layer --> | ||
| <sg_link name="L_UP" z_offset="1" x_offset="0" y_offset="0" mux="seg4_inter_die_driver" seg_type="LZ"/> | ||
| <!-- Link going down one layer, using the 'seg4_inter_die_driver' multiplexer to gather connections from the top layer and using the LZ node/wire to down up one layer --> | ||
| <sg_link name="L_DOWN" z_offset="-1" mux="seg4_inter_die_driver" seg_type="LZ"/> | ||
| </sg_link_list> | ||
| <!-- Instantiate 6 'L_UP' and 6 'L_DOWN' sg_links per switchblock location everywhere on the device --> | ||
| <sg_location type="EVERYWHERE" num="60" sg_link_name="L_UP"/> | ||
| <sg_location type="EVERYWHERE" num="60" sg_link_name="L_DOWN"/> | ||
| </sg_pattern> | ||
| </scatter_gather_list> |
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.
Update comments.
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.
Make sure there is a comment at the top of the arch file explaining the 3D part.
vaughnbetz
left a comment
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.
Nice cleanup and overall well structured code. Needs more commenting though in places.
| seg_idx = get_parallel_seg_index(drive_seg_idx, indices_map, e_parallel_axis::X_AXIS); | ||
| drive_seg_idx = (seg_idx >= 0) ? seg_idx : drive_seg_idx; | ||
|
|
||
| get_parallel_seg_index(left_seg_idx, e_parallel_axis::X_AXIS, indices_map); | ||
| seg_idx = get_parallel_seg_index(left_seg_idx, indices_map, e_parallel_axis::X_AXIS); | ||
| left_seg_idx = (seg_idx >= 0) ? seg_idx : left_seg_idx; | ||
|
|
||
| get_parallel_seg_index(right_seg_idx, e_parallel_axis::X_AXIS, indices_map); | ||
| seg_idx = get_parallel_seg_index(right_seg_idx, indices_map, e_parallel_axis::X_AXIS); | ||
| right_seg_idx = (seg_idx >= 0) ? seg_idx : right_seg_idx; |
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.
Explain the logic of this code. Not sure why we are doing the set either the reutnred value or the old value as the new value and that looks like new behaviour. It should be explained.
| <sg_pattern name="name" type="unidir"> | ||
| <gather> | ||
| <!-- Gather 30 connections from the end of L4 wires at all four sides of a switchblock location --> | ||
| <wireconn num_conns="0" from_type="L1" from_switchpoint="1" side="rltb"/> |
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.
Should num_conns be 30 instead of 0 here?
| <loc side="top" layer_offset="1">io.outpad io.inpad io.clock</loc> | ||
| <loc side="right" layer_offset="1">io.outpad io.inpad io.clock</loc> | ||
| <loc side="bottom" layer_offset="1">io.outpad io.inpad io.clock</loc> | ||
| <loc side="left">io.outpad io.inpad io.clock</loc> |
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.
Add a comment at the top of this arch file explaining what it is.
| <sg_pattern name="name" type="unidir"> | ||
| <gather> | ||
| <!-- Gather 30 connections from the end of L4 wires at all four sides of a switchblock location --> | ||
| <wireconn num_conns="0" from_type="L4" from_switchpoint="3" side="rltb"/> |
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.
Should this be num_conns = 30?
| <!-- Specify a scatter-gather pattern for 3D connections. --> | ||
| <scatter_gather_list> | ||
| <sg_pattern name="name" type="unidir"> | ||
| <gather> | ||
| <!-- Gather 30 connections from the end of L4 wires at all four sides of a switchblock location --> | ||
| <wireconn num_conns="0" from_type="L4" from_switchpoint="3" side="rltb"/> | ||
| </gather> | ||
| <scatter> | ||
| <!-- Scatter 30 connections to the start of L4 wires at all four sides of a switchblock location --> | ||
| <wireconn num_conns="30" to_type="L4" to_switchpoint="0" side="rtl"/> | ||
| </scatter> | ||
| <sg_link_list> | ||
| <!-- Link going up one layer, using the 'seg4_inter_die_driver' multiplexer to gather connections from the bottom layer and using the LZ node/wire to move up one layer --> | ||
| <sg_link name="L_UP" z_offset="1" x_offset="0" y_offset="0" mux="seg4_inter_die_driver" seg_type="LZ"/> | ||
| <!-- Link going down one layer, using the 'seg4_inter_die_driver' multiplexer to gather connections from the top layer and using the LZ node/wire to down up one layer --> | ||
| <sg_link name="L_DOWN" z_offset="-1" mux="seg4_inter_die_driver" seg_type="LZ"/> | ||
| </sg_link_list> | ||
| <!-- Instantiate 6 'L_UP' and 6 'L_DOWN' sg_links per switchblock location everywhere on the device --> | ||
| <sg_location type="EVERYWHERE" num="60" sg_link_name="L_UP"/> | ||
| <sg_location type="EVERYWHERE" num="60" sg_link_name="L_DOWN"/> | ||
| </sg_pattern> | ||
| </scatter_gather_list> |
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.
Make sure there is a comment at the top of the arch file explaining the 3D part.
amin1377
left a comment
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.
Looks good, Soheil! Thanks! I don’t have much to add to what Amir and Vaughn already mentioned. Just one question: have you explained fc_override and how it helps with OPIN connections to other layers in the document? Thanks!
| limited_to_opin = false; | ||
| break; | ||
| } | ||
| e_rr_type to_type = rr_graph.node_type(to_node); |
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.
It’s not directly related to this section, but it occurred to me while reading this part. I think we assume that CHANZ is definitely stretched across multiple layers. If that’s correct, do we have a check for this in the RR graph validation to ensure that assumption holds?
Removes the pin_offset attribute from the architecture file, which was previously used to model 3D OPIN connectivity.
Instead, the <fc_override> tag is now used to specify absolute fc values for connecting OPINs to CHANZ wire segments.
Additionally, several functions have been moved from rr_graph2.cpp to two new files: rr_graph_chan_chan_edges.cpp and rr_graph_opin_chan_edges.cpp.