aboutsummaryrefslogtreecommitdiff
path: root/tcl/fpga/altera_common_init.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'tcl/fpga/altera_common_init.cfg')
-rw-r--r--tcl/fpga/altera_common_init.cfg9
1 files changed, 9 insertions, 0 deletions
diff --git a/tcl/fpga/altera_common_init.cfg b/tcl/fpga/altera_common_init.cfg
new file mode 100644
index 0000000..683a844
--- /dev/null
+++ b/tcl/fpga/altera_common_init.cfg
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+proc set_bscan_checkpos_on_setup {chipname data} {
+ set tapid_w_version [jtag cget $chipname.tap -idcode]
+ set version_mask 0x0fffffff
+ set tapid [format 0x%08x [expr {$tapid_w_version & $version_mask}]]
+ intel set_bscan $chipname.pld [lindex $data($tapid) 0]
+ intel set_check_pos $chipname.pld [lindex $data($tapid) 1]
+}