clean up a bit

This commit is contained in:
2025-02-26 22:25:21 +01:00
parent e23f8cb81e
commit 4062fd0bf0
6 changed files with 58 additions and 52 deletions

View File

@ -1,7 +1,7 @@
if {[info exists env(IP_ADDRESS_HW_SERVER)]} {
set ip $env(IP_ADDRESS_HW_SERVER)
set ip $env(IP_ADDRESS_HW_SERVER)
} else {
set ip "localhost"
set ip "localhost"
}
puts "Hardware server IP address: $ip"
connect -url tcp:$ip:3121
@ -28,14 +28,9 @@ puts "Reset target"
# Reset the target
rst
if {![file exists $env(BITSTREAM)]} {
error "The bitstream file '$env(BITSTREAM)' does not exist"
exit 0
}
if {![file exists $env(PS_INIT_SCRIPT)]} {
puts "The ps init tcl script '$env(PS_INIT_SCRIPT)' does not exist"
exit 0
puts "The ps init tcl script '$env(PS_INIT_SCRIPT)' does not exist"
exit 0
}
# Check if BITSTREAM is set and the file exists before programming FPGA
@ -50,7 +45,7 @@ if {[info exists env(BITSTREAM)] && [file exists $env(BITSTREAM)]} {
# Program FPGA
fpga -f $env(BITSTREAM)
} else {
puts "Skipping bitstream programming (BITSTREAM is not set or file does not exist)"
puts "Skipping bitstream programming (BITSTREAM is not set or file does not exist)"
}
puts "Set ps target with device number: $arm_core_0_num"
@ -63,15 +58,12 @@ source $env(PS_INIT_SCRIPT)
ps7_init
ps7_post_config
if {![file exists $env(APP)]} {
puts "The app '$env(APP)' does not exist"
exit 0
}
puts "Set arm core 0 target with number: $arm_core_0_num"
target $arm_core_0_num
puts "Download app $env(APP) to target"
dow $env(APP)
if {[info exists env(APP)] && [file exists $env(APP)]} {
puts "Download app $env(APP) to target"
dow $env(APP)
}
puts "Successful"
puts "Successful"