Skip to content

RRGraphView node_type_string(), node_side_string() Implementation #1873

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

Merged

Conversation

ethanroj23
Copy link
Contributor

@ethanroj23 ethanroj23 commented Oct 14, 2021

Description

In this PR, I have implemented RRGraphView::node_type_string(node) and RRGraphView::node_side_string(node) throughout VTR. In order to do this, I followed a pattern similar to that in the last PR.

Motivation and Context

These changes are a continuation of the RRGraphView API implementation effort.

How Has This Been Tested?

I have run the regression tests for vtr_reg_strong along with the QoR testing found at $ ../scripts/run_vtr_task.py regression_tests/vtr_reg_nightly_test3/vtr_reg_qor_chain. Results from these QoR tests can be found below. The file containing all results can be found here.

Only rows that are different are shown. For some reason, vtr_flow_elapsed_time was empty in the spreadsheet.

VTR Before These Changes With Changes in this PR
odin_synth_time 1 1.014123996
abc_synth_time 1 1.006390209
max_vpr_mem 1 1.000073409
pack_time 1 0.992432844
place_time 1 1.00722555
min_chan_width_route_time 1 1.000943466
crit_path_route_time 1 1.012807903

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@github-actions github-actions bot added the VPR VPR FPGA Placement & Routing Tool label Oct 14, 2021
Signed-off-by: Ethan Rogers <[email protected]>
@ethanroj23 ethanroj23 changed the title WIP: RRGraphView node_type_string(), node_side_string() Implementation RRGraphView node_type_string(), node_side_string() Implementation Oct 14, 2021
@tangxifan
Copy link
Contributor

Link to #1868 So that we keep tracking.

Copy link
Contributor

@tangxifan tangxifan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ethanroj23 Look good to me. See if you want to do some optional refactoring here. In general, we can merge once CI is green. The removal on global variables can be done in later PRs by @baberali-rs and Rapidsilicon team

@vaughnbetz Let me know what you think. I may miss something.

@@ -85,11 +85,11 @@ void report_overused_nodes() {
os << "Overused RR node #" << inode << '\n';
os << "Node id = " << size_t(node_id) << '\n';
os << "Occupancy = " << route_ctx.rr_node_route_inf[size_t(node_id)].occ() << '\n';
os << "Capacity = " << device_ctx.rr_nodes.node_capacity(node_id) << "\n\n";
os << "Capacity = " << rr_graph.node_capacity(node_id) << "\n\n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel good to see this function longer uses the rr_nodes data structure, it would be good to add the rr_graph to the argument list rather than fetching it from device_ctx. If it is too much for you, I can let @baberali-rs to follow up on this function.

Copy link
Contributor Author

@ethanroj23 ethanroj23 Oct 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add const RRGraphView& rr_graph to the argument list, every function that calls report_overused_nodes() has to have a reference to the rr_graph. Currently, the call tree is like: main()->vpr_flow()->vpr_route_flow()->report_overused_nodes() How high up in the call tree do we want to go before we access the rr_graph from device_ctx? @vaughnbetz Do you have a preference on what to do here?

Additionally, if we pass the rr_graph all the way down from main(), each of the functions along the call tree will have rr_graph as an extra argument

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tangxifan I have added RRGraphView to the argument list of report_overused_nodes() and now VTR Nightly Tests Part 1 is failing qor. I will try running the full qor regression, but it's possible we may have to leave things how they were. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tangxifan now that this branch is passing, are we good to merge it in? I don't have write access, so I can't do that myself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I merge now. All concerns resolved.

@@ -692,7 +692,7 @@ void print_route_tree(const t_rt_node* rt_node, int depth) {
auto& device_ctx = g_vpr_ctx.device();
const auto& rr_graph = device_ctx.rr_graph;
VTR_LOG("%srt_node: %d (%s) \t ipin: %d \t R: %g \t C: %g \t delay: %g",
indent.c_str(), rt_node->inode, device_ctx.rr_nodes[rt_node->inode].type_string(), rt_node->net_pin_index, rt_node->R_upstream, rt_node->C_downstream, rt_node->Tdel);
indent.c_str(), rt_node->inode, rr_graph.node_type_string(RRNodeId(rt_node->inode)), rt_node->net_pin_index, rt_node->R_upstream, rt_node->C_downstream, rt_node->Tdel);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my last comment, it would be good to add the rr_graph to the argument list rather than fetching it from device_ctx. If it is too much for you, I can let @baberali-rs to follow up on this function.

an argument and removed the use of device_ctx within report_overused_nodes().

Signed-off-by: Ethan Rogers <[email protected]>
@tangxifan tangxifan merged commit b2d9046 into verilog-to-routing:master Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants