30 lines
737 B
Tcl
30 lines
737 B
Tcl
if { $argc < 4 } {
|
|
error "Usage: vivado -mode batch -source synth.tcl -tclargs BITFILE HW_SERVER HW_TARGET HW_DEVICE"
|
|
} else {
|
|
puts "All OK"
|
|
}
|
|
|
|
variable BITFILE [lindex $argv 0]
|
|
variable HW_SERVER [lindex $argv 1]
|
|
variable HW_TARGET [lindex $argv 2]
|
|
variable HW_DEVICE [lindex $argv 3]
|
|
|
|
puts "Writing $BITFILE to $HW_DEVICE at $HW_TARGET"
|
|
|
|
puts "Opening hardware target"
|
|
|
|
open_hw_manager
|
|
connect_hw_server -url $HW_SERVER
|
|
current_hw_target [get_hw_targets $HW_TARGET]
|
|
open_hw_target
|
|
|
|
puts "Setting device"
|
|
current_hw_device $HW_DEVICE
|
|
refresh_hw_device [current_hw_device]
|
|
|
|
puts "Programming device"
|
|
set_property PROGRAM.file "$BITFILE" [current_hw_device]
|
|
program_hw_devices [current_hw_device]
|
|
refresh_hw_device [current_hw_device]
|
|
|