-
Notifications
You must be signed in to change notification settings - Fork 294
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
make: gui_ prerendering #2610
base: master
Are you sure you want to change the base?
make: gui_ prerendering #2610
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,12 +60,74 @@ proc read_timing {input_file} { | |
if {[env_var_equals GUI_TIMING 1]} { | ||
puts "GUI_TIMING=1 reading timing, takes a little while for large designs..." | ||
read_timing $input_file | ||
|
||
gui::save_display_controls | ||
|
||
set height [[[ord::get_db_block] getBBox] getDY] | ||
set height [ord::dbu_to_microns $height] | ||
set resolution [expr $height / 1000] | ||
|
||
# FIXME reenable when there is a way to disable the rendered clock tree | ||
# | ||
# foreach clock [get_clocks *] { | ||
# if { [llength [get_property $clock sources]] > 0 } { | ||
# set clock_name [get_name $clock] | ||
# save_clocktree_image -clock $clock_name \ | ||
# -width 100 -height 100 \ | ||
# $::env(OBJECTS_DIR)/dummy.png | ||
# break | ||
# } | ||
# } | ||
|
||
# FIXME IRDrop heatmap should be added, but it has to be skipped | ||
# when there is no IRDrop heatmap to be rendered. | ||
|
||
set block [ord::get_db_block] | ||
set insts [$block getInsts] | ||
set placed 1 | ||
foreach inst $insts { | ||
set status [$inst getPlacementStatus] | ||
# status is not in the list of PLACED, LOCKED | ||
if {[lsearch {PLACED LOCKED} $status] == -1} { | ||
set placed 0 | ||
break | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
set have_routes [expr {$placed && [grt::have_routes]}] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we still need to compute/check $placed? I thought this was fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes: there is no ppl::have_placed method. I can simplify the code a bit here though for the have_routes case. |
||
|
||
foreach heatmap {Placement Routing RUDY Power} { | ||
if {[string equal $heatmap Routing] && !$have_routes} { | ||
# Skipping $heatmap heatmap, no routes available | ||
continue | ||
} | ||
if {[string equal $heatmap IRDrop] && | ||
(![env_var_exists_and_non_empty PWR_NETS_VOLTAGES] || | ||
![grt::have_routes])} { | ||
# Skipping $heatmap heatmap, no PWR_NETS_VOLTAGES available | ||
continue | ||
oharboe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
if {[lsearch {RUDY Placement} $heatmap] != -1 && !$placed} { | ||
# Skipping $heatmap heatmap, not all instances are placed | ||
continue | ||
} | ||
puts "Prerendering $heatmap heatmap..." | ||
gui::set_heatmap $heatmap rebuild 1 | ||
gui::dump_heatmap $heatmap $::env(REPORTS_DIR)/dummy.png | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we avoid the file side effect? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes: fixed |
||
} | ||
|
||
log_cmd gui::select_chart "Endpoint Slack" | ||
log_cmd gui::update_timing_report | ||
|
||
gui::clear_highlights -1 | ||
gui::clear_selections | ||
gui::restore_display_controls | ||
} | ||
|
||
fast_route | ||
|
||
if {[env_var_equals GUI_SHOW 1]} { | ||
# Show the GUI when it is ready; it is unresponsive(with modal requesters | ||
# saying it is unresponsive) until everything is loaded | ||
gui::unminimize | ||
log_cmd gui::unminimize | ||
} |
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.
open should not write files as a side effect. This should be removed
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.
Agreed, but how else to precalculate this?
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.
Does it actually save time? Most of the effort is to get sta warmed up. Drawing the tree should be cheap.
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.
Yes, last I checked.
However, I can delete the commented code and if this PR is otherwise good to go, we can square away what we already have a solution for and I can then create a new PR with a narrower concern and some numbers.
A way to precalculate this that does not modify GUI state and also does not write files to disk is needed, which isnt available yet, right?
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.
Yes, if there really is a need. I would be curious to see the time saved.