Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
12 changes: 10 additions & 2 deletions flow/scripts/cts.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ set_placement_padding -global \
-left $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT) \
-right $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT)

set result [catch { log_cmd detailed_placement } msg]
if { [env_var_exists_and_non_empty USE_NEGOTIATION] && $::env(USE_NEGOTIATION) } {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$::env(USE_NEGOTIATION) suffices

set result [catch { log_cmd detailed_placement -use_negotiation } msg]
} else {
set result [catch { log_cmd detailed_placement } msg]
}
if { $result != 0 } {
save_progress 4_1_error
error "Detailed placement failed in CTS: $msg"
Expand All @@ -70,7 +74,11 @@ if { !$::env(SKIP_CTS_REPAIR_TIMING) } {
run_lec_test 4_rsz 4_before_rsz_lec.v 4_after_rsz_lec.v
}

set result [catch { log_cmd detailed_placement } msg]
if { [env_var_exists_and_non_empty USE_NEGOTIATION] && $::env(USE_NEGOTIATION) } {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define/document USE_NEGOTIATION to variables.yaml

set result [catch { log_cmd detailed_placement -use_negotiation } msg]
} else {
set result [catch { log_cmd detailed_placement } msg]
}
if { $result != 0 } {
save_progress 4_1_error
error "Detailed placement failed in CTS: $msg"
Expand Down
6 changes: 5 additions & 1 deletion flow/scripts/detail_place.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ proc do_dpl { } {
set_placement_padding -global \
-left $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT) \
-right $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT)
log_cmd detailed_placement {*}[env_var_or_empty DETAIL_PLACEMENT_ARGS]
if { [env_var_exists_and_non_empty USE_NEGOTIATION] && $::env(USE_NEGOTIATION) } {
log_cmd detailed_placement -use_negotiation {*}[env_var_or_empty DETAIL_PLACEMENT_ARGS]
} else {
log_cmd detailed_placement {*}[env_var_or_empty DETAIL_PLACEMENT_ARGS]
}

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

This logic can be simplified by using the append_env_var helper to build the argument list. This avoids duplicating the log_cmd call and handles the environment variable check more cleanly.

  set dpl_args [env_var_or_empty DETAIL_PLACEMENT_ARGS]
  append_env_var dpl_args USE_NEGOTIATION -use_negotiation 0
  log_cmd detailed_placement {*}$dpl_args


if { $::env(ENABLE_DPO) } {
if { [env_var_exists_and_non_empty DPO_MAX_DISPLACEMENT] } {
Expand Down
12 changes: 10 additions & 2 deletions flow/scripts/global_route.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ proc global_route_helper { } {
# Running DPL to fix overlapped instances
# Run to get modified net by DPL
log_cmd global_route -start_incremental
log_cmd detailed_placement
if { [env_var_exists_and_non_empty USE_NEGOTIATION] && $::env(USE_NEGOTIATION) } {
log_cmd detailed_placement -use_negotiation
} else {
log_cmd detailed_placement
}
# Route only the modified net by DPL
log_cmd global_route -end_incremental {*}$res_aware \
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_design.rpt
Expand All @@ -80,7 +84,11 @@ proc global_route_helper { } {
# Running DPL to fix overlapped instances
# Run to get modified net by DPL
log_cmd global_route -start_incremental
log_cmd detailed_placement
if { [env_var_exists_and_non_empty USE_NEGOTIATION] && $::env(USE_NEGOTIATION) } {
log_cmd detailed_placement -use_negotiation
} else {
log_cmd detailed_placement
}
check_placement -verbose
# Route only the modified net by DPL
log_cmd global_route -end_incremental {*}$res_aware \
Expand Down