aboutsummaryrefslogtreecommitdiffstats
path: root/prebuilt/programFPGA.tcl
diff options
context:
space:
mode:
authorAtaberk <olgunataberk@gmail.com>2022-09-25 17:22:03 +0200
committerAtaberk <olgunataberk@gmail.com>2022-09-25 17:22:03 +0200
commitdc0b3db1b4f1895a07e5fe280ee3790e87f97b9f (patch)
treeb47203aa281bdd959def4451c84d310cd9cf2e12 /prebuilt/programFPGA.tcl
downloaddram-bender-dc0b3db1b4f1895a07e5fe280ee3790e87f97b9f.tar.gz
Initial commit
Diffstat (limited to 'prebuilt/programFPGA.tcl')
-rw-r--r--prebuilt/programFPGA.tcl31
1 files changed, 31 insertions, 0 deletions
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