aboutsummaryrefslogtreecommitdiff
path: root/tcl/fpga
diff options
context:
space:
mode:
authorDaniel Anselmi <danselmi@gmx.ch>2022-12-12 09:49:51 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2023-04-30 14:53:25 +0000
commitd35faaa35cd5d56fa946d194d7cf780127a3f8c8 (patch)
treedffcb19ad0922a7ad78012bf74fb5cfa3e95bad5 /tcl/fpga
parent8670ad4caa705c460972badbd0fc28aa98c41866 (diff)
downloadriscv-openocd-d35faaa35cd5d56fa946d194d7cf780127a3f8c8.zip
riscv-openocd-d35faaa35cd5d56fa946d194d7cf780127a3f8c8.tar.gz
riscv-openocd-d35faaa35cd5d56fa946d194d7cf780127a3f8c8.tar.bz2
pld: add support for lattice ecp2 and ecp3 devices
Change-Id: I29c227c37be464f7ecc97a30d9cf3da1442e2b7f Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7396 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Diffstat (limited to 'tcl/fpga')
-rw-r--r--tcl/fpga/lattice_ecp2.cfg31
-rw-r--r--tcl/fpga/lattice_ecp3.cfg22
2 files changed, 53 insertions, 0 deletions
diff --git a/tcl/fpga/lattice_ecp2.cfg b/tcl/fpga/lattice_ecp2.cfg
new file mode 100644
index 0000000..a1aa2ef
--- /dev/null
+++ b/tcl/fpga/lattice_ecp2.cfg
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+if { [info exists CHIPNAME] } {
+ set _CHIPNAME $_CHIPNAME
+} else {
+ set _CHIPNAME ecp2
+}
+
+# Lattice ECP2 family
+# TAP IDs are extracted from BSDL files found on this page:
+# https://www.latticesemi.com/Products/FPGAandCPLD/LatticeECP2M
+#
+# LFE2M20E: 0x01279043
+# LFE2M35E: 0x0127A043
+# LFE2M50E: 0x0127B043
+# LFE2M70E: 0x0127C043
+# LFE2M100E: 0x0127D043
+# LFEC2_6E: 0x01270043
+# LFEC2_12E: 0x01271043
+# LFEC2_20E: 0x01272043
+# LFEC2_35E: 0x01274043
+# LFEC2_50E: 0x01273043
+# LFEC2_70E: 0x01275043
+
+jtag newtap $_CHIPNAME tap -irlen 8 \
+ -expected-id 0x01279043 -expected-id 0x0127A043 -expected-id 0x0127B043 \
+ -expected-id 0x0127C043 -expected-id 0x0127D043 -expected-id 0x01270043 \
+ -expected-id 0x01271043 -expected-id 0x01272043 -expected-id 0x01274043 \
+ -expected-id 0x01273043 -expected-id 0x01275043
+
+pld device lattice $_CHIPNAME.tap
diff --git a/tcl/fpga/lattice_ecp3.cfg b/tcl/fpga/lattice_ecp3.cfg
new file mode 100644
index 0000000..7cd5706
--- /dev/null
+++ b/tcl/fpga/lattice_ecp3.cfg
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+if { [info exists CHIPNAME] } {
+ set _CHIPNAME $_CHIPNAME
+} else {
+ set _CHIPNAME ecp3
+}
+
+# Lattice ECP3 family
+# TAP IDs are extracted from BSDL files found on this page:
+# https://www.latticesemi.com/Products/FPGAandCPLD/LatticeECP3
+#
+# LFE3_17: 0x01010043
+# LFE3_35: 0x01012043
+# LFE3_95: 0x01014043 and LFE3_70
+# LFE3_150: 0x01015043
+
+jtag newtap $_CHIPNAME tap -irlen 8 \
+ -expected-id 0x01010043 -expected-id 0x01012043 \
+ -expected-id 0x01014043 -expected-id 0x01015043
+
+pld device lattice $_CHIPNAME.tap