Skip to content

Commit 6c6413d

Browse files
committed
Merge branch 'master' into openroad-src-rename
# Conflicts: # docker/Dockerfile.builder # docs/conf.py Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2 parents 8ed17b5 + 6005dbe commit 6c6413d

15 files changed

Lines changed: 80 additions & 51 deletions

‎docs/conf.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ def setup(app):
228228

229229
f.write(updated_content)
230230

231-
# Get Manpage file
232-
url = "https://raw.githubusercontent.com/The-OpenROAD-Project/OpenROAD/master/openroad/utl/README.md"
233-
get_file_from_url(url, "Manpage.md")
231+
# Get Manpage file. OpenROAD renames its src/ directory to openroad/;
232+
# the src/ path serves OpenROAD master from before the rename.
233+
base = "https://raw.githubusercontent.com/The-OpenROAD-Project/OpenROAD/master"
234+
try:
235+
get_file_from_url(f"{base}/openroad/utl/README.md", "Manpage.md")
236+
except requests.HTTPError:
237+
get_file_from_url(f"{base}/src/utl/README.md", "Manpage.md")

‎docs/contrib/EndpointSlackTracking.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Every step then writes `$(REPORTS_DIR)/<step>_endpoint_slack.json`, e.g.
2424
It works in the single-process `flow/scripts/flow.tcl` flow as well. Steps
2525
that just copy their input (`orfs_copy_db`, e.g. `5_3_fillcell` without fill
2626
cells) re-time the design if it is loaded, or else copy the previous step's
27-
snapshot. Intermediate `.odb` files written through `orfs_write_db` (e.g. CTS's
28-
`4_1_error.odb`) also get a snapshot; `*-failed` ones don't.
27+
snapshot. Intermediate `.odb` files written through `orfs_write_db` also get
28+
a snapshot; the `<step>-failed.odb` that `run_step.tcl` writes does not.
2929

3030
A placed step is timed with the parasitics OpenROAD has for it: a bare
3131
`estimate_parasitics` estimates from the global routes when there are any,

‎docs/contrib/MakefileContract.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ Several of the rules exist for them.
7979
variable and is recorded.
8080
*Breaks:* caching a step's result, the QoR check against a baseline, and
8181
bisecting a regression.
82-
- **A failing step never calls `exit`.** It writes `<step>-failed.odb` and
83-
calls `error`, as `flow/scripts/global_place.tcl` does.
82+
- **A failing step never calls `exit`.** It calls `error`, and
83+
`flow/scripts/run_step.tcl` writes `<step>-failed.odb` and `.sdc`
84+
(`WRITE_ON_FAILURE`).
8485
*Breaks:* the log and the exit status stop saying where the step failed,
8586
and there is no checkpoint to inspect.
8687
- **A `PRE_<STEP>_TCL` hook never runs before the design is loaded.** Hooks

‎docs/contrib/TclContract.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ to follow.
7070
*Breaks:* the guard is a code path no CI run exercises, and a missing
7171
variable or file shows up later, somewhere else, as a wrong result.
7272
- **A failing step never writes the file a successful step writes.** It
73-
writes `<step>-failed.odb` and calls `error`, as
74-
`flow/scripts/global_place.tcl` does.
73+
calls `error`, and `flow/scripts/run_step.tcl` writes
74+
`<step>-failed.odb` and `.sdc` (`WRITE_ON_FAILURE`).
7575
*Breaks:* make, and any flow built on it, takes the file as proof that the
7676
step succeeded.
7777
- **A script never adds error numbers or checks that belong in OpenROAD.**

‎docs/user/FlowVariables.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ configuration file.
350350
| <a name="VIA_IN_PIN_MIN_LAYER"></a>VIA_IN_PIN_MIN_LAYER| Passed as -via_in_pin_bottom_layer to pin_access and detailed_route.| |
351351
| <a name="WIRE_LOAD_MODEL"></a>WIRE_LOAD_MODEL| Name of a Liberty wire_load group applied with set_wire_load_model whenever open.tcl reads timing. OpenSTA applies a wire-load model only to nets without parasitics, so it gives wire delay to timing read before placement and leaves placed and routed timing unaffected. An unknown name is an error. Empty, the default, applies none. A platform whose libraries define no wire_load group can supply one in a Liberty file listed in ADDITIONAL_LIBS.| |
352352
| <a name="WRITE_ODB_AND_SDC_EACH_STAGE"></a>WRITE_ODB_AND_SDC_EACH_STAGE| Save out .sdc and .odb file after each stage, useful to disable when using a single OpenROAD instance to run all stages of the flow.| 1|
353+
| <a name="WRITE_ON_FAILURE"></a>WRITE_ON_FAILURE| If set to 1, a step that fails writes the design as it was at the failure to $RESULTS_DIR/<step>-failed.odb and .sdc, then fails with the original error. `make web_<step>-failed.odb` opens it, e.g. `make web_3_3_place_gp-failed.odb`. Set to 0 where writing a large design on failure costs too much time or disk.| 1|
353354
| <a name="YOSYS_FLAGS"></a>YOSYS_FLAGS| Flags to pass to yosys.| -v 3|
354355
## synth variables
355356

