OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

Add support for limiting heatmaps to selection

Open oharboe opened this issue 11 months ago • 13 comments

Description

Estimated/or actual routing heatmap includes all nets:

Image

However, it would be nice if one could select nets by name(ctrl-f) to look at specific nets. Similarly for placement heatmap.

Image

Suggested Solution

Add filtering option(toggle?) for heatmaps to use selected items only.

Additional Context

No response

oharboe avatar Jan 20 '25 04:01 oharboe

i am interested to work on this issue.

namanjain2001-code avatar May 10 '25 03:05 namanjain2001-code

Great! What help do you need to get started?

maliberty avatar May 10 '25 04:05 maliberty

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?"

namanjain2001-code avatar May 11 '25 05:05 namanjain2001-code

Image

Image

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?

namanjain2001-code avatar May 12 '25 14:05 namanjain2001-code

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.

maliberty avatar May 12 '25 22:05 maliberty

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.

namanjain2001-code avatar May 13 '25 07:05 namanjain2001-code

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 avatar May 13 '25 15:05 maliberty

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?

namanjain2001-code avatar May 18 '25 15:05 namanjain2001-code

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.

  1. Does it apply to all heatmaps or only some?
  2. 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).
  3. 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.

gadfort avatar May 18 '25 16:05 gadfort

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 avatar May 18 '25 18:05 namanjain2001-code

@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

gadfort avatar May 18 '25 18:05 gadfort

"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."

namanjain2001-code avatar May 19 '25 09:05 namanjain2001-code

"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.

oharboe avatar May 19 '25 10:05 oharboe

Hello! I would like to help with this! @namanjain2001-code @oharboe

kamyahari avatar Jul 17 '25 14:07 kamyahari

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.

maliberty avatar Jul 17 '25 16:07 maliberty