target/cortex_m: workaround Cortex-M7 erratum 3092511
[openocd.git] / tcl / cpld / xilinx-xc7.cfg
blobf5b0733749b178b8f83a0e22489cc0281e50ecce
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # xilinx series 7 (spartan, artix, kintex, virtex)
4 # http://www.xilinx.com/support/documentation/user_guides/ug470_7Series_Config.pdf
6 if { [info exists CHIPNAME] } {
7         set _CHIPNAME $CHIPNAME
8 } else {
9         set _CHIPNAME xc7
12 # the 4 top bits (28:31) are the die stepping/revisions. ignore it.
13 jtag newtap $_CHIPNAME tap -irlen 6 -ignore-version \
14         -expected-id 0x03622093 \
15         -expected-id 0x03620093 \
16         -expected-id 0x037C4093 \
17         -expected-id 0x0362F093 \
18         -expected-id 0x037C8093 \
19         -expected-id 0x037C7093 \
20         -expected-id 0x037C3093 \
21         -expected-id 0x0362E093 \
22         -expected-id 0x037C2093 \
23         -expected-id 0x0362D093 \
24         -expected-id 0x0362C093 \
25         -expected-id 0x03632093 \
26         -expected-id 0x03631093 \
27         -expected-id 0x03636093 \
28         -expected-id 0x03647093 \
29         -expected-id 0x0364C093 \
30         -expected-id 0x03651093 \
31         -expected-id 0x03747093 \
32         -expected-id 0x03656093 \
33         -expected-id 0x03752093 \
34         -expected-id 0x03751093 \
35         -expected-id 0x03671093 \
36         -expected-id 0x03667093 \
37         -expected-id 0x03682093 \
38         -expected-id 0x03687093 \
39         -expected-id 0x03692093 \
40         -expected-id 0x03691093 \
41         -expected-id 0x03696093
43 pld create $_CHIPNAME.pld virtex2 -chain-position $_CHIPNAME.tap -no_jstart
44 virtex2 set_user_codes $_CHIPNAME.pld 0x02 0x03 0x22 0x23
46 set XC7_JSHUTDOWN 0x0d
47 set XC7_JPROGRAM 0x0b
48 set XC7_JSTART 0x0c
49 set XC7_BYPASS 0x3f
51 proc xc7_program {tap} {
52         echo "DEPRECATED! use 'virtex2 program ...' not 'xc7_program'"
53         global XC7_JSHUTDOWN XC7_JPROGRAM XC7_JSTART XC7_BYPASS
54         irscan $tap $XC7_JSHUTDOWN
55         irscan $tap $XC7_JPROGRAM
56         runtest 60000
57         #JSTART prevents this from working...
58         #irscan $tap $XC7_JSTART
59         runtest 2000
60         irscan $tap $XC7_BYPASS
61         runtest 2000