generated from maddiebusig/vivado-template-hog
36 lines
670 B
Tcl
36 lines
670 B
Tcl
set gitroot [exec git rev-parse --show-toplevel]
|
|
set hogroot "$gitroot/Hog"
|
|
|
|
puts "Hog root: $hogroot"
|
|
|
|
puts "Sourcing hog.tcl"
|
|
|
|
# Using ReadConf
|
|
source -notrace "$hogroot/Tcl/hog.tcl"
|
|
|
|
if { $argc < 1 } {
|
|
puts "Usage: vivado -mode batch -source package_ip.tcl -tclargs PROJECT_NAME"
|
|
exit -1
|
|
}
|
|
|
|
set proj_name [lindex $argv 0]
|
|
|
|
puts "Packaging $proj_name"
|
|
|
|
set proj_dir "$gitroot/Top/$proj_name"
|
|
set ip_conf_file "$proj_dir/ip.conf"
|
|
|
|
puts "Reading configuration file $ip_conf_file"
|
|
|
|
set ip_conf [ReadConf "$ip_conf_file"]
|
|
|
|
puts "IP Configuration: $ip_conf"
|
|
|
|
if { [dict exists $ip_conf main] == 0 } {
|
|
puts "No main section in IP configuration!"
|
|
exit -2
|
|
}
|
|
|
|
puts "Done"
|
|
|