summaryrefslogtreecommitdiffstats
path: root/fpga/xilinx/programmer/bit2svf/templates/alg_XCFP.svft
blob: 214fa4a24f99101737e162fdf8147b905805b25b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
//Info: Sample template for programming XILINX XCFxxP PROMS
//Info: Created with output from Impact

--LITERAL START
TRST OFF;
ENDIR IDLE;
ENDDR IDLE;
STATE RESET;
STATE IDLE;
TIR 0 ;
HIR 0 ;
TDR 0 ;
HDR 0 ;
TIR 0 ;
HIR 0 ;
HDR 0 ;
TDR 0 ;
//Loading device with 'ispen' instruction.
SIR 16 TDI (00e8) SMASK (ffff) ;
SDR 8 TDI (03) SMASK (ff) ;
//Loading device with 'idcode' instruction.
SIR 16 TDI (00fe) ;
SDR 32 TDI (00000000) SMASK (ffffffff) TDO ($ID$) MASK ($IDMASK$) ;
TIR 0 ;
HIR 0 ;
TDR 0 ;
HDR 0 ;
TIR 0 ;
HIR 0 ;
TDR 0 ;
HDR 0 ;
STATE RESET;
// Loading devices with 'ispen' or 'bypass'  instruction.
SIR 16 TDI (00e8) ;
SDR 8 TDI (d0) SMASK (ff) ;
// Loading device with a 'XSC_UNLOCK' instruction. 
SIR 16 TDI (aa55) ;
SDR 24 TDI (00003f) SMASK (ffffff) ;
// Loading device witha 'ISC_ERASE' instruction.  
ENDIR IRPAUSE;
SIR 16 TDI (00ec) ;
SDR 24 TDI (00003f) ;
ENDIR IDLE;
RUNTEST 140000000 TCK;
// Loading devices with 'conld' or 'bypass' instruction.
SIR 16 TDI (00f0) ;
RUNTEST 50 TCK;
STATE RESET;
// Loading devices with 'ispen' or 'bypass'  instruction.
SIR 16 TDI (00e8) ;
SDR 8 TDI (d0) SMASK (ff) ;
TIR 0 ;
HIR 0 ;
HDR 0 ;
TDR 0 ;
//Loading device with 'ispen' instruction.
SIR 16 TDI (00e8) ;
SDR 8 TDI (03) ;
// Loading device with 'XSC_DATA_BTC' instruction. 
SIR 16 TDI (00f2) ;
SDR 32 TDI (ffffffe0) SMASK (ffffffff) TDO (00000000) MASK (00000000) ;
// Loading device with a 'ISC_PROGRAM' instruction. 
SIR 16 TDI (00ea) ;
RUNTEST 120 TCK;
TIR 0 ;
HIR 0 ;
TDR 0 ;
HDR 0 ;
STATE RESET;
// Loading devices with 'ispen' or 'bypass'  instruction.
SIR 16 TDI (00e8) ;
SDR 8 TDI (d0) SMASK (ff) ;
--END

$CUTLINES(0)$

--LITERAL START
// Loading device with a 'ISC_DATA_SHIFT' instruction. 
SIR 16 TDI (00ed) ;
SDR 256 TDI ($DATA_INV(32)$) SMASK ($FILL(0xFF,32)$) ;
// Loading device with a 'ISC_ADDRESS_SHIFT' instruction. 
SIR 16 TDI (00eb) ;
SDR 24 TDI (000000) SMASK (ffffff) ;
// Loading device with a 'ISC_PROGRAM' instruction. 
SIR 16 TDI (00ea) ;
RUNTEST 1000 TCK;
// Loading device with a 'ISC_DATA_SHIFT' instruction. 
SIR 16 TDI (00ed) ;
SDR 256 TDI ($DATA_INV(32)$) SMASK ($FILL(0xFF,32)$) ;
// Loading device with a 'ISC_PROGRAM' instruction. 
SIR 16 TDI (00ea) ;
RUNTEST 1000 TCK;
--END

--REPEAT START
// Loading device with a 'ISC_DATA_SHIFT' instruction. 
SIR 16 TDI (00ed) ;
SDR 256 TDI ($DATA_INV(32)$) ;
// Loading device with a 'ISC_PROGRAM' instruction. 
SIR 16 TDI (00ea) ;
RUNTEST 1000 TCK;
--END

