1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Xilinx Ultrascale (Kintex, Virtex, Zynq)
4 # https://www.xilinx.com/support/documentation/user_guides/ug570-ultrascale-configuration.pdf
6 if { [info exists CHIPNAME] } {
7 set _CHIPNAME $CHIPNAME
12 # The various chips in the Ultrascale family have different IR length.
13 # Set $CHIP before including this file to determine the device.
15 XCKU025 {0x03824093 6}
16 XCKU035 {0x03823093 6}
17 XCKU040 {0x03822093 6}
18 XCKU060 {0x03919093 6}
19 XCKU060_CIV {0x0381b093 6}
20 XCKU095 {0x03844093 6}
21 XCKU095_CIV {0x03845093 6}
25 XCKU11P {0x04A4E093 6}
26 XCKU11P_CIV {0x04A51093 6}
27 XCKU13P {0x04A52093 6}
28 XCKU15P {0x04A56093 6}
29 XCKU15P_CIV {0x04A59093 6}
30 XCVU065 {0x03939093 6}
31 XCVU065_CIV {0x0393b093 6}
32 XCVU080 {0x03843093 6}
33 XCVU080_CIV {0x03845093 6}
34 XCVU095 {0x03842093 6}
37 XCVU3P_CIV {0x04b3d093 6}
38 XCAU10P {0x04AC4033 6}
39 XCAU10P_FFVB676 {0x04AC4093 6}
40 XCAU15P {0x04AC2033 6}
41 XCAU15P_FFVB676 {0x04AC2093 6}
42 XCAU20P {0x04A65093 6}
43 XCAU25P {0x04A64093 6}
44 XCKU5P_CIV {0x04A64093 6}
45 XCKU19P {0x04ACF093 6}
46 XCKU19P_CIV {0x04AD3093 6}
47 XCKU085 {0x0380F093 12}
48 XCKU115 {0x0390D093 12}
49 XCVU125 {0x0392D093 12}
50 XCVU125_CIV {0x0392f093 12}
51 XCVU5P {0x04B2B093 12}
52 XCVU5P_CIV {0x04b2f093 12}
53 XCVU7P {0x04B29093 12}
54 XCVU7P_CIV {0x04b2d093 12}
55 XCVU160 {0x03933093 18}
56 XCVU190 {0x03931093 18}
57 XCVU440 {0x0396D093 18}
58 XCVU440_CIV {0x0396f093 18}
59 XCVU9P {0x04B31093 18}
60 XCVU9P_CIV {0x04b35093 18}
61 XCVU11P {0x04B49093 18}
62 XCVU11P_CIV {0x04b4f093 18}
63 XCU200_FSGD2104 {0x04b37093 18}
64 XCU250 {0x04b57093 24}
65 XCVU13P {0x04B51093 24}
66 XCVU13P_CIV {0x04b55093 24}
67 XCVU15P {0x04ba3093 24}
68 XCVU19P {0x04ba1093 24}
69 XCVU19P_CIV {0x04ba5093 24}
72 if { ![info exists CHIP] } {
73 error "set CHIP to one of "[concat [array names _XCU_DATA]]
76 if { ![llength [array names _XCU_DATA $CHIP]] } {
77 error "unknown CHIP: "$CHIP
80 set _EXPID [lindex $_XCU_DATA($CHIP) 0]
81 set _IRLEN [lindex $_XCU_DATA($CHIP) 1]
83 # the 4 top bits (28:31) are the die stepping/revisions. ignore it.
84 jtag newtap $_CHIPNAME tap -irlen $_IRLEN -ignore-version -expected-id $_EXPID
86 pld create $_CHIPNAME.pld virtex2 -chain-position $_CHIPNAME.tap -no_jstart
88 # set the correct instruction codes for jtag hub and
89 # at least the right code for jprogb, jstart and jshutdown for SSI devices
91 virtex2 set_user_codes $_CHIPNAME.pld 0x2 0x3 0x22 0x23
92 } elseif {$_IRLEN == 12 } {
93 puts "loading bitstream through jtag will not work, but reprogram (refresh)"
94 virtex2 set_instr_codes $_CHIPNAME.pld 0x905 0x904 0x2cb 0x30c 0x34d
95 virtex2 set_user_codes $_CHIPNAME.pld 0x0a4 0x0e4 0x8a4 0x8e4
96 } elseif {$_IRLEN == 18 } {
97 puts "loading bitstream through jtag will not work, but reprogram (refresh)"
98 virtex2 set_instr_codes $_CHIPNAME.pld 0x24905 0x24904 0x0b2cb 0x0c30c 0x0d34d
99 virtex2 set_user_codes $_CHIPNAME.pld 0x000a4 0x000e4 0x008a4 0x008e4
101 puts "loading bitstream through jtag will not work, but reprogram (refresh)"
102 virtex2 set_instr_codes $_CHIPNAME.pld 0x924905 0x924904 0x2cb2cb 0x30c30c 0x34d34d
103 virtex2 set_user_codes $_CHIPNAME.pld 0x0a4924 0x0e4924 0x8a4924 0x8e4924
106 set XCU_JSHUTDOWN 0x0d
107 set XCU_JPROGRAM 0x0b
111 proc xcu_program {tap} {
112 echo "DEPRECATED! use 'virtex2 program ...' not 'xcu_program'"
113 global XCU_JSHUTDOWN XCU_JPROGRAM XCU_JSTART XCU_BYPASS
114 irscan $tap $XCU_JSHUTDOWN
115 irscan $tap $XCU_JPROGRAM
117 #JSTART prevents this from working...
118 #irscan $tap $XCU_JSTART
120 irscan $tap $XCU_BYPASS