diff --git a/vitis/hls/build.tcl b/vitis/hls/build.tcl index 4ac138f6..e254aed1 100644 --- a/vitis/hls/build.tcl +++ b/vitis/hls/build.tcl @@ -32,6 +32,13 @@ set TOP [get_top] # Get the directives source ${PROJ_DIR}/directives.tcl +# Generate the description string for the ip catalog export +if { $::env(GIT_HASH_SHORT) == 0 } { + set description "$::env(BUILD_STRING), Githash=dirty" +} else { + set description "$::env(BUILD_STRING), Githash=$::env(GIT_HASH_SHORT)" +} + ############################################################################## # Run C/C++ simulation testbed ############################################################################## @@ -77,7 +84,7 @@ if { $::env(SKIP_COSIM) == 0 } { ############################################################################## set retVal [catch { \ export_design \ - -description "$::env(BUILD_STRING), Githash=$::env(GIT_HASH_SHORT)" \ + -description ${description} \ -display_name ${TOP} \ -format ip_catalog \ -ipname ${TOP} \ diff --git a/vitis/hls/proc.tcl b/vitis/hls/proc.tcl index 7c569b5d..cc7c1405 100644 --- a/vitis/hls/proc.tcl +++ b/vitis/hls/proc.tcl @@ -116,3 +116,29 @@ proc ComponentXmlAllFamilySupport { } { # Compress the modify IP directory to the target's image directory exec bash -c "cd $::env(OUT_DIR)/ip; zip -r $::env(PROJ_DIR)/ip/$::env(IMAGENAME).zip *" } + +## Open sources.tcl file +proc loadSourcesTcl { filePath {flags ""} } { + puts "loadSourcesTcl: ${filePath} ${flags}" + # Make a local copy of global variable + set LOC_PATH $::DIR_PATH + # Make a local copy of global variable + set ::DIR_PATH ${filePath} + # Open the TCL file + if { [file exists ${filePath}/sources.tcl] == 1 } { + if { ${flags} == "debug" } { + source ${filePath}/sources.tcl + } else { + source ${filePath}/sources.tcl -notrace + } + } else { + puts "\n\n\n\n\n********************************************************" + puts "loadSourcesTcl: ${filePath}/sources.tcl doesn't exist" + puts "********************************************************\n\n\n\n\n" + exit -1 + } + # Revert the global variable back to orginal value + set ::DIR_PATH ${LOC_PATH} + # Keep a history of all the load paths + set ::DIR_LIST "$::DIR_LIST ${filePath}" +} diff --git a/vivado/run/pre/synth.tcl b/vivado/run/pre/synth.tcl index 6381b91e..d48fa4ca 100644 --- a/vivado/run/pre/synth.tcl +++ b/vivado/run/pre/synth.tcl @@ -18,8 +18,10 @@ source -quiet $::env(RUCKUS_DIR)/vivado/env_var.tcl source -quiet $::env(RUCKUS_DIR)/vivado/proc.tcl source -quiet $::env(RUCKUS_DIR)/vivado/messages.tcl -# Refer to http://www.xilinx.com/support/answers/65415.html -set_param synth.elaboration.rodinMoreOptions {rt::set_parameter ignoreVhdlAssertStmts false} +if { $::env(VIVADO_VERSION) < 2016.1 } { + # Refer to http://www.xilinx.com/support/answers/65415.html + set_param synth.elaboration.rodinMoreOptions {rt::set_parameter ignoreVhdlAssertStmts false} +} # Target specific script SourceTclFile ${VIVADO_DIR}/pre_synth_run.tcl