Created
May 12, 2014 02:03
-
-
Save swetland/d79f7cd943e76cfd9127 to your computer and use it in GitHub Desktop.
vivado: refresh user ip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This assumes that your local IP cores are all in the "user" library | |
# and that they all live in ip/$name relative to your project directory | |
# (where myproject.xpr lives) | |
# load an IP core and bump its version number by 1 | |
proc bump_ip_version { path } { | |
set fname "${path}/component.xml" | |
set core [ipx::open_core -set_current false $fname] | |
set version [get_property VERSION $core] | |
set parts [split $version "."] | |
lset parts end [expr [lindex $parts end] + 1] | |
set newversion [join $parts "."] | |
puts "${path}: version ${version} -> ${newversion}" | |
set_property version $newversion $core | |
ipx::save_core $core | |
ipx::unload_core $path | |
} | |
# try to update all user ip | |
proc xrefreship { } { | |
set dir [get_property DIRECTORY [current_project]] | |
set updatelist {} | |
foreach cell [get_bd_cells] { | |
set vlnv [split [get_property VLNV $cell] ":"] | |
set library [lindex $vlnv 1] | |
set name [lindex $vlnv 2] | |
if { $library == "user"} { | |
bump_ip_version "${dir}/ip/${name}" | |
lappend updatelist $cell | |
} | |
} | |
update_ip_catalog -rebuild | |
upgrade_bd_cells $updatelist | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment