Skip to content
Merged
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
4 changes: 3 additions & 1 deletion docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ configuration file.
| <a name="IO_PLACER_H"></a>IO_PLACER_H| A list of metal layers on which the I/O pins are placed horizontally (top and bottom of the die).| |
| <a name="IO_PLACER_V"></a>IO_PLACER_V| A list of metal layers on which the I/O pins are placed vertically (sides of the die).| |
| <a name="IR_DROP_LAYER"></a>IR_DROP_LAYER| Default metal layer to report IR drop.| |
| <a name="KEEP_VARS"></a>KEEP_VARS| Feature toggle to keep intermediate variables during the flow. This is useful for the single-run flow, where all stages of the flow are run in a single OpenROAD instance.| |
| <a name="KEEP_VARS"></a>KEEP_VARS| Feature toggle to keep intermediate variables during the flow. This is useful for the single-run flow, where all stages of the flow are run in a single OpenROAD instance.| 0|
| <a name="KLAYOUT_TECH_FILE"></a>KLAYOUT_TECH_FILE| A mapping from LEF/DEF to GDS using the KLayout tool.| |
| <a name="LATCH_MAP_FILE"></a>LATCH_MAP_FILE| Optional mapping file supplied to Yosys to map latches| |
| <a name="LAYER_PARASITICS_FILE"></a>LAYER_PARASITICS_FILE| Path to per layer parasitics file. Defaults to $(PLATFORM_DIR)/setRC.tcl.| |
Expand Down Expand Up @@ -271,6 +271,7 @@ configuration file.
| <a name="VERILOG_FILES"></a>VERILOG_FILES| The path to the design Verilog/SystemVerilog files providing a description of modules.| |
| <a name="VERILOG_INCLUDE_DIRS"></a>VERILOG_INCLUDE_DIRS| Specifies the include directories for the Verilog input files.| |
| <a name="VERILOG_TOP_PARAMS"></a>VERILOG_TOP_PARAMS| Apply toplevel params (if exist). Passed in as a list of key value pairs in tcl syntax; separated by spaces: PARAM1 VALUE1 PARAM2 VALUE2 stages: - synth| |
| <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|
| <a name="YOSYS_FLAGS"></a>YOSYS_FLAGS| Flags to pass to yosys.| -v 3|
## synth variables