@@ -673,6 +674,7 @@ configuration file.
673674
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
674675
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
675676
- [WRITE_ODB_AND_SDC_EACH_STAGE](#WRITE_ODB_AND_SDC_EACH_STAGE)
677+
- [WRITE_ON_FAILURE](#WRITE_ON_FAILURE)
676678

677679
## generate_abstract variables
678680

‎flow/Makefile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,6 @@ web_$(1):
387387
$(2)=$(RESULTS_DIR)/$(1) $(OPENROAD_WEB_CMD) $(SCRIPTS_DIR)/open.tcl
388388
endef
389389

390-
# Enables "make gui_5_1_grt-failed"
391-
$(eval $(call OPEN_GUI_SHORTCUT,5_1_grt-failed,5_1_grt-failed.odb))
392-
393390
# Separate dependency checking and doing a step. This can
394391
# be useful to retest a stage without having to delete the
395392
# target, or when building a wafer thin layer on top of
@@ -425,6 +422,9 @@ ifeq ($(if $(4),$(4),.odb),.odb)
425422
$(1): $(RESULTS_DIR)/$(1).odb
426423

427424
$(eval $(call OPEN_GUI_SHORTCUT,$(1),$(1).odb))
425+
# "make gui_<step>-failed" opens the checkpoint run_step.tcl writes when
426+
# the step fails
427+
$(eval $(call OPEN_GUI_SHORTCUT,$(1)-failed,$(1)-failed.odb))
428428
endif
429429

430430
.PHONY: do-$(1)

‎flow/scripts/cts.tcl‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ set_placement_padding -global \
4040
-left $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT) \
4141
-right $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT)
4242

43-
set result [catch { detailed_placement_helper -quiet } msg]
44-
if { $result != 0 } {
45-
orfs_write_db $::env(RESULTS_DIR)/4_1_error.odb
46-
error "Detailed placement failed in CTS: $msg"
47-
}
43+
detailed_placement_helper -quiet
4844

4945
log_cmd estimate_parasitics
5046

@@ -61,11 +57,7 @@ if { !$::env(SKIP_CTS_REPAIR_TIMING) } {
6157
run_lec_test 4_rsz 4_before_rsz_lec.v 4_after_rsz_lec.v
6258
}
6359

64-
set result [catch { detailed_placement_helper -quiet } msg]
65-
if { $result != 0 } {
66-
orfs_write_db $::env(RESULTS_DIR)/4_1_error.odb
67-
error "Detailed placement failed in CTS: $msg"
68-
}
60+
detailed_placement_helper -quiet
6961

7062
log_cmd check_placement -placeable -verbose
7163

‎flow/scripts/detail_place.tcl‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ proc do_dpl { } {
2929
log_cmd estimate_parasitics
3030
}
3131

32-
set result [catch { do_dpl } errMsg]
33-
if { $result != 0 } {
34-
orfs_write_db $::env(RESULTS_DIR)/3_5_place_dp-failed.odb
35-
error $errMsg
36-
}
32+
do_dpl
3733

3834
report_metrics 3 "detailed place" true false
3935

‎flow/scripts/flow.sh‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@ RUN_CMD="${RUN_CMD:-$PYTHON_EXE $SCRIPTS_DIR/run_command.py}"
1010

1111
echo "Running $2.tcl, stage $1"
1212

13+
# A failure checkpoint left by an earlier run of this step is stale.
14+
rm -f "$RESULTS_DIR/$1-failed.odb" "$RESULTS_DIR/$1-failed.sdc"
15+
1316
(
1417
trap 'mv "$LOG_DIR/$1.tmp.log" "$LOG_DIR/$1.log"' EXIT
18+
export STEP_NAME="$1"
19+
export STEP_TCL="$SCRIPTS_DIR/$2.tcl"
1520

1621
eval "$OPENROAD_EXE $OPENROAD_ARGS -exit \"$SCRIPTS_DIR/noop.tcl\"" \
1722
>"$LOG_DIR/$1.tmp.log" 2>&1
1823

1924
$RUN_CMD --log "$(realpath "$LOG_DIR/$1.tmp.log")" --append --tee -- \
20-
$OPENROAD_CMD -no_splash "$SCRIPTS_DIR/$2.tcl" -metrics "$LOG_DIR/$1.json"
25+
$OPENROAD_CMD -no_splash "$SCRIPTS_DIR/run_step.tcl" -metrics "$LOG_DIR/$1.json"
2126
)
2227

2328
# Log the hash for this step. The summary "make elapsed" in "make finish",

‎flow/scripts/global_place.tcl‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,10 @@ proc do_placement { global_placement_args } {
6868
log_cmd global_placement {*}$all_args
6969
}
7070

71-
set result [catch { do_placement $global_placement_args } errMsg]
71+
do_placement $global_placement_args
7272
if { $place_ios } {
7373
log_cmd reset_place_config
7474
}
75-
if { $result != 0 } {
76-
orfs_write_db $::env(RESULTS_DIR)/3_3_place_gp-failed.odb
77-
error $errMsg
78-
}
7975

8076
log_cmd estimate_parasitics
8177

0 commit comments

Comments
 (0)