scripts: Support for incremental compilation
The scripts are looking for a previous run result, a routed design checkpoint to use it as a reference during the incremental build flow. Before clearing the project files, the scrips will save the reference dcp file in the project folder. If the reference dcp does not exists the build continues normally. Proposed workflow: 1. Build your project normally with 'make' or place manually a reference.dcp file in the Vivado project folder. 2. Do some minor modifications 3. Run the make with the following option: make MODE=incr 4. Repeat steps 2-3main
parent
5b13e205b9
commit
525c068993
|
@ -1,5 +1,6 @@
|
|||
ipcache
|
||||
*.ip_user_files
|
||||
*.dcp
|
||||
*.cache
|
||||
*.data
|
||||
*.xpr
|
||||
|
|
|
@ -22,6 +22,8 @@ if {[info exists ::env(ADI_USE_OOC_SYNTHESIS)]} {
|
|||
set ADI_USE_OOC_SYNTHESIS 0
|
||||
}
|
||||
|
||||
set ADI_USE_INCR_COMP 1
|
||||
|
||||
set p_board "not-applicable"
|
||||
set p_device "none"
|
||||
set sys_zynq 1
|
||||
|
@ -37,6 +39,7 @@ proc adi_project_xilinx {project_name {mode 0}} {
|
|||
global REQUIRED_VIVADO_VERSION
|
||||
global IGNORE_VERSION_CHECK
|
||||
global ADI_USE_OOC_SYNTHESIS
|
||||
global ADI_USE_INCR_COMP
|
||||
|
||||
if [regexp "_ac701$" $project_name] {
|
||||
set p_device "xc7a200tfbg676-2"
|
||||
|
@ -165,6 +168,13 @@ proc adi_project_xilinx {project_name {mode 0}} {
|
|||
} else {
|
||||
write_hwdef -file "$project_name.data/$project_name.hwdef"
|
||||
}
|
||||
|
||||
if {$ADI_USE_INCR_COMP == 1} {
|
||||
if {[file exists ./reference.dcp]} {
|
||||
set_property incremental_checkpoint ./reference.dcp [get_runs impl_1]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
proc adi_project_files {project_name project_files} {
|
||||
|
|
|
@ -33,13 +33,15 @@ M_DEPS += $(wildcard system_constr.xdc) # Not all projects have this file
|
|||
M_DEPS += $(HDL_PROJECT_PATH)scripts/adi_project.tcl
|
||||
M_DEPS += $(HDL_PROJECT_PATH)scripts/adi_env.tcl
|
||||
M_DEPS += $(HDL_PROJECT_PATH)scripts/adi_board.tcl
|
||||
M_DEPS += prepare_incremental_compile
|
||||
|
||||
M_DEPS += $(foreach dep,$(LIB_DEPS),$(HDL_LIBRARY_PATH)$(dep)/component.xml)
|
||||
|
||||
.PHONY: all lib clean clean-all
|
||||
.PHONY: all lib clean clean-all prepare_incremental_compile
|
||||
all: lib $(PROJECT_NAME).sdk/system_top.hdf
|
||||
|
||||
clean:
|
||||
-rm -f reference.dcp
|
||||
$(call clean, \
|
||||
$(CLEAN_TARGET), \
|
||||
$(HL)$(PROJECT_NAME)$(NC) project)
|
||||
|
@ -49,6 +51,19 @@ clean-all: clean
|
|||
$(MAKE) -C $(HDL_LIBRARY_PATH)$${lib} clean; \
|
||||
done
|
||||
|
||||
MODE ?= "default"
|
||||
|
||||
prepare_incremental_compile:
|
||||
@if [ $(MODE) = incr ]; then \
|
||||
if [ -f */impl_1/system_top_routed.dcp ]; then \
|
||||
echo Found previous run result at `ls */impl_1/system_top_routed.dcp`; \
|
||||
cp -u */impl_1/system_top_routed.dcp ./reference.dcp ; \
|
||||
fi; \
|
||||
if [ -f ./reference.dcp ]; then \
|
||||
echo Using reference checkpoint for incremental compilation; \
|
||||
fi; \
|
||||
fi;
|
||||
|
||||
$(PROJECT_NAME).sdk/system_top.hdf: $(M_DEPS)
|
||||
-rm -rf $(CLEAN_TARGET)
|
||||
$(call build, \
|
||||
|
|
Loading…
Reference in New Issue