diff options
author | Max Köhler <max.koehler@ni.com> | 2020-06-15 13:14:02 +0200 |
---|---|---|
committer | Wade Fife <wade.fife@ettus.com> | 2020-06-15 13:54:35 -0500 |
commit | f17a5113e228ac1bc5312193eb8f687e127184a3 (patch) | |
tree | b0e223a7bd8e9b5a207b060aeaf60c9e74390997 /fpga/usrp3/tools/make | |
parent | 06452806dcbb9721078e5951ffba13e5cb71ec86 (diff) | |
download | uhd-f17a5113e228ac1bc5312193eb8f687e127184a3.tar.gz uhd-f17a5113e228ac1bc5312193eb8f687e127184a3.tar.bz2 uhd-f17a5113e228ac1bc5312193eb8f687e127184a3.zip |
fpga: tools: remove temporary Xilinx directories for BD recreation
During recreation of block diagrams any RTL modules will be kept in
hidden directories within the build directory. Updates of the RTL
sources might not be taken into account. Solution is to remove Xilinx's
hidden project directories before calling vivado.
Diffstat (limited to 'fpga/usrp3/tools/make')
-rw-r--r-- | fpga/usrp3/tools/make/viv_ip_builder.mak | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/fpga/usrp3/tools/make/viv_ip_builder.mak b/fpga/usrp3/tools/make/viv_ip_builder.mak index 2663b5862..c30484d17 100644 --- a/fpga/usrp3/tools/make/viv_ip_builder.mak +++ b/fpga/usrp3/tools/make/viv_ip_builder.mak @@ -16,7 +16,7 @@ endif # $4 = IP_SRC_DIR (Absolute path to the top level ip src dir) # $5 = IP_BUILD_DIR (Absolute path to the top level ip build dir) # $6 = GENERATE_EXAMPLE (0 or 1) -# Prereqs: +# Prereqs: # - TOOLS_DIR must be defined globally # ------------------------------------------------------------------- BUILD_VIVADO_IP = \ @@ -29,7 +29,8 @@ BUILD_VIVADO_IP = \ export GEN_EXAMPLE=$(6); \ export SYNTH_IP=$(SYNTH_IP); \ echo "BUILDER: Staging IP in build directory..."; \ - rm -rf $(5)/$(1)/*; \ + rm -rf $(5)/$(1); \ + mkdir -p $(5)/$(1); \ $(TOOLS_DIR)/scripts/shared-ip-loc-manage.sh --path=$(5)/$(1) reserve; \ cp -rf $(4)/$(1)/* $(5)/$(1); \ echo "BUILDER: Retargeting IP to part $(2)/$(3)..."; \ @@ -48,7 +49,7 @@ BUILD_VIVADO_IP = \ # $3 = PART_ID (<device>/<package>/<speedgrade>[/<tempgrade>[/<silicon revision>]]) # $4 = BD_SRC_DIR (Absolute path to the top level ip src dir) # $5 = BD_BUILD_DIR (Absolute path to the top level ip build dir) -# Prereqs: +# Prereqs: # - TOOLS_DIR must be defined globally # ------------------------------------------------------------------- BUILD_VIVADO_BD = \ @@ -59,15 +60,16 @@ BUILD_VIVADO_BD = \ export BD_FILE=$(call RESOLVE_PATH,$(5)/$(1)/$(1).bd); \ export PART_NAME=`python $(TOOLS_DIR)/scripts/viv_gen_part_id.py $(2)/$(3)`; \ echo "BUILDER: Staging BD in build directory..."; \ - rm $(5)/$(1)/* -rf; \ + rm -rf $(5)/$(1); \ + mkdir -p $(5)/$(1); \ $(TOOLS_DIR)/scripts/shared-ip-loc-manage.sh --path=$(5)/$(1) reserve; \ - cp -rf $(4)/$(1)/* $(5)/$(1); \ + cp -rf $(4)/$(1)/* $(5)/$(1); \ echo "BUILDER: Retargeting BD to part $(2)/$(3)..."; \ cd $(5)/$(1); \ echo "BUILDER: Building BD..."; \ export VIV_ERR=0; \ $(TOOLS_DIR)/scripts/launch_vivado.py -mode batch -source $(call RESOLVE_PATH,$(TOOLS_DIR)/scripts/viv_generate_bd.tcl) -log $(1).log -nojournal || export VIV_ERR=$$?; \ - $(TOOLS_DIR)/scripts/shared-ip-loc-manage.sh --path=$(5)/$(1) release; \ + $(TOOLS_DIR)/scripts/shared-ip-loc-manage.sh --path=$(5)/$(1) release; \ exit $$VIV_ERR # ------------------------------------------------------------------- @@ -79,7 +81,7 @@ BUILD_VIVADO_BD = \ # $5 = BDTCL_BUILD_DIR (Absolute path to the top level ip build dir) # $6 = BD_IP_REPOS (space-separated list of absolute paths to IP repos) # $7 = BD_HDL_SRCS (space-separated list of absolute paths to HDL sources) -# Prereqs: +# Prereqs: # - TOOLS_DIR must be defined globally # ------------------------------------------------------------------- BUILD_VIVADO_BDTCL = \ @@ -92,13 +94,14 @@ BUILD_VIVADO_BDTCL = \ export BD_IP_REPOS=$(call RESOLVE_PATH,$(6)); \ export BD_HDL_SRCS=$(call RESOLVE_PATHS,$(7)); \ echo "BUILDER: Staging BD Tcl in build directory..."; \ - rm $(5)/$(1)/* -rf; \ + rm -rf $(5)/$(1); \ + mkdir -p $(5)/$(1); \ $(TOOLS_DIR)/scripts/shared-ip-loc-manage.sh --path=$(5)/$(1) reserve; \ - cp -rf $(4)/$(1)/* $(5)/$(1); \ + cp -rf $(4)/$(1)/* $(5)/$(1); \ echo "BUILDER: Retargeting BD to part $(2)/$(3)..."; \ cd $(5)/$(1); \ echo "BUILDER: Generating BD..."; \ export VIV_ERR=0; \ $(TOOLS_DIR)/scripts/launch_vivado.py -mode batch -source $(call RESOLVE_PATH,$(TOOLS_DIR)/scripts/viv_generate_bd.tcl) -log $(1).log -nojournal || export VIV_ERR=$$?; \ - $(TOOLS_DIR)/scripts/shared-ip-loc-manage.sh --path=$(5)/$(1) release; \ + $(TOOLS_DIR)/scripts/shared-ip-loc-manage.sh --path=$(5)/$(1) release; \ exit $$VIV_ERR |