Add support for limiting heatmaps to selection
Description
Estimated/or actual routing heatmap includes all nets:
However, it would be nice if one could select nets by name(ctrl-f) to look at specific nets. Similarly for placement heatmap.
Suggested Solution
Add filtering option(toggle?) for heatmaps to use selected items only.
Additional Context
No response
i am interested to work on this issue.
Great! What help do you need to get started?
Currently, the Ctrl+F 'Find Object' popup is used to search and highlight specific nets or instances. Would it be a good idea to add a checkbox in this popup (e.g., 'Show Heatmap') so that when it's checked, the heatmap around the selected net or instance becomes visible or focused? Would this feature be useful?"
I’m considering adding a new option in the "Find Object" feature to support heatmap generation. If this is the correct approach, could you provide guidance on how to handle the backend data processing required to generate the heatmap?
I think we should keep selection separate from heatmap display. There are many ways someone could select objects including tcl commands and layout clicking. The heatmap setting should have an option to include only selected objects.
Okay, now I got it — thanks for the clarification. I've noticed that there are different settings/configuration windows for each type of heatmap. I think I need to add a checkbox here to control this behavior. Am I right? now i am trying to understand backend for heatmap.
At the UI level you will need to address each setting box. At the code level the heatmaps do have some sharing so you may be able to store the setting in a more common base class.
@gadfort any opinions?
I'm able to render the required UI successfully, but I'm facing an issue on the backend side.
My current approach is to retrieve the selected object using: const gui::Selected& sel = gui::Gui::get()->getInspectorSelection();
Then, I plan to use this selection to update the following function:
void HeatMapDataSource::addToMap(const odb::Rect& region, double value);
Specifically, I intend to filter based on the selected net like this:
if (selected_net != nullptr && map_pt->net != selected_net) { continue; } Would this be a valid approach? Or is there a better/cleaner way to implement filtering based on the selected object in the GUI?
At the UI level you will need to address each setting box. At the code level the heatmaps do have some sharing so you may be able to store the setting in a more common base class.
@gadfort any opinions?
@maliberty I missed this, it's not 100% clear to me what the request is.
- Does it apply to all heatmaps or only some?
- For both rudy and routing congestion, the map is built from the all the nets (the change would need to be in GRT to correctly handle this).
- How would you enable/disable this behavior, I would expect this should be disabled by default as the selection might have nothing to do with the heatmap view and just interfere with the user.
Ok if I am not worng for routing congestion we can filter heatmap on based on it. And for other heatmap it might not work??
@namanjain2001-code for the rudy estimate the calculation comes from: https://github.com/The-OpenROAD-Project/OpenROAD/blob/ce617810e4dc11b3cdb5a267ef3454788f81aaf0/src/grt/src/Rudy.cpp#L117 and for routing congestion: https://github.com/The-OpenROAD-Project/OpenROAD/blob/ce617810e4dc11b3cdb5a267ef3454788f81aaf0/src/grt/src/heatMap.cpp#L127
It's possible I'm missing something, but this appears to be the source of the data for the heatmaps
"Hi @oharboe, in the two images you shared, could you clarify on what basis the heatmap data was filtered? Was it based on a specific group of related nets (e.g., functionally grouped nets), or was it a random selection of nets—perhaps selected by manually dragging over a region? Just trying to understand the selection/filtering criteria used for generating the filtered heatmap."
"Hi @oharboe, in the two images you shared, could you clarify on what basis the heatmap data was filtered? Was it based on a specific group of related nets (e.g., functionally grouped nets), or was it a random selection of nets—perhaps selected by manually dragging over a region? Just trying to understand the selection/filtering criteria used for generating the filtered heatmap."
I used a regular expression to pick nets that I wanted to study.
Hello! I would like to help with this! @namanjain2001-code @oharboe
Welcome and feel to to join in. There hasn't been an update from @namanjain2001-code in a while so I'm not sure if he is still working on this.