Expand Down Expand Up @@ -487,6 +488,7 @@ configuration file.
- [OPENROAD_HIERARCHICAL](#OPENROAD_HIERARCHICAL)
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
- [WRITE_ODB_AND_SDC_EACH_STAGE](#WRITE_ODB_AND_SDC_EACH_STAGE)

## generate_abstract variables

Expand Down
8 changes: 4 additions & 4 deletions flow/scripts/cts.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ repair_clock_inverters

proc save_progress { stage } {
puts "Run 'make gui_$stage.odb' to load progress snapshot"
write_db $::env(RESULTS_DIR)/$stage.odb
write_sdc -no_timestamp $::env(RESULTS_DIR)/$stage.sdc
orfs_write_db $::env(RESULTS_DIR)/$stage.odb
orfs_write_sdc $::env(RESULTS_DIR)/$stage.sdc
}

# Run CTS
Expand Down Expand Up @@ -80,5 +80,5 @@ report_metrics 4 "cts final"

source_env_var_if_exists POST_CTS_TCL

write_db $::env(RESULTS_DIR)/4_1_cts.odb
write_sdc -no_timestamp $::env(RESULTS_DIR)/4_cts.sdc
orfs_write_db $::env(RESULTS_DIR)/4_1_cts.odb
orfs_write_sdc $::env(RESULTS_DIR)/4_cts.sdc
2 changes: 1 addition & 1 deletion flow/scripts/density_fill.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if { $::env(USE_FILL) } {
# The .v file is just for debugging purposes, not a result of
# this stage.
write_verilog $::env(RESULTS_DIR)/6_1_fill.v
write_db $::env(RESULTS_DIR)/6_1_fill.odb
orfs_write_db $::env(RESULTS_DIR)/6_1_fill.odb
} else {
log_cmd exec cp $::env(RESULTS_DIR)/5_route.odb $::env(RESULTS_DIR)/6_1_fill.odb
# There is no 5_route.v file to copy
Expand Down
4 changes: 2 additions & 2 deletions flow/scripts/detail_place.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ proc do_dpl { } {

set result [catch { do_dpl } errMsg]
if { $result != 0 } {
write_db $::env(RESULTS_DIR)/3_5_place_dp-failed.odb
orfs_write_db $::env(RESULTS_DIR)/3_5_place_dp-failed.odb
error $errMsg
}

report_metrics 3 "detailed place" true false

write_db $::env(RESULTS_DIR)/3_5_place_dp.odb
orfs_write_db $::env(RESULTS_DIR)/3_5_place_dp.odb
4 changes: 2 additions & 2 deletions flow/scripts/detail_route.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if { ![grt::have_routes] } {
}

if { $::env(SKIP_DETAILED_ROUTE) } {
write_db $::env(RESULTS_DIR)/5_2_route.odb
orfs_write_db $::env(RESULTS_DIR)/5_2_route.odb
exit
}

Expand Down Expand Up @@ -79,4 +79,4 @@ if { ![design_is_routed] } {

report_metrics 5 "detailed route"

write_db $::env(RESULTS_DIR)/5_2_route.odb
orfs_write_db $::env(RESULTS_DIR)/5_2_route.odb
2 changes: 1 addition & 1 deletion flow/scripts/fillcell.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if { [env_var_exists_and_non_empty FILL_CELLS] } {
log_cmd filler_placement $::env(FILL_CELLS)
check_placement

write_db $::env(RESULTS_DIR)/5_3_fillcell.odb
orfs_write_db $::env(RESULTS_DIR)/5_3_fillcell.odb
} else {
log_cmd exec cp $::env(RESULTS_DIR)/5_2_route.odb $::env(RESULTS_DIR)/5_3_fillcell.odb
}
2 changes: 1 addition & 1 deletion flow/scripts/final_report.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set_propagated_clock [all_clocks]
# Ensure all OR created (rsz/cts) instances are connected
global_connect

write_db $::env(RESULTS_DIR)/6_final.odb
orfs_write_db $::env(RESULTS_DIR)/6_final.odb

# Delete routing obstructions for final DEF
source $::env(SCRIPTS_DIR)/deleteRoutingObstructions.tcl
Expand Down
4 changes: 2 additions & 2 deletions flow/scripts/floorplan.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,5 @@ report_metrics 2 "floorplan final" false false
source_env_var_if_exists POST_FLOORPLAN_TCL
source_env_var_if_exists IO_CONSTRAINTS

write_db $::env(RESULTS_DIR)/2_1_floorplan.odb
write_sdc -no_timestamp $::env(RESULTS_DIR)/2_1_floorplan.sdc
orfs_write_db $::env(RESULTS_DIR)/2_1_floorplan.odb
orfs_write_sdc $::env(RESULTS_DIR)/2_1_floorplan.sdc
4 changes: 2 additions & 2 deletions flow/scripts/global_place.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ proc do_placement { global_placement_args } {

set result [catch { do_placement $global_placement_args } errMsg]
if { $result != 0 } {
write_db $::env(RESULTS_DIR)/3_3_place_gp-failed.odb
orfs_write_db $::env(RESULTS_DIR)/3_3_place_gp-failed.odb
error $errMsg
}

Expand All @@ -59,4 +59,4 @@ if { $::env(CLUSTER_FLOPS) } {

report_metrics 3 "global place" false false

write_db $::env(RESULTS_DIR)/3_3_place_gp.odb
orfs_write_db $::env(RESULTS_DIR)/3_3_place_gp.odb
2 changes: 1 addition & 1 deletion flow/scripts/global_place_skip_io.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ if { [env_var_exists_and_non_empty FLOORPLAN_DEF] } {
{*}[env_var_or_empty GLOBAL_PLACEMENT_ARGS]
}

write_db $::env(RESULTS_DIR)/3_1_place_gp_skip_io.odb
orfs_write_db $::env(RESULTS_DIR)/3_1_place_gp_skip_io.odb
10 changes: 5 additions & 5 deletions flow/scripts/global_route.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ proc global_route_helper { } {

if { $result != 0 } {
if { !$::env(GENERATE_ARTIFACTS_ON_FAILURE) } {
write_db $::env(RESULTS_DIR)/5_1_grt-failed.odb
orfs_write_db $::env(RESULTS_DIR)/5_1_grt-failed.odb
error $errMsg
}
write_sdc -no_timestamp $::env(RESULTS_DIR)/5_1_grt.sdc
write_db $::env(RESULTS_DIR)/5_1_grt.odb
orfs_write_sdc $::env(RESULTS_DIR)/5_1_grt.sdc
orfs_write_db $::env(RESULTS_DIR)/5_1_grt.odb
return
}

Expand Down Expand Up @@ -113,8 +113,8 @@ proc global_route_helper { } {
source [file join $::env(SCRIPTS_DIR) "write_ref_sdc.tcl"]

write_guides $::env(RESULTS_DIR)/route.guide
write_db $::env(RESULTS_DIR)/5_1_grt.odb
write_sdc -no_timestamp $::env(RESULTS_DIR)/5_1_grt.sdc
orfs_write_db $::env(RESULTS_DIR)/5_1_grt.odb
orfs_write_sdc $::env(RESULTS_DIR)/5_1_grt.sdc
}

global_route_helper
2 changes: 1 addition & 1 deletion flow/scripts/io_placement.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if {
-hor_layers $::env(IO_PLACER_H) \
-ver_layers $::env(IO_PLACER_V) \
{*}[env_var_or_empty PLACE_PINS_ARGS]
write_db $::env(RESULTS_DIR)/3_2_place_iop.odb
orfs_write_db $::env(RESULTS_DIR)/3_2_place_iop.odb
write_pin_placement $::env(RESULTS_DIR)/3_2_place_iop.tcl
} else {
log_cmd exec cp $::env(RESULTS_DIR)/3_1_place_gp_skip_io.odb $::env(RESULTS_DIR)/3_2_place_iop.odb
Expand Down
2 changes: 1 addition & 1 deletion flow/scripts/macro_place.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ load_design 2_1_floorplan.odb 2_1_floorplan.sdc

source $::env(SCRIPTS_DIR)/macro_place_util.tcl

write_db $::env(RESULTS_DIR)/2_2_floorplan_macro.odb
orfs_write_db $::env(RESULTS_DIR)/2_2_floorplan_macro.odb
write_macro_placement $::env(RESULTS_DIR)/2_2_floorplan_macro.tcl
2 changes: 1 addition & 1 deletion flow/scripts/pdn.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ foreach net [$block getNets] {
}
}

write_db $::env(RESULTS_DIR)/2_4_floorplan_pdn.odb
orfs_write_db $::env(RESULTS_DIR)/2_4_floorplan_pdn.odb
2 changes: 1 addition & 1 deletion flow/scripts/repair_timing_post_place.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ puts "Estimate parasitics"
estimate_parasitics -placement
report_metrics 3 "place repair timing" true false

write_db $::env(RESULTS_DIR)/3_6_place_repair_timing.odb
orfs_write_db $::env(RESULTS_DIR)/3_6_place_repair_timing.odb
2 changes: 1 addition & 1 deletion flow/scripts/resize.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ report_metrics 3 "resizer" true false
puts "Instance count before $instance_count_before, after [sta::network_leaf_instance_count]"
puts "Pin count before $pin_count_before, after [sta::network_leaf_pin_count]"

write_db $::env(RESULTS_DIR)/3_4_place_resized.odb
orfs_write_db $::env(RESULTS_DIR)/3_4_place_resized.odb
4 changes: 2 additions & 2 deletions flow/scripts/synth_odb.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ source $::env(SCRIPTS_DIR)/load.tcl
erase_non_stage_variables synth
load_design 1_2_yosys.v 1_2_yosys.sdc

write_db $::env(RESULTS_DIR)/1_synth.odb
orfs_write_db $::env(RESULTS_DIR)/1_synth.odb
# Canonicalize 1_synth.sdc. The original SDC_FILE provided by
# the user could have dependencies, such as sourcing util.tcl,
# which are read in here and a canonicalized version is written
# out by OpenSTA that has no dependencies.
write_sdc -no_timestamp $::env(RESULTS_DIR)/1_synth.sdc
orfs_write_sdc $::env(RESULTS_DIR)/1_synth.sdc
2 changes: 1 addition & 1 deletion flow/scripts/tapcell.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ if { [env_var_exists_and_non_empty TAPCELL_TCL] } {
cut_rows
}

write_db $::env(RESULTS_DIR)/2_3_floorplan_tapcell.odb
orfs_write_db $::env(RESULTS_DIR)/2_3_floorplan_tapcell.odb
16 changes: 15 additions & 1 deletion flow/scripts/util.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ proc find_macros { } {
}

proc erase_non_stage_variables { stage_name } {
if { [info exists ::env(KEEP_VARS)] && $::env(KEEP_VARS) == 1 } {
if { $::env(KEEP_VARS) } {
return
}
# "$::env(SCRIPTS_DIR)/stage_variables.py stage_name" returns list of
Expand Down Expand Up @@ -241,3 +241,17 @@ proc find_physical_only_masters { } {
}
return $physical_only_masters
}

proc orfs_write_db { output_file } {
if { !$::env(WRITE_ODB_AND_SDC_EACH_STAGE) } {
return
}
log_cmd write_db $output_file
}

proc orfs_write_sdc { output_file } {
if { !$::env(WRITE_ODB_AND_SDC_EACH_STAGE) } {
return
}
log_cmd write_sdc -no_timestamp $output_file
}
8 changes: 8 additions & 0 deletions flow/scripts/variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1237,5 +1237,13 @@ KEEP_VARS:
Feature toggle to keep intermediate variables during the flow.
This is useful for the single-run flow, where all stages of the flow
are run in a single OpenROAD instance.
default: 0
stages:
- All stages
WRITE_ODB_AND_SDC_EACH_STAGE:
description: >
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.
stages:
- All stages
default: 1