$CUTLINES(1)$

--LITERAL START
TIR 0 ;
HIR 0 ;
HDR 0 ;
TDR 0 ;
//Loading device with 'ispen' instruction.
SIR 16 TDI (00e8) ;
SDR 8 TDI (03) SMASK (ff) ;
// Loading device with a 'XSC_DATA_SUCR' instruction. 
SIR 16 TDI (000e) ;
SDR 16 TDI (fffc) SMASK (ffff) TDO (0000) MASK (0000) ;
// Loading device with a 'ISC_PROGRAM' instruction. 
SIR 16 TDI (00ea) ;
RUNTEST 60 TCK;
//Loading device with 'ispen' instruction.
SIR 16 TDI (00e8) ;
SDR 8 TDI (03) SMASK (ff) ;
//Loading device with 'ispen' instruction.
SIR 16 TDI (00e8) ;
SDR 8 TDI (03) ;
// Loading device witha 'XSC_DATA_CCB' instruction. 
SIR 16 TDI (000c) ;
SDR 16 TDI (fff9) SMASK (ffff) TDO (0000) MASK (0000) ;
// Loading device with a 'ISC_PROGRAM' instruction. 
SIR 16 TDI (00ea) ;
RUNTEST 60 TCK;
TIR 0 ;
HIR 0 ;
TDR 0 ;
HDR 0 ;
// Loading devices with 'conld' or 'bypass' instruction.
SIR 16 TDI (00f0) ;
RUNTEST 50 TCK;
TIR 0 ;
HIR 0 ;
HDR 0 ;
TDR 0 ;
//Loading device with 'ispen' instruction.
SIR 16 TDI (00e8) ;
SDR 8 TDI (03) SMASK (ff) ;
// Loading device with 'XSC_DATA_DONE' instruction. 
SIR 16 TDI (0009) ;
SDR 8 TDI (ce) TDO (00) MASK (00) ;
// Loading device with a 'ISC_PROGRAM' instruction. 
SIR 16 TDI (00ea) ;
RUNTEST 60 TCK;
TIR 0 ;
HIR 0 ;
TDR 0 ;
HDR 0 ;
TIR 0 ;
HIR 0 ;
HDR 0 ;
TDR 0 ;
//Loading device with 'ispen' instruction.
SIR 16 TDI (00e8) ;
SDR 8 TDI (03) ;
--END

$REWIND$
$ADDRESS(0x0000)$
$STEP(0x0400)$

--REPEAT START
// Loading device with a 'ISC_ADDRESS_SHIFT' instruction.
SIR 16 TDI (00eb) ;
SDR 24 TDI ($ADDRESS$) SMASK (ffffff) ;
// Loading device with a 'XSC_READ' instruction. 
SIR 16 TDI (00ef) ;
RUNTEST 15 TCK;
SDR $BSIZE$ TDI ($FILL(0x00,BSIZEB)$) SMASK ($FILL(0xFF,BSIZEB)$) TDO ($DATA_INV(BSIZEB)$) MASK ($FILL(0xFF,BSIZEB)$) ;
--END

--LITERAL START
// Check Device status. 
SIR 16 TDI (00e3) ;
SDR 8 TDI (00) SMASK (ff) TDO (36) MASK (7f) ;
//Loading device with 'conld' instruction.
SIR 16 TDI (00f0) ;
RUNTEST 50 TCK;
//Loading device with 'ispen' instruction.
SIR 16 TDI (00e8) ;
SDR 8 TDI (03) ;
//Loading device with 'conld' instruction.
SIR 16 TDI (00f0) ;
RUNTEST 50 TCK;
// Loading device with a 'config' instruction. 
SIR 16 TDI (00ee) TDO (0000) MASK (0000) ;
TIR 0 ;
HIR 0 ;
HDR 0 ;
TDR 0 ;
TIR 0 ;
HIR 0 ;
HDR 0 ;
TDR 0 ;
TIR 0 ;
HIR 0 ;
TDR 0 ;
HDR 0 ;
SIR 16 TDI (ffff) ;
SDR 1 TDI (00) SMASK (01) ;
--END