Skip to content

Commit 5eb5e34

Browse files
committed
simplify code
Signed-off-by: Jack Luar <[email protected]>
1 parent 2a5ee40 commit 5eb5e34

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

flow/scripts/global_place.tcl

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,17 @@ if { $::env(GPL_TIMING_DRIVEN) } {
3434
}
3535

3636
# Parameters for phi coefficients in global placement
37-
# Validate phi coefficient constraints before using them
38-
if {
39-
[info exists ::env(MIN_PLACE_STEP_COEF)]
40-
&& [info exists ::env(MAX_PLACE_STEP_COEF)]
41-
} {
42-
set min_phi $::env(MIN_PLACE_STEP_COEF)
43-
set max_phi $::env(MAX_PLACE_STEP_COEF)
44-
45-
if { $min_phi > $max_phi } {
46-
utl::error GPL 200 \
47-
"MIN_PLACE_STEP_COEF ($min_phi) cannot be greater than \
48-
MAX_PLACE_STEP_COEF ($max_phi)"
49-
}
50-
}
37+
set min_phi $::env(MIN_PLACE_STEP_COEF)
38+
set max_phi $::env(MAX_PLACE_STEP_COEF)
5139

52-
if { [info exists ::env(MIN_PLACE_STEP_COEF)] } {
53-
lappend global_placement_args -min_phi_coef $::env(MIN_PLACE_STEP_COEF)
40+
if { $min_phi > $max_phi } {
41+
utl::error GPL 200 \
42+
"MIN_PLACE_STEP_COEF ($min_phi) cannot be greater than \
43+
MAX_PLACE_STEP_COEF ($max_phi)"
5444
}
5545

56-
if { [info exists ::env(MAX_PLACE_STEP_COEF)] } {
57-
lappend global_placement_args -max_phi_coef $::env(MAX_PLACE_STEP_COEF)
58-
}
46+
lappend global_placement_args -min_phi_coef $::env(MIN_PLACE_STEP_COEF)
47+
lappend global_placement_args -max_phi_coef $::env(MAX_PLACE_STEP_COEF)
5948

6049
proc do_placement { global_placement_args } {
6150
set all_args [concat [list -density [place_density_with_lb_addon] \

0 commit comments

Comments
 (0)