Skip to content
Open
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
5 changes: 5 additions & 0 deletions docs/contrib/TclContract.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ to follow.
when ORFS wants a value other than the tool's.
*Breaks:* a change to the default in OpenROAD has no effect in ORFS, and
the two drift apart.
- **An optional value the tool chooses when it is absent defaults to `""`
and is tested with `$::env(X) ne ""` where it decides whether an option
is passed.** `append_env_var ... 1` passes nothing for `""`.
*Breaks:* the guard is a code path no CI run exercises, and a misspelled
or erased variable silently lets the tool choose.
- **A script never trades an explicit variable for a clever one.** A flag
that means one thing (`has_clock`) stays a flag; an empty string or a
sentinel value never stands in for it.
Expand Down
2 changes: 1 addition & 1 deletion docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ configuration file.
| <a name="ABC_DRIVER_CELL"></a>ABC_DRIVER_CELL| Default driver cell used during ABC synthesis.| |
| <a name="ABC_LOAD_IN_FF"></a>ABC_LOAD_IN_FF| During synthesis set_load value used.| |
| <a name="ABC_SCRIPT"></a>ABC_SCRIPT| Replaces the ABC script synthesis runs, so that a design can vendor and change it. Ignored when SYNTH_WRAPPED_OPERATORS or SWAP_ARITH_OPERATORS is set: abc_new then maps each arithmetic operator with its own script.| |
| <a name="ABSTRACT_SOURCE"></a>ABSTRACT_SOURCE| Which .odb file to use to create abstract| |
| <a name="ABSTRACT_SOURCE"></a>ABSTRACT_SOURCE| Which .odb file to use to create abstract| 6_final|
| <a name="ADDER_MAP_FILE"></a>ADDER_MAP_FILE| Optional mapping file supplied to Yosys to map adders| |
| <a name="ADDITIONAL_FAST_LIBS"></a>ADDITIONAL_FAST_LIBS| Hardened macro library files for the fast corner, on a platform that keeps one liberty list per corner (see CORNERS). The platform config adds them to its FAST_LIB_FILES, as ihp-sg13g2 does. With BLOCKS, the fast corner timing model of each block is appended.| |
| <a name="ADDITIONAL_FILES"></a>ADDITIONAL_FILES| Additional files to be added to `make issue` archive.| |
Expand Down
6 changes: 1 addition & 5 deletions flow/scripts/generate_abstract.tcl
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
source $::env(SCRIPTS_DIR)/load.tcl
erase_non_stage_variables generate_abstract

set stem [expr {
[env_var_exists_and_non_empty ABSTRACT_SOURCE] ?
$::env(ABSTRACT_SOURCE) :
"6_final"
}]
set stem $::env(ABSTRACT_SOURCE)

set design_stage [lindex [extract_stage $stem.odb] 0]

Expand Down
5 changes: 2 additions & 3 deletions flow/scripts/global_route.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ if { [lsearch -exact $::env(GLOBAL_ROUTE_ARGS) -allow_congestion] >= 0 } {
}

