From dc0b3db1b4f1895a07e5fe280ee3790e87f97b9f Mon Sep 17 00:00:00 2001 From: Ataberk Date: Sun, 25 Sep 2022 17:22:03 +0200 Subject: Initial commit --- prebuilt/programFPGA.tcl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 prebuilt/programFPGA.tcl (limited to 'prebuilt/programFPGA.tcl') diff --git a/prebuilt/programFPGA.tcl b/prebuilt/programFPGA.tcl new file mode 100644 index 0000000..4aa35a4 --- /dev/null +++ b/prebuilt/programFPGA.tcl @@ -0,0 +1,31 @@ +if { $argc != 2 } { + puts "Incorrect number of arguments. Expected BIT_FILE and PROBES_FILE." + exit 0 +} + +set BIT_FILE [lindex $argv 0] +set PROBES_FILE [lindex $argv 1] + +open_hw +connect_hw_server -url localhost:3121 +current_hw_target [get_hw_targets *] +set_property PARAM.FREQUENCY 15000000 [get_hw_targets *] +open_hw_target + +set script_path [ file dirname [ file normalize [ info script ] ] ] +puts $script_path + +set_property PROGRAM.FILE "${BIT_FILE}" [get_hw_devices *] +set_property PROBES.FILE "${PROBES_FILE}" [get_hw_devices *] + +program_hw_devices [lindex [get_hw_devices] 0] +#get_property REGISTER.IR.BIT5_DONE [lindex [get_hw_devices] 0] + +refresh_hw_device -update_hw_probes false [lindex [get_hw_devices *] 0] +refresh_hw_mig [lindex [get_hw_migs]] +report_hw_mig [lindex [get_hw_migs]] + +close_hw_target +disconnect_hw_server +close_hw +exit -- cgit v1.2.3