Skip to content

Commit 010a2fa

Browse files
committed
makefile: introduce do-stage targets
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 9c494f3 commit 010a2fa

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

flow/Makefile

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,12 @@ UNSET_AND_MAKE = @bash -c 'for var in $(ISSUE_VARIABLES_NAMES); do unset $$var;
460460
#
461461
# A "do-synth" step would be welcomed, but it isn't strictly necessary
462462
# for the Bazel use-case.
463+
#
464+
# do-floorplan, do-place, do-cts, do-route, do-finish are the
465+
# supported interface to execute those stages without checking
466+
# for dependencies.
467+
#
468+
# The do- substeps of each of these stages are subject to change.
463469
define do-step
464470
$(if $(5),$(5),$(RESULTS_DIR))/$(1)$(if $(4),$(4),.odb): $(2)
465471
$$(UNSET_AND_MAKE) do-$(1)
@@ -471,10 +477,10 @@ endef
471477

472478
define do-copy
473479
$(RESULTS_DIR)/$(1)$(if $(4),$(4),.odb): $(RESULTS_DIR)/$(2) $(3)
474-
$$(UNSET_AND_MAKE) do-$(1)$(if $(4),$(4),.odb)
480+
$$(UNSET_AND_MAKE) do-$(1)$(if $(4),$(4),)
475481

476-
.PHONY: do-$(1)$(if $(4),$(4),.odb)
477-
do-$(1)$(if $(4),$(4),.odb):
482+
.PHONY: do-$(1)$(if $(4),$(4),)
483+
do-$(1)$(if $(4),$(4),):
478484
cp $(RESULTS_DIR)/$(2) $(RESULTS_DIR)/$(1)$(if $(4),$(4),.odb)
479485
endef
480486

@@ -515,6 +521,9 @@ $(eval $(call do-copy,2_floorplan,2_6_floorplan_pdn.odb,))
515521

516522
$(RESULTS_DIR)/2_floorplan.sdc: $(RESULTS_DIR)/2_1_floorplan.odb
517523

524+
.PHONY: do-floorplan
525+
do-floorplan:
526+
$(UNSET_AND_MAKE) do-2_1_floorplan do-2_2_floorplan_io do-2_3_floorplan_tdms do-2_4_floorplan_macro do-2_5_floorplan_tapcell do-2_6_floorplan_pdn do-2_floorplan
518527

519528
.PHONY: clean_floorplan
520529
clean_floorplan:
@@ -565,6 +574,10 @@ $(eval $(call do-copy,3_place,3_5_place_dp.odb,))
565574

566575
$(eval $(call do-copy,3_place,2_floorplan.sdc,,.sdc))
567576

577+
.PHONY: do-place
578+
do-place:
579+
$(UNSET_AND_MAKE) do-3_1_place_gp_skip_io do-3_2_place_iop do-3_3_place_gp do-3_4_place_resized do-3_5_place_dp do-3_place do-3_place.sdc
580+
568581
# Clean Targets
569582
#-------------------------------------------------------------------------------
570583
.PHONY: clean_place
@@ -600,6 +613,10 @@ $(RESULTS_DIR)/4_cts.sdc: $(RESULTS_DIR)/4_cts.odb
600613

601614
$(eval $(call do-copy,4_cts,4_2_cts_fillcell.odb))
602615

616+
.PHONY: do-cts
617+
do-cts:
618+
$(UNSET_AND_MAKE) do-4_1_cts do-4_2_cts_fillcell do-4_cts
619+
603620
.PHONY: clean_cts
604621
clean_cts:
605622
rm -rf $(RESULTS_DIR)/4_*cts*.odb $(RESULTS_DIR)/4_cts.sdc $(RESULTS_DIR)/4_*.v $(RESULTS_DIR)/4_*.def
@@ -636,6 +653,10 @@ $(eval $(call do-copy,5_route,5_2_route.odb))
636653

637654
$(eval $(call do-copy,5_route,4_cts.sdc,,.sdc))
638655

656+
.PHONY: do-route
657+
do-route:
658+
$(UNSET_AND_MAKE) do-5_1_grt do-5_2_route do-5_route do-5_route.sdc
659+
639660
$(RESULTS_DIR)/5_route.v:
640661
@export OR_DB=5_route ;\
641662
$(OPENROAD_CMD) ./scripts/write_verilog.tcl
@@ -701,6 +722,10 @@ $(eval $(call do-step,6_report,$(RESULTS_DIR)/6_1_fill.odb $(RESULTS_DIR)/6_1_fi
701722

702723
$(RESULTS_DIR)/6_final.def: $(LOG_DIR)/6_report.log
703724

725+
# NOTE! No GDS file for now
726+
.PHONY: do-finish
727+
do-finish:
728+
$(UNSET_AND_MAKE) do-6_1_fill do-6_1_fill.sdc do-6_final.sdc do-6_report elapsed
704729

705730
# Skipping resize can be useful for mock abstracts
706731
.PHONY: skip_resize

0 commit comments

Comments
 (0)