]> git.sur5r.net Git - openocd/blob - tcl/cpld/xilinx-xc7.cfg
d5824f8a16005065cf574de7603bc786d6f4a10f
[openocd] / tcl / cpld / xilinx-xc7.cfg
1 # xilinx series 7 (artix, kintex, virtex)
2 # http://www.xilinx.com/support/documentation/user_guides/ug470_7Series_Config.pdf
3
4 if { [info exists CHIPNAME] } {
5         set _CHIPNAME $CHIPNAME
6 } else {
7         set _CHIPNAME xc7
8 }
9
10 # the 4 top bits (28:31) are the die stepping/revisions. ignore it.
11 jtag newtap $_CHIPNAME tap -irlen 6 -ignore-version \
12         -expected-id 0x0362E093 \
13         -expected-id 0x0362D093 \
14         -expected-id 0x0362C093 \
15         -expected-id 0x03632093 \
16         -expected-id 0x03631093 \
17         -expected-id 0x03636093 \
18         -expected-id 0x03647093 \
19         -expected-id 0x0364C093 \
20         -expected-id 0x03651093 \
21         -expected-id 0x03747093 \
22         -expected-id 0x03656093 \
23         -expected-id 0x03752093 \
24         -expected-id 0x03751093 \
25         -expected-id 0x03671093 \
26         -expected-id 0x036B3093 \
27         -expected-id 0x036B7093 \
28         -expected-id 0x036BB093 \
29         -expected-id 0x036BF093 \
30         -expected-id 0x03667093 \
31         -expected-id 0x03682093 \
32         -expected-id 0x03687093 \
33         -expected-id 0x03692093 \
34         -expected-id 0x03691093 \
35         -expected-id 0x03696093 \
36         -expected-id 0x036D5093 \
37         -expected-id 0x036D9093 \
38         -expected-id 0x036DB093
39
40 pld device virtex2 $_CHIPNAME.tap 1
41
42 set XC7_JSHUTDOWN 0x0d
43 set XC7_JPROGRAM 0x0b
44 set XC7_JSTART 0x0c
45 set XC7_BYPASS 0x3f
46
47 proc xc7_program {tap} {
48         global XC7_JSHUTDOWN XC7_JPROGRAM XC7_JSTART XC7_BYPASS
49         irscan $tap $XC7_JSHUTDOWN
50         irscan $tap $XC7_JPROGRAM
51         runtest 60000
52         #JSTART prevents this from working...
53         #irscan $tap $XC7_JSTART
54         runtest 2000
55         irscan $tap $XC7_BYPASS
56         runtest 2000
57 }