From 5dd9cdcdea9b968071483150a2d5ddd6b89aac9c Mon Sep 17 00:00:00 2001 From: Laszlo Nagy Date: Fri, 12 Apr 2019 13:09:06 +0100 Subject: [PATCH] scripts: Add common IP cache location for OOC mode Using a common IP cache location for all the project will speed up compile time of common blocks used in base designs. Example a MicroBlaze core for VCU118 once compiled it will be reused on other projects. Using a common IP cache will speed up re-compiles of every project in OOC mode since the cache won't be cleared as with normal compile flow. --- .gitignore | 1 + Makefile | 8 ++++++-- projects/scripts/adi_project.tcl | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 095c21015..2c8a12ca0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +ipcache *.ip_user_files *.cache *.data diff --git a/Makefile b/Makefile index 4d2d0434d..d830132db 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ SUBPROJECTS := $(foreach projname,$(PROJECTS), \ $(foreach archname,$(notdir $(subst /Makefile,,$(wildcard projects/$(projname)/*/Makefile))), \ $(projname).$(archname))) -.PHONY: lib all clean clean-all $(SUBPROJECTS) +.PHONY: lib all clean clean-ipcache clean-all $(SUBPROJECTS) $(SUBPROJECTS): $(MAKE) -C projects/$(subst .,/,$@) @@ -41,8 +41,12 @@ all: clean: $(MAKE) -C projects/ clean +clean-ipcache: + $(call clean, \ + ipcache, \ + $(HL)IP Cache$(NC)) -clean-all:clean +clean-all:clean clean-ipcache $(MAKE) -C projects/ clean $(MAKE) -C library/ clean diff --git a/projects/scripts/adi_project.tcl b/projects/scripts/adi_project.tcl index 68946d220..b7ec6cd80 100644 --- a/projects/scripts/adi_project.tcl +++ b/projects/scripts/adi_project.tcl @@ -122,6 +122,14 @@ proc adi_project_xilinx {project_name {mode 0}} { lappend lib_dirs $ad_phdl_dir/library } + # Set a common IP cache for all projects + if {$ADI_USE_OOC_SYNTHESIS == 1} { + if {[file exists $ad_hdl_dir/ipcache] == 0} { + file mkdir $ad_hdl_dir/ipcache + } + config_ip_cache -import_from_project -use_cache_location $ad_hdl_dir/ipcache + } + set_property ip_repo_paths $lib_dirs [current_fileset] update_ip_catalog