Skip to content
This repository was archived by the owner on Aug 23, 2024. It is now read-only.

Commit e5dfdc7

Browse files
authored
Merge pull request The-OpenROAD-Project#69 from The-OpenROAD-Project-staging/make-bypass-floorplan
flow: bypass scripts that do not do anything when certain flags are set
2 parents f47c361 + d6d3da0 commit e5dfdc7

File tree

4 files changed

+29
-22
lines changed

4 files changed

+29
-22
lines changed

flow/Makefile

+13
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,21 @@ $(RESULTS_DIR)/2_1_floorplan.def: $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synt
375375
# STEP 2: IO Placement (random)
376376
#-------------------------------------------------------------------------------
377377
$(RESULTS_DIR)/2_2_floorplan_io.def: $(RESULTS_DIR)/2_1_floorplan.def $(IO_CONSTRAINTS)
378+
ifeq ($(FOOTPRINT),)
378379
($(TIME_CMD) $(OPENROAD_CMD) $(SCRIPTS_DIR)/io_placement_random.tcl -metrics $(LOG_DIR)/2_2_floorplan_io.json) 2>&1 | tee $(LOG_DIR)/2_2_floorplan_io.log
380+
else
381+
cp $< $@
382+
endif
379383

380384
# STEP 3: Timing Driven Mixed Sized Placement
381385
#-------------------------------------------------------------------------------
382386
$(RESULTS_DIR)/2_3_floorplan_tdms.def: $(RESULTS_DIR)/2_2_floorplan_io.def $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(LIB_FILES)
387+
ifeq ($(MACRO_PLACEMENT),)
383388
($(TIME_CMD) $(OPENROAD_CMD) $(SCRIPTS_DIR)/tdms_place.tcl -metrics $(LOG_DIR)/2_3_tdms.json) 2>&1 | tee $(LOG_DIR)/2_3_tdms_place.log
389+
else
390+
$(info [INFO][FLOW] Using manual macro placement file $(MACRO_PLACEMENT))
391+
cp $< $@
392+
endif
384393

385394
# STEP 4: Macro Placement
386395
#-------------------------------------------------------------------------------
@@ -428,7 +437,11 @@ $(RESULTS_DIR)/3_1_place_gp.def: $(RESULTS_DIR)/2_floorplan.def $(RESULTS_DIR)/2
428437
# STEP 2: IO placement (non-random)
429438
#-------------------------------------------------------------------------------
430439
$(RESULTS_DIR)/3_2_place_iop.def: $(RESULTS_DIR)/3_1_place_gp.def $(IO_CONSTRAINTS)
440+
ifeq ($(FOOTPRINT),)
431441
($(TIME_CMD) $(OPENROAD_CMD) $(SCRIPTS_DIR)/io_placement.tcl -metrics $(LOG_DIR)/3_2_place_iop.json) 2>&1 | tee $(LOG_DIR)/3_2_place_iop.log
442+
else
443+
cp $< $@
444+
endif
432445

433446
# STEP 3: Resizing & Buffering
434447
#-------------------------------------------------------------------------------

flow/scripts/io_placement.tcl

+5-7
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ if {![info exists standalone] || $standalone} {
1919
puts "Starting io placement"
2020
}
2121

22-
if {![info exists ::env(FOOTPRINT)]} {
23-
if {[info exists ::env(IO_CONSTRAINTS)]} {
24-
source $::env(IO_CONSTRAINTS)
25-
}
26-
place_pins -hor_layer $::env(IO_PLACER_H) \
27-
-ver_layer $::env(IO_PLACER_V) \
28-
{*}$::env(PLACE_PINS_ARGS)
22+
if {[info exists ::env(IO_CONSTRAINTS)]} {
23+
source $::env(IO_CONSTRAINTS)
2924
}
25+
place_pins -hor_layer $::env(IO_PLACER_H) \
26+
-ver_layer $::env(IO_PLACER_V) \
27+
{*}$::env(PLACE_PINS_ARGS)
3028

3129
if {![info exists standalone] || $standalone} {
3230
# write output

flow/scripts/io_placement_random.tcl

+6-8
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ if {![info exists standalone] || $standalone} {
1919
puts "Starting random IO placement"
2020
}
2121

22-
if {![info exists ::env(FOOTPRINT)]} {
23-
if {[info exists ::env(IO_CONSTRAINTS)]} {
24-
source $::env(IO_CONSTRAINTS)
25-
}
26-
place_pins -hor_layer $::env(IO_PLACER_H) \
27-
-ver_layer $::env(IO_PLACER_V) \
28-
-random \
29-
{*}$::env(PLACE_PINS_ARGS)
22+
if {[info exists ::env(IO_CONSTRAINTS)]} {
23+
source $::env(IO_CONSTRAINTS)
3024
}
25+
place_pins -hor_layer $::env(IO_PLACER_H) \
26+
-ver_layer $::env(IO_PLACER_V) \
27+
-random \
28+
{*}$::env(PLACE_PINS_ARGS)
3129

3230
if {![info exists standalone] || $standalone} {
3331
# write output

flow/scripts/tdms_place.tcl

+5-7
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,12 @@ proc find_macros {} {
4343
source $::env(PLATFORM_DIR)/setRC.tcl
4444
set_dont_use $::env(DONT_USE_CELLS)
4545

46-
if {[info exists ::env(MACRO_PLACEMENT)]} {
47-
puts "\[INFO\]\[FLOW-xxxx\] Using manual macro placement file $::env(MACRO_PLACEMENT)"
48-
} elseif {[find_macros] != ""} {
49-
global_placement -density $::env(PLACE_DENSITY) \
50-
-pad_left $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT) \
51-
-pad_right $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT)
46+
if {[find_macros] != ""} {
47+
global_placement -density $::env(PLACE_DENSITY) \
48+
-pad_left $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT) \
49+
-pad_right $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT)
5250
} else {
53-
puts "No macros found: Skipping global_placement"
51+
puts "No macros found: Skipping global_placement"
5452
}
5553

5654

0 commit comments

Comments
 (0)