proc set_grt_seed { } {
set seed_arg [env_var_or_empty GRT_SEED]
if { $seed_arg ne "" } {
log_cmd set_global_routing_random -seed $seed_arg
if { $::env(GRT_SEED) ne "" } {
log_cmd set_global_routing_random -seed $::env(GRT_SEED)
}
}

Expand Down
2 changes: 1 addition & 1 deletion flow/scripts/load.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ proc load_design_from { dir design_file } {
log_cmd source $::env(PLATFORM_DIR)/setRC.tcl
}

if { [env_var_exists_and_non_empty WIRE_LOAD_MODEL] } {
if { $::env(WIRE_LOAD_MODEL) ne "" } {
# OpenSTA applies a wire-load model only to nets without parasitics.
log_cmd set_wire_load_model -name $::env(WIRE_LOAD_MODEL)
}
Expand Down
2 changes: 1 addition & 1 deletion flow/scripts/open.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ proc read_timing { input_file } {
} else {
log_cmd source $::env(PLATFORM_DIR)/setRC.tcl
}
if { [env_var_exists_and_non_empty WIRE_LOAD_MODEL] } {
if { $::env(WIRE_LOAD_MODEL) ne "" } {
# OpenSTA applies a wire-load model only to nets without parasitics.
log_cmd set_wire_load_model -name $::env(WIRE_LOAD_MODEL)
}
Expand Down
2 changes: 1 addition & 1 deletion flow/scripts/report_metrics.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ proc report_puts { out } {
proc get_power_file_scope_args { } {
set args [list]

if { [env_var_exists_and_non_empty POWER_FILE_SCOPE] } {
if { $::env(POWER_FILE_SCOPE) ne "" } {
set scope_val $::env(POWER_FILE_SCOPE)

# 1. Strip surrounding quotes from shell/Make
Expand Down
13 changes: 13 additions & 0 deletions flow/scripts/variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ WIRE_LOAD_MODEL:
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.
default: ""
type: string
TAPCELL_TCL:
description: |
Expand Down Expand Up @@ -791,6 +792,7 @@ PLACE_DENSITY_LB_ADDON:
REPAIR_PDN_VIA_LAYER:
description: |
Remove power grid vias which generate DRC violations after detailed routing.
default: ""
GLOBAL_PLACEMENT_ARGS:
description: >
Use additional tuning parameters during global placement other than default
Expand Down Expand Up @@ -866,11 +868,13 @@ CAP_MARGIN:
description: >
Specifies a capacitance margin when fixing max capacitance violations. This
option allows you to overfix.
default: ""
tunable: 1
SLEW_MARGIN:
description: >
Specifies a slew margin when fixing max slew violations. This option allows
you to overfix.
default: ""
tunable: 1
CTS_ARGS:
description: |
Expand Down Expand Up @@ -935,6 +939,7 @@ SETUP_MOVE_SEQUENCE:
description: >
Passed as -sequence to repair_timing. This should be a string of move
keywords separated by commas.
default: ""
stages:
- cts
- floorplan
Expand All @@ -945,6 +950,7 @@ SETUP_REPAIR_PHASES:
repair phase names separated by spaces. Set to PARALLEL_EVAL to repair
setup timing with the experimental parallel evaluation policy. When
unset, repair_timing runs its default phases.
default: ""
stages:
- cts
- floorplan
Expand Down Expand Up @@ -1056,12 +1062,14 @@ MIN_CLK_ROUTING_LAYER:
VIA_IN_PIN_MIN_LAYER:
description: >
Passed as -via_in_pin_bottom_layer to pin_access and detailed_route.
default: ""
stages:
- grt
- route
VIA_IN_PIN_MAX_LAYER:
description: >
Passed as -via_in_pin_top_layer to pin_access and detailed_route.
default: ""
stages:
- grt
- route
Expand All @@ -1084,11 +1092,13 @@ DETAILED_ROUTE_END_ITERATION:
OR_K:
description: >
Passed as -or_k to detailed routing.
default: ""
stages:
- route
OR_SEED:
description: >
Passed as -or_seed to detailed routing.
default: ""
stages:
- route
RCX_RULES:
Expand Down Expand Up @@ -1553,6 +1563,7 @@ SEAL_GDS:
ABSTRACT_SOURCE:
description: |
Which .odb file to use to create abstract
default: 6_final
stages:
- generate_abstract
PRE_GLOBAL_ROUTE_TCL:
Expand Down Expand Up @@ -1936,6 +1947,7 @@ OPT_POST_GRT_WNS:
GRT_SEED:
description: >
Specifies a random seed for global routing. Useful for perturbation studies.
default: ""
stages:
- grt
tunable: 1
Expand All @@ -1949,6 +1961,7 @@ POWER_FILE_SCOPE:
description: >
The SAIF or VCD scope of the current design. Typically the test bench name and
design under the test instance name. Scope levels are separated with '/'.
default: ""
type: string
VCD_FILE:
description: >
Expand Down