Integration of mcpwm into toplevel entity.
[fpga/rpi-motor-control.git] / pmsm-control / prodlex.stp
1 NOTE "CREATOR" "Designer Version: 9.1.0.18";
2 NOTE "CAPTURE" "9.1.0.18";
3 NOTE "DEVICE" "AGL250V2";
4 NOTE "PACKAGE" "AGL250V2-vq100";
5 NOTE "DATE" "2013/07/12";
6 NOTE "TIME" "00:49:40";
7 NOTE "STAPL_VERSION" "JESD71";
8 NOTE "VENDOR" "Actel Corporation";
9 NOTE "IDCODE" "03A141CF";
10 NOTE "IDMASK" "06FFFFFF";
11 NOTE "DESIGN" "prodlex";
12 NOTE "DESIGN_DIRECTORY" "/home/marek/astro/pwccd/prodlex/";
13 NOTE "CHECKSUM" "1643";
14 NOTE "SECURITY" "Disable";
15 NOTE "ALG_VERSION" "20";
16 NOTE "MAP_VERSION" "1";
17 NOTE "TOOL_VERSION" "1";
18 NOTE "MAX_FREQ" "10000000";
19 NOTE "SILSIG" "00000000";
20 NOTE "TRACKING_SAR" "76713";
21 NOTE "SPEED_GRAD" "STD";
22 NOTE "TEMP_GRAD" "COM";
23
24 ACTION PROGRAM = 
25        VERIFY_IDCODE,
26        SET_PRG_ARRAY,
27        W_INITIALIZE,
28        DO_ERASE,
29        DO_PROGRAM,
30        DO_VERIFY_BOL,
31        DO_PROGRAM_RLOCK,
32        DO_VERIFY_PGM_RLOCK,
33        DO_EXIT;
34 ACTION PROGRAM_ARRAY = 
35        VERIFY_IDCODE,
36        SET_PRG_ARRAY,
37        AW_INITIALIZE,
38        DO_ERASE_ARRAY,
39        DO_PROGRAM,
40        DO_VERIFY_BOL,
41        DO_PROGRAM_RLOCK,
42        DO_VERIFY_PGM_RLOCK,
43        DO_EXIT;
44 ACTION ERASE_ARRAY = 
45        VERIFY_IDCODE,
46        AW_INITIALIZE,
47        DO_ERASE_ARRAY_ONLY,
48        DO_EXIT;
49 ACTION ERASE = 
50        VERIFY_IDCODE,
51        W_INITIALIZE,
52        DO_ERASE_ONLY,
53        DO_EXIT;
54 ACTION ERASE_ALL = 
55        VERIFY_IDCODE,
56        INITIALIZE,
57        DO_ERASE_ALL,
58        DO_EXIT;
59 ACTION VERIFY = 
60        VERIFY_IDCODE,
61        R_INITIALIZE,
62        DO_VERIFY_EOL,
63        DO_VERIFY_RLOCK,
64        DO_EXIT;
65 ACTION VERIFY_ARRAY = 
66        VERIFY_IDCODE,
67        AR_INITIALIZE,
68        DO_VERIFY_EOL,
69        DO_VERIFY_RLOCK,
70        DO_EXIT;
71 ACTION READ_IDCODE = 
72        DO_READ_IDCODE;
73 ACTION VERIFY_DEVICE_INFO = 
74        VERIFY_IDCODE,
75        READ_INITIALIZE,
76        READ_IDCODE_ONLY,
77        DO_VERIFY_DEVICE_INFO,
78        DO_EXIT;
79 ACTION DEVICE_INFO = 
80        VERIFY_IDCODE,
81        READ_INITIALIZE,
82        READ_IDCODE_ONLY,
83        DO_DEVICE_INFO,
84        DO_QUERY_SECURITY,
85        DO_EXIT;
86
87
88
89 DATA CONSTBLOCK;
90     INTEGER IEEE1532=0;
91     INTEGER STAPL=1;
92     INTEGER DIRECTC=2;
93     INTEGER PDB=3;
94     INTEGER SVF=4;
95     INTEGER IAP=5;
96     INTEGER FP=0;
97     INTEGER FPLITE=1;
98     INTEGER FP3=2;
99     INTEGER SCULPTW=3;
100     INTEGER BPW=4;
101     INTEGER DIRECTCP=5;
102     INTEGER STP=6;
103     INTEGER FP4=7;
104     INTEGER FP33=0;
105     INTEGER FP34=1;
106     INTEGER FP40=2;
107     INTEGER FP41=3;
108     INTEGER FP42=4;
109     INTEGER FP50=5;
110     INTEGER FP51=6;
111     INTEGER FP60=7;
112     INTEGER FP61=8;
113     INTEGER FP62=9;
114     INTEGER FP84=11;
115     INTEGER FP85=12;
116     INTEGER FP86=13;
117     INTEGER FP90=14;
118     INTEGER FP91=15;
119     INTEGER UNKNOWN=127;
120     INTEGER UNSPECIFIED=0;
121     INTEGER QN132=1;
122     INTEGER VQ100=2;
123     INTEGER TQ144=3;
124     INTEGER PQ208=4;
125     INTEGER FG144=5;
126     INTEGER FG256=6;
127     INTEGER FG484=7;
128     INTEGER FG676=8;
129     INTEGER FG896=9;
130     INTEGER QN108=10;
131     INTEGER QN180=11;
132     INTEGER TQ100=12;
133     INTEGER CQ208=13;
134     INTEGER FG1152=14;
135     INTEGER BG456=15;
136     INTEGER UNDEFINED=63;
137     INTEGER GRADE_UNSPEC=0;
138     INTEGER GRADE_1=1;
139     INTEGER GRADE_2=2;
140     INTEGER GRADE_3=3;
141     INTEGER GRADE_F=4;
142     INTEGER GRADE_STD=5;
143     INTEGER GRADE_4=6;
144     INTEGER GRADE_UNDEF=7;
145 ENDDATA;
146
147 DATA PARAMETERS;
148     INTEGER FREQ =4;
149 ENDDATA;
150
151 DATA GV;
152     INTEGER ULOPT1_BITLOCATION =11;
153     INTEGER ULOPT0_BITLOCATION =10;
154     INTEGER ULUWE_BITLOCATION =9;
155     INTEGER ULARE_BITLOCATION =8;
156     INTEGER ULUPC_BITLOCATION =7;
157     INTEGER ULUFE_BITLOCATION =6;
158     INTEGER ULUFP_BITLOCATION =5;
159     INTEGER ULUFJ_BITLOCATION =4;
160     INTEGER ULFLR_BITLOCATION =3;
161     INTEGER ULULR_BITLOCATION =2;
162     INTEGER ULAWE_BITLOCATION =1;
163     INTEGER ULARD_BITLOCATION =0;
164     BOOLEAN BUFF128[128];
165     BOOLEAN BUFF32[32];
166     INTEGER I;
167     INTEGER J;
168     INTEGER TEMP;
169     INTEGER SDNUMBER;
170     INTEGER ROWNUMBER;
171     INTEGER DATAINDEX =0;
172     INTEGER FROMROWNUMBER =1;
173     INTEGER AESBLOCK;
174     BOOLEAN ID[32];
175     BOOLEAN PASS = 1;
176     BOOLEAN FADDR[3];
177     INTEGER STATUS =0;
178     BOOLEAN SILSIG[32] = $00000000;
179     BOOLEAN ISC_CONFIG_RESULT[18];
180     BOOLEAN VERIFYEOL[2];
181     BOOLEAN COMBERASESELECT[23];
182     BOOLEAN SECKEY_OK = 1;
183     BOOLEAN SECREG[44];
184     BOOLEAN ULUWE = 0;
185     BOOLEAN ULARE = 0;
186     BOOLEAN ULUPC = 0;
187     BOOLEAN ULUFE = 0;
188     BOOLEAN ULUFP = 0;
189     BOOLEAN ULUFJ = 0;
190     BOOLEAN ULFLR = 0;
191     BOOLEAN ULULR = 0;
192     BOOLEAN ULAWE = 0;
193     BOOLEAN ULARD = 0;
194     BOOLEAN ULOPT[2];
195     BOOLEAN SUROWCHECKSUM[16];
196     INTEGER SUROWCYCLECOUNT =0;
197     INTEGER ACT_UROW_CYCLE_COUNT =0;
198     BOOLEAN ACT_UROW_DESIGN_NAME[70] = $0102041d3fb266e98f;
199     BOOLEAN SUROWDESIGNNAME[70];
200     BOOLEAN SUROWPROGMETHOD[3];
201     BOOLEAN ACT_UROW_ALGO_VERSION[7] = $14;
202     BOOLEAN SUROWALGOVERSION[7];
203     BOOLEAN SUROW_PKG_TYPE[6];
204     BOOLEAN ACT_UROW_SW_VERSION[7];
205     BOOLEAN SUROW_SW_VERSION[7];
206     INTEGER PLAYERVERSIONVARIABLE =0;
207     INTEGER SCULPTORMAJORBASE =4;
208     INTEGER SCULPTORMINORBASE =50;
209     INTEGER PLAYER_VERSION_VARIABLE =0;
210     INTEGER SCULPTOR_MAJOR_BASE =4;
211     INTEGER SCULPTOR_MINOR_BASE =50;
212     BOOLEAN ACT_UROW_PROGRAM_SW[4] = $2;
213     BOOLEAN SUROWPROGRAMSW[4];
214     BOOLEAN SUROW_SPEED_GRADE[3];
215     BOOLEAN SUROW_SRAM_DISTURB[1];
216     BOOLEAN ISERASEONLY = 0;
217     BOOLEAN ISRESTOREDESIGN = 0;
218     BOOLEAN FLAGDISPLAYCYC = 1;
219     BOOLEAN ISPRGARRAY = 0;
220     BOOLEAN BSRPATTERN[708] = $9249249249249249249249249249249249249249249249249
221         249249249249249249249249249249249249249249249249249249249249249249249249
222         24924924924924924924924924924924924924924924924924924924;
223     BOOLEAN SAMPLEMASK[708] = $0000000000000000000000000000000000000000000000000
224         000000000000000000000000000000000000000000000000000000000000000000000000
225         00000000000000000000000000000000000000000000000000000000;
226     BOOLEAN BSR[708];
227     BOOLEAN SAMPLE_DEVICE[708];
228     BOOLEAN RLOCK[832] = $7fffffcffffffbfffffeffffffbfffffefffffffffffffffffff3f
229         ffffcffffff3fffffcffffff3fffffcffffff3fffffdffffff3fffffcffffff3fffffcff
230         ffff3fffffcffffff3fffffdffffffffffffffffffffffffffffffffffffffffffffffff
231         ffffffffff;
232     BOOLEAN ARRAYRONLY = 1;
233     BOOLEAN CHKARRAY = 0;
234     BOOLEAN FROMRONLY = 1;
235     BOOLEAN CHKFROM = 0;
236     BOOLEAN CHKNVM = 0;
237     BOOLEAN CHKSEC = 1;
238     BOOLEAN PERMLOCK = 0;
239     INTEGER HEX[16] = 70,69,68,67,66,65,57,56,55,54,53,52,51,50,49,48;
240     INTEGER NUMBEROFFROMROWS =8;
241     BOOLEAN INITIALIZE_DATA[5] = $00;
242     INTEGER SDTILE;
243     INTEGER NUMBEROFSDTILES =4;
244     INTEGER NUMBEROFMAPROWS =2300;
245     INTEGER IDREV;
246     INTEGER IDFAB;
247     INTEGER BM7DEVICE =0;
248     INTEGER BM1DEVICE =0;
249     BOOLEAN M1BUFF[128] = $acdd6548ccb488863e291eb18fe95077;
250     BOOLEAN M7BUFF[128] = $e137623a2eeee91126015f3f73664945;
251     BOOLEAN IDCODEVALUE[32] = $03a141cf;
252     BOOLEAN IDMASK[32] = $06ffffff;
253     INTEGER SECKEYCHK =0;
254     INTEGER DESIGNPKGTYPE =2;
255     BOOLEAN ACT_UROW_PROG_METHOD[3] = $1;
256     INTEGER LABEL_SEPARATOR =0;
257     INTEGER ROWITERATION =100;
258     INTEGER PAGEITERATION =100;
259     INTEGER PERCENT_UPDATE;
260     INTEGER DIFFERENCE;
261     INTEGER UNIQUEEXITCODE =0;
262 ENDDATA;
263
264 DATA BITSTREAM;
265     BOOLEAN UROW[128];
266     BOOLEAN UROW_MASK[128] = $fffffffffffffffffffffffffe01ffc0;
267     BOOLEAN DATASTREAM[1913600] = @WPw00000110040W0W000020G000400108002200000Wwc
268         qssso0000p@@lF999IjjjQp0000_@x@@IYaatcjj50000y_@@7HIIIORRRR36uXaa49jjTDq
269         WD2000y@@EH0vssMj90008@@z@69HIo000049IIICIII2Va00008III0HII2i134999H899f
270         67Waaa4aaaKD020Za491aa8900gX7GIIIA0000800m0G0aaaa9mWauWku00000IIIIg1Vqss
271         sosssc3999A1000jjjQpjjPRMIYay0000tcjjbMjjj8III20000ORRR3RRRhWaaa3ZWQW3sO
272         RRssba897000mskJAGIIIYC000Wbaa8vIIaaJRpsEJYaaD9IIo4999sijjz8999B999fKHWj
273         jj19999aaaaGIII2QRRpIIIY4IIoQm6caaausssgZaa4PIIIdW0PRRRsIIIa600So88EH0II
274         IYxa1r72IF6WaaaySHGDW50IIIr07AK6KV8O0OGDuWIQ1r02AY4K3QeTDHDu22000r05w4Ae
275         ssscJIIIUy0ejjj2aaa84000G00e6GGhK1ijjjYaaa2d7K3w0JIIIkyWQW2qsssWjjjvIIIY
276         O@@l@jjDR7RRssaa89X@x@Vsk6KW99992@@@_nssiDjjT@80n@@VD84LIII4@@@zjjjPpQRh
277         JW04@@@_GRRrMRRpsijLRxlDRRtMjjTtijjNrss6pssssssscsssMHRRRMQRRrYjjPRijLRp
278         sMD01sORRh1ymssscvssMjRRRsCRRrsljL3GWz000040030OK3uK@Z130Br9SX000WQ0D2De
279         fjmf1WCZJMB22jOho2q_FGp@1Q_FGp@1Q_FGp@1Q_FG3l8999HIII2baa41999oIIIaeaa89
280         89HIMIYa49f6G10999HGIIc1W089992IIIaaaa81IIg6W7T2ce6W6H3UAGZ@3qu@0D_FG3Nh
281         4q0GIIIa200YKW04000W899BpyWS3LOKH3QFyWQ00fJ0AsHyW10I02000800W10sfJ0Aaaaa
282         O0000GIIYS0000A99I20000ca89H0e6W2400008999N12g1mWqEFe6WEw4OYI6Fmaaa45000
283         WIIIz7GWIIII0000W899xHWaQ0eeJWB21m0Waaae000g2W020000IIIa100q7m1jIGGY09SO
284         m1r0CId0KaB91f1K0WIIoq080HIIID0Gq9G4r0CId0EC0m@30yV0Dr5DmQ1ezVWJ@7uq@12_
285         Vy8a7Qm@1qyVm9@N3W960002gx2baaannTXIIIoUuke6WE2UKzWJ_Fua@3UKvQ0C8GZ32Q0j
286         W7@Fun@3Uy@10_FWc@3Uy@W7@Fun@3Uy@mm_FqW@3ev@W7@Fu4v2Uy@W7@Fua@3Uy@0Dk8e1
287         qajjjP0000qsscj0000GRRss0000ajPRx0e6040ijjP300e602k9a0jjjDr0CId0Am100eJ0
288         2ORRR3999HkjjDZaa49qssi5IIaaQRpsE9HIIORD058sssk6058sssgHIIg6WGw4e1YjjjT2
289         GWjjjDdaaaWsssiJIIYKRRx9W3Ocaa8njjLRbaKD04OXaa49sssj0BK3G7T2CHD040000m99
290         994000Waaa8500IYy0G999I400_PyWp3F0IIIIVaAK3W6T2OX4_@V@399II_@z@da899_t@@
291         RYaa4U@@@FIIIIg181FIIIr0G0IIIIm@@@U899h1WaE1Qm799v714esss_n13kVW0ijjjA00
292         00rssgL00e6056UW0ijjjj5GWjjjbQ0CfJW6g1WW10_lnn@BmfkW7@Fun@3Uy@0qY4300Gz9
293         @F0WDn9WMOB26Ws@1F_VmZ@7yu@1dyVm9@F006nMG5MIIoW7@FunXw4uWW73hJW32Uy@W7@V
294         0W@3ev@WjEFun@3Uy@0qkEua@3X@@0Q_Fun@3Uy@W7@F6663Ev@WJsCs2q2Uy@W7@Fun@3Uy
295         @10_FWc@3Uy@W7@Fun@3Uy@mm_FqW@3ev@WJ_Fun@3Uy@WJ_Fun@3Uy@W7@Fun@3Uy@10_FW
296         c@3Uy@W7@Fun@3Uy@mm_FqW@3ev@WJ_Fun@3Uy@WJ_Fun@3Uy@W7@Fun@3Uy@10_FWc@3Uy@
297         W7@F0j@3Uy@mm_FqW@3Uy@WJ_Fun@3Uy@WJ_Fun@3Uy@W7@Fun@3Uy@10_FOh@3Uy@W7@F0j
298         @3Uy@mm_FqW@3Uy@WJ_Fun@3Uy@WJ_Fun@3Uy@W7@Fun@3Uy@10_FOh@3Uy@W7@F0j@3Uy@m
299         m_FqW@3Uy@WJ_Fun@3Uy@WJ_Fun@3Uy@W7@Fun@70u@10_FOh@3Uy@W7@F0j@3Uy@mm_F0j@
300         3Uy@WJ_Fun@3Uy@WJ_Fun@3Uy@W7@Fun@70u@W7@FOh@3Uy@W7@F0j@JgpoI5SAQWc2Gx@0Q
301         _lJWQ80004yu@1Fw9899nW7@FuHF11004So@1Fw9199nW7@Fun@3Uy@W7@V0W@3Uy@W7@Fun
302         @3Uy@W7@Fu4t3Du@0Q_F7r43Ev@W7d9EE32Uy@W7tCua@3UCqOBYAun@3Uy@W7@Fun@70u@0
303         Q_Fun@3Uy@W7@Fun@33x@G3_FWc@3Ev@W7@Fun@3Ev@W7@FQ0eg1mWW75Z000GmZ@7yu@1F_
304         @00@7yu@1F_VmZu0G008un@3Uy@8l_2G00Gm9@76s@1qyVmZ@7yu@1F_VmZ@7So@1FYUW6D4
305         dGPW000AP4262001FA5JRRR88991FAcbjjjI6FGJIIQmZA0IIICuHd01004yOPU@@@1D99Lo
306         O3Wx@@3UaBfjjT1FQTWOJ7Ws@1F_VJMe4yuHH3eGmZ@7yu@HUDSorH46s@X6m@BGA5yu@1dy
307         VmZb8B99ewj44Waa4yOMoII2aWaaL3m14aai2UiCG000nmW6400WWmeAib@3UKq0DO8uHkY6
308         8iW7r6aaaWosssW7nomsscJIIIGPRR1FgWSQRxW7n2Y00GmZVvy@@7aaa4v_@@W7@2200GmZ
309         A01000RRRh210WW73E26gY6Wlh1M3800G0Db5DWI1FkVaNN5x7Qr0GGh2A5yu@1FoSiAh5Yu
310         @X6yV0D37ODQvUSGGgJ4S2M@9SKmZ3A8998Ek92UKge1i8unlY@LuWJ_Fu4bYxfdW7tGIIIW
311         caaiAAEWbaaLmZOL3G3H3GLG3e1B00Gsssc1D00GVRRsY60APa06300Wajj3Uy96sssNBI0q
312         ss82II22QRR1099HbjjLdbaKmZFPPRRpX8998WjDx0aa8LmsiDAJYayOpscXPmZG1000mf99
313         94800Wmaa85400GQIMoO1caa43Uq9t_@@WWaa8V_@xpOIY4B@l@D8fW7B0IIIImZE1400GTj
314         jDX6000ossi33000NQ7yO1assM3Uit0aGBYiV3E0lOO4BgTtILVoW7TAQ032Uigmmc8uHnk2
315         mWI6Z2W00GmZlLEm51ejKFx94vrmTptGmMzsZh27quLq06KG01H3eKe1UC4W1nMGKmZddDJQ
316         14OG44J4Ohj2400g1mXAQI8uHfgUZ110991FArL064y812IIog1G1QIIY1FQRJBaD0W28a00
317         2Uy@WJ8QZAW2Uq3899PoIII2Uiie1sAeXr2Ua0400qyjjj0300WssscX2008BRxW7VYbjjTm
318         Z70GIIG3RRB8899gbjjwaba2Uy93QRRED9915ijPdWa4f6scjHGIaaZRssC83USAddaa1FIW
319         YaaK8000bCU0D99nW7ho_@@9KII27@@@C9993Ua019991Fw4q000rqss4O000OPRpEe0eaH2
320         2Ua0JRRh1Fcy00D7VrM7RrGTWLLI25H3CKNAQWG008kdcJZ4jWkHBwcoo9u0G000310HCPH5
321         yOPbA4HiIKLtm5xkPGmZp66cRXm@Vd0vqweN1F_VcmDLr01Z0aGmZp22008mM5EW6YW7nI2I
322         IIrR94yuJbobHmZtMJr6XjyVm9kZaaa4199Pi5Y5enQn9K6W000vRRR6400APa08000eijjB
323         PyWW7TYjjjzrY4WjjD2aaaWIssMmGIIbCI0JIIYW7Zo1899eYjjI69WdjjzJ06mC999uHfSG
324         II2X00ean3asaaKoe11F_aN@@VmIIIaZ@@BPy06Waa1FIGZZc4yuAG200KPRRJ0100WljDx0
325         200mqsbCUGmZ47t3430ORlDXjh550900Y68B1001H3qKmM@5dW3h9SLRwH4qWMbBvGq0C4yu
326         jx4yGO3A4lOKr0KMr1AiDnH1evHaNbTYLP40003sAko18Q7XBkJv0200017aG0DM5s23H3GK
327         0Q@7r1K1FMNm9UXG10uFXb2iTbWJY2199P9ZA80999unjG0II6KdOG2002UKkGGAhk9b2Ev@
328         e1Q2D99PyYbL305Waai2UiA4001n946W100PRRR6Y100jbjPB20ean2W00GgljjBuHdOJRR3
329         189HkXjDZ0b49assi5GIaaQJpsE98uHeCajjv4aa4KwscTGIIaAJRs6f9N7W0cD891F2b00u
330         49992800GacaaY000ean388996yeJkn@@1999Hsz@td4a49sx@I698uH2abaa4yeJG000APy
331         0TjjT0400mdssg0200KARRmZ4lskRpAnsbNKTH655AG5010W0rRUDEq600DX0001EXMmZcj4
332         G6bb95A00WW7Hx04b2GRb5iC8ohgw9ygMXhBu4p4000y_Q2Bamb00WWVPZ80j@3ePbuuIEtZ
333         3E1QYWJMAo23YX1jW6k8uHigUJ1oIIY1F65IGIo8y43G00Gr1K44Y1nmaR11EiT2G1deE210
334         We1_2f99PmZv5D0L1FY6e000vRRR6400APa08600eijj3UaWN_C8unbOQRR3189HEijDZWa4
335         9KYsi56GaaQ3psED8unfS0JI2gPRhaH2O1RR3f89HEXjDpaaaW7boH9994I0WI690210Wqca
336         41W00WIII2Uy9lw@@Wbaa87v@No81kp@@P8II2kv@tF99PmZIfoqs_n12qtss1P000JQRh2f
337         00Gjjj1FISFC7yy8PH38MqDD4luL3086G00WW7b3210GREbD3a2h4XL7ICqD012200I6ege1
338         i8m9dYmhC0200v4SGF0J4lOKrtZMmMN4RXJ2P00GW004zvO2000O000CZbOX8omn9S5Y84XX
339         j6900Wmmsw2F5Y6edWxtN600Gq0ED144B_SG0DK9G20uMWB2ijgmLs9uHLw5uW70A0G00GmZ
340         P1B99ewD3o@Y02IIM0aa43UKA999AoII2aWaa5D041rvKr1G0G20866h8000StrP82200e00
341         4i5IX6S1900001101daMo9AL9W682002TgX4DM8QWZgeG1199PLKOW0aa4P9891FkRG3Cq@B
342         Hn9G14000PRRR1FI0xRRB0600bCI0A00IjijT1Fw4RRRR8899ofijtHa0bfjjW4aaesosgJY
343         IAundiajjvWca4KcscTIGIaQ3Rs6D8HIknPRp4CuneAPq01008IHII10008D999uH28D996y
344         eJk@@@BPa0_@@d8A99yd@@pWaaCuH2aWaa4yeJbCIWqsM0O00WQPRxW800WfjjL1400esqsW
345         7FU00g3oIm232AWgc2s2bTT0AU1KMyvi7ysg4BD2U4sU5fg6WDE8mY0quAEXj8004SRX5HjN
346         rn5lLqYRXXHLiVeLG05H3qJ4hN4y8vn@mxQ6HW10082232UyhWKlga47M2WXWJMganB8B996
347         yOLr001C99nW73B8ej211wWJ_FuHT4aa4KHH31FESG3XLoe20400APa0800alyPGmZE1989H
348         kbjT9ZBOQRx4599HmZEPBRRp9D99ezjjI6HOTW2Ocaa4yeLG00GAPK1800Kaaa43Uq9@z@@W
349         qaa8@z@No81_x@@BPa0p@@FIJII2UigI6b8un@70upyRMBW6iECGfWjWCu7lIJkXW7tgnW9Y
350         zBge1YupuU2USmQ08BunqYACZW7dDGm32KVjW7TR9W32Uy@W7jd000KmZrX0008uHn2Enh62
351         i8uHfWaa4Kzc2qaaiYZpWW753aaaOmZv62oq1dyVmZ690999un@3rnaI6Z0100PmZHncssU7
352         H22UiXI6D8uHfAPK2c9891FQ50004f99fbCoGmZFLoe28899APy0x@@FDEQImZlejj50200O
353         mZ@F0m@1qyVSFd6rEQ1EXMaNe5yu@1FgKaN@666rv_HM8lezMCQ1qyVmZ75So@T2K2IJIoI6
354         j8uniaWaa5KdNL7GGOjM4yu@1F_VmZS5lOO1F2T9Z6u0000qssMZZnK3m5T2q0500WQ08Wjj
355         jDbWaaW79WWaaaMsssI6DGZqaKmZuG999PkH28999L3G3sossoQa0ossAbCQWaaa4rcssCJI
356         I2U4dQ0IeJ02iaaaesssEuH5m0100cqa4v00G9Z4e1000GIIYa10WW7n130008IIoE1QGI@y
357         l@ba49P@_1FI0f_@V@NIIaa_zz@B9HIo_FuHRw4WWW7BeJW3m@@@xXaa4P0000gzjW790ejj
358         DR1200ussiD122UKeE1800000tsssmA98unuAluWleEAm903Z9kDr9G000m6yNLQW3HFrHmM
359         @F0W8G000g48gobee7032SYeo2Q8un@3Gx@xHmuq4i2s2Q20011dOzM3X5W6mryemnHASkd5
360         1FsBG00WWWsAuaoAPi19899LlH0899hW7Fg6032gR3QIIY1FML0qC7Cy@1dSKK7NLHH31QSG
361         mZ@7dG90140ibjjLoe2eljj9G000msscT00GmZrORRRBun9OdbDORab09vsciDIIaaORssM8
362         GQIg1RRR4859HmZt0999HkjjTD0HOVBRhaH3iIIIYC3Ros989IgrDORca1F_ZLIIIaRRRTHM
363         GmZ9uqacian2e9vW000IWaaq0100eW712C99PmZEu@l@74aW4xx@V@IIGa_xlzVP9HI_v7@l
364         aKmZ@uNIIYq@@VmZC080kvn1280WjPRRW080uI9Z480esclj2GmZyK3m11FkG0835qj@LEXG
365         xYWjg41zC0Mr044DWI1DOOS2Yz115TGCLvIE4D031EPRE174qG3RePGmZq6oG11ss0W40WOC
366         DDQ0Akyp04G00pbcr0078G000W0Gm90DKYNL58aGl0A82008uaj44004SIPH3eKlDSyeYP80
367         000240Ce2In9e1A00WJ6b88el2UKhlHE8uHowIWW3GIAuHHoWm00A001d45omIoI69mKIIW4
368         aaC9BA9K2II4a4a4y8Innf0omIIaWWaGPB9H00IYiab59A1HGTN90028un@70me7lqgwW501
369         0080008w6WYJ8aqMG8rWV2UK3aaaaLKGWabaaW7t2899Pq08GGIK2aa44099hE169uHQwkJC
370         8809tGL0220000W4e11004002aW4e6W8G220K3W60000h184IG20020W8O110030W4iW0001
371         002QG4001g1u1yW00r0e1m00mQ0010W1WijbD30W0Wssoi50000QRts6001WiDVR70XLQJD0
372         60QRRhJW2qss6000WCiI3Wa4b4MP1O9XsAci0gjDjw4aW2h49gjjjwaaa2ha0daaaWsssiJI
373         IYKJRos891IobDORcb09nj3hqcE1KOTW602G0uaac42000GIIJa2000899GI0100ea4892GO
374         bvq9G1aaK022eWW79WaaaWl@yVGI2Ia@@@z991HYt@t@caC9XtVz@JIiaa@3hqcQ0CmdaaKD
375         04maaa4y@@lFIIoV88GjjfTOb5OQxW080mcjijWmA9Wij2GOb@C911ORRRL0004MP130y@00
376         v02008rD3_RoXGtYg5_s25bwEubBSlhAaAYe1I8aAdgggZW6Y280WGh570e008QDiUvuYw7B
377         BqjgQ8mYs26BRZeIroWW2OOUl2m0004S2LH30nd1zi7063jOmSjDS2YKn9KG1144DWIR88oy
378         P7awMMX64H0DR5D0P5qCtRbC4MfKxbsKS2L0402e6W4cqWWG388iofAcK1889PoIIIYmZ0II
379         IMWaa43hqfb08e603aWca9B89X2GIID04GGIICiIU78o1G00G8010YZageEM8SYhAOjWm_t_
380         t0Y2hKZOBA8io2Wa4a8819H6I2Ii5F144ai605YnShqBC8eXoAPyYW7TYjiizrY44y81bCQ0
381         JJIDRRRd8e892Uq9RRPRbCMWts99IIgDQQRa899vgCiDZaaaOmZELo81QQI40W0W4yu1bCYG
382         mZFv@l@7aWW4v@l@W79mVV@V9Z4uU_@fnHJ2Ua511GjbCc0011WI6BG0GjDRR5WW7@FX98BT
383         Sic4QBOBqoTOjICFegXV50G04EUpzA6LD0z5kN21fkN44Fztr1@0O0500WGuLUw2ZYzJmeSN
384         EOOpdHqeSF4Pn732UChDTCAOuO2UiggtU8uHeAb3ZWwaAunq66Vh8mrEuadZj0j0DMBe1pG0
385         0Pp_s60G10DRPRB0010ejbjBPa0jljT1F_4qs69AIIkQHRZ8L89ejaj5aYb4rMsMTIGI1F2b
386         GRx4989qCajT2Ua0ijDIaaaSLqscH2IICund400de19H0G00YacaK0010IIRIAPa0IHIY1F_
387         4y@7IWbayUq@FH2IIuFt@d9189ul@V@aea1F2590eMjij0W200rcss1G900RRQh2W10Gjbj1
388         F2LyzUC00kHcdG@lAbHs78200cyAha6GBmMpg1OXNxDAQWCYJ8X@ybAEev40104yu@r0uPr1
389         44uMJn9Knb5541nOdPOnjNLjAG38000W0000K008Q0g23Zj1y8O8c4YzZg22E8QW62GZvi92
390         AGmOY_CtQ06BU430200SPX2hM0KmZz119B9uHt4aaa5yeOJWOHGGHD0mOX9tMm9oD23H1FEe
391         qaaWW7BJ2IIGD04GGIKAunp2Q8B10Gsajj1110GNou1URR3W00G_od11Fo4ss6DUGIEQBRZ0
392         199eiijjaH2CijTYWca8uHdCDbjvaaa4K6scTMGIawJRs698HIkbHRpaCuHgqaa8Ko81qaK4
393         00091JI200005f99nW7TozS@F8199ozy@_aaW8nz@xVJ6YamVF@@9XW7X2230WQJRR20X0bC
394         I00500ibjjA0Y00rss6y8K30ut5mgD0mK7MFHaNLjFo130CsIbErCZ68400YxfvFBM8ZJj40
395         20KT02H3KGU6A4uaJ1ePsA07CKG5nB6LDQeLT02XxrLq07Sdo4HGuqDk70840OPZoguLXOLc
396         eYYbYJuWG36wG0CaW0043ZP4W00YKnidUGB662wVGf0R@x147ccMB14W01d8MB344Ci10X00
397         Y@zBG001f9emI0C4y8JbCI08HPfgtAG2IIImZS188HnIIIGmZb50zPX82tgI65OxZ1F2C2II
398         oWKl8uHdY6G119991FYMG3PH00odjjDO9Z601000bjjT9Z74yuJQRR4819vejiD2qaaWoosM
399         m2IIKRPRr99D5yuJ6sosSKGI6y81IIIIvBRR39D9HkjfTmZJ100Eean3e9f0G00IhaH32UCA
400         @tz@Wbaa8tx@7y81_d@@PGJI2k@zFunf000Lgjj58uH30W00WffjDuHg33hi10wzAEZA9Xc1
401         52AOh0tQGlc7fAGGAY6mW0dYAeXoYdtiQ0KhwW52UqB4201H30n40641nJLxnmV@54r_Lb_1
402         nv9QLTW34000k6edW7pefolY6GX22884Ho2Uaj0qCU0Wr4G004S2RG000UWsWL888kqU2irZ
403         OBEeX862Uy9199gnBoW0aaaW7lYaeiKq058189f6W3C9996yu@zT1IDB54rXOH3OGmZA3210
404         e605EGxeW7398L82UKA8991HIwLCCfP00ocijD0000QstsM0800GxRRp0C00ajiTmZGXjjHY
405         Xaahsss8GII2A3RR1889HbXjLd4bKmZFPRORp9H9PmZ48199bEijDaea4vMts1FEb00u4D99
406         Y020GaWaaY100GIOIImZLvU_@7aWa4P_zVVIMIaOU@zl93HIuls@@aGmZG1W100jfjD1W000
407         _wsi3G100RPpsY000GjPmZ0@fIRnAzLkAHCDGM1RL04000G000lLsLiI5Cha102002D0eWJe
408         eo02W004S3L3H3GLJTKaKNM30K0H00WTHzgSf3YJuWr3C0O00GmZwMJ75P1KGmZ17KtTHGm4
409         G00020000100ozxWl25BGTZhMOYuHgI004G11G4fYNd9JMmzAF0mQ2400YMyYWJmw442ACUe
410         W7zeUY92Uy9999A22I2iaaa9919XIQIYW4aaW7jA2F8Y68XW7xjoBl6VmW22GORIZ2UiY0QW
411         U5W2Y6GiAAEGMIIGyYUj401H3GMG3e1G00G__sc111WI6902300ABRR6G00bCIGmZEncss6I
412         IIYSAQR61191FI0OH9fI6F8uHdC5jjvWWaCuH2acaaoNts_903OcWa4y8K00W34aa80000HQ
413         IIA0000ff9920200baa4yuJ_@@@1BB9Hkd@td4aK9Z4mWWa4yh@lVIIoW7V2220WABRR2W10
414         0ifjlVW0CDjjbCQGmZ@E0Wq4400AXXB0104PAHq00Z0202ea49AFXdWjs8_xU2swndxHBmfr
415         2U4kd2C84W4Y9Bgw7HBag5YJeh8lIBg336s8ivCygwL5YzpCH00033VMKXD7yu@HJhK8194y
416         eK7YgGuh35yuA1d45GIGoI6j8unfmaae4DW51rj4W00WW7VBagnA8eW89LAua@3UaA19911F
417         _LD0J4awLn9K6a008PxRR6040APi0304jARR3000M6yOKijjDXWaa8NcscGIGY4A1Rs29AbC
418         IWC9992ORR1Foa5fj570aaaQosiJIIYMRPpc8D9ImfDR3ca89mj3Ui9G000E989XG00Waia4
419         f0900IppW790LIIImZFvq@@7aiaavT_VRQIIaut_zh11HIuUt@va49fv@W7R2G200QBRR000
420         08iljP6I208sacj5200aQxW7@V_NK60eDW080V6mLf19iYOJ1qu7100WE3KgreLkqlgU6EhS
421         f3Y6OYW79hEXTQdofQ0oC6prYygv10IBuHqsRHXSoCOT4jA8uWe1EAq0EwwthW7@V00V4800
422         C0m2A0002Enhmz2haa921uWWJM2999foIIoWwk8uHcaWaaK301WaWaYmhhgTegJWO21fgTjQ
423         ethU2Uy@W7fgYY38B9ALH11A9B93USAabaaH38Mr1H4OxL0I00bjjj90G00sssM9Z7u0400b
424         jjzBV4eRRRp400GZZ480000ijjTmZzOBac49xsajDI0aaGBbCQWfjDI4aa0l9QWGRRR6899I
425         WjjPBba4y8FscssS2GI2Q9RpE9B92jfDRWqc81toijOIYa4rcjj5Yaa4uW7F2010eJIIIA00
426         0bCI0W00Wo6D0KIIYK10004IIDEk0caaaW7tnly@78999ml@@kaca8nF@No81Y@@@jJIIYW@
427         @t@KIYa4@@67H0899PmZx0010Kjjjzl94ejjj3m004sasM4000mQRRrR000WORRu1440000j
428         jjDun@7bConqejjd22ePie1CuyicY6GZXoCxxXp4010KDm1XY2HmZa5mfP1FoSv415d06200
429         2290YrFD8un@FEHaO@O3W00oMKASyuL54OGq085Ws@j5ir9US1e088OOC2iLC01041FIMqDI
430         X4aaiaHB2U4gIvM0H99PD08GGIICekegEmWOwM8_W4YXfgLptgM3JoUCcWJcVfXY2UK4IIgI
431         nbULD0P4aARn9i40100PVRR6W10WjrjPBW300qocjD0200PFssk0oQiWW7FenHB2US5smssG
432         2IIaRORp8H9H2jeDRXC49XsoijJooQ41Xsssl9I0ssss67X8uHNiXjjv4ca4qgscPIGI4QFR
433         s298N7W0c989ITRR3Uq1C9991Fs30E1fI6BGAIIQ9Z4OII2040W5X99n67RG000GZZD4yOC_
434         p@@1P99H_z@tb4b49_pV@R2Ia4_tz@DvGIIylnH6u@@@tuu41Fk2W200rYss4020WO3RNoO1
435         qss2G10GPHRRinn62Uy@esnerHp80000200Oue3sZ9i0dc8WcgY6GfJ4ied12Yd7XsS83O00
436         Gq07DcvCZ2yKGte58O4j6TMKxAy6s5naTpc6nKgmFtEMGmZAaemD1DKIZaC4yeOH5ULq0eLT
437         01t2SGuh35d061qOmw8AiPG2Z1OG79911088Q0EYwWfRqEBuHdF5UhuVVewZB2UKijWw9EXA
438         80014Tp71QGHmZoKoe12II22UKC199AIII2aWaa5D0409993UyfuKcG000GCCV5k5M4002Yu
439         csWJA7f999IGIoAASWcaaLmZKXWaai604099A5yeM01002QWC8ajjQR0008ssgji0iaH3m00
440         GgjjlhnnH2US5sssqGII2aRPRn899n2jjT9Z5OQRh4199HZZW4yeBsosoSIJI2QRRtE9992j
441         fjW7Dmcc98IGTx67v8unQAPa002IQaqK0APS1e200DEkHmZnuV@llan2ytb4898_haH3i@@@
442         899BennH2USbI69GQRB0400GjjDT0400msssw0202MRRRmZEquO61FoVt9iij5FHIIMCDiX0
443         088Ohc3znj593BuHpM9hWQ0Y8SlUQBuc8lYf6W@AdeZ9qe9uHGI5821000H3SHmZvsQBJXXX
444         Gg0K4qmIHTV0e00Wb0KuNWCQ3n7400W52SIJ0a411853xLylB4GpnJ27Om9Lr0n2dtyJWjbi
445         403Hti4IGIoI6D0399PmZa81999unSY6m0989Hr0GW999eWwu8QW32USfuV3xnq66YnfW7@F
446         uaDhe8ZW7bg6W28119L3W3Gaaa2UyfWJSOtjXYJW20E26oMsMC0022QRBJM0000ezDxR0204
447         osyzT04yOJiXfXX4549tsoYHIoY5QBxW7DWDTIWaWmsH5HW1IIY4ORxW712brTYXa4QMs_EI
448         IIIPJRJ3989GkXf1pa448gjjDEI0Wjjj679mjjjTmZ01YJQYq8W00199QQA000WaW911Ko81
449         01H0QSiWuH8efH32Uy7SVEa091vT@VVYaWWeaH2CaimR_@_HIMM2@@@VGIII4@@@RSa0_@@@
450         1F_Z10WMfjf00G00rsqq1G1G0RPRh2888GjjiQD002UagyJ4S0WN50014UMP5yaGy87agK65
451         EGKm9B4DW117CHq0g4Gp6GG00QpfC8800javL01N0C00eDBLYQNbg1Y8Q03w5GXe1W8mfQY_
452         yii6vCuHW6Keeu4m8gG30800S404HUzKC0B0G0CeH3m2Du020W0jX9HW63z0I11DmmTBL4DG
453         Bn9WnDK6Ce21V2ymoEF1108O46BY6uct0yuw6n2xNXi1C896W2DGZDBGG400Gj13zjGCHGua
454         000a3DOuTY5K0004S2J82022d0Xg1GeunU2UCac1G8d09Yk98aWbbA991XIGIMzM14a4b899
455         1HGIoYaaaeIIIIXaaazmT0aaaa67X8unNW5Xa801HHIIIW4aaie1E0aaaLq060aaaCekb2WM
456         jJbeOGigGW00C0W11yTGK7P5DGJ9xgH11GyQZF1FEIS2PX4iaiYY20919HIoIEunjWbaa819
457         H9G33Y681O999H3yKr194xO2Xt8KG3L840mckjD0G02QsssU0G00HxPRp0604cjjDh20Wi69
458         m400GmZ5nIcM6IMGYSBAJ6919GejiP3qe89qccDL2WcWnst4BGejjzRY44yOGshoySIGI2QB
459         RnCf9f2jnDJX4b89NoebR6Ya4rcjj5ImZ9qu841F63G002dKaabCIWqaaG0001I2JI40002B
460         99Hg00GZZEW9999unTyzth3IKIYyF@lF989oy_@cpaX89yoplRQYa6uVMZ8uPIIAhH20III6
461         y8F4W0Q5ss2011GKJRR50101i5jjA0W00rssgn00enn540004yOGBZeG8p@4DTE30qx2H9KV
462         36na5qB37CDW120G001000800vWBgA9P110800004Y6mY0Qw9gT502001G040804GmMbj554
463         D4jKI2BqPm1T7HLmZDyoG3n_vKaaKyKa31DG4GG0WA1W0202GyYNDlN3@9eGq0D1Y0086Jo8
464         0014Xd1FCCHaNFX100efzBw_pfhiRO_LcALeYu4KueRWYJWYO4Eu605W0804QmM74iGq02rN
465         n6010026eW5LqAuUq_PnYe2fgQQr0W0G4Yu7LXCK7844@BQr0SGEx44SoLO199BPa09B91II
466         Io4Wa44ye1YIIIYZZW67x8uHNmIIIYWaaCQW209P9L3018889ZmRgg3MeG59Y@zf5G_eHibA
467         8OYdJE8W6QwheaYJwAGZoY6eCamaa8189hem04baa1fkGmZF1199f6W50YII49fLjLOGS2Y1
468         61OGMssc1e1GHRRVo30W49zjPR3B17OsYblAWW7RYXj5D4d40v2mMCIGIiGBPI4811IefDHf
469         K0H9Zj1FY03aaa67f8uHNiciWviWC4qIcgPQHO0QEBK21D1IEqfGt0218kTmZFW9999unT00
470         01uqaq42100GIRG6240081DHJ0000ea4Di2GZZ54221DEEHmZnur_b74a44vL@VUI8MWvdFv
471         dP1HOuqsz@a413m@i6BWu@@VZZQ4y8B0mWQqst2892GKIBI584e0iSjjA40a4rccYH00enH7
472         Wsss6yeFfDzr00o5tL3lZ@LhMCKv5N0002Yp9XuG8ur0hg5W04040bGiGq0y4GJAlgypV0fq
473         sF69DtKaNR1220uJkAYQ@cW6_uHZ6YDWdMntuLW8IqeWOoO2204Kq0EyQm2HI65200eZ2NAE
474         XAWG014ye1rCiGl184vrI7WGGRS7i7W1h6GGN3ESTHHFVI00W0WC18uF53O0004rILlFKGYA
475         80801ehBn0800Lqn1401A2D0AG2G054WGq0A004W8Ibo03004W6Pn@gLqQeTOm2BGY5G08Ws
476         IDu_12A8A1G0201duqS65082082MA2Uag9BOeib44000CSn51d4J9Z70919GIIIciaa4A889
477         2IMKab5aeHIIAuHcAbR1IGMMH3S06oI04a891FML148ipI31F_q4YZjRq1804GoyQfG3e8OW
478         34080C00P54GGr0A5yOVIGIIgem1W4aa89B0Zj0gh0C0A89PD048199X2IIID040IIICGZeg
479         EWYBdw9E1A0a008RRxp0o04ijjDR1988YssiiX402ARvbl2qjjj5yu120000RRR7yuEiibiW
480         aWa8NYsaHIG84QPRo298eIji9Oa4819iDuH6msssYIIIAunTiWifvKY4aq06YPAHI4Q0Bu2X
481         CG2EWfTnG699gTmZFquO31F63G200daqWK850APi021Gocac0W19GnJoJ5000WGIIo67FG00
482         00caaaW7tndyzFe91BmJyckaqa8nRTYNJGYWmDib@98IGm@_@VA3UC1_@@@09993US7W1aXg
483         9jb1m640niscTG3W0OJQdMe500h9PRh1000YTuX440004yOG30aNsUPDBG5TH1Kz7C55oB37
484         P0W40Wv1C01000W14WfTY284W0200G00WGH3W000002180HuaGq0n4e_AdqqJq0O4d02ZDmG
485         BHQX044uag580104EnK1SMGq0I4u4KbXLGKxajOn5naj4010WQ0a8844Y6mfg3AuUa580004
486         fWF1ej12G0Wo1COtY3G20G41XK1FQGNkZX2028QW6800GCEWL88002GJ12W00XLwJCcLaGd5
487         405060mfe188aAAw3Zd88gO5078800SVMMLKGnH3F4yOiVCOmk97GG00eD8gc_CXEMV8mMg4
488         008W44W8q02gPedWJ2H120GrIJ4SoIe1983Ui00HGIaaia819AHII2204WLSS6q2611Fw4aa
489         a0f99Pr0e0898nW7jgxXa2UCa@0G8MhdsXeX22I8122QqeWmnjwM57IYQhj4QAu4H_6meW7h
490         0IIIYaa45D991II2YaqaaKHn14Wb4Zjmfe1E02IIGD04GGIKYaa449892IGIY1FML2G7ioS1
491         7M7KS2K0620GMssc1i30GRBxs2G080zjPR3B0QGskji3W6759unLO8QR3n19Hk1i4Z4e09qo
492         se5II4aQ8poE1HoIORZZV4yeBM2MoSIJI2Q1BoEb85JDcDPZ0a89NWifP8X04tknHE2UC6G4
493         00ED9BXG000aqcYf0180IGIa40001AjGQY0qu871F6ZNnxVGHIQa7z@z9X82YV_J@cd49XJV
494         N_JWaWa@RSKaW7N1830WQIRR2W5i0C9TG74000M_cj5O3mWQ2sqA0DEMImZrKoUH300oCG3T
495         9vWdfd0008mrvDO8U3cC0i0lGOQDh_BG1W100Nj7q62K4NW180D0MDWYeRW240Wqj0DiqSO4
496         000ErvWW6cgSf5Y6mWE088QW22So910041ebsv87af31a000YB5XeslvTaF4000yhMAbAKKK
497         K9yiqDn9SXW00WQ0AuNW402004gX1HGm4200Wk4CWY00GK37aK8Knm81140e0r3BE12YWGXm
498         1uPxbmA8ujE1m8602wjf002W07gGGfRN5S@P9vMG8CDrmG8pPGmxHQrnB2T6aGl54433F97e
499         1200eBTMuq0W2kl200G0W002k1W10201H5A5MMIIbKaaG9P9hUZ01899LlL0GoooW7HenHD2
500         Uq5eiaa8889Z6e0GIMIWa4b89911IIoYaaaOGTH1400ewW5sPWXW7hg@X72jUAG001NZdmsD
501         4G000eiZUEAe2200G9YcmBC7StkMnAXMq0YLHH1W4ba8911H2oIYaae09998OIIMnM4LD048
502         B9H1III0WaaieEE0aaaLK764aQLNJZGXN25d05mW00ajljPWG00qoscj0G00GPPss0M00alz
503         oN11Fw44ca4vImsCY9IWGBPJMeKHIg5CRx4W6759uHNiIijvWWa4KGsYTIJIaQ9Rs6D9HIEq
504         PRp0099kTmZD1a00m91994G08Wqqa85100GIQYa0W00G19II4WW7RoX_lF8z99o7yl_46a8n
505         H_xVJ2YamBi@@Pf67B9unL0a00esosc0B100JQRsXa08WffPRX200eocjj2GmZDTUNOnkrHO
506         OVjWeL30a0600WFOK04G0m00SjvM1p2hL0DtLfZHj58IPFQ10000e00Gp0Z59Q1L7OGq0H4u
507         KKHHvGI80rAkJr0aPSSH4X7G1S6I88AK1W1HGya800WuDD8Q058200CNQLfO2nb6Hj@k1L7G
508         mc18KMu1nZGL0460G00A64jcBm04200H3iKObg7OhQ30Cc020W32Yu2232EPfOcFutF8EUid
509         0RzeTc92EP94baabCM0988fgtGGmIIIGT74yuI8A99H2IIM3G1amiaY681GIIY1rv4G00Wg3
510         A8hdA2UigZm831W0Gr94Shr1XwSL3yRLGW6HDSm3Qz4ua8LyQKmZNWWaaiYY888996yeKIII
511         KWaa4K3m31FALr14Cc01h9KGCU45d05Go00ajjjPG300qotkj0C02GRPssGQ02ajOBx08unc
512         OBQR3119HEXjDZWW49qYse5IG4aQ9poE1JoIORmZDP1PRp1499e0i9xKo48rIsaDQPYaS9p_
513         cXGmZG1W20m99994320Wag485110GoJYa0408G9FIJ4WW7Roju@Fe999onx@_aea9nPyhVJG
514         Yambjl@f1IGo@1Fwa00eMfjj0s040bWss18100JIRh2a00GDfD1F_K3HgDEoIH3GuRbh55o4
515         N2MLyLgL3m301042s2iP6AOpqhoD7XThr8gTaodVXe1O8unj6MoW88gIW20G9ZvL1X1H3m44
516         00020011QGMT34KHb5HG450X0WMP7xsH72ibu10MW400Ge1b5DmG1F2f000W8Vw9uU_61oXF
517         YwQN02G000qfY2T3aGWjLzqn16000YJugW7F8u4lG2IIgaiaCEE7099P5yOKB1GGGT68D99h
518         60208915KtLLkeHmZsM4n1RvYGm9I7iLQ1FQL55A8P9998r62Uq9acaaH3e05aaae1gwO222
519         sQYW6eIsosc1a00GBRxs2o080jjPR3108GsMmZGnoss62HIYSBRR69891FYWijiJKai41F_4
520         RRxKD99qajfTKW4aoIso62GIYS0RVcXD91F2b00uKB992200Gaa4a2W00eaH2018GHJIJCuH
521         dyZ@@32IIYye@lF99PIyc@wtaa89ShxxV2AuHe0M00ecqsc09020JRRs140bCIW2D0WW7tT0
522         WfNypXJ@eA8A3Y2fXhesAun6Y6Oe0QuO2J6YP6hu4GBgTr2SgiQ0EOpQbApH418001FgLDtQ
523         49PK1FcseiMqMGLt9qmHM2MgmH0Y002D8emmKF0j@ZJmpES5BE1tYAiiW79mIIYIrR68199X
524         IMIIrR4GMIICund2gZXQ0O8uHVl1G14W00xNT5W00WWJ_FuHKbcaa4R1Mr0aHW6I5dGPWJ00
525         abjzP0G0gaH20204W_sMcX10G9Z44yeJCijjXiaa8NcsaHQG24QORo219oIDiPRdWque81Fw
526         YrjDDd0aWWMoMiJJIYK3Rpt8i9IorDRR6a1F6500uS9982010Gqaaa2818G2IIZ0400G9991
527         F_aVx@VGGIMalxVz989HYFxt_cb41XZV@@JIDEMImZh0008GDjjD12000c_si3A000BIpq20
528         eaH22Uy@10E9CE760OgMXDO00nY6uWkTCOpD2UaqgIIM810280004DmG1RT_jqEK5p130Cb0
529         10Wg3M8Q062SAg8ZBBcCqg1GXrEW80jj27Vhw68uV4BYyAhTK5kKX8_jOe31muebkY6eX0q_
530         F_tSYJGPG0001FA7820004021F_r9lJ4SoI8899BPa089911FI089H9IIIGcaaiO9996yeJN
531         1GWWa459991IJIo2gZB20G01FkM88kT1X2V6tGK7HTQjI548IWwV5yORnMirL064yeo0G00A
532         Py0stsMW800APa0G00aQPRx2Uq9MsssbCk0ij5IWaaQMssEHMII4yeJssssSQGI2Q3RpE989
533         IDbDRZWc89NsijPI6yuKED99BPa09A9f0G00APy0IJIY1Fwa@x@VGGIIbCI0oII2lp@@bCQW
534         VQGoW7V2800GmZ40200KBRR78400iDjjA0200rcs6yOkxf4s00M7j31jsmmrQRX0W88WcwgX
535         0eMMAH000G15O5XqP2W002S2jQ08eeG4QJGeW7JCu_@ZQldW7XE4n@3k@@u4OEt32MQnYWJ6
536         EAt62EP9aWaWbCgW4aaauuQ8unbYm3jOOUhmuZ2EP@W7dcWaaLi5H5enQXJWM9ZN4yeJbCgH
537         mZHLou41FML9ZM4y8KbCMXVIIoW7VganC2UCt10_Fn9XsXViIIM8QWX2swy62GhSf3Y6OYW7
538         hAoBoUAuYOoYg_Hq2UCw10UkwW5k0mWx3wPF0CEQfhe1Q8un@3e9820001FQSWjb5EnP1dKM
539         9Z70999ewD2099A5yuM2IIK2USw0R@Fms@ZN4jW7b6GPRR9ZGGG9RBuHfi8IIkZ814IIIAPC
540         1qq99222R3Uy9jSIIbC2Xi8JIa4us1Fw4W0uaI6H0j00G9Z60GeaCuneyx@GMo824u@lTl99
541         HIu@tVzaKmZI1YQRps30008ijI6NWKRRRmZ@F00b0100ISIl0Q_Fun@3UyuQ0AEEXOw20aW7
542         x7400GI7XzxtF1ez@00F1800eW0808004Gp@1FALg264SIP1FgQSSFquO4abaa2U42B9991F
543         YIGTgGMIIY4aaGD0DO9991GIIImZ@VdhH1F_VmZ7ZWWai6024899r9m3WaWW2USfQCqW0W0G
544         G3x040okaH5022qgjjD4012PmZIffbGoaaaBsos82II2QPRR1999PjjjHda441ijjW7PocMs
545         cJIQQGBRRs99DHgjDPQaa01vqci43IWaus1F_40F9PIh0000ace9f0Kou140A93U4A@_xVWa
546         a40@_@xJG2Y4@@jRD99I2t@uVda8fD@7yOJ0208LRRQIW040WzDDx0248mssijG0APaWW773
547         W0WmQ5QakqF30OMCt65mkOHXSIsPKCM11fky420WWe1QAuHtBe8iobg8QW22USiPbufTgCw9
548         0ZI6vAm462UylsM190jHMnZW8lmgA16Y6m02200vBoIC7HA020Og3c2E0a8eOOciUA8uZWXH
549         AiX_AgeWG3U8WJgY6OX@aHAEXFkV0ZAbkwLWI2Ev64200NMiKm9RS302P3uGE1AqK041FA3a
550         aiagtWW4a0LmZG0999fnH8g1u09B991FM2aaa4999AIGI2aaa4991992lOY6W0GIIG1r92W2
551         000G0G3jKHCCCL6W1n18nuHGTOG154Omj084T2GX6K1808W5TS8Q08w10YW7Lz8PSY50Y0Dk
552         0f99PGg78P999uHj8899K302H3G0989e8Mj0GIGIq0N4aw91DS2404WfNEfJ0Aqsccm0000p
553         zzlF999IjjfQp0000URx@@IYaatcjj50000iD1Q0jjjD0000W@@VR2aWQ0C0yl@l3999Iijj
554         r0G0m@@@Q08G30001000_700ma000s20081000v300m80006000W8HIIYLRG209991899Lfn
555         1Yaaa8aaaK3m189991999L3080C20gmO1a000W400I2u01000bPS0aaaa2GRe9456MqWQ021
556         100OD0AqGm1n9SWjjrIaij3IIIABDi0jvoIi4B9HIU000WRpss2hsMM499910000ijjjXijj
557         LGIIoU04K3G1sMaag101ibjjxEUW6000s000S900W1004d01S100a400i101IIIISJJ9nfjj
558         LdjjDxca49P4qaDRRrsURpssJYaaK8IoICRRRZQRRR8999Xba44qsscbssMjaaa8fIGa4ORN
559         3020P995jjjL301I000C100mj000c500m4000P2008R000M34qG10DD9120481448u02Wsca
560         4Y61TKM00e9f80Au213Waaq8200u3W3GIJI_501020G0000W9999uH22QmWe_QeYY5W0002a
561         W4O802aa40al01x0KWaaaiXGIe6W3G00G4om28001g1OXg6MeH23g1u00aaaT2eWA8IJC999
562         IGI0U7e02QRW899XGG002000GfjjSh4A0ijDLaaaKu478sqs_aX3IGW0PRBa8991sam0raaa
563         O200wua00000OHII49000089H2QRhsmxJjT99IIisy@@sgjjZ6TRRYaaaGxx@FssssWijzPI
564         IIYm@@lVijDRpRRhGG0Y@@@Q080tosc899fQ0E0iljjHIII4@z@_PJIa4MIYaA9HIY@9IIs4
565         99Pz899Jaaa4xaaaWssscsttMPRRRsF9RrkjjPx_@LRlscjDMMijzsijj_ijjHFyG1OnssiD
566         ssglPRps6PhssORssMR_ssfPRRBORRRXjjjDkjjDpsssCsosimca8fsscjRJYaaRRssk9IIo
567         iPRR@A999cjjjNcEDC8241r1OGtgrUuBPeFLR2ST8a92W002w_de1O8uHKwyYdXXEeLSdIbw
568         Yq0s0110GUJA4Q031Qy422WWe1i86peYc_YespjGGq2k7jQ0MenlXQBmaMoM88LkY6GB0100
569         n9S6880W88ARODS2quI100198anr1N4dWC2200Y8gCW0G0JJCHHE641XBZOOGQ0bKKu31E1L
570         i5O4dmI0200YKvdy9beJ0AG62IMnd222IIguh0acba12g2191fO@6f302WaWeK3G3WaaiYAC
571         gg3eule42e1hmdO8ZaTwUOZMFj8W6fY6Wi0quCmMPaWaaKHH2IGII2uKhe1s0898Pd0N0aaa
572         CG3XIGGX1roG100GW6l0GG08K02G000010400010W0020WW0r045;
573     INTEGER CHECKSUM =5699;
574 ENDDATA;
575
576
577 PROCEDURE DO_EXIT USES GV;
578     IRSTOP IRPAUSE;
579     DRSTOP DRPAUSE;
580     IRSCAN 8, $81;
581     WAIT IDLE, 250 USEC;
582     IRSCAN 8, $81, CAPTURE BUFF128[7..0];
583     IF ( ! (BUFF128[2]==0) ) THEN GOTO Label_0;
584     IRSTOP IRPAUSE;
585     DRSTOP DRPAUSE;
586     IRSCAN 8, $07;
587     WAIT IDLE, 1 CYCLES;
588     WAIT IDLE, 200 USEC;
589     Label_0:
590     IRSCAN 8, $ff;
591     WAIT IDLE, 200 USEC;
592     WAIT RESET, 3 CYCLES;
593     EXIT STATUS;
594 ENDPROC;
595
596 PROCEDURE DO_READ_SECURITY USES GV;
597     IRSTOP IRPAUSE;
598     DRSTOP DRPAUSE;
599     IRSCAN 8, $a4;
600     WAIT IDLE, 3 CYCLES;
601     DRSCAN 44, $00000000000, CAPTURE SECREG[];
602     ULUWE = SECREG[ULUWE_BITLOCATION];
603     ULARE = SECREG[ULARE_BITLOCATION];
604     ULUPC = SECREG[ULUPC_BITLOCATION];
605     ULUFE = SECREG[ULUFE_BITLOCATION];
606     ULUFP = SECREG[ULUFP_BITLOCATION];
607     ULUFJ = SECREG[ULUFJ_BITLOCATION];
608     ULFLR = SECREG[ULFLR_BITLOCATION];
609     ULULR = SECREG[ULULR_BITLOCATION];
610     ULAWE = SECREG[ULAWE_BITLOCATION];
611     ULARD = SECREG[ULARD_BITLOCATION];
612     ULOPT[1] = SECREG[ULOPT1_BITLOCATION];
613     ULOPT[0] = SECREG[ULOPT0_BITLOCATION];
614 ENDPROC;
615
616 PROCEDURE DO_OUTPUT_SECURITY USES GV;
617     PRINT "Security Settings :";
618     IF ( ! (ULUFP==1) ) THEN GOTO Label_1;
619     PRINT "FlashROM Write/Erase protected by pass key.";
620     Label_1:
621     IF ( ! (ULUFJ==1) ) THEN GOTO Label_2;
622     PRINT "FlashROM Read protected by pass key.";
623     Label_2:
624     IF ( ! (ULAWE==1) ) THEN GOTO Label_3;
625     PRINT "Array Write/Erase protected by pass key.";
626     Label_3:
627     IF ( ! (ULARD==1) ) THEN GOTO Label_4;
628     PRINT "Array Verify protected by pass key.";
629     Label_4:
630     IF ( ! (ULUFE==1) ) THEN GOTO Label_5;
631     PRINT "Encrypted FlashROM Programming Enabled.";
632     Label_5:
633     IF ( ! (ULARE==1) ) THEN GOTO Label_6;
634     PRINT "Encrypted FPGA Array Programming Enabled.";
635     Label_6:
636     PRINT "=========================================";
637 ENDPROC;
638
639 PROCEDURE DO_QUERY_SECURITY USES DO_READ_SECURITY,DO_OUTPUT_SECURITY;
640     CALL DO_READ_SECURITY;
641     CALL DO_OUTPUT_SECURITY;
642 ENDPROC;
643
644 PROCEDURE READ_UROW USES BITSTREAM,GV;
645     IRSTOP IRPAUSE;
646     DRSTOP DRPAUSE;
647     IRSCAN 8, $c0;
648     WAIT IDLE, 1 CYCLES;
649     IRSTOP IRPAUSE;
650     DRSTOP DRPAUSE;
651     IRSCAN 8, $a8;
652     WAIT IDLE, 3 CYCLES;
653     WAIT IDLE, 165 USEC;
654     DRSCAN 128, $00000000000000000000000000000000, CAPTURE UROW[];
655     SUROWALGOVERSION[6..0] = $00;
656     IF ( ! ( (UROW[5]==0)&&(UROW[0]==1)) ) THEN GOTO Label_7;
657     SUROWALGOVERSION[5..4] = UROW[24..23];
658     Label_7:
659     IF ( ! ( (UROW[5]==1)&&(UROW[0]==0)) ) THEN GOTO Label_8;
660     SUROWALGOVERSION[5..4] = UROW[24..23];
661     SUROWALGOVERSION[6] = 1;
662     Label_8:
663     SUROWCHECKSUM[15..0] = UROW[127..112];
664     SUROWCYCLECOUNT = INT(UROW[111..102]);
665     SUROWDESIGNNAME[69..0] = UROW[101..32];
666     SUROWPROGMETHOD[2..0] = UROW[31..29];
667     SUROWALGOVERSION[3..0] = UROW[28..25];
668     SUROW_PKG_TYPE[5..0] = UROW[22..17];
669     SUROW_SW_VERSION[6..0] = UROW[16..10];
670     SUROWPROGRAMSW[3..0] = UROW[9..6];
671     SUROW_SRAM_DISTURB[0] = UROW[4];
672     SUROW_SPEED_GRADE[2..0] = UROW[3..1];
673     ACT_UROW_CYCLE_COUNT = SUROWCYCLECOUNT;
674 ENDPROC;
675
676 PROCEDURE FIX_INT_ARRAYS USES GV;
677     IF ( ! (HEX[0]!=48) ) THEN GOTO Label_9;
678     FOR I = 0 TO 7;
679         TEMP = HEX[I];
680         HEX[I] = HEX[(15-I)];
681         HEX[(15-I)] = TEMP;
682     NEXT I;
683     Label_9:
684     LABEL_SEPARATOR = 0;
685 ENDPROC;
686
687 PROCEDURE DISP_CHKSUM_DESIGN USES GV,FIX_INT_ARRAYS;
688     CALL FIX_INT_ARRAYS;
689     IF ( ! (INT(SUROWCHECKSUM[15..0])==65535) ) THEN GOTO Label_10;
690     PRINT "CHECKSUM: ";
691     Label_10:
692     IF ( ! (INT(SUROWCHECKSUM[15..0])!=65535) ) THEN GOTO Label_11;
693     PRINT "CHECKSUM: ",CHR$(HEX[INT(SUROWCHECKSUM[15..12])]),CHR$(HEX[INT(SUROWCHECKSUM[11..8])])
694         ,CHR$(HEX[INT(SUROWCHECKSUM[7..4])]),CHR$(HEX[INT(SUROWCHECKSUM[3..0])]);
695     Label_11:
696     IF ( ! ( ( (INT(SUROWDESIGNNAME[0..30])==2147483647)&&(INT(SUROWDESIGNNAME[31..61])==2147483647))&&(INT(SUROWDESIGNNAME[62..69])==255)) ) THEN GOTO Label_12;
697     PRINT "Design Name: ";
698     Label_12:
699     IF ( ! ( ( (INT(SUROWDESIGNNAME[0..30])!=2147483647)||(INT(SUROWDESIGNNAME[31..61])!=2147483647))||(INT(SUROWDESIGNNAME[62..69])!=255)) ) THEN GOTO Label_13;
700     PRINT "Design Name: ",CHR$(INT(SUROWDESIGNNAME[63..69])),CHR$(INT(SUROWDESIGNNAME[56..62]))
701         ,CHR$(INT(SUROWDESIGNNAME[49..55])),CHR$(INT(SUROWDESIGNNAME[42..48])),CHR$(INT(SUROWDESIGNNAME[35..41]))
702         ,CHR$(INT(SUROWDESIGNNAME[28..34])),CHR$(INT(SUROWDESIGNNAME[21..27])),CHR$(INT(SUROWDESIGNNAME[14..20]))
703         ,CHR$(INT(SUROWDESIGNNAME[7..13])),CHR$(INT(SUROWDESIGNNAME[0..6]));
704     Label_13:
705     LABEL_SEPARATOR = 0;
706 ENDPROC;
707
708 PROCEDURE DISPLAY_UROW USES BITSTREAM,CONSTBLOCK,GV,DISP_CHKSUM_DESIGN;
709     EXPORT "USER_ROW", UROW[127..0];
710     PRINT "User information: ";
711     CALL DISP_CHKSUM_DESIGN;
712     IF ( ! (FLAGDISPLAYCYC==1) ) THEN GOTO Label_14;
713     PRINT "CYCLE COUNT: ",SUROWCYCLECOUNT;
714     Label_14:
715     INTEGER TMPINT =INT(SUROWPROGMETHOD[]);
716     INTEGER TMPINT2 =0;
717     INTEGER TMPINT3 =0;
718     INTEGER TMPINT4 =0;
719     INTEGER TMPINT5 =0;
720     IF ( ! (TMPINT==IEEE1532) ) THEN GOTO Label_15;
721     PRINT "Programming Method: IEEE1532";
722     Label_15:
723     IF ( ! (TMPINT==STAPL) ) THEN GOTO Label_16;
724     PRINT "Programming Method: STAPL";
725     Label_16:
726     IF ( ! (TMPINT==DIRECTC) ) THEN GOTO Label_17;
727     PRINT "Programming Method: DirectC";
728     Label_17:
729     IF ( ! (TMPINT==PDB) ) THEN GOTO Label_18;
730     PRINT "Programming Method: PDB";
731     Label_18:
732     IF ( ! (TMPINT==SVF) ) THEN GOTO Label_19;
733     PRINT "Programming Method: SVF";
734     Label_19:
735     IF ( ! (TMPINT==IAP) ) THEN GOTO NOT_IAP;
736     PRINT "Progarmming Method: IAP";
737     NOT_IAP:
738     PRINT "Algorithm Version: ",INT(SUROWALGOVERSION[6..0]);
739     TMPINT = INT(SUROW_PKG_TYPE[]);
740     IF ( ! (TMPINT==UNSPECIFIED) ) THEN GOTO Label_20;
741     PRINT "Device Package Type: package information not available from device";
742     Label_20:
743     IF ( ! (TMPINT==QN132) ) THEN GOTO Label_21;
744     PRINT "Device Package Type: QN132/QNG132";
745     Label_21:
746     IF ( ! (TMPINT==VQ100) ) THEN GOTO Label_22;
747     PRINT "Device Package Type: VQ100/VQG100";
748     Label_22:
749     IF ( ! (TMPINT==TQ144) ) THEN GOTO Label_23;
750     PRINT "Device Package Type: TQ144/TQG144";
751     Label_23:
752     IF ( ! (TMPINT==PQ208) ) THEN GOTO Label_24;
753     PRINT "Device Package Type: PQ208/PQG208";
754     Label_24:
755     IF ( ! (TMPINT==FG144) ) THEN GOTO Label_25;
756     PRINT "Device Package Type: FG144/FGG144";
757     Label_25:
758     IF ( ! (TMPINT==FG256) ) THEN GOTO Label_26;
759     PRINT "Device Package Type: FG256/FGG256";
760     Label_26:
761     IF ( ! (TMPINT==FG484) ) THEN GOTO Label_27;
762     PRINT "Device Package Type: FG484/FGG484";
763     Label_27:
764     IF ( ! (TMPINT==FG676) ) THEN GOTO Label_28;
765     PRINT "Device Package Type: FG676/FGG676";
766     Label_28:
767     IF ( ! (TMPINT==FG896) ) THEN GOTO Label_29;
768     PRINT "Device Package Type: FG896/FGG896";
769     Label_29:
770     IF ( ! (TMPINT==QN108) ) THEN GOTO Label_30;
771     PRINT "Device Package Type: QN108/QNG108";
772     Label_30:
773     IF ( ! (TMPINT==QN180) ) THEN GOTO Label_31;
774     PRINT "Device Package Type: QN180/QNG180";
775     Label_31:
776     IF ( ! (TMPINT==TQ100) ) THEN GOTO Label_32;
777     PRINT "Device Package Type: TQ100/TQG100";
778     Label_32:
779     IF ( ! (TMPINT==CQ208) ) THEN GOTO Label_33;
780     PRINT "Device Package Type: CQ208/CQG208";
781     Label_33:
782     IF ( ! (TMPINT==FG1152) ) THEN GOTO Label_34;
783     PRINT "Device Package Type: FG1152/FGG1152";
784     Label_34:
785     IF ( ! (TMPINT==BG456) ) THEN GOTO Label_35;
786     PRINT "Device Package Type: BG456/BGG456";
787     Label_35:
788     IF ( ! (TMPINT==UNDEFINED) ) THEN GOTO Label_36;
789     PRINT "Device Package Type: package information not available from device";
790     Label_36:
791     TMPINT = INT(SUROW_SPEED_GRADE[]);
792     IF ( ! (TMPINT==GRADE_UNSPEC) ) THEN GOTO Label_37;
793     PRINT "Device Speed Grade: speed grade information not available from device";
794     Label_37:
795     IF ( ! (TMPINT==GRADE_1) ) THEN GOTO Label_38;
796     PRINT "Device Speed Grade: -1";
797     Label_38:
798     IF ( ! (TMPINT==GRADE_2) ) THEN GOTO Label_39;
799     PRINT "Device Speed Grade: -2";
800     Label_39:
801     IF ( ! (TMPINT==GRADE_3) ) THEN GOTO Label_40;
802     PRINT "Device Speed Grade: -3";
803     Label_40:
804     IF ( ! (TMPINT==GRADE_F) ) THEN GOTO Label_41;
805     PRINT "Device Speed Grade: -F";
806     Label_41:
807     IF ( ! (TMPINT==GRADE_STD) ) THEN GOTO Label_42;
808     PRINT "Device Speed Grade: STD";
809     Label_42:
810     IF ( ! (TMPINT==GRADE_4) ) THEN GOTO Label_43;
811     PRINT "Device Speed Grade: -4";
812     Label_43:
813     IF ( ! (TMPINT==GRADE_UNDEF) ) THEN GOTO Label_44;
814     PRINT "Device Speed Grade: speed grade information not available from device";
815     Label_44:
816     TMPINT = INT(SUROWPROGRAMSW[]);
817     IF ( ! (TMPINT==FP) ) THEN GOTO Label_45;
818     PRINT "Programmer: FlashPro";
819     Label_45:
820     IF ( ! (TMPINT==FPLITE) ) THEN GOTO Label_46;
821     PRINT "Programmer: FlashPro Lite";
822     Label_46:
823     IF ( ! (TMPINT==FP3) ) THEN GOTO Label_47;
824     PRINT "Programmer: FlashPro3";
825     Label_47:
826     IF ( ! (TMPINT==FP4) ) THEN GOTO Label_48;
827     PRINT "Programmer: FlashPro4";
828     Label_48:
829     IF ( ! (TMPINT==SCULPTW) ) THEN GOTO Label_49;
830     PRINT "Programmer: SiliconSculptor II";
831     Label_49:
832     IF ( ! (TMPINT==BPW) ) THEN GOTO Label_50;
833     PRINT "Programmer: BP Programmer";
834     Label_50:
835     IF ( ! (TMPINT==DIRECTCP) ) THEN GOTO Label_51;
836     PRINT "Programmer: DirectC";
837     Label_51:
838     IF ( ! (TMPINT==STP) ) THEN GOTO Label_52;
839     PRINT "Programmer: Actel JAM Player";
840     Label_52:
841     IF ( ! ( ( ( (TMPINT==FP)||(TMPINT==FPLITE))||(TMPINT==FP3))||(TMPINT==FP4)) ) THEN GOTO Label_68;
842     TMPINT2 = INT(SUROW_SW_VERSION[]);
843     IF ( ! (TMPINT2==FP33) ) THEN GOTO Label_53;
844     PRINT "Software: FlashPro v3.3";
845     Label_53:
846     IF ( ! (TMPINT2==FP34) ) THEN GOTO Label_54;
847     PRINT "Software: FlashPro v3.4";
848     Label_54:
849     IF ( ! (TMPINT2==FP40) ) THEN GOTO Label_55;
850     PRINT "Software: FlashPro v4.0";
851     Label_55:
852     IF ( ! (TMPINT2==FP41) ) THEN GOTO Label_56;
853     PRINT "Software: FlashPro v4.1";
854     Label_56:
855     IF ( ! (TMPINT2==FP42) ) THEN GOTO Label_57;
856     PRINT "Software: FlashPro v4.2";
857     Label_57:
858     IF ( ! (TMPINT2==FP50) ) THEN GOTO Label_58;
859     PRINT "Software: FlashPro v5.0";
860     Label_58:
861     IF ( ! (TMPINT2==FP51) ) THEN GOTO Label_59;
862     PRINT "Software: FlashPro v5.1";
863     Label_59:
864     IF ( ! (TMPINT2==FP60) ) THEN GOTO Label_60;
865     PRINT "Software: FlashPro v6.0";
866     Label_60:
867     IF ( ! (TMPINT2==FP61) ) THEN GOTO Label_61;
868     PRINT "Software: FlashPro v6.1";
869     Label_61:
870     IF ( ! (TMPINT2==FP62) ) THEN GOTO Label_62;
871     PRINT "Software: FlashPro v6.2";
872     Label_62:
873     IF ( ! (TMPINT2==FP84) ) THEN GOTO Label_63;
874     PRINT "Software: FlashPro v8.4";
875     Label_63:
876     IF ( ! (TMPINT2==FP85) ) THEN GOTO Label_64;
877     PRINT "Software: FlashPro v8.5";
878     Label_64:
879     IF ( ! (TMPINT2==FP86) ) THEN GOTO Label_65;
880     PRINT "Software: FlashPro v8.6";
881     Label_65:
882     IF ( ! (TMPINT2==FP90) ) THEN GOTO Label_66;
883     PRINT "Software: FlashPro v9.0";
884     Label_66:
885     IF ( ! (TMPINT2==FP91) ) THEN GOTO NOT_FP91;
886     PRINT "Software: FlashPro v9.1";
887     NOT_FP91:
888     IF ( ! (TMPINT2==UNKNOWN) ) THEN GOTO Label_67;
889     PRINT "Software: FlashPro vX.X";
890     Label_67:
891     LABEL_SEPARATOR = 0;
892     Label_68:
893     IF ( ! ( (TMPINT==SCULPTW)||(TMPINT==BPW)) ) THEN GOTO Label_72;
894     TMPINT3 = (INT(SUROW_SW_VERSION[6..5])+SCULPTORMAJORBASE);
895     TMPINT4 = (INT(SUROW_SW_VERSION[4..1])+SCULPTORMINORBASE);
896     TMPINT5 = 0;
897     IF ( ! (SUROW_SW_VERSION[0]==1) ) THEN GOTO Label_69;
898     TMPINT5 = 1;
899     Label_69:
900     IF ( ! (TMPINT==SCULPTW) ) THEN GOTO Label_70;
901     PRINT "Software: Sculptor Win v",TMPINT3,".",TMPINT4,".",TMPINT5;
902     Label_70:
903     IF ( ! (TMPINT==BPW) ) THEN GOTO Label_71;
904     PRINT "Software: BP Win v",TMPINT3,".",TMPINT4,".",TMPINT5;
905     Label_71:
906     LABEL_SEPARATOR = 0;
907     Label_72:
908     PRINT "=========================================";
909 ENDPROC;
910
911 PROCEDURE READ_F_ROW USES GV;
912     IRSTOP IRPAUSE;
913     DRSTOP DRPAUSE;
914     IRSCAN 8, $c0;
915     WAIT IDLE, 1 CYCLES;
916     IRSTOP IRPAUSE;
917     DRSTOP DRPAUSE;
918     IRSCAN 8, $f9;
919     DRSCAN 3, FADDR[];
920     WAIT IDLE, 1 CYCLES;
921     IRSTOP IRPAUSE;
922     DRSTOP DRPAUSE;
923     IRSCAN 8, $bf;
924     WAIT IDLE, 3 CYCLES;
925     WAIT IDLE, 165 USEC;
926     DRSCAN 128, $00000000000000000000000000000000, CAPTURE BUFF128[];
927 ENDPROC;
928
929 PROCEDURE DO_DEVICE_INFO USES GV,READ_UROW,DISPLAY_UROW,READ_F_ROW;
930     IRSTOP IRPAUSE;
931     DRSTOP DRPAUSE;
932     IRSCAN 8, $0e;
933     WAIT IDLE, 1 CYCLES;
934     DRSCAN 32, $00000000, CAPTURE BUFF32[];
935     EXPORT "SILSIG", BUFF32[];
936     IRSCAN 8, $84, CAPTURE BUFF128[7..0];
937     IF ( ! (BUFF128[2]==1) ) THEN GOTO CORE_NOT_ENABLED;
938     PRINT "FPGA Array is programmed and enabled.";
939     CORE_NOT_ENABLED:
940     IF ( ! (BUFF128[2]==0) ) THEN GOTO CORE_ENABLED;
941     PRINT "FPGA Array is not enabled.";
942     CORE_ENABLED:
943     CALL READ_UROW;
944     CALL DISPLAY_UROW;
945     FADDR[] = $0;
946     CALL READ_F_ROW;
947     EXPORT "FSN", BUFF128[55..8];
948     PRINT "=========================================";
949 ENDPROC;
950
951 PROCEDURE INIT_AES;
952     IRSTOP IRPAUSE;
953     DRSTOP DRPAUSE;
954     IRSCAN 8, $dd;
955     DRSCAN 128, $00000000000000000000000000000000;
956     WAIT IDLE, 3 CYCLES;
957     WAIT IDLE, 165 USEC;
958 ENDPROC;
959
960 PROCEDURE DO_VERIFY_DEVICE_INFO USES GV,BITSTREAM,DO_EXIT,DO_READ_SECURITY,READ_UROW
961     ,DISP_CHKSUM_DESIGN;
962     CALL READ_UROW;
963     CALL DISP_CHKSUM_DESIGN;
964     CALL DO_READ_SECURITY;
965     BUFF32[31..0] = BOOL(CHECKSUM);
966     UROW[127..112] = BUFF32[15..0];
967     UROW[101..32] = ACT_UROW_DESIGN_NAME[69..0];
968     IRSTOP IRPAUSE;
969     DRSTOP DRPAUSE;
970     IRSCAN 8, $c0;
971     WAIT IDLE, 1 CYCLES;
972     IRSTOP IRPAUSE;
973     DRSTOP DRPAUSE;
974     IRSCAN 8, $a8;
975     WAIT IDLE, 3 CYCLES;
976     WAIT IDLE, 165 USEC;
977     DRSCAN 128, $00000000000000000000000000000000,COMPARE UROW[],$ffff003fffffffffffffffff00000000
978         ,PASS;
979     IF ( ! (PASS==0) ) THEN GOTO UROW_CMP_OK;
980     STATUS = -43;
981     PRINT "Failed to verify design information.";
982     UNIQUEEXITCODE = 32772;
983     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
984     EXPORT "ERROR_CODE", BUFF128[15..0];
985     CALL DO_EXIT;
986     UROW_CMP_OK:
987     LABEL_SEPARATOR = 0;
988 ENDPROC;
989
990 PROCEDURE READ_IDCODE_ONLY USES GV;
991     IRSTOP IRPAUSE;
992     DRSTOP DRPAUSE;
993     IRSCAN 8, $0f;
994     WAIT IDLE, 1 CYCLES;
995     DRSCAN 32, $00000000, CAPTURE ID[];
996     EXPORT "IDCODE", ID[];
997 ENDPROC;
998
999 PROCEDURE VERIFY_RLOCK USES GV;
1000     IRSCAN 8, $84,COMPARE $04,$04,PASS;
1001 ENDPROC;
1002
1003 PROCEDURE DO_VERIFY_PGM_RLOCK USES GV,DO_EXIT,VERIFY_RLOCK;
1004     CALL VERIFY_RLOCK;
1005     IF ( ! (PASS==0) ) THEN GOTO RLOCK_PGM_PASS;
1006     STATUS = 10;
1007     PRINT "Failed to enable FPGA Array.";
1008     UNIQUEEXITCODE = 32891;
1009     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1010     EXPORT "ERROR_CODE", BUFF128[15..0];
1011     CALL DO_EXIT;
1012     RLOCK_PGM_PASS:
1013     LABEL_SEPARATOR = 0;
1014 ENDPROC;
1015
1016 PROCEDURE DO_VERIFY_RLOCK USES GV,DO_EXIT,VERIFY_RLOCK;
1017     CALL VERIFY_RLOCK;
1018     IF ( ! (PASS==0) ) THEN GOTO RLOCK_VERIFY_PASS;
1019     STATUS = 11;
1020     PRINT "FPGA Array is not enabled.";
1021     UNIQUEEXITCODE = 32892;
1022     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1023     EXPORT "ERROR_CODE", BUFF128[15..0];
1024     CALL DO_EXIT;
1025     RLOCK_VERIFY_PASS:
1026     LABEL_SEPARATOR = 0;
1027 ENDPROC;
1028
1029 PROCEDURE VERIFY_ID_DMK USES GV,DO_EXIT,INIT_AES;
1030     CALL INIT_AES;
1031     IRSTOP IRPAUSE;
1032     DRSTOP DRPAUSE;
1033     IRSCAN 8, $0a;
1034     DRSCAN 128, M7BUFF[];
1035     WAIT IDLE, 3 CYCLES;
1036     WAIT IDLE, 90 USEC;
1037     DRSCAN 128, $00000000000000000000000000000000, CAPTURE BUFF128[],COMPARE $c0000000000000000000000000000000
1038         ,$c0000000000000000000000000000000,PASS;
1039     IF ( ! (BUFF128[127]==0) ) THEN GOTO M7VERDONE;
1040     STATUS = -31;
1041     PRINT "Failed to verify AES Sec.";
1042     UNIQUEEXITCODE = 32775;
1043     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1044     EXPORT "ERROR_CODE", BUFF128[15..0];
1045     CALL DO_EXIT;
1046     M7VERDONE:
1047     IF ( ! ( (BUFF128[126]==0)||(BM7DEVICE==0)) ) THEN GOTO MXIDOK;
1048     IF ( ! ( (BUFF128[126]==1)&&(BM7DEVICE==0)) ) THEN GOTO LDETECTM1;
1049     STATUS = 6;
1050     PRINT "Failed to verify IDCODE.";
1051     PRINT "Target is an M7 device.";
1052     UNIQUEEXITCODE = 32776;
1053     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1054     EXPORT "ERROR_CODE", BUFF128[15..0];
1055     CALL DO_EXIT;
1056     LDETECTM1:
1057     IF ( ! (BUFF128[126]==0) ) THEN GOTO Label_75;
1058     IRSTOP IRPAUSE;
1059     DRSTOP DRPAUSE;
1060     IRSCAN 8, $0a;
1061     DRSCAN 128, M1BUFF[];
1062     WAIT IDLE, 3 CYCLES;
1063     WAIT IDLE, 90 USEC;
1064     DRSCAN 128, $00000000000000000000000000000000, CAPTURE BUFF128[],COMPARE $c0000000000000000000000000000000
1065         ,$c0000000000000000000000000000000,PASS;
1066     IF ( ! (BUFF128[127]==0) ) THEN GOTO M1VERDONE;
1067     STATUS = -31;
1068     PRINT "Failed to verify AES Sec.";
1069     UNIQUEEXITCODE = 32777;
1070     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1071     EXPORT "ERROR_CODE", BUFF128[15..0];
1072     CALL DO_EXIT;
1073     M1VERDONE:
1074     BOOLEAN BTMPBUFFBIT126 = BUFF128[126];
1075     IF ( ! ( (BTMPBUFFBIT126==1)&&(BM1DEVICE==0)) ) THEN GOTO REGDEV;
1076     STATUS = 6;
1077     PRINT "Failed to verify IDCODE.";
1078     PRINT "Target is an M1 device.";
1079     UNIQUEEXITCODE = 32778;
1080     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1081     EXPORT "ERROR_CODE", BUFF128[15..0];
1082     CALL DO_EXIT;
1083     REGDEV:
1084     IF ( ! ( (BTMPBUFFBIT126==0)&&(BM7DEVICE==1)) ) THEN GOTO Label_73;
1085     STATUS = 6;
1086     PRINT "Failed to verify IDCODE.";
1087     PRINT "The Target is not an M7 Device.";
1088     UNIQUEEXITCODE = 32781;
1089     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1090     EXPORT "ERROR_CODE", BUFF128[15..0];
1091     CALL DO_EXIT;
1092     Label_73:
1093     IF ( ! ( (BTMPBUFFBIT126==0)&&(BM1DEVICE==1)) ) THEN GOTO Label_74;
1094     STATUS = 6;
1095     PRINT "Failed to verify IDCODE.";
1096     PRINT "The Target is not an M1 Device.";
1097     UNIQUEEXITCODE = 32782;
1098     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1099     EXPORT "ERROR_CODE", BUFF128[15..0];
1100     CALL DO_EXIT;
1101     Label_74:
1102     LABEL_SEPARATOR = 0;
1103     Label_75:
1104     LABEL_SEPARATOR = 0;
1105     MXIDOK:
1106     LABEL_SEPARATOR = 0;
1107 ENDPROC;
1108
1109 PROCEDURE VERIFY_IDCODE USES GV,PARAMETERS,DO_EXIT;
1110     FREQUENCY (FREQ*1000000);
1111     WAIT RESET, 5 CYCLES;
1112     IRSTOP IRPAUSE;
1113     DRSTOP DRPAUSE;
1114     IRSCAN 8, $0f;
1115     DRSCAN 32, $00000000;
1116     WAIT IDLE, 1 CYCLES;
1117     DRSCAN 32, $00000000, CAPTURE ID[],COMPARE IDCODEVALUE[],IDMASK[],PASS;
1118     IF ( ! (PASS==0) ) THEN GOTO IDOK;
1119     STATUS = 6;
1120     PRINT "Failed to verify IDCODE";
1121     UNIQUEEXITCODE = 32797;
1122     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1123     EXPORT "ERROR_CODE", BUFF128[15..0];
1124     CALL DO_EXIT;
1125     IDOK:
1126     IDREV = INT(ID[31..28]);
1127     IDFAB = INT(ID[24..24]);
1128 ENDPROC;
1129
1130 PROCEDURE IS_SECOK USES GV,DO_EXIT;
1131     IF ( ! (SECKEY_OK==0) ) THEN GOTO SECOK;
1132     STATUS = -35;
1133     PRINT "Failed to match pass key.";
1134     UNIQUEEXITCODE = 32799;
1135     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1136     EXPORT "ERROR_CODE", BUFF128[15..0];
1137     CALL DO_EXIT;
1138     SECOK:
1139     LABEL_SEPARATOR = 0;
1140 ENDPROC;
1141
1142 PROCEDURE DO_CHECK_R USES GV,DO_EXIT,DO_READ_SECURITY;
1143     CALL DO_READ_SECURITY;
1144     IF ( ! (ULARE==1) ) THEN GOTO ARRAYEPR;
1145     STATUS = -33;
1146     PRINT "FPGA Array Encryption is enforced. Plain text verification is prohibited.";
1147     UNIQUEEXITCODE = 32800;
1148     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1149     EXPORT "ERROR_CODE", BUFF128[15..0];
1150     CALL DO_EXIT;
1151     ARRAYEPR:
1152     IF ( ! (ULARD==1) ) THEN GOTO SKIPRCHK1;
1153     STATUS = -30;
1154     PRINT "FPGA Array Verification is protected by pass key.";
1155     PRINT "A valid pass key needs to be provided.";
1156     UNIQUEEXITCODE = 32804;
1157     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1158     EXPORT "ERROR_CODE", BUFF128[15..0];
1159     CALL DO_EXIT;
1160     SKIPRCHK1:
1161     IF ( ! (ULARD==0) ) THEN GOTO Label_76;
1162     CHKSEC = 0;
1163     Label_76:
1164     LABEL_SEPARATOR = 0;
1165 ENDPROC;
1166
1167 PROCEDURE DO_CHECK_W USES GV,DO_EXIT,DO_READ_SECURITY;
1168     CALL DO_READ_SECURITY;
1169     IF ( ! (ULAWE==1) ) THEN GOTO ARRAYWP;
1170     STATUS = -28;
1171     PRINT "FPGA Array Write/Erase is protected by pass key.";
1172     PRINT "A valid pass key needs to be provided.";
1173     UNIQUEEXITCODE = 32805;
1174     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1175     EXPORT "ERROR_CODE", BUFF128[15..0];
1176     CALL DO_EXIT;
1177     ARRAYWP:
1178     IF ( ! (ULARD==1) ) THEN GOTO ARRAYRPW;
1179     STATUS = -30;
1180     PRINT "FPGA Array Verification is protected by pass key.";
1181     PRINT "A valid pass key needs to be provided.";
1182     UNIQUEEXITCODE = 32806;
1183     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1184     EXPORT "ERROR_CODE", BUFF128[15..0];
1185     CALL DO_EXIT;
1186     ARRAYRPW:
1187     IF ( ! (ULARE==1) ) THEN GOTO ARRAYEPW;
1188     STATUS = -33;
1189     PRINT "FPGA Array Encryption is enforced. Plain text programming is prohibited.";
1190     CALL DO_EXIT;
1191     ARRAYEPW:
1192     LABEL_SEPARATOR = 0;
1193 ENDPROC;
1194
1195 PROCEDURE BP_VER USES GV;
1196     BOOLEAN PLAYER_VERSION_BOOLEAN[32];
1197     PLAYER_VERSION_BOOLEAN[31..0] = BOOL(PLAYERVERSIONVARIABLE);
1198     INTEGER PLAYER_MAJOR_VERSION =(INT(PLAYER_VERSION_BOOLEAN[23..16])-SCULPTORMAJORBASE);
1199     INTEGER PLAYER_MINOR_VERSION =(INT(PLAYER_VERSION_BOOLEAN[15..8])-SCULPTORMINORBASE);
1200     ACT_UROW_SW_VERSION[6..5] = BOOL(PLAYER_MAJOR_VERSION);
1201     ACT_UROW_SW_VERSION[4..1] = BOOL(PLAYER_MINOR_VERSION);
1202     ACT_UROW_SW_VERSION[0] = PLAYER_VERSION_BOOLEAN[0];
1203 ENDPROC;
1204
1205 PROCEDURE SET_PRG_ARRAY USES GV;
1206     ISPRGARRAY = 1;
1207 ENDPROC;
1208
1209 PROCEDURE DO_INITIALIZE USES GV,DO_EXIT,READ_F_ROW,VERIFY_ID_DMK,DO_CHECK_R,DO_CHECK_W
1210     ,BP_VER;
1211     IRSTOP IRPAUSE;
1212     DRSTOP DRPAUSE;
1213     IRSCAN 8, $7f;
1214     WAIT IDLE, 3 CYCLES;
1215     WAIT IDLE, 50 USEC;
1216     BSR[707..0] = BSRPATTERN[707..0];
1217     BOOLEAN SHIFT_DATA[708];
1218     IRSCAN 8, $01;
1219     DRSCAN 708, BSR[];
1220     WAIT IDLE, 1 CYCLES;
1221     DRSCAN 708, SHIFT_DATA[], CAPTURE SAMPLE_DEVICE[];
1222     FOR I = 0 TO 707;
1223         IF ( ! (SAMPLEMASK[I]==1) ) THEN GOTO Label_77;
1224         BSR[I] = SAMPLE_DEVICE[I];
1225         Label_77:
1226         LABEL_SEPARATOR = 0;
1227     NEXT I;
1228     IRSTOP IRPAUSE;
1229     DRSTOP DRPAUSE;
1230     IRSCAN 8, $01;
1231     DRSCAN 708, BSR[];
1232     WAIT IDLE, 1 CYCLES;
1233     IRSTOP IRPAUSE;
1234     DRSTOP DRPAUSE;
1235     IRSCAN 8, $c0;
1236     WAIT IDLE, 1 CYCLES;
1237     IRSTOP IRPAUSE;
1238     DRSTOP DRPAUSE;
1239     IRSCAN 8, $80;
1240     DRSCAN 18, $00000;
1241     WAIT IDLE, 3 CYCLES;
1242     WAIT IDLE, 1875 USEC;
1243     DRSCAN 18, $00000, CAPTURE ISC_CONFIG_RESULT[],COMPARE $30000,$30000,PASS;
1244     IF ( ! (PASS==0) ) THEN GOTO CRCOK;
1245     STATUS = 5;
1246     PRINT "Failed to enter programming mode.";
1247     EXPORT "ISC_Config_Result", ISC_CONFIG_RESULT[];
1248     UNIQUEEXITCODE = 32850;
1249     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1250     EXPORT "ERROR_CODE", BUFF128[15..0];
1251     CALL DO_EXIT;
1252     CRCOK:
1253     FADDR[] = $0;
1254     CALL READ_F_ROW;
1255     EXPORT "FSN", BUFF128[55..8];
1256     CALL VERIFY_ID_DMK;
1257     IF ( ! (CHKARRAY==1) ) THEN GOTO SKIPCHKARRAY;
1258     IF ( ! (ARRAYRONLY==0) ) THEN GOTO Label_78;
1259     CALL DO_CHECK_W;
1260     Label_78:
1261     IF ( ! (ARRAYRONLY==1) ) THEN GOTO Label_79;
1262     CALL DO_CHECK_R;
1263     Label_79:
1264     LABEL_SEPARATOR = 0;
1265     SKIPCHKARRAY:
1266     IF ( ! (PLAYERVERSIONVARIABLE!=0) ) THEN GOTO Label_80;
1267     CALL BP_VER;
1268     Label_80:
1269     LABEL_SEPARATOR = 0;
1270 ENDPROC;
1271
1272 PROCEDURE READ_INITIALIZE USES GV,DO_INITIALIZE;
1273     CHKFROM = 0;
1274     CHKARRAY = 0;
1275     CHKNVM = 0;
1276     CHKSEC = 0;
1277     CALL DO_INITIALIZE;
1278 ENDPROC;
1279
1280 PROCEDURE NW_INITIALIZE_COMMON USES GV;
1281     CHKFROM = 0;
1282     CHKARRAY = 0;
1283 ENDPROC;
1284
1285 PROCEDURE NW_INITIALIZE USES DO_INITIALIZE,NW_INITIALIZE_COMMON;
1286     CALL NW_INITIALIZE_COMMON;
1287     CALL DO_INITIALIZE;
1288 ENDPROC;
1289
1290 PROCEDURE NR_INITIALIZE_COMMON USES GV;
1291     CHKFROM = 0;
1292     CHKARRAY = 0;
1293 ENDPROC;
1294
1295 PROCEDURE NR_INITIALIZE USES DO_INITIALIZE,NR_INITIALIZE_COMMON;
1296     CALL NR_INITIALIZE_COMMON;
1297     CALL DO_INITIALIZE;
1298 ENDPROC;
1299
1300 PROCEDURE AW_INITIALIZE USES GV,DO_INITIALIZE;
1301     ARRAYRONLY = 0;
1302     CHKFROM = 0;
1303     CHKARRAY = 1;
1304     CHKNVM = 0;
1305     CALL DO_INITIALIZE;
1306 ENDPROC;
1307
1308 PROCEDURE AR_INITIALIZE USES GV,DO_INITIALIZE;
1309     ARRAYRONLY = 1;
1310     CHKFROM = 0;
1311     CHKARRAY = 1;
1312     CHKNVM = 0;
1313     CALL DO_INITIALIZE;
1314 ENDPROC;
1315
1316 PROCEDURE W_INITIALIZE USES GV,DO_INITIALIZE;
1317     ARRAYRONLY = 0;
1318     CHKARRAY = 1;
1319     CALL DO_INITIALIZE;
1320 ENDPROC;
1321
1322 PROCEDURE R_INITIALIZE USES GV,DO_INITIALIZE;
1323     ARRAYRONLY = 1;
1324     CHKARRAY = 1;
1325     CALL DO_INITIALIZE;
1326 ENDPROC;
1327
1328 PROCEDURE INITIALIZE USES GV,DO_INITIALIZE;
1329     ARRAYRONLY = 0;
1330     FROMRONLY = 0;
1331     CHKFROM = 1;
1332     CHKARRAY = 1;
1333     CALL DO_INITIALIZE;
1334 ENDPROC;
1335
1336 PROCEDURE POLL_ERASE USES GV;
1337     PASS = 0;
1338     INTEGER ILOOP_0;
1339     FOR ILOOP_0 = 262141 - 1 TO 0 STEP -1;
1340         IRSTOP IRPAUSE;
1341         DRSTOP DRPAUSE;
1342         IRSCAN 8, $84;
1343         WAIT IDLE, 1 CYCLES;
1344         WAIT IDLE, 1000 USEC;
1345         DRSCAN 5, $00,COMPARE $00,$03,PASS;
1346         IF PASS THEN ILOOP_0 = 0;
1347     NEXT ILOOP_0;
1348 ENDPROC;
1349
1350 PROCEDURE POLL_PROGRAM USES GV;
1351     INTEGER ILOOP_1;
1352     FOR ILOOP_1 = 16381 - 1 TO 0 STEP -1;
1353         IRSTOP IRPAUSE;
1354         DRSTOP DRPAUSE;
1355         IRSCAN 8, $84;
1356         WAIT IDLE, 1 CYCLES;
1357         WAIT IDLE, 100 USEC;
1358         DRSCAN 5, $00,COMPARE $00,$0b,PASS;
1359         IF PASS THEN ILOOP_1 = 0;
1360     NEXT ILOOP_1;
1361 ENDPROC;
1362
1363 PROCEDURE PROGRAM_UROW USES GV,BITSTREAM,DO_EXIT,POLL_PROGRAM;
1364     FOR FROMROWNUMBER = NUMBEROFFROMROWS TO 1 STEP -1;
1365         IRSTOP IRPAUSE;
1366         DRSTOP DRPAUSE;
1367         IRSCAN 8, $9f;
1368         DRSCAN 3, BOOL((FROMROWNUMBER-1));
1369         WAIT IDLE, 1 CYCLES;
1370         IRSTOP IRPAUSE;
1371         DRSTOP DRPAUSE;
1372         IRSCAN 8, $9b;
1373         DRSCAN 128, $ffffffffffffffffffffffffffffffff;
1374         WAIT IDLE, 5 CYCLES;
1375         WAIT IDLE, 10000 USEC;
1376     NEXT FROMROWNUMBER;
1377     IF ( ! (ISERASEONLY==0) ) THEN GOTO SKIP_CYC_INCREMENT;
1378     IF ( ! ( (ISPRGARRAY==1)&&(ACT_UROW_CYCLE_COUNT!=1023)) ) THEN GOTO Label_81;
1379     ACT_UROW_CYCLE_COUNT = (ACT_UROW_CYCLE_COUNT+1);
1380     Label_81:
1381     LABEL_SEPARATOR = 0;
1382     SKIP_CYC_INCREMENT:
1383     IF ( ! (ISERASEONLY==1) ) THEN GOTO Label_82;
1384     UROW[] = $ffffffffffffffffffffffffffffffff;
1385     Label_82:
1386     IF ( ! ( (ISERASEONLY==0)||(ISRESTOREDESIGN==1)) ) THEN GOTO SKIP_DESIGN_INFO;
1387     BUFF32[31..0] = BOOL(CHECKSUM);
1388     IF ( ! ( !ISRESTOREDESIGN) ) THEN GOTO Label_83;
1389     UROW[127..112] = BUFF32[15..0];
1390     Label_83:
1391     IF ( ! ISRESTOREDESIGN ) THEN GOTO Label_84;
1392     UROW[127..112] = SUROWCHECKSUM[15..0];
1393     Label_84:
1394     IF ( ! ( !ISRESTOREDESIGN) ) THEN GOTO Label_85;
1395     UROW[101..32] = ACT_UROW_DESIGN_NAME[69..0];
1396     Label_85:
1397     IF ( ! ISRESTOREDESIGN ) THEN GOTO Label_86;
1398     UROW[101..32] = SUROWDESIGNNAME[69..0];
1399     Label_86:
1400     LABEL_SEPARATOR = 0;
1401     SKIP_DESIGN_INFO:
1402     BUFF32[31..0] = BOOL(ACT_UROW_CYCLE_COUNT);
1403     UROW[111..102] = BUFF32[9..0];
1404     UROW[31..29] = ACT_UROW_PROG_METHOD[2..0];
1405     UROW[28..25] = ACT_UROW_ALGO_VERSION[3..0];
1406     UROW[16..10] = ACT_UROW_SW_VERSION[6..0];
1407     UROW[9..6] = ACT_UROW_PROGRAM_SW[3..0];
1408     UROW[4] = SUROW_SRAM_DISTURB[0];
1409     IF ( ! (ACT_UROW_ALGO_VERSION[6]==1) ) THEN GOTO Label_87;
1410     UROW[5] = 1;
1411     UROW[0] = 0;
1412     UROW[24..23] = ACT_UROW_ALGO_VERSION[5..4];
1413     Label_87:
1414     IF ( ! (ACT_UROW_ALGO_VERSION[6]==0) ) THEN GOTO Label_88;
1415     UROW[5] = 0;
1416     UROW[0] = 1;
1417     UROW[24..23] = ACT_UROW_ALGO_VERSION[5..4];
1418     Label_88:
1419     IRSTOP IRPAUSE;
1420     DRSTOP DRPAUSE;
1421     IRSCAN 8, $a7;
1422     DRSCAN 128, UROW[];
1423     WAIT IDLE, 15 CYCLES;
1424     CALL POLL_PROGRAM;
1425     IF ( ! (PASS==0) ) THEN GOTO PROGRAM_OK3;
1426     STATUS = -24;
1427     PRINT "Failed to program UROW";
1428     UNIQUEEXITCODE = 32853;
1429     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1430     EXPORT "ERROR_CODE", BUFF128[15..0];
1431     CALL DO_EXIT;
1432     PROGRAM_OK3:
1433     IRSTOP IRPAUSE;
1434     DRSTOP DRPAUSE;
1435     IRSCAN 8, $c0;
1436     WAIT IDLE, 1 CYCLES;
1437     IRSTOP IRPAUSE;
1438     DRSTOP DRPAUSE;
1439     IRSCAN 8, $a8;
1440     WAIT IDLE, 3 CYCLES;
1441     WAIT IDLE, 165 USEC;
1442     DRSCAN 128, $00000000000000000000000000000000,COMPARE UROW[],UROW_MASK[],PASS;
1443     IF ( ! (PASS==0) ) THEN GOTO UROW_OK;
1444     STATUS = -24;
1445     PRINT "Failed to program UROW";
1446     UNIQUEEXITCODE = 32854;
1447     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1448     EXPORT "ERROR_CODE", BUFF128[15..0];
1449     CALL DO_EXIT;
1450     UROW_OK:
1451     LABEL_SEPARATOR = 0;
1452 ENDPROC;
1453
1454 PROCEDURE FAIL_ERASE USES GV,DO_EXIT;
1455     STATUS = 8;
1456     PRINT "Failed Erase Operation";
1457     UNIQUEEXITCODE = 32855;
1458     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1459     EXPORT "ERROR_CODE", BUFF128[15..0];
1460     CALL DO_EXIT;
1461 ENDPROC;
1462
1463 PROCEDURE EXE_ERASE USES BITSTREAM,GV,READ_UROW,POLL_ERASE,PROGRAM_UROW,FAIL_ERASE;
1464     IF ( ! (COMBERASESELECT[14]==1) ) THEN GOTO SKIPRUROW;
1465     CALL READ_UROW;
1466     EXPORT "ACTEL_SLOG_UROW", UROW[];
1467     SKIPRUROW:
1468     IRSTOP IRPAUSE;
1469     DRSTOP DRPAUSE;
1470     IRSCAN 8, $85;
1471     DRSCAN 23, COMBERASESELECT[];
1472     WAIT IDLE, 3 CYCLES;
1473     CALL POLL_ERASE;
1474     IF ( ! (PASS==0) ) THEN GOTO ERASEOK;
1475     CALL FAIL_ERASE;
1476     ERASEOK:
1477     IF ( ! (COMBERASESELECT[14]==1) ) THEN GOTO Label_89;
1478     CALL PROGRAM_UROW;
1479     Label_89:
1480     LABEL_SEPARATOR = 0;
1481 ENDPROC;
1482
1483 PROCEDURE DO_ERASE USES GV,EXE_ERASE;
1484     PRINT "Erase ...";
1485     COMBERASESELECT[22..0] = $004000;
1486     COMBERASESELECT[0] = 1;
1487     CALL EXE_ERASE;
1488     PRINT "Completed erase";
1489 ENDPROC;
1490
1491 PROCEDURE DO_ERASE_ARRAY USES GV,EXE_ERASE;
1492     PRINT "Erase FPGA Array ...";
1493     COMBERASESELECT[22..0] = $004001;
1494     CALL EXE_ERASE;
1495 ENDPROC;
1496
1497 PROCEDURE DO_ERASE_ONLY USES GV,DO_ERASE;
1498     ISERASEONLY = 1;
1499     CALL DO_ERASE;
1500 ENDPROC;
1501
1502 PROCEDURE DO_ERASE_ARRAY_ONLY USES GV,DO_ERASE_ARRAY;
1503     ISERASEONLY = 1;
1504     CALL DO_ERASE_ARRAY;
1505 ENDPROC;
1506
1507 PROCEDURE DO_ERASE_ALL USES GV,EXE_ERASE;
1508     IF ( ! ( (BM7DEVICE==1)||(BM1DEVICE==1)) ) THEN GOTO Label_90;
1509     PRINT "Erase FPGA Array and FlashROM ...";
1510     Label_90:
1511     IF ( ! ( (BM7DEVICE!=1)&&(BM1DEVICE!=1)) ) THEN GOTO Label_91;
1512     PRINT "Erase FPGA Array, FlashROM and Security Settings ...";
1513     Label_91:
1514     COMBERASESELECT[22..0] = $7fc00f;
1515     ISERASEONLY = 1;
1516     CALL EXE_ERASE;
1517 ENDPROC;
1518
1519 PROCEDURE LOAD_ROW_DATA USES BITSTREAM,GV;
1520     FOR SDTILE = 1 TO NUMBEROFSDTILES;
1521         FOR I = 1 TO 8;
1522             IRSTOP IRPAUSE;
1523             DRSTOP DRPAUSE;
1524             IRSCAN 8, $89;
1525             DRSCAN 26, DATASTREAM[(DATAINDEX+25)..DATAINDEX];
1526             WAIT IDLE, 3 CYCLES;
1527             DATAINDEX = (DATAINDEX+26);
1528         NEXT I;
1529     NEXT SDTILE;
1530 ENDPROC;
1531
1532 PROCEDURE EXE_PROGRAM USES GV,DO_EXIT,POLL_PROGRAM;
1533     IRSTOP IRPAUSE;
1534     DRSTOP DRPAUSE;
1535     IRSCAN 8, $83;
1536     WAIT IDLE, 3 CYCLES;
1537     CALL POLL_PROGRAM;
1538     IF ( ! (PASS==0) ) THEN GOTO Label_92;
1539     STATUS = 10;
1540     PRINT "Failed to program FPGA array at row ",ROWNUMBER,".";
1541     UNIQUEEXITCODE = 32856;
1542     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1543     EXPORT "ERROR_CODE", BUFF128[15..0];
1544     CALL DO_EXIT;
1545     Label_92:
1546     LABEL_SEPARATOR = 0;
1547 ENDPROC;
1548
1549 PROCEDURE EXE_VERIFY USES GV,DO_EXIT,POLL_PROGRAM;
1550     IRSTOP IRPAUSE;
1551     DRSTOP DRPAUSE;
1552     IRSCAN 8, $8d;
1553     DRSCAN 2, VERIFYEOL[];
1554     WAIT IDLE, 3 CYCLES;
1555     WAIT IDLE, 132 USEC;
1556     CALL POLL_PROGRAM;
1557     IF ( ! (PASS==0) ) THEN GOTO Label_93;
1558     STATUS = 11;
1559     PRINT "Verify 0 failed at row ",ROWNUMBER,".";
1560     UNIQUEEXITCODE = 32857;
1561     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1562     EXPORT "ERROR_CODE", BUFF128[15..0];
1563     CALL DO_EXIT;
1564     Label_93:
1565     IRSCAN 8, $8d;
1566     DRSCAN 2, VERIFYEOL[],COMPARE $0,$3,PASS;
1567     IF ( ! (PASS==0) ) THEN GOTO Label_94;
1568     STATUS = 11;
1569     PRINT "Verify 0 failed at row ",ROWNUMBER,".";
1570     UNIQUEEXITCODE = 32858;
1571     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1572     EXPORT "ERROR_CODE", BUFF128[15..0];
1573     CALL DO_EXIT;
1574     Label_94:
1575     IRSTOP IRPAUSE;
1576     DRSTOP DRPAUSE;
1577     IRSCAN 8, $8e;
1578     DRSCAN 2, VERIFYEOL[];
1579     WAIT IDLE, 3 CYCLES;
1580     WAIT IDLE, 132 USEC;
1581     CALL POLL_PROGRAM;
1582     IF ( ! (PASS==0) ) THEN GOTO Label_95;
1583     STATUS = 11;
1584     PRINT "Verify 1 failed at row ",ROWNUMBER,".";
1585     UNIQUEEXITCODE = 32859;
1586     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1587     EXPORT "ERROR_CODE", BUFF128[15..0];
1588     CALL DO_EXIT;
1589     Label_95:
1590     IRSCAN 8, $8e;
1591     DRSCAN 2, VERIFYEOL[],COMPARE $0,$3,PASS;
1592     IF ( ! (PASS==0) ) THEN GOTO Label_96;
1593     STATUS = 11;
1594     PRINT "Verify 1 failed at row ",ROWNUMBER,".";
1595     UNIQUEEXITCODE = 32860;
1596     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1597     EXPORT "ERROR_CODE", BUFF128[15..0];
1598     CALL DO_EXIT;
1599     Label_96:
1600     LABEL_SEPARATOR = 0;
1601 ENDPROC;
1602
1603 PROCEDURE DO_PROGRAM USES GV,LOAD_ROW_DATA,EXE_PROGRAM;
1604     IRSTOP IRPAUSE;
1605     DRSTOP DRPAUSE;
1606     IRSCAN 8, $87;
1607     DRSCAN 2, $2;
1608     WAIT IDLE, 3 CYCLES;
1609     PRINT "Programming FPGA Array";
1610     DATAINDEX = 0;
1611     ROWNUMBER = (NUMBEROFMAPROWS-1);
1612     INTEGER IREPEAT_0;
1613     FOR IREPEAT_0 = NUMBEROFMAPROWS - 1 TO 0 STEP -1;
1614         CALL LOAD_ROW_DATA;
1615         CALL EXE_PROGRAM;
1616         IRSTOP IRPAUSE;
1617         DRSTOP DRPAUSE;
1618         IRSCAN 8, $87;
1619         DRSCAN 2, $3;
1620         WAIT IDLE, 3 CYCLES;
1621         IF ( ! ((ROWNUMBER%ROWITERATION)==0) ) THEN GOTO Label_97;
1622         PERCENT_UPDATE = ((100*((NUMBEROFMAPROWS-ROWNUMBER)+1))/NUMBEROFMAPROWS);
1623         DIFFERENCE = (PERCENT_UPDATE%10);
1624         IF ( ! (DIFFERENCE>=5) ) THEN GOTO ROUND_DOWN_PGM_A;
1625         PERCENT_UPDATE = (PERCENT_UPDATE+(10-DIFFERENCE));
1626         ROUND_DOWN_PGM_A:
1627         IF ( ! (DIFFERENCE<5) ) THEN GOTO ROUND_UP_PGM_A;
1628         PERCENT_UPDATE = (PERCENT_UPDATE-DIFFERENCE);
1629         ROUND_UP_PGM_A:
1630         EXPORT "PERCENT_DONE", PERCENT_UPDATE;
1631         Label_97:
1632         ROWNUMBER = (ROWNUMBER-1);
1633     NEXT IREPEAT_0;
1634 ENDPROC;
1635
1636 PROCEDURE DO_VERIFY USES GV,LOAD_ROW_DATA,EXE_VERIFY;
1637     IRSTOP IRPAUSE;
1638     DRSTOP DRPAUSE;
1639     IRSCAN 8, $87;
1640     DRSCAN 2, $2;
1641     WAIT IDLE, 3 CYCLES;
1642     PRINT "Verifying FPGA Array";
1643     DATAINDEX = 0;
1644     ROWNUMBER = (NUMBEROFMAPROWS-1);
1645     INTEGER IREPEAT_1;
1646     FOR IREPEAT_1 = NUMBEROFMAPROWS - 1 TO 0 STEP -1;
1647         CALL LOAD_ROW_DATA;
1648         CALL EXE_VERIFY;
1649         IRSTOP IRPAUSE;
1650         DRSTOP DRPAUSE;
1651         IRSCAN 8, $87;
1652         DRSCAN 2, $3;
1653         WAIT IDLE, 3 CYCLES;
1654         IF ( ! ((ROWNUMBER%ROWITERATION)==0) ) THEN GOTO Label_98;
1655         PERCENT_UPDATE = ((100*((NUMBEROFMAPROWS-ROWNUMBER)+1))/NUMBEROFMAPROWS);
1656         DIFFERENCE = (PERCENT_UPDATE%10);
1657         IF ( ! (DIFFERENCE>=5) ) THEN GOTO ROUND_DOWN_VER_ARRAY;
1658         PERCENT_UPDATE = (PERCENT_UPDATE+(10-DIFFERENCE));
1659         ROUND_DOWN_VER_ARRAY:
1660         IF ( ! (DIFFERENCE<5) ) THEN GOTO ROUND_UP_VER_ARRAY;
1661         PERCENT_UPDATE = (PERCENT_UPDATE-DIFFERENCE);
1662         ROUND_UP_VER_ARRAY:
1663         EXPORT "PERCENT_DONE", PERCENT_UPDATE;
1664         Label_98:
1665         ROWNUMBER = (ROWNUMBER-1);
1666     NEXT IREPEAT_1;
1667     PRINT "        Verifying FPGA Array -- pass";
1668 ENDPROC;
1669
1670 PROCEDURE DO_VERIFY_BOL USES GV,DO_VERIFY;
1671     VERIFYEOL[0] = 0;
1672     CALL DO_VERIFY;
1673 ENDPROC;
1674
1675 PROCEDURE DO_VERIFY_EOL USES GV,DO_VERIFY;
1676     VERIFYEOL[0] = 1;
1677     CALL DO_VERIFY;
1678 ENDPROC;
1679
1680 PROCEDURE DO_PROGRAM_RLOCK USES GV,DO_EXIT,POLL_PROGRAM;
1681     DATAINDEX = 0;
1682     INTEGER IREPEAT_2;
1683     FOR IREPEAT_2 = NUMBEROFSDTILES - 1 TO 0 STEP -1;
1684         FOR I = 1 TO 8;
1685             IRSTOP IRPAUSE;
1686             DRSTOP DRPAUSE;
1687             IRSCAN 8, $89;
1688             DRSCAN 26, RLOCK[(DATAINDEX+25)..DATAINDEX];
1689             WAIT IDLE, 3 CYCLES;
1690             DATAINDEX = (DATAINDEX+26);
1691         NEXT I;
1692     NEXT IREPEAT_2;
1693     IRSTOP IRPAUSE;
1694     DRSTOP DRPAUSE;
1695     IRSCAN 8, $8c;
1696     WAIT IDLE, 3 CYCLES;
1697     CALL POLL_PROGRAM;
1698     IF ( ! (PASS==0) ) THEN GOTO Label_99;
1699     STATUS = 10;
1700     PRINT "Failed to enable FPGA Array.";
1701     UNIQUEEXITCODE = 32862;
1702     BUFF128[15..0] = BOOL(UNIQUEEXITCODE);
1703     EXPORT "ERROR_CODE", BUFF128[15..0];
1704     CALL DO_EXIT;
1705     Label_99:
1706     LABEL_SEPARATOR = 0;
1707 ENDPROC;
1708
1709 PROCEDURE DO_READ_IDCODE USES READ_IDCODE_ONLY;
1710     WAIT RESET, 5 CYCLES;
1711     CALL READ_IDCODE_ONLY;
1712     EXIT 0;
1713 ENDPROC;
1714
1715
1716 CRC A713;