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
30 changes: 18 additions & 12 deletions flow/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,29 @@ include $(DESIGN_CONFIG)

export DESIGN_DIR ?= $(dir $(DESIGN_CONFIG))

# default value "base" is duplicated from variables.yaml because we need it
# default value "base" for FLOW_VARIANT and "." for WORK_HOME are duplicated
# from variables.yaml and variables.mk because we need it
# earlier in the flow for BLOCKS. BLOCKS is a feature specific to the
# ORFS Makefile.
export FLOW_VARIANT?=base
export WORK_HOME?=.
# BLOCKS is a ORFS make flow specific feature.
ifneq ($(BLOCKS),)
# Normally this comes from variables.yaml, but we need it here to set up these variables
# which are part of the DESIGN_CONFIG. BLOCKS is a Makefile specific concept.
$(foreach block,$(BLOCKS),$(eval BLOCK_LEFS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lef))
$(foreach block,$(BLOCKS),$(eval BLOCK_LIBS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lib))
$(foreach block,$(BLOCKS),$(eval BLOCK_GDS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/6_final.gds))
$(foreach block,$(BLOCKS),$(eval BLOCK_CDL += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/6_final.cdl))
$(foreach block,$(BLOCKS),$(eval BLOCK_LOG_FOLDERS += ./logs/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/))
$(foreach block,$(BLOCKS),$(eval BLOCK_LEFS += $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lef))
$(foreach block,$(BLOCKS),$(eval BLOCK_TYP_LIBS += $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}_typ.lib))
$(foreach block,$(BLOCKS),$(eval BLOCK_FAST_LIBS += $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}_fast.lib))
$(foreach block,$(BLOCKS),$(eval BLOCK_SLOW_LIBS += $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}_slow.lib))
$(foreach block,$(BLOCKS),$(eval BLOCK_GDS += $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/6_final.gds))
$(foreach block,$(BLOCKS),$(eval BLOCK_CDL += $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/6_final.cdl))
$(foreach block,$(BLOCKS),$(eval BLOCK_LOG_FOLDERS += $(WORK_HOME)/logs/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/))
export ADDITIONAL_LEFS += $(BLOCK_LEFS)
export ADDITIONAL_LIBS += $(BLOCK_LIBS)
export ADDITIONAL_LIBS += $(BLOCK_TYP_LIBS)
export ADDITIONAL_TYP_LIBS += $(BLOCK_TYP_LIBS)
export ADDITIONAL_FAST_LIBS += $(BLOCK_FAST_LIBS)
export ADDITIONAL_SLOW_LIBS += $(BLOCK_SLOW_LIBS)
export ADDITIONAL_GDS += $(BLOCK_GDS)
export GDS_FILES += $(BLOCK_GDS)
ifneq ($(CDL_FILES),)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@maliberty Isn't this a standalone bugfix? Split out into separate PR?

I'm not very familiar with the gds part of the flow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, platforms should set GDS_FILES and use ADDITIONAL_GDS.

export CDL_FILES += $(BLOCK_CDL)
endif
Expand Down Expand Up @@ -168,10 +174,10 @@ endef

# Targets to harden Blocks in case of hierarchical flow is triggered
.PHONY: build_macros
build_macros: $(BLOCK_LEFS) $(BLOCK_LIBS)
build_macros: $(BLOCK_LEFS) $(BLOCK_TYP_LIBS)

$(foreach block,$(BLOCKS),$(eval $(call GENERATE_ABSTRACT_RULE,./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lef,./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lib,$(shell dirname $(DESIGN_CONFIG))/${block}/config.mk)))
$(foreach block,$(BLOCKS),$(eval ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/6_final.gds: ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lef))
$(foreach block,$(BLOCKS),$(eval $(call GENERATE_ABSTRACT_RULE,$(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lef,$(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}_typ.lib,$(shell dirname $(DESIGN_CONFIG))/${block}/config.mk)))
$(foreach block,$(BLOCKS),$(eval $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/6_final.gds: $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lef))

# Utility to print tool version information
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -765,7 +771,7 @@ clean_all: clean_synth clean_floorplan clean_place clean_cts clean_route clean_f

.PHONY: nuke
nuke: clean_test clean_issues
rm -rf ./results ./logs ./reports ./objects
rm -rf $(WORK_HOME)/results $(WORK_HOME)/logs $(WORK_HOME)/reports $(WORK_HOME)/objects
rm -rf layer_*.mps macrocell.list *best.plt *_pdn.def
rm -rf *.rpt *.rpt.old *.def.v pin_dumper.log
rm -f $(OBJECTS_DIR)/versions.txt $(OBJECTS_DIR)/copyright.txt dummy.guide
Expand Down
10 changes: 9 additions & 1 deletion flow/scripts/generate_abstract.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ if {$design_stage >= 4} {
# write_timing_model includes the source latency in the model
set_clock_latency -source 0 [all_clocks]
puts "Generating abstract views"
log_cmd write_timing_model $::env(RESULTS_DIR)/$::env(DESIGN_NAME).lib
if {[env_var_exists_and_non_empty CORNERS]} {
# corners
foreach corner $::env(CORNERS) {
log_cmd write_timing_model -corner $corner $::env(RESULTS_DIR)/$::env(DESIGN_NAME)_$corner.lib
}
unset corner
} else {
log_cmd write_timing_model $::env(RESULTS_DIR)/$::env(DESIGN_NAME)_typ.lib
}
log_cmd write_abstract_lef -bloat_occupied_layers $::env(RESULTS_DIR)/$::env(DESIGN_NAME).lef

if {[env_var_exists_and_non_empty CDL_FILES]} {
Expand Down
3 changes: 1 addition & 2 deletions flow/scripts/variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ export DESIGN_NICKNAME?=$(DESIGN_NAME)
# Setup variables to point to other location for the following sub directory
# - designs - default is under current directory
# - platforms - default is under current directory
# - work home - default is current directory
# - utils, scripts, test - default is under current directory
export DESIGN_HOME ?= $(FLOW_HOME)/designs
export PLATFORM_HOME ?= $(FLOW_HOME)/platforms
export WORK_HOME ?= .
# WORK_HOME is set up in flow/Makefile
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I'm removing this comment in a followup PR. This is a comment left in place for a deleted line. Several variables are defined in flow/Makefile, WORK_HOME is not special in that regard.


export UTILS_DIR ?= $(FLOW_HOME)/util
export SCRIPTS_DIR ?= $(FLOW_HOME)/scripts
Expand Down