Skip to content

Replace the "Pause" button with a sticky "Display Step" checkbox - #3720

Open
kevinxing-a12 wants to merge 20 commits into
verilog-to-routing:masterfrom
kevinxing-a12:fix_pause
Open

Replace the "Pause" button with a sticky "Display Step" checkbox#3720
kevinxing-a12 wants to merge 20 commits into
verilog-to-routing:masterfrom
kevinxing-a12:fix_pause

Conversation

@kevinxing-a12

Copy link
Copy Markdown
Contributor

Description

In the GUI, I replaced the "Pause" pushbutton under the "Misc." menu with a sticky "Display Step" checkbox:
2026-07-24 144754

After this change, I came into some compile errors from the GUI test cases, so I changed the parts that originally corresponds to the "Pause" pushbutton to the new "Display Step" checkbox.

I also updated descriptions about this display step feature in the graphics doc, and removed the old ones.

Related Issue

Motivation and Context

Previously, if people wanted to stop the graphics at every iteration/update during placement/routing, they would have to click on the "Pause" button every time before clicking on "Next Step".

Now, the graphics will automatically stop at the next iteration/update whenever people click on "Next Step", provided that this "Display Step" checkbox is toggled. When it is off, the graphics will proceed as normal.

How Has This Been Tested?

Tested this new feature on multiple regression tests. During testing, the checkbox was toggled at several different flow stages, and no bug was spotted.

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 VPR VPR FPGA Placement & Routing Tool docs Documentation lang-cpp C/C++ code labels Jul 24, 2026

@vaughnbetz vaughnbetz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thanks.

For the documentation, I see some updates that I'd like to get you to do, but can be in another PR.

  1. Update the screenshot of the Misc menu.
  2. I think we should add a "Misc. Display Controls" major heading
    and group the manual moves and display step as subitems under it.
  3. Document the 'save' button (outputs current graphics to a file)
  4. Add a subheading that for the 'Debug' button. Text would be "The CAD optimization algorithms can be paused at different user-specified points so you can examine the current placement and/or routing solution, as detailed at' (link to): https://vtr--3720.org.readthedocs.build/en/3720/vpr/debug_aids/#placer-and-router-debugger
  5. I think we should delete the 'Button Description Table' as we don't use simple buttons to control these features anymore.
  6. Add a screenshot of the analytical placement view, and update the text to say we can visualize global (analytical) placement, detailed (SA) placement, and routing.
    Make sense?

Comment thread vpr/src/draw/draw.cpp Outdated
draw_state->forced_pause = true;
draw_state->display_step = checked;

application->update_message(draw_state->default_message);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure why we're doing the application->update_message().

@vaughnbetz

Copy link
Copy Markdown
Contributor

Should we merge this and leave the doc updates for another PR, or put them in this PR? I'm OK either way.

@kevinxing-a12

Copy link
Copy Markdown
Contributor Author

I'm working on a new feature which I will push shortly. It will be part of this PR.

@kevinxing-a12

kevinxing-a12 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Updates since the last git push:

  1. I changed the Display Step checkbox to a spinbox named "Steps to Proceed", where the user can choose from 1 to 100 as the number of steps (e.g. temperature update, routing iteration) by which the graphics should proceed and then freeze. The availability of this spinbox is controlled by a toggle switch named "Proceed by Step". More details about this feature is in the updated graphics.rst.
2026-07-27 171318
  1. I modified the GUI test files to accommodate the new changes. During the process, I realized that the current test files are missing checks for some existing UI elements, so I did a complete swipe on these files and added missing items.

  2. A few existing QObject::connect() functions pass unused parameters to their internal lambda expressions. I removed them and corrected the associated lambda function declarations where necessary.

I want to fully update graphics.rst in the next PR. I realized that many other figures referenced by this file are also stale due to the updates we have had this summer, so a separate PR may be appropriate for the amount of work.

@AmirhosseinPoolad AmirhosseinPoolad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like it, thanks! Had some minor comments.

Comment thread vpr/src/draw/draw.cpp
Comment thread vpr/src/draw/draw_types.h Outdated
@AmirhosseinPoolad

Copy link
Copy Markdown
Contributor

Question: is the spinbox greyed out when the proceed by step option is turned off? I think it should be if possible.

@kevinxing-a12

kevinxing-a12 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Yes it is.

void toggle_proceed_by_step_cbk(bool state, ezgl::application* app) {
t_draw_state* draw_state = get_draw_state_vars();
draw_state->proceed_by_step = state;
// Reset the step counter.
draw_state->step_counter = 0;
app->find_widget("StepsToProceedLabel")->setEnabled(state);
app->find_widget("StepsToProceed")->setEnabled(state);
}

The line app->find_widget("StepsToProceed")->setEnabled(state) bundles the spinbox's validity with the toggle switch.

@kevinxing-a12

kevinxing-a12 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@vaughnbetz @AmirhosseinPoolad I updated the graphics doc by following these:

  1. Update the screenshot of the Misc menu.
  2. I think we should add a "Misc. Display Controls" major heading and group the manual moves and display step as subitems under it.
  3. Document the 'save' button (outputs current graphics to a file).
  4. Add a subheading that for the 'Debug' button. Text would be "The CAD optimization algorithms can be paused at different user-specified points so you can examine the current placement and/or routing solution, as detailed at' (link to): https://vtr--3720.org.readthedocs.build/en/3720/vpr/debug_aids/#placer-and-router-debugger
  5. I think we should delete the 'Button Description Table' as we don't use simple buttons to control these features anymore.
  6. Add a screenshot of the analytical placement view, and update the text to say we can visualize global (analytical) placement, detailed (SA) placement, and routing.

I also updated the Critical Path section so we mention that we can now draw multiple critical paths and how you can do that.

Available here: https://vtr--3720.org.readthedocs.build/en/3720/vpr/graphics/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation lang-cpp C/C++ code VPR VPR FPGA Placement & Routing Tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants