Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions docs/tutorials/FlowTutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,26 +306,28 @@ abc.constr klayout.lyt klayout_tech.lef lib
Reports directory, which contains congestion report, DRC
report, design statistics and antenna log for reference.

| `reports` | | |
|-------------------|---------------------|------------------------|
| `congestion.rpt` | `VDD.rpt` | `VSS.rpt` |
| `5_route_drc.rpt` | `final_clocks.webp` | `final_placement.webp` |
| `antenna.log` | `final_clocks.webp` | `final.webp` |
| `synth_stat.txt` | `synth_check.txt` | `final_resizer.webp` |

The table below briefly describes the reports directory files.

| File Name | Description |
|------------------------|----------------------------------------------------------|
| `congestion.rpt` | Global routing congestion if occurred. |
| `5_route_drc.rpt` | DRC violations if occurred. |
| `final_clocks.webp` | OR extracted image reference after clock tree synthesis. |
| `final_resizer.webp` | OR extracted image reference after resizer. |
| `synth_check.txt` | Synthesis warning/error messages. |
| `antenna.log` | Antenna check log report. |
| `final_placement.webp` | Extracted image after final placement. |
| `final.webp` | Extracted image after routing. |
| `synth_stat.txt` | Post synthesis design statistics log saved here. |
| `reports` | | |
|-------------------|--------------------|-----------------------|
| `congestion.rpt` | `VDD.rpt` | `VSS.rpt` |
| `5_route_drc.rpt` | `final_clocks.png` | `final_placement.png` |
| `antenna.log` | `final_all.png` | `final_routing.png` |
| `synth_stat.txt` | `synth_check.txt` | `final_resizer.png` |

The table below briefly describes the reports directory files. The images
are `.webp` instead when `SAVE_IMAGES_VIEWER=qt`.

| File Name | Description |
|-----------------------|----------------------------------------------------------|
| `congestion.rpt` | Global routing congestion if occurred. |
| `5_route_drc.rpt` | DRC violations if occurred. |
| `final_clocks.png` | OR extracted image reference after clock tree synthesis. |
| `final_resizer.png` | OR extracted image reference after resizer. |
| `synth_check.txt` | Synthesis warning/error messages. |
| `antenna.log` | Antenna check log report. |
| `final_placement.png` | Extracted image after final placement. |
| `final_all.png` | Extracted image after routing with power/ground nets. |
| `final_routing.png` | Extracted image after routing. |

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.

medium

The file final_all.png is listed in the reports directory table above but is missing from this description table. Please add a description for final_all.png to keep the documentation complete and consistent.

Suggested change
| `final_routing.png` | Extracted image after routing. |
| `final_all.png` | Extracted image after routing with power/ground nets. |
| `final_routing.png` | Extracted image after routing. |

| `synth_stat.txt` | Post synthesis design statistics log saved here. |

The flow completes with the message below by creating a merged final GDS file.

Expand Down
2 changes: 2 additions & 0 deletions docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ configuration file.
| <a name="RTLMP_WIRELENGTH_WT"></a>RTLMP_WIRELENGTH_WT| Weight for half-perimiter wirelength.| 100.0|
| <a name="RUN_LOG_NAME_STEM"></a>RUN_LOG_NAME_STEM| Stem of the log file name, the log file will be named `$(LOG_DIR)/$(RUN_LOG_NAME_STEM).log`.| run|
| <a name="RUN_SCRIPT"></a>RUN_SCRIPT| Path to script to run from `make run`, python or tcl script detected by .py or .tcl extension.| |
| <a name="SAVE_IMAGES_VIEWER"></a>SAVE_IMAGES_VIEWER| Which viewer draws the images of the final report: qt for the Qt GUI in an offscreen window, or web for the web viewer, which needs no display. OpenROAD built without Qt always uses the web viewer.| web|
| <a name="SC_LEF"></a>SC_LEF| Path to technology standard cell LEF file.| |
| <a name="SDC_FILE"></a>SDC_FILE| The path to design constraint (SDC) file.| |
| <a name="SEAL_GDS"></a>SEAL_GDS| Seal macro to place around the design.| |
Expand Down Expand Up @@ -624,6 +625,7 @@ configuration file.
- [REPORT_CLOCK_SKEW](#REPORT_CLOCK_SKEW)
- [REPORT_ENDPOINT_SLACK](#REPORT_ENDPOINT_SLACK)
- [ROUTING_LAYER_ADJUSTMENT](#ROUTING_LAYER_ADJUSTMENT)
- [SAVE_IMAGES_VIEWER](#SAVE_IMAGES_VIEWER)
- [SEC_CHECK](#SEC_CHECK)
- [SKIP_DETAILED_ROUTE](#SKIP_DETAILED_ROUTE)
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
Expand Down
3 changes: 3 additions & 0 deletions flow/designs/nangate45/gcd/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ export TNS_END_PERCENT = 100
export GPL_PLACE_IOS = 1
export SYNTH_REPEATABLE_BUILD ?= 1

# CI runs the non-default image viewer on this design.
export SAVE_IMAGES_VIEWER ?= qt

# This needs a smaller pitch to accomodate a small block
export PDN_TCL ?= $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NAME)/grid_strategy-M1-M4-M7.tcl
11 changes: 9 additions & 2 deletions flow/scripts/final_outputs.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ report_metrics 6 "finish"

source_step_tcl POST FINAL_REPORT

# Save a final image if openroad is compiled with the gui
if { [ord::openroad_gui_compiled] } {
# Save the final images: in a Qt window already open, in an offscreen one, or
# with the web viewer, which OpenROAD built without Qt always uses.
set images_viewer $::env(SAVE_IMAGES_VIEWER)
if { $images_viewer ni {qt web} } {
utl::error FLW 34 "SAVE_IMAGES_VIEWER must be qt or web, not $images_viewer."
}
if { $images_viewer eq "web" || ![ord::openroad_gui_compiled] || [gui::has_ui] } {
source $::env(SCRIPTS_DIR)/save_images.tcl
} else {
gui::show "source $::env(SCRIPTS_DIR)/save_images.tcl" false
}
31 changes: 20 additions & 11 deletions flow/scripts/save_images.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
source $::env(SCRIPTS_DIR)/util.tcl

# With no Qt window up, the web viewer draws the images; it writes only PNG.
if { [gui::has_ui] } {

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.

medium

To prevent potential crashes in non-GUI builds where the gui namespace or gui::has_ui command might not be defined, it is safer to check [ord::openroad_gui_compiled] before calling [gui::has_ui].

if { [ord::openroad_gui_compiled] && [gui::has_ui] } {

set web_flag {}
set ext webp
} else {
set web_flag -web
set ext png
}

gui::save_display_controls

set height [[[ord::get_db_block] getBBox] getDY]
Expand Down Expand Up @@ -30,22 +39,22 @@ gui::set_display_controls "Misc/Highlight selected" visible true
gui::set_display_controls "Misc/Detailed view" visible true

# The routing view
save_image -resolution $resolution $::env(REPORTS_DIR)/final_all.webp
save_image {*}$web_flag -resolution $resolution $::env(REPORTS_DIR)/final_all.$ext
gui::set_display_controls "Nets/Power" visible false
gui::set_display_controls "Nets/Ground" visible false
save_image -resolution $resolution $::env(REPORTS_DIR)/final_routing.webp
save_image {*}$web_flag -resolution $resolution $::env(REPORTS_DIR)/final_routing.$ext

# The placement view without routing
gui::set_display_controls "Shape Types/Routing/*" visible false
gui::set_display_controls "Instances/Physical/Fill cell" visible false
gui::set_display_controls "Misc/Instances/*" visible false
save_image -resolution $resolution $::env(REPORTS_DIR)/final_placement.webp
save_image {*}$web_flag -resolution $resolution $::env(REPORTS_DIR)/final_placement.$ext

if { [env_var_exists_and_non_empty PWR_NETS_VOLTAGES] } {
gui::set_display_controls "Heat Maps/IR Drop" visible true
gui::set_heatmap IRDrop Layer $::env(IR_DROP_LAYER)
gui::set_heatmap IRDrop ShowLegend 1
save_image -resolution $resolution $::env(REPORTS_DIR)/final_ir_drop.webp
save_image {*}$web_flag -resolution $resolution $::env(REPORTS_DIR)/final_ir_drop.$ext
gui::set_display_controls "Heat Maps/IR Drop" visible false
}

Expand All @@ -58,7 +67,7 @@ gui::set_display_controls "Instances/StdCells/Clock tree/*" visible true
gui::set_display_controls "Instances/StdCells/Sequential" visible true
gui::set_display_controls "Instances/Macro" visible true
select -name "clk*" -type Inst
save_image -resolution $resolution $::env(REPORTS_DIR)/final_clocks.webp
save_image {*}$web_flag -resolution $resolution $::env(REPORTS_DIR)/final_clocks.$ext
gui::clear_selections

gui::show_widget "Clock Tree Viewer"
Expand All @@ -70,10 +79,10 @@ foreach scene [get_scenes] {
save_clocktree_image -clock $clock_name \
-width 1024 -height 1024 \
-scene $scene \
$::env(REPORTS_DIR)/cts_${scene_name}_${clock_name}.webp
$::env(REPORTS_DIR)/cts_${scene_name}_${clock_name}.$ext
gui::select_clockviewer_clock $clock_name
save_image -resolution $resolution \
$::env(REPORTS_DIR)/cts_${scene_name}_${clock_name}_layout.webp
save_image {*}$web_flag -resolution $resolution \
$::env(REPORTS_DIR)/cts_${scene_name}_${clock_name}_layout.$ext
}
}
}
Expand All @@ -98,7 +107,7 @@ select -name "wire*" -type Inst -highlight 3
select -name "rebuffer*" -type Inst -highlight 4 ;# red
select -name "split*" -type Inst -highlight 5 ;# dark green

save_image -resolution $resolution $::env(REPORTS_DIR)/final_resizer.webp
save_image {*}$web_flag -resolution $resolution $::env(REPORTS_DIR)/final_resizer.$ext

gui::clear_highlights -1
gui::clear_selections
Expand All @@ -109,7 +118,7 @@ gui::set_display_controls "Instances/Physical/*" visible false
gui::set_display_controls "Nets/*" visible false
gui::set_display_controls "Heat Maps/Routing Congestion" visible true

save_image -resolution $resolution $::env(REPORTS_DIR)/final_congestion.webp
save_image {*}$web_flag -resolution $resolution $::env(REPORTS_DIR)/final_congestion.$ext

# The worst timing path view
gui::set_display_controls "Heat Maps/Routing Congestion" visible false
Expand All @@ -119,7 +128,7 @@ gui::set_display_controls "Instances/*" visible true
gui::set_display_controls "Shape Types/Routing/*" visible false

gui::show_worst_path
save_image -resolution $resolution $::env(REPORTS_DIR)/final_worst_path.webp
save_image {*}$web_flag -resolution $resolution $::env(REPORTS_DIR)/final_worst_path.$ext
gui::set_display_controls "Timing Path/*" visible false

gui::restore_display_controls
7 changes: 7 additions & 0 deletions flow/scripts/variables.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions flow/scripts/variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,14 @@ GUI_TIMING:
quite time consuming. Useful to disable when investigating non-timing
aspects like floorplan, placement, routing, etc.
default: 1
SAVE_IMAGES_VIEWER:
description: >
Which viewer draws the images of the final report: qt for the Qt GUI in
an offscreen window, or web for the web viewer, which needs no display.
OpenROAD built without Qt always uses the web viewer.
default: web
stages:
- final
FILL_CELLS:
description: >
Fill cells are used to fill empty sites. If not set or empty, fill cell
Expand Down
11 changes: 10 additions & 1 deletion flow/util/genReportTable.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,21 @@ def image_view_name(file):
def collect_images():
"""Map design -> platform -> view -> image path, relative to reports/."""
images = defaultdict(lambda: defaultdict(dict))
# A view saved as both .webp and .png (SAVE_IMAGES_VIEWER changed between
# runs) shows the newer one.
mtimes = {}
for parents, dirs, files in sorted(os.walk("reports", topdown=False)):
for file in files:
if file.lower().endswith(IMAGE_EXTENSIONS):
mtime = os.path.getmtime(os.path.join(parents, file))
path = os.path.join(parents, file).replace("reports", ".")
platform, design = path.split(os.sep)[1:3]
images[design][platform][image_view_name(file)] = path
view = image_view_name(file)
key = (design, platform, view)
if key in mtimes and mtimes[key] >= mtime:
continue
mtimes[key] = mtime
images[design][platform][view] = path
return images


Expand Down