Skip to content

Instantly share code, notes, and snippets.

@imrickysu
Created January 22, 2017 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imrickysu/47c0aca3a4f250cee381af377de95190 to your computer and use it in GitHub Desktop.
Save imrickysu/47c0aca3a4f250cee381af377de95190 to your computer and use it in GitHub Desktop.
Export Hardware for a generic Vivado project without using specific project paths
# Export Hardware
set project_name [get_property NAME [current_project ]]
set project_path [get_property DIRECTORY [current_project ]]
set sdk_name [append project_name ".sdk"]
set sdk_path [file join $project_path $sdk_name]
set top_name [get_property TOP [current_fileset]]
if {![file exists $sdk_path]} {
file mkdir $sdk_path
}
write_hwdef -force -file ${sdk_path}/${top_name}.hdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment