pridan stp soubor
authorMartin <prudemar@fel.cvut.cz>
Thu, 12 Mar 2015 14:22:44 +0000 (15:22 +0100)
committerMartin <prudemar@fel.cvut.cz>
Thu, 12 Mar 2015 14:22:44 +0000 (15:22 +0100)
pmsm-control/rpi_mc_simple_dc.stp [new file with mode: 0644]

diff --git a/pmsm-control/rpi_mc_simple_dc.stp b/pmsm-control/rpi_mc_simple_dc.stp
new file mode 100644 (file)
index 0000000..959b66e
--- /dev/null
@@ -0,0 +1,1541 @@
+NOTE "CREATOR" "Designer Version: 11.3.0.112";\r
+NOTE "CAPTURE" "11.3.0.112";\r
+NOTE "DEVICE" "AGL125V5";\r
+NOTE "PACKAGE" "AGL125V5-vq100";\r
+NOTE "DATE" "2014/10/07";\r
+NOTE "TIME" "15:09:52";\r
+NOTE "STAPL_VERSION" "JESD71";\r
+NOTE "VENDOR" "Microsemi Corporation";\r
+NOTE "IDCODE" "03A121CF";\r
+NOTE "IDMASK" "06FFFFFF";\r
+NOTE "DESIGN" "rpi_mc_simple_dc";\r
+NOTE "DESIGN_DIRECTORY" "/home/pi/fpga/rpi-mc-1/simple-dc/";\r
+NOTE "CHECKSUM" "D5FF";\r
+NOTE "SECURITY" "Disable";\r
+NOTE "ALG_VERSION" "20";\r
+NOTE "MAP_VERSION" "1";\r
+NOTE "TOOL_VERSION" "1";\r
+NOTE "MAX_FREQ" "10000000";\r
+NOTE "SILSIG" "00000000";\r
+NOTE "SPEED_GRAD" "STD";\r
+NOTE "TEMP_GRAD" "COM";\r
+NOTE "PLAYER_VERSION_VARIABLE" "PLAYERVERSIONVARIABLE";\r
+NOTE "PLAYER_VERSION_SW_VARIABLE" "PLAYERVERSIONSWVARIABLE";\r
+\r
+ACTION PROGRAM = \r
+       VERIFY_IDCODE,\r
+       SET_PRG_ARRAY,\r
+       W_INITIALIZE,\r
+       DO_ERASE,\r
+       DO_PROGRAM,\r
+       DO_VERIFY_BOL,\r
+       DO_PROGRAM_RLOCK,\r
+       DO_VERIFY_PGM_RLOCK,\r
+       DO_EXIT;\r
+ACTION PROGRAM_ARRAY = \r
+       VERIFY_IDCODE,\r
+       SET_PRG_ARRAY,\r
+       AW_INITIALIZE,\r
+       DO_ERASE_ARRAY,\r
+       DO_PROGRAM,\r
+       DO_VERIFY_BOL,\r
+       DO_PROGRAM_RLOCK,\r
+       DO_VERIFY_PGM_RLOCK,\r
+       DO_EXIT;\r
+ACTION ERASE_ARRAY = \r
+       VERIFY_IDCODE,\r
+       AW_INITIALIZE,\r
+       DO_ERASE_ARRAY_ONLY,\r
+       DO_EXIT;\r
+ACTION ERASE = \r
+       VERIFY_IDCODE,\r
+       W_INITIALIZE,\r
+       DO_ERASE_ONLY,\r
+       DO_EXIT;\r
+ACTION ERASE_ALL = \r
+       VERIFY_IDCODE,\r
+       INITIALIZE,\r
+       DO_ERASE_ALL,\r
+       DO_EXIT;\r
+ACTION VERIFY = \r
+       VERIFY_IDCODE,\r
+       R_INITIALIZE,\r
+       DO_VERIFY_EOL,\r
+       DO_VERIFY_RLOCK,\r
+       DO_EXIT;\r
+ACTION VERIFY_ARRAY = \r
+       VERIFY_IDCODE,\r
+       AR_INITIALIZE,\r
+       DO_VERIFY_EOL,\r
+       DO_VERIFY_RLOCK,\r
+       DO_EXIT;\r
+ACTION READ_IDCODE = \r
+       DO_READ_IDCODE;\r
+ACTION VERIFY_DEVICE_INFO = \r
+       VERIFY_IDCODE,\r
+       READ_INITIALIZE,\r
+       READ_IDCODE_ONLY,\r
+       DO_VERIFY_DEVICE_INFO,\r
+       DO_EXIT;\r
+ACTION DEVICE_INFO = \r
+       VERIFY_IDCODE,\r
+       READ_INITIALIZE,\r
+       READ_IDCODE_ONLY,\r
+       DO_DEVICE_INFO,\r
+       DO_QUERY_SECURITY,\r
+       DO_EXIT;\r
+\r
+\r
+\r
+DATA CONSTBLOCK;\r
+    INTEGER IEEE1532=0;\r
+    INTEGER STAPL=1;\r
+    INTEGER DIRECTC=2;\r
+    INTEGER PDB=3;\r
+    INTEGER SVF=4;\r
+    INTEGER FP=0;\r
+    INTEGER FPLITE=1;\r
+    INTEGER FP3=2;\r
+    INTEGER SCULPTW=3;\r
+    INTEGER BPW=4;\r
+    INTEGER DIRECTCP=5;\r
+    INTEGER STP=6;\r
+    INTEGER FP4=7;\r
+    INTEGER FP33=0;\r
+    INTEGER FP34=1;\r
+    INTEGER FP40=2;\r
+    INTEGER FP41=3;\r
+    INTEGER FP42=4;\r
+    INTEGER FP50=5;\r
+    INTEGER FP51=6;\r
+    INTEGER FP60=7;\r
+    INTEGER FP61=8;\r
+    INTEGER FP62=9;\r
+    INTEGER FP84=11;\r
+    INTEGER FP85=12;\r
+    INTEGER FP86=13;\r
+    INTEGER FP90=14;\r
+    INTEGER FP91=15;\r
+    INTEGER FP100=16;\r
+    INTEGER FP_11=19;\r
+    INTEGER FP_11_1=20;\r
+    INTEGER FP_11_2=21;\r
+    INTEGER FP_11_3=22;\r
+    INTEGER UNKNOWN=127;\r
+    INTEGER UNSPECIFIED=0;\r
+    INTEGER QN132=1;\r
+    INTEGER VQ100=2;\r
+    INTEGER TQ144=3;\r
+    INTEGER PQ208=4;\r
+    INTEGER FG144=5;\r
+    INTEGER FG256=6;\r
+    INTEGER FG484=7;\r
+    INTEGER FG676=8;\r
+    INTEGER FG896=9;\r
+    INTEGER QN108=10;\r
+    INTEGER QN180=11;\r
+    INTEGER TQ100=12;\r
+    INTEGER CQ208=13;\r
+    INTEGER FG1152=14;\r
+    INTEGER BG456=15;\r
+    INTEGER UNDEFINED=63;\r
+    INTEGER GRADE_UNSPEC=0;\r
+    INTEGER GRADE_1=1;\r
+    INTEGER GRADE_2=2;\r
+    INTEGER GRADE_3=3;\r
+    INTEGER GRADE_F=4;\r
+    INTEGER GRADE_STD=5;\r
+    INTEGER GRADE_4=6;\r
+    INTEGER GRADE_UNDEF=7;\r
+ENDDATA;\r
+\r
+DATA PARAMETERS;\r
+    INTEGER FREQ =4;\r
+ENDDATA;\r
+\r
+DATA GV;\r
+    INTEGER ULOPT1_BITLOCATION =11;\r
+    INTEGER ULOPT0_BITLOCATION =10;\r
+    INTEGER ULUWE_BITLOCATION =9;\r
+    INTEGER ULARE_BITLOCATION =8;\r
+    INTEGER ULUPC_BITLOCATION =7;\r
+    INTEGER ULUFE_BITLOCATION =6;\r
+    INTEGER ULUFP_BITLOCATION =5;\r
+    INTEGER ULUFJ_BITLOCATION =4;\r
+    INTEGER ULFLR_BITLOCATION =3;\r
+    INTEGER ULULR_BITLOCATION =2;\r
+    INTEGER ULAWE_BITLOCATION =1;\r
+    INTEGER ULARD_BITLOCATION =0;\r
+    BOOLEAN BUFF128[128];\r
+    BOOLEAN BUFF32[32];\r
+    INTEGER I;\r
+    INTEGER J;\r
+    INTEGER TEMP;\r
+    INTEGER SDNUMBER;\r
+    INTEGER ROWNUMBER;\r
+    INTEGER DATAINDEX =0;\r
+    INTEGER FROMROWNUMBER =1;\r
+    INTEGER AESBLOCK;\r
+    BOOLEAN ID[32];\r
+    BOOLEAN PASS = 1;\r
+    BOOLEAN FADDR[3];\r
+    INTEGER STATUS =0;\r
+    BOOLEAN SILSIG[32] = $00000000;\r
+    BOOLEAN ISC_CONFIG_RESULT[18];\r
+    BOOLEAN VERIFYEOL[2];\r
+    BOOLEAN COMBERASESELECT[23];\r
+    BOOLEAN SECKEY_OK = 1;\r
+    BOOLEAN SECREG[44];\r
+    BOOLEAN ULUWE = 0;\r
+    BOOLEAN ULARE = 0;\r
+    BOOLEAN ULUPC = 0;\r
+    BOOLEAN ULUFE = 0;\r
+    BOOLEAN ULUFP = 0;\r
+    BOOLEAN ULUFJ = 0;\r
+    BOOLEAN ULFLR = 0;\r
+    BOOLEAN ULULR = 0;\r
+    BOOLEAN ULAWE = 0;\r
+    BOOLEAN ULARD = 0;\r
+    BOOLEAN ULOPT[2];\r
+    BOOLEAN SUROWCHECKSUM[16];\r
+    INTEGER SUROWCYCLECOUNT =0;\r
+    INTEGER ACT_UROW_CYCLE_COUNT =0;\r
+    BOOLEAN ACT_UROW_DESIGN_NAME[70] = $138797f6de3fb9e5db;\r
+    BOOLEAN SUROWDESIGNNAME[70];\r
+    BOOLEAN SUROWPROGMETHOD[3];\r
+    BOOLEAN ACT_UROW_ALGO_VERSION[7] = $14;\r
+    BOOLEAN SUROWALGOVERSION[7];\r
+    BOOLEAN SUROW_PKG_TYPE[6];\r
+    BOOLEAN ACT_UROW_SW_VERSION[7];\r
+    BOOLEAN SUROW_SW_VERSION[7];\r
+    INTEGER PLAYERVERSIONVARIABLE =0;\r
+    INTEGER PLAYERVERSIONSWVARIABLE =0;\r
+    INTEGER SCULPTORMAJORBASE =5;\r
+    INTEGER SCULPTORMINORBASE =16;\r
+    BOOLEAN ACT_UROW_PROGRAM_SW[4];\r
+    BOOLEAN SUROWPROGRAMSW[4];\r
+    BOOLEAN SUROW_SPEED_GRADE[3];\r
+    BOOLEAN SUROW_SRAM_DISTURB[1];\r
+    BOOLEAN ISERASEONLY = 0;\r
+    BOOLEAN ISRESTOREDESIGN = 0;\r
+    BOOLEAN FLAGDISPLAYCYC = 1;\r
+    BOOLEAN ISPRGARRAY = 0;\r
+    BOOLEAN BSRPATTERN[564] = $9249249249249249249249249249249249249249249249249\r
+        249249249249249249249249249249249249249249249249249249249249249249249249\r
+        24924924924924924924;\r
+    BOOLEAN SAMPLEMASK[564] = $0000000000000000000000000000000000000000000000000\r
+        000000000000000000000000000000000000000000000000000000000000000000000000\r
+        00000000000000000000;\r
+    BOOLEAN BSR[564];\r
+    BOOLEAN SAMPLE_DEVICE[564];\r
+    BOOLEAN RLOCK[832] = $7fffffcffffffbfffffeffffffbfffffefffffffffffffffffff3f\r
+        ffffcffffff3fffffcffffff3fffffcffffff3fffffdffffff3fffffcffffff3fffffcff\r
+        ffff3fffffcffffff3fffffdffffffffffffffffffffffffffffffffffffffffffffffff\r
+        ffffffffff;\r
+    BOOLEAN ARRAYRONLY = 1;\r
+    BOOLEAN CHKARRAY = 0;\r
+    BOOLEAN FROMRONLY = 1;\r
+    BOOLEAN CHKFROM = 0;\r
+    BOOLEAN CHKNVM = 0;\r
+    BOOLEAN CHKSEC = 1;\r
+    BOOLEAN PERMLOCK = 0;\r
+    INTEGER HEX[16] = 70,69,68,67,66,65,57,56,55,54,53,52,51,50,49,48;\r
+    INTEGER NUMBEROFFROMROWS =8;\r
+    BOOLEAN INITIALIZE_DATA[5] = $00;\r
+    INTEGER SDTILE;\r
+    INTEGER NUMBEROFSDTILES =4;\r
+    INTEGER NUMBEROFMAPROWS =1244;\r
+    INTEGER IDREV;\r
+    INTEGER IDFAB;\r
+    INTEGER BM7DEVICE =0;\r
+    INTEGER BM1DEVICE =0;\r
+    BOOLEAN M1BUFF[128] = $acdd6548ccb488863e291eb18fe95077;\r
+    BOOLEAN M7BUFF[128] = $e137623a2eeee91126015f3f73664945;\r
+    BOOLEAN IDCODEVALUE[32] = $03a121cf;\r
+    BOOLEAN IDMASK[32] = $06ffffff;\r
+    INTEGER SECKEYCHK =0;\r
+    INTEGER DESIGNPKGTYPE =2;\r
+    BOOLEAN ACT_UROW_PROG_METHOD[3] = $1;\r
+    INTEGER LABEL_SEPARATOR =0;\r
+    INTEGER ROWITERATION =100;\r
+    INTEGER PAGEITERATION =100;\r
+    INTEGER PERCENT_UPDATE;\r
+    INTEGER DIFFERENCE;\r
+    INTEGER UNIQUEEXITCODE =0;\r
+ENDDATA;\r
+\r
+DATA BITSTREAM;\r
+    BOOLEAN UROW[128];\r
+    BOOLEAN UROW_MASK[128] = $fffffffffffffffffffffffffe01ffc0;\r
+    BOOLEAN DATASTREAM[1035008] = @WbV00000110040W0W000020G000400108002200000Wwc\r
+        qqcso0000p@zlF999IDfjIo0000_@p@@IYaatcjj50000y_@@7HIIIGRRRR34OV@VGIIIYss\r
+        sqDGWt@@Haaa4ssqsUY1rW0fD994000u@@@xJIIYSRJYq4000a@@_VZa89P0000Y49996999\r
+        XFI00004999W8991sW1Yaaa8aaaKZ3GIII2IIIg601WHIYa0IIa400rm3899950000400O08\r
+        0IIIo4OGISGNS000009999rWFQRRRP9BBnXaa4b000WssMjvoIiDB9HIU000WRpss2BMsM49\r
+        9910000ijjjXjjjLGIIoXHWsssMqsosrm2osoWg14OZjb8PNIYaS0000RRsscPMIoa899P00\r
+        00JIIIYRBAREjjjwiDDPtaa89poaaORhssJJsaSIaaaALMIYPRRRKQQI29999aWWaWsssiaa\r
+        a8Xaa49H2MDW0DaacrW2iaiGpssMYqaqWaaa4JosMSRRRrHIRpC99HIkaDRpsMjjrazk20IQ\r
+        I2418000CqTg0IJIW808144XayWC85G022IYQ01cca800008BB9f6GWca4000GW8B89_M680\r
+        0200989G0000IIIa480HIWa0080OYP0GI208100Pq2IL40GIIADG0I22I80000899BY4C0Ce\r
+        6S0222Wsr28080g1900W0e6e080992000r04Wa48q9IGDDeDdaaayu1GIHJ4899H8000W000\r
+        0gb5RBaar04WccsAIIIASUWQJRpQW2OBJRh14i9DGfD99caaaSv1ORIIJ37GRRR3sMtcB999\r
+        Yz@@_tssiTizORJIYa4_l@@PRss6sklj9HII2x@@@XjjjDQPPRYaaa8_@@h15Gssci6eWtsM\r
+        4999n__@Vg14mssg4999k@@@RssscgjjjPIIIYu@@t7QRhsQR@j62i@sogTRRpsTRlsUjDRR\r
+        ijORxjPRRjPRRZcjjjabbj5ssssm__sCRRRpORRp6RRhsQxxQW2ijjjK3G0RRRMjjjniijDI\r
+        3CmssscvssMjRRRsCRRrsljb6GWz000040030OK3uKh31x0SC04Jdm52000g1q8qWcs2d60o\r
+        CEPjI5U269822b_AUY6Ue93j0D@F0eZ8O6y63XrV7C0Ohv2k4duiOA4411jOBa1Y008D0C02\r
+        W0YWaHq0DYJ8JuaF2efC108WZ1W5naW1080a40OPn2NCFewm1T0GO401r0Muqn51qMQUm21Q\r
+        M520GGdWaYCKGD06orIm5c62efCIIIIaaaaG999HGIIYiaa49A9922IIaaba89HIg1K0GIII\r
+        4aaaP080IIIYWaa49999IWaa899912GIg6G2aWaW8P9BL30XE1Da6W0P999r0q8Q08r00XIM\r
+        IIW409H3aHWJX6023JCqGd0CCEn1NSOGR1p0m00uFW42So18400TSeK0DD4uaM371IW6M5Xo\r
+        31QGYWa4aOBCX4aa49099GIGIaaaa0898bkH1r0O01180GYIInMW0X4W41999o0I2omm0IWI\r
+        Ir0KW4aa4A818H3iWWa0ae1I02I2IlY4GIGI0198P11J81999gZDgEGYC0MG080u_3CK3W1T\r
+        f4nQGEqmW6L2Q08999I100HAG06000GaaabPUGkXAimu1j7QGD0Wq9053kuGUQNC00BT2GXa\r
+        aa430000IIIa3000G99HI0000ma49920r0KW00000999vAGGD06asv1r0qHd0JKIn1caaae0\r
+        000KIIg@02KIIIMG01z8OID0Kq9m5X0O0GIIIK000L1G010000999o000w3uWM988HW4ECuW\r
+        Q06fJ0AobaWq0A0G99PQ04W899f608w48YQ06fJ0760u@10EgYbCMexegGM8Ti6UhRhe16Ag\r
+        m@2DOj0ET680GGS2a4oh19CCIWW_5mv@1s_Vy8s5SoS7taN8lo4qm@nmCLD0waNG41dW6100\r
+        WW7@J999PrR8GGIKAeE6KIII6lu5r0OW2IIoQ0e8uneKGII2aa4i6W82Uisfus8Wc@3Efs_A\r
+        O8sYKabaaKU171QuX4a4ie1kG2I2Iq0NCzO1H3C1988fe1Ae6032quWg3E8mH4E4ZYQ0qeXX\r
+        LAP4240001FkKd0ACj14G0002USfE1E8un@3Uy@10_V001FN5Y0QmAQWA2GhzW7lydnC2SYh\r
+        61Ge5Y32Uy@W7bS5262UqgJEkCU4e3Du@0qUhs_72Uiu0RnlanC2US4GIGI1FQM4Uh4@hr1d\r
+        yVmZX6RXO1QiM0QzKd85T2O12osMjD0002QRrsM0000eLRRx0000IjjjT0000g1e000ijQR3\r
+        0g1eWR29GRRR3001iQ0AG02RRD0A800Rpss0GQ08q9G4ijjjXaaa8tssaHIIY4QRRo299IIi\r
+        jPRda899ij6W24RRRN3W1i5IIg1W0DIIIamsci9IIY4OR3s499GIeDRR9ar0eGQ0B8nssEDW\r
+        3w4W0RRRQE9911jjjOdaa4fsscjHIIqaRRssC9HIYRpssAHII2DRRR19999h3qWjDi1baa4W\r
+        sMsaGIQM3W18DsseDHI2a4scjjTYaa4RsssEf1010000daaaG0000IIIgK0000999Q20000b\r
+        a89H0_P4Xp3F0IIIIVaAK3W1889Dn20G00aa4f10GD08q9G28500g3W09000WIIIam@@RV89\r
+        HIo@l@@a499n@_@VJaaWmx@@@HIIIY@@@@Q0CmZaaKD04Waaa4y@@l7IIIay@x_6IIg1W0BI\r
+        IHau@tzF99H2u@d@DaKQ0Bq9G2f1GWFIIIa0008ess6Uu0t1008WjjPQ1000escjj2000esx\r
+        7K000mcjjD0000GsssM004Wesstc00800RRQ_0000XjjPJ0080Xscjj0GQ0BC911ORRRx4mW\r
+        Q088um@dAFfOO8hdL223O402000G002fo0G000B@zGZ9cazAAD3OGg05i9O6nziTw1Q88008\r
+        eYb0401KTm522W02UCae1a8unnw4eZG3AeMgB2Uypu4iANvKYygpwH88un@Z6eceE8uMlE_A\r
+        9iU4OgPW426E601201DWub57qNHe1Fswg2C4y8K@0KHmZc04ba8unC0191r372aeaa8P895y\r
+        e14a4a8991HMIIAungaWaWK3G3aXaa81994yOP7DOGGG06pbAHT0H80A4ILANM4KmZ@NH118\r
+        889ZjmYQDA8UnE40995yO744aa89191IYIAG38WaWWK3G1Z2GGW6E09919uHS8080yaH4xCP\r
+        GD0K4SlCbCUHmZSK3W120ORrs60040ej60280Wj5yO5C0002UaX67T8unFqms8H2IYLRQRKm\r
+        Z5K3W1ejHII30XE1QWQRRRmZ6Ko81Wsss2UCXd088uHGqM99PIej5RBa499nMDjDIh3G0iDI\r
+        IaamsT2KHmZGKou11FQY910020GIr08Hd0M8X@@laHA2U44@399GI_@r@Za899_tt@JID04m\r
+        @7IYcayVmZRKou51Fo1e0eMjfj0hGaGD0580WsEunz70uumM0gUSC_kf9W000H3uGGGEE00d\r
+        N1PGJ3V4uqGH3iGWJ2suudt5SHmzBlIK1HjNOaASkgW61QWM@bsMGmD1FgOS2e6SIDxqbHm9\r
+        M5W6B1FMKm194ye9nnvGmZEq373r0i09809IIIGaWaa2UigQ0u8unl2WEkWJQFuniZjmgq0M\r
+        8un9g10XW7b8GZP2USZ7rGOd6N2UyaI6F8unDg1Gak8ZeaHD2USZQ0K8uH5g10Yk8V8unQg1\r
+        uWW7De6W7SIII2RRRhJ05g1uWW7pf603O9904yu7I0002UidQ0i8uHdg1eaW7@V0W@ZXPiOZ\r
+        79Q0PgLXZkXezniP2Sgce1o8un@ZlQt8lMBun@33x@0q_V005wRtWU4mi_4q2iDsW7ZIGIMI\r
+        zZS4yewXK5wfDN6yu@1FcJW6b5q0Q1FwLd074y8LT2GHmZKr9041FMMd064yu@30m7100W10\r
+        _FW6_3UixUph8unfY6WXW7@F0js11014vLPHuTO8Y@7Qm@1ePu00h5So@1FY7891fW7@Fua@\r
+        3Uy@W7@FuHlh1eYW7Xg6WA2UqgQ0a8uHcg1GaW7T5G00m00@F0WeHDr1010WOOGAQWD2swyG\r
+        JHBmfhYJbYI5_98a72Uy@0qgTJ3h33x@G3_Fun@3Ev@W77I2IMISSPq9G1aWWa2Uy@WJ_Fun\r
+        @3Uy@W7142qscjD0002PR1FAbbHIoE1WWDTIImZLHQejjJW3CDIIYWSRpM69PmZLHQ408uno\r
+        aWy@t9m1ktaa2U4BGKRRsK00w4u08mss1Fsp0096L8630yV0D@7yu@1FAOaNf4yu@1eP8W80\r
+        WWJ_FCi@3Gx@W7@Fun@3UabQ0_8un@31XszZe8ua@3Uy@W7vj602u0006y8LT241nss6TIII\r
+        WORR3UCgE1Kmq899IojjW7ngJ0A2UagE1K8unjw4eXW7JU0W@ZXvpOoKV0050200C00G0200\r
+        ANIae1Q8sle2Uy@0q_VdNjZ7nse1IeCX8gv4w0qU3200m00012008uHq1200KTWC7BmHd09i\r
+        4W31dK6MIIoW7LGGIIImZbO99B9EEC8O9957N5O999HGII6KtBMIII4aaW4yOwXK9Om9o555\r
+        H1F_Vq0rGGIIAunI2QOeu4g0200WijjD32001Fw4ijjDR1000assij30q9G1l9QWSQRxT49G\r
+        PRRRmZDn689f602K999HYjjLR7a49XosW7H0QIIImZ4Pcaa4XsscjGIor1EGA00G9ZE8D999\r
+        uHgaoz@7ye3C8993Ua8NIIITHgWFIIoR88eaH5W000WfjjDuHYWORRt5f2mQRRr000C0m@1F\r
+        _VmZ@F0mfFJNGWJE5dG5VMZGG3b9400eTAP23BZq0ae3F42UqugnL8gzf3Uy@0qOlY262hyh\r
+        0R@x7Lq2EfiuLC8mMbRSqWuukennCg1mZE1SW4aaLGTJ5yu@1qyVm9A6RXM8A993U4Z8MX8G\r
+        3d2UKeTgU8E1Aa0008RRRpa00GmZAm1000ijjTmZSG00ocjjD0G00uW7peBo8UJq0fqssl9I\r
+        0osssI6D8unIqqs6L301osM83U4Zk8NWqssc1III0PRR1FU0saaad0EennDGRRb889XcbjjG\r
+        D07GJIYDun7w4uWr1KeaH8qcaa4yeCqaa02Uy39O@@1Fw01IIoI6DenHEq@@GM3G32IIu3Uy\r
+        XE1E8un4E8WWW7LG2000assM5000WRRR3Ua320GjhGm0scssw7d8uH50rssM30130yVCCo79\r
+        9qz8ytrl4LZs91EX620000100HU9M9z@5y8hHGKNaA@7SIFZSgGpC@7qGZjCOG0DD7yufp28\r
+        HmZU7Kt41FcS8LG7yu@7I7HmZU1I2IAsYK2Uq2P898H3SX4a4a0DkG2IIImZhKf080202g18\r
+        Zy0_eanB2USZQ0QG00GRmZfKo851F6Ysss8IGI2QJRR19895yO8bCQ1paa49kjj1FcHD06mm\r
+        sMe602mss8L3031FUI9Z94y8Baaa001005yO7bCQXVIIoW75nx@@OD0Auz@V8unEAPCZW7ve\r
+        6030100M3m51FoRuSBD0m@13NUgzvE0W621002SwdE0O8mfg6vFYW7@FuHA@3uX88w0400Gm\r
+        9@t9WE1FIMaAGNGm1P@S2G02W0Q8gTz72USS20G01d0TD1P4y8MIGII2UCcq0I82FFGG2IM3\r
+        01IJI22UK7Y000131JylJMGWCb1amTDJ4QGL7vqI11nqnnDHT86oIIIcaaanbo3O91fOB69Q\r
+        0X8B985eX91dWcijjD7000WsssQSy0A000DEAHmZQK3W4T2G1RRRRA999x8QWaQRx67h8uHD\r
+        g1OYE1kenn4iIIIMo81IIIIKRRR7yO9r0mHd0D4ye2O0000JIIYS00eaH2q0000899Ho00Gm\r
+        ZiK3G2T2OXa_@V@B99Io_@BPa0Iz@@_laa89@@x@NIYaazVmZQK307T2CX7IIIa100bCU0GR\r
+        RRs2000mjjpQaWW7Bf60Ew40YW7VBGm@3Gx@W6_leCAANoekk29QW92wUjW7PQZj6s0WXW7@\r
+        FgThMjGiWJ_FWc@3Qu@W7nh60BwoqWWJqDgJB2UKA1991r0OHmZX4KND1FQJCCUL306Zhc12\r
+        02WQ0q8uaAhnMZWJY7300GW6K4Rn6IGIGwhm2WaWar00IW6d0HIIg9Z5Waaaq9m14a442quc\r
+        u4S1404GG3tORRRhan9O7004yODT2SnRY6Koe1DEkID0Tq905bCo0ojjjW7NgJ052UiE@III\r
+        a_@@3U4fE1Q8un6USuWW7FgJ082Uy@Wj_FeX@70ur0d6CuH1h1OpW7@Fua@Z6udTwiej0fY6\r
+        WZW6eDE1R2Uy@WJ_FunVg18ZW7PIGI2ImZp611E04002ev@WjWDkKh81195agUn9K644Wa8K\r
+        9W04400000IG2200000881H000e60e81900800YW5400C00Im3200C008e1H004e6WdodC1G\r
+        RRRs200Aca06000Wijj3h4dE1WW300Gd04KCv4KRRRr9995MvIT2GWjjjDdaaaWsssiJIIYK\r
+        RRx9W32hSdE1c8iI5W0000aaa4f00Gna4Ko81aaa43hKdE1cG2@@V_a7uJIIAVI2OIII2_@@\r
+        tF99PBbUK308T2qWFIIoF28eOo4kVW0ijjjA0002haeE1Q8iot60u@sS2jUBq2hy@mA@Fio@\r
+        3hy@mm8lj0i2YgW226BQ082Tx@mA@Fio@3hikmzc96cp0100C0W502002f2tWJ_FioQ88995\r
+        RX5IGIIYjGfmAXEun@3Uy@W7@V0W@3Uy@W7@Fun@h10tByQ8un@3sw@mMqE0j@3Uy@W7@Fun\r
+        @3Ev@WJ_FuHDYjmiW7@FuHKWjjjPB000WqsMd084yONi1IIw4W0LIII1FYbPIII4QRRs299N\r
+        7u0f0001FMcK_@@W7hobaaKd07G_@@t799vD444y8LGijjx4G1OjjjQ00060u@10W@czE2sw\r
+        @W7@Fun@3Gx@W7@FUaQ3Du@0Q_Fua@3EH602001F_VCCl6So@1F_VmZ@7y8BT2OGmZ4m1008\r
+        uno0ssss9011Fg5IjjjW7LeaHD2US9O999Iu@@3UyBm@@@k899@8WWW733KRRRD04C0m@308\r
+        VOo26yu@1F_VmZJ32008EXlYPLXW7@FU4v3k@@W7@Fun@3EvgW7@F66z04004So@1F_VD078\r
+        1999un@3UKgQ088uHog1u0TIII4ORR3UigE1QWGIIImZb1A999uHiw4m0@QIIr0GWFIIoW7n\r
+        gJ082Uyuzp8Odv560u@uHQ1200GeEb5DmM1TJn00ElxN11EvK33Li8821F_VD0e4EH41efyT\r
+        6E7yu@Dr_O0Qu52W21F_VmZ@7yeOr0G0989hW7@F22PW0W04E1FvHEHmZ@7yeZIGIIYjm429\r
+        191FY6WaaaW7J6WqsMd084yONi1IIa4QRt9G11FUbPIIIaQRRs299N70XW793MIIImZOvIII\r
+        gJ05SHII6y8MGijj3Uaw10_FWc@3sgk8iweS0i2S2jW7jzol62GRjuuUBun@3EXqG3_FWc@3\r
+        Uy@W7@FUH72Uy@WJ_Fun@ZjOe0DMBuHUXjjj5yu1S0002UiCYjjjgaaa2USB4QRR1FgWK00W\r
+        W753KIIYK_@@W75p799vD444yOOmQRRr000C0m@DE_V9zG6tZj1F_VmZ7M30P0C00YjGkMpT\r
+        8un@Z7H_e1QeoX6A8Oh0RbBun@3Uy@W7@FekS0aaa4y8mH3qmIpDKJ3q1Qe5G00WW7@FQ0RG\r
+        GGI6y8nT2eGmZaL3m1T2GGmZNr9G3r0GGmZd9X@@Fungw4e1VaaaV4GGmZKr904r0Gm00@7y\r
+        u@1F_VmZ@7yu@1ezVmZ@7yOjrdqTmZ@7y8anow0G00WWJK6B99PmZbXbaa4199P4UY5yOo1d\r
+        yVm9e6y8o1QiGmZ6t9m11F6Md074yu@1F_@00@7Gp@1RTUmZ@7yu@1F_@00D18008uaoY6ue\r
+        u44CI5e3envhGw8uHI3EPxI690IIYImZX5KtQnmCTm9@t9WDHiM6IIIouIBBunnv0004yOP4\r
+        RRR3Uy@W7@V00r0100C0m@LXaJ2QX5DWI1F68G00W0EBFun@3Uy@W7LEGm@xHuo6LGhYYe26\r
+        _S30001dyVm9pWbaaian5889A5yuLO999Zmhi0evj@5R3ir@AAW8f232Uy@66A12PRRmZG08\r
+        8RBunawYy0sssqx8MWjCIoW7jgJW3ijjbLoO2CrssU2m0RQca81nj3UCBc2001Fwbqa@@I69\r
+        04@@V9Z6utVIAuHi08WjPRw0ean304KR7yen30yVan@7QWq1ezNmZ@7yu@1F_VmMs7qGsTIw\r
+        H@6T4qGevCRLZ9Er5f6L7Onb2x4Ws51dKM9ZP4yuJ1rT2aaaaW7X2W00GGG_6Gp@1dWPi46K\r
+        H12aWWaYju1baaanB6KD04G2IoAD0709H95Dm5WaWaY6uYQ0g8unF8080C0m5r0yImZfKoO1\r
+        4400QS42I000DEk0G00vQ0A0WqsMmZRm0008un4GGijjZ81IijjBPS1qqssG2II4PRR7y86Q\r
+        QRZ8199ejjjf603K8995y85KRRR3UK1ORRRs999pQCXW79GYPPRZZ7Onaai6W34QQRp099H2\r
+        RJRD05mos6GIII0RRRhW7JGARRRmZW0GGIgaH4a0004yu2G0003Uq3200Ir0WWK00WW7xGIo\r
+        @l@_aaI6L8uH6S@@FquO20V@@RSi0z@FaDEMW3999IyV@1Fg02_@@W71fan62US1Y0000ejj\r
+        RSy0HG00DEM010esq0A0YjjTmZA0fjjL300GmZ@73JyhhZMq0SqM050200020044q@1F_V9Z\r
+        oLGGP30u1400WW7pAEE42USBW4001rXLii@NG0W92eGe1MIG008eXFZK9faGI8dl52UaA20G\r
+        01s_VmZlmIIIg7E24aab4yuLH3e0199XW7DA88LxVnsW7tEhe7G0006e15nMiImZK0IIGYaa\r
+        0Ki5Eq5P41Qy299912I2254SHD09q9G44aa4YJOcyCm0404Gd0N0200GRRR23000Ct_@_aaa\r
+        8rscAD3000ujj@@B9IIUQqsK0000mx@@V49991DjjjD0C8GG2asssK3W2scsqg1G1D000400\r
+        0uV000J200OA00W4000aF000Z000O0000Y4999MTb90aaa4Waa4100W108Gaaa4XaaaQ0E09\r
+        999899fQ001WH0m@JBW4000a00GI078000e1k3WaaaK4H359eGfX6K3G88000h1GX62EO003\r
+        qsssoIIMc3999A1000jjjQpbiP9MIYay0000tcjj5Mijj8III20000ORRR3PPRP444a6W1ej\r
+        ibh1O1RRBGr0OW6000o000S900W1000i500Gk000I2WD0AGIIIYRIBBEjjjwijjPtaa89Z4Y\r
+        iPRhssRRssUIaaaALIIYPRRRKRRR39999iiaiWsssiqssgbaa49HoYi4RxQ0IGII6TD06810\r
+        0m5000t200OM000J000a900Wi100ODGG350qca4800W4G2W1080QRIY0088089039S0WW0WA\r
+        4E0IIIY880Wx4K0G00GG774M9101802QmW65MO8W20100i942808162W0991032G08G0Ws58\r
+        0P0000WWW_08e6W3GG004oW2W000I3G10W04r0eGZ46a602BPMGd07e2ms4JIIY404Wp0A0a\r
+        c68IIIexGCGffjPh4A0DjjLaaaKu47eqss_aX3Qfa0JRQar0aWQIIIC100TSI00000e899Y4\r
+        0000aa81jjLRujhska499sV_@VRrssHpijDHIIIez@@7RRRRmsssC999Hu@@tFsscjfjjL88\r
+        0n@@VD0ROJII2MIIYA999Y@99Isaa8Pza89JIYa4VYaaGRssMx_ssiPRRxBPRRdjjjj_@jDl\r
+        sssCsssizssgjsscjHRxm35msss6ssscPRRR6RRRsORRh103RIIIQRRRjD99HkjjLxca49ps\r
+        MjzRIaaORrsU04XdQ1Ery00W6mvCn9KJq0P4y8iXbOGAah5en@9ocsybOaSNB1f_VD0jysW5\r
+        1QyV0DdlgH3Vjkmb7aKTm4X0SGW6r2X00u81CAleC2000f1Oo4AEqAd61Qe9408W0Ed9GGPY\r
+        0e0WacanOkIKX25m9gnfTm80RCl36H3O1820W10i0G04GJJBcID41qmLCcH4OBV4aaaYjm29\r
+        899zLq0898e_AMWWWaKD0808999GZN889Az6G11QK1191e0DcG2IIIW6FLZO21QK30110040\r
+        Gv0G040G0004002080022K3GK;\r
+    INTEGER CHECKSUM =54783;\r
+ENDDATA;\r
+\r
+\r
+PROCEDURE DO_EXIT USES GV;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $81;\r
+    WAIT IDLE, 250 USEC;\r
+    IRSCAN 8, $81, CAPTURE BUFF128[7..0];\r
+    IF ( ! (BUFF128[2]==0) ) THEN GOTO Label_0;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $07;\r
+    WAIT IDLE, 1 CYCLES;\r
+    WAIT IDLE, 200 USEC;\r
+    Label_0:\r
+    IRSCAN 8, $ff;\r
+    WAIT IDLE, 200 USEC;\r
+    WAIT RESET, 3 CYCLES;\r
+    EXIT STATUS;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_READ_SECURITY USES GV;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $a4;\r
+    WAIT IDLE, 3 CYCLES;\r
+    DRSCAN 44, $00000000000, CAPTURE SECREG[];\r
+    ULUWE = SECREG[ULUWE_BITLOCATION];\r
+    ULARE = SECREG[ULARE_BITLOCATION];\r
+    ULUPC = SECREG[ULUPC_BITLOCATION];\r
+    ULUFE = SECREG[ULUFE_BITLOCATION];\r
+    ULUFP = SECREG[ULUFP_BITLOCATION];\r
+    ULUFJ = SECREG[ULUFJ_BITLOCATION];\r
+    ULFLR = SECREG[ULFLR_BITLOCATION];\r
+    ULULR = SECREG[ULULR_BITLOCATION];\r
+    ULAWE = SECREG[ULAWE_BITLOCATION];\r
+    ULARD = SECREG[ULARD_BITLOCATION];\r
+    ULOPT[1] = SECREG[ULOPT1_BITLOCATION];\r
+    ULOPT[0] = SECREG[ULOPT0_BITLOCATION];\r
+ENDPROC;\r
+\r
+PROCEDURE DO_OUTPUT_SECURITY USES GV;\r
+    PRINT "Security Settings :";\r
+    IF ( ! (ULUFP==1) ) THEN GOTO Label_1;\r
+    PRINT "FlashROM Write/Erase protected by pass key.";\r
+    Label_1:\r
+    IF ( ! (ULUFJ==1) ) THEN GOTO Label_2;\r
+    PRINT "FlashROM Read protected by pass key.";\r
+    Label_2:\r
+    IF ( ! (ULAWE==1) ) THEN GOTO Label_3;\r
+    PRINT "Array Write/Erase protected by pass key.";\r
+    Label_3:\r
+    IF ( ! (ULARD==1) ) THEN GOTO Label_4;\r
+    PRINT "Array Verify protected by pass key.";\r
+    Label_4:\r
+    IF ( ! (ULUFE==1) ) THEN GOTO Label_5;\r
+    PRINT "Encrypted FlashROM Programming Enabled.";\r
+    Label_5:\r
+    IF ( ! (ULARE==1) ) THEN GOTO Label_6;\r
+    PRINT "Encrypted FPGA Array Programming Enabled.";\r
+    Label_6:\r
+    PRINT "=========================================";\r
+ENDPROC;\r
+\r
+PROCEDURE DO_QUERY_SECURITY USES DO_READ_SECURITY,DO_OUTPUT_SECURITY;\r
+    CALL DO_READ_SECURITY;\r
+    CALL DO_OUTPUT_SECURITY;\r
+ENDPROC;\r
+\r
+PROCEDURE READ_UROW USES BITSTREAM,GV;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $c0;\r
+    WAIT IDLE, 1 CYCLES;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $a8;\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 165 USEC;\r
+    DRSCAN 128, $00000000000000000000000000000000, CAPTURE UROW[];\r
+    SUROWALGOVERSION[6..0] = $00;\r
+    IF ( ! ( (UROW[5]==0)&&(UROW[0]==1)) ) THEN GOTO Label_7;\r
+    SUROWALGOVERSION[5..4] = UROW[24..23];\r
+    Label_7:\r
+    IF ( ! ( (UROW[5]==1)&&(UROW[0]==0)) ) THEN GOTO Label_8;\r
+    SUROWALGOVERSION[5..4] = UROW[24..23];\r
+    SUROWALGOVERSION[6] = 1;\r
+    Label_8:\r
+    SUROWCHECKSUM[15..0] = UROW[127..112];\r
+    SUROWCYCLECOUNT = INT(UROW[111..102]);\r
+    SUROWDESIGNNAME[69..0] = UROW[101..32];\r
+    SUROWPROGMETHOD[2..0] = UROW[31..29];\r
+    SUROWALGOVERSION[3..0] = UROW[28..25];\r
+    SUROW_PKG_TYPE[5..0] = UROW[22..17];\r
+    SUROW_SW_VERSION[6..0] = UROW[16..10];\r
+    SUROWPROGRAMSW[3..0] = UROW[9..6];\r
+    SUROW_SRAM_DISTURB[0] = UROW[4];\r
+    SUROW_SPEED_GRADE[2..0] = UROW[3..1];\r
+    ACT_UROW_CYCLE_COUNT = SUROWCYCLECOUNT;\r
+ENDPROC;\r
+\r
+PROCEDURE FIX_INT_ARRAYS USES GV;\r
+    IF ( ! (HEX[0]!=48) ) THEN GOTO Label_9;\r
+    FOR I = 0 TO 7;\r
+        TEMP = HEX[I];\r
+        HEX[I] = HEX[(15-I)];\r
+        HEX[(15-I)] = TEMP;\r
+    NEXT I;\r
+    Label_9:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE DISP_CHKSUM_DESIGN USES GV,FIX_INT_ARRAYS;\r
+    CALL FIX_INT_ARRAYS;\r
+    IF ( ! (INT(SUROWCHECKSUM[15..0])==65535) ) THEN GOTO Label_10;\r
+    PRINT "CHECKSUM: ";\r
+    Label_10:\r
+    IF ( ! (INT(SUROWCHECKSUM[15..0])!=65535) ) THEN GOTO Label_11;\r
+    PRINT "CHECKSUM: ",CHR$(HEX[INT(SUROWCHECKSUM[15..12])]),CHR$(HEX[INT(SUROWCHECKSUM[11..8])])\r
+        ,CHR$(HEX[INT(SUROWCHECKSUM[7..4])]),CHR$(HEX[INT(SUROWCHECKSUM[3..0])]);\r
+    Label_11:\r
+    IF ( ! ( ( (INT(SUROWDESIGNNAME[0..30])==2147483647)&&(INT(SUROWDESIGNNAME[31..61])==2147483647))&&(INT(SUROWDESIGNNAME[62..69])==255)) ) THEN GOTO Label_12;\r
+    PRINT "Design Name: ";\r
+    Label_12:\r
+    IF ( ! ( ( (INT(SUROWDESIGNNAME[0..30])!=2147483647)||(INT(SUROWDESIGNNAME[31..61])!=2147483647))||(INT(SUROWDESIGNNAME[62..69])!=255)) ) THEN GOTO Label_13;\r
+    PRINT "Design Name: ",CHR$(INT(SUROWDESIGNNAME[63..69])),CHR$(INT(SUROWDESIGNNAME[56..62]))\r
+        ,CHR$(INT(SUROWDESIGNNAME[49..55])),CHR$(INT(SUROWDESIGNNAME[42..48])),CHR$(INT(SUROWDESIGNNAME[35..41]))\r
+        ,CHR$(INT(SUROWDESIGNNAME[28..34])),CHR$(INT(SUROWDESIGNNAME[21..27])),CHR$(INT(SUROWDESIGNNAME[14..20]))\r
+        ,CHR$(INT(SUROWDESIGNNAME[7..13])),CHR$(INT(SUROWDESIGNNAME[0..6]));\r
+    Label_13:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE DISPLAY_UROW USES BITSTREAM,CONSTBLOCK,GV,DISP_CHKSUM_DESIGN;\r
+    EXPORT "USER_ROW", UROW[127..0];\r
+    PRINT "User information: ";\r
+    CALL DISP_CHKSUM_DESIGN;\r
+    IF ( ! (FLAGDISPLAYCYC==1) ) THEN GOTO Label_14;\r
+    PRINT "CYCLE COUNT: ",SUROWCYCLECOUNT;\r
+    Label_14:\r
+    INTEGER TMPINT =INT(SUROWPROGMETHOD[]);\r
+    INTEGER TMPINT2 =0;\r
+    INTEGER TMPINT3 =0;\r
+    INTEGER TMPINT4 =0;\r
+    INTEGER TMPINT5 =0;\r
+    IF ( ! (TMPINT==IEEE1532) ) THEN GOTO Label_15;\r
+    PRINT "Programming Method: IEEE1532";\r
+    Label_15:\r
+    IF ( ! (TMPINT==STAPL) ) THEN GOTO Label_16;\r
+    PRINT "Programming Method: STAPL";\r
+    Label_16:\r
+    IF ( ! (TMPINT==DIRECTC) ) THEN GOTO Label_17;\r
+    PRINT "Programming Method: DirectC";\r
+    Label_17:\r
+    IF ( ! (TMPINT==PDB) ) THEN GOTO Label_18;\r
+    PRINT "Programming Method: PDB";\r
+    Label_18:\r
+    IF ( ! (TMPINT==SVF) ) THEN GOTO Label_19;\r
+    PRINT "Programming Method: SVF";\r
+    Label_19:\r
+    PRINT "Algorithm Version: ",INT(SUROWALGOVERSION[6..0]);\r
+    TMPINT = INT(SUROW_SPEED_GRADE[]);\r
+    IF ( ! (TMPINT==GRADE_UNSPEC) ) THEN GOTO Label_20;\r
+    PRINT "Device Speed Grade: speed grade information not available from device";\r
+    Label_20:\r
+    IF ( ! (TMPINT==GRADE_1) ) THEN GOTO Label_21;\r
+    PRINT "Device Speed Grade: -1";\r
+    Label_21:\r
+    IF ( ! (TMPINT==GRADE_2) ) THEN GOTO Label_22;\r
+    PRINT "Device Speed Grade: -2";\r
+    Label_22:\r
+    IF ( ! (TMPINT==GRADE_3) ) THEN GOTO Label_23;\r
+    PRINT "Device Speed Grade: -3";\r
+    Label_23:\r
+    IF ( ! (TMPINT==GRADE_F) ) THEN GOTO Label_24;\r
+    PRINT "Device Speed Grade: -F";\r
+    Label_24:\r
+    IF ( ! (TMPINT==GRADE_STD) ) THEN GOTO Label_25;\r
+    PRINT "Device Speed Grade: STD";\r
+    Label_25:\r
+    IF ( ! (TMPINT==GRADE_4) ) THEN GOTO Label_26;\r
+    PRINT "Device Speed Grade: -4";\r
+    Label_26:\r
+    IF ( ! (TMPINT==GRADE_UNDEF) ) THEN GOTO Label_27;\r
+    PRINT "Device Speed Grade: speed grade information not available from device";\r
+    Label_27:\r
+    TMPINT = INT(SUROWPROGRAMSW[]);\r
+    IF ( ! (TMPINT==FP) ) THEN GOTO Label_28;\r
+    PRINT "Programmer: FlashPro";\r
+    Label_28:\r
+    IF ( ! (TMPINT==FPLITE) ) THEN GOTO Label_29;\r
+    PRINT "Programmer: FlashPro Lite";\r
+    Label_29:\r
+    IF ( ! (TMPINT==FP3) ) THEN GOTO Label_30;\r
+    PRINT "Programmer: FlashPro3";\r
+    Label_30:\r
+    IF ( ! (TMPINT==FP4) ) THEN GOTO Label_31;\r
+    PRINT "Programmer: FlashPro4";\r
+    Label_31:\r
+    IF ( ! (TMPINT==SCULPTW) ) THEN GOTO Label_32;\r
+    PRINT "Programmer: Sculptor WIN";\r
+    Label_32:\r
+    IF ( ! (TMPINT==BPW) ) THEN GOTO Label_33;\r
+    PRINT "Programmer: BP Programmer";\r
+    Label_33:\r
+    IF ( ! (TMPINT==DIRECTCP) ) THEN GOTO Label_34;\r
+    PRINT "Programmer: DirectC";\r
+    Label_34:\r
+    IF ( ! (TMPINT==STP) ) THEN GOTO Label_35;\r
+    PRINT "Programmer: Actel JAM Player";\r
+    Label_35:\r
+    IF ( ! ( ( ( (TMPINT==FP)||(TMPINT==FPLITE))||(TMPINT==FP3))||(TMPINT==FP4)) ) THEN GOTO Label_51;\r
+    TMPINT2 = INT(SUROW_SW_VERSION[]);\r
+    IF ( ! (TMPINT2==FP33) ) THEN GOTO Label_36;\r
+    PRINT "Software: FlashPro v3.3";\r
+    Label_36:\r
+    IF ( ! (TMPINT2==FP34) ) THEN GOTO Label_37;\r
+    PRINT "Software: FlashPro v3.4";\r
+    Label_37:\r
+    IF ( ! (TMPINT2==FP40) ) THEN GOTO Label_38;\r
+    PRINT "Software: FlashPro v4.0";\r
+    Label_38:\r
+    IF ( ! (TMPINT2==FP41) ) THEN GOTO Label_39;\r
+    PRINT "Software: FlashPro v4.1";\r
+    Label_39:\r
+    IF ( ! (TMPINT2==FP42) ) THEN GOTO Label_40;\r
+    PRINT "Software: FlashPro v4.2";\r
+    Label_40:\r
+    IF ( ! (TMPINT2==FP50) ) THEN GOTO Label_41;\r
+    PRINT "Software: FlashPro v5.0";\r
+    Label_41:\r
+    IF ( ! (TMPINT2==FP51) ) THEN GOTO Label_42;\r
+    PRINT "Software: FlashPro v5.1";\r
+    Label_42:\r
+    IF ( ! (TMPINT2==FP60) ) THEN GOTO Label_43;\r
+    PRINT "Software: FlashPro v6.0";\r
+    Label_43:\r
+    IF ( ! (TMPINT2==FP61) ) THEN GOTO Label_44;\r
+    PRINT "Software: FlashPro v6.1";\r
+    Label_44:\r
+    IF ( ! (TMPINT2==FP62) ) THEN GOTO Label_45;\r
+    PRINT "Software: FlashPro v6.2";\r
+    Label_45:\r
+    IF ( ! (TMPINT2==FP84) ) THEN GOTO Label_46;\r
+    PRINT "Software: FlashPro v8.4";\r
+    Label_46:\r
+    IF ( ! (TMPINT2==FP85) ) THEN GOTO Label_47;\r
+    PRINT "Software: FlashPro v8.5";\r
+    Label_47:\r
+    IF ( ! (TMPINT2==FP86) ) THEN GOTO Label_48;\r
+    PRINT "Software: FlashPro v8.6";\r
+    Label_48:\r
+    IF ( ! (TMPINT2==FP90) ) THEN GOTO Label_49;\r
+    PRINT "Software: FlashPro v9.0";\r
+    Label_49:\r
+    IF ( ! (TMPINT2==FP91) ) THEN GOTO NOT_FP91;\r
+    PRINT "Software: FlashPro v9.1";\r
+    NOT_FP91:\r
+    IF ( ! (TMPINT2==FP100) ) THEN GOTO NOT_FP100;\r
+    PRINT "Software: FlashPro v10.0";\r
+    NOT_FP100:\r
+    IF ( ! (TMPINT2==FP_11) ) THEN GOTO NOT_FP_11;\r
+    PRINT "Software: FlashPro v11.0";\r
+    NOT_FP_11:\r
+    IF ( ! (TMPINT2==FP_11_1) ) THEN GOTO NOT_FP_11_1;\r
+    PRINT "Software: FlashPro v11.1";\r
+    NOT_FP_11_1:\r
+    IF ( ! (TMPINT2==FP_11_2) ) THEN GOTO NOT_FP_11_2;\r
+    PRINT "Software: FlashPro v11.2";\r
+    NOT_FP_11_2:\r
+    IF ( ! (TMPINT2==FP_11_3) ) THEN GOTO NOT_FP_11_3;\r
+    PRINT "Software: FlashPro v11.3";\r
+    NOT_FP_11_3:\r
+    IF ( ! (TMPINT2==UNKNOWN) ) THEN GOTO Label_50;\r
+    PRINT "Software: FlashPro vX.X";\r
+    Label_50:\r
+    LABEL_SEPARATOR = 0;\r
+    Label_51:\r
+    IF ( ! ( (TMPINT==SCULPTW)||(TMPINT==BPW)) ) THEN GOTO Label_55;\r
+    TMPINT3 = (INT(SUROW_SW_VERSION[6..5])+SCULPTORMAJORBASE);\r
+    TMPINT4 = (INT(SUROW_SW_VERSION[4..1])+SCULPTORMINORBASE);\r
+    TMPINT5 = 0;\r
+    IF ( ! (SUROW_SW_VERSION[0]==1) ) THEN GOTO Label_52;\r
+    TMPINT5 = 1;\r
+    Label_52:\r
+    INTEGER CURRPGM =INT(ACT_UROW_PROGRAM_SW[3..0]);\r
+    IF ( ! (TMPINT==SCULPTW) ) THEN GOTO Label_53;\r
+    IF ( ! ( (CURRPGM==FP3)||(CURRPGM==FP4)) ) THEN GOTO NOT_FP3_FP4;\r
+    PRINT "NOTE: The Sculptor Windows version number below should be converted to HEX.";\r
+    NOT_FP3_FP4:\r
+    PRINT "Software: Sculptor Win v",TMPINT3,".",TMPINT4,".",TMPINT5;\r
+    Label_53:\r
+    IF ( ! (TMPINT==BPW) ) THEN GOTO Label_54;\r
+    IF ( ! ( (CURRPGM==FP3)||(CURRPGM==FP4)) ) THEN GOTO NOT_FP3_FP4_BPW;\r
+    PRINT "NOTE: The BP Windows version number below should be converted to HEX.";\r
+    NOT_FP3_FP4_BPW:\r
+    PRINT "Software: BP Win v",TMPINT3,".",TMPINT4,".",TMPINT5;\r
+    Label_54:\r
+    LABEL_SEPARATOR = 0;\r
+    Label_55:\r
+    PRINT "=========================================";\r
+ENDPROC;\r
+\r
+PROCEDURE READ_F_ROW USES GV;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $c0;\r
+    WAIT IDLE, 1 CYCLES;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $f9;\r
+    DRSCAN 3, FADDR[];\r
+    WAIT IDLE, 1 CYCLES;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $bf;\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 165 USEC;\r
+    DRSCAN 128, $00000000000000000000000000000000, CAPTURE BUFF128[];\r
+ENDPROC;\r
+\r
+PROCEDURE DO_DEVICE_INFO USES GV,READ_UROW,DISPLAY_UROW,READ_F_ROW;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $0e;\r
+    WAIT IDLE, 1 CYCLES;\r
+    DRSCAN 32, $00000000, CAPTURE BUFF32[];\r
+    EXPORT "SILSIG", BUFF32[];\r
+    IRSCAN 8, $84, CAPTURE BUFF128[7..0];\r
+    IF ( ! (BUFF128[2]==1) ) THEN GOTO CORE_NOT_ENABLED;\r
+    PRINT "FPGA Array is programmed and enabled.";\r
+    CORE_NOT_ENABLED:\r
+    IF ( ! (BUFF128[2]==0) ) THEN GOTO CORE_ENABLED;\r
+    PRINT "FPGA Array is not enabled.";\r
+    CORE_ENABLED:\r
+    CALL READ_UROW;\r
+    CALL DISPLAY_UROW;\r
+    FADDR[] = $0;\r
+    CALL READ_F_ROW;\r
+    EXPORT "FSN", BUFF128[55..8];\r
+    PRINT "=========================================";\r
+ENDPROC;\r
+\r
+PROCEDURE INIT_AES;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $dd;\r
+    DRSCAN 128, $00000000000000000000000000000000;\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 165 USEC;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_VERIFY_DEVICE_INFO USES GV,BITSTREAM,DO_EXIT,DO_READ_SECURITY,READ_UROW\r
+    ,DISP_CHKSUM_DESIGN;\r
+    CALL READ_UROW;\r
+    CALL DISP_CHKSUM_DESIGN;\r
+    CALL DO_READ_SECURITY;\r
+    BUFF32[31..0] = BOOL(CHECKSUM);\r
+    UROW[127..112] = BUFF32[15..0];\r
+    UROW[101..32] = ACT_UROW_DESIGN_NAME[69..0];\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $c0;\r
+    WAIT IDLE, 1 CYCLES;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $a8;\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 165 USEC;\r
+    DRSCAN 128, $00000000000000000000000000000000,COMPARE UROW[],$ffff003fffffffffffffffff00000000\r
+        ,PASS;\r
+    IF ( ! (PASS==0) ) THEN GOTO UROW_CMP_OK;\r
+    STATUS = -43;\r
+    PRINT "Failed to verify design information.";\r
+    UNIQUEEXITCODE = 32772;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    UROW_CMP_OK:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE READ_IDCODE_ONLY USES GV;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $0f;\r
+    WAIT IDLE, 1 CYCLES;\r
+    DRSCAN 32, $00000000, CAPTURE ID[];\r
+    EXPORT "IDCODE", ID[];\r
+ENDPROC;\r
+\r
+PROCEDURE VERIFY_RLOCK USES GV;\r
+    IRSCAN 8, $84,COMPARE $04,$04,PASS;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_VERIFY_PGM_RLOCK USES GV,DO_EXIT,VERIFY_RLOCK;\r
+    CALL VERIFY_RLOCK;\r
+    IF ( ! (PASS==0) ) THEN GOTO RLOCK_PGM_PASS;\r
+    STATUS = 10;\r
+    PRINT "Failed to enable FPGA Array.";\r
+    UNIQUEEXITCODE = 32891;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    RLOCK_PGM_PASS:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_VERIFY_RLOCK USES GV,DO_EXIT,VERIFY_RLOCK;\r
+    CALL VERIFY_RLOCK;\r
+    IF ( ! (PASS==0) ) THEN GOTO RLOCK_VERIFY_PASS;\r
+    STATUS = 11;\r
+    PRINT "FPGA Array is not enabled.";\r
+    UNIQUEEXITCODE = 32892;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    RLOCK_VERIFY_PASS:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE VERIFY_ID_DMK USES GV,DO_EXIT,INIT_AES;\r
+    CALL INIT_AES;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $0a;\r
+    DRSCAN 128, M7BUFF[];\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 90 USEC;\r
+    DRSCAN 128, $00000000000000000000000000000000, CAPTURE BUFF128[],COMPARE $c0000000000000000000000000000000\r
+        ,$c0000000000000000000000000000000,PASS;\r
+    IF ( ! (BUFF128[127]==0) ) THEN GOTO M7VERDONE;\r
+    STATUS = -31;\r
+    PRINT "Failed to verify AES Sec.";\r
+    UNIQUEEXITCODE = 32775;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    M7VERDONE:\r
+    IF ( ! ( (BUFF128[126]==0)||(BM7DEVICE==0)) ) THEN GOTO MXIDOK;\r
+    IF ( ! ( (BUFF128[126]==1)&&(BM7DEVICE==0)) ) THEN GOTO LDETECTM1;\r
+    STATUS = 6;\r
+    PRINT "Failed to verify IDCODE.";\r
+    PRINT "Target is an M7 device.";\r
+    UNIQUEEXITCODE = 32776;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    LDETECTM1:\r
+    IF ( ! (BUFF128[126]==0) ) THEN GOTO Label_58;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $0a;\r
+    DRSCAN 128, M1BUFF[];\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 90 USEC;\r
+    DRSCAN 128, $00000000000000000000000000000000, CAPTURE BUFF128[],COMPARE $c0000000000000000000000000000000\r
+        ,$c0000000000000000000000000000000,PASS;\r
+    IF ( ! (BUFF128[127]==0) ) THEN GOTO M1VERDONE;\r
+    STATUS = -31;\r
+    PRINT "Failed to verify AES Sec.";\r
+    UNIQUEEXITCODE = 32777;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    M1VERDONE:\r
+    BOOLEAN BTMPBUFFBIT126 = BUFF128[126];\r
+    IF ( ! ( (BTMPBUFFBIT126==1)&&(BM1DEVICE==0)) ) THEN GOTO REGDEV;\r
+    STATUS = 6;\r
+    PRINT "Failed to verify IDCODE.";\r
+    PRINT "Target is an M1 device.";\r
+    UNIQUEEXITCODE = 32778;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    REGDEV:\r
+    IF ( ! ( (BTMPBUFFBIT126==0)&&(BM7DEVICE==1)) ) THEN GOTO Label_56;\r
+    STATUS = 6;\r
+    PRINT "Failed to verify IDCODE.";\r
+    PRINT "The Target is not an M7 Device.";\r
+    UNIQUEEXITCODE = 32781;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    Label_56:\r
+    IF ( ! ( (BTMPBUFFBIT126==0)&&(BM1DEVICE==1)) ) THEN GOTO Label_57;\r
+    STATUS = 6;\r
+    PRINT "Failed to verify IDCODE.";\r
+    PRINT "The Target is not an M1 Device.";\r
+    UNIQUEEXITCODE = 32782;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    Label_57:\r
+    LABEL_SEPARATOR = 0;\r
+    Label_58:\r
+    LABEL_SEPARATOR = 0;\r
+    MXIDOK:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE VERIFY_IDCODE USES GV,PARAMETERS,DO_EXIT;\r
+    FREQUENCY (FREQ*1000000);\r
+    WAIT RESET, 5 CYCLES;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $0f;\r
+    DRSCAN 32, $00000000;\r
+    WAIT IDLE, 1 CYCLES;\r
+    DRSCAN 32, $00000000, CAPTURE ID[],COMPARE IDCODEVALUE[],IDMASK[],PASS;\r
+    IF ( ! (PASS==0) ) THEN GOTO IDOK;\r
+    STATUS = 6;\r
+    PRINT "Failed to verify IDCODE";\r
+    UNIQUEEXITCODE = 32797;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    IDOK:\r
+    IDREV = INT(ID[31..28]);\r
+    IDFAB = INT(ID[24..24]);\r
+ENDPROC;\r
+\r
+PROCEDURE IS_SECOK USES GV,DO_EXIT;\r
+    IF ( ! (SECKEY_OK==0) ) THEN GOTO SECOK;\r
+    STATUS = -35;\r
+    PRINT "Failed to match pass key.";\r
+    UNIQUEEXITCODE = 32799;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    SECOK:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_CHECK_R USES GV,DO_EXIT,DO_READ_SECURITY;\r
+    CALL DO_READ_SECURITY;\r
+    IF ( ! (ULARE==1) ) THEN GOTO ARRAYEPR;\r
+    STATUS = -33;\r
+    PRINT "FPGA Array Encryption is enforced. Plain text verification is prohibited.";\r
+    UNIQUEEXITCODE = 32800;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    ARRAYEPR:\r
+    IF ( ! (ULARD==1) ) THEN GOTO SKIPRCHK1;\r
+    STATUS = -30;\r
+    PRINT "FPGA Array Verification is protected by pass key.";\r
+    PRINT "A valid pass key needs to be provided.";\r
+    UNIQUEEXITCODE = 32804;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    SKIPRCHK1:\r
+    IF ( ! (ULARD==0) ) THEN GOTO Label_59;\r
+    CHKSEC = 0;\r
+    Label_59:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_CHECK_W USES GV,DO_EXIT,DO_READ_SECURITY;\r
+    CALL DO_READ_SECURITY;\r
+    IF ( ! (ULAWE==1) ) THEN GOTO ARRAYWP;\r
+    STATUS = -28;\r
+    PRINT "FPGA Array Write/Erase is protected by pass key.";\r
+    PRINT "A valid pass key needs to be provided.";\r
+    UNIQUEEXITCODE = 32805;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    ARRAYWP:\r
+    IF ( ! (ULARD==1) ) THEN GOTO ARRAYRPW;\r
+    STATUS = -30;\r
+    PRINT "FPGA Array Verification is protected by pass key.";\r
+    PRINT "A valid pass key needs to be provided.";\r
+    UNIQUEEXITCODE = 32806;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    ARRAYRPW:\r
+    IF ( ! (ULARE==1) ) THEN GOTO ARRAYEPW;\r
+    STATUS = -33;\r
+    PRINT "FPGA Array Encryption is enforced. Plain text programming is prohibited.";\r
+    CALL DO_EXIT;\r
+    ARRAYEPW:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE BP_VER USES GV;\r
+    BOOLEAN PLAYER_VERSION_BOOLEAN[32];\r
+    PLAYER_VERSION_BOOLEAN[31..0] = BOOL(PLAYERVERSIONVARIABLE);\r
+    INTEGER PLAYER_MAJOR_VERSION =(INT(PLAYER_VERSION_BOOLEAN[23..16])-SCULPTORMAJORBASE);\r
+    INTEGER PLAYER_MINOR_VERSION =(INT(PLAYER_VERSION_BOOLEAN[15..8])-SCULPTORMINORBASE);\r
+    ACT_UROW_SW_VERSION[6..5] = BOOL(PLAYER_MAJOR_VERSION);\r
+    ACT_UROW_SW_VERSION[4..1] = BOOL(PLAYER_MINOR_VERSION);\r
+    ACT_UROW_SW_VERSION[0] = PLAYER_VERSION_BOOLEAN[0];\r
+    ACT_UROW_PROGRAM_SW[3..0] = BOOL(PLAYERVERSIONSWVARIABLE);\r
+ENDPROC;\r
+\r
+PROCEDURE POLL_PROGRAM USES GV;\r
+    INTEGER ILOOP_0;\r
+    FOR ILOOP_0 = 16381 - 1 TO 0 STEP -1;\r
+        IRSTOP IRPAUSE;\r
+        DRSTOP DRPAUSE;\r
+        IRSCAN 8, $84;\r
+        WAIT IDLE, 1 CYCLES;\r
+        WAIT IDLE, 100 USEC;\r
+        DRSCAN 5, $00,COMPARE $00,$0b,PASS;\r
+        IF PASS THEN ILOOP_0 = 0;\r
+    NEXT ILOOP_0;\r
+ENDPROC;\r
+\r
+PROCEDURE SET_PRG_ARRAY USES GV;\r
+    ISPRGARRAY = 1;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_INITIALIZE USES GV,DO_EXIT,READ_F_ROW,VERIFY_ID_DMK,DO_CHECK_R,DO_CHECK_W\r
+    ,BP_VER;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $7f;\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 50 USEC;\r
+    BSR[563..0] = BSRPATTERN[563..0];\r
+    BOOLEAN SHIFT_DATA[564];\r
+    IRSCAN 8, $01;\r
+    DRSCAN 564, BSR[];\r
+    WAIT IDLE, 1 CYCLES;\r
+    DRSCAN 564, SHIFT_DATA[], CAPTURE SAMPLE_DEVICE[];\r
+    FOR I = 0 TO 563;\r
+        IF ( ! (SAMPLEMASK[I]==1) ) THEN GOTO Label_60;\r
+        BSR[I] = SAMPLE_DEVICE[I];\r
+        Label_60:\r
+        LABEL_SEPARATOR = 0;\r
+    NEXT I;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $01;\r
+    DRSCAN 564, BSR[];\r
+    WAIT IDLE, 1 CYCLES;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $c0;\r
+    WAIT IDLE, 1 CYCLES;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $80;\r
+    DRSCAN 18, $00000;\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 1875 USEC;\r
+    DRSCAN 18, $00000, CAPTURE ISC_CONFIG_RESULT[],COMPARE $30000,$30000,PASS;\r
+    IF ( ! (PASS==0) ) THEN GOTO CRCOK;\r
+    STATUS = 5;\r
+    PRINT "Failed to enter programming mode.";\r
+    EXPORT "ISC_Config_Result", ISC_CONFIG_RESULT[];\r
+    UNIQUEEXITCODE = 32850;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    CRCOK:\r
+    FADDR[] = $0;\r
+    CALL READ_F_ROW;\r
+    EXPORT "FSN", BUFF128[55..8];\r
+    CALL VERIFY_ID_DMK;\r
+    IF ( ! (CHKARRAY==1) ) THEN GOTO SKIPCHKARRAY;\r
+    IF ( ! (ARRAYRONLY==0) ) THEN GOTO Label_61;\r
+    CALL DO_CHECK_W;\r
+    Label_61:\r
+    IF ( ! (ARRAYRONLY==1) ) THEN GOTO Label_62;\r
+    CALL DO_CHECK_R;\r
+    Label_62:\r
+    LABEL_SEPARATOR = 0;\r
+    SKIPCHKARRAY:\r
+    IF ( ! (PLAYERVERSIONVARIABLE!=0) ) THEN GOTO Label_63;\r
+    CALL BP_VER;\r
+    Label_63:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE READ_INITIALIZE USES GV,DO_INITIALIZE;\r
+    CHKFROM = 0;\r
+    CHKARRAY = 0;\r
+    CHKNVM = 0;\r
+    CHKSEC = 0;\r
+    CALL DO_INITIALIZE;\r
+ENDPROC;\r
+\r
+PROCEDURE NW_INITIALIZE_COMMON USES GV;\r
+    CHKFROM = 0;\r
+    CHKARRAY = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE NW_INITIALIZE USES DO_INITIALIZE,NW_INITIALIZE_COMMON;\r
+    CALL NW_INITIALIZE_COMMON;\r
+    CALL DO_INITIALIZE;\r
+ENDPROC;\r
+\r
+PROCEDURE NR_INITIALIZE_COMMON USES GV;\r
+    CHKFROM = 0;\r
+    CHKARRAY = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE NR_INITIALIZE USES DO_INITIALIZE,NR_INITIALIZE_COMMON;\r
+    CALL NR_INITIALIZE_COMMON;\r
+    CALL DO_INITIALIZE;\r
+ENDPROC;\r
+\r
+PROCEDURE AW_INITIALIZE USES GV,DO_INITIALIZE;\r
+    ARRAYRONLY = 0;\r
+    CHKFROM = 0;\r
+    CHKARRAY = 1;\r
+    CHKNVM = 0;\r
+    CALL DO_INITIALIZE;\r
+ENDPROC;\r
+\r
+PROCEDURE AR_INITIALIZE USES GV,DO_INITIALIZE;\r
+    ARRAYRONLY = 1;\r
+    CHKFROM = 0;\r
+    CHKARRAY = 1;\r
+    CHKNVM = 0;\r
+    CALL DO_INITIALIZE;\r
+ENDPROC;\r
+\r
+PROCEDURE W_INITIALIZE USES GV,DO_INITIALIZE;\r
+    ARRAYRONLY = 0;\r
+    CHKARRAY = 1;\r
+    CALL DO_INITIALIZE;\r
+ENDPROC;\r
+\r
+PROCEDURE R_INITIALIZE USES GV,DO_INITIALIZE;\r
+    ARRAYRONLY = 1;\r
+    CHKARRAY = 1;\r
+    CALL DO_INITIALIZE;\r
+ENDPROC;\r
+\r
+PROCEDURE INITIALIZE USES GV,DO_INITIALIZE;\r
+    ARRAYRONLY = 0;\r
+    FROMRONLY = 0;\r
+    CHKFROM = 1;\r
+    CHKARRAY = 1;\r
+    CALL DO_INITIALIZE;\r
+ENDPROC;\r
+\r
+PROCEDURE POLL_ERASE USES GV;\r
+    PASS = 0;\r
+    INTEGER ILOOP_1;\r
+    FOR ILOOP_1 = 262141 - 1 TO 0 STEP -1;\r
+        IRSTOP IRPAUSE;\r
+        DRSTOP DRPAUSE;\r
+        IRSCAN 8, $84;\r
+        WAIT IDLE, 1 CYCLES;\r
+        WAIT IDLE, 1000 USEC;\r
+        DRSCAN 5, $00,COMPARE $00,$03,PASS;\r
+        IF PASS THEN ILOOP_1 = 0;\r
+    NEXT ILOOP_1;\r
+ENDPROC;\r
+\r
+PROCEDURE UFROM_DISTURB USES GV;\r
+    FOR FROMROWNUMBER = NUMBEROFFROMROWS TO 1 STEP -1;\r
+        IRSTOP IRPAUSE;\r
+        DRSTOP DRPAUSE;\r
+        IRSCAN 8, $9f;\r
+        DRSCAN 3, BOOL((FROMROWNUMBER-1));\r
+        WAIT IDLE, 1 CYCLES;\r
+        IRSTOP IRPAUSE;\r
+        DRSTOP DRPAUSE;\r
+        IRSCAN 8, $9b;\r
+        DRSCAN 128, $ffffffffffffffffffffffffffffffff;\r
+        WAIT IDLE, 5 CYCLES;\r
+        WAIT IDLE, 10000 USEC;\r
+    NEXT FROMROWNUMBER;\r
+ENDPROC;\r
+\r
+PROCEDURE PROGRAM_UROW USES GV,BITSTREAM,DO_EXIT,POLL_PROGRAM;\r
+    IF ( ! (ISERASEONLY==0) ) THEN GOTO SKIP_CYC_INCREMENT;\r
+    IF ( ! (ISPRGARRAY==1) ) THEN GOTO NOT_PGM_ARRAY;\r
+    IF ( ! ( ( ( (INT(UROW[31..0])==-1)&&(INT(UROW[63..32])==-1))&&(INT(UROW[95..64])==-1))&&(INT(UROW[127..96])==-1)) ) THEN GOTO NOT_CORRUPTED_CYCLE_COUNT;\r
+    ACT_UROW_CYCLE_COUNT = 0;\r
+    NOT_CORRUPTED_CYCLE_COUNT:\r
+    IF ( ! (ACT_UROW_CYCLE_COUNT<1000) ) THEN GOTO MAX_CYCLE_COUNT;\r
+    ACT_UROW_CYCLE_COUNT = (ACT_UROW_CYCLE_COUNT+1);\r
+    MAX_CYCLE_COUNT:\r
+    LABEL_SEPARATOR = 0;\r
+    NOT_PGM_ARRAY:\r
+    LABEL_SEPARATOR = 0;\r
+    SKIP_CYC_INCREMENT:\r
+    IF ( ! (ISERASEONLY==1) ) THEN GOTO Label_64;\r
+    UROW[] = $ffffffffffffffffffffffffffffffff;\r
+    Label_64:\r
+    IF ( ! ( (ISERASEONLY==0)||(ISRESTOREDESIGN==1)) ) THEN GOTO SKIP_DESIGN_INFO;\r
+    BUFF32[31..0] = BOOL(CHECKSUM);\r
+    IF ( ! ( !ISRESTOREDESIGN) ) THEN GOTO Label_65;\r
+    UROW[127..112] = BUFF32[15..0];\r
+    Label_65:\r
+    IF ( ! ISRESTOREDESIGN ) THEN GOTO Label_66;\r
+    UROW[127..112] = SUROWCHECKSUM[15..0];\r
+    Label_66:\r
+    IF ( ! ( !ISRESTOREDESIGN) ) THEN GOTO Label_67;\r
+    UROW[101..32] = ACT_UROW_DESIGN_NAME[69..0];\r
+    Label_67:\r
+    IF ( ! ISRESTOREDESIGN ) THEN GOTO Label_68;\r
+    UROW[101..32] = SUROWDESIGNNAME[69..0];\r
+    Label_68:\r
+    LABEL_SEPARATOR = 0;\r
+    SKIP_DESIGN_INFO:\r
+    BUFF32[31..0] = BOOL(ACT_UROW_CYCLE_COUNT);\r
+    UROW[111..102] = BUFF32[9..0];\r
+    UROW[31..29] = ACT_UROW_PROG_METHOD[2..0];\r
+    UROW[28..25] = ACT_UROW_ALGO_VERSION[3..0];\r
+    UROW[16..10] = ACT_UROW_SW_VERSION[6..0];\r
+    UROW[9..6] = ACT_UROW_PROGRAM_SW[3..0];\r
+    UROW[4] = SUROW_SRAM_DISTURB[0];\r
+    IF ( ! (ACT_UROW_ALGO_VERSION[6]==1) ) THEN GOTO Label_69;\r
+    UROW[5] = 1;\r
+    UROW[0] = 0;\r
+    UROW[24..23] = ACT_UROW_ALGO_VERSION[5..4];\r
+    Label_69:\r
+    IF ( ! (ACT_UROW_ALGO_VERSION[6]==0) ) THEN GOTO Label_70;\r
+    UROW[5] = 0;\r
+    UROW[0] = 1;\r
+    UROW[24..23] = ACT_UROW_ALGO_VERSION[5..4];\r
+    Label_70:\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $a7;\r
+    DRSCAN 128, UROW[];\r
+    WAIT IDLE, 15 CYCLES;\r
+    CALL POLL_PROGRAM;\r
+    IF ( ! (PASS==0) ) THEN GOTO PROGRAM_OK3;\r
+    STATUS = -24;\r
+    PRINT "Failed to program UROW";\r
+    UNIQUEEXITCODE = 32853;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    PROGRAM_OK3:\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $c0;\r
+    WAIT IDLE, 1 CYCLES;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $a8;\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 165 USEC;\r
+    DRSCAN 128, $00000000000000000000000000000000,COMPARE UROW[],UROW_MASK[],PASS;\r
+    IF ( ! (PASS==0) ) THEN GOTO UROW_OK;\r
+    STATUS = -24;\r
+    PRINT "Failed to program UROW";\r
+    UNIQUEEXITCODE = 32854;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    UROW_OK:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE FAIL_ERASE USES GV,DO_EXIT;\r
+    STATUS = 8;\r
+    PRINT "Failed Erase Operation";\r
+    UNIQUEEXITCODE = 32855;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+ENDPROC;\r
+\r
+PROCEDURE EXE_ERASE USES BITSTREAM,GV,READ_UROW,POLL_ERASE,PROGRAM_UROW,FAIL_ERASE;\r
+    IF ( ! (COMBERASESELECT[14]==1) ) THEN GOTO SKIPRUROW;\r
+    CALL READ_UROW;\r
+    EXPORT "ACTEL_SLOG_UROW", UROW[];\r
+    SKIPRUROW:\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $85;\r
+    DRSCAN 23, COMBERASESELECT[];\r
+    WAIT IDLE, 3 CYCLES;\r
+    CALL POLL_ERASE;\r
+    IF ( ! (PASS==0) ) THEN GOTO ERASEOK;\r
+    CALL FAIL_ERASE;\r
+    ERASEOK:\r
+    IF ( ! (COMBERASESELECT[14]==1) ) THEN GOTO Label_71;\r
+    CALL PROGRAM_UROW;\r
+    Label_71:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_ERASE USES BITSTREAM,GV,EXE_ERASE;\r
+    PRINT "Erase ...";\r
+    COMBERASESELECT[22..0] = $004000;\r
+    COMBERASESELECT[0] = 1;\r
+    CALL EXE_ERASE;\r
+    PRINT "Completed erase";\r
+    IF ( ! (ISPRGARRAY==1) ) THEN GOTO NOT_PGM_ARRAY_ERASE;\r
+    BUFF32[31..0] = BOOL(CHECKSUM);\r
+    EXPORT "CHECKSUM: ", BUFF32[15..0];\r
+    NOT_PGM_ARRAY_ERASE:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_ERASE_ARRAY USES GV,EXE_ERASE;\r
+    PRINT "Erase FPGA Array ...";\r
+    COMBERASESELECT[22..0] = $004001;\r
+    CALL EXE_ERASE;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_ERASE_ONLY USES GV,DO_ERASE;\r
+    ISERASEONLY = 1;\r
+    CALL DO_ERASE;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_ERASE_ARRAY_ONLY USES GV,DO_ERASE_ARRAY;\r
+    ISERASEONLY = 1;\r
+    CALL DO_ERASE_ARRAY;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_ERASE_ALL USES GV,UFROM_DISTURB,EXE_ERASE;\r
+    IF ( ! ( (BM7DEVICE==1)||(BM1DEVICE==1)) ) THEN GOTO Label_72;\r
+    PRINT "Erase FPGA Array and FlashROM ...";\r
+    Label_72:\r
+    IF ( ! ( (BM7DEVICE!=1)&&(BM1DEVICE!=1)) ) THEN GOTO Label_73;\r
+    PRINT "Erase FPGA Array, FlashROM and Security Settings ...";\r
+    Label_73:\r
+    COMBERASESELECT[22..0] = $7fc00f;\r
+    ISERASEONLY = 1;\r
+    CALL EXE_ERASE;\r
+    CALL UFROM_DISTURB;\r
+ENDPROC;\r
+\r
+PROCEDURE LOAD_ROW_DATA USES BITSTREAM,GV;\r
+    FOR SDTILE = 1 TO NUMBEROFSDTILES;\r
+        FOR I = 1 TO 8;\r
+            IRSTOP IRPAUSE;\r
+            DRSTOP DRPAUSE;\r
+            IRSCAN 8, $89;\r
+            DRSCAN 26, DATASTREAM[(DATAINDEX+25)..DATAINDEX];\r
+            WAIT IDLE, 3 CYCLES;\r
+            DATAINDEX = (DATAINDEX+26);\r
+        NEXT I;\r
+    NEXT SDTILE;\r
+ENDPROC;\r
+\r
+PROCEDURE EXE_PROGRAM USES GV,DO_EXIT,POLL_PROGRAM;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $83;\r
+    WAIT IDLE, 3 CYCLES;\r
+    CALL POLL_PROGRAM;\r
+    IF ( ! (PASS==0) ) THEN GOTO Label_74;\r
+    STATUS = 10;\r
+    PRINT "Failed to program FPGA array at row ",ROWNUMBER,".";\r
+    UNIQUEEXITCODE = 32856;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    Label_74:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE EXE_VERIFY USES GV,DO_EXIT,POLL_PROGRAM;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $8d;\r
+    DRSCAN 2, VERIFYEOL[];\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 132 USEC;\r
+    CALL POLL_PROGRAM;\r
+    IF ( ! (PASS==0) ) THEN GOTO Label_75;\r
+    STATUS = 11;\r
+    PRINT "Verify 0 failed at row ",ROWNUMBER,".";\r
+    UNIQUEEXITCODE = 32857;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    Label_75:\r
+    IRSCAN 8, $8d;\r
+    DRSCAN 2, VERIFYEOL[],COMPARE $0,$3,PASS;\r
+    IF ( ! (PASS==0) ) THEN GOTO Label_76;\r
+    STATUS = 11;\r
+    PRINT "Verify 0 failed at row ",ROWNUMBER,".";\r
+    UNIQUEEXITCODE = 32858;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    Label_76:\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $8e;\r
+    DRSCAN 2, VERIFYEOL[];\r
+    WAIT IDLE, 3 CYCLES;\r
+    WAIT IDLE, 132 USEC;\r
+    CALL POLL_PROGRAM;\r
+    IF ( ! (PASS==0) ) THEN GOTO Label_77;\r
+    STATUS = 11;\r
+    PRINT "Verify 1 failed at row ",ROWNUMBER,".";\r
+    UNIQUEEXITCODE = 32859;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    Label_77:\r
+    IRSCAN 8, $8e;\r
+    DRSCAN 2, VERIFYEOL[],COMPARE $0,$3,PASS;\r
+    IF ( ! (PASS==0) ) THEN GOTO Label_78;\r
+    STATUS = 11;\r
+    PRINT "Verify 1 failed at row ",ROWNUMBER,".";\r
+    UNIQUEEXITCODE = 32860;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    Label_78:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_PROGRAM USES GV,LOAD_ROW_DATA,EXE_PROGRAM;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $87;\r
+    DRSCAN 2, $2;\r
+    WAIT IDLE, 3 CYCLES;\r
+    PRINT "Programming FPGA Array";\r
+    DATAINDEX = 0;\r
+    ROWNUMBER = (NUMBEROFMAPROWS-1);\r
+    INTEGER IREPEAT_0;\r
+    FOR IREPEAT_0 = NUMBEROFMAPROWS - 1 TO 0 STEP -1;\r
+        CALL LOAD_ROW_DATA;\r
+        CALL EXE_PROGRAM;\r
+        IRSTOP IRPAUSE;\r
+        DRSTOP DRPAUSE;\r
+        IRSCAN 8, $87;\r
+        DRSCAN 2, $3;\r
+        WAIT IDLE, 3 CYCLES;\r
+        IF ( ! ((ROWNUMBER%ROWITERATION)==0) ) THEN GOTO Label_79;\r
+        PERCENT_UPDATE = ((100*((NUMBEROFMAPROWS-ROWNUMBER)+1))/NUMBEROFMAPROWS);\r
+        DIFFERENCE = (PERCENT_UPDATE%10);\r
+        IF ( ! (DIFFERENCE>=5) ) THEN GOTO ROUND_DOWN_PGM_A;\r
+        PERCENT_UPDATE = (PERCENT_UPDATE+(10-DIFFERENCE));\r
+        ROUND_DOWN_PGM_A:\r
+        IF ( ! (DIFFERENCE<5) ) THEN GOTO ROUND_UP_PGM_A;\r
+        PERCENT_UPDATE = (PERCENT_UPDATE-DIFFERENCE);\r
+        ROUND_UP_PGM_A:\r
+        EXPORT "PERCENT_DONE", PERCENT_UPDATE;\r
+        Label_79:\r
+        ROWNUMBER = (ROWNUMBER-1);\r
+    NEXT IREPEAT_0;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_VERIFY USES GV,LOAD_ROW_DATA,EXE_VERIFY;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $87;\r
+    DRSCAN 2, $2;\r
+    WAIT IDLE, 3 CYCLES;\r
+    PRINT "Verifying FPGA Array";\r
+    DATAINDEX = 0;\r
+    ROWNUMBER = (NUMBEROFMAPROWS-1);\r
+    INTEGER IREPEAT_1;\r
+    FOR IREPEAT_1 = NUMBEROFMAPROWS - 1 TO 0 STEP -1;\r
+        CALL LOAD_ROW_DATA;\r
+        CALL EXE_VERIFY;\r
+        IRSTOP IRPAUSE;\r
+        DRSTOP DRPAUSE;\r
+        IRSCAN 8, $87;\r
+        DRSCAN 2, $3;\r
+        WAIT IDLE, 3 CYCLES;\r
+        IF ( ! ((ROWNUMBER%ROWITERATION)==0) ) THEN GOTO Label_80;\r
+        PERCENT_UPDATE = ((100*((NUMBEROFMAPROWS-ROWNUMBER)+1))/NUMBEROFMAPROWS);\r
+        DIFFERENCE = (PERCENT_UPDATE%10);\r
+        IF ( ! (DIFFERENCE>=5) ) THEN GOTO ROUND_DOWN_VER_ARRAY;\r
+        PERCENT_UPDATE = (PERCENT_UPDATE+(10-DIFFERENCE));\r
+        ROUND_DOWN_VER_ARRAY:\r
+        IF ( ! (DIFFERENCE<5) ) THEN GOTO ROUND_UP_VER_ARRAY;\r
+        PERCENT_UPDATE = (PERCENT_UPDATE-DIFFERENCE);\r
+        ROUND_UP_VER_ARRAY:\r
+        EXPORT "PERCENT_DONE", PERCENT_UPDATE;\r
+        Label_80:\r
+        ROWNUMBER = (ROWNUMBER-1);\r
+    NEXT IREPEAT_1;\r
+    PRINT "        Verifying FPGA Array -- pass";\r
+ENDPROC;\r
+\r
+PROCEDURE DO_VERIFY_BOL USES GV,DO_VERIFY;\r
+    VERIFYEOL[0] = 0;\r
+    CALL DO_VERIFY;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_VERIFY_EOL USES GV,DO_VERIFY;\r
+    VERIFYEOL[0] = 1;\r
+    CALL DO_VERIFY;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_PROGRAM_RLOCK USES GV,DO_EXIT,POLL_PROGRAM;\r
+    DATAINDEX = 0;\r
+    INTEGER IREPEAT_2;\r
+    FOR IREPEAT_2 = NUMBEROFSDTILES - 1 TO 0 STEP -1;\r
+        FOR I = 1 TO 8;\r
+            IRSTOP IRPAUSE;\r
+            DRSTOP DRPAUSE;\r
+            IRSCAN 8, $89;\r
+            DRSCAN 26, RLOCK[(DATAINDEX+25)..DATAINDEX];\r
+            WAIT IDLE, 3 CYCLES;\r
+            DATAINDEX = (DATAINDEX+26);\r
+        NEXT I;\r
+    NEXT IREPEAT_2;\r
+    IRSTOP IRPAUSE;\r
+    DRSTOP DRPAUSE;\r
+    IRSCAN 8, $8c;\r
+    WAIT IDLE, 3 CYCLES;\r
+    CALL POLL_PROGRAM;\r
+    IF ( ! (PASS==0) ) THEN GOTO Label_81;\r
+    STATUS = 10;\r
+    PRINT "Failed to enable FPGA Array.";\r
+    UNIQUEEXITCODE = 32862;\r
+    BUFF128[15..0] = BOOL(UNIQUEEXITCODE);\r
+    EXPORT "ERROR_CODE", BUFF128[15..0];\r
+    CALL DO_EXIT;\r
+    Label_81:\r
+    LABEL_SEPARATOR = 0;\r
+ENDPROC;\r
+\r
+PROCEDURE DO_READ_IDCODE USES READ_IDCODE_ONLY;\r
+    WAIT RESET, 5 CYCLES;\r
+    CALL READ_IDCODE_ONLY;\r
+    EXIT 0;\r
+ENDPROC;\r
+\r
+\r
+CRC A5F1;\r