commit 7bca3829fa640f23ac9316e63ed47b07b626c1f0 Author: Stefan Ritt Date: Mon Nov 14 15:38:40 2016 +0100 Copied files over from SVN repositories diff --git a/firmware/3s400/drs4_eval5.bit b/firmware/3s400/drs4_eval5.bit new file mode 100644 index 0000000..cb9b7ab Binary files /dev/null and b/firmware/3s400/drs4_eval5.bit differ diff --git a/firmware/3s400/drs4_eval5.ipf b/firmware/3s400/drs4_eval5.ipf new file mode 100644 index 0000000..82944f0 Binary files /dev/null and b/firmware/3s400/drs4_eval5.ipf differ diff --git a/firmware/3s400/drs4_eval5.mcs b/firmware/3s400/drs4_eval5.mcs new file mode 100644 index 0000000..ca2fb48 --- /dev/null +++ b/firmware/3s400/drs4_eval5.mcs @@ -0,0 +1,13280 @@ +:020000040000FA +:10000000FFFFFFFF5599AA660C000180000000E089 +:100010000C800680000000220C8004800200FCA7F7 +:100020000C800380808203C90C0003800000000064 +:100030000C000180000000900C0004800000000013 +:100040000C000180000000800C0002000A00F30098 +:1000500000000000000000000000000000000000A0 +:100060000000000000000000000000000000000090 +:100070000000000000000000000000000000000080 +:100080000000000000000000000000000000000070 +:100090000000000000000000000000000000000060 +:1000A0000000000000000000000000000000000050 +:1000B0000000000000000000000000000000000040 +:1000C0000000000000000000000000000000000030 +:1000D0000000000000C00B00000000000040010014 +:1000E0000000000000000000000000000000000010 +:1000F0000000000000000000000000000000000000 +:1001000000000000000000000000000000000000EF +:1001100000000000000000000000000000000000DF +:1001200000000000000000000000000000000000CF +:1001300000000000000000000000000000000000BF +:1001400000000000000000000000000000000000AF +:10015000000000000000000000000000000000009F +:10016000000000000000000000000000000000008F +:10017000000000000000000000000000000000007F +:10018000000000000000000000000000000000006F +:10019000000000000000000000000000000000005F +:1001A000000000000000000000000000000000004F +:1001B000000000000000000000000000000000003F +:1001C000000000000000000000000000000000002F +:1001D000000000000000000000000000000000001F +:1001E000000000000000000000C00B000000000044 +:1001F00000420300000000000000000000000000BA +:1002000000000000000000000000000000000000EE +:1002100000000000000000000000000000000000DE +:1002200000000000000000000000000000000000CE +:1002300000000000000000000000000000000000BE +:1002400000000000000000000000000000000000AE +:10025000000000000000000000000000000000009E +:10026000000000000000000000000000000000008E +:1002700000000000000000000000208700101000B7 +:10028000020000000000000000000000000000006C +:10029000000000000000000000000000000000005E +:1002A000000000000000000000000000000000004E +:1002B000000000000000000000000000000000003E +:1002C000000000000000000000000000000000002E +:1002D000000000000000000000000000000000001E +:1002E000000000000000000000000000000000000E +:1002F00000000000000000000000000000000000FE +:1003000000000000000000000000000000000000ED +:1003100000000000000000000000000000000000DD +:1003200000000000000000000000000000000000CD +:1003300000000000000000000000000000000000BD +:1003400000000000000000000000000000000000AD +:10035000000000000000000000000000000000009D +:10036000000000000000000000000000000000008D +:10037000000000000000000000000000000000007D +:10038000000080820000000010000000000000005B +:10039000000000000000010C86A0053128100000BC +:1003A000000000000000000000000000000000004D +:1003B0000000000000000000000005312810010CC2 +:1003C00086A005312810010C86A005312810010CEB +:1003D00086A005002810010C00A005002810010CC3 +:1003E00000A000000000000000000000000000006D +:1003F00000000000000000000000000000000000FD +:100400000000000000000000000000000000010CDF +:1004100000A0000000000100C605803900100000A7 +:1004200000000000000000000000000000000000CC +:1004300000000000000000000000000000000000BC +:100440000000000000000100C60500000000010CD3 +:1004500086A005312810010C86A005312810010C5A +:1004600086A005312810010C86A005312810000057 +:10047000000000000000000000000000000000007C +:100480000000000000000000000000000000010C5F +:1004900000A005002810000000000000000000007F +:1004A000000000000000000000000000000000004C +:1004B000000000000000000000000000000000003C +:1004C000000000000000000000000000000000002C +:1004D000000000000000000000000000000000001C +:1004E000000000000000000000000000000000000C +:1004F00000000000000000000000000000000000FC +:1005000000000000000000000000000000000000EB +:1005100000000000000000000000000000000000DB +:1005200000000000000000000000000000002000AB +:1005300000000000000000000000000000000000BB +:1005400000000000000000000000000000000000AB +:10055000000000000000000000000000000000009B +:10056000000000000000000000000000000000008B +:10057000000000000000000000000000000000007B +:10058000000000000000000000000000000000006B +:10059000000000000000000000000000000000005B +:1005A000000000000000000000000000000000004B +:1005B0001800000000000000000000000000000023 +:1005C00000000081000000000000000000000000AA +:1005D000000000000000000000000000000000001B +:1005E000000000800000000000000081000000000A +:1005F00000000081000000000000008100000000F9 +:100600000000008100000000000000010000000068 +:1006100000000000000000000000000000000000DA +:1006200000000000000000000000000000000000CA +:1006300000000000000000000000000100000000B9 +:1006400000000000000000000000000000000000AA +:10065000000000000000000000000000000000009A +:10066000000000000000000000000000000000008A +:1006700000000000000000000000008100000000F9 +:100680000000008100000000000000810000000068 +:1006900000000081000000000000000000000000D9 +:1006A000000000000000000000000000000000004A +:1006B00000000000000000000000008100000000B9 +:1006C000000000000000000000000000000000002A +:1006D00000000000000004182000000000000000DE +:1006E000000000000000000000000000000000000A +:1006F00000000000000000102000000000000418AE +:100700002000000000000418200000000000041871 +:10071000200000000000041820000000000000017C +:1007200000000000000000000000000000000000C9 +:1007300000000000000000000000000000000000B9 +:10074000000000000000000000000000000004089D +:100750000000000000000000000000000000000099 +:100760000000000000000000000000000000000089 +:100770000000000000000000000000000000000079 +:10078000000000000000000000000000000004184D +:1007900020000000000004182000000000000418E1 +:1007A00020000000000004182000000000000000ED +:1007B0000000000000000000000000000000000039 +:1007C000000000000000000000000000000004180D +:1007D00020000000000000000000000000000000F9 +:1007E00000000000000000000000040020000000E5 +:1007F00000000000000000000000000000000000F9 +:1008000000000000000000000000000020000000C8 +:100810000000040020000000000004002000000090 +:1008200000000400000000000000000000000000C4 +:1008300000000000000000000000000000000000B8 +:1008400000000000000000000000000000000000A8 +:100850000000000000000000000000000000000098 +:100860000000000000000000000000002010000058 +:100870000000000000000000000000000000000078 +:100880000000000000000000000000000000000068 +:100890000000000000000000000004000000000054 +:1008A0000000040020000000000004002000000000 +:1008B00000000400200000000000040020000000F0 +:1008C0000000000000000000000000000000000028 +:1008D0000000000000000000000000000000000018 +:1008E0000000000000000000000000000000000008 +:1008F0000C00000000000000000000000002608109 +:1009000006400000000000000000000000000000A1 +:100910000000000000000000000000000000008057 +:100920000640000000026081064000000002608175 +:10093000064000000002608100000000000000810D +:1009400000000000000000000000000000000000A7 +:100950000000000000000000000000000000000097 +:100960000000000000000000000000000000000087 +:100970000000000000000001000000000000000076 +:100980000640000000000000000000000000000021 +:100990000000000000000000000000000000000057 +:1009A00000000000000000000000000000026000E5 +:1009B000000000000002608106400000000260812B +:1009C00006400000000260810640000000026081D5 +:1009D00006400000000000000000000000000000D1 +:1009E0000000000000000000000000000000000007 +:1009F0000000000000000081000000000000000076 +:100A0000000000C00C00000000000000000000001A +:100A10000000009910050000000000000000000028 +:100A200000000000000000000000000000000000C6 +:100A300000000099000400000000009990020000EE +:100A40000000009990050000000000999006000049 +:100A500000000088100400000000000000000000FA +:100A60000000000000000000000000000000000086 +:100A70000000000000000000000000000000000076 +:100A8000000000000000000000000088900100004D +:100A90000000001100000000000000000000000045 +:100AA0000000000000000000000000000000000046 +:100AB0000000000000000000000000000000000036 +:100AC00000000011100100000000009990020000D9 +:100AD00000000099900500000000009990060000B9 +:100AE00000000099900500000000000000000000D8 +:100AF00000000000000000000000000000000000F6 +:100B000000000000000000000000008890060000C7 +:100B100000000000000000C0000000000000000015 +:100B20000000C000000000000023000000000000E2 +:100B300000000000000000000000000000000000B5 +:100B400000008000000000000022C0000000000043 +:100B50000023C000000000000023C00000000000CF +:100B60000023C0000000000000230000000000007F +:100B70000000000000000000000000000000000075 +:100B80000000000000000000000000000000000065 +:100B90000000000000000000000040000000000015 +:100BA0000001000000000000002200000000000022 +:100BB0000000000000000000000000000000000035 +:100BC0000000000000000000000000000000000025 +:100BD00000000000000000000001C0000000000054 +:100BE0000023C000000000000023C000000000003F +:100BF0000023C000000000000023000000000000EF +:100C000000000000000000000000000000000000E4 +:100C100000000000000000000000C0000000000014 +:100C200000230000000000000000000000000000A1 +:100C300000000000000000000000800080000000B4 +:100C400000000000000000000000000000000000A4 +:100C50000000000000000000000000000000000094 +:100C60000001810000000100010080000000000080 +:100C70000001010100000000000000000000000071 +:100C80000000000000000000000000000000000064 +:100C90000000000000000000000000000000000054 +:100CA0000000000000000000000000000000000044 +:100CB0000000000000000000000000000000000034 +:100CC0000000000000000000000000000000000024 +:100CD0000000000000000000000000000000000014 +:100CE0000000000000000000000100000000000003 +:100CF000000101000000000001018000000001006F +:100D00000000000000000100800001000000000061 +:100D100000000000000000000000000000000000D3 +:100D200000000000000000000000000000000000C3 +:100D300000000000000000000000000000000000B3 +:100D400000000000000000000000000000808200A1 +:100D50008000000000000000000000000000000013 +:100D600000000000000000000000000000400280C1 +:100D7000010000000001C0800100400040C0800070 +:100D80000000000000014001000000000000000021 +:100D90000000000000000000000000000000000053 +:100DA0000000000000000000000000000000000043 +:100DB0000000000000000000000000000000000033 +:100DC00000000000000000000000000000800000A3 +:100DD0000000000000000000000000000000000013 +:100DE0000000000000000000000000000000000003 +:100DF00000000000000000000000000000010000F2 +:100E0000000002000041400000000200400180801C +:100E100000004000008000000000400082404000D0 +:100E200000000000000000000000000000000000C2 +:100E300000000000000000000000000000000000B2 +:100E400000000000000000000000000000000000A2 +:100E50000000000000000000000000000000000092 +:100E600090000000000000000000000000000000F2 +:100E70000000000000000000000000000000000072 +:100E800070000000000000001000000000000000E2 +:100E90007800000000000000A00000000001000039 +:100EA0001000000000000000000000000000000032 +:100EB0000000000000000000000000000000000032 +:100EC0000000000000000000000000000000000022 +:100ED0000000000000000000000000000000000012 +:100EE0000000000000000000000000000000000002 +:100EF00000000000000000000000000000000000F2 +:100F000000000000000000000000000000000000E1 +:100F10000000000000000000780000000000000059 +:100F200078000000000000007000000000020000D7 +:100F30007000000000010000000000000000000040 +:100F400000000000000000000000000000000000A1 +:100F5000000000000000000050000000000200003F +:100F60000000000000000000000000000000000081 +:100F70000000000000000000A000000000000000D1 +:100F80000000000000000000000000000000000061 +:100F9000000000000002000000000000000200004D +:100FA0002000000000000000A00000000000000081 +:100FB000C00000000002000000000000000000006F +:100FC0000000000000000000000000000000000021 +:100FD0000000000000000000000000000000000011 +:100FE0000000000000000000000000000000000001 +:100FF000C000000000000000000000000000000031 +:1010000000000000000000000000000000000000E0 +:1010100000000000000000000000000000000000D0 +:1010200000000000000000000000000000000000C0 +:101030002002000000000000C000000000000000CE +:101040002000000000000000C000000000000000C0 +:101050000000000000000000000000000000000090 +:10106000000000000000000000000000000200007E +:101070000000000000000000000000000000000070 +:101080000000000000000000000000000C00000054 +:101090000000000000000000000000000000000050 +:1010A0000000000000000000000000000000000040 +:1010B0000000000008000000000000000C0000001C +:1010C0000000000000000000000000000C00000014 +:1010D0000000000000000000000000000000000010 +:1010E0000000000000000000000000000000000000 +:1010F00000000000000000000000000000000000F0 +:1011000000000000080000000000000000000000D7 +:1011100000000000000000000000000000000000CF +:1011200000000000000000000000000000000000BF +:1011300000000000000000000000000000000000AF +:101140000000000000000000000000000C00000093 +:101150004000000000000000C0000000040000008B +:10116000000000000000000000000000000000007F +:10117000000000000000000000000000000000006F +:10118000000000000000000000000000000000005F +:10119000000000000000000000000000100000003F +:1011A000200000000000000000000000000000001F +:1011B000000000000000000000000000100000001F +:1011C0000000000010000000A0000000100000005F +:1011D0002000000000000000A0000000000000004F +:1011E00000000000000000002000000000000000DF +:1011F00000000000000000000000000000000000EF +:1012000000000000000000000000000000000000DE +:101210000000000000000000A0000000000000002E +:1012200000000000000000000000000000000000BE +:1012300000000000000000000000000000000000AE +:10124000000000000000000000000000000000009E +:101250000000000010000000C000000010000000AE +:101260002000000010000000A000000000000000AE +:10127000C0000000000000000000000000000000AE +:10128000000000000000000000000000000000005E +:10129000000000000002000020000000000000002C +:1012A000000000000000000000000000000000003E +:1012B00050000000000000000000000000000000DE +:1012C000000000000000000000000000000000001E +:1012D000700000000000000050000000000100004D +:1012E0005000000000000000680000000001000045 +:1012F00028000000000000000000000000010000C5 +:1013000000000000000000000000000000000000DD +:1013100000000000000000000000000000000000CD +:1013200000000000000000000000000000010000BC +:1013300000000000000000000000000000000000AD +:10134000000000000000000000000000000000009D +:10135000000000000000000000000000000000008D +:10136000000000000000000060000000000100001C +:1013700070000000000000005000000000010000AC +:10138000100000000000000000000000000000004D +:10139000000000000000000000000000000000004D +:1013A00000000000000000005000000000010000EC +:1013B000000000000000000000000000000000002D +:1013C000000C000000000004000000020001040006 +:1013D000101000181010040100010200802100000C +:1013E00010118084110001009141000400002002CE +:1013F000043A41008100910C048221080100800020 +:10140000000280010121200012011011014401009D +:101410000400000081020020000281008020000002 +:101420000001814021028101802249020002004422 +:10143000002180012400800234212102800001016A +:101440000022012A218104020201810200220004FB +:10145000000401202020000482010001002001027C +:1014600000820001242001023481820001008102F7 +:101470000102020220228040000030218101000090 +:10148000010100002021210800003002012000009D +:101490000440001020200000000030008080000088 +:1014A00001000000012001000000000001200000F8 +:1014B000000000000000002000000000000000000C +:1014C000000000000000000000000000000000001C +:1014D00000000000000C0000000000000000000000 +:1014E0000000000010300018101000500000001024 +:1014F0000000000010100080305000003090B0005C +:1015000000000000902C900000003058000095086A +:1015100000000040005050090C0029183D00103018 +:101520009000B0009020000090002000000090503B +:1015300090500000A000000E0000A000090008006C +:1015400000000004097E9000000890003050003038 +:101550000000000000000058040000B0900A0000E5 +:10156000007A000000A000009000000000000000D1 +:1015700000000050002000000004000030000D00BA +:1015800074000000000000000000000000000000E7 +:10159000000000000800B080000000400050100073 +:1015A000000000000050500000000000000010008B +:1015B000000000000000000000000000000090009B +:1015C000000000000000000000000000000000001B +:1015D000000000000000000000000000000000000B +:1015E000000000000000000000080A4200000004A3 +:1015F0000E000A5C0E0C0C000A0060066A06080861 +:101600000A0C088A3E1C00004A081E000C000C0050 +:10161000181C400800002A08042C28501C0038041C +:10162000042C1452080A3E0A0A0C1E5C0D189087FE +:101630000C0C0A080C18080008E006063C08801686 +:101640000E0C3156303E6E007A783830384C380403 +:10165000361C180C000C0E3D0E3C3B6C385B1058D1 +:101660001C3838E8160A080C0E1C0838393C0C08DF +:10167000080CBD0C5E180A0C0A08081E3030000861 +:101680001C5C020806306C580EBC06603C176C08E7 +:101690003C283C0E050018080C08080830381A10C1 +:1016A0000A5A1E1C3C0400000D0C0A0030343C0099 +:1016B000000030080C100000001000003030000066 +:1016C00000003000302000000400000008300C0052 +:1016D000000000000C30000E0000000000000010B0 +:1016E00000000000000000000000000000000000FA +:1016F00000000000000000000000000000040000E6 +:1017000000000000002000000000000000000000B9 +:1017100000080000000000000008000000080000B1 +:101720000008000000000200000800004200124013 +:101730000008400400000000002000000000080035 +:1017400080000000010C8100808000001004000473 +:10175000008001400000110001000080002C1008F2 +:10176000012000040000008000080000000082004A +:1017700000080000100280A00C38800080041001D6 +:101780001088800800011080810800001000101CE3 +:10179000800001001000000000000080110010080F +:1017A00001000000000000000130002000001000D7 +:1017B00010000000010C80800000000010000000FC +:1017C00000000000000002000000000000400000D7 +:1017D0000000000000000000000000000000000009 +:1017E00000000000000000000100000000000000F8 +:1017F00000000000000000000000000000000000E9 +:1018000000000000000000000000000000000000D8 +:1018100000020000000000000000000000000000C6 +:1018200000000000000100000000000000010000B6 +:101830000002000000010000000004000031000070 +:10184000044004000031200000000000007000008F +:101850000000010010700000040210001060000081 +:101860008002000200000010000090000400000050 +:1018700008418001044000020000002000010042F5 +:1018800000001C0000010000484C1860020110001C +:101890000002400440211021000440201C110000DF +:1018A0004000500210100402400000000010002010 +:1018B000800280010C100000080000000C000040B5 +:1018C00000004000400000000C011020000000005B +:1018D00040000000000000000000000000000000C8 +:1018E0000020000000000040000000000000000098 +:1018F0000002000000000000000000000C000000DA +:1019000000000000000000000000000000000000D7 +:1019100000000000000000000000000000000000C7 +:1019200000000000000000000000000000100000A7 +:1019300000000000000000000000000000000000A7 +:10194000000000000000000800000000000000008F +:1019500000208200000010000020000800000000AD +:101960000020000000000000002000000000000037 +:101970000000000000000000000000000000200047 +:101980000000000004000000000000000000000053 +:10199000000000000000000000000000040004003F +:1019A0000010810000000000000000200000000086 +:1019B00000200000000020100020000000000000B7 +:1019C00000200000000000000020000004000000D3 +:1019D0000010000000000000000000000000D0091E +:1019E000000082000000C001000000000000D001E3 +:1019F000000000000000C001000000000000000026 +:101A000000000000000000000000000000000000D6 +:101A100000000000000000000000000000000000C6 +:101A200000000000000000000000000000000000B6 +:101A300000000000000010810800FFFFFFFFFFFF13 +:101A4000FFFFFFFFFFFFFFFFFFFFAF05AF053535CE +:101A50003535FFFFFFFFFFFFFFFFFFFFFFFFFFFF2A +:101A6000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF86 +:101A7000FFFF774435351D1D35355353F5055F5050 +:101A80003535FFFFFFFFFFFFFFFF1D1D77221D1DE7 +:101A9000DD11FFFFFFFFFFFFFFFFFFFFFFFFFFFF66 +:101AA000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF46 +:101AB000FFFF7722F5057722AF05FFFFFFFFFFFF4E +:101AC000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF26 +:101AD000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF16 +:101AE000FFFFCF03CF03CF033355FFFFFF00FFFFFF +:101AF000FFFFFFFFFFFFFFFF0F0FFFFFFF00FFFFD5 +:101B0000FF00FFFF0F0FFFFF3333FF000F0FFFFF3B +:101B10000F0FFFFF0F0FFFFFFF00FFFFFF005555E7 +:101B2000FF00FFFFFF00FFFF3333FFFF5555FFFFAF +:101B30005555FFFFFF00FFFF333300000000000199 +:101B40000000000000000000000000810000802470 +:101B50000E0080240E0080240E0080240E004080A1 +:101B60008C2248808C2280240E0080240E00802449 +:101B70000E0080240E0080240E0080240E0080249D +:101B80000E0080240E0040808C2248808C224080F1 +:101B90008C2248808C2280240E0080240E004080FD +:101BA0008C2248808C2280240E0080240E00802409 +:101BB0000E0080240E0080240E0080240E0080245D +:101BC0000E0080240E0040808C2248808C228024CD +:101BD0000E0080240E0080240E0080240E0080243D +:101BE0000E0080240E0080240E0080240E0080242D +:101BF0000E0080240E0040808C2248808C22000041 +:101C00000C0080240E0080240E0000000C00000058 +:101C10000C0000000C0000000C0000000C00000094 +:101C20000C0000000C0000000C0000000C00000084 +:101C30000C0000000C0000000C0000000C00000074 +:101C40000C0000000C0000000C0000000C00000064 +:101C50000000000100000000000000000000000083 +:101C60000000000000008024020080240200802484 +:101C70000200488000204880002080240200802448 +:101C800002008024020080240200802402008024BC +:101C90000200802402008024020048800020488046 +:101CA00000204880002048800020802402008024FA +:101CB0000200488000204880002080240200802408 +:101CC000020080240200802402008024020080247C +:101CD0000200802402008024020048800020488006 +:101CE00000208024020080240200802402000000E2 +:101CF000000080240200802402008024020080244E +:101D000002008024020080240200488000204880D5 +:101D10000020000000008024020000000000802459 +:101D200002000000000000000000000000000000B1 +:101D300000000000000000000000000000000000A3 +:101D40000000000000000000000000000000000093 +:101D50000000000000000000000000000000000083 +:101D60000000000000000000000000000C00000067 +:101D7000000000000000FFFFFFFFFFFFFFFFFFFF6D +:101D8000FFFFFFFFFFFFCF03474747473355FFFFE5 +:101D9000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF53 +:101DA000FFFFFFFFFFFFFFFFFFFFFFFFFFFF3535D7 +:101DB000CF0335355F500F333F0CCF030F33FFFF99 +:101DC000FFFFFFFFFFFFF50535350F333535FFFF0B +:101DD000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF13 +:101DE000FFFFFFFFFFFFFFFFFFFFFFFFFFFF0F559D +:101DF000474733550F55FFFFFFFFFFFFFFFFFFFF73 +:101E0000FFFFFFFF0F0FFFFFFFFFFFFFFFFFFFFFC2 +:101E1000FFFFFFFFFFFFFFFFFFFFFFFFFFFF5F5021 +:101E2000AF05F5053535FFFFFF00FFFFFFFFFFFFA3 +:101E3000FF00FFFFFFFFFFFFFF00FFFF3333FFFF48 +:101E40003333FFFFFF00FFFFFF00FFFF0F0FFFFF18 +:101E50000F0FFF000F0FFFFF0F0FFFFF0F0FFFFF11 +:101E6000FF00FFFF3333FFFF3333FFFF0F0FFFFF91 +:101E70003333FFFF0F0F00000000000000000040A0 +:101E80000C000000000000000000B02210018028BB +:101E9000C04493291401802814850000000000002C +:101EA00000009338140180280485920914018028C9 +:101EB000CCE3B01814018028AC977032140180284C +:101EC000802700000000000000000000000000006B +:101ED0000000F01814018028884E00000000000067 +:101EE00000001328140180280C93F00C14018028A2 +:101EF000C44A781814018028E85443081401802843 +:101F0000A0400000000000000000132814018028F9 +:101F1000E4C3001104008028048A72281401802878 +:101F20008CE1A01814018028084C50291401802845 +:101F3000685800000000000000001009100180082F +:101F400080237010100100200091000000000000AC +:101F50000000000000000000000000000000000081 +:101F60000000000000000000000000000000000071 +:101F70000000000000000000000000000000000061 +:101F80000000000000000000000000000000000051 +:101F90000000004000B00000000000000000C02869 +:101FA0000000000400E3D128200000041497000082 +:101FB000000000000000D128200000048CB3D124D0 +:101FC00020000004848BD128200000044487D128FD +:101FD000200000042C93000000000000000000001E +:101FE000000000000000D128200000042C93000015 +:101FF000000000000000D128200000046487D120E8 +:1020000020000004848BC128200000040487D5240C +:10201000200000040C970000000000000000D12800 +:1020200020000004048F912A20000004848AD12813 +:10203000200000042C93F128200000048C8BD12870 +:102040002000000404830000000000000000C00025 +:102050000000000040034028000000044081000010 +:102060000000000000000000000000000000000070 +:102070000000000000000000000000000000000060 +:102080000000000000000000000000000000000050 +:102090000000000000000000000000000000000040 +:1020A0000000000000008000005000000000000060 +:1020B000000000030207C000011300C803038023CF +:1020C000C20000000000000000000223800703009F +:1020D000D30000C082D34705E02300000022CB03D9 +:1020E000C7010000CB03C0C1C20000000000000017 +:1020F000000000000000000000000313C3400000C7 +:10210000A3810000000000000000002382130300F0 +:10211000C30000E30043A301C800034000C357030A +:102120008300030044D3E08003220000000000008D +:10213000000000EA03070301C000000344C70000D9 +:10214000030000E280C8E300C00000C001C74703ED +:10215000C803001301C1A2CF8303000000000000E8 +:10216000000003009300000000000010C8C002013E +:10217000A0000000010000000000100000000000AE +:10218000000000000000002000000000000000052A +:10219000000000000000000500000000000000003A +:1021A00000000000000000000000211000000000FE +:1021B000000400000000000000001000000000000B +:1021C00000000000000000800400108040000000BB +:1021D00021088000840000000000000000000400CE +:1021E000804040001000000284020800020000004D +:1021F00002002008400100402008102184800000D7 +:10220000000000000000000000000000000040008E +:1022100014200080200500000000000000000200E3 +:1022200084000800A0000004022108010000202012 +:10223000020C00018400040000020082080000007B +:102240000000000000000000050040011000000137 +:10225000002002000800000280800400100000201E +:102260004102040100080040202104008801000010 +:102270000000000000000800804000000000000096 +:102280000004040100000400200000001000000011 +:10229000000000000000000000000000000000003E +:1022A000000008000000040000000000000004001E +:1022B00000000800000000000000000000002000F6 +:1022C000000000000004000000000000000080008A +:1022D00000000000000000000001000000301400B9 +:1022E000000000000030140000004E1B5052C00ED1 +:1022F0000010000000300E000000000000B00000E0 +:1023000000000000007A02000000000000300C0015 +:102310000000000258090C84A210888B715212210F +:102320000460000000380C0000000085514BC0988C +:1023300026440000008C0C00000000000030520019 +:1023400000000000000028000000000000D0520043 +:102350000000888220301400C0040000008C0C00B3 +:102360000000000000004200A000000000942100D6 +:102370000000000000020C0000000000003000001F +:102380000000264000304C90A210000000480000E1 +:1023900000000000003028000000000000000000E5 +:1023A00000000000000000000060000000000000CD +:1023B000E000004001000004F000000050000004B4 +:1023C000E00000000000000000100000000000001D +:1023D000E000000000000000E00800000000000035 +:1023E000000000000010000000000000400000009D +:1023F000008015000000000000B014000000008301 +:1024000061105106C010000000B000000000000084 +:1024100000900000000000000038340000000000C0 +:1024200000300D0000006EA5E14C6DC3AC6A02A047 +:10243000D8101001C1000000007C0D000000400316 +:10244000E80A0D41C040000000080D000000000037 +:1024500000741000000000000014000000000000E4 +:1024600000101000000000B52876010101100000E6 +:1024700000080C0000000000001400000000000034 +:10248000001000000000000000080C000000000028 +:102490000074000000001600C07411D3AC6A06007E +:1024A00000000000000006000040000000000600E0 +:1024B00000000000000000200000000000000000FC +:1024C000000000000000000000000000000000000C +:1024D00000000000000000000000000000084000B4 +:1024E000C00000000000000000000000000000002C +:1024F000000000000000000000400000800000001C +:1025000000000000000026000000000000C01800CD +:1025100000000400400100010C28000000C002007F +:102520000000000000000B00000000000080200000 +:102530000000000000182600000001042200009C9A +:1025400000404B0028010200280200000024030084 +:102550000000044C000000C0982000000080020031 +:1025600000000000008000000000000000341000A7 +:102570000000000000A00000000060601000833236 +:102580009200000000003C000000000000802400D9 +:1025900080000000000024000000000000303C002B +:1025A0000000000000001800000000801820004813 +:1025B0000045020000001000020010000020000092 +:1025C00000001000000000000010000000000000EB +:1025D0000002020000000000800000000100000274 +:1025E000000100004000000280000200080000001E +:1025F000000000000001000080000000000000005A +:10260000800000000000000000000000000000004A +:102610000000000000000000004014000000000066 +:1026200000B00C000000804F00002E000B000000E6 +:1026300000B00C000000000000100C0000000000C2 +:102640000090150000000000007C100000005C03FA +:1026500060000CC6E0014C93680208000200000014 +:1026600000100D000000080002404801008000003A +:1026700000A800000000000000B02E0000000000D4 +:1026800000301400000000000030080000000C03BF +:1026900080800147007C0000001014000000000052 +:1026A00000281000000000000010140000000000CE +:1026B00000381000000000000074140000000085C5 +:1026C00003006EC641410000000008000000000049 +:1026D000800000000000000003000010000006075A +:1026E0000000000000000008200000800500000736 +:1026F0000000000000000000000000100008008042 +:102700000300001000000E000000000000000E009A +:10271000000000100000000000000000E0001000B9 +:1027200000000000700000000000000000281400FD +:102730000000000000304E000000116385500C8A3C +:102740000700000000304E000000000000F82800E4 +:102750000000000000100C00000000000038100015 +:1027600000000E40082C4E00C00102836104298045 +:102770000304000000100C00000020D7A128A90AC3 +:10278000C2700000002821000000000000300C0092 +:102790000000000000000F000000000000302900D1 +:1027A0000000008004088009C202000000941400A8 +:1027B0000000000000001000000000000094140061 +:1027C0000000000000021000000000000030560071 +:1027D0000000800C08308C0A4461000000040100F5 +:1027E00002000000043030000000002000000080E3 +:1027F0000340600000000000000000000001000035 +:102800000000400000000000007000000000008098 +:102810000310000000000080030001000000000021 +:102820000000010000000080020000000000000025 +:102830000001700000000001000000008001400461 +:10284000820C2040810140412000402100002052A4 +:1028500001020102812011522201000021410811D0 +:102860000101004209005108205021422142501428 +:102870002002812C82214840200221290040800131 +:102880000411044041218111880A0001180141010D +:1028900088082010410139183C0121001011242121 +:1028A00021002024812A148101102122500221209C +:1028B0002C012144000101420940080282420142E8 +:1028C00040013101911184800120003104209124C4 +:1028D00080810109305140022001014A9000280204 +:1028E00020212024200120425410112211115012C5 +:1028F0003000204A105201202001310201028002E2 +:1029000030100040012400202001220221402080BC +:102910000110200000000122208000002100202260 +:1029200000020000010000000080010100002120E1 +:102930001002000200000102000002000802000074 +:102940000000000000002001000000000000000066 +:1029500000000000900C00000068000004009000DF +:102960000000001020000C1A007030000000105011 +:102970001050641E00187000106D3008903D7000FB +:102980000C3E1930A91AA038900C78B09000007C49 +:10299000097828109C300000500C60009CA8B040C2 +:1029A0001060003070542030A050383C28340000B3 +:1029B000102060002050704070181000A035200DCD +:1029C0003000A80E90705470900A900000700810AB +:1029D000A059203A0EBE3A400D200000007450303D +:1029E0007009100E0D5E00200D10A000003000A038 +:1029F0003C60640000A00D009070109030301D000D +:102A000000201010305005080020900000003049D0 +:102A10000C00203030101000900800000009000069 +:102A20007C0C00000000600D900E00000000B0A0C3 +:102A3000A0000000000000000000050000000000F1 +:102A40000000000020000000000000000000000066 +:102A50006860000000000000000060000000000C42 +:102A600000000000300D228C18702E00340D203C28 +:102A70000F52300C0A861E1C8C0C0D8C1C16083C48 +:102A80001C0880608C380E7C588D6A00E84E2CF64D +:102A90002616280C09A82A0C00EC3C88182D3210A8 +:102AA00036083C385E3FB188697C08163C39380CE2 +:102AB0003A5C0E087E7C3CFC3A00906E38681C0E36 +:102AC0001C8118006E083438B80E2E0438B80C3C3F +:102AD0000806B8003E5C35BE3C0C293C7E6C6C3C64 +:102AE000083E6A8C3838ECBC1A0C180C1878383A46 +:102AF0000C33061C003618301A2C5C8C3E183A0831 +:102B00001084080817663A083E1C201C3E0C9618D4 +:102B10003C00083C08683E083A0E1E18603C683EBF +:102B20001E0C140C090CB08C3A0E80100C2D0030C9 +:102B3000100C140C1D173020080E10000E0E083C4F +:102B4000302E00003C00303C000C00000C00000067 +:102B500000200C080A003C30000C0074000E080C29 +:102B60000000000000040000000000000000000061 +:102B700000000000000000000000000040104000C5 +:102B800002200000000000000020100000040000EF +:102B900000100000100C80800210000000000000F7 +:102BA000002000000000000002201080000400004F +:102BB0000000100000440020009080240004000069 +:102BC0000000000000004000BC30000000040000D5 +:102BD000000010A000000000000080000030000095 +:102BE0000008100440000030020884301000000E7D +:102BF0000C38000800000000013810000004000C30 +:102C00000008900C0000000082000080000000001E +:102C10000000200001201000000801B000000000AA +:102C2000000000010000002000100000000400046B +:102C30000030000C016400000030010000140000AE +:102C4000000000000004000000000000000400007C +:102C50000000000000000000003000000000000044 +:102C60000000000000000000000000000000000064 +:102C70000000000000000000000000000000000054 +:102C80000000000000000000000000000000000044 +:102C900020802000004000000000000000004000F4 +:102CA00000010000009000004042104000B0000011 +:102CB00000000000108000000000000000700020F4 +:102CC00000000000000040001000004000501042D2 +:102CD00000010000000000000040300072B200005F +:102CE00000010000001240600000004000004000B1 +:102CF00000800000000250013000000100021000BE +:102D00008040000200B20001000000000CB2480048 +:102D100000400002000250020040000010000000CD +:102D200000000000000080000C4080000002040051 +:102D3000000000000000000800400040109000006B +:102D400000000401008000020C40000000800C0024 +:102D500000800000000000000000000000000000F3 +:102D600000010000001000000001000000B00000A1 +:102D70000000000000000000000000000000000053 +:102D80000000000000000000000000000000000043 +:102D90000000000000000000000000000000000033 +:102DA000000000000008000000000000000000001B +:102DB00000100000000000000020020000000000E1 +:102DC000002000420208001020000000000800005F +:102DD0000020D000000800000000040020080000CF +:102DE000000002000000000000000200000081005E +:102DF000002000000000000000200042020000004F +:102E00000000000000004001000020000000401110 +:102E1000000008100040000008200400000000002E +:102E20008061040000080000000081000400000030 +:102E30000000000000000000100000000000000082 +:102E4000000000100000000000000400000000006E +:102E5000202000000008040000000000000800001E +:102E60000000000000080000000000000008000052 +:102E70000000000000000000002000000000000032 +:102E8000002000000000040000000000000000001E +:102E90000000000000000000000000000000000032 +:102EA000000000000000040000008000000000009E +:102EB000000000000000FFFFFFFFFFFFFFFF2727CC +:102EC0007722DD114747FFFFFFFFFFFFFFFFFFFFF7 +:102ED000FFFFFFFFFFFF47471D1DCF037744FFFFA5 +:102EE000FFFFFFFF5F13EFEF7707FFFFFFFFFFFF1E +:102EF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE2 +:102F00003333FFFFFFFFFFFFFFFFFFFFFFFF7FFFE9 +:102F1000BFFFDDFFFFBF550FF5050F55330FFFFF57 +:102F2000FFFFC0AACFAAFFFFFFFFFFFFFFFFFFFFCA +:102F3000FFFFFFFFFFFF330F53533F0CF3035353C8 +:102F4000F3033F0C3F303F30CF034747DD11FFFF16 +:102F5000FFFFFFFFFFFF3F0C3F0C1D1D1B1BFFFF73 +:102F6000FFFFFFFFFFFFFFFFFFFFFFFF5555FFFFC5 +:102F7000FF00FFFF0F0FFFFF5555FFFF3333FFFF2C +:102F80005555FFFF3333FFFF5555FFFF3333FFFF29 +:102F90003333FFFF5555FFFF5555FFFF0F0FFFFF61 +:102FA0003333FFFF0F0FFFFF5555FFFFFF00FFFFFC +:102FB000FF00FFFF333300000000000000000000AE +:102FC0000000000000000000000080240E008024AB +:102FD0000E0040808C2248808C2280240E008024A9 +:102FE0000E0080240E0080240E0040808C22488039 +:102FF0008C2280240E0080240E0000000C0080240F +:103000000E0080240E0080240E0080240E008024F8 +:103010000E0000000C0080240E0080240E0080248E +:103020000E0090241E0000000C0040808C2248807E +:103030008C2280240E0048000C2080240E00802466 +:103040000E0080240E0080240E0040808C224880D8 +:103050008C2240808C2248808C2240808C224880A8 +:103060008C2280240E0080240E0040808C22488018 +:103070008C2280240E0080240E0080240E0000008C +:103080000C0000000C0000000C0000000C00000010 +:103090000C0000000C0000000C0000000C00000000 +:1030A0000C0000000C0000000C0000000C000000F0 +:1030B0000C0000000C0000000C0000000C000000E0 +:1030C0000C0000000C0000000C00000000000000DC +:1030D00000000000000000000000000000000000F0 +:1030E00000008024020048800020488000208024C6 +:1030F0000200802402008024020080240200488014 +:103100000020488000200000000000000000802413 +:103110000200802402008024020080240200802417 +:1031200002008024020080240200802402000000AB +:103130000000802402000000000000000000488021 +:10314000002048800020802402000000000080242D +:1031500002008024020080240200802402004880B3 +:1031600000204880002048800020488000204880BF +:103170000020488000200000000000000000C884FB +:103180000020488000208024020000000000000091 +:1031900000008024020000000000000000008024E5 +:1031A000020000000000000000000000000000001D +:1031B000000000000000000000000000000000000F +:1031C00000000000000000000000000000000000FF +:1031D00000000000000000000000000000000000EF +:1031E00000000000000000000C00000000000000D3 +:1031F0000000FFFFFFFFFFFFFFFF3F305F500F3377 +:10320000330FFFFFFFFFFFFFFFFFFFFFFFFFFFFF8A +:10321000FFFF5F50F3033535F303FFFF3333EFFF59 +:103220003F15FFFFFFFFFFFFFFFFFFFFFFFFFFFF58 +:10323000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9E +:10324000FFFF5F333F55FFFFFFFF5FFF7FFF7FFF04 +:10325000FF7F1B1BBB111B1B2727FFFFFFFF5F1BF4 +:103260007744FFFFFFFFFFFFFFFFFFFFFFFFFFFFB1 +:10327000FFFF774447471D1D4747F50553531D1D65 +:1032800047473F301D1D47473F305F5355543F551B +:10329000272735355F505353F303FFFFFFFFFFFF31 +:1032A0005555FFFF0F0FFFFFFFFFFFFF5555FFFFB6 +:1032B0005555FFFFFFFFFFFF3333FFFF5555FFFF5E +:1032C000FF00FFFF3333FFFF0F0FFFFF0F0FFFFF65 +:1032D0003333FFFF0F0FFFFF0F0FFFFF0F0FFFFF36 +:1032E000FF00FFFF0F0FFFFF3333FFFF3333FFFFFD +:1032F000FF00000000000000000000400C00000083 +:10330000000000000000503910018028C0E60000D5 +:10331000000000000000F32C140180288874F202E1 +:103320001401802888A20000020200000800800822 +:103330000000802800927202140180084427B3081C +:1033400014018028C01C500914018028285033091A +:10335000140180088808102910018028C087000007 +:103360000000002000C00000000000000000030476 +:10337000040000200040E51114018028205030098D +:10338000140180284024000000000000000000001C +:103390000000000000000000000000000000801895 +:1033A00000008028006001000400000000000318F5 +:1033B0000400802800CE5010100100208081000001 +:1033C00000000000000002000400000004000000F3 +:1033D00000000000000000000000000000000000ED +:1033E00000000000000000000000000000000000DD +:1033F00000000000000000000000000000000000CD +:10340000000000000000000000000000000000C0FC +:1034100000000000000000000000C02800000004C0 +:1034200000930000000000000000C92020000004FC +:103430006483D121200000042C930140000000008F +:1034400014008028000000040086D1002000000045 +:103450008403D128200000042483D1282000000404 +:103460004487D100200000002C03C021000000048C +:103470000097002000000004009000000000000001 +:1034800000001120200000042488D12A200000041C +:103490004487D12820000004848B00000000000035 +:1034A000000000000000000000000000000000001C +:1034B0000000802800000004008A110020000000A5 +:1034C0008400912820000004848A40280000000421 +:1034D00040910000000000000000110020000000EA +:1034E0008400000000000000000000000000000058 +:1034F00000000000000000000000000000000000CC +:1035000000000000000000000000000000000000BB +:1035100000000000000000000000000000000000AB +:10352000000000000000000000000000000000009B +:1035300044000307C113000000000000000003075F +:103540008300C4134400C40083C3C0EAC70003005F +:1035500003C000030003000000C0020003000002DB +:1035600003C34001C803440513C083D3C0C1004551 +:10357000D7C3450383000000C0C0CBC38000000058 +:10358000031BE0008040000044C0E307030000008C +:1035900000000002000000E200000003C40003225B +:1035A000E380001303230007C700C1CF47A2000038 +:1035B000000000000000000000000000000000000B +:1035C000000000000000030054C00000C000000321 +:1035D000000000000000C02300C000030022A10082 +:1035E000DB410007000800000000000000000004AC +:1035F00020230003008001000008000000000100FB +:10360000000000100000000000000000080001049D +:1036100000000000000001000000000000000000A9 +:10362000000000200000000000000000000000007A +:10363000000000000000000000000000000000008A +:1036400000000000008002005000000000000000A8 +:10365000000040008880000000000080A01880006A +:1036600040804000400200010001000240100401BF +:10367000210100C00411010102080040001084046F +:1036800082110020000C2001A080000010204021A9 +:1036900080800100080000008020000840402000D9 +:1036A000A0000000000000800000000440000001B5 +:1036B0000000400008020000410000000840A00097 +:1036C00004020000000000000000000000000000F4 +:1036D0000000000000000000000020200010010099 +:1036E00001000001000000000000100002040001C1 +:1036F0000000400000210000000008000000000061 +:103700000000000000202001000420000000000054 +:103710000000200000000000000004000000000085 +:103720000000200000002000000020000008000031 +:103730000000000000000000000000000000000089 +:103740000000000000000000000000000000000079 +:1037500000000000000000000034000000001644DB +:10376000505300064232000000300000000000000C +:1037700000B4290000000F050052F496C501008036 +:10378000010000004011000700800000010000005F +:1037900000100C000000000000000000000000000D +:1037A0000052000000000E000014A1160000AC84BE +:1037B00063010086193240051830742000600090C3 +:1037C000010228000061000000B04A000000000073 +:1037D000007A000000009600001000982260120499 +:1037E0000052018022680C00D0080008000202404C +:1037F00000001206F0000020D0111200006000004E +:1038000000000000000000000010340E0000000066 +:103810000000000000000000000000000030001068 +:1038200000000000004000000000000000700000E8 +:1038300000000084020000000000001E20000000C4 +:1038400000000086020000000000000100000000EF +:103850000000000000100000000000000000000058 +:103860000800000000000000000000000000000050 +:1038700000006E34EA108C0E21B4000000B000008D +:10388000000000000030080000001684C0111486FB +:10389000C10000400700160000004007002830C0AB +:1038A0000000000000400D0000000000003408008F +:1038B0000000000000101C0000001E0000000006B8 +:1038C000000018322200401000008205007400043D +:1038D000C08200C00038000040E400000008100072 +:1038E0000000000000380E0000000005001001E09C +:1038F000C1C30010001048E023000080C34C21C069 +:103900004008010000007C06A0002600E2541400DC +:10391000008000000028000000000000C0400008F7 +:10392000000000000000000000000005001400007E +:1039300000800005020000000000000500000000FB +:1039400000000000C00000000200000500000000B0 +:10395000080000A000000008020040000000000075 +:10396000000000200000000000080000000000002F +:103970000000000000000000000000000000000047 +:1039800000203C0000000040602018A182040000DC +:103990000040180000000000008000000000003916 +:1039A00004804000815220000A030300C420000C60 +:1039B00000B000A000000000000C020000000000A9 +:1039C000003018000000000000001080000011000E +:1039D00000000000000020284A008004008A220025 +:1039E000080001442000000042010000140400000F +:1039F00000900400000000000000060000002020ED +:103A00000A1A5001450D00008000080998406028FE +:103A1000060180E220091800090041080C00080096 +:103A2000800082E32808000000083C00100000002D +:103A30000001040000000000200000400000001011 +:103A400008800000000000100000000000200010AE +:103A50000000000020200000000100020000001013 +:103A60000000000000000000000000000000000056 +:103A70000000000000010000000000000000000045 +:103A80000000000000000000000000000000000036 +:103A900000000000000010000000000027001400DB +:103AA00000300000005432000000000000A81400A4 +:103AB0000000002512701407D0100E00C0000E0088 +:103AC000000000080010300000000000004032003C +:103AD0000000000000141C000000000000300C007A +:103AE00000000200008014060000000060000003D7 +:103AF000C0680E55F301554154950080F731000020 +:103B000020080000003014000000000000300C000D +:103B100000009E87E38214C604702E8220002A16BD +:103B2000D0180F8507023240A000080000000807E7 +:103B3000C800C083802C0084A1020000000814008B +:103B40000000000000800000000000008000000075 +:103B5000000100000208000000000000000000005A +:103B600000000E0000000000000000000300000044 +:103B700000000000E000000000000000E000000085 +:103B8000000000000700000000000E000000001010 +:103B90000000000000000000000000000000000025 +:103BA0000000000000000000003010000000108C39 +:103BB00000305688030000000010100000000000D4 +:103BC00000283500000020827210350000B000800F +:103BD00001000C0000380002000000C001000000DD +:103BE0000010100000000000000074000000000041 +:103BF00000B4010000001C000028352500000080F2 +:103C00000500004118115082607014884310004074 +:103C100070802D00E0000000003411000000000062 +:103C200000B4500000000EC22130350AA010409AA6 +:103C30006634880AC1800CC7110410810B122880D9 +:103C40000200340700000C626704212E0600000009 +:103C500000801400000000000008140000000000B4 +:103C600000000096C30000000000000000000000FB +:103C7000000000050000010000000000000000102E +:103C80000000000000000000040000000000000030 +:103C900004000000000000000000000000700100AF +:103CA0000000008003000000000000000000000091 +:103CB000000080000020002004401004201080003C +:103CC0000024800A24410002114082203114200483 +:103CD000449280042080290224402440200A1402B7 +:103CE0000001801242044002944400022090120419 +:103CF0001440501001180102224081028C39899928 +:103D000051011134210284502401420024089109F8 +:103D100020004032200102040200044489082122CC +:103D2000080100441A045201243420442011840163 +:103D300091504C923882202424848100310A51020F +:103D40002C218044322284222004091480319021C5 +:103D5000324C818890201404202802422012243200 +:103D60002404200401122A0208411124104C0109E4 +:103D70000102281480118A0400400421003004420A +:103D80000202220004142800020001200020012168 +:103D9000005020000000000044000400040204223F +:103DA0000110200204004102002401000000000074 +:103DB00002420000000000000200000000000000BD +:103DC0000000000000000000000000000050306E05 +:103DD000061D0C0000080D0C50785D0000B00908AD +:103DE0002819504E0A20680D00195C1A000DB910F0 +:103DF00000B810100060183A0002000010004910CE +:103E0000B01A1000180A10167A340C709D0DB859AB +:103E1000003C5810302A183904A059300E6000BAFE +:103E20005E083D5C09AABE1642460D300040981D52 +:103E30000014B00C08A008563800300250206C5016 +:103E40000E3A004D153554393C00AC24B9680D0AC2 +:103E5000100C10A01C907C503579505950501C19F2 +:103E60009D08103C00A87C0830B510A05DA859B989 +:103E700020105010BE09000E0510B840AC601800AC +:103E8000301C7048B0A0581E00000C0C0070B050E0 +:103E9000091050046870005000100C00000D000064 +:103EA0000E70A000081000000030B50000000000F7 +:103EB0000000600060100000000000000000000032 +:103EC0000000000000700000000070000D0E0000F7 +:103ED000000000000000000000003E6060100010C4 +:103EE0008031005C2E0A310A0E2D1008083D0A7838 +:103EF000041A1811397C3A643C3C3F0826B6288CD9 +:103F0000082A389A100C0CD80E0CAF000954BA705D +:103F100018AD0AF40E30046409221E5208000D0880 +:103F200008303D043C3C1424188C091005083C164C +:103F3000080C285A3C56385C3A0E1E30260C00F409 +:103F4000447E5D9C1CFE3C1DDE0C0F0C0054180CC6 +:103F50003C383F382E041C042C20282C0E28219598 +:103F60000C3D184E0C5C1C6C9C3C371C38383C1CBF +:103F700012088808363D32B9383C1D263030080416 +:103F800010100C3CB07C3838380C1A08080C180C8F +:103F9000403C091C0A9808080C0C100C2A641C0DE3 +:103FA00000100C34003E08190D0C3C00080C3E0EAD +:103FB000000A08300030083801363000008A0E0050 +:103FC0003850040E08086838080030080800287CBB +:103FD000003C0800000E0E00003C00000000000045 +:103FE000000E00000000000000000000000881003A +:103FF00000000000000000000000000000000000C1 +:104000000000000000000000002000A001101201CC +:10401000008000000058800040040000003110447F +:104020000000002410400004000000008030014027 +:10403000410001000230B00091004038022E0031F2 +:1040400000304000003800002000000002308000F6 +:104050000000100410801200500000000278108C44 +:1040600082000000022000000008412802390020E0 +:10407000020000088038500800081000001090006E +:104080004000000811084001400400001000023404 +:104090002200000000080000200040300000010065 +:1040A000043000008C1040400000002000000000A0 +:1040B00000000004000001000000000000000030CB +:1040C00000000000000000000000000000000000F0 +:1040D0000020000000000000000000000030000090 +:1040E00000000000000000000000000000000000D0 +:1040F00000000000000000000000000000000000C0 +:10410000004010000000000000000000000000005F +:1041100000000000200000000000000000401060CF +:10412000009044480040000000A210002031000030 +:1041300000B4001100000081001000020000000126 +:1041400010B0041004000C000080700C500030010E +:1041500010BD00080002208000B200000400000032 +:10416000008090408000600101A294008000000166 +:1041700008924840180000800000080000103C40F1 +:1041800000B000400802008010B0900008018000DC +:1041900000805002300000009C0010003001000040 +:1041A000001008010830000000010000000030008D +:1041B0000000040002B00000409030000000004009 +:1041C000003000010000000100000C000000800130 +:1041D000800000000000000000000000000000005F +:1041E00000100001004000008000000000000000FE +:1041F00000B00000000000000000000000100000FF +:1042000000000000000000000000000000000000AE +:104210000000000000080000000000000000000096 +:10422000000000000000000020000000000000006E +:104230000000200000208242020040210000000017 +:104240004022000000201000004900001000000083 +:104250000040000000200000800000804200820436 +:104260000000001428208210001000002020000808 +:104270001440001090410420A000202034002000B1 +:10428000004081404000040800408100001004C24A +:1042900000680108886900000000810800280408FF +:1042A00084008100808004008000400A2008000013 +:1042B0008000810013200010902000804200040044 +:1042C0001000001000000000042000000820000082 +:1042D000000000008061000020400000100082010A +:1042E000800000000000001004000000000000003A +:1042F000000000000020000000000000000000009E +:10430000000000000020000000000000000000008D +:10431000002000000000000000000000000000007D +:10432000000000000000000000000000000000008D +:104330000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF8B +:10434000FFFF4747CF033F0C7744FFFFFFFFFFFF0F +:10435000FFFFFFFFFFFFFFFF3333FFFFFFFFFFFF05 +:10436000FFFF5F137707FFFFFFFF13000F0FEEAF95 +:10437000FEF2FAFEAAAAFFFFFFFFFFFFFFFFFFFF0B +:10438000FFFFFDFD7FFFFFDFDFFFF707F707FFFF01 +:10439000FFFFFFFFFFFFFFFFFFFF77444747AF052A +:1043A000AF05F505F30347471D1DFFFFFFFFFFFFA7 +:1043B000FFFFFD00EFCD77473F1DFFFFFFFFFFFF32 +:1043C000FFFFFFFFFFFFFFFFFFFFA0ACA3AFFFFF5B +:1043D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFED +:1043E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDD +:1043F000FFFF53533F301B1B2727FFFF0F0FFFFF0C +:10440000FF00FFFF0F0FFFFF3333FFFFFF00FFFF32 +:104410003333FFFF0F0FFFFF0F0FFFFF5555FFFF58 +:104420000F0FFFFFFF00FFFFFF00FFFF0F0FFFFF5A +:104430000F0F00000000000000000000000000005E +:1044400000000000000080240E0080240E00802464 +:104450000E0080240E0040808C2248808C22802414 +:104460000E0080240E0080240E0000000C0080242A +:104470000E0080240E0000000C0080240E00480076 +:104480000C2000000C0048000C2080240E0080242A +:104490000E0080240E0000000C0090241E0000007E +:1044A0000C0080240E0080240E0080240E0040802A +:1044B0008C2248808C2240808C2248808C22802450 +:1044C0000E0080240E0000000C0000000C00802470 +:1044D0000E0080240E0080240E0080240E00480070 +:1044E0000C2080240E0080240E0080240E008024E6 +:1044F0000E0080240E0080240E0080240E008024F4 +:104500000E0080240E0040808C2248808C22000007 +:104510000C0000000C0000000C0000000C0000006B +:104520000C0000000C0000000C0000000C0000005B +:104530000C0000000C0000000C0000000C0000004B +:104540000C0000000C000000000000000000000053 +:104550000000000000000000000080240200802411 +:1045600002008024020080240200C88400204880C9 +:104570000020802402008024020080240200802485 +:104580000200000000004800002048000020480011 +:1045900000200000000000000000000000004800B3 +:1045A00000209004000080240200100000009024ED +:1045B00012000000000090241200802402008024D9 +:1045C0000200488000204880002048800020488069 +:1045D00000200000000080240200802402008024CB +:1045E00002008024020000000000802402008024D9 +:1045F00002000000000080240200802402008024C9 +:104600000200000000000000000080240200000002 +:10461000000080240200802402004880002048809E +:1046200000208024020000000000000000000000C4 +:10463000000000000000000000000000000000007A +:10464000000000000000000000000000000000006A +:10465000000000000000000000000000000000005A +:10466000000000000C000000000000000000FFFF40 +:10467000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF5054E +:104680003F304747F505FFFFFFFFFFFFFFFFFFFF3D +:10469000FFFFFFFFFFFF77075F13ECFFCCCCFAFEB5 +:1046A00000FFFCFEAAAABF37FF7FFFFF55557747E3 +:1046B0005F3305015555100074FFFFFFFFFFFEFF3C +:1046C000F707FFF7FFFBFFFC7FFF7FFFBFFFFFFF49 +:1046D000FFFFFFFFFFFF330F550F5F50330F1D1D0F +:1046E00035351D1DDD11FEAEFEAEFFFFFFFFFFFFE6 +:1046F000FFFFFFFFFFFFFFFFFFFF3F55AF05FFFF7E +:10470000FFFFFFFFFFFF3333FF00FFFFFFFFFFFF50 +:10471000FFFFFFFFFFFFFFFF3333FFFFFF00FFFF40 +:10472000FFFFFFFF5555FFFFFFFFFFFFFFFF0F33A9 +:104730005533DD11CF03FFFFFFFFFFFFFF00FFFF3A +:104740005555FFFFFF00FFFFFF00FFFF5555FFFF1F +:10475000FF00FFFF3333FFFF3333FFFF33333333C8 +:10476000FF00FFFF3333FFFF0F0FFFFFFF000000CD +:1047700000000000000000400C00000000000000ED +:104780000000D03314018028CCE6B1191401802830 +:10479000E84C0B00040000000800122814018028D7 +:1047A0008C62061014010020AC81000800008028F3 +:1047B00000D600080000800800260000000000006D +:1047C00000008000000080080004B013140180285D +:1047D000886401001401800824030003100180088C +:1047E000400B1112140180280CCA000000000000C8 +:1047F000000000000000000000009013100180285D +:10480000C0C95900140100000C01023804008028BE +:104810002C92863214018028888D9008100180081F +:104820000004D21314018028A8340033000080282B +:1048300000248209040080280CCE993814018028B5 +:1048400044D7000000000000000003000400000046 +:104850002000000000000000000000000000000038 +:104860000000000000000000000000000000000048 +:104870000000000000000000000000000000000038 +:104880000000000000000000000000C00000000068 +:10489000000000000000D121200000042493D12852 +:1048A00020000004048B0100200000008400D124BB +:1048B000200000048C93512820000004449180249F +:1048C00000000004008680000000000000020000DC +:1048D0000000000000008010000000000006D12849 +:1048E000200000042C93D100200000004407C000E9 +:1048F000000000000003D128200000042C930000D9 +:104900000000000000000000000000000000C028BF +:1049100000000004008B4100200000008C01892869 +:10492000200000040486D128200000048C8BC000E5 +:10493000000000000807D128200000040C83802814 +:1049400000000004008A912820000004848AC12409 +:104950002000000484870000000000000000030025 +:104960002000000004000000000000000000000023 +:104970000000000000000000000000000000000037 +:104980000000000000000000000000000000000027 +:104990000000000000000000000000000000000017 +:1049A000000000000000000000000013C3C1C6406A +:1049B000030000CB0307C2008300000000030000D7 +:1049C0000000030047C1DB03030120C002D38000C5 +:1049D000002300C0000000D0C02200000000002022 +:1049E000C2000000D0000000A0000000080000008D +:1049F000C00003E28303C3C3CB000380CBA0031337 +:104A000000011310010013010320A000C080C0E2C8 +:104A1000D7030000000000000000000000000200BA +:104A200000000100E2000300C01300C113C0050034 +:104A30001301004044C7C700C30000C702C0C3132E +:104A4000E30100130000C0000100A34003C1B3074D +:104A50000000000800C7E000440000000047C30059 +:104A6000C60700000013E341C0230000000000005F +:104A700000000023C005000000001000000000003E +:104A80000000000000000100040000000000000021 +:104A90000000000000100000010000000000000005 +:104AA00000000010000000000000000000000000F6 +:104AB00000000000000000000000000000000040B6 +:104AC000501104A020000008400014C08400000021 +:104AD00000010000000004000805000105010002BB +:104AE00004048000000000400000010414000000E5 +:104AF0000000020012000000011020000000084029 +:104B00000000000014004002C0418805400040033E +:104B100008020800010100004002010188000000B5 +:104B200012028004000100000000000000000000EC +:104B300000000200000040000440020010000003DA +:104B40000028200000010420000408808880002044 +:104B50000582500004010000000012004000042003 +:104B6000401100000100000000100080000004005F +:104B70000220500004000000000008218200000014 +:104B800000000000000000008000040000000000A1 +:104B900000000000000008000000200000000000ED +:104BA00000001000000000000000000020000000D5 +:104BB00000000000000000000000000000000000F5 +:104BC00000000000000000000000000000000000E5 +:104BD0000000000000004C00000000000012600017 +:104BE00000002624003000693AC8000000900D0043 +:104BF0000000000000100C000000088003500E2987 +:104C00000000228203308100020008040800000036 +:104C1000043006800330C01A000008000034010987 +:104C2000000020839500000430CAAEA001000000FF +:104C3000AA010000001010000000825711528044A9 +:104C40002A020005607211A002010E000008002572 +:104C500000000005004A00000AC8008000000C00A7 +:104C6000F00000000000520000000005001000806D +:104C70000200000000300C000000000000001400E2 +:104C80000000000000020C000000000000B4520010 +:104C900000002E857909502021040000000000004A +:104CA0000000000000000000007000000000000094 +:104CB000006800000000000000008000000000000C +:104CC0000000000000000000000000000000001EC6 +:104CD00000000000000000000000000000000000D4 +:104CE0000000000000000000003012000000000082 +:104CF0000028100000001680E075164120400000DA +:104D000000B014000000000000100200000829009C +:104D100000002000000006170030004744000C008F +:104D2000C00080CE0010860000001003C000080004 +:104D3000000016070000068281000044244018800D +:104D400000002C18A100000000101D0000002385A9 +:104D500098114E41280000009230010BC0841C00C5 +:104D60000040300400000007C03800500040002020 +:104D70000B000200200000000030100000002005A1 +:104D800000002CC00000000000102E0000000000F9 +:104D900003001C000000000000100D0000000000D7 +:104DA0000030100000000E80E14C010105100000F1 +:104DB000030C0000000000000300000000000C00D5 +:104DC00000000000000000000000000000000003E0 +:104DD0000000000000002000000000000000002093 +:104DE00000000000000000000000000000000000C3 +:104DF00000000000000000000000000000F00100C2 +:104E00000000000000102000000020010000100041 +:104E100008000000008009000000000000180400E5 +:104E200000000040000001000800C012021840000D +:104E30004900340C00010001408A5110001001208B +:104E400008004A000000E001000005112500408A2A +:104E5000000080C10800A0009000000000181400AD +:104E600000000004000010100000002C1E000010C4 +:104E700003009000000049010000001650020010DD +:104E800002000000020C100018000000003C0100AD +:104E900000000016001001A0000000000018010032 +:104EA0000000000004001C0000000000008026003C +:104EB000000000000000000000000C8104000181DF +:104EC00082020020048000000010000004000000A6 +:104ED000002010000000000042000200000200005C +:104EE0000000000000000000000000000000004082 +:104EF00000000000000000000000000000000000B2 +:104F000000000000000000000000000000000000A1 +:104F10000028120000000000008015000000025A66 +:104F2000002A321450C000000030100000000000C1 +:104F3000006C000000000DA001000C01D000000D6D +:104F400000000C40A000120A8002014400088C00FE +:104F500008009481410008000080100300008DA823 +:104F6000CB0200032040AC0F02001460C20000001E +:104F700000380C000000010F638000C05048128709 +:104F800083426E86A1030C0000001400000000089C +:104F9000003400000100000000000100C00000001B +:104FA000003011000000100200401140000000001D +:104FB0000078150000000E0000000C00000000004A +:104FC0000008100000010000007C080000002E0511 +:104FD00003821100200000030030000000000007E1 +:104FE0000000000000000000000000000000000FB2 +:104FF0008300000000000EA061010000000000001E +:105000000700000000000007E001000000000000B1 +:105010000000000000000000000000000000000090 +:10502000000000000000100000000000002A0C003A +:10503000000000C351B410A011B0000000043400FF +:10504000000000000028100000000F80000016295A +:1050500000000CC501004040EA0102026001142872 +:10506000C800124700001609D4012C0000300206C7 +:10507000000006C251000058108A06870000009602 +:10508000C3010000007A110000000C100C28211E42 +:1050900000802EC715108C084000070000703400F7 +:1050A00000000002587800000288004000000D0057 +:1050B000000200000000100000008C0200281440D4 +:1050C0000A0000000032140000000100000015007A +:1050D000000000000000100040000000003829001F +:1050E0000000485D632910800302000000000000FA +:1050F000003040000000001400000000000000002C +:10510000420000200000000000000100000000003C +:1051100000001E0000000000021840000000000017 +:1051200000000000000000000000000000000080FF +:105130000000000000402002944C8020008C4001C0 +:10514000802089444002140020402800141450405C +:10515000808420402849540480022424322088047A +:105160002002302000040100910040822C24081409 +:105170003084848012000411300C20213090800093 +:105180001004800A40200284302C804A3002010141 +:105190000224240142408C1022518150282A40814F +:1051A0001404842104842121900022211428013434 +:1051B0000014800122000021208020084992412211 +:1051C0001404101C0C12892A984430041001801019 +:1051D0000024804400042424001C20212008915A2B +:1051E00000240120000101125208200C2024290073 +:1051F00020119004002A0004081428203020208068 +:10520000000C140014000442002030002024200070 +:1052100008044100083000008010012A000080804E +:1052200000002108000000002020220004000100EE +:10523000080000080000000000000000000000005E +:10524000000000000C0D000000000C0D20080C09EF +:105250005808041E080C18000A003C0E00050C0437 +:105260001C241559000D0A121CB83008202408B45B +:105270001064B80E2890100A08B0001918099E3C56 +:105280000C0EA8161C00080A00A52C1838A42D091D +:105290000E3D0D1A191095185595691C244C485C43 +:1052A000149A006E690C55450050B4300C0EBC3A8F +:1052B000185C0D0918591C043AB88CAC3910180D3B +:1052C0000898B80EB91098A5296034B4B00A9E9811 +:1052D000981D9099255D393C783E6C0C38A01D4C8A +:1052E0001E3E0C155D5A050A7E9D69540838794C9E +:1052F000B52C383CB50C7C190C09080A38789C9CF4 +:10530000B86508393510157A7E7C70A90C3A9C0C6A +:105310000D3EBD3A9D9C16153C05B50C981C3C5D98 +:105320005C0D000E080A50A09035A0BA00100500D0 +:10533000AD0E0D0A0D0D060C0E0A09AE00AC090CDF +:105340000E0A0000080E00080CBA0500000000005C +:10535000AD0000000000003101C2005200301154C5 +:1053600018B431107138BFC83111B83C3008094247 +:10537000001A1001017D2E3ABB9020808A2C284112 +:10538000A1E919151C31205C91791030016D58800C +:105390002D6020B9B83C0E000B95A920080A8D0994 +:1053A0001170BA14303EBE8006D03A883A1E40B121 +:1053B0000B3831203158080C043D385810202C503F +:1053C000091C3D0096181A1C6D409D19881D3D1939 +:1053D0003A8ABD104D1A0D1800002F489C5A83358B +:1053E0001EB02E003C18343C085400040058143CF5 +:1053F00010101A0500883B0070342E34007C3831C0 +:105400005F001E191080393C00310DB0010C095CA1 +:105410003D501104111C148080043A040E180E78BB +:105420000000301130BE30A0000408F0095008110F +:1054300001913100313C30005054145000100050A4 +:10544000100004140000102006003450000060001A +:105450000011140108000800000E00000100000007 +:10546000000000000000000000008000200001009B +:105470000200000000020000000000005000400098 +:1054800000200600402000000010100004140C0C46 +:1054900088308002500000042C20018640A041404A +:1054A00080218082404010010220248010000101F0 +:1054B00000009EB940300100003020006000403004 +:1054C00002320071410001000028065041024104EF +:1054D00001AC8204001401005000440000849100DB +:1054E000005C98004030003800081120600841300E +:1054F000811024320144010092A95C304130012026 +:1055000088200014403404000008400C4002600071 +:1055100080A0B000013401001010140000340131EB +:1055200040202000007400044000003000710000A2 +:105530000000702101340C00000000000000000099 +:105540000010000000440000400000000030003463 +:105550004000000000340000000000000044000093 +:1055600000000000004400000000000000000000F7 +:10557000000000000000000000000000000010001B +:105580000030000000001000100C00010008200096 +:10559000280020801050060020401000009040009D +:1055A0000280104210B0108C200000428050046E27 +:1055B00020702010300C182C201080040000A24015 +:1055C00048000C0C0200167D20080C0000B0800082 +:1055D0002010200100BD2009A0000C40A08224045E +:1055E000A45C2C010021140100900C00400032004A +:1055F00000601C00009251002000004100020440A5 +:1056000020413C003C91820C0C000C0050B2B202D4 +:1056100000100C4010B000010030020000223042A7 +:10562000042CB0001060500200000C00909040006C +:1056300000800C003010A00000800000000000007E +:10564000009C0000000050400080020000000000AC +:10565000000000000080000000000000300000009A +:105660000000000130300000008000000000000059 +:105670000000000000000001040000040000000021 +:10568000000000000000000000000000000000001A +:105690000000000010200000000020002008001082 +:1056A0000004200014080000202020000008200032 +:1056B00000200000000828800A20000018080000D0 +:1056C000082000000008000000100400000801008D +:1056D0000010200024080000000091010014008048 +:1056E00002200008102000900220A1D30008000131 +:1056F0002420E85502A801200014000040280100E1 +:105700000041040000881002000000004018010061 +:105710000000D000108001104320C010400800029B +:105720000000C01040380120082000104038000060 +:105730000020004206A801000000000000980000C0 +:1057400020200800008800300030200000080008F9 +:105750000000001000080100000004000008000024 +:105760000000000000080000030000000008000026 +:1057700000000000001000100020000004080000DD +:105780000000000000080000000000000408000401 +:1057900000030000000800000000000000000000FE +:1057A0000000000000000000000000000000FFFFFB +:1057B000FFFF3F153F00335555330F55550FFFFF82 +:1057C000FFFFFFFFFFFFFFFFFFFFFFFFFFFF0F5583 +:1057D0000F555F0A5533FFFFFFFFFFFFFFFFFFFF7E +:1057E000FFFFFFFFFFFF3F0CCF03DD113F0CFFFF6B +:1057F000FFFFFFFFFFFFFCFFDF1FDF571101332318 +:10580000332310101111FFAFFFDFFF7FFF7F010176 +:105810001000FEFF55515155CFDDFFFFFFFF3F55F3 +:105820004747BF153F0CFFFFFFFFFFFFFFFFFFFFD5 +:10583000FFFF3332DFDCCA00CA00FFFFFFFF553332 +:105840005533330F330FFFFFFFFFFFFFFFFF1D1D1A +:1058500077441D1D1D1DFFFFFFFFFFFFFFFFFFFF23 +:105860005555FFFFFF0027275F0A77225353FFFF9D +:10587000FF00FFFFFF00FFFF3333FFFFFF00FFFFCD +:10588000FF00FFFFFF000F0FFF003333FF00FFFF9C +:10589000FF00FFFFFF00FFFF33335555FF00FFFF01 +:1058A0005555FFFF3333FFFFFF00FFFFFF000000F0 +:1058B00000000000000000000000000000000000E8 +:1058C000000080240E0000201E0040808C224880B2 +:1058D0008C2280240E0080240E0080240E00802460 +:1058E0000E0040808C2248808C2280240E00802470 +:1058F0000E0080240E0080240E0040808C22488000 +:105900008C2280240E0080240E0000000C00002059 +:105910001E0000000C0090040C0000000C000000B1 +:105920000C0000201E0000000C0000000C00802471 +:105930000E0000000C0000000C0080240E008024EB +:105940000E0080240E0000000C0048000C20802473 +:105950000E0040808C2248808C2280240E008024FF +:105960000E0040808C2248808C2280240E008024EF +:105970000E0000000C0000000C0040808C224880CB +:105980008C2200000C0000000C0000000C00000045 +:105990000C0000000C0000000C0000000C000000D7 +:1059A0000C0000000C0000000C0000000C000000C7 +:1059B0000C0000000C0000000C0000000C000000B7 +:1059C0000C000000000000000000000000000000CB +:1059D00000000000000080240200802402004880B3 +:1059E0000020488000208024020080240200000063 +:1059F00000008024020048800020488000204800E9 +:105A00000020802402000000000080240200488062 +:105A1000002048800020802402008024020090049E +:105A20000000000000000020120000000000000044 +:105A3000000000000000000000009004000080242E +:105A400002008024020080240200802402008024BE +:105A500002000000000080240200802402000000F8 +:105A6000000080240200488000204880002080241C +:105A7000020080240200488000204880002080240A +:105A800002000000000000000000802402004880A6 +:105A90000020488000200000000080240200000058 +:105AA00000000000000000000000000000000000F6 +:105AB00000000000000000000000000000000000E6 +:105AC00000000000000000000000000000000000D6 +:105AD00000000000000000000000000000000000C6 +:105AE0000C000000000000000000FFFFFFFFFFFFB0 +:105AF000FFFFBB11772253533535FFFFFFFFFFFF39 +:105B0000FFFF5F3388BBFFFFFFFF77221B1B55336F +:105B10007722EAFF00FFFFFFFFFF01014EFFFFFFBB +:105B2000FFFF5353F5055353F303FFFFFFFFFFFF41 +:105B3000FFFF10003F55EFFFBF00BF005000FFEE1A +:105B4000FD00FF7FFF7F010101010303FBFF000157 +:105B50003F55FFFFFFFFFFFFFFFFFFFFFFFFFFFFBF +:105B6000FFFFFFFFFFFF5F5F5F5FFFFFFFFFFFFFC5 +:105B7000FFFFCDDD3F55FFFFFFFF5F0A550F2727D2 +:105B80007722FFFFFFFFFFFFFFFF35353535F303BA +:105B90003535FFFFFFFFFFFFFF00FFFF3333FFFF40 +:105BA000FFFF33550F550F330F55FFFFFF00FFFF6A +:105BB000FFFFFFFFFF00FFFF5555FFFF3333FFFFE0 +:105BC000FF00FFFF0F0FFF000F0FFFFF0F0F33331B +:105BD0000F0FFFFF3333FFFFFF00FF00FF00FFFF4A +:105BE0005555FFFF3333FFFFFF00000000000000AA +:105BF000000000400C0000000000000000005320E6 +:105C0000140180288CD700000000000000007030D4 +:105C100014018028A844900310018028006300002C +:105C2000000000000000B019100180280093F0026D +:105C30001001802840CB0000000000000000131875 +:105C400014018028284001000400800808248309EA +:105C50000400800804220000000000000000303032 +:105C6000100100204081BB0914018008200C1300A2 +:105C7000140100002000033D0400802808480B00A8 +:105C8000140100200CC1F001100180088007000001 +:105C9000000000000000D2371401802800540000EA +:105CA0000000000000008302040080280022500051 +:105CB00010010000C00100000000000000007000A2 +:105CC0001001000080010000000000000000000042 +:105CD00000000000000000000000000000000000C4 +:105CE00000000000000000000000000000000000B4 +:105CF00000000000000000000000000000000000A4 +:105D000000000000000000C00000000000000000D3 +:105D10000000C328200000042C87000000000000C1 +:105D20000000D13820000004448FC0280000000487 +:105D300008930000000000000000C02800000004DC +:105D40004087C0280000000400930000000000000D +:105D50000000D128200000044497890020000000A2 +:105D6000240289002000000024020000000000003E +:105D700000004028000000040089C100200000004D +:105D80000C03510020000000440189202000000481 +:105D900024924528200000048C89C00200000000E5 +:105DA00040070000000000000000D1202000000497 +:105DB0002C87000000000000000091242000000457 +:105DC000848A400000000000000100000000000084 +:105DD000000040000000000008010000000000007A +:105DE00000000000000000000000000000000000B3 +:105DF00000000000000000000000000000000000A3 +:105E00000000000000000000000000000000000092 +:105E10000000000000000000000000000000000082 +:105E20000000000000000000030044D383000000D5 +:105E30000000000000000300C722C01380070043D9 +:105E400000D3802210070000000000000000138330 +:105E500003000000440000000340C8C193C30000D9 +:105E6000000000000000C700CBC045000300000395 +:105E70000800C3C0020203E3C300C7C300C303603A +:105E800000080205A10002C8DB4040030613C00160 +:105E90000003C0D303C000C000C0C901000000005F +:105EA000C3C0E3220322C48001C08022C8C0C0C88E +:105EB000800000000000000000004000000003130C +:105EC000C140C707022300000000000000000000DE +:105ED00047C0C00300000000008013000113000051 +:105EE000000000000000000013008000000000001F +:105EF00000000000000000000000000000000000A2 +:105F000008000100004000000080002000000000A8 +:105F10000000000000000000000000000000000081 +:105F20000000000000000000000000000000000071 +:105F30000000000000000000000000000540020416 +:105F4000C0000000000000000000400008008000C9 +:105F50008200002800048000010000000000000012 +:105F60000000000A208000000000000020A0004186 +:105F700080480000000000000000084020104000A1 +:105F8000400000050400C002038004101820082807 +:105F900080280240A00002002001040000200180AF +:105FA00004001001020180200920002000022001CD +:105FB0000000020250202000400000022002800069 +:105FC0000004100080000800010000000000010033 +:105FD00000000800C0204040040000000000000055 +:105FE0000000020004041001000000000002000094 +:105FF00040000000000000000000000000008800D9 +:106000000000000000000400000000000008000084 +:10601000000000000000200000400000800400009C +:106020000000000000000000080008000000000060 +:106030000000080000000000000000000000000058 +:106040000000000000000000000000000000000050 +:1060500078B4140000348E0454104C40A0000000AA +:106060000010100000000E000000160000004C851B +:1060700028100E010010160000500C000000000057 +:1060800000501C0A0000002050108C96C5350000FE +:10609000003810000000034091000014F8040E10B6 +:1060A0007000004E1688060450000006F230000012 +:1060B000700000862399800A0030008001000005EE +:1060C000703200000400000000801000200000007A +:1060D0006010080000300302003000800300380523 +:1060E00000528E8801100000004A10000000408518 +:1060F0005008A01826450010000014000000000001 +:10610000003000000000A8A228104C01A46100008B +:10611000000C0000000000000000008002000000F1 +:1061200000000000000000800000001EF0000000E1 +:1061300000000001E000000050000000010000002D +:1061400000000000007000200000000000000000BF +:10615000000000000000000000000000000000003F +:10616000000000000030010000E00715C0561100DB +:10617000A902000000BC1100000021000000080777 +:1061800000000085C0540C000000020000342E0303 +:106190000000200000001009000006000292148692 +:1061A000C1300000004011000000068400000047DC +:1061B000E0084F1003020047000000006003001ECB +:1061C00040B42004C003C0C00400000400301480A8 +:1061D00005000000106800000078000000100200B8 +:1061E00020000000F080010000640800004094D806 +:1061F00005000E22021014F1B13400000038110025 +:1062000000000005684D144120400000030C1500FB +:10621000000040000000000000000882C0910D4016 +:10622000A8C00000000000000000080000000000FE +:10623000020000200000000000000000000000003C +:10624000006400000000000000000080000000006A +:106250000000200500000000008000000200000097 +:10626000000000000000000000000000000000002E +:10627000000000000000000080800000000010000E +:106280002A00242440810000008002000000000059 +:1062900000309000000068841600260042300200A2 +:1062A0000000010C000028000000CA000000104897 +:1062B00000403C0181300000000C03000000401849 +:1062C000A501C00049040A080301804204007016B9 +:1062D000820040080A00203C2D00008032000002AD +:1062E000005002800000001400020080000800003E +:1062F000000415003C000000000900000020C13C23 +:10630000000030040200005488005153142400009F +:106310000004260000000049602010408120000099 +:1063200000000200000020000010000000010C81AD +:1063300000422440000802000000000000000200AB +:10634000000000000010000000000000001000002D +:1063500001000000020000000000000082010000B7 +:1063600044000080000040100000000040000000D9 +:10637000000000000010000000000000000000000D +:1063800000000000000000000000000020A8000045 +:1063900000480080210050D34460000000B0140089 +:1063A00000002F00000000010000CE02030014C313 +:1063B000E0000100008015010000060000000C084C +:1063C00000000104638010D1A1740000008015005A +:1063D000000000088C000040F47000A0010080CF95 +:1063E000C1001E85C00000C0B001100068000000A0 +:1063F000E03C000800400C00000080081010008005 +:10640000057C000000300C00000000003078000027 +:1064100000180204008011C6000000800040150032 +:106420000008000000101400000001002300C00755 +:106430000001000000302A0000000E0000400000B3 +:1064400000004002E840500700310000004000100A +:10645000008000000000000008000E000000001096 +:106460000000000000000000000800000000000024 +:1064700000002E000000000000800000000000006E +:1064800000000E00000000100000000000000000EE +:1064900000000000000000000000000000000000FC +:1064A0000029280000901D400950108A2262000037 +:1064B0000028560000000C0000000F27000008A371 +:1064C000912C949AA665060000281400000008008C +:1064D00000046C0800004627000910A006410000D7 +:1064E000003814000000388350000041C138808516 +:1064F0008000000ED6004EA470010018E66C0EC796 +:10650000810000900311000700A840400A00000726 +:10651000704200000010000000001000E0000000C9 +:10652000702B120000140E04002810850600004095 +:106530006428140E0000000000701400000026D52E +:106540009130218843000000000208000000000094 +:10655000001000000070068C0128908643040000A3 +:10656000001000800310000000000000E030010077 +:10657000000000800340000F0000000001100040F8 +:106580000300000002700000000000000010000086 +:1065900000000000C0000100000000800340000077 +:1065A000000000000000000000008001080800005A +:1065B0000C004C48802C0804484C2109008C08022F +:1065C00081405020000C815A21504A1022900C42E8 +:1065D000842008001929280800302080148C0140EC +:1065E0002220894480000040200080540A8100005D +:1065F000000440202802204400022250209941003B +:106600002039482C0A0C243C300020540844042231 +:1066100048014132243028402144480234241248A1 +:106620002200242C8850224C01282021820424009E +:106630001129443028243404314824049A22510C6E +:10664000490200811C0C040431195404041C084C38 +:106650009000140C001A14120C0420012001440CA8 +:10666000804454142001124104003808241C010401 +:10667000205400002004100810082C80040440005E +:10668000003088440420300410002400408221049B +:1066900080242000008820208840000080004004E2 +:1066A0002000080002082020000800000000000070 +:1066B000000000000000000000800000000000104A +:1066C000087800000C0808B80408080E080C080830 +:1066D0000008080058001C09003400180C183C1A67 +:1066E0002009080A9C102C0A180C081C7C1A09B0F6 +:1066F000191C090C5509081EB00E000A0050043080 +:10670000380E081D18001D0AAC18087D595D0C3C98 +:106710000D340A5D003848281834903009000416FA +:10672000087EA04E009AB539BC1E08067890085C19 +:10673000300C3E483808987CBC3E000C098C090996 +:10674000AC58A509395C001DAC593CA0058C25AAA4 +:106750001C00150C9C0C55583C08B000002C3D9AB0 +:10676000BD3C98483D0C1E7C080C3815580EB000F6 +:1067700058500C48081D3C3070551550A97A18BC6B +:10678000B01858000018090599501D9C195C980D07 +:1067900005590CB8081D081E080010051C70000ED5 +:1067A0000008790EB550090009A8790A580E09A207 +:1067B000000E000A090C0C0009080906000C004A2A +:1067C0000000090E080C0D00000000000000000091 +:1067D0000000108C00400050804F1C3011100A78CF +:1067E0001E3C1908003000083912211A4F8C1C1069 +:1067F0000921B80A8C360C1039BAC0764C18308092 +:10680000413A3A1A089C8C113C3018A81E7E81002F +:1068100030013B39EC3C5BD0F10CBA3030DD113447 +:106820007008111F2E383C7E101836B08CDC2838CA +:106830001E5B310C003C0C38A074281009163E0079 +:10684000152D2E09081D0C30814F193C3E1A1408D5 +:106850007C30121821511C00041C3C3200341D04F1 +:106860001432BC58141924083C0D0E35080C0804C9 +:1068700018082C08080000143E51080C01080D7C73 +:106880000808100C21083D0411BC1908260404381E +:1068900008003000080C0D0810390E00105C0000D4 +:1068A00000003C20080431010130309809301058B4 +:1068B000010038001621345C303C30005020303666 +:1068C000301000003000300830010000000030308F +:1068D00000000000000000000101000000000000B6 +:1068E00000200000000080000020000000000004E4 +:1068F00040000004000002000004000202008000CA +:106900008005000140100800001400000030000065 +:106910004000000000001C4001B00001901010A0D9 +:10692000000000240C0080000000000000401080E7 +:106930002910000000342000403040200030223078 +:10694000702040008028A420106404010008B404D2 +:1069500000022000002080400000000C04048000A1 +:10696000004080020010A001023001020D10210839 +:10697000401000004D184E3C0044000010304C0008 +:1069800000040001000000A0000000000000000D55 +:1069900000004000001030400030002000000040A7 +:1069A0000030000100001030000000000000300145 +:1069B00000000000000000000000000000000000D7 +:1069C0000000000000300000000000000004000093 +:1069D0000000008000300000000400000000000003 +:1069E00000000000000000000000000000000000A7 +:1069F00000000000000000000000320000400040E5 +:106A00000000000120000000000004000001000C54 +:106A100000101000100C000C00B0010000800000FD +:106A200000B0020C000000000010001000A02004C4 +:106A300010B000B400000041003030002000000021 +:106A4000001080100180000000B28000204024402F +:106A500000B0846060402080B081B0A0408185009B +:106A6000208270010404800000803A1000000002BF +:106A7000023230000000300E0080900808400C8088 +:106A80000E908400308000000E9036000000000060 +:106A9000400012000030000C0010006200000000F6 +:106AA0000020800E000830000090400000000040F0 +:106AB0000010000000800000001080400030000046 +:106AC0000000400000000000000000010000040081 +:106AD000000000000000000000B0000000080000FE +:106AE00000310000000000200080000000000004D1 +:106AF0000000000004100000000000000000000082 +:106B00000000000000000000000000000000000085 +:106B100000000000000000000080000800000000ED +:106B2000000000000020000000080010002000000D +:106B300040080000432004040000008042201800A8 +:106B40000080200010201004000000000823000036 +:106B5000600800000000C00050000000432000005A +:106B6000400804004320C020000800000000C825A1 +:106B700004004401300408C204000000082004009E +:106B80000880000000200000400000008081000814 +:106B900040000040022082C90000010000280119C5 +:106BA000404900000010000000A800000020004044 +:106BB000020000000020000000840180022000008C +:106BC000041000000020000000000000002005016B +:106BD0000020000000000000000000000000000095 +:106BE0000080040000000000000000000020000001 +:106BF0004004000000200000000000000000000031 +:106C0000040804040000000004200000000000004C +:106C10000000000000000000000000000000000074 +:106C2000000000000000000000003F150F035F138C +:106C300077003F150F05FFFFFFFF3F150F035F13A1 +:106C400033033F155505FFFFFFFF5F130F03FFFFE2 +:106C5000FFFF53535F50AF055F0AFFFFFFFFFDFFCC +:106C6000FBFF5F135F13FFFFFFFF0F55330F3F3035 +:106C7000F30301000500FFFFFFFF7303470FFFFF52 +:106C8000FFFF0F00B9095F137707FFFF55597FFF1B +:106C9000FFFFFFFFFFFF113055705155EFCDFFFF94 +:106CA000FFFF5F1303000533FF1DFF334744FFFF62 +:106CB000FFFF3F35CF03FFFFFFFFFFFF3333FFFF32 +:106CC000FFFFFFFFFFFFFFFFFFFF3F0C3F0C77229F +:106CD0007722FFFFFFFFFFFFFFFFFFFF0F0FFFFF09 +:106CE000FF00FF7FFFFFFFFFFFFFFF000F0FFFFF12 +:106CF0003333FFFF55553333FF00FFFF55555555CF +:106D0000FF00333333330F0FFF0033330F0FFFFF19 +:106D10003333FFFFFF003333FF00FFFF5555FFFF05 +:106D20003333FFFF0F0FFFFFFF00000000000000E4 +:106D30000000000000000000000000000000002033 +:106D40001E0000201E0000201E0080240E000020D7 +:106D50001E0000201E0000201E0080240E000020C7 +:106D60001E0080240E0040808C2248808C228024CB +:106D70000E0000000C0000000C0080240E0040807B +:106D80008C2248808C2248001C2080240E00002089 +:106D90001E0080240E0000000C0080040C00000087 +:106DA0000C0000000C0080240E0048001C20000095 +:106DB0000C0080240E0000201E0000000C000000CB +:106DC0000C0080240E0000000C0080240E00000047 +:106DD0000C0080240E0080240E0080240E004080D1 +:106DE0008C2248808C2280240E0080240E0000001B +:106DF0000C0000000C0000000C0080240E000000BD +:106E00000C0000000C0000000C0000000C00000052 +:106E10000C0000000C0000000C0000000C00000042 +:106E20000C0000000C0000000C0000000C00000032 +:106E30000C0000000C0000000C0000000C00000022 +:106E40000000000000000000000000000000000042 +:106E50000000002012000020120080240200002008 +:106E6000120000201200002012000020120000205A +:106E700012000000000080240200488000204880AA +:106E8000002080240200802402008024020080244C +:106E90000200C8840020488000200020120000204A +:106EA000120000000000002012000020120000006C +:106EB000000080240200000000000000000000002C +:106EC00000008024020080240200802402000000D0 +:106ED000000080240200802402008024020080241C +:106EE00002008024020080240200000000008024B0 +:106EF00002004880002048800020000000000000C0 +:106F00000000000000000000000000000000000081 +:106F10000000000000000000000000000000000071 +:106F20000000000000000000000000000000000061 +:106F30000000000000000000000000000000000051 +:106F40000000000000000000000000000000000041 +:106F50000000000000000000000000000C00000025 +:106F600000000000000077073F005F130F05FFFFE0 +:106F7000FFFF3F1507073F155F00770707075F1300 +:106F800077005F130F05FFFF5555FFFFFFFF3355D8 +:106F90000F5547473F0CFFFFFFFFFFFFFFFFFFFFBE +:106FA000FFFFFFFFFFFF7722CF031D1D3F0C477739 +:106FB00057005CFF07004770AD215D110F1D5F108A +:106FC000DF02CD32FF7FFFFFFFFFFF5FFFDFFFFF2D +:106FD0005555FFFF0F0FFFFFFFFFFFFFFFFFFFFFF5 +:106FE000FFFFFFFF5555FFFFFFFFFFFFFFFFFFFF05 +:106FF000F66FFFFFFFFFFFFFFFFFFFFFFFFFFF7FBA +:10700000FFFDFFFFFFFF3355330F3F30F505FFFF57 +:107010000F0FFFFF5555FFFF0F0FFFFF0F0FFF0073 +:10702000FF00FFFFFF00FFFF3333FFFF3333333336 +:10703000FF00FFFFFF00FFFF0F0F33330F0FFFFFB6 +:107040000F0FFFFF3333FFFF3333FFFF5555FFFFB4 +:107050003333FFFF0F0F0F0FFF0033333333FFFFC7 +:107060005555FFFF0F0F000000000000000000401A +:107070000C00000000000000000000001401802847 +:10708000ACD702081401802888CD000014018028A4 +:10709000C84C000914018028CCE5B00910018028F3 +:1070A00000F3000000000000000013301401002075 +:1070B00084C1F1081401800880200300040000004E +:1070C00008000000140180288488800910018028AD +:1070D000009F8008040080080406000004000000EF +:1070E0000C000030000080280040B0091401800826 +:1070F000200003000400002008C090001401800854 +:10710000CC23AA08140180082403930814018008E2 +:107110008427D029100180280054000000000000BE +:107120000000002900008028000800000000000086 +:1071300000000008000080080006000000000000B9 +:10714000000000000000000000000000000000003F +:10715000000000000000000000000000000000002F +:10716000000000000000000000000000000000001F +:10717000000000000000000000000000000000000F +:107180000000004000000000000000000000C120DE +:10719000200000044487D120200000048C93C120EB +:1071A00020000004848BC12020000004848BC020B8 +:1071B00000000004088300000000000000005128C7 +:1071C000200000048C91D100200000006403110015 +:1071D000200000002400C130200000042C93C020B7 +:1071E000000000044083810020000000840611009C +:1071F000200000002400802800000004008ED10040 +:107200002000000044071128200000042488D10237 +:10721000200000008403E100200000004407D100AA +:10722000200000008C03C028000000040887000034 +:10723000000000000000802800000004008A000018 +:1072400000000000000080000000000000060000B8 +:10725000000000000000000000000000000000002E +:10726000000000000000000000000000000000001E +:10727000000000000000000000000000000000000E +:1072800000000000000000000000000000000000FE +:1072900000000000000000000000000000000000EE +:1072A000000000010001C6004700C000C462812246 +:1072B00000C000800163C6220000004103E280227A +:1072C000C400C00000C8020144000000000000002B +:1072D00000000003C600C113C407C80000C000239B +:1072E00000C100000300000000000023030047234A +:1072F00083000322468144008143C6C2A3C04023C9 +:1073000003E300230003C000C4200022000700079D +:10731000002200C000010013C30003000305440362 +:10732000030000C8C300C301400000C003C0011334 +:1073300093E3C80003C00303030100000301C2C8B4 +:10734000000700000000000200000003030002101C +:1073500000000000000000000800000000D0400015 +:10736000000001000000000000000000000000001C +:107370000000000000000000000800000000A00065 +:10738000000000000000000000800000000000205D +:1073900000000000000000100020000000100000AD +:1073A000008000000000000000000000000000005D +:1073B00000000000000000010041048004001000F3 +:1073C0000020C000010200824020040001000021D2 +:1073D0000410820000801000000004010080000002 +:1073E00000000000000000010400C00000000000D8 +:1073F00000100040000300004000000000000000FA +:107400000580040088000800040300C0C02802A012 +:107410000420410008200002A001C0002000044018 +:1074200000000100000000200101000088000404A9 +:1074300040000001040000008408180103400220FD +:107440001882400080020080041004014001020004 +:107450000801148000000000000000800000000807 +:107460002080040000000000000000000000000078 +:1074700000100100010020000000000000000000DA +:1074800000000400000004000000000800000000EC +:1074900000000000000000001000000000040000D8 +:1074A00000000000000000000008000000000000D4 +:1074B00000000800000400000000000000000000C0 +:1074C000000000000000000000000882200000868C +:1074D000F330008301020000F4000C0420000006D9 +:1074E000F2604C5000004000F000000300380080C3 +:1074F0000A002E2D785302094000000010081C00DD +:107500000000800200300180050019250010680984 +:1075100022100E8501008009F0012695000000145C +:10752000F00100402001009EA34040405200008036 +:10753000A104000000001400C0000007002A0000A1 +:1075400002000002D00000400000000000280000FF +:10755000000000030048004A0200000000280080EC +:10756000020018000010170600002E60793952083A +:1075700022100000000000060000000000000006CD +:107580004000020200004000000000000000000077 +:107590000060000000000000000000006000000625 +:1075A000F000000000000084020000000000000065 +:1075B0000040000000000000400400000000002027 +:1075C000001000000000000040000000000000006B +:1075D000000000000000000000000000000020305B +:1075E0006B03001F0080401200082040E0002110C3 +:1075F000000240472402308409001403E000001018 +:1076000000802C4000000E8BE1100080C5000000BF +:10761000804A000000000002007400800100061093 +:1076200003100800A86C60950B0030C0A1001888FA +:1076300000000CC741003000D000A006084800043C +:1076400010340000C8300000000000000084001B5F +:10765000003830F000000010001000C004400000AE +:10766000003000400400800000084060000000007E +:107670000030300000000C000000940E00000E40AE +:10768000E37C0060321100000000220800000000CE +:107690000000000800000700040010400400000083 +:1076A0000000000000806000030000000064400053 +:1076B00010000008000000000000000007000000AB +:1076C000000000C000000000000000000870600022 +:1076D000000000030008000000000000000000009F +:1076E000000000000000000000000000000000009A +:1076F00000006000820080641C080048090000400F +:1077000048008008010080D0102880040000012873 +:107710004A0000000000010003000442200026008F +:107720002C14000010080800004200210080010015 +:10773000010020088A1A645009102C00040000255A +:1077400002000084080090A40200003205020080BC +:1077500008180000040000804800000040010801F3 +:1077600080810000001000000000000200090010ED +:10777000100A0010005003900000300000881141F2 +:1077800000000000001800800000100000304401DC +:1077900000000440000001061270000000002400F8 +:1077A0001000000000000000201010010000000088 +:1077B0000000000000000000000080000400000045 +:1077C00000000000000000000000000000000002B7 +:1077D0000001000000000020102000000000000058 +:1077E0000000000002000000000000000000000097 +:1077F0002010000000000000000000000000000059 +:107800000000000000008E0800000086C1380088DB +:107810000000000001020008CF0040060038061DED +:1078200008000C465400000800404080010010870A +:10783000334094072070000060A80000009480048A +:1078400000B0101000000F85E3101000407042944B +:107850000C002D432000AFC801002C41CC00278232 +:10786000600200C9A473000D073A0010D070000038 +:10787000D001000000000018000000800100000896 +:107880008012005000B040030000144000000018B7 +:107890000028008001000000003C0C0000000800EF +:1078A0000000280000003E0500800D0101000000DE +:1078B00000001000000000070000000000000010A1 +:1078C0000000080000000E08030000C005000000D2 +:1078D0000000000000080000080000000008000090 +:1078E0000400000000000E08000000000000060078 +:1078F0000000001000080000030000000000000766 +:107900000000000000000000000000000000000077 +:1079100000000000000000000000108200000000D5 +:107920002A140080008040802A000E406801800AEE +:1079300022C22E83010000BAA200000A002800081B +:107940000A008CE7713014560070000068892C0022 +:10795000001000030030008005008CC2718C100004 +:107960000046088401001000D6020EC701000087FF +:10797000E10200625300006EE264000050020080E9 +:10798000E10400005000350600000004008C01C036 +:10799000050000026480000002140000008C00C09A +:1079A000010000030014008607000000000C4000E6 +:1079B000000019000010100000008CCC01380C8071 +:1079C00027C0000000001000000040000000000080 +:1079D0000040000700000100080001100000000046 +:1079E00000000C00000000000010008000000000FB +:1079F00000100000F0000000007001000000000016 +:107A0000C0002000000000800310006001000000A2 +:107A1000000040000000001E0040000000000000C8 +:107A2000000000000000804090404041001008002D +:107A3000094C2140040440400008012140104C1032 +:107A4000200432511092421A208184409842418988 +:107A50002140880050001100122102003120815184 +:107A600028400288000011119029882281901C88EA +:107A700002428222810002419840814214180891FA +:107A80002032242138212004210421244181028232 +:107A9000220A20804041844220002110242181219B +:107AA000228924000A02014129420100200458329F +:107AB0000291805901484C920002008A20502128EE +:107AC000023219002100005C2A2421425091000258 +:107AD000023A112080301010012400020808802092 +:107AE0000038022129008180002008800800214000 +:107AF000002400010008800008000000004004008D +:107B0000000400280200000000000208002000001D +:107B10000000400400000000000000080000000019 +:107B20000000000001000000000400000000000050 +:107B3000000000000000000000000A00200000001B +:107B40005038080E08080949080E0D09BC0CBC0085 +:107B50000C1A081A08803D3A10180C3C10B0985EB8 +:107B6000385EBC780C015C0D3D09110D281E0D001E +:107B700031A0811D08BA001C995D30181A3C7C099F +:107B80000C1C38BC00599008915D00BD280D000206 +:107B900008282C065009244E100040069A50BA3886 +:107BA000006A0C00B9B49C1D4D0A5EAD0A0D781236 +:107BB0009C60ACBD29580D0C98BD58B90C8E0CB00A +:107BC00090B8181E5931AD3CB01C981DB0011CA8CE +:107BD000092A6D78001A184E096D00180C0A0D0A52 +:107BE000103DAC1A0018185EB01E3D390EAE0CA048 +:107BF0009C1CA059700CA05A2050091AA25E0C2E91 +:107C00000008090E5D05060E0008010E08090000B7 +:107C1000000A000C0D00000C0000000000007600BF +:107C20000008000000090000000A0002000000082F +:107C3000000C00000000A060000000000000050033 +:107C4000000A0000000000000000000000001030EA +:107C50003010101C00410A006810280001081A3A70 +:107C60000100091C31502450A35C10380139310443 +:107C7000A0001D303A2819083DB03A001E8000408F +:107C800009B00CCF3030043CA0300C8E0A0E080D29 +:107C90001ABC301C15210C1E08183C3D00006C1845 +:107CA00010901C08010E80080638AD0C002C1A003C +:107CB0000C0C18BD18380D3400081BA03E1C141CF9 +:107CC0002006190A311C3118B80C3CD10008093CB7 +:107CD0001C180970100D1E1C0C00303C58B23C24BE +:107CE000414C8F2C3A2018300C18000618500E3CCE +:107CF0000C181C081018018C081809103E300A00D6 +:107D00000038010C008020100036041CB00028B0A0 +:107D1000003000A0000138100018000400003000FE +:107D20000000000000000801000C0010040000002A +:107D300000000C00003100000000200800000000DE +:107D40000000007000010000000006000C000000B0 +:107D5000000800000000000000000000000000001B +:107D600000000000003000000010000000000000D3 +:107D70000000000000000000003010010001800041 +:107D800000480002000040000038004100380000B8 +:107D90000030002000048002028002000010000475 +:107DA00000200008000C003000008004203400385F +:107DB0000138000000308032003806701080420E1A +:107DC000427082A02208000C01202200120D000245 +:107DD0000424000C40088006810C010115080000F5 +:107DE000821182014C44000A0110400C5D00B10870 +:107DF00001A0500860480030003501004000908824 +:107E00000000010000040002023004880C80000918 +:107E1000000C0E000400300000080000000000000C +:107E2000010100100000008000000200000040007E +:107E30000000008000300000000000000000000092 +:107E400000340000000000000000000000050000F9 +:107E50000000000000100000000100000000000011 +:107E60000000000000000000000000000001000011 +:107E7000000C0000000000000080000000800000F6 +:107E8000000000000200000000000080020040042A +:107E9000000C00800021000C0000208000BA0014BB +:107EA00000400000009900400001000C081028006C +:107EB0000080008200B40041020200400030100146 +:107EC000004100490CB220000040304000B0244482 +:107ED0004008280200603864090100820048AC00B4 +:107EE000490600024981000200103801040A140802 +:107EF00042314002189C3808024200810C9A30003E +:107F0000420044000460100130000001008E0400B3 +:107F10003000543000100002060200000840023019 +:107F20000818000D00120E000200400000120001AF +:107F3000003800000C1C4000403000300208840073 +:107F4000000030000000003004B084000000000099 +:107F50000000000000B90000000000000030000038 +:107F6000000D000000000000004000000030000094 +:107F700004000000003000000000000000000000CD +:107F8000000C0000000100000000000000000000E4 +:107F9000000000400200000000000000000000801F +:107FA00042100000400000000000000000000040FF +:107FB000422482010008000000240000008000002C +:107FC0000000200400000000002404000000000065 +:107FD000042000005100004452202000000800400E +:107FE000422829C7480C0002000300043080042600 +:107FF00000852002220041010400000000A80400C6 +:108000000004200040204022002000000400000066 +:10801000102400080000812A0000104012080010FF +:10802000886100004800040A0020000004000000ED +:10803000800700080C840022002000000480000259 +:108040000020000040240000002000180020001044 +:108050000004000000800000000000000420040074 +:1080600000000000000000000027000000000400E5 +:1080700000200000000000000000000000000400DC +:1080800000230000040000000020000000000000A9 +:1080900000000000000000000000000000000000E0 +:1080A000000000000000FFFFF0F0F0F000FFCCCC7B +:1080B000CCCC00FFAAAA00FFAAAACCCC00FF00FFEC +:1080C000CCCC00FFAAAACCCC00FFF0F0CCCCCCCC1E +:1080D000CCCC00FFF0F0F0F0CCCCCCCCCCCCF0F0A1 +:1080E000CCCC00FFFF00FFFFFFFFFFDDFFBFFF0F56 +:1080F000153F7B5A470333550F55550F550F5533D1 +:108100000F55550F5533AA553C3CCC335A5AAA55F6 +:108110003C3C6666CC33F7073F555155DFDCFFFF2B +:10812000FFFF3F3FFF00FFFFFFFF5F1305000F55FD +:10813000550F3F0CDD11FFFFFFFFFFFFFFFF550F46 +:10814000330F0F55330FFFFFFFFFFFFF0F0FFFFF31 +:108150003333FFFF33330F0F55553333FF00FFFF2A +:1081600055555555FF00FFFF3333FFFF5555FFFFB2 +:10817000FF0033335555FFFF0F0FFFFF3333FFFF72 +:108180000F0FFFFF5555FFFF3333FFFF3333FFFF63 +:1081900055553333FF00FFFF3333FFFF3333FFFF0A +:1081A0003333FFFF555500000000000000000000C1 +:1081B0000000000000000000000000800C284E803D +:1081C0006CB84E806CB84E806CB84E806CB84E80E7 +:1081D0006CB84E806CB84E806CB84E806CB84E80D7 +:1081E0006CB84E806CB84E806CB84E806CB84E80C7 +:1081F0006CB84E806CB84E806CB180240E00800448 +:108200000C0090241E0000201E0040808C2248801C +:108210008C2240808C2248808C22CDA44EB8CCA4E5 +:108220004EB9CDA44EB84C804CB080040C00000078 +:108230000C0080240E0090040C0080240E0000200E +:108240001E0040808C2248808C2280240E008024D6 +:108250000E0040808C2248808C2280240E0000007A +:108260000C0000000C0000000C0000000C000000DE +:108270000C0000000C0000000C0000000C000000CE +:108280000C0000000C0000000C0000000C000000BE +:108290000C0000000C0000000C0000000C000000AE +:1082A0000C0000000C0000000C0000000C0000009E +:1082B0000C0000000C0000000C000000000000009A +:1082C000000000000000000000000000000000208E +:1082D0001200002012004F8060B94F8060B94F80BB +:1082E00060B94F8060B10020120000201200002011 +:1082F0001200002012000020120000201200802432 +:108300000200002012008024020080240200802449 +:1083100002008024020080240200480010204880CF +:108320000020480000004880002048000000D8A439 +:1083300052A8DDA452B8DDA452B8DCA452B9CDA431 +:1083400042B8CDA442B9CDA442B84C8040B08024FC +:108350000200802402004880002048800020802401 +:10836000020080240200C88400204880002080246D +:1083700002008024020080240200000000000000AF +:1083800000000000000000000000000000000000ED +:1083900000000000000000000000000000000000DD +:1083A00000000000000000000000000000000000CD +:1083B00000000000000000000000000000000000BD +:1083C00000000000000000000000000000000000AD +:1083D00000000000000000000C0000000000000091 +:1083E000000077073F0077070707FEFFFBFFFEFF50 +:1083F000FEFFFEFFFEFFFEFFFEFF3F1577005F134F +:1084000007073F155F0077071515770777003F15BA +:108410000F05FFFFFFFF77070F05FFFFFFFFFFAA15 +:10842000FFFFFFFFFFFFFFFFFFFFFFFFFFFF4545D0 +:108430000111AAAAAFAFFFFFFFFFFFFFFFAAFFFFD7 +:10844000FFFF55AA99999999999955AA33CC33CC9C +:10845000AA55AA553C3C5A5A5A5A5A5A3C3C666646 +:108460003C3CFFFFFFFFFFFFFFFF77221B1B0F338B +:10847000330FFFFFFFFFFFFFFFFFAF057722272727 +:108480002727FFFFFFFFFFFFFFFFFFFFFFFFFFFFAC +:10849000FF00555533330F0F0F0FFFFF3333FFFF2F +:1084A0003333FFFF333333330F0FFFFF3333FFFF1C +:1084B0000F0F0F0FFF00FFFF0F0F5555FF00333356 +:1084C0005555FFFF33330F0F0F0FFF00FF00FFFF66 +:1084D00033333333333355550F0F33333333FFFFD8 +:1084E0000F0F000000000000000000400C00000022 +:1084F000000000000000000014010000AC010000BA +:10850000000000000000000000000000000000006B +:1085100014010000CC01000014010000AC010000B7 +:10852000140100008C01000014010000C8000000CC +:10853000140100000000703014018028083400008D +:10854000140180284022000000000000000000000C +:1085500000000000000010190100802810E6102023 +:10856000200000209C416520140100000000031041 +:10857000040080280864F038140180280487000073 +:10858000000000000000E22914018028444D03008F +:10859000040000002800501014010020A010030067 +:1085A00004000000000000000000000000000000C7 +:1085B00000000000000000000000000000000000BB +:1085C00000000000000000000000000000000000AB +:1085D000000000000000000000000000000000009B +:1085E000000000000000000000000000000000008B +:1085F000000000000000000000000000000000403B +:108600000000000000000000000041002000000009 +:108610004401000000000000000000000000000015 +:108620000000410020000000840141002000000003 +:1086300044014100200000002C0141002000000006 +:1086400084014100200000002C01D12A20000004F8 +:108650006483C12020000004848B0000000000001F +:1086600000000000000000000000D12812010004FA +:108670001092512844020004108851282010002430 +:10868000C4019128200000042492D1282000000475 +:108690002C970000000000000000D52820000004F6 +:1086A000848B1100200000000400512820000004E9 +:1086B0000C81110020000000840000000000000078 +:1086C00000000000000000000000000000000000AA +:1086D000000000000000000000000000000000009A +:1086E000000000000000000000000000000000008A +:1086F000000000000000000000000000000000007A +:108700000000000000000000000000000000000069 +:108710000000000000000000000000000000000059 +:10872000010080E3C400A000020400001111000059 +:1087300000800000000001C0A3408023010000E38E +:10874000A080C400014000048300C4018000000335 +:10875000C4C0C701830100C8C4E38303C700800706 +:1087600000C03305C04380E200C78122C2C70000B9 +:10877000000040200000000000000002000003C3D1 +:10878000E3C1E100CB22036213EAE000810311118F +:1087900089CD88030323000003400307470700C077 +:1087A0000307134001000000000000000000010367 +:1087B000021303070323000300000000000003224C +:1087C000A1C8C00000C00000C0C000000000100030 +:1087D0000000C00000400000000000201000100059 +:1087E0000000000004000000002000100000000550 +:1087F0000000000000200000000001000000000058 +:10880000000000000000000000C00400A000030001 +:1088100000A00000000000000000000000000000B8 +:108820000000000000000000000000000000000048 +:108830000000100040008020000000000200000046 +:1088400000100000000400000000402004488000E8 +:108850004000002000020800C04000008400000129 +:108860008000200100024001840108004020C00176 +:108870000400800000200000802880040320C00045 +:1088800084040000040001000000042000000080B7 +:1088900000000818402108800400042000000000A7 +:1088A000C00100104000000120000000082040002E +:1088B0000400000204040120400000000000000049 +:1088C0000000400105000800400000010000000019 +:1088D000000004004000800000040000802004002C +:1088E0000000000000000100004000000000000047 +:1088F0000000000000000000000000000000000078 +:108900000000000000000000000000000001300036 +:108910000000000000000000000000000040000017 +:108920000000020000040008000000000000000039 +:108930000010000000000000000000000000000027 +:1089400000000000000002800200000AF000204049 +:108950000100808AE20087400200000E2080008033 +:1089600001008000F100008000000020C06208804B +:1089700000000000F200004000000000F2320000A1 +:10898000007800000100000010306000007000005E +:10899000A0300000E2B00004202A200A0400A00356 +:1089A00060804C000840180A000001800304064063 +:1089B000A1000E8003300E0204301C4008B00000FD +:1089C00000801000C00400005031000000000C6561 +:1089D00000112018C0020000005214000000000224 +:1089E000501012A00210000000300C000000000027 +:1089F000000000800140000000000000F0050000C1 +:108A0000500000000000000000010000F100000024 +:108A100004000000E00000000000800040000000B2 +:108A2000000000000000000000000000F14108000C +:108A300000000000000400000000004022300000A0 +:108A400000000000A1000000000000000000000085 +:108A500000000000000000000000200000004006B0 +:108A6000E00006C0C001000EC30116830000000F25 +:108A7000B840300060010013E0003000080000E161 +:108A800028002000030000C7C102000003280000E6 +:108A900020100000000000000000000060761000C0 +:108AA0000048408383810000E290001B70384840FA +:108AB0000000080460090C0000080000000002002B +:108AC000000016000300000000040104C07000084C +:108AD000C06000000030010B0800000000B2000080 +:108AE00000404105C21014002008000000081500D5 +:108AF0000000260000901400320000000074010005 +:108B000000000000033C00000008000B0000000013 +:108B1000A040400000000000000000000000000035 +:108B2000000000008000000000642000000000073A +:108B300000002000200000000000000000000010E5 +:108B4000E0000602000000000070000000000000CD +:108B5000080000000001000000000000000000000C +:108B600000000000000000000000000000000C00F9 +:108B700000000008081005400C0000241800000048 +:108B80000400000800002080080000151800000004 +:108B900002000003022084800402C020410000C0C3 +:108BA00004C00000410A0000010C00800410000015 +:108BB00000010000000C0000060C0000280000006E +:108BC0002011020400810001401008000000002074 +:108BD0000201408110001104070000800002001112 +:108BE00040AA0844882001008000000C0001000019 +:108BF00080C20C00001CA084003850518018000076 +:108C0000000026000000050440E0100020200000C5 +:108C10000080000000000000040000800000200030 +:108C2000000000040000010040000000000020409F +:108C30000000008000000000000000008200000032 +:108C400000000000200200401000000000000000B2 +:108C500000000000002014100800000000000100C7 +:108C60000000000000028000000000808000000082 +:108C700000000000000000000000000000000000F4 +:108C800000004262020200065800090003000006CC +:108C9000B06001000A000004090A0E80080000C349 +:108CA000A142108003020004400020408000000622 +:108CB000C040800000380000C000800000000000BC +:108CC000C00000008030000000C08085070000D098 +:108CD000C0680005C00240D30460000500022E00F9 +:108CE00000000C00C7010200C0304E070000010068 +:108CF0000800EE02F0300006D96806800F10020668 +:108D0000D000000000B000000040864403002EC3E5 +:108D10000074000000B01400000082E46038000419 +:108D2000411000000088000000000000003C00002E +:108D3000000002000000000600080880000000009B +:108D400000080E0000000000000006000000000007 +:108D500000004003000000000000000A00000007BF +:108D600008000000000000000000000002000000F9 +:108D70000008090000000000C0000C000000000016 +:108D800000000000000000000000000000000000E3 +:108D90000000000000000DC06100002000400EC077 +:108DA0000100001AC0040D900000801A48701C8059 +:108DB0000100000820040C201000800AD2010E409F +:108DC000010000144082004700000000A0020007DC +:108DD0000004000000B0000004720E000010408784 +:108DE0006D000080D51640001068218A02604000A6 +:108DF00010480C41088820C00100090004820000CE +:108E000000008C00A438000260100000A8900080D0 +:108E100061801000000000006030140000104897CE +:108E200009300C8A02400000002A1400000040C3F0 +:108E3000E1312165599A000004082000000000007B +:108E4000000000000000000F0000000000100020E3 +:108E500000000000001000400100000000002000A1 +:108E60000000000001000000000000000000008081 +:108E700000008000E0000100000000000000000091 +:108E80000000000000100E0000000000000128009B +:108E900000000000000000000000000000000000D2 +:108EA00000000001200100400089481A20810004D0 +:108EB000080140400800404408182A0A21112202F3 +:108EC00012010800305048401102041031312101D4 +:108ED000103C08222289341240420001280C8801EB +:108EE000344141500C0C014A38810041821928025A +:108EF000080080022910028298000910341028010D +:108F000082044010821C30185024418021142444D3 +:108F100030444030348024893C4104112414882496 +:108F2000100101220400848080404482384488403B +:108F300011800001024C0C0834441004802294403B +:108F400040144800200014103020844054241200A3 +:108F5000141400180014220002342C2000442104B0 +:108F60000408001109010404022400000021000883 +:108F70000A0000001C00040000210004042000007E +:108F8000000004000201000440080002000001008B +:108F900000000000800080000800000000000400C5 +:108FA00000080000000400000002000000000100B2 +:108FB0000000000000000A00000D080D000C5C38E5 +:108FC000088D522C08780400082900180C189808FD +:108FD0000039000A0C080C7E20082C09091DBE0D62 +:108FE0002C0948940D1C0C3070741D1940090D0E8D +:108FF000688CACAD095064090C044E7C1C3D000A21 +:10900000A9140C0E002900169C390AB21C5E5C36AD +:109010001C1808050000301C29081C1C080D585697 +:10902000781EAD351EA40C362E0DA0A80C595A1072 +:109030000E1008043401008978390C0D35912CADDF +:109040001880A80018BEAC9E601C78A81D1E1809C8 +:1090500074703C4E55149C5E000E301A04719D15C0 +:109060001C7E30043D3D080C980E00705D30080DEC +:10907000A07000BA900C793E0C81090D0D0000A281 +:109080000000007C000800002C80000000000000B0 +:10909000050C0000000E0020000000000008550034 +:1090A0000200600A00000E000000050000000D0034 +:1090B00000400006000C004000000000000000001E +:1090C00000000000000000000000000C100C0F3237 +:1090D000013C200021005089004D1F31408030BDEF +:1090E0000000384C2C5C300C51590E501A119A006B +:1090F00040840C0209302D0900388AB0080C3C0865 +:1091000030180E083A502204103D311A780C0830FD +:1091100030AC8A382878300000E696FC2800083009 +:1091200010505C000901B0781C789E01BC5C136093 +:10913000113C291A29402C8C00293716082E28307A +:1091400018240879080D10190B0C003C09803920EF +:10915000BE20A92C0A301AB00D30010C0DBC4C6099 +:109160003C9C0FCC113C3D303009100E0A504D5044 +:1091700011303CB03D3C080108486B0001741800F8 +:109180000039383A601C20080800000408000C0C64 +:10919000003C0000003C000000010A000C000C0034 +:1091A0000038000808310006000008800400000CA8 +:1091B0001006000000500000000000003000300EDB +:1091C0000000000000000C00000E0000000006007F +:1091D000000000000000000000000000000000008F +:1091E00000000000000000000008808000008000F7 +:1091F00000000000002100004008000000020800FC +:10920000000000010D3A000000008080000228816B +:10921000008A004000401400000880320000000076 +:1092200068780C40400098B6200A0002023800001E +:1092300000000001303000B0502840008C30B408ED +:1092400010A20080800A35040032103005100000A2 +:109250000C860D82400C084490080804082824411C +:1092600040040002001C0236810410020D0C500163 +:1092700022441C0102014030200110300C28000063 +:1092800000100000080284A00C0000000000048010 +:10929000000001010030080000800080000600018D +:1092A00000300000000400810000000000011001F7 +:1092B0000000000100004000000800000000000065 +:1092C000000000000010000000000000000000008E +:1092D000000000040000000000000000000000008A +:1092E000000000000000000000000000000000007E +:1092F000000002000000000000000000000000402C +:1093000000001000120002000084804000080000ED +:10931000000C01000000000C009E0200000010087C +:10932000001C813C020C00100020000000201200F4 +:1093300000600000819012100000517E1004000CAB +:1093400000B220000000000D50A00070604020001E +:1093500030807201106400B0300A440200B4000092 +:1093600002A00000000C0E2000029101500101003B +:10937000008180190000000D0092040D30000000F3 +:1093800004015008080A00000A3C104000340000A4 +:1093900000AA000000400000000C0260023800003B +:1093A0000010021100000C0C00B00101003044302C +:1093B000040D000840B040000011001800014000FA +:1093C000000C800000004000000430000400004059 +:1093D00000000000010000000090000000010000FB +:1093E000000000000000000100000000000000007C +:1093F000000000000000000000000000000000006D +:10940000000000000000000000000000000000005C +:109410000008000000000000200000000000000024 +:10942000000C0000000000000000004008200000C8 +:109430000000000400200040010800001000180493 +:10944000002800100020002000082010000000006C +:109450007008004000A1200000080050A0A10200F8 +:109460000088010408000000300000000300C8016B +:1094700040201030002000C208080000000020003A +:109480000000000E08000800000800800020001006 +:10949000000810000800000010041880422000009E +:1094A0001020101208240400000000000800000032 +:1094B0000024000000200000000000000020000048 +:1094C0000000040084810000002000000020000053 +:1094D00000000040C2410020000000000004000025 +:1094E000040800000020000000000002002000002E +:1094F0000000000000000000000004000000000068 +:109500000000000000000000040000000000000057 +:10951000000000000000000000000000000000004B +:1095200000005F130707FFFFFFFF550F330F335591 +:109530000F335533330F0F5555335F130F03FFFFB1 +:10954000FFFF5F130F0305001D1554545F13FE004A +:109550003F15331133030B0F77FFFEFF0300FFFFAF +:10956000FFFF0F00DD50BBB03330FFFFFFFF0001F6 +:1095700051F353134F0B3F150500FF5555FFFCFFEB +:10958000FFFDFFEFFFEFFF35FF53FFFFFFFFFF334F +:1095900047444744FF47FF07DDFFFFFFFFFFFFFF93 +:1095A000FFFF550F0F330F330F557F75FFF5FFFF8B +:1095B000FFFFFFFF0F0FFFFFFFFFFFFF3333FFFF33 +:1095C0000F0FFFFF0F0FFFFFFF00FFFFFF00FFFF69 +:1095D000555533330F0FFFFFFFFFFFFF0F0FFFFF47 +:1095E000FF000F0F0F0FFF000F0FFFFF5555FFFF7D +:1095F000FF00FFFF333355555555FFFF0F0F333332 +:10960000FF000F0F0F0FFFFF3333FFFF5555FFFF15 +:109610003333FFFFFF00FFFF3333FFFF0F0FFFFF69 +:10962000FF0000000000000000000000000000003B +:1096300000000000000000201E0080240E0040807A +:109640008C2248808C2240808C2248808C220020F2 +:109650001E0080240E0000201E0000201E000000BE +:109660000C0000000C0000201E0090241E000020B2 +:109670001E0080240E0000201E0080241E00802476 +:109680000E0090040C0000201E0000201E000000B0 +:109690000C0000000C0000201E0000000C008024C4 +:1096A0000E0000000C0080040C0048000C208024F8 +:1096B0000E0080240E0040808C2248808C22800482 +:1096C0000C0080240E0000000C0080240E0000001E +:1096D0000C0000000C0000000C0000000C0000005A +:1096E0000C0000000C0000000C0080240E000000A4 +:1096F0000C0000000C0000000C0000000C0000003A +:109700000C0000000C0000000C0000000C00000029 +:109710000C0000000C0000000C0000000C00000019 +:109720000C0000000C0000000C0000000C00000009 +:109730000C0000000C000000000000000000000011 +:1097400000000000000000000000802402008024CF +:109750000200488000204880002048800020488087 +:1097600000200020120080240200802402008024B7 +:1097700002000000000080240200000000008004BD +:109780000000480000204800002000201200802433 +:10979000020090240200000000000000000080246D +:1097A000020000201200000000008024020080243B +:1097B000020000000000000000008004000080247F +:1097C00002000000000000000000488000204880E7 +:1097D000002080240200802402000000000000001D +:1097E0000000000000000000000000000000000079 +:1097F0000000000000000000000000000000000069 +:109800000000000000000000000000000000000058 +:109810000000000000000000000000000000000048 +:109820000000000000000000000000000000000038 +:109830000000000000000000000000000000000028 +:109840000000000000000000000000000000000018 +:10985000000000000C000000000000000000FFFFFE +:10986000FFFFFFFFFFFF7722AF051B1B5F0AAF055E +:1098700027272727F5053F153F00FFFFFFFFFFFFC5 +:10988000FFFFFFFFFFFF0F07AB00FFFFFFFF3F2AB8 +:1098900077007700333203471054111F444F3F15B0 +:1098A0005F00FFFFFFFFFFDFE5210C0CFFFD0B0F4B +:1098B000BFFFFFFFFFFFFCFF3000F7FFFFF7FFFFD9 +:1098C000FFFFFFFFFFFFFF7FFFF75F5F35303F3F89 +:1098D0005350FFFFFFFFFF1DFF1DF0FFFFFB77222F +:1098E000BB111B1B7722FFFFFFFFFFFFFFFFFFFFE7 +:1098F000FF00FFFFFF00FFFF0F0FFF000F0FFFF73D +:10990000FF7FFF000F0FFFFFFF00FFFF5555FFFF19 +:109910000F0F5555FF00FFF0FFBFFF000F0FFFFFB8 +:109920000F0FFFFF0F0FFFFF0F0F3333FF000F0F5E +:109930003333FFFFFF003333FF000F0F55550F0F79 +:109940003333FFFF0F0FFFFFFF00FFFFFF00FFFF9D +:109950003333FFFF0F0FFFFF3333FFFF0F0F000005 +:1099600000000000000000400C00000000000000AB +:109970000000B008140180288CD70000000000000F +:1099800000000000000000000000300014018028EA +:109990008CE450001401802804D73000100100002E +:1099A0008001700010018028004A80090000802892 +:1099B000004C040014018028084000390404802869 +:1099C00000640003100180280093020004000000DE +:1099D00024003000140100208C0100200000002031 +:1099E00000005200140100100040002900008028EF +:1099F00000C8000000000000000030391401802879 +:109A000024E7800900008008000A00000000000030 +:109A10000000000000000000000000000000000046 +:109A20000000000800008008000E00000000000098 +:109A30000000000000000000000000000000000026 +:109A40000000000000000000000000000000000016 +:109A50000000000000000000000000000000000006 +:109A600000000000000000000000000000000000F6 +:109A700000000000000000000000004000000000A6 +:109A8000000000000000D1202000000464870000D6 +:109A90000000000000000000000000000000C130D5 +:109AA000200000048C8BD120200000042C87400073 +:109AB000000000004001C02000000104008A802056 +:109AC00000000004008AC120200000046497C1281F +:109AD000A00001048C93C020000000044087110006 +:109AE0002000000004005120200000042C910028D8 +:109AF000000000040090512020000040C4C18028D4 +:109B000000000004008A0000000000000000D128CE +:109B100020000004449380000000000000020000C8 +:109B20000000000000000000000000000000000035 +:109B300000000000000080000000000000020000A3 +:109B40000000000000000000000000000000000015 +:109B50000000000000000000000000000000000005 +:109B600000000000000000000000000000000000F5 +:109B700000000000000000000000000000000000E5 +:109B800000000000000000000000000000000000D5 +:109B9000000000000000000000000040C300D341AE +:109BA0000040000000000002000000000000000073 +:109BB0000000C40345C3D7015740001301404703C9 +:109BC0008363130041500005404446030B22C01339 +:109BD000CA03004044000422440313D30123C323D7 +:109BE000022213E3B3CFC322C31013220140442245 +:109BF000D3410023C723D4004023020513C0C3016F +:109C0000C400000000000045E000138708C0030006 +:109C100000000300000044C0E2004000000000001B +:109C2000000003C043800013F3C100000000C00027 +:109C30000000010000000000000000000000C00063 +:109C4000000000000000000000000000030000030E +:109C500000000000000003000000000000002200DF +:109C6000000000000080000000000000A0000000D4 +:109C7000000010200000C0000000000000020400EE +:109C800000000000000000100000000000050000BF +:109C900000000000000001000800000000000000BB +:109CA0000000000000000000000000000000002094 +:109CB000840010210220000000000080000000004D +:109CC00000000000000002084028000100200040C1 +:109CD00041200401C02000004140200021400448F0 +:109CE00008021200020800200040000000080020C6 +:109CF00041001400050000020000180050000000A0 +:109D000041200000012104040404000009000400B3 +:109D10000020C0010808000200040020000000022A +:109D20000040400000000800C001024004010100A2 +:109D300000000000000041040902000000210000B2 +:109D400000481040000020008000000000000800D3 +:109D500000020100000000000000040000000000FC +:109D600008000008010000000000020200000000DE +:109D700000200200000000000004000008000400B1 +:109D800000000000000000000000010100000000D1 +:109D9000008000000000000000000000000004003F +:109DA0000000000000000000000020000000000093 +:109DB00000000000000000000000000000000000A3 +:109DC00000000000003001800200002350B4109A0F +:109DD000C11206032030528A210A0C030010019A96 +:109DE000020000047830008002300E001838801421 +:109DF0000A8818006000000009400E070030000AC1 +:109E000002000000183040BA017008001800001469 +:109E1000F01C0C0010398094020018900300800E92 +:109E2000C0B1000360480080020402000000122953 +:109E3000200400035810009A020002A001000E093D +:109E4000000016050052108001010000003A1500C4 +:109E50000000200000000000000000400100009E03 +:109E6000F2000C0000000006F000000000000000FE +:109E7000000000000000000B0000080000000006C9 +:109E8000200000000000001E200080000000000FE5 +:109E90000000000050008080020000000000000070 +:109EA00000010000000080004030000000000000C1 +:109EB0000040000000000000E01000000000000072 +:109EC000E0000000000000000000000000000000B2 +:109ED0000000000000004003003014C00400AE8009 +:109EE000013212002010800093B15444240130004C +:109EF000000014C304000010003000C00300B004D0 +:109F0000C04000530040A080610200C001782F00D3 +:109F100000104C570000700400400803007C0680CD +:109F20002301820600302D07E04200D101706E90BF +:109F300001000003C0E0800BE03E00D004400C00B4 +:109F4000C0000001A8E02C150000004100482300DB +:109F500000009400A0028E80C11002100064400432 +:109F600000B81440040008000300140000000000C2 +:109F70000000001000001C000800800E000000001F +:109F8000E0010000000000A0010014000500200016 +:109F900008000008080000000000000008000000A1 +:109FA000030000000000008000010001000020000C +:109FB00000000000E06400000000000700800004D2 +:109FC0000300000000000000000000000008000086 +:109FD0000000000000000000000000000000000081 +:109FE00004000000000000000000000400980000D1 +:109FF0000100040202204251350E60000440018835 +:10A0000040000104003001080100000000990060D8 +:10A010000024091020010005008080000D018085CA +:10A02000868800060D5090602800000820000080FF +:10A030000200C200860804004800201100024031DE +:10A04000024008000801000280000020108000503B +:10A0500000A10E0004030000480020180015802015 +:10A060000118088000003400900011002E014251B8 +:10A070001404002C00000810000000000400100070 +:10A08000000000000100000000001020000040015E +:10A09000001002000000000042000000000002006A +:10A0A00000004120000080010010000800000000B6 +:10A0B00000800000040000000010000044000000C8 +:10A0C0000100800000000000000000080000000007 +:10A0D0002000021004000000002001000000000029 +:10A0E0008000000000000000800000000000000070 +:10A0F00000000000000000000000000000008008D8 +:10A1000000B0306000000102C0002A0000080C0FFF +:10A11000084211412040181800000C80010000186E +:10A12000708800E001084213704000010078004888 +:10A130000000008305602708080000C445001008DF +:10A140006042000005300880600000090038820885 +:10A15000E00200C100180C4060000000B0E10014F3 +:10A160008038008001000C8000000200A038010847 +:10A1700000321000037408800000540600001C84A4 +:10A180002080140000080007003014400000000781 +:10A190000000080000000000E000000000000007D0 +:10A1A00000000003000000000000000000000008A4 +:10A1B00000001400E002020400000000000000089B +:10A1C0006000000000700000080000000000260091 +:10A1D000000000000000000F000000000008080858 +:10A1E0000000000000000000000000000000080067 +:10A1F0000000001000004603000000000000000006 +:10A20000000000000000000000000000000000004E +:10A210000000000500300000000086440031080006 +:10A2200000000080711010690ACA000400308040EC +:10A23000090000035009008002100807503800C6CA +:10A2400001100380F12C0000523806420000012565 +:10A25000500206036028003800B82290702D102AA2 +:10A26000209012071014008803142C40A500004011 +:10A27000A8E000031879008001000D2000001021E3 +:10A28000C0C20C07205001810B002810000090066E +:10A2900000004E8A810835000000000700F001C070 +:10A2A0000100400000000100000000000400000068 +:10A2B000000011000000000A004000000000000043 +:10A2C000C200000000004000000000000000000686 +:10A2D00000300005000100000000008000000000C8 +:10A2E0000040000000000000000008000000000026 +:10A2F00050102003000000000000000000000000DB +:10A3000000000000000000800300200000000000AA +:10A310000018000000000000000000000000804065 +:10A3200080414000044040820210808980841011E6 +:10A3300020042042002091000C24041400245151D8 +:10A340005008020050914909213152403111540204 +:10A350002421424010414202403122402C80990485 +:10A36000901C2202314190520022214894424A021C +:10A37000929A1944000054811210182290040C4142 +:10A3800018882880442252204284048012890804BC +:10A3900021122028488120393442820408000122F9 +:10A3A0000002028002200434200C08000082009485 +:10A3B0000900400051489011009C01248000900148 +:10A3C000000C00020901002400080000040008102D +:10A3D0000014540400000000000000200C000800DD +:10A3E000800018000100008200040000000000004E +:10A3F00000000002100004002000000044000040A3 +:10A400000000000400021000000000000000000036 +:10A41000000000000000000010000000000000002C +:10A420000204000000000000000000000000000026 +:10A430000000000000000C000000000009300008CF +:10A440000000101900040C09090D3D0A6CB97019BF +:10A45000505D1019309400400C2D083CBC30184061 +:10A46000092932BD306A000010006D066D14787144 +:10A470007C421C1830145110010D3D362C70B05C1C +:10A480000DB00C0038083802090C3806203A1800C4 +:10A4900019AA18062848380E591A1C3AB009B6509D +:10A4A00030ACB80D003000980C7E25383E00BE0D53 +:10A4B000BCB47C9A7E129DA03662B91E9EBC580E1A +:10A4C00079943C3958900A4D32683C0A990859A051 +:10A4D0000420197AB51C0C100C005D50100890BABD +:10A4E000001A7810353016000C059006005A060048 +:10A4F000201008650E05387E000000000C00B0003A +:10A500000C00000E41000D003000000000000206AB +:10A51000000000010D0000000000304000000000BD +:10A5200000000D0000900000000D00003000000051 +:10A53000007000000000000000000000000070003B +:10A540000000000000002230303C315040302E1C12 +:10A550000850B31810387E080E053B3840303C7068 +:10A5600008184C08003C28143670080231381CD8F2 +:10A57000091D013E0C5C2C5C8C3C883B4EAD208C54 +:10A580002A3D290A303218D93E041C801C1C1A1896 +:10A5900081341C00182CB8781D1C08386E7F3DAC27 +:10A5A0000C0E06043A08D4AC6A1EAA00189021B01A +:10A5B000382468005C2C7A0C28481A301A14961833 +:10A5C000181C1C6C0E5F5914008C0826FC1E043CE1 +:10A5D0000008005000398B1C580010003010210C6E +:10A5E00000140C043B80300C0A88018408080E100B +:10A5F00080500E000880000080002C0C010000003C +:10A600000050001088D00000200000000C00003036 +:10A6100001080000010060000000000400060800BE +:10A620000600060008000006060000040004000002 +:10A630000600000000000000000000000000000014 +:10A6400000000000000000000008060000000000FC +:10A6500000000000000000000000000001020000F7 +:10A6600000101000000000020000000000000000C8 +:10A6700080000C00000200001C0C020020020002FE +:10A6800000302000000080000028100400000008B6 +:10A69000181C1004401020000820000050000C007E +:10A6A00048280C0102700000811104000080100A8B +:10A6B00000308041013A0000010C010010007004DC +:10A6C00000A8024500004400022C0228608200001D +:10A6D000020001000038000800081C340230010AA2 +:10A6E000801800880588000000084488511C000874 +:10A6F00000080E0C000C000402080202008000009A +:10A70000003800800001200200000000020000026A +:10A710000C00000000300000000C020000000408E3 +:10A72000000000000000000200000000000C00001B +:10A730000000000000000000000100000000000018 +:10A740000000000004000005000000000000000000 +:10A7500000000000000000000000000000000000F9 +:10A7600000000000000000000000000000000000E9 +:10A77000020C00000080000000000000000000004B +:10A7800000000080300002000204000000020C0003 +:10A79000020C000C00B0804C080000000092000287 +:10A7A000003400000081200100888000018000004A +:10A7B000204000000182220808808000409C0000A8 +:10A7C0000000802120B030080095000100018401C4 +:10A7D0000005602140968409200021802821048002 +:10A7E000001C0001000100010080040000108241F3 +:10A7F000888004003090001C0E10000202123810F5 +:10A800007082000000020600000240010002080EF3 +:10A810000010000000824010000C8000003000009A +:10A820000800000C0000000000810000003204005D +:10A830000030010000800000000000000000000067 +:10A84000000200000000000000000000000C0000FA +:10A8500000000000003000000100000100000000C6 +:10A8600000000400000000000000000000000000E4 +:10A8700000000000000000000000000000000000D8 +:10A8800000000000000000000000100000000000B8 +:10A8900000000000000000000000000000000000B8 +:10A8A00018000000100000800020810404008200D5 +:10A8B000002010000024000A18003000000C0004E2 +:10A8C0000003000050088A00100020000000C22190 +:10A8D000006008000C8182B0302082000820000057 +:10A8E0001081A1C37C04822020842000280800203D +:10A8F00020300008144040020000000000880408D6 +:10A90000002800000040000A0828000C0008000091 +:10A9100000200C4A420081080C00000808000100D9 +:10A920000000000000000100000081002080000005 +:10A9300000200000000000000800040004000000E7 +:10A9400000200000846200080000000000000000F9 +:10A9500000000000000001000000000000000000F6 +:10A96000008000000000000000A000000000004087 +:10A9700000000000040004000000000000000000CF +:10A9800000000000000000000080000000000180C6 +:10A990000200000000000000000000000000FFFFB7 +:10A9A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB7 +:10A9B000FFFFFFFFFFFFFF7FFF0FFF7F57273F15C1 +:10A9C0003311FF00FF00555533335555FF00FF008D +:10A9D000555533330F0FFF000F0FFF0055555555D9 +:10A9E0000F0F3333AAAAFFFFFFFF770755113F155B +:10A9F0000F035F133F00FFFFFFFFFFFFFFEEDDFFD1 +:10AA0000FFEECFFFDDFFF3FFCFFFFFFCDDFFFFEE2B +:10AA1000EFEFDDFFDDFFFFEECFFFEFEFFFEEBBFF60 +:10AA2000AFFFFFFCFDFDFFFCFDFDF3FFCFFFFFFFD0 +:10AA300033333F3FFFFFFFFFFFFFBB110FFFFFFF60 +:10AA4000FF00FFFFFF00FFFF3333FFFF0F0F5555E0 +:10AA50005555FFFFFF0055550F0FFFFFFF00FFFF8C +:10AA60005555FFFFFF00FFFFFF00FFFFFF00FFFF47 +:10AA70000F0FFFFFFF00FFFFFF00FFFFFF00FFFFC3 +:10AA80005555FFFF0F0FFFFF55550F0FFF00555591 +:10AA90000F0FFFFFFF00FFFFFF000F0F333300001A +:10AAA00000000000000000000000000000000000A6 +:10AAB000000080240E0080240E0080240E008024DC +:10AAC0000E0080240E0080240E0000000C000020E8 +:10AAD0001E0000201E0048806CA94F806CB94F807A +:10AAE0006CB94F806CB94F806CB94F806CB94F8096 +:10AAF0006CB94F806CB94F806CB080240E00002080 +:10AB00001E0000201E0000201E0080240E00D8A47D +:10AB10007EA9DFA47EB9DFA47EB9DFA47EB9DFA45D +:10AB20007EB9DFA47EB9DFA47EB9DFA47EB9DFA43D +:10AB30007EB9DFA47EB9DFA47EB9DFA47EB9DFA42D +:10AB40007EB100000C0000000C0080240E00900577 +:10AB50000C0000000C0000000C0000000C000000C5 +:10AB60000C0000000C0000000C0000000C000000B5 +:10AB70000C0000000C0000000C0000000C000000A5 +:10AB80000C0000000C0000000C0000000C00000095 +:10AB90000C0000000C0000000C0000000C00000085 +:10ABA0000C0000000C0000000C0000000C00000075 +:10ABB0000C00000000000000000000000000000089 +:10ABC0000000000000008024020080240200802495 +:10ABD0000200002012000020120080240200000069 +:10ABE00000000020120048000020000000000020AB +:10ABF000120000201200002012000020120000208D +:10AC00001200002012000020120080240200002008 +:10AC10001200802402000020120000201200800494 +:10AC200000008024020000000000000000008024DA +:10AC300002008024020000000000000000008024C8 +:10AC40000200908460A84E8060B84E8060B0000022 +:10AC5000000000000000000000008024020000004E +:10AC600000000000000000000000000000000000E4 +:10AC700000000000000000000000000000000000D4 +:10AC800000000000000000000000000000000000C4 +:10AC900000000000000000000000000000000000B4 +:10ACA00000000000000000000000000000000000A4 +:10ACB0000000000000000000000000000000000094 +:10ACC0000000000000000000000000000000000084 +:10ACD0000C000000000000000000FFFFFFFFFFFF6E +:10ACE000FFFFFFFFFFFF5F13151577075F00FFFFF3 +:10ACF000FFFFFFFF5555FF77571B5455550554551A +:10AD00005F133F153F0077070F0377075F00770753 +:10AD10000F055F133F003F1501015F135F00FFFF49 +:10AD2000FFFF77073F00FFFFFFFF3F155F0077073B +:10AD30000300FFF3FFFCFFFFFFFFFF7FFFBF2222A7 +:10AD4000FF007777FFFFFF0FFFFF54541011FF0F35 +:10AD5000FFFFFF55FFFFFFF5FBFFFEFFFEFFFEFFBE +:10AD6000CCFFFFFFFF00FFFF3333FFFF3333777765 +:10AD7000FFFFFF003333FFFFFF00FFFF33330F0FF1 +:10AD80000F0F0F0FFF00FFFF0F0F3333FF00FFFF09 +:10AD9000FF00FFFF0F0FFFFF3333FFFF0F0F3333B2 +:10ADA0000F0FFFFF0F0FFF005555FFFFFF000F0FA5 +:10ADB0003333FFFF333333330F0F0F0FFF000F0F0A +:10ADC0000F0FFFFF0F0FFFFF33330F0FFF00FFFFCA +:10ADD0003333FFFFFF00FFFF0F0F000000000000F4 +:10ADE000000000000C0000000000000000005029DE +:10ADF00014018028C8CE033914018028ACD6B0389D +:10AE00001401802888E6000010018008002300005B +:10AE10000000002000900000140100004401000028 +:10AE20001401000000007000140100002000000068 +:10AE3000140100004000000014018028CCCF500015 +:10AE400014018028ACD73109140180288CE780399F +:10AE500000008028004C902814018028805400199C +:10AE600000008028006445190401802884A28028FD +:10AE7000000080280092802800008028008A50006E +:10AE800010010000000000130000802000100000EE +:10AE900000000000000000000000000000000000B2 +:10AEA00000000000000000000000000000000000A2 +:10AEB0000000000000000000000000000000000092 +:10AEC0000000000000000000000000000000000082 +:10AED0000000000000000000000000000000000072 +:10AEE0000000000000000000000000000000000062 +:10AEF0000000000000000040000000000000000012 +:10AF00000000D12820000004848BD12820000004F8 +:10AF10004487C128200000046493C00000000000A2 +:10AF20000803002000000004008041002000000011 +:10AF300084014100200000002C014100200000009D +:10AF400044014100200000008401C12020000004D1 +:10AF5000848BC120200000044487D12820000004F5 +:10AF60002C93802800000004008AD12820000004CF +:10AF700064878028000000040092D1282800000483 +:10AF80002C93802800000004008680280000000424 +:10AF9000008A400000000000080180280000001422 +:10AFA00000A20000000000000000000000000000FF +:10AFB0000000000000000000000000000000000091 +:10AFC0000000000000000000000000000000000081 +:10AFD0000000000000000000000000000000000071 +:10AFE0000000000000000000000000000000000061 +:10AFF0000000000000000000000000000000000051 +:10B000000000000000000000000000000000000040 +:10B0100000000000000000C801078340C3000003D7 +:10B0200000C3470000014443C3C300138003000072 +:10B0300000008002800000000040400044050080C5 +:10B0400003C08123200201800000C60080A303000A +:10B050004300C4010005030113C180130605C701A5 +:10B0600003C103C7C69300224723C40144000AD882 +:10B07000C3C3CBC103C3000003C0002044030100CD +:10B08000C341CB87D30300C000400008E00000EAC2 +:10B09000D2E3C8D3030700000040E00000030040F3 +:10B0A0000010C020E00010130104DB00800100400C +:10B0B0004522E300C20710000000000000800000ED +:10B0C000000001000408000000020700A0000000CA +:10B0D000000000000000100000000000010000005F +:10B0E0000000000000080000000000000000000058 +:10B0F000A00000000000000000200000C0000000D0 +:10B10000A004100000000000000000050000000086 +:10B110000008000000000000000000000000000027 +:10B120000400000000000000000000002000C0201B +:10B13000144001080021200080010028840C010037 +:10B1400080010002000082808200000400200500CF +:10B15000000000020420A00000804002200002083D +:10B1600080040400050000010000040100218000AB +:10B1700002040405212121200402004004400201B0 +:10B1800000000400210A0211410A004120100000C1 +:10B1900000804040842102021001001002200200C1 +:10B1A000400000008010002041000040002000000E +:10B1B00000080020004010000000000040000001D6 +:10B1C000800100202000200014000000000040004A +:10B1D00000040000000020000000000010800200B9 +:10B1E0000000040000000000000000000400000255 +:10B1F000200000000000000004000000000000002B +:10B20000000000000000000000000000000000003E +:10B210000100000000000000000000000000080025 +:10B22000000000001000000000000000000000000E +:10B23000000000000000000000000000000000000E +:10B2400000381000000000400080000030001800AE +:10B25000000021000000008228000000E47022A30A +:10B26000010000A4FB000E0550000080F300062042 +:10B2700000000000F0000C8000000004F0000C054D +:10B280000011000600000E0010389C0900480E84D2 +:10B2900001000040F205280000001C0A0000930A8B +:10B2A00000008016000000C0011000000860004788 +:10B2B000050000B602600E8411020040AAC838647E +:10B2C0000128002400010000000000400A4800009E +:10B2D0000078000001000C00600002000000000087 +:10B2E00000000000F001000000008080A2000005C6 +:10B2F00000000000000000050000001E00008000AB +:10B3000000000000200000000000000F000000000E +:10B31000000000000000000000000000F00000003D +:10B3200000008000F00200000000001E000000028B +:10B33000000000200000000000000000C01000001D +:10B3400000000000000000400000000000000000BD +:10B350000000000000B832000000000000102200D1 +:10B360000000200000000008000000002001008014 +:10B3700009704083010C00C0C1022020020280033A +:10B38000B000210502004007C0102100C8000007DE +:10B39000C0022000E00040010064200000420001E3 +:10B3A000007030A00800004F40B00800E0004003EB +:10B3B00000000285010000060000000000340000CB +:10B3C000E1006017200000D0A4601010803A004017 +:10B3D000E0400E04028040C1A1840600000000404D +:10B3E0000070000000000000006010001300080062 +:10B3F0000034000000000000E00020000000000712 +:10B400000A00208B00000000000000000000000087 +:10B4100000000003000040000800000008000000D9 +:10B420000000000000000000F0000000000000002C +:10B4300000006004000000070000000B0000000096 +:10B4400000002010000000030000000000000000C9 +:10B4500008080000000000000000000000000000DC +:10B460000000000000000000004024000000000078 +:10B47000010024000800800000344108000000C3DF +:10B4800024000000020A04890000008242004004F7 +:10B490000100008200100010210080004C08A00074 +:10B4A0000001800204044004001080040000C00079 +:10B4B00080210800000880046200C06000002400B1 +:10B4C0000011080800020000860100A400520820B4 +:10B4D00081910080080A28A04000000008460080F2 +:10B4E00094000004280000F4280100200000103817 +:10B4F0008002010000080100000000800040000000 +:10B5000004001000001000000000004000100000C7 +:10B5100020000000000008040400000000010004F6 +:10B5200000000000001000000200000000100000F9 +:10B530000000000000000200000000000000000009 +:10B5400002000000000000000000000000000000F9 +:10B5500000000000000000000000000000010200E8 +:10B56000000000400000000000000000000000009B +:10B570000000000000000000000000000030140087 +:10B58000000000A0092C10000000000000300D0099 +:10B590000000002882004080411810600200006610 +:10B5A000404212A00B000006C00001002800004825 +:10B5B00000000667020000C62900100200800C0689 +:10B5C000000000000000020600800098C0024083D6 +:10B5D000F16810000034020000002700000040C69F +:10B5E000C17000100028009005B00E000000008619 +:10B5F000010840A30300001150001800E30280037B +:10B60000010200840000008001800840100000005A +:10B61000C0000E006000010000700E00000000007D +:10B6200000000000600000000000000000000000BA +:10B630000000000802000000000000000000000000 +:10B6400000000000000000000808000703000000E0 +:10B65000008026000000000000080000E00100005B +:10B660000000000003000000000800A80000000027 +:10B6700000000000000000000000000000000000CA +:10B6800000000000000000000000000000000000BA +:10B6900000B41400000000C001001000D0010C0034 +:10B6A00000000C10000000842800000ADA150C804D +:10B6B00001008016203C01400000800000410EC0C7 +:10B6C0000100800EE4008CC001008000A400800016 +:10B6D0000010011E0000220070101C2000B00EE4BB +:10B6E000710000060890000000041400003806C035 +:10B6F000010000C605750C047034808001900C00B8 +:10B7000000008010080000000080008056380F0004 +:10B7100070000058090400241000000008B0004028 +:10B720005134000000020100000114000074010007 +:10B7300000000000004000000000000000000600C3 +:10B74000000000000070001000000000003000C089 +:10B75000010000000040000000000040A130402037 +:10B7600000000000001000C00100004000000000C8 +:10B770000000000000000020F000000000100000A9 +:10B780000000000000700000F000008003000000D6 +:10B790000000000000000000000004000040400025 +:10B7A000000C082101044821085001040801002070 +:10B7B000004180010000180820804028000400207B +:10B7C00010412042088040582051510481444000DB +:10B7D00000011024323251182194410124211429EE +:10B7E000414088440140449C185022341814482297 +:10B7F0004880281121218900415001440180800A9C +:10B80000914251228000318224410084000124228F +:10B8100001511421202981420484412222118122D4 +:10B82000805081911130292222401022118900106C +:10B830004C04821811800004592100215002003468 +:10B8400011012411190A0C81041420203001040173 +:10B8500010040401214900040100020A002104022D +:10B860000104012000040004440000001400000250 +:10B870004004000004040000200004404444004050 +:10B880000204200400040000140000000000000274 +:10B89000000000000202000804080000000C020082 +:10B8A0000000000000000000000000000000000098 +:10B8B000000000000008080D000908000C1004BE7C +:10B8C00000080C0E09040006585E187C509E5C08A7 +:10B8D00000390C0030909C09501D601C003238006B +:10B8E0000DBD90000000100010001C300E10799E5D +:10B8F000580839BC5D08B45D507E783808307C0546 +:10B9000028090CB49000640A740008100A205066DC +:10B91000B97D9CBC107A3C06B050180D0970900D92 +:10B92000B811B9B2AC341C56980499A014AD701A71 +:10B93000BE0A750E95309D3A1938081001093880F5 +:10B940002834AC350C0464381D0E80700000A590BE +:10B950001019041430627D1E38AC0C0000103069E0 +:10B96000300050700000BE20090C5D0000BA0008D5 +:10B9700059015000000000300080000A0000000063 +:10B980001E00000000000000006A600000000000CF +:10B9900040000000000000029E00000600000000C1 +:10B9A00000000400040000600000000C000C000017 +:10B9B000000800000000000000000000000000007F +:10B9C0000000004000101000000C001800003A08B1 +:10B9D0006030010C005D01100A2D0E0803000A0002 +:10B9E0000A30011000800110001C313C4A961A20D8 +:10B9F0003028297818201A4A000C7E183C391D007E +:10BA00000C3C2C0C1D1D083C2C3B1E30602A3D2894 +:10BA10007A201D1C0A04303D1A2636083110048095 +:10BA2000383E08306C3E0B5028201D1C2A7F3924DC +:10BA30003C0C008C01881C3C712D091803941C38A7 +:10BA4000813C2C982458100C1020283C04173C9C56 +:10BA50001C2E013C05900B003C093D0E04A0000487 +:10BA60000018063010CC0115040C140C740C0C30AA +:10BA70000808901030000804000808F814100E0898 +:10BA800000000000001C0804000800B08A00000C40 +:10BA9000085006000800060800080000080C000016 +:10BAA00036000830382800100C0C1A080004000674 +:10BAB0000C0000000000010801000000000400006C +:10BAC0000000000000000000000000000000000076 +:10BAD0000000000000000000000000000002000064 +:10BAE0008008020800000208001A0209020106008C +:10BAF00080180208001102194018020800080218F4 +:10BB000008510208000882990218020881008A1070 +:10BB1000811801180008021810928A001E28251C9E +:10BB20006130027202282208020000000838021C5C +:10BB300061801108024C002962480109008A02381C +:10BB40004678020801A8020D060441229028023816 +:10BB5000065802440D3822380200800582080D186C +:10BB600042480174084A0E0C02040E8802080208BA +:10BB70000E040D040140020C360812460A40020869 +:10BB800010880048124802080234010812380208DE +:10BB900041840244004902800230118401080008F7 +:10BBA000008C124A110901888584018812080080DE +:10BBB00002080200028002080200008400000088DF +:10BBC00000800080000000880200008100800200E8 +:10BBD0000200008000800088020000800000020057 +:10BBE0000000000000000000000000000000000055 +:10BBF000000C00800000080000000C000244080453 +:10BC000002040C000040088000940C4C2240080004 +:10BC100000920C400144080000020C6408800800F7 +:10BC200030301D4004400C4000080C4080440902A4 +:10BC300008788442308008520840884008520082C8 +:10BC400001A12C42003280800821088828002000B1 +:10BC5000081E080009000880009228040A023082A9 +:10BC6000888148000A80081240B0AC000800080231 +:10BC70000830044038100412481D08000A020A2047 +:10BC80000800080008124002043A28204A1008124E +:10BC9000483008010810001108120800088200004E +:10BCA00008B00800301208124032041048B00012E8 +:10BCB000000000000012081C100D001116124010A8 +:10BCC000080000104800082040100800080040113B +:10BCD00044300010001040104400001008004010D4 +:10BCE00040100800480040104010001008004010AC +:10BCF00040000800000000000000000000000000FC +:10BD0000000000000000000000080008000000081B +:10BD10000008000800000800000800480220A209EE +:10BD2000000800882020000800000008000000082B +:10BD3000010800484020000000080008000C00082E +:10BD400000000004382C8A011000004042088209DB +:10BD50008022000000A12000580200080000C40951 +:10BD6000100820280400001801180008100020CA3C +:10BD700000810000040000180008000008282018B6 +:10BD80000000040000280808880A00100C000808B9 +:10BD9000000000080008000808200800000420280F +:10BDA00000281000080000001C0800001000000817 +:10BDB000000000081028000800000000000000003B +:10BDC00000281000000800080000100830000000E3 +:10BDD0000000000810080000000800200000000813 +:10BDE000000000000420000800000000040000081B +:10BDF000000000000000000000000000000000083B +:10BE00000000000000000000000000000000000032 +:10BE100000000000000010810000DD1155330F33D9 +:10BE20003F0CFFFFFFFFFFFFFFFFFFFFFF7F3535E9 +:10BE30005F31FF7F5F31FFCCFF7FFFBFFFDFCF0AA6 +:10BE400013133F1505003F153F00FDFFFFFFF0FFF7 +:10BE5000FF1DF5310501FFFFFFFFFFFFFFFF505002 +:10BE60001B11AF053311F3511300FFFFFFFFFFFF5D +:10BE7000FFFFEEEEFDFF01003F3B0E0E77075F1365 +:10BE80000013FFFF3333FFFFFFFF330FDD11CF033D +:10BE90000F33ABBB00BBFFCCFF337722FFCCBB1112 +:10BEA00033FF0F33FFCC3F3FFFFFFFF0FF0F3F306B +:10BEB0005555CFCF3F3F1B1BFF00FF000F0F0F0F4C +:10BEC000FF00FF00FF00FFFF0F0FFFFFFF003333F6 +:10BED000FF000F0FFF00FF003333FFFF0F0FFFFFC7 +:10BEE000333333330F0F55550F0FFFFF0F0FFFFF86 +:10BEF00033331D1DCF03CF033F0CDD113F0C7744BF +:10BF0000474733330F0FFF003333FFFF5555555568 +:10BF10003333FFFF5555FFFF3333000000000001AE +:10BF20000000000000000000000000112000408020 +:10BF30008C2248808C2280240E0080240E00000079 +:10BF40000C0090241E0000201E0000000C000000C9 +:10BF50000C0090241E0000201E0000201E008024E3 +:10BF60000E0000000C0000201E0080240E00802423 +:10BF70000E0048000C2048201E2000201E008024B7 +:10BF80000E0080240E0000000C0000000C000020B9 +:10BF90001E0000201E0000000C0080240E004080C7 +:10BFA0008C2248808C22C8040C2000000C009005D4 +:10BFB0000C0090050C0090050C0000000C00000027 +:10BFC0000C0090050C0000000C0090050C00000017 +:10BFD0000C0000000C0000000C0000000C00000031 +:10BFE0000C0000000C0000000C0000000C00000021 +:10BFF0000C0000000C0000000C0000000C00000011 +:10C000000C0000000C0048808C2248808C22488064 +:10C010008C2248808C2200000C0000000C000000E4 +:10C020000C0000000C0000000C0000000C000000E0 +:10C0300000000408000010000000000000000000E4 +:10C040000000C884002048800020802402000020D6 +:10C05000120000000000482012208024020000008E +:10C0600000008024020000201200900400008024C0 +:10C070001200002012000020120000000000480002 +:10C080000020000000008024020000201200802414 +:10C090000200800400008024020000201200000042 +:10C0A0000000000000000020120080240200802414 +:10C0B00002004880002048800020900500000020F9 +:10C0C000120080240200900500009005000000008E +:10C0D00000000000000090050000000000000000CB +:10C0E0000000000000000000000000000000000050 +:10C0F0000000000000000000000000000000000040 +:10C10000000000000000000000000000000000002F +:10C11000000000000000000000004880002048806F +:10C120000020408000204880002000000000000027 +:10C1300000000000000000000000000000000000FF +:10C140000000000000000000000080000C00000063 +:10C150000000008000001B1B5F0A3535AF05FFFFA4 +:10C16000FFFF77070300FEFFFBFF7F7F0F08FFFF46 +:10C17000FFFFFF5F7F7FFFFFFFFFE2F3770D0F05FC +:10C1800011005F1307075F133F005F130101FF35C5 +:10C19000F757FF5F1F1FBF1FFF1BFFFFFFFF5F4C16 +:10C1A0001500FFFFFFFF77FFFFF7FFFFFFFF770798 +:10C1B000030001000323F707FD0077770301FFFF6A +:10C1C000FFFFFFFFFFFF3F30AF05F5055F503F0C5E +:10C1D000F5F5770711005F5FFFFF55333333AF0588 +:10C1E000BBBBFFFF3333F3F33F3F3F0CF3F333FFAE +:10C1F000FF33FFFFFF00FFFF0F0FFFFF3333FFFF92 +:10C200003333FFFF0F0FFFFF0F0FFFFF3333FFFF2E +:10C210000F0FFFFF0F0FFFFF0F0F55550F0F33339A +:10C220003333FFFFFF00FFFF0F0FFFFF3333535385 +:10C230005F505353535353535353F303F303FFFFCD +:10C240000F0F33330F0FFFFF0F0FFFFF3333FFFFCE +:10C250000F0FFFFFFF000000000000010000108032 +:10C260000C00000000000088000400000400000032 +:10C270000800383814018028A8D600001001800872 +:10C2800080240100040000200480010014018008C3 +:10C290000C03003014018028448B7000140100202E +:10C2A0000000800900008028000C70301001002080 +:10C2B00080507000050180280008D31214018028E6 +:10C2C0000C000200040000000C0000001001802897 +:10C2D00080E79008140180080020000000000000A2 +:10C2E000000072201C0100200C81700804018030C5 +:10C2F0001CC901200C0000300840700800018000BB +:10C30000800480080000800000240000000000007D +:10C31000000000000000000000000000000000001D +:10C32000000000000000000000000000000000000D +:10C3300000000000000000000000000000000000FD +:10C3400000000000000000000000000000000000ED +:10C3500000000000000000000000000000000000DD +:10C360000000000000000000000000000000008845 +:10C370000000004000B08000000000000022090022 +:10C38000200000008400C128200000044487C00071 +:10C390000000000008030320200000042490D100C6 +:10C3A00020000000C407C12820000004848B412025 +:10C3B000200000042C9180200000000400924028FE +:10C3C000000000044081C108200000048C03D168F3 +:10C3D0002000000484001100200000002400C02080 +:10C3E000000000040893D1002000000000020000BB +:10C3F0000000000000005121000000041C91D12821 +:10C400002800001084C311280000000024C0C000D0 +:10C410000800001008238000000000100002000047 +:10C42000000000000000000000000000000000000C +:10C4300000000000000000000000000000000000FC +:10C4400000000000000000000000000000000000EC +:10C4500000000000000000000000000000000000DC +:10C4600000000000000000000000000000000000CC +:10C47000000000000000000000000000000040007C +:10C480000000000040018000045000000000000097 +:10C490000000000000000200C00003C100400303D0 +:10C4A000C600008000C00083038002E34700A3A20F +:10C4B0004485018080E3C303C0008280C0801303F1 +:10C4C000D70001C0E240C42283C400C3000004229C +:10C4D000440000CD83CF4513E11300014440C41351 +:10C4E000C400001390C0C00347000040A000C40077 +:10C4F000040200800301220044000313C1C01300A2 +:10C50000C0230000000000000000000700008000C1 +:10C51000C100090003C3C3E3CBC300000000232014 +:10C52000E000000000101300C120000000000B001C +:10C5300000030000000040000000000000000000B8 +:10C5400001000000A00800200000000000004005DD +:10C5500000000000000000000000000000100000CB +:10C5600000000100000000000000000000000000CA +:10C5700000000000000000000000020000000005B4 +:10C58000000000000010000000000000002000007B +:10C590000004000000000000000010000400000083 +:10C5A00000000000000000000000020080002003E6 +:10C5B00002204008040000020010010A0982020261 +:10C5C000040040040404C00A8020880810C08402CB +:10C5D0008002010100C0200404202004A0200018D3 +:10C5E0000180000000000000A000200020000041A9 +:10C5F00000A0000000000200804010012000004068 +:10C6000040000001008000020241048000804000E0 +:10C61000500A0000120000000000000000000002AC +:10C6200010008000A0002000140AA00202210000D7 +:10C63000000040000000000000001000300000007A +:10C640000008080000800000000001000020000039 +:10C6500000000000200000000000000000000000BA +:10C6600000000100000000000000080000200000A1 +:10C67000000000000000200000200000000000007A +:10C6800000000000000000000000000000000200A8 +:10C69000400C000000000000000004080000000042 +:10C6A000000000000000000000000000000080000A +:10C6B00000000000180000000001400C003012BA19 +:10C6C0002230008000001000A0000E2078010080C1 +:10C6D000A364004501000000A260008464000080A3 +:10C6E000F2E02C0710000020F860128003001C0A02 +:10C6F000F040064302308018290008007008021636 +:10C70000006018046030002E026408000078740E87 +:10C7100000000C84A0000004F070080450008008A1 +:10C72000F1700000003400000200088000380E861E +:10C73000AA404C8A0100A89A023000822002408060 +:10C740000130060000001C00010000400100000A4A +:10C750003082170008000080020000000000000086 +:10C760000000000000000000E00000000000001ECB +:10C770000000000000000000201000000000000485 +:10C78000F048000050000000000000000000001E03 +:10C790000048000C0038100822400043A030CC189C +:10C7A0002645000000000018F0480000600000046A +:10C7B00000600000000000040070000000000000A5 +:10C7C000000200400010000000000000C0000C0546 +:10C7D00003B01461C27600A00000320000002F8078 +:10C7E000E1000000E0600007C00000C04C6440149D +:10C7F000D01000C00090081500120001C0F2200007 +:10C800006001006FC00A081700400C41A00322001D +:10C81000F0010000000020040002000100400F00B1 +:10C8200000004C0000002180E101C043C0326012D2 +:10C8300000010006010800000014001000006283DF +:10C84000037C5413A86A0102000000D334B4001022 +:10C85000083A1497051000000000000401100000C1 +:10C8600068009C0B2060062000001CE00210000005 +:10C8700000000008000000000000000000000000B0 +:10C880000000000000100000000040000808000048 +:10C8900000000000000000200000008005000000F3 +:10C8A0000000000000000E00007C1541204800A0A0 +:10C8B000C074164120400000000000C00400400287 +:10C8C0001000000000804022000000000000000076 +:10C8D00000000000200000000040000000000000F8 +:10C8E0000000900004461110200300800088000022 +:10C8F0008C0081308A12C0832820009400090080B7 +:10C9000008020082040C00F0080060100962004078 +:10C910001008010C8000C81040800F180800420069 +:10C9200045004000801000080002001C801100D269 +:10C93000002030000000410000002054850000204D +:10C940000160840044020026058800000080300059 +:10C950000000C00005001008104008800C040050C2 +:10C96000040000000804880002600400000008E8D9 +:10C9700000082068080110000000000000001000FE +:10C980000041000000000000000000000000004026 +:10C9900080000000000000000240000000000000D5 +:10C9A00002800000000000020000000040000000C3 +:10C9B000000000200000000000008208080282A29F +:10C9C0002818288100010004812400400000000094 +:10C9D00000800000000000020000000000000002D3 +:10C9E0000020000000000000000000000000000027 +:10C9F0001000000000000040601201C1014000E092 +:10CA0000033008002000020000000000A2000082A5 +:10CA100000100080E1780042103000802130029840 +:10CA200069028001A1681C80C0010001D0080208D1 +:10CA30000200144324002700E00114060000100047 +:10CA4000000040030094100000300C010000020AB6 +:10CA500067000004A26988C81400000328000000D1 +:10CA600000A8140000000010208036000034008070 +:10CA70000928010820E4008001100003211080A093 +:10CA80000000000401001C84018000400040A70D4C +:10CA90000002000000000008130000C004080800A5 +:10CAA000E00000C0050000000300000000080000D6 +:10CAB000000000000070400400000000E0021E08BA +:10CAC00020000000000000850400000000004083FA +:10CAD0007000CC01A0020E0B0A6C00D4007000089C +:10CAE0000000000000700080000000000000000056 +:10CAF000000000000000000000000000E000100046 +:10CB0000000000005000000000000880610400697F +:10CB10003292008000002900000002000000008026 +:10CB2000D339401A000300C0D91580A275000080D7 +:10CB30005181008461000007E89202A072001E008B +:10CB400000100803000040DE01000C006014F41621 +:10CB5000000822001035820A0060020000F0201652 +:10CB600000001080700100A042152C43510000DE2F +:10CB7000E16800000038000000000C04E0291441C6 +:10CB80000909088A0100000AB06000400340808063 +:10CB9000069901058002809E05000C842810004043 +:10CBA0000A040605200000000000002070000000BC +:10CBB00000102000040000800300001000000000AE +:10CBC0000210000D00000000020000000000000044 +:10CBD000000007000001000000000000000000004D +:10CBE0000000024473504E4831C00690053821962B +:10CBF00006000040010000000000002000000000CE +:10CC00000000000000000000000000000000000024 +:10CC100000010000000000800001400091000400BD +:10CC200000810400001C2031805000008000900032 +:10CC3000808C0000014080002141102000404240D3 +:10CC4000844A402A440080124090020410000441AB +:10CC5000211220048822840410810048340081417C +:10CC60002442800804820844389082803021204188 +:10CC70002931312C1C0084212940288100211052A7 +:10CC800002014992102121102A8920002184840167 +:10CC900090181900148208842009491844112404AA +:10CCA00044040011015110084982311A410040101A +:10CCB00020012000049001112101040C0C14010436 +:10CCC0000050040404010202880440011400000022 +:10CCD000001C0100000004000000410808004002A0 +:10CCE0000004000C01004140400180000004840069 +:10CCF00000800000800024008000800040040000CC +:10CD0000010481000001800000100000000000000C +:10CD100000000000000000000000440200000000CD +:10CD2000000000000000000100000000B000010051 +:10CD3000100D080E0000000100280036000EB04D56 +:10CD40002C0011BE09B470BD701D69005272308292 +:10CD500050795C0D040C0068000050390810510235 +:10CD6000000A8050193400B01C000A0C109904709D +:10CD700019BC8400187E00B03A5008B1181E953CCA +:10CD800014B1505C0C0010A810005D99B04A0C0A58 +:10CD9000BDBA303EB00AA8150D0E083E987C5DBDA8 +:10CDA0001A6E49292E0818B90D09287500180C1893 +:10CDB0002D3075AA89795010911C300C080C343C28 +:10CDC0007000B014000D59ADB0103210A25E0D28E5 +:10CDD0007C3C00B000000D0E0050009C0C00840054 +:10CDE0000000007E7008007A0000700902000D004B +:10CDF0000C000000000D000C05000000A0604000C9 +:10CE0000050000000000000000000000000A000112 +:10CE10000000000901B0047000000000B000000034 +:10CE20000000000180700000000000000000000011 +:10CE300000000000000000000000000000000030C2 +:10CE40000009100008024D0002180C00010C1E38E9 +:10CE500000000200B1001E0010140A0008963050B5 +:10CE6000181C000A011011303DBC11101060006840 +:10CE70001F11080850005C188C7D107C82341C7DCA +:10CE8000501C6B1E3071192DBD3C3050F0185E1CCB +:10CE9000201E108711183A2D201C1C38000A0C3453 +:10CEA000283A10380A384A340464183060143906B5 +:10CEB0002C14126094381C84300E08000C088E1854 +:10CEC00020802C06A00514080C0806080819000686 +:10CED00030B911000C0230031A7C1000080A8800D7 +:10CEE00000080CFC080D0C080A20080408080C595E +:10CEF0002E00310C0C0000000004080000000C00A3 +:10CF000000000C0000003000000C000C0400382071 +:10CF100020043000000C38007010000020003C603D +:10CF20001A001000300C00000C0439060004300018 +:10CF300000000000000000000000000000000000F1 +:10CF400000001C04000000000000000000000000C1 +:10CF5000000000000000000000000000080A0C00B3 +:10CF600040000C00000800040000020040008002A5 +:10CF70000818100020380C000912040100090C02E6 +:10CF800008229001008A000002102005200800807D +:10CF9000010000204031A200003908800036211431 +:10CFA000012092004000000052392C200041A202D2 +:10CFB0000D38901442428202A00C120C0100823102 +:10CFC0003C6C02044030811201A8808101280030AD +:10CFD000003000884005001E10092402008802006D +:10CFE0003038140C0C04000C01001CA00008103C8C +:10CFF000010800004009113001080002020402008B +:10D0000000000C000000010C3000000000040000D3 +:10D01000000000000008100000080080020400006A +:10D0200000000000000400000008000000000000F4 +:10D0300000000000000000000010100000000000D0 +:10D0400000000000000000000000000000000000E0 +:10D0500000080000000000000008000000000000C0 +:10D0600000000000000000000000000000000000C0 +:10D0700001040000000000000000000200000600A3 +:10D080000400000C0092000000800000048C0048A6 +:10D0900000440000058C5008003C000000B18109EC +:10D0A0001040018020000080004C8880008E110418 +:10D0B00000848C400C80944C2000008000B680409E +:10D0C000120C880100828041284C08008802440824 +:10D0D0000400080C42A108013088044E0C22003ED6 +:10D0E0000450080240B0001130020842003E800C9B +:10D0F00000400800409242000A0248020C0042A090 +:10D10000000000020C220000300C0C020C22000D6A +:10D11000480248002001000000044C0200100000FA +:10D12000000200002000000000200000003200107B +:10D13000080240000400000000024000000200005D +:10D14000000040000001000000000000008080009E +:10D15000040040000000000001004000000000004A +:10D16000000040000002000000004000000200003B +:10D1700000000000000000000000000000000000AF +:10D1800000000000000808000000890000080000FE +:10D1900000000000040082000C24910110080840E7 +:10D1A0000A000800000848110481004002080080BD +:10D1B00082610000300820003800000000000000FC +:10D1C0001000A10D0008008C4200810508088200B3 +:10D1D00010200800200000000804000000000000EB +:10D1E0000400000C0000001000000000000C000013 +:10D1F00003100000082804100020000000000400B4 +:10D20000102008C2000800000020000804000400EC +:10D21000002020000008101000200000000810105E +:10D22000002082010000000020000800000400002F +:10D2300010208100000000002000000000281000E5 +:10D2400000200000000000000400000000000000BA +:10D2500000000000000000000000000000000000CE +:10D2600000000000040000000000000000000000BA +:10D2700000000004000004000000000000000000A6 +:10D28000000000000000000000000000000000009E +:10D290000000000000007B7F59002277CCCC00FF0B +:10D2A000CCCCCCCC00FFAAAA00FFAAAACCCCAAAABC +:10D2B00000FFCCCCCCCCCCCC00FF00FFF0F000FFCA +:10D2C000AAAA00FF5555FFFF335555334747FF1FA7 +:10D2D000FF1FF53107005F130F01BFFFB7A55533DF +:10D2E0003355550F5533FF27FF1B7F3F7F3F0033DB +:10D2F000555DFFFFFFFFBB11CF03BB112727CF03F6 +:10D30000CF033F0CF5055F1303005F130500FFFF1C +:10D31000FF00CC0000FFAAAA00FF00FFF0F000FF12 +:10D32000CCCCAAAAAAAACCCCF0F000FFF0F0CCCCCE +:10D3300000FFAAAA3333FFFFFF000F0F55555555C5 +:10D340000F0FFF003333FFFF0F0F5555FF005555EB +:10D350005555FF00FF00FF0FFF7F33333333FFFFCF +:10D36000FF005555FF00FFFF5555FFFF33330F0FEB +:10D370000F0F0F0FFF000F0F0F0FFFFF3333FFFFD4 +:10D380000F0FFF003333FFFF55553333FF003333A7 +:10D390000F0FFFFF0F0F00000000008100000000D2 +:10D3A0000000000000000000000048001C20008079 +:10D3B0000C284E806CB84E806CB84E806CB84E8095 +:10D3C0006CB84E806CB84E806CB84E806CB84E8095 +:10D3D0006CB84E806CB84E806CB140808C22488016 +:10D3E0008C2200000C0000201E0000201E00000007 +:10D3F0000C0040808C2248808C2200000C00000031 +:10D400000C0000000C0080240E0040808C2248801C +:10D410008C2240808C2248808C2200201E0000201C +:10D420001E0000000C0000800C284E806CB84E805E +:10D430006CB84E806CB84E806CB84E806CB84E8024 +:10D440006CB84E806CB84E806CB100000C000000CF +:10D450000C0000000C0000000C0000000C0000009C +:10D460000C0000000C0000000C0000000C0000008C +:10D470000C0000000C0000000C0000000C0000007C +:10D480000C0000000C0000000C0000000C0000006C +:10D490000C0000000C0000000C0000000C0000005C +:10D4A0000C0000000C0000000C000000000004183C +:10D4B000200000000000000000000000000010003C +:10D4C00010000020120010001000100010001000CA +:10D4D00010008024020010001000100010008024B2 +:10D4E00002001000100000000000000000004800D2 +:10D4F00000001000100090241200000000008024A2 +:10D500000200000000004880002048000000902435 +:10D510001200002012000000000080240200488059 +:10D520000020488000204880002048800020000023 +:10D530000000000010009005000048201220802408 +:10D5400002009005000000000000900500000000AF +:10D5500000009005000000000000900500000000A1 +:10D5600000000000000000000000000000000000BB +:10D5700000000000000000000000000000000000AB +:10D58000000000000000000000000000000000009B +:10D59000000000000000000000000000000000008B +:10D5A000000000000000000000000000000000007B +:10D5B000000000000000000000000000000000006B +:10D5C00000000000000000000C000000000000004F +:10D5D000000077073F155F13010177075F13770797 +:10D5E00077073F157707FFFFFFFF5F133F157707AB +:10D5F0003F15FFFF990B5F135F13F7377F3BFFFF6B +:10D600000F0FFFFFFFFF0504050D1500050177074C +:10D610003F15FFFF33CC33CC3F15AAAABBBBFFFF9E +:10D62000FFFF11011500030103013F5F7F4FFFFF63 +:10D63000FFFFF30335355F50F303774447475F50EF +:10D64000F303FFFFFF551100FAFA7744AFAF313310 +:10D650003111FFFFFFFF1D1DAFAF55FFFF55CF037A +:10D660003333FFFF55553F0C1010FF00FF005F0ADA +:10D6700055553333FF00FFFF0F0FFFFF3333FFFF1D +:10D68000FF005555FF00333333330F0FFF00FFFF0B +:10D690000F0FFFFF3333FFFF5555FFFFFF003333FD +:10D6A0000F0F0F0FFF00555555555555FF00FF0043 +:10D6B000FF00FF003333FFFF0F0FFFFFFF00FFFFEF +:10D6C0000F0FFFFF33330F0F0F0F3333FF00FFFF39 +:10D6D0003333000000000081000000800C000000D7 +:10D6E000000000000000300014010020CCC0000049 +:10D6F00014010000C800400014010000A800000050 +:10D700001401000088000000140100000C0100005A +:10D7100000000000000000001001000000000200F6 +:10D7200004008008002008000400002028000000F9 +:10D730000000000000000B0014010000C00160099F +:10D740001001800880270000000000000000000099 +:10D75000000000000000F039100180288064030000 +:10D760001C0100000C015200040100008C0010009C +:10D770000001000080003000000100001000700077 +:10D780000001000010000000000000000000000088 +:10D790000000000000000000000000000000000089 +:10D7A0000000000000000000000000000000000079 +:10D7B0000000000000000000000000000000000069 +:10D7C0000000000000000000000000000000000059 +:10D7D0000000000000000000000000000000000049 +:10D7E0000000000000000000000000880000004071 +:10D7F00000000000000000000000412020000004A4 +:10D800002491410020000000840145002000000018 +:10D810000C014100200000002C014100200000000C +:10D820008C0100000000000000004000000000002B +:10D8300008019000200000000002012020000004E8 +:10D8400004880000000000000000400020000000EC +:10D850000001C400000000000803000000000000F8 +:10D8600000000000000000000000C02800000004CC +:10D8700008935100000000001C0151002800000026 +:10D880008C01400008000000080140000800000072 +:10D89000000140000800000000010000000000003E +:10D8A0000000000000000000000000000000000078 +:10D8B0000000000000000000000000000000000068 +:10D8C0000000000000000000000000000000000058 +:10D8D0000000000000000000000000000000000048 +:10D8E0000000000000000000000000000000000038 +:10D8F00000000000000000000000C0000000000068 +:10D90000400700000000000000000000000000C010 +:10D9100001E24403A02300C002DBC400C00100C038 +:10D920000013C001000000800080C403C80000E3B1 +:10D93000C3C88023CBC3000500000000000300C85B +:10D940000008C8008000002000C0C300400300227F +:10D95000C70D4722440000000000000000000080C6 +:10D9600000C1C0000023400100C0C002C01300007D +:10D970004000000000000000000000000000000067 +:10D9800008084400400100002000800083000003DC +:10D990000300A002CB201300A008000000034000F9 +:10D9A000048000130020010000034000C8000003B1 +:10D9B0000000010000000000000000000000000066 +:10D9C00000030400008000000000000000C0000010 +:10D9D0000020000000000000000000200000000007 +:10D9E00000000000C00000000002000000C00000B5 +:10D9F00000400000000000001005000000000000D2 +:10DA0000000004000000020000000000000400000C +:10DA10000000000000000000040000000000000002 +:10DA200000000020C00200012000082002000000C9 +:10DA300080010020000480010000000208040001B1 +:10DA400000000002C0008000400300000000000051 +:10DA500000800000000000008000004000218400E1 +:10DA6000030100024000400000000020040000000C +:10DA70000000000200218000000001410910018027 +:10DA80001000000001000000000000000000000085 +:10DA90000000000400000080050100000000880074 +:10DAA000C0000001400000800410000020001000B1 +:10DAB0000080010008040020000420100080010004 +:10DAC00000000080000420000000080000000000AA +:10DAD000000008000080000020040000000000009A +:10DAE00000400000000020000000000100000000D5 +:10DAF0000000000000000000010000002080000085 +:10DB00000040000000400400000008000004000085 +:10DB100000000000000400000000020000000004FB +:10DB200000000000000000000000200000000000D5 +:10DB3000000000000000068410000088337000A080 +:10DB400001008016010100040048000000700E80F2 +:10DB50000200002EE018008001000008E0018E00A5 +:10DB600000010036200000102880144000452843A2 +:10DB70002300001E5272204BD08100802268800456 +:10DB80007080484000400884710000003275280011 +:10DB90000000008A010002E229110086C9000CA0E1 +:10DBA0000038200E0405008378000000C00012A099 +:10DBB00000780008000000050000000050012E80E1 +:10DBC000600000800200004001000000100008001A +:10DBD000600000000010000000000000E0000000F5 +:10DBE0000000000000000000080000000000400BE2 +:10DBF0000000800020000000000000400200200023 +:10DC000070000000F00000000000800000100080A4 +:10DC100000000000000006000000000020000000DE +:10DC2000000000004048000000000000C0040000A8 +:10DC3000000000000000000058000000000100404B +:10DC4000000000000000000000005014000200C1AD +:10DC5000B178008000000006C07000100000000FC6 +:10DC600000082F0000000004E8720060033000C0CC +:10DC7000E1002C020000000400014087610814004C +:10DC80002038800B1200005744E002078008006033 +:10DC90000034001260080CE001004014F00100CFD5 +:10DCA00024380802000070C304000000229052567D +:10DCB000C84A108021B84C0000002E100800000057 +:10DCC000080000800000000000700000003000002C +:10DCD00020000E00D001000042000000000000E023 +:10DCE00030002100000000E030082000C0000000EB +:10DCF0000000001003000000000008000000000009 +:10DD000000000802000000070001000400000000FD +:10DD10000064080010000000000048000000000738 +:10DD2000000820800100000000001000000000003A +:10DD30000080220000000000080000050000000034 +:10DD4000B07020000000008005000000000000000E +:10DD5000A00000000000000000000000000010A86B +:10DD60000000C0F3000C5800030000816008700040 +:10DD70004020800402000104060000030008100097 +:10DD8000028800232004240000004000000000005E +:10DD900011200A4020042C40040180100240009011 +:10DDA0000E8200102100200040110800023062A8FD +:10DDB0008402C0D000004910003000C80000C1013A +:10DDC0000142030802088182B040111183000068FB +:10DDD000A001003101080080000040032A0C00442B +:10DDE00020880040040004000320001408000020E4 +:10DDF00001000001000400004100000000000000DC +:10DE000000010000800000000400000000820220E9 +:10DE10000200000400010200000000000080011860 +:10DE200000000000000200000000004000000200AE +:10DE30000000000000000000850000040000010058 +:10DE4000000000008000000000000000000401103D +:10DE500000000000200000000000000000000000A2 +:10DE60008000000000000000000000000000000032 +:10DE7000000012040F000044A0410000000000C692 +:10DE80000100010000004003000012000400000037 +:10DE9000C0002E002430000020311C000000400093 +:10DEA00000100020CA011400004080AD200240464E +:10DEB000506988086032004000090E0000421000DE +:10DEC00000001087800040C40011020800000C4CC4 +:10DED0000000060A67801568504006ABC34015C1B4 +:10DEE00050600002600000C0A892104007140006B5 +:10DEF000C00800002068000040310080030040C6D8 +:10DF0000010000A2E181000000710000008000001B +:10DF1000E00000000000001000000E0800000000FB +:10DF20000070000407000001000000000000000075 +:10DF300000780C08000000900900000008000000B4 +:10DF400000080000000000000000001800000006AB +:10DF500000080C080000000000000007000000009E +:10DF60000040080000000000000800A5600000005C +:10DF70000000000000000000E00050000000000071 +:10DF8000000000000000018401002C04C2012020D8 +:10DF900000000024043A0E000030008A02000080D5 +:10DFA000000000E411020000000100C8C1010C00E3 +:10DFB0000000000A0804004000005600D20202C51A +:10DFC0006500002A40142087200000C0C190000096 +:10DFD0006028B11004040C521300008A429A080011 +:10DFE000000001AE0A000C000038140A008006028E +:10DFF00070289488011C0083600000C6A1E00E40D8 +:10E0000001000006D20200C001280080438000E029 +:10E0100001000006000000C003100006C000000060 +:10E02000001000C051011000F0000080030001004A +:10E03000000000000000004001000000007000002F +:10E04000000000000010000400000080E6000080D6 +:10E05000000000800110000000000000B002000479 +:10E06000700000000010000C0000000000004000E4 +:10E0700000000000000000000000000000105E0032 +:10E08000040000000000000010000000000100007B +:10E090000000202000400000100800120080401006 +:10E0A0004001800220040000804000100030100079 +:10E0B00020402001101880419438814158300200DE +:10E0C00004000892344202228212220880923420F4 +:10E0D000408040802240485840542420829C99022D +:10E0E0002238524801248444200104004021448401 +:10E0F000104C01240001814000218C88201C440820 +:10E1000048801012121411210034048104400804C4 +:10E11000028222020010442C3800410134541008BD +:10E120004001240C848414212914048404215011F6 +:10E1300084000004104400190101200404020902B3 +:10E14000000404048800028400142004000A00046F +:10E15000040044000209540400024410220240005A +:10E1600000840101000044004044000040005104CC +:10E170000901040108010800014000100008200006 +:10E180000800000001040000001000000C0200085C +:10E190000002000000200400000000000000010058 +:10E1A0000000000000000000000D000D000C5936BA +:10E1B000091000300A0074090000005900B0041072 +:10E1C00009101009799D90063C0409020038084D99 +:10E1D0003800400270400C3A100000791D10009881 +:10E1E00078061000B0001C0D4D915C38501E64AED6 +:10E1F000091C384A7D181E5C00B00D900E3A591566 +:10E20000106200090A6C650E21A804520001A808DA +:10E21000910C5E08187A1D1830383EB00C20BA18E0 +:10E22000AC0A0C18101CBDB22C1D5170107EB9091F +:10E2300010101018517EA01C00B61000BC29090057 +:10E24000421E30300009A09E100C5238000070B001 +:10E25000500958B09D59700038000000003030005F +:10E26000099CA0000000800400081000000000329B +:10E270000000000400000002040080000000000014 +:10E2800000B0300000006000B8000C0004800019ED +:10E29000501800004C0D00A0100001000020004AA2 +:10E2A0008800000000B5000C00000006000000001F +:10E2B000000000000000100000003030703040000E +:10E2C00000000E5C0AB00006200C116C000000007B +:10E2D0000E200F00003060003A3016485B003038E6 +:10E2E0001030091810360C505C60501C0898803CA7 +:10E2F000B04C1870112C1C10303A9B203C10301080 +:10E300003E283D100030147414163C36FC340C1CAE +:10E3100010F80CE0A0383C3C50180C188E5D3D30D5 +:10E3200000382C003E54386090320069095D081DA9 +:10E3300001380C9D0D160EF98CB9180C81002808B7 +:10E34000004E3008083C0E80100C3C881838083C01 +:10E350003C78083848B8200C1800000C0E1D000C42 +:10E360000808100C080C0C08000C0C0CA050003C09 +:10E37000020CB05C0000000C0C060C010054380CC0 +:10E3800000081C001C041001003C080001000C00E7 +:10E3900010080E000E002C0C0C0C0808060C0000D7 +:10E3A0000D0000000080107000000050800400008C +:10E3B000000000000800000000000001001008003C +:10E3C00000000000000004000000B0000008000091 +:10E3D00000080000000200000C2000000000000007 +:10E3E0000000800100000001002800000010000073 +:10E3F000000200000018100440000000002808007F +:10E4000000302100002080300000000480080C044F +:10E41000800200000208A00048000004800820419B +:10E4200000048000001A1C00240080000008800CFA +:10E43000708020008138B000003200000C0C800099 +:10E4400050000000000001000000000A02380480B3 +:10E4500062100000000800B831384000000C208035 +:10E460004000008000082008000C000000080000A8 +:10E47000000000800000008080000000000000809C +:10E4800000000000000800000D0000000000000077 +:10E490000400000000040000200000000000010053 +:10E4A000000000000000000000300000000000003C +:10E4B0000000000000180000000000000000000044 +:10E4C000000000000000000000000000000000004C +:10E4D000000000000000000000000000000000003C +:10E4E0000040000000010000000C0040004000005F +:10E4F000000000400000000400000048006000012F +:10E5000000900000000400000092100520000000B0 +:10E5100000820100008080000080100000000000E8 +:10E520000002000218040000000290000100000038 +:10E530003002801C0001100000BA900002000000B0 +:10E54000000231007030800014227008008C00003E +:10E5500000423000600000000000000000000000E9 +:10E5600000B20230088000000032205044B1300078 +:10E570000021800C300000200022800100020002F7 +:10E5800000320000403000200001002002000000A6 +:10E590000000000020000000001200000602000041 +:10E5A00000000080020000000001000000000000E8 +:10E5B00000000000000004000000000000800000D7 +:10E5C00000000001010100008082008004000004BE +:10E5D000000000000000000000000000000000003B +:10E5E000000000210000000000000000000000000A +:10E5F0000000000000080000000000000000000013 +:10E6000008000400000000000000000000000400FA +:10E61000002800000020C00000000040522030040C +:10E620000008000080030400200800000000001023 +:10E630000000000808000800040000001000C000EE +:10E64000000000080000C0000000000000202800BA +:10E65000100000000000000800000020003002044C +:10E660000000000008000400008800001000000006 +:10E670000020000800A100005041000000202008F8 +:10E6800000200000002000040C0000008061000059 +:10E69000000000000020000020200000000000001A +:10E6A0000000000000000000200000000320000027 +:10E6B000000000000000000000000000000000005A +:10E6C00010000000200300400200040000000000D1 +:10E6D000002000000000000000000000000000001A +:10E6E0000400000400000000000000000000000022 +:10E6F00000000000000000200000000004000000F6 +:10E700000000000000000000000000000000000009 +:10E710000000000000805F0FF7075F5F5111FF7F6F +:10E7200015157F7F1511FF7F51110080008855015D +:10E730001505F3003F153F151100FFFFFFFF00AA6D +:10E74000111DACAF13003F2A3F15110103017F3F9C +:10E75000FF1FC3C3772FFFFFFFFFFDFD55DDFFFF49 +:10E76000FFFF7FFF0DDDFFEFBB0B3F0CCF031D1D38 +:10E7700047471300555577075155FFFFFFFFFFFF30 +:10E78000FF133F1503007F75F757FFFF3333FFFF7C +:10E79000FFFFFFF0FF0FFFFFFF0033330F0F333397 +:10E7A000FF00FFFF5555FFFF5555AF05330F0F33E2 +:10E7B000550F27271B1B1B1B7722FFFF5555333394 +:10E7C00055553333FF003333FF00FF000F0FFFFFBA +:10E7D000333355550F0FFFFF3333FFFF5555555555 +:10E7E000FF004747DD114747CF03CF0377441D1D87 +:10E7F000DD11FFFF3333FFFFFF00FFFF0F0F0F0F90 +:10E80000FF0033330F0F5555FF00FFFF3333FFFF7A +:10E810003333000000000000000000000000000092 +:10E8200000000000000048000C2048201E20482066 +:10E830001E2048201E2048201E2048201E200000A8 +:10E840000C0048000C2000001C0000201E0080244A +:10E850000E0000201E0000201E0090041C009024CA +:10E860001E0000000C0000000C0080240E00480078 +:10E870000C2080240E0000000C0000000C004880DA +:10E880000C2040800C2090040C0000201E008024EE +:10E890000E0000000C0000201E0000000C00000014 +:10E8A0000C0080240E0080040C0000000C0000000E +:10E8B0000C0000000C0000000C0000000C00488060 +:10E8C0008C2248808C2248808C2248808C22000038 +:10E8D0000C0000000C0000000C0000000C00000008 +:10E8E0000C0000000C0000000C0000000C000000F8 +:10E8F0000C0000000C0048808C2248808C2248804C +:10E900008C2248808C2200000C0000000C000000CB +:10E910000C0000000C0000000C0000000C000000C7 +:10E920000C0000000C0000000000000000000000CF +:10E93000000000000000000000000000000048008F +:10E94000102000000000000000000020120048001D +:10E9500000204800002000201200D8A472A8DEA4E5 +:10E9600072B8DEA472B8DEA472B8DEA472B8DEA4F7 +:10E9700072B8DEA472B8DEA472B8DEA472B8DEA4E7 +:10E9800072B8DEA472B8DEA472B8DEA472B8DEA4D7 +:10E9900072B8DEA472B8DEA472B0002012000020AB +:10E9A00012000000000000201200002012000000F1 +:10E9B00000000000000000000000000000009005C2 +:10E9C0000000000000000000000000000000000047 +:10E9D00000004880002048800020408000204880BF +:10E9E0000020000000000000000000000000000007 +:10E9F0000000000000000000000000000000000017 +:10EA00000000000000000000000048800020488056 +:10EA1000002040800020488000200000000000000E +:10EA200000000000000000000000000000000000E6 +:10EA300000000000000000000000000000000000D6 +:10EA4000000000000C000000000000000000FFFFBC +:10EA500000800F4FEE0005000F0000408000FF7F98 +:10EA6000770F8F000F0033003B08D5551B110000B6 +:10EA700050504444005544445050005500555050A7 +:10EA800044440C0CF0FF0055AAFFFAFA0C0CEEEE11 +:10EA9000FAFAAAFFAA0044440055FAFAAAFFAA000B +:10EAA000F0FFCC00AAFFCCFFF0FFAAFFCCFF770756 +:10EAB000EF0077070500EFFFDD00FE5407000E0FA3 +:10EAC0000700FFBFFF7FFFFF0F0F0F0F0F0FFF00AC +:10EAD000FF0055330F0FFF00FF55FFFF0F0F0F0F04 +:10EAE0003333FFFF33335533BB1177221B1B5533B1 +:10EAF0000F550F333355FFFF0F0FFFFFFF00FFFFD1 +:10EB000033335555FF00FFFF333333330F0FFFFF10 +:10EB10000F0FFFFF0F0FFF003333FF000F0F535393 +:10EB2000F505353535355353353535353F30FF002F +:10EB3000FF00FFFF0F0F33330F0F33330F0FFFFFB4 +:10EB40000F0F33330F0FFFFF0F0FFFFF0F0F0000EB +:10EB500000000000000000000C00000000000000A9 +:10EB600000008009100180088001802800008028B2 +:10EB7000000003080400802800003000100100009D +:10EB800000000009140180282483003D140180281E +:10EB90004441002014018028000A000014010020D4 +:10EBA000200000081401800440060009140100013F +:10EBB000CC05000014010000AC01000014010000AD +:10EBC0008C01700014018028CCE6000010010020A8 +:10EBD000C000001004000020284000080000800849 +:10EBE00000081020000100208090000000000000BC +:10EBF0000000000000000000000000000000000015 +:10EC00000000000000000000000000000000000004 +:10EC100000000000000000000000000000000000F4 +:10EC200000000000000000000000000000000000E4 +:10EC300000000000000000000000000000000000D4 +:10EC400000000000000000000000000000000000C4 +:10EC500000000000000000000000000000000000B4 +:10EC6000000000000000000000000040080000005C +:10EC700000000000000040000000000008018028A3 +:10EC80000000000400009128200000040000400063 +:10EC9000000000000000C120200000044497C120B3 +:10ECA0002000000884C1C108200000042C03410892 +:10ECB000200000044401C100200000008423C100A2 +:10ECC0002000400084234100200000004401410056 +:10ECD000200000002C01C1202000000424934028C3 +:10ECE00000000004000101282000000404908000BE +:10ECF0000000000000024028080000040881000015 +:10ED00000000000000000000000000000000000003 +:10ED100000000000000000000000000000000000F3 +:10ED200000000000000000000000000000000000E3 +:10ED300000000000000000000000000000000000D3 +:10ED400000000000000000000000000000000000C3 +:10ED500000000000000000000000000000000000B3 +:10ED600000000000000000000000000000000000A3 +:10ED70000000000000000000000000000000000093 +:10ED80000000000000000000000000810000800082 +:10ED9000000003C002504600040002C0000004232B +:10EDA00047000001808102058000408340CBC442BF +:10EDB00046430280F3C0C400000400A302C8C0435D +:10EDC000006200C0A380C8074407000300C0C4025B +:10EDD000801300C003C0C8008000008020C8C400A9 +:10EDE000C004000000C0C400C900000783C0C40004 +:10EDF00000000000470003108080C4000000C02213 +:10EE0000C40000030000C000000800070000000567 +:10EE1000F3020010000003000200000000000000E8 +:10EE200010000000000000000000000000000000D2 +:10EE300000000000000000100000000400000000BE +:10EE4000000000000040000500000000000001007C +:10EE500000000000000000000000000000000000B2 +:10EE6000000000000000000000000300000000009F +:10EE7000040000000000082000000000000400055D +:10EE80000000100000000000000000000000000072 +:10EE9000000000000000000000000000000000036F +:10EEA00000C0828000000240042004000280042090 +:10EEB0000240000004800001880302008000030378 +:10EEC000010100A002410482000202800000000251 +:10EED00005008048014000204002000000000008BA +:10EEE0000002008082000020080208008200000268 +:10EEF000000000008000000000020000400002044A +:10EF00008404008000000000200020008002000037 +:10EF100000000100000004080080108000000000D4 +:10EF20000010040000800000000002000200000049 +:10EF300000000000000000000000000000000000D1 +:10EF40000000000000000000000020200000000081 +:10EF50000000000000000000004000000000000071 +:10EF6000140020000000000000000000000000006D +:10EF7000000000000000000000000000000002008F +:10EF80000000080000000000000200000000000176 +:10EF90000000000000000000000000000000000071 +:10EFA0000000000000000000000000000000000061 +:10EFB00000008080510C008E031802822800801609 +:10EFC000E07808802828808EC505A8806002001897 +:10EFD000F14080006001008E034000802200120E8C +:10EFE0000000400450000080A74C1805700000800D +:10EFF000223040400000010E0200000200000080AC +:10F00000020042432801004E02081350520C008EA9 +:10F0100005340CCB61000000F0800E0000011420CC +:10F02000F00008A76000000E024800000000008EFB +:10F03000F2010C8001002000000000000000000030 +:10F04000E00000000000800000000E47008C284017 +:10F05000E2002E8379311486016200000001001E57 +:10F0600000000000000000000000000000000000A0 +:10F07000F000000B00000004206000807100000020 +:10F08000F000200478308C9AA6650000103928081A +:10F0900022400800000000002200000000000001E3 +:10F0A000F000000050000004F00000000000009E8E +:10F0B000413000000000000000000040000000009F +:10F0C0000000000000002C0268004010E000230354 +:10F0D00063000006E070C0A228800004C010082071 +:10F0E00062320000A14A0004F00000600238000013 +:10F0F000C002000000000012E0030087A300001B14 +:10F10000F0010000E56400240A0000E00000400275 +:10F1100002002CD0E0008203880000C005600200DD +:10F1200022003080013061871000000FA59230600E +:10F130002000000120800280700100940500000082 +:10F1400000005400E20021000800000000002C0034 +:10F1500000000060001040002000000700003E009A +:10F160006808000000050E83E17440602000400044 +:10F17000E2000000000000A00000000001600000AC +:10F180000000000000080000000000000000400235 +:10F190000800000000004212007400C3A060400399 +:10F1A000E37E144120482000000000100000000011 +:10F1B000000000000000000000000000050000004A +:10F1C000000000000000000000000000000000003F +:10F1D000000000000000000000002020C403000028 +:10F1E00008100011050300C43C0C14089200000232 +:10F1F00083122401110001A1020C000286000012FA +:10F20000404000001400000240200102060080047B +:10F2100028001000080040012D20000000004003DD +:10F2200003001001040041210C0042088600001276 +:10F23000004000087000241203200108250180000E +:10F2400000100900000008000C00C28680028052F5 +:10F250002840000000000200000000000020000024 +:10F260002201400000000001801801001000000091 +:10F270000000010C02011045140404140F044B009B +:10F280004128000004000000004000000000006071 +:10F29000004020000000000000000000000000020C +:10F2A00020024000400000000000804800021800DA +:10F2B00087208002068082A62C180400000000002F +:10F2C000200180400000000000000000400000021B +:10F2D000000100000000000021020000000000000A +:10F2E00000000000000000000000000000000020FE +:10F2F0000A001410401080CBF500010320003C04EC +:10F30000C0001407A0729C40070010C051400008C4 +:10F310000000008001381000C0000007E01C0C084D +:10F32000E00140060314C0022000000120409008C4 +:10F3300000000803000090000000100120000008F9 +:10F34000E00100160048102262001400C00007000F +:10F35000C8008087B54106C0C3010004200102C86F +:10F360008700008041800000000000000000804A0B +:10F37000000000C0400000080000000000000680FF +:10F38000070000000000072F824214062148001ADF +:10F390001230010B00080000000000000000060011 +:10F3A0000000000040080608000000C0050000083A +:10F3B00000000000000008000000000000080080BD +:10F3C00075800006080006A000722E56240000007A +:10F3D00000000000000040030002000000080008D8 +:10F3E0000800000000000000000000000000000015 +:10F3F000000000000000000000000000000000000D +:10F40000000000800000521A5216008361004C0078 +:10F4100002004C006001AD0102440C872D00008603 +:10F42000D7080007700000D0011500000001A81ED9 +:10F43000E01100025800008607380007A40000C849 +:10F44000053C00070000018AD201000500001248B7 +:10F45000D20000036000002052144003900014000A +:10F46000020206409000001AC06408E00100162164 +:10F4700040382EC71100800751E200000000010053 +:10F4800000000082000000800672000000000006FC +:10F49000001000000000000000000C472029560862 +:10F4A0002A4010C351140008A040000000000000D2 +:10F4B00000002000000000000012004003000000D7 +:10F4C000000000000000000000002000000000001C +:10F4D000001006825008A189021826C711380C9A1C +:10F4E0000230000000000000007008401100000021 +:10F4F000001000400000000000700000000000004C +:10F50000000000000000000000000000000080007B +:10F5100000000001002004040000024A8012408024 +:10F520000201000058404840221410403041503140 +:10F53000012A4041148240912140010204503922A5 +:10F54000209940408102508140042C408A00402292 +:10F5500001024200204484800C84021202524121A4 +:10F560008849204810810104844244242081894232 +:10F570000808002418818C0A080020008C9254048A +:10F58000002984048110910A888092124C8019828B +:10F590008050092081810244500821211140800CB3 +:10F5A00089200091018420202080800009020040F1 +:10F5B0004404840480121001010112000410041498 +:10F5C0001A0C040010908102421C10181410111023 +:10F5D00004801048140000024044000008000800A5 +:10F5E0000040002400200408400000000201000048 +:10F5F00000000000000010020000000008100000E1 +:10F600001800000000000080000000000000000062 +:10F6100000000004000000000002000000000000E4 +:10F62000000000000000080000000400000D0008B9 +:10F6300000290A79002000091800045EB03010008B +:10F640000C5A3C097E58004009202C140E51BD5024 +:10F65000001E3856701400BA58001A16A80E0C0A6C +:10F660000869B136505AA9050178B90008000D3073 +:10F670002C187D5A00080C0C0C000809040A8D0C8B +:10F6800061A80C0EA8A4982538A0085CA07D7E0275 +:10F690005C3A190C0EBC0C19081A11480C703E1873 +:10F6A0000C5A38995D3DBC55281AA00E1954B0105B +:10F6B000100E080870B0523D05B0000D5530002006 +:10F6C000180009B00001000901391050500910B0AC +:10F6D000053170102C5C100030101071321C301885 +:10F6E0003020301D090010080C301020001010369A +:10F6F0001C001830400060300200500C0400000074 +:10F70000000000000450900C300A100920800830DE +:10F710003C2050002C00015000004000800000A060 +:10F7200000000000000000000000000000000000D9 +:10F730000000000000001000000A010800300D0C5D +:10F74000000004303050203008FC0A8030202010A7 +:10F750000458000A311C3F1C6C3C1018008CB7394F +:10F760001836080000201C3C003830000D080EAC94 +:10F7700021081C001C501A9C5C0810563E2D1C00D1 +:10F780006C840400D12918382A383F3001040D7CDC +:10F790003D381C1D363D143C00525F9C401C1C48EB +:10F7A0006602105A000C18796A1C19CC3D5E2C08B0 +:10F7B00000071C6D3C3E68383A0E083685B47C283C +:10F7C0003A4A10B0581A3108183A5A3408083636EE +:10F7D0000AB03A808C0842161848388802080E0889 +:10F7E0000888080008060C580C088C0006309C0C91 +:10F7F000AC0800000C0E08000C2E00200D808E8836 +:10F80000309480FA8000D0D00000009C5010085046 +:10F810003B000A000C000000010000018000000015 +:10F82000800001D0800000000000000000000020E7 +:10F83000000E0000000000000000000800000000B2 +:10F840000008000000000000000000000000400070 +:10F850000000002040020000000000304000400492 +:10F86000400082004000000000388002400200009A +:10F870000010000020008038012800018100800174 +:10F88000012C041000000008800080000002804C61 +:10F890000001403400080000003D8004000080307A +:10F8A00081304010400004080138020D00B8801873 +:10F8B000001C02300229000800084000800A82482B +:10F8C00001488000200100080E1800102118008A4D +:10F8D0000008110C02000108002002091028008510 +:10F8E0000008020C013000190108020040000180EC +:10F8F000009C00280C90000800080000023C000C4E +:10F900000030008C00040000000C020C000011000C +:10F910001C08001000440020008C100004800080AF +:10F920003004000000800000000000000030008073 +:10F9300000000000000000000000000000000000C7 +:10F9400000000000000004000000000000000000B3 +:10F95000000000010000000000080000000000009E +:10F960000000000000000040200C000000000040EB +:10F970002000200100003400201000000082100C44 +:10F980000004000010918000000000410480000885 +:10F99000144000050C8102402000000010003000DF +:10F9A00000060092000C304200010000004D70067D +:10F9B0000000004014801040200001080CA208063E +:10F9C000009030400072080C08400000000238002F +:10F9D000080C38100C101000093D0040089200403F +:10F9E0000C4000A0003240004800040100200C043C +:10F9F00040780022400208220090004C00020800DB +:10FA000000300C2000920080025000000002000034 +:10FA100008020002008000300020000000010C02FB +:10FA200040000C0040020044000100400032400051 +:10FA30000110001040010000003000000000000034 +:10FA400004000010000000000000000000000001A1 +:10FA5000040084000000000000000100000000011C +:10FA6000000000000000000800000000000200008C +:10FA70000000000000000000000000000000000086 +:10FA80000000004202000000000000000020000012 +:10FA9000000001C1000082002020C0001000820090 +:10FAA0000008820000000020000000002000000884 +:10FAB0000000000000000000000000020200000042 +:10FAC0000000010500000000000000040800000C18 +:10FAD000002000000008040A10200014000800089C +:10FAE0000400040004080008000800001420820834 +:10FAF0000820000010490008002000080000000055 +:10FB00000030000820AC0000000000206020000849 +:10FB1000000000004020000000000008000800086D +:10FB200000000000001000000000000C002C00008D +:10FB300000040040060010002800810400000000BE +:10FB400000000000000000000000000000000100B4 +:10FB50000000000004100000000000000008000089 +:10FB60000000000004000400000000000400000089 +:10FB7000004100000400008002008200000000003C +:10FB80000000000000000000000010010000808064 +:10FB9000FF7FD7079F13030137040101FEFFFF7F9B +:10FBA0005F33FF3FDF55040000010400FF010743FE +:10FBB0000641FDFFCCC800010011BBBB000880FF5F +:10FBC00015115500FFEFAA80AA20FF5FFF1F884490 +:10FBD0002A20F444FF82CCFF0BFF0B003323F5FFF8 +:10FBE000DFFF0201FC5453535F5033037707BBF030 +:10FBF000FF0FDFFFFF7707030700FFFFFEFFFFFF99 +:10FC0000FFFFFFFFFFFFFFFFFFFFFFFFFFFF555558 +:10FC100055553333FF00FFFF5555FFFFFFFFFFFF33 +:10FC20003333FFFFFF00FFFF0F0FFFFF3333FFFFF3 +:10FC3000FFFFFFFFFF00FFFFFF000F0FFF00FFFFB1 +:10FC4000FFFF0F0FFF00FFFFFF00FFFFFFFF0F0F82 +:10FC50000F0FFFFF3333FFFF3333FFFF5555FFFF18 +:10FC60003333FF003333FFFF555555553333FF0012 +:10FC70003333FFFF3333FFFF0F0F33330F0FFFFF1C +:10FC80003333FFFF3333FFFF5555FFFFFF00000005 +:10FC90000000000000000000004000000000000123 +:10FCA000000000000C0090241E0000201E00000038 +:10FCB0000C0000201E0000000C0048000C2000007A +:10FCC0000C0000000C0000000C0000000C00800480 +:10FCD0000C0000201E0000000C0048000C209004C6 +:10FCE0000C0000000C0000000C0000201E00002092 +:10FCF0001E0000000C0000000C0000000C000020A2 +:10FD00001E0080040C0000000C0090241E008024C3 +:10FD10000E0080240E0080240E0080240E0080241B +:10FD20000E0000000C0000000C0000000C008024FD +:10FD30000E0000000C0000000C0000000C00000091 +:10FD40000C0080240E0000000C0000000C000000DD +:10FD50000C0080240E0000000C0000000C00802429 +:10FD60000E0000000C0000000C0000000C00000061 +:10FD70000C0000000C0000000C0000000C00000053 +:10FD80000C0000000C0000000C0000000C00000043 +:10FD90000C0000000C0000000C0000000C00000033 +:10FDA0000C00000000000000000000000000000047 +:10FDB00000000000200048201220482012200000EF +:10FDC0000000002012004800002000000000000099 +:10FDD0000000000000000000000000000000000023 +:10FDE0000000000000000000000000000000000013 +:10FDF000000090240200480000200000000048009D +:10FE000000200000000080240200480000200020A4 +:10FE10001200000000008024020080240200002064 +:10FE2000120000000000002012000000000000206E +:10FE30001200002012008024020080240200000032 +:10FE400000000000000000000000000000000000B2 +:10FE500000000000000000000000000000000000A2 +:10FE60000000000000000000000000000000000092 +:10FE700000008024020000000000000000000000DC +:10FE80000000000000000000000000000000000072 +:10FE90000000000000000000000000000000000062 +:10FEA0000000000000000000000000000000000052 +:10FEB0000000000000000000000000000000000042 +:10FEC0000C000000000000000640BFBF55055F5F4A +:10FED000F3040301FF7F11105F1B008000005F002F +:10FEE0005F5F050000805B5BE7FD172004440FFFA8 +:10FEF000000AFFDFFF3F0F00FEFF3300840084A5F0 +:10FF000000034300DFFF03233F1553537777F74781 +:10FF1000FBFF9DFF77FFFEFF0060FFFFFFFFEFFF8E +:10FF2000FFBF8CDC3F15BFFFEFFFFFFFFFFFFFFFB1 +:10FF3000FFFF5F1357005551770707050700FFFFC5 +:10FF400055555F13570057000301FFFFFFFFFFFFE9 +:10FF5000FFFFFFFF0F0FFFF7FFFBFF00FF005555EF +:10FF60000F0FCFCF3F3F0F0F555533330F0FFFFF0D +:10FF7000FF000F0FFF00FF000F0FFFFF5555FFFFA2 +:10FF8000FF00FF005555FFFFFFFF33330F0F3333E3 +:10FF90000F0FFFFF0F0F3333FF00FF00FF00FFFFC6 +:10FFA00055555555FF000F0F0F0FFFFF3333FFFF60 +:10FFB0003333FFFF3333FFFF0F0FFFFF5555FFFFB5 +:10FFC0003333FFFF3333FFFF0F0F0000000000004B +:10FFD000000000400C300000000000110006510934 +:10FFE00014018008000050301001002000000020A3 +:10FFF00000000020000000000000000000000000E1 +:020000040001F9 +:10000000000000000000000900008008000A000055 +:1000100000000020008000001001800800000000A7 +:10002000000000000000000000008028000E080012 +:100030000400000004000000040080082C06660094 +:100040001401002000808008040080280840802DD2 +:100050000400802828408010140180288822600035 +:1000600014010000E4018001000080080006000087 +:100070000000000000000000000000000000001070 +:1000800000000020005000000000000000000010F0 +:10009000000000200080F00910018008000300002B +:1000A0000000000000000000000000000000000050 +:1000B0000000000000000000000000000000000040 +:1000C0000000000000000000000000000000000030 +:1000D0000000000000000000000000000000000020 +:1000E00000000000000000400000000000000000D0 +:1000F00000221000200000000000000800000004A2 +:1001000000000028000000040000000000000000C3 +:10011000000000000000000000008000000000005F +:1001200000020020000000040088C0000000000061 +:1001300040070000000000000000802000000004D4 +:10014000008A01002000000024008100200000003F +:1001500004064924200000040088812020000004B7 +:1001600084888120200000040496C1382000000407 +:100170002C8B7100200000000401801000000000A2 +:100180000006000000000000000000000000000069 +:1001900000000024000000040080000000000000B7 +:1001A00000000028000000040090C00000000000D3 +:1001B00040070000000000000000000000000000F8 +:1001C000000000000000000000000000000000002F +:1001D000000000000000000000000000000000001F +:1001E000000000000000000000000000000000000F +:1001F00000000000000000000000000000380000C7 +:1002000000000000000000E3C1C0000100C24683FE +:1002100001014601A0010840004444404408000098 +:100220000000D000C100000200100400C000C003A4 +:100230000083000000002300000444000A0004C101 +:100240008180B31383C800800020400010000000AC +:100250004400420044000000C6C20705C74000C079 +:100260000020C02000C0031383A00300C74001008A +:10027000C200C007C4070022C0C50022C32303A3D5 +:100280000140C707000043001380132381000300CF +:1002900000000020C00001000400000000C00003B6 +:1002A00003000000000003004440A200E000100032 +:1002B000A0030000000003074405E0220000030043 +:1002C00083CB0100C8000000000000000300000014 +:1002D000008000200010010000000000000000105D +:1002E00000C000000100000000000010000000003D +:1002F00000000000000000100000A000000000004E +:1003000000000000000000000000000000000000ED +:100310000008000000000100000000205010010152 +:1003200003900484C001040100010040002000206B +:1003300000000004002001002100008000000000F7 +:1003400001080184500C040040000200002000005D +:1003500004010011C002000088000004080201002E +:100360000000000102C005C002C00000028240007F +:100370000448C0200204410001202000A0045000D5 +:100380002040208014821000400200001220010052 +:1003900030000802412008000280410010020000E5 +:1003A000C000080002020000120020000000000847 +:1003B0000040008002000000000020000020040037 +:1003C000000000000080000000002000002000006D +:1003D00000000200880840800000080000000000C3 +:1003E00002000000000400000000200000000008DF +:1003F0000400000000400000200004000000000095 +:1004000000000000000400000400000000000000E4 +:1004100000000000000000000000000000000000DC +:100420000000000000500000000000000000001765 +:1004300060308086C375084D2B0000B0F3480685F8 +:10044000010280C0A70482037800006931CAAE842B +:10045000290100602AF000C76100008AF28002646E +:1004600072000080F360988461000000C21A8082EC +:100470002800008017408CA095000080FB6000E5FC +:1004800021710080A1400EC30500000EF47000032E +:100490009038140008104863020100E1C3700200A4 +:1004A00000000C0A00000E8000001008F00100049B +:1004B000007A00000000004000004006C00002007A +:1004C000000000C0A30000000000000000100000B9 +:1004D000000010000000008001000020F00000007B +:1004E00000000E0000000600000C400000000000AC +:1004F0000000001A20600000000000DE03000E0073 +:10050000000000000130000060000000F011000059 +:10051000000000800230000000000000A000000089 +:100520000000000002300000000000002000000079 +:1005300000000000000000000000000000000000BB +:10054000F0000C85800040D40D786620630100C463 +:100550004402810080310041A8322383030000C49B +:1005600021101EC4E5000049284A7017DB0010D88E +:10057000A4C261801101004820002084E903805E4C +:10058000440000A3E30C0000C13C23C4213C8006CE +:10059000A1844002C0320000A842C0028200800054 +:1005A000C1180000C0B8004000342082E0000C07F1 +:1005B000A00820000000C100000021000000320758 +:1005C0002000400000380000006400250A005000B0 +:1005D000C0002000000000000000000000008008B3 +:1005E00000080000030002000000200000000003DB +:1005F00000000000030000000000100000000C00DC +:100600000000000000000000008000A0C00000000A +:100610000000200000000000008020051000000005 +:10062000E008000000000000028000000000000060 +:1006300008100000000000100080400000000000D2 +:1006400000000000000000000000000000000000AA +:100650000000000000001014D818004040104800AE +:1006600000000080400800180100000400020101A1 +:100670008C01402000008003000000040080090875 +:100680000C01824000000004080000F0082001294D +:100690002610005520802084280180800800816079 +:1006A000000200810804000CA38800C000283C025E +:1006B00005020007480C00010065081000062C0127 +:1006C0000A001021C8004000000002041000208031 +:1006D0000600810304000004002400000000001054 +:1006E000000000002800040000000000200120009D +:1006F000000000004800800004000002000100002B +:1007000001000000020000000400000100000000E1 +:1007100000000001000080000000000080000000D8 +:1007200002010000000004000000008040000010F2 +:100730000000000000000000000000100000002089 +:1007400000000000000800000000000000000000A1 +:100750000000000080100000000000000000000009 +:100760000000000000000000000050922000000483 +:1007700040102C88E50300D0C1081007F0000004E9 +:10078000E51A8C0B0A00424020480802800000D382 +:1007900004690C8063000004010898C8200000C0B0 +:1007A000D0B4078764020146A0620F449000001491 +:1007B000A8680227120000C4040B0008E32800C048 +:1007C00044080EE213000006D240800800120080A8 +:1007D00003480C0760002C16C080100000001406AF +:1007E00000001280000081030001000000300000C2 +:1007F000000800C007000000D00100000000000059 +:10080000E0021207000000000000000000000000ED +:1008100000000000000200000008000000020000CC +:1008200000080000008030100000004800000000B8 +:1008300000000000000000000000000000000000B8 +:10084000000000000000000400002E00040000C0B2 +:1008500001002E0460000000000000A0000000085D +:1008600000000E000000000000000000000000007A +:10087000000000000008000000000000000000026E +:10088000040000344215064A630000B807128605CA +:10089000540000C05190008314000CCA59C2830256 +:1008A0006C00008742100C03000100205A102CC776 +:1008B0000101001600600E0710001008D2684E40BB +:1008C000510000B8A9920280500000EAC1100094C3 +:1008D0007000000012928C4251000084A33800077F +:1008E000101000800310884F000100200A112C0016 +:1008F0000000701000000CD001000000A0000000FB +:1009000000300000001000C001000100C000000025 +:100910000000000000004200000000000000020093 +:1009200000000E0000700000600000800110000058 +:1009300060000E0A001000000030008A01000C8FD9 +:1009400001000000000000C00100000000000000E5 +:1009500000000000E08000000000800000000000B7 +:100960000000000000000000000100000000000086 +:10097000000000080000010000000000004000002E +:10098000000000000000000000400C00100100000A +:1009900004088041000881408001840A420C004222 +:1009A00088411840004080000A11041210040220FF +:1009B00088015402340821412459402141448001D6 +:1009C00022400200824042904052248420282091FC +:1009D00028422080302044500110212C54393841C5 +:1009E0002041810280182004044A808220212002B4 +:1009F0000022828110212050812181040152004473 +:100A00000C54001104491480504400010091042149 +:100A100092044100810020242C010401001491441F +:100A2000144412000144040404024001000401249F +:100A30009420110A00041401190200042028100C4B +:100A40002192100C11040901010404000000440467 +:100A500040040000400400011010002404000100C4 +:100A60002000800012082000000804002000080078 +:100A700000001000200000000000000000490000FD +:100A80000002000000040000000000000000000060 +:100A900000000000000001000000000000800800CD +:100AA00020000000000C0C0600040009000D6C6C16 +:100AB000000CB0000C60340D00002009002900106B +:100AC0002D090D040C00100820089808901C2844DB +:100AD0000040606000BA2D7DBC11B01E0E1A005A95 +:100AE000A05C0932400A0480200132308D283A0C83 +:100AF000301818B400780956023C0D107D2CAEB6A3 +:100B0000B01025A424A028022E1615389E0EB596E6 +:100B10000D0C9E020019040A0D343D90107CB07635 +:100B20005E310CA1087A8820188E9000A82E005DF6 +:100B3000013110301DB018B900300005000000026E +:100B4000100DB0A010093078407D1039080D00005C +:100B50005034169C90101C28300C6C00800920002A +:100B6000000060BA008070000001A9001020200E73 +:100B7000040000B00010500E28080000500C0000C7 +:100B8000000908000C0D3800008000051D200C0035 +:100B9000000880010000B030400036000000000076 +:100BA0000100600A000000000000000000000000DA +:100BB00000000050000800000000113C42003C0012 +:100BC0001008150C34580E01102C0E000E1AB00A25 +:100BD0008858CD0C0600601700083C510C00392DD8 +:100BE000102CB11D0C0830641436E80035B02036E6 +:100BF0002A08152C0A161E2C3E3031101E309C1E61 +:100C000000719C30083C360D3A2D1C089050268807 +:100C10000CAC2A2830BCBE51FF388D0C72BCBE3FD4 +:100C20003CB414680819002C6C2C014C6CB00C0AF4 +:100C30001A2D0A0C0028691419483DD7950A16BCCC +:100C40003C800808000C38887C080D060C9C6C5809 +:100C500008082A78805C783828320C0C000C0C8C40 +:100C60000808008C10B00A081C380F8C080900080E +:100C7000087C8C0600001C08000800762608060C7C +:100C800000008E1C0D0004063080300009001000AA +:100C900000000800000000000100010000500000FA +:100CA0008080010000280E00000000800008800005 +:100CB0000000000000000000000000000000040030 +:100CC000000000000000000000104000003800009C +:100CD000002000000801080040000C3000008000E7 +:100CE00000320004001900000020002180101000D4 +:100CF000000401050009082000718021840088009B +:100D00002C318001880014800400000000091000CC +:100D10004C0004018009A400000080080070140148 +:100D200000308080100C0008413444004DB834007D +:100D30008000400000093E01400202318A3990845F +:100D40000409010600384400410400800020204CC2 +:100D500042000000100C05004080458000880E0114 +:100D60005402400018091000403000040808040034 +:100D70000030010200080202404002000014008816 +:100D800040014080004A0080000001000000020095 +:100D90000100010410000000050001000000000037 +:100DA0000030000000000080000000000000000093 +:100DB0000000000000000000200000000000000013 +:100DC000000000000000000000000400000000001F +:100DD0000000000000000000000000000080200073 +:100DE000008200000040000000040140200000409C +:100DF00000001000008C0002008E000000800084C3 +:100E0000128800000080000600860140001D00A43A +:100E1000B1401100000C000C30B0800401000080D3 +:100E2000000E600C020002041002900000401084CA +:100E300010B000480000003000018001048535003A +:100E4000B2304805100030000036440C004408441D +:100E500030805021024D0C0000B2500000000031E3 +:100E600000B08004480000000002000000303D0097 +:100E70000012060842043000013C800030310005B9 +:100E8000010A0020000004000002040C30000800E9 +:100E900004910020300C2021002C002000000C00C8 +:100EA0000000040104010C014000000006000C00D9 +:100EB00000300000040000040004002001010000D4 +:100EC0000004000100000400000000010000000018 +:100ED0000000000000000000000000000000010011 +:100EE0000000000000000000000000000000000002 +:100EF00000000000000000000000000008000000EA +:100F000000000800000000000000041000000200C3 +:100F10000000000000041000000800000000200095 +:100F200000100420040081001810000008A108C46B +:100F300000000020880322040000000010000A00C6 +:100F40002000000C300018000010000038000000E5 +:100F50000024040000180CC6000000000020080057 +:100F60000800000008080000040082081820080893 +:100F7000004982040020000C000006001800C8018F +:100F80000089000008000000000000001028000098 +:100F9000003082041404C82100100000000000008A +:100FA0000400820014200008000004001008000063 +:100FB000008100008080000000410000000000006F +:100FC0000000000080230000041000040004000062 +:100FD0000000000000040000000004000000000009 +:100FE00010000000000000000000000000000000F1 +:100FF00000000000000000000000000000000000F1 +:10100000000000000000000000005F130F0355FF08 +:101010004F5FFFFF3311FFBF1131FAFA0772F40F70 +:10102000F45F00315755FF7FFEFF0F0F3F30330F46 +:10103000F505FFFF774455331D1D77770733010012 +:1010400057550A0FFFFBFFFF5555444400085F1337 +:10105000FF73FF7FFFBBFFFEBFFB0404A0FFFB008D +:10106000EFE72727BB111B1B5F0AFEFFFEFFFEFFFA +:10107000FAFF772227270F331B1BBFFFFFFBFF352C +:10108000FF53F50535355353CF033F3035355F50AA +:101090005F0A1D1D5F503F303F303F0C77443F0CCF +:1010A0001D1D1D1DAF051D1DAF05F3033F30F505CB +:1010B000F505FFFF5555FFFF0F0F0F0F0F0F55558C +:1010C000FF00FFFF3333FFFF5555FFBFBFFFFFFF9B +:1010D0000F0F55550F0F33330F0FFFFF5555FF00FF +:1010E0003333FFFF3333FFFF0F0FFFFF3333FFFFB8 +:1010F0000F0FFFFFFF000F0FFF00FFFF0F0F0F0F7E +:10110000FF00FFFF5555FFFF0F0F0000000000819B +:101110000800000000600000000000000000002047 +:101120001E0000000C0000000C0000201E0000004B +:101130000C0048000C2000000C0000000C00408057 +:101140008C2248808C2240808C2248808C22002077 +:101150001E0000000C0000000C0000000C00480005 +:101160000C2090040C0090240E0000000C00900451 +:101170000C0000000C0040808C2248808C224F80A4 +:101180006CB94F806CB140808C2248808C2200006A +:101190000C0080040C0040808C2248808C2240800F +:1011A0008C2248808C2240808C2248808C22408077 +:1011B0008C2248808C2240808C2248808C22408067 +:1011C0008C2248808C2200000C0000000C000000E3 +:1011D0000C0000000C0000000C0000000C000000DF +:1011E0000C0000000C0000000C0000000C000000CF +:1011F0000C0000000C0000000C0000000C000000BF +:101200000C0000000C0000000C0000000C000000AE +:101210000C0000000C0000000C0000000C0000009E +:10122000000004182000000000E00000000004009E +:1012300020000020120048000020000010000020C4 +:101240001200480000200000000000000000002004 +:1012500012004800000010001000488000204800E4 +:10126000000000201200000000000000000000202C +:1012700012000000000000000000802402000000B6 +:101280000000802402008024020048800020488062 +:101290000020900400004800002048800020488082 +:1012A000002000000000000000004880002048806E +:1012B000002048800020488000204880002048808E +:1012C000002048800020488000204880002048807E +:1012D000002048800020488000200000000000001E +:1012E0000000000000008024020000000000000058 +:1012F00000000000000000000000000000000000EE +:1013000000000000000000000000000000000000DD +:1013100000000000000000000000000000000000CD +:1013200000000000000000000000000000000000BD +:101330000000000000000400000000000CA00000FD +:101340000002600006403F153F00ABAA8080FDFF11 +:10135000070501051B1B0F030103777400AAAAFAF6 +:10136000FFAA55074F0BFFFFFFFF5F133F15FF0F4E +:10137000FFFFFFFFFFFF3315F702FFFD070FFFF72A +:10138000F7FF3F1511011101555503010F05FFFF2F +:10139000FFFFBBBB1B11FFFFFFFFFFFFFFFF0F5551 +:1013A0000F55330F3355F1FFF7FF0F0B0F0F553369 +:1013B00033553F0C3355BE7DFF557F5DDF57CF035F +:1013C0005353DD111D1D5F501D1DDD115353474744 +:1013D0002727CF03CF033F30F303CF0347475533CE +:1013E0000F33CF03DD111D1DDD11CF033F0C0505AC +:1013F000FFBFFFFF3333BFFFFFBFFFFFFFFFFF0054 +:10140000FF00FFFFFF00FFFFFF00FF0055550F0F1C +:101410000F0FFFFF33333333FF00FFFF5555FFFF3F +:101420003333FF000F0FFF00FF005555555555553D +:101430003333FFFF0F0FFFFF3333FFFF0F0FFFFFAC +:10144000FF00FFFF0F0F000000026081000010C0CE +:101450000C40000000000011900500000400002076 +:101460000CC0000014018008080400000000000007 +:101470000000000010010000000100001001000049 +:101480000001000000000000000000000400002037 +:101490000080000010010000000000000000800833 +:1014A000000001000400202000C4003014010020CE +:1014B00000C1000000000000000044001401000012 +:1014C000CC00000000000000000080001001800837 +:1014D0008024000000000000000000000000000068 +:1014E00000000000000000000000000000000000FC +:1014F00000000000000000000000000000000000EC +:10150000000000000000000000007000100100005A +:1015100000010000000000000000000000000000CA +:1015200000000000000000000000000000000000BB +:1015300000000000000000000000000000000000AB +:10154000000000000000000000000000000000009B +:1015500000000000000000000000000000000099F2 +:101560000000000000000000000000000023012037 +:10157000200000042490A100200000008406000048 +:1015800000000000000040000000000008014000D2 +:101590000000000008010000000000000000012021 +:1015A000200000042488400000000000400180006A +:1015B00000000000000689202000100500AA552820 +:1015C0002000000408890000000000000000410025 +:1015D0002000000024010000000000000000E010D6 +:1015E00000000000080300000000000000000000F0 +:1015F00000000000000000000000000000000000EB +:1016000000000000000000000000000000000000DA +:10161000000000000000000000000000000040008A +:1016200000000000080100000000000000000000B1 +:1016300000000000000000000000000000000000AA +:10164000000000000000000000000000000000009A +:10165000000000000000000000000000000000008A +:101660000000000000000000000000000000C000BA +:101670000000000040078000000000000000800023 +:101680000000000000450422C40080000023810403 +:10169000C481000000000100002001030800810057 +:1016A000810100C8000080009300000000000000DD +:1016B00000000300C4E346000422000290058100FC +:1016C000800010C0C020C08000C00307C4004403D5 +:1016D000E30013008101E003CB00000000000000E4 +:1016E000000000C8D0C88000CB000000000000024D +:1016F0000000001300C81003C80002000000000032 +:1017000000000000000002000000000000000000D7 +:101710004000000200000000000000000000000087 +:1017200000000000000000000000000000000003B6 +:101730000000000080C8130001000000002000002D +:101740000000000500000000000000030000000091 +:101750000000000000050000000000000000000084 +:101760000000000004000100000000000000000074 +:101770000000000000000100000000000000000068 +:101780000008000080000000000010000080000041 +:1017900000008000010000040020000020008041C3 +:1017A0008040C000200300020000200000004080B4 +:1017B0002000C000C0010000000080008000042064 +:1017C000040000000000040000200400000000806D +:1017D0008000C0008000001001101004801008007C +:1017E0000800000C40000000A005000104080000F3 +:1017F0000000000000000000010010004000000098 +:1018000000000080000000000800800800000200C6 +:1018100000000000000000000000020000000000C6 +:101820000000000001000080000000000000000037 +:1018300000000000000000000000000000000000A8 +:10184000000004800000000080000000400008004C +:101850000000000000000000000000000000008008 +:101860000000000000000000000000000000000078 +:10187000000000000400000000002000000008003C +:101880000000000000000000200020000000000018 +:101890000000000000000000800000000000800048 +:1018A0000070000000000000000008C2A100004914 +:1018B000020058801900003EF03000627000008A7B +:1018C000024128A311000040FA4400000000140067 +:1018D000E000080060000C8001800EC2610000A9D9 +:1018E000F70A2E5301008098F2001693000100A021 +:1018F000F370002410800180F1E08004109000005B +:1019000000180EC77130160B02820202607980182F +:10191000CA040C8303100E00044008E2910000404A +:101920001A1008836008200B226C028060524EB8A7 +:1019300032008082033017202040028001520E695D +:10194000AAC859842F300F000880208029386000F1 +:10195000020200000000800800000C00501000048B +:1019600000000000000000800100404C000000006A +:1019700000000002000080000000000000000000E5 +:101980000070008001000080F1000600000000C02F +:101990000300000000000000C00000000000000084 +:1019A000E000A00000000000300000007000000017 +:1019B00000003000000000000000000000002010C7 +:1019C00000000043040820050000000000641882A5 +:1019D000E13A40032048080722020000304000801E +:1019E0006328150030400003802A96000090613083 +:1019F0002B00004340600E82C9000001B000C0020D +:101A0000230000C3C77E0014F330149005000010BB +:101A1000807200C001701E87E3B08C402200420734 +:101A200020020011C832AD8B655520C0A03E218236 +:101A3000C0003040200C41141008900600304007D0 +:101A4000881314D1000000A401740881C9622C021B +:101A5000E81010410840082222740840C042028069 +:101A6000887C1003200020020000000000002D00F0 +:101A700000400004000020002200001000000C04C0 +:101A800008000000000000000000400100102004D9 +:101A90000000000000000000000000000000300016 +:101AA000000000000000000000000000080000002E +:101AB000000000000000080300000000000000001B +:101AC00000020000C00240000440000000000000CE +:101AD000000048080B130018289000800001000443 +:101AE0004D02A2BC124001C80089041131008000DF +:101AF00000240002050934803008041010380280E8 +:101B0000000001005802408002408511020100C01F +:101B100000000000E100004000000010020300008F +:101B200002200008900200600008101C4741036476 +:101B300000004304A1004000040101008000008077 +:101B400010008016010180501C0400002118029131 +:101B5000800104002800002400040004000000228A +:101B6000026185108001025008000043800040029D +:101B7000001020289E0201A8800020100002000210 +:101B800000008100400080020010400014000000AE +:101B900000001000000000F000000001080200003A +:101BA000004080100000000000A020800000000025 +:101BB00001000000000200000000000000000044DE +:101BC0000001200000000000800000000000000074 +:101BD00000000000000000000000100000000000F5 +:101BE0000000000000000C88E10000C64000162044 +:101BF0008A024001E0080C02F0011400A80280C82B +:101C0000800200D4C10000200A00101040700000C3 +:101C100020003E0000641648C2020006403D0C98B9 +:101C2000030000C0A1024007880041062008001000 +:101C3000E712004040300008C07000000040008003 +:101C40006740010B0000960F68800003236007AA1D +:101C50000940D001003000C7F781004E00088DCF49 +:101C600077802E004001AECFF1002E06004A2DCF26 +:101C7000F781AE09001082C0C7012E4008646E8350 +:101C800023802E1600001E87E30001C4066C0E8020 +:101C90006400C003000002180040000300000000C0 +:101CA0000000000000004013E001000008000008F0 +:101CB000C2000000000000000000000008600E00EC +:101CC00060000000000000008000000020012E00E5 +:101CD00000020001000046030000000000080000B0 +:101CE000E00000000000000010000000A000100054 +:101CF00000000000000000000000228001000060E1 +:101D0000506226C0210100CA019008C2710000166D +:101D1000A000009711000025151A8040A00D1000AA +:101D2000C26E000000311C400100004071000081C3 +:101D3000C1120CE40100002136001C80000008AA3A +:101D4000B1C2004371022C00164E000550B800804D +:101D5000026C00876D30000830080EC56110000766 +:101D60000A900E4074303106C4048CC7711080088C +:101D700002000FC771380C08406200C771040C16CE +:101D800054000ECD71280C8A01800CC271140C8095 +:101D9000A20010E275280C8051600EC77114003645 +:101DA000023000000000000A000002030038801A20 +:101DB00000400000000000000000000300000000E0 +:101DC000E000000000000000000002000000000031 +:101DD000E000000000010000000000000000000022 +:101DE000400200006000000001700000F0000000F0 +:101DF000001000000400000000000000700000005F +:101E000000010000000000000044202080040008C1 +:101E1000100020414400384880340081014288226B +:101E20008044284000242104425830241081514429 +:101E300029200804888100000A04001A3091400417 +:101E4000001220980C8241208809202044400C0078 +:101E500082392854202C805042848224418400946A +:101E6000808042888044222289044140202088804A +:101E70008824800441015081110994044194000C8C +:101E80002984010A894000803901808131813484AC +:101E900021804402218080042424211121212480D6 +:101EA000800C2401548411010124944408940101FC +:101EB000000102000019814480004000021004006B +:101EC0002100100000020110010404080100044078 +:101ED00000040000000000100100400000000000AD +:101EE0000400000004000000008002000100000067 +:101EF0002000000000090000010000000000800038 +:101F0000000040000000010220000000000000006E +:101F1000000000040000400100000000000000007C +:101F200000000D0C100000000C0D140CB0309C6073 +:101F30009C600C0E00091C0D9050900690083070AB +:101F40001C0E30900C04BCB0B800305000002D3C8A +:101F5000092A7030941028180070681A080C0000C4 +:101F6000053E0C0CA0380C1E0C5810301E1D0D7DAB +:101F7000BD7D7E1A9110BD880DAA028AA87A08013B +:101F8000000AB48D7CA000008C5438BA219C3E21FC +:101F90005129B158BC59711000B89D8C1CB021203A +:101FA000353019257430ACB05EB50031AC5A501ADA +:101FB000B08A80002018707011211119B000307A99 +:101FC000181000B0B01E7000B018B0B0B659B0B064 +:101FD000B83C001070B4305D707850300100A0182B +:101FE0000072001000000008BC00001C02667000B7 +:101FF0005000000E0004000000000090000060008F +:102000000009000050000001020800000600010065 +:102010000000600000000000000000000000000060 +:10202000000000000000000000000000000042006E +:1020300000381000105C00064000201C9D50361037 +:102040003E300B3809283010B028BE365E383808CC +:1020500038202E050B38391810310A6C3E0C8600DA +:102060000840FE68103C3EEC0B519B204018399E06 +:102070001A04203A189A044B1938303C311CBA160D +:10208000B8B0303C341806303EB03C30102C3C3CEC +:102090001C5C3510303E3E323A3C3E8C397117386C +:1020A0006C0C38FC142C72481C0C04F038175001CE +:1020B000105C9AB038901C9839921D0838220E8C0A +:1020C00039381400303C3C109A8C1804389808F8C1 +:1020D0000439381880380C0C0E880C5000081C0885 +:1020E000100030500D0108802001000000056050F4 +:1020F00068000C800C000CB6007C0001010000613F +:102100000C000000000000000C01000008000000AE +:10211000001004000C00000000000000000400009B +:102120005000000000002000060010000000080021 +:1021300030000000000000560000000C000000000D +:10214000000000000001000000000000000A000480 +:1021500040000000400000000000000440000004B7 +:102160000A10020008020005001C00200000000008 +:1021700000388020403000008E080401401A000C16 +:1021800000004C00040044020238850122120102C2 +:1021900002382000003004A50A3D200040204900FC +:1021A00042A0028C4076800042082110014080014C +:1021B0001C080008000010008038200C0000000AF5 +:1021C0000008110C00000001100800204000000071 +:1021D0000009000002084001000A52A8000800801F +:1021E0008818000C010000010030018D0000000083 +:1021F000000C008C000400000818004000000000E3 +:10220000000C000C4004000800084000000400001E +:1022100000000000000800001000000001000000A5 +:102220000000000004000000001000000400000690 +:10223000000000000C00000000000000000000048E +:10224000000000000000040000000000000000008A +:102250000000400100000000000C00000000000031 +:10226000000D00820000000000180080000008023D +:10227000000400010090080D093C0004009100409A +:1022800000340000104241402840000000020008D5 +:10229000608400020400100001002940008206084A +:1022A000088C000C0082800D0040056401819000C4 +:1022B0002040650039700430600C0000320080401E +:1022C0008400000C48020040000848001882892061 +:1022D0008000000C00364000020000000032004286 +:1022E00030104002400E400008003002003A5C50BE +:1022F000000000300182010A0400000400808028F0 +:10230000000000000001000204200004018200809F +:102310000430000000120000040000000002300041 +:1023200000010000840000000030000000100020C8 +:1023300005000100000000000200002000800000F5 +:102340000100000D0000000100000000000000007E +:10235000000000010000000000000100000000007B +:10236000000000000000000000000000000000006D +:102370000000000000000000000000000024000039 +:1023800000000400040482000820820404200018D5 +:1023900000200000002400002800000004000000CD +:1023A000080008080008004016000C0000000400A7 +:1023B0000080820010004081020082C620000408D4 +:1023C000100020C208490020808100080018000089 +:1023D00000080101004081000C000008080404808E +:1023E0004600042C00000028082400080008000013 +:1023F000102000000028000000000000000800007D +:102400000020000800080000000000040000000098 +:10241000000000080008004000000000042800043C +:1024200010000400042000002027004806080008CF +:10243000000000006000000004000105002800000A +:102440001024002000000000000000040000002014 +:102450000000000000000000000000000C00000070 +:102460000000000000000000000000020200000068 +:1024700010000000000000000000800000000000CC +:10248000000000000000FFFF7FFF0100FEFFFFDFF4 +:1024900057FF0080FFFDCFF3F7FFFFFF33337FFFD0 +:1024A0000F0740448C8CDFFFFFDF0D0F0F03EFFFA2 +:1024B0005545FFF70100FF74F1F0DFFFFF55CF0333 +:1024C000330F3F157700FFAF5FFFF531F700FFFFD8 +:1024D000FFFF77FFDD0D5FFF5FFFFFFC33000400B0 +:1024E000EE0ECF034747FF1FF5F5FFFFFFFFFF4746 +:1024F00047FF7F3FF5F553535353AF055F50F30349 +:102500003F301D1D4747F505BB11F5052727F75738 +:102510007F75FDCDFBAB0044AAEEFFFFFF001B1B48 +:102520005353BB115F0AF808FFFFFFFF3333FFFF70 +:102530000F0FFF00FF00FFFF33333333FF00333350 +:102540000F0F3333FF0033330F0F33330F0FFFFF02 +:10255000555533330F0F55550F0FFFFF0F0FFF006A +:102560005555FFFF3333FFFFFF000F0FFF003333DD +:102570000F0FFFFFFF00FFFF0F0FFFFF33330F0FA2 +:102580005555FFFF3333000000001001000000002C +:102590000040000000000000000000000C0080046B +:1025A0000C0080040C0000000C0000000C00000077 +:1025B0000C0000000C0048000C2000000C0048003B +:1025C0000C2000000C0000001C0000001C0000009B +:1025D0000C0000000C0000201E0090241E000020B3 +:1025E0001E0080240E0090241E0090241E00000077 +:1025F0000C0080040C0000000C0048000C2080241B +:102600000E0000000C0048000C2040808C22488006 +:102610008C2240808C2248808C2240808C224880F2 +:102620008C2200000C0000000C0080040C00000054 +:102630000C0040808C2248808C2200000C0000009E +:102640000C0000000C0000000C0000000C008004D6 +:102650000C0000000C0000000C0000000C0000004A +:102660000C0000000C0000000C0000000C0000003A +:102670000C0000000C0000000C0000000C0000002A +:102680000C0000000C0000000C0000000C0000001A +:102690000C0000000C0000000C0000000000000115 +:1026A00000000000080000000000040020000000FE +:1026B0000000900400000020120000000000000054 +:1026C0000000480000204800002080240200002074 +:1026D00012009024120000201200000000000000F0 +:1026E00000008004000000201200800400000000B0 +:1026F000000000000000002012004820122080246A +:102700000200000000008024020000000000000021 +:1027100000000000000080240200802402004880A5 +:102720000020488000204880002048800020488009 +:1027300000204880002000000000802402000000EB +:1027400000000000000048800020488000200000B9 +:1027500000008024020000000000000000000000D3 +:1027600000000000000000000000000000008024C5 +:1027700002000000000000000000802402000000B1 +:102780000000000000000000000000000000000049 +:102790000000000000000000000000000000000039 +:1027A0000000000000000000000000000000000029 +:1027B00000000000200000000C000000000260008B +:1027C00006400050A0003F267FFF5F137700FFFE0A +:1027D000B333FF01A000030201007F5FBBFFFFFFD7 +:1027E000FFFF5F13770077073F1550540F03020078 +:1027F0007700030000020FFFFFFAFF0F0F02FFCC6C +:102800000507FFDDFF8AFFFDFF5545553000110F1D +:1028100033BBFFFFFFFF0AFA5F57FFFFFFFFFFFF1A +:102820003333CC333000DF57DF57FFFFFFFFFFFFAD +:10283000FFFF77441D1D1D1D7744CF03CF03DD111E +:10284000DD114747BB1147475533A0A0DDFDFFFF12 +:10285000FFFFFFFF3333FFFF555533557744774470 +:10286000CF03FFFFFF00FFFFFFFFFFFFFF00FFFFA2 +:1028700055550F0F3333FFFFFF00333355553333B7 +:102880005555FFFFFFFFFFFF0F0FFF000F0FFFFF6B +:10289000FFFF0F0F3333FFFF55553333FF00FFFFAB +:1028A0000F0FFFFF0F0FFF000F0FFFFF55553333C3 +:1028B000FF00FF00FF00FFFF3333FFFFFF00FFFFBC +:1028C0003333000000000000064000C00C30000060 +:1028D00000000011900610001001800100040000AB +:1028E000040000202840000000000000000050000C +:1028F0000001000090017000140100000C000000B5 +:10290000040080082C06700010010020C0C00400E4 +:1029100014018008A80C0300040080282864031018 +:102920001401C008086302000400002000900000A9 +:10293000040000202C8080080000800800001000A7 +:102940001401000000000000000000000000000072 +:102950000000000000000000000000000000100067 +:102960001001000080010020000000420000000073 +:102970000000000000003000100100008000000096 +:102980000000000000008009000080080002000034 +:102990000000000000000000040000000C003000F7 +:1029A00010010000C0000000000000000000000056 +:1029B0000000000000000000000000000000000017 +:1029C0000000000000000000000000000000000007 +:1029D000000000000000000000000011000800C01E +:1029E0000000000000000000002380000000000044 +:1029F00000060120200000080490000000000000F4 +:102A000000004000800000000001010020000000E4 +:102A10008400810020000000040640200000000423 +:102A20000091C10020000000440391202000000418 +:102A30000492C928200000202CC31120200000048B +:102A4000008011282000000404888000000000009D +:102A50000000510020000000000000000000000005 +:102A60000000000000000000000000000000000066 +:102A700000004000000000000801002100100000DC +:102A800000400000000000000000400000000000C6 +:102A900008010000000000000000800000000000AD +:102AA00000060000000000000000110020000000EF +:102AB00024004000000000000001000000000000B1 +:102AC0000000000000000000000000000000000006 +:102AD00000000000000000000000000000000000F6 +:102AE00000000000000000000000000000000000E6 +:102AF00000020000083800000000000080000020F4 +:102B000003C8C900C08500C00007A004002300401E +:102B1000000000000000000000011000130000C0D1 +:102B200000238005C901006300C000000000C0430D +:102B300002C4C000132000C0C4000000C01303037F +:102B40000003C207C00080878180C409C603002338 +:102B500044800000E340030002C0C704C10000003D +:102B6000D003040310000001C413030000000000A0 +:102B70000200000000000000000000000000000053 +:102B8000000000000000000200800101930000C06E +:102B9000A300E000030000000000000000000100AE +:102BA000C8C801001B00000000000000A0000000D9 +:102BB00000C00000008000000000002000020000B3 +:102BC00000C2C700C00000001380B31380000000E3 +:102BD00000000020030000000000001000000100C1 +:102BE00000000000000010000000000000000005D0 +:102BF00000000000000002000000000000000000D3 +:102C0000000000000000000000080000000000803C +:102C10008040000408082000010400200820400033 +:102C2000000000401000000000000000080100004B +:102C3000000000200000800040010040042001004E +:102C4000020001A00440410000008020004001007B +:102C5000010040C00001840080808202C0020201A5 +:102C6000044800000004000040202000020204008C +:102C7000A0000000010802801000000108004000D0 +:102C80000000000002000000000000000000000042 +:102C90000000000000000000000000802002200171 +:102CA0008000000420200000200000000000000040 +:102CB000000040000000400000000000000000088C +:102CC00000000000001000000004000000000000F0 +:102CD0000080000000A0040080000000000200004E +:102CE000800000000000000002000000000004005E +:102CF00000002000000000000000000000000000B4 +:102D000000000000000000000000020000000000C1 +:102D10000000000001000000000020000000000092 +:102D200000000000000002801300002E40900047C9 +:102D300012000080F3000840000C8080E6002C03A5 +:102D4000281300800900408428000020E2C10C44C0 +:102D50001000801E024028406000000B1206020096 +:102D6000A4008014F23002AC0100000E00002E001E +:102D70001834200E003500C301000000F0300002BE +:102D80000400208001608E4300000008280200003B +:102D900060B0000002048C2760390E1000002E8005 +:102DA0006452400B02308022603180400241A00416 +:102DB000503000080A70000000001C000600988ACD +:102DC000A4084C0030040003003000000010000094 +:102DD00000000000000000000000002001040000CE +:102DE000000000000000000000000000400008009B +:102DF0000034000600040000000000200000000075 +:102E0000000000004010004001000004F00000003D +:102E10000000000000000200000000000010A00000 +:102E20000000000000700000000000000001000031 +:102E30000090000000000000000060040402000395 +:102E4000F86030A3E0020081350021A0010040813C +:102E5000B1094F0020080056000830A4080000C146 +:102E6000C66021200A02008301100810E20380C618 +:102E7000046000008300000005F06683C1000000CC +:102E800030480E8063000007C0C0808B032800001C +:102E900040304002203000800160AFA4030014C025 +:102EA000090000076048005004401082E1BA206029 +:102EB000C0000F002210028001B40E9220762E0670 +:102EC00000080E04F080001001E000000000004047 +:102ED00000000CA3204C0C400040880000800080C3 +:102EE000010022000000000000000080010000003E +:102EF00000300000000000E001100000003C00E095 +:102F00000110000200000008007000100000000125 +:102F1000000020050000000000000000000000008C +:102F20000000002000000000050006000000000076 +:102F3000000002030000000000000000000000008C +:102F400020000000001800000000000000004020E9 +:102F50008A03000243020116000180C140A800124A +:102F6000010000901400000900120108000C200468 +:102F70000000400020A1A0110A0140A00C2C6818FC +:102F8000850000D1000451220D2000001308858027 +:102F9000E0810012020824002D0180021014002894 +:102FA000058800000842000488C200B00042810089 +:102FB0000B0030020000001170A000500000202C17 +:102FC0000A624080080420286F0000B800008200D8 +:102FD00000020104120000031000404B00410114E4 +:102FE0000000080001101082000248A00004020046 +:102FF000000000200002000000000000400420004B +:10300000040010800000800000000000004000204C +:1030100000040000204040102000000000000100DB +:10302000000200004000001000000000200200002C +:10303000810000420000000000000000000050007D +:10304000000000000002000000000000002000005E +:1030500000000000000000000088000000000000E8 +:103060000000000060000006C04802A8C803006419 +:10307000C08010C20400001400000808804014C181 +:1030800004001E42F70140C1C460C0837300000603 +:1030900008080008000000C000390E000A0200C045 +:1030A000043C4614E0280086F11910006800020074 +:1030B000C03000070208009045018088C028004009 +:1030C00002144E940100100008020007603A30001C +:1030D00000141C8361002A00D038120462000C40E6 +:1030E000000100B08902010EA1020207D081000197 +:1030F00001100200000000600A001C82E0000003D2 +:10310000A0088000008000E0000000070000000030 +:1031100000380E0000000000000800080800400011 +:1031200000090004E0300000000000008000000002 +:10313000000008088000000000000100000000807E +:103140000100000000000000000800480000000826 +:1031500000804004030000000000000003000000A5 +:10316000000000000000000000005000000000000F +:10317000000000000000000000008098213610824E +:1031800071000028E0318E87000000A101003C079B +:10319000E02800690100424D71000148D0620CC373 +:1031A00075000040A51008076004000A401000C721 +:1031B00051300007E21006846200003AE01400403B +:1031C00000008C000072001328000080C1BA0007C4 +:1031D0007000000002000E8401000E000800800C48 +:1031E0006030000000000C83811008015040024450 +:1031F00068144E40A1020344102C008ACA048107BF +:10320000503800880B64000000000000E260629704 +:1032100002042105004100070030000000004000CA +:1032200000000000C0100000000000000010084076 +:1032300000000006C01000000400000000000000B4 +:10324000005000000000000000000000C00000006E +:1032500000000000040000007000008002100080E8 +:103260000100000800100010000000000000002F06 +:10327000000000000000000000000000000000004E +:103280000000408080080000008850440400008155 +:1032900000020C540010014421201148204241003A +:1032A000005A0021480404808084022C90001111EF +:1032B000202A84224A0C4C040081048189440C4455 +:1032C0003040218C202082913404048082148002BA +:1032D0001290413130823048104180002202800437 +:1032E0003101040191000101440210019280012189 +:1032F000812122010882245C02411920844101803D +:103300001101040001002000828081910081408829 +:1033100001082211018420084000000101412142DE +:103320008201421C210900180C0101111008400003 +:103330002000000000040081043441040001101842 +:103340002419044001115004020000010000000192 +:10335000000009010220200000000200080009000E +:10336000000004000200000000000000000408004B +:103370000202008001080000000000000000004878 +:103380000000080200000000000200000000000031 +:103390000000000000800000080400000C0C390D43 +:1033A0000000080690090C3800000C2409001DBC20 +:1033B000B0009D105A1C5C0A1C1090005D00103873 +:1033C00030093C3939689C547C049C0E0CA0690877 +:1033D000B00A2CB4166000087C75093E156A0C0D05 +:1033E00012350D400828BC062D7938300E69A855D5 +:1033F0005805000E14AD500C1E0A35A49D283CB68D +:1034000020A40C04A0A832A650142D18040E3C547D +:1034100030AC007010058058642C74A9A8B4091948 +:1034200060543D782088A910005C28988400099099 +:103430009571097EBC785C18708C2018280080106B +:10344000300C581098790D7058A080560930001033 +:1034500050093638003CB02E30103000700000703B +:1034600000004000509088B000B0008000000009CB +:103470000C000C04010C0040800000010E00000054 +:1034800040000C0600000000700400050000000071 +:103490000200060800400C000000000000000000D0 +:1034A00000000000000A100000003E301100006023 +:1034B000413026185800013C4770081D017B6D8D76 +:1034C00038167C10101418860A0C073C90D06C300B +:1034D000160CD0B836066D48803C1D3538583C78FF +:1034E0007B340C250814EC15120E1C282110082C16 +:1034F0001C780D16A0442050553F3D103E38318EAB +:103500004A202B50314800C8156C4C451080E87D8E +:1035100018ED4770282B69913021987470A9BC1858 +:10352000799000118839601A6060590361CF1146A3 +:103530000D2B8820023D923088763C400419936E12 +:1035400033800204001C3038390111080108800062 +:1035500088050D0006003180315000000F01001871 +:10356000482C30FC00040E001C0808A080742A08B7 +:10357000040000040000000000000C0804103000EB +:1035800080000000000000010001080E040000009F +:103590000000000000000000000400100400000013 +:1035A000000000000000001000000000000000000B +:1035B00000000000000000000000100000080000F3 +:1035C00000000000402E02000004820080290C1838 +:1035D000400A022882A0000000008018000804159C +:1035E00080080208003C8288400201800078801830 +:1035F0000208423090108010000082380C384018C9 +:103600004120050902084210001202348A38026083 +:10361000020901088D221419420800480058823816 +:10362000001A44085238421C42090200810802086C +:1036300002080100924A4D0801580038048C00002D +:10364000108002091008140C420A02881E492490B6 +:10365000449A4A484209564440050C4802000E0864 +:1036600000000E090288040D02481008021012889A +:103670004280008002080800100002040000028C52 +:103680000008708000A8054801080582420826004D +:10369000020802001048020000800004001802081E +:1036A00000000100000800000000000100080108FF +:1036B000020404000480008000800000000800086C +:1036C0000200000000080080000000000000400030 +:1036D0000000000000000000200E14800000080020 +:1036E00000462041200C08810098000100000040A5 +:1036F00000120249000008000081182C002400502C +:10370000005200400880284080401040144008408B +:103710002282900C8E400D040A0218009044080189 +:1037200001B20C8008000C81307C80482800801099 +:1037300002620800008C310000B61C4208400800FC +:103740001C02180008300C00087E3C0000800000BD +:10375000023200008840080C401242003834083021 +:10376000082E8010317C391480009811400D0A1009 +:1037700009300800000008040832800A08104000E0 +:1037800008904410083041204832410005004801AB +:10379000600008A00000701242964C9000000D10CE +:1037A0000802840448000984003244000810000123 +:1037B0000182080000100C00803200004001000C63 +:1037C00000020C008801010001000010041000003C +:1037D00000020000080000000002001000000000CD +:1037E0000000C001000000000000000000102004E4 +:1037F000004900000000280000080000000400004C +:10380000240001080020000001080048C081000CCD +:1038100000200000000000880808000000000000F0 +:10382000240800887240041C00280008200082112F +:1038300020000050402000000008004448200808F4 +:103840000808000800000018200802981024000052 +:10385000000800301000200C0028000010000808AC +:103860000008001880410000040000080020000843 +:10387000002800485A0008100008020C0008080040 +:10388000080004080020080800008A08100008202A +:1038900000080008002000080000000000200008C8 +:1038A00014080000200000080008000004040808B4 +:1038B00000080000080008040008000418000000C8 +:1038C00004000000000000080020000000200000AC +:1038D00000000000000000080000000000000000E0 +:1038E000040800000000C0080000000010000000F4 +:1038F0000000000000008001000000000000000047 +:103900000000CF031D1DDD117744FFFFFFFFFFFF08 +:10391000FFFF5F50CF033F0C3F305353F303474744 +:10392000F505FFFFFFFFCFCFCFCF7744CF03335550 +:10393000774477073F15FFFFFFFF03033F15770726 +:103940003F15CF0333550F550F5577077707330FC3 +:103950000F55F505330FFFFFFFFF0F550F337F7333 +:103960007F733F30F303CF034747CF033535DD1176 +:10397000DD11CF033F303F0CCF0353531D1D3535B1 +:10398000F505FFFFFFFFFFFF5555FFDF0F0FFFFF9F +:1039900033337722AF05BB11DD11AF05AF05CF0380 +:1039A00053530F0F0F0F5555FF00FFFF555555553A +:1039B000FF000F0FFF000F0FFF000F0FFF00FFFFB3 +:1039C0000F0FFF000F0F3333FF00FFFF5555FFFFB1 +:1039D0000F0FFFFFFF00FFFF3333FFFF0F0FFF004D +:1039E0000F0FFFFF0F0F0F0FFF00FFFF3333FFFF1E +:1039F0003333FFFF0F0FFFFF3333FFFFFF0033337E +:103A0000FF000000000000810000000000600000D6 +:103A100000000000000040808C2248808C2280241E +:103A20000E0080240E0040808C2248808C22408032 +:103A30008C2248808C2280240E0010001C004080C4 +:103A40008C2248808C2290241E0080240E0090241A +:103A50001E0090241E0040808C2248808C229024DE +:103A60001E0000000C0000000C0080240E0000006E +:103A70000C0000000C0040808C2248808C2240808A +:103A80008C2248808C2240808C2248808C2240806E +:103A90008C2248808C2280240E0000000C00000044 +:103AA0000C0000000C0040808C2248808C2240805A +:103AB0008C2248808C2280040C0080040C000000C2 +:103AC0000C0000000C0000000C0000000C000000C6 +:103AD0000C0000000C0000000C0000000C000000B6 +:103AE0000C0000000C0000000C0000000C000000A6 +:103AF0000C0000000C0000000C0000000C00000096 +:103B00000C0000000C0000000C0000000C00000085 +:103B10000C0000000C0000000000008100001000FC +:103B200004E0000000000400200048000000902491 +:103B3000120000201200902412004880002048004B +:103B400000004880002048000000802402009024EB +:103B5000120048800020480000000020120080244D +:103B6000020000000000802402004880002048007D +:103B70000000902412000000000080240200802435 +:103B80000200000000000000000048800020488083 +:103B90000020488000204880002048800020488085 +:103BA0000020488000204880002000000000000025 +:103BB0000000000000000000000048800020488055 +:103BC0000020488000204880002000000000000005 +:103BD00000000000000000000000000000000000E5 +:103BE00000000000000000000000000000000000D5 +:103BF00000000000000000000000000000000000C5 +:103C000000000000000000000000000000000000B4 +:103C100000000000000000000000000000000000A4 +:103C20000000000000000000000000000000000094 +:103C30000000800008A00000000260000640FFFFB6 +:103C4000FFFF5F193F261131015577077707CCCC6D +:103C5000CFCFFFFFFFFFCCCCCFCFFFFFFFFFFFFF9A +:103C6000FFFF77073F15FFFFFFF0FFFFFFFF3F1547 +:103C70007700FFFFFFFF3F303535FFFFFFFFAAAAA8 +:103C8000AFAFFFFFFFFF3133FF04FFDFFFEFFFFFA9 +:103C9000FFFFFFFFFFFF1B1BBB113535F3033F0C7D +:103CA0005353DD114747CF03353547473535353554 +:103CB0003F301D1D35353535F303F3031D1DFF7FE3 +:103CC000FBFFBFAE7F5DFBF1FDF1FFFFFF003F306B +:103CD0003F30F3033355CF03F5050F553F0CFFFF7E +:103CE0003333FFFFFF00FFFF333333330F0FFFFF8B +:103CF0003333FF003333FFFFFF00FFFFFF00FFFF01 +:103D00003333FFFF0F0FFFFF333333330F0F0F0F2B +:103D1000FF000F0FFF00FFFF3333FFFFFF00FF0027 +:103D20003333FF000F0FFFFFFF00FFFFFF00FFFF18 +:103D30000F0FFFFF3333FFFF3333FFFF3333000039 +:103D400000000000000010400C40000000000011C6 +:103D50009005300010010000000090081401802838 +:103D6000002600000000000000000000000000002D +:103D70000000022014018028C40F00000000000091 +:103D800000009009240080280CC110091000802830 +:103D9000804000000000000000000000040000203F +:103DA000044023031403800800000000000000000A +:103DB0000000000000000000000000000000000003 +:103DC00000000000000000000000000000000000F3 +:103DD000000000100000002000D0000000000000E3 +:103DE00000000000000000000000000000000000D3 +:103DF00000008038000080280064000000000000FF +:103E000000000000000000000000000000000000B2 +:103E100000000000000000000000000000000000A2 +:103E20000000000000000000000000000000000092 +:103E30000000000000000000000000000000000082 +:103E40000000000000000000000000000000000072 +:103E5000000000000000000000000040080000001A +:103E60000000000000230000000000000000902877 +:103E7000200000040002000000000000000000001C +:103E8000000000000000D12810000004140300000E +:103E9000000000000000C1202001000464914020C7 +:103EA0000001000440890000000000000000012023 +:103EB000200000042490C70000000000140000004F +:103EC00000000000000000000000000000000000F2 +:103ED00000000000000000000000000000000000E2 +:103EE000000000000000002100000004008000002D +:103EF00000000000000000000000000000000000C2 +:103F00000000000000008028000000040092000073 +:103F100000000000000000000000000000000000A1 +:103F20000000000000000000000000000000000091 +:103F30000000000000000000000000000000000081 +:103F40000000000000000000000000000000000071 +:103F50000000000000000000000000000000000061 +:103F600000000000000000000000000000008000D1 +:103F70000000000000000001000000080080900028 +:103F8000D8C9001383C3E322C90000000020000049 +:103F900000000000000000000002030000230341B5 +:103FA000CB00000000020000000000C00143C41369 +:103FB00047000007CB03E380C0E2000000000000E0 +:103FC000000000C3C3C04700C00000E313C00000EE +:103FD00001000000C00020000000000000000040C0 +:103FE00000000000000000000000000000000000D1 +:103FF00000000000000000000000100000C34600A8 +:10400000E000000000000000A000000040000000F0 +:10401000000000004000000000000020E300A300BA +:10402000000000000000000000000000010000008F +:104030000000000000000400000000000000040078 +:104040000000002000000000000010000000000040 +:104050000000010000000800000000000000000057 +:10406000000000000000040000000020000000002C +:104070000000000000A0000000020000000000009E +:10408000000010000080000000000001010000009E +:1040900000028000000100008448040040800020ED +:1040A0000000000000000020000000000080400030 +:1040B0000000092120800020008000000000020490 +:1040C0004028000020000000200820821204002068 +:1040D000000000000000000584200401C000001062 +:1040E0000002090040000000010000000000000084 +:1040F0000000004000000000000000000000000080 +:1041000000000000000000000000000000000000AF +:104110000084040000000000000000000000000017 +:10412000010000000000000001000000000000008D +:10413000080020080000040000000000000040000B +:104140002000000000000000000000000800000047 +:10415000000000000000000000000000000000005F +:104160000000040000002000200800000000000003 +:10417000000000000000000000000000000000003F +:10418000000010000000000000040000008000009B +:10419000000000000000800000700000000000002F +:1041A00000000080190114802534078000004C0AAB +:1041B000C0000003008000840144000B10020C00CA +:1041C0000080008001020E000034200578810C9AE6 +:1041D00002600E0000084000020002007835008EE8 +:1041E0000118800070014E060200808001000080EE +:1041F000F700000000080080030000047001008048 +:10420000A1400880014A0CA6A2300C0020301426E0 +:10421000C232000000384E8AA16080C22930156980 +:10422000060228800100801A20012E0300000000F1 +:1042300000300D8221520E060030428B03100C001C +:10424000000A000070001400000000005000000090 +:10425000F0000080010000000000002000000000CD +:104260000000000000000000E0000000000000006E +:10427000E0000000000080000030000000000000AE +:1042800000000C0000000000F000202000000000F2 +:10429000027000000000000000300000000000007C +:1042A0000004000008000000000000000000000002 +:1042B00000000000000000A32900158031310980B2 +:1042C0000000D10348028000000816000030000002 +:1042D000D03802C8040000C00510000020600600AD +:1042E000200816C00040200B00000C5704004102BB +:1042F000E00000C704000005F030005800002C2446 +:104300000300808EA1000000001020000000028049 +:10431000E5008006A04800006009216808B4000498 +:10432000307451802D300200007C54D30C600204A4 +:104330002874088121400860E3000003C8008880D9 +:1043400001000040000058B2801290CE00E02EA381 +:104350008355D40620000000130001000000400037 +:10436000000000000000000000000000000000004D +:104370000000000000000000000000000010000528 +:104380000000000000000620000000072000008060 +:104390000500000000001040000000000000008048 +:1043A000010000100000000000000000008000007C +:1043B000000000000070000000000000000000008D +:1043C000004000000000000000000012080810007B +:1043D0000120A0000500000000002028001210426B +:1043E00001308100B0300200030000002004000012 +:1043F00088020004003003A0003841240010C141AD +:10440000000008282020808202080002001A417162 +:104410000004054C090100814850000C005001D0F7 +:104420000000020648000084281CC0000102019020 +:10443000120049581800021011560300002200080B +:1044400018D2020610002C04201824000001480194 +:10445000000024200400803200020180100003309C +:104460000A44400808001910204001080400020016 +:104470000000000042000000000000880000000072 +:104480000200020000000000020001000000000025 +:10449000804000502000000080001000000000005C +:1044A0000A20000000020000000020008000000040 +:1044B00000000000000000000020000008000002D2 +:1044C00000002000000000000200000000000000CA +:1044D0000000100000000000000000000000400785 +:1044E00008001480C11C00C005004206C0011C0267 +:1044F000600014C001104C1360001400000000A004 +:10450000E9320000C001000F000011C00434830034 +:10451000000000C600000002C002000000300000E1 +:10452000E08015010048128F810200D6A40000022D +:10453000007C14C0000010806100409645024834A1 +:10454000EA80418001640682014072C0A040924A24 +:1045500067001491010008CA2040100600011EA047 +:104560000900010340008C020000004000005C4490 +:104570000700154000001087614215502000020816 +:1045800000000000000802000000000000080E808B +:10459000140000000008800000010000000008086E +:1045A000000000C005082E00C00000000000000050 +:1045B0000000000000000607C00000000014020513 +:1045C0000000000000080000000000000000008D56 +:1045D00003000000000002000300000000080000CB +:1045E00000000000E00010000000000000000000DB +:1045F000000000820078560054320E8001008D08C1 +:10460000C0020C036804358006900C0370303580BE +:104610000148008071001600C00200000030104008 +:104620000060060300500080050028025030001A88 +:1046300000B800026828140802400087740000A82F +:10464000220540030030008001008742E700008619 +:1046500001102244E03000860202888400381008ED +:10466000C0320E8380103520066211A22939100055 +:10467000A0300E800100000A500210070000003434 +:10468000000002C00150140010488C0710391405B6 +:104690000206000300000000001001C0010000003D +:1046A000001001030000008001100007000000005E +:1046B00002000000000000000010004001000000A7 +:1046C0000000000000000000020060000000000088 +:1046D000000040007000000000100000000000001A +:1046E00000000000000000000000001000000000BA +:1046F00002100000000000000001000000000000A7 +:1047000000004040398000445008804030400000A4 +:1047100000002C4000044000004448598482500AA4 +:1047200088244000484228048090044489802C0456 +:10473000202148403041492809844410042A0002BD +:104740000402813400400C002004412431298122DC +:104750000024002104218129040080810280088234 +:1047600084188440008090819114018010204010B2 +:104770008110220089844024220481490401088098 +:104780000841000280148A80814201020200140064 +:10479000804200812894902080011009108101102E +:1047A0001180048C100084120101001110111400FA +:1047B00018000002000000109010001A0004001001 +:1047C000040400020408000030080004000008404F +:1047D00008400001000280000012040000010000F7 +:1047E00000240000000000000000000000000000A5 +:1047F0001000000000000000000000080000000899 +:10480000000000000000000000080000000040015F +:10481000000000000C0000003C000C002004090E09 +:10482000090090B60A0A0800100E80084C0A081801 +:104830008000182C1C7E0D090800080E791E0DB88A +:10484000887D5C3A00509CA43D200C7C08B8091C73 +:1048500009AC5006000A0E329E007800005095A167 +:10486000100CA854AE00001489B1A9289C35050489 +:104870009A3D5CA1343C98350D30100531000CB9DF +:1048800030314510200CA8A01C084988B1A521BCD6 +:10489000B59C4C3C7CA81D211D1408780031A02A31 +:1048A0007CB43C10B13D5CB4983010B804A4307CAA +:1048B00030387E1C2030948C39017231B0B01A121D +:1048C0001834191D18508184B47A29101034703CA2 +:1048D000B0207010707D0000008C0C20202C007027 +:1048E000001078790C00001000000000003000205B +:1048F00000000006100A00B00000000000000020C8 +:1049000008000092200000000002000000000008E3 +:104910000040000C5000B00000000000000C00003F +:1049200000000000000000400100100038100F1DC2 +:1049300010501A103E204A6066502C108E0C1F77C3 +:1049400053183A181C1833EC9010305016183A5877 +:1049500030100C051C123CFC103C3A3116BC2812DD +:104960000C31186F682806780C0C380440205C70F5 +:10497000020010183818091556105A850C1414988E +:104980000D8A1A210C964618AD50099266901A08A5 +:10499000206C652A07921676A801190FBC291A3DCA +:1049A00038489C140805568B763186CCA20D1C31F4 +:1049B000249C048C5D0B7DCE169C0731303C373730 +:1049C0002305524C66B104676891092C0AEE280849 +:1049D00008008E0C0F01688000000E090B0080009B +:1049E00010030004008800000C680A040C00018019 +:1049F0000A80000C008000000000008C02003000E3 +:104A000000000C800000000080300000000000006A +:104A10000000008001000000000000000000000015 +:104A20000050000000000000000000000000000036 +:104A30000000000000000000000000000000000076 +:104A40000000000000008800002800010004800031 +:104A500000010C04421000000001000141009C20F4 +:104A60000A010000500A4805402900A10C0D8040B1 +:104A70000010808080358C34012A102140006204AF +:104A800080301C002C0401008C99A60000528C314F +:104A9000000C044040240E200210002002002006DA +:104AA000003C81B04C200E0C013A7031008482B180 +:104AB0003C0C002D3C0800000008003200B0008AC9 +:104AC000016280410000151240A8003850400C8857 +:104AD0000008424100090000808000400408028074 +:104AE0000488208102400080000804B00000068095 +:104AF00011040041000000010000017100081100D4 +:104B000000005080128000800A08008100800000B0 +:104B10000080000C00000000000001010C000000FB +:104B20000000000000800400080800810000000070 +:104B30000000100010000000000000010000000450 +:104B40002000000000000000000040010000000004 +:104B500000000080000000400044014000420208C4 +:104B60001000000000040002088010480004120831 +:104B70002040004019441200624C21440096026813 +:104B80001006081000401A60000000000C4A10A82F +:104B90003400BA011040500022785C40128E9E8191 +:104BA0000194804112318050006118400170808072 +:104BB000092084210481343E30400A020C8E700AA0 +:104BC0000020082410021248420800000001000CD6 +:104BD00000B0001C0C68005D11800E400042402CAB +:104BE000700006150032141C021C00000010001C8E +:104BF000020008000212802C08100014003202008B +:104C000000000900840100100000480000060C1894 +:104C100000008C000000300008004000080200087E +:104C200000004800000000020430000000000408FA +:104C300000020000000000000111810400020008D1 +:104C4000000000000000800080000000000000085C +:104C500000000001800000000000000000000000D3 +:104C60000000000000000000000000000004000040 +:104C70000000000020080000000028000000208440 +:104C80000000200000009A00208120000008000899 +:104C90000020000028000400004085010018085C86 +:104CA000500030200400003400002800302C200088 +:104CB0000041002000080C802220890100202800EB +:104CC00010200420202C04202400001408000000E0 +:104CD000000000100008001038002008000C000040 +:104CE0000000001000000008000000C220001000BA +:104CF0000000043C04000404002000000028000020 +:104D00001000000400080000100000000008040467 +:104D100000200010000400400020000000000400FB +:104D2000040400100008000000001404100804002F +:104D3000080000000008040000000000042000003B +:104D40000000000008000000000000200000000437 +:104D500008008200000000000000000400000000C5 +:104D60000000000000000000000001010000004001 +:104D700042008000000000000000000000001D1D37 +:104D8000DD117744DD1147474747DD11DD11FFFF96 +:104D90000F557744474777070F051101DFFFFF08DD +:104DA0005DFF77774EEECF033F0C4747DD113F0C99 +:104DB000CF03FFFB01003333DD1147471D1DFFFF0C +:104DC0000F0F0301CF473F331311DFFF110177446A +:104DD0007744CF031D1D35355F50F3033535F50599 +:104DE0003F305F50F505F505CF03CF034747DD1191 +:104DF00047471D1D3F0C1D1DCF0355337722F50579 +:104E0000353535355F505F505F505F50F303AF0568 +:104E1000DD11F50527275F501B1B3F305353F50568 +:104E2000F3031D1D1D1DFFFF5555FFFFFF00FFFF75 +:104E30003333FFFFFF0055550F0FFFFF0F0F555581 +:104E40000F0F33330F0FFFFF5555FFFF333333334E +:104E50000F0F55553333FFFF555555550F0F0F0F96 +:104E6000555533330F0FFFFF0F0FFFFF5555FFFF52 +:104E700055550F0F0F0FFFFFFF00FFFF0F0F000033 +:104E80000000008100000000004000000000000061 +:104E9000000040808C2248808C2240808C224880F8 +:104EA0008C2240808C2248808C2200201E0090049E +:104EB0000C0000000C0048201E2040808C224880FE +:104EC0008C2200000C0000000C0040808C224880E6 +:104ED0008C2200000C0000000C0000201E000000CE +:104EE0000C0040808C2248808C2240808C2248809C +:104EF0008C2240808C2248808C2240808C224880EA +:104F00008C2240808C2248808C2240808C224880D9 +:104F10008C2240808C2248808C2240808C224880C9 +:104F20008C2240808C2248808C2240808C224880B9 +:104F30008C2240808C2248808C2200000C000000D3 +:104F40000C0000000C0000000C0000000C00000031 +:104F50000C0000000C0000000C0000000C00000021 +:104F60000C0000000C0000000C0000000C00000011 +:104F70000C0000000C0000000C0000000C00000001 +:104F80000C0000000C0000000C0000000C000000F1 +:104F90000C0000000000008100000000080000007C +:104FA000000004002000480000001000100048002D +:104FB0000000902412004800000090241200802479 +:104FC00002008024020048201220000000004880D7 +:104FD00000204800000000201200902412004880A9 +:104FE00000204800000048000020000000000000F1 +:104FF00000000020120048800020488000204880E7 +:105000000020488000204880002048800020488000 +:1050100000204880002048800020488000204880F0 +:1050200000204880002048800020488000204880E0 +:1050300000204880002048800020488000204880D0 +:105040000020488000204880002048800020000088 +:105050000000000000000000000000000000000050 +:105060000000000000000000000000000000000040 +:105070000000000000000000000000000000000030 +:105080000000000000000000000000000000000020 +:105090000000000000000000000000000000000010 +:1050A0000000000000000000000000000000000000 +:1050B00008000000000260000640FFFFFFFF5F13D2 +:1050C0003F15FFFFFFFF3F157707FFFFFFFF770B40 +:1050D000571BFFFFFFFFFFFFFFFFFF5F0C0F3B3B77 +:1050E0005755F0F0F3F3FFFFFFFF3F153F003F156B +:1050F0005F13F0F0FFFFFFFFFFFF5F1F3333555FCC +:10510000FFFEFCFFFFFE1F0F37003F30330F3F0C49 +:10511000F5053F0C35351D1D7744CF033F301D1D70 +:10512000F303F303CF033F0CF3035F501D1D474709 +:105130001D1DAF05F3035353F3033F0CF505CF03D8 +:105140001D1DDD11F3035353353577440F335533AC +:10515000550F0F337744774477443F0CF3033F30C8 +:1051600035350F0FFF00FFFF3333FFFF3333FFFFF2 +:10517000FF00FF00FF00FFFFFF00FFFF3333FFFFD3 +:10518000FF00FFFF0F0FFF005555FFFF5555555509 +:105190000F0F3333FF0055550F0FFFFFFF00FFFFC9 +:1051A00055550F0F3333FFFFFF00FFFFFF00333371 +:1051B000FF00FFFF0F0FFFFF0F0F000000000000B8 +:1051C000000000000C3000000000001190060000FC +:1051D00010010000C00040001001000000000000AD +:1051E00010010000C000D109040380289C81000048 +:1051F000040080080C0E0000000000000000000009 +:10520000140100008C01000000000000000070008C +:10521000100100008000000010010020804000000C +:10522000000000000000000000000000000000007E +:10523000000000000000000000000000000000006E +:10524000000000000000000000000000000000005E +:10525000000000000000000000000000000000004E +:10526000000000000000000000000000000000003E +:10527000000000000000000000000000000000002E +:10528000000000000000000000000000000000001E +:10529000000000000000000000000000000000000E +:1052A00000000000000000000000000000000000FE +:1052B00000000000000000000000000000000000EE +:1052C00000000000000000000000000000000000DE +:1052D00000000000000000000000000000000000CE +:1052E000002340000000000000012000000000003A +:1052F00000004000000000000001D12080000004F8 +:1053000014918100200000008402000000000000D1 +:1053100000004100200000002C01000000000000FF +:1053200000004000000001000801402000000004CF +:1053300008910000000000000000000000000000D4 +:10534000000000000000000000000000000000005D +:10535000000000000000000000000000000000004D +:10536000000000000000000000000000000000003D +:10537000000000000000000000000000000000002D +:10538000000000000000000000000000000000001D +:10539000000000000000000000000000000000000D +:1053A00000000000000000000000000000000000FD +:1053B00000000000000000000000000000000000ED +:1053C00000000000000000000000000000000000DD +:1053D00000000000000000000000000000000000CD +:1053E0000000000000000000000000000038000085 +:1053F00001000000000000000080C800C90000009B +:1054000010008013800000C8008000138000C800D6 +:1054100083C00023440300C0C40003030000000055 +:10542000000000000000000000EBC4058000000048 +:10543000000000000000000000DBC8C8C8004444B1 +:105440000B90810554800000000000000000000067 +:10545000000200000000000040000000000000000A +:1054600000004000000000000000000000000000FC +:1054700000000002000040000000000000000000EA +:10548000000040000000000040000000000000009C +:10549000000000020000000000000000000000000A +:1054A0000080001004000020000000000000000048 +:1054B00000000000000800000000200500000000BF +:1054C0000008000000000000000000000040000094 +:1054D00000040000000000200000000800000000A0 +:1054E00000000000080000000000010000001000A3 +:1054F0000000000000840000000000000000000028 +:10550000000800004000000002000000000200004F +:105510004000000000008000800000000002000049 +:1055200080000000C01000000008002004020508F0 +:10553000010000000000000000000000000000006A +:1055400080000020000000000000000200000000B9 +:10555000040000200202C000000200000000000061 +:1055600000000000008000000000000001000000BA +:10557000000000000000010000000000000000002A +:10558000000000000000008000000100000000009A +:105590000000000000000100000000000100000009 +:1055A000000000000000008000000000000000007B +:1055B00000000000000400000000000000000010D7 +:1055C00000000000000000000000080000000400CF +:1055D00000000801000000000000000000000000C2 +:1055E000004000000010000000000000000000006B +:1055F0000000000000000000000000000000200883 +:105600000000000000000004000400000000000092 +:105610000000200000000000000000000000808565 +:1056200091800000A2410063280000800665000010 +:105630002081000020410003083000000400080021 +:105640002000809E03440000102C1480010002A062 +:1056500071000080C30580002080686008880E808B +:10566000718000002034000018010086F1000282E1 +:10567000018C149AA2000C2700310C0000EA0202EF +:105680002810200002000C8201300CB8A2E90807A3 +:105690001830A08626640E13605214493A420283E1 +:1056A00062110C8012014802284A02093032839AA2 +:1056B000168C1098A2682292010850A0018002C79F +:1056C000294B6086C130800000008000000000008F +:1056D00000000000010002000000000000000003C4 +:1056E0000000000000000080000000040000000036 +:1056F00008000000F060000020000000F000000042 +:105700000000000000000000000080000000800099 +:10571000000000000000000000000004E0000000A5 +:105720005800000000000000009000000000000091 +:10573000000000B289280C40A0484004822D01C01E +:10574000006000A3212A0C0020484004E08800806B +:10575000010C0C83630214C6C1380000E033819849 +:1057600005842040E20000E7C3C00004600A140082 +:105770000000100020080000204330200300C0C6B5 +:10578000E5420C8B23082CD02C02000BE230ED609C +:105790002000021082110006220008A0E33000134E +:1057A000A860001B00B00CCB00601E1072103146C8 +:1057B000203C0C07F054140B0000030300082000E9 +:1057C00020000883200A2D1000004244624C0D1076 +:1057D00000180810E0085000C83222020000000142 +:1057E0000000002000000000000087800100000091 +:1057F0000000000003000000001040000000000056 +:105800000000000000000040048060000002000072 +:10581000000062000000000000600000840100073A +:1058200000002E0003000000000000000000000047 +:105830000000000000000000000000000018000050 +:1058400000000000000000001A000BA08208008386 +:1058500000201000852400100B020A0080080001BF +:10586000000B0000021070140E0910F02800202216 +:105870000040100002014028420180028005000023 +:1058800010120040000008005D02000840062010D1 +:105890000900000043A85081360008081042412C3E +:1058A0008A1A0000000086002418034A2800428457 +:1058B00000191850000441000A4002048D20022201 +:1058C0000001010800101C53000019094140220486 +:1058D0000020014440020C00200000102400C024DD +:1058E0001000011044004268010224080342000035 +:1058F00000000000001020000000008000001000E8 +:1059000004000000000000010402000000400080CC +:10591000000000021002000000000000040000006F +:105920000000000004000000000000000040000033 +:105930000000000000000000040200000000000061 +:1059400000000002800000000000000000000000D5 +:10595000008800000000000000008000000001003E +:10596000C0E1002D0A00080020B0408783800C00B1 +:1059700000340008106800800100820FE0010C462E +:10598000580806041080140005003E8360000040A3 +:10599000B0000000E0802A0000004804E0000000A1 +:1059A000D0389E483000000000680800700032D0F7 +:1059B00004301287E3001418203148948B42010010 +:1059C000C060AEC7608008800140068B0040106355 +:1059D0000800004403001500B000008220000140D0 +:1059E00000808F8FF8010DC1A410A60088802A5076 +:1059F00008640C8360405540C0601004E74210C04A +:105A0000000100800500000000000200000000000E +:105A100000000008C001000000002E088000000007 +:105A20000000000000000000000000050000000071 +:105A300040001000E0000000C00080006000000096 +:105A400000000C0500000000000000408000000085 +:105A500000000000E0000000020000000000000064 +:105A6000E0005000000000000000000000000047BF +:105A7000000C0080C116004400282900D03000C06E +:105A800001104E40D102000A50B000800944008746 +:105A900000000120A000000250305680016002206A +:105AA000680100E0D560000028300880020028006E +:105AB000E0680020A0100045610100184912308004 +:105AC000712C1080C1040EC771783588A20622643B +:105AD000103000000A4D90D7E109298002000080B3 +:105AE0006C383110000801970134146001B088A2AD +:105AF000282D0008C8100EA771300C0002E90CC751 +:105B0000692808A0A100269A6A3914080080038435 +:105B100070381080450000000000000000400000C8 +:105B2000000000000018000000000000000000005D +:105B30000000000000000000000000002000400005 +:105B40000000000500000C00040000000000000739 +:105B500004000000B00060000000000000000080B1 +:105B60002900000000000000040000000200000006 +:105B700000000000000100000000800280800200A0 +:105B80009008000004010180400020042004505AC5 +:105B900044040088840940414008480409094048F9 +:105BA0008C41441C290A80043914813404004418AF +:105BB000944024008C0048844C8C011C8924219141 +:105BC0001124040C44022201840241024401428453 +:105BD00040424448840009404800045440100408EE +:105BE0002980001C4041810280814120400002291F +:105BF0000A40000024448144299202808008300237 +:105C0000002101502848208102001A015120019CE6 +:105C1000400190088C0091080A0049144148112461 +:105C2000001009000010181000080800101C1404CF +:105C30000200041000000014100C0200824000005A +:105C40000400001400120000000001000000040025 +:105C500000000401000000000012040044040000E1 +:105C6000000040000010008040000004020000021C +:105C7000080000000008000000000004000400000C +:105C80000000000000000000000000000080000094 +:105C900000000D00301C0C08BC000C0D000D250A86 +:105CA000100019180070802C000C700D7EB80C22AA +:105CB00038789D9C0C0EBA3C088CBC0C183CBE1469 +:105CC0000904BC1C3E1A04000C5E78896C08B938C3 +:105CD000083A9D1D150EB00CB90A0C817E0CA01C53 +:105CE0002C70B91A7D3D05081E065C700C701038CA +:105CF000001025081C08B81879A090B8000E79008B +:105D00007958981C3C0A527920087D887C1C3D14E7 +:105D100059583974205855147CB808B8902A3C7DDD +:105D200034B8001024093C185875355CBCB8BC3D2B +:105D3000900C1979B83A48A950343C30901CB454AE +:105D40003034300070B0B030A15C9010105C0000B6 +:105D50000CA070B050000010703000709000000077 +:105D60000400010000000040020006B40030000002 +:105D7000000060000000000080100400000000909F +:105D800000000000000000000248009000060D0125 +:105D900000000000000000000000000000001000F3 +:105DA000000030543000080030800B5109085110B9 +:105DB0001660B058A0501A0C38087A961C5C11185E +:105DC00036502A88DC4C1000302C28782C543109AD +:105DD0003C0D28197C5F19002CB01D602C003A1C6A +:105DE0003C3C0C0C08B0183C7C3C7C0C1800250496 +:105DF000385918E59908109410B81C36B86A6C1018 +:105E00001E50881D1F0E8C46B81761083E181D09CC +:105E10001E301017326709BCECBA7E40BC191C1941 +:105E2000100DDC91264010598635041F3632131DA3 +:105E30000CFE0C7C35315C1C9FF03FDA3C60185046 +:105E4000086314783816083C0756085000510000C3 +:105E5000008000010A580C08080008000001000C2E +:105E600000080C00312000000800000806040000B3 +:105E70000000000001000C00000008080000000104 +:105E800000700800180400000000000000000B1063 +:105E9000200A000C0070000C00000000060000004A +:105EA00000000008000400000000000000000000E6 +:105EB0000000B000000800000000000040010000E9 +:105EC0004002000200000000000200000028B400B0 +:105ED00000008000881084400004000000A0000042 +:105EE0000C02000400300C0D40200000B0300031E6 +:105EF00000140000000C10284000000000390600CB +:105F0000000020000202040D0040100640200E0D8B +:105F10008C020000800C003000300D008238B00090 +:105F2000001201000430002105900C020C3C00A07E +:105F3000008100000008080002020000400100008B +:105F400042011000008840001012008000003C0157 +:105F500000000000018000813030000008880081CE +:105F600000000000000000A00022000030800200BD +:105F700000000000000040000000000000080000D9 +:105F80000001000030800000000000000000000060 +:105F900000000000000000000400000004000000F9 +:105FA00000000000000000000C00000000000000E5 +:105FB0000000000000000000000000000080000061 +:105FC00000000000000000000000200000000000B1 +:105FD00020040000020C000000000100000C008002 +:105FE00000025040004442000190320000020000D4 +:105FF0000030000C000C00000050000C204000009D +:106000003040804800A104000001814020000000D1 +:10601000008E0E0100808020003C00081000A000CF +:106020000030040A100C0000300910400048020043 +:1060300038824000108C04000288004806A002004C +:1060400010311070002C000800120100080C000034 +:106050003032000C281C80000032300C407C0030B4 +:1060600000004208000040000400003840800000AA +:106070000000102800300000000000B000BC00004C +:10608000003004000030400000003000000000003C +:1060900000300000000C000440000000010000007F +:1060A00000000000000000000400000001020000E9 +:1060B0000100400000000400000000010200000098 +:1060C00000000000000000000001000000000000CF +:1060D0000010000000000000000000000000200090 +:1060E000000000000000204202000000000000004C +:1060F000080800000010084202040004002000000C +:1061000000000000001000460A080049402028C88E +:1061100000000000100081010020060000000008BF +:10612000000000000040C0420100002043200A0897 +:10613000280820184333C800084900000004210142 +:106140000004000000000000200000000004000027 +:1061500000000000283020000000000400200000A3 +:1061600000000020002000040028000000000004BF +:10617000002000000000810100000000000000007D +:106180000000002008082000002800000000000097 +:1061900000200000100000000020000000040404A3 +:1061A0000000000080690000000000040000C00042 +:1061B0000000000083410000000001000400000016 +:1061C00000000000000000000000040000000000CB +:1061D00000000000000000000000000000000000BF +:1061E00000000000000000000000000000000000AF +:1061F00000000000000000000000FFFFFFFFFFFFA5 +:10620000FFFFFFFFF6EBFFFFFFFF03010000FBFFB7 +:10621000FF550B000F0500D0DDDC0501FFF30FFF7C +:106220005555F1F0151177AFD0A0FFF9FF7F0106AA +:106230000100FFFFFFFF33323F000BBBFF010303F1 +:10624000FFFF1F0F5F13FCFF5F13000F0200F2F34D +:10625000FDFFF30335357744474735355F503F3011 +:106260003F30550F53535F50CF033F0C4747DD116D +:106270003F301DFF00E0FFFF55553F0CF3035F501B +:106280005F50F3033535F5051D1D3F305F503F303E +:106290003F305353F30335355F5055550F0F555568 +:1062A000FF0033330F0FFFFF0F0FFFFFFF00FFFF54 +:1062B000333347471D1D0F33DD11FFFFFF00FFFF85 +:1062C0003333FFFF333333330F0FFFFF0F0FFF0065 +:1062D000FF000F0F33330F0F0F0FFFFF3333FF009C +:1062E000FF00FF000F0F33333333FFFF0F0FFFFFAC +:1062F000FF00FF005555FFFF333300000000000092 +:1063000000000000000000000000000000008024E9 +:106310000E0080240E0048000C2080240E0048202F +:106320001E2000000C0000201E0000000C00900445 +:106330000C0090040C0000201E0080040C000000E3 +:106340000C0000000C0080240E0048201E200000DD +:106350001C0000000C0000000C0000000C000000FD +:106360000C0000000C0040808C2248808C22408071 +:106370008C2248808C2240808C2248808C22408055 +:106380008C2248808C2200000C0000000C00408011 +:106390008C2248808C2240808C2248808C22408035 +:1063A0008C2248808C2240808C2248808C220000E5 +:1063B0000C0000000C0000000C0000000C000000AD +:1063C0000C0000000C0048800C20D0840C20000041 +:1063D0000C0000000C0000000C0000000C0000008D +:1063E0000C0000000C0000000C0000000C0000007D +:1063F0000C0000000C0000000C0000000C0000006D +:106400000C0000000C0000000C0000000C0000005C +:10641000000000000000000000000000000000007C +:10642000000000000000000000000000000000006C +:106430000000902412000000000000000000002076 +:1064400012000000000000000000480000200000D2 +:106450000000000000008024020000000000800412 +:106460000000002012009024120048201220480052 +:1064700010200000000048201220488000204880A2 +:10648000002048800020488000204880002048806C +:10649000002048800020488000200000000000000C +:1064A000000048800020488000204880002048806C +:1064B000002048800020488000204880002048803C +:1064C00000200000000000000000000000000000AC +:1064D00000000000000000000000000000000000BC +:1064E00000000000000000000000000000000000AC +:1064F000000000000000000000000000000000009C +:10650000000000000000000000000000000000008B +:10651000000000000000000000000000000000007B +:106520000000000000000000000000000800000063 +:10653000000000000000DDCF0109FE32FFEFFBFF8D +:106540001110FFFF55550F051101FFD7EFFF550043 +:10655000DFFFFF7F3F55AA55FFFEFDFDBF33FFCF95 +:106560000B0A5100B0A0DD114747FFFFFFFF0002FB +:106570003F15FFF7EFCCDDFF150055111300FFCFDE +:106580005501050F07047F4F7F4FFFFA00885353D3 +:106590003535DD11CF031D1DDD111D1D774453530E +:1065A0005F501D1D3F0C3F0C4747F505F303FFFFF0 +:1065B0000F0F7F75FBAB3F307744CF03F3030F33EF +:1065C00035351D1DCF03CF033F0C77447744F303CC +:1065D000DD1177445353FFFF3333FFFF5555FFFF62 +:1065E0005555FF000F0FFFFF3333FFFF0F0FFFFF66 +:1065F000FF00FFFFFF000F0F0F0FFFFFFF00FFFF68 +:106600000F0FFFFF33333333FF00FF000F0FFFFF88 +:106610003333FFFF3333FF00333355550F0FFFFF85 +:10662000FF000F0F0F0FFFFF5555FFFF0F0F333305 +:106630003333FFFFFF0000000000000000000040B7 +:106640000C0000000000000000000028000080286E +:1066500000D600080000800800000120040000208F +:1066600000000024100100200001800900008028A3 +:1066700000E280090000802800F6100010010000F0 +:106680000000100910018028800050001401002033 +:1066900028400000140100008800000010010000E4 +:1066A00000010000000000000000000000000000E9 +:1066B00000000000000000000000000000000000DA +:1066C00000000000000000000000000000000000CA +:1066D00000000000000000000000000000000000BA +:1066E00000000000000000000000000000000000AA +:1066F000000000000000000000000000000000009A +:106700000000000000008008000A000000000000F7 +:106710000000000000000000000000000000000079 +:106720000000000000000000000000000000000069 +:106730000000000000000000000000000000000059 +:106740000000000000000000000000000000000049 +:106750000000000000000000000000000000802891 +:1067600000000004008680000000000000000321FB +:1067700020000004000040200000000408018020E8 +:1067800000000004008A8020000000040082400015 +:10679000000000000000402800000004400101202B +:1067A0002000000404904100200000002C01400063 +:1067B0000000000040010000000000000000000098 +:1067C00000000000000000000000000000000000C9 +:1067D00000000000000000000000000000000000B9 +:1067E00000000000000000000000000000000000A9 +:1067F0000000000000000000000000000000000099 +:106800000000000000000000000000000000000088 +:1068100000000000000080000000000000020000F6 +:106820000000000000000000000000000000000068 +:106830000000000000000000000000000000000058 +:106840000000000000000000000000000000000048 +:106850000000000000000000000000000000000038 +:1068600000000000000080000000000000000000A8 +:106870000000E0000000C000004300000003000032 +:106880000000004300A2C604C30003818000800012 +:106890004681030F00C0A020E3000062A240C26254 +:1068A000C32200000000C88000800040CBC003006D +:1068B000CB2000C8C4534663810000C0010080059E +:1068C000C5C081802080410080050000000040009C +:1068D00000000000020000000000000000020000B4 +:1068E0000000000000000040000000400000040024 +:1068F0000000000000004000000000000000000058 +:106900000000000000000000000000020000000085 +:106910000000000000020010000000000000400025 +:10692000000000000000000000000000C0000000A7 +:106930000000010000100400000000000000000042 +:106940000000000000000000010000000005000041 +:1069500008000000A000001000000000000000057A +:106960000004000000000010000000000000030010 +:106970000000000000000000000000000000000017 +:10698000000000000000000000001080012800004E +:1069900000480008000000210004040484000203F1 +:1069A000800080000403080088040000200000200C +:1069B0000420142018000000000408040002002035 +:1069C000204003010200000000200420C00010202D +:1069D000400080004020A00A000241008800000022 +:1069E00000000100000000000200000000000000A4 +:1069F0000080000000000000000000400000004196 +:106A00000000000000000000000001000000000085 +:106A100000000000000000000000000000000080F6 +:106A200000000000000000000080000000000000E6 +:106A30000000010000200000000004000000000031 +:106A40001000000004002000000000000000000012 +:106A50000000000400000000100000002000000002 +:106A600000000400200000000000080000000000FA +:106A700000001020000008000000000000000000DE +:106A800000000200000040002000000100000000A3 +:106A900000000000000000000000060000001C16BE +:106AA000F0008E0000008010000002802001000E27 +:106AB000F4000EC70900000AF0150E230000000ABA +:106AC000F200068252800120004802055C48000E58 +:106AD00001482C405800200EC0E8080300000009BF +:106AE00032000C970370009415020C80280100AB53 +:106AF000034000402C300200C20001020038202078 +:106B00000041000360300C0022008880707A023A55 +:106B10000040006201000080C20008C0757A0C20AD +:106B20003A000C20907A0340C400328003300E00FB +:106B3000006C188360530D80C20000001800000034 +:106B40000000000000000000F00000000000000055 +:106B5000207080070000408005B000200000001E6B +:106B600000700000000000880104008001000000A7 +:106B7000F000000000000080030000000000008022 +:106B8000F1000000000000002014000000000000E0 +:106B90004000800000000000001000000000000025 +:106BA00000003000000000000000000000000EC0E7 +:106BB00001002C0120002000000020010000020044 +:106BC000EB020044C0602004E000400041102010AF +:106BD00062014040A40022B4C1120009E1724105E3 +:106BE0002000006000041E0002000001C010E0A4AC +:106BF000010000E001704C83C00000C000602287EB +:106C0000230000032048008780B0804804840217D6 +:106C1000027C0C64C03C4E3702745400A80200830E +:106C20000D3800010000009080014080C10022204A +:106C300092381441A00240076238088EA18248A70A +:106C40000174144604608E00E01280C00C00001035 +:106C5000000000000000000008000000010000002B +:106C600000000000000006B46001148001400080B4 +:106C700000008006008000000000001000302000AE +:106C800008000000000000000000000002000000FA +:106C90000000001000000600000000000068000076 +:106CA00000000000000000A2010000000008000039 +:106CB0000000000000005000000000000000000084 +:106CC00000004A000600C80118008400000000818E +:106CD00000006204040080020CC02416050140205C +:106CE000002104008A00004549004910100000A05E +:106CF000341C2003000200C6000120000500C00271 +:106D00002C054040010000C01008F006000900C832 +:106D10000046C1988C1200804E0C285205405180CC +:106D2000200420388E22030000059002402219180A +:106D300005120420400003B028B800B20200007021 +:106D40003D000400010018800004C1288A010019D8 +:106D5000200400000000035A000190000100088098 +:106D600002080000000000000000000020000020D9 +:106D700000000000000000002220102000000100A0 +:106D8000012500000000004000000000000000029B +:106D9000000008000000000000800000000000006B +:106DA00000000400000000000000100000000000CF +:106DB000880000000000000020100100000000001A +:106DC00000000000000000000000000000000000C3 +:106DD000000000000000088003000000E0022E0216 +:106DE00000000016000000000B0000C620090E483D +:106DF000F20100C00514C80400000003A16202F8FB +:106E0000D301005004001C0400000009000010C061 +:106E1000204000000001279803008041E0020CA8F8 +:106E20000102008841780C05030040C6C038028783 +:106E3000C301014050301E87E3000103504100822E +:106E4000E0004140C0100C93650055805100008265 +:106E5000050000402000ACEB01002EC00240028380 +:106E600001000C00A032A74DD7411500B041A6ED9E +:106E7000D1810000C008060B0000000000080008D7 +:106E80006000000000000600000000000000800715 +:106E9000000211000040000000000000000000009F +:106EA000E70100000000000700000000007806B0C5 +:106EB0007000000000002E000000000020180008F4 +:106EC000000000C0050000070000400000001C009A +:106ED000000000C0050000000000000000004001AC +:106EE0000000000000000000000028E001006C002D +:106EF000C0008C00000093805200006F28003021F9 +:106F0000E4100067710000DA3102208310000008ED +:106F100048040CC471000098C3108C041840008809 +:106F20000AE002A028312D16C0700E23E000009662 +:106F30000B0008072001000E1A124C050000800407 +:106F4000A53088E70104001608000EC7713080568E +:106F5000C0604692A230002600B01D03040414084D +:106F6000006000C7010000802100188785500C01D7 +:106F70000648068365504E0A0000064551381480C5 +:106F800042800E45510821095031200000000000C8 +:106F9000101000000000001600002000000000009B +:106FA0000200000750001000006000000000000018 +:106FB000000000000000000000004600000000008B +:106FC000000020030400000000000000000000009A +:106FD00000920000000000000000400000000006D9 +:106FE000007002000000000000000000000000002F +:106FF00000007000000000400000400008008C010C +:1070000040000441084001040020049110000018D1 +:107010009C105018003201800C414004045918049F +:107020003212888424342C2400488050484841522D +:10703000002494410180298A20808C24044201216B +:107040003084288A84402002818C040230004190E0 +:10705000202120010281898432211400408009040A +:1070600024048402218080805112814118104C0830 +:1070700020140200810082800A0400419200114124 +:1070800080940049000028018102288101840219AE +:10709000000000808989000110080A022188001080 +:1070A0000A81100418121C0411121C0400000008AC +:1070B000000140040008908000094404040000001E +:1070C000200C00000A000800400020001C02000400 +:1070D0000004010000000000210000001800004032 +:1070E0000801080000010200000001080000000281 +:1070F0000084000000080001020000000000000001 +:107100000008000000002000000000000000000057 +:107110000C000C000000000E0C0D0C7D900E0031D8 +:107120003822291828343030981D7402000A080AC1 +:107130000028145A160D087A98206406B1780810B1 +:107140007C68121A7C09393A5D3E0C0879700C761D +:107150000A6000513D0C283C305C50860D0425220D +:107160001C0EB80A751AA908086058013C0C1D517C +:107170003AA0880CA1097A013AAA50193039BCBD4D +:107180001C35A80890107CBC9D9D0E20888C193061 +:10719000398C103128385D8054302C306D0C080D3E +:1071A0000471A23C015A09AC787C913C1AAC8C5E0B +:1071B00099AC2E3A08181C111C3D1810101E18709E +:1071C0000000051C001CB506900C3590B0A8B0005E +:1071D0000C010000708C00003C50080D0D000000F8 +:1071E0000C000030090000900000000900000000C1 +:1071F000000000000C000C000000000E80000000E9 +:107200000000000001001C0A000840020100B0005C +:1072100002000000000800000000600000000030D4 +:107220000000306000403C5C3A70081C4A2A6950FB +:107230000E10080C7BD0D06038511A004B14691026 +:107240000C3C010400200A5808781008112C141C6A +:1072500000001F003A20941C6118289858BE14247E +:107260001E103C087018683C2005BE949C3F3058A6 +:107270003838C8D83750393610B83E65E90C042C78 +:107280001939087696065CD938082C8C940A1A9617 +:107290003C082D1C004E3C8A360D5D73146ABCB24E +:1072A0007849D6BC180700BC8B1900300BC69AC8A9 +:1072B000180DBAAC7D2C5C6400000A2F1030008DD4 +:1072C0000A700C0C3C368A006CB1018C0004088DED +:1072D000084008040080508050811208000000001F +:1072E000000C1C88090000000000000088007000ED +:1072F000800030060801008C000808000000000033 +:107300000C000000000000200060000000580C008D +:1073100000000000000000000010810000000000DC +:10732000000000000000000000000000000000005D +:10733000000000000000000000800D00000180003F +:107340000030000000028800000C00000000000077 +:10735000001080000412000000302430000090046F +:107360008030023400208000003000204000A02047 +:107370000030000030094000810080000C12000045 +:10738000B0304022800040018000002044302008BE +:1073900050B0000000384022043880800430802043 +:1073A0000030020100383080B11830003012000C7B +:1073B0001C014600000011220CB0013000B0810019 +:1073C000102980888030000000000E40200000B0AE +:1073D00008080002003000000048408000A00C8037 +:1073E00030181C8002000001000000800000000036 +:1073F00000800081000120880C84008004000000CF +:1074000000000000000000000088400004000000B0 +:10741000200000800C8000000080000000000000C0 +:10742000000000000000000000000000000000005C +:107430000000000030000000008800000000000094 +:1074400000080000000000000000000000700000C4 +:107450000104300100480040000431000002000037 +:1074600000000000008000080184000000A08044AB +:1074700000003000009004410040300100A002A054 +:107480002000B040008100004004300004083000BB +:10749000008C000170B4304C1000200030380040E7 +:1074A0000140800000500800004038400242103483 +:1074B000028A004002500C0C0088401044804000BA +:1074C0004084400200003E000020444042400E4004 +:1074D00000203C0000461010180000000030081C7E +:1074E000000000204032000C00900000001210202C +:1074F00040B00020408840300830000C01010030CE +:107500004000000000004020003C80310831002095 +:107510000100000000000001000004000030300005 +:1075200001000020800000200010000080300000DA +:1075300000008000000000000000002000000000AB +:10754000000000000000000C400000000032000CB1 +:107550000000000000020000000000000000000029 +:1075600000000800000000000045C000040000000A +:107570000000000000000000000000C40000824085 +:10758000C2230804000410080420000004000404BE +:107590000060006202000000100000C0000800044B +:1075A00080070101080000504A2400000008004044 +:1075B000422401010000000818000402020804002F +:1075C000004100040004000000200000000C000046 +:1075D0000008000000000000180000040020000067 +:1075E000000400000010000010000008041000005B +:1075F00000200804100000100820000000200000F7 +:107600000000000004000880020C080000200000B8 +:1076100000008104000000001000000000200000B5 +:107620000C008101000000000000000000000400C8 +:1076300000080000000000204300000008000000D7 +:10764000000000000404000000000400000000200E +:1076500000000000000000008003C00400004001A2 +:107660000000000400810001000080000000000014 +:10767000000000000000FFFFFFFF003BF0C0010121 +:1076800037FF135FFEFF000F0200FF7F0704FEFFBE +:107690005555FF7F3232FFFD7733005410111333FD +:1076A000333BF4007737BBBBBFFFFFFFFFFF5F1328 +:1076B0003F155F133535FBFB0F077744CFCFFFFF37 +:1076C0003333FF7575FF3700F3F7DDCDF5F17F4FED +:1076D0000F00FFEF15001B1B774435355353FF7F19 +:1076E0000A80FFDFFFEF0F030F11F66FAF23774420 +:1076F0009300FF553300CF03CF0335353F0C3535AD +:107700003F305F50330F1D1DCF033F0C1D1DF30392 +:107710000F33DD115353FFFFFF00FFFF0F0FFF007B +:107720000F0FFFFFFF00FFFF3333FFFF33335555CC +:107730005555FFFFFF000F0F0F0F3333FF00FF0002 +:107740000F0F5555FF00FFFF5555FFFF0F0FFFFFB0 +:107750000F0FFFFF3333FFFF333333333333333311 +:107760000F0FFFFF3333FFFF5555FFFF0F0FFFFFD5 +:1077700055555555FF0000000000000000000000B6 +:107780000000000000000000000080240E004800FF +:107790000C2000000C0080040C0000000C004820AD +:1077A0001E2000000C0048201E2000000C000000DD +:1077B0000C0048000C2000000C0000000C0080248D +:1077C0000E0090241E0090040C0000201E00800477 +:1077D0000C0000000C0090040C0000000C000000E5 +:1077E0000C0000001C0000201E0040808C224880FD +:1077F0008C2248201E2000000C0000201E000000EB +:107800000C0048201E2000000C0040808C22488084 +:107810008C2240808C2248808C2240808C224880A0 +:107820008C2240808C2248808C2200000C000000BA +:107830000C0000000C0000000C0000000C00000018 +:107840000C0000000C0000000C0000000C00000008 +:107850000C0000000C0000000C0000000C000000F8 +:107860000C0000000C0000000C0000000C000000E8 +:107870000C0000000C0000000C0000000C000000D8 +:107880000C0000000C0000000C00000000000000D4 +:1078900000000000080000000000000000000020C0 +:1078A00012004800002080240200802402004800CA +:1078B0000020480000200000000000000000000040 +:1078C00000000000000000201200000000009004F2 +:1078D00000004800002090241200000000008024D6 +:1078E00002009024120090040000482012200000A2 +:1078F00000000000000048000020482012204880BE +:10790000002048800020002012000000000000201D +:10791000120000000000000000000000000048808D +:1079200000204880002048800020488000204880B7 +:10793000002048800020488000204880002000006F +:107940000000000000000000000000000000000037 +:107950000000000000000000000000000000000027 +:107960000000000000000000000000000000000017 +:107970000000000000000000000000000000000007 +:1079800000000000000000000000000000000000F7 +:1079900000000000000000000000000000000000E7 +:1079A00000000000000000000C00000000000000CB +:1079B00000005755150533B377F7FFFFFFFFFFFFB3 +:1079C000FFFFFEFFEFFEFEE7BFFFDDFF55D5FEFF29 +:1079D000FF3F40FF07CF40000777FFFE11008408FC +:1079E000AEA01313BFFFFFF5FFD55F137707F505B3 +:1079F0003F30FFFFFFFF0F050F03DDCDFDFDF3FF60 +:107A0000FFCC010055510505F7F00A0A000A030FE3 +:107A100005011D1D0F337744CF03BF1F7F7F5F3FDD +:107A20003F5F7F3B07000ACAFF7F7FFFDFFF0080C9 +:107A3000BE7D5F0A77227744F303CF03F3033F3021 +:107A4000272747473F30CF035F501B1B2727BB111A +:107A5000DD11FFFF5555FFFF3333FF003333FF00C8 +:107A60000F0FFFFF3333333355550F0FFF00FFFF69 +:107A70005555FFFF3333FFFF5555FFFF0F0F3333CE +:107A80000F0FFFFF33333333FF000F0F3333FFFF8D +:107A9000FF003333FF00FFFF5555FFFFFF00FFFFDF +:107AA000FF00FFFF5555FFFF3333FFFFFF00FFFFD0 +:107AB0000F0F000000000000000000000C0000009C +:107AC00000000000000000000400002008C01300B7 +:107AD000100380000802000000008008002400005D +:107AE00000008008002200000000000000000000EC +:107AF000040000002C008009040080080C00000035 +:107B000004008028084C1100140180280064000043 +:107B10001401800884220000000000000000000022 +:107B200010018028009300000000000000000020E9 +:107B3000040000202000000004000020200000209D +:107B40000000002000000000000000000000000015 +:107B50000000000000000000000000000000000025 +:107B60000000000000000000000000000000000015 +:107B70000000000000000000000000000000000005 +:107B800000000000000000000000000000000000F5 +:107B900000000000000000000000000000000000E5 +:107BA00000000000000000000000000000000000D5 +:107BB00000000000000000000000000000000000C5 +:107BC00000000000000000000000000000000000B5 +:107BD0000000000000000000000001282000000854 +:107BE00084C0D100040000011422800000000000C5 +:107BF0000002800000000000000200000000000001 +:107C000000000100200000000400810020000000AE +:107C10002400812020000004848A91302000000488 +:107C20000092C100200000002C03000000000000B2 +:107C30000000C02000000004408700000000000099 +:107C400000000128200000040400010820000004B6 +:107C50000400000800000004000000000000000014 +:107C60000000000000000000000000000000000014 +:107C70000000000000000000000000000000000004 +:107C800000000000000000000000000000000000F4 +:107C900000000000000000000000000000000000E4 +:107CA00000000000000000000000000000000000D4 +:107CB00000000000000000000000000000000000C4 +:107CC00000000000000000000000000000000000B4 +:107CD00000000000000000000000000000000000A4 +:107CE0000000000008000000000000000000C400C8 +:107CF0000063A3E3E000002301030013C080000041 +:107D00000000404000000018042000000020000097 +:107D1000002020020003C723C7230323C7C0C3C317 +:107D2000C30B0300C00300C0474000C3C00700806E +:107D3000C5538303C8000300C380C0008010000047 +:107D400000000120C01000810181000145220000D7 +:107D500000000000000200620022D4224700000060 +:107D60002260C622C422020044E044004400000015 +:107D70000000000000000000000000000000000003 +:107D800000000000000000000000000000000000F3 +:107D900000080100000000000000000000000000DA +:107DA0000000000000800000000000000000010052 +:107DB0000000100000000000000040000000100063 +:107DC0000020000500000000000803800000000003 +:107DD0000080002000000000000000000000000003 +:107DE0000000000000000000000000000000000093 +:107DF0000000000000000000000000000000000083 +:107E000000000000002004200000200040080000C6 +:107E1000880402C002C0034003400000004000008C +:107E200001000004000008800080040004048400B5 +:107E30000420C003C0010808820100204020000C7B +:107E4000800000022020C008000040005002800096 +:107E50008000000000022004010000034103010132 +:107E6000400000000000000000800020000400002E +:107E70000400000004200400000004000040400052 +:107E800000000000000000000000000000000000F2 +:107E900000000000000000000000000000000000E2 +:107EA00000000000000020000000000000000000B2 +:107EB000000000000010000000040000002000008E +:107EC0000000200000000000000000000000010091 +:107ED000000000000010800000000000000002040C +:107EE000000000000004000000000000000000008E +:107EF0000000000000000000000000000000000082 +:107F00000000000000000000000000000000000071 +:107F100000000000000006809130100530CA000506 +:107F2000503000800640A8902801008A0332028465 +:107F30000900000FF00516657101008EF2700C4308 +:107F4000D1000000A1B001050038805E22010C14B0 +:107F500060000086219900445900008021C900403A +:107F60006130805800658E0420008089F281008392 +:107F70002801002A40704083200892802A30800423 +:107F800028000001223002A0100000D613060E8740 +:107F900071000080036008406030102004040CC3AE +:107FA00091384C01320220870030420022010080CB +:107FB000210960860200000000000000000002802D +:107FC00001000000F0000000000000000278000541 +:107FD0000000800000000000000000000000000021 +:107FE00050000018F0000000000000000000002019 +:107FF000000080000010000000000080020420004B +:108000000000000000100000000000000000200040 +:1080100060000000E0000000000000000000000020 +:108020000000000000000000000030C005800107D3 +:1080300020400007C038004000400882E03C400378 +:108040002030210324010000C5384600F20080C81A +:10805000A06A100523018000B161C20300402C0119 +:10806000210010047300808E211000450008145078 +:10807000204000C065830001C06002A420020017F8 +:1080800000F08C00C72C406040780C93600A100B05 +:1080900000810004E00000532C866080D0000003C3 +:1080A00000081EB3030200C044002E8001762D019B +:1080B00000300910007C11C00600080062B0D056E4 +:1080C000AC0000A0E14ED040000000000000000025 +:1080D0000000010008000000000000000000000097 +:1080E000000060000000000100000000000000002F +:1080F0000000000000000000000040A2010000009D +:1081000000000080010000070008200000000000BF +:10811000026002200000000005084000000000008E +:108120000000480000020000000000000000000005 +:108130000000000000000000000000000000080037 +:108140002000C00000900019E0D10080023824C057 +:10815000001000D8304200D3200000000000100CB6 +:10816000A1004021054402148F0204E01002000027 +:108170000500002494009134110000A18200001138 +:108180000C0810208000C100820200010024072991 +:108190001802006004000280081000003A0C0288F7 +:1081A00004190280004024010701000844004880AF +:1081B0008A03002C06001010010080C688024020AF +:1081C0002D0001048520032889008040401280048E +:1081D0000561010010460188080200B0428A0000D3 +:1081E000200000000200000000000010001000004D +:1081F0000000000001000004000000000001010078 +:10820000000000000040004040000000000001406D +:10821000000000000000012000000000000000003D +:10822000000000000020000000000000000000002E +:10823000200000000000000000000000800000009E +:10824000000000000000000000000000000000002E +:1082500000000E208A002C01A000000880380000D9 +:1082600000309CA700020C412048300084000CCE56 +:10827000A0600080EF0000700049BC0A02000047C7 +:10828000A040260800000006C20086006302000627 +:10829000F0400018E32D0010C0140C2082000006EE +:1082A00000481683100000C7E40000187B004086D9 +:1082B00001382FC005802A00400082AF6001000411 +:1082C000C04806888300000120012DCF07004083AD +:1082D000C1608884C9804181218012C3604014003C +:1082E0000060880AE0011106004002458240004615 +:1082F000C06000A06000400000004E04000000C00C +:1083000000000C0008000000000100000000000058 +:1083100000018808000000000008000800000000BC +:1083200000080C00C001000000000803000000006D +:10833000000010000000000008000008000000001D +:10834000000000006300400000000000000000008A +:108350000008000000000000000000000000000015 +:108360000000000000000D40800034015031000288 +:108370007050008001348CC3510101A903C2024234 +:1083800018000128048211C371000080C300064751 +:10839000600094810B3E1E2000000105C200061201 +:1083A000540000A606800003000000000202020044 +:1083B0001000800A00400E035000800710880087DC +:1083C000710180860B100C878528086002021CC78B +:1083D00029002C65E8902CCF01000007E8880CC02C +:1083E0000100300AD98A20458030004804100C83EF +:1083F00061393580C1342E856A109040C20050C466 +:108400000110A19601010000000000080200010017 +:10841000000000000040208001000000400000003B +:1084200000000000C0700003000000003010004099 +:1084300001000000081000400100000000000000E2 +:10844000000000000000060000000000E000000046 +:108450000000000000000010000000060000000006 +:1084600000000000001000000000000000000000FC +:10847000000000400818800010010802800C002055 +:108480000810480151012140001A52844210401145 +:108490005441200C2210305A185281203101003AE8 +:1084A000804048229221802434824C340809048080 +:1084B0004C224449200C4104414240022480208A3D +:1084C00000800440208000822104809819400A0224 +:1084D00081025411002024048C0028808041818472 +:1084E0005001319A013091308401508130921992BB +:1084F00040414C8482402081400284288900010050 +:1085000000402C808001820212000100000900223C +:1085100088011800000008140188010000000031E3 +:1085200040001040000202014101000000001181E2 +:108530004011282800010400090000040002110471 +:1085400000100410000000040000000008001008E3 +:1085500080000404008404000100080002020100FD +:10856000028008040000000000000000020000007B +:1085700000000800020400000000000000000000ED +:108580000000000000000000081C0800300D040E70 +:108590000C040C02001008062D5400440D1830B9CC +:1085A0009804011E10BA04B89438183C1C1DB90D6B +:1085B0002954583C5CB8785A225E8D4A01B0443A3E +:1085C0000C1870A990B00C080D080D020978B05A6B +:1085D0000CBD9D0C500A0804A01E08B000090D181F +:1085E00028090C78047E140A8DA9584E8C6DA88C2D +:1085F0000A04A00C10981A187A3834120608152AA2 +:1086000019303C101D395C79AD0C999C20B55EA8E1 +:1086100068B0381C9C0118A0692008083484BE0E7C +:1086200008181D2AB8083C002DAE083E00987D545D +:108630000039B13804111C002CA020B60050A00055 +:10864000BA001010383A546C0000060E0CB0B90194 +:1086500000903000B01A0030000A0008000000B09E +:10866000880010009030000000300000000004007E +:10867000005040000000080002B9000000000000A7 +:10868000000000060000080000006000000000007C +:1086900000000000000000000000421040063150C1 +:1086A000400C420C2148011006023A7838559C11C2 +:1086B000000828380951105001083B50095117345F +:1086C0007A0018B038490B3C3F1130343410001494 +:1086D00038383C30528868201010351C0048186823 +:1086E00038291A0C2910263C011259311E904318C2 +:1086F0003D7C3E305836787D297C29047A302D74B3 +:108700002C403E172A3D341D3B61183C5C37251E2A +:1087100000753E901A0D600CB0AC3C003C3130014D +:10872000B708381E305AEDD10710BC1E1A80390D1B +:10873000594108066FD88698300140808000E008D3 +:10874000010A08010180001901800B278104880CAF +:108750000C0000000600008891001E30000C0C0088 +:1087600008000A080604000C400608000E00000578 +:1087700002000000700000003080080C0A800C002D +:1087800008000000040C0C7000200008000000002D +:1087900000000000000000000000000000000000D9 +:1087A00000000000000000000000000000000000C9 +:1087B00000000000800000000000000000028000B7 +:1087C00000060000002000022801800100100000C7 +:1087D0000000000100200000013000188000A0000F +:1087E00020B000004822A4005C700030003040003F +:1087F0000029900080700400000000000C348C04FC +:108800004C200C0680304A500052002100091421EF +:108810000008020608010201413200000001543143 +:10882000018102A24C42042D401200020080480146 +:1088300010300C021C1050820C020E800482340096 +:10884000090102000081001100000802100100006F +:10885000000000080000009110001C8010000010B3 +:1088600012001200300002008000000000820001AF +:1088700000000280000012020200040810001080B4 +:108880001200120010040000100000000000008020 +:10889000000000000000000800000180000000004F +:1088A00000000000000000000000000000000000C8 +:1088B0000000000020000000000000000000000098 +:1088C0000000000000000000100000000000008018 +:1088D000000C120000040A000040000C0104100407 +:1088E000109000008000000C00800000024040401A +:1088F0001000900400B00081B108B0040080104165 +:10890000006232050145B0201620000D00008000F5 +:1089100002B102413040164010B0151020840240D0 +:108920000432204800000801000004004484004094 +:108930000000B061057C884000B82248008C00002F +:10894000003031880000400082B0703C403C08207C +:10895000023C4200050C0800002480480000010C85 +:10896000000C0000021400000000002040304020F5 +:10897000800000404802480044300C000100000024 +:1089800000BC000C000008200030480C0902410027 +:1089900040008020492048044401000040000000BD +:1089A00000000020010200000000000000000C1088 +:1089B00000000100000000000001000000000000B5 +:1089C00080000000000000008000000000000000A7 +:1089D0000000000000000000000000000000810115 +:1089E0000000000000000000000804000800000073 +:1089F00010000040622000C02C0000002000000099 +:108A00000000000800000004100800000010080426 +:108A100018002004002400240400006004100A044C +:108A2000400202401020810148022448002000102A +:108A30002008000004203800010800000841000060 +:108A400000000000000008200000000008002008CE +:108A50000000000010000000101008000065000079 +:108A600008200800000000000000000000000000D6 +:108A700000000000100000000024000800000010AA +:108A80000420084040000004000000000420000012 +:108A900000080000000004000000000000200000AA +:108AA000000004088003000400200004040000000B +:108AB0000000000000000000000000000000C00AEC +:108AC000020000008003000000000000040000001D +:108AD0000000000000000000000000000000000096 +:108AE0000000000000000000000000000000000086 +:108AF000000088CC3300FFFFFFFF1B003F00FF5F3B +:108B00004F00333B5503FFF7FF7F33730F11FFEF28 +:108B1000F35107010302FFFFFFFFFFFFFFFFFFEF1E +:108B2000AFDFFFFF1D1DDD111D1D33331D1D55332F +:108B30003355FFFFFFFFFFFFFFFF0105FFBF0F33AF +:108B40003355AF053F303F30DD113F30AF055F504B +:108B50001B1BF3033535DD111B1B5F505F50F50503 +:108B6000F3030F0FB30033003200050F77000F0F30 +:108B7000FF00FF000F0FFFFFFFFFAF0553531B1B4D +:108B80001B1BFF003333FF00FF003F305353535391 +:108B900027270F0F5555FFFFFF00FFFF55550F0FFC +:108BA0003333FFFF5555FFFF3333FFFF3333FFFFF1 +:108BB0000F0FFFFF33330F0F5555FF00FF000F0F4F +:108BC000FF00FFFFFF00FFFF55550F0F0F0FFFFFC7 +:108BD0000F0FFF000F0FFFFF0F0F33335555FF002F +:108BE000FF00FFFFFF00FFFF3333FFFF3333FFFFC3 +:108BF0000F0F0000000000000000000000600000F7 +:108C000000000000000048000C2080240E0000201E +:108C10001E0048201E2000201E0000000C00002026 +:108C20001E0000000C0000000C0080240E008024B8 +:108C30000E0080040C0040808C2248808C224080F2 +:108C40008C2248808C2280240E0080240E00900408 +:108C50000C0000000C0040808C2248808C22408058 +:108C60008C2248808C2240808C2248808C2240803C +:108C70008C2248808C2200000C0048000C204820E8 +:108C80001E2080040C0080040C0080240E00408014 +:108C90008C2248808C2200000C0000000C004080D8 +:108CA0008C2248808C2200000C0000000C00000088 +:108CB0000C0000000C0000000C0000000C00000084 +:108CC0000C0000000C0000000C0000000C00000074 +:108CD0000C0000000C0000000C0000000C00000064 +:108CE0000C0000000C0000000C0000000C00000054 +:108CF0000C0000000C0000000C0000000C00000044 +:108D00000C0000000C00000000000000000010003B +:108D100000E0000000000400200080240200480061 +:108D20000020482012204820122080240200000049 +:108D300000000000000080040000000000000000AF +:108D4000000080240200000000004880002048004D +:108D5000000048000000902412008024020000005F +:108D60000000800400008024020048800020488029 +:108D70000020488000204880002048800020488053 +:108D800000204880002048800020000000004800AB +:108D9000002090040000000000000000000000001F +:108DA000000048800020488000200000000080046F +:108DB00000004880002048800020000000000000E3 +:108DC00000000000000000000000000000000000A3 +:108DD0000000000000000000000000000000000093 +:108DE0000000000000000000000000000000000083 +:108DF0000000000000000000000000000000000073 +:108E00000000000000000000000000000000000062 +:108E10000000000000000000000000000000000052 +:108E2000000080000CA00000000260000640FFFF70 +:108E3000FFFF03221322FFFD3B00FF55B0BFFFFFE2 +:108E4000FFFF001000040080800080000008111067 +:108E5000ABAA5F0F0500FFFFFFFF00AA5501F0F06E +:108E6000FFFFFFFFFFFFFFFFFFFF77075F13FFFF1E +:108E7000FFFF550F27270F0FFF00FFFFFFFF3F30BA +:108E8000CF031D1D1D1D3F0CCF0333553F30CF03B6 +:108E90000F335F50F3030F3353537744F5057F2FA0 +:108EA0007F4FBFBF1555F5F5FF00FFFF3333FFFFC1 +:108EB000FF001100FFBF55333F0C550FDD11FFFCC4 +:108EC000FF00FF000F0F7744DD113F0C4747FFFF06 +:108ED000FF00FF00333355555555FFFF3333FFFF78 +:108EE000FF00555555553333FF00FFFF0F0FFFFFB0 +:108EF0000F0F55550F0FFF00FF000F0F0F0FFFFF54 +:108F0000FF00FFFF3333FFFF3333FF000F0F0F0F5F +:108F1000FF000F0F0F0FFFFF0F0F55555555FF00A7 +:108F20003333FFFFFF00FFFF3333FFFFFF0000007D +:108F300000000000000010000C40000000000011C4 +:108F400010010009040080082C060020140180286C +:108F5000A80401000400002004407000100100205B +:108F600000808002000080040002022C040080289F +:108F70000866000000000000000000001001000072 +:108F8000C00003290400801800C050001401002014 +:108F9000044000000000000000000000000000008D +:108FA00000000000000000000000000000000000C1 +:108FB0000000000000000000000083380C00802842 +:108FC000000E00290000802800D0000000000000F2 +:108FD0000000600010010000C00000000000000060 +:108FE0000000000000000000000000000000000081 +:108FF0000000000000000000000000000000000071 +:109000000000000000000000000000000000000060 +:109010000000000000000000000000000000000050 +:109020000000000000000000000000000000000040 +:109030000000000000000000000000000000000030 +:1090400000000000000000000000004000000000E0 +:109050000000000000239100200000000406C12849 +:109060002000000444071120100000041490402048 +:109070000000000400908000000000000022912009 +:109080004000000214C20000000000000000400088 +:1090900000000000000191282000004000C0512085 +:1090A00020000004249000000000000000000000E8 +:1090B00000000000000000000000000000000000B0 +:1090C0000000000000000000000000000000910807 +:1090D00000000004840280280000000400800000DA +:1090E000000000000000600000000000000100001F +:1090F0000000000000000000000000000000000070 +:10910000000000000000000000000000000000005F +:10911000000000000000000000000000000000004F +:10912000000000000000000000000000000000003F +:10913000000000000000000000000000000000002F +:10914000000000000000000000000000000000001F +:10915000000000000000000000000000000000000F +:109160000800000000000001000000E30000C32030 +:10917000C40000A203A3470144010000C2C004A22E +:10918000446202404408441344000000030000000D +:109190000000010700000003C3220000000040009F +:1091A000000010C80108C8008000000300C0470785 +:1091B0000000010303C810000300000000000000CD +:1091C000000000000000000040000000000000401F +:1091D000000000000000000000020000A000C0002D +:1091E000002002434600C02200031000E0C000003F +:1091F0000300000000000000000000000000001359 +:109200000000000000000000000000000008000056 +:1092100000800000000000000000000000000005C9 +:10922000000000000000000004000000000000003A +:1092300000000000004000000000000000050000E9 +:109240000000100000000200040000C00000000048 +:1092500000000002000004000000100000000000F8 +:1092600000000000000000000000000000000000FE +:1092700000000000048000000000000100800002E7 +:1092800000008800020000020502044102012000E3 +:109290008420000420200440400000000000000062 +:1092A000081000000100200200024001142000000C +:1092B00000000120000000004000000080000008C5 +:1092C0000002040002004001200000003000000005 +:1092D000000000000000000000000000010000008D +:1092E00000000040000000000000000000800000BE +:1092F0000010010004000428042080000001008008 +:10930000040410000800000000000000000000003D +:109310000008000020000000000000000000000025 +:109320000000000000040000200000000010000009 +:109330000000000000000000000008000000000025 +:10934000002000000000000000404000000000007D +:1093500000100000000000000002020000000040B9 +:109360000000000000000080000400000000000079 +:1093700000000400000000000000000000000000E9 +:10938000000000000000000000700000000000006D +:1093900000000083014800002200024551010086C0 +:1093A000A300006550000080A2140800640000487B +:1093B000F6481242030000AAF20200C079016000E0 +:1093C000E0C8800028A90D000000000060021340E2 +:1093D000C931008000801600F00100040078000010 +:1093E00002400E03004A405A30302CA01430B50A17 +:1093F000C44088C0114A6025A2814E8221300C01F0 +:1094000010400E0000310040A0300000000000803D +:10941000020000600000100030009282943003804F +:10942000026409C001008080F1000280798C0D0087 +:109430000630204000000000000080000000000016 +:109440000008000000000000003000000000008064 +:10945000410000000000009EF20008000000000033 +:10946000F00001000000000000000000000000000B +:10947000F000000000000020F000000000000009E3 +:1094800000000010000000000070000000000080DC +:1094900002000000000000000000000000000000CA +:1094A00000000000000080C005001C603201AC001C +:1094B000E230800E09004000C23200F001492080F5 +:1094C000C5020047E0002003030010F9210000005E +:1094D000E8100C000041000300101500000840A235 +:1094E00081290000C140000000302C00200020171E +:1094F000E00180460004030020088C0620860282DA +:10950000917440C608080C82650A1001A06000230F +:1095100002B2300600080F03E3808008B031060075 +:109520000000300702000C000200160000000CA230 +:1095300080744800C03202000000000000002D02CC +:10954000E00808402062080400000000000000005D +:109550000000000000000E020000000000002000DB +:109560000000001000000000E001000002002000E8 +:1095700000000000A0020200C00000000000000087 +:1095800008000000000020000000000000000005AE +:109590000000000005000080010000000000002025 +:1095A00000000010000000000000000000000000AB +:1095B0000040000000000000000000000A08101039 +:1095C00000008508E55001B44634008908410000D8 +:1095D0001C0004D380028006081880190400434050 +:1095E0004000000024C00000001000000010808037 +:1095F0000008002041200000808B0000098000004E +:1096000004000018008000A00030820610000850FE +:1096100000006018810024000204F000010124A071 +:109620008002C0A98242080912059032240040003D +:109630000042101680008010020010800A00100006 +:1096400014002226890000804002C0000120009002 +:1096500000800890100208818060009000000000E7 +:109660000000000008004000000010100000000092 +:1096700000200000000000002000000000000000AA +:109680000000400000000000000000000001000099 +:1096900000000000200000000000000000000000AA +:1096A0000800001000000000000040000000000062 +:1096B0000220000020000000000000000000000068 +:1096C000000000000000000000000000000000801A +:1096D00003300CC000000C88650050C300000088F7 +:1096E000182C00C0014808808780004620100E0812 +:1096F00000005481A10000A0212A020040100000B7 +:10970000C08100000070004307000C00B000008022 +:1097100001281000200040040068000000302CCB1D +:109720000500108059681C8227801440B4008E8A7E +:10973000C78110C050300C04800000C0B40000A7E6 +:1097400068001013F0100000030000830108008877 +:1097500003002C80C100020422800041540000005C +:109760000000004000780C826080000300018080CF +:1097700007000000008000800302000300000000DA +:109780000000000008021000E001000000000000DE +:1097900000000000A000000000000070000800A011 +:1097A0000000001000000018600000000000000829 +:1097B00060000040040000000000000008480600AF +:1097C0000000000000000600600000000000000033 +:1097D0000000000000000000000000000000000089 +:1097E000000000C001022940100202040000000A2B +:1097F000A2100083700100C00514BC82002800DEA6 +:1098000035E10903000000862502000020000C005D +:10981000B0158000002821000004004001004E0027 +:10982000D000000000002100B00000030838004014 +:1098300009340287812C3100A0C08C436708148052 +:1098400001000E030030100004040D441004428691 +:10985000220003820000409E529800107000A880F1 +:10986000031000C001000000C4001C076428212070 +:10987000A00002000030000000006C9A6A28A108D5 +:10988000C400000500000000001000007000001679 +:109890000000000000000000E000020000000000E6 +:1098A00000000000E00000000002000080000080D6 +:1098B000031000000000008002000104000000000E +:1098C0000000000004000000000000000000000094 +:1098D000E016200000000000020020000000000050 +:1098E00000000000000000000000000000004048F0 +:1098F0001000800082008082204C84000C00400414 +:109900009020804424405000228A8080914004109E +:109910000184814401925401004040025844018175 +:109920000404008881822801224C048484014102BD +:1099300091883C4224518100024C420A0000809AE6 +:1099400020498001804C440248300144414020526B +:1099500080002484090408408C804C8004804800E6 +:1099600000149440088840000A2C508A48415C0149 +:1099700008042022108420094024012C2882080099 +:1099800080210880402292043002020020801900C9 +:10999000211898100810410A00540000080C1040CB +:1099A00001090004080420004028041818080001D8 +:1099B0008200400120100440010201810A010000E0 +:1099C000000142000C000100020040200C000011C8 +:1099D000000404004100040200082000810200107D +:1099E0000000100000010000000000000000080856 +:1099F000040000000000000000000008000000005B +:109A00000000000C200000000A000C0A08040D00F1 +:109A10000C1D9C093C0600040DB01D02013C0D020A +:109A200000B060307D40900D5C2A3D04000D5896DA +:109A3000180A0DB980720D0C8E76080170087050EE +:109A40009D0C780930083809092A012A7014013060 +:109A50000170000890388501A008329C000E01B00A +:109A60001A001D1008001C093C540C090CBA3C3AA1 +:109A70002900BC1A9E0D19AABC980904582C1D5C1B +:109A8000BC31141D9810B5003590B98839A9B0586B +:109A900058A0483DA0010C0A0D0E398E39312049DD +:109AA0003D00381D103C3C3A782E00889030995982 +:109AB000588830B04E0C00B0985C800E900C003C82 +:109AC000380C9000B000080608210050000E0E006F +:109AD0006C10B0407400001008100005000A00006F +:109AE00038009000009000000000002002040600F2 +:109AF0000000000280601000000000000000000074 +:109B000000A008080000600002000000000000083B +:109B10000000000000003010005030001802313802 +:109B20002120180000802B083B3010090C20200059 +:109B300088B810000C300C064C141C085D383C0929 +:109B40000E30317C1E1808380C706E2E082C104810 +:109B50002C30083C080D290C38302C381C1C34D013 +:109B600048943C8C7E5E3014329410501E9CB45944 +:109B70001A300419B81ABA1831519D38D80D50301E +:109B8000883E98B08C0030D0065438300010300138 +:109B90000CB01A0C10BC188C70D4301C0E18300885 +:109BA000B0385808101D4AD00B3400003E38187CDD +:109BB000308C8C70B0010CD28800305000560008F8 +:109BC0000020005000080E000040000C000D320084 +:109BD000303008020E000A080450110081000C0EFB +:109BE000080008280C880A000100048008800C0680 +:109BF000000020308C000A0C06000C503C00048051 +:109C00000E0030002808000000000000000C0000DA +:109C1000000000000000000008000000000000003C +:109C20000000000000000000000000000000000034 +:109C300000200000000A080000000C0000040000E2 +:109C40000020060000100022503000808005000037 +:109C50008030000000320000000C04001000000002 +:109C6000046010010408000200000231000200102C +:109C7000000080302051800000380020003000308B +:109C8000023980004038000000B00411500200008A +:109C9000000001400000000008010A080001020065 +:109CA0000888000D20016002003008302108000003 +:109CB000080C00400C08000000020001000004082D +:109CC000000101001002002C00280002000000002A +:109CD0000008400100080020000020300081000042 +:109CE0004000000000100100008000000002800021 +:109CF000000800000008000000080001000C00003F +:109D0000000000000202010000010000000010003D +:109D10000000000000000000000000000C00000037 +:109D2000100000000400000000000000000000001F +:109D3000000000010000000000080000000000001A +:109D40000000008000800008000C010000000000FE +:109D500000000000004008400080008070B0020158 +:109D60000146800000800004008400000011000C07 +:109D700040081000013040080200000C0040094873 +:109D8000000400400008100C0044100004B20089D8 +:109D90004040804008BE320C0080000000B0024805 +:109DA000600C0000000000100000000001000D0C1D +:109DB000000C0800003200080000B0020048210139 +:109DC000000020412021600022000020000800083F +:109DD00000120200003C4420600C00820042010C92 +:109DE0000000000000023008000000800010800029 +:109DF000041420003000000000400C00000040006F +:109E0000400C00000002000C0000000000B200281E +:109E10000102000000000000080C04000000000027 +:109E2000002040000000800000000024000000002E +:109E300000000000800000000100000000000000A1 +:109E40000000000000000008000000000002000008 +:109E500000000000000000000000000400080000F6 +:109E600000000800080800001000080000000000C2 +:109E7000002000000000000000000004000000407E +:109E8000082008040004200400100000000800104E +:109E900000000000000000000004005415000084D1 +:109EA000042000E60000048000208204080800402E +:109EB000000040000000000008000000000000005A +:109EC0000000000C00000000180020081000000036 +:109ED0000004201010082004382020002008002250 +:109EE0000000000008200008002081252400000058 +:109EF0000000000000000000000000000408000056 +:109F000000200010040020000000000004040000F5 +:109F10002000810400000000000000040008000090 +:109F200000200020000000000000000000000000F1 +:109F300000000000002000000000000000000024DD +:109F40000000000008040000000000000000000005 +:109F5000000000000400000000008101000000007B +:109F60000000000000000000000000000000FFFFF3 +:109F7000FFFFFFFFFFFF003302574804FEFFFF7F94 +:109F8000FCFC7FFF0E0EFFFD3F15FFF5AAF3FFFF60 +:109F9000FFFFFDFFFFFDFFFFFFFF000E7F5FFFBF25 +:109FA0000705070F0F0377073F153333FF000F0F28 +:109FB0005555333333330F0F55553333FF00FF00FF +:109FC0005555333333330F0FFF0055553333333388 +:109FD000FF003333FF00FF00333355550F0FFF00F1 +:109FE0000F0F5555CCCC77443F0CF3033F0C0F0FAC +:109FF0000F0F5555FF0055550F0FBFFFFFBFCF0384 +:10A000000F33CF03330F33330F0FFFFFFF00333313 +:10A010000F0FFFFF0F0FAF051B1B35355F50353599 +:10A020003535F5053F3033330F0F3333FF005F50C5 +:10A030005F503F3053533F303F305353F303555538 +:10A040000F0F0F0FFF001D1DDD113F0C3F0C474789 +:10A050003F0C4747CF03FF000F0FFFFF5555FFFF92 +:10A060003333FFFF333333330F0FFFFF333300003E +:10A070000000008100000000080000000000000057 +:10A08000000080240E0080240E0000000C00000060 +:10A090000C0000000C0048201E2000201E0048205C +:10A0A0001E2080240E0080040C0080240E0000007E +:10A0B0000C0000201E0048000C2090241E00D8A494 +:10A0C0007EA9DFA47EB9DFA47EB9DFA47EB9DFA4B8 +:10A0D0007EB9DFA47EB9DFA47EB9DFA47EB9DFA498 +:10A0E0007EB9DFA47EB9DFA47EB9DFA47EB9DFA488 +:10A0F0007EB9DFA47EB9DFA47EB040808C22488088 +:10A100008C2280040C0080040C0080040C000000F1 +:10A110000C0040808C2248808C2200000C00000043 +:10A120000C0000000C0000000C0048808C224880CD +:10A130008C2248808C2248808C2200000C00000079 +:10A140000C0048808C2248808C2248808C224880D9 +:10A150008C2200000C0000000C0048808C224880FB +:10A160008C2248808C2248808C2200000C00000049 +:10A170000C0000000C0000000C0000000C000000AF +:10A180000C0000000000001120000000080000008A +:10A190000000040000000000000080240200802471 +:10A1A000020048201220802402000000000000204D +:10A1B00012000000000080240200002012000000B5 +:10A1C00000000000000080040000002012000000D9 +:10A1D00000000000000080240200008060A94F8081 +:10A1E00060B94F8060B10000000000000000000076 +:10A1F00000000000000000000000482012200000C5 +:10A200000000000000000000100000000000488076 +:10A210000020488000200000000000000000000036 +:10A22000000000000000488000204880002000005E +:10A2300000000000000000000000800400004880D2 +:10A24000002048800020408000204880002000003E +:10A25000000000000000488000204880002040806E +:10A26000002048800020000000000000000048801E +:10A27000002048800020408000204880002000000E +:10A2800000000000000000000000000000000000CE +:10A2900000000000000000000000000000000000BE +:10A2A0000C000000000260000000F3FFFFFFFFFF52 +:10A2B000FFFFFFFFFFFFDDDDF708FFFFFFFF0008E7 +:10A2C000BBBFFFF73F158A8A0E02FFFFFFFF444E18 +:10A2D00077070080FEFF0001BFBB1555FFBB7F0F56 +:10A2E0000F0777440101A800F3FFFFFFFFFFFFFF07 +:10A2F000FEFFFEFFFEFFFEFFF0F0BFFFEFFFFF7F60 +:10A30000EFFFFFFF3333FDFD0101FFDF0F1F3F04B0 +:10A31000152E3333FF00FF7FBFFF7F5D3300DFFF6C +:10A32000EFFF3F30CF035F503535FFEFFFDF3333B3 +:10A330003333FFFF3333FFFFFF00F303DD11F50578 +:10A340005F500F0F5555FFFF555555553333FF00DF +:10A350000F0F1D1DDD110F3355337744CF03DD1172 +:10A360003F0C3333FF0033333333DD11CF031D1D77 +:10A3700047473F0CCF03CF031D1DFFFF333333335C +:10A3800033333F305F505F5053535F503F303F3067 +:10A39000F505FF00FF0033330F0F5555FF005555EE +:10A3A0000F0FFFFFFF0033330F0F0000000000808E +:10A3B000000000C00C000000000000111000901808 +:10A3C00010018020C044000010030000C8000B00F2 +:10A3D00004008008000400000400802808640210C3 +:10A3E00054018024080B00000000402000000010F1 +:10A3F0001401002040018000000080280000822815 +:10A4000004008028008280390000802800C60019DE +:10A4100000008028004400130000802800820015FE +:10A420001001802800440011000080280082803341 +:10A4300004008028284400000000000000000039CB +:10A440000000802800920030000000200080000002 +:10A450000000000000000000000000000000640098 +:10A46000100100004000000000000000000000009B +:10A4700000000000000000000000000000000000DC +:10A4800000000000000000000000000000000000CC +:10A4900000000000000000000000000000000000BC +:10A4A00000000000000000000000000000000000AC +:10A4B000000000000000000000000000000000009C +:10A4C00000000088000000400000000000000000C4 +:10A4D0000001C0280000000500AB51000200000090 +:10A4E00014018100100000001406812020000004E7 +:10A4F0002492D128000000048C03002800000000F2 +:10A5000000C0512820000004249180300000000485 +:10A5100000B291282000000400E28028000000041E +:10A5200000E280280000000400E280210000000416 +:10A5300000E2A0220000000400E2803400000004D9 +:10A5400000E281212000000404E20000000000007D +:10A55000000080280000000400860028000000049D +:10A560000088000000000000000000000000000063 +:10A57000000040000000000000010000000000009A +:10A5800000000000000000000000000000000000CB +:10A5900000000000000000000000000000000000BB +:10A5A00000000000000000000000000000000000AB +:10A5B000000000000000000000000000000000009B +:10A5C000000000000000000000000000000000008B +:10A5D00000008000000000000006000008000000ED +:10A5E0000000000000010043CBC00100000700A3F1 +:10A5F00000C08000818000000300C40000400043D0 +:10A6000000E3C002022300804407C00383800000EF +:10A61000038008400020014081808103832200C024 +:10A620001440C0220007034000C0D2C0D203004043 +:10A6300000C0C000000000434708C300E00000C3A2 +:10A6400044C00020440003810043C007440000C010 +:10A65000C0004400E20300E200400303E3E3000023 +:10A660000000000000000300F0C0A0000000000097 +:10A6700001000000030000000000000000000000D6 +:10A6800000800003000000000000C800040000007B +:10A6900000000000000000000000000000000000BA +:10A6A000200000000000000000000000000000008A +:10A6B000C0000000000000000000100002000000C8 +:10A6C000000000000000000000000000000000008A +:10A6D00003400820008000000000000010800000FF +:10A6E000000800000004000000000000000000005E +:10A6F00000000000000000000001002802044000EB +:10A700000200000200028008C00C01005040080353 +:10A71000034002A0034001800540400220001001D8 +:10A72000840400022004002000004020C002C00178 +:10A73000C000000500201000030004200004108465 +:10A7400080080020000410800100022820001280F0 +:10A75000000000180084030004800803032812008E +:10A76000028000901040020104080020022021080D +:10A770002020000000000000000008000040400011 +:10A780000000000020040000200000000000000085 +:10A790000000000000040480000000000000001021 +:10A7A00000000000000000000000000000000000A9 +:10A7B0000000000000100000000000000000000089 +:10A7C0000000000001000000000000000000000088 +:10A7D0000200000000000000000000000000000077 +:10A7E0000000000002400000000400000020000003 +:10A7F000000400000000040400000000000000004D +:10A8000000002000000000000000000000000E001A +:10A81000000003000000000078110080A2C0004585 +:10A8200051000080F2360E040000008EF21100C0CC +:10A830007D021400F06A0F805300102020F20C05F6 +:10A8400060008040F44906800100004619020000C3 +:10A8500000020000300026000000801040002E8022 +:10A860000100002B200000000000000040720C00DE +:10A87000000800360800006000000080F30000803F +:10A8800070000020407009C2014A15A0A6610800AE +:10A8900008005206000000236000200000C82C8041 +:10A8A000031050A05982000000000000000000804A +:10A8B00000000000F00000822009008001010EE489 +:10A8C000217A0C00A2402000000000000080080C4B +:10A8D000007A160820312280218C004800180003DD +:10A8E00000000000000022830130140000000995E0 +:10A8F0007038548AA260020000010000F0000000DD +:10A9000000000080F210200000000000F070000045 +:10A91000580000000000000000900000000000004F +:10A92000000010000000000300004007805000C03D +:10A930000E608040830C00D0249006803000809010 +:10A9400025080000203000002040070060000100C2 +:10A950000009AD6000000044C06010C4050000089C +:10A9600001700000001000000070160000000004DC +:10A97000E0700E8001000003307100000000000054 +:10A9800028082D0000400000017020800100000018 +:10A99000400230800000000140080200080808C0A2 +:10A9A000A0402900000050060000000060000000E8 +:10A9B00000400EA00054020441100000000080403E +:10A9C000040000000000000001000E82904CB1065F +:10A9D00020400387093A32880D000200000000E0A1 +:10A9E0000070420320390000206108401008826690 +:10A9F000A0660010000000000000031200740D00AB +:10AA000000088680007C4CD3AC622100200000004E +:10AA1000000020000000000002080000000000000C +:10AA20000500000000000000000000000018000009 +:10AA30000000000000000800003000080000004096 +:10AA400084080010122000625C00000000009414D2 +:10AA50003600000200100000A50008000008800079 +:10AA6000E60140030000201048000101404400348A +:10AA700000004040000800180400000000280018F2 +:10AA800003004000280824100F0000004028200880 +:10AA90004A0000004000080005004001281880001E +:10AAA00049020080000008204500000028006004E2 +:10AAB0008820080291B8200800000008000000016A +:10AAC00060010000001048200000000005020000A6 +:10AAD00000000000100001002100402000001034A0 +:10AAE00005000100011822398A0224840420000094 +:10AAF00002000000000062288A02100606420400DC +:10AB000000042612820000008000000000008090F7 +:10AB1000000282A2689860204100080C00420000F8 +:10AB2000020000000000000000000004000000001F +:10AB30000000000000200000800000000000000075 +:10AB40000088000000000000000000000000140069 +:10AB5000000000A820100000C03C0087E1100CE0BD +:10AB600021602E9863020C1000360020EA280000B5 +:10AB700008680C206200020600491058F00100D756 +:10AB8000C0C00C200A000086C5000080033C000005 +:10AB90000800030000000009E00012000200008627 +:10ABA000C1000C0002000000D00000A0090000005D +:10ABB0000802008003000080D10108200A002881DB +:10ABC00041001E8260011040A4001C4803000004E4 +:10ABD000000802086002000000300C17F08150509D +:10ABE000240100080000400000800E0860400003BF +:10ABF00000000092080011810D001C83617C140389 +:10AC0000C03001880000000000081C83610008C6F5 +:10AC10002001A74DD751140008800C080B0000003C +:10AC2000000800007040541000008E03203C0C010E +:10AC30000800000800000000010000000000000102 +:10AC400050000008080000000000000000000000A4 +:10AC5000E0005000000000000000000000000C00B8 +:10AC600000000300000000C0150200800112000077 +:10AC70000C020100B0820E64600001B0B9300040E7 +:10AC800060803000A0C20D4070000806E0920044D1 +:10AC900071808008C6711D4A0000009E02390020A4 +:10ACA0000000000000000F000000000E003902400C +:10ACB00000008016C8010040000000C0410026804E +:10ACC000010000C6010002400300000048002C40C3 +:10ACD00000000020580242007030314001620CE454 +:10ACE000010000250010200060000000003409076A +:10ACF0005028318A410C00000000000600100000BE +:10AD0000003000000000119785781025A0600C83AA +:10AD100061301400004C0EE00100000000100C83B4 +:10AD2000615029804580064551381400A21020A0AA +:10AD3000700000000010022A50303506C242004266 +:10AD4000E6504E40A218004000000000080000003D +:10AD500000000000000000400000000000000000B3 +:10AD6000100000000001000000008080200908049D +:10AD70000000900200440088404808815841812822 +:10AD8000204040002088000040044242480030013A +:10AD9000444004002084208448801C2A084000404D +:10ADA000108040010801302C288144582020328432 +:10ADB0000404010120528040290C018110810841C6 +:10ADC0004920800A9002404010905152110A000020 +:10ADD000408190010A04422409500410908898048C +:10ADE00008010C08200A02290444800C22008A82EF +:10ADF0004210114490588041082100240100412252 +:10AE000042402198080481800101008948300030C7 +:10AE10000A4042020102000101000C0141048412B7 +:10AE200081128000200101000034005030114000E8 +:10AE30008440310491014100140080080100101089 +:10AE400000808042010000003800040881000000FA +:10AE500000000008001200001401000000000000C3 +:10AE600000000000040002000000000000000C00D0 +:10AE70000000000000000000000000000080000949 +:10AE800000040C000001390600010C0C000CB40198 +:10AE9000100A2C080C0D00061008960E50BC5D76AA +:10AEA000B016180A0C010906990092322C04346875 +:10AEB000707078990CBA68B01C0A3C4090700038E9 +:10AEC000AE0A354C3052092E0C3C000D100C1CB053 +:10AED0003D7E0CB10838707C2C0D08790D25393178 +:10AEE000295C3C0C580E310A081E85425010011D89 +:10AEF00028B8380C38A9088C7C0805085D5D227CD0 +:10AF000009A0085C503D10B6353C581D288A0E9E9D +:10AF10000C7908A1BD083118680DA8A50005050821 +:10AF200078300130081A5C710A0995515D02880079 +:10AF3000000A0030053150300109A9B1542901320D +:10AF4000301050903C50101D110010000070810C0A +:10AF50000050141000908000400006A01C0009085A +:10AF6000500470B000B00008001190003000801054 +:10AF7000548000009000006001400050000040003C +:10AF800004000C00000000000000000000001000A1 +:10AF9000000010301008005C4100300400380F162B +:10AFA000302000382E289D000120105690320E00CF +:10AFB000106D3C2C0ED01F5C3D20087010382EBC4C +:10AFC0009A33743870107136072A130482001114F2 +:10AFD0001238143A0E302C0D880C08CC813D300606 +:10AFE0009008ED3C00100008B0913E5C07581B0033 +:10AFF00000201C3C0C40815B111C300C0488280C88 +:10B00000082F740031001A098E0C0C0E117C0830C8 +:10B010000C2CA67898512C2D380E0810003011B049 +:10B02000801400107950113C10019400005421202C +:10B03000045406202010861108B031007C58407856 +:10B040000C00045910781808306820D03E04000025 +:10B050000F1880323A00100A99003C881800986056 +:10B060000C000E80000001610030000800000E009E +:10B07000100008001C010000000000000058000043 +:10B080000804008001000000000000000800040027 +:10B090000000000001500C00000000000000000053 +:10B0A0000000B00000080200000000000E210E01A8 +:10B0B00004020000080C00014022800288310401D3 +:10B0C0008010000280300401000880180C1000116C +:10B0D0004C00002180120000001A0000000804004B +:10B0E0000090010A0008220180080200012C500192 +:10B0F000007001110080420000104230080A007800 +:10B10000000000208C00051000324002820824005C +:10B11000201A4000402041202202010200089680AF +:10B1200040080405001A0001000234190002300131 +:10B130000111400008010A010140000100008101E5 +:10B1400010080001008006810001040A00020202CA +:10B1500046000022000004803000000000080000CB +:10B1600004080000400800011040000000000291A7 +:10B170000000020000000000000000800008000144 +:10B180000000010000000089000002000010000122 +:10B1900000000000000030400080000000080001B6 +:10B1A00000000C000000000900000000000000008A +:10B1B000000000000000000000000000000000008F +:10B1C000008C28080104000001010208208C008C7A +:10B1D000007400080050000000B0000804010040A6 +:10B1E000009000480001108C308C0004004C0000DE +:10B1F0000002000C009002000032A82804000800A1 +:10B200000C81100800800E400010180C004038001F +:10B21000094E000C0900004004300E40008C200153 +:10B2200000828000004420800032308008840C00BE +:10B23000000284248080020C008E0208000C424C24 +:10B24000003C4008048C200020002D08051440001C +:10B2500002000E080000000040300C18000C010C29 +:10B26000000D4C0C390000800030022040300000FE +:10B27000000202000100000030010008051000007B +:10B2800000300C6840000800000000000000401082 +:10B290000032000800008C280000001800000800A0 +:10B2A0000080002800000000000040004010002046 +:10B2B000000200080002000000000008000000205A +:10B2C000000000000000000000000000000000007E +:10B2D0000000000008002800000800000000000036 +:10B2E00000000000082008000020000000200800E6 +:10B2F0000400000C182000000804200000000204D4 +:10B300000008000010000804000000984A242020D3 +:10B310000408000000001042010000808041820506 +:10B32000080800100400009C040000000C2000002D +:10B330000000821000810800100800241030000076 +:10B34000380000000885080C000800280000820072 +:10B3500088020008102020C2200000002C002000DD +:10B3600000040000000000001808000000000800B1 +:10B3700000000008000000000000000000200000A5 +:10B380000020000000000000000800001000040081 +:10B3900014000000002000800000000000400000B9 +:10B3A0000000000000200000000000240000000851 +:10B3B000000000000000002000000000004000002D +:10B3C0000000002004000000000008000000002829 +:10B3D000000000200000C00000000000000000008D +:10B3E000000000000000000000001B1B27275F0A70 +:10B3F000AF05FFFFFFFFFFFFFFFF1B1B5F0A1B1BCC +:10B400005F0AFFFFFFFFFFFFFFFFF5055F50F50538 +:10B410003535FFFFFFFFFFFFFFFF05054000CF03AE +:10B42000474733330F0FFFFFFFFFFFF77F7FFFFF1C +:10B43000339300027F55FEFFFF0F0080151145FF7B +:10B44000EFEF57550100F0F323AF5F1F030133F710 +:10B450004000FEFFF7FF00A0FFDFDD0FFF000F0F32 +:10B46000FF00FFFF5555FFFF3333FFFFFF0033336E +:10B470000F0FFFFF5555FFFF0F0FFF000F0FFFFFCF +:10B48000333333330F0FFF00FF00FFFF0F0F55550E +:10B49000FF0033330F0F33330F0FFFFF0F0F5555DF +:10B4A000FF00FFFF3333FFFF333355550F0FFFFF0F +:10B4B0000F0FFFFFFF00FFFFFF00FFFF3333FFFF12 +:10B4C00033330F0F0F0F0F0F5555FFFF0F0FFF00F7 +:10B4D0005555FF000F0FFFFF5555FFFF5555FFFF57 +:10B4E0000F0F333333335555333300000000000062 +:10B4F000000000000000000000000000000040808C +:10B500008C2248808C2280240E0080240E004080F3 +:10B510008C2248808C2280240E0080240E004080E3 +:10B520008C2248808C2280240E0080240E00000093 +:10B530000C0000000C0080040C0080240E000000B1 +:10B540000C0048201E2000000C0000000C00002011 +:10B550001E0090040C0000000C0000000C000020F5 +:10B560001E0048000C2000000C0000000C0090049D +:10B570000C0000000C0000000C0000000C0000009B +:10B580000C0000000C0000000C0000000C0000008B +:10B590000C0000000C0000000C0000000C0000007B +:10B5A0000C0000000C0000000C0000000C0000006B +:10B5B0000C0000000C0000000C0000000C0000005B +:10B5C0000C0000000C0000000C0000000C0000004B +:10B5D0000C0000000C0000000C0000000C0000003B +:10B5E0000C0000000C0000000C0000000C0000002B +:10B5F0000C0000000C0000000C0000000C0000001B +:10B60000000000000000000000000000000000003A +:10B610000000488000204800000080240200000054 +:10B620000000488000204800000000201200802414 +:10B6300002004880002048800020802402008024EE +:10B640000200480000208024020080240200902490 +:10B6500012000020120080240200100010000000E0 +:10B6600000000000000000000000000000000020BA +:10B670001200000000009004000000000000000024 +:10B6800000004800002048000020000000000000EA +:10B690000000000000008004000000000000000026 +:10B6A000000000000000000000000000000000009A +:10B6B000000000000000000000000000000000008A +:10B6C000000000000000000000000000000000007A +:10B6D000000000000000000000000000000000006A +:10B6E000000000000000000000000000000000005A +:10B6F000000000000000000000000000000000004A +:10B700000000000000000000000000000000000039 +:10B710000000000000000000000000000C0000001D +:10B7200000000000000000FFFFFFFFFFFFFFFFFF22 +:10B73000FFFFBBBB2075FFFF0FFFFFFFFFFFF7FF02 +:10B740007707FFFFFFFFFFFFCFCFCFCFFFFFFFFF49 +:10B75000FFFFFFFFFFFF00000080FFFFFFFFFFFF75 +:10B76000FFFF7F8F77070BBB77DDFFFFFFFFDDDD7F +:10B7700055FFFFEF3F0FCFCF0080FFFF3333FBF0CC +:10B78000CF0033201B003FFFF3F33F15DF558888C0 +:10B79000FEFFC0C03F3FFB7BFFFF55D55515333340 +:10B7A0000F0FFFFFFF000F0F33330F0F0F0FFF00BF +:10B7B00033330F0F0F0F3333FF0055550F0FFFFFBC +:10B7C000FF0055550F0FFFFF0F0FFFFFFF00FFFF9B +:10B7D000FF00FFFF0F0F3333FF00FFFF0F0F555523 +:10B7E0000F0FFF000F0FFFFF3333FFFF5555FF0013 +:10B7F000FF00FFFF33335555FF00FFFF5555FF0096 +:10B80000FF00FFFFFF003333FF00FF000F0FFFFFBC +:10B810003333FFFFFF00FFFFFF00FFFF3333FFFF66 +:10B820003333FFFFFF0000000000000000000000B5 +:10B830000C000000000000000000000000000000FC +:10B84000000080300400802828C4000000000000B0 +:10B850000000F038050120219004000000000000E5 +:10B8600000003039020000A08CC5100080000000EC +:10B870008001921910030028041C310984048008F7 +:10B880008000000004000000000000090000802883 +:10B8900000D0100010010000000050101001002026 +:10B8A00000000008000080080004002000000020C4 +:10B8B0000000000000000000000000001000000078 +:10B8C00080000000000000000000000000000000F8 +:10B8D0000000000000000000000000000000000068 +:10B8E0000000000000000000000000000000000058 +:10B8F0000000000000000000000000000000000048 +:10B900000000000000000000000000000000000037 +:10B910000000000000000000000000000000000027 +:10B920000000000000000000000000000000000017 +:10B930000000000000000000000000000000000007 +:10B9400000000000080000000000000000000000EF +:10B95000000000000000912A2000000804C600003A +:10B96000000000000000D028200000040023000098 +:10B97000000000000000D1284802400854E34000C5 +:10B980000001000008019128040080041482500086 +:10B9900020000000080101002000000084000020B9 +:10B9A000000000040080000000000000000000080B +:10B9B00000000004000080000000100000060008E5 +:10B9C0000000000400000000000000000000400033 +:10B9D0000002000040010000000000000000000024 +:10B9E0000000000000000000000000000000000057 +:10B9F0000000000000000000000000000000000047 +:10BA00000000000000000000000000000000000036 +:10BA10000000000000000000000000000000000026 +:10BA20000000000000000000000000000000000016 +:10BA30000000000000000000000000000000000006 +:10BA400000000000000000000000000000000000F6 +:10BA500000000000000000000800000000000000DE +:10BA600000000000000000000000000003C0E02310 +:10BA7000C200000000000000000000220000C80713 +:10BA8000C503000000000000000000000280C703A2 +:10BA9000CB00014001C80005000000C880C0E303DE +:10BAA00093020003C4C0C900C0230000C3C0400308 +:10BAB0000503034003004662C20000012109811012 +:10BAC000810000EA54624022572200200500401005 +:10BAD000030200C0E0000000E000001000000000D1 +:10BAE0000000030000801300000800800003001025 +:10BAF000000000004000C10000000000000502102E +:10BB00002000000000000000000000000400000011 +:10BB1000000000000003000500000000000300001A +:10BB20000000000000000000000000000000000015 +:10BB300000E0000000000000000000000000100015 +:10BB400000400003000000000000000000000000B2 +:10BB50000000000000000080000000000000200045 +:10BB600008000000000000000000000000000000CD +:10BB7000000000000000002000000000000000C0E5 +:10BB80004010000014000020000000000000000031 +:10BB9000020000004008000000000000000000005B +:10BBA00004024008208020404000100000000000F7 +:10BBB0008218040180800080002040800900400835 +:10BBC0008421010320010820080004201400000142 +:10BBD0004001A000C000040000200100000020007F +:10BBE000200001020880000400000008000000009E +:10BBF00010000020000002003004002000000004BB +:10BC00000080000000000000010821010000000089 +:10BC100080000200000000000000000000000000A2 +:10BC20000000000000000000008000000000000094 +:10BC30000080000000000000000000000000000084 +:10BC4000000000000840000000200000000000008C +:10BC500000000000004020800000080000000000FC +:10BC600000000400000004000000000400000000C8 +:10BC700000000800000000000000000000000000BC +:10BC800000000000000000000000880228015400AD +:10BC90000200000000000E00F000000410000C1470 +:10BCA00000000200002800000000800370084C041F +:10BCB0000008000000704800000020040070000A26 +:10BCC0000040000000003400000126050051808083 +:10BCD0000200604251000080F7002005000000884B +:10BCE00007E006430101801EF2100E20500000A95B +:10BCF000439100007000018433120C60007A000050 +:10BD000000000000000000010010000000008000A2 +:10BD1000F0800E0000000000300100000000000074 +:10BD20003010000000000000480000001000000477 +:10BD30000000000000000000E000000060000000C3 +:10BD4000E000000000000000F140000000000000E2 +:10BD5000000008000000000000000000000000805B +:10BD60000108060000000000000000800300000041 +:10BD7000F0000000000000000000000000000000D3 +:10BD800000000000100000800248000000000000D9 +:10BD900000000000000000000000000000000002A1 +:10BDA000200C15E0000000A001000000000042147B +:10BDB00080321500014021000080880000008002D0 +:10BDC000E009110030000000003411000000020002 +:10BDD00060114000004800000228148045001E0544 +:10BDE000E000000300000283000000404010420019 +:10BDF0000000008601406003E3000004C718D00083 +:10BE0000C00000014118AE02F001148021080100B9 +:10BE1000022880C60400000504000000000800009D +:10BE2000000000060040100400000000E0002000B8 +:10BE30000000000000082C000000000000000020AE +:10BE400000020000000000000000008005100E004D +:10BE500010000000000000000800000800000010B2 +:10BE600000000000000020000000000000000000B2 +:10BE700000000000000030208000000000002000D2 +:10BE80002001000000000080C50000000000080242 +:10BE900000000000000000201000008007000000EB +:10BEA0000000000000000000000000000000000092 +:10BEB000000004090010000001900000000C1000B8 +:10BEC00004000220105034600008810000000A02C3 +:10BED0000000000040180002000000000004000004 +:10BEE0000000011680400000018800000D40110094 +:10BEF00020002014000040A000300009650000D49C +:10BF0000080801014001009A0202C08C840200006E +:10BF100008188140C10101A020010018800240A240 +:10BF20000004008400000044280008100000000005 +:10BF300000000000000200400800001000000000A7 +:10BF400000000800000000000000000000000000E9 +:10BF50002004000000000002000002002000000099 +:10BF600080401000000000008010000000000080F1 +:10BF7000002000000000000000000400000000009D +:10BF80000000020000000000010000081000000096 +:10BF90000000080000000000000000000001000098 +:10BFA000000002100000000000002000000000005F +:10BFB0000000000000000000000000000000000081 +:10BFC000000000000000000FC08000000060006062 +:10BFD00002000C00000000130000140000800200AA +:10BFE000000010060000A64DD081149001700000E2 +:10BFF00000300C000000020B6000001000600088A0 +:10C0000000281000F000900200400C80050041C79D +:10C01000D0004006E17816A8610240C000300288D6 +:10C0200087008091E162060B200000E0D10127C269 +:10C03000E50000C60138104007000006C1080000F6 +:10C040000000000000002E00E000000000000E00D4 +:10C050000000000000004003000000C005020008CE +:10C0600000000000A03800070000000000080008E1 +:10C07000600000000000400300000000000000001D +:10C080000000000100000008E000000000000000C7 +:10C090000300001000000000000000070800000876 +:10C0A00000000000000040030000000000300C0809 +:10C0B000000000C005000020E201000000000600B2 +:10C0C0000000000000000000000000000000000070 +:10C0D000000000000000000000000007683121009F +:10C0E0000040004001001300100000039005140000 +:10C0F000001006000068EC070000004551303500D4 +:10C1000006040000007052000000000764700096F2 +:10C110000300008002020000D00082020029010713 +:10C12000000006E27100000600150C0C700100848E +:10C1300002802C4712000080DAC0066C700100C03B +:10C14000E1F08E82710000490430024F810000004E +:10C15000D8120800000000000000000000000000ED +:10C16000000001000400000000000C0000000000BE +:10C17000000000000000000000114000000000006E +:10C18000001000000000000000001E000000000081 +:10C19000003000000000002000000100040000004A +:10C1A0001000002000000080014800000000800016 +:10C1B000E0000003E000000000000C0000000000B0 +:10C1C000000420000000000000000000000000004B +:10C1D000000000000000000000000000000000005F +:10C1E0000000000000002000800010008000515975 +:10C1F00080094C00288840424841582080009041E6 +:10C2000000982000204020412001002081022001D0 +:10C21000000031022144482124000184818204026B +:10C2200000542480142A0884809221042A024C326B +:10C230003818204C045184410020594A02244022DD +:10C2400022912008100140518110210029322492AE +:10C250003A8424024442242000240109008221005F +:10C260000181020104120140080082011104001240 +:10C270000030918101190801090A809010084011CD +:10C2800002004082040200144011890908191001BB +:10C290000010800090404A08001024005122001035 +:10C2A00010088918010008000800045920440900FA +:10C2B00004000414811C00081000019409290C4199 +:10C2C0000010041040100C0042090080020A800097 +:10C2D0004001000000080000000000000A0000000B +:10C2E0000000200200000200000000010000000029 +:10C2F000000000000000000000000A0D000010090E +:10C300000A00181C08040800080C09155C701800C5 +:10C31000080E1C508C085C00B0007018905009107A +:10C32000B000B000097D3D7A0AB0B409508189B2ED +:10C3300000009876BE310D09080C0800701C0472CC +:10C34000000A083938048950792D095204B1385C43 +:10C35000606D69055805684C099D880EB404047C1D +:10C360004C1984001870BCBA086D4834640EAC0CCB +:10C3700002701804B90A54B6593104A50C5A550173 +:10C380000A0D10350D04310050380C200CBCBC30A7 +:10C39000090C80350911700E75009E3924090C08AE +:10C3A0000838140D803E007D020D5C2CA03485AC55 +:10C3B0003941383D300C0C3C0D0538700880041CA8 +:10C3C0000E04480A0C003110001C0C0C18010D1052 +:10C3D00008A8980D000000100010082075140E2009 +:10C3E0000008000A09B00E6E0D280D0000000000C4 +:10C3F0000800000000000005000000000205000029 +:10C40000000000A000000000000400000000300058 +:10C41000300000003000193C110C380010302E9C08 +:10C420000E18300A9100313C5F30110010103EA907 +:10C430003A088AB018DC105870001C4838383E3C66 +:10C440003802081C383C0D680A1038100D1C0A38D8 +:10C45000101D29083C78383C005A3A0800282C184E +:10C4600001300820642C103C0518210A70042F2884 +:10C47000190131711C1035280C3439083D1C3DB1AF +:10C480007B18050C6608B5010C086958600C05009E +:10C490005A0E3800080C8A040033142C6D080088EA +:10C4A000E400010000003A080082103800480E78CD +:10C4B0008160080C027C0F8800000F002E80308005 +:10C4C0000A011C012C3C81000000200004008000B7 +:10C4D00050000D2C3A0D00800D808C0C0D080100D1 +:10C4E0000100003C08140C3000005C0000000C80CF +:10C4F000308000B000043000000000000080000028 +:10C5000050000000000000000000100400000000C7 +:10C51000000000000000000000000000000100001A +:10C520000000000000000000080000000000000201 +:10C5300000020C0100090C000002180900100C0098 +:10C540003C3400014600080A01100C01003400824E +:10C550009C02240104000C020008448140014C00AC +:10C56000081604300E321008902000010C00000262 +:10C570000C62660844014E310D008C0000090C026B +:10C580000D004E1100B8000A0C0A42100C30401287 +:10C590000C0C4A3148021202003904004C300001F0 +:10C5A00004020C010C0044390C4A1E0110018C22BB +:10C5B0000C0900300A801001080E0C0D0C321440DA +:10C5C0003C0200014C011A000072088C1C39050164 +:10C5D000100A002208010C023C8A1001108210048B +:10C5E00030001E80000C16420C000C011C8294824C +:10C5F00008011C014002AC02388000A118001000A4 +:10C6000018820201040200001000108110000000D6 +:10C610000C00100010021080100000800C800C0034 +:10C62000100010001080000000000000000000005A +:10C6300000000000000000000000000000001040AA +:10C640001004100C000C104801440000080C1148A4 +:10C650002080080010BA10482900114100801048BD +:10C660001084002C400C920C0240400010613059A4 +:10C670003040B801204910040A0C10403240814873 +:10C680000030004C10689A840240780C046400402A +:10C690000040004004083C4D0220004C200A1C00D1 +:10C6A0000000324C00093D00010C080C02A2024DB2 +:10C6B0000080000C2218020C10403204001E1C00E6 +:10C6C0000000308C100E020809001200013D000825 +:10C6D000008C0210000C000832000900009C010EC2 +:10C6E00000800E04A00E004C010C000C000E82080D +:10C6F000000C8001000088008002091C0000000876 +:10C70000801C810C01048005320C800C40000088E4 +:10C7100081008000810C0808010C00008000800965 +:10C720008000000400008101800C80008000000077 +:10C730000000040080008000800000000000000075 +:10C7400000000000000000000000000000000000E9 +:10C7500008002000200420000000280080080800B5 +:10C760000400300820000C003824200000002000C5 +:10C7700008002800280C00000800200000008A00A3 +:10C780002820080008008D30A880281400103008E8 +:10C79000108100420A2000002800810D00000A10CC +:10C7A000082408C20C0808200804890000180008A2 +:10C7B000280000100818000008040010000810A04D +:10C7C00012200004080800002020000028000018A3 +:10C7D0000800380010000800280000140000300095 +:10C7E00000200808080010101800000000001000C9 +:10C7F00020000004180800002000000000000800CD +:10C8000018000000100004001000080000001000D4 +:10C8100008000800080000000020080000000800D0 +:10C820000800000000000000000000000000000000 +:10C8300000000000000000040800000000000000EC +:10C840000000000008000C000000000000000000D4 +:10C850000000010100000040424100000000000013 +:10C86000000000000000FFFFFFFFFFFFFFFFFFFFD2 +:10C87000FFFFFFFFFFFFFF4033730F4F3373FF08CE +:10C880000F4F555D333B333B0F4FFF08333B337343 +:10C89000FF40555DFF40FF08333B333B333B555D65 +:10C8A000555D555DFF08555DFF08555D333BFF083D +:10C8B0000F2F5575555133335555770F0F03FF3FE4 +:10C8C000FFF523AFF300DD110F331D1D77225F0A43 +:10C8D0000F33DD11330F33330F0F7F200100AF050E +:10C8E00077447722BB11774435351B1B1B1BFFFF99 +:10C8F0000F0FFFFFFF00FFFFFF00FF003333F505C1 +:10C9000053533F303535F505F3033535F505FFFF56 +:10C910005555FFFF33330F0F0F0F0F0FFF0053530A +:10C920005F50F505F303F30353535353F3033333CA +:10C930000F0F5555FF0055550F0F3333FF00FFFF05 +:10C94000FF00FFFF0F0FFFFF3333FFFF5555FFFFC2 +:10C950000F0F0F0F5555FFFFFF00FFFF3333FFFF92 +:10C960005555FFFFFF000000000000000000000020 +:10C970000000000000000000000080240E00802461 +:10C980000E0080240E0080240E00D8A47EA9DFA40F +:10C990007EB9DFA47EB9DFA47EB9DFA47EB9DFA4AF +:10C9A0007EB9DFA47EB9DFA47EB9DFA47EB9DFA49F +:10C9B0007EB9DFA47EB9DFA47EB9DFA47EB9DFA48F +:10C9C0007EB9DFA47EB9DFA47EB180040C00002014 +:10C9D0001E0000000C0000000C0040808C224880EB +:10C9E0008C2240808C2248808C2280040C00000025 +:10C9F0001C0040808C2248808C2240808C22488001 +:10CA00008C2200000C0000000C0000000C00000054 +:10CA10000C0048808C2248808C2248808C224880E0 +:10CA20008C2200000C0000000C0000000C00000034 +:10CA30000C0048808C2248808C2248808C224880C0 +:10CA40008C2200000C0000000C0000000C00000014 +:10CA50000C0000000C0000000C0000000C000000A6 +:10CA60000C0000000C0000000C0000000C00000096 +:10CA70000C0000000C0000000C0000000000000092 +:10CA8000000000000C000000000000000000D8A41E +:10CA900072A9DFA472B9DFA472B9DFA472B9DFA4EE +:10CAA00072B9DFA472B9DFA472B9DFA472B9DFA4CE +:10CAB00072B9DFA472B9DFA472B9DFA472B9DFA4BE +:10CAC00072B9DFA472B9DFA472B9DFA472B1802495 +:10CAD0000200802402008024020000000000802464 +:10CAE000020000000000000000000020120048804A +:10CAF00000204880002048800020488000208004DA +:10CB0000000000000000488000204880002048808D +:10CB1000002048800020000000000000000000000D +:10CB20000000000000004880002048800020408075 +:10CB300000204880002000000000000000000000ED +:10CB40000000000000004880002048800020408055 +:10CB500000204880002000000000000000000000CD +:10CB600000000000000000000000000000000000C5 +:10CB700000000000000000000000000000000000B5 +:10CB800000000000000000000000000000000000A5 +:10CB90000000000000000000040000000000000091 +:10CBA0000000FF088F0FFF088F0F55755575FF2088 +:10CBB000FF20FF20B333FF200F2F0F4F333B555D76 +:10CBC0000F4FFF200F2F555D555DB333FF20FF2022 +:10CBD0008F0FFF20557533730F2F0F2F555D555D48 +:10CBE0003331FFFFFFFFFFFFFFFFFFFFFFFF2020AD +:10CBF000EFEFFFFFFFFF0040F7FF0101FEFF135FB4 +:10CC0000BF155F505353F30377220F330F33550F84 +:10CC1000F5050F0FFF00FFFF3333F505CF03550F69 +:10CC20005F503355330FF505330FFF00FF00FFFF53 +:10CC30003333FFFF333333330F0F3F0CDD117744B2 +:10CC4000CF03DD11DD114747DD11FF00FF00333356 +:10CC50000F0F3333FF00FFFF3333DD117744CF0372 +:10CC60003F0CCF03DD11CF031D1DFFEFFFFF33335B +:10CC70003333FFFF0F0F33330F0FFF00FF000F0F92 +:10CC80003333FFFF3333FFFF3333FFFF5555FFFFD0 +:10CC90005555FFFFFF00FFFF0F0FFFFF3333FFFF6F +:10CCA000FF00000000000000000000000400000081 +:10CCB000000000000000F3380501802014C5F319BE +:10CCC0000501802414435108050180249C45F32864 +:10CCD000050120441082B22805012043100090393C +:10CCE0000501204310105119050120449C01903981 +:10CCF0000501204398CE0908420020443CD68028F4 +:10CD0000400020430CE600000000C0280C4E30001C +:10CD10001001000000000000000000000000000002 +:10CD200000000000000003200400802808440000E8 +:10CD300000000000000000000000000000000000F3 +:10CD400000000000000000000000000000000000E3 +:10CD500000000000000000000000000000000000D3 +:10CD600000000000000000000000000000000000C3 +:10CD700000000000000000000000000000000000B3 +:10CD800000000000000000000000000000000000A3 +:10CD90000000000000000000000000000000000093 +:10CDA0000000000000000000000000000000000083 +:10CDB0000000000000000000000000000000000073 +:10CDC00008000000000000000000D1281000000949 +:10CDD00014E3D1281000000814E3D1281000000249 +:10CDE00014E3D1281000000214E3D1281000000041 +:10CDF00014E3D128100000001487D128100000028D +:10CE000014E3D12810000000148BE128080100026F +:10CE1000048781280400000014929120240000005F +:10CE200014C200000000000000000000000000002C +:10CE300000000000000000000000916820000004D5 +:10CE40002496000000000000000000000000000028 +:10CE500000000000000000000000000000000000D2 +:10CE600000000000000000000000000000000000C2 +:10CE700000000000000000000000000000000000B2 +:10CE800000000000000000000000000000000000A2 +:10CE90000000000000000000000000000000000092 +:10CEA0000000000000000000000000000000000082 +:10CEB0000000000000000000000000000000000072 +:10CEC0000000000000000000000000000000000062 +:10CED000000000000800000000000000000000C08A +:10CEE000D307C701C8400380CA00C401C7CB00EA0A +:10CEF000D3C70001E303C1C003C00203F3D300E2C0 +:10CF0000C147E023C01303C003C0930702EA00C176 +:10CF1000C3EBC200D707C0C1F300C022C40000D3D6 +:10CF2000C3630103440003E3C440C32302070007B3 +:10CF300003C0E00700000B0280008040C3410000F6 +:10CF400000000000000000000000000000000003DE +:10CF500003C000000000000000000000020000000C +:10CF6000000000000000000000000000C000000001 +:10CF700000000000000000000000000000000000B1 +:10CF8000000000000000000000000000D0000000D1 +:10CF9000020000040000000000000000000000008B +:10CFA00000000000000000000000C00500000000BC +:10CFB000000000000000000000C0000000000000B1 +:10CFC00000000000000000000080000000041000CD +:10CFD0000000000000001000000000000000000041 +:10CFE0000000000000000000000000000000000041 +:10CFF00000000002804008010020200204400001DF +:10D0000008010000101001010401C01020200501DA +:10D0100000100002C02000001200082005828000DD +:10D020000400000330001480000010110040800054 +:10D0300000800010302041010000401004A050008A +:10D040008400004040A00000034002848001804032 +:10D05000034100000000000000000000000000008C +:10D06000000000052002080005000000000000008C +:10D07000020000000000000000000000000010009E +:10D08000010000000000800000000000000000001F +:10D090000000000000000000000000000000100080 +:10D0A000010000000200000000000000000000007D +:10D0B000000000000000000000000000001001005F +:10D0C00000004000000000000000000000400000E0 +:10D0D0000000000000000000000000000004000844 +:10D0E0000000000000000000000000000000000040 +:10D0F0000000000000000000000000000000000030 +:10D10000000000000000008002001C0E50000280A1 +:10D1100001005C0EE0001203600000045270202B3E +:10D120000001800AC2F000A57100000531420062D2 +:10D1300074000080E6E001536200000A28180C83A6 +:10D14000011100855536000A0088004008F0800C67 +:10D1500000000080C300004003000000F040008099 +:10D160006100002EF06102E3213010860208226483 +:10D1700078100106328000009000120008002C6C2C +:10D180009610401600300C8260301188C2401600A4 +:10D19000000000000000000000000000F000088314 +:10D1A0000111500020E008136031140001000E004E +:10D1B00000000000F030000000000000000008D770 +:10D1C00079106800201202407830B4002142020039 +:10D1D00050000000000000030000000420040C00C8 +:10D1E00000000000000100000000008002000000BC +:10D1F0000000000000000000000000004068800007 +:10D20000000000000000000000000000000000001E +:10D21000000000000000000000001C80010010035E +:10D22000A002024000004C07E8020C23630040D437 +:10D23000440A0002E0004060A24A1C93E10000D0D2 +:10D2400021100002880200100040920B720140433E +:10D25000A0722DC2E58000874130000760510000B8 +:10D260000008000260300090C1F04007033400C0A5 +:10D27000F164222D080000E0E1C08180E93271866E +:10D28000C53202800110161EA04A2000000080074F +:10D2900000485E848110120020366D82753101C015 +:10D2A000AC022000000000000000000000000000B0 +:10D2B0000000C3A3E01091030060231092303010EF +:10D2C0002002300B000000000000200000000000E1 +:10D2D0000000081B0210140020082D0200301496D4 +:10D2E00005000000000080C00400000000000000F5 +:10D2F0000060300000000000E0000000800000003E +:10D3000002000000C0000000000006000000000055 +:10D3100000000023000000000000000000000000EA +:10D3200000000000000000000000000000003000CD +:10D330000E000A0E0000420004000808400003141A +:10D34000CB01000840402CF040000040C00422F80F +:10D35000C003002802611514080080162A0720283F +:10D360008A020008218980144000C0001130003872 +:10D37000C006000000000020500C002028400000E3 +:10D38000E600002000200902E00000424008000002 +:10D390008019249842400581001A240800000000EA +:10D3A0002805000000080008001881C4300220840D +:10D3B000081800860028000000000000001000008F +:10D3C0000000004000A00200011824912020202825 +:10D3D0008A1A2C40045000000000000000200002C7 +:10D3E000000000000000870021182460800520B89C +:10D3F0008A3A10103028C0004200000400000001EA +:10D4000002000002200000000000004000000000B8 +:10D4100018000000000000200001000000001000C3 +:10D4200000000000220000000000000000000000DA +:10D4300000000000000000000000000000000000EC +:10D4400000001C8001004203A80200C005003C004F +:10D4500040001282210000812140800402004084AB +:10D460004108128063000040003116848B004006A2 +:10D47000D0011203620080110860AEEB01000000D1 +:10D48000200000036040000000B48040D7110C0071 +:10D49000000000A063140000F07C08A8280000C170 +:10D4A000453826C700001448000807126000100025 +:10D4B000C86000888000000000302C00004001019E +:10D4C000C0141C0F028208C1C00000A700000000A9 +:10D4D00000000E00000000000070ADCB050010C081 +:10D4E000C1601C8361401443200100400000000023 +:10D4F000000000A80000000000088ECAE4025006E8 +:10D500000030120482140880018000080700000324 +:10D51000000800080000000000080080E300000090 +:10D5200000000E8000000000000000041000400019 +:10D53000080000000000000000000E0000000000D5 +:10D5400000080000000000000000000000000000D3 +:10D550000000000000000C8001000D0AA0001180F6 +:10D560000100820740014C8A050080582AC90263E5 +:10D570008400800A480202E361000021C68180CD58 +:10D5800081010006C000020360000087066206C336 +:10D590008500004708820003602800C0093000456C +:10D5A0006100014016CA00C0510000001010064082 +:10D5B00050008007021680E0713414A8C10086076D +:10D5C00000041040A40D0000A000000000E80007C7 +:10D5D0000028000028690E0064282900040140008A +:10D5E00000000000001001400300000001000C8357 +:10D5F0008578100600810C8361B09401A83000404A +:10D600000100000000001E026800000000100E82F1 +:10D6100070049008006002441030291600300E801B +:10D620000100000000100040010000000010002078 +:10D6300004000000000001000000000000000000E5 +:10D6400060000008E000000000000080030001000E +:10D65000000000000070000000000000000000005A +:10D66000000000000000400150082044000080003D +:10D670001C090011104401029141110080408004F6 +:10D6800080314012984984409401290020013800DB +:10D690009841809110318048394A21408849592465 +:10D6A000804124921018204420414402110C00288B +:10D6B0002C4C81500140414444424002990A100AD6 +:10D6C00002228140009C82042A420A0220844040B7 +:10D6D0004400449202002804100004820004040064 +:10D6E0004010211C214004404884510000008080EB +:10D6F0000110004080422084340008412144108AF7 +:10D700002C24400C000000002100900880014104FE +:10D7100014188110441001114420885000102090EA +:10D72000411021100084412204200104002C10002B +:10D7300000000400001004040000081280100429F6 +:10D7400000000C0A04840000000200100000000029 +:10D750000200088002040000000000000000000039 +:10D7600000000000000400080001000000000000AC +:10D77000000000000000000000000C000008080687 +:10D78000080DBC02080C0C3D2851500230013539FF +:10D7900000290C02001D79391058000A386D680400 +:10D7A000098A3C421070B91A1019000C0C5C6070A8 +:10D7B00090743C4295019C301C14297A10B0A476D8 +:10D7C0003A3C5000981C98364C5D790A00B9011813 +:10D7D0002C08180C000D0570B63840000C5258701B +:10D7E0000E008D79007E701C210A08AE3810050CE1 +:10D7F0005D5C7C9A763C90187955A094588930B03D +:10D8000090099009501E5914B0B0B0BE30007C7021 +:10D81000907C3E7C7C7D5C0C000A081A0D91381CC3 +:10D820005000105A1038781052190E30901D88167A +:10D83000B014B8109030001000B0100D0090B0502F +:10D8400000B810B0B87048B800107E10760078307C +:10D85000003940BC0250044C00B2003000040010FB +:10D86000007E8016A00A0400400400000000004E64 +:10D870000000000002010000000006080000000097 +:10D8800000000000009000000000000000001108EF +:10D8900010001B380F003F500C5801080B3C080CBF +:10D8A0002D2C74F032901B043E3830043A1C99063B +:10D8B000115C1851BE503A003E283A0C003C100052 +:10D8C000182C1D311A301C181A2C390C4B70BE1430 +:10D8D0009A201D0C08806E10309C3D100D101C34D9 +:10D8E000382800CD1CDC0F5C0C381420603000544C +:10D8F00014244C68103430103C0638398C40307891 +:10D9000051F60C1D4E59090A1E011C781C300831B5 +:10D9100010183C0E06001126085E00B120382A18A7 +:10D9200008004E182821001C18383F080A020380FE +:10D930003800338E2E00BC0C08063D0A1870080C07 +:10D9400018A61020000111303C60306000349C1C8F +:10D9500008300C580018000001000D0100500C8424 +:10D960000000006020000C140000085C0C20008007 +:10D970000001000000700080000000000C010000A9 +:10D980000000000000000000000000000000000691 +:10D99000000C00000000000000000000000000007B +:10D9A000000000000000000100020020003C040014 +:10D9B000000200000002800000120000300C000095 +:10D9C0000C000004083000000000000002300400D9 +:10D9D00000020000000808000C38020000100004DB +:10D9E0000044000040300A0820300C000282200170 +:10D9F00044328C00B4080411400A0C0200301810A4 +:10DA0000203000010C32308100320C010100006135 +:10DA100020000C000819202C08040004000002015A +:10DA20000C1100310C02004420480C0008000400D6 +:10DA30001C0000840C4130000C024C01000A08411B +:10DA40000C0600000D000081340180000000000081 +:10DA500000020000000010003000A00000000000E4 +:10DA600000000000000000800400000000000081B1 +:10DA700000000000008000800000000000000000A6 +:10DA800000000C000000000000000C00000000007E +:10DA90000000000000000000000000000000000086 +:10DAA0000000000000000000000000000000000076 +:10DAB000000000000000000000000008000C004012 +:10DAC00000810004000C000000083004008C0008F5 +:10DAD0000221000000000002018000000008000890 +:10DAE000004000040844000000020100108008000B +:10DAF000108000020000008000800900008000000B +:10DB0000003CA8082284408172010046810C048CEC +:10DB1000008081029000024000884128008C0000B3 +:10DB20000410005000040000008E9280213A000191 +:10DB300000180408008C1000023C005E8000000009 +:10DB4000000002408038003100104000000C200C22 +:10DB5000000E011C003C000000080208513040008B +:10DB600000000000008C0000000080004000B000B9 +:10DB70000030000000000000003040000100000004 +:10DB80000000000801108000000080000000000478 +:10DB90000000000000000000000000000000000085 +:10DBA0000000000000000000000000000100000074 +:10DBB0000000000000000000000000000000000065 +:10DBC0000000000000000000000000000000000055 +:10DBD0000000820008000804000000000000004669 +:10DBE000090082041020000008000000000000006E +:10DBF00008048204000008460D08002000000040D0 +:10DC00002A0800003000000008890020100000C829 +:10DC1000100008040000E4C20081080000000800B1 +:10DC200000890C00884182112810000008000000C3 +:10DC30000000080000200000100408000800200870 +:10DC40002024000000240000080020100020000410 +:10DC50000808080008000004082400000800000468 +:10DC60000800080000000000086800000804000028 +:10DC70002020000000000004000000000000002040 +:10DC80000000000020200000000000000020828131 +:10DC9000000000000000824302200080020000001B +:10DCA0002000000400004000000008000000822165 +:10DCB0000000080000008201000000000000820156 +:10DCC00000000000000082010000000000000200CF +:10DCD0000000004000000000000000000000000004 +:10DCE00000005F0A5F0ABB111B1BFFFFFFFFFFFF66 +:10DCF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF34 +:10DD00000F0FFFFFFFFFFFFFFFFF7F7F0047FFDFDA +:10DD1000FF7FFDFFFF7F5F5F0080FFFFFFFFFF5F73 +:10DD20005030FFFF1B1B1B1B27277F7F55D5FF7F15 +:10DD3000FEFF33A0FF000C00FF009F3F070701001C +:10DD400081001F5F1F53FF00FF007744CF03CF0305 +:10DD50001D1D330F77441D1D0F33FFFF0F0F55554A +:10DD6000FF00CF033F0C3F0C3F0CFFFF0F0FFFFFE7 +:10DD7000FF00FF0055550F0F55557744474777442F +:10DD8000CF030F0F0F0F5555FF00DD110F33330F6A +:10DD90007722FFFF0F0FFFFF0F0FFFFFFF00FFFFB7 +:10DDA000FF000F0F0F0FFF00FF00FFFF3333333370 +:10DDB000FF00FFFF5555FF00FF00FFFFFF0033335B +:10DDC0000F0FFFFFFF00FFFFFF00FFFF0F0FFFFF21 +:10DDD00033330F0F0F0FFFFF0F0FFFFF0F0FFFFF6B +:10DDE000FF00000000000000000000000000000034 +:10DDF00000000000000040808C2248808C2280249B +:10DE00000E0080240E0080240E0080240E0080244A +:10DE10000E0000000C0080240E0080240E0048201C +:10DE20001E2000000C0000000C0000000C008024EC +:10DE30000E0048201E2040808C2248808C2200004A +:10DE40001C0000000C0090040C0080040C0000205A +:10DE50001E0000000C0048000C2000000C00408058 +:10DE60008C2248808C2240808C2248808C220000AA +:10DE70000C0080040C0040808C2248808C22000022 +:10DE80000C0000000C0000000C0000000C004080A2 +:10DE90008C2248808C2200000C0000000C00408086 +:10DEA0008C2248808C2200000C0000000C00000036 +:10DEB0000C0000000C0000000C0000000C00000032 +:10DEC0000C0000000C0000000C0000000C00000022 +:10DED0000C0000000C0000000C0000000C00000012 +:10DEE0000C0000000C0000000C0000000C00000002 +:10DEF0000C0000000C00000000000000000000000A +:10DF000008000000000000000000488000204800D9 +:10DF1000000080240200802402008024020080246B +:10DF200002000000000000000000800400008024C7 +:10DF3000020000000000482012208024020000009F +:10DF4000000000000000002012004880002048006F +:10DF500000000020120000000000002012004820F5 +:10DF600012200000000048201220000000000000E5 +:10DF70000000488000204880002048800020488021 +:10DF800000200000000000000000488000204880C1 +:10DF90000020000000000000000000000000000061 +:10DFA00000004880002048800020000000000000A1 +:10DFB0000000488000204880002000000000000091 +:10DFC0000000000000000000000000000000000051 +:10DFD0000000000000000000000000000000000041 +:10DFE0000000000000000000000000000000000031 +:10DFF0000000000000000000000000000000000021 +:10E000000000000000000000000000000000000010 +:10E01000000000000C00000000000000000000FFF5 +:10E02000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 +:10E03000FFFFFFFFFFFFFFFF0F0FFFFF5555220000 +:10E040008800FFFFFFFF0080FEFF3F3FA200FFFFB1 +:10E05000FFFF8000FF7F555D5D08FF7F0F44FF0FCE +:10E06000FFFFFFFFFFFF11550F07FFFF0F0FAA7FF5 +:10E070004F87FF5544800080AA00FF5F11517F7FCA +:10E08000F757FFFF55575353F5053F30F3035F50E4 +:10E090002727F50535355555FF00FFFF33335F5012 +:10E0A000F5051B1B1B1BFFFFFF00FFFF55555555BB +:10E0B000FF00FFFF0F0F1B1BAF055F507722555569 +:10E0C000FF00FFFF0F0F553335352727F5050F0FDD +:10E0D000FF00FFFF5555FFFF3333FFFF3333FFFFD3 +:10E0E0005555FFFF0F0FFFFF0F0FFFFFFF00FFFF53 +:10E0F0000F0F33330F0FFF00FF0055553333FFFF72 +:10E10000FF00FFFF3333FFFFFF00FFFF0F0FFFFF95 +:10E110000F0FFFFFFF00FFFFFF000F0F3333000063 +:10E1200000000000000000000400000000000000EB +:10E1300000000000000000000000B118200680224E +:10E140001805C031840080A298850020000000429C +:10E15000000090031400004094863020100100203D +:10E160000000030004000000080080181001C0082F +:10E17000004000000000000000000000040000203B +:10E1800000003224140180210002702010010020C0 +:10E19000000000000000000000000000000000007F +:10E1A00000000000000000000000000900008008DE +:10E1B000002200000000000000000000000000003D +:10E1C000000000000000000000000000000000004F +:10E1D000000000000000000000000000000000003F +:10E1E000000000000000000000000000000000002F +:10E1F000000000000000000000000000000000001F +:10E20000000000000000000000000000000000000E +:10E2100000000000000000000000000000000000FE +:10E2200000000000000000000000000000000000EE +:10E2300000000000000000000000000008000000D6 +:10E240000000000000000000000000000000D128D5 +:10E250000200000114E3E1381002000014E300287A +:10E260000000000000C0C1201002400314E3402859 +:10E270000000000400000300100000001400E02172 +:10E280000000004000C0000000000000000001206D +:10E29000200000048488D12020000004002200080F +:10E2A000000000040000000000000000000000006A +:10E2B00000000000000000000000000000008000DE +:10E2C000000000000002000000000000000000004C +:10E2D000000000000000000000000000000000003E +:10E2E000000000000000000000000000000000002E +:10E2F000000000000000000000000000000000001E +:10E30000000000000000000000000000000000000D +:10E3100000000000000000000000000000000000FD +:10E3200000000000000000000000000000000000ED +:10E3300000000000000000000000000000000000DD +:10E3400000000000000000000000000000000000CD +:10E3500008000000000000000000000000000000B5 +:10E3600000000022C09300230307C4C3C1CFC7E24B +:10E37000C3E3002200C00000000057C3C38744C7A6 +:10E38000E3C00083000000014500000040230005B9 +:10E390000300008780000122000000000000000050 +:10E3A0000000000000C0C0044322C3838300C523D3 +:10E3B000E323008000434400818500002000000327 +:10E3C0000000020000000000000000020000000049 +:10E3D00000000000C000200000000000000000005D +:10E3E0000000000000000020A0100000C00000009D +:10E3F0000000000000000000000000000005C00058 +:10E400000000000000000000000000030000000009 +:10E410000000000000000010002000000000400587 +:10E420000000000000000000A0000000000000004C +:10E43000A00000000000000000000000002000001C +:10E4400000000000000000000000000500000000C7 +:10E4500000000000000800000000000000000000B4 +:10E46000000000000000000000000000000000208C +:10E47000000000000000000080020000090002030C +:10E48000C000082084020000000400000000000317 +:10E490008202000208840082000000012000400483 +:10E4A0000500000040000002824041000100002001 +:10E4B0000000000000000000002001000500300AFC +:10E4C000A00420002000000220A00000C0020020C4 +:10E4D000000000800000020000000000000000803A +:10E4E000000000000000000010000000000000001C +:10E4F0000000000000000000000008000000000014 +:10E500000108000000000000000000000000000002 +:10E51000000001000000000000000000000000807A +:10E5200000000000000000000000000000000000EB +:10E5300000000100000000000000000000000000DA +:10E540000002080000000800000020000400000095 +:10E5500000000000000000000000040000000000B7 +:10E56000000000000000080104000000000000009E +:10E57000000000000000000000000000000000009B +:10E580000000820418014C000060000000121C0012 +:10E5900000000000000800000000000000001C0651 +:10E5A000000000000008400000002E0000010000F4 +:10E5B00022440004708100000A0020C0710114048C +:10E5C000F0100C0060029080026008030801008EC9 +:10E5D000A53408800200000EA0044C850100808054 +:10E5E000236500100000000012002042004A10695C +:10E5F0003ACA0E8078300201003000002800000086 +:10E6000000000300007A0C400A0200000000000035 +:10E61000000000000000000040000082784A210550 +:10E620000240000078000000C0000203003920868C +:10E63000C240200000008000000000000000000038 +:10E64000000000000000000040000000000000800A +:10E65000020400000000000BF0000C0000000000AD +:10E6600000000100000000000000010000000000A8 +:10E6700030700000000000140000000000000000E6 +:10E680000001000000000000000000000000000089 +:10E6900000000000000000048010150000E00000F1 +:10E6A00000380A000000000000000D00000000001B +:10E6B0000000020800001000004002000000188561 +:10E6C000E00000C0A2690090E828000040081200A5 +:10E6D00080000104E008100360080E0302344002C9 +:10E6E00000000000083088A000002087010030955D +:10E6F000610000C1214006000200004000000EA0A1 +:10E70000690802412040010200B080C004042000DA +:10E7100000001400000002000038904840842C00E3 +:10E720000000000000004C002000000000006E838C +:10E7300001081440204820000000000008000030BC +:10E74000827C6C802D0E0E0000000007000000008F +:10E75000000000000000000000000000000000A019 +:10E760000300000800700005000000000000200009 +:10E770000000000000000200000000000000020095 +:10E780000000000000000000030000000000000086 +:10E790000000000020000000000000000000000059 +:10E7A000000000000000000000000401203800000C +:10E7B000004400000010020000000000001C3000B7 +:10E7C0000000000000000000000010000000000435 +:10E7D0000000201C46108023080000184480000020 +:10E7E00029002000C7008402088000104011110099 +:10E7F0000002430120000002012462080810C02327 +:10E8000022000000C51100A08002303C080080A654 +:10E810000080082100033400020400900840268094 +:10E820002C120020000050000000042820002E4080 +:10E830006001002000000000001002001000000431 +:10E84000200000A4240024A8480800000000400084 +:10E8500000000500000000C40405002000000000C6 +:10E8600000000000000000000200000000000000A6 +:10E870002000000000000000010000500000000027 +:10E880000080400020000000004000000000000068 +:10E89000020000000000000000200008040000004A +:10E8A0000000020000000000000000000000000066 +:10E8B0000000000000000000000000000000800DCB +:10E8C00020002A000240000000301100000000007B +:10E8D0000090110000000000E000010008002F007F +:10E8E00000BC540600004FA3910000060239000846 +:10E8F000621000C0F0091080E7018C090882400313 +:10E9000020020D0000001614E002800900381C806F +:10E9100000020083013E10B8C10000C6C5480F02C6 +:10E9200003004066026800C4604254C400002E9098 +:10E93000230010800B000005030000000008008386 +:10E94000CB805400C1000003000000000000000064 +:10E95000000200C1010010076300146650488007E0 +:10E96000000000060008124A00001483010100059F +:10E97000E0000000000126A00100000000080008DF +:10E980000000000000780000000000000008000007 +:10E99000000000000078008064000000E2020080B7 +:10E9A0000300000000804003000000000000000899 +:10E9B0008000000000004003030000000000000091 +:10E9C0000000000000000000000000000000000047 +:10E9D00000000007003008800B000000000648001F +:10E9E00000000000003800000000000004000800E3 +:10E9F000E0000E0000386C0600000E835500AC806D +:10EA0000E390005486000040E4100040100011081C +:10EA1000E0300000202D0C0000008007700000CACC +:10EA200001300E026000000A5A000C02000100389A +:10EA300050150E0200001E0632000C6071301426C4 +:10EA40000400000380351036A630002000000000CE +:10EA500000100067683814A6C965000000000000B7 +:10EA600010000000600000000400021000789416FE +:10EA7000C0B040070000000000100C40812C351A87 +:10EA8000C400000004000000C000000000000000FE +:10EA90000240000F00000009001400000000000008 +:10EAA0000010004001000000001000000000000005 +:10EAB0000200002000000080013000000000000083 +:10EAC000000000070400000000000010000000002B +:10EAD000000800000000000000000000000000002E +:10EAE0008040000000400120800A84240440084047 +:10EAF00049899004200410020802220131210001FA +:10EB00002098042C1110490020082400844400821D +:10EB1000288C242040015808504021902040340285 +:10EB200008419004010810503018203020093404A6 +:10EB3000311C803C504C81943C80018808440C017D +:10EB400031808180148124002A80482C0244208056 +:10EB50003881882A80810102104020800140000213 +:10EB6000040840022004090409021018008100086A +:10EB70001C080041081100000909005000004088ED +:10EB8000808A583180910808000000204010080851 +:10EB9000000080000401089000180008490000519E +:10EBA0000900808810001808080040022001008831 +:10EBB000000201042004080C0804002020000802C0 +:10EBC0004C0400080400010009408002000200001B +:10EBD000000A0100040000000000000040020800DC +:10EBE0000000000400000000000000000000000021 +:10EBF00000000000000008700000080D00040C0078 +:10EC0000083E04500C14304D046E3030005D087224 +:10EC10003969B47D00040DB8091D04007604704004 +:10EC20007060590E00080900087A3808195D39101B +:10EC3000BDB63E6A0010306C05BC1C301D38091092 +:10EC4000057C1DBD100470180C086D063CAA004C14 +:10EC5000A80E780030100DB00D060DB00C7A5C4C8B +:10EC6000A290000C28005878BD0E5019309C5D0011 +:10EC7000B009A100B208700CB27058703850381842 +:10EC8000A00DB80C387CB0700019700C7CB8001D59 +:10EC90007070301C00083C15003D3C7C3000B0BE5C +:10ECA00000399C0CB00AA01AB5B0581004180AB864 +:10ECB0007C003E3E0C1006781D00381C08B0000E8B +:10ECC00000A6000C401A0D00990004084C0000003A +:10ECD00000060C0008000008000000020C090000FB +:10ECE000000000020004600000000200400060001C +:10ECF000000004B0B00000000000000000000000B0 +:10ED0000000000000000000010160100701001104B +:10ED10001A0C393C0D900E3030BC307C0F0C408CFE +:10ED2000007C190C0C28510C001A0C3C0C0628D144 +:10ED30001050287E0809020830301C10110C1050A9 +:10ED40002020BC3A10301C0C0A983A0D54000130B7 +:10ED5000300036133058380C2C503018372C181817 +:10ED600028300C207028680404A03C100C283C516A +:10ED70000C10101C083C10371E09201C2A10788C1F +:10ED800000113A060C1A00000C5A3E0D104C5409A2 +:10ED90008C5C0B0A700861700800001C00540001B4 +:10EDA000047800300040B0A01028103C1A108050A9 +:10EDB0008000003600000080000010800C00002061 +:10EDC00001000000340080085480303000000080D2 +:10EDD0000052200030040600008C0008000C0008DF +:10EDE000000C0010100000003C08000008000C009F +:10EDF0000020105400080A00000C0C00080000005D +:10EE000000000000100800000000000800000000E2 +:10EE10000000000000000000000080000000000072 +:10EE200008000001010000000000000100020020B5 +:10EE3000000404000C1200004000940000000000D8 +:10EE40000010000100300000800040204030200011 +:10EE50008030000000020030001000000000800040 +:10EE6000803010000400000184008C0100008080CC +:10EE7000003100414000000A0C01320080380002DD +:10EE8000840A40004008003000000021002080007B +:10EE900000207009042000800510042104084400AB +:10EEA0001002000100000110000100A1300000006C +:10EEB0000000008108000000000000010000008048 +:10EEC00000024001000000010000000111020000EA +:10EED0000080008000000000000000010000000031 +:10EEE0000000000D000004000040000000000000D1 +:10EEF000000000000000000000080080040800007E +:10EF00000000000000000C000000000000000000F5 +:10EF100000800000000000000000008000000000F1 +:10EF20000000000100000000000C000000003000A4 +:10EF300000000000000009080000000000000008B8 +:10EF4000000C00400002000400940000000050008B +:10EF50000000000000802008008000800000304099 +:10EF6000204080000040000020340040008000006D +:10EF7000003000003040100C02340004020032085F +:10EF800000003020014C004800000000003C480018 +:10EF900010800000120A10413000200000000048DC +:10EFA00000403000004070090A48003002800288AA +:10EFB000020132004009004800040C40020C0068C5 +:10EFC00040300000021001280110000020800108DC +:10EFD0000030003000083008000401000000010883 +:10EFE000440C000000300020000000000031000848 +:10EFF00000000000023000080000010000300000A6 +:10F00000000080040000000000000000000200304A +:10F0100001010000040000000000000000000000EA +:10F02000000000000000000000300400000000307C +:10F0300000000000000000080000000000010000C7 +:10F040000000000000000000080004400100000073 +:10F05000000000C00000400100000804082000106B +:10F0600000000804000000000000E043020000046B +:10F0700000000000000000008080000028280080C0 +:10F080002000000000200000000030068226000062 +:10F090000000010120000004000000C20000000880 +:10F0A0002820000202890000000000000008601211 +:10F0B000000000000000000000000000040C000040 +:10F0C000100000000000001000000000000400001C +:10F0D00000000000002001000020000020200000AF +:10F0E00020000000002000000000000000040000DC +:10F0F00000200000000000000000000400000000EC +:10F1000000200000000000804220000800000000F5 +:10F1100000000000000000040000000000000000EB +:10F1200000000000000000000400000000000800D3 +:10F130000000C000000000000000000000200400EB +:10F14000000000000000008000008200000000803D +:10F150000000000000000000000000000000FFFFB1 +:10F16000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAF +:10F17000FFFFFFFFFFFFEFEFFFFFFFFFFFFFFFFFBF +:10F180000F0F04040808FFFFFFFFFFFFFFFFFFFF53 +:10F19000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFF +:10F1A0003074FEFFFF77FFFF0F0FFFFF5555FFFF86 +:10F1B000FFFFFFFFFF0055550F0FFFF31113FFFF78 +:10F1C0003333FFFFFF0047473F30F5054747FFBF99 +:10F1D000BFFFFFFF55553333FF00FFFF5555FFFFBE +:10F1E0005555FFFF333355550F0F33330F0FFFFFC7 +:10F1F000FF00FFFF3333FFFFFF005555FF0055555C +:10F200000F0FFF000F0FFFF7FFBFFFFF0F0F0F0FD5 +:10F2100033330F0FFF00FF003333FFFFFF00FFFF0B +:10F220003333FFFFFF00FFFFFF00FFFFFF0033331B +:10F23000FF003333FF0055550F0FFFFF3333FFFF40 +:10F240000F0F33330F0FFF00FF00FFFF3333FFFFBC +:10F25000FF00FFFF0F0FFFFF3333FFFFFF00000032 +:10F260000000000000000000080000000000000096 +:10F27000000080240E0080240E0080240E008024D4 +:10F280000E0080240E0080240E0000000C0080245C +:10F290000E0000000C0080040C0080240E0080246E +:10F2A0000E0080240E0080240E0080240E00802496 +:10F2B0000E0048201E2000000C0000000C00000082 +:10F2C0000C0080240E0000000C0000000C00482000 +:10F2D0001E2000000C0000000C0040808C224880A2 +:10F2E0008C2200000C0000000C0000000C0000004C +:10F2F0000C0000000C0000000C0000000C000000DE +:10F300000C0000000C0000000C0000000C000000CD +:10F310000C0080040C0000000C0000000C00000039 +:10F320000C0000000C0000000C0000000C000000AD +:10F330000C0000000C0000000C0000000C0000009D +:10F340000C0000000C0000000C0000000C0000008D +:10F350000C0000000C0000000C0000000C0000007D +:10F360000C0000000C0000000C0000000C0000006D +:10F370000C00000000000000000000000C00000075 +:10F38000000000000000D8A472A9DFA472B9DFA4B5 +:10F3900072B9DFA472B9DFA472B9DFA472B9DFA4B5 +:10F3A00072B9DFA472B9DFA472B9DFA472B9DFA4A5 +:10F3B00072B9DFA472B9DFA472B9DFA472B9DFA495 +:10F3C00072B9DFA472B1002012004800002048206A +:10F3D0001220000000000000000000000000802457 +:10F3E000020000201200802402000000000048807B +:10F3F0000020488000208004000000000000000081 +:10F4000000000000000000000000000000000000FC +:10F4100000000000000000000000000000000000EC +:10F4200000000000000000000000000000000000DC +:10F4300000000000000000000000000000000000CC +:10F4400000000000000000000000000000000000BC +:10F4500000000000000000000000000000000000AC +:10F46000000000000000000000000000000000009C +:10F47000000000000000000000000000000000008C +:10F48000000000000000000000000000000000007C +:10F490000400000000000000000033730F4F555DB2 +:10F4A000FF08FF20B333D5558F0FB3338F0F8F0F66 +:10F4B000D555FF20B333D555D555FF200F2F5575A2 +:10F4C0005575FF20B33355758F0F55750F2FFF08F6 +:10F4D00033735575FF400F2F3323FF7F3F35CCA08B +:10F4E000CC00FF3FCC558000555533335555FFF7C1 +:10F4F000FF7FFFFFFFFF0F03FD0DFFFFFFFF0F0F5C +:10F5000055555353DD111D1DF3033333FF00FFFF2A +:10F510000F0F0F0FFF00FFFFFF00FFFF5555FFFF0D +:10F520000F0F5555FF00FFFF55555555FF00FFFFC5 +:10F530003333FF000F0FFFFF3333FFFF3333FFFF82 +:10F54000FF005555FF00FFFF0F0F3333FF00FFFF94 +:10F550003333FFFF3333FFFFFF00FFFF3333FFFF82 +:10F56000FF00FF00FF00FFFF5555FFFF0F0FFF00DB +:10F57000FF00FFFF555555553333FFFF3333FFFF72 +:10F580003333FF00FF00FFFF5555FFFF0F0FFFFF55 +:10F59000FF00FFFF5555FFFF0F0F000000000000A8 +:10F5A000000000000400000000000000000008004F +:10F5B0000403C020144584220403C020988241091A +:10F5C000040300A09CC1490804032001100C45005D +:10F5D000040380009806E3350403C0209C83EB38C5 +:10F5E000040340289CC3B228040380A09C8B020023 +:10F5F00004000020000000000400000000000010D3 +:10F60000000000000000BB09140380080C00020089 +:10F6100040000000040000000000000000000300A3 +:10F6200004000000080000000000000000000000CE +:10F6300000000000000000000000000000000000CA +:10F64000000000000000000000000000000000308A +:10F65000000000000080000000000000000000002A +:10F66000000000000000000000000000000000009A +:10F67000000000000000000000000000000000008A +:10F68000000000000000000000000000000000007A +:10F69000000000000000000000000000000000006A +:10F6A000000000000000000000000000000000005A +:10F6B0000000000000000000080000000000000042 +:10F6C0000000E1248000000114E3C9218000000152 +:10F6D00014E3C7288000800814E3E10080000000E4 +:10F6E0001403C900800000011423C7228000000118 +:10F6F00014E3E1248000800014E3D1288000000896 +:10F70000148B1008200000040000100020000000EE +:10F71000000000280000002400C0010000000000DC +:10F72000140011000200000084000000000000002E +:10F730000000110020000000240000000000000074 +:10F7400000000000000000000000000000000000B9 +:10F7500000000000000000000000000000000000A9 +:10F7600000000028001000280040000000000000F9 +:10F770000000000000000000000000000000000089 +:10F780000000000000000000000000000000000079 +:10F790000000000000000000000000000000000069 +:10F7A0000000000000000000000000000000000059 +:10F7B0000000000000000000000000000000000049 +:10F7C0000000000000000000000000000800000031 +:10F7D0000000000000000203C1C0C703C80000E32E +:10F7E000C0C38300CAC80013E3C0CB22812303E354 +:10F7F00080C00000CB0103C3C8C3C3C3831303C0CD +:10F8000000C38023C21300C9C880C407C20300C05C +:10F810001383C807C322000400804463476203C007 +:10F820000000010000000300000047200880800065 +:10F83000C4808301000000050003030000000000F5 +:10F840000000000000000005C000000210000000E1 +:10F85000004000000000000008000000040000005C +:10F860000000D000000000000000000001000003C4 +:10F87000000500000000000000001000030000036D +:10F880000000400000000000001000052000000003 +:10F890000200000500000000000000000000000061 +:10F8A00000C0000010000000004000000000000048 +:10F8B000021000000000000000040000A000000092 +:10F8C0000000002000000000000500100000000003 +:10F8D0000000000000000000000000000000000028 +:10F8E000000000000000000000000441501020084B +:10F8F000028000028028A0800400000040820800EE +:10F90000C0004002802001000801080A2018841865 +:10F91000880020820028800084000001020200008C +:10F9200084080020000A0200840000000004002077 +:10F9300002200420001020008000020000002000AF +:10F94000000480820002C00101C000000001040028 +:10F9500000000000000000000000000080000080A7 +:10F96000000000000040000000000800000000004F +:10F970000000000000000100000000000000000086 +:10F9800020000080000000000000000000000000D7 +:10F9900020000080000001000000000000000000C6 +:10F9A0000008000002000000001000000008000035 +:10F9B00000000000004000080000000000410000BE +:10F9C00000000800020040000000000000000000ED +:10F9D000000000000000000000080000000000001F +:10F9E000000008000000040000000000000000000B +:10F9F00000000000000000000000000000000010F7 +:10FA000000008A0EC000008001000004E0001380A6 +:10FA10000000B401C00000450100002110020040B8 +:10FA200010008000C064206000005C08E00002005C +:10FA30000000DC0E00000E40003013211000088290 +:10FA400050280010020007000000000000000080A5 +:10FA500001000000A00000C501020000E06A0000F3 +:10FA6000008000C003000102281014A01908400BF8 +:10FA70000000004028000000000000000800000016 +:10FA8000000000002048000000000000000000000E +:10FA900000000000007002001000001E00000003C3 +:10FAA000000010000000400C00000080E100000099 +:10FAB00000000080020000000000000001000020A3 +:10FAC00000000000010002000000000000000050E3 +:10FAD00001000004000000000000000000600000C1 +:10FAE00000000000000401000000000000600000B1 +:10FAF00000000004000000000000000021000000E1 +:10FB000000000000000000000000000000000000F5 +:10FB10000000108000002C00C0001C8001001604B2 +:10FB20004000028000001000E0001600030030409A +:10FB3000000032208A02140BC06016000300080186 +:10FB40002000022002000C00C0000000020008009B +:10FB5000E00060B5E88100C7E5080800C0000004C7 +:10FB60004000008001000000A0008000E838000094 +:10FB70000070000000300000200202B0615400005C +:10FB800000002003E000000000002020C0008046AC +:10FB900000004003000000000001201000000000F1 +:10FBA00000642000000000000000010000020000CE +:10FBB000000000200000020000002004000000807F +:10FBC0000101200000000000000000A00100000072 +:10FBD0000000008001000000000020000000000084 +:10FBE00000000080010000400464001000000000DC +:10FBF0000080000000000000007002000000000013 +:10FC00000080000003000000000000000000000071 +:10FC100000000000000000000000000000000000E4 +:10FC2000000000000000B0000B0040036800B0407E +:10FC30000500830228000000050006042800300C9F +:10FC40000F000020000020009A02420128202840D6 +:10FC50000100C803380042000B000802C800590028 +:10FC60000F10000118004008400000880A182CC03E +:10FC70000009800018000800050008016810000055 +:10FC800034040000200800000004000000010908FE +:10FC900000034A40098000021000000082000000BA +:10FCA0000001000000000000000000010000000052 +:10FCB00000024000000000000000000400200000DE +:10FCC000000000000200010100020000000400002A +:10FCD000000000A0020000080800008000002000D2 +:10FCE0000000008000100000000000800000040000 +:10FCF000000000004200000001000042000000007F +:10FD00000000000000000020200000000000400073 +:10FD100000000000020000000400000202000000D9 +:10FD200000000080800100000000000000000000D2 +:10FD300000000000000000000000000000002E0194 +:10FD4000C000000000000007C0003EC0070014060D +:10FD5000200000800000800BC8001002000000039B +:10FD60000000000003003C0100002F0000005406CA +:10FD7000A00206000000120600005EA71B0000049F +:10FD80002140020700000000E00000200A000000FF +:10FD9000A00000A828120C00006000000030000045 +:10FDA00000014CA3EB820C01D00000020014008083 +:10FDB0000100000000000010000000000000000032 +:10FDC00000000008E0000004000100A00000001393 +:10FDD000000000000300000000080808E000000028 +:10FDE0000040800BE00080810100018000000000E5 +:10FDF00000080E00000000C0050006000000000022 +:10FE0000000800000000000000800000000000006A +:10FE10000008008807000008C0000EA58000000050 +:10FE200000000000000000C005010000E00000002C +:10FE300000000000000000000000000000000000C2 +:10FE400000000000000000000000000000000C00A6 +:10FE500000001C08000206200000A81E100200C0BE +:10FE600001001109D00218830000010AA0028000DD +:10FE70000000000AD00100100000020820010E401E +:10FE800000006C2A0000088000001126C00201C09A +:10FE90005100AC07064580400000000700010C40FF +:10FEA00000002000A041008020000100B098000068 +:10FEB00000000000C0600C8361084E9002009E02AA +:10FEC000000000800500000000000080030000002A +:10FED000000000080000000000000000C00000005A +:10FEE000000000800300002000000000011000005E +:10FEF0000000000000000003040000800500060769 +:10FF0000F000000000100000000000000070200061 +:10FF1000000000000030000000000000421000005F +:10FF20000000008003100000000000080001010034 +:10FF30000000000000000000000000804100000000 +:10FF400004000080030000000000000100700000B9 +:10FF500000000000000000000000000000288010E9 +:10FF600050088410488928482049490020001184FD +:10FF70004C12205004143422840A10202008482CEB +:10FF80001000001028114051404140222022818061 +:10FF9000885A8000200024848421013430180440D1 +:10FFA000803C84902428205081404C51884101217C +:10FFB0004100010229222C8494048C9251808001FA +:10FFC000888204400080014201810C809020014819 +:10FFD0008101098001909A2C2081108141012088A3 +:10FFE0005080000000000022000200005130014A51 +:10FFF000044000015100000104124000082000826A +:020000040002F8 +:1000000000200092200C004802920458012088141D +:10001000884102080012010008200000029011022D +:100020002020848450100004000009428410000045 +:10003000040420082000010440040400820101009F +:1000400000000180010000002000010220000001EA +:10005000000000000000000022000000000001007D +:10006000000000040000000000000000000000008C +:1000700008049030000C00160C0808000808080955 +:10008000008015009C3A091D00001D0A096C397E8C +:100090006004780000BC080D003D593A090E08794B +:1000A00099710002001C0950000D79A0BCA1B01983 +:1000B00010040C0D701C0D190908BD3000060C1140 +:1000C0007C00918E09700DAA5C9E0C4D1DBD041A1A +:1000D00020007C41006D050A01005C794A90A8BEB1 +:1000E0002DBCBD0C24A0088A04383C0C5E783C0A68 +:1000F000000A7878390EBD00000D0019980E9005A1 +:1001000030198D102850B8992E70000D541009B474 +:1001100000103039055A0E15410400081010083837 +:1001200085090830587E005C06110E9000300030C2 +:10013000A01A300008BE2D00151E00890000040022 +:10014000001080051031000C45700006900000067C +:1001500000BA0000000000000000010000020000E2 +:1001600000000000800100000000001000000002FC +:1001700000000000000D0000000000000030000042 +:100180000000000001101050100A18003A383E001C +:100190003F2818000050003C10081A3008553C3029 +:1001A0003048001236023E1C7A510B0020581A08C3 +:1001B000202C1138001C1C001A281E5020003C2C3A +:1001C000191C0C300000090A2A1C3C00081A3000D7 +:1001D0001C303C30303C083C1866000C3C1C3C3465 +:1001E000200C28183C2E0108BA1878100E1E0D3865 +:1001F0006C287C0030370030BD5508168D1134183E +:10020000302901283404111000900A000A000E9CC5 +:100210000F0800063010049C893A615C080A000847 +:1002200009081A5100B08A880030061C3A080A1ED4 +:10023000801C0D000C30200400080000000808009D +:10024000009000820020000811308C3810000E0C45 +:100250000000080C0C0000008D8C100000000C0841 +:10026000000C080620000C00000004000C00000038 +:100270000E000C0C3000000C00000000000000809C +:100280003000000000000C000000000C0000000026 +:1002900000800000000000000002000000000020BC +:1002A0000000000001220000001600108000000085 +:1002B000004A00200060000002000800400020000A +:1002C0000002000A003080000060000080A00030C2 +:1002D0000030300084200008021000204E218208E7 +:1002E000803000000039407C00118000043800009C +:1002F000800E000008000C0000B900304000001221 +:10030000000D0000008100000C000C32081080205D +:100310004C01004A81180020042048000D090C807F +:100320000C010C020089008000108C900C8100A14F +:1003300000011C220800108100008000000800B1AC +:10034000100015802C300C014009020100B0100093 +:100350000400100000010004048000000000000000 +:100360000208000000000000000000000000000083 +:10037000100000000000000000001000000000005D +:1003800000000000000000800400000000000000E9 +:10039000000000000000000000000000100000004D +:1003A0000000000000000000000000000004000049 +:1003B0000000004000000080008C0000008400402D +:1003C00010000004021500400050810008000100E8 +:1003D0000000A08000040000008010000050000019 +:1003E00010700004008040001260200008400040AF +:1003F00008801C0000B002000012304C029C30004B +:10040000028A00001046002001000000007C044029 +:100410003000024C00020000002401080008000E19 +:10042000008812883204009D10B2008002703100F2 +:100430000C0600A80034020C003E00600070105052 +:10044000883E00A8000E404C0000402C00083004FC +:100450000036002C20004E2080B202080034080C28 +:1004600000B04000023040000004000102300000F3 +:100470000002000009000000000000000100000070 +:1004800000000001400001000000000200004000E8 +:1004900000000000000000000000803001000000AB +:1004A000000000000000000000000000000000004C +:1004B00040000000000000000000000000000000FC +:1004C00000008200000000000000000008000000A2 +:1004D000000800040000000400008200000020006A +:1004E0008800000000812000000082082B0000002E +:1004F0000000000000000014080000040020200894 +:1005000000008100080002C8002000000070000CFC +:100510002020008002848201000081208041280088 +:100520000048040400000000200000000000000457 +:1005300008040810180400040000810000200000D6 +:1005400020600000180008040820000008002000B7 +:10055000202008000C000000004089000800400036 +:100560002004000400240010300081000820000056 +:10057000002800000400000000200000000000002F +:10058000000000000000400400080000000400809B +:10059000000000000000000000000000000000005B +:1005A000000000000000000000000000000000004B +:1005B00000000000808100000000000000008201B7 +:1005C00000000000000000000000004040000000AB +:1005D00000000000000000000000555527271B1BED +:1005E0005F0AFFFFFFFFFFFFFFFFFFFFF5051B1B7C +:1005F0002727FFFF5555FFFF0F0FFFFFFFFFFFFFEF +:1006000055553000C000FFFFFFFFFF5FF088F3F398 +:100610000F87FFFFFFFFFFFFFFFFFF7F7747008090 +:10062000FA50FFFF3333D9D977D8FFFFFF00FFFF20 +:10063000FFFF0F0F35355F50F303FFFF0F0FFFFF75 +:10064000FFFFFFFF5555FFFF3333330FDD111D1D36 +:100650007744FFCCFF7FFFFF0F0F0F33DD11DD115C +:10066000CF03FFFFFF00DFFF7FFF0F0FFF00FFFF44 +:100670003333FF000F0FFF00FF000F0F0F0FFFFFBF +:10068000333333330F0F0F0F0F0FFFFFFF00FFFF49 +:1006900033330F0F55553333FF000F0F0F0FFFFF8D +:1006A0003333FFFF5555FFFF0F0F55550F0FFFFF5A +:1006B0000F0FFFFF5555FFFF5555FFFF3333FFFF6A +:1006C000FF00FFFF55553333FF00FF000F0F33339B +:1006D0003333FFFF3333FFFF3333000000000000EC +:1006E0000000000004000000000000000000408046 +:1006F0008C2248808C2280240E0080240E004080B2 +:100700008C2248808C2200000C0000000C00802409 +:100710000E0000000C0080040C0080240E00482015 +:100720001E2048201E2080240E0080240E00002061 +:100730001E0000000C0000000C0090241E000000B1 +:100740000C0080240E0040808C2248808C22000007 +:100750000C0080240E0000000C0000000C00408003 +:100760008C2248808C2200000C0000000C0040808D +:100770008C2248808C2200000C0000000C0000003D +:100780000C0000000C0000000C0000000C00000039 +:100790000C0000000C0000000C0000000C00000029 +:1007A0000C0000000C0000000C0000000C00000019 +:1007B0000C0000000C0000000C0000000C00000009 +:1007C0000C0000000C0000000C0000000C000000F9 +:1007D0000C0000000C0000000C0000000C000000E9 +:1007E0000C0000000C0000000C0000000C000000D9 +:1007F00000000000000000000000000000000000F9 +:100800000000480000009024120080240200000034 +:10081000000048000000D8A472A9DFA472B9DFA4C8 +:1008200072B9DFA472B9DFA472B9DFA472B9DFA410 +:1008300072B9DFA472B9DFA472B9DFA472B9DFA400 +:1008400072B9DFA472B9DFA472B9DFA472B9DFA4F0 +:1008500072B9DFA472B10000000048800020480097 +:1008600000008024020000000000000000000000E2 +:1008700000004880002048800020000000000000A8 +:100880000000488000204880002000000000000098 +:100890000000000000000000000000000000000058 +:1008A0000000000000000000000000000000000048 +:1008B0000000000000000000000000000000000038 +:1008C0000000000000000000000000000000000028 +:1008D0000000000000000000000000000000000018 +:1008E0000000000000000000000000000000000008 +:1008F00000000000000000000000000000000000F8 +:1009000000000000000000000000000008000000DF +:10091000000000000000FFFFFFFF5F137707FFFFED +:10092000FFFFFFFF3333FFFFFFFFFF400F4F557502 +:100930000F4F3373FF4033730F4FFF400F4FFF4094 +:1009400033730F4FD5550F4FFF40D555FF405575A9 +:100950003373FF40FF40D555D5553373FF40555D88 +:100960003373555DFF08D5551555FFFFFF00FF3365 +:10097000FFFFFFFFFFFFFFFFFFFFFFFF3333FFFF1F +:100980003333FFFF3333F3037722550F0F55FFFF48 +:100990003333FFFF3333F505F5051B1B5F50FFFFB6 +:1009A0000F0FFFFFFF00FFFF3333FFFF0F0F333346 +:1009B000FF00FFF7FFBFFFFFFF000F0F0F0F5555A1 +:1009C0000F0FFFFF33335555FF000F0F3333FFFF7A +:1009D000FF00FFFF0F0F33330F0FFFFF0F0FFFFF5E +:1009E0000F0FFF00FF00FF003333FFFF3333FFFF24 +:1009F0003333FFFF0F0F3333FF00FFFF0F0F55554A +:100A0000FF00FF000F0F33333333FFFF5555FFFF58 +:100A10003333FFFFFF000000000000000000000073 +:100A20000C000000000000000000000010010000A9 +:100A3000800181390000008008C604002000000009 +:100A400010014100100000001000490008000010D3 +:100A50001401C509C00000021084E328100080289A +:100A60001401EB380800200110406720C00000206E +:100A70001401A2090002800810008A03000000800F +:100A80000400000000000000000083090002800054 +:100A9000040400000000000000000000000000004E +:100AA0000000000000000000000000000000000046 +:100AB0000000000000000000000000000000000036 +:100AC0000000000000000000000000000000000026 +:100AD0000000000000000000000000000000000016 +:100AE0000000000000000000000000000000000006 +:100AF00000000000000000000000000000000000F6 +:100B000000000000000000000000000000000000E5 +:100B100000000000000000000000000000000000D5 +:100B200000000000000000000000000000000000C5 +:100B30000000000000000000000000000000400075 +:100B400000000000080183281200804814E24000E1 +:100B5000000200000001470024020000140161218E +:100B60000C02002014C1C9200201405014E34708C0 +:100B7000220100041401E1280A01004414C74908B5 +:100B800004020004140147008402000014018100E3 +:100B90001400400014220000000000000000890042 +:100BA000020000011422000000000000000000000C +:100BB0000000000000000000000000000000000035 +:100BC0000000000000000000000000000000000025 +:100BD0000000000000000000000000000000000015 +:100BE0000000000000000000000000000000000005 +:100BF00000000000000000000000000000000000F5 +:100C000000000000000000000000000000000000E4 +:100C100000000000000000000000000000000000D4 +:100C200000000000000000000000000000000000C4 +:100C300000000000000000000000000000000000B4 +:100C400000000000000000000000000000000000A4 +:100C5000000000801008D801D8000000034003C73E +:100C6000000000C900088000130000A303C8C401ED +:100C7000000300EAA3C0C401C80003C3E3C0CBE380 +:100C8000830703C11301C00046130093C7C044018A +:100C9000C30320A300C84401C4430080C3D3C023BE +:100CA000010300000000C4C0C023000000000000D9 +:100CB000000003000000C40300000000000000006A +:100CC0000000000000000000000000000000000024 +:100CD0004200000000000000000000000000A01022 +:100CE00000040100000004000000000502C0040030 +:100CF00000000000000200000005000000000003EA +:100D000000000005000000000000000000000000DE +:100D10000000000000800010030000000000000040 +:100D200000080000080000000000000500000000AE +:100D300000000100000000000000000000000010A2 +:100D40000000030000000005000000000400000097 +:100D50000000000000000000000000000000000093 +:100D60000000000000000002000000010000000080 +:100D70000820412004000001000080000000000263 +:100D800040000001000100002002000100000803F3 +:100D900020A02004A0000421004180800400020261 +:100DA00008200001A00100020000000500210382CC +:100DB00018201000410100000008001082200020CF +:100DC0000000000000000800000000010100000019 +:100DD0000000000000000000000000000000000013 +:100DE00010000000030000000000000000000000F0 +:100DF00000000000000020000800000000000000CB +:100E00000240000800000000808000000000000098 +:100E10000000008020000000000000000000000032 +:100E200000000400000000000004000002000000B8 +:100E300000000000000008000000000000000000AA +:100E40000000000000002000000000000000000082 +:100E50000020000000000200000800000000000068 +:100E60000000000000000000000000000000000082 +:100E70000000000000000000000080841801114004 +:100E800002800000000214000000800070021000C8 +:100E9000E04019800200002E30020E000000020E19 +:100EA000000020900000D480A6000C67010000889C +:100EB00021340E8003000200A0000E85500000883F +:100EC00023040240600000B032720E0000000021D6 +:100ED00000008C0050004E80026000000000000006 +:100EE000000000000000000000402E906338D28017 +:100EF00052E80000000000000A00A82028104C2B37 +:100F000008E800007000001E0088000000000000DB +:100F1000404000D001000000200020000000000040 +:100F2000C06000000000001E08000000000000007B +:100F30000079200000000000E00000000000001E1A +:100F4000204800800100000400000C0000000000A8 +:100F50000000400000000000A000000000000000B1 +:100F6000E200004001000000F0000000000000006E +:100F7000009000000000008002100000000000004F +:100F8000000000000000000000000000000000045D +:100F90008028160000000000000800000000008506 +:100FA000F3010E00C01248000000000120001E8066 +:100FB000830000012000188000004CC3E0000107FE +:100FC000E200001720002F0000005400A0004E0097 +:100FD0006000008121000C006002000122780E20D8 +:100FE000033C1C00000001051010141000800000DC +:100FF00000300C0000004000000000000008528398 +:1010000071B80C43246040030000000000000E840F +:101010000110100300600000F30100000000000058 +:1010200000000000000808000200000030010E006F +:1010300000000000488000000000000000002000C8 +:1010400000000000E0004000000000000000000080 +:1010500000000000080040000300000000009000B5 +:101060000000000000000003C0000000000120009C +:10107000000000000200600000000000000000000E +:1010800000000000004800200000000002080000EE +:101090000000000000000000000000000000000050 +:1010A00000000081246000006801000000041C00B2 +:1010B0000000000007221000226008000600000364 +:1010C000140030001F008002880020C200000800C9 +:1010D0002B0030960A0380026A02200004000308F5 +:1010E000680062046F0180A23C0034809E02000010 +:1010F0000408C30000001040000008020050000077 +:1011000000000000000C2200000020000000000091 +:1011100000000000006101111B00000000020080BF +:1011200000004000001A0910CD000000240000005B +:101130000204000800000000220082000B000000F2 +:10114000008000080000000008000000000000000F +:101150000000000000000004000000020000000089 +:1011600080088000000000000000008004000002F1 +:10117000000020000000000000000000000100004E +:10118000000080000000000080010000010040001D +:1011900000400100000000001000000000000000FE +:1011A000000000000000000000000000000000003F +:1011B000000000000000004487002A00C0000080FA +:1011C000041034000000002DC202140008022E801A +:1011D0006301000000001C800100800FF001008707 +:1011E0000300000000001E8D13000C87010001C0E9 +:1011F0000400500600009208D20000F0C17C00807C +:101200008100400020000C0000000C0600000002DD +:101210002080000000104084041010000000020034 +:10122000030000000000BE0000000D0050000E0290 +:10123000C30000600000800060004D000214000048 +:101240008002000000380600000000000000008856 +:10125000000000C0A4780007000000000000008823 +:1012600003000007000000A00000001600000000BE +:10127000000000000008000800000000000000005E +:10128000E000000000000EA8E001000000000E00D9 +:10129000000000000000000000000000000000004E +:1012A0000000000400080808000000C00500060057 +:1012B000000000000000000000000000000000002E +:1012C0000000000000000000000040408100080015 +:1012D000A012000000001000000000C02100350036 +:1012E0000200082000008000000000C001002C0E59 +:1012F000E00098E701008110D4010EC75100EC9E78 +:10130000E5390E80000020260001020770008007EA +:10131000C2101C801100800610380C00000001B0C3 +:101320000300880228292100001C000000000000A2 +:1013300000000020000000000000020580300C804A +:10134000C2188120000000C00100004703340C2AAD +:10135000C24800001000000002302003000000809E +:101360000200088000000000B012400700000000EA +:1013700000000020F4008000000000000000008059 +:1013800003000002000000000010080F0000000031 +:101390000000000004000000000000000000000049 +:1013A0000000010000000000000008000000000034 +:1013B000007000000000000000001E00000000009F +:1013C00040002000000000000000000000000000BD +:1013D0000000000000000400000140408041400087 +:1013E0000400048409018402000C0A0201041000B4 +:1013F0005004540440919041380C4420544148809A +:101400000048504A90019102381228314141492246 +:1014100028490042504090823081323414303120CB +:101420003139202400492444102401804A584420A2 +:101430003800308881502880000101022C41110AB7 +:10144000484C2A1801429400812102081928008082 +:1014500010080C480120480480090A4C91005000F3 +:10146000040184810A2C8040408849280100000141 +:10147000208C1A0A00901830000C083820005828D8 +:1014800020092A020004080810024009020221086B +:1014900000008000081904000C1041081008080919 +:1014A00009010804104488192004000C014140047B +:1014B0008A094101902228520184080491084100C0 +:1014C0002000002021204024012040822001000033 +:1014D00001020201310400020102000001020000C9 +:1014E00000000000000000000000000000000500F7 +:1014F00000000000008000000C4E9C000C84980E40 +:101500000C501000207010009C203009105C064028 +:1015100039AE740008043C000C7D30161C397C1276 +:10152000985094009C3400780D7811093E901D125B +:101530001D2D100D2D3409020C68687610005D9E7B +:101540005818509E387038580D3908905A0E000EB1 +:101550000850300C0C7CA83C3CA03C5100007108A9 +:101560003C7858003C9C0C980010BC30801C081C37 +:1015700010003D90081978B90808080E025CBC08F4 +:101580005D0D9076801C3870753218360D9C0818E9 +:10159000080E380C7008080AB80098482910094845 +:1015A00000197808A60AA009083800007C30000C51 +:1015B0001D0CBC1C0809180510009C380080006830 +:1015C000500000300C08B0703C00083010B008002B +:1015D0003008B000020000000005B000906000007C +:1015E0000000B000000000000010000001006600D4 +:1015F000000000A00000000000000000000000004B +:101600004A0C1010109C3F000C000838480C3D0894 +:101610000B00084C090D00003A50380C3B1C3A30C6 +:10162000120838301C28123A019233081B0018DCCB +:101630001E5C1A3C0D281C3D0A9C000D1E2F303CE0 +:10164000003C281C0C30181010381A387F2C393CFC +:101650000E1C001618203C3A0A52133018203E3057 +:1016600000580858381C080C0014240ED93C1D00E2 +:10167000383D0800581A0712010A083A5CBA008877 +:1016800036845C9C380A105E09801D345C3C313A1B +:101690003000380008000E7811B80C0C0010023A27 +:1016A000000800101100303030001454015C0000BC +:1016B00000882E080C883D000000200E00040C005D +:1016C000080E280000000E840C0C8A0C501C300CF4 +:1016D0000008000808381088000C1054313C3038DD +:1016E0008838000C380038001E0000303C301030C4 +:1016F000083A103C300C0A000C0C0C043888000826 +:101700000C080000080800000000000000000000B5 +:1017100000000000000000000000000000000002C7 +:10172000004804000010000200000001001000004A +:1017300000301000000A000102300000404010009C +:1017400080000000200400020040200000088022E9 +:10175000103000404002804005000000800200047C +:10176000000CB20190000010000812000040800040 +:101770000038000000000000000A00810000403036 +:1017800011090291000001400C41000110000C0001 +:10179000000000010020810000000000408840009F +:1017A00080000001004800800008000000014002A5 +:1017B00080000001000000000000004010308800A0 +:1017C0000000000002004000000000800000000057 +:1017D0004000000100000000000000001000800038 +:1017E0000000000004200000000000A00000000035 +:1017F000000000000404400000000000040100009C +:1018000000000100040000000000000000000000D3 +:1018100000000000000000000000000000000000C8 +:1018200000000000000000000000000000000000B8 +:10183000000400800011000000900001000000087A +:1018400000840000008000040004000C001000046C +:101850002000000030008000000000000030800008 +:101860000000004000B00014200410100220000C02 +:101870001004000200017C080000004000224C001F +:10188000001040000081000C00040000000A001855 +:10189000000030014C06045801300C14023C0108D1 +:1018A000000002000000000940400C00000201009E +:1018B00000307000103000080000003000210000EF +:1018C000000C300C10104008003000200004001004 +:1018D00040800100003000000804300000000020BB +:1018E000000000003000000800048200000000003A +:1018F0006000000000004000028000000000006066 +:101900000004000000000000020034040000000099 +:10191000010C000000000C0001000020000001008C +:1019200000000000000000000000000000000000B7 +:101930000010000000000000000000000000000097 +:1019400000000000000C000000000802022000005F +:1019500000000000000400404200100400080000E5 +:1019600000300004000092000000200010088200F7 +:101970000800000000088200102000040008000099 +:101980000020000408000000004082001000002039 +:1019900004200000000000000000000400044001DA +:1019A00000000000000800100000000000200004FB +:1019B00020000000100000001000000000000000E7 +:1019C0000004000000080040402000000008000063 +:1019D0000020200000000000002000000020403215 +:1019E000000400000040810000200000000481008D +:1019F0000000000020000000804100000004000002 +:101A00000000820120000000000000000000000033 +:101A100000000004000400000000000000080404AE +:101A20000000000000000000000000000000002096 +:101A30000000000000000000000081010000000024 +:101A400000008101002000000000000000000000F4 +:101A5000000000000000FFFFFFFFFFFFFFFF5555E4 +:101A60001B1B5F0AAF05FFFFFFFFFFFFFFFFFFFF2D +:101A7000FFFFFFFFFFFFFFFF5555FFFF5555FFFF1E +:101A80003333FFFF33330F0F5555FFFFFFFFFFFFCA +:101A90000F0FFFFFFFFFFFFFFFFFFFFF0F0FFFFF16 +:101AA0000F0FFFFF0F0F0022FFEEFFFF0F0F0F0FB3 +:101AB0004747AF05DD11FFFFFFFFFFFF33335555EC +:101AC0000F0F101055550F0F0F0FFFFFFF0055554B +:101AD0000F0FFFFF0F0FFFFFFF00FFFFFF00FFFFD4 +:101AE000555555553333FFFF3333FFFFFF00FFFFDD +:101AF000FF00555533333333FF003333FF00FFFF0F +:101B0000FF000F0FFF00FFFF0F0F0F0FFF00FFFF82 +:101B10003333FFFF3333FFFFFF00FFFF5555FFFF58 +:101B20000F0FFFFF3333FFFF5555FFFF333355557D +:101B30005555FFFF3333FFFF5555FFFF0F0FFF00D4 +:101B40005555FFFF0F0FFFFF0F0FFFFF3333FFFF51 +:101B50003333FFFF333300000000000000000000BB +:101B60000000000000000000000080240E0080241F +:101B70000E0040808C2248808C2280240E0080241D +:101B80000E0080240E0080240E0000000C000000D7 +:101B90000C0000000C0000000C0000000C00802471 +:101BA0000E0000000C0080240E0080240E000000B7 +:101BB0000C0000000C0000000C0000000C000000F5 +:101BC0000C0040808C2248808C2280240E00000073 +:101BD0000C0000000C0080040C0000000C00000051 +:101BE0000C0000000C0000000C0000000C000000C5 +:101BF0000C0000000C0000000C0000000C000000B5 +:101C00000C0000000C0000000C0000000C000000A4 +:101C10000C0000000C0000000C0000000C00000094 +:101C20000C0000000C0000000C0000000C00000084 +:101C30000C0000000C0000000C0000000C00000074 +:101C40000C0000000C0000000C0000000C00000064 +:101C50000C0000000C0000000C0000000C00000054 +:101C60000C0000000C0000000C0000000000000050 +:101C700000000000000000000000000000008024C0 +:101C80000200000000004800000010001000802446 +:101C9000020000000000D8A472A9DFA472B9DFA47A +:101CA00072B9DFA472B9DFA472B9DFA472B9DFA47C +:101CB00072B9DFA472B9DFA472B9DFA472B9DFA46C +:101CC00072B9DFA472B9DFA472B9DFA472B9DFA45C +:101CD00072B9DFA472B1488000204800000080245F +:101CE00002000000000000000000000000000000F2 +:101CF00000000000000000000000000000000000E4 +:101D000000000000000000000000000000000000D3 +:101D100000000000000000000000000000000000C3 +:101D200000000000000000000000000000000000B3 +:101D300000000000000000000000000000000000A3 +:101D40000000000000000000000000000000000093 +:101D50000000000000000000000000000000000083 +:101D60000000000000000000000000000000000073 +:101D70000000000000000000000000000000000063 +:101D80000000000000000000000000000000000053 +:101D90000000FFFFFFFFFFFF3333FFFFFFFFCFCF49 +:101DA000CFCFFFFFFFFFFFFF33330F2F0F2FB333D3 +:101DB000FF20FF20FF20FF200F2FFF08FF08333BED +:101DC0000F2F555D555D0F2F333B0F4F0F4F333B9B +:101DD0000F4F555DFF080F4F555D0F2FFF08FF0890 +:101DE000333B555D333B555D0F0BFF33FFFFFFFF6B +:101DF000FFFFFFFFFFFFFFFF3333FFFF3333FFFF23 +:101E00000F0F0F0F0F0FFFFF3333FFFFFF00FF0018 +:101E10000F0FFFFF0F0FFFFFFF00FFFFFF005555E4 +:101E20000F0FFFFFFF00FFFF33330F0FFF00FFFF18 +:101E30000F0FFFFF33335555FF00FFFF0F0FFFFF5D +:101E40000F0FFFFF5555FFFFFF00FFFF0F0FFFFFB5 +:101E50000F0FFF00FF00FFFFFF00FF00FF000F0F4D +:101E60000F0FFFFF0F0FFFFF3333FFFF333333330A +:101E70000F0F0F0FFF00FFFF0F0FFFFF3333FFFFA9 +:101E80003333FFFF3333FFFF5555FFFF5555FFFF3A +:101E900033330000000000000000000008000000D4 +:101EA0000000000000008320000000440046000005 +:101EB0001001000000000B3C0000800104E48839A0 +:101EC0002000200114230400100000001401410030 +:101ED0000800000010004901C00000019C0332000E +:101EE0001000000898020034080000109800080054 +:101EF000C000000014010400000200009C0100006A +:101F000000000000000002100000000004000000BB +:101F100000000000000000000000000000000000C1 +:101F200000000000000000000000000000000000B1 +:101F300000000000000000000000000000000000A1 +:101F40000000000000000000000000000000000091 +:101F50000000000000000000000000000000000081 +:101F60000000000000000000000000000000000071 +:101F70000000000000000000000000000000000061 +:101F80000000000000000000000000000000000051 +:101F90000000000000000000000000000000000041 +:101FA0000000000000000000000000000000000031 +:101FB0000000000000000000000091384200800294 +:101FC00014AA40000000000008018120120000480F +:101FD00014C2E1244402002214C349002402000078 +:101FE000140147000C0200001401E11002018000FE +:101FF0001423D10022018000142347200A0100404D +:1020000014C16100040200001401490084020000B0 +:1020100014010000000000000000092442000042FA +:1020200014C08000000080010006000000000000D5 +:1020300000000000000000000000000000000000A0 +:102040000000000000000000000000000000000090 +:102050000000000000000000000000000000000080 +:102060000000000000000000000000000000000070 +:102070000000000000000000000000000000000060 +:102080000000000000000000000000000000000050 +:102090000000000000000000000000000000000040 +:1020A0000000000000000000000000000000000030 +:1020B0000000000000000000000000000000000020 +:1020C0000000000000000000000000000000A00070 +:1020D000C0004507C300000001C8901BDB010000E1 +:1020E000C340C4070000008144C8C703C31300C431 +:1020F000D7008005C40300C003CD8023C8030000BF +:10210000D380C413C50300E3C313C701C30002C4D3 +:10211000C300C823800300C1DB80C3030000A040CC +:1021200003C08000C313002000000400000000046E +:10213000E200C005C40000C0C008000000000000AC +:102140000005000000000000004000000000000446 +:102150000008000000001000000400000000000063 +:10216000000800050000100000C00020000500036A +:102170000000030204000005000000000000000051 +:10218000000000100000000000000000000000043B +:10219000002000000000100000000000000000000F +:1021A000000000000000000000000020000000040B +:1021B00000100000000000000000000010000000FF +:1021C00000000110002000040008000400000000CE +:1021D00000000000000000000000000000000000FF +:1021E000000000001040200084000000400080003B +:1021F00000010000882000000040000302000401EC +:10220000300000020000A00000010020400080001B +:102210000001008080020000400802101840404188 +:1022200018800420A0002000800100210002840109 +:1022300000000040402080008400000000000000FA +:10224000000000000400A0000000001030000800A2 +:10225000000000000000000000000000004000003E +:10226000000000000000200000000000000200004C +:1022700000200800000000000000000000400000F6 +:102280000000008000000280080000000000000044 +:10229000000000000000002000000000000000001E +:1022A00000000000200420000000000000000000EA +:1022B0000000000000000008000000000000000016 +:1022C00000000000000020000000000000000000EE +:1022D00000000000000020000000000000082000B6 +:1022E00000000000000000000000000000000000EE +:1022F00000000000000000000000140000000004C6 +:1023000010006080A201000000002000000028C032 +:102310000100142E2000A08002010025E00018A07A +:1023200001000000E17006400100000050010000C3 +:102330000000C00E0000066001000A00C0000E8010 +:10234000020000000000599A02000065E9028200C4 +:1023500074AC208002600000000000000030000427 +:102360000000000040000000000080180000008015 +:1023700001000000F00000000000001E000000004E +:1023800010000000E00000000000008003000000DA +:102390007800800020100000000000000080000095 +:1023A00000000004E0000000000000000000000049 +:1023B0000000009E3210000000000000000000003D +:1023C00000000000F00000000000000600700000A7 +:1023D00000000000F010000000008000400000003D +:1023E000000000000000000000000000006000008D +:1023F000000000400210000000000000000000008B +:1024000000000000000000000000000000080100C3 +:1024100000004014802E1000A200000000340000D4 +:102420000000080000000004200018A4E0000004E0 +:1024300030000080010000000000560203005C0034 +:102440000000100000001003000000000300400026 +:10245000E80010800300000700000882000000046C +:102460004100010390100C0000000000003C02003D +:1024700000000010E0002000000400000000000741 +:1024800000000C50000000000000000003000000ED +:1024900000000005100000000080060000000000A1 +:1024A00002002000000000070008002000000000DB +:1024B00001400000000000000000002000000000BB +:1024C0000000000000000000020806006400000098 +:1024D0000000200000000000200240000000000872 +:1024E00000804012000000000008600000000007AB +:1024F0000000400700000000000000000000000095 +:1025000000000000000000000008000000000000C3 +:1025100000000000000000000000000000000000BB +:102520000008100000000000B22000008000000041 +:1025300008041000000024000F005C033C000000B1 +:1025400000004001200010800200C0833C201000E9 +:102550000D001008000030200D00400398001CC042 +:1025600000020008080090000C0280066800A0002D +:102570000010005120000020002026000120000053 +:102580000800000000020000C0010000200000025E +:102590000000000000010220000000000000000018 +:1025A0000400000002000210000000008000100083 +:1025B00000000000000000000000004020000100BA +:1025C0000000002002000000000000028000000067 +:1025D000800000000000000000000000000050002B +:1025E0001000000000004000000000000002000099 +:1025F00008000000000000000000000000000000D3 +:10260000000200002000000008020010000001008D +:1026100000000000000200000000000000000000B8 +:1026200000000000000000000000000000000000AA +:1026300000000080032C0A00000000046700000076 +:10264000007400000310290000001E800300140025 +:10265000000008800000000308020CA00100000137 +:102660000000021008000000F001100700000C003C +:1026700000000000E000020000022C45E0004006DF +:10268000000000C064000006080081050000100082 +:1026900000000080033C010000000E0F000000005D +:1026A000000000A80100000000000004E00000009D +:1026B000000000000000000000000000000000001A +:1026C000A0000080030000000008000000000000DF +:1026D0000000080000000000A0080000000000103A +:1026E0000008000F0000400000080000000000008B +:1026F00000000000000000000000000500000000D5 +:102700000000008001000000000000400000000008 +:1027100000000000E0000000000020808000008039 +:102720000100080500000000000000800700000014 +:102730000000000000000000000000000000000099 +:1027400000000000000000200000090000004080A0 +:10275000602821000068000000000C0000000E004E +:1027600000005400000019900200000A00001D0043 +:10277000000000080000134300000127E000008073 +:10278000020001000001202000009C1ED0004680B5 +:102790000100000600010E800001002000010C0372 +:1027A0009030100000E8000000000C000000010064 +:1027B0007000000000000007000000000070000032 +:1027C000040000000000000000000080010800007C +:1027D00000000000000200200000000000300000A7 +:1027E0000000000001000000000000800312000053 +:1027F000F0000080031000005000000600100000F0 +:102800000000000000000000000000400100400047 +:1028100000000000000000000000000000000100B7 +:1028200000000000000000000000000000000000A8 +:10283000000000000000400000000000B0000000A8 +:102840000000001E0000000000000000000000006A +:1028500000000010400180008C0004840800444007 +:1028600088114000881094012152010020000110BD +:1028700001204802242400815C0010309140201483 +:1028800091500C248012000200204038301030405B +:10289000305248344141095000418040280410081A +:1028A0003841402081900094542450204194348039 +:1028B0005141241821422C34918000809022012023 +:1028C000540424114101409A0A0294900891042270 +:1028D0002C0180312002441021420152502200205C +:1028E00004042051210400140220405220840422B8 +:1028F00000142411010084141800211A3401412409 +:1029000010341100201000014001000130802434F7 +:1029100011810010002140949410019C34008182A8 +:1029200014241442448401022082042200028121E2 +:1029300024214401200401842402002002124400C6 +:102940002182218280010104010201002111010084 +:10295000000000020000000004000000000400006D +:10296000040000000000003090000008AC0D0100E1 +:102970003C880D0200210D06B0303A025838000C98 +:10298000007A003A090E0C0E080CB04208B0393635 +:10299000300900391A3C08060D000048B86A4D1C81 +:1029A0003C3D10090D2D043E898A081055AD005E8E +:1029B000A0B0101C10B00D0699309D103000300AE8 +:1029C0009D3E3C09180070180D00581E187ABC0076 +:1029D000101C0079005D911911000C18A8A01D1A97 +:1029E000A81C19093C0C0010A8607D110079BC15C9 +:1029F00032B002005509801000B90010000D91108E +:102A000008AA1000001A9C3A000E9D193800B03830 +:102A1000205A0CA010163800003E9C7095005508F6 +:102A2000108090101C5000105100003010206018D1 +:102A300030A04070300A15B0000000009DB0007852 +:102A4000000080060000900000B06000000000B0B0 +:102A500000100000600000005D6000000100000048 +:102A600000300000000C000000A00000000000008A +:102A7000000000A00000000000000A003E0C100151 +:102A80001000083CCE4118301E5C1E803A52184C93 +:102A90000D218C518A0008000C32100C39B9003815 +:102AA0001C000A3018B2900C18310418120C0A09D4 +:102AB000511A2030230A10003E1C2210103C0C003A +:102AC000002C10021A080E801E283A103C0A0A3CFC +:102AD0001C38203010342930192C1C0A0C181C0802 +:102AE00011100B102A9D0C00184C345CB4091B3CCF +:102AF00058083C000A1D8C1CBC0D301C11081C0021 +:102B00003808090C3A1800300C783A34300C0A585E +:102B10000C30101C31088C1C0E08395C040038087D +:102B20000E00380C3C742D3C002C09000E40010CAA +:102B30001A080A0D3A0E383C09080000003C2E38ED +:102B40001C0000383C0E0C380C3C0838082C0808D7 +:102B500030380C3D0A0C3C381C34180C300C003C4E +:102B60003C0C001E00580C0018381C2C3A0C0808AD +:102B70000808080008007400000B000000000000B6 +:102B80000C000000000C0000040000000000001019 +:102B900000004000080074000010000200800001E6 +:102BA00000000002002004010012000000380400B0 +:102BB0000080000080000000000000021001000101 +:102BC000400240020200400061800000002010909E +:102BD00040980010483020005400001200100001FE +:102BE00040200000000D4201048C10300030B00085 +:102BF000103000000C28800400300000001021304C +:102C00000030000000310080850000308008840121 +:102C10000000002000390400000000002009040129 +:102C2000000000000000000100300004003004003B +:102C30000030080100080001000000004000000012 +:102C40000C30000000000001000000000000000C3B +:102C50000000000000000000013C0004040000111E +:102C600000300400340000000000001000000000EC +:102C70000000000000300000000000000000000123 +:102C80000000000000000000000004000000000040 +:102C900000000000000020000000000000300000E4 +:102CA0000000004000000000010050000080000013 +:102CB00000280008000400800000000800940000C4 +:102CC00000B20200001000000020000000004000E0 +:102CD000012C0008200430000000300030300000DB +:102CE00000800050005004400100880002000040B5 +:102CF00000B0000920900000000D1C0802124040A6 +:102D00008280700042440000024200028070000095 +:102D100000808C0000060000008E0020813400003E +:102D2000000A020800080080028E00000000000077 +:102D3000803E0008003000000010000880180002EB +:102D400000B0000000300104000A0008000000008C +:102D500030000000029000002030020800008000D7 +:102D600001300080010000000000000000020001AE +:102D70008200002800000100010000000000004067 +:102D8000000000000030040000800020000000006F +:102D90000000000801000000000000000010010019 +:102DA0000000000001000000000000000000000022 +:102DB000008000000000000000000000000008008B +:102DC0002000000000040080000400000010080043 +:102DD00020200060102002004002400288610000B4 +:102DE00008404002102000000000000088410080E0 +:102DF0009000008062005000800844211010040000 +:102E0000100000208361000080200004000000000A +:102E1000800000008041008000040000000081006C +:102E200000200040400000140014000000000000DA +:102E3000002400100004810100040000004108008B +:102E4000000000000020080000200000002000001A +:102E500000340000002008000030000000040000E2 +:102E600000204002000000000020000020200000A0 +:102E70000000000080610008000000000000000069 +:102E80000010000000000030001081001000000061 +:102E900004000000000000000024040000000020E6 +:102EA0000000000080410020000000000000000041 +:102EB0000020000000000000000000000000D00022 +:102EC0000000000000000000000000000000000002 +:102ED00000001B1BBB115F0ABB1155555F0AAF05F4 +:102EE000AF05FF08D5558F0F8F0F555D555D0F2F1F +:102EF000333B33735575FF200F2F5575337355755D +:102F00000F2F5575B3333373FF20B3338F0F8F0FEC +:102F1000555D8F0FB333B3335575FF403373FF40A7 +:102F20001333FFFF3333FFFF3333FFFF3333FFFF31 +:102F3000FFFFFFFFF3033F303F30FFFF0F0F33333F +:102F40000F0FFFFF77441D1D1D1DFFFF5555FFFF90 +:102F5000FFFFFFFFFF00FFFF5555FFFF3333FFFF6C +:102F60005555FFFF5555FFFF5555FFFFFF00FFFF6C +:102F70000F0F33330F0F0F0FFF00FFFF0F0F333310 +:102F80003333FFFF3333FF005555FFFF5555FFFF28 +:102F90005555FF000F0FFFFF5555FFFF5555FFFF1C +:102FA000FF00FFFFFF00FFFF0F0FFFFF5555FF0062 +:102FB000FF00FFFF5555FFFF555533330F0FFFFF40 +:102FC000FF00FFFF0F0F33335555FFFF0F0FFFFFBC +:102FD0000F0F0000000000000000000000000000D3 +:102FE00000000000000040808C2248808C2240803D +:102FF0008C2248808C22D8A47EA9DFA47EB9DFA4CD +:103000007EB9DFA47EB9DFA47EB9DFA47EB9DFA4D8 +:103010007EB9DFA47EB9DFA47EB9DFA47EB9DFA4C8 +:103020007EB9DFA47EB9DFA47EB9DFA47EB9DFA4B8 +:103030007EB9DFA47EB100000C0000000C0000008F +:103040000C0080240E0040808C2248808C220000DE +:103050000C0000000C0040808C2248808C22000074 +:103060000C0080240E0000000C0000000C0000008A +:103070000C0000000C0000000C0000000C00000020 +:103080000C0000000C0000000C0000000C00000010 +:103090000C0000000C0000000C0000000C00000000 +:1030A0000C0000000C0000000C0000000C000000F0 +:1030B0000C0000000C0000000C0000000C000000E0 +:1030C0000C0000000C0000000C0000000C000000D0 +:1030D0000C0000000C0000000C0000000C000000C0 +:1030E0000C0000000C0000000000000000000000C8 +:1030F00000000000000000000000480000009024D4 +:1031000012004880002048000000802402000000D7 +:1031100000000020120000000000000000009024C9 +:103120001200000000004800002000000000000025 +:1031300000008024020080240200000000008004BF +:10314000000000000000000000000000000000007F +:10315000000000000000000000004880002048003F +:10316000000000000000000000004880002048002F +:10317000000000000000000000000000000000004F +:10318000000000000000000000000000000000003F +:10319000000000000000000000000000000000002F +:1031A000000000000000000000000000000000001F +:1031B000000000000000000000000000000000000F +:1031C00000000000000000000000000000000000FF +:1031D00000000000000000000000000000000000EF +:1031E00000000000000000000000000000000000DF +:1031F00000000000000000000000000000000000CF +:103200000000000008000000000000000000FFFFB8 +:10321000FFFF77075F13FF0FFFFFFFFFFFFFFFFFBA +:10322000FFFFFFFAFFFFCDCF3F15FFFF3333FFFF57 +:1032300055555F133F15FEFFFF7FFFFF7FFFFFFF29 +:103240003333FFFF3333FFFFFFFFFFFFFFFFFFFFBE +:10325000FF00000500503333FF00FFFF3333FFFF53 +:10326000FF000F0FFF00FFFF0F0FFFFF5555CC00B2 +:10327000FFFFFFFFFFFFFFFF3333FFFF55553F3FCA +:10328000FFFFFFFFFFFFFFFF5555555533330F0F6E +:103290003333FFFF5555FFFF3333FFFF5555FFFF16 +:1032A0005555FFFF3333FFFF0F0FFFFF55553333E6 +:1032B000FF0055555555FFFF0F0FFFFF3333FFFF3D +:1032C000333355550F0F3333FF00FFFF0F0FFFFF51 +:1032D0003333FFFF3333FFFFFF00FFFF5555FFFF81 +:1032E0003333FFFFFF00FFFF5555FFFF5555FFFF2D +:1032F0003333FFFF3333FF00FF00FFFFFF00FFFF0B +:103300000F0FFFFF5555FFFF0F0FFFFF3333000077 +:103310000000000000001000080000000000000095 +:10332000000000001001000010000000000000007C +:1033300000008220000000040CC6000204002043AC +:1033400004C600041001008080C7000000000003D4 +:1033500000C680220000400000C6812401000080D9 +:10336000988280202000000490C680330000400036 +:1033700000C60000000000000000800900000004FA +:103380000006000000000000000000000000000037 +:10339000000000000000000000008009000000089C +:1033A000000000000000000000000000000000001D +:1033B000000000000000000000000000000000000D +:1033C00000000000000000000000000000000000FD +:1033D00000000000000000000000000000000000ED +:1033E00000000000000000000000000000000000DD +:1033F00000000000000000000000000000000000CD +:1034000000000000000000000000000000000000BC +:1034100000000000000000000000000000000000AC +:10342000000000000000000000000000000000009C +:10343000000000000000400000000000000100004B +:1034400000000000000091344200804214E281211B +:103450002000000084E2C0220000804840E3803465 +:103460000000402000E280210000402100E2D12243 +:103470001402402814E3C0340001804200E380219C +:103480000000804100E20000000000000000800019 +:1034900000004000002200000000000000000000CA +:1034A000000000000000000000000000000080009C +:1034B000000080000022000000000000000000006A +:1034C00000000000000000000000000000000000FC +:1034D00000000000000000000000000000000000EC +:1034E00000000000000000000000000000000000DC +:1034F00000000000000000000000000000000000CC +:1035000000000000000000000000000000000000BB +:1035100000000000000000000000000000000000AB +:10352000000000000000000000000000000000009B +:10353000000000000000000000000000000000008B +:103540000000000000000000000000000080C80033 +:10355000810000000000000004000043E00003229E +:10356000E3000062C3E3C700C30303DBCB22E10136 +:10357000D31303C000074400020300C0E360440308 +:10358000000003039343E00101130300C8C0C0EA35 +:10359000D82000000000002AE00300000000002006 +:1035A0001000002000000000C0000000000000002B +:1035B0000000000000000000A00004000000040063 +:1035C00000000000000000000403000000000020D4 +:1035D00000000000000000000000000000000020CB +:1035E000000000000000000000000003B000000028 +:1035F00000000000080000000000000500000000BE +:103600000000100000200000000000000000080082 +:1036100001000000000000000000000000000000A9 +:103620000000000000000100000010000000040085 +:103630000000000000000005000010000000000570 +:10364000000000000000000000000000000000007A +:10365000000000000000000000000000000000006A +:1036600000020000C0000420040000000000022846 +:10367000404140000401802021100480058020008A +:10368000084040011000201000400480040800841D +:10369000082000080100044180280001410008C002 +:1036A00040041000000000000000010000080000BD +:1036B00000000000000000000200000010000020D8 +:1036C00004000000000000000000000008000020CE +:1036D0000000000000000200000080000008000060 +:1036E00000000000000004000000000000000008CE +:1036F000000000000000000000000000000000804A +:103700000000000040000000000010000000000069 +:1037100000000400000000000000000000000000A5 +:103720000000000020000000100000000000000069 +:103730001000000000000000000020000000000059 +:10374000000000000000040000000000080000006D +:103750000000000000000800000000000000000061 +:103760000000000000000000000000000000000059 +:103770000000008721001200EA0802041000E000A7 +:103780000000008361020040088A0C0A7000008E6D +:103790000118802C10000000500032230008008A1D +:1037A000AB980000700000800744400AA01400009D +:1037B0000004208361000040416080055800004003 +:1037C00001700020000000C003710000000000062E +:1037D00001000C0000000D000204000000000000C9 +:1037E0000000000010000C60008800000000400095 +:1037F0000000000000008000000000000400000045 +:1038000001000000000100000000000000000004B2 +:103810000000000000000000000000000000001A8E +:103820000000000000000080F200800000000000A6 +:10383000E0000000000000000000000000000000A8 +:103840000000000000000000000000000000000078 +:103850000000000000000000000006000000000062 +:10386000000000000000001E000000000000000436 +:103870000000000000000000000000000000000048 +:10388000000000000000409731290C40E80040147F +:1038900080361006000080407039000000002100D2 +:1038A000F001008001000083700100C0C108000B1E +:1038B000E001400409104007F00000400000000251 +:1038C000002800C0010080CB1500000041702005D9 +:1038D000E0010000003C000003000000A000000028 +:1038E000000020080000010000080010004800004F +:1038F0000000000000000005600B10000000400701 +:103900000000000000000000C000000300000000F4 +:103910008000000000000002000000000000000025 +:103920000000000000000C00000000000500000086 +:1039300000000000000C0000C00000100000200388 +:1039400060000000000000006001000000004C006A +:1039500000000000000000A00000000000000005C2 +:103960000000000000004000C0000000000030A087 +:103970000100000005000000C00000000010000071 +:103980000000000000000000000000000000000037 +:103990000000000000000000000000000D0803808F +:1039A0000A144000301000000280001800020000DD +:1039B00000000110800080A6005000000B0200F003 +:1039C00048090829401280D040040004100000C0BB +:1039D0000020002000090020013000080001002024 +:1039E000283808010000002000000200000000004C +:1039F000002000000000018000000020801A080064 +:103A0000000400202000000000080010001A0B0035 +:103A10000200000000000000000020000001004043 +:103A20000000000000000080000000100000000105 +:103A3000000000000000000210001800000000005C +:103A40001000000000000000000020000001000045 +:103A5000008008000001000080000000000000104D +:103A60000000020000000000001001000002000041 +:103A70000000001000000000000401000001000030 +:103A80000000000000000000000100000001000034 +:103A9000100800000000000200000000000000000C +:103AA00000000000000000000000000000000040D6 +:103AB000000015000832000FD080140000E0400420 +:103AC0000036008001000D02230000460000800F38 +:103AD00012000080E1302C820500000700082C0451 +:103AE000830000E001740000E01100E003740000B6 +:103AF00000000080C130800FF3011C900100000025 +:103B0000000000000000000000000C00080010048D +:103B10008000140000080E02600000000800100081 +:103B200080020D000000002002005000A0000E00E6 +:103B30000000000000002E00000000000001000056 +:103B40000300000000000000E0000000000040044E +:103B500010000000A00A00870000000000000E0016 +:103B6000000000000072000000000000000006A736 +:103B7000010000000000000000000000080002003A +:103B800060000010000000000000400008480C0029 +:103B900003000000000000080000000000004003D7 +:103BA0000000000000004003E300000000000000EF +:103BB0000000000000000000000000000000000005 +:103BC000000000CD690C140002000000600856805F +:103BD0000110000460000040088A4E1A04000058DA +:103BE0000A04004770000081E18102026800801A27 +:103BF000A000402C940000000038000D68B4008044 +:103C000003008000084100C0D9F200277000408006 +:103C1000090C00000000000000000000000000008F +:103C2000E000020010705640023001000000000069 +:103C300000000C0050700C80010000000000010A20 +:103C400000010000000000801100000000000000E2 +:103C500040000020000000000000000004000040C0 +:103C600000000800000000000010402000000000DC +:103C7000000000000000000000000600000000003E +:103C800000006000000000000000000000000000D4 +:103C9000E040000000000080030000000000000A77 +:103CA000E010002000000000000000000000000004 +:103CB0000070000000000000400000200400000030 +:103CC00000000000000000000000000000000000F4 +:103CD00082004020808122840041205824820819DB +:103CE00004080009185081019200203A3110380070 +:103CF00032400840122139001100403201020950BF +:103D000002421901401000203400014910385002CD +:103D100048184040185201112844019028801C1472 +:103D20004104205101500010089C019400009802A9 +:103D30002088414008908830008400320040109074 +:103D400008802020215018502C9000240018389A08 +:103D50000004228929314808800428344020301882 +:103D60001004401041902800220C2280281030447A +:103D70000C5C44189030203000040019383010904A +:103D80008000481000385100302400400430990071 +:103D900030244010200028082002942050200000E9 +:103DA000080C241130002040200010402020042165 +:103DB00000402080200048000400812820100000DE +:103DC00000200020000000080000000008000000A3 +:103DD00000040000000000000000000000000000DF +:103DE0000000000000080075080A05090C900A1C74 +:103DF0009C9D0C1808040898001D0C061802001C55 +:103E00000A3D14762D990C8208BD140910109932C0 +:103E10000859B839010D3C09082A680E189E0A0C89 +:103E2000091810065834050D001E003D5CB0001244 +:103E30007CB91C3D020E0D323D190D100C34901E44 +:103E4000080A1C0608080D0D501C681008000A3EE0 +:103E500005B91C3D0C00380D5811181D00395CB017 +:103E60000E381C3808107818481D78180601583A82 +:103E700008591A382D90001E581E0C000008080022 +:103E8000081E10400C3C05180D1A0D39020E0D18B5 +:103E90000C191C100D0A0C10A8181D001069757063 +:103EA000081E1C4A180E081005B0B8B85D061D00A3 +:103EB00009BA500A400C0D1E0D0800400C091C00E8 +:103EC0000D090D00509DA8B040000C000D0AAD007A +:103ED000093A390A000A09500D00000C0200000ED0 +:103EE000080A0D400008050A05AC000000000000AB +:103EF000000000000000000018411210313C183092 +:103F00004F15203009084A088D500F484E303D0C9F +:103F10001942B1103C0030601430402075141C0070 +:103F200008D022100D0C0C30043C0858310E011042 +:103F30001900000800102004100030007228000052 +:103F400000100D100E20080C380020388C200A506C +:103F50000000003C01003A0801B01C300011303074 +:103F600001100038701A713000A1B1100D0000105E +:103F70001C000108000A101C01842DA83C3410808C +:103F80001004123C011A3A00000420700D30305A1F +:103F900018043D203000303C08202C000030303028 +:103FA0000004000C101001203000320001303400F9 +:103FB000101400100D301C003114310010003A00B4 +:103FC000300C2C001030005000883C08300130309C +:103FD0003100013030300C3400303130300010000E +:103FE00008802430300E8000003000300A000000CD +:103FF0000000000000000000000D000000010000B3 +:104000000000000000000000000000000000400070 +:1040100000000000400000003030000040100000B0 +:10402000000010006000040000202000400010008C +:1040300000080000404010000040000060800000C8 +:104040000020000061818C100000240040300C0230 +:10405000000024004C001C020011802040001C00C5 +:104060004030000040308C020080000044000C0012 +:104070000C02000140005C300C01000040500C00BC +:104080002C02000040700000000040100401BC0041 +:104090004C32000004728C000C000C0004810C20D7 +:1040A0000C80000000706C000C0200004002002038 +:1040B0000800200000400400000040007041400063 +:1040C00000000001047040000000000004400000F7 +:1040D00000000000004004000C00000000700030F0 +:1040E00000300001004000000000000000403C00E3 +:1040F000000000000040040000300000004000000C +:10410000000000000040000000000000003000003F +:10411000000000000000000000000000000000009F +:10412000000000000000000020040000004000002B +:104130002084000000000004203102000080800084 +:10414000A000000000020004201000000010000089 +:104150002030400400800000203402440000800031 +:10416000604002000000A0002010020C00BC308063 +:10417000200002800080020020B8420C00300000C5 +:10418000220802000008000822343200020C00005D +:1041900020880200800C0100228040000200304C88 +:1041A0000200720400680000025C020402000000C9 +:1041B000023C0240003000000288B000020800000B +:1041C000221C004000108000020801000034300072 +:1041D000600C2000000400000200B000000002009B +:1041E00001000000000000000208010002000000C1 +:1041F00000880000008200080108000000000000A4 +:1042000001004200000400000000010000B0002096 +:10421000000400000000000000000000000000009A +:1042200000B00004000000000000000000000000DA +:10423000000000000000000000000000000400007A +:104240001000000000048200008010041024000010 +:10425000000000000800500500008104000050012B +:10426000000000001000000410000000980282040A +:1042700000000800000000201300A9000820100022 +:104280004320000000801000000000000024000215 +:1042900000000000400401002800810000A410126A +:1042A000000000000004010088410000000001003F +:1042B0008081000400800004082000208080000627 +:1042C0008081080400000002080000444204090044 +:1042D0000000000000200000082000000004000092 +:1042E000032400204000000000070000001400002C +:1042F00000000000000000000000000000040000BA +:104300000000000000040010000000000004000095 +:104310000000000000000000000400000000000099 +:104320000020002000040000000000000000000049 +:104330000000000000200004000000000000000059 +:104340000000000000000000000000000000B5BFF9 +:104350003BAAFFFFFF00555533330F0FFF00FF004F +:104360000F0F3333FF000F0FFF000F0FAAAA7707BD +:104370003F1577070100FFFFFEFF01000400FFFF6C +:104380000F0FFFFF3333FFFFFF00FFFF0F0FFFFF94 +:10439000FF00FF000F0FFFFF3333FFFF3333FFFF3B +:1043A0005555FFFFFF00FFFF5555FFFF33330F0F3C +:1043B00055550F0F0F0FFFFF0F0FFFFF0F0FFFFFE1 +:1043C0000F0FFFFF5555FFFF0F0FFFFFFF000F0FF0 +:1043D0000F0FFFFF3333FFFF3333FFFFFF00FFFFFC +:1043E0000F0F0F0F3333FFFF0F0FFFFFFF00FFFF14 +:1043F000FF00FFFFFF00FFFF0F0FFFFFFF00FFFFAA +:104400003333FFFF3333FFFF0F0FFFFF3333FFFF64 +:104410005555FFFF5555FFFF3333FFFF0F0FFFFFCC +:1044200055555555FF00FFFFFF00FFFF3333FFFFDA +:104430000F0FFFFFFF00FFFF5555FFFFFF00FFFFBE +:104440000F0FFFFF5555FFFFFF00FFFF0F0F00008D +:10445000000000000000000000400000000000001C +:10446000000048201E2000800C284F806CB94F802F +:104470006CB94F806CB94F806CB94F806CB94F806C +:104480006CB090241E0090040C0000000C00000092 +:104490000C0000000C0000000C0000000C000000EC +:1044A0000C0000000C0000000C0000000C000000DC +:1044B0000C0000000C0000000C0000000C000000CC +:1044C0000C0000000C0000000C0000000C000000BC +:1044D0000C0000000C0000000C0000000C000000AC +:1044E0000C0000000C0000000C0000000C0000009C +:1044F0000C0000000C0000000C0000000C0000008C +:104500000C0000000C0000000C0000000C0000007B +:104510000C0000000C0000000C0000000C0000006B +:104520000C0000000C0000000C0000000C0000005B +:104530000C0000000C0000000C0000000C0000004B +:104540000C0000000C0000000C0000000C0000003B +:104550000C0000000C0000000C0000000C0000002B +:104560000C0000000000000000000000000000003F +:1045700000000400200080240200000000009024BD +:104580001200008060A94F8060B94E8060B1902415 +:104590001200008060A84E8060B94E8060B14F006C +:1045A00060994E8060B10000000048201220000099 +:1045B00000000000000000000000000000000000FB +:1045C00000000000000000000000000000000000EB +:1045D00000000000000000000000000000000000DB +:1045E00000000000000000000000000000000000CB +:1045F00000000000000000000000000000000000BB +:1046000000000000000000000000000000000000AA +:10461000000000000000000000000000000000009A +:10462000000000000000000000000000000000008A +:10463000000000000000000000000000000000007A +:10464000000000000000000000000000000000006A +:10465000000000000000000000000000000000005A +:10466000000000000000000000000000000000004A +:104670000000000000000000000000000000300109 +:1046800008000000000260000640FFFFFFFFFFFF80 +:1046900033335F13770751F3F0F0FEFFFEFF7777B8 +:1046A000AAAA3F153F150100FEFEFEFF0F0FEEEE1A +:1046B0005555FEFFFEFFFF7700FFFFFF0F0FFF5C6A +:1046C0000F0CFFFF0F0FFFFFFF000F0FFF00FFFF9B +:1046D0000F0F0F0FFF00FFFF5555FFFF0F0F0F0FBD +:1046E0000F0FFFFFFF00FFFF5555FFFFFF000F0FEC +:1046F0000F0FFFFFFF00FFFF0F0FFFFF0F0FFFFF69 +:10470000FF000F0FFF00FF000F0FFFFFFF00FF0074 +:104710003333FFFFFF00FFFF0F0FFFFF3333FFFFB8 +:10472000FF00FFFF0F0FFFFF0F0FFFFF3333FFFFF0 +:104730005555FFFF3333FFFF0F0FFFFFFF00FFFF54 +:104740005555FFFF3333FFFF3333FFFF3333FFFF95 +:10475000FF00FFFF3333FFFF0F0F5555FF00FFFF33 +:104760005555FFFF5555FFFF0F0FFFFF3333FFFF79 +:104770000F0FFFFF3333FFFF0F0FFFFF3333FFFF39 +:104780005555FFFFFF00FFFF0F0F00000000000066 +:1047900000001001083000000000001100000000BF +:1047A00002000020080000000400000008000000D3 +:1047B00000000000000000000400000008000000ED +:1047C0000000802800CE0000000000000000300043 +:1047D00010010000000000000000000000000000C8 +:1047E00000000000000000000000000000000000C9 +:1047F00000000000000000000000000000000000B9 +:1048000000000000000000000000000000000000A8 +:104810000000000000000000000000000000000098 +:104820000000000000000000000000000000000088 +:104830000000000000000000000000000000000078 +:104840000000000000000000000000000000000068 +:104850000000000000000000000000000000000058 +:104860000000000000000000000000000000000048 +:104870000000000000000000000000000000000038 +:104880000000000000000000000000000000000028 +:104890000000000000000000000000000000000018 +:1048A0000000000000000001000000000000000007 +:1048B000402311204000000414C00100200000002B +:1048C0008400000000000000000001002000000043 +:1048D0002400802000000004008A00000000000086 +:1048E00000000000000000000000000000000000C8 +:1048F00000000000000000000000000000000000B8 +:1049000000000000000000000000000000000000A7 +:104910000000000000000000000000000000000097 +:104920000000000000000000000000000000000087 +:104930000000000000000000000000000000000077 +:104940000000000000000000000000000000000067 +:104950000000000000000000000000000000000057 +:104960000000000000000000000000000000000047 +:104970000000000000000000000000000000000037 +:104980000000000000000000000000000000000027 +:104990000000000000000000000000000000000017 +:1049A0000000000000000000000000000000000007 +:1049B00000000000000000000000000000380000BF +:1049C000000000010000004000C0A02246C02000FE +:1049D00001C000E3D603000500000000000000C095 +:1049E000C748C4C4C34503C346C0E04344C5000030 +:1049F0008800420040050080008000008000000028 +:104A0000000420280000000000000010000000004A +:104A100008800003000000200000000500000000E6 +:104A20000000000001000000000000000000000085 +:104A30000000000000000000000000000000000076 +:104A40000000000000000000000000000000000066 +:104A50000000000D000000100080000000000000B9 +:104A600000000000000000000000A00000000000A6 +:104A70000000001000000000000000000000000026 +:104A80000000000001000000000000000000000025 +:104A9000000800000080000000000020000000006E +:104AA0000000200500200000008000100000000031 +:104AB00000000000000000000000000000000000F6 +:104AC00000000000000002000200000400000000DE +:104AD000000800000000010100000020002000008C +:104AE0000402000820020002000100002000000073 +:104AF000000000024000002084402018041000281C +:104B00000004000000000300010000020004000097 +:104B10008000000000000000000000000000000015 +:104B20000000000000040080000000000000000001 +:104B30000000040000000000200000000000000051 +:104B40000800000000000000000004000000000059 +:104B5000000008000000000000000000000000004D +:104B60000000000000000000000000000004000041 +:104B70000000000000000000000000000000000035 +:104B8000000000000000000008000000000000001D +:104B900000000000002000002000000000100000C5 +:104BA0000000000000000000000C000000000000F9 +:104BB00000080800000420000000000000040000BD +:104BC00000000000000010000000000000000008CD +:104BD00000000800002000000000020002000000A9 +:104BE0000000600000000000000000000000000065 +:104BF0000002008003002283000080104200220097 +:104C000000000004000002000000800EE000060426 +:104C10000000002101080260180100840208000061 +:104C20000028001EA04900000000001E0000000037 +:104C300000008000E0000000000080000100000093 +:104C40000000001E400120000000000000100000D5 +:104C500000000000F000000000000000E000000084 +:104C60000000001E00000000000000200000000006 +:104C7000000000000070000000000000E2000000E2 +:104C800000000000001000000000000BE000000029 +:104C9000000000000000000000000000E000000034 +:104CA0000000008002100000000000000070000002 +:104CB0000001000000000000000000402000000093 +:104CC00050000000000000000000000040600000F4 +:104CD0000000000040000000000000004000000054 +:104CE0000000000000000000000000004000000084 +:104CF0000000000000000000009000000000000024 +:104D000000000003000800C00100020008000004C9 +:104D1000400006000000000300102E00C000000745 +:104D2000B0010004E00000C401602C04CB000001CD +:104D30000004000000400000A0000020000000006F +:104D4000000020000000000600000E000000000728 +:104D5000000800050000000020000E020000000016 +:104D60000008000B0000000020000600000000000A +:104D700000000020C000000000002000080000012A +:104D80000000020008000000000002000000000017 +:104D9000000000A00100000000080000000000006A +:104DA0000001000000000000000000000000000002 +:104DB00000012C00000000000208000000000000BC +:104DC000000000248000000000000000000000003F +:104DD00000000008000000000000000000000000CB +:104DE0000080000000000000000040000000000003 +:104DF00000000000C00000000000000000000000F3 +:104E0000000000000000000000000000001800008A +:104E10000000000000000016000000A000000404D4 +:104E200082000000290060200000000A1018C00065 +:104E30000B01000300008414520200A0045004106F +:104E400002028006010000000F0000008000000048 +:104E5000000000400000000000020000820002008C +:104E60000000008010000010000000002001001071 +:104E700000000000100002000002000008001020E6 +:104E8000000200008000000000010000000000009F +:104E900000000000200102000800000000200200C5 +:104EA00000000080801001200000000000000000D1 +:104EB0000000000000010000000000400000200091 +:104EC00000000000000000000000000000000100E1 +:104ED00000000000002000100000000000000000A2 +:104EE0000000000080000200400000000000000000 +:104EF0000000000020000100000000002010000061 +:104F0000000000002001200000010000000002005D +:104F10002000000020000000000000000000000051 +:104F20000088000000000000000000A7013C008095 +:104F3000010012000000000620080E070000808714 +:104F400041020C9000000C06A802800D100000C663 +:104F5000C1343E0BC0020013D078008B010000006A +:104F6000E00000000000000000000000E000000081 +:104F70000000000000000000000000000000000031 +:104F800000000000000000000000000070000000B1 +:104F900000000004600000000000000700000000A6 +:104FA0000000000F000000000000808803000000E7 +:104FB00000000000000000000000060200020000E7 +:104FC000000000070000000000000E0000000000CC +:104FD0000000060700000000008000000000000044 +:104FE000080006AF0000000000000E0000000000F6 +:104FF00000002E00E000000000000000000000079C +:105000000808000000000010000002070000000077 +:1050100000000E0000000000000006070000000075 +:105020000800000060000010000000000000000008 +:1050300000000000000000000000000000008007E9 +:10504000000016C0053801C0510080160002104053 +:105050000200001604700382900040EEA100064595 +:10506000510080C01530068050000081011400807E +:10507000010000000001000004000000000000002A +:10508000000000800180000000000000C00000005F +:105090000000000000700000000000002000000F71 +:1050A0000000000000000000000000000000800080 +:1050B0000000000000000000000000000070000779 +:1050C00000000000000000000000000000300000B0 +:1050D000100000000000400000000000007001000F +:1050E0000000008031684000000000000030000037 +:1050F00000000000E00000000000000000000100CF +:10510000000000000000000004000000000000009B +:1051100000008000E01000000000009E030040003E +:10512000000000000070010000000000007040005E +:1051300000000000E000000000000080030000000C +:10514000000000000000E0000000000040004000FF +:105150000000004000090000002040402010804076 +:1051600020440050402400005000403030502420A3 +:105170003030203030145020400040180144512875 +:105180000810011002512400904000100004500942 +:105190004010001000102400582010885012800881 +:1051A0000480840800501020000030400040440477 +:1051B000042010082020000000400028103040008B +:1051C00080201880081020081040082080804000AF +:1051D0004082902850009400000000081004101035 +:1051E0002080300004440000401080400044400013 +:1051F0004020000020404080400420008120002208 +:105200002400004030203000002240000480402470 +:105210004044208020202490110100020000402002 +:105220000120200000205030819048000082402062 +:1052300044002080000048002120808000004000C1 +:1052400020020000002000002000000000000000FC +:1052500001000000000000000400C0000080000009 +:105260000A0900000800000008040800080E0A509F +:105270000838500A0D8D083D59590070089D0910D5 +:105280002C190DBA0D190E1038003D020CB800187B +:105290000CA0360050129810301E7CAE3D0D0C1044 +:1052A0000C9E3800591030100818000008081C7CAB +:1052B000101000785D993CB8001819090D0E310DD9 +:1052C0000A600D000800105C0D814809993A3E4CB7 +:1052D0001C1C08A90D091C0E8C1E0078190E080054 +:1052E000504908705D0110081E4D15005808090846 +:1052F00025BD393A0D09100A4C0040900938000DBF +:10530000700E000D5C545D5900090079580208B216 +:10531000010809000000050E1900190A788C0D908B +:105320000000000D5C00090030007016183000000D +:1053300000000C09005D080A0D00193E5D2D0C00EF +:105340000000000961A009AA000078000D7A0D0094 +:105350000000090A7D0A090E0D000000000C000083 +:10536000000E000009080D00000000000000800091 +:10537000000000003040300001400030010C01000E +:10538000012020300141100000284130101400009D +:105390000100201021002C300030101001043E00CC +:1053A000310110000D353C0000000901881439005E +:1053B0001000010001040108300180008141380023 +:1053C00020310110110C11000C109D000001001083 +:1053D0000000103080103C086930000000300100EF +:1053E000008080300131210010B0002070001000DA +:1053F0000030001020003100301C2030004E1C0016 +:1054000001010000000C0000302010000D9C000085 +:105410000001200000183000013100001110103090 +:10542000010811501C11401C1C000000003010002D +:105430000F1930000C301038110C1000803038106B +:10544000098C0008000031100C1031000010101001 +:105450001C003000000C00001C0030200000300058 +:105460003430103000001000300C0000001000003C +:1054700030010000000000000C01000000000000EE +:105480000800000000000000001000000000040000 +:105490000000000000000000000000000800000004 +:1054A0002040000000000400000000000041100047 +:1054B0004000000000000000000000000C40000060 +:1054C000400000004000000000308000004030003C +:1054D0000400000000000000200000000000B001F7 +:1054E00000310C0000000011080000000080008066 +:1054F000400000000008400100B000000C40000126 +:1055000000000C40008000200000000000B00001FE +:1055100000000010008000010000003000000000CA +:1055200000000C00000000000000000000900001DE +:1055300000010041000000000001000000300010E8 +:10554000000000300000000000000000000000002B +:1055500000800000000C04000000000000000000BB +:10556000300000400000000000003000003000006B +:105570000000040000000000000000000000000027 +:1055800000000000000000010000000000300000EA +:105590000000000000004000000000000088000043 +:1055A0000000000000000080000800000000000073 +:1055B000010000008000000000000000000000006A +:1055C0000014000020300000000000000030000047 +:1055D000001000002000000000000000007030807B +:1055E00000104080010002000000000000000000E8 +:1055F00002307008004C02000200004801300040F8 +:1056000000B8003C300000000002100800B00000AC +:10561000021000084030021400300080800040007A +:105620000070000800040040003000088000000006 +:105630000000000000000200000000000000000068 +:1056400000B000080004001C000000000000000082 +:1056500000B0000001200000000000000000000079 +:105660000000000000300000000200000000000008 +:10567000000000004000801000000000000040001A +:105680000000000000000100000000000000000019 +:105690000000000000000000000000080000000002 +:1056A0000080000C000000200000C001000000008D +:1056B0000004000000000800204100000004200059 +:1056C0000004000000000000080000008003080043 +:1056D000000000000000100000200000100000008A +:1056E0000020000008000000000000000000000092 +:1056F00000200000000000002080000000000000EA +:1057000030800040C22300400280000000000040C2 +:10571000022000000004000440040000000000001B +:1057200028004002430000000020000400000000A8 +:105730000080000000000000008400000004000061 +:105740000180001000000000008000000000000048 +:105750000080000000800000400000000000000009 +:10576000000000000020001000A000100000000059 +:1057700000800000000000000000000000000800A1 +:105780000000000000000000000000000000000019 +:1057900000000000001000000000000000000000F9 +:1057A00000000000000000040000000000000000F5 +:1057B0000000400100000004008100210000800181 +:1057C00000000000000000000000000000001001C8 +:1057D00000000000000000000000000000000000C9 +:1057E00000000000000000000000000000000000B9 +:1057F000000000000000108108000000000010817F +:105800000800000000000080080000000000108177 +:105810000800000000000000000000000000000080 +:105820000000000000000000000000000000000078 +:105830000000000000000000000000000000000068 +:1058400000000000000010010000000000000080C7 +:105850000800000000000000000000000000000040 +:105860000000000000000000000000000000000038 +:105870000000000000000000000000000000108197 +:1058800008000000000010810800000000001081E6 +:105890000800000000000000000000000000008080 +:1058A00008000000000010010000000000000000DF +:1058B00000000000000000000000000000000000E8 +:1058C00000000000000010010000000000000000C7 +:1058D00000000000000000000000000000000000C8 +:1058E00000000001000000000000000000000000B7 +:1058F00000000000000000000000000000000000A8 +:105900000000000000000000000000810000000016 +:105910000000008100000000000000800000000086 +:1059200000000081080000000000000000000000EE +:105930000000000000000000000000000000000067 +:105940000000000000000000000000000000000057 +:105950000000000000000000000000010000000046 +:105960000000001020000000000000000000000007 +:105970000000000000000000000000000000000027 +:105980000000000000000000000000000000000017 +:10599000000004182000000000000418200000008F +:1059A00000000418200000000000000000000000BB +:1059B0000000008000000000000807080000000050 +:1059C00000000000000000000000000000000000D7 +:1059D00000000000000000000000040800000000BB +:1059E00000000000000000000000000000000000B7 +:1059F00000000000000000000000000000000000A7 +:105A00000000000000000000000000000000000096 +:105A10000000000000000000000000000000000086 +:105A20000000000000000000000000000000000076 +:105A30000000000000000000000000000000000066 +:105A40000000000000000000000000000000000056 +:105A50000000000000000000000000000000000046 +:105A60000000000000000000000000000000000036 +:105A70002000000000000400000000000000000002 +:105A80000000000000000000000000000000000016 +:105A90000000000000000000000000000000000006 +:105AA00000000000000000000000000000000000F6 +:105AB00000000000000000000000000000000400E2 +:105AC00020000000000000000000000000000000B6 +:105AD00000000000000000000000000000000000C6 +:105AE00000000000000000000000000000000000B6 +:105AF00000000000000000000000000004000000A2 +:105B00000000000000000000000000000000000095 +:105B10000000000000000000000000000000000085 +:105B20000000000000000000000000000000000075 +:105B30000000000000000000000000000000000065 +:105B40000000000000000000000000000000000055 +:105B50000000000000000000000000000000000045 +:105B60000000000000000000000000000000000035 +:105B70000000000000000000000000000000000025 +:105B800000000000064000000002608000000000ED +:105B90000000000000000000000000000000000005 +:105BA00000000000000000000000000000000000F5 +:105BB0000000000000000000000000810000000064 +:105BC00000000081000000000000008100000000D3 +:105BD000000260000640000000000000000000001D +:105BE00000000801000000000000000000000000AC +:105BF00000000000000000000000000000000000A5 +:105C0000000000010000000000000000000000C0D3 +:105C10000000000000000000000000000000000084 +:105C20000000000000000000000000000000000074 +:105C30000000000000000000000000000000000064 +:105C40000000000000000000000000000000000054 +:105C50000000000000000000000000000000000044 +:105C60000000000000000000000000000000000034 +:105C70000000000000000000000000000000000024 +:105C80000000000000000000000000000000000014 +:105C9000000000000000001100000000000000995A +:105CA00010030000000000000000000000000000E1 +:105CB00000000000000000000000000000000000E4 +:105CC000000000000000000000000000000000884C +:105CD0001002000000000088100100000000008891 +:105CE0001000000000000011100200000000000081 +:105CF0000000000000000080100000000000000014 +:105D00000000000000000000000000000000000093 +:105D100000000000000000881000000000000000EB +:105D2000000000C0000000000000000000000000B3 +:105D30000000000000000000000000000000000063 +:105D40000000000000000000000000000000000053 +:105D50000000000000000000000000000000000043 +:105D60000000000000000000000000000000000033 +:105D70000000000000000000000000000000000023 +:105D80000000000000000000000000000000000013 +:105D90000000000000000000000000000000000003 +:105DA0000000000000000000000000000022800051 +:105DB00000000000002300000000000000000000C0 +:105DC00000000000000000000000000000000000D3 +:105DD0000000000000000000000000000000C00003 +:105DE000000000000023C000000000000023C000ED +:105DF000000000000023000000000000002300005D +:105E00000000000000004000000000200001000031 +:105E10000000000000000000000000000000000082 +:105E20000000000000004000000000000001000031 +:105E30000000000000000000000000000000000062 +:105E40000000000000000000000000000000000052 +:105E50000000000000000000000000000000000042 +:105E60000000000000000000000000000000000032 +:105E70000000000000000000000000000000000022 +:105E80000000000000000000000000000000000012 +:105E90000000000000000000000000000000000002 +:105EA00000000000000000000000000000000000F2 +:105EB00000000000000000000000000000000000E2 +:105EC0000000000000800000000000000000000052 +:105ED00000000000000000000000000000000000C2 +:105EE00000000000000000000000000000000000B2 +:105EF00000000000000000000000000000000000A2 +:105F00000000000000000000000001000000000090 +:105F10000000000000000000000000000000000081 +:105F20000000000000000000000000000000000071 +:105F30000000000000000000000000000000000061 +:105F40000000000000000000000000000000000051 +:105F50000000000000000000000000000000000041 +:105F60000000000000000000000000000000000031 +:105F70000000000000000000000000000000000021 +:105F80000000000000000000000000000000000011 +:105F90000000000000000000000000000000000001 +:105FA00000000000000000000000000000000000F1 +:105FB00000000000000000000000000000000000E1 +:105FC00000000000000000000000000000000000D1 +:105FD00000000100000000000002000000000000BE +:105FE00000000000000000000000000000000000B1 +:105FF00000000000000000000000000000000000A1 +:106000000000000000000000000000000000000090 +:106010000000000000000000000000000000400040 +:106020000040000000000000000000000000000030 +:106030000000000000000000000000000000000060 +:106040000000000000000000000000000000000050 +:106050000000000000000000000000000000000040 +:106060000000000000000000000000000000000030 +:10607000000100000000000000000000000000001F +:106080000000000000000000000000000000000010 +:106090000000000000000000000000000000000000 +:1060A00000000000000000000000000000000000F0 +:1060B00000000000000000000000000000000000E0 +:1060C00000000000000000000000000000000000D0 +:1060D00000000000000000000000000000000000C0 +:1060E0000000000000000000000000006000000050 +:1060F00000000000000000000000000000000000A0 +:10610000000000000000000000000000000000008F +:10611000000000000000000000000000600000001F +:10612000000200009000000000000000600000007D +:10613000000000000000000000000000100000004F +:10614000000000000000000000000000000000004F +:10615000000000000000000000000000000000003F +:10616000000000000000000000000000000000002F +:10617000000000000000000000000000000000001F +:1061800000000000A000000000000000000000006F +:1061900000000000000000000000000000000000FF +:1061A000000000000000000000000000B00000003F +:1061B00000000000300000000000000000000000AF +:1061C00000000000C002000000000000000000000D +:1061D00000000000000000000000000000000000BF +:1061E00000000000000000000000000000000000AF +:1061F000000000000000000000000000000000009F +:10620000000000000000000000000000000000008E +:10621000000000000000000000000000000000007E +:10622000000000000000000000000000000000006E +:10623000000000000000000000000000000000005E +:10624000000000000000000000000000000000004E +:10625000000200000000000000000000B00000008C +:10626000000000000000000000000000000000002E +:10627000000000000000000000000000C00000005E +:10628000000000000000000000000000000000000E +:1062900000000000000000000000000000000000FE +:1062A00000000000000000000000000000000000EE +:1062B000000000000000000000000000800000005E +:1062C00000000000000000000000000000000000CE +:1062D00000000000000000000000000000000000BE +:1062E00000000000000000000000000000000000AE +:1062F000000000000000000000000000000000009E +:10630000000000000000000000000000000000008D +:10631000000000004000000000000000000000003D +:10632000000000000000000000000000000000006D +:10633000000000000000000000000000000000005D +:10634000000000004000000000000000000000000D +:106350000C000000400000000800000000000000E9 +:1063600000000000800000000000000000000000AD +:10637000100000000000000000000000000000000D +:10638000000000000000000000000000000000000D +:106390000C000000000000000000000000000000F1 +:1063A00000000000000000000000000000000000ED +:1063B00000000000000000000000000000000000DD +:1063C00000000000000000000000000000000000CD +:1063D00000000000000000000000000000000000BD +:1063E000000200000000000010000000000000009B +:1063F000000000000000000000000000000000009D +:10640000000000000000000000000000000000008C +:10641000000000000000000000000000000000007C +:10642000000000000000000000020000000000006A +:10643000000000000000000000000000000000005C +:10644000000000000000000000000000000000004C +:1064500000000000000000001000000040000000EC +:1064600000020000C000000000000000000000006A +:10647000000000000000000000000000000000001C +:10648000000000000000000000000000000000000C +:1064900000000000000000000000000000000000FC +:1064A00000000000000000000000000000000000EC +:1064B00000000000000000000000000000000000DC +:1064C00000000000000000000000000000000000CC +:1064D00000000000000000000000000000000000BC +:1064E000000000007000000000000000000000003C +:1064F000000000002000000000000000600000001C +:10650000000000000000000000000000000000008B +:10651000000000000000000000000000000000007B +:10652000000000000000000000000000000000006B +:1065300000000000000000000000000060000000FB +:10654000000000000000000000000000000000004B +:10655000000000000000000000000000000000003B +:1065600000000000000000000000000070000000BB +:10657000000200001000000000000000E000000029 +:10658000000100000000000000000000700000009A +:1065900000000000000000000000000000000000FB +:1065A00000000000000000000000000000000000EB +:1065B00000000000000000000000000000000000DB +:1065C00000000000000000000000000000000000CB +:1065D0004000040000000000000000000041000036 +:1065E000401000000080001080800810102010086B +:1065F0000080400040100018000000100000400023 +:1066000010402000841000184018000000410000D5 +:1066100004000000008001010040001000814010D3 +:1066200000010000002000002000000040100012C7 +:1066300020100000402000010020002020000490D5 +:10664000340000000001000000000008804000103D +:1066500010200000400240100000000000800000F8 +:10666000000000800000300040100000000000002A +:106670000000000000000000500100200000008029 +:1066800000000000404100100000804001000000B8 +:106690000020400000200040000000002002000018 +:1066A0000000200040000200000000000000200068 +:1066B00000000000210000000000000000000000B9 +:1066C00000000000000000000000000000000000CA +:1066D00000000000000000000000000000000000BA +:1066E00000000800080D000D080D080900800CB915 +:1066F000087900100C195D0D089E001088000C1020 +:106700001C9E1C08009E0D01501E5018089E0D1066 +:10671000590C08001008000908190918083C0970EC +:10672000000000805800000A3CAE9DB000B00D3063 +:10673000700E0410088E0000000008000881010A95 +:10674000003E30190C1E000408000000A9A00D0036 +:106750000900001010BE000E00800A0A00050000AB +:1067600000010D301E090D0009000030000D000071 +:1067700021000C007008000A00003E000D350000EA +:106780000001000A000800000C0A00003D000D7026 +:10679000700000050000000000000C110000A000C7 +:1067A0000070A0000101A00000000070000E500069 +:1067B000000A00000000000005000000500000007A +:1067C00000000D0000000000700009000000000043 +:1067D000000000050000000000000D0000000000A7 +:1067E0000000000000000000700000000000000039 +:1067F000000000000000010011000C000100010079 +:1068000000010100011C00801100000001100000C7 +:1068100031300000013001000030B00010000000F5 +:106820000102000000019100003130001D00000055 +:1068300011000000001C00000D0000008120740CFD +:106840000030000000383100010C00000030010071 +:10685000115000003000F008110000011130008CD0 +:106860000030001030000C10190000000000000083 +:106870000E00000000300000001E00001E0C100082 +:106880000002000080000100008180300000100044 +:1068900010400000000000000001000001000000A6 +:1068A000300800100000003000000000303C0B00F9 +:1068B00000002030080000000010300000300030E0 +:1068C00000000000100800000000300030000C0044 +:1068D0000000000000001000000000003C0000006C +:1068E0000000005000000000000000000000000058 +:1068F0000000000000000000000000000000000098 +:106900000000000000000000000000000000000186 +:106910000000000000000000000000000000000077 +:106920000030000000300000000000000000000007 +:106930000000000000300000000000000000000027 +:106940000000800080B00000840000000000000013 +:106950000000003080000000800104000000000101 +:106960008001083080008031000030050000000008 +:10697000800000004831083184013D410800800159 +:1069800080000831010080304880B40038003001B8 +:106990003000000130014C08040180013000840502 +:1069A00034000C403000300130000C80300000908A +:1069B0003C0000000000000000000080000000001B +:1069C0000000000100000000000040010080000005 +:1069D0003000004000000000000000000000000047 +:1069E00000000001000000000000000000000000A6 +:1069F0000000000000000000000000000000000097 +:106A00000000000000000000000000000000000086 +:106A10000000000000000000000000000000000076 +:106A20000000000000040000000000000000000062 +:106A3000000000000040000002B000000000000064 +:106A400000000000000000000080000000000000C6 +:106A5000000000000000300000B000003100000025 +:106A6000000000000000004000100002300402009E +:106A70000000400430040148301000400000400E87 +:106A800000000000300800003144014402044218B4 +:106A90000100300430000148020030403130700005 +:106AA0004100400C40004008400032010200400C10 +:106AB0004000020E420002184000400240004230F6 +:106AC0004000005042000000003000000000003094 +:106AD0000000000000000008003000000000300846 +:106AE00000104000400000000030000000000000E6 +:106AF000000000000000000800000000000000008E +:106B00000000000000000000000000000000000085 +:106B10000000000000000000000000000000000075 +:106B20000000000000000000000000000000000065 +:106B30000000000000000000000400000000000051 +:106B400043000000000000000000000000200000E2 +:106B50000000000000000000000000000000000035 +:106B60000000000000000000000000000000000025 +:106B700000000000000000000000000000200000F5 +:106B800000000000000000000000000400200002DF +:106B900080810000000000000004000000000000F0 +:106BA00000000000000000000000000000000000E5 +:106BB000004008000000010000000000400000004C +:106BC0000000000000800000000000044000000001 +:106BD0000000000000000000000000000020000095 +:106BE0000000000000000000000082000020000003 +:106BF00000000000000000000000C00100200000B4 +:106C00000000000000000000000000400100000043 +:106C10000000000000000000000000000000000074 +:106C20000000000000000000000000000000000064 +:106C30000000000000000000000000000000000054 +:106C40000000000000000000000020000000000024 +:106C50000000000000000000000000000000000034 +:106C60000000000000000000000000000000000024 +:106C7000000000080000000000000000000000000C +:106C80000000000000000000000000000000000004 +:106C900000000000000000000000000000000000F4 +:106CA00000000000000000000000000000000000E4 +:106CB00000000000000000000000000000000000D4 +:106CC00000002000000000000000000000000000A4 +:106CD00000000000000000000000000000000000B4 +:106CE00000000000000000000000000000000000A4 +:106CF0000000000000000000000000000000000094 +:106D00000000000000000000000000000000000083 +:106D10000000200000000000000020000000000033 +:106D20000000000000000000000000000000000063 +:106D30000000000000000000000000000000000053 +:106D40000000000000000000000000000000000043 +:106D500000000000000000001000050C30EA80393F +:106D60000010000000000000000000000000000013 +:106D70000000000000000000000000000000000013 +:106D80000000050C00A037042818050C30EA0500A7 +:106D900028180100C60505002818050C30EA050072 +:106DA00028180000000000000000000000000000A3 +:106DB00000000000000000000000000000000000D3 +:106DC00000000000000000000000000000000000C3 +:106DD0000000050C00A0803900100100C605050068 +:106DE0002818000000000000000000000000000063 +:106DF0000000000000000000000000000000000093 +:106E000000000000000000000000050C00A00500CC +:106E10002818050C00A005002818050C00A0050086 +:106E200028180100C60580390010010040058508BA +:106E30000110050C00A00000000000000000000090 +:106E40000000000000000000000000000000000042 +:106E50000000050C00A000000000000000800203FC +:106E600024000000000000000000000000000000FE +:106E70000000000000000000000000000000000012 +:106E80000000000000000000000000000000000002 +:106E900000000000000000000000000000000000F2 +:106EA00000000000000000000000000000000000E2 +:106EB00000000000000000000000000000000000D2 +:106EC00000000000000000000000000000000000C2 +:106ED00000000000000000000000000000000000B2 +:106EE00000000000000000000000000000000000A2 +:106EF0000000000000000000000000000000000092 +:106F00000000000000000000000000000000000081 +:106F10000000000000000000000000000000000071 +:106F20000000000000000000000000000000000061 +:106F30000000000000000000000000000000000051 +:106F40000000000000000000000000000000000041 +:106F50000000000000000000000000000000000031 +:106F60000000000000000000000000000000000021 +:106F70000000000000000000000000000000000011 +:106F80000000000000000000000000000000000001 +:106F900000000000000000000000000000000000F1 +:106FA00000000000000000000000000000000000E1 +:106FB00000000000000000000000000000000000D1 +:106FC00000000000000000000000000000000000C1 +:106FD00000000000000000000000000000000000B1 +:106FE00000000000000000000000000000000000A1 +:106FF0000000000000000000000000000000000091 +:107000000000000000000000000000000000000080 +:107010000000000000000000000000000000000070 +:107020000000000000000000000000000000000060 +:107030000000000000000000000000000000000050 +:107040000000000000000000000000000000000040 +:107050000000000000000000000000000000000030 +:107060000000000000000000000000000000000020 +:107070000000000000000000000000000000000010 +:107080000000000000000000000000000000000000 +:1070900000000000000000000000000000000000F0 +:1070A00000000000000000000000000000000000E0 +:1070B00000000000000000000000000000000000D0 +:1070C00000000000000000000000000000000000C0 +:1070D00000000000000000000000000000000000B0 +:1070E00000000000000000000000000000000000A0 +:1070F0000000000000000000000000000000000090 +:10710000000000000000000000000000000000007F +:10711000000000000000000000000000000000006F +:10712000000000000000000000000000000000005F +:10713000000000000000000000000000000000004F +:10714000000000000000000000000000000000003F +:10715000000000000000000000000000000000002F +:10716000000000000000000000000000000000001F +:10717000000000000000000000000000000000000F +:1071800000000000000000000000000000000000FF +:1071900000000000000000000000000000000000EF +:1071A00000000000000000000000000000000000DF +:1071B00000000000000000000000000000000000CF +:1071C00000000000000000000000000000000000BF +:1071D00000000000000000000000000000000000AF +:1071E000000000000000000000000000000000009F +:1071F000000000000000000000000000000000008F +:10720000000000000000000000000000000000007E +:10721000000000000000000000000000000000006E +:10722000000000000000000000000000000000005E +:10723000000000000000000000000000000000004E +:10724000000000000000000000000000000000003E +:10725000000000000000000000000000000000002E +:10726000000000000000000000000000000000001E +:10727000000000000000000000000000000000000E +:1072800000000000000000000000000000000000FE +:1072900000000000000000000000000000000000EE +:1072A00000000000000000000000000000000000DE +:1072B00000000000000000000000000000000000CE +:1072C00000000000000000000000000000000000BE +:1072D00000000000000000000000000000000000AE +:1072E000000000000000000000000000000000009E +:1072F000000000000000000000000000000000008E +:10730000000000000000000000000000000000007D +:10731000000000000000000000000000000000006D +:10732000000000000000000000000000000000005D +:10733000000000000000000000000000000000004D +:10734000000000000000000000000000000000003D +:10735000000000000000000000000000000000002D +:10736000000000000000000000000000000000001D +:10737000000000000000000000000000000000000D +:1073800000000000000000000000000000000000FD +:1073900000000000000000000000000000000000ED +:1073A00000000000000000000000000000000000DD +:1073B00000000000000000000000000000000000CD +:1073C00000000000000000000000000000000000BD +:1073D00000000000000000000000000000000000AD +:1073E000000000000000000000000000000000009D +:1073F000000000000000000000000000000000008D +:10740000000000000000000000000000000000007C +:10741000000000000000000000000000000000006C +:10742000000000000000000000000000000000005C +:10743000000000000000000000000000000000004C +:10744000000000000000000000000000000000003C +:10745000000000000000000000000000000000002C +:10746000000000000000000000000000000000001C +:10747000000000000000000000000000000000000C +:1074800000000000000000000000000000000000FC +:1074900000000000000000000000000000000000EC +:1074A00000000000000000000000000000000000DC +:1074B00000000000000000000000000000000000CC +:1074C00000000000000000000000000000000000BC +:1074D00000000000000000000000000000000000AC +:1074E000000000000000000000000000000000009C +:1074F000000000000000000000000000000000008C +:10750000000000000000000000000000000000007B +:10751000000000000000000000000000000000006B +:10752000000000000000000000000000000000005B +:10753000000000000000000000000000000000004B +:10754000000000000000000000000000000000003B +:10755000000000000000000000000000000000002B +:10756000000000000000000000000000000000001B +:10757000000000000000000000000000000000000B +:1075800000000000000000000000000000000000FB +:1075900000000000000000000000000000000000EB +:1075A00000000000000000000000000000000000DB +:1075B00000000000000000000000000000000000CB +:1075C00000000000000000000000000000000000BB +:1075D00000000000000000000000000000000000AB +:1075E000000000000000000000000000000000009B +:1075F000000000000000000000000000000000008B +:10760000000000000000000000000000000000007A +:10761000000000000000000000000000000000006A +:10762000000000000000000000000000000000005A +:10763000000000000000000000000000000000004A +:10764000000000000000000000000000000000003A +:10765000000000000000000000000000000000002A +:10766000000000000000000000000000000000001A +:10767000000000000000000000000000000000000A +:1076800000000000000000000000000000000000FA +:1076900000000000000000000000000000000000EA +:1076A00000000000000000000000000000000000DA +:1076B00000000000000000000000000000000000CA +:1076C00000000000000000000000000000000000BA +:1076D00000000000000000000000000000000000AA +:1076E000000000000000000000000000000000009A +:1076F000000000000000000000000000000000008A +:107700000000000000000000000000000000000079 +:107710000000000000000000000000000000000069 +:107720000000000000000000000000000000000059 +:107730000000000000000000000000000000000049 +:107740000000000000000000000000000000000039 +:107750000000000000000000000000000000000029 +:107760000000000000000000000000000000000019 +:107770000000000000000000000000000000000009 +:1077800000000000000000000000000000000000F9 +:1077900000000000000000000000000000000000E9 +:1077A00000000000000000000000000000000000D9 +:1077B00000000000000000000000000000000000C9 +:1077C00000000000000000000000000000000000B9 +:1077D00000000000000000000000000000000000A9 +:1077E0000000000000000000000000000000000099 +:1077F0000000000000000000000000000000000089 +:107800000000000000000000000000000000000078 +:107810000000000000000000000000000000000068 +:107820000000000000000000000000000000000058 +:107830000000000000000000000000000000000048 +:107840000000000000000000000000000000000038 +:107850000000000000000000000000000000000028 +:107860000000000000000000000000000000000018 +:107870000000000000000000000000000000000008 +:1078800000000000000000000000000000000000F8 +:1078900000000000000000000000000000000000E8 +:1078A00000000000000000000000000000000000D8 +:1078B00000000000000000000000000000000000C8 +:1078C00000000000000000000000000000000000B8 +:1078D00000000000000000000000000000000000A8 +:1078E0000000000000000000000000000000000098 +:1078F0000000000000000000000000000000000088 +:107900000000000000000000000000000000000077 +:107910000000000000000000000000000000000067 +:107920000000000000000000000000000000000057 +:107930000000000000000000000000000000000047 +:107940000000000000000000000000000000000037 +:107950000000000000000000000000000000000027 +:107960000000000000000000000000000000000017 +:107970000000000000000000000000000000000007 +:1079800000000000000000000000000000000000F7 +:1079900000000000000000000000000000000000E7 +:1079A00000000000000000000000000000000000D7 +:1079B00000000000000000000000000000000000C7 +:1079C00000000000000000000000000000000000B7 +:1079D00000000000000000000000000000000000A7 +:1079E0000000000000000000000000000000000097 +:1079F0000000000000000000000000000000000087 +:107A00000000000000000000000000000000000076 +:107A10000000000000000000000000000000000066 +:107A20000000000000000000000000000000000056 +:107A30000000000000000000000000000000000046 +:107A40000000000000000000000000000000000036 +:107A50000000000000000000000000000000000026 +:107A60000000000000000000000000000000000016 +:107A70000000000000000000000000000000000006 +:107A800000000000000000000000000000000000F6 +:107A900000000000000000000000000000000000E6 +:107AA00000000000000000000000000000000000D6 +:107AB00000000000000000000000000000000000C6 +:107AC00000000000000000000000000000000000B6 +:107AD00000000000000000000000000000000000A6 +:107AE0000000000000000000000000000000000096 +:107AF0000000000000000000000000000000000086 +:107B00000000000000000000000000000000000075 +:107B10000000000000000000000000000000000065 +:107B20000000000000000000000000000000000055 +:107B30000000000000000000000000000000000045 +:107B40000000000000000000000000000000000035 +:107B50000000000000000000000000000000000025 +:107B60000000000000000000000000000000000015 +:107B70000000000000000000000000000000000005 +:107B800000000000000000000000000000000000F5 +:107B900000000000000000000000000000000000E5 +:107BA00000000000000000000000000000000000D5 +:107BB00000000000000000000000000000000000C5 +:107BC00000000000000000000000000000000000B5 +:107BD00000000000000000000000000000000000A5 +:107BE0000000000000000000000000000000000095 +:107BF0000000000000000000000000000000000085 +:107C00000000000000000000000000000000000074 +:107C10000000000000000000000000000000000064 +:107C20000000000000000000000000000000000054 +:107C30000000000000000000000000000000000044 +:107C40000000000000000000000000000000000034 +:107C50000000000000000000000000000000000024 +:107C60000000000000000000000000000000000014 +:107C70000000000000000000000000000000000004 +:107C800000000000000000000000000000000000F4 +:107C900000000000000000000000000000000000E4 +:107CA00000000000000000000000000000000000D4 +:107CB00000000000000000000000000000000000C4 +:107CC00000000000000000000000000000000000B4 +:107CD00000000000000000000000000000000000A4 +:107CE0000000000000000000000000000000000094 +:107CF0000000000000000000000000000000000084 +:107D00000000000000000000000000000000000073 +:107D10000000000000000000000000000000000063 +:107D20000000000000000000000000000000000053 +:107D30000000000000000000000000000000000043 +:107D40000000000000000000000000000000000033 +:107D50000000000000000000000000000000000023 +:107D60000000000000000000000000000000000013 +:107D70000000000000000000000000000000000003 +:107D800000000000000000000000000000000000F3 +:107D900000000000000000000000000000000000E3 +:107DA00000000000000000000000000000000000D3 +:107DB00000000000000000000000000000000000C3 +:107DC00000000000000000000000000000000000B3 +:107DD00000000000000000000000000000000000A3 +:107DE0000000000000000000000000000000000093 +:107DF0000000000000000000000000000000000083 +:107E00000000000000000000000000000000000072 +:107E10000000000000000000000000000000000062 +:107E20000000000000000000000000000000000052 +:107E30000000000000000000000000000000000042 +:107E40000000000000000000000000000000000032 +:107E50000000000000000000000000000000000022 +:107E60000000000000000000000000000000000012 +:107E70000000000000000000000000000000000002 +:107E800000000000000000000000000000000000F2 +:107E900000000000000000000000000000000000E2 +:107EA00000000000000000000000000000000000D2 +:107EB00000000000000000000000000000000000C2 +:107EC00000000000000000000000000000000000B2 +:107ED00000000000000000000000000000000000A2 +:107EE0000000000000000000000000000000000092 +:107EF0000000000000000000000000000000000082 +:107F00000000000000000000000000000000000071 +:107F10000000000000000000000000000000000061 +:107F20000000000000000000000000000000000051 +:107F30000000000000000000000000000000000041 +:107F40000000000000000000000000000000000031 +:107F50000000000000000000000000000000000021 +:107F60000000000000000000000000000000000011 +:107F70000000000000000000000000000000000001 +:107F800000000000000000000000000000000000F1 +:107F900000000000000000000000000000000000E1 +:107FA00000000000000000000000000000000000D1 +:107FB00000000000000000000000000000000000C1 +:107FC00000000000000000000000000000000000B1 +:107FD00000000000000000000000000000000000A1 +:107FE0000000000000000000000000000000000091 +:107FF0000000000000000000000000000000000081 +:108000000000000000000000000000000000000070 +:108010000000000000000000000000000000000060 +:108020000000000000000000000000000000000050 +:108030000000000000000000000000000000000040 +:108040000000000000000000000000000000000030 +:108050000000000000000000000000000000000020 +:108060000000000000000000000000000000000010 +:108070000000000000000000000000000000000000 +:1080800000000000000000000000000000000000F0 +:1080900000000000000000000000000000000000E0 +:1080A00000000000000000000000000000000000D0 +:1080B00000000000000000000000000000000000C0 +:1080C00000000000000000000000000000000000B0 +:1080D00000000000000000000000000000000000A0 +:1080E0000000000000000000000000000000000090 +:1080F0000000000000000000000000000000000080 +:10810000000000000000000000000000000000006F +:10811000000000000000000000000000000000005F +:10812000000000000000000000000000000000004F +:10813000000000000000000000000000000000003F +:10814000000000000000000000000000000000002F +:10815000000000000000000000000000000000001F +:10816000000000000000000000000000000000000F +:1081700000000000000000000000000000000000FF +:1081800000000000000000000000000000000000EF +:1081900000000000000000000000000000000000DF +:1081A00000000000000000000000000000000000CF +:1081B00000000000000000000000000000000000BF +:1081C00000000000000000000000000000000000AF +:1081D000000000000000000000000000000000009F +:1081E000000000000000000000000000000000008F +:1081F000000000000000000000000000000000007F +:10820000000000000000000000000000000000006E +:10821000000000000000000000000000000000005E +:10822000000000000000000000000000000000004E +:10823000000000000000000000000000000000003E +:10824000000000000000000000000000000000002E +:10825000000000000000000000000000000000001E +:10826000000000000000000000000000000000000E +:1082700000000000000000000000000000000000FE +:1082800000000000000000000000000000000000EE +:1082900000000000000000000000000000000000DE +:1082A00000000000000000000000000000000000CE +:1082B00000000000000000000000000000000000BE +:1082C00000000000000000000000000000000000AE +:1082D000000000000000000000000000000000009E +:1082E000000000000000000000000000000000008E +:1082F000000000000000000000000000000000007E +:10830000000000000000000000000000000000006D +:10831000000000000000000000000000000000005D +:10832000000000000000000000000000000000004D +:10833000000000000000000000000000000000003D +:10834000000000000000000000000000000000002D +:10835000000000000000000000000000000000001D +:10836000000000000000000000000000000000000D +:1083700000000000000000000000000000000000FD +:1083800000000000000000000000000000000000ED +:1083900000000000000000000000000000000000DD +:1083A00000000000000000000000000000000000CD +:1083B00000000000000000000000000000000000BD +:1083C00000000000000000000000000000000000AD +:1083D000000000000000000000000000000000009D +:1083E000000000000000000000000000000000008D +:1083F000000000000000000000000000000000007D +:10840000000000000000000000000000000000006C +:10841000000000000000000000000000000000005C +:10842000000000000000000000000000000000004C +:10843000000000000000000000000000000000003C +:10844000000000000000000000000000000000002C +:10845000000000000000000000000000000000001C +:10846000000000000000000000000000000000000C +:1084700000000000000000000000000000000000FC +:1084800000000000000000000000000000000000EC +:1084900000000000000000000000000000000000DC +:1084A00000000000000000000000000000000000CC +:1084B00000000000000000000000000000000000BC +:1084C00000000000000000000000000000000000AC +:1084D000000000000000000000000000000000009C +:1084E000000000000000000000000000000000008C +:1084F000000000000000000000000000000000007C +:10850000000000000000000000000000000000006B +:10851000000000000000000000000000000000005B +:10852000000000000000000000000000000000004B +:10853000000000000000000000000000000000003B +:10854000000000000000000000000000000000002B +:10855000000000000000000000000000000000001B +:10856000000000000000000000000000000000000B +:1085700000000000000000000000000000000000FB +:1085800000000000000000000000000000000000EB +:1085900000000000000000000000000000000000DB +:1085A00000000000000000000000000000000000CB +:1085B00000000000000000000000000000000000BB +:1085C00000000000000000000000000000000000AB +:1085D000000000000000000000000000000000009B +:1085E000000000000000000000000000000000008B +:1085F000000000000000000000000000000000007B +:10860000000000000000000000000000000000006A +:10861000000000000000000000000000000000005A +:10862000000000000000000000000000000000004A +:10863000000000000000000000000000000000003A +:10864000000000000000000000000000000000002A +:10865000000000000000000000000000000000001A +:10866000000000000000000000000000000000000A +:1086700000000000000000000000000000000000FA +:1086800000000000000000000000000000000000EA +:1086900000000000000000000000000000000000DA +:1086A00000000000000000000000000000000000CA +:1086B00000000000000000000000000000000000BA +:1086C00000000000000000000000000000000000AA +:1086D000000000000000000000000000000000009A +:1086E000000000000000000000000000000000008A +:1086F000000000000000000000000000000000007A +:108700000000000000000000000000000000000069 +:108710000000000000000000000000000000000059 +:108720000000000000000000000000000000000049 +:108730000000000000000000000000000000000039 +:108740000000000000000000000000000000000029 +:108750000000000000000000000000000000000019 +:108760000000000000000000000000000000000009 +:1087700000000000000000000000000000000000F9 +:1087800000000000000000000000000000000000E9 +:1087900000000000000000000000000000000000D9 +:1087A00000000000000000000000000000000000C9 +:1087B00000000000000000000000000000000000B9 +:1087C00000000000000000000000000000000000A9 +:1087D0000000000000000000000000000000000099 +:1087E0000000000000000000000000000000000089 +:1087F0000000000000000000000000000000000079 +:108800000000000000000000000000000000000068 +:108810000000000000000000000000000000000058 +:108820000000000000000000000000000000000048 +:108830000000000000000000000000000000000038 +:108840000000000000000000000000000000000028 +:108850000000000000000000000000000000000018 +:108860000000000000000000000000000000000008 +:1088700000000000000000000000000000000000F8 +:1088800000000000000000000000000000000000E8 +:1088900000000000000000000000000000000000D8 +:1088A00000000000000000000000000000000000C8 +:1088B00000000000000000000000000000000000B8 +:1088C00000000000000000000000000000000000A8 +:1088D0000000000000000000000000000000000098 +:1088E0000000000000000000000000000000000088 +:1088F0000000000000000000000000000000000078 +:108900000000000000000000000000000000000067 +:108910000000000000000000000000000000000057 +:108920000000000000000000000000000000000047 +:108930000000000000000000000000000000000037 +:108940000000000000000000000000000000000027 +:108950000000000000000000000000000000000017 +:108960000000000000000000000000000000000007 +:1089700000000000000000000000000000000000F7 +:1089800000000000000000000000000000000000E7 +:1089900000000000000000000000000000000000D7 +:1089A00000000000000000000000000000000000C7 +:1089B00000000000000000000000000000000000B7 +:1089C00000000000000000000000000000000000A7 +:1089D0000000000000000000000000000000000097 +:1089E0000000000000000000000000000000000087 +:1089F0000000000000000000000000000000000077 +:108A00000000000000000000000000000000000066 +:108A10000000000000000000000000000000000056 +:108A20000000000000000000000000000000000046 +:108A30000000000000000000000000000000000036 +:108A40000000000000000000000000000000000026 +:108A50000000000000000000000000000000000016 +:108A60000000000000000000000000000000000006 +:108A700000000000000000000000000000000000F6 +:108A800000000000000000000000000000000000E6 +:108A900000000000000000000000000000000000D6 +:108AA00000000000000000000000000000000000C6 +:108AB00000000000000000000000000000000000B6 +:108AC00000000000000000000000000000000000A6 +:108AD0000000000000000000000000000000000096 +:108AE0000000000000000000000000000000000086 +:108AF0000000000000000000000000000000000076 +:108B00000000000000000000000000000000000065 +:108B10000000000000000000000000000000000055 +:108B20000000000000000000000000000000000045 +:108B30000000000000000000000000000000000035 +:108B40000000000000000000000000000000000025 +:108B50000000000000000000000000000000000015 +:108B60000000000000000000000000000000000005 +:108B700000000000000000000000000000000000F5 +:108B800000000000000000000000000000000000E5 +:108B900000000000000000000000000000000000D5 +:108BA00000000000000000000000000000000000C5 +:108BB00000000000000000000000000000000000B5 +:108BC00000000000000000000000000000000000A5 +:108BD0000000000000000000000000000000000095 +:108BE0000000000000000000000000000000000085 +:108BF0000000000000000000000000000000000075 +:108C00000000000000000000000000000000000064 +:108C10000000000000000000000000000000000054 +:108C20000000000000000000000000000000000044 +:108C30000000000000000000000000000000000034 +:108C40000000000000000000000000000000000024 +:108C50000000000000000000000000000000000014 +:108C60000000000000000000000000000000000004 +:108C700000000000000000000000000000000000F4 +:108C800000000000000000000000000000000000E4 +:108C900000000000000000000000000000000000D4 +:108CA00000000000000000000000000000000000C4 +:108CB00000000000000000000000000000000000B4 +:108CC00000000000000000000000000000000000A4 +:108CD0000000000000000000000000000000000094 +:108CE0000000000000000000000000000000000084 +:108CF0000000000000000000000000000000000074 +:108D00000000000000000000000000000000000063 +:108D10000000000000000000000000000000000053 +:108D20000000000000000000000000000000000043 +:108D30000000000000000000000000000000000033 +:108D40000000000000000000000000000000000023 +:108D50000000000000000000000000000000000013 +:108D60000000000000000000000000000000000003 +:108D700000000000000000000000000000000000F3 +:108D800000000000000000000000000000000000E3 +:108D900000000000000000000000000000000000D3 +:108DA00000000000000000000000000000000000C3 +:108DB00000000000000000000000000000000000B3 +:108DC00000000000000000000000000000000000A3 +:108DD0000000000000000000000000000000000093 +:108DE0000000000000000000000000000000000083 +:108DF0000000000000000000000000000000000073 +:108E00000000000000000000000000000000000062 +:108E10000000000000000000000000000000000052 +:108E20000000000000000000000000000000000042 +:108E30000000000000000000000000000000000032 +:108E40000000000000000000000000000000000022 +:108E50000000000000000000000000000000000012 +:108E60000000000000000000000000000000000002 +:108E700000000000000000000000000000000000F2 +:108E800000000000000000000000000000000000E2 +:108E900000000000000000000000000000000000D2 +:108EA00000000000000000000000000000000000C2 +:108EB00000000000000000000000000000000000B2 +:108EC00000000000000000000000000000000000A2 +:108ED0000000000000000000000000000000000092 +:108EE0000000000000000000000000000000000082 +:108EF0000000000000000000000000000000000072 +:108F00000000000000000000000000000000000061 +:108F10000000000000000000000000000000000051 +:108F20000000000000000000000000000000000041 +:108F30000000000000000000000000000000000031 +:108F40000000000000000000000000000000000021 +:108F50000000000000000000000000000000000011 +:108F60000000000000000000000000000000000001 +:108F700000000000000000000000000000000000F1 +:108F800000000000000000000000000000000000E1 +:108F900000000000000000000000000000000000D1 +:108FA00000000000000000000000000000000000C1 +:108FB00000000000000000000000000000000000B1 +:108FC00000000000000000000000000000000000A1 +:108FD0000000000000000000000000000000000091 +:108FE0000000000000000000000000000000000081 +:108FF0000000000000000000000000000000000071 +:109000000000000000000000000000000000000060 +:109010000000000000000000000000000000000050 +:109020000000000000000000000000000000000040 +:109030000000000000000000000000000000000030 +:109040000000000000000000000000000000000020 +:109050000000000000000000000000000000000010 +:109060000000000000000000000000000000000000 +:1090700000000000000000000000000000000000F0 +:1090800000000000000000000000000000000000E0 +:1090900000000000000000000000000000000000D0 +:1090A00000000000000000000000000000000000C0 +:1090B00000000000000000000000000000000000B0 +:1090C00000000000000000000000000000000000A0 +:1090D0000000000000000000000000000000000090 +:1090E0000000000000000000000000000000000080 +:1090F0000000000000000000000000000000000070 +:10910000000000000000000000000000000000005F +:10911000000000000000000000000000000000004F +:10912000000000000000000000000000000000003F +:10913000000000000000000000000000000000002F +:10914000000000000000000000000000000000001F +:10915000000000000000000000000000000000000F +:1091600000000000000000000000000000000000FF +:1091700000000000000000000000000000000000EF +:1091800000000000000000000000000000000000DF +:1091900000000000000000000000000000000000CF +:1091A00000000000000000000000000000000000BF +:1091B00000000000000000000000000000000000AF +:1091C000000000000000000000000000000000009F +:1091D000000000000000000000000000000000008F +:1091E000000000000000000000000000000000007F +:1091F000000000000000000000000000000000006F +:10920000000000000000000000000000000000005E +:10921000000000000000000000000000000000004E +:10922000000000000000000000000000000000003E +:10923000000000000000000000000000000000002E +:10924000000000000000000000000000000000001E +:10925000000000000000000000000000000000000E +:1092600000000000000000000000000000000000FE +:1092700000000000000000000000000000000000EE +:1092800000000000000000000000000000000000DE +:1092900000000000000000000000000000000000CE +:1092A00000000000000000000000000000000000BE +:1092B00000000000000000000000000000000000AE +:1092C000000000000000000000000000000000009E +:1092D000000000000000000000000000000000008E +:1092E000000000000000000000000000000000007E +:1092F000000000000000000000000000000000006E +:10930000000000000000000000000000000000005D +:10931000000000000000000000000000000000004D +:10932000000000000000000000000000000000003D +:10933000000000000000000000000000000000002D +:10934000000000000000000000000000000000001D +:10935000000000000000000000000000000000000D +:1093600000000000000000000000000000000000FD +:1093700000000000000000000000000000000000ED +:1093800000000000000000000000000000000000DD +:1093900000000000000000000000000000000000CD +:1093A00000000000000000000000000000000000BD +:1093B00000000000000000000000000000000000AD +:1093C000000000000000000000000000000000009D +:1093D000000000000000000000000000000000008D +:1093E000000000000000000000000000000000007D +:1093F000000000000000000000000000000000006D +:10940000000000000000000000000000000000005C +:10941000000000000000000000000000000000004C +:10942000000000000000000000000000000000003C +:10943000000000000000000000000000000000002C +:10944000000000000000000000000000000000001C +:10945000000000000000000000000000000000000C +:1094600000000000000000000000000000000000FC +:1094700000000000000000000000000000000000EC +:1094800000000000000000000000000000000000DC +:1094900000000000000000000000000000000000CC +:1094A00000000000000000000000000000000000BC +:1094B00000000000000000000000000000000000AC +:1094C000000000000000000000000000000000009C +:1094D000000000000000000000000000000000008C +:1094E000000000000000000000000000000000007C +:1094F000000000000000000000000000000000006C +:10950000000000000000000000000000000000005B +:10951000000000000000000000000000000000004B +:10952000000000000000000000000000000000003B +:10953000000000000000000000000000000000002B +:10954000000000000000000000000000000000001B +:10955000000000000000000000000000000000000B +:1095600000000000000000000000000000000000FB +:1095700000000000000000000000000000000000EB +:1095800000000000000000000000000000000000DB +:1095900000000000000000000000000000000000CB +:1095A00000000000000000000000000000000000BB +:1095B00000000000000000000000000000000000AB +:1095C000000000000000000000000000000000009B +:1095D000000000000000000000000000000000008B +:1095E000000000000000000000000000000000007B +:1095F000000000000000000000000000000000006B +:10960000000000000000000000000000000000005A +:10961000000000000000000000000000000000004A +:10962000000000000000000000000000000000003A +:10963000000000000000000000000000000000002A +:10964000000000000000000000000000000000001A +:10965000000000000000000000000000000000000A +:1096600000000000000000000000000000000000FA +:1096700000000000000000000000000000000000EA +:1096800000000000000000000000000000000000DA +:1096900000000000000000000000000000000000CA +:1096A00000000000000000000000000000000000BA +:1096B00000000000000000000000000000000000AA +:1096C000000000000000000000000000000000009A +:1096D000000000000000000000000000000000008A +:1096E000000000000000000000000000000000007A +:1096F000000000000000000000000000000000006A +:109700000000000000000000000000000000000059 +:109710000000000000000000000000000000000049 +:109720000000000000000000000000000000000039 +:109730000000000000000000000000000000000029 +:109740000000000000000000000000000000000019 +:109750000000000000000000000000000000000009 +:1097600000000000000000000000000000000000F9 +:1097700000000000000000000000000000000000E9 +:1097800000000000000000000000000000000000D9 +:1097900000000000000000000000000000000000C9 +:1097A00000000000000000000000000000000000B9 +:1097B00000000000000000000000000000000000A9 +:1097C0000000000000000000000000000000000099 +:1097D0000000000000000000000000000000000089 +:1097E0000000000000000000000000000000000079 +:1097F0000000000000000000000000000000000069 +:109800000000000000000000000000000000000058 +:109810000000000000000000000000000000000048 +:109820000000000000000000000000000000000038 +:109830000000000000000000000000000000000028 +:109840000000000000000000000000000000000018 +:109850000000000000000000000000000000000008 +:1098600000000000000000000000000000000000F8 +:1098700000000000000000000000000000000000E8 +:1098800000000000000000000000000000000000D8 +:1098900000000000000000000000000000000000C8 +:1098A00000000000000000000000000000000000B8 +:1098B00000000000000000000000000000000000A8 +:1098C0000000000000000000000000000000000098 +:1098D0000000000000000000000000000000000088 +:1098E0000000000000000000000000000000000078 +:1098F0000000000000000000000000000000000068 +:109900000000000000000000000000000000000057 +:109910000000000000000000000000000000000047 +:109920000000000000000000000000000000000037 +:109930000000000000000000000000000000000027 +:109940000000000000000000000000000000000017 +:109950000000000000000000000000000000000007 +:1099600000000000000000000000000000000000F7 +:1099700000000000000000000000000000000000E7 +:1099800000000000000000000000000000000000D7 +:1099900000000000000000000000000000000000C7 +:1099A00000000000000000000000000000000000B7 +:1099B00000000000000000000000000000000000A7 +:1099C0000000000000000000000000000000000097 +:1099D0000000000000000000000000000000000087 +:1099E0000000000000000000000000000000000077 +:1099F0000000000000000000000000000000000067 +:109A00000000000000000000000000000000000056 +:109A10000000000000000000000000000000000046 +:109A20000000000000000000000000000000000036 +:109A30000000000000000000000000000000000026 +:109A40000000000000000000000000000000000016 +:109A50000000000000000000000000000000000006 +:109A600000000000000000000000000000000000F6 +:109A700000000000000000000000000000000000E6 +:109A800000000000000000000000000000000000D6 +:109A900000000000000000000000000000000000C6 +:109AA00000000000000000000000000000000000B6 +:109AB00000000000000000000000000000000000A6 +:109AC0000000000000000000000000000000000096 +:109AD0000000000000000000000000000000000086 +:109AE0000000000000000000000000000000000076 +:109AF0000000000000000000000000000000000066 +:109B00000000000000000000000000000000000055 +:109B10000000000000000000000000000000000045 +:109B20000000000000000000000000000000000035 +:109B30000000000000000000000000000000000025 +:109B40000000000000000000000000000000000015 +:109B50000000000000000000000000000000000005 +:109B600000000000000000000000000000000000F5 +:109B700000000000000000000000000000000000E5 +:109B800000000000000000000000000000000000D5 +:109B900000000000000000000000000000000000C5 +:109BA00000000000000000000000000000000000B5 +:109BB00000000000000000000000000000000000A5 +:109BC0000000000000000000000000000000000095 +:109BD0000000000000000000000000000000000085 +:109BE0000000000000000000000000000000000075 +:109BF0000000000000000000000000000000000065 +:109C00000000000000000000000000000000000054 +:109C10000000000000000000000000000000000044 +:109C20000000000000000000000000000000000034 +:109C30000000000000000000000000000000000024 +:109C40000000000000000000000000000000000014 +:109C50000000000000000000000000000000000004 +:109C600000000000000000000000000000000000F4 +:109C700000000000000000000000000000000000E4 +:109C800000000000000000000000000000000000D4 +:109C900000000000000000000000000000000000C4 +:109CA00000000000000000000000000000000000B4 +:109CB00000000000000000000000000000000000A4 +:109CC0000000000000000000000000000000000094 +:109CD0000000000000000000000000000000000084 +:109CE0000000000000000000000000000000000074 +:109CF0000000000000000000000000000000000064 +:109D00000000000000000000000000000000000053 +:109D10000000000000000000000000000000000043 +:109D20000000000000000000000000000000000033 +:109D30000000000000000000000000000000000023 +:109D40000000000000000000000000000000000013 +:109D50000000000000000000000000000000000003 +:109D600000000000000000000000000000000000F3 +:109D700000000000000000000000000000000000E3 +:109D800000000000000000000000000000000000D3 +:109D900000000000000000000000000000000000C3 +:109DA00000000000000000000000000000000000B3 +:109DB00000000000000000000000000000000000A3 +:109DC0000000000000000000000000000000000093 +:109DD0000000000000000000000000000000000083 +:109DE0000000000000000000000000000000000073 +:109DF0000000000000000000000000000000000063 +:109E00000000000000000000000000000000000052 +:109E10000000000000000000000000000000000042 +:109E20000000000000000000000000000000000032 +:109E30000000000000000000000000000000000022 +:109E40000000000000000000000000000000000012 +:109E50000000000000000000000000000000000002 +:109E600000000000000000000000000000000000F2 +:109E700000000000000000000000000000000000E2 +:109E800000000000000000000000000000000000D2 +:109E900000000000000000000000000000000000C2 +:109EA00000000000000000000000000000000000B2 +:109EB00000000000000000000000000000000000A2 +:109EC0000000000000000000000000000000000092 +:109ED0000000000000000000000000000000000082 +:109EE0000000000000000000000000000000000072 +:109EF0000000000000000000000000000000000062 +:109F00000000000000000000000000000000000051 +:109F10000000000000000000000000000000000041 +:109F20000000000000000000000000000000000031 +:109F30000000000000000000000000000000000021 +:109F40000000000000000000000000000000000011 +:109F50000000000000000000000000000000000001 +:109F600000000000000000000000000000000000F1 +:109F700000000000000000000000000000000000E1 +:109F800000000000000000000000000000000000D1 +:109F900000000000000000000000000000000000C1 +:109FA00000000000000000000000000000000000B1 +:109FB00000000000000000000000000000000000A1 +:109FC0000000000000000000000000000000000091 +:109FD0000000000000000000000000000000000081 +:109FE0000000000000000000000000000000000071 +:109FF0000000000000000000000000000000000061 +:10A000000000000000000000000000000000000050 +:10A010000000000000000000000000000000000040 +:10A020000000000000000000000000000000000030 +:10A030000000000000000000000000000000000020 +:10A040000000000000000000000000000000000010 +:10A050000000000000000000000000000000000000 +:10A0600000000000000000000000000000000000F0 +:10A0700000000000000000000000000000000000E0 +:10A0800000000000000000000000000000000000D0 +:10A0900000000000000000000000000000000000C0 +:10A0A00000000000000000000000000000000000B0 +:10A0B00000000000000000000000000000000000A0 +:10A0C0000000000000000000000000000000000090 +:10A0D0000000000000000000000000000000000080 +:10A0E0000000000000000000000000000000000070 +:10A0F0000000000000000000000000000000000060 +:10A10000000000000000000000000000000000004F +:10A11000000000000000000000000000000000003F +:10A12000000000000000000000000000000000002F +:10A13000000000000000000000000000000000001F +:10A14000000000000000000000000000000000000F +:10A1500000000000000000000000000000000000FF +:10A1600000000000000000000000000000000000EF +:10A1700000000000000000000000000000000000DF +:10A1800000000000000000000000000000000000CF +:10A1900000000000000000000000000000000000BF +:10A1A00000000000000000000000000000000000AF +:10A1B000000000000000000000000000000000009F +:10A1C000000000000000000000000000000000008F +:10A1D000000000000000000000000000000000007F +:10A1E000000000000000000000000000000000006F +:10A1F000000000000000000000000000000000005F +:10A20000000000000000000000000000000000004E +:10A21000000000000000000000000000000000003E +:10A22000000000000000000000000000000000002E +:10A23000000000000000000000000000000000001E +:10A24000000000000000000000000000000000000E +:10A2500000000000000000000000000000000000FE +:10A2600000000000000000000000000000000000EE +:10A2700000000000000000000000000000000000DE +:10A2800000000000000000000000000000000000CE +:10A2900000000000000000000000000000000000BE +:10A2A00000000000000000000000000000000000AE +:10A2B000000000000000000000000000000000009E +:10A2C000000000000000000000000000000000008E +:10A2D000000000000000000000000000000000007E +:10A2E000000000000000000000000000000000006E +:10A2F000000000000000000000000000000000005E +:10A30000000000000000000000000000000000004D +:10A31000000000000000000000000000000000003D +:10A32000000000000000000000000000000000002D +:10A33000000000000000000000000000000000001D +:10A34000000000000000000000000000000000000D +:10A3500000000000000000000000000000000000FD +:10A3600000000000000000000000000000000000ED +:10A3700000000000000000000000000000000000DD +:10A3800000000000000000000000000000000000CD +:10A3900000000000000000000000000000000000BD +:10A3A00000000000000000000000000000000000AD +:10A3B000000000000000000000000000000000009D +:10A3C000000000000000000000000000000000008D +:10A3D000000000000000000000000000000000007D +:10A3E000000000000000000000000000000000006D +:10A3F000000000000000000000000000000000005D +:10A40000000000000000000000000000000000004C +:10A41000000000000000000000000000000000003C +:10A42000000000000000000000000000000000002C +:10A43000000000000000000000000000000000001C +:10A44000000000000000000000000000000000000C +:10A4500000000000000000000000000000000000FC +:10A4600000000000000000000000000000000000EC +:10A4700000000000000000000000000000000000DC +:10A4800000000000000000000000000000000000CC +:10A4900000000000000000000000000000000000BC +:10A4A00000000000000000000000000000000000AC +:10A4B000000000000000000000000000000000009C +:10A4C000000000000000000000000000000000008C +:10A4D000000000000000000000000000000000007C +:10A4E000000000000000000000000000000000006C +:10A4F000000000000000000000000000000000005C +:10A50000000000000000000000000000000000004B +:10A51000000000000000000000000000000000003B +:10A52000000000000000000000000000000000002B +:10A53000000000000000000000000000000000001B +:10A54000000000000000000000000000000000000B +:10A5500000000000000000000000000000000000FB +:10A5600000000000000000000000000000000000EB +:10A5700000000000000000000000000000000000DB +:10A5800000000000000000000000000000000000CB +:10A5900000000000000000000000000000000000BB +:10A5A00000000000000000000000000000000000AB +:10A5B000000000000000000000000000000000009B +:10A5C000000000000000000000000000000000008B +:10A5D000000000000000000000000000000000007B +:10A5E000000000000000000000000000000000006B +:10A5F000000000000000000000000000000000005B +:10A60000000000000000000000000000000000004A +:10A61000000000000000000000000000000000003A +:10A62000000000000000000000000000000000002A +:10A63000000000000000000000000000000000001A +:10A64000000000000000000000000000000000000A +:10A6500000000000000000000000000000000000FA +:10A6600000000000000000000000000000000000EA +:10A6700000000000000000000000000000000000DA +:10A6800000000000000000000000000000000000CA +:10A6900000000000000000000000000000000000BA +:10A6A00000000000000000000000000000000000AA +:10A6B000000000000000000000000000000000009A +:10A6C000000000000000000000000000000000008A +:10A6D000000000000000000000000000000000007A +:10A6E000000000000000000000000000000000006A +:10A6F000000000000000000000000000000000005A +:10A700000000000000000000000000000000000049 +:10A710000000000000000000000000000000000039 +:10A720000000000000000000000000000000000029 +:10A730000000000000000000000000000000000019 +:10A740000000000000000000000000000000000009 +:10A7500000000000000000000000000000000000F9 +:10A7600000000000000000000000000000000000E9 +:10A7700000000000000000000000000000000000D9 +:10A7800000000000000000000000000000000000C9 +:10A7900000000000000000000000000000000000B9 +:10A7A00000000000000000000000000000000000A9 +:10A7B0000000000000000000000000000000000099 +:10A7C0000000000000000000000000000000000089 +:10A7D0000000000000000000000000000000000079 +:10A7E0000000000000000000000000000000000069 +:10A7F0000000000000000000000000000000000059 +:10A800000000000000000000000000000000000048 +:10A810000000000000000000000000000000000038 +:10A820000000000000000000000000000000000028 +:10A830000000000000000000000000000000000018 +:10A840000000000000000000000000000000000008 +:10A8500000000000000000000000000000000000F8 +:10A8600000000000000000000000000000000000E8 +:10A8700000000000000000000000000000000000D8 +:10A8800000000000000000000000000000000000C8 +:10A8900000000000000000000000000000000000B8 +:10A8A00000000000000000000000000000000000A8 +:10A8B0000000000000000000000000000000000098 +:10A8C0000000000000000000000000000000000088 +:10A8D0000000000000000000000000000000000078 +:10A8E0000000000000000000000000000000000068 +:10A8F0000000000000000000000000000000000058 +:10A900000000000000000000000000000000000047 +:10A910000000000000000000000000000000000037 +:10A920000000000000000000000000000000000027 +:10A930000000000000000000000000000000000017 +:10A940000000000000000000000000000000000007 +:10A9500000000000000000000000000000000000F7 +:10A9600000000000000000000000000000000000E7 +:10A9700000000000000000000000000000000000D7 +:10A9800000000000000000000000000000000000C7 +:10A9900000000000000000000000000000000000B7 +:10A9A00000000000000000000000000000000000A7 +:10A9B0000000000000000000000000000000000097 +:10A9C0000000000000000000000000000000000087 +:10A9D0000000000000000000000000000000000077 +:10A9E0000000000000000000000000000000000067 +:10A9F0000000000000000000000000000000000057 +:10AA00000000000000000000000000000000000046 +:10AA10000000000000000000000000000000000036 +:10AA20000000000000000000000000000000000026 +:10AA30000000000000000000000000000000000016 +:10AA40000000000000000000000000000000000006 +:10AA500000000000000000000000000000000000F6 +:10AA600000000000000000000000000000000000E6 +:10AA700000000000000000000000000000000000D6 +:10AA800000000000000000000000000000000000C6 +:10AA900000000000000000000000000000000000B6 +:10AAA00000000000000000000000000000000000A6 +:10AAB0000000000000000000000000000000000096 +:10AAC0000000000000000000000000000000000086 +:10AAD0000000000000000000000000000000000076 +:10AAE0000000000000000000000000000000000066 +:10AAF0000000000000000000000000000000000056 +:10AB00000000000000000000000000000000000045 +:10AB10000000000000000000000000000000000035 +:10AB20000000000000000000000000000000000025 +:10AB30000000000000000000000000000000000015 +:10AB40000000000000000000000000000000000005 +:10AB500000000000000000000000000000000000F5 +:10AB600000000000000000000000000000000000E5 +:10AB700000000000000000000000000000000000D5 +:10AB800000000000000000000000000000000000C5 +:10AB900000000000000000000000000000000000B5 +:10ABA00000000000000000000000000000000000A5 +:10ABB0000000000000000000000000000000000095 +:10ABC0000000000000000000000000000000000085 +:10ABD0000000000000000000000000000000000075 +:10ABE0000000000000000000000000000000000065 +:10ABF0000000000000000000000000000000000055 +:10AC00000000000000000000000000000000000044 +:10AC10000000000000000000000000000000000034 +:10AC20000000000000000000000000000000000024 +:10AC30000000000000000000000000000000000014 +:10AC40000000000000000000000000000000000004 +:10AC500000000000000000000000000000000000F4 +:10AC600000000000000000000000000000000000E4 +:10AC700000000000000000000000000000000000D4 +:10AC800000000000000000000000000000000000C4 +:10AC900000000000000000000000000000000000B4 +:10ACA00000000000000000000000000000000000A4 +:10ACB0000000000000000000000000000000000094 +:10ACC0000000000000000000000000000000000084 +:10ACD0000000000000000000000000000000000074 +:10ACE0000000000000000000000000000000000064 +:10ACF0000000000000000000000000000000000054 +:10AD00000000000000000000000000000000000043 +:10AD10000000000000000000000000000000000033 +:10AD20000000000000000000000000000000000023 +:10AD30000000000000000000000000000000000013 +:10AD40000000000000000000000000000000000003 +:10AD500000000000000000000000000000000000F3 +:10AD600000000000000000000000000000000000E3 +:10AD700000000000000000000000000000000000D3 +:10AD800000000000000000000000000000000000C3 +:10AD900000000000000000000000000000000000B3 +:10ADA00000000000000000000000000000000000A3 +:10ADB0000000000000000000000000000000000093 +:10ADC0000000000000000000000000000000000083 +:10ADD0000000000000000000000000000000000073 +:10ADE0000000000000000000000000000000000063 +:10ADF0000000000000000000000000000000000053 +:10AE00000000000000000000000000000000000042 +:10AE10000000000000000000000000000000000032 +:10AE20000000000000000000000000000000000022 +:10AE30000000000000000000000000000000000012 +:10AE40000000000000000000000000000000000002 +:10AE500000000000000000000000000000000000F2 +:10AE600000000000000000000000000000000000E2 +:10AE700000000000000000000000000000000000D2 +:10AE800000000000000000000000000000000000C2 +:10AE900000000000000000000000000000000000B2 +:10AEA00000000000000000000000000000000000A2 +:10AEB0000000000000000000000000000000000092 +:10AEC0000000000000000000000000000000000082 +:10AED0000000000000000000000000000000000072 +:10AEE0000000000000000000000000000000000062 +:10AEF0000000000000000000000000000000000052 +:10AF00000000000000000000000000000000000041 +:10AF10000000000000000000000000000000000031 +:10AF20000000000000000000000000000000000021 +:10AF30000000000000000000000000000000000011 +:10AF40000000000000000000000000000000000001 +:10AF500000000000000000000000000000000000F1 +:10AF600000000000000000000000000000000000E1 +:10AF700000000000000000000000000000000000D1 +:10AF800000000000000000000000000000000000C1 +:10AF900000000000000000000000000000000000B1 +:10AFA00000000000000000000000000000000000A1 +:10AFB0000000000000000000000000000000000091 +:10AFC0000000000000000000000000000000000081 +:10AFD0000000000000000000000000000000000071 +:10AFE0000000000000000000000000000000000061 +:10AFF0000000000000000000000000000000000051 +:10B000000000000000000000000000000000000040 +:10B010000000000000000000000000000000000030 +:10B020000000000000000000000000000000000020 +:10B030000000000000000000000000000000000010 +:10B040000000000000000000000000000000000000 +:10B0500000000000000000000000000000000000F0 +:10B0600000000000000000000000000000000000E0 +:10B0700000000000000000000000000000000000D0 +:10B0800000000000000000000000000000000000C0 +:10B0900000000000000000000000000000000000B0 +:10B0A00000000000000000000000000000000000A0 +:10B0B0000000000000000000000000000000000090 +:10B0C0000000000000000000000000000000000080 +:10B0D0000000000000000000000000000000000070 +:10B0E0000000000000000000000000000000000060 +:10B0F0000000000000000000000000000000000050 +:10B10000000000000000000000000000000000003F +:10B11000000000000000000000000000000000002F +:10B12000000000000000000000000000000000001F +:10B13000000000000000000000000000000000000F +:10B1400000000000000000000000000000000000FF +:10B1500000000000000000000000000000000000EF +:10B1600000000000000000000000000000000000DF +:10B1700000000000000000000000000000000000CF +:10B1800000000000000000000000000000000000BF +:10B1900000000000000000000000000000000000AF +:10B1A000000000000000000000000000000000009F +:10B1B000000000000000000000000000000000008F +:10B1C000000000000000000000000000000000007F +:10B1D000000000000000000000000000000000006F +:10B1E000000000000000000000000000000000005F +:10B1F000000000000000000000000000000000004F +:10B20000000000000000000000000000000000003E +:10B21000000000000000000000000000000000002E +:10B22000000000000000000000000000000000001E +:10B23000000000000000000000000000000000000E +:10B2400000000000000000000000000000000000FE +:10B2500000000000000000000000000000000000EE +:10B2600000000000000000000000000000000000DE +:10B2700000000000000000000000000000000000CE +:10B2800000000000000000000000000000000000BE +:10B2900000000000000000000000000000000000AE +:10B2A000000000000000000000000000000000009E +:10B2B000000000000000000000000000000000008E +:10B2C000000000000000000000000000000000007E +:10B2D000000000000000000000000000000000006E +:10B2E000000000000000000000000000000000005E +:10B2F000000000000000000000000000000000004E +:10B30000000000000000000000000000000000003D +:10B31000000000000000000000000000000000002D +:10B32000000000000000000000000000000000001D +:10B33000000000000000000000000000000000000D +:10B3400000000000000000000000000000000000FD +:10B3500000000000000000000000000000000000ED +:10B3600000000000000000000000000000000000DD +:10B3700000000000000000000000000000000000CD +:10B3800000000000000000000000000000000000BD +:10B3900000000000000000000000000000000000AD +:10B3A000000000000000000000000000000000009D +:10B3B000000000000000000000000000000000008D +:10B3C000000000000000000000000000000000007D +:10B3D000000000000000000000000000000000006D +:10B3E000000000000000000000000000000000005D +:10B3F000000000000000000000000000000000004D +:10B40000000000000000000000000000000000003C +:10B41000000000000000000000000000000000002C +:10B42000000000000000000000000000000000001C +:10B43000000000000000000000000000000000000C +:10B4400000000000000000000000000000000000FC +:10B4500000000000000000000000000000000000EC +:10B4600000000000000000000000000000000000DC +:10B4700000000000000000000000000000000000CC +:10B4800000000000000000000000000000000000BC +:10B4900000000000000000000000000000000000AC +:10B4A000000000000000000000000000000000009C +:10B4B000000000000000000000000000000000008C +:10B4C000000000000000000000000000000000007C +:10B4D000000000000000000000000000000000006C +:10B4E000000000000000000000000000000000005C +:10B4F000000000000000000000000000000000004C +:10B50000000000000000000000000000000000003B +:10B51000000000000000000000000000000000002B +:10B52000000000000000000000000000000000001B +:10B53000000000000000000000000000000000000B +:10B5400000000000000000000000000000000000FB +:10B5500000000000000000000000000000000000EB +:10B5600000000000000000000000000000000000DB +:10B5700000000000000000000000000000000000CB +:10B5800000000000000000000000000000000000BB +:10B5900000000000000000000000000000000000AB +:10B5A000000000000000000000000000000000009B +:10B5B000000000000000000000000000000000008B +:10B5C000000000000000000000000000000000007B +:10B5D000000000000000000000000000000000006B +:10B5E000000000000000000000000000000000005B +:10B5F000000000000000000000000000000000004B +:10B60000000000000000000000000000000000003A +:10B61000000000000000000000000000000000002A +:10B62000000000000000000000000000000000001A +:10B63000000000000000000000000000000000000A +:10B6400000000000000000000000000000000000FA +:10B6500000000000000000000000000000000000EA +:10B6600000000000000000000000000000000000DA +:10B6700000000000000000000000000000000000CA +:10B6800000000000000000000000000000000000BA +:10B6900000000000000000000000000000000000AA +:10B6A000000000000000000000000000000000009A +:10B6B000000000000000000000000000000000008A +:10B6C000000000000000000000000000000000007A +:10B6D000000000000000000000000000000000006A +:10B6E000000000000000000000000000000000005A +:10B6F000000000000000000000000000000000004A +:10B700000000000000000000000000000000000039 +:10B710000000000000000000000000000000000029 +:10B720000000000000000000000000000000000019 +:10B730000000000000000000000000000000000009 +:10B7400000000000000000000000000000000000F9 +:10B7500000000000000000000000000000000000E9 +:10B7600000000000000000000000000000000000D9 +:10B7700000000000000000000000000000000000C9 +:10B7800000000000000000000000000000000000B9 +:10B7900000000000000000000000000000000000A9 +:10B7A0000000000000000000000000000000000099 +:10B7B0000000000000000000000000000000000089 +:10B7C0000000000000000000000000000000000079 +:10B7D0000000000000000000000000000000000069 +:10B7E0000000000000000000000000000000000059 +:10B7F0000000000000000000000000000000000049 +:10B800000000000000000000000000000000000038 +:10B810000000000000000000000000000000000028 +:10B820000000000000000000000000000000000018 +:10B830000000000000000000000000000000000008 +:10B8400000000000000000000000000000000000F8 +:10B8500000000000000000000000000000000000E8 +:10B8600000000000000000000000000000000000D8 +:10B8700000000000000000000000000000000000C8 +:10B8800000000000000000000000000000000000B8 +:10B8900000000000000000000000000000000000A8 +:10B8A0000000000000000000000000000000000098 +:10B8B0000000000000000000000000000000000088 +:10B8C0000000000000000000000000000000000078 +:10B8D0000000000000000000000000000000000068 +:10B8E0000000000000000000000000000000000058 +:10B8F0000000000000000000000000000000000048 +:10B900000000000000000000000000000000000037 +:10B910000000000000000000000000000000000027 +:10B920000000000000000000000000000000000017 +:10B930000000000000000000000000000000000007 +:10B9400000000000000000000000000000000000F7 +:10B9500000000000000000000000000000000000E7 +:10B9600000000000000000000000000000000000D7 +:10B9700000000000000000000000000000000000C7 +:10B9800000000000000000000000000000000000B7 +:10B9900000000000000000000000000000000000A7 +:10B9A0000000000000000000000000000000000097 +:10B9B0000000000000000000000000000000000087 +:10B9C0000000000000000000000000000000000077 +:10B9D0000000000000000000000000000000000067 +:10B9E0000000000000000000000000000000000057 +:10B9F0000000000000000000000000000000000047 +:10BA00000000000000000000000000000000000036 +:10BA10000000000000000000000000000000000026 +:10BA20000000000000000000000000000000000016 +:10BA30000000000000000000000000000000000006 +:10BA400000000000000000000000000000000000F6 +:10BA500000000000000000000000000000000000E6 +:10BA600000000000000000000000000000000000D6 +:10BA700000000000000000000000000000000000C6 +:10BA800000000000000000000000000000000000B6 +:10BA900000000000000000000000000000000000A6 +:10BAA0000000000000000000000000000000000096 +:10BAB0000000000000000000000000000000000086 +:10BAC0000000000000000000000000000000000076 +:10BAD0000000000000000000000000000000000066 +:10BAE0000000000000000000000000000000000056 +:10BAF0000000000000000000000000000000000046 +:10BB00000000000000000000000000000000000035 +:10BB10000000000000000000000000000000000025 +:10BB20000000000000000000000000000000000015 +:10BB30000000000000000000000000000000000005 +:10BB400000000000000000000000000000000000F5 +:10BB500000000000000000000000000000000000E5 +:10BB600000000000000000000000000000000000D5 +:10BB700000000000000000000000000000000000C5 +:10BB800000000000000000000000000000000000B5 +:10BB900000000000000000000000000000000000A5 +:10BBA0000000000000000000000000000000000095 +:10BBB0000000000000000000000000000000000085 +:10BBC0000000000000000000000000000000000075 +:10BBD0000000000000000000000000000000000065 +:10BBE0000000000000000000000000000000000055 +:10BBF0000000000000000000000000000000000045 +:10BC00000000000000000000000000000000000034 +:10BC10000000000000000000000000000000000024 +:10BC20000000000000000000000000000000000014 +:10BC30000000000000000000000000000000000004 +:10BC400000000000000000000000000000000000F4 +:10BC500000000000000000000000000000000000E4 +:10BC600000000000000000000000000000000000D4 +:10BC700000000000000000000000000000000000C4 +:10BC800000000000000000000000000000000000B4 +:10BC900000000000000000000000000000000000A4 +:10BCA0000000000000000000000000000000000094 +:10BCB0000000000000000000000000000000000084 +:10BCC0000000000000000000000000000000000074 +:10BCD0000000000000000000000000000000000064 +:10BCE0000000000000000000000000000000000054 +:10BCF0000000000000000000000000000000000044 +:10BD00000000000000000000000000000000000033 +:10BD10000000000000000000000000000000000023 +:10BD20000000000000000000000000000000000013 +:10BD30000000000000000000000000000000000003 +:10BD400000000000000000000000000000000000F3 +:10BD500000000000000000000000000000000000E3 +:10BD600000000000000000000000000000000000D3 +:10BD700000000000000000000000000000000000C3 +:10BD800000000000000000000000000000000000B3 +:10BD900000000000000000000000000000000000A3 +:10BDA0000000000000000000000000000000000093 +:10BDB0000000000000000000000000000000000083 +:10BDC0000000000000000000000000000000000073 +:10BDD0000000000000000000000000000000000063 +:10BDE0000000000000000000000000000000000053 +:10BDF0000000000000000000000000000000000043 +:10BE00000000000000000000000000000000000032 +:10BE10000000000000000000000000000000000022 +:10BE20000000000000000000000000000000000012 +:10BE30000000000000000000000000000000000002 +:10BE400000000000000000000000000000000000F2 +:10BE500000000000000000000000000000000000E2 +:10BE600000000000000000000000000000000000D2 +:10BE700000000000000000000000000000000000C2 +:10BE800000000000000000000000000000000000B2 +:10BE900000000000000000000000000000000000A2 +:10BEA0000000000000000000000000000000000092 +:10BEB0000000000000000000000000000000000082 +:10BEC0000000000000000000000000000000000072 +:10BED0000000000000000000000000000000000062 +:10BEE0000000000000000000000000000000000052 +:10BEF0000000000000000000000000000000000042 +:10BF00000000000000000000000000000000000031 +:10BF10000000000000000000000000000000000021 +:10BF20000000000000000000000000000000000011 +:10BF30000000000000000000000000000000000001 +:10BF400000000000000000000000000000000000F1 +:10BF500000000000000000000000000000000000E1 +:10BF600000000000000000000000000000000000D1 +:10BF700000000000000000000000000000000000C1 +:10BF800000000000000000000000000000000000B1 +:10BF900000000000000000000000000000000000A1 +:10BFA0000000000000000000000000000000000091 +:10BFB0000000000000000000000000000000000081 +:10BFC0000000000000000000000000000000000071 +:10BFD0000000000000000000000000000000000061 +:10BFE0000000000000000000000000000000000051 +:10BFF0000000000000000000000000000000000041 +:10C000000000000000000000000000000000000030 +:10C010000000000000000000000000000000000020 +:10C020000000000000000000000000000000000010 +:10C030000000000000000000000000000000000000 +:10C0400000000000000000000000000000000000F0 +:10C0500000000000000000000000000000000000E0 +:10C0600000000000000000000000000000000000D0 +:10C0700000000000000000000000000000000000C0 +:10C0800000000000000000000000000000000000B0 +:10C0900000000000000000000000000000000000A0 +:10C0A0000000000000000000000000000000000090 +:10C0B0000000000000000000000000000000000080 +:10C0C0000000000000000000000000000000000070 +:10C0D0000000000000000000000000000000000060 +:10C0E0000000000000000000000000000000000050 +:10C0F0000000000000000000000000000000000040 +:10C10000000000000000000000000000000000002F +:10C11000000000000000000000000000000000001F +:10C12000000000000000000000000000000000000F +:10C1300000000000000000000000000000000000FF +:10C1400000000000000000000000000000000000EF +:10C1500000000000000000000000000000000000DF +:10C1600000000000000000000000000000000000CF +:10C1700000000000000000000000000000000000BF +:10C1800000000000000000000000000000000000AF +:10C19000000000000000000000000000000000009F +:10C1A000000000000000000000000000000000008F +:10C1B000000000000000000000000000000000007F +:10C1C000000000000000000000000000000000006F +:10C1D000000000000000000000000000000000005F +:10C1E000000000000000000000000000000000004F +:10C1F000000000000000000000000000000000003F +:10C20000000000000000000000000000000000002E +:10C21000000000000000000000000000000000001E +:10C22000000000000000000000000000000000000E +:10C2300000000000000000000000000000000000FE +:10C2400000000000000000000000000000000000EE +:10C2500000000000000000000000000000000000DE +:10C2600000000000000000000000000000000000CE +:10C2700000000000000000000000000000000000BE +:10C2800000000000000000000000000000000000AE +:10C29000000000000000000000000000000000009E +:10C2A000000000000000000000000000000000008E +:10C2B000000000000000000000000000000000007E +:10C2C000000000000000000000000000000000006E +:10C2D000000000000000000000000000000000005E +:10C2E000000000000000000000000000000000004E +:10C2F000000000000000000000000000000000003E +:10C30000000000000000000000000000000000002D +:10C31000000000000000000000000000000000001D +:10C32000000000000000000000000000000000000D +:10C3300000000000000000000000000000000000FD +:10C3400000000000000000000000000000000000ED +:10C3500000000000000000000000000000000000DD +:10C3600000000000000000000000000000000000CD +:10C3700000000000000000000000000000000000BD +:10C3800000000000000000000000000000000000AD +:10C39000000000000000000000000000000000009D +:10C3A000000000000000000000000000000000008D +:10C3B000000000000000000000000000000000007D +:10C3C000000000000000000000000000000000006D +:10C3D000000000000000000000000000000000005D +:10C3E000000000000000000000000000000000004D +:10C3F000000000000000000000000000000000003D +:10C40000000000000000000000000000000000002C +:10C41000000000000000000000000000000000001C +:10C42000000000000000000000000000000000000C +:10C4300000000000000000000000000000000000FC +:10C4400000000000000000000000000000000000EC +:10C4500000000000000000000000000000000000DC +:10C4600000000000000000000000000000000000CC +:10C4700000000000000000000000000000000000BC +:10C4800000000000000000000000000000000000AC +:10C49000000000000000000000000000000000009C +:10C4A000000000000000000000000000000000008C +:10C4B000000000000000000000000000000000007C +:10C4C000000000000000000000000000000000006C +:10C4D000000000000000000000000000000000005C +:10C4E000000000000000000000000000000000004C +:10C4F000000000000000000000000000000000003C +:10C50000000000000000000000000000000000002B +:10C51000000000000000000000000000000000001B +:10C52000000000000000000000000000000000000B +:10C5300000000000000000000000000000000000FB +:10C5400000000000000000000000000000000000EB +:10C5500000000000000000000000000000000000DB +:10C5600000000000000000000000000000000000CB +:10C5700000000000000000000000000000000000BB +:10C5800000000000000000000000000000000000AB +:10C59000000000000000000000000000000000009B +:10C5A000000000000000000000000000000000008B +:10C5B000000000000000000000000000000000007B +:10C5C000000000000000000000000000000000006B +:10C5D000000000000000000000000000000000005B +:10C5E000000000000000000000000000000000004B +:10C5F000000000000000000000000000000000003B +:10C60000000000000000000000000000000000002A +:10C61000000000000000000000000000000000001A +:10C62000000000000000000000000000000000000A +:10C6300000000000000000000000000000000000FA +:10C6400000000000000000000000000000000000EA +:10C6500000000000000000000000000000000000DA +:10C6600000000000000000000000000000000000CA +:10C6700000000000000000000000000000000000BA +:10C6800000000000000000000000000000000000AA +:10C69000000000000000000000000000000000009A +:10C6A000000000000000000000000000000000008A +:10C6B000000000000000000000000000000000007A +:10C6C000000000000000000000000000000000006A +:10C6D000000000000000000000000000000000005A +:10C6E000000000000000000000000000000000004A +:10C6F000000000000000000000000000000000003A +:10C700000000000000000000000000000000000029 +:10C710000000000000000000000000000000000019 +:10C720000000000000000000000000000000000009 +:10C7300000000000000000000000000000000000F9 +:10C7400000000000000000000000000000000000E9 +:10C7500000000000000000000000000000000000D9 +:10C7600000000000000000000000000000000000C9 +:10C7700000000000000000000000000000000000B9 +:10C7800000000000000000000000000000000000A9 +:10C790000000000000000000000000000000000099 +:10C7A0000000000000000000000000000000000089 +:10C7B0000000000000000000000000000000000079 +:10C7C0000000000000000000000000000000000069 +:10C7D0000000000000000000000000000000000059 +:10C7E0000000000000000000000000000000000049 +:10C7F0000000000000000000000000000000000039 +:10C800000000000000000000000000000000000028 +:10C810000000000000000000000000000000000018 +:10C820000000000000000000000000000000000008 +:10C8300000000000000000000000000000000000F8 +:10C8400000000000000000000000000000000000E8 +:10C8500000000000000000000000000000000000D8 +:10C8600000000000000000000000000000000000C8 +:10C8700000000000000000000000000000000000B8 +:10C8800000000000000000000000000000000000A8 +:10C890000000000000000000000000000000000098 +:10C8A0000000000000000000000000000000000088 +:10C8B0000000000000000000000000000000000078 +:10C8C0000000000000000000000000000000000068 +:10C8D0000000000000000000000000000000000058 +:10C8E0000000000000000000000000000000000048 +:10C8F0000000000000000000000000000000000038 +:10C900000000000000000000000000000000000027 +:10C910000000000000000000000000000000000017 +:10C920000000000000000000000000000000000007 +:10C9300000000000000000000000000000000000F7 +:10C9400000000000000000000000000000000000E7 +:10C9500000000000000000000000000000000000D7 +:10C9600000000000000000000000000000000000C7 +:10C9700000000000000000000000000000000000B7 +:10C9800000000000000000000000000000000000A7 +:10C990000000000000000000000000000000000097 +:10C9A0000000000000000000000000000000000087 +:10C9B0000000000000000000000000000000000077 +:10C9C0000000000000000000000000000000000067 +:10C9D0000000000000000000000000000000000057 +:10C9E0000000000000000000000000000000000047 +:10C9F0000000000000000000000000000000000037 +:10CA00000000000000000000000000000000000026 +:10CA10000000000000000000000000000000000016 +:10CA20000000000000000000000000000000000006 +:10CA300000000000000000000000000000000000F6 +:10CA400000000000000000000000000000000000E6 +:10CA500000000000000000000000000000000000D6 +:10CA600000000000000000000000000000000000C6 +:10CA700000000000000000000000000000000000B6 +:10CA800000000000000000000000000000000000A6 +:10CA90000000000000000000000000000000000096 +:10CAA0000000000000000000000000000000000086 +:10CAB0000000000000000000000000000000000076 +:10CAC0000000000000000000000000000000000066 +:10CAD0000000000000000000000000000000000056 +:10CAE0000000000000000000000000000000000046 +:10CAF0000000000000000000000000000000000036 +:10CB00000000000000000000000000000000000025 +:10CB10000000000000000000000000000000000015 +:10CB20000000000000000000000000000000000005 +:10CB300000000000000000000000000000000000F5 +:10CB400000000000000000000000000000000000E5 +:10CB500000000000000000000000000000000000D5 +:10CB600000000000000000000000000000000000C5 +:10CB700000000000000000000000000000000000B5 +:10CB800000000000000000000000000000000000A5 +:10CB90000000000000000000000000000000000095 +:10CBA0000000000000000000000000000000000085 +:10CBB0000000000000000000000000000000000075 +:10CBC0000000000000000000000000000000000065 +:10CBD0000000000000000000000000000000000055 +:10CBE0000000000000000000000000000000000045 +:10CBF0000000000000000000000000000000000035 +:10CC00000000000000000000000000000000000024 +:10CC10000000000000000000000000000000000014 +:10CC20000000000000000000000000000000000004 +:10CC300000000000000000000000000000000000F4 +:10CC400000000000000000000000000000000000E4 +:10CC500000000000000000000000000000000000D4 +:10CC600000000000000000000000000000000000C4 +:10CC700000000000000000000000000000000000B4 +:10CC800000000000000000000000000000000000A4 +:10CC90000000000000000000000000000000000094 +:10CCA0000000000000000000000000000000000084 +:10CCB0000000000000000000000000000000000074 +:10CCC0000000000000000000000000000000000064 +:10CCD0000000000000000000000000000000000054 +:10CCE0000000000000000000000000000000000044 +:10CCF0000000000000000000000000000000000034 +:10CD00000000000000000000000000000000000023 +:10CD10000000000000000000000000000000000013 +:10CD20000000000000000000000000000000000003 +:10CD300000000000000000000000000000000000F3 +:10CD400000000000000000000000000000000000E3 +:10CD500000000000000000000000000000000000D3 +:10CD600000000000000000000000000000000000C3 +:10CD700000000000000000000000000000000000B3 +:10CD800000000000000000000000000000000000A3 +:10CD90000000000000000000000000000000000093 +:10CDA0000000000000000000000000000000000083 +:10CDB0000000000000000000000000000000000073 +:10CDC0000000000000000000000000000000000063 +:10CDD0000000000000000000000000000000000053 +:10CDE0000000000000000000000000000000000043 +:10CDF0000000000000000000000000000000000033 +:10CE00000000000000000000000000000000000022 +:10CE10000000000000000000000000000000000012 +:10CE20000000000000000000000000000000000002 +:10CE300000000000000000000000000000000000F2 +:10CE400000000000000000000000000000000000E2 +:10CE500000000000000000000000000000000000D2 +:10CE600000000000000000000000000000000000C2 +:10CE700000000000000000000000000000000000B2 +:10CE800000000000000000000000000000000000A2 +:10CE90000000000000000000000000000000000092 +:10CEA0000000000000000000000000000000000082 +:10CEB0000000000000000000000000000000000072 +:10CEC0000000000000000000000000000000000062 +:10CED0000000000000000000000000000000000052 +:10CEE0000000000000000000000000000000000042 +:10CEF0000000000000000000000000000000000032 +:10CF00000000000000000000000000000000000021 +:10CF10000000000000000000000000000000000011 +:10CF20000000000000000000000000000000000001 +:10CF300000000000000000000000000000000000F1 +:10CF400000000000000000000000000000000000E1 +:10CF500000000000000000000000000000000000D1 +:10CF600000000000000000000000000000000000C1 +:10CF700000000000000000000000000000000000B1 +:10CF800000000000000000000000000000000000A1 +:10CF90000000000000000000000000000000000091 +:10CFA0000000000000000000000000000000000081 +:10CFB0000000000000000000000000000000000071 +:10CFC0000000000000000000000000000000000061 +:10CFD0000000000000000000000000000000000051 +:10CFE0000000000000000000000000000000000041 +:10CFF0000000000000000000000000000000000031 +:10D000000000000000000000000000000000000020 +:10D010000000000000000000000000000000000010 +:10D020000000000000000000000000000000000000 +:10D0300000000000000000000000000000000000F0 +:10D0400000000000000000000000000000000000E0 +:10D0500000000000000000000000000000000000D0 +:10D0600000000000000000000000000000000000C0 +:10D0700000000000000000000000000000000000B0 +:10D0800000000000000000000000000000000000A0 +:10D090000000000000000000000000000000000090 +:10D0A0000000000000000000000000000000000080 +:10D0B0000000000000000000000000000000000070 +:10D0C0000000000000000000000000000000000060 +:10D0D0000000000000000000000000000000000050 +:10D0E0000000000000000000000000000000000040 +:10D0F0000000000000000000000000000000000030 +:10D10000000000000000000000000000000000001F +:10D11000000000000000000000000000000000000F +:10D1200000000000000000000000000000000000FF +:10D1300000000000000000000000000000000000EF +:10D1400000000000000000000000000000000000DF +:10D1500000000000000000000000000000000000CF +:10D1600000000000000000000000000000000000BF +:10D1700000000000000000000000000000000000AF +:10D18000000000000000000000000000000000009F +:10D19000000000000000000000000000000000008F +:10D1A000000000000000000000000000000000007F +:10D1B000000000000000000000000000000000006F +:10D1C000000000000000000000000000000000005F +:10D1D000000000000000000000000000000000004F +:10D1E000000000000000000000000000000000003F +:10D1F000000000000000000000000000000000002F +:10D20000000000000000000000000000000000001E +:10D21000000000000000000000000000000000000E +:10D2200000000000000000000000000000000000FE +:10D2300000000000000000000000000000000000EE +:10D2400000000000000000000000000000000000DE +:10D2500000000000000000000000000000000000CE +:10D2600000000000000000000000000000000000BE +:10D2700000000000000000000000000000000000AE +:10D28000000000000000000000000000000000009E +:10D29000000000000000000000000000000000008E +:10D2A000000000000000000000000000000000007E +:10D2B000000000000000000000000000000000006E +:10D2C000000000000000000000000000000000005E +:10D2D000000000000000000000000000000000004E +:10D2E000000000000000000000000000000000003E +:10D2F000000000000000000000000000000000002E +:10D30000000000000000000000000000000000001D +:10D31000000000000000000000000000000000000D +:10D3200000000000000000000000000000000000FD +:10D3300000000000000000000000000000000000ED +:10D3400000000000000000000000000000000000DD +:10D3500000000000000000000000000000000000CD +:10D3600000000000000000000000000000000000BD +:10D3700000000000000000000000000000000000AD +:10D38000000000000000000000000000000000009D +:10D39000000000000000000000000000000000008D +:10D3A000000000000000000000000000000000007D +:10D3B000000000000000000000000000000000006D +:10D3C000000000000000000000000000000000005D +:10D3D000000000000000000000000000000000004D +:10D3E000000000000000000000000000000000003D +:10D3F000000000000000000000000000000000002D +:10D40000000000000000000000000000000000001C +:10D41000000000000000000000000000000000000C +:10D4200000000000000000000000000000000000FC +:10D4300000000000000000000000000000000000EC +:10D4400000000000000000000000000000000000DC +:10D4500000000000000000000000000000000000CC +:10D4600000000000000000000000000000000000BC +:10D4700000000000000000000000000000000000AC +:10D48000000000000000000000000000000000009C +:10D49000000000000000000000000000000000008C +:10D4A000000000000000000000000000000000007C +:10D4B000000000000000000000000000000000006C +:10D4C000000000000000000000000000000000005C +:10D4D000000000000000000000000000000000004C +:10D4E000000000000000000000000000000000003C +:10D4F000000000000000000000000000000000002C +:10D50000000000000000000000000000000000001B +:10D51000000000000000000000000000000000000B +:10D5200000000000000000000000000000000000FB +:10D5300000000000000000000000000000000000EB +:10D5400000000000000000000000000000000000DB +:10D5500000000000000000000000000000000000CB +:10D5600000000000000000000000000000000000BB +:10D5700000000000000000000000000000000000AB +:10D58000000000000000000000000000000000009B +:10D59000000000000000000000000000000000008B +:10D5A000000000000000000000000000000000007B +:10D5B000000000000000000000000000000000006B +:10D5C000000000000000000000000000000000005B +:10D5D000000000000000000000000000000000004B +:10D5E000000000000000000000000000000000003B +:10D5F000000000000000000000000000000000002B +:10D60000000000000000000000000000000000001A +:10D61000000000000000000000000000000000000A +:10D6200000000000000000000000000000000000FA +:10D6300000000000000000000000000000000000EA +:10D6400000000000000000000000000000000000DA +:10D6500000000000000000000000000000000000CA +:10D6600000000000000000000000000000000000BA +:10D6700000000000000000000000000000000000AA +:10D68000000000000000000000000000000000009A +:10D69000000000000000000000000000000000008A +:10D6A000000000000000000000000000000000007A +:10D6B000000000000000000000000000000000006A +:10D6C000000000000000000000000000000000005A +:10D6D000000000000000000000000000000000004A +:10D6E000000000000000000000000000000000003A +:10D6F000000000000000000000000000000000002A +:10D700000000000000000000000000000000000019 +:10D710000000000000000000000000000000000009 +:10D7200000000000000000000000000000000000F9 +:10D7300000000000000000000000000000000000E9 +:10D7400000000000000000000000000000000000D9 +:10D7500000000000000000000000000000000000C9 +:10D7600000000000000000000000000000000000B9 +:10D7700000000000000000000000000000000000A9 +:10D780000000000000000000000000000000000099 +:10D790000000000000000000000000000000000089 +:10D7A0000000000000000000000000000000000079 +:10D7B0000000000000000000000000000000000069 +:10D7C0000000000000000000000000000000000059 +:10D7D0000000000000000000000000000000000049 +:10D7E0000000000000000000000000000000000039 +:10D7F0000000000000000000000000000000000029 +:10D800000000000000000000000000000000000018 +:10D810000000000000000000000000000000000008 +:10D8200000000000000000000000000000000000F8 +:10D8300000000000000000000000000000000000E8 +:10D8400000000000000000000000000000000000D8 +:10D8500000000000000000000000000000000000C8 +:10D8600000000000000000000000000000000000B8 +:10D8700000000000000000000000000000000000A8 +:10D880000000000000000000000000000000000098 +:10D890000000000000000000000000000000000088 +:10D8A0000000000000000000000000000000000078 +:10D8B0000000000000000000000000000000000068 +:10D8C0000000000000000000000000000000000058 +:10D8D0000000000000000000000000000000000048 +:10D8E0000000000000000000000000000000000038 +:10D8F0000000000000000000000000000000000028 +:10D900000000000000000000000000000000000017 +:10D910000000000000000000000000000000000007 +:10D9200000000000000000000000000000000000F7 +:10D9300000000000000000000000000000000000E7 +:10D9400000000000000000000000000000000000D7 +:10D9500000000000000000000000000000000000C7 +:10D9600000000000000000000000000000000000B7 +:10D9700000000000000000000000000000000000A7 +:10D980000000000000000000000000000000000097 +:10D990000000000000000000000000000000000087 +:10D9A0000000000000000000000000000000000077 +:10D9B0000000000000000000000000000000000067 +:10D9C0000000000000000000000000000000000057 +:10D9D0000000000000000000000000000000000047 +:10D9E0000000000000000000000000000000000037 +:10D9F0000000000000000000000000000000000027 +:10DA00000000000000000000000000000000000016 +:10DA10000000000000000000000000000000000006 +:10DA200000000000000000000000000000000000F6 +:10DA300000000000000000000000000000000000E6 +:10DA400000000000000000000000000000000000D6 +:10DA500000000000000000000000000000000000C6 +:10DA600000000000000000000000000000000000B6 +:10DA700000000000000000000000000000000000A6 +:10DA80000000000000000000000000000000000096 +:10DA90000000000000000000000000000000000086 +:10DAA0000000000000000000000000000000000076 +:10DAB0000000000000000000000000000000000066 +:10DAC0000000000000000000000000000000000056 +:10DAD0000000000000000000000000000000000046 +:10DAE0000000000000000000000000000000000036 +:10DAF0000000000000000000000000000000000026 +:10DB00000000000000000000000000000000000015 +:10DB10000000000000000000000000000000000005 +:10DB200000000000000000000000000000000000F5 +:10DB300000000000000000000000000000000000E5 +:10DB400000000000000000000000000000000000D5 +:10DB500000000000000000000000000000000000C5 +:10DB600000000000000000000000000000000000B5 +:10DB700000000000000000000000000000000000A5 +:10DB80000000000000000000000000000000000095 +:10DB90000000000000000000000000000000000085 +:10DBA0000000000000000000000000000000000075 +:10DBB0000000000000000000000000000000000065 +:10DBC0000000000000000000000000000000000055 +:10DBD0000000000000000000000000000000000045 +:10DBE0000000000000000000000000000000000035 +:10DBF0000000000000000000000000000000000025 +:10DC00000000000000000000000000000000000014 +:10DC10000000000000000000000000000000000004 +:10DC200000000000000000000000000000000000F4 +:10DC300000000000000000000000000000000000E4 +:10DC400000000000000000000000000000000000D4 +:10DC500000000000000000000000000000000000C4 +:10DC600000000000000000000000000000000000B4 +:10DC700000000000000000000000000000000000A4 +:10DC80000000000000000000000000000000000094 +:10DC90000000000000000000000000000000000084 +:10DCA0000000000000000000000000000000000074 +:10DCB0000000000000000000000000000000000064 +:10DCC0000000000000000000000000000000000054 +:10DCD0000000000000000000000000000000000044 +:10DCE0000000000000000000000000000000000034 +:10DCF0000000000000000000000000000000000024 +:10DD00000000000000000000000000000000000013 +:10DD10000000000000000000000000000000000003 +:10DD200000000000000000000000000000000000F3 +:10DD300000000000000000000000000000000000E3 +:10DD400000000000000000000000000000000000D3 +:10DD500000000000000000000000000000000000C3 +:10DD600000000000000000000000000000000000B3 +:10DD700000000000000000000000000000000000A3 +:10DD80000000000000000000000000000000000093 +:10DD90000000000000000000000000000000000083 +:10DDA0000000000000000000000000000000000073 +:10DDB0000000000000000000000000000000000063 +:10DDC0000000000000000000000000000000000053 +:10DDD0000000000000000000000000000000000043 +:10DDE0000000000000000000000000000000000033 +:10DDF0000000000000000000000000000000000023 +:10DE00000000000000000000000000000000000012 +:10DE10000000000000000000000000000000000002 +:10DE200000000000000000000000000000000000F2 +:10DE300000000000000000000000000000000000E2 +:10DE400000000000000000000000000000000000D2 +:10DE500000000000000000000000000000000000C2 +:10DE600000000000000000000000000000000000B2 +:10DE700000000000000000000000000000000000A2 +:10DE80000000000000000000000000000000000092 +:10DE90000000000000000000000000000000000082 +:10DEA0000000000000000000000000000000000072 +:10DEB0000000000000000000000000000000000062 +:10DEC0000000000000000000000000000000000052 +:10DED0000000000000000000000000000000000042 +:10DEE0000000000000000000000000000000000032 +:10DEF0000000000000000000000000000000000022 +:10DF00000000000000000000000000000000000011 +:10DF10000000000000000000000000000000000001 +:10DF200000000000000000000000000000000000F1 +:10DF300000000000000000000000000000000000E1 +:10DF400000000000000000000000000000000000D1 +:10DF500000000000000000000000000000000000C1 +:10DF600000000000000000000000000000000000B1 +:10DF700000000000000000000000000000000000A1 +:10DF80000000000000000000000000000000000091 +:10DF90000000000000000000000000000000000081 +:10DFA0000000000000000000000000000000000071 +:10DFB0000000000000000000000000000000000061 +:10DFC0000000000000000000000000000000000051 +:10DFD0000000000000000000000000000000000041 +:10DFE0000000000000000000000000000000000031 +:10DFF0000000000000000000000000000000000021 +:10E000000000000000000000000000000000000010 +:10E010000000000000000000000000000000000000 +:10E0200000000000000000000000000000000000F0 +:10E0300000000000000000000000000000000000E0 +:10E0400000000000000000000000000000000000D0 +:10E0500000000000000000000000000000000000C0 +:10E0600000000000000000000000000000000000B0 +:10E0700000000000000000000000000000000000A0 +:10E080000000000000000000000000000000000090 +:10E090000000000000000000000000000000000080 +:10E0A0000000000000000000000000000000000070 +:10E0B0000000000000000000000000000000000060 +:10E0C0000000000000000000000000000000000050 +:10E0D0000000000000000000000000000000000040 +:10E0E0000000000000000000000000000000000030 +:10E0F0000000000000000000000000000000000020 +:10E10000000000000000000000000000000000000F +:10E1100000000000000000000000000000000000FF +:10E1200000000000000000000000000000000000EF +:10E1300000000000000000000000000000000000DF +:10E1400000000000000000000000000000000000CF +:10E1500000000000000000000000000000000000BF +:10E1600000000000000000000000000000000000AF +:10E17000000000000000000000000000000000009F +:10E18000000000000000000000000000000000008F +:10E19000000000000000000000000000000000007F +:10E1A000000000000000000000000000000000006F +:10E1B000000000000000000000000000000000005F +:10E1C000000000000000000000000000000000004F +:10E1D000000000000000000000000000000000003F +:10E1E000000000000000000000000000000000002F +:10E1F000000000000000000000000000000000001F +:10E20000000000000000000000000000000000000E +:10E2100000000000000000000000000000000000FE +:10E2200000000000000000000000000000000000EE +:10E2300000000000000000000000000000000000DE +:10E2400000000000000000000000000000000000CE +:10E2500000000000000000000000000000000000BE +:10E2600000000000000000000000000000000000AE +:10E27000000000000000000000000000000000009E +:10E28000000000000000000000000000000000008E +:10E29000000000000000000000000000000000007E +:10E2A000000000000000000000000000000000006E +:10E2B000000000000000000000000000000000005E +:10E2C000000000000000000000000000000000004E +:10E2D000000000000000000000000000000000003E +:10E2E000000000000000000000000000000000002E +:10E2F000000000000000000000000000000000001E +:10E30000000000000000000000000000000000000D +:10E3100000000000000000000000000000000000FD +:10E3200000000000000000000000000000000000ED +:10E3300000000000000000000000000000000000DD +:10E3400000000000000000000000000000000000CD +:10E3500000000000000000000000000000000000BD +:10E3600000000000000000000000000000000000AD +:10E37000000000000000000000000000000000009D +:10E38000000000000000000000000000000000008D +:10E39000000000000000000000000000000000007D +:10E3A000000000000000000000000000000000006D +:10E3B000000000000000000000000000000000005D +:10E3C000000000000000000000000000000000004D +:10E3D000000000000000000000000000000000003D +:10E3E000000000000000000000000000000000002D +:10E3F000000000000000000000000000000000001D +:10E40000000000000000000000000000000000000C +:10E4100000000000000000000000000000000000FC +:10E4200000000000000000000000000000000000EC +:10E4300000000000000000000000000000000000DC +:10E4400000000000000000000000000000000000CC +:10E4500000000000000000000000000000000000BC +:10E4600000000000000000000000000000000000AC +:10E47000000000000000000000000000000000009C +:10E48000000000000000000000000000000000008C +:10E49000000000000000000000000000000000007C +:10E4A000000000000000000000000000000000006C +:10E4B000000000000000000000000000000000005C +:10E4C000000000000000000000000000000000004C +:10E4D000000000000000000000000000000000003C +:10E4E000000000000000000000000000000000002C +:10E4F000000000000000000000000000000000001C +:10E50000000000000000000000000000000000000B +:10E5100000000000000000000000000000000000FB +:10E5200000000000000000000000000000000000EB +:10E5300000000000000000000000000000000000DB +:10E5400000000000000000000000000000000000CB +:10E5500000000000000000000000000000000000BB +:10E5600000000000000000000000000000000000AB +:10E57000000000000000000000000000000000009B +:10E58000000000000000000000000000000000008B +:10E59000000000000000000000000000000000007B +:10E5A000000000000000000000000000000000006B +:10E5B000000000000000000000000000000000005B +:10E5C000000000000000000000000000000000004B +:10E5D000000000000000000000000000000000003B +:10E5E000000000000000000000000000000000002B +:10E5F000000000000000000000000000000000001B +:10E60000000000000000000000000000000000000A +:10E6100000000000000000000000000000000000FA +:10E6200000000000000000000000000000000000EA +:10E6300000000000000000000000000000000000DA +:10E6400000000000000000000000000000000000CA +:10E6500000000000000000000000000000000000BA +:10E6600000000000000000000000000000000000AA +:10E67000000000000000000000000000000000009A +:10E68000000000000000000000000000000000008A +:10E69000000000000000000000000000000000007A +:10E6A000000000000000000000000000000000006A +:10E6B000000000000000000000000000000000005A +:10E6C000000000000000000000000000000000004A +:10E6D000000000000000000000000000000000003A +:10E6E000000000000000000000000000000000002A +:10E6F000000000000000000000000000000000001A +:10E700000000000000000000000000000000000009 +:10E7100000000000000000000000000000000000F9 +:10E7200000000000000000000000000000000000E9 +:10E7300000000000000000000000000000000000D9 +:10E7400000000000000000000000000000000000C9 +:10E7500000000000000000000000000000000000B9 +:10E7600000000000000000000000000000000000A9 +:10E770000000000000000000000000000000000099 +:10E780000000000000000000000000000000000089 +:10E790000000000000000000000000000000000079 +:10E7A0000000000000000000000000000000000069 +:10E7B0000000000000000000000000000000000059 +:10E7C0000000000000000000000000000000000049 +:10E7D0000000000000000000000000000000000039 +:10E7E0000000000000000000000000000000000029 +:10E7F0000000000000000000000000000000000019 +:10E800000000000000000000000000000000000008 +:10E8100000000000000000000000000000000000F8 +:10E8200000000000000000000000000000000000E8 +:10E8300000000000000000000000000000000000D8 +:10E8400000000000000000000000000000000000C8 +:10E8500000000000000000000000000000000000B8 +:10E8600000000000000000000000000000000000A8 +:10E870000000000000000000000000000000000098 +:10E880000000000000000000000000000000000088 +:10E890000000000000000000000000000000000078 +:10E8A0000000000000000000000000000000000068 +:10E8B0000000000000000000000000000000000058 +:10E8C0000000000000000000000000000000000048 +:10E8D0000000000000000000000000000000000038 +:10E8E0000000000000000000000000000000000028 +:10E8F0000000000000000000000000000000000018 +:10E900000000000000000000000000000000000007 +:10E9100000000000000000000000000000000000F7 +:10E9200000000000000000000000000000000000E7 +:10E9300000000000000000000000000000000000D7 +:10E9400000000000000000000000000000000000C7 +:10E9500000000000000000000000000000000000B7 +:10E9600000000000000000000000000000000000A7 +:10E970000000000000000000000000000000000097 +:10E980000000000000000000000000000000000087 +:10E990000000000000000000000000000000000077 +:10E9A0000000000000000000000000000000000067 +:10E9B0000000000000000000000000000000000057 +:10E9C0000000000000000000000000000000000047 +:10E9D0000000000000000000000000000000000037 +:10E9E0000000000000000000000000000000000027 +:10E9F0000000000000000000000000000000000017 +:10EA00000000000000000000000000000000000006 +:10EA100000000000000000000000000000000000F6 +:10EA200000000000000000000000000000000000E6 +:10EA300000000000000000000000000000000000D6 +:10EA400000000000000000000000000000000000C6 +:10EA500000000000000000000000000000000000B6 +:10EA600000000000000000000000000000000000A6 +:10EA70000000000000000000000000000000000096 +:10EA80000000000000000000000000000000000086 +:10EA90000000000000000000000000000000000076 +:10EAA0000000000000000000000000000000000066 +:10EAB0000000000000000000000000000000000056 +:10EAC0000000000000000000000000000000000046 +:10EAD0000000000000000000000000000000000036 +:10EAE0000000000000000000000000000000000026 +:10EAF0000000000000000000000000000000000016 +:10EB00000000000000000000000000000000000005 +:10EB100000000000000000000000000000000000F5 +:10EB200000000000000000000000000000000000E5 +:10EB300000000000000000000000000000000000D5 +:10EB400000000000000000000000000000000000C5 +:10EB500000000000000000000000000000000000B5 +:10EB600000000000000000000000000000000000A5 +:10EB70000000000000000000000000000000000095 +:10EB80000000000000000000000000000000000085 +:10EB90000000000000000000000000000000000075 +:10EBA0000000000000000000000000000000000065 +:10EBB0000000000000000000000000000000000055 +:10EBC0000000000000000000000000000000000045 +:10EBD0000000000000000000000000000000000035 +:10EBE0000000000000000000000000000000000025 +:10EBF0000000000000000000000000000000000015 +:10EC00000000000000000000000000000000000004 +:10EC100000000000000000000000000000000000F4 +:10EC200000000000000000000000000000000000E4 +:10EC300000000000000000000000000000000000D4 +:10EC400000000000000000000000000000000000C4 +:10EC500000000000000000000000000000000000B4 +:10EC600000000000000000000000000000000000A4 +:10EC70000000000000000000000000000000000094 +:10EC80000000000000000000000000000000000084 +:10EC90000000000000000000000000000000000074 +:10ECA0000000000000000000000000000000000064 +:10ECB0000000000000000000000000000000000054 +:10ECC0000000000000000000000000000000000044 +:10ECD0000000000000000000000000000000000034 +:10ECE0000000000000000000000000000000000024 +:10ECF0000000000000000000000000000000000014 +:10ED00000000000000000000000000000000000003 +:10ED100000000000000000000000000000000000F3 +:10ED200000000000000000000000000000000000E3 +:10ED300000000000000000000000000000000000D3 +:10ED400000000000000000000000000000000000C3 +:10ED500000000000000000000000000000000000B3 +:10ED600000000000000000000000000000000000A3 +:10ED70000000000000000000000000000000000093 +:10ED80000000000000000000000000000000000083 +:10ED90000000000000000000000000000000000073 +:10EDA0000000000000000000000000000000000063 +:10EDB0000000000000000000000000000000000053 +:10EDC0000000000000000000000000000000000043 +:10EDD0000000000000000000000000000000000033 +:10EDE0000000000000000000000000000000000023 +:10EDF0000000000000000000000000000000000013 +:10EE00000000000000000000000000000000000002 +:10EE100000000000000000000000000000000000F2 +:10EE200000000000000000000000000000000000E2 +:10EE300000000000000000000000000000000000D2 +:10EE400000000000000000000000000000000000C2 +:10EE500000000000000000000000000000000000B2 +:10EE600000000000000000000000000000000000A2 +:10EE70000000000000000000000000000000000092 +:10EE80000000000000000000000000000000000082 +:10EE90000000000000000000000000000000000072 +:10EEA0000000000000000000000000000000000062 +:10EEB0000000000000000000000000000000000052 +:10EEC0000000000000000000000000000000000042 +:10EED0000000000000000000000000000000000032 +:10EEE0000000000000000000000000000000000022 +:10EEF0000000000000000000000000000000000012 +:10EF00000000000000000000000000000000000001 +:10EF100000000000000000000000000000000000F1 +:10EF200000000000000000000000000000000000E1 +:10EF300000000000000000000000000000000000D1 +:10EF400000000000000000000000000000000000C1 +:10EF500000000000000000000000000000000000B1 +:10EF600000000000000000000000000000000000A1 +:10EF70000000000000000000000000000000000091 +:10EF80000000000000000000000000000000000081 +:10EF90000000000000000000000000000000000071 +:10EFA0000000000000000000000000000000000061 +:10EFB0000000000000000000000000000000000051 +:10EFC0000000000000000000000000000000000041 +:10EFD0000000000000000000000000000000000031 +:10EFE0000000000000000000000000000000000021 +:10EFF0000000000000000000000000000000000011 +:10F000000000000000000000000000000000000000 +:10F0100000000000000000000000000000000000F0 +:10F0200000000000000000000000000000000000E0 +:10F0300000000000000000000000000000000000D0 +:10F0400000000000000000000000000000000000C0 +:10F0500000000000000000000000000000000000B0 +:10F0600000000000000000000000000000000000A0 +:10F070000000000000000000000000000000000090 +:10F080000000000000000000000000000000000080 +:10F090000000000000000000000000000000000070 +:10F0A0000000000000000000000000000000000060 +:10F0B0000000000000000000000000000000000050 +:10F0C0000000000000000000000000000000000040 +:10F0D0000000000000000000000000000000000030 +:10F0E0000000000000000000000000000000000020 +:10F0F0000000000000000000000000000000000010 +:10F1000000000000000000000000000000000000FF +:10F1100000000000000000000000000000000000EF +:10F1200000000000000000000000000000000000DF +:10F1300000000000000000000000000000000000CF +:10F1400000000000000000000000000000000000BF +:10F1500000000000000000000000000000000000AF +:10F16000000000000000000000000000000000009F +:10F17000000000000000000000000000000000008F +:10F18000000000000000000000000000000000007F +:10F19000000000000000000000000000000000006F +:10F1A000000000000000000000000000000000005F +:10F1B000000000000000000000000000000000004F +:10F1C000000000000000000000000000000000003F +:10F1D000000000000000000000000000000000002F +:10F1E000000000000000000000000000000000001F +:10F1F000000000000000000000000000000000000F +:10F2000000000000000000000000000000000000FE +:10F2100000000000000000000000000000000000EE +:10F2200000000000000000000000000000000000DE +:10F2300000000000000000000000000000000000CE +:10F2400000000000000000000000000000000000BE +:10F2500000000000000000000000000000000000AE +:10F26000000000000000000000000000000000009E +:10F27000000000000000000000000000000000008E +:10F28000000000000000000000000000000000007E +:10F29000000000000000000000000000000000006E +:10F2A000000000000000000000000000000000005E +:10F2B000000000000000000000000000000000004E +:10F2C000000000000000000000000000000000003E +:10F2D000000000000000000000000000000000002E +:10F2E000000000000000000000000000000000001E +:10F2F000000000000000000000000000000000000E +:10F3000000000000000000000000000000000000FD +:10F3100000000000000000000000000000000000ED +:10F3200000000000000000000000000000000000DD +:10F3300000000000000000000000000000000000CD +:10F3400000000000000000000000000000000000BD +:10F3500000000000000000000000000000000000AD +:10F36000000000000000000000000000000000009D +:10F37000000000000000000000000000000000008D +:10F38000000000000000000000000000000000007D +:10F39000000000000000000000000000000000006D +:10F3A000000000000000000000000000000000005D +:10F3B000000000000000000000000000000000004D +:10F3C000000000000000000000000000000000003D +:10F3D000000000000000000000000000000000002D +:10F3E000000000000000000000000000000000001D +:10F3F000000000000000000000000000000000000D +:10F4000000000000000000000000000000000000FC +:10F4100000000000000000000000000000000000EC +:10F4200000000000000000000000000000000000DC +:10F4300000000000000000000000000000000000CC +:10F4400000000000000000000000000000000000BC +:10F4500000000000000000000000000000000000AC +:10F46000000000000000000000000000000000009C +:10F47000000000000000000000000000000000008C +:10F48000000000000000000000000000000000007C +:10F49000000000000000000000000000000000006C +:10F4A000000000000000000000000000000000005C +:10F4B000000000000000000000000000000000004C +:10F4C000000000000000000000000000000000003C +:10F4D000000000000000000000000000000000002C +:10F4E000000000000000000000000000000000001C +:10F4F000000000000000000000000000000000000C +:10F5000000000000000000000000000000000000FB +:10F5100000000000000000000000000000000000EB +:10F5200000000000000000000000000000000000DB +:10F5300000000000000000000000000000000000CB +:10F5400000000000000000000000000000000000BB +:10F5500000000000000000000000000000000000AB +:10F56000000000000000000000000000000000009B +:10F57000000000000000000000000000000000008B +:10F58000000000000000000000000000000000007B +:10F59000000000000000000000000000000000006B +:10F5A000000000000000000000000000000000005B +:10F5B000000000000000000000000000000000004B +:10F5C000000000000000000000000000000000003B +:10F5D000000000000000000000000000000000002B +:10F5E000000000000000000000000000000000001B +:10F5F000000000000000000000000000000000000B +:10F6000000000000000000000000000000000000FA +:10F6100000000000000000000000000000000000EA +:10F6200000000000000000000000000000000000DA +:10F6300000000000000000000000000000000000CA +:10F6400000000000000000000000000000000000BA +:10F6500000000000000000000000000000000000AA +:10F66000000000000000000000000000000000009A +:10F67000000000000000000000000000000000008A +:10F68000000000000000000000000000000000007A +:10F69000000000000000000000000000000000006A +:10F6A000000000000000000000000000000000005A +:10F6B000000000000000000000000000000000004A +:10F6C000000000000000000000000000000000003A +:10F6D000000000000000000000000000000000002A +:10F6E000000000000000000000000000000000001A +:10F6F000000000000000000000000000000000000A +:10F7000000000000000000000000000000000000F9 +:10F7100000000000000000000000000000000000E9 +:10F7200000000000000000000000000000000000D9 +:10F7300000000000000000000000000000000000C9 +:10F7400000000000000000000000000000000000B9 +:10F7500000000000000000000000000000000000A9 +:10F760000000000000000000000000000000000099 +:10F770000000000000000000000000000000000089 +:10F780000000000000000000000000000000000079 +:10F790000000000000000000000000000000000069 +:10F7A0000000000000000000000000000000000059 +:10F7B0000000000000000000000000000000000049 +:10F7C0000000000000000000000000000000000039 +:10F7D0000000000000000000000000000000000029 +:10F7E0000000000000000000000000000000000019 +:10F7F0000000000000000000000000000000000009 +:10F8000000000000000000000000000000000000F8 +:10F8100000000000000000000000000000000000E8 +:10F8200000000000000000000000000000000000D8 +:10F8300000000000000000000000000000000000C8 +:10F8400000000000000000000000000000000000B8 +:10F8500000000000000000000000000000000000A8 +:10F860000000000000000000000000000000000098 +:10F870000000000000000000000000000000000088 +:10F880000000000000000000000000000000000078 +:10F890000000000000000000000000000000000068 +:10F8A0000000000000000000000000000000000058 +:10F8B0000000000000000000000000000000000048 +:10F8C0000000000000000000000000000000000038 +:10F8D0000000000000000000000000000000000028 +:10F8E0000000000000000000000000000000000018 +:10F8F0000000000000000000000000000000000008 +:10F9000000000000000000000000000000000000F7 +:10F9100000000000000000000000000000000000E7 +:10F9200000000000000000000000000000000000D7 +:10F9300000000000000000000000000000000000C7 +:10F9400000000000000000000000000000000000B7 +:10F9500000000000000000000000000000000000A7 +:10F960000000000000000000000000000000000097 +:10F970000000000000000000000000000000000087 +:10F980000000000000000000000000000000000077 +:10F990000000000000000000000000000000000067 +:10F9A0000000000000000000000000000000000057 +:10F9B0000000000000000000000000000000000047 +:10F9C0000000000000000000000000000000000037 +:10F9D0000000000000000000000000000000000027 +:10F9E0000000000000000000000000000000000017 +:10F9F0000000000000000000000000000000000007 +:10FA000000000000000000000000000000000000F6 +:10FA100000000000000000000000000000000000E6 +:10FA200000000000000000000000000000000000D6 +:10FA300000000000000000000000000000000000C6 +:10FA400000000000000000000000000000000000B6 +:10FA500000000000000000000000000000000000A6 +:10FA60000000000000000000000000000000000096 +:10FA70000000000000000000000000000000000086 +:10FA80000000000000000000000000000000000076 +:10FA90000000000000000000000000000000000066 +:10FAA0000000000000000000000000000000000056 +:10FAB0000000000000000000000000000000000046 +:10FAC0000000000000000000000000000000000036 +:10FAD0000000000000000000000000000000000026 +:10FAE0000000000000000000000000000000000016 +:10FAF0000000000000000000000000000000000006 +:10FB000000000000000000000000000000000000F5 +:10FB100000000000000000000000000000000000E5 +:10FB200000000000000000000000000000000000D5 +:10FB300000000000000000000000000000000000C5 +:10FB400000000000000000000000000000000000B5 +:10FB500000000000000000000000000000000000A5 +:10FB60000000000000000000000000000000000095 +:10FB70000000000000000000000000000000000085 +:10FB80000000000000000000000000000000000075 +:10FB90000000000000000000000000000000000065 +:10FBA0000000000000000000000000000000000055 +:10FBB0000000000000000000000000000000000045 +:10FBC0000000000000000000000000000000000035 +:10FBD0000000000000000000000000000000000025 +:10FBE0000000000000000000000000000000000015 +:10FBF0000000000000000000000000000000000005 +:10FC000000000000000000000000000000000000F4 +:10FC100000000000000000000000000000000000E4 +:10FC200000000000000000000000000000000000D4 +:10FC300000000000000000000000000000000000C4 +:10FC400000000000000000000000000000000000B4 +:10FC500000000000000000000000000000000000A4 +:10FC60000000000000000000000000000000000094 +:10FC70000000000000000000000000000000000084 +:10FC80000000000000000000000000000000000074 +:10FC90000000000000000000000000000000000064 +:10FCA0000000000000000000000000000000000054 +:10FCB0000000000000000000000000000000000044 +:10FCC0000000000000000000000000000000000034 +:10FCD0000000000000000000000000000000000024 +:10FCE0000000000000000000000000000000000014 +:10FCF0000000000000000000000000000000000004 +:10FD000000000000000000000000000000000000F3 +:10FD100000000000000000000000000000000000E3 +:10FD200000000000000000000000000000000000D3 +:10FD300000000000000000000000000000000000C3 +:10FD400000000000000000000000000000000000B3 +:10FD500000000000000000000000000000000000A3 +:10FD60000000000000000000000000000000000093 +:10FD70000000000000000000000000000000000083 +:10FD80000000000000000000000000000000000073 +:10FD90000000000000000000000000000000000063 +:10FDA0000000000000000000000000000000000053 +:10FDB0000000000000000000000000000000000043 +:10FDC0000000000000000000000000000000000033 +:10FDD0000000000000000000000000000000000023 +:10FDE0000000000000000000000000000000000013 +:10FDF0000000000000000000000000000000000003 +:10FE000000000000000000000000000000000000F2 +:10FE100000000000000000000000000000000000E2 +:10FE200000000000000000000000000000000000D2 +:10FE300000000000000000000000000000000000C2 +:10FE400000000000000000000000000000000000B2 +:10FE500000000000000000000000000000000000A2 +:10FE60000000000000000000000000000000000092 +:10FE70000000000000000000000000000000000082 +:10FE80000000000000000000000000000000000072 +:10FE90000000000000000000000000000000000062 +:10FEA0000000000000000000000000000000000052 +:10FEB0000000000000000000000000000000000042 +:10FEC0000000000000000000000000000000000032 +:10FED0000000000000000000000000000000000022 +:10FEE0000000000000000000000000000000000012 +:10FEF0000000000000000000000000000000000002 +:10FF000000000000000000000000000000000000F1 +:10FF100000000000000000000000000000000000E1 +:10FF200000000000000000000000000000000000D1 +:10FF300000000000000000000000000000000000C1 +:10FF400000000000000000000000000000000000B1 +:10FF500000000000000000000000000000000000A1 +:10FF60000000000000000000000000000000000091 +:10FF70000000000000000000000000000000000081 +:10FF80000000000000000000000000000000000071 +:10FF90000000000000000000000000000000000061 +:10FFA0000000000000000000000000000000000051 +:10FFB0000000000000000000000000000000000041 +:10FFC0000000000000000000000000000000000031 +:10FFD0000000000000000000000000000000000021 +:10FFE0000000000000000000000000000000000011 +:10FFF0000000000000000000000000000000000001 +:020000040003F7 +:1000000000000000000000000000000000000000F0 +:1000100000000000000000000000000000000000E0 +:1000200000000000000000000000000000000000D0 +:1000300000000000000000000000000000000000C0 +:1000400000000000000000000000000000000000B0 +:1000500000000000000000000000000000000000A0 +:100060000000000000000000000000000000000090 +:100070000000000000000000000000000000000080 +:100080000000000000000000000000000000000070 +:100090000000000000000000000000000000000060 +:1000A0000000000000000000000000000000000050 +:1000B0000000000000000000000000000000000040 +:1000C0000000000000000000000000000000000030 +:1000D0000000000000000000000000000000000020 +:1000E0000000000000000000000000000000000010 +:1000F0000000000000000000000000000000000000 +:1001000000000000000000000000000000000000EF +:1001100000000000000000000000000000000000DF +:1001200000000000000000000000000000000000CF +:1001300000000000000000000000000000000000BF +:1001400000000000000000000000000000000000AF +:10015000000000000000000000000000000000009F +:10016000000000000000000000000000000000008F +:10017000000000000000000000000000000000007F +:10018000000000000000000000000000000000006F +:10019000000000000000000000000000000000005F +:1001A000000000000000000000000000000000004F +:1001B000000000000000000000000000000000003F +:1001C000000000000000000000000000000000002F +:1001D000000000000000000000000000000000001F +:1001E000000000000000000000000000000000000F +:1001F00000000000000000000000000000000000FF +:1002000000000000000000000000000000000000EE +:1002100000000000000000000000000000000000DE +:1002200000000000000000000000000000000000CE +:1002300000000000000000000000000000000000BE +:1002400000000000000000000000000000000000AE +:10025000000000000000000000000000000000009E +:10026000000000000000000000000000000000008E +:10027000000000000000000000000000000000007E +:10028000000000000000000000000000000000006E +:10029000000000000000000000000000000000005E +:1002A000000000000000000000000000000000004E +:1002B000000000000000000000000000000000003E +:1002C000000000000000000000000000000000002E +:1002D000000000000000000000000000000000001E +:1002E000000000000000000000000000000000000E +:1002F00000000000000000000000000000000000FE +:1003000000000000000000000000000000000000ED +:1003100000000000000000000000000000000000DD +:1003200000000000000000000000000000000000CD +:1003300000000000000000000000000000000000BD +:1003400000000000000000000000000000000000AD +:10035000000000000000000000000000000000009D +:10036000000000000000000000000000000000008D +:10037000000000000000000000000000000000007D +:10038000000000000000000000000000000000006D +:10039000000000000000000000000000000000005D +:1003A000000000000000000000000000000000004D +:1003B000000000000000000000000000000000003D +:1003C000000000000000000000000000000000002D +:1003D000000000000000000000000000000000001D +:1003E000000000000000000000000000000000000D +:1003F00000000000000000000000000000000000FD +:1004000000000000000000000000000000000000EC +:1004100000000000000000000000000000000000DC +:1004200000000000000000000000000000000000CC +:1004300000000000000000000000000000000000BC +:1004400000000000000000000000000000000000AC +:10045000000000000000000000000000000000009C +:10046000000000000000000000000000000000008C +:10047000000000000000000000000000000000007C +:10048000000000000000000000000000000000006C +:10049000000000000000000000000000000000005C +:1004A000000000000000000000000000000000004C +:1004B000000000000000000000000000000000003C +:1004C000000000000000000000000000000000002C +:1004D000000000000000000000000000000000001C +:1004E000000000000000000000000000000000000C +:1004F00000000000000000000000000000000000FC +:1005000000000000000000000000000000000000EB +:1005100000000000000000000000000000000000DB +:1005200000000000000000000000000000000000CB +:1005300000000000000000000000000000000000BB +:1005400000000000000000000000000000000000AB +:10055000000000000000000000000000000000009B +:10056000000000000000000000000000000000008B +:10057000000000000000000000000000000000007B +:10058000000000000000000000000000000000006B +:10059000000000000000000000000000000000005B +:1005A000000000000000000000000000000000004B +:1005B000000000000000000000000000000000003B +:1005C000000000000000000000000000000000002B +:1005D000000000000000000000000000000000001B +:1005E000000000000000000000000000000000000B +:1005F00000000000000000000000000000000000FB +:1006000000000000000000000000000000000000EA +:1006100000000000000000000000000000000000DA +:1006200000000000000000000000000000000000CA +:1006300000000000000000000000000000000000BA +:1006400000000000000000000000000000000000AA +:10065000000000000000000000000000000000009A +:10066000000000000000000000000000000000008A +:10067000000000000000000000000000000000007A +:10068000000000000000000000000000000000006A +:10069000000000000000000000000000000000005A +:1006A000000000000000000000000000000000004A +:1006B000000000000000000000000000000000003A +:1006C000000000000000000000000000000000002A +:1006D000000000000000000000000000000000001A +:1006E000000000000000000000000000000000000A +:1006F00000000000000000000000000000000000FA +:1007000000000000000000000000000000000000E9 +:1007100000000000000000000000000000000000D9 +:1007200000000000000000000000000000000000C9 +:1007300000000000000000000000000000000000B9 +:1007400000000000000000000000000000000000A9 +:100750000000000000000000000000000000000099 +:100760000000000000000000000000000000000089 +:100770000000000000000000000000000000000079 +:100780000000000000000000000000000000000069 +:100790000000000000000000000000000000000059 +:1007A0000000000000000000000000000000000049 +:1007B0000000000000000000000000000000000039 +:1007C0000000000000000000000000000000000029 +:1007D0000000000000000000000000000000000019 +:1007E0000000000000000000000000000000000009 +:1007F00000000000000000000000000000000000F9 +:1008000000000000000000000000000000000000E8 +:1008100000000000000000000000000000000000D8 +:1008200000000000000000000000000000000000C8 +:1008300000000000000000000000000000000000B8 +:1008400000000000000000000000000000000000A8 +:100850000000000000000000000000000000000098 +:100860000000000000000000000000000000000088 +:100870000000000000000000000000000000000078 +:100880000000000000000000000000000000000068 +:100890000000000000000000000000000000000058 +:1008A0000000000000000000000000000000000048 +:1008B0000000000000000000000000000000000038 +:1008C0000000000000000000000000000000000028 +:1008D0000000000000000000000000000000000018 +:1008E0000000000000000000000000000000000008 +:1008F00000000000000000000000000000000000F8 +:1009000000000000000000000000000000000000E7 +:1009100000000000000000000000000000000000D7 +:1009200000000000000000000000000000000000C7 +:1009300000000000000000000000000000000000B7 +:1009400000000000000000000000000000000000A7 +:100950000000000000000000000000000000000097 +:100960000000000000000000000000000000000087 +:100970000000000000000000000000000000000077 +:100980000000000000000000000000000000000067 +:100990000000000000000000000000000000000057 +:1009A0000000000000000000000000000000000047 +:1009B0000000000000000000000000000000000037 +:1009C0000000000000000000000000000000000027 +:1009D0000000000000000000000000000000000017 +:1009E0000000000000000000000000000000000007 +:1009F00000000000000000000000000000000000F7 +:100A000000000000000000000000000000000000E6 +:100A100000000000000000000000000000000000D6 +:100A200000000000000000000000000000000000C6 +:100A300000000000000000000000000000000000B6 +:100A400000000000000000000000000000000000A6 +:100A50000000000000000000000000000000000096 +:100A60000000000000000000000000000000000086 +:100A70000000000000000000000000000000000076 +:100A80000000000000000000000000000000000066 +:100A90000000000000000000000000000000000056 +:100AA0000000000000000000000000000000000046 +:100AB0000000000000000000000000000000000036 +:100AC0000000000000000000000000000000000026 +:100AD0000000000000000000000000000000000016 +:100AE0000000000000000000000000000000000006 +:100AF00000000000000000000000000000000000F6 +:100B000000000000000000000000000000000000E5 +:100B100000000000000000000000000000000000D5 +:100B200000000000000000000000000000000000C5 +:100B300000000000000000000000000000000000B5 +:100B400000000000000000000000000000000000A5 +:100B50000000000000000000000000000000000095 +:100B60000000000000000000000000000000000085 +:100B70000000000000000000000000000000000075 +:100B80000000000000000000000000000000000065 +:100B90000000000000000000000000000000000055 +:100BA0000000000000000000000000000000000045 +:100BB0000000000000000000000000000000000035 +:100BC0000000000000000000000000000000000025 +:100BD0000000000000000000000000000000000015 +:100BE0000000000000000000000000000000000005 +:100BF00000000000000000000000000000000000F5 +:100C000000000000000000000000000000000000E4 +:100C100000000000000000000000000000000000D4 +:100C200000000000000000000000000000000000C4 +:100C300000000000000000000000000000000000B4 +:100C400000000000000000000000000000000000A4 +:100C50000000000000000000000000000000000094 +:100C60000000000000000000000000000000000084 +:100C70000000000000000000000000000000000074 +:100C80000000000000000000000000000000000064 +:100C90000000000000000000000000000000000054 +:100CA0000000000000000000000000000000000044 +:100CB0000000000000000000000000000000000034 +:100CC0000000000000000000000000000000000024 +:100CD0000000000000000000000000000000000014 +:100CE0000000000000000000000000000000000004 +:100CF00000000000000000000000000000000000F4 +:100D000000000000000000000000000000000000E3 +:100D100000000000000000000000000000000000D3 +:100D200000000000000000000000000000000000C3 +:100D300000000000000000000000000000000000B3 +:100D400000000000000000000000000000000000A3 +:100D50000000000000000000000000000000000093 +:100D60000000000000000000000000000000000083 +:100D70000000000000000000000000000000000073 +:100D80000000000000000000000000000000000063 +:100D90000000000000000000000000000000000053 +:100DA0000000000000000000000000000000000043 +:100DB0000000000000000000000000000000000033 +:100DC0000000000000000000000000000000000023 +:100DD0000000000000000000000000000000000013 +:100DE0000000000000000000000000000000000003 +:100DF00000000000000000000000000000000000F3 +:100E000000000000000000000000000000000000E2 +:100E100000000000000000000000000000000000D2 +:100E200000000000000000000000000000000000C2 +:100E300000000000000000000000000000000000B2 +:100E400000000000000000000000000000000000A2 +:100E50000000000000000000000000000000000092 +:100E60000000000000000000000000000000000082 +:100E70000000000000000000000000000000000072 +:100E80000000000000000000000000000000000062 +:100E90000000000000000000000000000000000052 +:100EA0000000000000000000000000000000000042 +:100EB0000000000000000000000000000000000032 +:100EC0000000000000000000000000000000000022 +:100ED0000000000000000000000000000000000012 +:100EE0000000000000000000000000000000000002 +:100EF00000000000000000000000000000000000F2 +:100F000000000000000000000000000000000000E1 +:100F100000000000000000000000000000000000D1 +:100F200000000000000000000000000000000000C1 +:100F300000000000000000000000000000000000B1 +:100F400000000000000000000000000000000000A1 +:100F50000000000000000000000000000000000091 +:100F60000000000000000000000000000000000081 +:100F70000000000000000000000000000000000071 +:100F80000000000000000000000000000000000061 +:100F90000000000000000000000000000000000051 +:100FA0000000000000000000000000000000000041 +:100FB0000000000000000000000000000000000031 +:100FC0000000000000000000000000000000000021 +:100FD0000000000000000000000000000000000011 +:100FE0000000000000000000000000000000000001 +:100FF00000000000000000000000000000000000F1 +:1010000000000000000000000000000000000000E0 +:1010100000000000000000000000000000000000D0 +:1010200000000000000000000000000000000000C0 +:1010300000000000000000000000000000000000B0 +:1010400000000000000000000000000000000000A0 +:101050000000000000000000000000000000000090 +:101060000000000000000000000000000000000080 +:101070000000000000000000000000000000000070 +:101080000000000000000000000000000000000060 +:101090000000000000000000000000000000000050 +:1010A0000000000000000000000000000000000040 +:1010B0000000000000000000000000000000000030 +:1010C0000000000000000000000000000000000020 +:1010D0000000000000000000000000000000000010 +:1010E0000000000000000000000000000000000000 +:1010F00000000000000000000000000000000000F0 +:1011000000000000000000000000000000000000DF +:1011100000000000000000000000000000000000CF +:1011200000000000000000000000000000000000BF +:1011300000000000000000000000000000000000AF +:10114000000000000000000000000000000000009F +:10115000000000000000000000000000000000008F +:10116000000000000000000000000000000000007F +:10117000000000000000000000000000000000006F +:10118000000000000000000000000000000000005F +:10119000000000000000000000000000000000004F +:1011A000000000000000000000000000000000003F +:1011B000000000000000000000000000000000002F +:1011C000000000000000000000000000000000001F +:1011D000000000000000000000000000000000000F +:1011E00000000000000000000000000000000000FF +:1011F00000000000000000000000000000000000EF +:1012000000000000000000000000000000000000DE +:1012100000000000000000000000000000000000CE +:1012200000000000000000000000000000000000BE +:1012300000000000000000000000000000000000AE +:101240000000000000000000000000000000E3F1CA +:10125000783C1E8FC7E3F1783C1E8FC7E3318CC703 +:10126000E3F1783C1E8FC7E3F1783C1E8FC7E3F1B2 +:10127000783C1E8FC7E3F1783C1E8FC7E3318CC7E3 +:10128000E3F1783C1E8FC7E3F1783C1E8FC7E3F192 +:10129000783C1E8FC7E3F1783C1E8FC7E3318CC7C3 +:1012A000E3F1783C1E8FC7E3F1783C1E8FC7E3F172 +:1012B000783C1E8FC7E3F1783C1E8FC7E3318CC7A3 +:1012C000E3F1783C1E8FC7E3F1783C1E8FC7E3F152 +:1012D000783C1E8FC7E3F1783C1E8FC7E3318CC783 +:1012E000E3F1783C1E8FC7E3F1783C1E8FC7E3F132 +:1012F000783C1E8FC7E3F1783C1E8FC7E3318CC763 +:10130000E3F1783C1E8FC7E3F1783C1E8FC7E3F111 +:10131000783C1E8FC7E3F1783C1E8FC7E3318CC742 +:10132000E3F1783C1E8FC7E3F1783C1E8FC7E3F1F1 +:10133000783C1E8FC7E3F1783C1E8FC7E3318CC722 +:10134000E3F1783C1E8FC7E3F1783C1E8FC70000A5 +:10135000000000000000000000000000000000008D +:10136000000000000000000000000000000000007D +:101370001200004800000000000000000000000013 +:10138000000000000000000000000000000000005D +:1013900012000048000000000000000000000000F3 +:1013A000000000000000000000000000000000003D +:1013B00012000048000000000000000000000000D3 +:1013C000000000000000000000000000000000001D +:1013D00012000048000000000000000000000000B3 +:1013E00000000000000000000000000000000000FD +:1013F0001200004800000000000000000000000093 +:1014000000000000000000000000000000000000DC +:101410001200004800000000000000000000000072 +:1014200000000000000000000000000000000000BC +:101430001200004800000000000000000000000052 +:10144000000000000000000000000000000000009C +:101450001200004800000000000000000000000032 +:10146000000000000000000000000000000000007C +:10147000000000000000000000000000000000006C +:10148000000000000000000000000000000000005C +:10149000000000000000000000000000000000004C +:1014A000000000000000000000000000000000003C +:1014B000000000000000000000000000000000002C +:1014C000000000000000000000000000000000001C +:1014D000000000000000000000000000000000000C +:1014E00000000000000000000000000000000000FC +:1014F00000000000000000000000000000000000EC +:1015000000000000000000000000000000000000DB +:1015100000000000000000000000000000000000CB +:1015200000000000000000000000000000000000BB +:1015300000000000000000000000000000000000AB +:10154000000000000000000000000000000000009B +:10155000000000000000000000000000000000008B +:10156000000000000000000000000000000000007B +:10157000000000000000000000000000000000006B +:101580000C0000000000000000000000000000004F +:10159000000000000000000000000000000000004B +:1015A000000000000000000000000000000000003B +:1015B000000000000000000000000000000000002B +:1015C000000000000000000000000000000000001B +:1015D000000000000000000000000000000000000B +:1015E00000000000000000000000000000000000FB +:1015F00000000000000000000000000000000000EB +:1016000000000000000000000000000000000000DA +:1016100000000000000000000000000000000000CA +:1016200000000000000000000000000000000000BA +:1016300000000000000000000000000000000000AA +:10164000000000000000000000000000000000009A +:10165000000000000000000000000000000000008A +:10166000000000000000000000000000000000007A +:10167000000000000000000000000000000000006A +:10168000000000000000000000000000000000005A +:10169000000000C00C00000000000000000000007E +:1016A00000000000000000000000000090040000A6 +:1016B000040000302C40000000000000000000008A +:1016C0000000000000000000000000001003000007 +:1016D000040000300840000000000000000000008E +:1016E00000000000000000000000000010060000E4 +:1016F000040000300C50000000000000000000005A +:1017000000000000000000000000000010010000C8 +:101710000400003024400000000000000000000031 +:1017200000000000000000000000000010000000A9 +:101730000400003028C0000000000000000000008D +:101740000000000000000000000000001007000082 +:10175000040000300CC00000000000000000000089 +:1017600000000000000000000000000090060000E3 +:10177000040000300800000000000000000000002D +:101780000000000000000000000000001003000046 +:101790000400003004C00000000000000000000051 +:1017A00000000000000000C0000000000000000079 +:1017B0000000000000000000000000000000000029 +:1017C000000701202000000004C00000000000000D +:1017D0000000000000000000000000000000000009 +:1017E000002301202000000084C000000000000051 +:1017F00000000000000000000000000000000000E9 +:1018000000230120200000001480000000000000E0 +:1018100000000000000000000000000000000000C8 +:10182000002301202000000004C000000000000090 +:1018300000000000000000000000000000000000A8 +:1018400000230120200000000490000000000000A0 +:101850000000000000000000000000000000000088 +:10186000002301202000000014C000000000000040 +:101870000000000000000000000000000000000068 +:10188000002301202000000014C000000000000020 +:101890000000000000000000000000000000000048 +:1018A000002301202000000024C0000000000000F0 +:1018B0000000000000000000000000000000000028 +:1018C00000000000000002004A0202027200120042 +:1018D0000242021260020200024A02027200020088 +:1018E00012424612420000004A4202027200020006 +:1018F0001242021260020200024A42027200000218 +:1019000012421202422200104A4202004212000019 +:101910004A46021260020200424A420612220012A5 +:101920004202120242220002605262024800000299 +:1019300012467202400000021242120262000002CD +:10194000025206024A0002061242520640000012EB +:101950004246420648000022424A52064000000623 +:1019600012424A024022020202124212402212068F +:1019700006024202001200061A4202124006000647 +:101980005240421240000002425212024006120629 +:101990000202621200020002025252020006000617 +:1019A000421248024006020202126002401212066F +:1019B0000202621200020202021252020006020633 +:1019C000520002024012000000000000000000006F +:1019D0000C0000000000000000004000200808018A +:1019E000000000002011410000084000200808010C +:1019F00000004000000C0800A0000000400C08019E +:101A0000008008000005400000084000200809018F +:101A1000000000080005000130000000200A40809E +:101A200030000000080241004008200082088800C1 +:101A300001000400300100013000000102104008E4 +:101A4000000000010010000880000001000C0108E7 +:101A50004000000120100801208008000082800062 +:101A6000100000005020500000000000A00880007E +:101A70001200000000112001100020084000A0000A +:101A8000100000000801A00880000000000A080003 +:101A9000800000008010A00010000008A0200001BD +:101AA000100000000801400000080008200210019A +:101AB0000000000088000001100040082000000124 +:101AC000100000000801400000082008400010013C +:101AD000000008008000200110000000000000004D +:101AE000000000C00C0000000000000000000040EA +:101AF0002000808AA2E80D401001002122612240CE +:101B0000680000A1B202008091010088E10000801D +:101B1000610000A82940288073000081223018400D +:101B200012000080E100004062018000E2000080BD +:101B30001100808BA6300CE07100008AB2360C4098 +:101B40002800808A1102009019000000E200004085 +:101B50001001008821600CA07300000AB8020CA0DC +:101B600010000085110200A090000080A2000080FB +:101B70006300001840300C8073000006A2040C4083 +:101B800020018081C100004012000090E10000A00F +:101B90006300008041400C6060000088C1442880E0 +:101BA000100000882201009011000086E5000080EE +:101BB00023000098A14012A0290000812500328056 +:101BC0001001808821010090A0000006E200008042 +:101BD00063000098A1C02EC029000036220028A072 +:101BE000100000A0C100009010010006B602000025 +:101BF00000000000000000C0000000000000000025 +:101C00000000008063034046B0410880F5000001F9 +:101C1000203018A068010084A50000A0200040200A +:101C2000EA0200008602000332611E80E50100A680 +:101C300031012C0032004061F0010000720040369A +:101C4000F0010000E6020056B00509802000C04106 +:101C5000A03809E020014071000000C0210040339D +:101C6000E80200A06100809631690E8060000001EA +:101C7000A3300E80390100C6040000C02000000B14 +:101C8000B40100A08002809049620880670000C60D +:101C9000A8C20E80E0020061C802008067020081D5 +:101CA000ED020080E302C010486202803300C0C62B +:101CB000CCC212E0210200C6240000C021028046EE +:101CC000F00100A080018010B041228023008046F6 +:101CD000204002002E0200C3240000C02100001892 +:101CE000F4010080810380B0B1010FA0210000C188 +:101CF00030B10380F80100C0CC0200C0E100809840 +:101D0000A100000000000000000000000000000032 +:101D10000000000000000040050200600100E0003B +:101D2000010040A080602000020040800000000010 +:101D3000A1000009000000802001000700E0000071 +:101D400040000008016100402C0100080100000073 +:101D500006004000020000803000000400021080F5 +:101D600050000020018030002200000000800000B0 +:101D70001202000D00000080400200220240E2003A +:101D80004001000E0042510000028000038100006B +:101D900002030089000000400003002002E0700000 +:101DA000400100BE000158800602000003800000D0 +:101DB000120000090300004000010034007051804F +:101DC000200100000180800010008082808000409F +:101DD0001000400301000000C0000024020A00803F +:101DE000100200802846010080000052810000009F +:101DF0001000801500000000040000140002000024 +:101E00009102003101500900880000020104000025 +:101E1000C8000005000000000000000000000000F5 +:101E2000000000000000000000000080E502804388 +:101E300000680C40C001008003400E801700408104 +:101E40000308000087000063020000006002003603 +:101E500001081C60C301803101003E80C30240D4F0 +:101E600000080000630200CB0000008084020046EE +:101E7000023C08606202006300800EA0C30000D62E +:101E800000B00080F10000060200008064028021A2 +:101E9000013C0840270000C302B40D20E300C0C18C +:101EA00000600080E1000094050000806402000BE7 +:101EB000010009A079000080011400A0E10040C3E6 +:101EC00004080020E301008305000000C00240C1B7 +:101ED00000340340630080C6008008A0EB01009C32 +:101EE00001600020E20100D3000000A0C101000B4E +:101EF000014018006F00805600C00E00E001004352 +:101F000000940080E10100D600000020620200D3AE +:101F100000340980E800800600100680E30140C319 +:101F200006000040E20100D60000000000000000B2 +:101F30000000000000000000000000000000008021 +:101F40006100008B090406D02900000506881C40AA +:101F50005400000005B0008072000028010000500D +:101F60005300000802002EC02900008502340C80B6 +:101F7000100000A00AC000907101008A0A000080D1 +:101F80006300001A0A0038C0650080C50260168030 +:101F9000290080850A6000A021000008060000805A +:101FA0006300008B01400680E001001A0A1008401F +:101FB0002B000086090000A0A10000A802000080FC +:101FC00061008088096806402101005A00300F80B6 +:101FD000E00000A801400040280000A8020000D056 +:101FE0006500004A01300690280000C506102C400C +:101FF000E000002804480080790000860600008088 +:10200000630000840AE82E406800008509101890DB +:102010006300800B006000207A0000080000008050 +:102020006301001A026826506000004A00E00E803A +:102030001300808602180040610000860600000040 +:1020400000000000000000000000804040408000D0 +:1020500044018C02814C8404000A42028080813455 +:102060001004290420240028002442443444204041 +:102070003400204920008030402080244204240085 +:1020800031041444302C220404314254890C484257 +:10209000500058182034104921800004811C34005D +:1020A00000009040201C22282041191921285900A5 +:1020B000840090149A20014208308002221A018C78 +:1020C000043294181108205C09903A0122994204C4 +:1020D00002081118309020808238900C08281002D5 +:1020E000040081048200315204500A048800020472 +:1020F00082412A2121292C2411020031220212249A +:1021000004829422341424204C10143422000184BC +:102110004424120824040000002031283204004422 +:102120002441841422005404208824213042403465 +:10213000202020002020800440200028203C808493 +:10214000042100002048000410144000000000009A +:1021500000008000000000000000000000000010EF +:102160000000000000940C000008000000789A08AD +:102170007A0000141009080D0010905890045010B7 +:10218000107800701070002C20100010783000BD06 +:1021900070005DB0155010B01094005E291C9A3E7E +:1021A00018A49C041C051818B918150C5080BE0002 +:1021B000B538127C04101DB000149D1CB6083C1CE0 +:1021C000785418A0AC00103C1C360E00B810AE2E8F +:1021D00050140C580010101810A4651800101800A6 +:1021E00070185C100028141C10126250251C1A5C18 +:1021F00038141E5E000CB0119C221E1020107C2989 +:10220000BC06701098905C50141C7C501E5010300E +:10221000800010000D60101030107000901410102D +:1022200000767910100C10AC0D7C505E7070105C54 +:10223000107070500050B010905510700038500A57 +:10224000105050107550B0700030B00000A0001C4D +:102250003018201090A0B000B0580000101CA00052 +:102260009050B010B0705900A030000090A0000055 +:1022700000003090101030D0305D384834343C5C71 +:102280005058185936373C3D664C3C4030B400300D +:10229000003D1890283930303070B39CB0D01031E8 +:1022A00011B01E3034013C72386C4C113034344C57 +:1022B000EC391C3094601A3D378630403E35003092 +:1022C000303270081C503C518FD1203200742CBE2B +:1022D00030390404393A18002D70116930B20434D1 +:1022E000003010E03804C5384C3434700C0A123415 +:1022F00000003858383419D805F00D001212322079 +:102300009830360080920250007334E011E2343885 +:10231000EC100CE8320260EC1524303CB5943C34EF +:10232000040C801C340404340C3824B038753C1080 +:10233000107F0830340E04BC9C390C0A3805005656 +:1023400062161C3034080E143C181C0034503C0437 +:1023500030B03814301810343030300030B0100441 +:10236000303000B0B034B0B4083800003030000471 +:10237000005D1000000000800000100000800000E0 +:10238000000000000000000000000000000000202D +:1023900000040024000002204000400480000200ED +:1023A00000140004008002A040040004003412A0C5 +:1023B0005004000400240200400000740000924019 +:1023C00000704034008042004074412402640240A6 +:1023D0004404012402A4462440054034020C520067 +:1023E000500000A402240204407401A402A512803B +:1023F00040BA41A40005012141B00004418805987C +:10240000400C002400A985212114412510A146017A +:10241000493E0C04024C0E010C100104B04511346D +:102420006C082004010C1640200C100531B8120471 +:10243000A03020040034420421100035018405043A +:102440002400010401240D01200020040264010481 +:102450002000000400040204200000040100000029 +:102460006000000400380000200000040034020076 +:1024700020000004000402002000000400200000EE +:10248000200000040000000000000004000402001E +:1024900000000000000000000000000000000040FC +:1024A0000000008100010081000004800041200143 +:1024B0001000040104810001040004610001040112 +:1024C000044114A000010401048104010001001171 +:1024D00010003411049220410422340100993C81FF +:1024E0000091041001410C8100B1148230012401DB +:1024F00000017400703200610082048208810C8146 +:1025000000B1143004A53CA00045008831810400CE +:1025100034A10021B416048A0A61008A0CB1254D49 +:1025200088A6342D858606001012840688B20C24F5 +:1025300010318D423A318000860204110032840548 +:1025400040624402108180020021340204B2000182 +:102550000012800201318C0100620205003184000A +:102560000061800200310401002194020031000169 +:10257000802200013001000100010021000104015E +:102580000061842100310401002184210001000147 +:10259000006000210001000100000001840104012D +:1025A0000021040000000000000000000000000006 +:1025B000000000000000C001048106000400E009E2 +:1025C00004810401048100C2248106002400C001AA +:1025D000048106904600300854020600040020C220 +:1025E000048104112481D00124810600040000002C +:1025F0000485020020000008048102000000080099 +:102600000C8104110081C00904A10401200000C252 +:102610000481020020003008440202080C00000877 +:10262000008106080000081004A524050400080025 +:1026300018A10200240008E20081040920030820F8 +:102640000CA1002C1C00000014A1040900001800BB +:102650001CA10610000000E254020200143000E247 +:1026600010A10610100008005422000100200000F4 +:1026700014A106080800002014A10600002020E292 +:1026800014A1040100200400148106401610042047 +:1026900014810600002000E214A106000020C021E1 +:1026A00014810401042004E214810600148104C290 +:1026B000048106000020000000000000000000006F +:1026C000000000008093060C0000E3F1783C1E8FB0 +:1026D000C7E3F1783C1E8FC7E3318CC7E3F1783C48 +:1026E0001E8FC7E3F1783C1E8FC7E3F1783C1E8F45 +:1026F000C7E3F1783C1E8FC7E3318CC7E3F1783C28 +:102700001E8FC7E3F1783C1E8FC7E3F1783C1E8F24 +:10271000C7E3F1783C1E8FC7E3318CC7E3F1783C07 +:102720001E8FC7E3F1783C1E8FC7E3F1783C1E8F04 +:10273000C7E3F1783C1E8FC7E3318CC7E3F1783CE7 +:102740001E8FC7E3F1783C1E8FC7E3F1783C1E8FE4 +:10275000C7E3F1783C1E8FC7E3318CC7E3F1783CC7 +:102760001E8FC7E3F1783C1E8FC7E3F1783C1E8FC4 +:10277000C7E3F1783C1E8FC7E3318CC7E3F1783CA7 +:102780001E8FC7E3F1783C1E8FC7E3F1783C1E8FA4 +:10279000C7E3F1783C1E8FC7E3318CC7E3F1783C87 +:1027A0001E8FC7E3F1783C1E8FC7E3F1783C1E8F84 +:1027B000C7E3F1783C1E8FC7E3318CC7E3F1783C67 +:1027C0001E8FC7E3F1783C1E8FC700008093060C74 +:1027D0000000000000000C00006001010078000013 +:1027E000000000000000000000000000120000488F +:1027F00000000000000000000000000000000000D9 +:10280000000000000000000000000000120000486E +:1028100000000000000000000000000000000000B8 +:10282000000000000000000000000000120000484E +:102830000000000000000000000000000000000098 +:10284000000000000000000000000000120000482E +:102850000000000000000000000000000000000078 +:10286000000000000000000000000000120000480E +:102870000000000000000000000000000000000058 +:1028800000000000000000000000000012000048EE +:102890000000000000000000000000000000000038 +:1028A00000000000000000000000000012000048CE +:1028B0000000000000000000000000000000000018 +:1028C00000000000000000000000000012000048AE +:1028D00000000000000000000000000000000800F0 +:1028E00000700101007800000000200028715050A5 +:1028F0006008000000000000000000000000000070 +:1029000000000000000000000000000000000000C7 +:1029100000000000000000000000000000000000B7 +:1029200000000000000000000000000000000000A7 +:102930000000000000000000000000000000000097 +:102940000000000000000000000000000000000087 +:102950000000000000000000000000000000000077 +:102960000000000000000000000000000000000067 +:102970000000000000000000000000000000000057 +:102980000000000000000000000000000000000047 +:102990000000000000000000000000000000000037 +:1029A0000000000000000000000000000000000027 +:1029B0000000000000000000000000000000000017 +:1029C0000000000000000000000000000000000007 +:1029D00000000000000000000000000000000000F7 +:1029E00000000000000000000000000000000000E7 +:1029F0000000200028715050600800000C0080008A +:102A0000008C2008084000000000000000000000CA +:102A100000000000000000000000000000000000B6 +:102A200000000000000000000000000000000000A6 +:102A30000000000000000000000000000000000096 +:102A40000000000000000000000000000000000086 +:102A50000000000000000000000000000000000076 +:102A60000000000000000000000000000000000066 +:102A70000000000000000000000000000000000056 +:102A80000000000000000000000000000000000046 +:102A90000000000000000000000000000000000036 +:102AA0000000000000000000000000000000000026 +:102AB0000000000000000000000000000000000016 +:102AC0000000000000000000000000000000000006 +:102AD00000000000000000000000000000000000F6 +:102AE00000000000000000000000000000000000E6 +:102AF00000000000000000000000000000000000D6 +:102B00000000000000008000000C2008084000C009 +:102B10000C00000004004040000000000000000025 +:102B200000000000000000009000000004000030E1 +:102B30000480000000000000000000000000000011 +:102B400000000000000000009005000004000030BC +:102B500000800000000000000000000000000000F5 +:102B6000000000000000000090050000040000309C +:102B70000040000000000000000000000000000015 +:102B80000000000000000000100000000400003001 +:102B900000800000000000000000000000000000B5 +:102BA00000000000000000001005000004000030DC +:102BB0000480000000000000000000000000000091 +:102BC00000000000000000001000000004000030C1 +:102BD0000080000000000000000000000000000075 +:102BE000000000000000000010070000040000309A +:102BF0000480000000000000000000000000000051 +:102C000000000000000000009007000004000030F9 +:102C10000480000000000000000000008A04404022 +:102C2000000000C000000000A00100000000000043 +:102C30000000000000000000000000000023012050 +:102C40002000000014C00000000000000000000090 +:102C50000000000000000000000000000023012030 +:102C60002000000014C00000000000000000000070 +:102C70000000000000000000000000000023012010 +:102C80002000000014C00000000000000000000050 +:102C900000000000000000000000000000230120F0 +:102CA0002000000014C00000000000000000000030 +:102CB00000000000000000000000000000230120D0 +:102CC0002000000014C00000000000000000000010 +:102CD00000000000000000000000000000230120B0 +:102CE0002000000014C000000000000000000000F0 +:102CF0000000000000000000000000000023012090 +:102D00002000000014C000000000000000000000CF +:102D1000000000000000000000000000002301206F +:102D20002000000014C000000000000000000000AF +:102D3000000000000000000000000010C000600063 +:102D4000000012000246600202120200124248060F +:102D5000420002060212480202060200025200125B +:102D6000620200021242480240060006024A600265 +:102D70002212120002464802600200020252600261 +:102D800002120012504652020006000212420202D3 +:102D90004612000042524810420200026052600295 +:102DA000401200064A404012600200126202020213 +:102DB0004A02000212464A00420000024A0640024D +:102DC00060120002024A4806400200004A464006DD +:102DD0004012000642124A0240020000624A621299 +:102DE00046000202024842120006000252466212E7 +:102DF0000002001202424A0200020006025240068D +:102E00005200000242484A020006000242486202A2 +:102E100048000002424802024A00000642480202FC +:102E200040120200424802024806120062400202BA +:102E30004A00000642484A02000200126240400274 +:102E40006012000040400000001000000C00000074 +:102E50000100000000000000401000084000400099 +:102E6000000C000050000800400000084000400036 +:102E70000804000040080001000C00088000000069 +:102E80004008000108000000401000080001000890 +:102E9000400400084100000080108008010000018B +:102EA000000C40082000000050040400A0080001AD +:102EB000001000011000000040113000000100006F +:102EC0004008040120080001001020805001000883 +:102ED00040008008080000012008000010010000E8 +:102EE0000802800010000000881020808008000088 +:102EF0004008080040004008208088000000008052 +:102F000080100800000100002011200800010000CE +:102F10001802C00010000001300040080000000846 +:102F2000A00008010000000130002008400100005E +:102F300088002008800040003000400800000000A9 +:102F400008022001080000005000200800010000D5 +:102F5000401080080000000010040000000000C0C5 +:102F60000C0000020000000000000080210000565C +:102F7000A148226074000081A51C0290910000818C +:102F8000E500004090000098EA000040200000604A +:102F9000A040288029000001226002806300001602 +:102FA0002000004010000016E8000040200000AAA9 +:102FB000A14822E069000008524A288061000048C8 +:102FC000E400004068008096E1000080200000409E +:102FD000A26022A0680000AAE13003C021000028FE +:102FE000400000A01000008AE10000801800009658 +:102FF000AA682240220000A6C1410C901000008B5C +:103000002201006078008008E20000A0190000188A +:10301000A63002402800008A056022A07100004608 +:10302000050000E07900002AE20000407000002B5B +:10303000A4300C8060000058206002D0A100002A5B +:103040002001004078018006E2000080210000BAE3 +:10305000A100084060000018C2040C601000000BC2 +:10306000E00000C061018081A100000400000000B8 +:10307000000000C0000080000000000000000020F0 +:10308000220000C1B40109802B0000C1B0412F8093 +:10309000E0000091E90200C0E5000011F10100200C +:1030A000220000CBB4010F802F00002128322920FC +:1030B000920000A12B0200C0E5028006F201008010 +:1030C0006C024030B0010380280000B94130098013 +:1030D00083014081F10100C0270000C1F60100809A +:1030E000840000C1B43D0F8020004043ECB21C803E +:1030F0003D004030480200807000C036F00100A062 +:1031000081008051B031038087020041C6300C80BD +:103110002103009325000080610040C6F401008077 +:1031200029000091B1610F80600000400A4609004B +:1031300062000043080200C080004040F40100C06B +:10314000740000C0B2610EA0900080062C460D8075 +:10315000610100532400000026004041F60100A058 +:10316000910100B0B1E10CA090008046CEE238C0E1 +:1031700061030026F0010020320000C0B40180008D +:1031800000000000000000800800000000000000B7 +:10319000000000005100C0400008200040008040B6 +:1031A0000114A000110080400080000000030048CE +:1031B00000000080700000400028000088018005A9 +:1031C00001E08000800180000080004000010010CC +:1031D00000000040300000000009800092008005DF +:1031E000004180C044008000008000000201001007 +:1031F000000000805002000A00000140110000049D +:1032000001410100200100010080000011020000C6 +:10321000000000C09002000000088000300000079D +:103220008065078000008041809000C01000000091 +:103230000300000010028000004390800601800718 +:10324000000201805200C003001000000001404055 +:10325000010000001800400000435000B3000000CF +:103260000002028000004003828000808000001184 +:10327000000000800000400002C1860091000005AF +:10328000000100000000808100800000A10000011A +:10329000010000000000000000000000000000002D +:1032A00000008001300000800402404104100380CF +:1032B000C80240C300600C803700C021014000807C +:1032C000E900804404000040C302C0E400E026C0DE +:1032D0006300004300B000C06700C0E10248008006 +:1032E000E0014043000000006300004404602880C7 +:1032F000C70100D000102880E100000402C0008057 +:10330000E001004B000000808900402103600C8038 +:10331000100000DB0040078087000004024800E046 +:10332000E100009301000020820040E6026008C036 +:103330006300003301000C4063020026014000805E +:103340000000C0C4000000808B00406402600800E0 +:10335000670000D300600680F7000001021400C07F +:10336000100000C804000040220200C602101C0029 +:10337000870000D4004418007300002101400000C1 +:103380002F010000000000C02002004104300000B6 +:10339000EF01009601443800630200C306400000BC +:1033A000C70000200100000000000006000000002F +:1033B00000000000000000000000004017000006B0 +:1033C000008808A015008086093002802201008054 +:1033D000011800607800009A020000901100000AB5 +:1033E00000341680600100460830074011010000DB +:1033F000013000A0D10080C802000090E0000076FB +:1034000000640C80100000080AE002A0E00100291E +:10341000093000A0D00080C402000060D10000A0EC +:10342000010C16A0650000080AB0064083000020C9 +:1034300009600080680000BA060000C07100800AC0 +:10344000011C22E0690000060230109055008080C7 +:10345000016000A0E500008805000060680000A091 +:10346000016422806D000088094C16805001000024 +:103470000A600060250000840100008010010096B1 +:1034800005E00F80110000BA0A482E905600008017 +:1034900002180080610000E8020000506101008510 +:1034A00001600D401000008A06000E9016000026F4 +:1034B00002180080130000E60200000000008000F7 +:1034C0000002000000004000404080442080804016 +:1034D00000400C04092000282C4011240124421132 +:1034E0002082803024048224280C5C102800343090 +:1034F0004A480030580C8004204092501C54301828 +:10350000284881929044189040189091000014002F +:1035100040300410540000810A00925484403480EA +:1035200040800020904180402080220454000420EC +:10353000208A428C800A30204424822080814000EE +:10354000200022501C443021913840441012215058 +:1035500089424004209881049228320034802882D5 +:103560001140118828043044402901149022202061 +:103570002A2A0134340C392820180202300254104F +:103580002028411120440400125441941090984086 +:10359000304C413810505801001080201950202123 +:1035A0008421408149243080088421210830202052 +:1035B000203484302800248400240400004040404B +:1035C00018440040224400000004000040000000B5 +:1035D0000000000001000000000000000C005E0080 +:1035E0000050000990080C080C00020800011AB5F0 +:1035F000011D90182090011800B0B8B090741C11F3 +:1036000000041C1D50040D101008705078001A1A88 +:103610001010121C90740010168114100104101068 +:1036200039BE125E001000101C9D70560C08111A55 +:103630007090180001B605B236308A300608503C4A +:10364000160E756A79040000087C32700000510083 +:1036500098010055000C0010100A10583514000194 +:103660001518851A5059A0B09018727635743860C4 +:10367000186204B0100230009050100052047030F4 +:103680001D4000057074021C009C340C061406B822 +:103690001645103C7074921590A288553610701221 +:1036A000191D14083694B21C1A1014610910727096 +:1036B0001015709C767050BD506A119D50B090608E +:1036C000703098890519A010B050700006000000F5 +:1036D00000A000A0207871B00000001C50B00000D5 +:1036E000905050000000000000000000000030502A +:1036F0003110309C112010300011C8797C1000B0BE +:103700001C124C1888983C518E1D10311C0C3938F5 +:10371000324C184010C13D30183040301A48204C0F +:10372000313B181A083C30603030100C101C00106F +:1037300030501230F000740030304C40190040100E +:103740004C0F083C0C2039311010023000A900B099 +:10375000020F30F9385004301014342C1108303076 +:103760003C3034303128305020011D317898113DE3 +:10377000283A1B18005D38103414120911103C400F +:10378000043015401D303E250C3E04303A0C3138D3 +:1037900030340D7C301910301C38003D3D0C3C306D +:1037A000300A0C013008180110103054313C090067 +:1037B0000C38303C0010101110341C100030300C4C +:1037C000000110300C363035383530341C383010AC +:1037D000003834340030313030343C3030003C2854 +:1037E00000380C0000303010003100103C1C00810B +:1037F0000004805030000000000000000400008041 +:1038000000008000000000000000040004400002EE +:1038100004200400040214024408002000001402E2 +:103820000428040006400040040804000438100284 +:1038300004600440040404421421142080311C025A +:1038400000200EA130851C02320044314002107469 +:1038500001204411404004A002B0442048328C06AC +:1038600002800C8109B24C450A210610003080000C +:10387000023040306009000000684534440205828F +:1038800016A0502110100402406D0E110C006C02A5 +:1038900002314E0151000C72123004010400440147 +:1038A000020108000D30410100418A098000AC523C +:1038B00000012C0100319C02800000300001540204 +:1038C00004010490204104820030002100400442A1 +:1038D00032400800000210020C40040008020030D0 +:1038E00008000400000020004800043000006000D0 +:1038F0000800240020020400004000000400000230 +:103900000000040000002002000000000030000061 +:103910000001000000002000000000000000008402 +:10392000010401000180008401040100018600807F +:1039300001040180218000000904001001860000BC +:10394000018401000190201001042110018C80806D +:1039500001800280218006B0619002004284100044 +:1039600005B400140084104D7100019420281080CB +:1039700001844202202002900DB43215418C08458A +:103980000190400400281000310C40060496900974 +:1039900081344D3022B072854084010106AD0A6544 +:1039A0000209B200826C360C2108021000040204E5 +:1039B00001383104022C01880296210404241525C3 +:1039C00002348250862C820082703200322482209F +:1039D000820C310001248050011401100044014484 +:1039E00080100110023081000124022002108000AA +:1039F0008124010001080020012481003120802061 +:103A00000120B1000100800081048100002001003C +:103A10008120010000008020012081200020000082 +:103A200000B00000000000000000000000000000E6 +:103A30000000C805200402002004C8052040120030 +:103A4000000400C640061000200C08C62085024075 +:103A500022040804208D120020042804200C2200D7 +:103A60001000C8050081100020040000600A120048 +:103A70002085081004A1121C08040C000000000599 +:103A80002814080440020000280420C82000001167 +:103A90002000080400A0000508340014500A0204A5 +:103AA0000C040854022000013004000068060400E1 +:103AB00004000020048506000020002010040011EE +:103AC00018140020046404010020000C40260001AA +:103AD000240000E244260200042000200020100000 +:103AE0000024003C00811020102008045002000037 +:103AF000180400200885024012040004402212200D +:103B00001004080400A100301024082400A50200BD +:103B10001020C83500A502401200C8050020020090 +:103B2000180400044026002010A10824402202208E +:103B3000182000000020000000000000000000002D +:103B40000000000000000000000000000000000075 +:103B50000000000000000000000000000000000065 +:103B60000000000000000000000000000000000055 +:103B70000000000000000000000000000000000045 +:103B80000000000000000000000000000000000035 +:103B90000000000000000000000000000000000025 +:103BA0000000000000000000000000000000000015 +:103BB0000000000000000000000000000000000005 +:103BC00000000000000000000000000000000000F5 +:103BD00000000000000000000000000000000000E5 +:103BE00000000000000000000000000000000000D5 +:103BF00000000000000000000000000000000000C5 +:103C000000000000000000000000000000000000B4 +:103C100000000000000000000000000000000000A4 +:103C20000000000000000000000000000000000094 +:103C30000000000000000000000000000000000084 +:103C40000000000000000000000000000000000074 +:103C50000000C2930C000180000000500C000180A5 +:103C6000000000C004000000040000000400000088 +:103C70000400000004000000040000000400000034 +:103C80000400000004000000040000000400000024 +:103C90000400000004000000040000000400000014 +:103CA0000400000004000000040000000400000004 +:103CB00004000000040000000400000004000000F4 +:103CC00004000000040000000400000004000000E4 +:103CD00004000000040000000400000004000000D4 +:103CE00004000000040000000400000004000000C4 +:103CF00004000000040000000400000004000000B4 +:103D000004000000040000000400000004000000A3 +:103D10000400000004000000040000000400000093 +:103D20000400000004000000040000000400000083 +:103D30000400000004000000040000000400000073 +:103D40000400000004000000040000000400000063 +:103D50000400000004000000040000000400000053 +:103D60000400000004000000040000000400000043 +:103D700004000000040000000C000180000000A00E +:103D80000C000580000000000C0000800000FAEA32 +:103D90000C000180000000B00400000004000000DE +:083DA000040000000400000013 +:00000001FF diff --git a/firmware/3s400/drs4_eval5.xise b/firmware/3s400/drs4_eval5.xise new file mode 100644 index 0000000..0d78d46 --- /dev/null +++ b/firmware/3s400/drs4_eval5.xise @@ -0,0 +1,480 @@ + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/firmware/CY7C68013A/EZUSB.LIB b/firmware/CY7C68013A/EZUSB.LIB new file mode 100644 index 0000000..a90bfd6 Binary files /dev/null and b/firmware/CY7C68013A/EZUSB.LIB differ diff --git a/firmware/CY7C68013A/Fx2.h b/firmware/CY7C68013A/Fx2.h new file mode 100644 index 0000000..ed63c8b --- /dev/null +++ b/firmware/CY7C68013A/Fx2.h @@ -0,0 +1,332 @@ +//----------------------------------------------------------------------------- +// File: FX2.h +// Contents: EZ-USB FX2/FX2LP/FX1 constants, macros, datatypes, globals, and library +// function prototypes. +// +// $Archive: /USB/Target/Inc/Fx2.h $ +// $Date: 3/23/05 2:30p $ +// $Revision: 16 $ +// $Id: Fx2.h 11698 2008-06-12 15:28:35Z ritt@PSI.CH $ +// +// Copyright (c) 2005 Cypress Semiconductor, All rights reserved +//----------------------------------------------------------------------------- +#ifndef FX2_H //Header sentry +#define FX2_H + +#define INTERNAL_DSCR_ADDR 0x0080 // Relocate Descriptors to 0x80 +#define bmSTRETCH 0x07 +#define FW_STRETCH_VALUE 0x0 // Set stretch to 0 in frameworks + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- +#define TRUE 1 +#define FALSE 0 + +#define bmBIT0 0x01 +#define bmBIT1 0x02 +#define bmBIT2 0x04 +#define bmBIT3 0x08 +#define bmBIT4 0x10 +#define bmBIT5 0x20 +#define bmBIT6 0x40 +#define bmBIT7 0x80 + +#define DEVICE_DSCR 0x01 // Descriptor type: Device +#define CONFIG_DSCR 0x02 // Descriptor type: Configuration +#define STRING_DSCR 0x03 // Descriptor type: String +#define INTRFC_DSCR 0x04 // Descriptor type: Interface +#define ENDPNT_DSCR 0x05 // Descriptor type: End Point +#define DEVQUAL_DSCR 0x06 // Descriptor type: Device Qualifier +#define OTHERSPEED_DSCR 0x07 // Descriptor type: Other Speed Configuration + +#define bmBUSPWR bmBIT7 // Config. attribute: Bus powered +#define bmSELFPWR bmBIT6 // Config. attribute: Self powered +#define bmRWU bmBIT5 // Config. attribute: Remote Wakeup + +#define bmEPOUT bmBIT7 +#define bmEPIN 0x00 + +#define EP_CONTROL 0x00 // End Point type: Control +#define EP_ISO 0x01 // End Point type: Isochronous +#define EP_BULK 0x02 // End Point type: Bulk +#define EP_INT 0x03 // End Point type: Interrupt + +#define SUD_SIZE 8 // Setup data packet size + +////////////////////////////////////////////////////////////////////////////// +//Added for HID + +#define SETUP_MASK 0x60 //Used to mask off request type +#define SETUP_STANDARD_REQUEST 0 //Standard Request +#define SETUP_CLASS_REQUEST 0x20 //Class Request +#define SETUP_VENDOR_REQUEST 0x40 //Vendor Request +#define SETUP_RESERVED_REQUEST 0x60 //Reserved or illegal request + +////////////////////////////////////////////////////////////////////////////// + + +#define SC_GET_STATUS 0x00 // Setup command: Get Status +#define SC_CLEAR_FEATURE 0x01 // Setup command: Clear Feature +#define SC_RESERVED 0x02 // Setup command: Reserved +#define SC_SET_FEATURE 0x03 // Setup command: Set Feature +#define SC_SET_ADDRESS 0x05 // Setup command: Set Address +#define SC_GET_DESCRIPTOR 0x06 // Setup command: Get Descriptor +#define SC_SET_DESCRIPTOR 0x07 // Setup command: Set Descriptor +#define SC_GET_CONFIGURATION 0x08 // Setup command: Get Configuration +#define SC_SET_CONFIGURATION 0x09 // Setup command: Set Configuration +#define SC_GET_INTERFACE 0x0a // Setup command: Get Interface +#define SC_SET_INTERFACE 0x0b // Setup command: Set Interface +#define SC_SYNC_FRAME 0x0c // Setup command: Sync Frame +#define SC_ANCHOR_LOAD 0xa0 // Setup command: Anchor load + +#define GD_DEVICE 0x01 // Get descriptor: Device +#define GD_CONFIGURATION 0x02 // Get descriptor: Configuration +#define GD_STRING 0x03 // Get descriptor: String +#define GD_INTERFACE 0x04 // Get descriptor: Interface +#define GD_ENDPOINT 0x05 // Get descriptor: Endpoint +#define GD_DEVICE_QUALIFIER 0x06 // Get descriptor: Device Qualifier +#define GD_OTHER_SPEED_CONFIGURATION 0x07 // Get descriptor: Other Configuration +#define GD_INTERFACE_POWER 0x08 // Get descriptor: Interface Power +#define GD_HID 0x21 // Get descriptor: HID +#define GD_REPORT 0x22 // Get descriptor: Report + +#define GS_DEVICE 0x80 // Get Status: Device +#define GS_INTERFACE 0x81 // Get Status: Interface +#define GS_ENDPOINT 0x82 // Get Status: End Point + +#define FT_DEVICE 0x00 // Feature: Device +#define FT_ENDPOINT 0x02 // Feature: End Point + +#define I2C_IDLE 0 // I2C Status: Idle mode +#define I2C_SENDING 1 // I2C Status: I2C is sending data +#define I2C_RECEIVING 2 // I2C Status: I2C is receiving data +#define I2C_PRIME 3 // I2C Status: I2C is receiving the first byte of a string +#define I2C_STOP 5 // I2C Status: I2C waiting for stop completion +#define I2C_BERROR 6 // I2C Status: I2C error; Bit Error +#define I2C_NACK 7 // I2C Status: I2C error; No Acknowledge +#define I2C_OK 8 // I2C positive return code +#define I2C_WAITSTOP 9 // I2C Status: Wait for STOP complete + +/*----------------------------------------------------------------------------- + Macros +-----------------------------------------------------------------------------*/ + +#define MSB(word) (BYTE)(((WORD)(word) >> 8) & 0xff) +#define LSB(word) (BYTE)((WORD)(word) & 0xff) + +#define SWAP_ENDIAN(word) ((BYTE*)&word)[0] ^= ((BYTE*)&word)[1];\ + ((BYTE*)&word)[1] ^= ((BYTE*)&word)[0];\ + ((BYTE*)&word)[0] ^= ((BYTE*)&word)[1] + +#define EZUSB_IRQ_ENABLE() EUSB = 1 +#define EZUSB_IRQ_DISABLE() EUSB = 0 +#define EZUSB_IRQ_CLEAR() EXIF &= ~0x10 // IE2_ + +#define EZUSB_STALL_EP0() EP0CS |= bmEPSTALL + +// WRITEDELAY() has been replaced by SYNCDELAY; macro in fx2sdly.h +// ...it is here for backwards compatibility... + +// the WRITEDELAY macro compiles to the time equivalent of 3 NOPs. +// It is used in the frameworks to allow for write recovery time +// requirements of certain registers. This is only necessary for +// EZ-USB FX parts. See the EZ-USB FX TRM for +// more information on write recovery time issues. +#define WRITEDELAY() {char writedelaydummy = 0;} +// if this firmware will never run on an EZ-USB FX part replace +// with: +// #define WRITEDELAY() + +// macro to reset and endpoint data toggle +#define EZUSB_RESET_DATA_TOGGLE(ep) TOGCTL = (((ep & 0x80) >> 3) + (ep & 0x0F));\ + TOGCTL |= bmRESETTOGGLE + + +#define EZUSB_ENABLE_RSMIRQ() (EICON |= 0x20) // Enable Resume Interrupt (EPFI_) +#define EZUSB_DISABLE_RSMIRQ() (EICON &= ~0x20) // Disable Resume Interrupt (EPFI_) +#define EZUSB_CLEAR_RSMIRQ() (EICON &= ~0x10) // Clear Resume Interrupt Flag (PFI_) + +#define EZUSB_GETI2CSTATUS() (I2CPckt.status) +#define EZUSB_CLEARI2CSTATUS() if((I2CPckt.status == I2C_BERROR) || (I2CPckt.status == I2C_NACK))\ + I2CPckt.status = I2C_IDLE; + +#define EZUSB_ENABLEBP() (BREAKPT |= bmBPEN) +#define EZUSB_DISABLEBP() (BREAKPT &= ~bmBPEN) +#define EZUSB_CLEARBP() (BREAKPT |= bmBREAK) +#define EZUSB_BP(addr) BPADDRH = (BYTE)(((WORD)addr >> 8) & 0xff);\ + BPADDRL = (BYTE)addr + +#define EZUSB_EXTWAKEUP() (((WAKEUPCS & bmWU2) && (WAKEUPCS & bmWU2EN)) ||\ + ((WAKEUPCS & bmWU) && (WAKEUPCS & bmWUEN))) + +#define EZUSB_HIGHSPEED() (USBCS & bmHSM) + +//----------------------------------------------------------------------------- +// Datatypes +//----------------------------------------------------------------------------- +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned long DWORD; +typedef bit BOOL; + +#define INT0_VECT 0 +#define TMR0_VECT 1 +#define INT1_VECT 2 +#define TMR1_VECT 3 +#define COM0_VECT 4 +#define TMR2_VECT 5 +#define WKUP_VECT 6 +#define COM1_VECT 7 +#define USB_VECT 8 +#define I2C_VECT 9 +#define INT4_VECT 10 +#define INT5_VECT 11 +#define INT6_VECT 12 + + +typedef struct +{ + BYTE length; + BYTE type; +}DSCR; + +typedef struct // Device Descriptor +{ + BYTE length; // Descriptor length ( = sizeof(DEVICEDSCR) ) + BYTE type; // Decriptor type (Device = 1) + BYTE spec_ver_minor; // Specification Version (BCD) minor + BYTE spec_ver_major; // Specification Version (BCD) major + BYTE dev_class; // Device class + BYTE sub_class; // Device sub-class + BYTE protocol; // Device sub-sub-class + BYTE max_packet; // Maximum packet size + WORD vendor_id; // Vendor ID + WORD product_id; // Product ID + WORD version_id; // Product version ID + BYTE mfg_str; // Manufacturer string index + BYTE prod_str; // Product string index + BYTE serialnum_str; // Serial number string index + BYTE configs; // Number of configurations +}DEVICEDSCR; + +typedef struct // Device Qualifier Descriptor +{ + BYTE length; // Descriptor length ( = sizeof(DEVICEQUALDSCR) ) + BYTE type; // Decriptor type (Device Qualifier = 6) + BYTE spec_ver_minor; // Specification Version (BCD) minor + BYTE spec_ver_major; // Specification Version (BCD) major + BYTE dev_class; // Device class + BYTE sub_class; // Device sub-class + BYTE protocol; // Device sub-sub-class + BYTE max_packet; // Maximum packet size + BYTE configs; // Number of configurations + BYTE reserved0; +}DEVICEQUALDSCR; + +typedef struct +{ + BYTE length; // Configuration length ( = sizeof(CONFIGDSCR) ) + BYTE type; // Descriptor type (Configuration = 2) + WORD config_len; // Configuration + End Points length + BYTE interfaces; // Number of interfaces + BYTE index; // Configuration number + BYTE config_str; // Configuration string + BYTE attrib; // Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu + BYTE power; // Power requirement (div 2 ma) +}CONFIGDSCR; + +typedef struct +{ + BYTE length; // Interface descriptor length ( - sizeof(INTRFCDSCR) ) + BYTE type; // Descriptor type (Interface = 4) + BYTE index; // Zero-based index of this interface + BYTE alt_setting; // Alternate setting + BYTE ep_cnt; // Number of end points + BYTE class; // Interface class + BYTE sub_class; // Interface sub class + BYTE protocol; // Interface sub sub class + BYTE interface_str; // Interface descriptor string index +}INTRFCDSCR; + +typedef struct +{ + BYTE length; // End point descriptor length ( = sizeof(ENDPNTDSCR) ) + BYTE type; // Descriptor type (End point = 5) + BYTE addr; // End point address + BYTE ep_type; // End point type + BYTE mp_L; // Maximum packet size + BYTE mp_H; + BYTE interval; // Interrupt polling interval +}ENDPNTDSCR; + +typedef struct +{ + BYTE length; // String descriptor length + BYTE type; // Descriptor type +}STRINGDSCR; + +typedef struct +{ + BYTE cntrl; // End point control register + BYTE bytes; // End point buffer byte count +}EPIOC; + +typedef struct +{ + BYTE length; + BYTE *dat; + BYTE count; + BYTE status; +}I2CPCKT; + +//----------------------------------------------------------------------------- +// Globals +//----------------------------------------------------------------------------- +extern code BYTE USB_AutoVector; + +extern WORD pDeviceDscr; +extern WORD pDeviceQualDscr; +extern WORD pHighSpeedConfigDscr; +extern WORD pFullSpeedConfigDscr; +extern WORD pConfigDscr; +extern WORD pOtherConfigDscr; +extern WORD pStringDscr; + +extern code DEVICEDSCR DeviceDscr; +extern code DEVICEQUALDSCR DeviceQualDscr; +extern code CONFIGDSCR HighSpeedConfigDscr; +extern code CONFIGDSCR FullSpeedConfigDscr; +extern code STRINGDSCR StringDscr; +extern code DSCR UserDscr; + +extern I2CPCKT I2CPckt; + +//----------------------------------------------------------------------------- +// Function Prototypes +//----------------------------------------------------------------------------- + +extern void EZUSB_Renum(void); +extern void EZUSB_Discon(BOOL renum); + +extern void EZUSB_Susp(void); +extern void EZUSB_Resume(void); + +extern void EZUSB_Delay1ms(void); +extern void EZUSB_Delay(WORD ms); + +extern CONFIGDSCR xdata* EZUSB_GetConfigDscr(BYTE ConfigIdx); +extern INTRFCDSCR xdata* EZUSB_GetIntrfcDscr(BYTE ConfigIdx, BYTE IntrfcIdx, BYTE AltSetting); +extern STRINGDSCR xdata* EZUSB_GetStringDscr(BYTE StrIdx); +extern DSCR xdata* EZUSB_GetDscr(BYTE index, DSCR* dscr, BYTE type); + +extern void EZUSB_InitI2C(void); +extern BOOL EZUSB_WriteI2C_(BYTE addr, BYTE length, BYTE xdata *dat); +extern BOOL EZUSB_ReadI2C_(BYTE addr, BYTE length, BYTE xdata *dat); +extern BOOL EZUSB_WriteI2C(BYTE addr, BYTE length, BYTE xdata *dat); +extern BOOL EZUSB_ReadI2C(BYTE addr, BYTE length, BYTE xdata *dat); +extern void EZUSB_WaitForEEPROMWrite(BYTE addr); + +extern void modify_endpoint_stall(BYTE epid, BYTE stall); + +#endif // FX2_H diff --git a/firmware/CY7C68013A/USBJmpTb.a51 b/firmware/CY7C68013A/USBJmpTb.a51 new file mode 100644 index 0000000..5c1864a --- /dev/null +++ b/firmware/CY7C68013A/USBJmpTb.a51 @@ -0,0 +1,155 @@ +;;----------------------------------------------------------------------------- +;; File: usbjmptb.a51 +;; Contents: +;; +;; $Archive: /USB/Target/Lib/lp/USBJmpTb.a51 $ +;; $Date: 8/12/03 3:32p $ +;; $Revision: 1 $ +;; +;; +;;----------------------------------------------------------------------------- +;; Copyright 2003, Cypress Semiconductor Corporation +;; +;; This software is owned by Cypress Semiconductor Corporation (Cypress) and is +;; protected by United States copyright laws and international treaty provisions. Cypress +;; hereby grants to Licensee a personal, non-exclusive, non-transferable license to copy, +;; use, modify, create derivative works of, and compile the Cypress Source Code and +;; derivative works for the sole purpose of creating custom software in support of Licensee +;; product ("Licensee Product") to be used only in conjunction with a Cypress integrated +;; circuit. Any reproduction, modification, translation, compilation, or representation of this +;; software except as specified above is prohibited without the express written permission of +;; Cypress. +;; +;; Disclaimer: Cypress makes no warranty of any kind, express or implied, with regard to +;; this material, including, but not limited to, the implied warranties of merchantability and +;; fitness for a particular purpose. Cypress reserves the right to make changes without +;; further notice to the materials described herein. Cypress does not assume any liability +;; arising out of the application or use of any product or circuit described herein. Cypress’ +;; products described herein are not authorized for use as components in life-support +;; devices. +;; +;; This software is protected by and subject to worldwide patent coverage, including U.S. +;; and foreign patents. Use may be limited by and subject to the Cypress Software License +;; Agreement. +;;----------------------------------------------------------------------------- +NAME USBJmpTbl + +extrn code (ISR_Sudav, ISR_Sof, ISR_Sutok, ISR_Susp, ISR_Ures, ISR_Highspeed, ISR_Ep0ack, ISR_Stub, ISR_Ep0in, ISR_Ep0out, ISR_Ep1in, ISR_Ep1out, ISR_Ep2inout, ISR_Ep4inout, ISR_Ep6inout, ISR_Ep8inout,ISR_Ibn) + +extrn code (ISR_Ep0pingnak, ISR_Ep1pingnak, ISR_Ep2pingnak, ISR_Ep4pingnak, ISR_Ep6pingnak, ISR_Ep8pingnak, ISR_Errorlimit, ISR_Ep2piderror, ISR_Ep4piderror, ISR_Ep6piderror, ISR_Ep8piderror, ISR_Ep2pflag) + +extrn code (ISR_Ep4pflag, ISR_Ep6pflag, ISR_Ep8pflag, ISR_Ep2eflag, ISR_Ep4eflag, ISR_Ep6eflag, ISR_Ep8eflag, ISR_Ep2fflag, ISR_Ep4fflag, ISR_Ep6fflag, ISR_Ep8fflag, ISR_GpifComplete, ISR_GpifWaveform) + +public USB_Int2AutoVector, USB_Int4AutoVector, USB_Jump_Table +;------------------------------------------------------------------------------ +; Interrupt Vectors +;------------------------------------------------------------------------------ + CSEG AT 43H +USB_Int2AutoVector equ $ + 2 + ljmp USB_Jump_Table ; Autovector will replace byte 45 + + CSEG AT 53H +USB_Int4AutoVector equ $ + 2 + ljmp USB_Jump_Table ; Autovector will replace byte 55 + +;------------------------------------------------------------------------------ +; USB Jump Table +;------------------------------------------------------------------------------ +?PR?USB_JUMP_TABLE?USBJT segment code page ; Place jump table on a page boundary + RSEG ?PR?USB_JUMP_TABLE?USBJT ; autovector jump table +USB_Jump_Table: + ljmp ISR_Sudav ;(00) Setup Data Available + db 0 + ljmp ISR_Sof ;(04) Start of Frame + db 0 + ljmp ISR_Sutok ;(08) Setup Data Loading + db 0 + ljmp ISR_Susp ;(0C) Global Suspend + db 0 + ljmp ISR_Ures ;(10) USB Reset + db 0 + ljmp ISR_Highspeed ;(14) Entered High Speed + db 0 + ljmp ISR_Ep0ack ;(18) EP0ACK + db 0 + ljmp ISR_Stub ;(1C) Reserved + db 0 + ljmp ISR_Ep0in ;(20) EP0 In + db 0 + ljmp ISR_Ep0out ;(24) EP0 Out + db 0 + ljmp ISR_Ep1in ;(28) EP1 In + db 0 + ljmp ISR_Ep1out ;(2C) EP1 Out + db 0 + ljmp ISR_Ep2inout ;(30) EP2 In/Out + db 0 + ljmp ISR_Ep4inout ;(34) EP4 In/Out + db 0 + ljmp ISR_Ep6inout ;(38) EP6 In/Out + db 0 + ljmp ISR_Ep8inout ;(3C) EP8 In/Out + db 0 + ljmp ISR_Ibn ;(40) IBN + db 0 + ljmp ISR_Stub ;(44) Reserved + db 0 + ljmp ISR_Ep0pingnak ;(48) EP0 PING NAK + db 0 + ljmp ISR_Ep1pingnak ;(4C) EP1 PING NAK + db 0 + ljmp ISR_Ep2pingnak ;(50) EP2 PING NAK + db 0 + ljmp ISR_Ep4pingnak ;(54) EP4 PING NAK + db 0 + ljmp ISR_Ep6pingnak ;(58) EP6 PING NAK + db 0 + ljmp ISR_Ep8pingnak ;(5C) EP8 PING NAK + db 0 + ljmp ISR_Errorlimit ;(60) Error Limit + db 0 + ljmp ISR_Stub ;(64) Reserved + db 0 + ljmp ISR_Stub ;(68) Reserved + db 0 + ljmp ISR_Stub ;(6C) Reserved + db 0 + ljmp ISR_Ep2piderror ;(70) EP2 ISO Pid Sequence Error + db 0 + ljmp ISR_Ep4piderror ;(74) EP4 ISO Pid Sequence Error + db 0 + ljmp ISR_Ep6piderror ;(78) EP6 ISO Pid Sequence Error + db 0 + ljmp ISR_Ep8piderror ;(7C) EP8 ISO Pid Sequence Error + db 0 +;INT4_Jump_Table + ljmp ISR_Ep2pflag ;(80) EP2 Programmable Flag + db 0 + ljmp ISR_Ep4pflag ;(84) EP4 Programmable Flag + db 0 + ljmp ISR_Ep6pflag ;(88) EP6 Programmable Flag + db 0 + ljmp ISR_Ep8pflag ;(8C) EP8 Programmable Flag + db 0 + ljmp ISR_Ep2eflag ;(90) EP2 Empty Flag + db 0 + ljmp ISR_Ep4eflag ;(94) EP4 Empty Flag + db 0 + ljmp ISR_Ep6eflag ;(98) EP6 Empty Flag + db 0 + ljmp ISR_Ep8eflag ;(9C) EP8 Empty Flag + db 0 + ljmp ISR_Ep2fflag ;(A0) EP2 Full Flag + db 0 + ljmp ISR_Ep4fflag ;(A4) EP4 Full Flag + db 0 + ljmp ISR_Ep6fflag ;(A8) EP6 Full Flag + db 0 + ljmp ISR_Ep8fflag ;(AC) EP8 Full Flag + db 0 + ljmp ISR_GpifComplete ;(B0) GPIF Operation Complete + db 0 + ljmp ISR_GpifWaveform ;(B4) GPIF Waveform + db 0 + + end diff --git a/firmware/CY7C68013A/drs_eval b/firmware/CY7C68013A/drs_eval new file mode 100644 index 0000000..c73e515 Binary files /dev/null and b/firmware/CY7C68013A/drs_eval differ diff --git a/firmware/CY7C68013A/drs_eval.Uv2 b/firmware/CY7C68013A/drs_eval.Uv2 new file mode 100644 index 0000000..7733114 --- /dev/null +++ b/firmware/CY7C68013A/drs_eval.Uv2 @@ -0,0 +1,114 @@ +### uVision2 Project, (C) Keil Software +### Do not modify ! + +Target (Target 1), 0x0000 // Tools: 'MCS-51' + +Group (Source Group 1) + +File 1,1,<.\drs_eval.c> 0x0 + + +Options 1,0,0 // Target 'Target 1' + Device (EZ-USB FX2 (CY7C68XXX)) + Vendor (Cypress Semiconductor) + Cpu (IRAM(0 - 0xFF) XRAM(0 - 0x3FF) CLOCK(48000000) MODDP2) + FlashUt () + StupF () + FlashDR () + Rgf (REG52.H) + Mem () + C () + A () + RL () + OH () + UseEnv=0 + EnvBin (C:\Program Files\Keil\C51\BIN\) + EnvInc (C:\Cypress\USB\Target\Inc\;C:\Keil\C51\INC\) + EnvLib (C:\Program Files\Keil\C51\LIB\) + EnvReg () + OrgReg () + TgStat=0 + OutDir (.\) + OutName (drs_eval) + GenApp=1 + GenLib=0 + GenHex=1 + Debug=1 + Browse=1 + LstDir (.\) + HexSel=0 + MG32K=0 + TGMORE=0 + RunUsr 0 1 + RunUsr 1 0 <> + BrunUsr 0 0 <> + BrunUsr 1 0 <> + SVCSID <> + MODEL5=0 + RTOS5=0 + ROMSZ5=2 + DHOLD5=0 + XHOLD5=0 + T51FL=304 + CBANKS5=4 + XBANKS5=0 + RCB51 { 0,0,0,0,0,255,255,0,0 } + RXB51 { 0,0,0,0,0,0,0,0,0 } + OCM51 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + OCR51 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + IRO51 { 0,0,0,0,0,0,0,0,0 } + IRA51 { 0,0,0,0,0,0,1,0,0 } + XRA51 { 0,0,0,0,0,0,4,0,0 } + XRA512 { 0,0,0,0,0,0,0,0,0 } + C51FL=21597456 + C51VA=0 + C51MSC () + C51DEF () + C51UDF () + INCC5 (c:\cypress\usb\target\inc) + AX51FL=4 + AX51MSC () + AX51SET () + AX51RST () + INCA5 () + PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + IncBld=1 + AlwaysBuild=0 + GenAsm=0 + AsmAsm=0 + PublicsOnly=0 + StopCode=3 + CustArgs () + LibMods () + BankNo=65535 + LX51FL=288 + LX51OVL () + LX51MSC () + LX51DWN () + LX51LFI () + LX51ASN () + LX51RES () + LX51CCL () + LX51UCL () + LX51CSC () + LX51UCS () + LX51COB (0x0080) + LX51XDB (0x1000) + LX51PDB () + LX51BIB () + LX51DAB () + LX51IDB () + LX51PRC () + LX51STK () + LX51COS () + LX51XDS () + LX51BIS () + LX51DAS () + LX51IDS () + OPTDL (S8051.DLL)()(DP51.DLL)(-p52)(S8051.DLL)()(TP51.DLL)(-p52) + OPTDBG 49149,-1,()()()()()()()()()() (BIN\Mon51.dll)()()() + FLASH1 { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + FLASH2 () + FLASH3 ("" ()) +EndOpt + diff --git a/firmware/CY7C68013A/drs_eval.c b/firmware/CY7C68013A/drs_eval.c new file mode 100644 index 0000000..fef9473 --- /dev/null +++ b/firmware/CY7C68013A/drs_eval.c @@ -0,0 +1,160 @@ +/********************************************************************\ + + Name: drs_eval.c + Created by: Stefan Ritt + + Contents: Cy7c68013A firmware for DRS4 evaluation board + + $Id: drs_eval.c 18733 2011-12-14 07:57:23Z ritt $ + +\********************************************************************/ + +#define ALLOCATE_EXTERN + +#include "fx2.h" +#include "fx2regs.h" +#include "intrins.h" + +/* Syncronization delay: + CPU running at 12 MHz + FIFO running at 30 MHz + -> 3 CPU cycles +*/ +#define SYNCDELAY _nop_( ); _nop_( ); _nop_( ) + +void config_ep4_ep8() +{ + /* default values for Reset to work */ + SYNCDELAY; + EP4FIFOCFG = 0x03; + + SYNCDELAY; + EP8FIFOCFG = 0x03; + + /* Endpoint 4 Configuration + BULK OUT 512 Bytes + */ + SYNCDELAY; + EP4CFG = 0xA0; // equals default + + /* Endpoint 8 Configuration + BULK IN 512 Bytes + */ + SYNCDELAY; + EP8CFG = 0xE0; // equals default + + /* FIFO Reset */ + SYNCDELAY; + FIFORESET = 0x80; // NAKALL + SYNCDELAY; + FIFORESET = 0x84; // Reset EP4 + SYNCDELAY; + FIFORESET = 0x88; // Reset EP8 + SYNCDELAY; + FIFORESET = 0x00; // Normal operation + + /* Flags definition: + FLAGA is progammed level flag + FLAGB is full flag + FLAGC is empty flag + */ + PINFLAGSAB = 0x00; + PINFLAGSCD = 0x00; + + /* set all FIFO interface pins as active low */ + SYNCDELAY; + FIFOPINPOLAR = 0x00; + + /* EZ-USB automatically commits data in 512-byte chunks */ + SYNCDELAY; + EP8AUTOINLENH = 0x02; // equals default + SYNCDELAY; + EP8AUTOINLENL = 0x00; // equals default + + /* arm EP4 OUT buffer with SKIP=1 */ + SYNCDELAY; + OUTPKTEND = 0x84; // first buffer + SYNCDELAY; + OUTPKTEND = 0x84; // second buffer + + /* Endpoint 4 FIFO configuration + 0 dummy + INFM1 = 0 "IN Full Minus One" off + OEP1 = 0 "OUT Empty Plus One" off + AUTOOUT = 1 Automatically commit OUT packets + AUTOIN = 0 Automatically commit IN packets off + ZEROLENIN = 0 Disable zero length packets + 0 dummy + WORDWIDE = 1 Use word wide FIFO + */ + SYNCDELAY; + EP4FIFOCFG = 0x11; + + /* Endpoint 8 FIFO configuration + 0 dummy + INFM1 = 0 "IN Full Minus One" off + OEP1 = 0 "OUT Empty Plus One" off + AUTOOUT = 0 Automatically commit OUT packets off + AUTOIN = 1 Automatically commit IN packets + ZEROLENIN = 1 Disable zero length packets + 0 dummy + WORDWIDE = 1 Use word wide FIFO + */ + SYNCDELAY; + EP8FIFOCFG = 0x0D; +} + +main() +{ + /* Configure interface: + IFCLKSDRC = 1 use internal FIFO clock + 3048MHZ = 0 select internal 30 MHz clock + IFCLKOE = 1 enable IFCLK pin output + IFCLKPOL = 0 do not invert clock + ASYNC = 0 use synchronous mode + GSTATE = 0 do not output GSTATE bits + IFCFG1:0 = 11 select slave FIFO interface + */ + IFCONFIG = 0xA3; + + /* Chip revision control + DYN_OUT = 1 endpoints are not auto-armed on AUTOOUT transitions + ENH_PKT = 1 enable CPU enhanced packet handling + */ + SYNCDELAY; + REVCTL = 0x03; + + config_ep4_ep8(); + + // set LED port to output + OEA = 0x01; + // turn on LED + PA0 = 1; + + // set the CPU clock to 48MHz + // CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1) ; + + // set RENUM = 0 to let EZ-USB handle all traffic + USBCS &=!bmRENUM; + + while (1) { + SYNCDELAY; + EP1OUTBC = 1; // arm EP1 to receive data + while (EP1OUTCS & bmBIT1); // wait until data available + PA0 = EP1OUTBUF[0]; + + /* echo back data */ + /* + EP1INBUF[0] = EP1OUTBUF[0] + 1; + + SYNCDELAY; + EP1INBC = 1; // arm EP1 to send data + while (EP1INCS & bmBIT1); // wait until host has read data + */ + + config_ep4_ep8(); + } + + while (1); +} + diff --git a/firmware/CY7C68013A/drs_eval.hex b/firmware/CY7C68013A/drs_eval.hex new file mode 100644 index 0000000..d8de2ee --- /dev/null +++ b/firmware/CY7C68013A/drs_eval.hex @@ -0,0 +1,14 @@ +:10008000000090E6197403F0000090E61BF00000F9 +:1000900090E61374A0F0000090E61574E0F0000004 +:1000A00090E6047480F000007484F000007488F01E +:1000B0000000E4F090E602F0A3F0000090E609F002 +:1000C000000090E6267402F00000E4A3F000009027 +:1000D000E6497484F00000F0000090E6197411F015 +:0900E000000090E61B740DF022F3 +:1000E90090E60174A3F0000090E60B7403F012008F +:1000F9008075B201D28090E680E0E4F0000090E6DD +:100109008D7401F090E6A1E020E1F990E780E02408 +:0B011900FF928012008080E480FE2234 +:03000000020124D6 +:0C012400787FE4F6D8FD7581070200E941 +:00000001FF diff --git a/firmware/CY7C68013A/drs_eval.iic b/firmware/CY7C68013A/drs_eval.iic new file mode 100644 index 0000000..4d400e9 Binary files /dev/null and b/firmware/CY7C68013A/drs_eval.iic differ diff --git a/firmware/CY7C68013A/dscr.a51 b/firmware/CY7C68013A/dscr.a51 new file mode 100644 index 0000000..0e1f7c2 --- /dev/null +++ b/firmware/CY7C68013A/dscr.a51 @@ -0,0 +1,250 @@ +;;----------------------------------------------------------------------------- +;; File: dscr.a51 +;; Contents: This file contains descriptor data tables. +;; +;; $Archive: /USB/Examples/Fx2lp/bulkloop/dscr.a51 $ +;; $Date: 9/01/03 8:51p $ +;; $Revision: 3 $ +;; +;; +;;----------------------------------------------------------------------------- +;; Copyright 2003, Cypress Semiconductor Corporation +;;-----------------------------------------------------------------------------;;----------------------------------------------------------------------------- + +DSCR_DEVICE equ 1 ;; Descriptor type: Device +DSCR_CONFIG equ 2 ;; Descriptor type: Configuration +DSCR_STRING equ 3 ;; Descriptor type: String +DSCR_INTRFC equ 4 ;; Descriptor type: Interface +DSCR_ENDPNT equ 5 ;; Descriptor type: Endpoint +DSCR_DEVQUAL equ 6 ;; Descriptor type: Device Qualifier + +DSCR_DEVICE_LEN equ 18 +DSCR_CONFIG_LEN equ 9 +DSCR_INTRFC_LEN equ 9 +DSCR_ENDPNT_LEN equ 7 +DSCR_DEVQUAL_LEN equ 10 + +ET_CONTROL equ 0 ;; Endpoint type: Control +ET_ISO equ 1 ;; Endpoint type: Isochronous +ET_BULK equ 2 ;; Endpoint type: Bulk +ET_INT equ 3 ;; Endpoint type: Interrupt + +public DeviceDscr, DeviceQualDscr, HighSpeedConfigDscr, FullSpeedConfigDscr, StringDscr, UserDscr + +DSCR SEGMENT CODE PAGE + +;;----------------------------------------------------------------------------- +;; Global Variables +;;----------------------------------------------------------------------------- + rseg DSCR ;; locate the descriptor table in on-part memory. + +DeviceDscr: + db DSCR_DEVICE_LEN ;; Descriptor length + db DSCR_DEVICE ;; Decriptor type + dw 0002H ;; Specification Version (BCD) + db 00H ;; Device class + db 00H ;; Device sub-class + db 01H ;; Device sub-sub-class + db 64 ;; Maximum packet size + dw 0B404H ;; Vendor ID + dw 7511H ;; Product ID (Sample Device) + dw 0100H ;; Product version ID + db 1 ;; Manufacturer string index + db 2 ;; Product string index + db 3 ;; Serial number string index + db 1 ;; Number of configurations + +DeviceQualDscr: + db DSCR_DEVQUAL_LEN ;; Descriptor length + db DSCR_DEVQUAL ;; Decriptor type + dw 0002H ;; Specification Version (BCD) + db 00H ;; Device class + db 00H ;; Device sub-class + db 00H ;; Device sub-sub-class + db 64 ;; Maximum packet size + db 1 ;; Number of configurations + db 0 ;; Reserved + +HighSpeedConfigDscr: + db DSCR_CONFIG_LEN ;; Descriptor length + db DSCR_CONFIG ;; Descriptor type + db (HighSpeedConfigDscrEnd-HighSpeedConfigDscr) mod 256 ;; Total Length (LSB) + db (HighSpeedConfigDscrEnd-HighSpeedConfigDscr) / 256 ;; Total Length (MSB) + db 1 ;; Number of interfaces + db 1 ;; Configuration number + db 0 ;; Configuration string + db 10000000b ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu) + db 250 ;; Power requirement (div 2 ma) + +;; Interface Descriptor + db DSCR_INTRFC_LEN ;; Descriptor length + db DSCR_INTRFC ;; Descriptor type + db 0 ;; Zero-based index of this interface + db 0 ;; Alternate setting + db 4 ;; Number of end points + db 0ffH ;; Interface class + db 00H ;; Interface sub class + db 00H ;; Interface sub sub class + db 0 ;; Interface descriptor string index + +;; Endpoint Descriptor + db DSCR_ENDPNT_LEN ;; Descriptor length + db DSCR_ENDPNT ;; Descriptor type + db 01H ;; Endpoint number, and direction + db ET_BULK ;; Endpoint type + db 00H ;; Maximun packet size (LSB) + db 02H ;; Max packect size (MSB) + db 00H ;; Polling interval + +;; Endpoint Descriptor + db DSCR_ENDPNT_LEN ;; Descriptor length + db DSCR_ENDPNT ;; Descriptor type + db 04H ;; Endpoint number, and direction + db ET_BULK ;; Endpoint type + db 00H ;; Maximun packet size (LSB) + db 02H ;; Max packect size (MSB) + db 00H ;; Polling interval + +;; Endpoint Descriptor + db DSCR_ENDPNT_LEN ;; Descriptor length + db DSCR_ENDPNT ;; Descriptor type + db 81H ;; Endpoint number, and direction + db ET_BULK ;; Endpoint type + db 00H ;; Maximun packet size (LSB) + db 02H ;; Max packect size (MSB) + db 00H ;; Polling interval + +;; Endpoint Descriptor + db DSCR_ENDPNT_LEN ;; Descriptor length + db DSCR_ENDPNT ;; Descriptor type + db 88H ;; Endpoint number, and direction + db ET_BULK ;; Endpoint type + db 00H ;; Maximun packet size (LSB) + db 02H ;; Max packect size (MSB) + db 00H ;; Polling interval + +HighSpeedConfigDscrEnd: + +FullSpeedConfigDscr: + db DSCR_CONFIG_LEN ;; Descriptor length + db DSCR_CONFIG ;; Descriptor type + db (FullSpeedConfigDscrEnd-FullSpeedConfigDscr) mod 256 ;; Total Length (LSB) + db (FullSpeedConfigDscrEnd-FullSpeedConfigDscr) / 256 ;; Total Length (MSB) + db 1 ;; Number of interfaces + db 1 ;; Configuration number + db 0 ;; Configuration string + db 10000000b ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu) + db 250 ;; Power requirement (div 2 ma) + +;; Interface Descriptor + db DSCR_INTRFC_LEN ;; Descriptor length + db DSCR_INTRFC ;; Descriptor type + db 0 ;; Zero-based index of this interface + db 0 ;; Alternate setting + db 4 ;; Number of end points + db 0ffH ;; Interface class + db 00H ;; Interface sub class + db 00H ;; Interface sub sub class + db 0 ;; Interface descriptor string index + +;; Endpoint Descriptor + db DSCR_ENDPNT_LEN ;; Descriptor length + db DSCR_ENDPNT ;; Descriptor type + db 02H ;; Endpoint number, and direction + db ET_BULK ;; Endpoint type + db 40H ;; Maximun packet size (LSB) + db 00H ;; Max packect size (MSB) + db 00H ;; Polling interval + +;; Endpoint Descriptor + db DSCR_ENDPNT_LEN ;; Descriptor length + db DSCR_ENDPNT ;; Descriptor type + db 04H ;; Endpoint number, and direction + db ET_BULK ;; Endpoint type + db 40H ;; Maximun packet size (LSB) + db 00H ;; Max packect size (MSB) + db 00H ;; Polling interval + +;; Endpoint Descriptor + db DSCR_ENDPNT_LEN ;; Descriptor length + db DSCR_ENDPNT ;; Descriptor type + db 86H ;; Endpoint number, and direction + db ET_BULK ;; Endpoint type + db 40H ;; Maximun packet size (LSB) + db 00H ;; Max packect size (MSB) + db 00H ;; Polling interval + +;; Endpoint Descriptor + db DSCR_ENDPNT_LEN ;; Descriptor length + db DSCR_ENDPNT ;; Descriptor type + db 88H ;; Endpoint number, and direction + db ET_BULK ;; Endpoint type + db 40H ;; Maximun packet size (LSB) + db 00H ;; Max packect size (MSB) + db 00H ;; Polling interval + +FullSpeedConfigDscrEnd: + +StringDscr: + +StringDscr0: + db StringDscr0End-StringDscr0 ;; String descriptor length + db DSCR_STRING + db 09H,04H +StringDscr0End: + +StringDscr1: + db StringDscr1End-StringDscr1 ;; String descriptor length + db DSCR_STRING + db 'S',00 + db '.',00 + db ' ',00 + db 'R',00 + db 'i',00 + db 't',00 + db 't',00 + db ' ',00 + db 'P',00 + db 'S',00 + db 'I',00 +StringDscr1End: + +StringDscr2: + db StringDscr2End-StringDscr2 ;; Descriptor length + db DSCR_STRING + db 'D',00 + db 'R',00 + db 'S',00 + db '4',00 + db ' ',00 + db 'E',00 + db 'v',00 + db 'a',00 + db 'l',00 + db 'u',00 + db 'a',00 + db 't',00 + db 'i',00 + db 'o',00 + db 'n',00 + db ' ',00 + db 'B',00 + db 'o',00 + db 'a',00 + db 'r',00 + db 'd',00 +StringDscr2End: + +StringDscr3: + db StringDscr3End-StringDscr3 ;; String descriptor length + db DSCR_STRING + db 'R',00 + db 'E',00 + db 'V',00 + db '1',00 +StringDscr3End: + +UserDscr: + dw 0000H + end + diff --git a/firmware/CY7C68013A/fw.c b/firmware/CY7C68013A/fw.c new file mode 100644 index 0000000..5719b34 --- /dev/null +++ b/firmware/CY7C68013A/fw.c @@ -0,0 +1,368 @@ +//----------------------------------------------------------------------------- +// File: fw.c +// Contents: Firmware frameworks task dispatcher and device request parser +// +// $Id: fw.c 15170 2010-04-30 06:27:56Z ritt $ +// +// +//----------------------------------------------------------------------------- +// Copyright 2003, Cypress Semiconductor Corporation +//----------------------------------------------------------------------------- +#include "fx2.h" +#include "fx2regs.h" +#include "fx2sdly.h" // SYNCDELAY macro + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- +#define DELAY_COUNT 0x9248*8L // Delay for 8 sec at 24Mhz, 4 sec at 48 +#define _IFREQ 48000 // IFCLK constant for Synchronization Delay +#define _CFREQ 48000 // CLKOUT constant for Synchronization Delay + +//----------------------------------------------------------------------------- +// Random Macros +//----------------------------------------------------------------------------- +#define min(a,b) (((a)<(b))?(a):(b)) +#define max(a,b) (((a)>(b))?(a):(b)) + +//----------------------------------------------------------------------------- +// Global Variables +//----------------------------------------------------------------------------- +volatile BOOL GotSUD; +BOOL Rwuen; +BOOL Selfpwr; +volatile BOOL Sleep; // Sleep mode enable flag + +WORD pDeviceDscr; // Pointer to Device Descriptor; Descriptors may be moved +WORD pDeviceQualDscr; +WORD pHighSpeedConfigDscr; +WORD pFullSpeedConfigDscr; +WORD pConfigDscr; +WORD pOtherConfigDscr; +WORD pStringDscr; + +//----------------------------------------------------------------------------- +// Prototypes +//----------------------------------------------------------------------------- +void SetupCommand(void); +void TD_Init(void); +void TD_Poll(void); +BOOL TD_Suspend(void); +BOOL TD_Resume(void); + +BOOL DR_GetDescriptor(void); +BOOL DR_SetConfiguration(void); +BOOL DR_GetConfiguration(void); +BOOL DR_SetInterface(void); +BOOL DR_GetInterface(void); +BOOL DR_GetStatus(void); +BOOL DR_ClearFeature(void); +BOOL DR_SetFeature(void); +BOOL DR_VendorCmnd(void); + +// this table is used by the epcs macro +const char code EPCS_Offset_Lookup_Table[] = +{ + 0, // EP1OUT + 1, // EP1IN + 2, // EP2OUT + 2, // EP2IN + 3, // EP4OUT + 3, // EP4IN + 4, // EP6OUT + 4, // EP6IN + 5, // EP8OUT + 5, // EP8IN +}; + +// macro for generating the address of an endpoint's control and status register (EPnCS) +#define epcs(EP) (EPCS_Offset_Lookup_Table[(EP & 0x7E) | (EP > 128)] + 0xE6A1) + +//----------------------------------------------------------------------------- +// Code +//----------------------------------------------------------------------------- + +// Task dispatcher +void main(void) +{ + DWORD i; + WORD offset; + DWORD DevDescrLen; + DWORD j=0; + WORD IntDescrAddr; + WORD ExtDescrAddr; + + // Initialize Global States + Sleep = FALSE; // Disable sleep mode + Rwuen = FALSE; // Disable remote wakeup + Selfpwr = FALSE; // Disable self powered + GotSUD = FALSE; // Clear "Got setup data" flag + + // Initialize user device + TD_Init(); + + // The following section of code is used to relocate the descriptor table. + // The frameworks uses SUDPTRH and SUDPTRL to automate the SETUP requests + // for descriptors. These registers only work with memory locations + // in the EZ-USB internal RAM. Therefore, if the descriptors are located + // in external RAM, they must be copied to in internal RAM. + // The descriptor table is relocated by the frameworks ONLY if it is found + // to be located in external memory. + pDeviceDscr = (WORD)&DeviceDscr; + pDeviceQualDscr = (WORD)&DeviceQualDscr; + pHighSpeedConfigDscr = (WORD)&HighSpeedConfigDscr; + pFullSpeedConfigDscr = (WORD)&FullSpeedConfigDscr; + pStringDscr = (WORD)&StringDscr; + + // Is the descriptor table in external RAM (> 16Kbytes)? If yes, + // then relocate. + // Note that this code only checks if the descriptors START in + // external RAM. It will not work if the descriptor table spans + // internal and external RAM. + if ((WORD)&DeviceDscr & 0xC000) + { + // first, relocate the descriptors + IntDescrAddr = INTERNAL_DSCR_ADDR; + ExtDescrAddr = (WORD)&DeviceDscr; + DevDescrLen = (WORD)&UserDscr - (WORD)&DeviceDscr + 2; + for (i = 0; i < DevDescrLen; i++) + *((BYTE xdata *)IntDescrAddr+i) = *((BYTE xdata *)ExtDescrAddr+i); + + // update all of the descriptor pointers + pDeviceDscr = IntDescrAddr; + offset = (WORD)&DeviceDscr - INTERNAL_DSCR_ADDR; + pDeviceQualDscr -= offset; + pConfigDscr -= offset; + pOtherConfigDscr -= offset; + pHighSpeedConfigDscr -= offset; + pFullSpeedConfigDscr -= offset; + pStringDscr -= offset; + } + + EZUSB_IRQ_ENABLE(); // Enable USB interrupt (INT2) + EZUSB_ENABLE_RSMIRQ(); // Wake-up interrupt + + INTSETUP |= (bmAV2EN | bmAV4EN); // Enable INT 2 & 4 autovectoring + + USBIE |= bmSUDAV | bmSUTOK | bmSUSP | bmURES | bmHSGRANT; // Enable selected interrupts + EA = 1; // Enable 8051 interrupts + +#ifndef NO_RENUM + // Renumerate if necessary. Do this by checking the renum bit. If it + // is already set, there is no need to renumerate. The renum bit will + // already be set if this firmware was loaded from an eeprom. + if(!(USBCS & bmRENUM)) + { + EZUSB_Discon(TRUE); // renumerate + } +#endif + + // unconditionally re-connect. If we loaded from eeprom we are + // disconnected and need to connect. If we just renumerated this + // is not necessary but doesn't hurt anything + USBCS &=~bmDISCON; + + CKCON = (CKCON&(~bmSTRETCH)) | FW_STRETCH_VALUE; // Set stretch + + // clear the Sleep flag. + Sleep = FALSE; + + // Task Dispatcher + while(TRUE) // Main Loop + { + // Poll User Device + TD_Poll(); + + // Check for pending SETUP + if(GotSUD) + { + SetupCommand(); // Implement setup command + GotSUD = FALSE; // Clear SETUP flag + } + + // check for and handle suspend. + // NOTE: Idle mode stops the processor clock. There are only two + // ways out of idle mode, the WAKEUP pin, and detection of the USB + // resume state on the USB bus. The timers will stop and the + // processor will not wake up on any other interrupts. + if (Sleep) + { + if(TD_Suspend()) + { + Sleep = FALSE; // Clear the "go to sleep" flag. Do it here to prevent any race condition between wakeup and the next sleep. + do + { + EZUSB_Susp(); // Place processor in idle mode. + } + while(!Rwuen && EZUSB_EXTWAKEUP()); + // above. Must continue to go back into suspend if the host has disabled remote wakeup + // *and* the wakeup was caused by the external wakeup pin. + + // 8051 activity will resume here due to USB bus or Wakeup# pin activity. + EZUSB_Resume(); // If source is the Wakeup# pin, signal the host to Resume. + TD_Resume(); + } + } + + } +} + +BOOL HighSpeedCapable() +{ + // this function determines if the chip is high-speed capable. + // FX2 and FX2LP are high-speed capable. FX1 is not - it does + // not have a high-speed transceiver. + + if (GPCR2 & bmFULLSPEEDONLY) + return FALSE; + else + return TRUE; +} + +// Device request parser +void SetupCommand(void) +{ + void *dscr_ptr; + + switch(SETUPDAT[1]) + { + case SC_GET_DESCRIPTOR: // *** Get Descriptor + if(DR_GetDescriptor()) + switch(SETUPDAT[3]) + { + case GD_DEVICE: // Device + SUDPTRH = MSB(pDeviceDscr); + SUDPTRL = LSB(pDeviceDscr); + break; + case GD_DEVICE_QUALIFIER: // Device Qualifier + // only retuen a device qualifier if this is a high speed + // capable chip. + if (HighSpeedCapable()) + { + SUDPTRH = MSB(pDeviceQualDscr); + SUDPTRL = LSB(pDeviceQualDscr); + } + else + { + EZUSB_STALL_EP0(); + } + break; + case GD_CONFIGURATION: // Configuration + SUDPTRH = MSB(pConfigDscr); + SUDPTRL = LSB(pConfigDscr); + break; + case GD_OTHER_SPEED_CONFIGURATION: // Other Speed Configuration + SUDPTRH = MSB(pOtherConfigDscr); + SUDPTRL = LSB(pOtherConfigDscr); + break; + case GD_STRING: // String + if(dscr_ptr = (void *)EZUSB_GetStringDscr(SETUPDAT[2])) + { + SUDPTRH = MSB(dscr_ptr); + SUDPTRL = LSB(dscr_ptr); + } + else + EZUSB_STALL_EP0(); // Stall End Point 0 + break; + default: // Invalid request + EZUSB_STALL_EP0(); // Stall End Point 0 + } + break; + case SC_GET_INTERFACE: // *** Get Interface + DR_GetInterface(); + break; + case SC_SET_INTERFACE: // *** Set Interface + DR_SetInterface(); + break; + case SC_SET_CONFIGURATION: // *** Set Configuration + DR_SetConfiguration(); + break; + case SC_GET_CONFIGURATION: // *** Get Configuration + DR_GetConfiguration(); + break; + case SC_GET_STATUS: // *** Get Status + if(DR_GetStatus()) + switch(SETUPDAT[0]) + { + case GS_DEVICE: // Device + EP0BUF[0] = ((BYTE)Rwuen << 1) | (BYTE)Selfpwr; + EP0BUF[1] = 0; + EP0BCH = 0; + EP0BCL = 2; + break; + case GS_INTERFACE: // Interface + EP0BUF[0] = 0; + EP0BUF[1] = 0; + EP0BCH = 0; + EP0BCL = 2; + break; + case GS_ENDPOINT: // End Point + EP0BUF[0] = *(BYTE xdata *) epcs(SETUPDAT[4]) & bmEPSTALL; + EP0BUF[1] = 0; + EP0BCH = 0; + EP0BCL = 2; + break; + default: // Invalid Command + EZUSB_STALL_EP0(); // Stall End Point 0 + } + break; + case SC_CLEAR_FEATURE: // *** Clear Feature + if(DR_ClearFeature()) + switch(SETUPDAT[0]) + { + case FT_DEVICE: // Device + if(SETUPDAT[2] == 1) + Rwuen = FALSE; // Disable Remote Wakeup + else + EZUSB_STALL_EP0(); // Stall End Point 0 + break; + case FT_ENDPOINT: // End Point + if(SETUPDAT[2] == 0) + { + *(BYTE xdata *) epcs(SETUPDAT[4]) &= ~bmEPSTALL; + EZUSB_RESET_DATA_TOGGLE( SETUPDAT[4] ); + } + else + EZUSB_STALL_EP0(); // Stall End Point 0 + break; + } + break; + case SC_SET_FEATURE: // *** Set Feature + if(DR_SetFeature()) + switch(SETUPDAT[0]) + { + case FT_DEVICE: // Device + if(SETUPDAT[2] == 1) + Rwuen = TRUE; // Enable Remote Wakeup + else if(SETUPDAT[2] == 2) + // Set Feature Test Mode. The core handles this request. However, it is + // necessary for the firmware to complete the handshake phase of the + // control transfer before the chip will enter test mode. It is also + // necessary for FX2 to be physically disconnected (D+ and D-) + // from the host before it will enter test mode. + break; + else + EZUSB_STALL_EP0(); // Stall End Point 0 + break; + case FT_ENDPOINT: // End Point + *(BYTE xdata *) epcs(SETUPDAT[4]) |= bmEPSTALL; + break; + default: + EZUSB_STALL_EP0(); // Stall End Point 0 + } + break; + default: // *** Invalid Command + if(DR_VendorCmnd()) + EZUSB_STALL_EP0(); // Stall End Point 0 + } + + // Acknowledge handshake phase of device request + EP0CS |= bmHSNAK; +} + +// Wake-up interrupt handler +void resume_isr(void) interrupt WKUP_VECT +{ + EZUSB_CLEAR_RSMIRQ(); +} + diff --git a/firmware/CY7C68013A/fx2regs.h b/firmware/CY7C68013A/fx2regs.h new file mode 100644 index 0000000..7802424 --- /dev/null +++ b/firmware/CY7C68013A/fx2regs.h @@ -0,0 +1,686 @@ +//----------------------------------------------------------------------------- +// File: FX2regs.h +// Contents: EZ-USB FX2/FX2LP/FX1 register declarations and bit mask definitions. +// +// $Archive: /USB/Target/Inc/fx2regs.h $ +// $Date: 4/13/05 4:29p $ +// $Revision: 42 $ +// $Id: fx2regs.h 11698 2008-06-12 15:28:35Z ritt@PSI.CH $ +// +// Copyright (c) 2005 Cypress Semiconductor, All rights reserved +//----------------------------------------------------------------------------- + +#ifndef FX2REGS_H /* Header Sentry */ +#define FX2REGS_H + +//----------------------------------------------------------------------------- +// FX2/FX2LP/FX1 Related Register Assignments +//----------------------------------------------------------------------------- + +// The Ez-USB FX2/FX2LP/FX1 registers are defined here. We use fx2regs.h for register +// address allocation by using "#define ALLOCATE_EXTERN". +// When using "#define ALLOCATE_EXTERN", you get (for instance): +// xdata volatile BYTE OUT7BUF[64] _at_ 0x7B40; +// Such lines are created from FX2.h by using the preprocessor. +// Incidently, these lines will not generate any space in the resulting hex +// file; they just bind the symbols to the addresses for compilation. +// You just need to put "#define ALLOCATE_EXTERN" in your main program file; +// i.e. fw.c or a stand-alone C source file. +// Without "#define ALLOCATE_EXTERN", you just get the external reference: +// extern xdata volatile BYTE OUT7BUF[64] ;// 0x7B40; +// This uses the concatenation operator "##" to insert a comment "//" +// to cut off the end of the line, "_at_ 0x7B40;", which is not wanted. + +#ifdef ALLOCATE_EXTERN +#define EXTERN +#define _AT_ _at_ +#else +#define EXTERN extern +#define _AT_ ;/ ## / +#endif + +EXTERN xdata volatile BYTE GPIF_WAVE_DATA _AT_ 0xE400; +EXTERN xdata volatile BYTE RES_WAVEDATA_END _AT_ 0xE480; + +// General Configuration + +EXTERN xdata volatile BYTE CPUCS _AT_ 0xE600; // Control & Status +EXTERN xdata volatile BYTE IFCONFIG _AT_ 0xE601; // Interface Configuration +EXTERN xdata volatile BYTE PINFLAGSAB _AT_ 0xE602; // FIFO FLAGA and FLAGB Assignments +EXTERN xdata volatile BYTE PINFLAGSCD _AT_ 0xE603; // FIFO FLAGC and FLAGD Assignments +EXTERN xdata volatile BYTE FIFORESET _AT_ 0xE604; // Restore FIFOS to default state +EXTERN xdata volatile BYTE BREAKPT _AT_ 0xE605; // Breakpoint +EXTERN xdata volatile BYTE BPADDRH _AT_ 0xE606; // Breakpoint Address H +EXTERN xdata volatile BYTE BPADDRL _AT_ 0xE607; // Breakpoint Address L +EXTERN xdata volatile BYTE UART230 _AT_ 0xE608; // 230 Kbaud clock for T0,T1,T2 +EXTERN xdata volatile BYTE FIFOPINPOLAR _AT_ 0xE609; // FIFO polarities +EXTERN xdata volatile BYTE REVID _AT_ 0xE60A; // Chip Revision +EXTERN xdata volatile BYTE REVCTL _AT_ 0xE60B; // Chip Revision Control + +// Endpoint Configuration + +EXTERN xdata volatile BYTE EP1OUTCFG _AT_ 0xE610; // Endpoint 1-OUT Configuration +EXTERN xdata volatile BYTE EP1INCFG _AT_ 0xE611; // Endpoint 1-IN Configuration +EXTERN xdata volatile BYTE EP2CFG _AT_ 0xE612; // Endpoint 2 Configuration +EXTERN xdata volatile BYTE EP4CFG _AT_ 0xE613; // Endpoint 4 Configuration +EXTERN xdata volatile BYTE EP6CFG _AT_ 0xE614; // Endpoint 6 Configuration +EXTERN xdata volatile BYTE EP8CFG _AT_ 0xE615; // Endpoint 8 Configuration +EXTERN xdata volatile BYTE EP2FIFOCFG _AT_ 0xE618; // Endpoint 2 FIFO configuration +EXTERN xdata volatile BYTE EP4FIFOCFG _AT_ 0xE619; // Endpoint 4 FIFO configuration +EXTERN xdata volatile BYTE EP6FIFOCFG _AT_ 0xE61A; // Endpoint 6 FIFO configuration +EXTERN xdata volatile BYTE EP8FIFOCFG _AT_ 0xE61B; // Endpoint 8 FIFO configuration +EXTERN xdata volatile BYTE EP2AUTOINLENH _AT_ 0xE620; // Endpoint 2 Packet Length H (IN only) +EXTERN xdata volatile BYTE EP2AUTOINLENL _AT_ 0xE621; // Endpoint 2 Packet Length L (IN only) +EXTERN xdata volatile BYTE EP4AUTOINLENH _AT_ 0xE622; // Endpoint 4 Packet Length H (IN only) +EXTERN xdata volatile BYTE EP4AUTOINLENL _AT_ 0xE623; // Endpoint 4 Packet Length L (IN only) +EXTERN xdata volatile BYTE EP6AUTOINLENH _AT_ 0xE624; // Endpoint 6 Packet Length H (IN only) +EXTERN xdata volatile BYTE EP6AUTOINLENL _AT_ 0xE625; // Endpoint 6 Packet Length L (IN only) +EXTERN xdata volatile BYTE EP8AUTOINLENH _AT_ 0xE626; // Endpoint 8 Packet Length H (IN only) +EXTERN xdata volatile BYTE EP8AUTOINLENL _AT_ 0xE627; // Endpoint 8 Packet Length L (IN only) +EXTERN xdata volatile BYTE EP2FIFOPFH _AT_ 0xE630; // EP2 Programmable Flag trigger H +EXTERN xdata volatile BYTE EP2FIFOPFL _AT_ 0xE631; // EP2 Programmable Flag trigger L +EXTERN xdata volatile BYTE EP4FIFOPFH _AT_ 0xE632; // EP4 Programmable Flag trigger H +EXTERN xdata volatile BYTE EP4FIFOPFL _AT_ 0xE633; // EP4 Programmable Flag trigger L +EXTERN xdata volatile BYTE EP6FIFOPFH _AT_ 0xE634; // EP6 Programmable Flag trigger H +EXTERN xdata volatile BYTE EP6FIFOPFL _AT_ 0xE635; // EP6 Programmable Flag trigger L +EXTERN xdata volatile BYTE EP8FIFOPFH _AT_ 0xE636; // EP8 Programmable Flag trigger H +EXTERN xdata volatile BYTE EP8FIFOPFL _AT_ 0xE637; // EP8 Programmable Flag trigger L +EXTERN xdata volatile BYTE EP2ISOINPKTS _AT_ 0xE640; // EP2 (if ISO) IN Packets per frame (1-3) +EXTERN xdata volatile BYTE EP4ISOINPKTS _AT_ 0xE641; // EP4 (if ISO) IN Packets per frame (1-3) +EXTERN xdata volatile BYTE EP6ISOINPKTS _AT_ 0xE642; // EP6 (if ISO) IN Packets per frame (1-3) +EXTERN xdata volatile BYTE EP8ISOINPKTS _AT_ 0xE643; // EP8 (if ISO) IN Packets per frame (1-3) +EXTERN xdata volatile BYTE INPKTEND _AT_ 0xE648; // Force IN Packet End +EXTERN xdata volatile BYTE OUTPKTEND _AT_ 0xE649; // Force OUT Packet End + +// Interrupts + +EXTERN xdata volatile BYTE EP2FIFOIE _AT_ 0xE650; // Endpoint 2 Flag Interrupt Enable +EXTERN xdata volatile BYTE EP2FIFOIRQ _AT_ 0xE651; // Endpoint 2 Flag Interrupt Request +EXTERN xdata volatile BYTE EP4FIFOIE _AT_ 0xE652; // Endpoint 4 Flag Interrupt Enable +EXTERN xdata volatile BYTE EP4FIFOIRQ _AT_ 0xE653; // Endpoint 4 Flag Interrupt Request +EXTERN xdata volatile BYTE EP6FIFOIE _AT_ 0xE654; // Endpoint 6 Flag Interrupt Enable +EXTERN xdata volatile BYTE EP6FIFOIRQ _AT_ 0xE655; // Endpoint 6 Flag Interrupt Request +EXTERN xdata volatile BYTE EP8FIFOIE _AT_ 0xE656; // Endpoint 8 Flag Interrupt Enable +EXTERN xdata volatile BYTE EP8FIFOIRQ _AT_ 0xE657; // Endpoint 8 Flag Interrupt Request +EXTERN xdata volatile BYTE IBNIE _AT_ 0xE658; // IN-BULK-NAK Interrupt Enable +EXTERN xdata volatile BYTE IBNIRQ _AT_ 0xE659; // IN-BULK-NAK interrupt Request +EXTERN xdata volatile BYTE NAKIE _AT_ 0xE65A; // Endpoint Ping NAK interrupt Enable +EXTERN xdata volatile BYTE NAKIRQ _AT_ 0xE65B; // Endpoint Ping NAK interrupt Request +EXTERN xdata volatile BYTE USBIE _AT_ 0xE65C; // USB Int Enables +EXTERN xdata volatile BYTE USBIRQ _AT_ 0xE65D; // USB Interrupt Requests +EXTERN xdata volatile BYTE EPIE _AT_ 0xE65E; // Endpoint Interrupt Enables +EXTERN xdata volatile BYTE EPIRQ _AT_ 0xE65F; // Endpoint Interrupt Requests +EXTERN xdata volatile BYTE GPIFIE _AT_ 0xE660; // GPIF Interrupt Enable +EXTERN xdata volatile BYTE GPIFIRQ _AT_ 0xE661; // GPIF Interrupt Request +EXTERN xdata volatile BYTE USBERRIE _AT_ 0xE662; // USB Error Interrupt Enables +EXTERN xdata volatile BYTE USBERRIRQ _AT_ 0xE663; // USB Error Interrupt Requests +EXTERN xdata volatile BYTE ERRCNTLIM _AT_ 0xE664; // USB Error counter and limit +EXTERN xdata volatile BYTE CLRERRCNT _AT_ 0xE665; // Clear Error Counter EC[3..0] +EXTERN xdata volatile BYTE INT2IVEC _AT_ 0xE666; // Interupt 2 (USB) Autovector +EXTERN xdata volatile BYTE INT4IVEC _AT_ 0xE667; // Interupt 4 (FIFOS & GPIF) Autovector +EXTERN xdata volatile BYTE INTSETUP _AT_ 0xE668; // Interrupt 2&4 Setup + +// Input/Output + +EXTERN xdata volatile BYTE PORTACFG _AT_ 0xE670; // I/O PORTA Alternate Configuration +EXTERN xdata volatile BYTE PORTCCFG _AT_ 0xE671; // I/O PORTC Alternate Configuration +EXTERN xdata volatile BYTE PORTECFG _AT_ 0xE672; // I/O PORTE Alternate Configuration +EXTERN xdata volatile BYTE I2CS _AT_ 0xE678; // Control & Status +EXTERN xdata volatile BYTE I2DAT _AT_ 0xE679; // Data +EXTERN xdata volatile BYTE I2CTL _AT_ 0xE67A; // I2C Control +EXTERN xdata volatile BYTE XAUTODAT1 _AT_ 0xE67B; // Autoptr1 MOVX access +EXTERN xdata volatile BYTE XAUTODAT2 _AT_ 0xE67C; // Autoptr2 MOVX access + +#define EXTAUTODAT1 XAUTODAT1 +#define EXTAUTODAT2 XAUTODAT2 + +// USB Control + +EXTERN xdata volatile BYTE USBCS _AT_ 0xE680; // USB Control & Status +EXTERN xdata volatile BYTE SUSPEND _AT_ 0xE681; // Put chip into suspend +EXTERN xdata volatile BYTE WAKEUPCS _AT_ 0xE682; // Wakeup source and polarity +EXTERN xdata volatile BYTE TOGCTL _AT_ 0xE683; // Toggle Control +EXTERN xdata volatile BYTE USBFRAMEH _AT_ 0xE684; // USB Frame count H +EXTERN xdata volatile BYTE USBFRAMEL _AT_ 0xE685; // USB Frame count L +EXTERN xdata volatile BYTE MICROFRAME _AT_ 0xE686; // Microframe count, 0-7 +EXTERN xdata volatile BYTE FNADDR _AT_ 0xE687; // USB Function address + +// Endpoints + +EXTERN xdata volatile BYTE EP0BCH _AT_ 0xE68A; // Endpoint 0 Byte Count H +EXTERN xdata volatile BYTE EP0BCL _AT_ 0xE68B; // Endpoint 0 Byte Count L +EXTERN xdata volatile BYTE EP1OUTBC _AT_ 0xE68D; // Endpoint 1 OUT Byte Count +EXTERN xdata volatile BYTE EP1INBC _AT_ 0xE68F; // Endpoint 1 IN Byte Count +EXTERN xdata volatile BYTE EP2BCH _AT_ 0xE690; // Endpoint 2 Byte Count H +EXTERN xdata volatile BYTE EP2BCL _AT_ 0xE691; // Endpoint 2 Byte Count L +EXTERN xdata volatile BYTE EP4BCH _AT_ 0xE694; // Endpoint 4 Byte Count H +EXTERN xdata volatile BYTE EP4BCL _AT_ 0xE695; // Endpoint 4 Byte Count L +EXTERN xdata volatile BYTE EP6BCH _AT_ 0xE698; // Endpoint 6 Byte Count H +EXTERN xdata volatile BYTE EP6BCL _AT_ 0xE699; // Endpoint 6 Byte Count L +EXTERN xdata volatile BYTE EP8BCH _AT_ 0xE69C; // Endpoint 8 Byte Count H +EXTERN xdata volatile BYTE EP8BCL _AT_ 0xE69D; // Endpoint 8 Byte Count L +EXTERN xdata volatile BYTE EP0CS _AT_ 0xE6A0; // Endpoint Control and Status +EXTERN xdata volatile BYTE EP1OUTCS _AT_ 0xE6A1; // Endpoint 1 OUT Control and Status +EXTERN xdata volatile BYTE EP1INCS _AT_ 0xE6A2; // Endpoint 1 IN Control and Status +EXTERN xdata volatile BYTE EP2CS _AT_ 0xE6A3; // Endpoint 2 Control and Status +EXTERN xdata volatile BYTE EP4CS _AT_ 0xE6A4; // Endpoint 4 Control and Status +EXTERN xdata volatile BYTE EP6CS _AT_ 0xE6A5; // Endpoint 6 Control and Status +EXTERN xdata volatile BYTE EP8CS _AT_ 0xE6A6; // Endpoint 8 Control and Status +EXTERN xdata volatile BYTE EP2FIFOFLGS _AT_ 0xE6A7; // Endpoint 2 Flags +EXTERN xdata volatile BYTE EP4FIFOFLGS _AT_ 0xE6A8; // Endpoint 4 Flags +EXTERN xdata volatile BYTE EP6FIFOFLGS _AT_ 0xE6A9; // Endpoint 6 Flags +EXTERN xdata volatile BYTE EP8FIFOFLGS _AT_ 0xE6AA; // Endpoint 8 Flags +EXTERN xdata volatile BYTE EP2FIFOBCH _AT_ 0xE6AB; // EP2 FIFO total byte count H +EXTERN xdata volatile BYTE EP2FIFOBCL _AT_ 0xE6AC; // EP2 FIFO total byte count L +EXTERN xdata volatile BYTE EP4FIFOBCH _AT_ 0xE6AD; // EP4 FIFO total byte count H +EXTERN xdata volatile BYTE EP4FIFOBCL _AT_ 0xE6AE; // EP4 FIFO total byte count L +EXTERN xdata volatile BYTE EP6FIFOBCH _AT_ 0xE6AF; // EP6 FIFO total byte count H +EXTERN xdata volatile BYTE EP6FIFOBCL _AT_ 0xE6B0; // EP6 FIFO total byte count L +EXTERN xdata volatile BYTE EP8FIFOBCH _AT_ 0xE6B1; // EP8 FIFO total byte count H +EXTERN xdata volatile BYTE EP8FIFOBCL _AT_ 0xE6B2; // EP8 FIFO total byte count L +EXTERN xdata volatile BYTE SUDPTRH _AT_ 0xE6B3; // Setup Data Pointer high address byte +EXTERN xdata volatile BYTE SUDPTRL _AT_ 0xE6B4; // Setup Data Pointer low address byte +EXTERN xdata volatile BYTE SUDPTRCTL _AT_ 0xE6B5; // Setup Data Pointer Auto Mode +EXTERN xdata volatile BYTE SETUPDAT[8] _AT_ 0xE6B8; // 8 bytes of SETUP data + +// GPIF + +EXTERN xdata volatile BYTE GPIFWFSELECT _AT_ 0xE6C0; // Waveform Selector +EXTERN xdata volatile BYTE GPIFIDLECS _AT_ 0xE6C1; // GPIF Done, GPIF IDLE drive mode +EXTERN xdata volatile BYTE GPIFIDLECTL _AT_ 0xE6C2; // Inactive Bus, CTL states +EXTERN xdata volatile BYTE GPIFCTLCFG _AT_ 0xE6C3; // CTL OUT pin drive +EXTERN xdata volatile BYTE GPIFADRH _AT_ 0xE6C4; // GPIF Address H +EXTERN xdata volatile BYTE GPIFADRL _AT_ 0xE6C5; // GPIF Address L + +EXTERN xdata volatile BYTE GPIFTCB3 _AT_ 0xE6CE; // GPIF Transaction Count Byte 3 +EXTERN xdata volatile BYTE GPIFTCB2 _AT_ 0xE6CF; // GPIF Transaction Count Byte 2 +EXTERN xdata volatile BYTE GPIFTCB1 _AT_ 0xE6D0; // GPIF Transaction Count Byte 1 +EXTERN xdata volatile BYTE GPIFTCB0 _AT_ 0xE6D1; // GPIF Transaction Count Byte 0 + +#define EP2GPIFTCH GPIFTCB1 // these are here for backwards compatibility +#define EP2GPIFTCL GPIFTCB0 // +#define EP4GPIFTCH GPIFTCB1 // these are here for backwards compatibility +#define EP4GPIFTCL GPIFTCB0 // +#define EP6GPIFTCH GPIFTCB1 // these are here for backwards compatibility +#define EP6GPIFTCL GPIFTCB0 // +#define EP8GPIFTCH GPIFTCB1 // these are here for backwards compatibility +#define EP8GPIFTCL GPIFTCB0 // + +EXTERN xdata volatile BYTE EP2GPIFFLGSEL _AT_ 0xE6D2; // EP2 GPIF Flag select +EXTERN xdata volatile BYTE EP2GPIFPFSTOP _AT_ 0xE6D3; // Stop GPIF EP2 transaction on prog. flag +EXTERN xdata volatile BYTE EP2GPIFTRIG _AT_ 0xE6D4; // EP2 FIFO Trigger +EXTERN xdata volatile BYTE EP4GPIFFLGSEL _AT_ 0xE6DA; // EP4 GPIF Flag select +EXTERN xdata volatile BYTE EP4GPIFPFSTOP _AT_ 0xE6DB; // Stop GPIF EP4 transaction on prog. flag +EXTERN xdata volatile BYTE EP4GPIFTRIG _AT_ 0xE6DC; // EP4 FIFO Trigger +EXTERN xdata volatile BYTE EP6GPIFFLGSEL _AT_ 0xE6E2; // EP6 GPIF Flag select +EXTERN xdata volatile BYTE EP6GPIFPFSTOP _AT_ 0xE6E3; // Stop GPIF EP6 transaction on prog. flag +EXTERN xdata volatile BYTE EP6GPIFTRIG _AT_ 0xE6E4; // EP6 FIFO Trigger +EXTERN xdata volatile BYTE EP8GPIFFLGSEL _AT_ 0xE6EA; // EP8 GPIF Flag select +EXTERN xdata volatile BYTE EP8GPIFPFSTOP _AT_ 0xE6EB; // Stop GPIF EP8 transaction on prog. flag +EXTERN xdata volatile BYTE EP8GPIFTRIG _AT_ 0xE6EC; // EP8 FIFO Trigger +EXTERN xdata volatile BYTE XGPIFSGLDATH _AT_ 0xE6F0; // GPIF Data H (16-bit mode only) +EXTERN xdata volatile BYTE XGPIFSGLDATLX _AT_ 0xE6F1; // Read/Write GPIF Data L & trigger transac +EXTERN xdata volatile BYTE XGPIFSGLDATLNOX _AT_ 0xE6F2; // Read GPIF Data L, no transac trigger +EXTERN xdata volatile BYTE GPIFREADYCFG _AT_ 0xE6F3; // Internal RDY,Sync/Async, RDY5CFG +EXTERN xdata volatile BYTE GPIFREADYSTAT _AT_ 0xE6F4; // RDY pin states +EXTERN xdata volatile BYTE GPIFABORT _AT_ 0xE6F5; // Abort GPIF cycles + +// UDMA + +EXTERN xdata volatile BYTE FLOWSTATE _AT_ 0xE6C6; //Defines GPIF flow state +EXTERN xdata volatile BYTE FLOWLOGIC _AT_ 0xE6C7; //Defines flow/hold decision criteria +EXTERN xdata volatile BYTE FLOWEQ0CTL _AT_ 0xE6C8; //CTL states during active flow state +EXTERN xdata volatile BYTE FLOWEQ1CTL _AT_ 0xE6C9; //CTL states during hold flow state +EXTERN xdata volatile BYTE FLOWHOLDOFF _AT_ 0xE6CA; +EXTERN xdata volatile BYTE FLOWSTB _AT_ 0xE6CB; //CTL/RDY Signal to use as master data strobe +EXTERN xdata volatile BYTE FLOWSTBEDGE _AT_ 0xE6CC; //Defines active master strobe edge +EXTERN xdata volatile BYTE FLOWSTBHPERIOD _AT_ 0xE6CD; //Half Period of output master strobe +EXTERN xdata volatile BYTE GPIFHOLDAMOUNT _AT_ 0xE60C; //Data delay shift +EXTERN xdata volatile BYTE UDMACRCH _AT_ 0xE67D; //CRC Upper byte +EXTERN xdata volatile BYTE UDMACRCL _AT_ 0xE67E; //CRC Lower byte +EXTERN xdata volatile BYTE UDMACRCQUAL _AT_ 0xE67F; //UDMA In only, host terminated use only + + +// Debug/Test +// The following registers are for Cypress's internal testing purposes only. +// These registers are not documented in the datasheet or the Technical Reference +// Manual as they were not designed for end user application usage +EXTERN xdata volatile BYTE DBUG _AT_ 0xE6F8; // Debug +EXTERN xdata volatile BYTE TESTCFG _AT_ 0xE6F9; // Test configuration +EXTERN xdata volatile BYTE USBTEST _AT_ 0xE6FA; // USB Test Modes +EXTERN xdata volatile BYTE CT1 _AT_ 0xE6FB; // Chirp Test--Override +EXTERN xdata volatile BYTE CT2 _AT_ 0xE6FC; // Chirp Test--FSM +EXTERN xdata volatile BYTE CT3 _AT_ 0xE6FD; // Chirp Test--Control Signals +EXTERN xdata volatile BYTE CT4 _AT_ 0xE6FE; // Chirp Test--Inputs + +// Endpoint Buffers + +EXTERN xdata volatile BYTE EP0BUF[64] _AT_ 0xE740; // EP0 IN-OUT buffer +EXTERN xdata volatile BYTE EP1OUTBUF[64] _AT_ 0xE780; // EP1-OUT buffer +EXTERN xdata volatile BYTE EP1INBUF[64] _AT_ 0xE7C0; // EP1-IN buffer +EXTERN xdata volatile BYTE EP2FIFOBUF[1024] _AT_ 0xF000; // 512/1024-byte EP2 buffer (IN or OUT) +EXTERN xdata volatile BYTE EP4FIFOBUF[1024] _AT_ 0xF400; // 512 byte EP4 buffer (IN or OUT) +EXTERN xdata volatile BYTE EP6FIFOBUF[1024] _AT_ 0xF800; // 512/1024-byte EP6 buffer (IN or OUT) +EXTERN xdata volatile BYTE EP8FIFOBUF[1024] _AT_ 0xFC00; // 512 byte EP8 buffer (IN or OUT) + +// Error Correction Code (ECC) Registers (FX2LP/FX1 only) + +EXTERN xdata volatile BYTE ECCCFG _AT_ 0xE628; // ECC Configuration +EXTERN xdata volatile BYTE ECCRESET _AT_ 0xE629; // ECC Reset +EXTERN xdata volatile BYTE ECC1B0 _AT_ 0xE62A; // ECC1 Byte 0 +EXTERN xdata volatile BYTE ECC1B1 _AT_ 0xE62B; // ECC1 Byte 1 +EXTERN xdata volatile BYTE ECC1B2 _AT_ 0xE62C; // ECC1 Byte 2 +EXTERN xdata volatile BYTE ECC2B0 _AT_ 0xE62D; // ECC2 Byte 0 +EXTERN xdata volatile BYTE ECC2B1 _AT_ 0xE62E; // ECC2 Byte 1 +EXTERN xdata volatile BYTE ECC2B2 _AT_ 0xE62F; // ECC2 Byte 2 + +// Feature Registers (FX2LP/FX1 only) +EXTERN xdata volatile BYTE GPCR2 _AT_ 0xE50D; // Chip Features + +#undef EXTERN +#undef _AT_ + +/*----------------------------------------------------------------------------- + Special Function Registers (SFRs) + The byte registers and bits defined in the following list are based + on the Synopsis definition of the 8051 Special Function Registers for EZ-USB. + If you modify the register definitions below, please regenerate the file + "ezregs.inc" which includes the same basic information for assembly inclusion. +-----------------------------------------------------------------------------*/ + +sfr IOA = 0x80; + /* IOA */ + sbit PA0 = 0x80 + 0; + sbit PA1 = 0x80 + 1; + sbit PA2 = 0x80 + 2; + sbit PA3 = 0x80 + 3; + + sbit PA4 = 0x80 + 4; + sbit PA5 = 0x80 + 5; + sbit PA6 = 0x80 + 6; + sbit PA7 = 0x80 + 7; +sfr SP = 0x81; +sfr DPL = 0x82; +sfr DPH = 0x83; +sfr DPL1 = 0x84; +sfr DPH1 = 0x85; +sfr DPS = 0x86; + /* DPS */ + // sbit SEL = 0x86+0; +sfr PCON = 0x87; + /* PCON */ + //sbit IDLE = 0x87+0; + //sbit STOP = 0x87+1; + //sbit GF0 = 0x87+2; + //sbit GF1 = 0x87+3; + //sbit SMOD0 = 0x87+7; +sfr TCON = 0x88; + /* TCON */ + sbit IT0 = 0x88+0; + sbit IE0 = 0x88+1; + sbit IT1 = 0x88+2; + sbit IE1 = 0x88+3; + sbit TR0 = 0x88+4; + sbit TF0 = 0x88+5; + sbit TR1 = 0x88+6; + sbit TF1 = 0x88+7; +sfr TMOD = 0x89; + /* TMOD */ + //sbit M00 = 0x89+0; + //sbit M10 = 0x89+1; + //sbit CT0 = 0x89+2; + //sbit GATE0 = 0x89+3; + //sbit M01 = 0x89+4; + //sbit M11 = 0x89+5; + //sbit CT1 = 0x89+6; + //sbit GATE1 = 0x89+7; +sfr TL0 = 0x8A; +sfr TL1 = 0x8B; +sfr TH0 = 0x8C; +sfr TH1 = 0x8D; +sfr CKCON = 0x8E; + /* CKCON */ + //sbit MD0 = 0x89+0; + //sbit MD1 = 0x89+1; + //sbit MD2 = 0x89+2; + //sbit T0M = 0x89+3; + //sbit T1M = 0x89+4; + //sbit T2M = 0x89+5; +sfr SPC_FNC = 0x8F; // Was WRS in Reg320 + /* CKCON */ + //sbit WRS = 0x8F+0; +sfr IOB = 0x90; + /* IOB */ + sbit PB0 = 0x90 + 0; + sbit PB1 = 0x90 + 1; + sbit PB2 = 0x90 + 2; + sbit PB3 = 0x90 + 3; + + sbit PB4 = 0x90 + 4; + sbit PB5 = 0x90 + 5; + sbit PB6 = 0x90 + 6; + sbit PB7 = 0x90 + 7; +sfr EXIF = 0x91; // EXIF Bit Values differ from Reg320 + /* EXIF */ + //sbit USBINT = 0x91+4; + //sbit I2CINT = 0x91+5; + //sbit IE4 = 0x91+6; + //sbit IE5 = 0x91+7; +sfr MPAGE = 0x92; +sfr SCON0 = 0x98; + /* SCON0 */ + sbit RI = 0x98+0; + sbit TI = 0x98+1; + sbit RB8 = 0x98+2; + sbit TB8 = 0x98+3; + sbit REN = 0x98+4; + sbit SM2 = 0x98+5; + sbit SM1 = 0x98+6; + sbit SM0 = 0x98+7; +sfr SBUF0 = 0x99; + +#define AUTOPTR1H AUTOPTRH1 // for backwards compatibility with examples +#define AUTOPTR1L AUTOPTRL1 // for backwards compatibility with examples +#define APTR1H AUTOPTRH1 // for backwards compatibility with examples +#define APTR1L AUTOPTRL1 // for backwards compatibility with examples + +// this is how they are defined in the TRM +sfr AUTOPTRH1 = 0x9A; +sfr AUTOPTRL1 = 0x9B; +sfr AUTOPTRH2 = 0x9D; +sfr AUTOPTRL2 = 0x9E; + +sfr IOC = 0xA0; + /* IOC */ + sbit PC0 = 0xA0 + 0; + sbit PC1 = 0xA0 + 1; + sbit PC2 = 0xA0 + 2; + sbit PC3 = 0xA0 + 3; + + sbit PC4 = 0xA0 + 4; + sbit PC5 = 0xA0 + 5; + sbit PC6 = 0xA0 + 6; + sbit PC7 = 0xA0 + 7; +sfr INT2CLR = 0xA1; +sfr INT4CLR = 0xA2; + +sfr IE = 0xA8; + /* IE */ + sbit EX0 = 0xA8+0; + sbit ET0 = 0xA8+1; + sbit EX1 = 0xA8+2; + sbit ET1 = 0xA8+3; + sbit ES0 = 0xA8+4; + sbit ET2 = 0xA8+5; + sbit ES1 = 0xA8+6; + sbit EA = 0xA8+7; + +sfr EP2468STAT = 0xAA; + /* EP2468STAT */ + //sbit EP2E = 0xAA+0; + //sbit EP2F = 0xAA+1; + //sbit EP4E = 0xAA+2; + //sbit EP4F = 0xAA+3; + //sbit EP6E = 0xAA+4; + //sbit EP6F = 0xAA+5; + //sbit EP8E = 0xAA+6; + //sbit EP8F = 0xAA+7; + +sfr EP24FIFOFLGS = 0xAB; +sfr EP68FIFOFLGS = 0xAC; +sfr AUTOPTRSETUP = 0xAF; + /* AUTOPTRSETUP */ + // sbit EXTACC = 0xAF+0; + // sbit APTR1FZ = 0xAF+1; + // sbit APTR2FZ = 0xAF+2; + +sfr IOD = 0xB0; + /* IOD */ + sbit PD0 = 0xB0 + 0; + sbit PD1 = 0xB0 + 1; + sbit PD2 = 0xB0 + 2; + sbit PD3 = 0xB0 + 3; + + sbit PD4 = 0xB0 + 4; + sbit PD5 = 0xB0 + 5; + sbit PD6 = 0xB0 + 6; + sbit PD7 = 0xB0 + 7; +sfr IOE = 0xB1; +sfr OEA = 0xB2; +sfr OEB = 0xB3; +sfr OEC = 0xB4; +sfr OED = 0xB5; +sfr OEE = 0xB6; + +sfr IP = 0xB8; + /* IP */ + sbit PX0 = 0xB8+0; + sbit PT0 = 0xB8+1; + sbit PX1 = 0xB8+2; + sbit PT1 = 0xB8+3; + sbit PS0 = 0xB8+4; + sbit PT2 = 0xB8+5; + sbit PS1 = 0xB8+6; + +sfr EP01STAT = 0xBA; +sfr GPIFTRIG = 0xBB; + +sfr GPIFSGLDATH = 0xBD; +sfr GPIFSGLDATLX = 0xBE; +sfr GPIFSGLDATLNOX = 0xBF; + +sfr SCON1 = 0xC0; + /* SCON1 */ + sbit RI1 = 0xC0+0; + sbit TI1 = 0xC0+1; + sbit RB81 = 0xC0+2; + sbit TB81 = 0xC0+3; + sbit REN1 = 0xC0+4; + sbit SM21 = 0xC0+5; + sbit SM11 = 0xC0+6; + sbit SM01 = 0xC0+7; +sfr SBUF1 = 0xC1; +sfr T2CON = 0xC8; + /* T2CON */ + sbit CP_RL2 = 0xC8+0; + sbit C_T2 = 0xC8+1; + sbit TR2 = 0xC8+2; + sbit EXEN2 = 0xC8+3; + sbit TCLK = 0xC8+4; + sbit RCLK = 0xC8+5; + sbit EXF2 = 0xC8+6; + sbit TF2 = 0xC8+7; +sfr RCAP2L = 0xCA; +sfr RCAP2H = 0xCB; +sfr TL2 = 0xCC; +sfr TH2 = 0xCD; +sfr PSW = 0xD0; + /* PSW */ + sbit P = 0xD0+0; + sbit FL = 0xD0+1; + sbit OV = 0xD0+2; + sbit RS0 = 0xD0+3; + sbit RS1 = 0xD0+4; + sbit F0 = 0xD0+5; + sbit AC = 0xD0+6; + sbit CY = 0xD0+7; +sfr EICON = 0xD8; // Was WDCON in DS80C320; Bit Values differ from Reg320 + /* EICON */ + sbit INT6 = 0xD8+3; + sbit RESI = 0xD8+4; + sbit ERESI = 0xD8+5; + sbit SMOD1 = 0xD8+7; +sfr ACC = 0xE0; +sfr EIE = 0xE8; // EIE Bit Values differ from Reg320 + /* EIE */ + sbit EUSB = 0xE8+0; + sbit EI2C = 0xE8+1; + sbit EIEX4 = 0xE8+2; + sbit EIEX5 = 0xE8+3; + sbit EIEX6 = 0xE8+4; +sfr B = 0xF0; +sfr EIP = 0xF8; // EIP Bit Values differ from Reg320 + /* EIP */ + sbit PUSB = 0xF8+0; + sbit PI2C = 0xF8+1; + sbit EIPX4 = 0xF8+2; + sbit EIPX5 = 0xF8+3; + sbit EIPX6 = 0xF8+4; + +/*----------------------------------------------------------------------------- + Bit Masks +-----------------------------------------------------------------------------*/ + +/* CPU Control & Status Register (CPUCS) */ +#define bmPRTCSTB bmBIT5 +#define bmCLKSPD (bmBIT4 | bmBIT3) +#define bmCLKSPD1 bmBIT4 +#define bmCLKSPD0 bmBIT3 +#define bmCLKINV bmBIT2 +#define bmCLKOE bmBIT1 +#define bm8051RES bmBIT0 +/* Port Alternate Configuration Registers */ +/* Port A (PORTACFG) */ +#define bmFLAGD bmBIT7 +#define bmINT1 bmBIT1 +#define bmINT0 bmBIT0 +/* Port C (PORTCCFG) */ +#define bmGPIFA7 bmBIT7 +#define bmGPIFA6 bmBIT6 +#define bmGPIFA5 bmBIT5 +#define bmGPIFA4 bmBIT4 +#define bmGPIFA3 bmBIT3 +#define bmGPIFA2 bmBIT2 +#define bmGPIFA1 bmBIT1 +#define bmGPIFA0 bmBIT0 +/* Port E (PORTECFG) */ +#define bmGPIFA8 bmBIT7 +#define bmT2EX bmBIT6 +#define bmINT6 bmBIT5 +#define bmRXD1OUT bmBIT4 +#define bmRXD0OUT bmBIT3 +#define bmT2OUT bmBIT2 +#define bmT1OUT bmBIT1 +#define bmT0OUT bmBIT0 + +/* I2C Control & Status Register (I2CS) */ +#define bmSTART bmBIT7 +#define bmSTOP bmBIT6 +#define bmLASTRD bmBIT5 +#define bmID (bmBIT4 | bmBIT3) +#define bmBERR bmBIT2 +#define bmACK bmBIT1 +#define bmDONE bmBIT0 +/* I2C Control Register (I2CTL) */ +#define bmSTOPIE bmBIT1 +#define bm400KHZ bmBIT0 +/* Interrupt 2 (USB) Autovector Register (INT2IVEC) */ +#define bmIV4 bmBIT6 +#define bmIV3 bmBIT5 +#define bmIV2 bmBIT4 +#define bmIV1 bmBIT3 +#define bmIV0 bmBIT2 +/* USB Interrupt Request & Enable Registers (USBIE/USBIRQ) */ +#define bmEP0ACK bmBIT6 +#define bmHSGRANT bmBIT5 +#define bmURES bmBIT4 +#define bmSUSP bmBIT3 +#define bmSUTOK bmBIT2 +#define bmSOF bmBIT1 +#define bmSUDAV bmBIT0 +/* Breakpoint register (BREAKPT) */ +#define bmBREAK bmBIT3 +#define bmBPPULSE bmBIT2 +#define bmBPEN bmBIT1 +/* Interrupt 2 & 4 Setup (INTSETUP) */ +#define bmAV2EN bmBIT3 +#define INT4IN bmBIT1 +#define bmAV4EN bmBIT0 +/* USB Control & Status Register (USBCS) */ +#define bmHSM bmBIT7 +#define bmDISCON bmBIT3 +#define bmNOSYNSOF bmBIT2 +#define bmRENUM bmBIT1 +#define bmSIGRESUME bmBIT0 +/* Wakeup Control and Status Register (WAKEUPCS) */ +#define bmWU2 bmBIT7 +#define bmWU bmBIT6 +#define bmWU2POL bmBIT5 +#define bmWUPOL bmBIT4 +#define bmDPEN bmBIT2 +#define bmWU2EN bmBIT1 +#define bmWUEN bmBIT0 +/* End Point 0 Control & Status Register (EP0CS) */ +#define bmHSNAK bmBIT7 +/* End Point 0-1 Control & Status Registers (EP0CS/EP1OUTCS/EP1INCS) */ +#define bmEPBUSY bmBIT1 +#define bmEPSTALL bmBIT0 +/* End Point 2-8 Control & Status Registers (EP2CS/EP4CS/EP6CS/EP8CS) */ +#define bmNPAK (bmBIT6 | bmBIT5 | bmBIT4) +#define bmEPFULL bmBIT3 +#define bmEPEMPTY bmBIT2 +/* Endpoint Status (EP2468STAT) SFR bits */ +#define bmEP8FULL bmBIT7 +#define bmEP8EMPTY bmBIT6 +#define bmEP6FULL bmBIT5 +#define bmEP6EMPTY bmBIT4 +#define bmEP4FULL bmBIT3 +#define bmEP4EMPTY bmBIT2 +#define bmEP2FULL bmBIT1 +#define bmEP2EMPTY bmBIT0 +/* SETUP Data Pointer Auto Mode (SUDPTRCTL) */ +#define bmSDPAUTO bmBIT0 +/* Endpoint Data Toggle Control (TOGCTL) */ +#define bmQUERYTOGGLE bmBIT7 +#define bmSETTOGGLE bmBIT6 +#define bmRESETTOGGLE bmBIT5 +#define bmTOGCTLEPMASK bmBIT3 | bmBIT2 | bmBIT1 | bmBIT0 +/* IBN (In Bulk Nak) enable and request bits (IBNIE/IBNIRQ) */ +#define bmEP8IBN bmBIT5 +#define bmEP6IBN bmBIT4 +#define bmEP4IBN bmBIT3 +#define bmEP2IBN bmBIT2 +#define bmEP1IBN bmBIT1 +#define bmEP0IBN bmBIT0 + +/* PING-NAK enable and request bits (NAKIE/NAKIRQ) */ +#define bmEP8PING bmBIT7 +#define bmEP6PING bmBIT6 +#define bmEP4PING bmBIT5 +#define bmEP2PING bmBIT4 +#define bmEP1PING bmBIT3 +#define bmEP0PING bmBIT2 +#define bmIBN bmBIT0 + +/* Interface Configuration bits (IFCONFIG) */ +#define bmIFCLKSRC bmBIT7 +#define bm3048MHZ bmBIT6 +#define bmIFCLKOE bmBIT5 +#define bmIFCLKPOL bmBIT4 +#define bmASYNC bmBIT3 +#define bmGSTATE bmBIT2 +#define bmIFCFG1 bmBIT1 +#define bmIFCFG0 bmBIT0 +#define bmIFCFGMASK (bmIFCFG0 | bmIFCFG1) +#define bmIFGPIF bmIFCFG1 + +/* EP 2468 FIFO Configuration bits (EP2FIFOCFG,EP4FIFOCFG,EP6FIFOCFG,EP8FIFOCFG) */ +#define bmINFM bmBIT6 +#define bmOEP bmBIT5 +#define bmAUTOOUT bmBIT4 +#define bmAUTOIN bmBIT3 +#define bmZEROLENIN bmBIT2 +#define bmWORDWIDE bmBIT0 + +/* Chip Revision Control Bits (REVCTL) - used to ebable/disable revision specidic + features */ +#define bmNOAUTOARM bmBIT1 +#define bmSKIPCOMMIT bmBIT0 + +/* Fifo Reset bits (FIFORESET) */ +#define bmNAKALL bmBIT7 + +/* Chip Feature Register (GPCR2) */ +#define bmFULLSPEEDONLY bmBIT4 + +#endif /* FX2REGS_H */ diff --git a/firmware/CY7C68013A/fx2sdly.h b/firmware/CY7C68013A/fx2sdly.h new file mode 100644 index 0000000..969b64c --- /dev/null +++ b/firmware/CY7C68013A/fx2sdly.h @@ -0,0 +1,242 @@ +//----------------------------------------------------------------------------- +// File: fx2sdly.h +// Contents: EZ-USB FX2 Synchronization Delay (SYNCDELAY) Macro +// +// Enter with _IFREQ = IFCLK in kHz +// Enter with _CFREQ = CLKOUT in kHz +// +// Copyright (c) 2001 Cypress Semiconductor, All rights reserved +// +// $Id: fx2sdly.h 15170 2010-04-30 06:27:56Z ritt $ +//----------------------------------------------------------------------------- +#include "intrins.h" + + // Registers which require a synchronization delay, see section 15.14 + // FIFORESET FIFOPINPOLAR + // INPKTEND OUTPKTEND + // EPxBCH:L REVCTL + // GPIFTCB3 GPIFTCB2 + // GPIFTCB1 GPIFTCB0 + // EPxFIFOPFH:L EPxAUTOINLENH:L + // EPxFIFOCFG EPxGPIFFLGSEL + // PINFLAGSxx EPxFIFOIRQ + // EPxFIFOIE GPIFIRQ + // GPIFIE GPIFADRH:L + // UDMACRCH:L EPxGPIFTRIG + // GPIFTRIG + + // Note: The pre-REVE EPxGPIFTCH/L register are affected, as well... + // ...these have been replaced by GPIFTC[B3:B0] registers + +// _IFREQ can be in the range of: 5000 to 48000 +#ifndef _IFREQ +#define _IFREQ 48000 // IFCLK frequency in kHz +#endif + +// CFREQ can be any one of: 48000, 24000, or 12000 +#ifndef _CFREQ +#define _CFREQ 48000 // CLKOUT frequency in kHz +#endif + +#if( _IFREQ < 5000 ) +#error "_IFREQ too small! Valid Range: 5000 to 48000..." +#endif + +#if( _IFREQ > 48000 ) +#error "_IFREQ too large! Valid Range: 5000 to 48000..." +#endif + +#if( _CFREQ != 48000 ) +#if( _CFREQ != 24000 ) +#if( _CFREQ != 12000 ) +#error "_CFREQ invalid! Valid values: 48000, 24000, 12000..." +#endif +#endif +#endif + +// Synchronization Delay formula: see TRM section 15-14 +#define _SCYCL ( 3*(_CFREQ) + 5*(_IFREQ) - 1 ) / ( 2*(_IFREQ) ) + +#if( _SCYCL == 1 ) +#define SYNCDELAY _nop_( ) +#endif + +#if( _SCYCL == 2 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 3 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 4 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 5 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 6 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 7 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 8 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 9 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 10 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 11 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 12 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 13 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 14 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 15 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif + +#if( _SCYCL == 16 ) +#define SYNCDELAY _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ); \ + _nop_( ) +#endif diff --git a/firmware/clock_divider.xlsx b/firmware/clock_divider.xlsx new file mode 100644 index 0000000..f59af97 Binary files /dev/null and b/firmware/clock_divider.xlsx differ diff --git a/firmware/dpram_map_eval5.xls b/firmware/dpram_map_eval5.xls new file mode 100644 index 0000000..df39818 Binary files /dev/null and b/firmware/dpram_map_eval5.xls differ diff --git a/firmware/register_map_eval5.xls b/firmware/register_map_eval5.xls new file mode 100644 index 0000000..efb56b6 Binary files /dev/null and b/firmware/register_map_eval5.xls differ diff --git a/firmware/sim/drs4_eval1_tb.mpf b/firmware/sim/drs4_eval1_tb.mpf new file mode 100644 index 0000000..abcc6f1 --- /dev/null +++ b/firmware/sim/drs4_eval1_tb.mpf @@ -0,0 +1,928 @@ +; Copyright 1991-2007 Mentor Graphics Corporation +; +; All Rights Reserved. +; +; THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS THE PROPERTY OF +; MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS SUBJECT TO LICENSE TERMS. +; + +[Library] +std = $MODEL_TECH/../std +ieee = $MODEL_TECH/../ieee +verilog = $MODEL_TECH/../verilog +vital2000 = $MODEL_TECH/../vital2000 +std_developerskit = $MODEL_TECH/../std_developerskit +synopsys = $MODEL_TECH/../synopsys +modelsim_lib = $MODEL_TECH/../modelsim_lib +sv_std = $MODEL_TECH/../sv_std +;vhdl_psl_checkers = $MODEL_TECH/../vhdl_psl_checkers // Source files only for this release +;verilog_psl_checkers = $MODEL_TECH/../verilog_psl_checkers // Source files only for this release + +UNISIMS_VER = c:\Modeltech_6.2f\xilinx_ise_acutal\unisims_ver +UNI9000_VER = c:\Modeltech_6.2f\xilinx_ise_acutal\uni9000_ver +SIMPRIMS_VER = c:\Modeltech_6.2f\xilinx_ise_acutal\simprims_ver +XILINXCORELIB_VER = c:\Modeltech_6.2f\xilinx_ise_acutal\XilinxCoreLib_ver +AIM_VER = c:\Modeltech_6.2f\xilinx_ise_acutal\abel_ver\aim_ver +CPLD_VER = c:\Modeltech_6.2f\xilinx_ise_acutal\cpld_ver +UNISIM = c:\Modeltech_6.2f\xilinx_ise_acutal\unisim +SIMPRIM = c:\Modeltech_6.2f\xilinx_ise_acutal\simprim +XILINXCORELIB = c:\Modeltech_6.2f\xilinx_ise_acutal\XilinxCoreLib +AIM = c:\Modeltech_6.2f\xilinx_ise_acutal\abel\aim +PLS = c:\Modeltech_6.2f\xilinx_ise_acutal\abel\pls +CPLD = c:\Modeltech_6.2f\xilinx_ise_acutal\cpld +work = work +[vcom] +; VHDL93 variable selects language version as the default. +; Default is VHDL-2002. +; Value of 0 or 1987 for VHDL-1987. +; Value of 1 or 1993 for VHDL-1993. +; Default or value of 2 or 2002 for VHDL-2002. +VHDL93 = 2002 + +; Show source line containing error. Default is off. +; Show_source = 1 + +; Turn off unbound-component warnings. Default is on. +; Show_Warning1 = 0 + +; Turn off process-without-a-wait-statement warnings. Default is on. +; Show_Warning2 = 0 + +; Turn off null-range warnings. Default is on. +; Show_Warning3 = 0 + +; Turn off no-space-in-time-literal warnings. Default is on. +; Show_Warning4 = 0 + +; Turn off multiple-drivers-on-unresolved-signal warnings. Default is on. +; Show_Warning5 = 0 + +; Turn off optimization for IEEE std_logic_1164 package. Default is on. +; Optimize_1164 = 0 + +; Turn on resolving of ambiguous function overloading in favor of the +; "explicit" function declaration (not the one automatically created by +; the compiler for each type declaration). Default is off. +; The .ini file has Explicit enabled so that std_logic_signed/unsigned +; will match the behavior of synthesis tools. +Explicit = 1 + +; Turn off acceleration of the VITAL packages. Default is to accelerate. +; NoVital = 1 + +; Turn off VITAL compliance checking. Default is checking on. +; NoVitalCheck = 1 + +; Ignore VITAL compliance checking errors. Default is to not ignore. +; IgnoreVitalErrors = 1 + +; Turn off VITAL compliance checking warnings. Default is to show warnings. +; Show_VitalChecksWarnings = 0 + +; Turn off PSL assertion warning messages. Default is to show warnings. +; Show_PslChecksWarnings = 0 + +; Enable parsing of embedded PSL assertions. Default is enabled. +; EmbeddedPsl = 0 + +; Keep silent about case statement static warnings. +; Default is to give a warning. +; NoCaseStaticError = 1 + +; Keep silent about warnings caused by aggregates that are not locally static. +; Default is to give a warning. +; NoOthersStaticError = 1 + +; Treat as errors: +; case statement static warnings +; warnings caused by aggregates that are not locally static +; Overrides NoCaseStaticError, NoOthersStaticError settings. +; PedanticErrors = 1 + +; Turn off inclusion of debugging info within design units. +; Default is to include debugging info. +; NoDebug = 1 + +; Turn off "Loading..." messages. Default is messages on. +; Quiet = 1 + +; Turn on some limited synthesis rule compliance checking. Checks only: +; -- signals used (read) by a process must be in the sensitivity list +; CheckSynthesis = 1 + +; Activate optimizations on expressions that do not involve signals, +; waits, or function/procedure/task invocations. Default is off. +; ScalarOpts = 1 + +; Turns on lint-style checking. +; Show_Lint = 1 + +; Require the user to specify a configuration for all bindings, +; and do not generate a compile time default binding for the +; component. This will result in an elaboration error of +; 'component not bound' if the user fails to do so. Avoids the rare +; issue of a false dependency upon the unused default binding. +; RequireConfigForAllDefaultBinding = 1 + +; Perform default binding at compile time. +; Default is to do default binding at load time. +; BindAtCompile=1; + +; Inhibit range checking on subscripts of arrays. Range checking on +; scalars defined with subtypes is inhibited by default. +; NoIndexCheck = 1 + +; Inhibit range checks on all (implicit and explicit) assignments to +; scalar objects defined with subtypes. +; NoRangeCheck = 1 + +; Run the 0in tools from within the simulator. +; Default value set to 0. Please set it to 1 to invoke 0in. +; VcomZeroIn = 1 + +; Set the options to be passed to the 0in tools. +; Default value set to "". Please set it to appropriate options needed. +; VcomZeroInOptions = "" + +; Turn off code coverage in VHDL subprograms. Default is on. +; CoverageNoSub = 0 + +; Automatically exclude VHDL case statement default branches. +; Default is to not exclude. +; CoverExcludeDefault = 1 + +; Turn on code coverage in VHDL generate blocks. Default is off. +; CoverGenerate = 1 + +; Use this directory for compiler temporary files instead of "work/_temp" +; CompilerTempDir = /tmp + +[vlog] + +; Turn off inclusion of debugging info within design units. +; Default is to include debugging info. +; NoDebug = 1 + +; Turn on `protect compiler directive processing. +; Default is to ignore `protect directives. +; Protect = 1 + +; Turn off "Loading..." messages. Default is messages on. +; Quiet = 1 + +; Turn on Verilog hazard checking (order-dependent accessing of global vars). +; Default is off. +; Hazard = 1 + +; Turn on converting regular Verilog identifiers to uppercase. Allows case +; insensitivity for module names. Default is no conversion. +; UpCase = 1 + +; Activate optimizations on expressions that do not involve signals, +; waits, or function/procedure/task invocations. Default is off. +; ScalarOpts = 1 + +; Turns on lint-style checking. +; Show_Lint = 1 + +; Show source line containing error. Default is off. +; Show_source = 1 + +; Turn on bad option warning. Default is off. +; Show_BadOptionWarning = 1 + +; Revert back to IEEE 1364-1995 syntax, default is 0 (off). +vlog95compat = 0 + +; Turn off PSL warning messages. Default is to show warnings. +; Show_PslChecksWarnings = 0 + +; Enable parsing of embedded PSL assertions. Default is enabled. +; EmbeddedPsl = 0 + +; Set the threshold for automatically identifying sparse Verilog memories. +; A memory with depth equal to or more than the sparse memory threshold gets +; marked as sparse automatically, unless specified otherwise in source code. +; The default is 0 (i.e. no memory is automatically given sparse status) +; SparseMemThreshold = 1048576 + +; Set the maximum number of iterations permitted for a generate loop. +; Restricting this permits the implementation to recognize infinite +; generate loops. +; GenerateLoopIterationMax = 100000 + +; Set the maximum depth permitted for a recursive generate instantiation. +; Restricting this permits the implementation to recognize infinite +; recursions. +; GenerateRecursionDepthMax = 200 + +; Run the 0in tools from within the simulator. +; Default value set to 0. Please set it to 1 to invoke 0in. +; VlogZeroIn = 1 + +; Set the options to be passed to the 0in tools. +; Default value set to "". Please set it to appropriate options needed. +; VlogZeroInOptions = "" + +; Run the 0in tools from within the simulator. +; Default value set to 0. Please set it to 1 to invoke 0in. +; VoptZeroIn = 1 + +; Set the options to be passed to the 0in tools. +; Default value set to "". Please set it to appropriate options needed. +; VoptZeroInOptions = "" + +; Set the option to treat all files specified in a vlog invocation as a +; single compilation unit. The default value is set to 0 which will treat +; each file as a separate compilation unit as specified in the P1800 draft standard. +; MultiFileCompilationUnit = 1 + +; Automatically exclude Verilog case statement default branches. +; Default is to not exclude. +; CoverExcludeDefault = 1 + +; Turn on code coverage in VLOG generate blocks. Default is off. +; CoverGenerate = 1 + +; Specify the override for the default value of "cross_num_print_missing" +; option for the Cross in Covergroups. If not specified then LRM default +; value of 0 (zero) is used. This is a compile time option. +; SVCrossNumPrintMissingDefault = 0 + +; Setting following to 1 would cause creation of variables which +; would represent the value of Coverpoint expressions. This is used +; in conjunction with "SVCoverpointExprVariablePrefix" option +; in the modelsim.ini +; EnableSVCoverpointExprVariable = 0 + +; Specify the override for the prefix used in forming the variable names +; which represent the Coverpoint expressions. This is used in conjunction with +; "EnableSVCoverpointExprVariable" option of the modelsim.ini +; The default prefix is "expr". +; The variable name is +; variable name => _ +; SVCoverpointExprVariablePrefix = expr + +; Override for the default value of the SystemVerilog covergroup, +; coverpoint, and cross option.goal (defined to be 100 in the LRM). +; NOTE: It does not override specific assignments in SystemVerilog +; source code. NOTE: The modelsim.ini variable "SVCovergroupGoal" +; can override this value. +; SVCovergroupGoalDefault = 100 + +; Override for the default value of the SystemVerilog covergroup, +; coverpoint, and cross type_option.goal (defined to be 100 in the LRM) +; NOTE: It does not override specific assignments in SystemVerilog +; source code. NOTE: The modelsim.ini variable "SVCovergroupTypeGoal" +; can override this value. +; SVCovergroupTypeGoalDefault = 100 + +; Specify the override for the default value of "strobe" option for the +; Covergroup Type. This is a compile time option which forces "strobe" to +; a user specified default value and supersedes SystemVerilog specified +; default value of '0'(zero). NOTE: This can be overriden by a runtime +; modelsim.ini variable "SVCovergroupStrobeDefault". +; SVCovergroupStrobeDefault = 0 + +[sccom] +; Enable use of SCV include files and library. Default is off. +; UseScv = 1 + +; Add C++ compiler options to the sccom command line by using this variable. +; CppOptions = -g + +; Use custom C++ compiler located at this path rather than the default path. +; The path should point directly at a compiler executable. +; CppPath = /usr/bin/g++ + +; Enable verbose messages from sccom. Default is off. +; SccomVerbose = 1 + +; sccom logfile. Default is no logfile. +; SccomLogfile = sccom.log + +; Enable use of SC_MS include files and library. Default is off. +; UseScMs = 1 + +[vsim] + +; vopt flow +; Set to turn on automatic optimization of a design. +; Default is on +VoptFlow = 1 + +; vopt automatic SDF +; If automatic design optimization is on, enables automatic compilation +; of SDF files. +; Default is on, uncomment to turn off. +; VoptAutoSDFCompile = 0 + +; Simulator resolution +; Set to fs, ps, ns, us, ms, or sec with optional prefix of 1, 10, or 100. +resolution = 1ps + +; User time unit for run commands +; Set to default, fs, ps, ns, us, ms, or sec. The default is to use the +; unit specified for Resolution. For example, if Resolution is 100ps, +; then UserTimeUnit defaults to ps. +; Should generally be set to default. +UserTimeUnit = default + +; Default run length +RunLength = 0 ps + +; Maximum iterations that can be run without advancing simulation time +IterationLimit = 5000 + +; Control PSL and Verilog Assume directives during simulation +; Set SimulateAssumeDirectives = 0 to disable assume being simulated as asserts +; Set SimulateAssumeDirectives = 1 to enable assume simulation as asserts +; SimulateAssumeDirectives = 1 + +; Control the simulation of PSL and SVA +; These switches can be overridden by the vsim command line switches: +; -psl, -nopsl, -sva, -nosva. +; Set SimulatePSL = 0 to disable PSL simulation +; Set SimulatePSL = 1 to enable PSL simulation (default) +; SimulatePSL = 1 +; Set SimulateSVA = 0 to disable SVA simulation +; Set SimulateSVA = 1 to enable concurrent SVA simulation (default) +; SimulateSVA = 1 + +; Directives to license manager can be set either as single value or as +; space separated multi-values: +; vhdl Immediately reserve a VHDL license +; vlog Immediately reserve a Verilog license +; plus Immediately reserve a VHDL and Verilog license +; nomgc Do not look for Mentor Graphics Licenses +; nomti Do not look for Model Technology Licenses +; noqueue Do not wait in the license queue when a license is not available +; viewsim Try for viewer license but accept simulator license(s) instead +; of queuing for viewer license (PE ONLY) +; noviewer Disable checkout of msimviewer and vsim-viewer license +; features (PE ONLY) +; noslvhdl Disable checkout of qhsimvh and vsim license features +; noslvlog Disable checkout of qhsimvl and vsimvlog license features +; nomix Disable checkout of msimhdlmix and hdlmix license features +; nolnl Disable checkout of msimhdlsim and hdlsim license features +; mixedonly Disable checkout of qhsimvh,qhsimvl,vsim,vsimvlog license +; features +; lnlonly Disable checkout of qhsimvh,qhsimvl,vsim,vsimvlog,msimhdlmix, +; hdlmix license features +; Single value: +; License = plus +; Multi-value: +; License = noqueue plus + +; Stop the simulator after a VHDL/Verilog immediate assertion message +; 0 = Note 1 = Warning 2 = Error 3 = Failure 4 = Fatal +BreakOnAssertion = 3 + +; VHDL assertion Message Format +; %S - Severity Level +; %R - Report Message +; %T - Time of assertion +; %D - Delta +; %I - Instance or Region pathname (if available) +; %i - Instance pathname with process +; %O - Process name +; %K - Kind of object path is to return: Instance, Signal, Process or Unknown +; %P - Instance or Region path without leaf process +; %F - File +; %L - Line number of assertion or, if assertion is in a subprogram, line +; from which the call is made +; %% - Print '%' character +; If specific format for assertion level is defined, use its format. +; If specific format is not defined for assertion level: +; - and if failure occurs during elaboration, use AssertionFormatBreakLine; +; - and if assertion triggers a breakpoint (controlled by BreakOnAssertion +; level), use AssertionFormatBreak; +; - otherwise, use AssertionFormat. +; AssertionFormatBreakLine = "** %S: %R\n Time: %T Iteration: %D %K: %i File: %F Line: %L\n" +; AssertionFormatBreak = "** %S: %R\n Time: %T Iteration: %D %K: %i File: %F\n" +; AssertionFormat = "** %S: %R\n Time: %T Iteration: %D%I\n" +; AssertionFormatNote = "** %S: %R\n Time: %T Iteration: %D%I\n" +; AssertionFormatWarning = "** %S: %R\n Time: %T Iteration: %D%I\n" +; AssertionFormatError = "** %S: %R\n Time: %T Iteration: %D %K: %i File: %F\n" +; AssertionFormatFail = "** %S: %R\n Time: %T Iteration: %D %K: %i File: %F\n" +; AssertionFormatFatal = "** %S: %R\n Time: %T Iteration: %D %K: %i File: %F\n" + +; Assertion File - alternate file for storing VHDL/PSL/Verilog assertion messages +; AssertFile = assert.log + + +; Simulation Breakpoint messages +; This flag controls the display of function names when reporting the location +; where the simulator stops do to a breakpoint or fatal error. +; Example w/function name: # Break in Process ctr at counter.vhd line 44 +; Example wo/function name: # Break at counter.vhd line 44 +ShowFunctions = 1 + + +; Default radix for all windows and commands. +; Set to symbolic, ascii, binary, octal, decimal, hex, unsigned +DefaultRadix = symbolic + +; VSIM Startup command +; Startup = do startup.do + +; File for saving command transcript +TranscriptFile = transcript + +; File for saving command history +; CommandHistory = cmdhist.log + +; Specify whether paths in simulator commands should be described +; in VHDL or Verilog format. +; For VHDL, PathSeparator = / +; For Verilog, PathSeparator = . +; Must not be the same character as DatasetSeparator. +PathSeparator = / + +; Specify the dataset separator for fully rooted contexts. +; The default is ':'. For example: sim:/top +; Must not be the same character as PathSeparator. +DatasetSeparator = : + +; Specify a unique path separator for the Signal Spy set of functions. +; The default will be to use the PathSeparator variable. +; Must not be the same character as DatasetSeparator. +; SignalSpyPathSeparator = / + +; Disable VHDL assertion messages +; IgnoreNote = 1 +; IgnoreWarning = 1 +; IgnoreError = 1 +; IgnoreFailure = 1 + +; Disable System Verilog assertion messages +; Info and Warning are disabled by default +; IgnoreSVAInfo = 0 +; IgnoreSVAWarning = 0 +; IgnoreSVAError = 1 +; IgnoreSVAFatal = 1 + +; Default force kind. May be freeze, drive, deposit, or default +; or in other terms, fixed, wired, or charged. +; A value of "default" will use the signal kind to determine the +; force kind, drive for resolved signals, freeze for unresolved signals +; DefaultForceKind = freeze + +; If zero, open files when elaborated; otherwise, open files on +; first read or write. Default is 0. +; DelayFileOpen = 1 + +; Control VHDL files opened for write. +; 0 = Buffered, 1 = Unbuffered +UnbufferedOutput = 0 + +; Control the number of VHDL files open concurrently. +; This number should always be less than the current ulimit +; setting for max file descriptors. +; 0 = unlimited +ConcurrentFileLimit = 40 + +; Control the number of hierarchical regions displayed as +; part of a signal name shown in the Wave window. +; A value of zero tells VSIM to display the full name. +; The default is 0. +; WaveSignalNameWidth = 0 + +; Turn off warnings when changing VHDL constants and generics +; Default is 1 to generate warning messages +; WarnConstantChange = 0 + +; Turn off warnings from the std_logic_arith, std_logic_unsigned +; and std_logic_signed packages. +; StdArithNoWarnings = 1 + +; Turn off warnings from the IEEE numeric_std and numeric_bit packages. +; NumericStdNoWarnings = 1 + +; Control the format of the (VHDL) FOR generate statement label +; for each iteration. Do not quote it. +; The format string here must contain the conversion codes %s and %d, +; in that order, and no other conversion codes. The %s represents +; the generate_label; the %d represents the generate parameter value +; at a particular generate iteration (this is the position number if +; the generate parameter is of an enumeration type). Embedded whitespace +; is allowed (but discouraged); leading and trailing whitespace is ignored. +; Application of the format must result in a unique scope name over all +; such names in the design so that name lookup can function properly. +; GenerateFormat = %s__%d + +; Specify whether checkpoint files should be compressed. +; The default is 1 (compressed). +; CheckpointCompressMode = 0 + +; Specify whether to enable SystemVerilog DPI out-of-the-blue call. +; Out-of-the-blue call refers to a SystemVerilog export function call +; directly from a C function that don't have the proper context setup +; as done in DPI-C import C functions. When this is enabled, one can +; call a DPI export function (but not task) from any C code. +; The default is 0 (disabled). +; DpiOutOfTheBlue = 1 + +; List of dynamically loaded objects for Verilog PLI applications +; Veriuser = veriuser.sl + +; Specify default options for the restart command. Options can be one +; or more of: -force -nobreakpoint -nolist -nolog -nowave -noassertions +; DefaultRestartOptions = -force + +; HP-UX 10.20 ONLY - Enable memory locking to speed up large designs +; (> 500 megabyte memory footprint). Default is disabled. +; Specify number of megabytes to lock. +; LockedMemory = 1000 + +; HP-UX 11.00 ONLY - Use /usr/lib/libCsup_v2.sl for shared object loading. +; This is necessary when C++ files have been compiled with aCC's -AA option. +; The default behavior is to use /usr/lib/libCsup.sl. +; UseCsupV2 = 1 + +; Turn on (1) or off (0) WLF file compression. +; The default is 1 (compress WLF file). +; WLFCompress = 0 + +; Specify whether to save all design hierarchy (1) in the WLF file +; or only regions containing logged signals (0). +; The default is 0 (save only regions with logged signals). +; WLFSaveAllRegions = 1 + +; WLF file time limit. Limit WLF file by time, as closely as possible, +; to the specified amount of simulation time. When the limit is exceeded +; the earliest times get truncated from the file. +; If both time and size limits are specified the most restrictive is used. +; UserTimeUnits are used if time units are not specified. +; The default is 0 (no limit). Example: WLFTimeLimit = {100 ms} +; WLFTimeLimit = 0 + +; WLF file size limit. Limit WLF file size, as closely as possible, +; to the specified number of megabytes. If both time and size limits +; are specified then the most restrictive is used. +; The default is 0 (no limit). +; WLFSizeLimit = 1000 + +; Specify whether or not a WLF file should be deleted when the +; simulation ends. A value of 1 will cause the WLF file to be deleted. +; The default is 0 (do not delete WLF file when simulation ends). +; WLFDeleteOnQuit = 1 + +; Specify whether or not a WLF file should be optimized during +; simulation. If set to 0, the WLF file will not be optimized. +; The default is 1, optimize the WLF file. +; WLFOptimize = 0 + +; Specify the name of the WLF file. +; The default is vsim.wlf +; WLFFilename = vsim.wlf + +; WLF reader cache size limit. Specifies the internal WLF file cache size, +; in megabytes, for EACH open WLF file. A value of 0 turns off the +; WLF cache. +; The default setting is enabled to 256M per open WLF file. +; WLFCacheSize = 1000 + +; Specify the WLF file event collapse mode. +; 0 = Preserve all events and event order. (same as -wlfnocollapse) +; 1 = Only record values of logged objects at the end of a simulator iteration. +; (same as -wlfcollapsedelta) +; 2 = Only record values of logged objects at the end of a simulator time step. +; (same as -wlfcollapsetime) +; The default is 1. +; WLFCollapseMode = 0 + +; Turn on/off undebuggable SystemC type warnings. Default is on. +; ShowUndebuggableScTypeWarning = 0 + +; Turn on/off unassociated SystemC name warnings. Default is off. +; ShowUnassociatedScNameWarning = 1 + +; Set SystemC default time unit. +; Set to fs, ps, ns, us, ms, or sec with optional +; prefix of 1, 10, or 100. The default is 1 ns. +; The ScTimeUnit value is honored if it is coarser than Resolution. +; If ScTimeUnit is finer than Resolution, it is set to the value +; of Resolution. For example, if Resolution is 100ps and ScTimeUnit is ns, +; then the default time unit will be 1 ns. However if Resolution +; is 10 ns and ScTimeUnit is ns, then the default time unit will be 10 ns. +ScTimeUnit = ns + +; Set the SCV relationship name that will be used to identify phase +; relations. If the name given to a transactor relation matches this +; name, the transactions involved will be treated as phase transactions +ScvPhaseRelationName = mti_phase + +; Customize the vsim kernel shutdown behavior at the end of the simulation. +; Some common causes of the end of simulation are $finish (implicit or explicit), +; sc_stop(), tf_dofinish(), and assertion failures. +; This should be set to "ask", "exit", or "stop". The default is "ask". +; "ask" -- In batch mode, the vsim kernel will abruptly exit. +; In GUI mode, a dialog box will pop up and ask for user confirmation +; whether or not to quit the simulation. +; "stop" -- Cause the simulation to stay loaded in memory. This can make some +; post-simulation tasks easier. +; "exit" -- The simulation will abruptly exit without asking for any confirmation. +; Note: these ini variables can be overriden by the vsim command +; line switch "-onfinish ". +OnFinish = ask + +; Print "simstats" result at the end of simulation before shutdown. +; If this is enabled, the simstats result will be printed out before shutdown. +; The default is off. +; PrintSimStats = 1 + +; Run simulator in assertion debug mode. Default is off. +; AssertionDebug = 1 + +; Turn on/off PSL/SVA concurrent assertion pass enable. Default is on. +; AssertionPassEnable = 0 + +; Turn on/off PSL/SVA concurrent assertion fail enable. Default is on. +; AssertionFailEnable = 0 + +; Set PSL/SVA concurrent assertion pass limit. Default is -1. +; Any positive integer, -1 for infinity. +; AssertionPassLimit = 1 + +; Set PSL/SVA concurrent assertion fail limit. Default is -1. +; Any positive integer, -1 for infinity. +; AssertionFailLimit = 1 + +; Turn on/off PSL concurrent assertion pass log. Default is off. +; The flag does not affect SVA +; AssertionPassLog = 1 + +; Turn on/off PSL concurrent assertion fail log. Default is on. +; The flag does not affect SVA +; AssertionFailLog = 0 + +; Set action type for PSL/SVA concurrent assertion fail action. Default is continue. +; 0 = Continue 1 = Break 2 = Exit +; AssertionFailAction = 1 + +; Turn on/off code coverage +; CodeCoverage = 0 + +; Count all code coverage condition and expression truth table rows that match. +; CoverCountAll = 1 + +; Turn on/off all PSL/SVA cover directive enables. Default is on. +; CoverEnable = 0 + +; Turn on/off PSL/SVA cover log. Default is off. +; CoverLog = 1 + +; Set "at_least" value for all PSL/SVA cover directives. Default is 1. +; CoverAtLeast = 2 + +; Set "limit" value for all PSL/SVA cover directives. Default is -1. +; Any positive integer, -1 for infinity. +; CoverLimit = 1 + +; Specify the coverage database filename. Default is "" (i.e. database is NOT automatically saved on close). +; UCDBFilename = vsim.ucdb + +; Specify the maximum limit for the number of Cross (bin) products reported +; in XML and UCDB report against a Cross. A warning is issued if the limit +; is crossed. +; MaxReportRhsSVCrossProducts = 1000 + +; Specify the override for the "auto_bin_max" option for the Covergroups. +; If not specified then value from Covergroup "option" is used. +; SVCoverpointAutoBinMax = 64 + +; Specify the override for the value of "cross_num_print_missing" +; option for the Cross in Covergroups. If not specified then value +; specified in the "option.cross_num_print_missing" is used. This +; is a runtime option. NOTE: This overrides any "cross_num_print_missing" +; value specified by user in source file and any SVCrossNumPrintMissingDefault +; specified in modelsim.ini. +; SVCrossNumPrintMissing = 0 + +; Specify the override for the value of "strobe" option for the +; Covergroup Type. If not specified then value in "type_option.strobe" +; will be used. This is runtime option which forces "strobe" to +; user specified value and supersedes user specified values in the +; SystemVerilog Code. NOTE: This also overrides the compile time +; default value override specified using "SVCovergroupStrobeDefault" +; SVCovergroupStrobe = 0 + +; Override for explicit assignments in source code to "option.goal" of +; SystemVerilog covergroup, coverpoint, and cross. It also overrides the +; default value of "option.goal" (defined to be 100 in the SystemVerilog +; LRM) and the value of modelsim.ini variable "SVCovergroupGoalDefault". +; SVCovergroupGoal = 100 + +; Override for explicit assignments in source code to "type_option.goal" of +; SystemVerilog covergroup, coverpoint, and cross. It also overrides the +; default value of "type_option.goal" (defined to be 100 in the SystemVerilog +; LRM) and the value of modelsim.ini variable "SVCovergroupTypeGoalDefault". +; SVCovergroupTypeGoal = 100 + +; Specify the maximum number of Coverpoint bins in whole design for +; all Covergroups. +; MaxSVCoverpointBinsDesign = 2147483648 + +; Specify maximum number of Coverpoint bins in any instance of a Covergroup +; MaxSVCoverpointBinsInst = 2147483648 + +; Specify the maximum number of Cross bins in whole design for +; all Covergroups. +; MaxSVCrossBinsDesign = 2147483648 + +; Specify maximum number of Cross bins in any instance of a Covergroup +; MaxSVCrossBinsInst = 2147483648 + +; Set weight for all PSL/SVA cover directives. Default is 1. +; CoverWeight = 2 + +; Check vsim plusargs. Default is 0 (off). +; 0 = Don't check plusargs +; 1 = Warning on unrecognized plusarg +; 2 = Error and exit on unrecognized plusarg +; CheckPlusargs = 1 + +; Load the specified shared objects with the RTLD_GLOBAL flag. +; This gives global visibility to all symbols in the shared objects, +; meaning that subsequently loaded shared objects can bind to symbols +; in the global shared objects. The list of shared objects should +; be whitespace delimited. This option is not supported on the +; Windows or AIX platforms. +; GlobalSharedObjectList = example1.so example2.so example3.so + +; Run the 0in tools from within the simulator. +; Default value set to 0. Please set it to 1 to invoke 0in. +; VsimZeroIn = 1 + +; Set the options to be passed to the 0in tools. +; Default value set to "". Please set it to appropriate options needed. +; VsimZeroInOptions = "" + +; Initial seed for the Random Number Generator (RNG) of the root thread (SystemVerilog). +; Sv_Seed = 0 + +; Maximum size of dynamic arrays that are resized during randomize(). +; The default is 1000. A value of 0 indicates no limit. +; SolveArrayResizeMax = 1000 + +; Error message severity when randomize() failure is detected (SystemVerilog). +; The default is 0 (no error). +; 0 = No error 1 = Warning 2 = Error 3 = Failure 4 = Fatal +; SolveFailSeverity = 0 + +; Enable/disable debug information for randomize() failures (SystemVerilog). +; The default is 0 (disabled). Set to 1 to enable. +; SolveFailDebug = 0 + +; When SolveFailDebug is enabled, this value specifies the maximum number of +; constraint subsets that will be tested for conflicts. +; The default is 0 (no limit). +; SolveFailDebugLimit = 0 + +; When SolveFailDebug is enabled, this value specifies the maximum size of +; constraint subsets that will be tested for conflicts. +; The default value is 0 (no limit). +; SolveFailDebugMaxSet = 0 + +; Maximum size of the solution graph that may be generated during randomize(). +; This value can be used to force randomize() to abort if the complexity of +; the constraint scenario (both in memory and time spent during evaluation) +; exceeds the specified limit. This value is specified in 1000s of nodes. +; The default is 10000. A value of 0 indicates no limit. +; SolveGraphMaxSize = 10000 + +; Use SolveFlags to specify options that will guide the behavior of the +; constraint solver. These options may improve the performance of the +; constraint solver for some testcases, and decrease the performance of +; the constraint solver for others. +; The default value is "" (no options). +; +; Valid flags are: +; i = disable bit interleaving for >, >=, <, <= constraints +; r = reverse bit interleaving +; +; SolveFlags = + +; Specify random sequence compatiblity with a prior letter release. This +; option is used to get the same random sequences during simulation as +; as a prior letter release. Only prior letter releases (of the current +; number release) are allowed. +; Note: To achieve the same random sequences, solver optimizations and/or +; bug fixes introduced since the specified release may be disabled - +; yielding the performance / behavior of the prior release. +; Default value set to "" (random compatibility not required). +; SolveRev = + +; Environment variable expansion of command line arguments has been depricated +; in favor shell level expansion. Universal environment variable expansion +; inside -f files is support and continued support for MGC Location Maps provide +; alternative methods for handling flexible pathnames. +; The following line may be uncommented and the value set to 1 to re-enable this +; deprecated behavior. The default value is 0. +; DeprecatedEnvironmentVariableExpansion = 0 + +; Retroactive Recording uses a limited number of private data channels in the WLF +; file. Too many channels degrade WLF performance. If the limit is reached, +; simulation ends with a fatal error. You may change this limit as needed, but be +; aware of the implications of too many channels. The value must be an integer +; greater than or equal to zero, where zero disables all retroactive recording. +; RetroChannelLimit = 20 + +; Options to give vopt when code coverage is turned on. +; Default is "+acc=lprnb -opt=-merge -opt=-suppressAlways" +; VoptCoverageOptions = +acc=lprnb -opt=-merge -opt=-suppressAlways + +; Turn on/off collapsing of bus ports in VCD dumpports output +DumpportsCollapse = 0 + +[lmc] +; The simulator's interface to Logic Modeling's SmartModel SWIFT software +libsm = $MODEL_TECH/libsm.sl +; The simulator's interface to Logic Modeling's SmartModel SWIFT software (Windows NT) +; libsm = $MODEL_TECH/libsm.dll +; Logic Modeling's SmartModel SWIFT software (HP 9000 Series 700) +; libswift = $LMC_HOME/lib/hp700.lib/libswift.sl +; Logic Modeling's SmartModel SWIFT software (IBM RISC System/6000) +; libswift = $LMC_HOME/lib/ibmrs.lib/swift.o +; Logic Modeling's SmartModel SWIFT software (Sun4 Solaris) +; libswift = $LMC_HOME/lib/sun4Solaris.lib/libswift.so +; Logic Modeling's SmartModel SWIFT software (Windows NT) +; libswift = $LMC_HOME/lib/pcnt.lib/libswift.dll +; Logic Modeling's SmartModel SWIFT software (Linux) +; libswift = $LMC_HOME/lib/x86_linux.lib/libswift.so + +; The simulator's interface to Logic Modeling's hardware modeler SFI software +libhm = $MODEL_TECH/libhm.sl +; The simulator's interface to Logic Modeling's hardware modeler SFI software (Windows NT) +; libhm = $MODEL_TECH/libhm.dll +; Logic Modeling's hardware modeler SFI software (HP 9000 Series 700) +; libsfi = /lib/hp700/libsfi.sl +; Logic Modeling's hardware modeler SFI software (IBM RISC System/6000) +; libsfi = /lib/rs6000/libsfi.a +; Logic Modeling's hardware modeler SFI software (Sun4 Solaris) +; libsfi = /lib/sun4.solaris/libsfi.so +; Logic Modeling's hardware modeler SFI software (Windows NT) +; libsfi = /lib/pcnt/lm_sfi.dll +; Logic Modeling's hardware modeler SFI software (Linux) +; libsfi = /lib/linux/libsfi.so + +[msg_system] +; Change a message severity or suppress a message. +; The format is: = [,...] +; Examples: +; note = 3009 +; warning = 3033 +; error = 3010,3016 +; fatal = 3016,3033 +; suppress = 3009,3016,3043 +; The command verror can be used to get the complete +; description of a message. + +; Control transcripting of elaboration/runtime messages. +; The default is to have messages appear in the transcript and +; recorded in the wlf file (messages that are recorded in the +; wlf file can be viewed in the MsgViewer). The other settings +; are to send messages only to the transcript or only to the +; wlf file. The valid values are +; both {default} +; tran {transcript only} +; wlf {wlf file only} +; msgmode = both +[Project] +Project_Version = 6 +Project_DefaultLib = work +Project_SortMethod = unused +Project_Files_Count = 0 +Project_Sim_Count = 0 +Project_Folder_Count = 0 +Echo_Compile_Output = 0 +Save_Compile_Report = 1 +Project_Opt_Count = 0 +ForceSoftPaths = 0 +ReOpenSourceFiles = 1 +VERILOG_DoubleClick = Edit +VERILOG_CustomDoubleClick = +VHDL_DoubleClick = Edit +VHDL_CustomDoubleClick = +PSL_DoubleClick = Edit +PSL_CustomDoubleClick = +TEXT_DoubleClick = Edit +TEXT_CustomDoubleClick = +SYSTEMC_DoubleClick = Edit +SYSTEMC_CustomDoubleClick = +TCL_DoubleClick = Edit +TCL_CustomDoubleClick = +MACRO_DoubleClick = Edit +MACRO_CustomDoubleClick = +VCD_DoubleClick = Edit +VCD_CustomDoubleClick = +SDF_DoubleClick = Edit +SDF_CustomDoubleClick = +XML_DoubleClick = Edit +XML_CustomDoubleClick = +LOGFILE_DoubleClick = Edit +LOGFILE_CustomDoubleClick = +EditorState = {tabbed horizontal 1} {C:/meg/online/VPC/drs4/src/usr_clocks.vhd 0 0} {C:/meg/online/VPC/drs4/sim/drs4_eval1_tb.vhd 0 0} {C:/meg/online/VPC/drs4/src/drs4_eval1.vhd 0 0} {C:/meg/online/VPC/drs4/src/usb2_racc.vhd 0 1} +Project_Major_Version = 6 +Project_Minor_Version = 2 diff --git a/firmware/sim/drs4_eval1_tb.vhd b/firmware/sim/drs4_eval1_tb.vhd new file mode 100644 index 0000000..d9bf74b --- /dev/null +++ b/firmware/sim/drs4_eval1_tb.vhd @@ -0,0 +1,289 @@ +-- Xilinx Testbench Template produced by program netgen J.39 +-- +-------------------------------------------------------------------------------- + +library IEEE; +library WORK; +library SIMPRIM; +use IEEE.STD_LOGIC_1164.ALL; +use WORK.ALL; +use SIMPRIM.VCOMPONENTS.ALL; +use SIMPRIM.VPACKAGE.ALL; + +entity TBX_drs4_eval1 is +end TBX_drs4_eval1; + +architecture TBX_ARCH of TBX_drs4_eval1 is + component drs4_eval1 + port ( + P_IO_UC_SLWR : inout STD_LOGIC; + P_IO_UC_PKTEND : inout STD_LOGIC; + P_IO_UC_FLAGA : inout STD_LOGIC; + P_IO_UC_FLAGB : inout STD_LOGIC; + P_IO_UC_FLAGC : inout STD_LOGIC; + P_I_UC_PA0 : in STD_LOGIC; + P_IO_UC_SLCS : inout STD_LOGIC; + P_IO_UC_FIFOADR0 : inout STD_LOGIC; + P_IO_UC_FIFOADR1 : inout STD_LOGIC; + P_IO_UC_SLOE : inout STD_LOGIC; + P_IO_UC_SLRD : inout STD_LOGIC; + P_I_CLK33 : in STD_LOGIC := 'X'; + P_I_CLK66 : in STD_LOGIC := 'X'; + P_I_LEMO1 : in STD_LOGIC; + P_I_J36 : in STD_LOGIC; + P_I_J37 : in STD_LOGIC; + P_IO_J38 : inout STD_LOGIC; + P_IO_J39 : inout STD_LOGIC; + P_I_ATRG : in STD_LOGIC; + P_O_LED0 : out STD_LOGIC; + P_O_LED1 : out STD_LOGIC; + P_IO_PMC_USR : inout STD_LOGIC_VECTOR ( 63 downto 0 ); + P_IO_UC_FD : inout STD_LOGIC_VECTOR ( 15 downto 0 ) + ); + end component; + + signal P_IO_UC_SLWR : STD_LOGIC; + signal P_IO_UC_PKTEND : STD_LOGIC; + signal P_IO_UC_FLAGA : STD_LOGIC; + signal P_IO_UC_FLAGB : STD_LOGIC; + signal P_IO_UC_FLAGC : STD_LOGIC; + signal P_I_UC_PA0 : STD_LOGIC; + signal P_IO_UC_SLCS : STD_LOGIC; + signal P_IO_UC_FIFOADR0 : STD_LOGIC; + signal P_IO_UC_FIFOADR1 : STD_LOGIC; + signal P_IO_UC_SLOE : STD_LOGIC; + signal P_IO_UC_SLRD : STD_LOGIC; + signal P_I_CLK33 : STD_LOGIC; + signal P_I_CLK66 : STD_LOGIC; + signal P_I_J36 : STD_LOGIC; + signal P_I_J37 : STD_LOGIC; + signal P_IO_J38 : STD_LOGIC; + signal P_IO_J39 : STD_LOGIC; + signal P_I_ATRG : STD_LOGIC; + signal P_O_LED0 : STD_LOGIC; + signal P_O_LED1 : STD_LOGIC; + signal P_I_LEMO1 : STD_LOGIC; + signal P_IO_PMC_USR : STD_LOGIC_VECTOR ( 63 downto 0 ); + signal P_IO_UC_FD : STD_LOGIC_VECTOR ( 15 downto 0 ); + + begin + UUT : drs4_eval1 + port map ( + P_IO_UC_SLWR => P_IO_UC_SLWR, + P_IO_UC_PKTEND => P_IO_UC_PKTEND, + P_IO_UC_FLAGA => P_IO_UC_FLAGA, + P_IO_UC_FLAGB => P_IO_UC_FLAGB, + P_IO_UC_FLAGC => P_IO_UC_FLAGC, + P_I_UC_PA0 => P_I_UC_PA0, + P_IO_UC_SLCS => P_IO_UC_SLCS, + P_IO_UC_FIFOADR0 => P_IO_UC_FIFOADR0, + P_IO_UC_FIFOADR1 => P_IO_UC_FIFOADR1, + P_IO_UC_SLOE => P_IO_UC_SLOE, + P_IO_UC_SLRD => P_IO_UC_SLRD, + P_I_CLK33 => P_I_CLK33, + P_I_CLK66 => P_I_CLK66, + P_I_J36 => P_I_J36, + P_I_J37 => P_I_J37, + P_IO_J38 => P_IO_J38, + P_IO_J39 => P_IO_J39, + P_I_ATRG => P_I_ATRG, + P_I_LEMO1 => P_I_LEMO1, + P_O_LED0 => P_O_LED0, + P_O_LED1 => P_O_LED1, + P_IO_PMC_USR(63) => P_IO_PMC_USR(63), + P_IO_PMC_USR(62) => P_IO_PMC_USR(62), + P_IO_PMC_USR(61) => P_IO_PMC_USR(61), + P_IO_PMC_USR(60) => P_IO_PMC_USR(60), + P_IO_PMC_USR(59) => P_IO_PMC_USR(59), + P_IO_PMC_USR(58) => P_IO_PMC_USR(58), + P_IO_PMC_USR(57) => P_IO_PMC_USR(57), + P_IO_PMC_USR(56) => P_IO_PMC_USR(56), + P_IO_PMC_USR(55) => P_IO_PMC_USR(55), + P_IO_PMC_USR(54) => P_IO_PMC_USR(54), + P_IO_PMC_USR(53) => P_IO_PMC_USR(53), + P_IO_PMC_USR(52) => P_IO_PMC_USR(52), + P_IO_PMC_USR(51) => P_IO_PMC_USR(51), + P_IO_PMC_USR(50) => P_IO_PMC_USR(50), + P_IO_PMC_USR(49) => P_IO_PMC_USR(49), + P_IO_PMC_USR(48) => P_IO_PMC_USR(48), + P_IO_PMC_USR(47) => P_IO_PMC_USR(47), + P_IO_PMC_USR(46) => P_IO_PMC_USR(46), + P_IO_PMC_USR(45) => P_IO_PMC_USR(45), + P_IO_PMC_USR(44) => P_IO_PMC_USR(44), + P_IO_PMC_USR(43) => P_IO_PMC_USR(43), + P_IO_PMC_USR(42) => P_IO_PMC_USR(42), + P_IO_PMC_USR(41) => P_IO_PMC_USR(41), + P_IO_PMC_USR(40) => P_IO_PMC_USR(40), + P_IO_PMC_USR(39) => P_IO_PMC_USR(39), + P_IO_PMC_USR(38) => P_IO_PMC_USR(38), + P_IO_PMC_USR(37) => P_IO_PMC_USR(37), + P_IO_PMC_USR(36) => P_IO_PMC_USR(36), + P_IO_PMC_USR(35) => P_IO_PMC_USR(35), + P_IO_PMC_USR(34) => P_IO_PMC_USR(34), + P_IO_PMC_USR(33) => P_IO_PMC_USR(33), + P_IO_PMC_USR(32) => P_IO_PMC_USR(32), + P_IO_PMC_USR(31) => P_IO_PMC_USR(31), + P_IO_PMC_USR(30) => P_IO_PMC_USR(30), + P_IO_PMC_USR(29) => P_IO_PMC_USR(29), + P_IO_PMC_USR(28) => P_IO_PMC_USR(28), + P_IO_PMC_USR(27) => P_IO_PMC_USR(27), + P_IO_PMC_USR(26) => P_IO_PMC_USR(26), + P_IO_PMC_USR(25) => P_IO_PMC_USR(25), + P_IO_PMC_USR(24) => P_IO_PMC_USR(24), + P_IO_PMC_USR(23) => P_IO_PMC_USR(23), + P_IO_PMC_USR(22) => P_IO_PMC_USR(22), + P_IO_PMC_USR(21) => P_IO_PMC_USR(21), + P_IO_PMC_USR(20) => P_IO_PMC_USR(20), + P_IO_PMC_USR(19) => P_IO_PMC_USR(19), + P_IO_PMC_USR(18) => P_IO_PMC_USR(18), + P_IO_PMC_USR(17) => P_IO_PMC_USR(17), + P_IO_PMC_USR(16) => P_IO_PMC_USR(16), + P_IO_PMC_USR(15) => P_IO_PMC_USR(15), + P_IO_PMC_USR(14) => P_IO_PMC_USR(14), + P_IO_PMC_USR(13) => P_IO_PMC_USR(13), + P_IO_PMC_USR(12) => P_IO_PMC_USR(12), + P_IO_PMC_USR(11) => P_IO_PMC_USR(11), + P_IO_PMC_USR(10) => P_IO_PMC_USR(10), + P_IO_PMC_USR(9) => P_IO_PMC_USR(9), + P_IO_PMC_USR(8) => P_IO_PMC_USR(8), + P_IO_PMC_USR(7) => P_IO_PMC_USR(7), + P_IO_PMC_USR(6) => P_IO_PMC_USR(6), + P_IO_PMC_USR(5) => P_IO_PMC_USR(5), + P_IO_PMC_USR(4) => P_IO_PMC_USR(4), + P_IO_PMC_USR(3) => P_IO_PMC_USR(3), + P_IO_PMC_USR(2) => P_IO_PMC_USR(2), + P_IO_PMC_USR(1) => P_IO_PMC_USR(1), + P_IO_PMC_USR(0) => P_IO_PMC_USR(0), + P_IO_UC_FD(15) => P_IO_UC_FD(15), + P_IO_UC_FD(14) => P_IO_UC_FD(14), + P_IO_UC_FD(13) => P_IO_UC_FD(13), + P_IO_UC_FD(12) => P_IO_UC_FD(12), + P_IO_UC_FD(11) => P_IO_UC_FD(11), + P_IO_UC_FD(10) => P_IO_UC_FD(10), + P_IO_UC_FD(9) => P_IO_UC_FD(9), + P_IO_UC_FD(8) => P_IO_UC_FD(8), + P_IO_UC_FD(7) => P_IO_UC_FD(7), + P_IO_UC_FD(6) => P_IO_UC_FD(6), + P_IO_UC_FD(5) => P_IO_UC_FD(5), + P_IO_UC_FD(4) => P_IO_UC_FD(4), + P_IO_UC_FD(3) => P_IO_UC_FD(3), + P_IO_UC_FD(2) => P_IO_UC_FD(2), + P_IO_UC_FD(1) => P_IO_UC_FD(1), + P_IO_UC_FD(0) => P_IO_UC_FD(0) + ); + -- User: Put your stimulus here. + + -- Clock generation + proc_p_i_clk33_generator : process + begin + clock_loop : loop + P_I_CLK33 <= '1'; + wait for 15 ns; + P_I_CLK33 <= '0'; + wait for 15 ns; + end loop; + end process; + + proc_p_i_clk66_generator : process + begin + clock_loop : loop + P_I_CLK66 <= '1'; + wait for 7.5 ns; + P_I_CLK66 <= '0'; + wait for 7.5 ns; + end loop; + end process; + + -- Static signals + P_I_LEMO1 <= '0'; + P_I_J36 <= '0'; + P_I_J37 <= '0'; + P_I_ATRG <= '0'; + + P_IO_UC_FLAGA <= '1'; + P_IO_UC_FLAGB <= '1'; + P_IO_UC_PKTEND <= 'Z'; + P_I_UC_PA0 <= '1'; + + -- Dynamic signals + proc_p_io_dynamic: process + + -- Write cycle + -- ----------- + procedure proc_wr_cycle( + constant I_A : in std_logic_vector(15 downto 0); + constant I_D : in std_logic_vector(15 downto 0) + ) is + begin + P_IO_UC_FLAGC <= '1'; + P_IO_UC_FD <= X"0002"; -- USB2_CMD_WRITE + wait until P_IO_UC_SLOE = '0'; + + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FD <= I_A; -- low word + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FD <= (others => '0'); -- high word + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FD <= X"0002"; -- low word + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FD <= (others => '0'); -- high word + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FD <= I_D; + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FLAGC <= '0'; + P_IO_UC_FD <= "ZZZZZZZZZZZZZZZZ"; -- tri state + + end proc_wr_cycle; + + begin + + P_I_UC_PA0 <= '1'; + P_IO_UC_FD <= (others => '0'); + P_IO_UC_FLAGC <= '0'; + + wait for 990 ns; -- Until DLLs locked + + proc_wr_cycle(X"0014", X"C000"); -- set ADC clock phase + + wait for 70 us; + + -- proc_wr_cycle(X"0000", X"0001"); -- start domino wave + + -- wait for 3 us; + + -- proc_wr_cycle(X"0000", X"0004"); -- issue soft trigger + + -- wait for 100 us; + + -- stop simulation + assert false + report "Simulation Complete (this is not a failure)" + severity failure; + + end process; + + +end TBX_ARCH; + +configuration TBX_CFG_drs4_eval1_TBX_ARCH of TBX_drs4_eval1 is + for TBX_ARCH + end for; +end TBX_CFG_drs4_eval1_TBX_ARCH; diff --git a/firmware/sim/drs4_mezz1_tb.vhd b/firmware/sim/drs4_mezz1_tb.vhd new file mode 100644 index 0000000..603c33f --- /dev/null +++ b/firmware/sim/drs4_mezz1_tb.vhd @@ -0,0 +1,263 @@ +-- Xilinx Testbench Template produced by program netgen J.39 +-- +-------------------------------------------------------------------------------- + +library IEEE; +library WORK; +library SIMPRIM; +use IEEE.STD_LOGIC_1164.ALL; +use WORK.ALL; +use SIMPRIM.VCOMPONENTS.ALL; +use SIMPRIM.VPACKAGE.ALL; + +entity TBX_drs4_mezz1 is +end TBX_drs4_mezz1; + +architecture TBX_ARCH of TBX_drs4_mezz1 is + component drs4_mezz1 + port ( + P_IO_UC_SLWR : inout STD_LOGIC; + P_IO_UC_PKTEND : inout STD_LOGIC; + P_IO_UC_FLAGA : inout STD_LOGIC; + P_IO_UC_FLAGB : inout STD_LOGIC; + P_IO_UC_FLAGC : inout STD_LOGIC; + P_IO_UC_PA0 : in STD_LOGIC; + P_IO_UC_SLCS : inout STD_LOGIC; + P_IO_UC_FIFOADR0 : inout STD_LOGIC; + P_IO_UC_FIFOADR1 : inout STD_LOGIC; + P_IO_UC_SLOE : inout STD_LOGIC; + P_IO_UC_SLRD : inout STD_LOGIC; + P_I_CLK33 : in STD_LOGIC := 'X'; + P_I_CLK66 : in STD_LOGIC := 'X'; + P_I_LEMO1 : in STD_LOGIC; + P_O_LED1 : out STD_LOGIC; + P_O_LED2 : out STD_LOGIC; + P_IO_PMC_USR : inout STD_LOGIC_VECTOR ( 63 downto 0 ); + P_IO_UC_FD : inout STD_LOGIC_VECTOR ( 15 downto 0 ) + ); + end component; + + signal P_IO_UC_SLWR : STD_LOGIC; + signal P_IO_UC_PKTEND : STD_LOGIC; + signal P_IO_UC_FLAGA : STD_LOGIC; + signal P_IO_UC_FLAGB : STD_LOGIC; + signal P_IO_UC_FLAGC : STD_LOGIC; + signal P_IO_UC_PA0 : STD_LOGIC; + signal P_IO_UC_SLCS : STD_LOGIC; + signal P_IO_UC_FIFOADR0 : STD_LOGIC; + signal P_IO_UC_FIFOADR1 : STD_LOGIC; + signal P_IO_UC_SLOE : STD_LOGIC; + signal P_IO_UC_SLRD : STD_LOGIC; + signal P_I_CLK33 : STD_LOGIC; + signal P_I_CLK66 : STD_LOGIC; + signal P_O_LED1 : STD_LOGIC; + signal P_O_LED2 : STD_LOGIC; + signal P_I_LEMO1 : STD_LOGIC; + signal P_IO_PMC_USR : STD_LOGIC_VECTOR ( 63 downto 0 ); + signal P_IO_UC_FD : STD_LOGIC_VECTOR ( 15 downto 0 ); + + begin + UUT : drs4_mezz1 + port map ( + P_IO_UC_SLWR => P_IO_UC_SLWR, + P_IO_UC_PKTEND => P_IO_UC_PKTEND, + P_IO_UC_FLAGA => P_IO_UC_FLAGA, + P_IO_UC_FLAGB => P_IO_UC_FLAGB, + P_IO_UC_FLAGC => P_IO_UC_FLAGC, + P_IO_UC_PA0 => P_IO_UC_PA0, + P_IO_UC_SLCS => P_IO_UC_SLCS, + P_IO_UC_FIFOADR0 => P_IO_UC_FIFOADR0, + P_IO_UC_FIFOADR1 => P_IO_UC_FIFOADR1, + P_IO_UC_SLOE => P_IO_UC_SLOE, + P_IO_UC_SLRD => P_IO_UC_SLRD, + P_I_CLK33 => P_I_CLK33, + P_I_CLK66 => P_I_CLK66, + P_I_LEMO1 => P_I_LEMO1, + P_O_LED1 => P_O_LED1, + P_O_LED2 => P_O_LED2, + P_IO_PMC_USR(63) => P_IO_PMC_USR(63), + P_IO_PMC_USR(62) => P_IO_PMC_USR(62), + P_IO_PMC_USR(61) => P_IO_PMC_USR(61), + P_IO_PMC_USR(60) => P_IO_PMC_USR(60), + P_IO_PMC_USR(59) => P_IO_PMC_USR(59), + P_IO_PMC_USR(58) => P_IO_PMC_USR(58), + P_IO_PMC_USR(57) => P_IO_PMC_USR(57), + P_IO_PMC_USR(56) => P_IO_PMC_USR(56), + P_IO_PMC_USR(55) => P_IO_PMC_USR(55), + P_IO_PMC_USR(54) => P_IO_PMC_USR(54), + P_IO_PMC_USR(53) => P_IO_PMC_USR(53), + P_IO_PMC_USR(52) => P_IO_PMC_USR(52), + P_IO_PMC_USR(51) => P_IO_PMC_USR(51), + P_IO_PMC_USR(50) => P_IO_PMC_USR(50), + P_IO_PMC_USR(49) => P_IO_PMC_USR(49), + P_IO_PMC_USR(48) => P_IO_PMC_USR(48), + P_IO_PMC_USR(47) => P_IO_PMC_USR(47), + P_IO_PMC_USR(46) => P_IO_PMC_USR(46), + P_IO_PMC_USR(45) => P_IO_PMC_USR(45), + P_IO_PMC_USR(44) => P_IO_PMC_USR(44), + P_IO_PMC_USR(43) => P_IO_PMC_USR(43), + P_IO_PMC_USR(42) => P_IO_PMC_USR(42), + P_IO_PMC_USR(41) => P_IO_PMC_USR(41), + P_IO_PMC_USR(40) => P_IO_PMC_USR(40), + P_IO_PMC_USR(39) => P_IO_PMC_USR(39), + P_IO_PMC_USR(38) => P_IO_PMC_USR(38), + P_IO_PMC_USR(37) => P_IO_PMC_USR(37), + P_IO_PMC_USR(36) => P_IO_PMC_USR(36), + P_IO_PMC_USR(35) => P_IO_PMC_USR(35), + P_IO_PMC_USR(34) => P_IO_PMC_USR(34), + P_IO_PMC_USR(33) => P_IO_PMC_USR(33), + P_IO_PMC_USR(32) => P_IO_PMC_USR(32), + P_IO_PMC_USR(31) => P_IO_PMC_USR(31), + P_IO_PMC_USR(30) => P_IO_PMC_USR(30), + P_IO_PMC_USR(29) => P_IO_PMC_USR(29), + P_IO_PMC_USR(28) => P_IO_PMC_USR(28), + P_IO_PMC_USR(27) => P_IO_PMC_USR(27), + P_IO_PMC_USR(26) => P_IO_PMC_USR(26), + P_IO_PMC_USR(25) => P_IO_PMC_USR(25), + P_IO_PMC_USR(24) => P_IO_PMC_USR(24), + P_IO_PMC_USR(23) => P_IO_PMC_USR(23), + P_IO_PMC_USR(22) => P_IO_PMC_USR(22), + P_IO_PMC_USR(21) => P_IO_PMC_USR(21), + P_IO_PMC_USR(20) => P_IO_PMC_USR(20), + P_IO_PMC_USR(19) => P_IO_PMC_USR(19), + P_IO_PMC_USR(18) => P_IO_PMC_USR(18), + P_IO_PMC_USR(17) => P_IO_PMC_USR(17), + P_IO_PMC_USR(16) => P_IO_PMC_USR(16), + P_IO_PMC_USR(15) => P_IO_PMC_USR(15), + P_IO_PMC_USR(14) => P_IO_PMC_USR(14), + P_IO_PMC_USR(13) => P_IO_PMC_USR(13), + P_IO_PMC_USR(12) => P_IO_PMC_USR(12), + P_IO_PMC_USR(11) => P_IO_PMC_USR(11), + P_IO_PMC_USR(10) => P_IO_PMC_USR(10), + P_IO_PMC_USR(9) => P_IO_PMC_USR(9), + P_IO_PMC_USR(8) => P_IO_PMC_USR(8), + P_IO_PMC_USR(7) => P_IO_PMC_USR(7), + P_IO_PMC_USR(6) => P_IO_PMC_USR(6), + P_IO_PMC_USR(5) => P_IO_PMC_USR(5), + P_IO_PMC_USR(4) => P_IO_PMC_USR(4), + P_IO_PMC_USR(3) => P_IO_PMC_USR(3), + P_IO_PMC_USR(2) => P_IO_PMC_USR(2), + P_IO_PMC_USR(1) => P_IO_PMC_USR(1), + P_IO_PMC_USR(0) => P_IO_PMC_USR(0), + P_IO_UC_FD(15) => P_IO_UC_FD(15), + P_IO_UC_FD(14) => P_IO_UC_FD(14), + P_IO_UC_FD(13) => P_IO_UC_FD(13), + P_IO_UC_FD(12) => P_IO_UC_FD(12), + P_IO_UC_FD(11) => P_IO_UC_FD(11), + P_IO_UC_FD(10) => P_IO_UC_FD(10), + P_IO_UC_FD(9) => P_IO_UC_FD(9), + P_IO_UC_FD(8) => P_IO_UC_FD(8), + P_IO_UC_FD(7) => P_IO_UC_FD(7), + P_IO_UC_FD(6) => P_IO_UC_FD(6), + P_IO_UC_FD(5) => P_IO_UC_FD(5), + P_IO_UC_FD(4) => P_IO_UC_FD(4), + P_IO_UC_FD(3) => P_IO_UC_FD(3), + P_IO_UC_FD(2) => P_IO_UC_FD(2), + P_IO_UC_FD(1) => P_IO_UC_FD(1), + P_IO_UC_FD(0) => P_IO_UC_FD(0) + ); + -- User: Put your stimulus here. + + -- Clock generation + proc_p_i_clk33_generator : process + begin + clock_loop : loop + P_I_CLK33 <= '1'; + wait for 15 ns; + P_I_CLK33 <= '0'; + wait for 15 ns; + end loop; + end process; + + proc_p_i_clk66_generator : process + begin + clock_loop : loop + P_I_CLK66 <= '1'; + wait for 7.5 ns; + P_I_CLK66 <= '0'; + wait for 7.5 ns; + end loop; + end process; + + -- Static signals + P_I_LEMO1 <= '0'; + + P_IO_UC_FLAGA <= '1'; + P_IO_UC_FLAGB <= '1'; + P_IO_UC_PKTEND <= 'Z'; + P_IO_UC_PA0 <= '1'; + + -- Dynamic signals + proc_p_io_dynamic: process + + -- Write cycle + -- ----------- + procedure proc_wr_cycle( + constant I_A : in std_logic_vector(15 downto 0); + constant I_D : in std_logic_vector(15 downto 0) + ) is + begin + P_IO_UC_FLAGC <= '1'; + P_IO_UC_FD <= X"0002"; -- USB2_CMD_WRITE + wait until P_IO_UC_SLOE = '0'; + + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FD <= I_A; -- low word + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FD <= (others => '0'); -- high word + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FD <= X"0002"; -- low word + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FD <= (others => '0'); -- high word + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FD <= I_D; + wait until P_I_CLK33 = '0'; + wait until P_I_CLK33 = '1'; + wait for 4 ns; + + P_IO_UC_FLAGC <= '0'; + P_IO_UC_FD <= "ZZZZZZZZZZZZZZZZ"; -- tri state + + end proc_wr_cycle; + + begin + + P_IO_UC_FLAGC <= '0'; + P_IO_UC_FD <= (others => '1'); + + wait for 990 ns; -- Until DLLs locked + wait for 9.5 ns; -- Clock-to-FLAGs delay of uC + + proc_wr_cycle(X"0016", X"0008"); -- trigger phase shift change + + wait for 300 us; + + -- stop simulation + assert false + report "Simulation Complete (this is not a failure)" + severity failure; + + end process; + + +end TBX_ARCH; + +configuration TBX_CFG_drs4_mezz1_TBX_ARCH of TBX_drs4_mezz1 is + for TBX_ARCH + end for; +end TBX_CFG_drs4_mezz1_TBX_ARCH; diff --git a/firmware/sim/efunc.do b/firmware/sim/efunc.do new file mode 100644 index 0000000..e143d3b --- /dev/null +++ b/firmware/sim/efunc.do @@ -0,0 +1,14 @@ +vlib work +vcom -93 -explicit ../src/drs4_pack.vhd +vcom -93 -explicit ../src/usr_lib.vhd +vcom -93 -explicit ../src/drs4_eval1.vhd +vcom -93 -explicit ../src/drs4_eval1_app.vhd +vcom -93 -explicit ../src/usb2_racc.vhd +vcom -93 -explicit ../src/usb_dpram.vhd +vcom -93 -explicit ../src/usr_clocks.vhd +vcom -93 -explicit ../sim/drs4_eval1_tb.vhd +vsim TBX_drs4_eval1 -t ps +view wave +source wave.do +run 2 us + diff --git a/firmware/sim/func.do b/firmware/sim/func.do new file mode 100644 index 0000000..bb4993f --- /dev/null +++ b/firmware/sim/func.do @@ -0,0 +1,13 @@ +vlib work +vcom -93 -explicit ../src/drs4_pack.vhd +vcom -93 -explicit ../src/usr_lib.vhd +vcom -93 -explicit ../src/drs4_mezz1_app.vhd +vcom -93 -explicit ../src/usr_fpga.vhd +vcom -93 -explicit ../src/usr_racc.vhd +vcom -93 -explicit ../src/usr_dpram.vhd +vcom -93 -explicit ../src/usr_clocks.vhd +vcom -93 -explicit ../sim/usr_fpga_tb.vhd +vsim TBX_usr_fpga -t ps +source wave.do +run 120 us + diff --git a/firmware/sim/mfunc.do b/firmware/sim/mfunc.do new file mode 100644 index 0000000..477612a --- /dev/null +++ b/firmware/sim/mfunc.do @@ -0,0 +1,14 @@ +vlib work +vcom -93 -explicit ../src/drs4_pack.vhd +vcom -93 -explicit ../src/usr_lib.vhd +vcom -93 -explicit ../src/drs4_mezz1.vhd +vcom -93 -explicit ../src/drs4_mezz1_app.vhd +vcom -93 -explicit ../src/usb2_racc.vhd +vcom -93 -explicit ../src/usb_dpram.vhd +vcom -93 -explicit ../src/usr_clocks.vhd +vcom -93 -explicit ../sim/drs4_mezz1_tb.vhd +vsim TBX_drs4_mezz1 -t ps +view wave +source wave.do +run 2 us + diff --git a/firmware/sim/pr.do b/firmware/sim/pr.do new file mode 100644 index 0000000..5cd6ef9 --- /dev/null +++ b/firmware/sim/pr.do @@ -0,0 +1,10 @@ +vlib work +vmap work work + +vcom -93 -explicit ../2vp30/usr_fpga_timesim.vhd +vcom -93 -explicit ../sim/usr_fpga_tb.vhd +vsim -sdfmax /uut/=../2vp30/usr_fpga_timesim.sdf -t ps TBX_usr_fpga + +view wave +source wave.do +run 4.5 us \ No newline at end of file diff --git a/firmware/sim/usb1_mezz1_tb.vhd b/firmware/sim/usb1_mezz1_tb.vhd new file mode 100644 index 0000000..2e00edf --- /dev/null +++ b/firmware/sim/usb1_mezz1_tb.vhd @@ -0,0 +1,249 @@ +-- Xilinx Testbench Template produced by program netgen G.38 + +-- ATTENTION: This file was created by netgen and may therefore be overwritten +-- by subsequent runs of netgen. Xilinx recommends that you copy this file to +-- a new name, or 'paste' this text into another file, to avoid accidental loss +-- of data. + +library IEEE; +library WORK; +library SIMPRIM; +use IEEE.STD_LOGIC_1164.ALL; +use WORK.ALL; +use SIMPRIM.VCOMPONENTS.ALL; +use SIMPRIM.VPACKAGE.ALL; + +entity TBX_usb1_mezz1 is +end TBX_usb1_mezz1; + +architecture TBX_ARCH of TBX_usb1_mezz1 is + component usb1_mezz1 + port ( + P_I_CLK33 : in STD_LOGIC := 'X'; + P_I_UC_RD_N : in STD_LOGIC := 'X'; + P_I_UC_WR_N : in STD_LOGIC := 'X'; + P_I_UC_ALE_N : in STD_LOGIC := 'X'; + P_O_LEMO0 : out STD_LOGIC; + P_O_LEMO1 : out STD_LOGIC; + P_I_LEMO2 : in STD_LOGIC := 'X'; + P_I_LEMO3 : in STD_LOGIC := 'X'; + P_IO_PMC_USR : inout STD_LOGIC_VECTOR ( 63 downto 0 ); + P_IO_UC_DATA : inout STD_LOGIC_VECTOR ( 11 downto 0 ) + ); + end component; + + signal P_I_CLK33 : STD_LOGIC; + signal P_I_UC_RD_N : STD_LOGIC; + signal P_I_UC_WR_N : STD_LOGIC; + signal P_I_UC_ALE_N : STD_LOGIC; + signal P_O_LEMO0 : STD_LOGIC; + signal P_O_LEMO1 : STD_LOGIC; + signal P_I_LEMO2 : STD_LOGIC; + signal P_I_LEMO3 : STD_LOGIC; + signal P_IO_PMC_USR : STD_LOGIC_VECTOR ( 63 downto 0 ); + signal P_IO_UC_DATA : STD_LOGIC_VECTOR ( 11 downto 0 ); + + begin + UUT : usb1_mezz1 + port map ( + P_I_CLK33 => P_I_CLK33, + P_I_UC_RD_N => P_I_UC_RD_N, + P_I_UC_WR_N => P_I_UC_WR_N, + P_I_UC_ALE_N => P_I_UC_ALE_N, + P_O_LEMO0 => P_O_LEMO0, + P_O_LEMO1 => P_O_LEMO1, + P_I_LEMO2 => P_I_LEMO2, + P_I_LEMO3 => P_I_LEMO3, + P_IO_PMC_USR => P_IO_PMC_USR, + P_IO_UC_DATA => P_IO_UC_DATA + ); + + -- Clock generation + -- ---------------- + proc_p_i_clk33_generator : process + begin + clock_loop : loop + P_I_CLK33 <= '1'; + wait for 15 ns; + P_I_CLK33 <= '0'; + wait for 15 ns; + end loop; + end process; + + -- Dynamic signals + -- ############### + proc_p_io_dynamic: process + + -- Address cycle + -- ------------- + procedure proc_ad_cycle( + constant I_A : in std_logic_vector(7 downto 0) + ) is + begin + P_IO_UC_DATA(7 downto 0) <= I_A; + P_I_UC_ALE_N <= '0'; + P_I_UC_WR_N <= '0'; + wait for 200 ns; + P_IO_UC_DATA <= (others => '0'); + P_I_UC_ALE_N <= '1'; + P_I_UC_WR_N <= '1'; + wait for 100 ns; + end proc_ad_cycle; + + -- Data write cycle + -- ---------------- + procedure proc_wr_cycle + ( + constant I_DATA : in std_logic_vector(11 downto 0) + ) is + begin + P_IO_UC_DATA <= I_DATA; + P_I_UC_ALE_N <= '1'; + P_I_UC_WR_N <= '0'; + wait for 200 ns; + P_IO_UC_DATA <= (others => '0'); + P_I_UC_ALE_N <= '1'; + P_I_UC_WR_N <= '1'; + wait for 100 ns; + end proc_wr_cycle; + + -- Data read cycle + -- --------------- + procedure proc_rd_cycle is + begin + P_IO_UC_DATA <= (others => 'Z'); + P_I_UC_ALE_N <= '1'; + P_I_UC_RD_N <= '0'; + wait for 200 ns; + P_I_UC_RD_N <= '1'; + wait for 300 ns; + end proc_rd_cycle; + + begin + -- Initialize signals + P_IO_UC_DATA <= (others => '0'); + P_I_UC_RD_N <= '1'; + P_I_UC_WR_N <= '1'; + P_I_UC_ALE_N <= '1'; + + P_I_LEMO2 <= '0'; + P_I_LEMO3 <= '0'; + + P_IO_PMC_USR(41) <= '0'; -- digital trigger + P_IO_PMC_USR(43) <= '0'; -- analog trigger + + -- Wait for DLL lock + -- ----------------- + wait for 32 us; -- initialization of RSR + + -- Set-up write shift register + --proc_ad_cycle(I_A => X"16"); -- write to 0x14 (byte swapping!) + --proc_wr_cycle(I_DATA => X"000"); + --proc_wr_cycle(I_DATA => X"008"); + + -- Enable TCALIB + --proc_ad_cycle(I_A => X"02"); + --proc_wr_cycle(I_DATA => X"008"); + --wait for 1000 ns; + + -- Write DAC + --proc_ad_cycle(I_A => X"04"); + --proc_wr_cycle(I_DATA => X"034"); + --proc_wr_cycle(I_DATA => X"012"); + + -- Set demand frequency + --proc_ad_cycle(I_A => X"14"); + --proc_wr_cycle(I_DATA => X"03E"); + --proc_wr_cycle(I_DATA => X"001"); + + -- Set readout channels + proc_ad_cycle(I_A => X"14"); + proc_wr_cycle(I_DATA => X"008"); + + -- Start Domino + proc_ad_cycle(I_A => X"00"); + proc_wr_cycle(I_DATA => X"001"); + wait for 3 us; + + -- Select long start pulse + --proc_ad_cycle(I_A => X"02"); + --proc_wr_cycle(I_DATA => X"080"); + + -- Enable external trigger + --proc_ad_cycle(I_A => X"02"); + --proc_wr_cycle(I_DATA => X"040"); + + -- Start Domino + --proc_ad_cycle(I_A => X"00"); + --proc_wr_cycle(I_DATA => X"001"); + --wait for 100 ns; + + -- Supply external trigger + --wait for 2 us; + --P_I_LEMO2 <= '1'; + --wait for 100 ns; + --P_I_LEMO2 <= '0'; + + --wait for 3 us; -- wait for readout + + -- Disable external trigger + --proc_ad_cycle(I_A => X"02"); + --proc_wr_cycle(I_DATA => X"000"); + + -- Start Domino + --proc_ad_cycle(I_A => X"00"); + --proc_wr_cycle(I_DATA => X"001"); + --wait for 100 ns; + + -- Supply external trigger + --wait for 2100 ns; + --P_I_LEMO2 <= '1'; + --wait for 100 ns; + --P_I_LEMO2 <= '0'; + + -- Reinit + --proc_ad_cycle(I_A => X"00"); + --proc_wr_cycle(I_DATA => X"002"); + --wait for 1000 ns; + + -- Start Readout + proc_ad_cycle(I_A => X"00"); + proc_wr_cycle(I_DATA => X"004"); + + -- Trigger flash write + --proc_ad_cycle(I_A => X"00"); + --proc_wr_cycle(I_DATA => X"008"); + + -- Write DAC + --proc_ad_cycle(I_A => X"06"); + --proc_wr_cycle(I_DATA => X"0FF"); + --proc_wr_cycle(I_DATA => X"0FF"); + + -- Access registers/RAM + ----------------------- + --proc_ad_cycle(I_A => "10000000"); + --proc_wr_cycle(I_DATA => "000100010001"); + --proc_wr_cycle(I_DATA => "001000100010"); + --proc_wr_cycle(I_DATA => "010001000100"); + --proc_wr_cycle(I_DATA => "100010001000"); + + --proc_ad_cycle(I_A => "10000000"); + --proc_rd_cycle; + --proc_rd_cycle; + --proc_rd_cycle; + --proc_rd_cycle; + + wait for 400 us; + -- stop simulation + assert false + report "Simulation Complete (this is not a failure)" + severity failure; + + end process; + +end TBX_ARCH; + +configuration TBX_CFG_usb1_mezz1_TBX_ARCH of TBX_usb1_mezz1 is + for TBX_ARCH + end for; +end TBX_CFG_usb1_mezz1_TBX_ARCH; diff --git a/firmware/sim/usb2_func.do b/firmware/sim/usb2_func.do new file mode 100644 index 0000000..61328fb --- /dev/null +++ b/firmware/sim/usb2_func.do @@ -0,0 +1,14 @@ +vlib work +vcom -93 -explicit ../src/drs3_pack.vhd +vcom -93 -explicit ../src/usr_lib.vhd +vcom -93 -explicit ../src/drs3_cmc3.vhd +vcom -93 -explicit ../src/usb_racc.vhd +vcom -93 -explicit ../src/usb_dpram.vhd +vcom -93 -explicit ../src/usr_clocks.vhd +vcom -93 -explicit ../src/usb_mezz3.vhd +vcom -93 -explicit ../sim/usb_mezz3_tb.vhd +vsim TBX_usb_mezz3 -t ps +view wave +source wave.do +run 20 us + diff --git a/firmware/sim/usr_fpga_tb.mpf b/firmware/sim/usr_fpga_tb.mpf new file mode 100644 index 0000000..7062eb9 --- /dev/null +++ b/firmware/sim/usr_fpga_tb.mpf @@ -0,0 +1,404 @@ +; +; Copyright Model Technology, a Mentor Graphics Corporation company 2003, +; All rights reserved. +; +[Library] +std = $MODEL_TECH/../std +ieee = $MODEL_TECH/../ieee +verilog = $MODEL_TECH/../verilog +vital2000 = $MODEL_TECH/../vital2000 +std_developerskit = $MODEL_TECH/../std_developerskit +synopsys = $MODEL_TECH/../synopsys +modelsim_lib = $MODEL_TECH/../modelsim_lib + +work = work +UNISIM = c:\Modeltech\xilinx_ise_actual\unisim +UNISIMS_VER = c:\Modeltech\xilinx_ise_actual\unisims_ver +XILINXCORELIB = c:\Modeltech\xilinx_ise_actual\XilinxCoreLib +XILINXCORELIB_VER = c:\Modeltech\xilinx_ise_actual\XilinxCoreLib_ver +UNI9000_VER = c:\Modeltech\xilinx_ise_actual\uni9000_ver +SIMPRIMS_VER = c:\Modeltech\xilinx_ise_actual\simprims_ver +SIMPRIM = c:\Modeltech\xilinx_ise_actual\simprim +PLS = c:\Modeltech\xilinx_ise_actual\abel\pls +CPLD_VER = c:\Modeltech\xilinx_ise_actual\cpld_ver +CPLD = c:\Modeltech\xilinx_ise_actual\cpld +AIM_VER = c:\Modeltech\xilinx_ise_actual\abel_ver\aim_ver +AIM = c:\Modeltech\xilinx_ise_actual\abel\aim +[vcom] +; Turn on VHDL-1993 as the default. Default is off (VHDL-1987). +; VHDL93 = 1 + +; Show source line containing error. Default is off. +; Show_source = 1 + +; Turn off unbound-component warnings. Default is on. +; Show_Warning1 = 0 + +; Turn off process-without-a-wait-statement warnings. Default is on. +; Show_Warning2 = 0 + +; Turn off null-range warnings. Default is on. +; Show_Warning3 = 0 + +; Turn off no-space-in-time-literal warnings. Default is on. +; Show_Warning4 = 0 + +; Turn off multiple-drivers-on-unresolved-signal warnings. Default is on. +; Show_Warning5 = 0 + +; Turn off optimization for IEEE std_logic_1164 package. Default is on. +; Optimize_1164 = 0 + +; Turn on resolving of ambiguous function overloading in favor of the +; "explicit" function declaration (not the one automatically created by +; the compiler for each type declaration). Default is off. +; The .ini file has Explict enabled so that std_logic_signed/unsigned +; will match the behavior of synthesis tools. +Explicit = 1 + +; Turn off acceleration of the VITAL packages. Default is to accelerate. +; NoVital = 1 + +; Turn off VITAL compliance checking. Default is checking on. +; NoVitalCheck = 1 + +; Ignore VITAL compliance checking errors. Default is to not ignore. +; IgnoreVitalErrors = 1 + +; Turn off VITAL compliance checking warnings. Default is to show warnings. +; Show_VitalChecksWarnings = false + +; Keep silent about case statement static warnings. +; Default is to give a warning. +; NoCaseStaticError = 1 + +; Keep silent about warnings caused by aggregates that are not locally static. +; Default is to give a warning. +; NoOthersStaticError = 1 + +; Treat as errors: +; case statement static warnings +; warnings caused by aggregates that are not locally static +; Overrides NoCaseStaticError, NoOthersStaticError settings. +; PedanticErrors = 1 + +; Turn off inclusion of debugging info within design units. +; Default is to include debugging info. +; NoDebug = 1 + +; Turn off "Loading..." messages. Default is messages on. +; Quiet = 1 + +; Turn on some limited synthesis rule compliance checking. Checks only: +; -- signals used (read) by a process must be in the sensitivity list +; CheckSynthesis = 1 + +; Activate optimizations on expressions that do not involve signals, +; waits, or function/procedure/task invocations. Default is off. +; ScalarOpts = 1 + +; Require the user to specify a configuration for all bindings, +; and do not generate a compile time default binding for the +; component. This will result in an elaboration error of +; 'component not bound' if the user fails to do so. Avoids the rare +; issue of a false dependency upon the unused default binding. +; RequireConfigForAllDefaultBinding = 1 + +; Inhibit range checking on subscripts of arrays. Range checking on +; scalars defined with subtypes is inhibited by default. +; NoIndexCheck = 1 + +; Inhibit range checks on all (implicit and explicit) assignments to +; scalar objects defined with subtypes. +; NoRangeCheck = 1 + +[vlog] + +; Turn off inclusion of debugging info within design units. +; Default is to include debugging info. +; NoDebug = 1 + +; Turn on `protect compiler directive processing. +; Default is to ignore `protect directives. +; Protect = 1 + +; Turn off "Loading..." messages. Default is messages on. +; Quiet = 1 + +; Turn on Verilog hazard checking (order-dependent accessing of global vars). +; Default is off. +; Hazard = 1 + +; Turn on converting regular Verilog identifiers to uppercase. Allows case +; insensitivity for module names. Default is no conversion. +; UpCase = 1 + +; Turn on incremental compilation of modules. Default is off. +; Incremental = 1 + +; Activate optimizations on expressions that do not involve signals, +; waits, or function/procedure/task invocations. Default is off. +; ScalarOpts = 1 + +; Turns on lint-style checking. +; Show_Lint = 1 + +; Show source line containing error. Default is off. +; Show_source = 1 + +; Turn on bad option warning. Default is off. +; Show_BadOptionWarning = 1 + +[vsim] +; Simulator resolution +; Set to fs, ps, ns, us, ms, or sec with optional prefix of 1, 10, or 100. +resolution = 1ps + +; User time unit for run commands +; Set to default, fs, ps, ns, us, ms, or sec. The default is to use the +; unit specified for Resolution. For example, if Resolution is 100ps, +; then UserTimeUnit defaults to ps. +; Should generally be set to default. +UserTimeUnit = ns + +; Default run length +RunLength = 100 us + +; Maximum iterations that can be run without advancing simulation time +IterationLimit = 5000 + +; Directives to license manager can be set either as single value or as +; space separated multi-values: +; vhdl Immediately reserve a VHDL license +; vlog Immediately reserve a Verilog license +; plus Immediately reserve a VHDL and Verilog license +; nomgc Do not look for Mentor Graphics Licenses +; nomti Do not look for Model Technology Licenses +; noqueue Do not wait in the license queue when a license is not available +; viewsim Try for viewer license but accept simulator license(s) instead +; of queuing for viewer license (PE ONLY) +; Single value: +; License = plus +; Multi-value: +; License = noqueue plus + +; Stop the simulator after an assertion message +; 0 = Note 1 = Warning 2 = Error 3 = Failure 4 = Fatal +BreakOnAssertion = 3 + +; Assertion Message Format +; %S - Severity Level +; %R - Report Message +; %T - Time of assertion +; %D - Delta +; %I - Instance or Region pathname (if available) +; %i - Instance pathname with process +; %O - Process name +; %K - Kind of object path is to return: Instance, Signal, Process or Unknown +; %P - Instance or Region path without leaf process +; %F - File +; %L - Line number of assertion or, if assertion is in a subprogram, line +; from which the call is made +; %% - Print '%' character +; If specific format for assertion level is defined, use its format. +; If specific format is not define for assertion level, use AssertionFormatBreak +; if assertion triggers a breakpoint (controlled by BreakOnAssertion level), +; otherwise use AssertionFormat. +; +; AssertionFormat = "** %S: %R\n Time: %T Iteration: %D%I\n" +; AssertionFormatBreak = "** %S: %R\n Time: %T Iteration: %D %K: %i File: %F\n" +; AssertionFormatNote = "** %S: %R\n Time: %T Iteration: %D%I\n" +; AssertionFormatWarning = "** %S: %R\n Time: %T Iteration: %D%I\n" +; AssertionFormatError = "** %S: %R\n Time: %T Iteration: %D %K: %i File: %F\n" +; AssertionFormatFail = "** %S: %R\n Time: %T Iteration: %D %K: %i File: %F\n" +; AssertionFormatFatal = "** %S: %R\n Time: %T Iteration: %D %K: %i File: %F\n" + +; Assertion File - alternate file for storing assertion messages +; AssertFile = assert.log + +; Default radix for all windows and commands. +; Set to symbolic, ascii, binary, octal, decimal, hex, unsigned +DefaultRadix = symbolic + +; VSIM Startup command +; Startup = do startup.do + +; File for saving command transcript +TranscriptFile = transcript + +; File for saving command history +; CommandHistory = cmdhist.log + +; Specify whether paths in simulator commands should be described +; in VHDL or Verilog format. +; For VHDL, PathSeparator = / +; For Verilog, PathSeparator = . +; Must not be the same character as DatasetSeparator. +PathSeparator = / + +; Specify the dataset separator for fully rooted contexts. +; The default is ':'. For example: sim:/top +; Must not be the same character as PathSeparator. +DatasetSeparator = : + +; Disable assertion messages +; IgnoreNote = 1 +; IgnoreWarning = 1 +; IgnoreError = 1 +; IgnoreFailure = 1 + +; Default force kind. May be freeze, drive, or deposit +; or in other terms, fixed, wired, or charged. +; DefaultForceKind = freeze + +; If zero, open files when elaborated; otherwise, open files on +; first read or write. Default is 0. +; DelayFileOpen = 1 + +; Control VHDL files opened for write +; 0 = Buffered, 1 = Unbuffered +UnbufferedOutput = 0 + +; Control number of VHDL files open concurrently +; This number should always be less than the +; current ulimit setting for max file descriptors. +; 0 = unlimited +ConcurrentFileLimit = 40 + +; Control the number of hierarchical regions displayed as +; part of a signal name shown in the waveform window. +; A value of zero tells VSIM to display the full name. +; The default is 0. +; WaveSignalNameWidth = 0 + +; Turn off warnings from the std_logic_arith, std_logic_unsigned +; and std_logic_signed packages. +; StdArithNoWarnings = 1 + +; Turn off warnings from the IEEE numeric_std and numeric_bit packages. +; NumericStdNoWarnings = 1 + +; Control the format of a generate statement label. Do not quote it. +; GenerateFormat = %s__%d + +; Specify whether checkpoint files should be compressed. +; The default is 1 (compressed). +; CheckpointCompressMode = 0 + +; List of dynamically loaded objects for Verilog PLI applications +; Veriuser = veriuser.sl + +; Specify default options for the restart command. Options can be one +; or more of: -force -nobreakpoint -nolist -nolog -nowave +; DefaultRestartOptions = -force + +; HP-UX 10.20 ONLY - Enable memory locking to speed up large designs +; (> 500 megabyte memory footprint). Default is disabled. +; Specify number of megabytes to lock. +; LockedMemory = 1000 + +; Turn on (1) or off (0) WLF file compression. +; The default is 1 (compress WLF file). +; WLFCompress = 0 + +; Specify whether to save all design hierarchy (1) in the WLF file +; or only regions containing logged signals (0). +; The default is 0 (log only regions with logged signals). +; WLFSaveAllRegions = 1 + +; WLF file time limit. Limit WLF file by time, as closely as possible, +; to the specified amount of simulation time. When the limit is exceeded +; the earliest times get truncated from the file. +; If both time and size limits are specified the most restrictive is used. +; UserTimeUnits are used if time units are not specified. +; The default is 0 (no limit). Example: WLFTimeLimit = {100 ms} +; WLFTimeLimit = 0 + +; WLF file size limit. Limit WLF file size, as closely as possible, +; to the specified number of megabytes. If both time and size limits +; are specified then the most restrictive is used. +; The default is 0 (no limit). +; WLFSizeLimit = 1000 + +; Specify whether or not a WLF file should be deleted when the +; simulation ends. A value of 1 will cause the WLF file to be deleted. +; The default is 0 (do not delete WLF file when simulation ends). +; WLFDeleteOnQuit = 1 + +[lmc] +; ModelSim's interface to Logic Modeling's SmartModel SWIFT software +libsm = $MODEL_TECH/libsm.sl +; ModelSim's interface to Logic Modeling's SmartModel SWIFT software (Windows NT) +; libsm = $MODEL_TECH/libsm.dll +; Logic Modeling's SmartModel SWIFT software (HP 9000 Series 700) +; libswift = $LMC_HOME/lib/hp700.lib/libswift.sl +; Logic Modeling's SmartModel SWIFT software (IBM RISC System/6000) +; libswift = $LMC_HOME/lib/ibmrs.lib/swift.o +; Logic Modeling's SmartModel SWIFT software (Sun4 Solaris) +; libswift = $LMC_HOME/lib/sun4Solaris.lib/libswift.so +; Logic Modeling's SmartModel SWIFT software (Windows NT) +; libswift = $LMC_HOME/lib/pcnt.lib/libswift.dll +; Logic Modeling's SmartModel SWIFT software (Linux) +; libswift = $LMC_HOME/lib/x86_linux.lib/libswift.so + +; ModelSim's interface to Logic Modeling's hardware modeler SFI software +libhm = $MODEL_TECH/libhm.sl +; ModelSim's interface to Logic Modeling's hardware modeler SFI software (Windows NT) +; libhm = $MODEL_TECH/libhm.dll +; Logic Modeling's hardware modeler SFI software (HP 9000 Series 700) +; libsfi = /lib/hp700/libsfi.sl +; Logic Modeling's hardware modeler SFI software (IBM RISC System/6000) +; libsfi = /lib/rs6000/libsfi.a +; Logic Modeling's hardware modeler SFI software (Sun4 Solaris) +; libsfi = /lib/sun4.solaris/libsfi.so +; Logic Modeling's hardware modeler SFI software (Windows NT) +; libsfi = /lib/pcnt/lm_sfi.dll +; Logic Modeling's hardware modeler SFI software (Linux) +; libsfi = /lib/linux/libsfi.so +[Project] +; Warning -- Do not edit the project properties directly. +; Property names are dynamic in nature and property +; values have special syntax. Changing property data directly +; can result in a corrupt MPF file. All project properties +; can be modified through project window dialogs. +Project_Version = 6 +Project_DefaultLib = work +Project_SortMethod = unused +Project_Files_Count = 0 +Project_Sim_Count = 0 +Project_Folder_Count = 0 +Echo_Compile_Output = 0 +Save_Compile_Report = 1 +Project_Opt_Count = 0 +ForceSoftPaths = 0 +ProjectStatusDelay = 5000 +VERILOG_DoubleClick = Edit +VERILOG_CustomDoubleClick = +SYSTEMVERILOG_DoubleClick = Edit +SYSTEMVERILOG_CustomDoubleClick = +VHDL_DoubleClick = Edit +VHDL_CustomDoubleClick = +PSL_DoubleClick = Edit +PSL_CustomDoubleClick = +TEXT_DoubleClick = Edit +TEXT_CustomDoubleClick = +SYSTEMC_DoubleClick = Edit +SYSTEMC_CustomDoubleClick = +TCL_DoubleClick = Edit +TCL_CustomDoubleClick = +MACRO_DoubleClick = Edit +MACRO_CustomDoubleClick = +VCD_DoubleClick = Edit +VCD_CustomDoubleClick = +SDF_DoubleClick = Edit +SDF_CustomDoubleClick = +XML_DoubleClick = Edit +XML_CustomDoubleClick = +LOGFILE_DoubleClick = Edit +LOGFILE_CustomDoubleClick = +UCDB_DoubleClick = Edit +UCDB_CustomDoubleClick = +PROJECT_DoubleClick = Edit +PROJECT_CustomDoubleClick = +Project_Major_Version = 6 +Project_Minor_Version = 6 diff --git a/firmware/sim/usr_fpga_tb.vhd b/firmware/sim/usr_fpga_tb.vhd new file mode 100644 index 0000000..afd0a59 --- /dev/null +++ b/firmware/sim/usr_fpga_tb.vhd @@ -0,0 +1,1130 @@ +-- Xilinx Testbench Template produced by program netgen G.38 + +-- ATTENTION: This file was created by netgen and may therefore be overwritten +-- by subsequent runs of netgen. Xilinx recommends that you copy this file to +-- a new name, or 'paste' this text into another file, to avoid accidental loss +-- of data. + +library IEEE; +library WORK; +library SIMPRIM; +use IEEE.STD_LOGIC_1164.ALL; +use WORK.ALL; +use SIMPRIM.VCOMPONENTS.ALL; +use SIMPRIM.VPACKAGE.ALL; + +entity TBX_usr_fpga is +end TBX_usr_fpga; + +architecture TBX_ARCH of TBX_usr_fpga is + component usr_fpga + port ( + P_O_ZBT1_CE2 : out STD_LOGIC; + P_O_ZBT2_BWSD_N : out STD_LOGIC; + P_O_ZBT1_ADV : out STD_LOGIC; + P_O_ZBT2_BWSC_N : out STD_LOGIC; + P_O_ZBT2_BWSB_N : out STD_LOGIC; + P_O_ULED_FRONT_GREEN_N : out STD_LOGIC; + P_O_ZBT2_BWSA_N : out STD_LOGIC; + P_O_ZBT2_CE2 : out STD_LOGIC; + P_O_ZBT2_ADV : out STD_LOGIC; + P_O_ZBT2_ZZ : out STD_LOGIC; + P_O_ULED_FRONT_RED_N : out STD_LOGIC; + P_O_ZBT2_WE_N : out STD_LOGIC; + P_O_ZBT1_WE_N : out STD_LOGIC; + P_O_ZBT1_ZZ : out STD_LOGIC; + P_O_ZBT2_CEN_N : out STD_LOGIC; + P_O_ZBT1_BWSD_N : out STD_LOGIC; + P_O_ZBT1_BWSC_N : out STD_LOGIC; + P_O_ZBT2_OE_N : out STD_LOGIC; + P_O_ZBT1_BWSB_N : out STD_LOGIC; + P_O_SER_UEEPROM_CLK : out STD_LOGIC; + P_O_ZBT1_BWSA_N : out STD_LOGIC; + P_O_ZBT1_OE_N : out STD_LOGIC; + P_O_ZBT2_MODE : out STD_LOGIC; + P_O_ZBT1_CEN_N : out STD_LOGIC; + P_O_ZBT1_MODE : out STD_LOGIC; + P_O_ZBT_CLK : out STD_LOGIC; + P_IO_UTPORT_TS2E : inout STD_LOGIC; + P_IO_UTPORT_TS1E : inout STD_LOGIC; + P_IO_UTPORT_TS20 : inout STD_LOGIC; + P_IO_UTPORT_TS10 : inout STD_LOGIC; + P_IO_UFLASH_CE_N : inout STD_LOGIC; + P_IO_UFLASH_OE_N : inout STD_LOGIC; + P_IO_UTPORT_CPU_HALT : inout STD_LOGIC; + P_IO_SER_UEEPROM_D : inout STD_LOGIC; + P_IO_UTPORT_CPU_TRST : inout STD_LOGIC; + P_IO_UTPORT_CLK : inout STD_LOGIC; + P_IO_UTPORT_CPU_TMS : inout STD_LOGIC; + P_IO_UFLASH_WE_N : inout STD_LOGIC; + P_IO_UTPORT_CPU_TDO : inout STD_LOGIC; + P_IO_UTPORT_CPU_TDI : inout STD_LOGIC; + P_IO_UTPORT_CPU_TCK : inout STD_LOGIC; + P_IO_UTPORT_CPU_HRESET : inout STD_LOGIC; + P_I_UFLASH_ACC_WP_N : in STD_LOGIC := 'X'; + P_I_UFLASH_RESET_N : in STD_LOGIC := 'X'; + P_I_UFLASH_BYTE_N : in STD_LOGIC := 'X'; + P_I_UFLASH_RY_BY_N : in STD_LOGIC := 'X'; + P_I_CLK33 : in STD_LOGIC := 'X'; + P_I_ZBT_CLK_FB : in STD_LOGIC := 'X'; + P_O_ZBT2_A : out STD_LOGIC_VECTOR ( 20 downto 0 ); + P_O_ZBT1_A : out STD_LOGIC_VECTOR ( 20 downto 0 ); + P_IO_PMC1_USR : inout STD_LOGIC_VECTOR ( 63 downto 0 ); + P_IO_UFLASH_D : inout STD_LOGIC_VECTOR ( 15 downto 0 ); + P_IO_VME_P2_Z : inout STD_LOGIC_VECTOR ( 13 downto 0 ); + P_IO_ZBT1_D : inout STD_LOGIC_VECTOR ( 35 downto 0 ); + P_IO_VME_P2_A : inout STD_LOGIC_VECTOR ( 30 downto 0 ); + P_IO_PMC2_USR : inout STD_LOGIC_VECTOR ( 63 downto 0 ); + P_IO_VME_P2_D : inout STD_LOGIC_VECTOR ( 27 downto 0 ); + P_IO_FRONTP_J8_P : inout STD_LOGIC_VECTOR ( 4 downto 1 ); + P_IO_UTPORT_ATDD_A : inout STD_LOGIC_VECTOR ( 14 downto 8 ); + P_IO_SYSFPGA : inout STD_LOGIC_VECTOR ( 6 downto 0 ); + P_IO_UFLASH_A : inout STD_LOGIC_VECTOR ( 22 downto 0 ); + P_IO_FRONTP_J8_N : inout STD_LOGIC_VECTOR ( 4 downto 1 ); + P_IO_ZBT2_D : inout STD_LOGIC_VECTOR ( 35 downto 0 ); + P_IO_UTPORT_TS : inout STD_LOGIC_VECTOR ( 6 downto 3 ); + P_IO_UTPORT_DEBUG : inout STD_LOGIC_VECTOR ( 9 downto 0 ); + P_IO_VME_P0_USR : inout STD_LOGIC_VECTOR ( 75 downto 0 ); + P_IO_VME_P2_C : inout STD_LOGIC_VECTOR ( 28 downto 0 ); + P_IO_UTPORT_ATDD_B : inout STD_LOGIC_VECTOR ( 19 downto 16 ); + P_I_DIPSW1 : in STD_LOGIC_VECTOR ( 7 downto 0 ); + P_I_HW_ID : in STD_LOGIC_VECTOR ( 4 downto 0 ) + ); + end component; + + signal P_O_ZBT1_CE2 : STD_LOGIC; + signal P_O_ZBT2_BWSD_N : STD_LOGIC; + signal P_O_ZBT1_ADV : STD_LOGIC; + signal P_O_ZBT2_BWSC_N : STD_LOGIC; + signal P_O_ZBT2_BWSB_N : STD_LOGIC; + signal P_O_ULED_FRONT_GREEN_N : STD_LOGIC; + signal P_O_ZBT2_BWSA_N : STD_LOGIC; + signal P_O_ZBT2_CE2 : STD_LOGIC; + signal P_O_ZBT2_ADV : STD_LOGIC; + signal P_O_ZBT2_ZZ : STD_LOGIC; + signal P_O_ULED_FRONT_RED_N : STD_LOGIC; + signal P_O_ZBT2_WE_N : STD_LOGIC; + signal P_O_ZBT1_WE_N : STD_LOGIC; + signal P_O_ZBT1_ZZ : STD_LOGIC; + signal P_O_ZBT2_CEN_N : STD_LOGIC; + signal P_O_ZBT1_BWSD_N : STD_LOGIC; + signal P_O_ZBT1_BWSC_N : STD_LOGIC; + signal P_O_ZBT2_OE_N : STD_LOGIC; + signal P_O_ZBT1_BWSB_N : STD_LOGIC; + signal P_O_SER_UEEPROM_CLK : STD_LOGIC; + signal P_O_ZBT1_BWSA_N : STD_LOGIC; + signal P_O_ZBT1_OE_N : STD_LOGIC; + signal P_O_ZBT2_MODE : STD_LOGIC; + signal P_O_ZBT1_CEN_N : STD_LOGIC; + signal P_O_ZBT1_MODE : STD_LOGIC; + signal P_O_ZBT_CLK : STD_LOGIC; + signal P_IO_UTPORT_TS2E : STD_LOGIC; + signal P_IO_UTPORT_TS1E : STD_LOGIC; + signal P_IO_UTPORT_TS20 : STD_LOGIC; + signal P_IO_UTPORT_TS10 : STD_LOGIC; + signal P_IO_UFLASH_CE_N : STD_LOGIC; + signal P_IO_UFLASH_OE_N : STD_LOGIC; + signal P_IO_UTPORT_CPU_HALT : STD_LOGIC; + signal P_IO_SER_UEEPROM_D : STD_LOGIC; + signal P_IO_UTPORT_CPU_TRST : STD_LOGIC; + signal P_IO_UTPORT_CLK : STD_LOGIC; + signal P_IO_UTPORT_CPU_TMS : STD_LOGIC; + signal P_IO_UFLASH_WE_N : STD_LOGIC; + signal P_IO_UTPORT_CPU_TDO : STD_LOGIC; + signal P_IO_UTPORT_CPU_TDI : STD_LOGIC; + signal P_IO_UTPORT_CPU_TCK : STD_LOGIC; + signal P_IO_UTPORT_CPU_HRESET : STD_LOGIC; + signal P_I_UFLASH_ACC_WP_N : STD_LOGIC; + signal P_I_UFLASH_RESET_N : STD_LOGIC; + signal P_I_UFLASH_BYTE_N : STD_LOGIC; + signal P_I_UFLASH_RY_BY_N : STD_LOGIC; + signal P_I_CLK33 : STD_LOGIC; + signal P_I_ZBT_CLK_FB : STD_LOGIC; + signal P_O_ZBT2_A : STD_LOGIC_VECTOR ( 20 downto 0 ); + signal P_O_ZBT1_A : STD_LOGIC_VECTOR ( 20 downto 0 ); + signal P_IO_PMC1_USR : STD_LOGIC_VECTOR ( 63 downto 0 ); + signal P_IO_UFLASH_D : STD_LOGIC_VECTOR ( 15 downto 0 ); + signal P_IO_VME_P2_Z : STD_LOGIC_VECTOR ( 13 downto 0 ); + signal P_IO_ZBT1_D : STD_LOGIC_VECTOR ( 35 downto 0 ); + signal P_IO_VME_P2_A : STD_LOGIC_VECTOR ( 30 downto 0 ); + signal P_IO_PMC2_USR : STD_LOGIC_VECTOR ( 63 downto 0 ); + signal P_IO_VME_P2_D : STD_LOGIC_VECTOR ( 27 downto 0 ); + signal P_IO_FRONTP_J8_P : STD_LOGIC_VECTOR ( 4 downto 1 ); + signal P_IO_UTPORT_ATDD_A : STD_LOGIC_VECTOR ( 14 downto 8 ); + signal P_IO_SYSFPGA : STD_LOGIC_VECTOR ( 6 downto 0 ); + signal P_IO_UFLASH_A : STD_LOGIC_VECTOR ( 22 downto 0 ); + signal P_IO_FRONTP_J8_N : STD_LOGIC_VECTOR ( 4 downto 1 ); + signal P_IO_ZBT2_D : STD_LOGIC_VECTOR ( 35 downto 0 ); + signal P_IO_UTPORT_TS : STD_LOGIC_VECTOR ( 6 downto 3 ); + signal P_IO_UTPORT_DEBUG : STD_LOGIC_VECTOR ( 9 downto 0 ); + signal P_IO_VME_P0_USR : STD_LOGIC_VECTOR ( 75 downto 0 ); + signal P_IO_VME_P2_C : STD_LOGIC_VECTOR ( 28 downto 0 ); + signal P_IO_UTPORT_ATDD_B : STD_LOGIC_VECTOR ( 19 downto 16 ); + signal P_I_DIPSW1 : STD_LOGIC_VECTOR ( 7 downto 0 ); + signal P_I_HW_ID : STD_LOGIC_VECTOR ( 4 downto 0 ); + + -- signal shortcuts + signal o_cycle_n : std_logic; + signal i_cycle_n : std_logic; + signal i_req_n : std_logic; + signal o_gnt_n : std_logic; + signal io_ack_n : std_logic; + signal io_err_n : std_logic; + signal i_alive : std_logic; + + signal io_as_n : std_logic; + signal io_ds_n : std_logic; + signal io_write_n : std_logic; + + signal o_ad : std_logic_vector(31 downto 0); + signal i_ad : std_logic_vector(31 downto 0); + signal o_sel : std_logic_vector(3 downto 0); + + signal i_data : std_logic_vector(31 downto 0); + + -- 66 MHz clock + signal CLK66 : std_logic; + + begin + UUT : usr_fpga + port map ( + P_O_ZBT1_CE2 => P_O_ZBT1_CE2, + P_O_ZBT2_BWSD_N => P_O_ZBT2_BWSD_N, + P_O_ZBT1_ADV => P_O_ZBT1_ADV, + P_O_ZBT2_BWSC_N => P_O_ZBT2_BWSC_N, + P_O_ZBT2_BWSB_N => P_O_ZBT2_BWSB_N, + P_O_ULED_FRONT_GREEN_N => P_O_ULED_FRONT_GREEN_N, + P_O_ZBT2_BWSA_N => P_O_ZBT2_BWSA_N, + P_O_ZBT2_CE2 => P_O_ZBT2_CE2, + P_O_ZBT2_ADV => P_O_ZBT2_ADV, + P_O_ZBT2_ZZ => P_O_ZBT2_ZZ, + P_O_ULED_FRONT_RED_N => P_O_ULED_FRONT_RED_N, + P_O_ZBT2_WE_N => P_O_ZBT2_WE_N, + P_O_ZBT1_WE_N => P_O_ZBT1_WE_N, + P_O_ZBT1_ZZ => P_O_ZBT1_ZZ, + P_O_ZBT2_CEN_N => P_O_ZBT2_CEN_N, + P_O_ZBT1_BWSD_N => P_O_ZBT1_BWSD_N, + P_O_ZBT1_BWSC_N => P_O_ZBT1_BWSC_N, + P_O_ZBT2_OE_N => P_O_ZBT2_OE_N, + P_O_ZBT1_BWSB_N => P_O_ZBT1_BWSB_N, + P_O_SER_UEEPROM_CLK => P_O_SER_UEEPROM_CLK, + P_O_ZBT1_BWSA_N => P_O_ZBT1_BWSA_N, + P_O_ZBT1_OE_N => P_O_ZBT1_OE_N, + P_O_ZBT2_MODE => P_O_ZBT2_MODE, + P_O_ZBT1_CEN_N => P_O_ZBT1_CEN_N, + P_O_ZBT1_MODE => P_O_ZBT1_MODE, + P_O_ZBT_CLK => P_O_ZBT_CLK, + P_IO_UTPORT_TS2E => P_IO_UTPORT_TS2E, + P_IO_UTPORT_TS1E => P_IO_UTPORT_TS1E, + P_IO_UTPORT_TS20 => P_IO_UTPORT_TS20, + P_IO_UTPORT_TS10 => P_IO_UTPORT_TS10, + P_IO_UFLASH_CE_N => P_IO_UFLASH_CE_N, + P_IO_UFLASH_OE_N => P_IO_UFLASH_OE_N, + P_IO_UTPORT_CPU_HALT => P_IO_UTPORT_CPU_HALT, + P_IO_SER_UEEPROM_D => P_IO_SER_UEEPROM_D, + P_IO_UTPORT_CPU_TRST => P_IO_UTPORT_CPU_TRST, + P_IO_UTPORT_CLK => P_IO_UTPORT_CLK, + P_IO_UTPORT_CPU_TMS => P_IO_UTPORT_CPU_TMS, + P_IO_UFLASH_WE_N => P_IO_UFLASH_WE_N, + P_IO_UTPORT_CPU_TDO => P_IO_UTPORT_CPU_TDO, + P_IO_UTPORT_CPU_TDI => P_IO_UTPORT_CPU_TDI, + P_IO_UTPORT_CPU_TCK => P_IO_UTPORT_CPU_TCK, + P_IO_UTPORT_CPU_HRESET => P_IO_UTPORT_CPU_HRESET, + P_I_UFLASH_ACC_WP_N => P_I_UFLASH_ACC_WP_N, + P_I_UFLASH_RESET_N => P_I_UFLASH_RESET_N, + P_I_UFLASH_BYTE_N => P_I_UFLASH_BYTE_N, + P_I_UFLASH_RY_BY_N => P_I_UFLASH_RY_BY_N, + P_I_CLK33 => P_I_CLK33, + P_I_ZBT_CLK_FB => P_I_ZBT_CLK_FB, + P_O_ZBT2_A(20) => P_O_ZBT2_A(20), + P_O_ZBT2_A(19) => P_O_ZBT2_A(19), + P_O_ZBT2_A(18) => P_O_ZBT2_A(18), + P_O_ZBT2_A(17) => P_O_ZBT2_A(17), + P_O_ZBT2_A(16) => P_O_ZBT2_A(16), + P_O_ZBT2_A(15) => P_O_ZBT2_A(15), + P_O_ZBT2_A(14) => P_O_ZBT2_A(14), + P_O_ZBT2_A(13) => P_O_ZBT2_A(13), + P_O_ZBT2_A(12) => P_O_ZBT2_A(12), + P_O_ZBT2_A(11) => P_O_ZBT2_A(11), + P_O_ZBT2_A(10) => P_O_ZBT2_A(10), + P_O_ZBT2_A(9) => P_O_ZBT2_A(9), + P_O_ZBT2_A(8) => P_O_ZBT2_A(8), + P_O_ZBT2_A(7) => P_O_ZBT2_A(7), + P_O_ZBT2_A(6) => P_O_ZBT2_A(6), + P_O_ZBT2_A(5) => P_O_ZBT2_A(5), + P_O_ZBT2_A(4) => P_O_ZBT2_A(4), + P_O_ZBT2_A(3) => P_O_ZBT2_A(3), + P_O_ZBT2_A(2) => P_O_ZBT2_A(2), + P_O_ZBT2_A(1) => P_O_ZBT2_A(1), + P_O_ZBT2_A(0) => P_O_ZBT2_A(0), + P_O_ZBT1_A(20) => P_O_ZBT1_A(20), + P_O_ZBT1_A(19) => P_O_ZBT1_A(19), + P_O_ZBT1_A(18) => P_O_ZBT1_A(18), + P_O_ZBT1_A(17) => P_O_ZBT1_A(17), + P_O_ZBT1_A(16) => P_O_ZBT1_A(16), + P_O_ZBT1_A(15) => P_O_ZBT1_A(15), + P_O_ZBT1_A(14) => P_O_ZBT1_A(14), + P_O_ZBT1_A(13) => P_O_ZBT1_A(13), + P_O_ZBT1_A(12) => P_O_ZBT1_A(12), + P_O_ZBT1_A(11) => P_O_ZBT1_A(11), + P_O_ZBT1_A(10) => P_O_ZBT1_A(10), + P_O_ZBT1_A(9) => P_O_ZBT1_A(9), + P_O_ZBT1_A(8) => P_O_ZBT1_A(8), + P_O_ZBT1_A(7) => P_O_ZBT1_A(7), + P_O_ZBT1_A(6) => P_O_ZBT1_A(6), + P_O_ZBT1_A(5) => P_O_ZBT1_A(5), + P_O_ZBT1_A(4) => P_O_ZBT1_A(4), + P_O_ZBT1_A(3) => P_O_ZBT1_A(3), + P_O_ZBT1_A(2) => P_O_ZBT1_A(2), + P_O_ZBT1_A(1) => P_O_ZBT1_A(1), + P_O_ZBT1_A(0) => P_O_ZBT1_A(0), + P_IO_PMC1_USR(63) => P_IO_PMC1_USR(63), + P_IO_PMC1_USR(62) => P_IO_PMC1_USR(62), + P_IO_PMC1_USR(61) => P_IO_PMC1_USR(61), + P_IO_PMC1_USR(60) => P_IO_PMC1_USR(60), + P_IO_PMC1_USR(59) => P_IO_PMC1_USR(59), + P_IO_PMC1_USR(58) => P_IO_PMC1_USR(58), + P_IO_PMC1_USR(57) => P_IO_PMC1_USR(57), + P_IO_PMC1_USR(56) => P_IO_PMC1_USR(56), + P_IO_PMC1_USR(55) => P_IO_PMC1_USR(55), + P_IO_PMC1_USR(54) => P_IO_PMC1_USR(54), + P_IO_PMC1_USR(53) => P_IO_PMC1_USR(53), + P_IO_PMC1_USR(52) => P_IO_PMC1_USR(52), + P_IO_PMC1_USR(51) => P_IO_PMC1_USR(51), + P_IO_PMC1_USR(50) => P_IO_PMC1_USR(50), + P_IO_PMC1_USR(49) => P_IO_PMC1_USR(49), + P_IO_PMC1_USR(48) => P_IO_PMC1_USR(48), + P_IO_PMC1_USR(47) => P_IO_PMC1_USR(47), + P_IO_PMC1_USR(46) => P_IO_PMC1_USR(46), + P_IO_PMC1_USR(45) => P_IO_PMC1_USR(45), + P_IO_PMC1_USR(44) => P_IO_PMC1_USR(44), + P_IO_PMC1_USR(43) => P_IO_PMC1_USR(43), + P_IO_PMC1_USR(42) => P_IO_PMC1_USR(42), + P_IO_PMC1_USR(41) => P_IO_PMC1_USR(41), + P_IO_PMC1_USR(40) => P_IO_PMC1_USR(40), + P_IO_PMC1_USR(39) => P_IO_PMC1_USR(39), + P_IO_PMC1_USR(38) => P_IO_PMC1_USR(38), + P_IO_PMC1_USR(37) => P_IO_PMC1_USR(37), + P_IO_PMC1_USR(36) => P_IO_PMC1_USR(36), + P_IO_PMC1_USR(35) => P_IO_PMC1_USR(35), + P_IO_PMC1_USR(34) => P_IO_PMC1_USR(34), + P_IO_PMC1_USR(33) => P_IO_PMC1_USR(33), + P_IO_PMC1_USR(32) => P_IO_PMC1_USR(32), + P_IO_PMC1_USR(31) => P_IO_PMC1_USR(31), + P_IO_PMC1_USR(30) => P_IO_PMC1_USR(30), + P_IO_PMC1_USR(29) => P_IO_PMC1_USR(29), + P_IO_PMC1_USR(28) => P_IO_PMC1_USR(28), + P_IO_PMC1_USR(27) => P_IO_PMC1_USR(27), + P_IO_PMC1_USR(26) => P_IO_PMC1_USR(26), + P_IO_PMC1_USR(25) => P_IO_PMC1_USR(25), + P_IO_PMC1_USR(24) => P_IO_PMC1_USR(24), + P_IO_PMC1_USR(23) => P_IO_PMC1_USR(23), + P_IO_PMC1_USR(22) => P_IO_PMC1_USR(22), + P_IO_PMC1_USR(21) => P_IO_PMC1_USR(21), + P_IO_PMC1_USR(20) => P_IO_PMC1_USR(20), + P_IO_PMC1_USR(19) => P_IO_PMC1_USR(19), + P_IO_PMC1_USR(18) => P_IO_PMC1_USR(18), + P_IO_PMC1_USR(17) => P_IO_PMC1_USR(17), + P_IO_PMC1_USR(16) => P_IO_PMC1_USR(16), + P_IO_PMC1_USR(15) => P_IO_PMC1_USR(15), + P_IO_PMC1_USR(14) => P_IO_PMC1_USR(14), + P_IO_PMC1_USR(13) => P_IO_PMC1_USR(13), + P_IO_PMC1_USR(12) => P_IO_PMC1_USR(12), + P_IO_PMC1_USR(11) => P_IO_PMC1_USR(11), + P_IO_PMC1_USR(10) => P_IO_PMC1_USR(10), + P_IO_PMC1_USR(9) => P_IO_PMC1_USR(9), + P_IO_PMC1_USR(8) => P_IO_PMC1_USR(8), + P_IO_PMC1_USR(7) => P_IO_PMC1_USR(7), + P_IO_PMC1_USR(6) => P_IO_PMC1_USR(6), + P_IO_PMC1_USR(5) => P_IO_PMC1_USR(5), + P_IO_PMC1_USR(4) => P_IO_PMC1_USR(4), + P_IO_PMC1_USR(3) => P_IO_PMC1_USR(3), + P_IO_PMC1_USR(2) => P_IO_PMC1_USR(2), + P_IO_PMC1_USR(1) => P_IO_PMC1_USR(1), + P_IO_PMC1_USR(0) => P_IO_PMC1_USR(0), + P_IO_UFLASH_D(15) => P_IO_UFLASH_D(15), + P_IO_UFLASH_D(14) => P_IO_UFLASH_D(14), + P_IO_UFLASH_D(13) => P_IO_UFLASH_D(13), + P_IO_UFLASH_D(12) => P_IO_UFLASH_D(12), + P_IO_UFLASH_D(11) => P_IO_UFLASH_D(11), + P_IO_UFLASH_D(10) => P_IO_UFLASH_D(10), + P_IO_UFLASH_D(9) => P_IO_UFLASH_D(9), + P_IO_UFLASH_D(8) => P_IO_UFLASH_D(8), + P_IO_UFLASH_D(7) => P_IO_UFLASH_D(7), + P_IO_UFLASH_D(6) => P_IO_UFLASH_D(6), + P_IO_UFLASH_D(5) => P_IO_UFLASH_D(5), + P_IO_UFLASH_D(4) => P_IO_UFLASH_D(4), + P_IO_UFLASH_D(3) => P_IO_UFLASH_D(3), + P_IO_UFLASH_D(2) => P_IO_UFLASH_D(2), + P_IO_UFLASH_D(1) => P_IO_UFLASH_D(1), + P_IO_UFLASH_D(0) => P_IO_UFLASH_D(0), + P_IO_VME_P2_Z(13) => P_IO_VME_P2_Z(13), + P_IO_VME_P2_Z(12) => P_IO_VME_P2_Z(12), + P_IO_VME_P2_Z(11) => P_IO_VME_P2_Z(11), + P_IO_VME_P2_Z(10) => P_IO_VME_P2_Z(10), + P_IO_VME_P2_Z(9) => P_IO_VME_P2_Z(9), + P_IO_VME_P2_Z(8) => P_IO_VME_P2_Z(8), + P_IO_VME_P2_Z(7) => P_IO_VME_P2_Z(7), + P_IO_VME_P2_Z(6) => P_IO_VME_P2_Z(6), + P_IO_VME_P2_Z(5) => P_IO_VME_P2_Z(5), + P_IO_VME_P2_Z(4) => P_IO_VME_P2_Z(4), + P_IO_VME_P2_Z(3) => P_IO_VME_P2_Z(3), + P_IO_VME_P2_Z(2) => P_IO_VME_P2_Z(2), + P_IO_VME_P2_Z(1) => P_IO_VME_P2_Z(1), + P_IO_VME_P2_Z(0) => P_IO_VME_P2_Z(0), + P_IO_ZBT1_D(35) => P_IO_ZBT1_D(35), + P_IO_ZBT1_D(34) => P_IO_ZBT1_D(34), + P_IO_ZBT1_D(33) => P_IO_ZBT1_D(33), + P_IO_ZBT1_D(32) => P_IO_ZBT1_D(32), + P_IO_ZBT1_D(31) => P_IO_ZBT1_D(31), + P_IO_ZBT1_D(30) => P_IO_ZBT1_D(30), + P_IO_ZBT1_D(29) => P_IO_ZBT1_D(29), + P_IO_ZBT1_D(28) => P_IO_ZBT1_D(28), + P_IO_ZBT1_D(27) => P_IO_ZBT1_D(27), + P_IO_ZBT1_D(26) => P_IO_ZBT1_D(26), + P_IO_ZBT1_D(25) => P_IO_ZBT1_D(25), + P_IO_ZBT1_D(24) => P_IO_ZBT1_D(24), + P_IO_ZBT1_D(23) => P_IO_ZBT1_D(23), + P_IO_ZBT1_D(22) => P_IO_ZBT1_D(22), + P_IO_ZBT1_D(21) => P_IO_ZBT1_D(21), + P_IO_ZBT1_D(20) => P_IO_ZBT1_D(20), + P_IO_ZBT1_D(19) => P_IO_ZBT1_D(19), + P_IO_ZBT1_D(18) => P_IO_ZBT1_D(18), + P_IO_ZBT1_D(17) => P_IO_ZBT1_D(17), + P_IO_ZBT1_D(16) => P_IO_ZBT1_D(16), + P_IO_ZBT1_D(15) => P_IO_ZBT1_D(15), + P_IO_ZBT1_D(14) => P_IO_ZBT1_D(14), + P_IO_ZBT1_D(13) => P_IO_ZBT1_D(13), + P_IO_ZBT1_D(12) => P_IO_ZBT1_D(12), + P_IO_ZBT1_D(11) => P_IO_ZBT1_D(11), + P_IO_ZBT1_D(10) => P_IO_ZBT1_D(10), + P_IO_ZBT1_D(9) => P_IO_ZBT1_D(9), + P_IO_ZBT1_D(8) => P_IO_ZBT1_D(8), + P_IO_ZBT1_D(7) => P_IO_ZBT1_D(7), + P_IO_ZBT1_D(6) => P_IO_ZBT1_D(6), + P_IO_ZBT1_D(5) => P_IO_ZBT1_D(5), + P_IO_ZBT1_D(4) => P_IO_ZBT1_D(4), + P_IO_ZBT1_D(3) => P_IO_ZBT1_D(3), + P_IO_ZBT1_D(2) => P_IO_ZBT1_D(2), + P_IO_ZBT1_D(1) => P_IO_ZBT1_D(1), + P_IO_ZBT1_D(0) => P_IO_ZBT1_D(0), + P_IO_VME_P2_A(30) => P_IO_VME_P2_A(30), + P_IO_VME_P2_A(29) => P_IO_VME_P2_A(29), + P_IO_VME_P2_A(28) => P_IO_VME_P2_A(28), + P_IO_VME_P2_A(27) => P_IO_VME_P2_A(27), + P_IO_VME_P2_A(26) => P_IO_VME_P2_A(26), + P_IO_VME_P2_A(25) => P_IO_VME_P2_A(25), + P_IO_VME_P2_A(24) => P_IO_VME_P2_A(24), + P_IO_VME_P2_A(23) => P_IO_VME_P2_A(23), + P_IO_VME_P2_A(22) => P_IO_VME_P2_A(22), + P_IO_VME_P2_A(21) => P_IO_VME_P2_A(21), + P_IO_VME_P2_A(20) => P_IO_VME_P2_A(20), + P_IO_VME_P2_A(19) => P_IO_VME_P2_A(19), + P_IO_VME_P2_A(18) => P_IO_VME_P2_A(18), + P_IO_VME_P2_A(17) => P_IO_VME_P2_A(17), + P_IO_VME_P2_A(16) => P_IO_VME_P2_A(16), + P_IO_VME_P2_A(15) => P_IO_VME_P2_A(15), + P_IO_VME_P2_A(14) => P_IO_VME_P2_A(14), + P_IO_VME_P2_A(13) => P_IO_VME_P2_A(13), + P_IO_VME_P2_A(12) => P_IO_VME_P2_A(12), + P_IO_VME_P2_A(11) => P_IO_VME_P2_A(11), + P_IO_VME_P2_A(10) => P_IO_VME_P2_A(10), + P_IO_VME_P2_A(9) => P_IO_VME_P2_A(9), + P_IO_VME_P2_A(8) => P_IO_VME_P2_A(8), + P_IO_VME_P2_A(7) => P_IO_VME_P2_A(7), + P_IO_VME_P2_A(6) => P_IO_VME_P2_A(6), + P_IO_VME_P2_A(5) => P_IO_VME_P2_A(5), + P_IO_VME_P2_A(4) => P_IO_VME_P2_A(4), + P_IO_VME_P2_A(3) => P_IO_VME_P2_A(3), + P_IO_VME_P2_A(2) => P_IO_VME_P2_A(2), + P_IO_VME_P2_A(1) => P_IO_VME_P2_A(1), + P_IO_VME_P2_A(0) => P_IO_VME_P2_A(0), + P_IO_PMC2_USR(63) => P_IO_PMC2_USR(63), + P_IO_PMC2_USR(62) => P_IO_PMC2_USR(62), + P_IO_PMC2_USR(61) => P_IO_PMC2_USR(61), + P_IO_PMC2_USR(60) => P_IO_PMC2_USR(60), + P_IO_PMC2_USR(59) => P_IO_PMC2_USR(59), + P_IO_PMC2_USR(58) => P_IO_PMC2_USR(58), + P_IO_PMC2_USR(57) => P_IO_PMC2_USR(57), + P_IO_PMC2_USR(56) => P_IO_PMC2_USR(56), + P_IO_PMC2_USR(55) => P_IO_PMC2_USR(55), + P_IO_PMC2_USR(54) => P_IO_PMC2_USR(54), + P_IO_PMC2_USR(53) => P_IO_PMC2_USR(53), + P_IO_PMC2_USR(52) => P_IO_PMC2_USR(52), + P_IO_PMC2_USR(51) => P_IO_PMC2_USR(51), + P_IO_PMC2_USR(50) => P_IO_PMC2_USR(50), + P_IO_PMC2_USR(49) => P_IO_PMC2_USR(49), + P_IO_PMC2_USR(48) => P_IO_PMC2_USR(48), + P_IO_PMC2_USR(47) => P_IO_PMC2_USR(47), + P_IO_PMC2_USR(46) => P_IO_PMC2_USR(46), + P_IO_PMC2_USR(45) => P_IO_PMC2_USR(45), + P_IO_PMC2_USR(44) => P_IO_PMC2_USR(44), + P_IO_PMC2_USR(43) => P_IO_PMC2_USR(43), + P_IO_PMC2_USR(42) => P_IO_PMC2_USR(42), + P_IO_PMC2_USR(41) => P_IO_PMC2_USR(41), + P_IO_PMC2_USR(40) => P_IO_PMC2_USR(40), + P_IO_PMC2_USR(39) => P_IO_PMC2_USR(39), + P_IO_PMC2_USR(38) => P_IO_PMC2_USR(38), + P_IO_PMC2_USR(37) => P_IO_PMC2_USR(37), + P_IO_PMC2_USR(36) => P_IO_PMC2_USR(36), + P_IO_PMC2_USR(35) => P_IO_PMC2_USR(35), + P_IO_PMC2_USR(34) => P_IO_PMC2_USR(34), + P_IO_PMC2_USR(33) => P_IO_PMC2_USR(33), + P_IO_PMC2_USR(32) => P_IO_PMC2_USR(32), + P_IO_PMC2_USR(31) => P_IO_PMC2_USR(31), + P_IO_PMC2_USR(30) => P_IO_PMC2_USR(30), + P_IO_PMC2_USR(29) => P_IO_PMC2_USR(29), + P_IO_PMC2_USR(28) => P_IO_PMC2_USR(28), + P_IO_PMC2_USR(27) => P_IO_PMC2_USR(27), + P_IO_PMC2_USR(26) => P_IO_PMC2_USR(26), + P_IO_PMC2_USR(25) => P_IO_PMC2_USR(25), + P_IO_PMC2_USR(24) => P_IO_PMC2_USR(24), + P_IO_PMC2_USR(23) => P_IO_PMC2_USR(23), + P_IO_PMC2_USR(22) => P_IO_PMC2_USR(22), + P_IO_PMC2_USR(21) => P_IO_PMC2_USR(21), + P_IO_PMC2_USR(20) => P_IO_PMC2_USR(20), + P_IO_PMC2_USR(19) => P_IO_PMC2_USR(19), + P_IO_PMC2_USR(18) => P_IO_PMC2_USR(18), + P_IO_PMC2_USR(17) => P_IO_PMC2_USR(17), + P_IO_PMC2_USR(16) => P_IO_PMC2_USR(16), + P_IO_PMC2_USR(15) => P_IO_PMC2_USR(15), + P_IO_PMC2_USR(14) => P_IO_PMC2_USR(14), + P_IO_PMC2_USR(13) => P_IO_PMC2_USR(13), + P_IO_PMC2_USR(12) => P_IO_PMC2_USR(12), + P_IO_PMC2_USR(11) => P_IO_PMC2_USR(11), + P_IO_PMC2_USR(10) => P_IO_PMC2_USR(10), + P_IO_PMC2_USR(9) => P_IO_PMC2_USR(9), + P_IO_PMC2_USR(8) => P_IO_PMC2_USR(8), + P_IO_PMC2_USR(7) => P_IO_PMC2_USR(7), + P_IO_PMC2_USR(6) => P_IO_PMC2_USR(6), + P_IO_PMC2_USR(5) => P_IO_PMC2_USR(5), + P_IO_PMC2_USR(4) => P_IO_PMC2_USR(4), + P_IO_PMC2_USR(3) => P_IO_PMC2_USR(3), + P_IO_PMC2_USR(2) => P_IO_PMC2_USR(2), + P_IO_PMC2_USR(1) => P_IO_PMC2_USR(1), + P_IO_PMC2_USR(0) => P_IO_PMC2_USR(0), + P_IO_VME_P2_D(27) => P_IO_VME_P2_D(27), + P_IO_VME_P2_D(26) => P_IO_VME_P2_D(26), + P_IO_VME_P2_D(25) => P_IO_VME_P2_D(25), + P_IO_VME_P2_D(24) => P_IO_VME_P2_D(24), + P_IO_VME_P2_D(23) => P_IO_VME_P2_D(23), + P_IO_VME_P2_D(22) => P_IO_VME_P2_D(22), + P_IO_VME_P2_D(21) => P_IO_VME_P2_D(21), + P_IO_VME_P2_D(20) => P_IO_VME_P2_D(20), + P_IO_VME_P2_D(19) => P_IO_VME_P2_D(19), + P_IO_VME_P2_D(18) => P_IO_VME_P2_D(18), + P_IO_VME_P2_D(17) => P_IO_VME_P2_D(17), + P_IO_VME_P2_D(16) => P_IO_VME_P2_D(16), + P_IO_VME_P2_D(15) => P_IO_VME_P2_D(15), + P_IO_VME_P2_D(14) => P_IO_VME_P2_D(14), + P_IO_VME_P2_D(13) => P_IO_VME_P2_D(13), + P_IO_VME_P2_D(12) => P_IO_VME_P2_D(12), + P_IO_VME_P2_D(11) => P_IO_VME_P2_D(11), + P_IO_VME_P2_D(10) => P_IO_VME_P2_D(10), + P_IO_VME_P2_D(9) => P_IO_VME_P2_D(9), + P_IO_VME_P2_D(8) => P_IO_VME_P2_D(8), + P_IO_VME_P2_D(7) => P_IO_VME_P2_D(7), + P_IO_VME_P2_D(6) => P_IO_VME_P2_D(6), + P_IO_VME_P2_D(5) => P_IO_VME_P2_D(5), + P_IO_VME_P2_D(4) => P_IO_VME_P2_D(4), + P_IO_VME_P2_D(3) => P_IO_VME_P2_D(3), + P_IO_VME_P2_D(2) => P_IO_VME_P2_D(2), + P_IO_VME_P2_D(1) => P_IO_VME_P2_D(1), + P_IO_VME_P2_D(0) => P_IO_VME_P2_D(0), + P_IO_FRONTP_J8_P(4) => P_IO_FRONTP_J8_P(4), + P_IO_FRONTP_J8_P(3) => P_IO_FRONTP_J8_P(3), + P_IO_FRONTP_J8_P(2) => P_IO_FRONTP_J8_P(2), + P_IO_FRONTP_J8_P(1) => P_IO_FRONTP_J8_P(1), + P_IO_UTPORT_ATDD_A(14) => P_IO_UTPORT_ATDD_A(14), + P_IO_UTPORT_ATDD_A(13) => P_IO_UTPORT_ATDD_A(13), + P_IO_UTPORT_ATDD_A(12) => P_IO_UTPORT_ATDD_A(12), + P_IO_UTPORT_ATDD_A(11) => P_IO_UTPORT_ATDD_A(11), + P_IO_UTPORT_ATDD_A(10) => P_IO_UTPORT_ATDD_A(10), + P_IO_UTPORT_ATDD_A(9) => P_IO_UTPORT_ATDD_A(9), + P_IO_UTPORT_ATDD_A(8) => P_IO_UTPORT_ATDD_A(8), + P_IO_SYSFPGA(6) => P_IO_SYSFPGA(6), + P_IO_SYSFPGA(5) => P_IO_SYSFPGA(5), + P_IO_SYSFPGA(4) => P_IO_SYSFPGA(4), + P_IO_SYSFPGA(3) => P_IO_SYSFPGA(3), + P_IO_SYSFPGA(2) => P_IO_SYSFPGA(2), + P_IO_SYSFPGA(1) => P_IO_SYSFPGA(1), + P_IO_SYSFPGA(0) => P_IO_SYSFPGA(0), + P_IO_UFLASH_A(22) => P_IO_UFLASH_A(22), + P_IO_UFLASH_A(21) => P_IO_UFLASH_A(21), + P_IO_UFLASH_A(20) => P_IO_UFLASH_A(20), + P_IO_UFLASH_A(19) => P_IO_UFLASH_A(19), + P_IO_UFLASH_A(18) => P_IO_UFLASH_A(18), + P_IO_UFLASH_A(17) => P_IO_UFLASH_A(17), + P_IO_UFLASH_A(16) => P_IO_UFLASH_A(16), + P_IO_UFLASH_A(15) => P_IO_UFLASH_A(15), + P_IO_UFLASH_A(14) => P_IO_UFLASH_A(14), + P_IO_UFLASH_A(13) => P_IO_UFLASH_A(13), + P_IO_UFLASH_A(12) => P_IO_UFLASH_A(12), + P_IO_UFLASH_A(11) => P_IO_UFLASH_A(11), + P_IO_UFLASH_A(10) => P_IO_UFLASH_A(10), + P_IO_UFLASH_A(9) => P_IO_UFLASH_A(9), + P_IO_UFLASH_A(8) => P_IO_UFLASH_A(8), + P_IO_UFLASH_A(7) => P_IO_UFLASH_A(7), + P_IO_UFLASH_A(6) => P_IO_UFLASH_A(6), + P_IO_UFLASH_A(5) => P_IO_UFLASH_A(5), + P_IO_UFLASH_A(4) => P_IO_UFLASH_A(4), + P_IO_UFLASH_A(3) => P_IO_UFLASH_A(3), + P_IO_UFLASH_A(2) => P_IO_UFLASH_A(2), + P_IO_UFLASH_A(1) => P_IO_UFLASH_A(1), + P_IO_UFLASH_A(0) => P_IO_UFLASH_A(0), + P_IO_FRONTP_J8_N(4) => P_IO_FRONTP_J8_N(4), + P_IO_FRONTP_J8_N(3) => P_IO_FRONTP_J8_N(3), + P_IO_FRONTP_J8_N(2) => P_IO_FRONTP_J8_N(2), + P_IO_FRONTP_J8_N(1) => P_IO_FRONTP_J8_N(1), + P_IO_ZBT2_D(35) => P_IO_ZBT2_D(35), + P_IO_ZBT2_D(34) => P_IO_ZBT2_D(34), + P_IO_ZBT2_D(33) => P_IO_ZBT2_D(33), + P_IO_ZBT2_D(32) => P_IO_ZBT2_D(32), + P_IO_ZBT2_D(31) => P_IO_ZBT2_D(31), + P_IO_ZBT2_D(30) => P_IO_ZBT2_D(30), + P_IO_ZBT2_D(29) => P_IO_ZBT2_D(29), + P_IO_ZBT2_D(28) => P_IO_ZBT2_D(28), + P_IO_ZBT2_D(27) => P_IO_ZBT2_D(27), + P_IO_ZBT2_D(26) => P_IO_ZBT2_D(26), + P_IO_ZBT2_D(25) => P_IO_ZBT2_D(25), + P_IO_ZBT2_D(24) => P_IO_ZBT2_D(24), + P_IO_ZBT2_D(23) => P_IO_ZBT2_D(23), + P_IO_ZBT2_D(22) => P_IO_ZBT2_D(22), + P_IO_ZBT2_D(21) => P_IO_ZBT2_D(21), + P_IO_ZBT2_D(20) => P_IO_ZBT2_D(20), + P_IO_ZBT2_D(19) => P_IO_ZBT2_D(19), + P_IO_ZBT2_D(18) => P_IO_ZBT2_D(18), + P_IO_ZBT2_D(17) => P_IO_ZBT2_D(17), + P_IO_ZBT2_D(16) => P_IO_ZBT2_D(16), + P_IO_ZBT2_D(15) => P_IO_ZBT2_D(15), + P_IO_ZBT2_D(14) => P_IO_ZBT2_D(14), + P_IO_ZBT2_D(13) => P_IO_ZBT2_D(13), + P_IO_ZBT2_D(12) => P_IO_ZBT2_D(12), + P_IO_ZBT2_D(11) => P_IO_ZBT2_D(11), + P_IO_ZBT2_D(10) => P_IO_ZBT2_D(10), + P_IO_ZBT2_D(9) => P_IO_ZBT2_D(9), + P_IO_ZBT2_D(8) => P_IO_ZBT2_D(8), + P_IO_ZBT2_D(7) => P_IO_ZBT2_D(7), + P_IO_ZBT2_D(6) => P_IO_ZBT2_D(6), + P_IO_ZBT2_D(5) => P_IO_ZBT2_D(5), + P_IO_ZBT2_D(4) => P_IO_ZBT2_D(4), + P_IO_ZBT2_D(3) => P_IO_ZBT2_D(3), + P_IO_ZBT2_D(2) => P_IO_ZBT2_D(2), + P_IO_ZBT2_D(1) => P_IO_ZBT2_D(1), + P_IO_ZBT2_D(0) => P_IO_ZBT2_D(0), + P_IO_UTPORT_TS(6) => P_IO_UTPORT_TS(6), + P_IO_UTPORT_TS(5) => P_IO_UTPORT_TS(5), + P_IO_UTPORT_TS(4) => P_IO_UTPORT_TS(4), + P_IO_UTPORT_TS(3) => P_IO_UTPORT_TS(3), + P_IO_UTPORT_DEBUG(9) => P_IO_UTPORT_DEBUG(9), + P_IO_UTPORT_DEBUG(8) => P_IO_UTPORT_DEBUG(8), + P_IO_UTPORT_DEBUG(7) => P_IO_UTPORT_DEBUG(7), + P_IO_UTPORT_DEBUG(6) => P_IO_UTPORT_DEBUG(6), + P_IO_UTPORT_DEBUG(5) => P_IO_UTPORT_DEBUG(5), + P_IO_UTPORT_DEBUG(4) => P_IO_UTPORT_DEBUG(4), + P_IO_UTPORT_DEBUG(3) => P_IO_UTPORT_DEBUG(3), + P_IO_UTPORT_DEBUG(2) => P_IO_UTPORT_DEBUG(2), + P_IO_UTPORT_DEBUG(1) => P_IO_UTPORT_DEBUG(1), + P_IO_UTPORT_DEBUG(0) => P_IO_UTPORT_DEBUG(0), + P_IO_VME_P0_USR(75) => P_IO_VME_P0_USR(75), + P_IO_VME_P0_USR(74) => P_IO_VME_P0_USR(74), + P_IO_VME_P0_USR(73) => P_IO_VME_P0_USR(73), + P_IO_VME_P0_USR(72) => P_IO_VME_P0_USR(72), + P_IO_VME_P0_USR(71) => P_IO_VME_P0_USR(71), + P_IO_VME_P0_USR(70) => P_IO_VME_P0_USR(70), + P_IO_VME_P0_USR(69) => P_IO_VME_P0_USR(69), + P_IO_VME_P0_USR(68) => P_IO_VME_P0_USR(68), + P_IO_VME_P0_USR(67) => P_IO_VME_P0_USR(67), + P_IO_VME_P0_USR(66) => P_IO_VME_P0_USR(66), + P_IO_VME_P0_USR(65) => P_IO_VME_P0_USR(65), + P_IO_VME_P0_USR(64) => P_IO_VME_P0_USR(64), + P_IO_VME_P0_USR(63) => P_IO_VME_P0_USR(63), + P_IO_VME_P0_USR(62) => P_IO_VME_P0_USR(62), + P_IO_VME_P0_USR(61) => P_IO_VME_P0_USR(61), + P_IO_VME_P0_USR(60) => P_IO_VME_P0_USR(60), + P_IO_VME_P0_USR(59) => P_IO_VME_P0_USR(59), + P_IO_VME_P0_USR(58) => P_IO_VME_P0_USR(58), + P_IO_VME_P0_USR(57) => P_IO_VME_P0_USR(57), + P_IO_VME_P0_USR(56) => P_IO_VME_P0_USR(56), + P_IO_VME_P0_USR(55) => P_IO_VME_P0_USR(55), + P_IO_VME_P0_USR(54) => P_IO_VME_P0_USR(54), + P_IO_VME_P0_USR(53) => P_IO_VME_P0_USR(53), + P_IO_VME_P0_USR(52) => P_IO_VME_P0_USR(52), + P_IO_VME_P0_USR(51) => P_IO_VME_P0_USR(51), + P_IO_VME_P0_USR(50) => P_IO_VME_P0_USR(50), + P_IO_VME_P0_USR(49) => P_IO_VME_P0_USR(49), + P_IO_VME_P0_USR(48) => P_IO_VME_P0_USR(48), + P_IO_VME_P0_USR(47) => P_IO_VME_P0_USR(47), + P_IO_VME_P0_USR(46) => P_IO_VME_P0_USR(46), + P_IO_VME_P0_USR(45) => P_IO_VME_P0_USR(45), + P_IO_VME_P0_USR(44) => P_IO_VME_P0_USR(44), + P_IO_VME_P0_USR(43) => P_IO_VME_P0_USR(43), + P_IO_VME_P0_USR(42) => P_IO_VME_P0_USR(42), + P_IO_VME_P0_USR(41) => P_IO_VME_P0_USR(41), + P_IO_VME_P0_USR(40) => P_IO_VME_P0_USR(40), + P_IO_VME_P0_USR(39) => P_IO_VME_P0_USR(39), + P_IO_VME_P0_USR(38) => P_IO_VME_P0_USR(38), + P_IO_VME_P0_USR(37) => P_IO_VME_P0_USR(37), + P_IO_VME_P0_USR(36) => P_IO_VME_P0_USR(36), + P_IO_VME_P0_USR(35) => P_IO_VME_P0_USR(35), + P_IO_VME_P0_USR(34) => P_IO_VME_P0_USR(34), + P_IO_VME_P0_USR(33) => P_IO_VME_P0_USR(33), + P_IO_VME_P0_USR(32) => P_IO_VME_P0_USR(32), + P_IO_VME_P0_USR(31) => P_IO_VME_P0_USR(31), + P_IO_VME_P0_USR(30) => P_IO_VME_P0_USR(30), + P_IO_VME_P0_USR(29) => P_IO_VME_P0_USR(29), + P_IO_VME_P0_USR(28) => P_IO_VME_P0_USR(28), + P_IO_VME_P0_USR(27) => P_IO_VME_P0_USR(27), + P_IO_VME_P0_USR(26) => P_IO_VME_P0_USR(26), + P_IO_VME_P0_USR(25) => P_IO_VME_P0_USR(25), + P_IO_VME_P0_USR(24) => P_IO_VME_P0_USR(24), + P_IO_VME_P0_USR(23) => P_IO_VME_P0_USR(23), + P_IO_VME_P0_USR(22) => P_IO_VME_P0_USR(22), + P_IO_VME_P0_USR(21) => P_IO_VME_P0_USR(21), + P_IO_VME_P0_USR(20) => P_IO_VME_P0_USR(20), + P_IO_VME_P0_USR(19) => P_IO_VME_P0_USR(19), + P_IO_VME_P0_USR(18) => P_IO_VME_P0_USR(18), + P_IO_VME_P0_USR(17) => P_IO_VME_P0_USR(17), + P_IO_VME_P0_USR(16) => P_IO_VME_P0_USR(16), + P_IO_VME_P0_USR(15) => P_IO_VME_P0_USR(15), + P_IO_VME_P0_USR(14) => P_IO_VME_P0_USR(14), + P_IO_VME_P0_USR(13) => P_IO_VME_P0_USR(13), + P_IO_VME_P0_USR(12) => P_IO_VME_P0_USR(12), + P_IO_VME_P0_USR(11) => P_IO_VME_P0_USR(11), + P_IO_VME_P0_USR(10) => P_IO_VME_P0_USR(10), + P_IO_VME_P0_USR(9) => P_IO_VME_P0_USR(9), + P_IO_VME_P0_USR(8) => P_IO_VME_P0_USR(8), + P_IO_VME_P0_USR(7) => P_IO_VME_P0_USR(7), + P_IO_VME_P0_USR(6) => P_IO_VME_P0_USR(6), + P_IO_VME_P0_USR(5) => P_IO_VME_P0_USR(5), + P_IO_VME_P0_USR(4) => P_IO_VME_P0_USR(4), + P_IO_VME_P0_USR(3) => P_IO_VME_P0_USR(3), + P_IO_VME_P0_USR(2) => P_IO_VME_P0_USR(2), + P_IO_VME_P0_USR(1) => P_IO_VME_P0_USR(1), + P_IO_VME_P0_USR(0) => P_IO_VME_P0_USR(0), + P_IO_VME_P2_C(28) => P_IO_VME_P2_C(28), + P_IO_VME_P2_C(27) => P_IO_VME_P2_C(27), + P_IO_VME_P2_C(26) => P_IO_VME_P2_C(26), + P_IO_VME_P2_C(25) => P_IO_VME_P2_C(25), + P_IO_VME_P2_C(24) => P_IO_VME_P2_C(24), + P_IO_VME_P2_C(23) => P_IO_VME_P2_C(23), + P_IO_VME_P2_C(22) => P_IO_VME_P2_C(22), + P_IO_VME_P2_C(21) => P_IO_VME_P2_C(21), + P_IO_VME_P2_C(20) => P_IO_VME_P2_C(20), + P_IO_VME_P2_C(19) => P_IO_VME_P2_C(19), + P_IO_VME_P2_C(18) => P_IO_VME_P2_C(18), + P_IO_VME_P2_C(17) => P_IO_VME_P2_C(17), + P_IO_VME_P2_C(16) => P_IO_VME_P2_C(16), + P_IO_VME_P2_C(15) => P_IO_VME_P2_C(15), + P_IO_VME_P2_C(14) => P_IO_VME_P2_C(14), + P_IO_VME_P2_C(13) => P_IO_VME_P2_C(13), + P_IO_VME_P2_C(12) => P_IO_VME_P2_C(12), + P_IO_VME_P2_C(11) => P_IO_VME_P2_C(11), + P_IO_VME_P2_C(10) => P_IO_VME_P2_C(10), + P_IO_VME_P2_C(9) => P_IO_VME_P2_C(9), + P_IO_VME_P2_C(8) => P_IO_VME_P2_C(8), + P_IO_VME_P2_C(7) => P_IO_VME_P2_C(7), + P_IO_VME_P2_C(6) => P_IO_VME_P2_C(6), + P_IO_VME_P2_C(5) => P_IO_VME_P2_C(5), + P_IO_VME_P2_C(4) => P_IO_VME_P2_C(4), + P_IO_VME_P2_C(3) => P_IO_VME_P2_C(3), + P_IO_VME_P2_C(2) => P_IO_VME_P2_C(2), + P_IO_VME_P2_C(1) => P_IO_VME_P2_C(1), + P_IO_VME_P2_C(0) => P_IO_VME_P2_C(0), + P_IO_UTPORT_ATDD_B(19) => P_IO_UTPORT_ATDD_B(19), + P_IO_UTPORT_ATDD_B(18) => P_IO_UTPORT_ATDD_B(18), + P_IO_UTPORT_ATDD_B(17) => P_IO_UTPORT_ATDD_B(17), + P_IO_UTPORT_ATDD_B(16) => P_IO_UTPORT_ATDD_B(16), + P_I_DIPSW1(7) => P_I_DIPSW1(7), + P_I_DIPSW1(6) => P_I_DIPSW1(6), + P_I_DIPSW1(5) => P_I_DIPSW1(5), + P_I_DIPSW1(4) => P_I_DIPSW1(4), + P_I_DIPSW1(3) => P_I_DIPSW1(3), + P_I_DIPSW1(2) => P_I_DIPSW1(2), + P_I_DIPSW1(1) => P_I_DIPSW1(1), + P_I_DIPSW1(0) => P_I_DIPSW1(0), + P_I_HW_ID(4) => P_I_HW_ID(4), + P_I_HW_ID(3) => P_I_HW_ID(3), + P_I_HW_ID(2) => P_I_HW_ID(2), + P_I_HW_ID(1) => P_I_HW_ID(1), + P_I_HW_ID(0) => P_I_HW_ID(0) + ); + -- User: Put your stimulus here. + + -- Clock generation + proc_p_i_clk33_generator : process + begin + clock_loop : loop + P_I_CLK33 <= '1'; + wait for 15 ns; + P_I_CLK33 <= '0'; + wait for 15 ns; + end loop; + end process; + + proc_p_i_clk66_generator : process + begin + clock_loop : loop + CLK66 <= '1'; + wait for 7.5 ns; + CLK66 <= '0'; + wait for 7.5 ns; + end loop; + end process; + + -- Signal mapping + P_IO_SYSFPGA(0) <= o_cycle_n; + i_cycle_n <= P_IO_SYSFPGA(1); + i_req_n <= P_IO_SYSFPGA(2); + P_IO_SYSFPGA(3) <= o_gnt_n; + io_ack_n <= P_IO_SYSFPGA(4); + io_err_n <= P_IO_SYSFPGA(5); + i_alive <= P_IO_SYSFPGA(6); + + + P_IO_UFLASH_A(20) <= io_as_n; + P_IO_UFLASH_A(21) <= io_ds_n; + P_IO_UFLASH_A(22) <= io_write_n; + + P_IO_UFLASH_A(15 downto 0) <= o_ad(31 downto 16); + P_IO_UFLASH_D(15 downto 0) <= o_ad(15 downto 0); + P_IO_UFLASH_A(19 downto 16) <= o_sel(3 downto 0); + + i_ad(31 downto 16) <= P_IO_UFLASH_A(15 downto 0); + i_ad(15 downto 0) <= P_IO_UFLASH_D(15 downto 0); + + -- Dynamic signals + + proc_p_io_dynamic: process + + procedure proc_w32_cycle + ( + constant I_ADDR: in std_logic_vector(31 downto 0); + constant I_DATA: in std_logic_vector(31 downto 0) + ) is + begin + wait until rising_edge(CLK66); + + -- strobe address + o_cycle_n <= '0'; -- SysFPGA master cycle + io_write_n <= '0'; -- write cycle + io_as_n <= '0'; -- address strobe + io_ds_n <= '1'; + o_ad <= I_ADDR; + o_sel <= (others => '1'); -- write all four bytes + + wait until rising_edge(CLK66); + + -- strobe data + o_cycle_n <= '0'; -- SysFPGA master cycle + io_write_n <= '0'; -- write cycle + io_as_n <= '1'; + io_ds_n <= '0'; -- data strobe + o_ad <= I_DATA; + + wait until rising_edge(CLK66); + + io_ds_n <= '1'; + o_ad <= (others => 'Z'); + + -- wait until io_ack_n = '0'; does not work, sincd io_ack_n goes low immediately + wait until rising_edge(CLK66); + + o_cycle_n <= '1'; + io_write_n <= 'Z'; + io_as_n <= 'Z'; + io_ds_n <= 'Z'; + o_ad <= (others => 'Z'); + o_sel <= (others => 'Z'); + + end proc_w32_cycle; + + procedure proc_w16_cycle + ( + constant I_ADDR: in std_logic_vector(31 downto 0); + constant I_DATA: in std_logic_vector(15 downto 0) + ) is + begin + wait until rising_edge(CLK66); + + -- strobe address + o_cycle_n <= '0'; -- SysFPGA master cycle + io_write_n <= '0'; -- write cycle + io_as_n <= '0'; -- address strobe + io_ds_n <= '1'; + o_ad <= I_ADDR; + + if (I_ADDR(1) = '0') then + o_sel <= "1100"; -- write upper two bytes + else + o_sel <= "0011"; -- write lower two bytes + end if; + + wait until rising_edge(CLK66); + + -- strobe data + o_cycle_n <= '0'; -- SysFPGA master cycle + io_write_n <= '0'; -- write cycle + io_as_n <= '1'; + io_ds_n <= '0'; -- data strobe + + if (I_ADDR(1) = '0') then + o_ad(31 downto 16) <= I_DATA; + o_ad(15 downto 0) <= (others => '0'); + else + o_ad(31 downto 16) <= (others => '0'); + o_ad(15 downto 0) <= I_DATA; + end if; + + wait until rising_edge(CLK66); + + io_ds_n <= '1'; + o_ad <= (others => 'Z'); + + -- wait until io_ack_n = '0'; does not work, sincd io_ack_n goes low immediately + wait until rising_edge(CLK66); + + o_cycle_n <= '1'; + io_write_n <= 'Z'; + io_as_n <= 'Z'; + io_ds_n <= 'Z'; + o_ad <= (others => 'Z'); + o_sel <= (others => 'Z'); + + end proc_w16_cycle; + + procedure proc_read_cycle + ( + constant I_ADDR: in std_logic_vector(31 downto 0) + ) is + begin + wait until rising_edge(CLK66); + + -- strobe address + o_cycle_n <= '0'; -- SysFPGA master cycle + io_write_n <= '1'; -- read cycle + io_as_n <= '0'; -- address strobe + io_ds_n <= '0'; + o_ad <= I_ADDR; + o_sel <= (others => '1'); -- read all four bytes + + wait until rising_edge(CLK66); + + -- 3state data lines ("turnaround period A") + o_ad <= (others => 'Z'); + o_sel <= (others => 'Z'); + io_as_n <= '1'; + io_ds_n <= '1'; + + wait until falling_edge(io_ack_n); + + -- read data + i_data <= i_ad; + + wait until rising_edge(CLK66); + + -- "turnaround period B" + + wait until rising_edge(CLK66); + + o_cycle_n <= '1'; + io_write_n <= 'Z'; + io_as_n <= 'Z'; + io_ds_n <= 'Z'; + o_ad <= (others => 'Z'); + + -- wait three clock cycles until slave stopeed driving io_ad + wait until rising_edge(CLK66); + wait until rising_edge(CLK66); + wait until rising_edge(CLK66); + + end proc_read_cycle; + + procedure proc_burstread_cycle + ( + constant I_ADDR: in std_logic_vector(31 downto 0) + ) is + begin + wait until rising_edge(CLK66); + + -- strobe address + o_cycle_n <= '0'; -- SysFPGA master cycle + io_write_n <= '1'; -- read cycle + io_as_n <= '0'; -- address strobe + io_ds_n <= '0'; + o_ad <= I_ADDR; + o_sel <= (others => '1'); -- read all four bytes + + wait until rising_edge(CLK66); + + -- 3state data lines ("turnaround period A") + o_ad <= (others => 'Z'); + o_sel <= (others => 'Z'); + io_as_n <= '1'; + io_ds_n <= '0'; -- keep low for two cycles + + wait until rising_edge(CLK66); + + io_ds_n <= '1'; + + wait until io_ack_n = '0'; + wait until falling_edge(CLK66); + + -- read first data + i_data <= i_ad; + + wait until rising_edge(CLK66); + wait until io_ack_n = '0'; + wait until falling_edge(CLK66); + + -- read second data + i_data <= i_ad; + + -- "turnaround period B" + + wait until rising_edge(CLK66); + + o_cycle_n <= '1'; + io_write_n <= 'Z'; + io_as_n <= 'Z'; + io_ds_n <= 'Z'; + o_ad <= (others => 'Z'); + + -- wait three clock cycles until slave stopeed driving io_ad + wait until rising_edge(CLK66); + wait until rising_edge(CLK66); + wait until rising_edge(CLK66); + + end proc_burstread_cycle; + + begin + + -- Unused ports + P_IO_VME_P2_A(30 downto 12) <= (others => '0'); + P_IO_VME_P2_C(28 downto 0) <= (others => '0'); + P_IO_VME_P2_D(27 downto 0) <= (others => '0'); + P_IO_VME_P2_Z(13 downto 0) <= (others => '0'); + + -- Initialize signals + + P_IO_FRONTP_J8_P(1) <= '0'; -- external trigger + P_IO_FRONTP_J8_N(1) <= '0'; + P_IO_VME_P2_A(11 downto 0) <= (others => '0'); + P_IO_PMC1_USR(41) <= '0'; + P_IO_PMC1_USR(43) <= '0'; + P_IO_PMC2_USR(41) <= '0'; + P_IO_PMC2_USR(43) <= '0'; + + o_gnt_n <= '1'; -- SysFPGA keeps bus mastership + o_cycle_n <= '1'; + io_as_n <= 'Z'; + io_ds_n <= 'Z'; + io_write_n <= 'Z'; + o_ad <= (others => 'Z'); + + wait for 1000 ns; -- until DLLs locked + + -- Set Channel mode to 4, DMODE = 1 + proc_w32_cycle(X"0000_0015", X"0100_0004"); + + wait for 1.5 us; + + -- Start Domino wave, enbale external trigger + --proc_w32_cycle(X"0000_0000", X"0040_0001"); + + -- Start Domino wave, enbale external trigger, multi-buffer mode + proc_w32_cycle(X"0000_0000", X"0041_0001"); + + -- issue trigger + wait for 2 us; + P_IO_FRONTP_J8_N(1) <= '1'; + wait for 100 ns; + P_IO_FRONTP_J8_N(1) <= '0'; + + wait for 10 ms; + + -- issue trigger + wait for 32 us; + P_IO_FRONTP_J8_N(1) <= '1'; + wait for 100 ns; + P_IO_FRONTP_J8_N(1) <= '0'; + + -- issue trigger + wait for 32 us; + P_IO_FRONTP_J8_N(1) <= '1'; + wait for 100 ns; + P_IO_FRONTP_J8_N(1) <= '0'; + + -- increment read pointer + wait for 40 us; + proc_w32_cycle(X"0000_0024", X"0000_0001"); + + + -- Start Domino wave delayed + --proc_w32_cycle(X"0000_0000", X"0100_0001"); + + -- Simulate revolving Domino wave + --loop_domino1 : for i in 0 to 13 loop + -- wait for 300 ns; + -- P_IO_PMC1_USR(30) <= '0'; + -- wait for 300 ns; + -- P_IO_PMC1_USR(30) <= '1'; + --end loop; + + -- Set new DAC for DRS1 + -- proc_w16_cycle(X"0000_0006", X"1234"); + + -- Set-up write shift register + --proc_w16_cycle(X"0000_0014", X"0555"); + + --loop_domino2 : for i in 0 to 30 loop + -- wait for 300 ns; + -- P_IO_PMC1_USR(30) <= '0'; + -- wait for 300 ns; + -- P_IO_PMC1_USR(30) <= '1'; + --end loop; + + + --proc_w32_cycle(X"0000_0000", X"1234_5678"); + --proc_w32_cycle(X"0000_0000", X"0000_0000"); + + --proc_w16_cycle(X"0000_0000", X"1234"); + --proc_w16_cycle(X"0000_0002", X"5678"); + + --proc_w32_cycle(X"0000_0000", X"0004_0000"); -- turn on red LED 1 + --proc_w32_cycle(X"0008_0000", X"0004_0000"); -- turn on red LED 2 + + --proc_read_cycle(X"0001_0024"); -- read firmware + + --proc_w32_cycle(X"0000_0000", X"0000_0002"); -- reinit + + -- test write and burst read + --proc_w32_cycle(X"0000_0000", X"1111_1111"); + --proc_w32_cycle(X"0000_0004", X"2222_2222"); + --proc_burstread_cycle(X"0000_0000"); + + -- write to DPRAM + --proc_w32_cycle(X"0004_0000", X"1111_1111"); + --proc_w32_cycle(X"0004_0004", X"2222_2222"); + --proc_w32_cycle(X"0004_0008", X"3333_3333"); + --proc_w32_cycle(X"0004_000C", X"4444_4444"); + + -- read back data + --proc_burstread_cycle(X"0002_0000"); + --proc_burstread_cycle(X"0002_0000"); + + wait for 100 us; + + -- stop simulation + assert false + report "Simulation Complete (this is not a failure)" + severity failure; + + end process; + +end TBX_ARCH; + +configuration TBX_CFG_usr_fpga_TBX_ARCH of TBX_usr_fpga is + for TBX_ARCH + end for; +end TBX_CFG_usr_fpga_TBX_ARCH; diff --git a/firmware/src/drs4_eval5.vhd b/firmware/src/drs4_eval5.vhd new file mode 100644 index 0000000..ce550b1 --- /dev/null +++ b/firmware/src/drs4_eval5.vhd @@ -0,0 +1,453 @@ +--############################################################# +-- Author : Stefan Ritt +-- Contents : DRS4 Evaluation Board FPGA top level entity +-- $Id: drs4_eval5.vhd 21305 2014-04-11 12:58:35Z ritt $ +--############################################################# + +library IEEE; +use IEEE.STD_LOGIC_1164.ALL; +use IEEE.STD_LOGIC_ARITH.ALL; +use IEEE.STD_LOGIC_UNSIGNED.ALL; +use work.drs4_pack.all; + +entity drs4_eval5 is + port ( + -- quartz + P_I_CLK33 : in std_logic; + P_I_CLK66 : in std_logic; + + -- timing calibration + P_O_CAL : out std_logic; + P_O_TCA_CTRL : out std_logic; + + -- test points + P_IO_J42 : inout std_logic; + P_IO_J43 : inout std_logic; + P_IO_T19 : inout std_logic; + P_IO_T20 : inout std_logic; + + -- configuration pin + P_I_J44 : in std_logic; + + -- analog triggers + P_I_ATRG1 : in std_logic; + P_I_ATRG2 : in std_logic; + P_I_ATRG3 : in std_logic; + P_I_ATRG4 : in std_logic; + + -- external trigger + P_IO_ETRG_IN : inout std_logic; + P_O_ETRG_IND : out std_logic; + + P_IO_ETRG_OUT : inout std_logic; + P_O_ETRG_OUTD : out std_logic; + + -- external (MMCX clock) clock + P_IO_ECLK_IN : inout std_logic; + P_O_ECLK_IND : out std_logic; + P_IO_ECLK_OUT : inout std_logic; + P_O_ECLK_OUTD : out std_logic; + + -- LEDs + P_O_LED_GREEN : out std_logic; + P_O_LED_YELLOW : out std_logic; + + -- Lines to/from Cy7C68013A microcontroller + P_IO_UC_SLOE : inout std_logic; + P_IO_UC_SLRD : inout std_logic; + P_IO_UC_SLWR : inout std_logic; + P_IO_UC_SLCS : inout std_logic; + P_IO_UC_PKTEND : inout std_logic; + P_IO_UC_FIFOADR0 : inout std_logic; + P_IO_UC_FIFOADR1 : inout std_logic; + P_IO_UC_FLAGA : inout std_logic; + P_IO_UC_FLAGB : inout std_logic; + P_IO_UC_FLAGC : inout std_logic; + P_I_UC_PA0 : in std_logic; + + P_IO_UC_FD : inout std_logic_vector(15 downto 0); + + -- PMC connector + P_IO_PMC_USR : inout std_logic_vector(63 downto 0) +); +end drs4_eval5; + +architecture arch of drs4_eval5 is + + component usr_clocks + port ( + P_I_CLK33 : in std_logic; + P_I_CLK66 : in std_logic; + O_CLK33 : out std_logic; + O_CLK33_NODLL : out std_logic; + O_CLK66 : out std_logic; + O_CLK132 : out std_logic; + O_CLK264 : out std_logic; + I_PS_VALUE : in std_logic_vector(7 downto 0); + O_CLK_PS : out std_logic; + O_LOCKED : out std_logic; + + O_DEBUG1 : out std_logic; + O_DEBUG2 : out std_logic + ); + end component; + + component usb2_racc is + port ( + -- Clock signals + -- ------------------------ + I_RESET : in std_logic; + I_CLK33 : in std_logic; + + -- Lines to/from Cy7C68013A microcontroller + -- ----------------------------------- + P_IO_UC_SLOE : inout std_logic; + P_IO_UC_SLRD : inout std_logic; + P_IO_UC_SLWR : inout std_logic; + P_IO_UC_SLCS : inout std_logic; + P_IO_UC_PKTEND : inout std_logic; + P_IO_UC_FIFOADR0 : inout std_logic; + P_IO_UC_FIFOADR1 : inout std_logic; + P_IO_UC_FLAGA : inout std_logic; + P_IO_UC_FLAGB : inout std_logic; + P_IO_UC_FLAGC : inout std_logic; + P_IO_UC_FD : inout std_logic_vector(15 downto 0); + + -- Simple bus interface to on-chip RAM + -- -------------------------------------------------- + O_LOCBUS_ADDR : out std_logic_vector(31 downto 0); + I_LOCBUS_D_RD : in std_logic_vector(31 downto 0); + O_LOCBUS_D_WR : out std_logic_vector(31 downto 0); + O_LOCBUS_WE : out std_logic; + + -- Status & control registers + ----------------------------- + O_CONTROL_REG_ARR : out type_control_reg_arr; + I_STATUS_REG_ARR : in type_status_reg_arr; + + O_CONTROL_TRIG_ARR : out type_control_trig_arr; + O_CONTROL0_BIT_TRIG_ARR : out std_logic_vector(31 downto 0); + + -- Debug signals + -- ------------- + O_DEBUG : out std_logic + ); + end component; + + component usb_dpram is + port ( + I_RESET : in std_logic; + + I_CLK_A : in std_logic; + I_ADDR_A : in std_logic_vector(31 downto 0); + I_WE_A : in std_logic; + O_D_RD_A : out std_logic_vector(31 downto 0); + I_D_WR_A : in std_logic_vector(31 downto 0); + + I_CLK_B : in std_logic; + I_ADDR_B : in std_logic_vector(31 downto 0); + I_WE_B : in std_logic; + O_D_RD_B : out std_logic_vector(31 downto 0); + I_D_WR_B : in std_logic_vector(31 downto 0) + + ); + end component; + + component drs4_eval5_app is + port ( + -- clocks + I_CLK33 : in std_logic; -- 33 MHz, sychronised to clk33_nodll + I_CLK66 : in std_logic; -- 66 MHz, same phase as clk33 + I_CLK132 : in std_logic; -- 132 MHz, random phase in respect to clk33 + I_CLK264 : in std_logic; -- 264 MHz, random phase in respect to clk33 + O_CLK_PS_VALUE : out std_logic_vector(7 downto 0); -- value for phase shift + I_CLK_PS : in std_logic; -- phase shifted in respect to clk33 + I_RESET : in std_logic; -- active high power-up reset + + -- timing calibration + O_CAL : out std_logic; + O_TCA_CTRL : out std_logic; + + -- analog triggers + I_ANA_TRG : in std_logic_vector(3 downto 0); + + -- external trigger + IO_ETRG_IN : inout std_logic; + O_ETRG_IND : out std_logic; + + IO_ETRG_OUT : inout std_logic; + O_ETRG_OUTD : out std_logic; + + -- external (MMCX clock) clock + IO_ECLK_OUT : inout std_logic; + IO_ECLK_IN : inout std_logic; + + -- J44 pin configuration + I_CONFIG_PIN : in std_logic; + + -- PMC + P_IO_PMC_USR : inout std_logic_vector(63 downto 0); + + -- Simple bus interface to DPRAM + O_DPRAM_CLK : out std_logic; + O_DPRAM_ADDR : out std_logic_vector(31 downto 0); + O_DPRAM_D_WR : out std_logic_vector(31 downto 0); + O_DPRAM_WE : out std_logic; + I_DPRAM_D_RD : in std_logic_vector(31 downto 0); + + -- Control & status registers from system FPGA interface + I_CONTROL_REG_ARR : in type_control_reg_arr; + O_STATUS_REG_ARR : out type_status_reg_arr; + I_CONTROL_TRIG_ARR : in type_control_trig_arr; + I_CONTROL0_BIT_TRIG_ARR : in std_logic_vector(31 downto 0); + + -- LEDs signals + O_LED_GREEN : out std_logic; + O_LED_YELLOW : out std_logic; + + -- Debug signals + O_DEBUG1 : out std_logic; + O_DEBUG2 : out std_logic + ); + end component; + + signal VCC: std_logic; + signal GND: std_logic; + + -- reset signal + -- ------------- + signal global_reset : std_logic; -- active high power-up reset + + -- clocks & related signals + -- ------------------------ + signal clk33_nodll : std_logic; -- external 33 MHz clock (global clock net) + signal clk33 : std_logic; -- 33 MHz DLL output + signal clk66 : std_logic; + signal clk132 : std_logic; + signal clk264 : std_logic; + signal clk_ps_value : std_logic_vector(7 downto 0); + signal clk_ps : std_logic; -- special phase shifted clock + signal usr_clks_dlls_locked : std_logic; -- high if clock DLLs for clkxx have locked + + -- calibration + -- ----------- + signal o_cal : std_logic; + signal o_tca_ctrl : std_logic; + + -- user application signals for Locbus interface + -- --------------------------------------------- + signal locbus_addr : std_logic_vector(31 downto 0); + signal locbus_d_rd : std_logic_vector(31 downto 0); + signal locbus_d_wr : std_logic_vector(31 downto 0); + signal locbus_we : std_logic; + + -- user application signals for DPRAM interface + -- -------------------------------------------- + signal dpram_clk : std_logic; + signal dpram_addr : std_logic_vector(31 downto 0); + signal dpram_we : std_logic; + signal dpram_d_wr : std_logic_vector(31 downto 0); + signal dpram_d_rd : std_logic_vector(31 downto 0); + + -- register signals for data exchange with microcontroller + -- ------------------------------------------------------- + signal control_reg_arr : type_control_reg_arr; + signal status_reg_arr : type_status_reg_arr; + + signal control_trig_arr: type_control_trig_arr; + signal control0_bit_trig_arr : std_logic_vector(31 downto 0); + + -- LEDs + -- ---- + signal o_led_green : std_logic; + signal o_led_yellow : std_logic; + + -- Config + -- ------ + signal i_cfg_pin : std_logic; + + -- Trigger + -- ------- + signal io_etrg_in : std_logic; + signal o_etrg_ind : std_logic; + signal io_etrg_out : std_logic; + signal o_etrg_outd : std_logic; + signal i_ana_trg : std_logic_vector(3 downto 0); + signal io_eclk_out : std_logic; + signal io_eclk_in : std_logic; + + -- Debugging signals + -- ----------------- + signal o_racc_debug : std_logic; + signal o_debug1 : std_logic; + signal o_debug2 : std_logic; + +begin + VCC <= '1'; + GND <= '0'; + + -- map LEDs + P_O_LED_GREEN <= o_led_green; + P_O_LED_YELLOW <= o_led_yellow; + + -- debug outputs + P_IO_J42 <= GND; + P_IO_J43 <= GND; + P_IO_T19 <= o_debug1; + P_IO_T20 <= o_debug2; + + -- triggers + i_ana_trg(0) <= P_I_ATRG1; + i_ana_trg(1) <= P_I_ATRG2; + i_ana_trg(2) <= P_I_ATRG3; + i_ana_trg(3) <= P_I_ATRG4; + + io_etrg_in <= P_IO_ETRG_IN; + P_O_ETRG_IND <= o_etrg_ind; + P_IO_ETRG_OUT <= io_etrg_out; + P_O_ETRG_OUTD <= o_etrg_outd; + + i_cfg_pin <= P_I_J44; + + -- external clock + P_IO_ECLK_OUT <= io_eclk_out; + P_O_ECLK_OUTD <= '1'; + io_eclk_in <= P_IO_ECLK_IN; + P_O_ECLK_IND <= '0'; + + -- calibration + P_O_CAL <= o_cal; + P_O_TCA_CTRL <= o_tca_ctrl; + + clocks : usr_clocks port map ( + P_I_CLK33 => P_I_CLK33, + P_I_CLK66 => P_I_CLK66, + O_CLK33 => clk33, + O_CLK33_NODLL => clk33_nodll, + O_CLK66 => clk66, + O_CLK132 => clk132, + O_CLK264 => clk264, + I_PS_VALUE => clk_ps_value, + O_CLK_PS => clk_ps, + O_LOCKED => usr_clks_dlls_locked, + + O_DEBUG1 => open, + O_DEBUG2 => open + ); + + -- global system FPGA reset (synchronous): Assert reset until DLL + -- for clock DLLs have locked + proc_reset: process(clk33_nodll, usr_clks_dlls_locked) + begin + if (usr_clks_dlls_locked = '0') then + global_reset <= '1'; + elsif rising_edge(clk33_nodll) then + if (P_I_UC_PA0 = '0') then -- reset with uC PA0 line + global_reset <= '1'; + else + global_reset <= '0'; + end if; + end if; + end process; + + -- interface to status & control registers + -- --------------------------------------- + usb2_racc_interface: usb2_racc + port map ( + I_RESET => global_reset, + I_CLK33 => clk33, + + P_IO_UC_SLOE => P_IO_UC_SLOE, + P_IO_UC_SLRD => P_IO_UC_SLRD, + P_IO_UC_SLWR => P_IO_UC_SLWR, + P_IO_UC_SLCS => P_IO_UC_SLCS, + P_IO_UC_PKTEND => P_IO_UC_PKTEND, + P_IO_UC_FIFOADR0 => P_IO_UC_FIFOADR0, + P_IO_UC_FIFOADR1 => P_IO_UC_FIFOADR1, + P_IO_UC_FLAGA => P_IO_UC_FLAGA, + P_IO_UC_FLAGB => P_IO_UC_FLAGB, + P_IO_UC_FLAGC => P_IO_UC_FLAGC, + P_IO_UC_FD => P_IO_UC_FD, + + O_LOCBUS_ADDR => locbus_addr, + I_LOCBUS_D_RD => locbus_d_rd, + O_LOCBUS_D_WR => locbus_d_wr, + O_LOCBUS_WE => locbus_we, + + O_CONTROL_REG_ARR => control_reg_arr, + I_STATUS_REG_ARR => status_reg_arr, + + O_CONTROL_TRIG_ARR => control_trig_arr, + O_CONTROL0_BIT_TRIG_ARR => control0_bit_trig_arr, + + O_DEBUG => o_racc_debug + ); + + -- DPRAM (FIFO) for waveform storage + -- --------------------------------- + drs_dpram : usb_dpram + port map ( + I_RESET => global_reset, + + I_CLK_A => clk66, + I_ADDR_A => locbus_addr, + I_WE_A => locbus_we, + O_D_RD_A => locbus_d_rd, + I_D_WR_A => locbus_d_wr, + + I_CLK_B => dpram_clk, + I_ADDR_B => dpram_addr, + I_WE_B => dpram_we, + O_D_RD_B => dpram_d_rd, + I_D_WR_B => dpram_d_wr + + ); + + -- user PMC application + -- -------------------- + app : drs4_eval5_app + port map ( + I_RESET => global_reset, + I_CLK33 => clk33, + I_CLK66 => clk66, + I_CLK132 => clk132, + I_CLK264 => clk264, + O_CLK_PS_VALUE => clk_ps_value, + I_CLK_PS => clk_ps, + + O_CAL => o_cal, + O_TCA_CTRL => o_tca_ctrl, + + IO_ETRG_IN => io_etrg_in, + O_ETRG_IND => o_etrg_ind, + IO_ETRG_OUT => io_etrg_out, + O_ETRG_OUTD => o_etrg_outd, + I_ANA_TRG => i_ana_trg, + + IO_ECLK_OUT => io_eclk_out, + IO_ECLK_IN => io_eclk_in, + + I_CONFIG_PIN => i_cfg_pin, + + P_IO_PMC_USR => P_IO_PMC_USR, + + O_DPRAM_CLK => dpram_clk, + O_DPRAM_ADDR => dpram_addr, + O_DPRAM_D_WR => dpram_d_wr, + O_DPRAM_WE => dpram_we, + I_DPRAM_D_RD => dpram_d_rd, + + I_CONTROL_REG_ARR => control_reg_arr, + O_STATUS_REG_ARR => status_reg_arr, + + I_CONTROL_TRIG_ARR => control_trig_arr, + I_CONTROL0_BIT_TRIG_ARR => control0_bit_trig_arr, + + O_LED_GREEN => o_led_green, + O_LED_YELLOW => o_led_yellow, + + O_DEBUG1 => o_debug1, + O_DEBUG2 => o_debug2 + ); + +end arch; diff --git a/firmware/src/drs4_eval5_app.vhd b/firmware/src/drs4_eval5_app.vhd new file mode 100644 index 0000000..132c89c --- /dev/null +++ b/firmware/src/drs4_eval5_app.vhd @@ -0,0 +1,1863 @@ +--************************************************************* +-- Author : Boris Keil, Stefan Ritt +-- Contents : Main file for DRS4 control and readout +-- $Id: drs4_eval5_app.vhd 21844 2015-10-14 12:19:42Z ritt $ +-- $Revision: 15159 $ +--************************************************************* + +library ieee; +use ieee.std_logic_1164.all; +-- use ieee.std_logic_arith.all; +use ieee.std_logic_unsigned.all; +use ieee.numeric_std.all; +-- synopsys translate_off +library UNISIM; +use UNISIM.Vcomponents.ALL; +-- synopsys translate_on +use work.drs4_pack.all; + +entity drs4_eval5_app is + port ( + -- clocks + I_CLK33 : in std_logic; + I_CLK66 : in std_logic; + I_CLK132 : in std_logic; + I_CLK264 : in std_logic; + O_CLK_PS_VALUE : out std_logic_vector(7 downto 0); + I_CLK_PS : in std_logic; + I_RESET : in std_logic; -- active high power-up reset + + -- calibration + O_CAL : out std_logic; + O_TCA_CTRL : out std_logic; + + -- analog triggers + I_ANA_TRG : in std_logic_vector(3 downto 0); + + -- external trigger + IO_ETRG_IN : inout std_logic; + O_ETRG_IND : out std_logic; + + IO_ETRG_OUT : inout std_logic; + O_ETRG_OUTD : out std_logic; + + -- external (MMCX clock) clock + IO_ECLK_OUT : inout std_logic; + IO_ECLK_IN : inout std_logic; + + -- J44 pin configuration + I_CONFIG_PIN : in std_logic; + + -- PMC + P_IO_PMC_USR : inout std_logic_vector(63 downto 0); + + -- Simple bus interface to DPRAM + O_DPRAM_CLK : out std_logic; + O_DPRAM_ADDR : out std_logic_vector(31 downto 0); + O_DPRAM_D_WR : out std_logic_vector(31 downto 0); + O_DPRAM_WE : out std_logic; + I_DPRAM_D_RD : in std_logic_vector(31 downto 0); + + -- Control & status registers from system FPGA interface + I_CONTROL_REG_ARR : in type_control_reg_arr; + O_STATUS_REG_ARR : out type_status_reg_arr; + I_CONTROL_TRIG_ARR : in type_control_trig_arr; + I_CONTROL0_BIT_TRIG_ARR : in std_logic_vector(31 downto 0); + + -- LEDs signals + O_LED_GREEN : out std_logic; + O_LED_YELLOW : out std_logic; + + -- Debug signals + O_DEBUG1 : out std_logic; + O_DEBUG2 : out std_logic + ); +end drs4_eval5_app; + +--************************************************************* + +architecture arch of drs4_eval5_app is + + attribute BOX_TYPE : string; + + component USR_LIB_VEC_FDC + generic ( + width : integer := 1 + ); + port ( + I_CLK : in std_logic_vector (width-1 downto 0); + I_CLR : in std_logic_vector (width-1 downto 0); + I : in std_logic_vector (width-1 downto 0); + O : out std_logic_vector (width-1 downto 0) + ); + end component; + + component USR_LIB_VEC_IOFD_CPE_NALL + generic ( + width : integer := 1; + init_val_to_pad : string := "0"; + init_val_from_pad : string := "0" + ); + port ( + O_C : in std_logic_vector (width-1 downto 0); + O_CE : in std_logic_vector (width-1 downto 0); + O_CLR : in std_logic_vector (width-1 downto 0); + O_PRE : in std_logic_vector (width-1 downto 0); + O : out std_logic_vector (width-1 downto 0); + + I_C : in std_logic_vector (width-1 downto 0); + I_CE : in std_logic_vector (width-1 downto 0); + I_CLR : in std_logic_vector (width-1 downto 0); + I_PRE : in std_logic_vector (width-1 downto 0); + I : in std_logic_vector (width-1 downto 0); + + IO : inout std_logic_vector (width-1 downto 0); + T : in std_logic_vector (width-1 downto 0) + ); + end component; + + component OFDDRTCPE + port ( + O : out STD_ULOGIC; + C0 : in STD_ULOGIC; + C1 : in STD_ULOGIC; + CE : in STD_ULOGIC; + CLR : in STD_ULOGIC; + D0 : in STD_ULOGIC; + D1 : in STD_ULOGIC; + PRE : in STD_ULOGIC; + T : in STD_ULOGIC + ); + end component; + attribute BOX_TYPE of OFDDRTCPE : component is "PRIMITIVE"; + + component IOBUFDS + port ( + O : out STD_ULOGIC; + IO : inout STD_ULOGIC; + IOB : inout STD_ULOGIC; + I : in STD_ULOGIC; + T : in STD_ULOGIC + ); + end component; + + component LUT1 + generic ( + INIT : bit_vector + ); + port( + O : out STD_ULOGIC; + I0 : in STD_ULOGIC + ); + end component; + + signal GND : std_logic; + signal VCC : std_logic; + + -- ADC + signal i_drs_adc : std_logic_vector(13 downto 0); + signal o_drs_adc_clk : std_logic; + signal adc_clk_sr : std_logic_vector(15 downto 0); + -- Serial interface for DAC, EEPROM and Temp. Sensor + signal o_drs_serial_data : std_logic; + signal o_drs_serial_clk : std_logic; + signal i_drs_serial_data : std_logic; + signal i_drs_eeprom_data : std_logic; + signal o_drs_dac_cs_n : std_logic; + signal o_drs_eeprom_cs_n : std_logic; + signal o_drs_tempsens_cs_n : std_logic; + -- Status LED + signal drs_led_green : std_logic; + signal drs_led_trigger : std_logic; + signal drs_led_counter : std_logic_vector(20 downto 0); + type type_drs_led_state is (led_idle, led_on, led_off); + signal drs_led_state : type_drs_led_state; + -- DRS Start/enable + signal o_drs_enable : std_logic; + signal o_drs_write : std_logic; + -- Internal DRS shift registers + signal o_drs_srin : std_logic; + signal o_drs_srclk : std_logic; + signal o_drs_rsrload : std_logic; + signal i_drs_srout : std_logic; + signal i_drs_wsrout : std_logic; + subtype type_sr_count is integer range 0 to 1024; + signal drs_sr_count : type_sr_count; + signal drs_sr_reg : std_logic_vector(7 downto 0); + -- DRS address + signal o_drs_addr : std_logic_vector(3 downto 0); + -- PLL refence clock signal + signal drs_refclk : std_logic; + signal o_drs_refclk : std_logic; + signal drs_refclk_counter : std_logic_vector(16 downto 0); + signal i_drs_plllck : std_logic; + signal i_drs_dtap : std_logic; + -- 132/264 MHz calibration signal output + signal o_drs_tcalib_sig : std_logic; + -- power signal for chip test board + signal o_drs_on : std_logic; + -- config pin + signal i_cfg_pin : std_logic; + + -- Control registers + signal drs_ctl_start_trig : std_logic; + signal drs_ctl_reinit_trig : std_logic; -- 1 sets drs_reinit_reqest to '1' + signal drs_ctl_soft_trig : std_logic; + signal drs_ctl_eeprom_write_trig: std_logic; + signal drs_ctl_eeprom_read_trig: std_logic; + signal drs_ctl_autostart : std_logic; + signal drs_ctl_dmode : std_logic; + signal drs_ctl_dactive : std_logic; + signal drs_ctl_adc_active : std_logic; + signal drs_ctl_acalib : std_logic; + signal drs_ctl_led_yellow : std_logic; + signal drs_ctl_tca_ctrl : std_logic; + signal drs_ctl_refclk_source : std_logic; + type type_drs_dac_val_arr is array (7 downto 0) of std_logic_vector(15 downto 0); + signal drs_ctl_dac_arr : type_drs_dac_val_arr; + signal drs_ctl_first_chn : std_logic_vector(3 downto 0); + signal drs_ctl_last_chn : std_logic_vector(3 downto 0); + signal drs_ctl_config : std_logic_vector(7 downto 0); + signal drs_ctl_chn_config : std_logic_vector(7 downto 0); + signal drs_ctl_sampling_freq : std_logic_vector(15 downto 0); + signal drs_ctl_transp_mode : std_logic; + signal drs_ctl_standby_mode : std_logic; + signal drs_ctl_enable_trigger : std_logic; + signal drs_ctl_trigger_config : std_logic_vector(15 downto 0); + signal drs_ctl_neg_trigger : std_logic; + signal drs_ctl_readout_mode : std_logic; + signal drs_ctl_delay_sel : std_logic_vector(7 downto 0); + signal drs_ctl_trigger_transp : std_logic; + + -- Status registers + signal drs_stat_busy : std_logic; + signal drs_eeprom_busy : std_logic; + signal drs_stat_stop_cell : std_logic_vector(9 downto 0); + signal drs_stat_stop_wsr : std_logic_vector(7 downto 0); + signal drs_temperature : std_logic_vector(15 downto 0); + signal drs_trigger_bus : std_logic_vector(15 downto 0); + signal drs_serial_number : std_logic_vector(15 downto 0); + signal svn_revision : std_logic_vector(15 downto 0); + + -- Misc. internal signals + signal drs_reinit_request : std_logic; + signal drs_old_readout_mode : std_logic; + + -- Trigger signals + signal drs_trigger : std_logic; + signal drs_soft_trig : std_logic; + signal drs_trigger_syn : std_logic; + signal drs_write_set : std_logic; + signal drs_trig_ff : std_logic; + signal drs_write_ff : std_logic; + signal drs_hard_inp : std_logic_vector(4 downto 0); + signal drs_hard_or : std_logic; + signal drs_hard_and : std_logic; + signal drs_hard_trig : std_logic; + signal drs_global_trig : std_logic; + signal drs_trig_ff_reset : std_logic; + signal drs_trg_delay : std_logic_vector(2047 downto 0); + -- Tell P&R to not optimize away the drs_trg_delay array + attribute keep : string; + attribute keep of drs_trg_delay : signal is "true"; + + -- Serial bus internal signals + type type_serial_bus_state is (idle, wait_serdes, eeprom_read, eeprom_write, done); + signal serial_bus_state : type_serial_bus_state; + subtype type_serial_count is integer range 0 to 200; + signal serial_count : type_serial_count; + signal serial_ret_addr : type_serial_count; + signal serial_start_flag1 : std_logic; + signal serial_start_flag2 : std_logic; + + type type_serdes_state is (idle, busy, busy_temp); + signal serdes_state : type_serdes_state; + subtype type_serdes_clk is integer range 0 to 10; + signal serdes_clk : type_serdes_clk; + signal serdes_speed : type_serdes_clk; + subtype type_serdes_count is integer range 0 to 100; + signal serdes_count : type_serdes_count; + subtype type_serdes_bit_count_m1 is integer range 0 to 32; + signal serdes_bit_count_m1 : type_serdes_bit_count_m1; + signal serdes_bit_no : type_serdes_bit_count_m1; + signal serdes_trig : std_logic; + signal serdes_trig_temp : std_logic; + signal serdes_wdata : std_logic_vector(31 downto 0); + signal serdes_rdata : std_logic_vector(31 downto 0); + + type type_drs_dac_reg is array (7 downto 0) of std_logic_vector(15 downto 0); + signal drs_dac_reg : type_drs_dac_reg; + signal drs_dac_newval_flag : std_logic_vector(7 downto 0); + subtype type_dac_bit_count is integer range 0 to 31; + + signal temp : std_logic_vector(15 downto 0); + signal temp_timer : std_logic_vector(25 downto 0); -- once per second + signal temp_cmd : std_logic_vector(7 downto 0); + + subtype type_eeprom_count is integer range 0 to 100; + signal drs_eeprom_write_trig : std_logic; + signal drs_eeprom_read_trig : std_logic; + signal drs_ctl_eeprom_sector : std_logic_vector(15 downto 0); + signal drs_eeprom_sector : std_logic_vector(7 downto 0); + signal drs_eeprom_page : std_logic_vector(7 downto 0); + signal drs_eeprom_byte : std_logic_vector(7 downto 0); + signal drs_eeprom_cmd : std_logic_vector(59 downto 0); + + -- PMC IO pin control signals + signal pmc_clk_i : std_logic_vector(P_IO_PMC_USR'range); -- input FF clock + signal pmc_ce_i : std_logic_vector(P_IO_PMC_USR'range); -- input FF clock enable + signal pmc_clr_i : std_logic_vector(P_IO_PMC_USR'range); -- input FF async clear + signal pmc_pre_i : std_logic_vector(P_IO_PMC_USR'range); -- input FF async preset + signal pmc_i : std_logic_vector(P_IO_PMC_USR'range); -- input FF data + signal pmc_clk_o : std_logic_vector(P_IO_PMC_USR'range); -- output pad FF clock + signal pmc_ce_o : std_logic_vector(P_IO_PMC_USR'range); -- output pad FF clock enable + signal pmc_clr_o : std_logic_vector(P_IO_PMC_USR'range); -- output pad FF async clear + signal pmc_pre_o : std_logic_vector(P_IO_PMC_USR'range); -- output pad FF async preset + signal pmc_o : std_logic_vector(P_IO_PMC_USR'range); -- output pad FF data + signal pmc_nt : std_logic_vector(P_IO_PMC_USR'range); -- output pad FF 3state + + -- state of DRS readout state machine + type type_drs_readout_state is (init, idle, done, trailer, + start_running, running, start_readout, wait_vdd, adc_sync, + chip_readout, wsr_addr, wsr_setup, wsr_strobe, conf_setup, + conf_strobe, init_rsr); + signal drs_readout_state : type_drs_readout_state; + -- Localy copy signal to fulfull timing constraings + signal drs_readout_state_local : type_drs_readout_state; + + -- Clock signals for freq. meas., DRS data readout and serial bus (see below) + signal drs_readout_clk : std_logic; -- clock for DRS readout state machine + signal drs_readout_clk_ps : std_logic; -- clock for FADC, phase shifted + signal drs_serial_clk : std_logic; -- clock for serial bus + + -- Signals for DRS waveform readout + subtype type_drs_start_timer is integer range 0 to 255; + signal drs_start_timer : type_drs_start_timer; + signal drs_sample_count : std_logic_vector(10 downto 0); + signal drs_rd_tmp_count : std_logic_vector(12 downto 0); + signal drs_stop_cell : std_logic_vector(9 downto 0); + signal drs_stop_wsr : std_logic_vector(7 downto 0); + signal drs_addr : std_logic_vector(3 downto 0); + + -- DPRAM interface signals + signal drs_dpram_we1 : std_logic; + signal drs_dpram_we2 : std_logic; + signal drs_dpram_addr : std_logic_vector(31 downto 0); + signal drs_dpram_d_wr1 : std_logic_vector(31 downto 0); + signal drs_dpram_d_wr2 : std_logic_vector(31 downto 0); + signal drs_dpram_d_rd : std_logic_vector(31 downto 0); + signal drs_dpram_reset1 : std_logic; + signal drs_dpram_reset2 : std_logic; + signal drs_dpram_inc : std_logic; + + -- Frequency counter etc. + subtype type_32_bit is std_logic_vector(31 downto 0); + type type_scaler is array (5 downto 0) of type_32_bit; + + signal drs_1hz_counter : std_logic_vector(31 downto 0); + signal drs_1hz_clock : std_logic; + signal drs_1hz_latch1 : std_logic_vector(5 downto 0); + signal drs_1hz_latch2 : std_logic_vector(5 downto 0); + signal drs_1hz_latch3 : std_logic_vector(5 downto 0); + + signal scaler : type_scaler; + signal scaler_clock : std_logic_vector(5 downto 0); + signal scaler_reset : std_logic_vector(5 downto 0); + signal scaler_ff : std_logic_vector(5 downto 0); + signal scaler_ff_reset : std_logic_vector(5 downto 0); + +begin + GND <= '0'; + VCC <= '1'; + + -- Clock signals for freq. meas., DRS data readout and DAC control + drs_readout_clk <= I_CLK33; + drs_readout_clk_ps <= I_CLK33; -- phase shifted clock for FADC + drs_serial_clk <= I_CLK33; + + -- First part of I/O pad flipflop array + pmc_iofds_inst_bit_41_0 : USR_LIB_VEC_IOFD_CPE_NALL + generic map ( + width => 42, + init_val_to_pad => "1", + init_val_from_pad => "1" + ) + port map ( + O_C => pmc_clk_i(41 downto 0), + O_CE => pmc_ce_i(41 downto 0), + O_CLR => pmc_clr_i(41 downto 0), + O_PRE => pmc_pre_i(41 downto 0), + O => pmc_i(41 downto 0), + I_C => pmc_clk_o(41 downto 0), + I_CE => pmc_ce_o(41 downto 0), + I_CLR => pmc_clr_o(41 downto 0), + I_PRE => pmc_pre_o(41 downto 0), + I => pmc_o(41 downto 0), + IO => P_IO_PMC_USR(41 downto 0), + T => pmc_nt(41 downto 0) + ); + + -- bit 42 driven by combinatorinal logic of o_drs_write + + pmc_iofds_inst_bit_43 : USR_LIB_VEC_IOFD_CPE_NALL + generic map ( + width => 1, + init_val_to_pad => "1", + init_val_from_pad => "1" + ) + port map ( + O_C => pmc_clk_i(43 downto 43), + O_CE => pmc_ce_i(43 downto 43), + O_CLR => pmc_clr_i(43 downto 43), + O_PRE => pmc_pre_i(43 downto 43), + O => pmc_i(43 downto 43), + I_C => pmc_clk_o(43 downto 43), + I_CE => pmc_ce_o(43 downto 43), + I_CLR => pmc_clr_o(43 downto 43), + I_PRE => pmc_pre_o(43 downto 43), + I => pmc_o(43 downto 43), + IO => P_IO_PMC_USR(43 downto 43), + T => pmc_nt(43 downto 43) + ); + + pmc_iofds_inst_bit_53_47 : USR_LIB_VEC_IOFD_CPE_NALL + generic map ( + width => 7, + init_val_to_pad => "1", + init_val_from_pad => "1" + ) + port map ( + O_C => pmc_clk_i(53 downto 47), + O_CE => pmc_ce_i(53 downto 47), + O_CLR => pmc_clr_i(53 downto 47), + O_PRE => pmc_pre_i(53 downto 47), + O => pmc_i(53 downto 47), + I_C => pmc_clk_o(53 downto 47), + I_CE => pmc_ce_o(53 downto 47), + I_CLR => pmc_clr_o(53 downto 47), + I_PRE => pmc_pre_o(53 downto 47), + I => pmc_o(53 downto 47), + IO => P_IO_PMC_USR(53 downto 47), + T => pmc_nt(53 downto 47) + ); + + -- bit 54/55 is LVDS output + pmc_obufds_inst_bit_54_55 : IOBUFDS + port map ( + O => pmc_i(54), + IO => P_IO_PMC_USR(55), + IOB => P_IO_PMC_USR(54), + I => o_drs_refclk, + T => pmc_nt(54) + ); + + pmc_iofds_inst_bit_56 : USR_LIB_VEC_IOFD_CPE_NALL + generic map ( + width => 1, + init_val_to_pad => "1", + init_val_from_pad => "1" + ) + port map ( + O_C => pmc_clk_i(56 downto 56), + O_CE => pmc_ce_i(56 downto 56), + O_CLR => pmc_clr_i(56 downto 56), + O_PRE => pmc_pre_i(56 downto 56), + O => pmc_i(56 downto 56), + I_C => pmc_clk_o(56 downto 56), + I_CE => pmc_ce_o(56 downto 56), + I_CLR => pmc_clr_o(56 downto 56), + I_PRE => pmc_pre_o(56 downto 56), + I => pmc_o(56 downto 56), + IO => P_IO_PMC_USR(56 downto 56), + T => pmc_nt(56 downto 56) + ); + + pmc_iofds_inst_bit_58 : USR_LIB_VEC_IOFD_CPE_NALL + generic map ( + width => 1, + init_val_to_pad => "1", + init_val_from_pad => "1" + ) + port map ( + O_C => pmc_clk_i(58 downto 58), + O_CE => pmc_ce_i(58 downto 58), + O_CLR => pmc_clr_i(58 downto 58), + O_PRE => pmc_pre_i(58 downto 58), + O => pmc_i(58 downto 58), + I_C => pmc_clk_o(58 downto 58), + I_CE => pmc_ce_o(58 downto 58), + I_CLR => pmc_clr_o(58 downto 58), + I_PRE => pmc_pre_o(58 downto 58), + I => pmc_o(58 downto 58), + IO => P_IO_PMC_USR(58 downto 58), + T => pmc_nt(58 downto 58) + ); + + pmc_iofds_inst_bit_60 : USR_LIB_VEC_IOFD_CPE_NALL + generic map ( + width => 1, + init_val_to_pad => "1", + init_val_from_pad => "1" + ) + port map ( + O_C => pmc_clk_i(60 downto 60), + O_CE => pmc_ce_i(60 downto 60), + O_CLR => pmc_clr_i(60 downto 60), + O_PRE => pmc_pre_i(60 downto 60), + O => pmc_i(60 downto 60), + I_C => pmc_clk_o(60 downto 60), + I_CE => pmc_ce_o(60 downto 60), + I_CLR => pmc_clr_o(60 downto 60), + I_PRE => pmc_pre_o(60 downto 60), + I => pmc_o(60 downto 60), + IO => P_IO_PMC_USR(60 downto 60), + T => pmc_nt(60 downto 60) + ); + + pmc_iofds_inst_bit_62 : USR_LIB_VEC_IOFD_CPE_NALL + generic map ( + width => 1, + init_val_to_pad => "1", + init_val_from_pad => "1" + ) + port map ( + O_C => pmc_clk_i(62 downto 62), + O_CE => pmc_ce_i(62 downto 62), + O_CLR => pmc_clr_i(62 downto 62), + O_PRE => pmc_pre_i(62 downto 62), + O => pmc_i(62 downto 62), + I_C => pmc_clk_o(62 downto 62), + I_CE => pmc_ce_o(62 downto 62), + I_CLR => pmc_clr_o(62 downto 62), + I_PRE => pmc_pre_o(62 downto 62), + I => pmc_o(62 downto 62), + IO => P_IO_PMC_USR(62 downto 62), + T => pmc_nt(62 downto 62) + ); + + -- Clock signals for I/O pad flipflops + pmc_clk_i(27 downto 0) <= (others => drs_readout_clk); -- ADCs + pmc_clk_i(28) <= drs_readout_clk_ps; -- ADC CLK + pmc_clk_i(29) <= drs_serial_clk; -- SCLK + pmc_clk_i(30) <= drs_readout_clk; -- DTAP + pmc_clk_i(31) <= drs_serial_clk; -- SDI + pmc_clk_i(33) <= drs_serial_clk; -- SDO + pmc_clk_i(35) <= drs_serial_clk; -- DACCS + pmc_clk_i(37) <= drs_serial_clk; -- EECS + pmc_clk_i(38) <= GND; -- N/C + pmc_clk_i(39) <= drs_serial_clk; -- TSCS + pmc_clk_i(40) <= drs_readout_clk; -- DENABLE + pmc_clk_i(41) <= drs_readout_clk; -- WSROUT + pmc_clk_i(42) <= GND; -- DWRITE + pmc_clk_i(47) <= drs_readout_clk; -- DRSON + pmc_clk_i(48) <= drs_readout_clk; -- SRIN + pmc_clk_i(50) <= drs_readout_clk; -- SRCLK + pmc_clk_i(51) <= drs_readout_clk; -- SROUT + pmc_clk_i(52) <= drs_readout_clk; -- RSRLOAD + pmc_clk_i(53) <= drs_readout_clk; -- PLLLCK + pmc_clk_i(54) <= drs_readout_clk; -- REFCLK- + pmc_clk_i(55) <= drs_readout_clk; -- REFCLK+ + pmc_clk_i(56) <= drs_readout_clk; -- A0 + pmc_clk_i(58) <= drs_readout_clk; -- A1 + pmc_clk_i(60) <= drs_readout_clk; -- A2 + pmc_clk_i(62) <= drs_readout_clk; -- A3 + + pmc_clk_o <= pmc_clk_i; + + -- Default values for preset/clear/... + pmc_ce_i <= (others => VCC) ; + pmc_clr_i <= (others => GND) ; + pmc_pre_i <= (others => I_RESET) ; + pmc_ce_o <= (others => VCC) ; + pmc_clr_o <= (others => GND) ; + pmc_pre_o <= (others => I_RESET) ; + + -- I/O pin 3state control: outputs always driven ("0"), inputs never driven ("1") + pmc_nt(27 downto 0) <= (others => '1'); -- ADCs + pmc_nt(28) <= '0'; -- ADC CLK + pmc_nt(29) <= not o_drs_on; -- SCLK + pmc_nt(30) <= '1'; -- DTAP + pmc_nt(33) <= '1'; -- SDO + pmc_nt(35) <= '0'; -- DACCS + pmc_nt(37) <= '0'; -- EECS + pmc_nt(38) <= '0'; -- N/C + pmc_nt(39) <= '0'; -- TSCS + pmc_nt(40) <= not o_drs_on; -- DENABLE + pmc_nt(41) <= '1'; -- WSROUT + pmc_nt(42) <= not o_drs_on; -- DWRITE + pmc_nt(47) <= '0'; -- DRSON + pmc_nt(48) <= not o_drs_on; -- SRIN + pmc_nt(50) <= not o_drs_on; -- SRCLK + pmc_nt(51) <= '1'; -- SROUT + pmc_nt(52) <= not o_drs_on; -- RSRLOAD + pmc_nt(53) <= '1'; -- PLLLCK + pmc_nt(54) <= not o_drs_on; -- REFCLK- + pmc_nt(55) <= not o_drs_on; -- REFCLK+ + pmc_nt(56) <= not o_drs_on; -- A0 + pmc_nt(58) <= not o_drs_on; -- A1 + pmc_nt(60) <= not o_drs_on; -- A2 + pmc_nt(62) <= not o_drs_on; -- A3 + + -- Mapping of external PMC user signals + + i_drs_adc(0) <= pmc_i(0); + i_drs_adc(1) <= pmc_i(2); + i_drs_adc(2) <= pmc_i(4); + i_drs_adc(3) <= pmc_i(6); + i_drs_adc(4) <= pmc_i(8); + i_drs_adc(5) <= pmc_i(10); + i_drs_adc(6) <= pmc_i(12); + i_drs_adc(7) <= pmc_i(14); + i_drs_adc(8) <= pmc_i(16); + i_drs_adc(9) <= pmc_i(18); + i_drs_adc(10) <= pmc_i(20); + i_drs_adc(11) <= pmc_i(22); + i_drs_adc(12) <= pmc_i(24); + i_drs_adc(13) <= pmc_i(26); + + pmc_o(28) <= o_drs_adc_clk; + pmc_o(29) <= o_drs_serial_clk; + i_drs_dtap <= pmc_i(30); + pmc_o(31) <= o_drs_serial_data; -- out of TriState + i_drs_serial_data <= pmc_i(31); -- in of TriState + i_drs_eeprom_data <= pmc_i(33); + pmc_o(35) <= o_drs_dac_cs_n; + pmc_o(37) <= o_drs_eeprom_cs_n; + pmc_o(39) <= o_drs_tempsens_cs_n; + pmc_o(40) <= o_drs_enable; + i_drs_wsrout <= pmc_i(41); + -- pmc_o(42) driven by combinatorial logic of o_drs_write; + P_IO_PMC_USR(42) <= o_drs_write; + pmc_o(47) <= o_drs_on; + pmc_o(48) <= o_drs_srin; + pmc_o(50) <= o_drs_srclk; + i_drs_srout <= pmc_i(51); + pmc_o(52) <= o_drs_rsrload; + i_drs_plllck <= pmc_i(53); + pmc_o(56) <= o_drs_addr(0); + pmc_o(58) <= o_drs_addr(1); + pmc_o(60) <= o_drs_addr(2); + pmc_o(62) <= o_drs_addr(3); + + -- UsrBus control register mapping (control registers are set/read via + -- UsrBus/System FPGA). In addition to the normal control register bits + -- I_CONTROL_REG_ARR(reg_no)(bit_no), control register 0 has a special + -- feature: a bit in the std_logic_vector I_CONTROL0_BIT_TRIG_ARR(0) is + -- set for one I_CLK33 cycle (normally it is '0') when the System FPGA + -- writes a '1' to the respective bit in control register 0. This can + -- be used to trigger an event with a single UsrBus write cycle (instead + -- of toggling the control register bit 0->1->0 using two write cycles). + drs_ctl_start_trig <= I_CONTROL0_BIT_TRIG_ARR(0); + drs_ctl_reinit_trig <= I_CONTROL0_BIT_TRIG_ARR(1); + drs_ctl_soft_trig <= I_CONTROL0_BIT_TRIG_ARR(2); + drs_ctl_eeprom_write_trig <= I_CONTROL0_BIT_TRIG_ARR(3); + drs_ctl_eeprom_read_trig <= I_CONTROL0_BIT_TRIG_ARR(4); + drs_ctl_autostart <= I_CONTROL_REG_ARR(0)(16); + drs_ctl_adc_active <= I_CONTROL_REG_ARR(0)(17); + drs_ctl_led_yellow <= I_CONTROL_REG_ARR(0)(18); + drs_ctl_tca_ctrl <= I_CONTROL_REG_ARR(0)(19); + drs_ctl_transp_mode <= I_CONTROL_REG_ARR(0)(21); + drs_ctl_enable_trigger <= I_CONTROL_REG_ARR(0)(22); + drs_ctl_readout_mode <= I_CONTROL_REG_ARR(0)(23); + drs_ctl_neg_trigger <= I_CONTROL_REG_ARR(0)(24); + drs_ctl_acalib <= I_CONTROL_REG_ARR(0)(25); + drs_ctl_refclk_source <= I_CONTROL_REG_ARR(0)(26); + drs_ctl_dactive <= I_CONTROL_REG_ARR(0)(27); + drs_ctl_standby_mode <= I_CONTROL_REG_ARR(0)(28); + + drs_ctl_dac_arr(0) <= I_CONTROL_REG_ARR(1)(31 downto 16); -- needs trig. + drs_ctl_dac_arr(1) <= I_CONTROL_REG_ARR(1)(15 downto 0); -- needs trig. + drs_ctl_dac_arr(2) <= I_CONTROL_REG_ARR(2)(31 downto 16); -- needs trig. + drs_ctl_dac_arr(3) <= I_CONTROL_REG_ARR(2)(15 downto 0); -- needs trig. + drs_ctl_dac_arr(4) <= I_CONTROL_REG_ARR(3)(31 downto 16); -- needs trig. + drs_ctl_dac_arr(5) <= I_CONTROL_REG_ARR(3)(15 downto 0); -- needs trig. + drs_ctl_dac_arr(6) <= I_CONTROL_REG_ARR(4)(31 downto 16); -- needs trig. + drs_ctl_dac_arr(7) <= I_CONTROL_REG_ARR(4)(15 downto 0); -- needs trig. + drs_ctl_config <= I_CONTROL_REG_ARR(5)(31 downto 24); -- needs trig. + drs_ctl_chn_config <= I_CONTROL_REG_ARR(5)(23 downto 16); -- needs trig. + O_CLK_PS_VALUE <= I_CONTROL_REG_ARR(5)(15 downto 8); + drs_ctl_first_chn <= I_CONTROL_REG_ARR(5)(7 downto 4); + drs_ctl_last_chn <= I_CONTROL_REG_ARR(5)(3 downto 0); + drs_ctl_sampling_freq <= I_CONTROL_REG_ARR(6)(15 downto 0); + drs_ctl_delay_sel <= I_CONTROL_REG_ARR(6)(23 downto 16); + drs_ctl_trigger_config <= I_CONTROL_REG_ARR(7)(31 downto 16); + drs_ctl_eeprom_sector <= I_CONTROL_REG_ARR(7)(15 downto 0); + + drs_ctl_dmode <= drs_ctl_config(0); + drs_ctl_trigger_transp <= drs_ctl_trigger_config(15); + + -- UsrBus status register mapping + O_STATUS_REG_ARR(0)(31 downto 16) <= X"C0DE"; -- magic number to identify PSI VPC board + O_STATUS_REG_ARR(0)( 7 downto 0) <= X"04"; -- DRS4 + O_STATUS_REG_ARR(0)(15 downto 8) <= X"09"; -- USB Evaluation Board 5.0 + O_STATUS_REG_ARR(1)(0) <= drs_stat_busy; + O_STATUS_REG_ARR(1)(1) <= i_drs_plllck; + O_STATUS_REG_ARR(1)(2) <= i_drs_dtap; -- avoid optimizing away + O_STATUS_REG_ARR(1)(3) <= i_drs_wsrout; -- these signals + O_STATUS_REG_ARR(1)(4) <= i_drs_wsrout; + O_STATUS_REG_ARR(1)(5) <= drs_eeprom_busy; + O_STATUS_REG_ARR(1)(6) <= '0'; + O_STATUS_REG_ARR(1)(7) <= i_cfg_pin; + + O_STATUS_REG_ARR(1)(31 downto 8) <= (others => '0'); + + O_STATUS_REG_ARR(2)(31 downto 26) <= (others => '0'); + O_STATUS_REG_ARR(2)(25 downto 16) <= drs_stat_stop_cell; + + O_STATUS_REG_ARR(4)(31 downto 24) <= drs_stat_stop_wsr; + O_STATUS_REG_ARR(4)(23 downto 0) <= (others => '0'); + + O_STATUS_REG_ARR(8)(31 downto 16) <= drs_temperature; + O_STATUS_REG_ARR(8)(15 downto 0) <= drs_trigger_bus; + O_STATUS_REG_ARR(9)(31 downto 16) <= drs_serial_number; + O_STATUS_REG_ARR(9)(15 downto 0) <= svn_revision; + + -- SVN revision in hex format + svn_revision <= X"5553"; + + -- DPRAM for waveform data and EEPROM read/write + O_DPRAM_CLK <= drs_readout_clk; + O_DPRAM_ADDR <= drs_dpram_addr; + O_DPRAM_WE <= drs_dpram_we1 or drs_dpram_we2; + O_DPRAM_D_WR <= drs_dpram_d_wr1 when drs_dpram_we1 = '1' else + drs_dpram_d_wr2; + drs_dpram_d_rd <= I_DPRAM_D_RD; + + -- Config pin + i_cfg_pin <= I_CONFIG_PIN; + + -- State machine for serial bus access. It contains four functions: + -- 1) Set the 8 DAC channels whenever a write access to + -- the respective 16-bit word in the respective control register + -- occurs (via UsrBus/System FPGA, see above for register map) + -- 2) Read temperature sensor once per second + -- 3) Read EEPROM serial number on boot + -- 4) Write EEPROM serial number on request + + proc_serial_io: process(I_RESET, drs_serial_clk) + begin + if (I_RESET = '1') then + + serial_bus_state <= idle; + + drs_dac_newval_flag <= (others => '0'); + drs_eeprom_write_trig <= '0'; + drs_eeprom_read_trig <= '0'; + drs_eeprom_busy <= '1'; -- will be cleard after initial read + + temp_timer <= (others => '0'); + serial_count <= 0; + + loop_drs_dac_reg_reset : for dac_no in 0 to 7 loop + drs_dac_reg(dac_no) <= (others => '0'); + end loop; + + serdes_trig <= '0'; + serdes_trig_temp <= '0'; + serdes_wdata <= (others => '0'); + + o_drs_dac_cs_n <= '1'; + o_drs_eeprom_cs_n <= '1'; + o_drs_tempsens_cs_n <= '1'; + serial_count <= 0; + + serial_start_flag1 <= '1'; + serial_start_flag2 <= '1'; + + drs_dpram_we2 <= '0'; + drs_dpram_reset2 <= '0'; + drs_dpram_inc <= '0'; + + elsif rising_edge(drs_serial_clk) then + + serial_count <= serial_count + 1; + serdes_trig <= '0'; + serdes_trig_temp <= '0'; + + -- check if DAC control registers were updated (high byte only for 8-bit access) + gen_dac_newval_flag_set : for count in 0 to 3 loop + if (I_CONTROL_TRIG_ARR(count + 1)(3) = '1') then + drs_dac_newval_flag(count*2) <= '1'; + drs_dac_reg(count*2) <= drs_ctl_dac_arr(count*2); + end if; + if (I_CONTROL_TRIG_ARR(count + 1)(1) = '1') then + drs_dac_newval_flag(count*2 + 1) <= '1'; + drs_dac_reg(count*2 + 1) <= drs_ctl_dac_arr(count*2 + 1); + end if; + end loop; + + -- check if eeprom write trigger was updated + if (drs_ctl_eeprom_write_trig = '1') then + drs_eeprom_write_trig <= '1'; + drs_eeprom_busy <= '1'; + end if; + + -- check if eeprom read trigger was updated + if (drs_ctl_eeprom_read_trig = '1') then + drs_eeprom_read_trig <= '1'; + drs_eeprom_busy <= '1'; + end if; + + case (serial_bus_state) is + + when idle => + o_drs_dac_cs_n <= '1'; + o_drs_eeprom_cs_n <= '1'; + o_drs_tempsens_cs_n <= '1'; + serial_count <= 0; + drs_dpram_we2 <= '0'; + + -- need if..elsif chain to get only one flag set + if (drs_dac_newval_flag(0) = '1') then + drs_dac_newval_flag(0) <= '0'; + serdes_wdata(23 downto 0) <= "00110000" & drs_dac_reg(0); + elsif (drs_dac_newval_flag(1) = '1') then + drs_dac_newval_flag(1) <= '0'; + serdes_wdata(23 downto 0) <= "00110001" & drs_dac_reg(1); + elsif (drs_dac_newval_flag(2) = '1') then + drs_dac_newval_flag(2) <= '0'; + serdes_wdata(23 downto 0) <= "00110010" & drs_dac_reg(2); + elsif (drs_dac_newval_flag(3) = '1') then + drs_dac_newval_flag(3) <= '0'; + serdes_wdata(23 downto 0) <= "00110011" & drs_dac_reg(3); + elsif (drs_dac_newval_flag(4) = '1') then + drs_dac_newval_flag(4) <= '0'; + serdes_wdata(23 downto 0) <= "00110100" & drs_dac_reg(4); + elsif (drs_dac_newval_flag(5) = '1') then + drs_dac_newval_flag(5) <= '0'; + serdes_wdata(23 downto 0) <= "00110101" & drs_dac_reg(5); + elsif (drs_dac_newval_flag(6) = '1') then + drs_dac_newval_flag(6) <= '0'; + serdes_wdata(23 downto 0) <= "00110110" & drs_dac_reg(6); + elsif (drs_dac_newval_flag(7) = '1') then + drs_dac_newval_flag(7) <= '0'; + serdes_wdata(23 downto 0) <= "00110111" & drs_dac_reg(7); + end if; + + -- start serdes process if DAC changed + if (drs_dac_newval_flag /= "00000000") then + serial_bus_state <= wait_serdes; + o_drs_dac_cs_n <= '0'; + serdes_bit_count_m1 <= 23; + serdes_speed <= 0; + serdes_trig <= '1'; + end if; + + -- read eeprom once after startup + -- need delay such that o_drs_eeprom_cs_n = 1 for long enough time + if (serial_start_flag1 = '1' and temp_timer(12) = '1') then + serial_start_flag1 <= '0'; + serial_bus_state <= eeprom_read; + end if; + + -- read temperature when timer expired + if (temp_timer(temp_timer'high) = '1' or serial_start_flag2 = '1') then + serial_start_flag2 <= '0'; + temp_timer <= (others => '0'); + serial_bus_state <= wait_serdes; + o_drs_tempsens_cs_n <= '0'; + serdes_trig_temp <= '1'; + else + temp_timer <= temp_timer + "1"; + end if; + + -- write EEPROM when triggered + if (drs_eeprom_write_trig = '1') then + drs_eeprom_write_trig <= '0'; + serial_bus_state <= eeprom_write; + drs_eeprom_sector <= drs_ctl_eeprom_sector(7 downto 0); + end if; + + -- read EEPROM when triggered + if (drs_eeprom_read_trig = '1') then + drs_eeprom_read_trig <= '0'; + serial_bus_state <= eeprom_read; + drs_eeprom_sector <= drs_ctl_eeprom_sector(7 downto 0); + end if; + + -- wait for serdes process + when wait_serdes => + if (serial_count /=0) then + serial_count <= serial_count; + if (serdes_state = idle) then + serial_bus_state <= idle; + end if; + end if; + + -- read from EEPROM to DPRAM + when eeprom_read => + serdes_speed <= 0; + case (serial_count) is + when 0 => + o_drs_eeprom_cs_n <= '0'; + serdes_wdata(31 downto 0)<= "00000011" & drs_eeprom_sector + & X"0000"; -- Read page + serdes_bit_count_m1 <= 31; + serdes_trig <= '1'; + drs_dpram_reset2 <= '1'; + when 2 => + if (serdes_state = busy) then + serial_count <= serial_count; + end if; + when 3 => + drs_dpram_we2 <= '0'; + drs_dpram_reset2 <= '0'; + serdes_wdata <= (others => '0'); -- Dummy bits + serdes_bit_count_m1 <= 31; -- read 32 bits + serdes_trig <= '1'; + when 5 => + if (serdes_state = busy) then + serial_count <= serial_count; + end if; + when 6 => + -- swap bytes since LSB comes first out of the EEPROM and gets + -- stored then in rdata(31 downto 24) + drs_dpram_d_wr2(31 downto 24) <= serdes_rdata( 7 downto 0); + drs_dpram_d_wr2(23 downto 16) <= serdes_rdata(15 downto 8); + drs_dpram_d_wr2(15 downto 8) <= serdes_rdata(23 downto 16); + drs_dpram_d_wr2( 7 downto 0) <= serdes_rdata(31 downto 24); + drs_dpram_we2 <= '1'; + + -- page 0 addr 3 & 7 contains serial number + if (drs_dpram_addr = X"0000" and drs_eeprom_sector = X"00") then + drs_serial_number(7 downto 0) <= serdes_rdata(31 downto 24); + drs_serial_number(15 downto 8) <= serdes_rdata(23 downto 16); + end if; + + -- loop until 32kb read + if (drs_dpram_addr = X"00007FFC") then + serial_bus_state <= idle; + drs_eeprom_busy <= '0'; + end if; + serial_count <= 3; + when others => + null; + end case; + + -- write data from DPRAM to EEPROM + when eeprom_write => + serdes_speed <= 0; + case (serial_count) is + + -- call enable routine + when 0 => + serial_ret_addr <= 1; + serial_count <= 60; + + -- unprotect blocks, will fail if jumper missing + when 1 => + o_drs_eeprom_cs_n <= '0'; + serdes_wdata(15 downto 8) <= "00000001"; -- Write status register + serdes_wdata( 7 downto 0) <= "00000000"; -- no SRWD, no BPx + serdes_bit_count_m1 <= 15; + serdes_trig <= '1'; + when 3 => + if (serdes_state = busy) then + serial_count <= serial_count; + end if; + when 4 => + o_drs_eeprom_cs_n <= '1'; + + -- check status register + when 6 => + serial_ret_addr <= 7; + serial_count <= 50; + + -- call enable routine + when 7 => + serial_ret_addr <= 8; + serial_count <= 60; + + -- erase 64 kB block + when 8 => + o_drs_eeprom_cs_n <= '0'; + serdes_wdata(31 downto 0) <= "11011000" & drs_eeprom_sector + & X"0000"; -- Erase block + serdes_bit_count_m1 <= 31; + serdes_trig <= '1'; + when 10 => + if (serdes_state = busy) then + serial_count <= serial_count; + end if; + when 11 => + o_drs_eeprom_cs_n <= '1'; + drs_dpram_reset2 <= '1'; + + -- check status register until erase finished + when 13 => + serial_ret_addr <= 14; + serial_count <= 50; + + -- initialize page counter + when 14 => + drs_eeprom_page <= (others=>'0'); + drs_dpram_reset2 <= '0'; + + when 15 => + -- call enable routine + serial_ret_addr <= 16; + serial_count <= 60; + + -- write page (256 bytes) + when 16 => + o_drs_eeprom_cs_n <= '0'; + -- write page command, use only 1st half of 64 kB sector + serdes_wdata(31 downto 0) <= "00000010" & drs_eeprom_sector + & "0" & drs_eeprom_page(6 downto 0) & X"00"; + serdes_bit_count_m1 <= 31; + serdes_trig <= '1'; + drs_eeprom_byte <= (others=>'0'); + when 18 => + if (serdes_state = busy) then + serial_count <= serial_count; + end if; + when 19 => + -- write byte + case (drs_eeprom_byte(1 downto 0)) is + when "00" => + serdes_wdata(7 downto 0) <= drs_dpram_d_rd( 7 downto 0); + when "01" => + serdes_wdata(7 downto 0) <= drs_dpram_d_rd(15 downto 8); + when "10" => + serdes_wdata(7 downto 0) <= drs_dpram_d_rd(23 downto 16); + when "11" => + serdes_wdata(7 downto 0) <= drs_dpram_d_rd(31 downto 24); + when others => + null; + end case; + serdes_bit_count_m1 <= 7; + serdes_trig <= '1'; + if (drs_eeprom_byte(1 downto 0) = "11") then + drs_dpram_inc <= '1'; + end if; + when 20 => + drs_dpram_inc <= '0'; + when 21 => + if (serdes_state = busy) then + serial_count <= serial_count; + end if; + when 22 => + drs_eeprom_byte <= drs_eeprom_byte + 1; + if (drs_eeprom_byte /= X"FF") then + serial_count <= 19; -- loop until 256 bytes written + end if; + when 23 => + o_drs_eeprom_cs_n <= '1'; + + -- check status register + when 25 => + serial_ret_addr <= 26; + serial_count <= 50; + + -- loop until 128 pages are written + when 26 => + drs_eeprom_page <= drs_eeprom_page + 1; + if (drs_eeprom_page /= X"7F") then + serial_count <= 15; + end if; + + -- finish write + --when 27 => + -- drs_eeprom_busy <= '0'; + -- serial_bus_state <= idle; + + -- call enable routine + when 27 => + serial_ret_addr <= 28; + serial_count <= 60; + + -- remove protection of status register + when 28 => + o_drs_eeprom_cs_n <= '0'; + serdes_wdata(15 downto 8) <= "00000001"; -- Write status register + serdes_wdata( 7 downto 0) <= "00011100"; -- remove WPEN + serdes_bit_count_m1 <= 15; + serdes_trig <= '1'; + when 30 => + if (serdes_state = busy) then + serial_count <= serial_count; + end if; + when 31 => + o_drs_eeprom_cs_n <= '1'; + + -- check status register + when 33 => + serial_ret_addr <= 34; + serial_count <= 50; + + -- call enable routine + when 34 => + serial_ret_addr <= 35; + serial_count <= 60; + + -- protect status register and memory + when 35 => + o_drs_eeprom_cs_n <= '0'; + serdes_wdata(15 downto 8) <= "00000001"; -- Write status register + serdes_wdata( 7 downto 0) <= "10011100"; -- set WPEN, BP0 - BP2 + serdes_bit_count_m1 <= 15; + serdes_trig <= '1'; + when 37 => + if (serdes_state = busy) then + serial_count <= serial_count; + end if; + when 38 => + o_drs_eeprom_cs_n <= '1'; + + -- check status register + when 40 => + serial_ret_addr <= 41; + serial_count <= 50; + + -- finish write + when 41 => + drs_eeprom_busy <= '0'; + serial_bus_state <= idle; + + -- check status register "subroutine" -------------------------- + when 50 => + o_drs_eeprom_cs_n <= '0'; + serdes_wdata(15 downto 0) <= "00000101" & X"00"; -- Read Status Register + serdes_bit_count_m1 <= 15; + serdes_trig <= '1'; + when 52 => + if (serdes_state = busy) then + serial_count <= serial_count; + end if; + when 53 => + o_drs_eeprom_cs_n <= '1'; + when 55 => + -- repeat read status until WIP = '0' + if (serdes_rdata(0) = '1') then + serial_count <= 50; + end if; + when 59 => + serial_count <= serial_ret_addr; + + -- enable erase and write "subroutine" ------------------------- + when 60 => + o_drs_eeprom_cs_n <= '0'; + serdes_wdata(7 downto 0) <= "00000110"; -- WREN + serdes_bit_count_m1 <= 7; + serdes_trig <= '1'; + when 62 => + if (serdes_state = busy) then + serial_count <= serial_count; + end if; + when 63 => + o_drs_eeprom_cs_n <= '1'; + when 66 => + serial_count <= serial_ret_addr; + + when others => + null; + end case; + + when others => + serial_bus_state <= idle; + + end case; + + end if; + end process; + + -- Serializer/Deserializer for serial bus. Upon a serdes_trig, + -- output serdes_bit_count_m1 bits of serdes_wdata + proc_serdes: process(I_RESET, drs_serial_clk) + begin + if (I_RESET = '1') then + + o_drs_serial_clk <= '0'; + o_drs_serial_data <= '0'; + serdes_bit_no <= 0; + serdes_state <= idle; + serdes_rdata <= (others => '0'); + temp <= (others => '0'); + drs_temperature <= (others => '0'); + temp_cmd <= X"C1"; -- temperature register read + + elsif rising_edge(drs_serial_clk) then + case (serdes_state) is + + when idle => + pmc_nt(31) <= '0'; -- set pin to output by default + o_drs_serial_clk <= '0'; + o_drs_serial_data <= '0'; + serdes_clk <= 0; + serdes_count <= 0; + if (serdes_trig = '1') then + serdes_state <= busy; + serdes_bit_no <= serdes_bit_count_m1; + end if; + if (serdes_trig_temp = '1') then + serdes_state <= busy_temp; + serdes_bit_no <= 7; + end if; + + when busy => + serdes_clk <= serdes_clk + 1; + if (serdes_clk = serdes_speed) then + serdes_clk <= 0; + serdes_count <= serdes_count + 1; + + case (serdes_count) is + when 0 => + o_drs_serial_clk <= '0'; + o_drs_serial_data <= serdes_wdata(serdes_bit_no); + when 2 => + o_drs_serial_clk <= '1'; + when 3 => + serdes_rdata(serdes_bit_no) <= i_drs_eeprom_data; + serdes_count <= 0; + if (serdes_bit_no /= 0) then + serdes_bit_no <= serdes_bit_no - 1; + else + serdes_state <= idle; + end if; + when others => + null; + end case; + end if; + + when busy_temp => + serdes_clk <= serdes_clk + 1; + if (serdes_clk = 9) then -- only every 300ns + serdes_clk <= 0; + + -- wait one clock cycle until first data bit out + if (serdes_count > 0) then + o_drs_serial_clk <= not o_drs_serial_clk; + end if; + + -- output command + if ((o_drs_serial_clk = '1' or serdes_count = 0) and serdes_count < 8) then + serdes_count <= serdes_count + 1; + o_drs_serial_data <= temp_cmd(7 - serdes_count); + end if; + + -- input data + if (o_drs_serial_clk = '0' and serdes_count > 8) then + serdes_count <= serdes_count + 1; + temp <= temp(temp'high-1 downto 0) & i_drs_serial_data; + end if; + + -- switch SIO pin to input + if (o_drs_serial_clk = '1' and serdes_count = 8) then + pmc_nt(31) <= '1'; + serdes_count <= serdes_count + 1; + end if; + + -- finish up + if (serdes_count = 25) then + o_drs_serial_clk <= '0'; + drs_temperature <= temp; + serdes_state <= idle; + end if; + end if; + + when others => -- should never be entered... + serdes_state <= idle; + end case; + end if; + end process; + + -- Reference clock generation for PLL + + o_drs_refclk <= drs_refclk when drs_ctl_refclk_source = '0' else IO_ECLK_IN; + IO_ECLK_OUT <= o_drs_refclk when drs_ctl_trigger_transp = '0' else drs_trig_ff; + + proc_drs_refclk: process(I_RESET, I_CLK66, drs_ctl_sampling_freq) + begin + if (I_RESET = '1') then + drs_refclk <= '0'; + drs_refclk_counter(15 downto 0) <= drs_ctl_sampling_freq; + drs_refclk_counter(16) <= '0'; + elsif rising_edge(I_CLK66) then + if (drs_ctl_sampling_freq /= X"0000") then + drs_refclk_counter <= drs_refclk_counter - 1; + end if; + + -- initialize counter when DENABLE goes high + if (o_drs_enable = '0') then + drs_refclk_counter(15 downto 0) <= drs_ctl_sampling_freq; + drs_refclk_counter(16) <= '0'; + drs_refclk <= '0'; + end if; + + -- toggle refclk if timer expires + if (drs_refclk_counter(16) = '1') then + drs_refclk <= not drs_refclk; + drs_refclk_counter(15 downto 0) <= drs_ctl_sampling_freq; + drs_refclk_counter(16) <= '0'; + end if; + end if; + end process; + + -- select direction for trigger in/out + O_ETRG_IND <= GND; + O_ETRG_OUTD <= VCC; + + -- hardware trigger inputs with selectable polarity + drs_hard_inp(0) <= I_ANA_TRG(0) when drs_ctl_neg_trigger = '0' else not I_ANA_TRG(0); + drs_hard_inp(1) <= I_ANA_TRG(1) when drs_ctl_neg_trigger = '0' else not I_ANA_TRG(1); + drs_hard_inp(2) <= I_ANA_TRG(2) when drs_ctl_neg_trigger = '0' else not I_ANA_TRG(2); + drs_hard_inp(3) <= I_ANA_TRG(3) when drs_ctl_neg_trigger = '0' else not I_ANA_TRG(3); + drs_hard_inp(4) <= IO_ETRG_IN; -- always positive polarity + + -- OR block + drs_hard_or <= (drs_hard_inp(0) and drs_ctl_trigger_config(0)) or + (drs_hard_inp(1) and drs_ctl_trigger_config(1)) or + (drs_hard_inp(2) and drs_ctl_trigger_config(2)) or + (drs_hard_inp(3) and drs_ctl_trigger_config(3)) or + (drs_hard_inp(4) and drs_ctl_trigger_config(4)); + + -- AND block + drs_hard_and <= '0' when drs_ctl_trigger_config(12 downto 8) = "00000" else + ((drs_hard_inp(0) and drs_ctl_trigger_config(8)) or not drs_ctl_trigger_config(8)) and + ((drs_hard_inp(1) and drs_ctl_trigger_config(9)) or not drs_ctl_trigger_config(9)) and + ((drs_hard_inp(2) and drs_ctl_trigger_config(10)) or not drs_ctl_trigger_config(10)) and + ((drs_hard_inp(3) and drs_ctl_trigger_config(11)) or not drs_ctl_trigger_config(11)) and + ((drs_hard_inp(4) and drs_ctl_trigger_config(12)) or not drs_ctl_trigger_config(12)); + + -- global OR + drs_global_trig <= drs_hard_or or drs_hard_and when drs_ctl_enable_trigger = '1' else GND; + + -- global trigger / external trigger in transparent mode + drs_hard_trig <= drs_global_trig when drs_ctl_trigger_transp = '0' else IO_ETRG_IN; + + -- flip-flop which toggles with leading edge of hardware trigger + proc_trg_ff: process(drs_hard_trig, drs_trig_ff_reset) + begin + if (drs_trig_ff_reset = '1') then + drs_trig_ff <= '0'; + elsif rising_edge(drs_hard_trig) then + drs_trig_ff <= '1'; + end if; + end process; + + -- output copy of trigger + IO_ETRG_OUT <= drs_trig_ff when drs_ctl_trigger_transp = '0' else drs_global_trig; + + -- buffer chain delay for hardware trigger + drs_trg_delay(0) <= drs_trig_ff; + delayed_trig_gen: for bit_no in 1 to 2047 generate + LUT1_inst : LUT1 + generic map ( + INIT => "10") + port map ( + O => drs_trg_delay(bit_no), + I0 => drs_trg_delay(bit_no-1) + ); + end generate; + + -- select delayed hardware trigger + drs_trigger <= drs_trg_delay(CONV_INTEGER(drs_ctl_delay_sel)*8); + + -- flip-flop for o_drs_write signal: raise with drs_write_set and lower with trigger + proc_drs_write_ff: process(drs_trigger, drs_write_set, drs_readout_state) + begin + if (drs_readout_state = init or + drs_readout_state = start_readout) then -- remove o_drs_write also if drs_soft_trig received + drs_write_ff <= '0'; + elsif (drs_write_set = '1') then + drs_write_ff <= '1'; + elsif rising_edge(drs_trigger) then + drs_write_ff <= '0'; + end if; + end process; + + -- hardware trigger: remove o_drs_write asynchronously on rising edge of trigger + o_drs_write <= drs_write_ff; + + -- Domino chip readout + proc_drs_readout: process(I_RESET, drs_readout_clk) + begin + if (I_RESET = '1') then + drs_dpram_reset1 <= '1'; + drs_dpram_d_wr1 <= (others => '0'); + drs_dpram_we1 <= '0'; + o_drs_enable <= '0'; -- domino waves disabled + drs_write_set <= '0'; + o_drs_srin <= '1'; + o_drs_addr <= "1111"; -- standby + drs_readout_state <= init; + drs_stat_busy <= '0'; + drs_sample_count <= (others => '0'); + drs_rd_tmp_count <= (others => '0'); + drs_reinit_request <= '1'; + drs_trig_ff_reset <= '1'; + drs_trigger_syn <= '0'; + drs_soft_trig <= '0'; + drs_old_readout_mode <= '1'; + o_drs_on <= '1'; + o_drs_adc_clk <= '0'; + + elsif rising_edge(drs_readout_clk) then + drs_dpram_we1 <= '0'; + drs_dpram_reset1 <= '0'; + drs_trig_ff_reset <= '0'; + + -- Memorize a write access to the bit in the control register + -- that requests a reinitialisation of the DRS readout state + -- machine (drs_ctl_reinit_trig goes high for only one cycle, + -- therefore this "trigger" is memorised). + if (drs_ctl_reinit_trig = '1') then + drs_reinit_request <= '1'; + end if; + + -- sample asynchronous trigger + drs_trigger_syn <= drs_trigger; + + -- remember software trigger + if (drs_ctl_soft_trig = '1') then + drs_soft_trig <= '1'; + end if; + + -- run ADC clock continously + o_drs_adc_clk <= not o_drs_adc_clk; + + case (drs_readout_state) is + + when init => + drs_stat_busy <= '0'; + drs_reinit_request <= '0'; + drs_readout_state <= idle; + drs_trigger_bus <= (others => '0'); + o_drs_enable <= '0'; + + when idle => + drs_stat_busy <= '0'; + drs_soft_trig <= '0'; + + if (drs_ctl_standby_mode = '1') then + o_drs_addr <= "1111"; -- standby mode + o_drs_on <= '0'; -- DRS power off (test board) + else + o_drs_on <= '1'; + if (drs_ctl_transp_mode = '1') then + o_drs_addr <= "1010"; -- transparent mode + else + o_drs_addr <= "1011"; -- address read shift register + end if; + end if; + o_drs_srin <= '0'; + o_drs_rsrload <= '0'; + o_drs_srclk <= '0'; + drs_start_timer <= 0; + + if (drs_ctl_adc_active = '0') then + o_drs_adc_clk <= '0'; + end if; + if (drs_reinit_request = '1') then + drs_readout_state <= init; + elsif (drs_ctl_start_trig = '1') then + drs_readout_state <= start_running; + drs_stat_busy <= '1'; -- status reg. busy flag + end if; + + -- check high byte of drs_ctl_config register + if (I_CONTROL_TRIG_ARR(5)(3) = '1') then + drs_readout_state <= conf_setup; + o_drs_addr <= "1100"; -- address config register + end if; + + -- detect 1 to 0 transition of readout mode + drs_old_readout_mode <= drs_ctl_readout_mode; + if (drs_old_readout_mode = '1' and drs_ctl_readout_mode = '0') then + drs_readout_state <= init_rsr; + o_drs_addr <= "1011"; -- address read shift register + drs_sr_count <= 0; + end if; + + when start_running => + o_drs_enable <= '1'; -- enable and start domino wave + if (drs_start_timer = 0) then + drs_write_set <= '1'; -- set drs_write_ff in proc_drs_write + else + drs_write_set <= '0'; + end if; + + if (drs_ctl_adc_active = '0') then + o_drs_adc_clk <= '0'; + end if; + if (drs_reinit_request = '1') then + drs_readout_state <= init; + end if; + + drs_trig_ff_reset <= '1'; + + -- do not go to running until at least 1.5 domino revolutions + drs_start_timer <= drs_start_timer + 1; + if (drs_start_timer = 105) then -- 105 * 30ns = 3.15us + drs_readout_state <= running; + drs_trig_ff_reset <= '0'; -- arm trigger + end if; + + when running => + + if (drs_ctl_adc_active = '0') then + o_drs_adc_clk <= '0'; + end if; + if (drs_reinit_request = '1') then + drs_readout_state <= init; + end if; + if (drs_ctl_standby_mode = '1') then + drs_readout_state <= idle; + end if; + + -- External trigger or software trigger received or DMODE = 0? If so: + -- stop domino wave & start readout sequence + if (drs_trigger_syn = '1' or drs_soft_trig = '1' or drs_ctl_dmode = '0') then + drs_readout_state <= start_readout; + end if; + + when start_readout => + if (drs_ctl_dactive = '0') then + o_drs_enable <= '0'; -- stop domino wave only if dactive=0 + end if; + + drs_addr <= drs_ctl_first_chn; + o_drs_addr <= "1101"; -- address write shift register for readout + drs_sample_count <= (others => '0'); + drs_rd_tmp_count <= (others => '0'); + drs_stop_cell <= (others => '0'); + drs_stop_wsr <= (others => '0'); + + -- reset FIFO + drs_dpram_reset1 <= '1'; + + drs_readout_state <= wait_vdd; + + when wait_vdd => + if (drs_reinit_request = '1') then + drs_readout_state <= init; + end if; + + drs_rd_tmp_count <= drs_rd_tmp_count + 1; + + -- wait ~120 us for VDD to stabilize + if (drs_rd_tmp_count(drs_rd_tmp_count'high) = '1') then + drs_rd_tmp_count <= (others => '0'); + drs_readout_state <= adc_sync; + end if; + + when adc_sync => + -- synchronize with free running ADC clock + if (o_drs_adc_clk = '1') then + drs_readout_state <= chip_readout; + end if; + + when chip_readout => + if (drs_reinit_request = '1') then + drs_readout_state <= init; + end if; + + o_drs_srclk <= '0'; + drs_dpram_reset1 <= '0'; + + if (drs_rd_tmp_count(drs_rd_tmp_count'high) = '0') then + drs_rd_tmp_count <= drs_rd_tmp_count + 1; + end if; + + if (drs_rd_tmp_count = 0) then + if (drs_ctl_readout_mode = '1') then + o_drs_rsrload <= '1'; -- load read shift register with stop position + end if; + end if; + + if (drs_rd_tmp_count = 1) then + o_drs_rsrload <= '0'; + end if; + + if (drs_rd_tmp_count = 2 and drs_addr = drs_ctl_first_chn) then + drs_stop_wsr(0) <= i_drs_srout; -- sample last bit of WSR for first channel + end if; + + if (drs_rd_tmp_count = 2) then + o_drs_addr <= drs_addr; -- select channel for readout + end if; + + if (drs_rd_tmp_count > 13 and drs_sample_count < 1016) then + o_drs_srclk <= not o_drs_srclk; + end if; + + if (drs_rd_tmp_count > 13 and drs_rd_tmp_count < 36) then + if (o_drs_srclk = '1') then + drs_stop_cell(0) <= i_drs_srout; + drs_stop_cell(9 downto 1) <= drs_stop_cell(8 downto 0); + end if; + end if; + + -- ADC delivers data at its outputs with 7 clock cycles delay + -- with respect to its external clock pin + if (drs_rd_tmp_count > 29 and o_drs_adc_clk = '1') then + drs_sample_count <= drs_sample_count + 1; + + if (drs_sample_count(0) = '0') then + -- even cells: WORD0, WORD2, WORD4, ... + drs_dpram_d_wr1(15 downto 2) <= i_drs_adc(13 downto 0); -- sample ADC data + drs_dpram_d_wr1(1 downto 0) <= "00"; + else + -- odd cells: WORD1, WORD3, WORD5, ... + drs_dpram_d_wr1(31 downto 18) <= i_drs_adc(13 downto 0); -- sample ADC data + drs_dpram_d_wr1(17 downto 16) <= "00"; + + drs_dpram_we1 <= '1'; -- write 32 bits to DPRAM + end if; + end if; + + if (drs_sample_count = 1024) then + drs_sample_count <= (others => '0'); + drs_rd_tmp_count <= (others => '0'); + o_drs_srclk <= '0'; + + -- write stop cell into register + drs_stat_stop_cell <= drs_stop_cell; + drs_stat_stop_wsr <= drs_stop_wsr; + + -- increment channel address + drs_addr <= drs_addr + 1; + + -- re-sync ADC + drs_readout_state <= adc_sync; + + -- All channels of DRS chips read ? + if (drs_addr = drs_ctl_last_chn) then + drs_readout_state <= trailer; + end if; + + end if; + + when trailer => + drs_dpram_d_wr1(31 downto 24) <= (others => '0'); + drs_dpram_d_wr1(23 downto 16) <= drs_stop_wsr; + drs_dpram_d_wr1(15 downto 10) <= (others => '0'); + drs_dpram_d_wr1( 9 downto 0) <= drs_stop_cell; + drs_dpram_we1 <= '1'; + drs_readout_state <= done; + + when done => + drs_readout_state <= idle; + drs_stat_busy <= '0'; + drs_dpram_we1 <= '0'; + drs_write_set <= '1'; -- set drs_write_ff in proc_drs_write + -- to keep chip "warm" + + -- set-up of configuration register + when conf_setup => + o_drs_srclk <= '1'; + drs_sr_count <= 0; + drs_sr_reg <= drs_ctl_config; + drs_readout_state <= conf_strobe; + o_drs_srin <= drs_ctl_config(7); + + when conf_strobe => + drs_sr_count <= drs_sr_count + 1; + o_drs_srclk <= not o_drs_srclk; + + if (o_drs_srclk = '1') then + drs_sr_reg(7 downto 1)<= drs_sr_reg(6 downto 0); + else + o_drs_srin <= drs_sr_reg(7); + end if; + + if (drs_sr_count = 14) then + drs_readout_state <= wsr_addr; + end if; + + -- change address without changing clock + when wsr_addr => + o_drs_addr <= "1101"; -- address write shift register + drs_readout_state <= wsr_setup; + + -- set-up of write shift register + when wsr_setup => + o_drs_srclk <= '1'; + drs_sr_count <= 0; + drs_sr_reg <= drs_ctl_chn_config; + drs_readout_state <= wsr_strobe; + o_drs_srin <= drs_ctl_chn_config(7); + + when wsr_strobe => + drs_sr_count <= drs_sr_count + 1; + o_drs_srclk <= not o_drs_srclk; + + if (o_drs_srclk = '1') then + drs_sr_reg(7 downto 1) <= drs_sr_reg(6 downto 0); + else + o_drs_srin <= drs_sr_reg(7); + end if; + + if (drs_sr_count = 14) then + drs_readout_state <= idle; + end if; + + -- initialize read shift register + when init_rsr => + if (o_drs_srclk = '1') then + drs_sr_count <= drs_sr_count + 1; + end if; + o_drs_srclk <= not o_drs_srclk; + + if (drs_sr_count = 1023 and o_drs_srclk = '0') then + o_drs_srin <= '1'; + end if; + + if (drs_sr_count = 1024 and o_drs_srclk = '0') then + o_drs_srin <= '0'; + drs_readout_state <= idle; + o_drs_srclk <= '0'; + end if; + + when others => + drs_readout_state <= init; + + end case; + end if; + end process; + + -- Address counter for cyclic buffer ("FIFO") to store DRS chip readout data + proc_drs_dpram_addr_count: process(I_RESET, drs_dpram_reset1, drs_dpram_reset2, drs_readout_clk) + begin + if (I_RESET = '1' or drs_dpram_reset1 = '1' or drs_dpram_reset2 = '1') then + drs_dpram_addr <= (others => '0'); + elsif rising_edge(drs_readout_clk) then + if (drs_dpram_we1 = '1' or drs_dpram_we2 = '1' or drs_dpram_inc = '1') then + drs_dpram_addr <= drs_dpram_addr + "100"; + end if; + end if; + end process; + + --drs_led_trigger <= o_drs_write; + drs_led_trigger <= '1' when drs_readout_state = running else '0'; + + -- led pulse stretched + proc_drs_red_led: process(I_RESET, drs_readout_clk) + begin + if (I_RESET = '1') then + drs_led_green <= '1'; + drs_led_counter <= (others => '1'); + drs_led_state <= led_idle; + elsif rising_edge(drs_readout_clk) then + case (drs_led_state) is + when led_idle => + if (drs_led_trigger = '1') then + drs_led_green <= '1'; + drs_led_state <= led_on; + drs_led_counter(drs_led_counter'high) <= '0'; + end if; + when led_on => + if (drs_led_counter(drs_led_counter'high) = '0') then + drs_led_counter <= drs_led_counter - 1; + elsif (drs_led_trigger = '0') then + drs_led_green <= '0'; + drs_led_state <= led_off; + drs_led_counter(drs_led_counter'high) <= '0'; + end if; + when led_off => + drs_led_counter <= drs_led_counter - 1; + if (drs_led_counter(drs_led_counter'high) = '1') then + drs_led_state <= led_idle; + end if; + end case; + end if; + end process; + + + -- Reference clock used for frequency counter + + proc_1hzclk: process(I_RESET, I_CLK33) + begin + if (I_RESET = '1') then + drs_1hz_counter(31 downto 0) <= (others => '0'); + drs_1hz_clock <= '0'; + scaler_reset <= (others => '1'); + scaler_ff_reset <= (others => '1'); + elsif rising_edge(I_CLK33) then + drs_1hz_counter <= drs_1hz_counter - 1; -- count down + scaler_reset <= (others => '0'); + scaler_ff_reset <= (others => '0'); + + -- toggle refclk if timer expires + if (drs_1hz_counter(drs_1hz_counter'high) = '1') then + drs_1hz_clock <= not drs_1hz_clock; + drs_1hz_counter(31 downto 0) <= X"0016E35F"; -- 1499999, I_CLK33 is actually a 30 MHz clock + + scaler_ff_reset <= (others => '1'); -- reset scaler_ff once every 100ms cycle + loop_scaler_reset : for i in 0 to 5 loop + if (scaler_ff(i) = '0') then -- no activity since last cycle? + scaler_reset(i) <= '1'; -- force clear scaler register + end if; + end loop; + + if (scaler_ff(0) = '0') then -- no activity since last cycle? + scaler_reset(0) <= '1'; -- force clear scaler register + end if; + + end if; + end if; + end process; + + + -- scalers for channels 1-4 & trigger & ext. clock + gen_scaler_ff : for i in 0 to 5 generate + begin + + -- RS flip-flop to register any scaler activity, needed to clear the scaler for 0 Hz + proc_scaler_ff: process(scaler_ff_reset(i), scaler_clock(i)) + begin + if (scaler_ff_reset(i) = '1') then + scaler_ff(i) <= '0'; + elsif rising_edge(scaler_clock(i)) then + scaler_ff(i) <= '1'; + end if; + end process; + + -- scaler process + proc_drs_scaler: process(scaler_reset(i), scaler_clock(i)) + begin + if (scaler_reset(i) = '1') then + scaler(i) <= (others => '0'); + O_STATUS_REG_ARR(10+i) <= (others => '0'); + drs_1hz_latch1(i) <= '0'; + drs_1hz_latch2(i) <= '0'; + drs_1hz_latch3(i) <= '0'; + elsif rising_edge(scaler_clock(i)) then + scaler(i) <= scaler(i) + 1; + drs_1hz_latch1(i) <= drs_1hz_clock; -- sample asynchronous clock + drs_1hz_latch2(i) <= drs_1hz_latch1(i); + drs_1hz_latch3(i) <= drs_1hz_latch2(i); + + -- toggle refclk if timer expires + if (drs_1hz_latch1(i) = '1' and drs_1hz_latch2(i) = '0' and drs_1hz_latch3(i) = '0') then + scaler(i) <= scaler(i); + O_STATUS_REG_ARR(10+i) <= scaler(i); + end if; + if (drs_1hz_latch1(i) = '1' and drs_1hz_latch2(i) = '1' and drs_1hz_latch3(i) = '0') then + scaler(i) <= X"00000001"; -- we loose one clock cycle, so add it back here + end if; + end if; + end process; + + end generate gen_scaler_ff; + + scaler_clock(0) <= I_ANA_TRG(0); + scaler_clock(1) <= I_ANA_TRG(1); + scaler_clock(2) <= I_ANA_TRG(2); + scaler_clock(3) <= I_ANA_TRG(3); + scaler_clock(4) <= drs_hard_trig; + scaler_clock(5) <= IO_ECLK_IN; + + -- debugging + O_DEBUG1 <= drs_1hz_clock; + O_DEBUG2 <= scaler_reset(0); + + -- timing calibration + O_TCA_CTRL <= drs_ctl_tca_ctrl; + O_CAL <= not drs_ctl_acalib; + + -- LED + O_LED_GREEN <= drs_led_green; + O_LED_YELLOW <= drs_ctl_led_yellow; + +end arch; diff --git a/firmware/src/drs4_pack.vhd b/firmware/src/drs4_pack.vhd new file mode 100644 index 0000000..6d369a9 --- /dev/null +++ b/firmware/src/drs4_pack.vhd @@ -0,0 +1,41 @@ +--############################################################# +-- Author : Boris Keil, Stefan Ritt +-- Contents : Status and control register definition for drs2_cmc2 +-- $Id$ +--############################################################# + +library IEEE; +use IEEE.STD_LOGIC_1164.all; + +package drs4_pack is + +-- Constant definitions +-- #################### + constant const_no_of_control_reg_addr_bits : integer := 4; + constant const_no_of_status_reg_addr_bits : integer := 4; + constant const_pmc1_pmc2_diff_bit: integer := 19; + + -- number of control registers + constant const_no_of_control_regs: integer := (2**(const_no_of_control_reg_addr_bits)); + -- number of status registers + constant const_no_of_status_regs: integer := (2**(const_no_of_status_reg_addr_bits)); + -- Register width. Do not modify. + constant const_reg_width: integer := 32; + + -- reinit bit in control register #0 + constant const_reinit_bit: integer := 1; + + -- size of DPRAM per PMC minus 4 + constant const_dpram_size_m4: std_logic_vector(31 downto 0) := X"0000_9FFC"; -- 10 channels @ 1024 samples @ 2x12bits + --constant const_dpram_size_m4: std_logic_vector(31 downto 0) := X"0000_0008"; -- for simulation + +-- Type definitions +-- ################ + subtype type_reg is std_logic_vector(31 downto 0); + type type_control_reg_arr is array (const_no_of_control_regs - 1 downto 0) of type_reg; + type type_status_reg_arr is array (const_no_of_status_regs - 1 downto 0) of type_reg; + subtype type_control_reg_no is integer range 0 to (const_no_of_control_regs - 1); + subtype type_status_reg_no is integer range 0 to (const_no_of_status_regs - 1); + type type_control_trig_arr is array (const_no_of_control_regs - 1 downto 0) of std_logic_vector(3 downto 0); + +end drs4_pack; diff --git a/firmware/src/rc.bat b/firmware/src/rc.bat new file mode 100644 index 0000000..0f74ce9 --- /dev/null +++ b/firmware/src/rc.bat @@ -0,0 +1 @@ +@..\..\revision_convert\Debug\revision_convert drs3_cmc1.vhd diff --git a/firmware/src/usb2_racc.vhd b/firmware/src/usb2_racc.vhd new file mode 100644 index 0000000..50c99b2 --- /dev/null +++ b/firmware/src/usb2_racc.vhd @@ -0,0 +1,498 @@ +--############################################################# +-- Author : Stefan Ritt +-- Contents : Register & FIFO Access through Cy7C68013A uC +-- $Id: usb2_racc.vhd 6983 2007-03-12 09:26:06Z ritt $ +--############################################################# + +library IEEE; +use IEEE.STD_LOGIC_1164.ALL; +use IEEE.STD_LOGIC_ARITH.ALL; +use IEEE.STD_LOGIC_UNSIGNED.ALL; +use work.drs4_pack.all; + +entity usb2_racc is + port ( + I_RESET : in std_logic; + I_CLK33 : in std_logic; + + -- Lines to from C8051 microcontroller + -- ----------------------------------- + P_IO_UC_SLOE : inout std_logic; + P_IO_UC_SLRD : inout std_logic; + P_IO_UC_SLWR : inout std_logic; + P_IO_UC_SLCS : inout std_logic; + P_IO_UC_PKTEND : inout std_logic; + P_IO_UC_FIFOADR0 : inout std_logic; + P_IO_UC_FIFOADR1 : inout std_logic; + P_IO_UC_FLAGA : inout std_logic; + P_IO_UC_FLAGB : inout std_logic; + P_IO_UC_FLAGC : inout std_logic; + P_IO_UC_FD : inout std_logic_vector(15 downto 0); + + -- Simple bus interface to on-chip RAM + -- -------------------------------------------------- + O_LOCBUS_ADDR : out std_logic_vector(31 downto 0); + I_LOCBUS_D_RD : in std_logic_vector(31 downto 0); + O_LOCBUS_D_WR : out std_logic_vector(31 downto 0); + O_LOCBUS_WE : out std_logic; + + -- Status & control registers + -- -------------------------- + O_CONTROL_REG_ARR : out type_control_reg_arr; + I_STATUS_REG_ARR : in type_status_reg_arr; + + O_CONTROL_TRIG_ARR : out type_control_trig_arr; + O_CONTROL0_BIT_TRIG_ARR : out std_logic_vector(31 downto 0); + + -- Debug signal + -- ------------ + O_DEBUG : out std_logic + ); +end usb2_racc; + +architecture arch of usb2_racc is + + -- I/O pad tri-state flip-flops + component USR_LIB_VEC_IOFD_CPE_NALL + generic ( + width : integer := 1; + init_val_to_pad : string := "0"; + init_val_from_pad : string := "0" + ); + port ( + O_C : in std_logic_vector (width-1 downto 0); + O_CE : in std_logic_vector (width-1 downto 0); + O_CLR : in std_logic_vector (width-1 downto 0); + O_PRE : in std_logic_vector (width-1 downto 0); + O : out std_logic_vector (width-1 downto 0); + + I_C : in std_logic_vector (width-1 downto 0); + I_CE : in std_logic_vector (width-1 downto 0); + I_CLR : in std_logic_vector (width-1 downto 0); + I_PRE : in std_logic_vector (width-1 downto 0); + I : in std_logic_vector (width-1 downto 0); + + IO : inout std_logic_vector (width-1 downto 0); + T : in std_logic_vector (width-1 downto 0) + ); + end component; + + -- UC I/O pin control signals + signal uc_o : std_logic_vector(25 downto 0); -- output FF data + signal uc_i : std_logic_vector(25 downto 0); -- input FF data + signal uc_clk_i : std_logic_vector(25 downto 0); -- input FF clock + signal uc_clr_i : std_logic_vector(25 downto 0); -- input FF async clear + signal uc_ce_i : std_logic_vector(25 downto 0); -- input FF clock enable + signal uc_pre_i : std_logic_vector(25 downto 0); -- input FF async preset + signal uc_clk_o : std_logic_vector(25 downto 0); -- output FF clock + signal uc_ce_o : std_logic_vector(25 downto 0); -- output FF clock enable + signal uc_clr_o : std_logic_vector(25 downto 0); -- output FF async clear + signal uc_pre_o : std_logic_vector(25 downto 0); -- output FF async preset + signal uc_ts : std_logic_vector(25 downto 0); -- output FF 3state + + -- internal control/status registers + subtype type_byte_sel is integer range 0 to 3; + subtype type_pkt_size is integer range 0 to 256; + signal control_reg_arr : type_control_reg_arr; + signal status_reg_arr : type_status_reg_arr; + signal control_reg_no : type_control_reg_no; + signal status_reg_no : type_status_reg_no; + signal usrbus_byte_sel : type_byte_sel; + signal usrbus_pkt_size : type_pkt_size; + signal usrbus_status_sel : std_logic; + signal usrbus_ram_sel : std_logic; + signal usrbus_size : std_logic_vector(31 downto 0); + signal locbus_addr : std_logic_vector(31 downto 0); + + -- microcontroller interface signals + type type_uc_state is (idle, oe1, oe2, cmd, adr0, adr1, size0, size1, + write_word, read_word, read_ram, + read_pause1, read_pause2, read_pause3, read_pause4, + read_end1, read_end2, read_end3); + type type_uc_cmd is (cmd_read, cmd_write); + + signal uc_state : type_uc_state; + signal uc_cmd : type_uc_cmd; + signal uc_data_i : std_logic_vector(15 downto 0); + signal uc_data_o : std_logic_vector(15 downto 0); + signal uc_pktend : std_logic; + signal uc_flaga : std_logic; + signal uc_flagb : std_logic; + signal uc_flagc : std_logic; + signal uc_fdts : std_logic; + signal uc_fdts_pl : std_logic; + signal uc_slcs : std_logic; + signal uc_fifoadr0 : std_logic; + signal uc_fifoadr1 : std_logic; + signal uc_sloe : std_logic; + signal uc_slrd : std_logic; + signal uc_slwr : std_logic; + + signal debug : std_logic; + +begin + + O_CONTROL_REG_ARR <= control_reg_arr; + status_reg_arr <= I_STATUS_REG_ARR; + O_DEBUG <= debug; + + uc_iofds_inst : USR_LIB_VEC_IOFD_CPE_NALL + generic map ( + width => 26, + init_val_to_pad => "1", + init_val_from_pad => "1" + ) + port map ( + O_C => uc_clk_i(25 downto 0), + O_CE => uc_ce_i(25 downto 0), + O_CLR => uc_clr_i(25 downto 0), + O_PRE => uc_pre_i(25 downto 0), + O => uc_i(25 downto 0), + I_C => uc_clk_o(25 downto 0), + I_CE => uc_ce_o(25 downto 0), + I_CLR => uc_clr_o(25 downto 0), + I_PRE => uc_pre_o(25 downto 0), + I => uc_o(25 downto 0), + IO(15 downto 0) => P_IO_UC_FD(15 downto 0), + IO(16) => P_IO_UC_PKTEND, + IO(17) => P_IO_UC_SLOE, + IO(18) => P_IO_UC_SLRD, + IO(19) => P_IO_UC_SLWR, + IO(20) => P_IO_UC_SLCS, + IO(21) => P_IO_UC_FIFOADR0, + IO(22) => P_IO_UC_FIFOADR1, + IO(23) => P_IO_UC_FLAGA, + IO(24) => P_IO_UC_FLAGB, + IO(25) => P_IO_UC_FLAGC, + T => uc_ts(25 downto 0) + ); + + -- Connection for I/O pad flipflops + -- -------------------------------- + + -- control signals + uc_clk_i <= (others => I_CLK33); + uc_ce_i <= (others => '1'); + uc_clr_i(24 downto 0) <= (others => '0'); + uc_clr_i(25) <= I_RESET; + uc_pre_i(24 downto 0) <= (others => I_RESET) ; + uc_pre_i(25) <= '0'; + uc_clk_o <= (others => I_CLK33); + uc_ce_o <= (others => '1') ; + uc_clr_o <= (others => '0') ; + uc_pre_o <= (others => I_RESET) ; + + -- port direction + uc_ts(15 downto 0) <= (others => uc_fdts); + uc_ts(22 downto 16) <= (others => '0'); -- fixed output + uc_ts(25 downto 23) <= (others => '1'); -- fixed input + + -- FF connection + uc_data_i <= uc_i(15 downto 0); + uc_flaga <= uc_i(23); + uc_flagb <= uc_i(24); + uc_flagc <= uc_i(25); + + uc_o(15 downto 0) <= uc_data_o; + uc_o(16) <= uc_pktend; + uc_o(17) <= uc_sloe; + uc_o(18) <= uc_slrd; + uc_o(19) <= uc_slwr; + uc_o(20) <= uc_slcs; + uc_o(21) <= uc_fifoadr0; + uc_o(22) <= uc_fifoadr1; + + debug <= '0'; + + process(I_RESET, I_CLK33) + begin + if (I_RESET = '1') then + + control_reg_arr <= (others => X"00000000"); + + control_reg_no <= 0; + status_reg_no <= 0; + locbus_addr <= (others => '0'); + + usrbus_byte_sel <= 0; + usrbus_pkt_size <= 0; + usrbus_status_sel <= '0'; + usrbus_ram_sel <= '0'; + usrbus_size <= (others => '0'); + + locbus_addr <= (others => '0'); + O_LOCBUS_ADDR <= (others => '0'); + O_LOCBUS_D_WR <= (others => '0'); + O_LOCBUS_WE <= '0'; + + O_CONTROL_TRIG_ARR <= (others => "0000"); + O_CONTROL0_BIT_TRIG_ARR <= (others => '0'); + + -- CY7C68013 configuration + -- ----------------------- + uc_slcs <= '0'; -- FIFO interface always on + uc_fifoadr0 <= '1'; -- Select EP 4 + uc_fifoadr1 <= '0'; + + uc_fdts_pl <= '1'; -- Tri-state data lines driven by uC + uc_fdts <= '1'; -- Tri-state data lines driven by uC + + uc_pktend <= '1'; + uc_sloe <= '1'; + uc_slrd <= '1'; + uc_slwr <= '1'; + + uc_data_o <= (others => '0'); + uc_state <= idle; + + elsif rising_edge(I_CLK33) then + + -- pipeline for syncronization with I/O-FFs + uc_fdts <= uc_fdts_pl; + + -- reset trigger signals + O_CONTROL_TRIG_ARR <= (others => "0000"); + O_CONTROL0_BIT_TRIG_ARR <= (others => '0'); + + -- default values for RAM access + O_LOCBUS_WE <= '0'; + + -- put ram address on bus on each clock cycle + O_LOCBUS_ADDR <= locbus_addr; + + -- Transfer buffers: + -- 1. buffer: + -- fd(0) : USB2_CMD_READ + -- fd(1) : USB2_CMD_WRITE + -- 2. buffer: + -- fd(15:0) : addreess LSB + -- 3. buffer: + -- fd(15:0) : addreess MSB + -- 4. buffer: + -- fd(15:0) : byte size LSB + -- 5. buffer: + -- fd(15:0) : bytes size MSB + -- + -- Address offsets: + -- 0x00000 : CTRL + -- 0x10000 : STATUS + -- 0x20000 : FIFO + -- 0x40000 : RAM BUF1 + -- 0x50000 : RAM BUF2 + -- ---------------- + case (uc_state) is + + when idle => + uc_fifoadr0 <= '1'; -- Select EP 4 + uc_fifoadr1 <= '0'; + + uc_sloe <= '1'; + uc_slrd <= '1'; + uc_slwr <= '1'; + uc_fdts_pl <= '1'; + uc_pktend <= '1'; + + if (uc_flagc = '1') then + uc_sloe <= '0'; + uc_slrd <= '0'; + uc_state <= oe1; + end if; + + -- wait until sloe signal propagates to pin and uc_data_i propagates in + when oe1 => + uc_state <= oe2; + when oe2 => + uc_state <= cmd; + + when cmd => + if (uc_data_i(0) = '1') then + uc_cmd <= cmd_read; + else + uc_cmd <= cmd_write; + end if; + uc_state <= adr0; + + when adr0 => + locbus_addr(15 downto 0) <= uc_data_i; + uc_state <= adr1; + when adr1 => + locbus_addr(31 downto 16) <= uc_data_i; + uc_state <= size0; + when size0 => + usrbus_size(15 downto 0) <= uc_data_i; + uc_state <= size1; + when size1 => + usrbus_size(31 downto 16) <= uc_data_i; + + usrbus_status_sel <= locbus_addr(16); + usrbus_ram_sel <= locbus_addr(18); + usrbus_pkt_size <= 0; + + if (uc_cmd = cmd_read) then + if (locbus_addr(18) = '1') then + uc_state <= read_ram; + else + uc_state <= read_word; + end if; + uc_fifoadr0 <= '1'; -- Select EP 8 + uc_fifoadr1 <= '1'; + uc_sloe <= '1'; + uc_slrd <= '1'; + else + uc_state <= write_word; + end if; + + usrbus_byte_sel <= conv_integer(locbus_addr(1))*2; -- only word boundary access + control_reg_no <= conv_integer(locbus_addr(const_no_of_control_reg_addr_bits + 1 downto 2)); + status_reg_no <= conv_integer(locbus_addr(const_no_of_status_reg_addr_bits + 1 downto 2)); + + when read_ram => + -- one wait state until RAM data is available + uc_state <= read_word; + locbus_addr <= locbus_addr + "10"; -- increment 2 bytes + + when read_word => + uc_slwr <= '0'; -- assert write line + uc_fdts_pl <= '0'; -- remove tri-state for FD lines + + if (usrbus_ram_sel = '0') then + -- Register access + if (usrbus_status_sel = '0') then + -- Control register + if (usrbus_byte_sel = 0) then + uc_data_o <= control_reg_arr(control_reg_no)(15 downto 0); + else + uc_data_o <= control_reg_arr(control_reg_no)(31 downto 16); + end if; + else + -- Status register + if (usrbus_byte_sel = 0) then + uc_data_o <= status_reg_arr(status_reg_no)(15 downto 0); + else + uc_data_o <= status_reg_arr(status_reg_no)(31 downto 16); + end if; + end if; + else + -- RAM access + if (locbus_addr(1) = '1') then -- locbus_addr already got incremented! + -- first 16-bit word + uc_data_o(15 downto 0) <= I_LOCBUS_D_RD(15 downto 0); + else + -- second 16-bit word + uc_data_o(15 downto 0) <= I_LOCBUS_D_RD(31 downto 16); + end if; + + end if; + + -- auto increment register + if (usrbus_ram_sel = '0') then + if (usrbus_byte_sel = 0) then + usrbus_byte_sel <= 2; + else + usrbus_byte_sel <= 0; + status_reg_no <= status_reg_no + 1; + control_reg_no <= control_reg_no + 1; + end if; + end if; + + -- increment packet size, pause after 256 packets + usrbus_pkt_size <= usrbus_pkt_size + 1; + if (usrbus_pkt_size = 255) then + uc_state <= read_pause1; + else + if (usrbus_ram_sel = '1') then + locbus_addr <= locbus_addr + "10"; -- increment 2 bytes + end if; + usrbus_size <= usrbus_size - 2; + end if; + + -- finish when all words are written + if (usrbus_size = X"00000002") then + uc_pktend <= '0'; + uc_state <= read_end1; + end if; + + when read_pause1 => + uc_slwr <= '1'; -- de-assert write line + -- one wait state until flagb is available + uc_state <= read_pause2; + when read_pause2 => + uc_state <= read_pause3; + when read_pause3 => + uc_state <= read_pause4; + when read_pause4 => + -- wait until full flag is de-asserted + if (uc_flagb = '1') then + uc_state <= read_word; + usrbus_pkt_size <= 0; + locbus_addr <= locbus_addr + "10"; -- increment 2 bytes + usrbus_size <= usrbus_size - 2; + end if; + + when read_end1 => + uc_fifoadr0 <= '1'; -- Select EP 4 + uc_fifoadr1 <= '0'; + uc_slwr <= '1'; + uc_fdts_pl <= '1'; + uc_pktend <= '1'; + uc_state <= read_end2; + when read_end2 => + uc_state <= read_end3; + when read_end3 => + uc_state <= idle; + + when write_word => + if (usrbus_ram_sel = '0') then + -- Register access + if (usrbus_byte_sel = 0) then + control_reg_arr(control_reg_no)(15 downto 0) <= uc_data_i; + O_CONTROL_TRIG_ARR(control_reg_no)(1) <= '1'; + O_CONTROL_TRIG_ARR(control_reg_no)(0) <= '1'; + if (control_reg_no = 0) then + O_CONTROL0_BIT_TRIG_ARR(15 downto 0) <= uc_data_i; + end if; + usrbus_byte_sel <= 2; + else + control_reg_arr(control_reg_no)(31 downto 16) <= uc_data_i; + O_CONTROL_TRIG_ARR(control_reg_no)(3) <= '1'; + O_CONTROL_TRIG_ARR(control_reg_no)(2) <= '1'; + if (control_reg_no = 0) then + O_CONTROL0_BIT_TRIG_ARR(31 downto 16) <= uc_data_i; + end if; + usrbus_byte_sel <= 0; + control_reg_no <= control_reg_no + 1; + end if; + else + -- RAM access + + if (locbus_addr(1) = '0') then + -- first 16-bit word + O_LOCBUS_D_WR(15 downto 0) <= uc_data_i; + else + -- second 16-bit word + O_LOCBUS_D_WR(31 downto 16) <= uc_data_i; + O_LOCBUS_WE <= '1'; -- writes require multiples of 4 + end if; + + if (uc_flagc = '1') then + locbus_addr <= locbus_addr + "10"; -- increment 2 bytes + end if; + end if; + + -- continue until all words are written + if (usrbus_size = X"00000002") then + uc_state <= idle; + end if; + + if (uc_flagc = '1') then + usrbus_size <= usrbus_size - 2; + end if; + + when others => + uc_state <= idle; + + end case; + end if; + end process; + +end arch; diff --git a/firmware/src/usb_dpram.vhd b/firmware/src/usb_dpram.vhd new file mode 100644 index 0000000..3d402b1 --- /dev/null +++ b/firmware/src/usb_dpram.vhd @@ -0,0 +1,113 @@ +--############################################################# +-- Author : Stefan Ritt +-- Contents : Waveform memory for DRS4 board +-- $Id: usb_dpram.vhd 7194 2007-04-04 13:08:16Z ritt@PSI.CH $ +--############################################################# + +library ieee; +use ieee.std_logic_1164.all; +-- use ieee.std_logic_arith.all; +use ieee.std_logic_unsigned.all; +use ieee.numeric_std.all; +-- synopsys translate_off +library UNISIM; +use UNISIM.Vcomponents.ALL; +-- synopsys translate_on +use work.drs4_pack.all; + +-- ########################################################################################## + +entity usb_dpram is + port ( + + I_RESET : in std_logic; + + I_CLK_A : in std_logic; + I_ADDR_A : in std_logic_vector(31 downto 0); + I_WE_A : in std_logic; + O_D_RD_A : out std_logic_vector(31 downto 0); + I_D_WR_A : in std_logic_vector(31 downto 0); + + I_CLK_B : in std_logic; + I_ADDR_B : in std_logic_vector(31 downto 0); + I_WE_B : in std_logic; + O_D_RD_B : out std_logic_vector(31 downto 0); + I_D_WR_B : in std_logic_vector(31 downto 0) + + ); +end usb_dpram; + +-- ########################################################################################## + +architecture arch of usb_dpram is + + attribute BOX_TYPE : string; + + component RAMB16_S36_S36 + port( + DOA : out std_logic_vector(31 downto 0); + DOPA : out std_logic_vector(3 downto 0); + DOB : out std_logic_vector(31 downto 0); + DOPB : out std_logic_vector(3 downto 0); + ADDRA : in std_logic_vector(8 downto 0); + ADDRB : in std_logic_vector(8 downto 0); + CLKA : in std_ulogic; + CLKB : in std_ulogic; + DIA : in std_logic_vector(31 downto 0); + DIPA : in std_logic_vector(3 downto 0); + DIB : in std_logic_vector(31 downto 0); + DIPB : in std_logic_vector(3 downto 0); + ENA : in std_ulogic; + ENB : in std_ulogic; + SSRA : in std_ulogic; + SSRB : in std_ulogic; + WEA : in std_ulogic; + WEB : in std_ulogic + ); + end component; + + attribute BOX_TYPE of RAMB16_S36_S36: component is "PRIMITIVE"; + + signal block_we_a : std_logic_vector(15 downto 0); + signal block_we_b : std_logic_vector(15 downto 0); + + type block_do_type is array (15 downto 0) of std_logic_vector(31 downto 0); + signal block_do_a : block_do_type; + signal block_do_b : block_do_type; + +begin + + dpram_gen : for block_no in 0 to 15 generate + + block_we_a(block_no) <= I_WE_A when I_ADDR_A(14 downto 11) = block_no else '0'; + block_we_b(block_no) <= I_WE_B when I_ADDR_B(14 downto 11) = block_no else '0'; + + ramb16_s36_s36_inst: RAMB16_S36_S36 + port map ( + CLKA => I_CLK_A, + ADDRA => I_ADDR_A(10 downto 2), + ENA => '1', + WEA => block_we_a(block_no), + DIA => I_D_WR_A, + DIPA => (others => '0'), + DOA => block_do_a(block_no), + DOPA => open, + SSRA => '0', -- output reset unused + + CLKB => I_CLK_B, + ADDRB => I_ADDR_B(10 downto 2), + ENB => '1', + WEB => block_we_b(block_no), + DIB => I_D_WR_B, + DIPB => (others => '0'), + DOB => block_do_b(block_no), + DOPB => open, + SSRB => '0' + ); + + end generate; + + O_D_RD_A <= block_do_a(conv_integer(I_ADDR_A(14 downto 11))); + O_D_RD_B <= block_do_b(conv_integer(I_ADDR_B(14 downto 11))); + +end arch; diff --git a/firmware/src/usr_clocks.vhd b/firmware/src/usr_clocks.vhd new file mode 100644 index 0000000..8867beb --- /dev/null +++ b/firmware/src/usr_clocks.vhd @@ -0,0 +1,359 @@ +--############################################################# +-- Author : Boris Keil, Stefan Ritt +-- Contents : Use external 33 MHz to generate internal clocks +-- via DCMs +-- $Id: usr_clocks.vhd 8369 2007-07-06 14:47:25Z ritt@PSI.CH $ +--############################################################# + +library ieee; +use ieee.std_logic_1164.all; +use ieee.std_logic_arith.all; +use ieee.std_logic_unsigned.all; +use ieee.numeric_std.all; +-- synopsys translate_off +library UNISIM; +use UNISIM.Vcomponents.all; +-- synopsys translate_on + +entity usr_clocks is + port ( + P_I_CLK33 : in std_logic; + P_I_CLK66 : in std_logic; + O_CLK33 : out std_logic; + O_CLK33_NODLL : out std_logic; + O_CLK66 : out std_logic; + O_CLK132 : out std_logic; + O_CLK264 : out std_logic; + I_PS_VALUE : in std_logic_vector(7 downto 0); + O_CLK_PS : out std_logic; + O_LOCKED : out std_logic; + O_DEBUG1 : out std_logic; + O_DEBUG2 : out std_logic + ); +end usr_clocks; + +architecture arch of usr_clocks is + attribute BOX_TYPE : STRING ; + +-- xilinx cores + + component IBUFGDS_LVDS_25 + port( + O : out std_ulogic; + I : in std_ulogic; + IB : in std_ulogic + ); + end component; + attribute BOX_TYPE of IBUFGDS_LVDS_25 : component is "PRIMITIVE"; + + component BUFG + port( + O : out std_ulogic; + I : in std_ulogic + ); + end component; + attribute BOX_TYPE of BUFG : component is "PRIMITIVE"; + + -- !!! WARNING !!! : The Virtex2Pro has a bug in the DCM + -- (a silicon bug, i.e. real hardware), the PLL does not + -- lock properly if the CLK2x output is used for + -- feedback -> always use CLK1x !!! (Call from Memec, + -- C. Grivet, 17.12.03) + + component DCM + generic ( + CLKDV_DIVIDE : real := 2.0; + CLKFX_DIVIDE : integer := 1; + CLKFX_MULTIPLY : integer := 4; + CLKIN_DIVIDE_BY_2 : boolean := false; + CLKIN_PERIOD : real := 0.0; --non-simulatable, in nanoseconds + CLKOUT_PHASE_SHIFT : string := "NONE"; + CLK_FEEDBACK : string := "1X"; + DESKEW_ADJUST : string := "SYSTEM_SYNCHRONOUS"; --non-simulatable + DFS_FREQUENCY_MODE : string := "LOW"; + DLL_FREQUENCY_MODE : string := "LOW"; + DSS_MODE : string := "NONE"; --non-simulatable + DUTY_CYCLE_CORRECTION : boolean := true; + -- MAXPERCLKIN : time := 1000000 ps; --simulation parameter + -- MAXPERPSCLK : time := 100000000 ps; --simulation parameter + PHASE_SHIFT : integer := 0; + -- SIM_CLKIN_CYCLE_JITTER : time := 300 ps; --simulation parameter + -- SIM_CLKIN_PERIOD_JITTER : time := 1000 ps; --simulation parameter + STARTUP_WAIT : boolean := false --non-simulatable + ); + port ( + CLK0 : out std_ulogic := '0'; + CLK180 : out std_ulogic := '0'; + CLK270 : out std_ulogic := '0'; + CLK2X : out std_ulogic := '0'; + CLK2X180 : out std_ulogic := '0'; + CLK90 : out std_ulogic := '0'; + CLKDV : out std_ulogic := '0'; + CLKFX : out std_ulogic := '0'; + CLKFX180 : out std_ulogic := '0'; + LOCKED : out std_ulogic := '0'; + PSDONE : out std_ulogic := '0'; + STATUS : out std_logic_vector(7 downto 0) := "00000000"; + + CLKFB : in std_ulogic := '0'; + CLKIN : in std_ulogic := '0'; + DSSEN : in std_ulogic := '0'; + PSCLK : in std_ulogic := '0'; + PSEN : in std_ulogic := '0'; + PSINCDEC : in std_ulogic := '0'; + RST : in std_ulogic := '0' + ); + end component; + attribute BOX_TYPE of DCM : component is "PRIMITIVE"; + + signal clk33_i, clk33, clk66_dcm1, clk66_dcm2, clk132, clk_ps : std_logic; + signal clk33_tmp, clk66_dcm1_tmp, clk66_dcm2_tmp, clk132_tmp, clk_ps_tmp : std_logic; + signal locked_dcm1, locked_dcm2, locked_dcm3: std_logic; + signal dcm2_reset, dcm2_reset_n: std_logic; + signal dcm2_reset_delay_n: std_logic_vector(4 downto 0); + + type type_ps_state is (idle, incdec); + signal ps_state : type_ps_state; + signal ps_enable, ps_incdec, ps_done: std_logic; + signal ps_shadow: std_logic_vector(7 downto 0); + + signal GND: std_logic; + signal VCC: std_logic; + +begin + GND <= '0'; + VCC <= '1'; + + -- Drive clock buffer with input pad oscillator signal + + inst_bufg_clk33_i: BUFG + port map ( + I => P_I_CLK33, + O => clk33_i + ); + + O_CLK33_NODLL <= clk33_i; + + -- Use clock buffers for DCM outputs + + inst_bufg_clk33_dcm1: BUFG + port map ( + I => clk33_tmp, + O => clk33 + ); + + inst_bufg_clk66_dcm1: BUFG + port map ( + I => clk66_dcm1_tmp, + O => clk66_dcm1 + ); + + inst_bufg_clk66_dcm2: BUFG + port map ( + I => clk66_dcm2_tmp, + O => clk66_dcm2 + ); + + inst_bufg_clk132: BUFG + port map ( + I => clk132_tmp, + O => clk132 + ); + + inst_bufg_clk_ps: BUFG + port map ( + I => clk_ps_tmp, + O => clk_ps + ); + + Inst_dcm1_clk132: DCM + generic map ( + CLKDV_DIVIDE => 2.0, + CLKFX_DIVIDE => 1, + CLKFX_MULTIPLY => 4, + CLKIN_DIVIDE_BY_2 => false, + CLKIN_PERIOD => 30.0, -- in nanoseconds + CLKOUT_PHASE_SHIFT => "NONE", + CLK_FEEDBACK => "1X", -- 2X has a silicon bug ... + DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS", -- OK ?? non-simulatable + DFS_FREQUENCY_MODE => "LOW", + DLL_FREQUENCY_MODE => "LOW", + DSS_MODE => "NONE", --non-simulatable + DUTY_CYCLE_CORRECTION => true, + -- MAXPERCLKIN => 1000000 ps, --simulation parameter + -- MAXPERPSCLK => 100000000 ps, --simulation parameter + PHASE_SHIFT => 0, + -- SIM_CLKIN_CYCLE_JITTER => 300 ps, --simulation parameter + -- SIM_CLKIN_PERIOD_JITTER => 1000 ps, --simulation parameter + STARTUP_WAIT => true --non-simulatable + ) + port map ( + -- inputs + CLKFB => clk33, + CLKIN => clk33_i, + DSSEN => GND, + PSCLK => GND, + PSEN => GND, + PSINCDEC => GND, + RST => GND, + -- outputs + CLK0 => clk33_tmp, + CLK180 => open, + CLK270 => open, + CLK2X => clk66_dcm1_tmp, + CLK2X180 => open, + CLK90 => open, + CLKDV => open, + CLKFX => open, + CLKFX180 => open, + LOCKED => locked_dcm1, + PSDONE => open, + STATUS => open + + ); + + Inst_dcm2_clk132: DCM + generic map ( + CLKDV_DIVIDE => 2.0, + CLKFX_DIVIDE => 1, + CLKFX_MULTIPLY => 2, + CLKIN_DIVIDE_BY_2 => false, + CLKIN_PERIOD => 15.0, -- in nanoseconds + CLKOUT_PHASE_SHIFT => "NONE", + CLK_FEEDBACK => "1X", -- 2X has a silicon bug ... + DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS", -- OK ?? non-simulatable + DFS_FREQUENCY_MODE => "LOW", + DLL_FREQUENCY_MODE => "HIGH", + DSS_MODE => "NONE", --non-simulatable + DUTY_CYCLE_CORRECTION => true, + -- MAXPERCLKIN => 1000000 ps, --simulation parameter + -- MAXPERPSCLK => 100000000 ps, --simulation parameter + PHASE_SHIFT => 0, + -- SIM_CLKIN_CYCLE_JITTER => 300 ps, --simulation parameter + -- SIM_CLKIN_PERIOD_JITTER => 1000 ps, --simulation parameter + STARTUP_WAIT => false --non-simulatable + ) + port map ( + -- inputs + CLKFB => clk66_dcm2, + CLKIN => P_I_CLK66, + DSSEN => GND, + PSCLK => GND, + PSEN => GND, + PSINCDEC => GND, + RST => dcm2_reset, + -- outputs + CLK0 => clk66_dcm2_tmp, + CLK180 => open, + CLK270 => open, + CLK2X => open, + CLK2X180 => open, + CLK90 => open, + CLKDV => open, + CLKFX => clk132_tmp, + CLKFX180 => open, + LOCKED => locked_dcm2, + PSDONE => open, + STATUS => open + + ); + + Inst_dcm3_clk_ps: DCM + generic map ( + CLKDV_DIVIDE => 2.0, + CLKFX_DIVIDE => 1, + CLKFX_MULTIPLY => 2, + CLKIN_DIVIDE_BY_2 => false, + CLKIN_PERIOD => 30.0, -- in nanoseconds + CLKOUT_PHASE_SHIFT => "VARIABLE", -- turn on phase shifting + CLK_FEEDBACK => "1X", + DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS", + DFS_FREQUENCY_MODE => "LOW", + DLL_FREQUENCY_MODE => "LOW", + DSS_MODE => "NONE", + DUTY_CYCLE_CORRECTION => true, + PHASE_SHIFT => 0, + STARTUP_WAIT => true + ) + port map ( + -- inputs + CLKFB => clk_ps, + CLKIN => clk33_i, + DSSEN => GND, + PSCLK => P_I_CLK33, + PSEN => ps_enable, + PSINCDEC => ps_incdec, + RST => GND, + -- outputs + CLK0 => clk_ps_tmp, + CLK180 => open, + CLK270 => open, + CLK2X => open, + CLK2X180 => open, + CLK90 => open, + CLKDV => open, + CLKFX => open, + CLKFX180 => open, + LOCKED => locked_dcm3, + PSDONE => ps_done, + STATUS => open + + ); + + -- DCM2 is reset while DCM1 is not locked, because DCM1 feeds DCM2. + -- A shift register guarantees a decent (i.e. long) reset pulse. + proc_delayed_reset: process (P_I_CLK33) + begin + if rising_edge(P_I_CLK33) then + if (locked_dcm1 = '0') then + dcm2_reset_delay_n <= (others => '0'); + dcm2_reset_n <= '0'; + else + dcm2_reset_delay_n <= dcm2_reset_delay_n(dcm2_reset_delay_n'high-1 downto 0) & '1'; + dcm2_reset_n <= dcm2_reset_delay_n(dcm2_reset_delay_n'high); + dcm2_reset <= not dcm2_reset_n; + end if; + end if; + end process; + + proc_phase_shift: process (P_I_CLK33) + begin + if (locked_dcm1 = '0') then + ps_state <= idle; + ps_enable <= '0'; + ps_shadow <= (others => '0'); + elsif rising_edge(P_I_CLK33) then + case (ps_state) is + when idle => + if (TO_SIGNED(CONV_INTEGER(I_PS_VALUE), 8) > TO_SIGNED(CONV_INTEGER(ps_shadow), 8)) then + ps_enable <= '1'; + ps_incdec <= '1'; + ps_state <= incdec; + ps_shadow <= ps_shadow + 1; + elsif (TO_SIGNED(CONV_INTEGER(I_PS_VALUE), 8) < TO_SIGNED(CONV_INTEGER(ps_shadow), 8)) then + ps_enable <= '1'; + ps_incdec <= '0'; + ps_state <= incdec; + ps_shadow <= ps_shadow - 1; + end if; + when incdec => + ps_enable <= '0'; + if (ps_done = '1') then + ps_state <= idle; + end if; + end case; + end if; + end process; + + -- Debug outputs + O_DEBUG1 <= clk66_dcm1; + O_DEBUG2 <= clk132; + + -- DCM outputs + O_CLK33 <= clk33; + O_CLK66 <= clk66_dcm1; + O_CLK132 <= clk132; + O_CLK264 <= '0'; + O_CLK_PS <= clk_ps; + O_LOCKED <= locked_dcm1 and locked_dcm3; +end arch; diff --git a/firmware/src/usr_lib.vhd b/firmware/src/usr_lib.vhd new file mode 100644 index 0000000..06a3639 --- /dev/null +++ b/firmware/src/usr_lib.vhd @@ -0,0 +1,172 @@ +--################################################################## +-- Author : Boris Keil, Stefan Ritt +-- Contents : User FPGA library with various components +-- $Id: usr_lib.vhd 6908 2007-03-06 07:15:16Z ritt $ +--################################################################## + +-------------------------------------------------------------------- +------------------------ USR_LIB_VEC_IOFD_CPE_NALL ----------------- +-------------------------------------------------------------------- + +-- FFs with CE & asynchr. clear (precedence, act. high), preset +-- (active high) and threestate (act. high) + +library ieee; +use ieee.std_logic_1164.ALL; +--use ieee.std_logic_arith.all; +use ieee.std_logic_unsigned.all; +use ieee.numeric_std.ALL; +-- synopsys translate_off +library UNISIM; +use UNISIM.Vcomponents.ALL; +-- synopsys translate_on + +entity USR_LIB_VEC_IOFD_CPE_NALL is + generic ( + width : integer := 1; + init_val_to_pad : string := "0"; + init_val_from_pad : string := "0" + ); + port ( + O_C : in std_logic_vector (width-1 downto 0); + O_CE : in std_logic_vector (width-1 downto 0); + O_CLR : in std_logic_vector (width-1 downto 0); + O_PRE : in std_logic_vector (width-1 downto 0); + O : out std_logic_vector (width-1 downto 0); + + I_C : in std_logic_vector (width-1 downto 0); + I_CE : in std_logic_vector (width-1 downto 0); + I_CLR : in std_logic_vector (width-1 downto 0); + I_PRE : in std_logic_vector (width-1 downto 0); + I : in std_logic_vector (width-1 downto 0); + + IO : inout std_logic_vector (width-1 downto 0); + T : in std_logic_vector (width-1 downto 0) + ); +end USR_LIB_VEC_IOFD_CPE_NALL; + +architecture arch of USR_LIB_VEC_IOFD_CPE_NALL is + attribute BOX_TYPE : STRING ; + attribute INIT : STRING ; + attribute IOB : STRING ; + + component IOBUF + port( + O : out std_logic; + IO : inout std_logic; + I : in std_logic; + T : in std_logic + ); + end component; + attribute BOX_TYPE of IOBUF : component is "PRIMITIVE"; + + component FDCPE -- FF with CE & asynchronous clear (precedence) and preset + generic( + INIT : bit := '0' + ); + port( + Q : out std_logic; + C : in std_logic; + CE : in std_logic; + D : in std_logic; + CLR : in std_logic; + PRE : in std_logic + ); + end component; + attribute BOX_TYPE of FDCPE : component is "PRIMITIVE"; + + signal data_to_pad: std_logic_vector (width-1 downto 0); + signal data_from_pad: std_logic_vector (width-1 downto 0); +begin + gen : for count in 0 to width-1 generate + attribute INIT of FF1 : label is init_val_to_pad; + attribute IOB of FF1 : label is "true"; + attribute INIT of FF2 : label is init_val_from_pad; + attribute IOB of FF2 : label is "true"; + begin + U1 : IOBUF + port map ( + I => data_to_pad(count), + O => data_from_pad(count), + IO => IO(count), + T => T(count) + ); + FF1 : FDCPE + port map ( + C => I_C(count), + CE => I_CE(count), + D => I(count), + CLR => I_CLR(count), + PRE => I_PRE(count), + Q => data_to_pad(count) + ); + FF2 : FDCPE + port map ( + C => O_C(count), + CE => O_CE(count), + D => data_from_pad(count), + CLR => O_CLR(count), + PRE => O_PRE(count), + Q => O(count) + ); + end generate; +end arch; + +-------------------------------------------------------------------- +------------------------ USR_LIB_VEC_FDC --------------------------- +-------------------------------------------------------------------- + +-- Input FFs with asynchr. clear (precedence, act. high) + +library ieee; +use ieee.std_logic_1164.ALL; +--use ieee.std_logic_arith.all; +use ieee.std_logic_unsigned.all; +use ieee.numeric_std.ALL; +-- synopsys translate_off +library UNISIM; +use UNISIM.Vcomponents.ALL; +-- synopsys translate_on + +entity USR_LIB_VEC_FDC is + generic ( + width : integer := 1 + ); + port ( + I_CLK : in std_logic_vector (width-1 downto 0); + I_CLR : in std_logic_vector (width-1 downto 0); + I : in std_logic_vector (width-1 downto 0); + O : out std_logic_vector (width-1 downto 0) + ); +end USR_LIB_VEC_FDC; + +architecture arch of USR_LIB_VEC_FDC is + attribute IOB : STRING ; + attribute BOX_TYPE : STRING ; + + component FDC -- FF with asynchronous clear (precedence) + generic( + INIT : bit := '0' + ); + port( + C : in std_logic; + CLR : in std_logic; + D : in std_logic; + Q : out std_logic + ); + end component; + attribute BOX_TYPE of FDC : component is "PRIMITIVE"; + +begin + gen : for count in 0 to width-1 generate + attribute IOB of FF : label is "true"; + begin + FF : FDC + port map ( + C => I_CLK(count), + CLR => I_CLR(count), + D => I(count), + Q => O(count) + ); + end generate; +end arch; diff --git a/firmware/ucf/drs4_eval5.ucf b/firmware/ucf/drs4_eval5.ucf new file mode 100644 index 0000000..5236976 --- /dev/null +++ b/firmware/ucf/drs4_eval5.ucf @@ -0,0 +1,183 @@ +############################################################### +## Author : Stefan Ritt +## Contents : DRS4_EVAL4 FPGA constraint file +## $Id: drs4_eval5.ucf 21696 2015-05-13 13:15:31Z ritt $ +############################################################### + +CONFIG PART = XC3S400-4TQ144 ; + +############################################################### +# Timing constraints +############################################################### + +# Timing group definitions +# ------------------------ +NET "P_I_CLK33" TNM_NET = "P_I_CLK33"; +NET "P_I_*" TNM = PADS:P_I_PADS_ALL; +NET "P_I_CLK33" TNM = PADS:P_I_CLK33_PAD; +NET "P_O_*" TNM = PADS:P_O_PADS; +NET "P_IO_*" TNM = PADS:P_IO_PADS; + +NET "P_O_LED*" TNM = PADS:P_O_LED_PADS; + +NET "P_I_J*" TNM = PADS:P_I_EXT_PADS; +NET "P_I_ATRG*" TNM = PADS:P_I_EXT_PADS; +NET "P_O_CAL" TNM = PADS:P_I_EXT_PADS; +NET "P_O_TCA_CTRL" TNM = PADS:P_I_EXT_PADS; + +NET "P_IO_PMC_USR(28)" TNM = PADS:P_IO_PMC_USR28_PADS; + +TIMEGRP "P_I_PADS" = "P_I_PADS_ALL" EXCEPT "P_I_CLK33_PAD"; + +# IFCLK is not connected to dedicated clock input +# Following statement suppresses the error abort +NET "P_I_CLK33" CLOCK_DEDICATED_ROUTE = FALSE; + +# Same for external trigger input +NET "P_IO_ETRG_IN" CLOCK_DEDICATED_ROUTE = FALSE; + +# Fix Hold-Time-Violations +# ------------------------ +NET "P_I_*" IOBDELAY = IFD; +NET "P_IO_*" IOBDELAY = IFD; + +# Period constraint for 30 MHz main board clock oscillator +# -------------------------------------------------------- +# 33 ns needed, 32 ns used -> 1 ns safety margin +TIMESPEC "TS_P_I_CLK33" = PERIOD "P_I_CLK33" 32 ns HIGH 50 % INPUT_JITTER 100 ps; + +# Input pad setup/hold time constraints +# ------------------------------------- +TIMEGRP "P_I_PADS" OFFSET = IN 20 ns BEFORE "P_I_CLK33"; +TIMEGRP "P_IO_PADS" OFFSET = IN 20 ns BEFORE "P_I_CLK33"; + +# Output pad clock to output timing constraints +# --------------------------------------------- +TIMEGRP "P_O_PADS" OFFSET = OUT 22 ns AFTER "P_I_CLK33"; +TIMEGRP "P_IO_PADS" OFFSET = OUT 22 ns AFTER "P_I_CLK33"; + +# remove noncritical contraints +# ------------------------------- +TIMESPEC "TS_TIG_I_MMCX" = FROM "P_I_EXT_PADS" TO "FFS" TIG; +TIMESPEC "TS_TIG_O_LED" = FROM "FFS" TO "P_O_LED_PADS" TIG; +TIMESPEC "TS_TIG_O_EXT" = FROM "FFS" TO "P_O_EXT_PADS" TIG; +TIMESPEC "TS_TIG_O_ADCCLK" = FROM "FFS" TO "P_IO_PMC_USR28_PADS" TIG; + +############################################################### +# IOSTANDARD & pin drive speed constraints +############################################################### + +NET "P_IO_*" IOSTANDARD = LVCMOS33; +NET "P_I_*" IOSTANDARD = LVCMOS33; +NET "P_O_*" IOSTANDARD = LVCMOS33; + +############################################################### +# Pin location constraints +############################################################### + +# 42 out of 64 PMC IOs +# -------------------- + +NET "P_I_CLK33" LOC = "P40"; # IFCLK input +NET "P_I_CLK66" LOC = "P56"; # calibration quarz input + +NET "P_O_CAL" LOC = "P97" | IOSTANDARD = LVCMOS25; +NET "P_O_TCA_CTRL" LOC = "P53"; # timing calibration control + +NET "P_IO_J42" LOC = "P141"; # J42 +NET "P_IO_J43" LOC = "P140"; # J43 +NET "P_IO_T19" LOC = "P108" | IOSTANDARD = LVCMOS25 | SLEW = FAST ; # T19 +NET "P_IO_T20" LOC = "P103" | IOSTANDARD = LVCMOS25 | SLEW = FAST ; # T20 + +NET "P_I_J44" LOC = "P69"; + +NET "P_I_ATRG1" LOC = "P70"; # analog trigger CH1 +NET "P_I_ATRG1" CLOCK_DEDICATED_ROUTE = FALSE; +NET "P_I_ATRG2" LOC = "P68"; # analog trigger CH2 +NET "P_I_ATRG2" CLOCK_DEDICATED_ROUTE = FALSE; +NET "P_I_ATRG3" LOC = "P60"; # analog trigger CH3 +NET "P_I_ATRG3" CLOCK_DEDICATED_ROUTE = FALSE; +NET "P_I_ATRG4" LOC = "P59"; # analog trigger CH4 +NET "P_I_ATRG4" CLOCK_DEDICATED_ROUTE = FALSE; + +NET "P_IO_ETRG_IN" LOC = "P107" | IOSTANDARD = LVCMOS25 | SLEW = FAST ; # external trigger in +NET "P_O_ETRG_IND" LOC = "P105" | IOSTANDARD = LVCMOS25; # external trigger in direciton + +NET "P_IO_ETRG_OUT" LOC = "P104" | IOSTANDARD = LVCMOS25 | SLEW = FAST ; # external trigger out +NET "P_O_ETRG_OUTD" LOC = "P102" | IOSTANDARD = LVCMOS25; # external trigger out direction + +NET "P_IO_ECLK_IN" LOC = "P100" | IOSTANDARD = LVCMOS25 | SLEW = FAST ; # external clock input +NET "P_IO_ECLK_IN" CLOCK_DEDICATED_ROUTE = FALSE; +NET "P_O_ECLK_IND" LOC = "P99" | IOSTANDARD = LVCMOS25; # external clock input direction + +NET "P_IO_ECLK_OUT" LOC = "P98" | IOSTANDARD = LVCMOS25 | SLEW = FAST ; # external clock output +NET "P_O_ECLK_OUTD" LOC = "P93" | IOSTANDARD = LVCMOS25; # external clock output direction + +NET "P_O_LED_GREEN" LOC = "P132"; +NET "P_O_LED_YELLOW" LOC = "P137"; + +NET "P_IO_UC_SLOE" LOC = "P17"; +NET "P_IO_UC_SLRD" LOC = "P35"; +NET "P_IO_UC_SLWR" LOC = "P36"; +NET "P_IO_UC_SLCS" LOC = "P11"; +NET "P_IO_UC_PKTEND" LOC = "P12"; +NET "P_IO_UC_FIFOADR0" LOC = "P14"; +NET "P_IO_UC_FIFOADR1" LOC = "P13"; +NET "P_IO_UC_FLAGA" LOC = "P24"; +NET "P_IO_UC_FLAGB" LOC = "P23"; +NET "P_IO_UC_FLAGC" LOC = "P21"; +NET "P_I_UC_PA0" LOC = "P20"; + +NET "P_IO_UC_FD(0)" LOC = "P30"; +NET "P_IO_UC_FD(1)" LOC = "P31"; +NET "P_IO_UC_FD(2)" LOC = "P32"; +NET "P_IO_UC_FD(3)" LOC = "P33"; +NET "P_IO_UC_FD(4)" LOC = "P28"; +NET "P_IO_UC_FD(5)" LOC = "P27"; +NET "P_IO_UC_FD(6)" LOC = "P26"; +NET "P_IO_UC_FD(7)" LOC = "P25"; +NET "P_IO_UC_FD(8)" LOC = "P10"; +NET "P_IO_UC_FD(9)" LOC = "P8"; +NET "P_IO_UC_FD(10)" LOC = "P7"; +NET "P_IO_UC_FD(11)" LOC = "P6"; +NET "P_IO_UC_FD(12)" LOC = "P5"; +NET "P_IO_UC_FD(13)" LOC = "P1"; +NET "P_IO_UC_FD(14)" LOC = "P2"; +NET "P_IO_UC_FD(15)" LOC = "P4"; + +NET "P_IO_PMC_USR(0)" LOC = "P131"; +NET "P_IO_PMC_USR(2)" LOC = "P130"; +NET "P_IO_PMC_USR(4)" LOC = "P129"; +NET "P_IO_PMC_USR(6)" LOC = "P128"; +NET "P_IO_PMC_USR(8)" LOC = "P127"; +NET "P_IO_PMC_USR(10)" LOC = "P125"; +NET "P_IO_PMC_USR(12)" LOC = "P124"; +NET "P_IO_PMC_USR(14)" LOC = "P123"; +NET "P_IO_PMC_USR(16)" LOC = "P122"; +NET "P_IO_PMC_USR(18)" LOC = "P119"; +NET "P_IO_PMC_USR(20)" LOC = "P118"; +NET "P_IO_PMC_USR(22)" LOC = "P116"; +NET "P_IO_PMC_USR(24)" LOC = "P113"; +NET "P_IO_PMC_USR(26)" LOC = "P112"; +NET "P_IO_PMC_USR(28)" LOC = "P135"; +NET "P_IO_PMC_USR(29)" LOC = "P50"; +NET "P_IO_PMC_USR(30)" LOC = "P80" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(31)" LOC = "P51"; +NET "P_IO_PMC_USR(33)" LOC = "P52"; +NET "P_IO_PMC_USR(35)" LOC = "P44"; +NET "P_IO_PMC_USR(37)" LOC = "P46"; +NET "P_IO_PMC_USR(39)" LOC = "P47"; +NET "P_IO_PMC_USR(40)" LOC = "P74" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(41)" LOC = "P92" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(42)" LOC = "P76" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(48)" LOC = "P89" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(50)" LOC = "P87" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(51)" LOC = "P90" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(52)" LOC = "P86" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(53)" LOC = "P79" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(54)" LOC = "P78" | IOSTANDARD = LVDS_25; +NET "P_IO_PMC_USR(55)" LOC = "P77" | IOSTANDARD = LVDS_25; +NET "P_IO_PMC_USR(56)" LOC = "P85" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(58)" LOC = "P84" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(60)" LOC = "P83" | IOSTANDARD = LVCMOS25; +NET "P_IO_PMC_USR(62)" LOC = "P82" | IOSTANDARD = LVCMOS25; diff --git a/software/drscl/Makefile b/software/drscl/Makefile new file mode 100755 index 0000000..7c51764 --- /dev/null +++ b/software/drscl/Makefile @@ -0,0 +1,61 @@ +######################################################## +# Makefile for drscl executable under linux +# +# S. Ritt, Nov. 2016 +######################################################## + +# determine OS +OSTYPE = $(shell uname) + +FLAGS = -g -O3 -Wall -Wuninitialized -Wno-unused-result -DOS_LINUX +FLAGS += -I../include -I/usr/local/include +LIBS = -lpthread -lutil -lusb-1.0 + +OBJECTS = DRS.o averager.o musbstd.o mxml.o strlcpy.o +EXECS = drscl drs_exam drs_exam_multi + +ifeq ($(OSTYPE),Darwin) +FLAGS += -DHAVE_USB -DHAVE_LIBUSB10 +LIBS += -framework IOKit -framework CoreFoundation -lobjc +else +FLAGS += -DHAVE_USB -DHAVE_LIBUSB10 +endif + +all: $(EXECS) + +drscl: $(OBJECTS) drscl.o + $(CXX) $(FLAGS) $(OBJECTS) drscl.o -o drscl $(LIBS) + +drs_exam: $(OBJECTS) drs_exam.o + $(CXX) $(FLAGS) $(OBJECTS) drs_exam.o -o drs_exam $(LIBS) + +drs_exam_multi: $(OBJECTS) drs_exam_multi.o + $(CXX) $(FLAGS) $(OBJECTS) drs_exam_multi.o -o drs_exam_multi $(LIBS) + +drscl.o: drscl.cpp ../include/DRS.h + $(CC) $(FLAGS) -c $< + +drs_exam.o: drs_exam.cpp ../include/DRS.h + $(CC) $(FLAGS) -c $< + +drs_exam_multi.o: drs_exam_multi.cpp ../include/DRS.h + $(CC) $(FLAGS) -c $< + +musbstd.o: ../src//musbstd.c ../include/musbstd.h + $(CC) $(FLAGS) -c $< + +DRS.o: ../src/DRS.cpp ../include/DRS.h + $(CXX) $(FLAGS) -c $< + +mxml.o: ../src/mxml.c ../include/mxml.h + $(CC) $(FLAGS) -c $< + +strlcpy.o: ../src/strlcpy.c ../include/strlcpy.h + $(CC) $(FLAGS) -c $< + +averager.o: ../src/averager.cpp ../include/averager.h + $(CC) $(FLAGS) -c $< + +clean: + rm -f *.o $(EXECS) + diff --git a/software/drscl/drs_exam.cpp b/software/drscl/drs_exam.cpp new file mode 100644 index 0000000..c3a1a64 --- /dev/null +++ b/software/drscl/drs_exam.cpp @@ -0,0 +1,166 @@ +/********************************************************************\ + + Name: drs_exam.cpp + Created by: Stefan Ritt + + Contents: Simple example application to read out a DRS4 + evaluation board + + $Id: drs_exam.cpp 21308 2014-04-11 14:50:16Z ritt $ + +\********************************************************************/ + +#include + +#ifdef _MSC_VER + +#include + +#elif defined(OS_LINUX) + +#define O_BINARY 0 + +#include +#include +#include +#include + +#define DIR_SEPARATOR '/' + +#endif + +#include +#include +#include + +#include "strlcpy.h" +#include "DRS.h" + +/*------------------------------------------------------------------*/ + +int main() +{ + int i, j, nBoards; + DRS *drs; + DRSBoard *b; + float time_array[8][1024]; + float wave_array[8][1024]; + FILE *f; + + /* do initial scan */ + drs = new DRS(); + + /* show any found board(s) */ + for (i=0 ; iGetNumberOfBoards() ; i++) { + b = drs->GetBoard(i); + printf("Found DRS4 evaluation board, serial #%d, firmware revision %d\n", + b->GetBoardSerialNumber(), b->GetFirmwareVersion()); + } + + /* exit if no board found */ + nBoards = drs->GetNumberOfBoards(); + if (nBoards == 0) { + printf("No DRS4 evaluation board found\n"); + return 0; + } + + /* continue working with first board only */ + b = drs->GetBoard(0); + + /* initialize board */ + b->Init(); + + /* set sampling frequency */ + b->SetFrequency(5, true); + + /* enable transparent mode needed for analog trigger */ + b->SetTranspMode(1); + + /* set input range to -0.5V ... +0.5V */ + b->SetInputRange(0); + + /* use following line to set range to 0..1V */ + //b->SetInputRange(0.5); + + /* use following line to turn on the internal 100 MHz clock connected to all channels */ + b->EnableTcal(1); + + /* use following lines to enable hardware trigger on CH1 at 50 mV positive edge */ + if (b->GetBoardType() >= 8) { // Evaluaiton Board V4&5 + b->EnableTrigger(1, 0); // enable hardware trigger + b->SetTriggerSource(1<<0); // set CH1 as source + } else if (b->GetBoardType() == 7) { // Evaluation Board V3 + b->EnableTrigger(0, 1); // lemo off, analog trigger on + b->SetTriggerSource(0); // use CH1 as source + } + b->SetTriggerLevel(0.05); // 0.05 V + b->SetTriggerPolarity(false); // positive edge + + /* use following lines to set individual trigger elvels */ + //b->SetIndividualTriggerLevel(1, 0.1); + //b->SetIndividualTriggerLevel(2, 0.2); + //b->SetIndividualTriggerLevel(3, 0.3); + //b->SetIndividualTriggerLevel(4, 0.4); + //b->SetTriggerSource(15); + + b->SetTriggerDelayNs(0); // zero ns trigger delay + + /* use following lines to enable the external trigger */ + //if (b->GetBoardType() == 8) { // Evaluaiton Board V4 + // b->EnableTrigger(1, 0); // enable hardware trigger + // b->SetTriggerSource(1<<4); // set external trigger as source + //} else { // Evaluation Board V3 + // b->EnableTrigger(1, 0); // lemo on, analog trigger off + // } + + /* open file to save waveforms */ + f = fopen("data.txt", "w"); + if (f == NULL) { + perror("ERROR: Cannot open file \"data.txt\""); + return 1; + } + + /* repeat ten times */ + for (j=0 ; j<10 ; j++) { + + /* start board (activate domino wave) */ + b->StartDomino(); + + /* wait for trigger */ + printf("Waiting for trigger..."); + + fflush(stdout); + while (b->IsBusy()); + + /* read all waveforms */ + b->TransferWaves(0, 8); + + /* read time (X) array of first channel in ns */ + b->GetTime(0, 0, b->GetTriggerCell(0), time_array[0]); + + /* decode waveform (Y) array of first channel in mV */ + b->GetWave(0, 0, wave_array[0]); + + /* read time (X) array of second channel in ns + Note: On the evaluation board input #1 is connected to channel 0 and 1 of + the DRS chip, input #2 is connected to channel 2 and 3 and so on. So to + get the input #2 we have to read DRS channel #2, not #1. */ + b->GetTime(0, 2, b->GetTriggerCell(0), time_array[1]); + + /* decode waveform (Y) array of second channel in mV */ + b->GetWave(0, 2, wave_array[1]); + + /* Save waveform: X=time_array[i], Yn=wave_array[n][i] */ + fprintf(f, "Event #%d ----------------------\n t1[ns] u1[mV] t2[ns] u2[mV]\n", j); + for (i=0 ; i<1024 ; i++) + fprintf(f, "%7.3f %7.1f %7.3f %7.1f\n", time_array[0][i], wave_array[0][i], time_array[1][i], wave_array[1][i]); + + /* print some progress indication */ + printf("\rEvent #%d read successfully\n", j); + } + + fclose(f); + + /* delete DRS object -> close USB connection */ + delete drs; +} diff --git a/software/drscl/drs_exam.sln b/software/drscl/drs_exam.sln new file mode 100644 index 0000000..5b7d30f --- /dev/null +++ b/software/drscl/drs_exam.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "drs_exam", "drs_exam.vcxproj", "{0A260864-8525-423F-984D-34C5BE6EDE0A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0A260864-8525-423F-984D-34C5BE6EDE0A}.Debug|Win32.ActiveCfg = Debug|Win32 + {0A260864-8525-423F-984D-34C5BE6EDE0A}.Debug|Win32.Build.0 = Debug|Win32 + {0A260864-8525-423F-984D-34C5BE6EDE0A}.Release|Win32.ActiveCfg = Release|Win32 + {0A260864-8525-423F-984D-34C5BE6EDE0A}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/software/drscl/drs_exam.vcproj b/software/drscl/drs_exam.vcproj new file mode 100644 index 0000000..f4d394c --- /dev/null +++ b/software/drscl/drs_exam.vcproj @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/software/drscl/drs_exam.vcxproj b/software/drscl/drs_exam.vcxproj new file mode 100644 index 0000000..f0c60cb --- /dev/null +++ b/software/drscl/drs_exam.vcxproj @@ -0,0 +1,145 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {0A260864-8525-423F-984D-34C5BE6EDE0A} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + .\Release/drs_exam.tlb + + + + + MaxSpeed + OnlyExplicitInline + C:\meg\online\drivers\drs;c:\midas\include;c:\mxml;c:\midas\drivers\vme\sis3100\windows\;c:\meg\online\drivers\ace\;c:\meg\online\drivers\drs\libusb\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;HAVE_USB;HAVE_LIBUSB;CF_VIA_USBx;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + .\Release/drs_exam.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0807 + + + .\Release/drs_exam.exe + true + .\Release/drs_exam.pdb + Console + false + + + MachineX86 + + + + + .\Debug/drs_exam.tlb + + + + + Disabled + C:\meg\online\drivers\drs;c:\midas\include;c:\mxml;c:\midas\drivers\vme\sis3100\windows\;c:\meg\online\drivers\ace\;c:\meg\online\drivers\drs\libusb\include;c:\midas\mscb\;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;HAVE_USB;HAVE_LIBUSB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + .\Debug/drs_exam.pch + .\Debug/ + .\Debug/ + .\Debug/ + true + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0807 + + + wsock32.lib;winmm.lib;%(AdditionalDependencies) + .\Debug/drs_exam.exe + true + true + .\Debug/drs_ecam.pdb + Console + false + + + MachineX86 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/software/drscl/drs_exam.vcxproj.filters b/software/drscl/drs_exam.vcxproj.filters new file mode 100644 index 0000000..15a25ec --- /dev/null +++ b/software/drscl/drs_exam.vcxproj.filters @@ -0,0 +1,53 @@ + + + + + {cba60e1f-b52a-4c57-b908-5ef691f51a23} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {50c8e0da-ffd8-40e8-80c9-0c3ba2cf6607} + h;hpp;hxx;hm;inl + + + {661290e6-d43c-45a6-bb95-c99296a89d32} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/software/drscl/drs_exam.xcodeproj/project.pbxproj b/software/drscl/drs_exam.xcodeproj/project.pbxproj new file mode 100644 index 0000000..00c4377 --- /dev/null +++ b/software/drscl/drs_exam.xcodeproj/project.pbxproj @@ -0,0 +1,301 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D563FEB61863514900F76DF2 /* averager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D563FEB51863514900F76DF2 /* averager.cpp */; }; + D5F6AF8814274CF7003299EE /* DRS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8714274CF7003299EE /* DRS.cpp */; }; + D5F6AF8A14274D0F003299EE /* drs_exam.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8914274D0F003299EE /* drs_exam.cpp */; }; + D5F6AF8D14274D1F003299EE /* mxml.c in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8B14274D1F003299EE /* mxml.c */; }; + D5F6AF8E14274D1F003299EE /* strlcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8C14274D1F003299EE /* strlcpy.c */; }; + D5F6AF9014274D2E003299EE /* musbstd.c in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8F14274D2E003299EE /* musbstd.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + D5446429141E1BB40027AF52 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + D544642B141E1BB40027AF52 /* drs_exam */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = drs_exam; sourceTree = BUILT_PRODUCTS_DIR; }; + D563FEB51863514900F76DF2 /* averager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = averager.cpp; path = ../averager.cpp; sourceTree = ""; }; + D563FEB71863515400F76DF2 /* averager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = averager.h; path = ../averager.h; sourceTree = ""; }; + D5F6AF8514274CE2003299EE /* DRS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DRS.h; path = ../DRS.h; sourceTree = ""; }; + D5F6AF8714274CF7003299EE /* DRS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DRS.cpp; path = ../DRS.cpp; sourceTree = ""; }; + D5F6AF8914274D0F003299EE /* drs_exam.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = drs_exam.cpp; sourceTree = ""; }; + D5F6AF8B14274D1F003299EE /* mxml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mxml.c; path = ../../../../../mxml/mxml.c; sourceTree = ""; }; + D5F6AF8C14274D1F003299EE /* strlcpy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = strlcpy.c; path = ../../../../../mxml/strlcpy.c; sourceTree = ""; }; + D5F6AF8F14274D2E003299EE /* musbstd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = musbstd.c; path = ../../../../../midas/drivers/usb/musbstd.c; sourceTree = ""; }; + D5F6AF9114274D4C003299EE /* mxml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mxml.h; path = ../../../../../mxml/mxml.h; sourceTree = ""; }; + D5F6AF9214274D4C003299EE /* strlcpy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = strlcpy.h; path = ../../../../../mxml/strlcpy.h; sourceTree = ""; }; + D5F6AF9314274D61003299EE /* musbstd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = musbstd.h; path = ../../../../../midas/include/musbstd.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D5446428141E1BB40027AF52 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D5446420141E1BB40027AF52 = { + isa = PBXGroup; + children = ( + D5F6AF8414274CCC003299EE /* Header Files */, + D5F6AF8614274CE8003299EE /* Source Files */, + D544642C141E1BB40027AF52 /* Products */, + ); + sourceTree = ""; + }; + D544642C141E1BB40027AF52 /* Products */ = { + isa = PBXGroup; + children = ( + D544642B141E1BB40027AF52 /* drs_exam */, + ); + name = Products; + sourceTree = ""; + }; + D5F6AF8414274CCC003299EE /* Header Files */ = { + isa = PBXGroup; + children = ( + D563FEB71863515400F76DF2 /* averager.h */, + D5F6AF9314274D61003299EE /* musbstd.h */, + D5F6AF9114274D4C003299EE /* mxml.h */, + D5F6AF9214274D4C003299EE /* strlcpy.h */, + D5F6AF8514274CE2003299EE /* DRS.h */, + ); + name = "Header Files"; + sourceTree = ""; + }; + D5F6AF8614274CE8003299EE /* Source Files */ = { + isa = PBXGroup; + children = ( + D563FEB51863514900F76DF2 /* averager.cpp */, + D5F6AF8F14274D2E003299EE /* musbstd.c */, + D5F6AF8B14274D1F003299EE /* mxml.c */, + D5F6AF8C14274D1F003299EE /* strlcpy.c */, + D5F6AF8914274D0F003299EE /* drs_exam.cpp */, + D5F6AF8714274CF7003299EE /* DRS.cpp */, + ); + name = "Source Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D544642A141E1BB40027AF52 /* drs_exam */ = { + isa = PBXNativeTarget; + buildConfigurationList = D5446435141E1BB40027AF52 /* Build configuration list for PBXNativeTarget "drs_exam" */; + buildPhases = ( + D5446427141E1BB40027AF52 /* Sources */, + D5446428141E1BB40027AF52 /* Frameworks */, + D5446429141E1BB40027AF52 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = drs_exam; + productName = drs_exam; + productReference = D544642B141E1BB40027AF52 /* drs_exam */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D5446422141E1BB40027AF52 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0500; + ORGANIZATIONNAME = PSI; + }; + buildConfigurationList = D5446425141E1BB40027AF52 /* Build configuration list for PBXProject "drs_exam" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D5446420141E1BB40027AF52; + productRefGroup = D544642C141E1BB40027AF52 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D544642A141E1BB40027AF52 /* drs_exam */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + D5446427141E1BB40027AF52 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D5F6AF8814274CF7003299EE /* DRS.cpp in Sources */, + D5F6AF8A14274D0F003299EE /* drs_exam.cpp in Sources */, + D563FEB61863514900F76DF2 /* averager.cpp in Sources */, + D5F6AF8D14274D1F003299EE /* mxml.c in Sources */, + D5F6AF8E14274D1F003299EE /* strlcpy.c in Sources */, + D5F6AF9014274D2E003299EE /* musbstd.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D5446433141E1BB40027AF52 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + D5446434141E1BB40027AF52 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx; + }; + name = Release; + }; + D5446436141E1BB40027AF52 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + OS_LINUX, + HAVE_USB, + HAVE_LIBUSB10, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + HEADER_SEARCH_PATHS = ( + /mxml, + /midas/include, + ../, + /usr/local/include, + "/usr/local/include/libusb-1.0", + ); + OTHER_LDFLAGS = ( + "-L/usr/local/lib", + "-lusb-1.0", + "-framework", + IOKit, + "-framework", + Carbon, + ); + PRELINK_LIBS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + D5446437141E1BB40027AF52 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + HEADER_SEARCH_PATHS = ( + /mxml, + /midas/include, + ../, + /usr/local/include, + "/usr/local/include/libusb-1.0", + ); + OTHER_LDFLAGS = ( + "-L/usr/local/lib", + "-lusb-1.0", + "-framework", + IOKit, + "-framework", + Carbon, + ); + PRELINK_LIBS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D5446425141E1BB40027AF52 /* Build configuration list for PBXProject "drs_exam" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D5446433141E1BB40027AF52 /* Debug */, + D5446434141E1BB40027AF52 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D5446435141E1BB40027AF52 /* Build configuration list for PBXNativeTarget "drs_exam" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D5446436141E1BB40027AF52 /* Debug */, + D5446437141E1BB40027AF52 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D5446422141E1BB40027AF52 /* Project object */; +} diff --git a/software/drscl/drs_exam_multi.cpp b/software/drscl/drs_exam_multi.cpp new file mode 100644 index 0000000..554ddc8 --- /dev/null +++ b/software/drscl/drs_exam_multi.cpp @@ -0,0 +1,178 @@ +/********************************************************************\ + + Name: drs_exam_multi.cpp + Created by: Stefan Ritt + + Contents: Simple example application to read out a several + DRS4 evaluation board in daisy-chain mode + + $Id: drs_exam_multi.cpp 21509 2014-10-15 10:11:36Z ritt $ + +\********************************************************************/ + +#include + +#ifdef _MSC_VER + +#include + +#elif defined(OS_LINUX) + +#define O_BINARY 0 + +#include +#include +#include +#include + +#define DIR_SEPARATOR '/' + +#endif + +#include +#include +#include + +#include "strlcpy.h" +#include "DRS.h" + +/*------------------------------------------------------------------*/ + +int main() +{ + int i, j, k; + DRS *drs; + DRSBoard *b, *mb; + float time_array[8][1024]; + float wave_array[8][1024]; + FILE *f; + + /* do initial scan, sort boards accordning to their serial numbers */ + drs = new DRS(); + drs->SortBoards(); + + /* show any found board(s) */ + for (i=0 ; iGetNumberOfBoards() ; i++) { + b = drs->GetBoard(i); + printf("Found DRS4 evaluation board, serial #%d, firmware revision %d\n", + b->GetBoardSerialNumber(), b->GetFirmwareVersion()); + if (b->GetBoardType() < 8) { + printf("Found pre-V4 board, aborting\n"); + return 0; + } + } + + /* exit if no board found */ + if (drs->GetNumberOfBoards() == 0) { + printf("No DRS4 evaluation board found\n"); + return 0; + } + + /* exit if only one board found */ + if (drs->GetNumberOfBoards() == 1) { + printf("Only one DRS4 evaluation board found, please use drs_exam program\n"); + return 0; + } + + /* use first board with highest serial number as the master board */ + mb = drs->GetBoard(0); + + /* common configuration for all boards */ + for (i=0 ; iGetNumberOfBoards() ; i++) { + b = drs->GetBoard(i); + + /* initialize board */ + b->Init(); + + /* select external reference clock for slave modules */ + /* NOTE: this only works if the clock chain is connected */ + if (i > 0) { + if (b->GetFirmwareVersion() >= 21260) { // this only works with recent firmware versions + if (b->GetScaler(5) > 300000) // check if external clock is connected + b->SetRefclk(true); // switch to external reference clock + } + } + + /* set sampling frequency */ + b->SetFrequency(5, true); + + /* set input range to -0.5V ... +0.5V */ + b->SetInputRange(0); + + /* enable hardware trigger */ + b->EnableTrigger(1, 0); + + if (i == 0) { + /* master board: enable hardware trigger on CH1 at 50 mV positive edge */ + b->SetTranspMode(1); + b->SetTriggerSource(1<<0); // set CH1 as source + b->SetTriggerLevel(0.05); // 50 mV + b->SetTriggerPolarity(false); // positive edge + b->SetTriggerDelayNs(0); // zero ns trigger delay + } else { + /* slave boards: enable hardware trigger on Trigger IN */ + b->SetTriggerSource(1<<4); // set Trigger IN as source + b->SetTriggerPolarity(false); // positive edge + } + } + + /* open file to save waveforms */ + f = fopen("data.txt", "w"); + if (f == NULL) { + perror("ERROR: Cannot open file \"data.txt\""); + return 1; + } + + /* repeat ten times */ + for (i=0 ; i<10 ; i++) { + + /* start boards (activate domino wave), master is last */ + for (j=drs->GetNumberOfBoards()-1 ; j>=0 ; j--) + drs->GetBoard(j)->StartDomino(); + + /* wait for trigger on master board */ + printf("Waiting for trigger..."); + fflush(stdout); + while (mb->IsBusy()); + + fprintf(f, "Event #%d =====================================================\n", j); + + for (j=0 ; jGetNumberOfBoards() ; j++) { + b = drs->GetBoard(j); + if (b->IsBusy()) { + i--; /* skip that event, must be some fake trigger */ + break; + } + + /* read all waveforms from all boards */ + b->TransferWaves(0, 8); + + for (k=0 ; k<4 ; k++) { + /* read time (X) array in ns */ + b->GetTime(0, k*2, b->GetTriggerCell(0), time_array[k]); + + /* decode waveform (Y) arrays in mV */ + b->GetWave(0, k*2, wave_array[k]); + } + + /* Save waveform: X=time_array[i], Channel_n=wave_array[n][i] */ + fprintf(f, "Board #%d ---------------------------------------------------\n t1[ns] u1[mV] t2[ns] u2[mV] t3[ns] u3[mV] t4[ns] u4[mV]\n", b->GetBoardSerialNumber()); + for (k=0 ; k<1024 ; k++) + fprintf(f, "%7.3f %7.1f %7.3f %7.1f %7.3f %7.1f %7.3f %7.1f\n", + time_array[0][k], wave_array[0][k], + time_array[1][k], wave_array[1][k], + time_array[2][k], wave_array[2][k], + time_array[3][k], wave_array[3][k]); + } + + /* print some progress indication */ + printf("\rEvent #%d read successfully\n", i); + } + + fclose(f); + + printf("Program finished.\n"); + + /* delete DRS object -> close USB connection */ + delete drs; +} diff --git a/software/drscl/drs_exam_multi.xcodeproj/project.pbxproj b/software/drscl/drs_exam_multi.xcodeproj/project.pbxproj new file mode 100644 index 0000000..4814fbe --- /dev/null +++ b/software/drscl/drs_exam_multi.xcodeproj/project.pbxproj @@ -0,0 +1,305 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D563FEB918643B6100F76DF2 /* averager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D563FEB818643B6100F76DF2 /* averager.cpp */; }; + D5F6AF8814274CF7003299EE /* DRS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8714274CF7003299EE /* DRS.cpp */; }; + D5F6AF8A14274D0F003299EE /* drs_exam_multi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8914274D0F003299EE /* drs_exam_multi.cpp */; }; + D5F6AF8D14274D1F003299EE /* mxml.c in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8B14274D1F003299EE /* mxml.c */; }; + D5F6AF8E14274D1F003299EE /* strlcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8C14274D1F003299EE /* strlcpy.c */; }; + D5F6AF9014274D2E003299EE /* musbstd.c in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8F14274D2E003299EE /* musbstd.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + D5446429141E1BB40027AF52 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + D544642B141E1BB40027AF52 /* drs_exam_multi */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = drs_exam_multi; sourceTree = BUILT_PRODUCTS_DIR; }; + D563FEB818643B6100F76DF2 /* averager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = averager.cpp; path = ../averager.cpp; sourceTree = ""; }; + D563FEBA18643B6B00F76DF2 /* averager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = averager.h; path = ../averager.h; sourceTree = ""; }; + D5F6AF8514274CE2003299EE /* DRS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DRS.h; path = ../DRS.h; sourceTree = ""; }; + D5F6AF8714274CF7003299EE /* DRS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DRS.cpp; path = ../DRS.cpp; sourceTree = ""; }; + D5F6AF8914274D0F003299EE /* drs_exam_multi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = drs_exam_multi.cpp; sourceTree = ""; }; + D5F6AF8B14274D1F003299EE /* mxml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mxml.c; path = ../../../../../mxml/mxml.c; sourceTree = ""; }; + D5F6AF8C14274D1F003299EE /* strlcpy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = strlcpy.c; path = ../../../../../mxml/strlcpy.c; sourceTree = ""; }; + D5F6AF8F14274D2E003299EE /* musbstd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = musbstd.c; path = ../../../../../midas/drivers/usb/musbstd.c; sourceTree = ""; }; + D5F6AF9114274D4C003299EE /* mxml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mxml.h; path = ../../../../../mxml/mxml.h; sourceTree = ""; }; + D5F6AF9214274D4C003299EE /* strlcpy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = strlcpy.h; path = ../../../../../mxml/strlcpy.h; sourceTree = ""; }; + D5F6AF9314274D61003299EE /* musbstd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = musbstd.h; path = ../../../../../midas/include/musbstd.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D5446428141E1BB40027AF52 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D5446420141E1BB40027AF52 = { + isa = PBXGroup; + children = ( + D5F6AF8414274CCC003299EE /* Header Files */, + D5F6AF8614274CE8003299EE /* Source Files */, + D544642C141E1BB40027AF52 /* Products */, + ); + sourceTree = ""; + }; + D544642C141E1BB40027AF52 /* Products */ = { + isa = PBXGroup; + children = ( + D544642B141E1BB40027AF52 /* drs_exam_multi */, + ); + name = Products; + sourceTree = ""; + }; + D5F6AF8414274CCC003299EE /* Header Files */ = { + isa = PBXGroup; + children = ( + D563FEBA18643B6B00F76DF2 /* averager.h */, + D5F6AF9314274D61003299EE /* musbstd.h */, + D5F6AF9114274D4C003299EE /* mxml.h */, + D5F6AF9214274D4C003299EE /* strlcpy.h */, + D5F6AF8514274CE2003299EE /* DRS.h */, + ); + name = "Header Files"; + sourceTree = ""; + }; + D5F6AF8614274CE8003299EE /* Source Files */ = { + isa = PBXGroup; + children = ( + D563FEB818643B6100F76DF2 /* averager.cpp */, + D5F6AF8F14274D2E003299EE /* musbstd.c */, + D5F6AF8B14274D1F003299EE /* mxml.c */, + D5F6AF8C14274D1F003299EE /* strlcpy.c */, + D5F6AF8914274D0F003299EE /* drs_exam_multi.cpp */, + D5F6AF8714274CF7003299EE /* DRS.cpp */, + ); + name = "Source Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D544642A141E1BB40027AF52 /* drs_exam_multi */ = { + isa = PBXNativeTarget; + buildConfigurationList = D5446435141E1BB40027AF52 /* Build configuration list for PBXNativeTarget "drs_exam_multi" */; + buildPhases = ( + D5446427141E1BB40027AF52 /* Sources */, + D5446428141E1BB40027AF52 /* Frameworks */, + D5446429141E1BB40027AF52 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = drs_exam_multi; + productName = drs_exam_multi; + productReference = D544642B141E1BB40027AF52 /* drs_exam_multi */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D5446422141E1BB40027AF52 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0600; + ORGANIZATIONNAME = PSI; + }; + buildConfigurationList = D5446425141E1BB40027AF52 /* Build configuration list for PBXProject "drs_exam_multi" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D5446420141E1BB40027AF52; + productRefGroup = D544642C141E1BB40027AF52 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D544642A141E1BB40027AF52 /* drs_exam_multi */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + D5446427141E1BB40027AF52 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D5F6AF8814274CF7003299EE /* DRS.cpp in Sources */, + D5F6AF8A14274D0F003299EE /* drs_exam_multi.cpp in Sources */, + D563FEB918643B6100F76DF2 /* averager.cpp in Sources */, + D5F6AF8D14274D1F003299EE /* mxml.c in Sources */, + D5F6AF8E14274D1F003299EE /* strlcpy.c in Sources */, + D5F6AF9014274D2E003299EE /* musbstd.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D5446433141E1BB40027AF52 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + D5446434141E1BB40027AF52 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx; + }; + name = Release; + }; + D5446436141E1BB40027AF52 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + OS_LINUX, + HAVE_USB, + HAVE_LIBUSB10, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + HEADER_SEARCH_PATHS = ( + /mxml, + /midas/include, + ../, + /usr/local/include, + "/usr/local/include/libusb-1.0", + ); + OTHER_LDFLAGS = ( + "-L/usr/local/lib", + "-lusb-1.0", + "-framework", + IOKit, + "-framework", + Carbon, + ); + PRELINK_LIBS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + D5446437141E1BB40027AF52 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + HEADER_SEARCH_PATHS = ( + /mxml, + /midas/include, + ../, + /usr/local/include, + "/usr/local/include/libusb-1.0", + ); + OTHER_LDFLAGS = ( + "-L/usr/local/lib", + "-lusb-1.0", + "-framework", + IOKit, + "-framework", + Carbon, + ); + PRELINK_LIBS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D5446425141E1BB40027AF52 /* Build configuration list for PBXProject "drs_exam_multi" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D5446433141E1BB40027AF52 /* Debug */, + D5446434141E1BB40027AF52 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D5446435141E1BB40027AF52 /* Build configuration list for PBXNativeTarget "drs_exam_multi" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D5446436141E1BB40027AF52 /* Debug */, + D5446437141E1BB40027AF52 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D5446422141E1BB40027AF52 /* Project object */; +} diff --git a/software/drscl/drs_scaler.cpp b/software/drscl/drs_scaler.cpp new file mode 100644 index 0000000..1568b0c --- /dev/null +++ b/software/drscl/drs_scaler.cpp @@ -0,0 +1,83 @@ +/********************************************************************\ + + Name: drs_scaler.cpp + Created by: Stefan Ritt + + Contents: Wrapper function to read scalers via Labview + + $Id: drs_scaler.cpp 21293 2014-03-19 16:36:44Z ritt $ + +\********************************************************************/ + +#include + +#ifdef _MSC_VER + +#include + +#elif defined(OS_LINUX) + +#include +#include +#include +#include + +#endif + +#include +#include +#include + +#include "DRS.h" + +#if defined(_MSC_VER) +#define EXPRT __declspec(dllexport) +#else +#define EXPRT +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +void EXPRT scaler(unsigned int *s1, unsigned int *s2, unsigned int *s3, unsigned int *s4); + +#ifdef __cplusplus +}; +#endif + +/*------------------------------------------------------------------*/ + +void scaler(unsigned int *s1, unsigned int *s2, unsigned int *s3, unsigned int *s4) +{ + static DRS *drs = NULL; + + if (drs == NULL) { + drs = new DRS(); + } + + if (drs->GetNumberOfBoards()> 0) { + DRSBoard *b = drs->GetBoard(0); + *s1 = b->GetScaler(0); + *s2 = b->GetScaler(1); + *s3 = b->GetScaler(2); + *s4 = b->GetScaler(3); + } else { + *s1 = -1; + *s2 = -1; + *s3 = -1; + *s4 = -1; + } +} + +/*------------------------------------------------------------------*/ + +int main() +{ + unsigned int s1, s2, s3, s4; + + scaler(&s1, &s2, &s3, &s4); + printf("%d %d %d %d\n", s1, s2, s3, s4); + + return 1; +} diff --git a/software/drscl/drs_scaler.sln b/software/drscl/drs_scaler.sln new file mode 100644 index 0000000..e8fcf7c --- /dev/null +++ b/software/drscl/drs_scaler.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "drs_scaler", "drs_scaler.vcxproj", "{90E7F6F9-F0C2-4512-95C1-83DA0109D903}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {90E7F6F9-F0C2-4512-95C1-83DA0109D903}.Debug|Win32.ActiveCfg = Debug|Win32 + {90E7F6F9-F0C2-4512-95C1-83DA0109D903}.Debug|Win32.Build.0 = Debug|Win32 + {90E7F6F9-F0C2-4512-95C1-83DA0109D903}.Release|Win32.ActiveCfg = Release|Win32 + {90E7F6F9-F0C2-4512-95C1-83DA0109D903}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/software/drscl/drs_scaler.vcxproj b/software/drscl/drs_scaler.vcxproj new file mode 100644 index 0000000..b2e34bf --- /dev/null +++ b/software/drscl/drs_scaler.vcxproj @@ -0,0 +1,98 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {90E7F6F9-F0C2-4512-95C1-83DA0109D903} + Win32Proj + drs_scaler + + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;DRS_SCALER_EXPORTS;HAVE_LIBUSB10;%(PreprocessorDefinitions) + c:\midas\include;c:\mxml;c:\meg\online\drivers\drs; + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;DRS_SCALER_EXPORTS;HAVE_LIBUSB10;%(PreprocessorDefinitions) + c:\midas\include;c:\mxml;c:\meg\online\drivers\drs; + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/software/drscl/drscl.cpp b/software/drscl/drscl.cpp new file mode 100644 index 0000000..5b02b96 --- /dev/null +++ b/software/drscl/drscl.cpp @@ -0,0 +1,1647 @@ +/********************************************************************\ + + Name: drscl.cpp + Created by: Stefan Ritt + + Contents: Command line interface to DRS chip via USB and VME + + $Id: drscl.cpp 21435 2014-07-30 13:02:31Z ritt $ + +\********************************************************************/ + +#include + +#ifdef _MSC_VER + +#include +#include +#include +#include + +#define DIR_SEPARATOR '\\' + +#elif defined(OS_LINUX) || defined(OS_DARWIN) + +#define O_BINARY 0 + +#include +#include +#include +#include + +#define DIR_SEPARATOR '/' + +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include "strlcpy.h" +#include "DRS.h" +#ifdef HAVE_VME +#include "ace.h" +#endif + +const char *drscl_svn_revision = "$Id: drscl.cpp 21435 2014-07-30 13:02:31Z ritt $"; + +void print_help(); +void clear_screen(); +int match(const char *str, const char *cmd); +void cmd_loop(); + +#if defined(OS_LINUX) || defined(OS_DARWIN) +#define getch() getchar() +#define Sleep(x) usleep(x*1000) +#endif + +#ifdef _MSC_VER +#include +#define drs_kbhit() kbhit() +#endif + +void print_help() +{ + puts("Available commands:\n"); + puts("active <0|1> Set domino active mode on (1) or off (0)"); + puts("board | |all Address individual board/range/all boards"); + puts("calib [dir] Response Calibration. Use dir=\"area\" for MEG"); + puts("chn [n] Set number of channels: 8, 4, 2, 1"); + puts("ct Chip Test"); + puts("del <0|1> Switch delayed start on/off"); + puts("dir Show CF directory"); + puts("dmode <0|1> Set Domino mode 0=single, 1=cont."); + puts("et EEPROM test"); + puts("exit Exit program"); + puts("freq [0|1] Set frequency of board [without/with] regulation"); + puts("info Show information about board"); + puts("init Initialize board"); + puts("led <0|1> Turn LED on (1) or off (0)"); + puts("lock [0|1] Display lock status [without/with] restart"); + puts("multi [0|1] Turn multi-buffer mode on/off"); + puts("offset Set offset voltage"); + puts("phase [0|1] Set ADC clock phase and inversion"); + puts("quit Exit program"); + puts("ram Test speed to FPGA RAM"); + puts("range
Change input range to
+=0.5V"); + puts("read [0|1] [file] Read waveform to [file], chn=0..19 [with] calibration"); + puts("refclk [0|1] Use FPGA ref. clk (0) or ext. P2 ref. clk (1)"); + puts("reg Register test"); + puts("serial Set serial number of board"); + puts("scan Scan for boards"); + puts("standby <0|1> Turn standby mode on (1) or off (0)"); + puts("start Start domino wave"); + puts("stop Issue soft trigger"); + puts("tcout [file] [idx_offset] Print time calibration of DRS4, or write it onto [file]"); + puts("tcs <0|1> Timing calibration signal on (1) or off (0)"); + puts("tcalib [freq] Timing Calibration"); + puts("tlevel Set trigger level in Volts"); + puts("trans <0|1> Set transparent mode on (1) or off (0)"); + puts("trig <0|1> Hardware trigger on (1) or off (0)"); + puts("upload Upload ACE file to CF"); + puts("volt off| Turn calibration voltage on/off"); + + puts(""); +} + +/*------------------------------------------------------------------*/ + +void clear_screen() +{ +#ifdef _MSC_VER + + HANDLE hConsole; + COORD coordScreen = { 0, 0 }; /* here's where we'll home the cursor */ + BOOL bSuccess; + DWORD cCharsWritten; + CONSOLE_SCREEN_BUFFER_INFO csbi; /* to get buffer info */ + DWORD dwConSize; /* number of character cells in the current buffer */ + + hConsole = GetStdHandle(STD_OUTPUT_HANDLE); + + /* get the number of character cells in the current buffer */ + bSuccess = GetConsoleScreenBufferInfo(hConsole, &csbi); + dwConSize = csbi.dwSize.X * csbi.dwSize.Y; + + /* fill the entire screen with blanks */ + bSuccess = FillConsoleOutputCharacter(hConsole, (TCHAR) ' ', dwConSize, coordScreen, &cCharsWritten); + + /* put the cursor at (0, 0) */ + bSuccess = SetConsoleCursorPosition(hConsole, coordScreen); + return; + +#else + printf("\033[2J"); +#endif +} + +/*------------------------------------------------------------------*/ + +int match(const char *str, const char *cmd) +{ + int i; + + if (str[0] == '\r' || str[0] == '\n') + return 0; + + for (i = 0; i < (int) strlen(str); i++) { + if (toupper(str[i]) != toupper(cmd[i]) && str[i] != '\r' && str[i] != '\n') + return 0; + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +class ProgressBar : public DRSCallback +{ +public: + void Progress(int prog); +}; + +void ProgressBar::Progress(int prog) +{ + if (prog == 0) + printf("[--------------------------------------------------]\r"); + printf("["); + for (int i=0 ; iGetError(str, sizeof(str))) + printf("%s", str); + + for (i=0 ; iGetNumberOfBoards() ; i++) { + b = drs->GetBoard(i); +#ifdef HAVE_VME + if (b->GetTransport() != 1) + printf("Found DRS%d board %2d on USB, serial #%04d, firmware revision %5d\n", + b->GetDRSType(), i, b->GetBoardSerialNumber(), b->GetFirmwareVersion()); +#else + printf("Found DRS%d board %2d on USB, serial #%04d, firmware revision %5d\n", + b->GetDRSType(), i, b->GetBoardSerialNumber(), b->GetFirmwareVersion()); +#endif + } + + if (drs->GetNumberOfBoards()) { + i_start = 0; + i_end = 1; + b = drs->GetBoard(0); + } + else { + printf("No DRS Boards found\n"); + i_start = i_end = 0; + b = NULL; + } + + puts(""); + + do { + /* print prompt */ + if (i_start == i_end-1) + printf("B%d> ", i_start); + else if (i_start == 0 && i_end == 0) + printf("> "); + else + printf("B%d-%d> ", i_start, i_end-1); + memset(line, 0, sizeof(line)); + fgets(line, sizeof(line), stdin); + /* strip \r\n */ + while (strpbrk(line,"\n\r")) + *strpbrk(line,"\n\r") = 0; + + /* analyze line */ + nparam = 0; + pc = line; + while (*pc == ' ') + pc++; + + memset(param, 0, sizeof(param)); + do { + if (*pc == '"') { + pc++; + for (i = 0; *pc && *pc != '"'; i++) + param[nparam][i] = *pc++; + if (*pc) + pc++; + } else if (*pc == '\'') { + pc++; + for (i = 0; *pc && *pc != '\''; i++) + param[nparam][i] = *pc++; + if (*pc) + pc++; + } else if (*pc == '`') { + pc++; + for (i = 0; *pc && *pc != '`'; i++) + param[nparam][i] = *pc++; + if (*pc) + pc++; + } else + for (i = 0; *pc && *pc != ' '; i++) + param[nparam][i] = *pc++; + param[nparam][i] = 0; + while (*pc == ' ' || *pc == '\r' || *pc == '\n') + pc++; + nparam++; + } while (*pc); + + if (param[0][0] == 0) { + } + + /* help ---------- */ + else if ((param[0][0] == 'h' && param[0][1] == 'e') || param[0][0] == '?') + print_help(); + + /* scan ---------- */ + else if (match(param[0], "scan")) { + j = 0; + + do { + delete drs; + drs = new DRS(); + + for (i=0 ; iGetNumberOfBoards() ; i++) { + b = drs->GetBoard(i); +#ifdef HAVE_VME + if (b->GetTransport() != 1) + printf("Found DRS%d board %2d on USB, serial #%04d, firmware revision %5d\n", + b->GetDRSType(), i, b->GetBoardSerialNumber(), b->GetFirmwareVersion()); +#else + printf("Found DRS%d board %2d on USB, serial #%04d, firmware revision %5d\n", + b->GetDRSType(), i, b->GetBoardSerialNumber(), b->GetFirmwareVersion()); +#endif + } + + if (drs_kbhit()) + break; + + if (param[1][0] == 'r') { + printf("%c\r", bar[j]); + fflush(stdout); + j = (j+1) % 4; + Sleep(1000); + } + + } while (param[1][0] == 'r'); + + while (drs_kbhit()) + getch(); + + if (drs->GetNumberOfBoards()) { + i_start = 0; + i_end = 1; + b = drs->GetBoard(0); + } else { + printf("No DRS Boards found\n"); + i_start = i_end = 0; + b = NULL; + } + } + + /* address board ---------- */ + else if (match(param[0], "board")) { + if (param[1][0] == 'a') { + i_start = 0; + i_end = drs->GetNumberOfBoards(); + b = drs->GetBoard(0); + } else if (param[2][0] && atoi(param[2]) > 0 && atoi(param[2]) < drs->GetNumberOfBoards()) { + i_start = atoi(param[1]); + i_end = atoi(param[2]) + 1; + b = drs->GetBoard(i_start); + } else if (atoi(param[1]) >= 0 && atoi(param[1]) < drs->GetNumberOfBoards()) { + i_start = atoi(param[1]); + i_end = i_start + 1; + b = drs->GetBoard(i_start); + } else + printf("Board #%d does not exist\n", atoi(param[1])); + } + + /* info ---------- */ + else if (match(param[0], "info")) { + for (idx=i_start ; idxGetBoard(idx); + printf("==============================\n"); + printf("Mezz. Board index: %d\n", idx); +#ifdef HAVE_VME + if (b->GetTransport() == TR_VME) { + printf("Slot: %d", (b->GetSlotNumber() >> 1)+2); + if ((b->GetSlotNumber() & 1) == 0) + printf(" upper\n"); + else + printf(" lower\n"); + } +#endif + printf("DRS type: DRS%d\n", b->GetDRSType()); + printf("Board type: %d\n", b->GetBoardType()); + printf("Serial number: %04d\n", b->GetBoardSerialNumber()); + printf("Firmware revision: %d\n", b->GetFirmwareVersion()); + printf("Temperature: %1.1lf C\n", b->GetTemperature()); + if (b->GetDRSType() == 4) { + printf("Input range: %1.2lgV...%1.2lgV\n", + b->GetInputRange()-0.5, b->GetInputRange()+0.5); + printf("Calibrated range: %1.2lgV...%1.2lgV\n", b->GetCalibratedInputRange()-0.5, + b->GetCalibratedInputRange()+0.5); + printf("Calibrated frequency: %1.3lf GHz\n", b->GetCalibratedFrequency()); + + if (b->GetTransport() == TR_VME) { + printf("Multi Buffer WP: %d\n", b->GetMultiBufferWP()); + printf("Multi Buffer RP: %d\n", b->GetMultiBufferRP()); + } + } + + printf("Status reg.: %08X\n", b->GetStatusReg()); + if (b->GetStatusReg() & BIT_RUNNING) + puts(" Domino wave running"); + if (b->GetDRSType() == 4) { + if (b->GetBoardType() == 5) { + if (b->GetStatusReg() & BIT_PLL_LOCKED0) + puts(" PLL locked"); + } else if (b->GetBoardType() == 6) { + i = 0; + if (b->GetStatusReg() & BIT_PLL_LOCKED0) i++; + if (b->GetStatusReg() & BIT_PLL_LOCKED1) i++; + if (b->GetStatusReg() & BIT_PLL_LOCKED2) i++; + if (b->GetStatusReg() & BIT_PLL_LOCKED3) i++; + if (i == 4) + puts(" All PLLs locked"); + else if (i == 0) + puts(" No PLL locked"); + else + printf(" %d PLLs locked\n", i); + if (b->GetStatusReg() & BIT_LMK_LOCKED) + puts(" LMK PLL locked"); + } + } else { + if (b->GetStatusReg() & BIT_NEW_FREQ1) + puts(" New Freq1 ready"); + if (b->GetStatusReg() & BIT_NEW_FREQ2) + puts(" New Freq2 ready"); + } + + printf("Control reg.: %08X\n", b->GetCtrlReg()); + if (b->GetCtrlReg() & BIT_MULTI_BUFFER) + puts(" Multi-buffering enabled"); + if (b->GetDRSType() == 4) { + if (b->GetConfigReg() & BIT_CONFIG_DMODE) + puts(" DMODE circular"); + else + puts(" DMODE single shot"); + } else { + if (b->GetCtrlReg() & BIT_DMODE) + puts(" DMODE circular"); + else + puts(" DMODE single shot"); + } + if (b->GetCtrlReg() & BIT_LED) + puts(" LED"); + if (b->GetCtrlReg() & BIT_TCAL_EN) + puts(" TCAL enabled"); + if (b->GetDRSType() == 4) { + if (b->GetCtrlReg() & BIT_TRANSP_MODE) + puts(" TRANSP_MODE enabled"); + } else { + if (b->GetCtrlReg() & BIT_FREQ_AUTO_ADJ) + puts(" FREQ_AUTO_ADJ enabled"); + } + if (b->GetCtrlReg() & BIT_ENABLE_TRIGGER1) + puts(" Hardware trigger enabled"); + if (b->GetDRSType() == 4) { + if (b->GetCtrlReg() & BIT_READOUT_MODE) + puts(" Readout from stop"); + if (b->GetCtrlReg() & BIT_ENABLE_TRIGGER2) + puts(" Internal trigger enabled"); + } else { + if (b->GetCtrlReg() & BIT_LONG_START_PULSE) + puts(" LONG_START_PULSE"); + } + if (b->GetCtrlReg() & BIT_DELAYED_START) + puts(" DELAYED_START"); + if (b->GetCtrlReg() & BIT_ACAL_EN) + puts(" ACAL enabled"); + if (b->GetDRSType() < 4) + if (b->GetCtrlReg() & BIT_TRIGGER_DELAYED) + puts(" DELAYED_TRIGGER selected"); + if (b->GetBoardType() != 5) + printf("Trigger bus: %08X\n", b->GetTriggerBus()); + if (b->GetDRSType() == 4) { + if (b->GetRefclk() == 1) { + if (b->IsPLLLocked() && b->IsLMKLocked()) { + b->ReadFrequency(0, &freq); + printf("Frequency: %1.3lf GHz\n", freq); + } else { + if (!b->IsPLLLocked()) + printf("Frequency: PLL not locked\n"); + else + printf("Frequency: LMK chip not locked\n"); + } + } else { + if (b->IsPLLLocked()) { + b->ReadFrequency(0, &freq); + printf("Frequency: %1.3lf GHz\n", freq); + } else { + printf("Frequency: PLL not locked\n"); + } + } + } else { + if (b->IsBusy()) { + b->ReadFrequency(0, &freq); + printf("Frequency0: %1.4lf GHz\n", freq); + b->ReadFrequency(1, &freq); + printf("Frequency1: %1.4lf GHz\n", freq); + } else + puts("Domino wave stopped"); + } + } + } + + /* init ---------- */ + else if (match(param[0], "init")) { + for (i=i_start ; iGetBoard(i); + b->Init(); + } + } + + /* set led ---------- */ + else if (match(param[0], "led")) { + for (i=i_start ; iGetBoard(i); + if (atoi(param[1])) + b->SetLED(1); + else + b->SetLED(0); + } + } + + /* set multi buffer mode ---------- */ + else if (match(param[0], "multi")) { + for (i=i_start ; iGetBoard(i); + if (atoi(param[1])) + b->SetMultiBuffer(1); + else + b->SetMultiBuffer(0); + } + } + + /* lock status ---------- */ + else if (match(param[0], "lock")) { + int slot, found, restart; + + restart = atoi(param[1]); + + // select external reference clock + for (i=0 ; iGetNumberOfBoards() ; i++) { + b = drs->GetBoard(i); + b->SetRefclk(1); + b->SetFrequency(b->GetNominalFrequency(), true); + } + + // loop until keyboard hit + do { + clear_screen(); + printf(" 1 1 1 1 1 1 1 1 1 1 2 2\n"); + printf("2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1\n\n"); + + // upper slots + for (slot = 2 ; slot<22 ; slot++) { + found = 0; + for (i=0 ; iGetNumberOfBoards() ; i++) { + b = drs->GetBoard(i); + if ((b->GetSlotNumber() & 1) == 0 && (b->GetSlotNumber() >> 1)+2 == slot) { + found = 1; + if (b->IsLMKLocked()) + printf("O "); + else + printf("- "); + } + } + if (!found) + printf(" "); + } + printf("\n"); + + // lower slots + for (slot = 2 ; slot<22 ; slot++) { + found = 0; + for (i=0 ; iGetNumberOfBoards() ; i++) { + b = drs->GetBoard(i); + if ((b->GetSlotNumber() & 1) == 1 && (b->GetSlotNumber() >> 1)+2 == slot) { + found = 1; + if (b->IsLMKLocked()) + printf("O "); + else + printf("- "); + } + } + if (!found) + printf(" "); + } + printf("\n"); + + if (restart) { + for (i=0 ; iGetNumberOfBoards() ; i++) { + b = drs->GetBoard(i); + b->SetFrequency(b->GetNominalFrequency(), true); + } + } + + Sleep(300); + + } while (!drs_kbhit()); + puts(""); + while (drs_kbhit()) + getch(); + } + + /* start domino wave ---------- */ + else if (match(param[0], "start")) { + for (i=i_start ; iGetBoard(i); + b->StartDomino(); + b->ReadFrequency(0, &freq); + for (j=0 ; j<10 ; j++) + if (b->GetDRSType() != 4 || b->IsPLLLocked()) + break; + if (j == 10) + printf("Domino wave started but PLL did not lock!\n"); + else + printf("Domino wave started at %1.3lf GHz\n", freq); + } + } + + /* issue soft trigger ---------- */ + else if (match(param[0], "stop")) { + for (i=i_start ; iGetBoard(i); + b->SoftTrigger(); + } + } + + /* set serial ---------- */ + else if (match(param[0], "serial")) { + for (i=i_start ; iGetBoard(i); + if (param[1][0] == 0) { + printf("Serial number: "); + fgets(str, sizeof(str), stdin); + } else + strlcpy(str, param[1], sizeof(str)); + + if (!b->SetBoardSerialNumber(atoi(str))) + printf("Board EEPROM is write protected\n"); + else + printf("Serial number successfully changed\n"); + } + } + + /* eeprom test ---------- */ + else if (match(param[0], "et")) { + unsigned short buf[16384]; + unsigned short rbuf[16384]; + int n_error; + + do { + for (i=0 ; i<16384 ; i++) + buf[i] = rand(); + b->WriteEEPROM(1, buf, sizeof(buf)); + memset(rbuf, 0, sizeof(rbuf)); + b->Write(T_RAM, 0, rbuf, sizeof(rbuf)); + b->ReadEEPROM(1, rbuf, sizeof(rbuf)); + for (i=n_error=0 ; i<16384 ; i++) + if (buf[i] != rbuf[i]) { + printf("%04X %04X - %04X\n", i, buf[i], rbuf[i]); + n_error++; + } + + printf("32 kb written, %d errors\n", n_error); + } while (!drs_kbhit()); + + while (drs_kbhit()) + getch(); + } + + /* set frequency ---------- */ + else if (match(param[0], "freq")) { + for (i=i_start ; iGetBoard(i); + if (param[1][0] == 0) { + printf("Frequency: "); + fgets(str, sizeof(str), stdin); + } else + strlcpy(str, param[1], sizeof(str)); + + b->SetDebug(1); + + if (param[2][0] && atoi(param[2])) + b->RegulateFrequency(atof(str)); + else + b->SetFrequency(atof(str), true); + } + } + + /* set calibration voltage ---------- */ + else if (match(param[0], "volt")) { + for (i=i_start ; iGetBoard(i); + if (param[1][0] == 0) { + printf("Voltage or \"off\": "); + fgets(str, sizeof(str), stdin); + } else + strlcpy(str, param[1], sizeof(str)); + + if (str[0] == 'o') { + b->EnableAcal(0, 0); + puts("Calibration voltage turned off"); + } else { + b->EnableAcal(1, atof(str)); + printf("Voltage set to %1.3lf Volt\n", atof(str)); + } + } + } + + /* set channel configuration ---------- */ + else if (match(param[0], "chn")) { + for (i=i_start ; iGetBoard(i); + if (param[1][0] == 0) { + printf("Number of channels (8,4,2,1): "); + fgets(str, sizeof(str), stdin); + } else + strlcpy(str, param[1], sizeof(str)); + + if (b->SetChannelConfig(0, 8, atoi(str))) + printf("DRS4 configured for %d channels\n", atoi(str)); + } + } + + /* set trigger level ---------- */ + else if (match(param[0], "tlevel")) { + for (i=i_start ; iGetBoard(i); + if (param[1][0] == 0) { + printf("Voltage: "); + fgets(str, sizeof(str), stdin); + } else + strlcpy(str, param[1], sizeof(str)); + + b->SetTriggerLevel(atof(str)); + printf("Trigger level set to %1.3lf Volt\n", atof(str)); + } + } + + /* trigger on/off ---------- */ + else if (match(param[0], "trig")) { + for (i=i_start ; iGetBoard(i); + b->EnableTrigger(atoi(param[1]), 0); + if (atoi(param[1]) == 1) { + puts("Hardware fast trigger is on"); + } else if (atoi(param[1]) == 2) { + puts("Hardware slow trigger is on"); + } else { + puts("Hardware trigger is off"); + } + } + } + + /* timing calibration signal on/off ---------- */ + else if (match(param[0], "tcs")) { + for (i=i_start ; iGetBoard(i); + b->EnableTcal(atoi(param[1]), 0, 0); + b->SelectClockSource(0); + if (atoi(param[1])) + puts("Timing calibration signal is on"); + else + puts("Timing calibration signal is off"); + } + } + + /* timing calibration signal on/off ---------- */ + else if (match(param[0], "refclk")) { + for (i=i_start ; iGetBoard(i); + b->SetRefclk(atoi(param[1])); + // re-set frequency since LMK configuration needs to be changed + b->SetFrequency(b->GetNominalFrequency(), true); + if (atoi(param[1])) + puts("Refclock set to external through P2"); + else + puts("Refclock set to internal (FPGA)"); + } + } + + /* domino mode 0/1 ---------- */ + else if (match(param[0], "dmode")) { + for (i=i_start ; iGetBoard(i); + if (atoi(param[1]) == 1) { + b->SetDominoMode(1); + puts("Domino mode switched to cyclic"); + } else { + b->SetDominoMode(0); + puts("Domino mode switched to single shot"); + } + } + } + + /* active mode 0/1 ---------- */ + else if (match(param[0], "active")) { + for (i=i_start ; iGetBoard(i); + if (atoi(param[1]) == 1) { + b->SetDominoActive(1); + puts("Domino wave active during readout"); + } else { + b->SetDominoMode(0); + puts("Domino wave stopped during readout"); + } + } + } + + /* delayed start on/off ---------- */ + else if (match(param[0], "del")) { + for (i=i_start ; iGetBoard(i); + if (b->GetDRSType() == 4) + puts("Delayed start not possible for DRS4"); + else { + if (atoi(param[1]) == 1) { + b->SetDelayedStart(1); + puts("Delayed start is on"); + } else { + b->SetDelayedStart(0); + puts("Delayed start is off"); + } + } + } + } + + /* transparent mode on/off ---------- */ + else if (match(param[0], "trans")) { + for (i=i_start ; iGetBoard(i); + if (b->GetDRSType() != 4) + puts("Transparen mode only possible for DRS4"); + else { + if (atoi(param[1]) == 1) { + b->SetTranspMode(1); + puts("Transparent mode is on"); + } else { + b->SetTranspMode(0); + puts("Transparent mode is off"); + } + } + } + } + + /* standby mode on/off ---------- */ + else if (match(param[0], "standby")) { + for (i=i_start ; iGetBoard(i); + if (b->GetDRSType() != 4) + puts("Standby mode only possible for DRS4"); + else { + if (atoi(param[1]) == 1) { + b->SetStandbyMode(1); + puts("Standby mode is on"); + } else { + b->SetStandbyMode(0); + puts("Standby mode is off"); + } + } + } + } + + /* offset ---------- */ + else if (match(param[0], "offset")) { + for (i=i_start ; iGetBoard(i); + b->SetVoltageOffset(atof(param[1]), atof(param[2])); + } + } + + /* phase ---------- */ + else if (match(param[0], "phase")) { + for (i=i_start ; iGetBoard(i); + b->SetADCClkPhase(atoi(param[1]), atoi(param[2]) > 0); + } + } + + /* directory ---------- */ + else if (match(param[0], "dir")) { + +#ifdef HAVE_VME +#ifdef CF_VIA_USB + { + if (param[2][0]) + i = atoi(param[2]); + else + i = 1; + printf("Physical drive %d:\n", i); + + if (ace_init(NULL, i, &ace) != ACE_SUCCESS) { + printf("Cannot access ACE on physical drive %d\n", i); + } else { +#else + for (i=i_start ; i 1 && (i % 2) == 1) + continue; + + b = drs->GetBoard(i); + + printf("VME slot %2d: ", (b->GetSlotNumber() >> 1) + 2); + + if (ace_init(b->GetVMEInterface(), (b->GetSlotNumber() >> 1)+2, &ace) != ACE_SUCCESS) { + printf("Cannot access ACE in slot %d\n", (b->GetSlotNumber() >> 1)+2); + } else { +#endif + ace_dir(&ace); + } + } +#else + printf("No VME support compiled into drscl\n"); +#endif // HAVE_VME + } + + /* upload ---------- */ + else if (match(param[0], "upload")) { + +#ifdef HAVE_VME +#ifdef CF_VIA_USB + { + if (param[2][0]) + i = atoi(param[2]); + else + i = 1; + printf("Physical drive %d:\n", i); + + if (ace_init(NULL, i, &ace) != ACE_SUCCESS) { + printf("Cannot access ACE on physical drive %d\n", i); + } else { +#else + + /* use SVN file as default */ + if (param[1][0] == 0) { +#ifdef _MSC_VER + if (b->GetDRSType() == 4) + strcpy(str, "c:\\meg\\online\\VPC\\drs4\\2vp30\\cflash\\drs4\\rev0\\rev0.ace"); + else if (b->GetDRSType() == 3) + strcpy(str, "c:\\meg\\online\\VPC\\drs3\\2vp30\\cflash\\drs3\\rev0\\rev0.ace"); + else + strcpy(str, "c:\\meg\\online\\VPC\\drs2\\2vp30\\cflash\\drs2\\rev0\\rev0.ace"); +#else + if (b->GetDRSType() == 4) + strcpy(str, "/home/meg/meg/online/VPC/drs4/2vp30/cflash/drs4/rev0/rev0.ace"); + else if (b->GetDRSType() == 3) + strcpy(str, "/home/meg/meg/online/VPC/drs3/2vp30/cflash/drs3/rev0/rev0.ace"); + else + strcpy(str, "/home/meg/meg/online/VPC/drs2/2vp30/cflash/drs2/rev0/rev0.ace"); +#endif + printf("Enter filename or hit return for \n%s\n", str); + fgets(line, sizeof(line), stdin); + if (line[0] == '\r' || line[0] == '\n') + strcpy(file_name, str); + else + strcpy(file_name, line); + strcpy(param[1], str); + } else + strcpy(file_name, param[1]); + + for (i=i_start ; i 1 && (i % 2) == 1) + continue; + + b = drs->GetBoard(i); + + if (b->GetTransport() == TR_USB) { + printf("Cannot upload to USB board.\n"); + } else { + printf("VME slot %d:\n", (b->GetSlotNumber() >> 1)+2); + if (ace_init(b->GetVMEInterface(), (b->GetSlotNumber() >> 1)+2, &ace) != ACE_SUCCESS) { + printf("Cannot access ACE in slot %d\n", (b->GetSlotNumber() >> 1)+2); + } else { +#endif + status = ace_upload(&ace, file_name); + } + } + } + printf("\nPlease issue a power cycle to activate new firmware\n"); +#else + printf("No VME support compiled into drscl\n"); +#endif // HAVE_VME + } + + /* download ---------- */ + else if (match(param[0], "download")) { + +#ifdef HAVE_VME + b = drs->GetBoard(i_start); + + if (b->GetTransport() == TR_USB) { + printf("Cannot upload to USB board.\n"); + } else { + printf("VME slot %d:\n", (b->GetSlotNumber() >> 1)+2); + if (ace_init(b->GetVMEInterface(), (b->GetSlotNumber() >> 1)+2, &ace) != ACE_SUCCESS) { + printf("Cannot access ACE in slot %d\n", (b->GetSlotNumber() >> 1)+2); + } else { + strcpy(str, "rev0.ace"); + if (param[1][0] == 0) { + printf("Enter filename or hit return for \n%s\n", str); + fgets(line, sizeof(line), stdin); + if (line[0] == '\r' || line[0] == '\n') + strcpy(file_name, str); + else + strcpy(file_name, line); + strcpy(param[1], str); + } else + strcpy(file_name, param[1]); + + if (strchr(file_name, '\r')) + *strchr(file_name, '\r') = 0; + if (strchr(file_name, '\n')) + *strchr(file_name, '\n') = 0; + + status = ace_download(&ace, file_name); + } + } +#else + printf("No VME support compiled into drscl\n"); +#endif // HAVE_VME + } + + /* calibration ---------- */ + else if (match(param[0], "calib")) { + debug = strcmp(param[1], "debug") == 0 || strcmp(param[2], "debug") == 0 || strcmp(param[3], "debug") == 0; + if (param[1][0]) { + strlcpy(dir, param[1], sizeof(str)); + } else + getcwd(dir, sizeof(dir)); + + while (dir[strlen(dir)-1] == '\n' || dir[strlen(dir)-1] == '\r') + dir[strlen(dir)-1] = 0; + + b = drs->GetBoard(i_start); + + printf("\n Enter calibration frequency [GHz]: "); + fgets(line, sizeof(line), stdin); + freq = atof(line); + + if (b->GetDRSType() == 2) { + printf(" Enter the expected trigger frequency [Hz]: "); + fgets(line, sizeof(line), stdin); + triggerfreq = atof(line); + } else + triggerfreq = 0; + + ext_refclk = 0; + if (b->GetBoardType() == 6) { + printf("Use [e]xternal or [i]nternal reference clock: "); + fgets(line, sizeof(line), stdin); + ext_refclk = line[0] == 'e'; + } + + if (b->GetDRSType() == 4) { + printf(" Enter range [V]: "); + fgets(line, sizeof(line), stdin); + range = atof(line); + + printf(" Enter mode [1]024 or [2]048 bin mode: "); + fgets(line, sizeof(line), stdin); + cascading = atoi(line); + } else { + range = 0; + cascading = 0; + } + + if (b->GetDRSType() == 4) { + printf("\nPlease make sure that no input signal are present then hit any key\r"); + fflush(stdout); + while (!drs_kbhit()); + printf(" \r"); + while (drs_kbhit()) + getchar(); + } + + for (i=i_start ; iGetBoard(i); + if (b->GetTransport() == TR_VME) + printf("Creating Calibration of Board in VME slot %2d %s, serial #%04d\n", + (b->GetSlotNumber() >> 1)+2, ((b->GetSlotNumber() & 1) == 0) ? "upper" : "lower", + b->GetBoardSerialNumber()); + else + printf("Creating Calibration of Board on USB, serial #%04d\n", + b->GetBoardSerialNumber()); + if (b->GetDRSType() == 4) { + ProgressBar p; + if (b->GetTransport() == TR_VME) { + if (cascading == 2) + b->SetChannelConfig(7, 8, 4); // 7 means read all 9 channels per chip + else + b->SetChannelConfig(7, 8, 8); + } else { + if (cascading == 2) + b->SetChannelConfig(0, 8, 4); + else + b->SetChannelConfig(0, 8, 8); + } + + b->SetRefclk(ext_refclk); + b->SetFrequency(freq, true); + b->SetInputRange(range); + b->CalibrateVolt(&p); + } else { + b->SetDebug(debug); + b->Init(); + b->SetFrequency(freq, true); + b->SoftTrigger(); + + if (b->GetDRSType() == 3) + b->GetResponseCalibration()->SetCalibrationParameters(1,11,0,20,0,0,0,0,0); + else + b->GetResponseCalibration()->SetCalibrationParameters(1,36,110,20,19,40,15,triggerfreq,0); + if (!strcmp(dir,"lab")) + b->SetCalibrationDirectory("C:/experiment/calibrations"); + else if (!strcmp(dir,"area")) + b->SetCalibrationDirectory("/home/meg/meg/online/calibrations"); + else + b->SetCalibrationDirectory(dir); + for (j=0;j<2;j++) { + b->GetResponseCalibration()->ResetCalibration(); + while (!b->GetResponseCalibration()->RecordCalibrationPoints(j)) {} + while (!b->GetResponseCalibration()->FitCalibrationPoints(j)) {} + while (!b->GetResponseCalibration()->OffsetCalibration(j)) {} + if (!b->GetResponseCalibration()->WriteCalibration(j)) + break; + } + } + } + } + + /* timing calibration ---------- */ + else if (match(param[0], "tcalib")) { + + freq = 0; + if (param[1][0]) + freq = atof(param[1]); + + if (freq == 0) { + printf("Enter calibration frequency [GHz]: "); + fgets(line, sizeof(line), stdin); + freq = atof(line); + } + + for (i=i_start ; iGetBoard(i); + if (b->GetDRSType() < 4) + printf("Timing calibration not possivle for DRS2 or DRS3\n"); + else if (b->GetFirmwareVersion() < 13279) + printf("Firmware revision 13279 or later required for timing calibration\n"); + else if (b->GetDRSType() == 4) { + printf("Creating Timing Calibration of Board #%d\n", b->GetBoardSerialNumber()); + ProgressBar p; + b->SetFrequency(freq, true); + status = b->CalibrateTiming(&p); + if (!status) + printf("Error performing timing calibration, please check waveforms\n"); + printf("\n"); + } + } + } + + /* tcout ---------- */ + else if (match(param[0], "tcout")) { + float time[1024]; + int chip; + int k; + int idx = 0; + int first_board = i_start; + int last_board = i_end; + + file_name[0] = 0; + strcpy(file_name, param[1]); + if (file_name[0]) { + f = fopen(file_name, "wt"); + if (f == NULL) { + printf("Cannot open file \"%s\"\n", file_name); + } else { + first_board = 0; + last_board = drs->GetNumberOfBoards(); + } + idx += atoi(param[2]); + } else + f = NULL; + + if (f) { + fprintf(f, "-- Replace %%%% with correct id\n"); + } + for (i=first_board ; iGetBoard(i); + if (b->GetDRSType() >= 4) { + for (chip = 0; chip < b->GetNumberOfChips(); chip++) { + b->GetTime(chip, 0, b->GetTriggerCell(0), time, true, false); + if (f) { + fprintf(f, "INSERT INTO MEGDRSTimeCalibration VALUES(%%%%,%d,%d", idx, + static_cast(b->GetNominalFrequency() * 10 + 0.5) * 100); + for (j=0 ; j<1024 ; j++) + fprintf(f, ",%g", time[j] * 1e-9); + fprintf(f, ",%d,%d", b->GetBoardSerialNumber(), chip); + fprintf(f, ",%g);\n", 1 / (b->GetNominalFrequency() * 1e9) * 1024); + idx++; + } else { + printf("Board %d\n", b->GetBoardSerialNumber()); + for (j=0 ; j<128 ; j++) { + printf("%4d: ", j*8); + for (k=0 ; k<7 ; k++) + printf("%6.1lf ", time[j*8+k]); + printf("%6.1lf\n", time[j*8+k]); + } + printf("n"); + } + } + } else { + // DRS2 or DRS3 + idx += 2; + } + } + if (f) { + fclose(f); + printf("Data successfully written to \"%s\"\n", file_name); + } + } + + /* read */ + else if (match(param[0], "read")) { + float waveform[2048]; + short swaveform[2048]; + calib = 0; + + file_name[0] = 0; + if (param[1][0]) { + idx = atoi(param[1]); + calib = atoi(param[2]); + if (strlen(param[2]) > 2) + strcpy(file_name, param[2]); + else + strcpy(file_name, param[3]); + } else { + printf("Enter channel number (0..19): "); + fgets(line, sizeof(line), stdin); + idx = atoi(line); + } + + if (idx<0 || idx>19) + printf("Channel number must be between 0 and 19\n"); + else { + b = drs->GetBoard(i_start); + if (!b->IsEventAvailable()) + printf("Error: Domino wave is running, please issue a \"stop\" first\n"); + else { + if (calib == 1) { + if (b->GetDRSType() == 4) { + if (!b->IsVoltageCalibrationValid()) { + printf("Calibration not valid for board #%d\n", b->GetBoardSerialNumber()); + calib = 0; + } + + } else { +#ifdef _MSC_VER + b->SetCalibrationDirectory("C:/experiment/calibrations"); +#else + b->SetCalibrationDirectory("/home/meg/meg/online/calibrations"); +#endif + if (!b->GetResponseCalibration()->IsRead(0)) + if (!b->GetResponseCalibration()->ReadCalibration(0)) + calib = 0; + if (!b->GetResponseCalibration()->IsRead(1)) + if (!b->GetResponseCalibration()->ReadCalibration(1)) + calib = 0; + } + } + + status = b->TransferWaves(idx, idx); + if (file_name[0]) { + f = fopen(file_name, "wt"); + if (f == NULL) + printf("Cannot open file \"%s\"\n", file_name); + } else + f = NULL; + + if (calib) { + status = b->GetWave(idx/b->GetNumberOfChannels(), idx%b->GetNumberOfChannels(), waveform, + true, b->GetTriggerCell(idx/b->GetNumberOfChannels()), b->GetStopWSR(idx/b->GetNumberOfChannels())); + if (status == 0) { + if (f) + for (i=0 ; iGetChannelDepth() ; i++) + fprintf(f, "%6.1lf\n", waveform[i]); + else { + for (i=0 ; iGetChannelDepth()/8 ; i++) { + printf("%4d: ", i*8); + for (j=0 ; j<7 ; j++) + printf("%6.1lf ", waveform[i*8+j]); + printf("%6.1lf\n", waveform[i*8+j]); + } + } + } + } else { + status = b->GetWave(idx/b->GetNumberOfChannels(), idx%b->GetNumberOfChannels(), swaveform, 0, 0); + if (status == 0) { + if (f) + for (i=0 ; iGetChannelDepth() ; i++) + fprintf(f, "%4d\n", swaveform[i]); + else { + for (i=0 ; iGetChannelDepth()/16 ; i++) { + for (j=0 ; j<15 ; j++) + printf("%4d ", swaveform[i*16+j] >> 4); + printf("%4d\n", swaveform[i*16+j] >> 4); + } + } + } + } + } + } + + if (f) { + fclose(f); + printf("Data successfully written to \"%s\"\n", file_name); + } + } + + /* register test ---------- */ + else if (match(param[0], "reg")) { + b->RegisterTest(); + } + + /* RAM test */ + else if (match(param[0], "ram")) { + if (param[1][0] == 0) + b->RAMTest(3); + else + b->RAMTest(atoi(param[1])); + } + + /* Change input range */ + else if (match(param[0], "range")) { + for (i=i_start ; iGetBoard(i); + if (param[1][0] == 0) { + printf("Input range: "); + fgets(str, sizeof(str), stdin); + } else + strlcpy(str, param[1], sizeof(str)); + + b->SetInputRange(atof(str)); + printf("Range set to %1.2lg V ... %1.2lg V\n", atof(str)-0.5, atof(str)+0.5); + } + } + + /* Chip Test */ + else if (match(param[0], "ct")) { + if (drs->GetNumberOfBoards() == 0) + puts("No DRS board found"); + else { + puts("Press 'q' to quit, any other key to repeat test.\n"); + do { + if (b->ChipTest()) + puts("Chip test successfully finished"); + else + puts("\007Chip Error!"); + + b->SetStandbyMode(1); + for (i=0 ; i<8 ; i++) + b->SetDAC(i, 0); + i = getch(); + b->SetStandbyMode(0); + } while (i != 'q'); + } + } + + /* calib0 for speed vs. temperature calibration */ + else if (match(param[0], "c0")) { + + double volt, freq; + + b->Init(); + b->SetFrequency(5, true); + b->EnableAcal(0, 0); + b->SetDominoMode(1); + + for (volt=2.5 ; volt > 0 ; volt -= 0.05) { + printf("%4.1lf - %5.3lf ", b->GetTemperature(), volt); + b->SetDAC(1, volt); + b->SetDAC(2, volt); + Sleep(100); + b->ReadFrequency(0, &freq); + + printf("%5.3lf\n", freq); + + if (drs_kbhit()) + break; + } + + while (drs_kbhit()) + getch(); + + b->Init(); // reset voltage offset + } + + /* calib1 */ + else if (match(param[0], "c1")) { + + short swaveform[1024]; + double volt; + double av[1024]; + int k; + + b->Init(); + b->SetFrequency(5, true); + b->SetDominoMode(1); + b->SetDominoActive(1); + b->SetReadoutMode(1); + + for (volt=-0.5 ; volt <= 0.5001 ; volt += 0.02) { + printf("%4.1lf - %6.0lf ", b->GetTemperature(), 1000*volt); + b->EnableAcal(1, volt); + b->StartDomino(); + Sleep(100); + + memset(av, 0, sizeof(av)); + + for (j=0 ; j<100 ; j++) { + for (i=0 ; i<10 ; i++) + b->IsBusy(); + b->SoftTrigger(); + while (b->IsBusy()); + b->StartDomino(); + b->TransferWaves(b->GetNumberOfChannels()*b->GetNumberOfChips()); + i = b->GetTriggerCell(0); + b->GetWave(0, 0, swaveform, false, i, 1); + + for (k=0 ; k<1024 ; k++) + av[k] += swaveform[k]; + + if (drs_kbhit()) + break; + } + + for (k=0 ; k<1024 ; k++) + av[k] /= j; + + for (k=0 ; k<5 ; k++) + printf("%10.2lf ", 1000*(av[k]/65536-0.5)); + printf("\n"); + + if (drs_kbhit()) + break; + } + // keep chip "warm" + b->StartDomino(); + } + + /* test0 */ + else if (match(param[0], "t0")) { + b->Init(); + b->SetDominoMode(1); + b->SetDominoActive(1); + b->SetReadoutMode(1); + b->SetFrequency(0.8, true); + b->EnableTrigger(1, 0); + b->SetTriggerLevel(1); + b->SetChannelConfig(0, 8, 4); + + do { + b->StartDomino(); + while (b->IsBusy()) + if (drs_kbhit()) + break; + + b->TransferWaves(); + + if (b->GetBoardType() == 5) { + printf("%04d(0x%03X) - %3d\n", b->GetTriggerCell(0), b->GetTriggerCell(0), + b->GetStopWSR(0)); + } else { + printf("%04d %04d %04d %04d - %3d %3d %3d\n", + b->GetTriggerCell(0), + b->GetTriggerCell(1), + b->GetTriggerCell(2), + b->GetTriggerCell(3), + b->GetTriggerCell(1)-b->GetTriggerCell(0), + b->GetTriggerCell(2)-b->GetTriggerCell(0), + b->GetTriggerCell(3)-b->GetTriggerCell(0)); + } + Sleep(300); + } while (!drs_kbhit()); + + while (drs_kbhit()) + getch(); + } + + /* test1 simple start/stop loop */ + else if (match(param[0], "t1")) { + time_t t1, t2; + + b->SetDebug(1); + b->Init(); + b->SetFrequency(5, true); + b->SetDominoMode(1); + b->SetReadoutMode(0); + b->SetTranspMode(0); + b->SetDominoActive(1); + b->EnableAcal(1, 0.5); + b->EnableTcal(1); + time(&t1); + do { + time(&t2); + } while (t1 == t2); + i=0; + t1 = t2; + do { + b->StartDomino(); + b->SoftTrigger(); + b->TransferWaves(); + i++; + time(&t2); + if (t2 > t1) { + printf("%d events/sec\n", i); + i = 0; + t1 = t2; + } + } while (!drs_kbhit()); + + while (drs_kbhit()) + getch(); + } + + /* test2 readout from stop position */ + else if (match(param[0], "t2")) { + short sw[1024]; + double volt = 0.5; + + b->Init(); + b->SetNumberOfChannels(10); + b->SetChannelConfig(0, 9, 12); + b->SetFrequency(2, true); + b->EnableTcal(1); + b->SetReadoutMode(0); + b->SetDominoActive(0); + b->SetDominoMode(1); + b->SetCalibTiming(0, 0); + b->StartDomino(); + b->EnableAcal(1, 0.5); + if (!b->GetResponseCalibration()->IsRead(0)) + if (!b->GetResponseCalibration()->ReadCalibration(0)) + printf("cannot read calibration\n"); + + do { + //volt += 0.25; + if (volt > 1) + volt = 0; + b->SoftTrigger(); + while (b->IsBusy()); + b->StartDomino(); + b->EnableAcal(1, volt); + b->TransferWaves(); + + b->GetWave(0, 1, sw, 0, 0); + printf("%d ", sw[100]); + b->GetWave(0, 1, sw, 1, 0); + printf("%1.4lf\n", sw[100]/4096.0); + } while (!drs_kbhit()); + while (drs_kbhit()) getch(); + } + + /* DAC Loop */ + else if (match(param[0], "t3")) { + double volt; + do { + for (volt=2.5 ; volt > 0 ; volt -= 0.05) { + + printf("%4.1lf - %5.3lf\n", b->GetTemperature(), volt); + b->SetDAC(0, volt); + b->SetDAC(1, 2.5-volt); + Sleep(100); + if (drs_kbhit()) + break; + } + } while (!drs_kbhit()); + + while (drs_kbhit()) + getch(); + } + + /* noise measurement */ + else if (match(param[0], "t4")) { + int i, n; + short sw[1024]; + double ofs[1024], sx, sxx, avg, stdev, enob; + + b->Init(); + b->SetFrequency(2, true); + b->EnableTcal(0); + b->SetDominoMode(1); + b->StartDomino(); + b->EnableAcal(1, 0.5); + Sleep(100); + b->SoftTrigger(); + while (b->IsBusy()); + b->StartDomino(); + Sleep(100); + memset(ofs, 0, sizeof(ofs)); + + for (i=0 ; i<10 ; i++) { + b->SoftTrigger(); + while (b->IsBusy()); + b->StartDomino(); + b->TransferWaves(1); + b->GetWave(0, 0, sw, 0, 0); + sx = sxx = 0; + for (n=0 ; n<1024 ; n++) { + ofs[n] += sw[n]; + } + } + + for (n=0 ; n<1024 ; n++) + ofs[n] /= i; + + for (i=0 ; i<10 ; i++) { + b->SoftTrigger(); + while (b->IsBusy()); + b->StartDomino(); + b->TransferWaves(1); + b->GetWave(0, 0, sw, 0, 0); + + sx = sxx = 0; + for (n=10 ; n<1014 ; n++) { + sx += (sw[n]-ofs[n])/4096.0; + sxx += (sw[n]-ofs[n])/4096.0*(sw[n]-ofs[n])/4096.0; + } + + if (i>5) + Sleep(5000); + + avg = sx / n; + stdev = sqrt((sxx-sx*sx/n)/(n-1)); + enob = log(1/stdev)/log(2.); + printf("avg=%1.4lf sd=%1.4lf ENOB=%1.1lf\n", avg, stdev, enob); + }; + } + + /* exit/quit ---------- */ + else if (match(param[0], "exit") || match(param[0], "quit")) + break; + + else { + if (strchr(param[0], '\r')) + *strchr(param[0], '\r') = 0; + if (strchr(param[0], '\n')) + *strchr(param[0], '\n') = 0; + printf("Unknon command \"%s\"\n", param[0]); + } + + } while (1); + + delete drs; +} + +/*------------------------------------------------------------------*/ + +int main() +{ + printf("DRS command line tool, Revision %d\n", atoi(drscl_svn_revision+15)); + printf("Type 'help' for a list of available commands.\n\n"); + + cmd_loop(); + return 1; +} diff --git a/software/drscl/drscl.sln b/software/drscl/drscl.sln new file mode 100644 index 0000000..bb4b22b --- /dev/null +++ b/software/drscl/drscl.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "drscl", "drscl.vcxproj", "{0A260864-8525-423F-984D-34C5BE6EDE0A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0A260864-8525-423F-984D-34C5BE6EDE0A}.Debug|Win32.ActiveCfg = Debug|Win32 + {0A260864-8525-423F-984D-34C5BE6EDE0A}.Debug|Win32.Build.0 = Debug|Win32 + {0A260864-8525-423F-984D-34C5BE6EDE0A}.Release|Win32.ActiveCfg = Release|Win32 + {0A260864-8525-423F-984D-34C5BE6EDE0A}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/software/drscl/drscl.vcproj b/software/drscl/drscl.vcproj new file mode 100644 index 0000000..db2057b --- /dev/null +++ b/software/drscl/drscl.vcproj @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/software/drscl/drscl.vcxproj b/software/drscl/drscl.vcxproj new file mode 100644 index 0000000..cd90266 --- /dev/null +++ b/software/drscl/drscl.vcxproj @@ -0,0 +1,152 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {0A260864-8525-423F-984D-34C5BE6EDE0A} + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + false + + + + .\Release/drscl.tlb + + + + + MaxSpeed + OnlyExplicitInline + C:\meg\online\drivers\drs;c:\midas\include;c:\mxml;c:\midas\drivers\vme\sis3100\windows\;c:\meg\online\drivers\ace\;c:\meg\online\drivers\drs\libusb\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;HAVE_USB;HAVE_LIBUSB10;CF_VIA_USBx;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + .\Release/drscl.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0807 + + + .\Release/drscl.exe + true + .\Release/drscl.pdb + Console + false + + + MachineX86 + + + + + .\Debug/drscl.tlb + + + + + Disabled + C:\meg\online\drivers\drs;c:\midas\include;c:\mxml;c:\midas\drivers\vme\sis3100\windows\;c:\meg\online\drivers\ace\;c:\midas\mscb\;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_USB;HAVE_LIBUSB10;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + .\Debug/drscl.pch + .\Debug/ + .\Debug/ + .\Debug/ + true + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0807 + + + wsock32.lib;%(AdditionalDependencies) + .\Debug/drscl.exe + true + true + .\Debug/drscl.pdb + Console + false + + + MachineX86 + + + + + LIBCMT.lib + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/software/drscl/drscl.vcxproj.filters b/software/drscl/drscl.vcxproj.filters new file mode 100644 index 0000000..75c5276 --- /dev/null +++ b/software/drscl/drscl.vcxproj.filters @@ -0,0 +1,53 @@ + + + + + {58f8d010-21b2-4ac0-a39a-e1555568fe0e} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {7cce5796-2a2f-4002-adfd-2c2273b69bba} + h;hpp;hxx;hm;inl + + + {1162d07e-0108-49af-ae80-5a4e0cb26468} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/software/drscl/drscl.xcodeproj/project.pbxproj b/software/drscl/drscl.xcodeproj/project.pbxproj new file mode 100644 index 0000000..b096066 --- /dev/null +++ b/software/drscl/drscl.xcodeproj/project.pbxproj @@ -0,0 +1,306 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D5438C1718632BB1006A17E5 /* averager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D5438C1618632BB1006A17E5 /* averager.cpp */; }; + D5F6AF8814274CF7003299EE /* DRS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8714274CF7003299EE /* DRS.cpp */; }; + D5F6AF8A14274D0F003299EE /* drscl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8914274D0F003299EE /* drscl.cpp */; }; + D5F6AF8D14274D1F003299EE /* mxml.c in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8B14274D1F003299EE /* mxml.c */; }; + D5F6AF8E14274D1F003299EE /* strlcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8C14274D1F003299EE /* strlcpy.c */; }; + D5F6AF9014274D2E003299EE /* musbstd.c in Sources */ = {isa = PBXBuildFile; fileRef = D5F6AF8F14274D2E003299EE /* musbstd.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + D5446429141E1BB40027AF52 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + D5438C1618632BB1006A17E5 /* averager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = averager.cpp; path = /drs4eb/software/src/averager.cpp; sourceTree = ""; }; + D5438C1818632BC1006A17E5 /* averager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = averager.h; path = /drs4eb/software/include/averager.h; sourceTree = ""; }; + D544642B141E1BB40027AF52 /* drscl */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = drscl; sourceTree = BUILT_PRODUCTS_DIR; }; + D5F6AF8514274CE2003299EE /* DRS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DRS.h; path = /drs4eb/software/include/DRS.h; sourceTree = ""; }; + D5F6AF8714274CF7003299EE /* DRS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DRS.cpp; path = /drs4eb/software/src/DRS.cpp; sourceTree = ""; }; + D5F6AF8914274D0F003299EE /* drscl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = drscl.cpp; sourceTree = ""; }; + D5F6AF8B14274D1F003299EE /* mxml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mxml.c; path = /drs4eb/software/src/mxml.c; sourceTree = ""; }; + D5F6AF8C14274D1F003299EE /* strlcpy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = strlcpy.c; path = /drs4eb/software/src/strlcpy.c; sourceTree = ""; }; + D5F6AF8F14274D2E003299EE /* musbstd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = musbstd.c; path = /drs4eb/software/src/musbstd.c; sourceTree = ""; }; + D5F6AF9114274D4C003299EE /* mxml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mxml.h; path = /drs4eb/software/include/mxml.h; sourceTree = ""; }; + D5F6AF9214274D4C003299EE /* strlcpy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = strlcpy.h; path = /drs4eb/software/include/strlcpy.h; sourceTree = ""; }; + D5F6AF9314274D61003299EE /* musbstd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = musbstd.h; path = /drs4eb/software/include/musbstd.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D5446428141E1BB40027AF52 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D5446420141E1BB40027AF52 = { + isa = PBXGroup; + children = ( + D5F6AF8414274CCC003299EE /* Header Files */, + D5F6AF8614274CE8003299EE /* Source Files */, + D544642C141E1BB40027AF52 /* Products */, + ); + sourceTree = ""; + }; + D544642C141E1BB40027AF52 /* Products */ = { + isa = PBXGroup; + children = ( + D544642B141E1BB40027AF52 /* drscl */, + ); + name = Products; + sourceTree = ""; + }; + D5F6AF8414274CCC003299EE /* Header Files */ = { + isa = PBXGroup; + children = ( + D5438C1818632BC1006A17E5 /* averager.h */, + D5F6AF9314274D61003299EE /* musbstd.h */, + D5F6AF9114274D4C003299EE /* mxml.h */, + D5F6AF9214274D4C003299EE /* strlcpy.h */, + D5F6AF8514274CE2003299EE /* DRS.h */, + ); + name = "Header Files"; + sourceTree = ""; + }; + D5F6AF8614274CE8003299EE /* Source Files */ = { + isa = PBXGroup; + children = ( + D5438C1618632BB1006A17E5 /* averager.cpp */, + D5F6AF8F14274D2E003299EE /* musbstd.c */, + D5F6AF8B14274D1F003299EE /* mxml.c */, + D5F6AF8C14274D1F003299EE /* strlcpy.c */, + D5F6AF8914274D0F003299EE /* drscl.cpp */, + D5F6AF8714274CF7003299EE /* DRS.cpp */, + ); + name = "Source Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D544642A141E1BB40027AF52 /* drscl */ = { + isa = PBXNativeTarget; + buildConfigurationList = D5446435141E1BB40027AF52 /* Build configuration list for PBXNativeTarget "drscl" */; + buildPhases = ( + D5446427141E1BB40027AF52 /* Sources */, + D5446428141E1BB40027AF52 /* Frameworks */, + D5446429141E1BB40027AF52 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = drscl; + productName = drscl; + productReference = D544642B141E1BB40027AF52 /* drscl */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D5446422141E1BB40027AF52 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0810; + ORGANIZATIONNAME = PSI; + }; + buildConfigurationList = D5446425141E1BB40027AF52 /* Build configuration list for PBXProject "drscl" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D5446420141E1BB40027AF52; + productRefGroup = D544642C141E1BB40027AF52 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D544642A141E1BB40027AF52 /* drscl */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + D5446427141E1BB40027AF52 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D5F6AF8814274CF7003299EE /* DRS.cpp in Sources */, + D5F6AF8A14274D0F003299EE /* drscl.cpp in Sources */, + D5438C1718632BB1006A17E5 /* averager.cpp in Sources */, + D5F6AF8D14274D1F003299EE /* mxml.c in Sources */, + D5F6AF8E14274D1F003299EE /* strlcpy.c in Sources */, + D5F6AF9014274D2E003299EE /* musbstd.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D5446433141E1BB40027AF52 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + D5446434141E1BB40027AF52 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx; + }; + name = Release; + }; + D5446436141E1BB40027AF52 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + OS_LINUX, + HAVE_USB, + HAVE_LIBUSB10, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + HEADER_SEARCH_PATHS = ( + /usr/local/include, + /drs4eb/software/include, + ); + OTHER_LDFLAGS = ( + "-L/usr/local/lib", + "-lusb-1.0", + "-framework", + IOKit, + "-framework", + Carbon, + ); + PRELINK_LIBS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + D5446437141E1BB40027AF52 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + HEADER_SEARCH_PATHS = ( + /usr/local/include, + /drs4eb/software/include, + ); + OTHER_LDFLAGS = ( + "-L/usr/local/lib", + "-lusb-1.0", + "-framework", + IOKit, + "-framework", + Carbon, + ); + PRELINK_LIBS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D5446425141E1BB40027AF52 /* Build configuration list for PBXProject "drscl" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D5446433141E1BB40027AF52 /* Debug */, + D5446434141E1BB40027AF52 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D5446435141E1BB40027AF52 /* Build configuration list for PBXNativeTarget "drscl" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D5446436141E1BB40027AF52 /* Debug */, + D5446437141E1BB40027AF52 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D5446422141E1BB40027AF52 /* Project object */; +} diff --git a/software/drsosc/AboutDialog.cpp b/software/drsosc/AboutDialog.cpp new file mode 100644 index 0000000..dd6a536 --- /dev/null +++ b/software/drsosc/AboutDialog.cpp @@ -0,0 +1,26 @@ +/* + * AboutDialog.cpp + * About Dialog class + * $Id: AboutDialog.cpp 21911 2015-11-23 07:31:04Z ritt $ + */ + +#include "DRSOscInc.h" + +extern char svn_revision[]; +extern char drsosc_version[]; + +AboutDialog::AboutDialog(wxWindow* parent) +: +AboutDialog_fb( parent ) +{ + wxString str; + char d[80]; + + str.Printf(wxT("Version %s"), (const wxChar*)wxString::FromAscii(drsosc_version)); + m_stVersion->SetLabel(str); + + strcpy(d, svn_revision+23); + d[10] = 0; + str.Printf(wxT("Build %d, %s"), atoi(svn_revision+17), (const wxChar*)wxString::FromAscii(d)); + m_stBuild->SetLabel(str); +} diff --git a/software/drsosc/AboutDialog.h b/software/drsosc/AboutDialog.h new file mode 100644 index 0000000..81e1c3b --- /dev/null +++ b/software/drsosc/AboutDialog.h @@ -0,0 +1,19 @@ +#ifndef __AboutDialog__ +#define __AboutDialog__ + +// $Id: AboutDialog.h 14011 2009-08-06 11:34:04Z ritt $ + +/** +@file +Subclass of AboutDialog_fb, which is generated by wxFormBuilder. +*/ + +/** Implementing ConfigDialog_fb */ +class AboutDialog : public AboutDialog_fb +{ +public: + /** Constructor */ + AboutDialog( wxWindow* parent ); +}; + +#endif // __AboutDialog__ diff --git a/software/drsosc/ConfigDialog.cpp b/software/drsosc/ConfigDialog.cpp new file mode 100644 index 0000000..5c24577 --- /dev/null +++ b/software/drsosc/ConfigDialog.cpp @@ -0,0 +1,581 @@ +/* + * ConfigDialog.cpp + * Modeless Configuration Dialog class + * $Id: ConfigDialog.cpp 22325 2016-10-07 14:05:49Z ritt $ + */ + +#include "DRSOscInc.h" + +ConfigDialog::ConfigDialog( wxWindow* parent ) +: +ConfigDialog_fb( parent ) +{ + m_frame = (DOFrame *)parent; + m_osci = m_frame->GetOsci(); + + fCalMode = 0; + m_board = 0; + m_firstChannel = 0; + m_chnSection = m_frame->GetOsci()->GetChnSection(); + + if (m_frame->GetMultiBoard()) { + m_cbMulti->SetValue(true); + m_cbTrgCorr->SetValue(false); + m_cbTrgCorr->Enable(false); + m_frame->SetDisplayTrgCorr(false); + } + + m_cbClkOn->SetValue(m_frame->GetClkOn()); + if (m_osci->GetNumberOfBoards() == 0) { + m_cbClkOn->SetLabel(wxT("Connect reference clock to channel #4")); + } else { + if (m_frame->GetOsci()->GetBoard(0)->GetBoardType() == 9) + m_cbClkOn->SetLabel(wxT("Connect reference clock to all channels")); + else + m_cbClkOn->SetLabel(wxT("Connect reference clock to channel #4")); + } + + if (m_frame->GetRange() == 0) { + m_rbRange->SetSelection(0); + m_slCal->SetRange(-500, 500); + } else if (m_frame->GetRange() == 0.45) { + m_rbRange->SetSelection(1); + m_slCal->SetRange(-50, 950); + } else if (m_frame->GetRange() == 0.5) { + m_rbRange->SetSelection(2); + m_slCal->SetRange(-0, 1000); + } + + if (m_chnSection == 2) + m_rbChHalf->SetSelection(2); + + wxString wxstr; + wxstr.Printf(wxT("%1.4lg"), m_frame->GetReqSamplingSpeed()); + m_tbFreq->SetValue(wxstr); + wxstr.Printf(wxT("%1.4lg GSPS"), m_frame->GetActSamplingSpeed()); + m_stActFreq->SetLabel(wxstr); + + m_cbLocked->SetValue(m_frame->IsFreqLocked()); + m_cbSpikes->SetValue(m_frame->GetSpikeRemovel()); + + if (m_osci->GetNumberOfBoards() == 0) { + m_cbTCalOn->SetValue(true); + m_cbTCalOn->Enable(true); + } else { + m_cbTCalOn->SetValue(m_frame->GetOsci()->IsTCalibrated()); + m_cbTCalOn->Enable(m_frame->GetOsci()->IsTCalibrated()); + } + + PopulateBoards(); +} + +void ConfigDialog::PopulateBoards() +{ + wxString wxstr; + + m_cbBoard->Clear(); + + for (int i=0 ; iGetNumberOfBoards() ; i++) { + DRSBoard *b = m_osci->GetBoard(i); + +#ifdef HAVE_VME + if (b->GetTransport() == 1) + wxstr.Printf(wxT("VME DRS%d slot %2d%s serial %d"), + b->GetDRSType(), (b->GetSlotNumber() >> 1)+2, + ((b->GetSlotNumber() & 1) == 0) ? "up" : "lo", + b->GetBoardSerialNumber()); + else +#endif + wxstr.Printf(wxT("USB DRS%d serial %d"), b->GetDRSType(), b->GetBoardSerialNumber()); + + m_cbBoard->Append(wxstr); + } + + m_cbBoard->Select(m_board); + UpdateControls(); +} + +void ConfigDialog::UpdateControls() +{ + if (m_osci->GetNumberOfBoards() < 2) { + m_cbMulti->Enable(false); + } else + m_cbMulti->Enable(true); + + if (m_osci->GetNumberOfBoards() == 0 || + m_osci->GetBoard(m_board)->GetBoardType() == 5 || + m_osci->GetBoard(m_board)->GetBoardType() == 7 || + m_osci->GetBoard(m_board)->GetBoardType() == 8 || + m_osci->GetBoard(m_board)->GetBoardType() == 9) { + if (m_osci->GetNumberOfBoards() > 0) { + m_cbExtRefclk->Enable(m_osci->GetBoard(m_board)->GetBoardType() == 8 || m_osci->GetBoard(m_board)->GetBoardType() == 9); + m_cbExtRefclk->Show(m_osci->GetBoard(m_board)->GetBoardType() == 8 || m_osci->GetBoard(m_board)->GetBoardType() == 9); + } + } else { + m_cbExtRefclk->Enable(true); + m_cbExtRefclk->Show(true); + } + + if (m_osci->GetNumberOfBoards() > 0) { + if (m_osci->GetBoard(m_board)->GetBoardType() == 5 || + m_osci->GetBoard(m_board)->GetBoardType() == 6 || + m_osci->GetBoard(m_board)->Is2048ModeCapable()) { + m_rbChHalf->Enable(true); + } else { + if (m_osci->GetBoard(m_board)->GetBoardSerialNumber() == 2146 || + m_osci->GetBoard(m_board)->GetBoardSerialNumber() == 2205 || + m_osci->GetBoard(m_board)->GetBoardSerialNumber() == 2208 || + m_osci->GetBoard(m_board)->GetBoardSerialNumber() == 2253 || + m_osci->GetBoard(m_board)->GetBoardSerialNumber() == 2287) { + m_rbChHalf->Enable(true); // special boards modified for RFBeta & Slow Muons + } else { + m_rbChHalf->Enable(false); + } + } + } else { + m_rbChHalf->Enable(false); + } + + if (m_osci->GetNumberOfBoards() == 0) { + m_cbTCalOn->SetValue(true); + m_cbTCalOn->Enable(true); + } else { + m_cbCalibrated->SetValue(m_frame->GetOsci()->IsVCalibrated()); + m_cbCalibrated->Enable(m_frame->GetOsci()->IsVCalibrated()); + m_cbCalibrated2->SetValue(m_frame->GetOsci()->IsVCalibrated()); + m_cbCalibrated2->Enable(m_frame->GetOsci()->IsVCalibrated()); + + m_cbTCalOn->SetValue(m_frame->GetOsci()->IsTCalibrated()); + m_cbTCalOn->Enable(m_frame->GetOsci()->IsTCalibrated()); + m_cbExtRefclk->SetValue(m_osci->GetBoard(m_board)->GetRefclk() == 1); + + if ((m_osci->GetBoard(m_board)->GetBoardType() == 8 || m_osci->GetBoard(m_board)->GetBoardType() == 9) + && (!m_osci->IsMultiBoard() || m_board == 0)) + m_frame->EnableTriggerConfig(true); + else + m_frame->EnableTriggerConfig(false); + } +} + +void ConfigDialog::OnBoardSelect( wxCommandEvent& event ) +{ + if (event.GetId() == ID_MULTI) { + if (m_cbMulti->IsChecked()) { + wxString str; + + str.Printf(wxT("In a multi-board configuration, the Trigger and Clock singals must be conected. Please read the manual for details. Turn on multi-board mode?")); + + if (wxMessageBox(str, wxT("DRS Oscilloscope Info"), wxOK | wxCANCEL | wxICON_EXCLAMATION) == wxOK) { + m_osci->Enable(false); + m_osci->SetMultiBoard(true); + for (int i=1 ; iGetNumberOfBoards() ; i++) { + DRSBoard *b = m_frame->GetOsci()->GetBoard(i); + m_frame->SetTriggerSource(i, 4); // select external trigger + m_frame->SetTriggerPolarity(i, false); // positive trigger + + if (b->GetFirmwareVersion() < 21260) { + wxMessageBox(wxT("For this operation V5 boards with firmware revision >= 21260 is required"), + wxT("DRS Oscilloscope"), wxOK | wxICON_STOP, this); + } else { + if (b->GetScaler(5) < 300000) { + str.Printf(wxT("No clock signal connected to CLK IN of board #%d"), i); + wxMessageBox(str, wxT("DRS Oscilloscope"), wxOK | wxICON_STOP, this); + m_frame->SetRefclk(i, false); + } else { + m_frame->SetRefclk(i, true); + } + } + } + m_osci->Enable(true); + m_osci->SelectBoard(m_board); + m_osci->SelectChannel(m_firstChannel, m_chnSection); + m_frame->SetDisplayTrgCorr(false); + m_cbTrgCorr->SetValue(false); + m_cbTrgCorr->Enable(false); + } else { + m_cbMulti->SetValue(false); + } + } else { + m_osci->Enable(false); + m_osci->SetMultiBoard(false); + m_osci->Enable(true); + m_osci->SelectBoard(m_board); + m_osci->SelectChannel(m_firstChannel, m_chnSection); + m_cbTrgCorr->Enable(true); + } + m_frame->SetMultiBoard(m_cbMulti->IsChecked()); + m_frame->SelectBoard(m_board); // cause control update + if (!m_cbMulti->IsChecked()) + m_frame->SetSplitMode(false); + + } else { + m_board = m_cbBoard->GetSelection(); + m_osci->SelectBoard(m_board); + m_osci->SelectChannel(m_firstChannel, m_chnSection); + m_frame->SelectBoard(m_board); + UpdateControls(); + } +} + +// called from DOFrame if one selects another board +void ConfigDialog::SelectBoard(int i) +{ + m_board = i; + m_cbBoard->SetSelection(i); + m_osci->SelectBoard(m_board); + m_osci->SelectChannel(m_firstChannel, m_chnSection); + m_frame->UpdateStatusBar(); + UpdateControls(); +} + + +void ConfigDialog::OnRescan( wxCommandEvent& event ) +{ + m_frame->EnableEPThread(false); + m_osci->ScanBoards(); + PopulateBoards(); + if (m_board >= m_osci->GetNumberOfBoards()) + m_board = m_firstChannel = m_chnSection = 0; + + m_osci->SelectBoard(m_board); + m_frame->EnableEPThread(true); + m_frame->UpdateStatusBar(); +} + +void ConfigDialog::OnInfo( wxCommandEvent& event ) +{ + InfoDialog id(m_frame); + id.ShowModal(); +} + +void ConfigDialog::OnChannelHalf( wxCommandEvent& event ) +{ + if (event.GetId() == ID_CH_HALF) + m_chnSection = m_rbChHalf->GetSelection(); + + m_frame->SetSource(m_board, m_firstChannel, m_chnSection); + m_osci->SelectBoard(m_board); + m_osci->SelectChannel(m_firstChannel, m_chnSection); +} + +void ConfigDialog::OnInputRange( wxCommandEvent& event ) +{ + if (m_rbRange->GetSelection() == 0) { + m_frame->GetOsci()->SetInputRange(0); + m_frame->SetRange(0); + m_slCal->SetRange(-500, 500); + } else if (m_rbRange->GetSelection() == 1) { + m_frame->GetOsci()->SetInputRange(0.45); + m_frame->SetRange(0.45); + m_slCal->SetRange(-50, 950); + } else if (m_rbRange->GetSelection() == 2) { + m_frame->GetOsci()->SetInputRange(0.5); + m_frame->SetRange(0.5); + m_slCal->SetRange(0, 1000); + } + OnCalEnter(event); +} + +void ConfigDialog::OnCalOn( wxCommandEvent& event ) +{ + if (event.IsChecked()) { + m_frame->GetOsci()->SetCalibVoltage(true, m_slCal->GetValue()/1000.0); + } else { + m_frame->GetOsci()->SetCalibVoltage(false, 0); + } +} + +void ConfigDialog::OnCalEnter( wxCommandEvent& event ) +{ + if (!m_teCal->IsEmpty()) { + long value; + m_teCal->GetValue().ToLong(&value); + if (m_frame->GetRange() == 0) { + if (value < -500) + value = -500; + if (value > 500) + value = 500; + } else if (m_frame->GetRange() == 0.45) { + if (value < -50) + value = -50; + if (value > 950) + value = 950; + } else if (m_frame->GetRange() == 0.5) { + if (value < 0) + value = 0; + if (value > 1000) + value = 1000; + } + m_slCal->SetValue(value); + m_teCal->SetValue(wxString::Format(wxT("%ld"), value)); + if (m_cbCalOn->IsChecked()) + m_frame->GetOsci()->SetCalibVoltage(true, value/1000.0); + } + + /* check for calibration */ + if (m_osci->GetNumberOfBoards() > 0 && + fabs(m_frame->GetRange() - m_frame->GetOsci()->GetCalibratedInputRange()) > 0.001) { + wxString str; + + str.Printf(wxT("This board was calibrated for an input range of\n %1.2lg V ... %1.2lg V\nYou must execute a new voltage calibration to use this board for the new input range"), + m_frame->GetOsci()->GetCalibratedInputRange()-0.5, m_frame->GetOsci()->GetCalibratedInputRange()+0.5); + wxMessageBox(str, wxT("DRS Oscilloscope Warning"), wxOK | wxICON_EXCLAMATION, this); + } +} + +void ConfigDialog::OnCalSlider( wxScrollEvent& event ) +{ + m_teCal->SetValue(wxString::Format(wxT("%d"), m_slCal->GetValue())); + + if (m_cbCalOn->IsChecked()) + m_frame->GetOsci()->SetCalibVoltage(true, m_slCal->GetValue()/1000.0); + +} + +void ConfigDialog::Progress(int prog) +{ + if (fCalMode == 1) + m_gaugeCalVolt->SetValue(prog); + else { + m_gaugeCalTime->SetValue(prog); + m_frame->SetProgress(prog); + m_frame->Refresh(); + m_frame->Update(); + } + + /* produces flickers with V 2.9.2 + this->Refresh(); + this->Update(); */ +} + +void ConfigDialog::OnButtonCalVolt( wxCommandEvent& event ) +{ + fCalMode = 1; + if (m_frame->GetOsci()->GetNumberOfBoards()) { + + m_frame->GetTimer()->Stop(); + m_frame->GetOsci()->Enable(false); // turn off readout thread + + DRSBoard *b = m_frame->GetOsci()->GetCurrentBoard(); + + if (b->GetTransport() == TR_USB2 && b->GetBoardType() == 6) { + wxMessageBox(wxT("Voltage calibration not possible with Mezzanine Board through USB"), + wxT("DRS Oscilloscope Error"), wxOK | wxICON_STOP, this); + return; + } + + wxMessageBox(wxT("Please disconnect any signal from input to continue calibration"), + wxT("DRS Oscilloscope Info"), wxOK | wxICON_INFORMATION, this); + m_frame->Refresh(); + m_frame->Update(); + + /* remember current settings */ + double acalVolt = b->GetAcalVolt(); + int acalMode = b->GetAcalMode(); + int tcalFreq = b->GetTcalFreq(); + int tcalLevel = b->GetTcalLevel(); + int tcalSource = b->GetTcalSource(); + int flag1 = b->GetTriggerEnable(0); + int flag2 = b->GetTriggerEnable(1); + int trgSource = b->GetTriggerSource(); + int trgDelay = b->GetTriggerDelay(); + double range = b->GetInputRange(); + int config = b->GetReadoutChannelConfig(); + int casc = b->GetChannelCascading(); + + wxBusyCursor cursor; + b->CalibrateVolt(this); + + /* restore old values */ + b->EnableAcal(acalMode, acalVolt); + b->EnableTcal(tcalFreq, tcalLevel); + b->SelectClockSource(tcalSource); + b->EnableTrigger(flag1, flag2); + b->SetTriggerSource(trgSource); + b->SetTriggerDelayPercent(trgDelay); + b->SetInputRange(range); + if (casc == 2) + b->SetChannelConfig(config, 8, 4); + else + b->SetChannelConfig(config, 8, 8); + + if (b->GetBoardType() == 5) + b->SetTranspMode(1); // Evaluation board with build-in trigger + else + b->SetTranspMode(1); // VPC Mezzanine board + + UpdateControls(); + + m_frame->GetTimer()->Start(100); + m_frame->GetOsci()->Start(); + m_frame->GetOsci()->Enable(true); + } + Progress(0); +} + +void ConfigDialog::OnButtonCalTime( wxCommandEvent& event ) +{ + fCalMode = 2; + if (m_frame->GetOsci()->GetNumberOfBoards()) { + if (m_frame->GetOsci()->GetCurrentBoard()->GetFirmwareVersion() < 13279) + wxMessageBox(wxT("Firmware revision 13279 or later\nrequired for timing calibration"), + wxT("DRS Oscilloscope"), wxOK | wxICON_STOP, this); + else if (m_frame->GetOsci()->GetInputRange() != 0) + wxMessageBox(wxT("Timing calibration can only be done\nat the -0.5V to +0.5V input range"), + wxT("DRS Oscilloscope"), wxOK | wxICON_STOP, this); + + else { + + DRSBoard *b = m_frame->GetOsci()->GetCurrentBoard(); + m_frame->GetOsci()->Enable(false); // turn off readout thread + + /* remember current settings */ + double acalVolt = b->GetAcalVolt(); + int acalMode = b->GetAcalMode(); + int tcalFreq = b->GetTcalFreq(); + int tcalLevel = b->GetTcalLevel(); + int tcalSource = b->GetTcalSource(); + int flag1 = b->GetTriggerEnable(0); + int flag2 = b->GetTriggerEnable(1); + int trgSource = b->GetTriggerSource(); + int trgDelay = b->GetTriggerDelay(); + double range = b->GetInputRange(); + int config = b->GetReadoutChannelConfig(); + + m_frame->SetPaintMode(kPMTimeCalibration); + + wxBusyCursor cursor; + int status = b->CalibrateTiming(this); + + if (!status) + wxMessageBox(wxT("Error performing timing calibration, please check waveforms and redo voltage calibration."), + wxT("DRS Oscilloscope"), wxOK | wxICON_STOP, this); + else + wxMessageBox(wxT("Timing calibration successfully finished."), + wxT("DRS Oscilloscope"), wxOK, this); + + m_frame->SetPaintMode(kPMWaveform); + + /* restore old values */ + b->EnableAcal(acalMode, acalVolt); + b->EnableTcal(tcalFreq, tcalLevel); + b->SelectClockSource(tcalSource); + b->EnableTrigger(flag1, flag2); + b->SetTriggerSource(trgSource); + b->SetTriggerDelayPercent(trgDelay); + b->SetInputRange(range); + b->SetChannelConfig(config, 8, 8); + + if (b->GetBoardType() == 5) + b->SetTranspMode(1); // Evaluation board with build-in trigger + else + b->SetTranspMode(1); // VPC Mezzanine board + + FreqChange(); // update enable flag for timing calibration check box + m_frame->GetTimer()->Start(100); + m_frame->GetOsci()->Start(); + m_frame->GetOsci()->Enable(true); + } + Progress(0); + } +} + +void ConfigDialog::OnClkOn( wxCommandEvent& event ) +{ + m_frame->SetClkOn(event.IsChecked()); +} + +void ConfigDialog::OnDateTime( wxCommandEvent& event ) +{ + m_frame->SetDisplayDateTime(event.IsChecked()); +} + +void ConfigDialog::OnShowGrid( wxCommandEvent& event ) +{ + m_frame->SetDisplayShowGrid(event.IsChecked()); +} + +void ConfigDialog::OnDisplayWaveforms( wxCommandEvent& event ) +{ + if (event.GetId() == ID_DISP_CALIBRATED) + m_frame->SetDisplayCalibrated(event.IsChecked()); + if (event.GetId() == ID_DISP_CALIBRATED2) + m_frame->SetDisplayCalibrated2(event.IsChecked()); + if (event.GetId() == ID_DISP_ROTATED) + m_frame->SetDisplayRotated(event.IsChecked()); + if (event.GetId() == ID_DISP_TCALIBRATED) + m_frame->SetDisplayTCalOn(event.IsChecked()); + if (event.GetId() == ID_DISP_TRGCORR) + m_frame->SetDisplayTrgCorr(event.IsChecked()); + if (event.GetId() == ID_REFCLK) { + if (event.IsChecked()) { + // check if clock is connected to CLK in + if (m_frame->GetOsci()->GetNumberOfBoards() > 0) { + if (m_frame->GetOsci()->GetCurrentBoard()->GetFirmwareVersion() < 21260) { + wxMessageBox(wxT("For this operation a V5 board with firmware revision >= 21260 is required"), + wxT("DRS Oscilloscope"), wxOK | wxICON_STOP, this); + m_cbExtRefclk->SetValue(false); + } else { + if (m_frame->GetOsci()->GetScaler(5) < 300000) { + wxMessageBox(wxT("No clock signal connected to CLK IN"), + wxT("DRS Oscilloscope"), wxOK | wxICON_STOP, this); + m_cbExtRefclk->SetValue(false); + } else + m_frame->SetRefclk(m_board, true); + } + } + } else + m_frame->SetRefclk(m_board, false); + FreqChange(); + } +} + +void ConfigDialog::OnRemoveSpikes( wxCommandEvent& event ) +{ + m_frame->SetSpikeRemoval(event.IsChecked()); +} + +void ConfigDialog::FreqChange() +{ + wxString wxstr; + wxstr.Printf(wxT("%1.4lg"), m_frame->GetReqSamplingSpeed()); + m_tbFreq->SetValue(wxstr); + wxstr.Printf(wxT("%1.4lg GSPS"), m_frame->GetActSamplingSpeed()); + m_stActFreq->SetLabel(wxstr); + + if (m_osci->GetNumberOfBoards() == 0) { + m_cbTCalOn->SetValue(true); + m_cbTCalOn->Enable(true); + } else { + m_cbTCalOn->SetValue(m_frame->GetOsci()->IsTCalibrated()); + m_cbTCalOn->Enable(m_frame->GetOsci()->IsTCalibrated()); + } +} + +void ConfigDialog::OnFreq( wxCommandEvent& event ) +{ + wxString wxstr = m_tbFreq->GetValue(); + double freq = 0; + wxstr.ToDouble(&freq); + m_frame->SetSamplingSpeed(freq); + wxstr.Printf(wxT("%1.4lg GSPS"), m_frame->GetActSamplingSpeed()); + m_stActFreq->SetLabel(wxstr); + + if (m_osci->GetNumberOfBoards() == 0) { + m_cbTCalOn->SetValue(true); + m_cbTCalOn->Enable(true); + } else { + m_cbTCalOn->SetValue(m_frame->GetOsci()->IsTCalibrated()); + m_cbTCalOn->Enable(m_frame->GetOsci()->IsTCalibrated()); + } +} + +void ConfigDialog::OnLock( wxCommandEvent& event ) +{ + m_frame->SetFreqLock(event.IsChecked()); +} + +void ConfigDialog::OnClose( wxCommandEvent& event ) +{ + this->Hide(); +} diff --git a/software/drsosc/ConfigDialog.h b/software/drsosc/ConfigDialog.h new file mode 100644 index 0000000..97c39f2 --- /dev/null +++ b/software/drsosc/ConfigDialog.h @@ -0,0 +1,61 @@ +#ifndef __ConfigDialog__ +#define __ConfigDialog__ + +// $Id: ConfigDialog.h 22325 2016-10-07 14:05:49Z ritt $ + +/** +@file +Subclass of ConfigDialog_fb, which is generated by wxFormBuilder. +*/ + +class DOFrame; +class Osci; + +/** Implementing ConfigDialog_fb */ +class ConfigDialog : public ConfigDialog_fb, DRSCallback +{ +protected: + // Handlers for ConfigDialog_fb events. + void OnBoardSelect( wxCommandEvent& event ); + void OnRescan( wxCommandEvent& event ); + void OnInfo( wxCommandEvent& event ); + void OnChannelHalf( wxCommandEvent& event ); + void OnInputRange( wxCommandEvent& event ); + void OnCalOn( wxCommandEvent& event ); + void OnCalEnter( wxCommandEvent& event ); + void OnCalSlider( wxScrollEvent& event ); + void OnClkOn( wxCommandEvent& event ); + void OnDateTime( wxCommandEvent& event ); + void OnShowGrid( wxCommandEvent& event ); + void OnDisplayWaveforms( wxCommandEvent& event ); + void OnButtonCalVolt( wxCommandEvent& event ); + void OnButtonSelect( wxCommandEvent& event ); + void UpdateCalVolt(int value); + void OnButtonCalTime( wxCommandEvent& event ); + void OnRemoveSpikes( wxCommandEvent& event ); + void OnFreq( wxCommandEvent& event ); + void OnLock( wxCommandEvent& event ); + + void OnClose( wxCommandEvent& event ); + + int fCalMode; + +public: + /** Constructor */ + ConfigDialog( wxWindow* parent ); + void Progress(int prog); + void FreqChange(); + void SelectBoard(int i); + +private: + DOFrame *m_frame; + Osci *m_osci; + + int m_board, m_firstChannel, m_chnSection; + + void PopulateBoards(void); + void UpdateControls(void); + +}; + +#endif // __ConfigDialog__ diff --git a/software/drsosc/DOFrame.cpp b/software/drsosc/DOFrame.cpp new file mode 100644 index 0000000..4f342b1 --- /dev/null +++ b/software/drsosc/DOFrame.cpp @@ -0,0 +1,1716 @@ +/* + * Osci.cpp + * DRS oscilloscope main class + * $Id: DOFrame.cpp 22327 2016-10-11 13:18:26Z ritt $ + */ + +#define MULTI_THREAD_READOUT + +#include "DRSOscInc.h" +#include "strlcpy.h" + +#include "pos.xpm" +#include "neg.xpm" + +#ifndef O_TEXT +#define O_TEXT 0 +#define O_BINARY 0 +#endif + +char svn_revision[] = "$Id: DOFrame.cpp 22327 2016-10-11 13:18:26Z ritt $"; + +char drsosc_version[] = "5.0.6"; + +// critical section between main and event processing thread +wxCriticalSection *g_epcs; + +/*------------------------------------------------------------------*/ + +class MyPrintout: public wxPrintout +{ +public: + MyPrintout(DOScreen *screen, const wxChar *title):wxPrintout(title) { m_screen = screen; } + bool OnPrintPage(int page); +private: + DOScreen *m_screen; +}; + +/*------------------------------------------------------------------*/ + +BEGIN_EVENT_TABLE(DOFrame, wxFrame) + EVT_TIMER (wxID_ANY, DOFrame::OnTimer ) + EVT_MENU (wxID_EXIT, DOFrame::OnExit ) +END_EVENT_TABLE() + +DOFrame::DOFrame( wxWindow* parent ) +: +DOFrame_fb( parent ) +{ + // colors for four channels + m_color[0] = wxColor(255, 255, 0); // yellow + m_color[1] = wxColor(170, 170, 255); // light blue + m_color[2] = wxColor(255, 150, 150); // light red + m_color[3] = wxColor(150, 255, 150); // light green + m_color[4] = wxColor(170, 170, 170); // grey for ext trigger + + // colors for printing + m_pcolor[0] = wxColor(128, 128, 0); // dark yellow + m_pcolor[1] = wxColor( 0, 0, 255); // blue + m_pcolor[2] = wxColor(255, 0, 0); // red + m_pcolor[3] = wxColor( 0, 255, 0); // green + m_pcolor[4] = wxColor(128, 128, 128); // grey for ext trigger + + // initialize variables + m_acqPerSecond = 0; + m_lastTriggerUpdate = time(NULL); + m_reqSamplingSpeed = 1; + m_WFFile = NULL; + m_WFfd = 0; + m_nSaved = 0; + m_actCursor = 0; + m_cursorA = m_cursorB = false; + m_snap = false; + m_hideControls = false; + m_stat = true; + m_hist = false; + m_indicator = true; + m_first = true; + m_freqLocked = false; + m_nStat = 1000; + m_progress = 0; + m_oldIdle = false; + + m_configDialog = NULL; + m_measureDialog = NULL; + m_triggerDialog = NULL; + m_displayDialog = NULL; + m_epthread = NULL; + g_epcs = NULL; + + // initialize source + m_board = 0; + m_firstChannel = 0; + m_chnSection = 0; + m_multiBoard = false; + m_splitMode = false; + + // initialize settings + m_trgCorr = true; + + for (int b=0 ; bGetTrueSamplingSpeed()*100+0.5))/100.0; + else + m_osci->SetSamplingSpeed(m_reqSamplingSpeed); + + // turn off multi board mode if only one board present + if (m_osci->GetNumberOfBoards() < 2) { + m_multiBoard = false; + m_splitMode = false; + } + + // turn off transparent mode for boards with old firmware + for (int i=0 ; iGetNumberOfBoards() ; i++) { + if (m_osci->GetBoard(i)->GetFirmwareVersion() < 21699) + m_trgConfig[i] &= ~(1<<15); + } + + // set section (needed before ConfigDialog) to display 2048-bin mode + if (m_osci->GetNumberOfBoards() > 0 && m_osci->GetBoard(0)->Is2048ModeCapable()) + m_chnSection = 2; + else + m_chnSection = 0; + m_osci->SelectChannel(m_firstChannel, m_chnSection); + + // create Measurement objects + for (int i=0 ; iAdd(m_screen, 1, wxEXPAND); + m_pnScreen->SetSizer(vbox1); + +#ifdef _MSC_VER + /* adjust font size under Windows */ + m_stScale1->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, + wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + m_stScale2->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, + wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + m_stScale3->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, + wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + m_stScale4->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, + wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); +#endif + + // create timer + m_timer = new wxTimer(this); + + // create modeless dialog boxes + m_configDialog = new ConfigDialog(this); + m_measureDialog = new MeasureDialog(this); + m_triggerDialog = new TriggerDialog(this); + m_displayDialog = new DisplayDialog(this); + + // set position of dialog boxes conveniently + int w, h, cw, ch, mw, mh, dw, dh, x, y; + wxDisplaySize(&dw, &dh); + m_configDialog->GetSize(&cw, &ch); + m_measureDialog->GetSize(&mw, &mh); + this->GetSize(&w, &h); + this->GetPosition(&x, &y); + + x = x + w + 1; + if (x + cw > dw) + x = dw - cw - 1; + m_configDialog->Move(x, y); + + x = x + cw + 1; + if (x + mw > dw) + x = dw - mw - 1; + m_measureDialog->Move(x, y); + + // initialize status bar + CreateStatusBar(); + UpdateStatusBar(); + + // start event processing thread +#ifdef MULTI_THREAD_READOUT + g_epcs = new wxCriticalSection(); + m_epthread = new EPThread(this); +#endif + + // Configure individual boards + + for (int i=0 ; iGetNumberOfBoards() ; i++) { + m_board = i; + m_osci->SelectBoard(i); + + int ofs = m_HOffset[i]; + SetRefclk(m_board, m_refClk[i]); // update sampling speed according to Refclk + m_HOffset[i] = ofs; + + m_osci->SetClkOn(m_clkOn); + m_osci->SetSpikeRemoval(m_spikeRemoval); + + m_osci->SetTriggerDelay(m_trgDelay[i]); + m_trgDelayNs[i] = m_osci->GetTriggerDelayNs(); + m_osci->SetInputRange(m_range[i]); + m_osci->SetTriggerMode(m_trgMode[i]); + if (m_trgConfig[i]) + m_osci->SetTriggerConfig(m_trgConfig[i]); + else + m_osci->SetTriggerSource(m_trgSource[i]); + m_osci->SetTriggerLevel(m_trgLevel[0][i]); + m_osci->SetTriggerPolarity(m_trgNegative[i]); + m_osci->SetTriggerDelay(m_trgDelay[i]); + m_trgDelayNs[i] = m_osci->GetTriggerDelayNs(); + for (int j=0 ; j<4 ; j++) + m_osci->SetChnOn(i, j, m_chnOn[i][j]); + } + + // select first board + m_board = 0; + m_osci->SelectBoard(m_board); + + // turn on multi board mode + if (m_multiBoard) { + m_osci->SetMultiBoard(true); + for (int i=1 ; iGetNumberOfBoards() ; i++) { + SetTriggerSource(i, 4); // select external trigger + SetTriggerPolarity(i, false); // positive trigger + } + m_osci->SelectBoard(m_board); + } + + // set screen controls from values + UpdateControls(); + + // update screen settings from values + for (int i=0 ; iGetNumberOfBoards() ; i++) { + for (int j=0 ; j<4 ; j++) { + m_screen->SetChnOn(i, j, m_chnOn[i][j]); + m_screen->SetPos(i, j, m_chnOffset[i][j]/1000.0); + m_screen->SetScale(i, j, m_chnScale[i][j]); + } + m_screen->SetHScale(i, m_HScale[i]); + m_screen->SetScreenOffset(i, m_HOffset[i]); + } + m_screen->SetSplitMode(m_splitMode); + m_screen->SetDisplayScalers(m_displayScalers); + + // Start acquisition + m_single = false; + m_running = true; + m_rearm = false; + m_osci->Enable(true); + m_osci->SetRunning(m_running); + m_timer->Start(100, true); + m_acquisitions = 0; + m_stopWatch.Start(); + m_stopWatch1.Start(); +} + +/*------------------------------------------------------------------*/ + +DOFrame::~DOFrame() +{ + m_running = false; + if (m_timer->IsRunning()) + m_timer->Stop(); + delete m_timer; + + SaveConfig(); + + if (m_epthread) { + m_osci->StopThread(); + m_epthread->StopThread(); + } + + /* close file if open */ + if (m_WFFile || m_WFfd) + CloseWFFile(false); + + if (g_epcs) + delete g_epcs; + + for (int i=0 ; iIsMultiBoard() ? m_osci->GetNumberOfBoards() : 1; + + g_epcs->Enter(); + for (int i=0 ; iGetTime(i, j), m_osci->GetWaveformDepth(i)*sizeof(float)); + memcpy(m_waveform[i][j], m_epthread->GetWaveform(i, j), m_osci->GetWaveformDepth(j)*sizeof(float)); + } + } + g_epcs->Leave(); + } +} + +/*------------------------------------------------------------------*/ + +void DOFrame::ClearWaveforms() +{ + // used when switching between boards + if (m_epthread) { + if (!m_osci->IsMultiBoard()) + m_epthread->ClearWaveforms(); + } +} + +/*------------------------------------------------------------------*/ + +void DOFrame::UpdateControls() +{ + if (m_osci->IsMultiBoard() && m_board > 0) { + m_slTrgLevel->Enable(false); + m_rbAuto->Enable(false); + m_rbNormal->Enable(false); + m_bpPolarity->Enable(false); + m_rbSource->Enable(false); + } else { + m_slTrgLevel->Enable(true); + m_rbAuto->Enable(true); + m_rbNormal->Enable(true); + m_bpPolarity->Enable(true); + m_rbSource->Enable(true); + m_btTrgCfg->Enable(); + } + + m_slTrgLevel->SetValue((int)(-m_trgLevel[m_board][0]*1000)); + if (m_trgMode[m_board] == TM_AUTO) + m_rbAuto->SetValue(1); + else + m_rbNormal->SetValue(1); + if (m_trgNegative[m_board]) + m_bpPolarity->SetBitmapLabel(wxBitmap(neg_xpm)); + else + m_bpPolarity->SetBitmapLabel(wxBitmap(pos_xpm)); + m_rbSource->SetSelection(m_trgSource[m_board]); + m_slTrgDelay->SetValue(100-m_trgDelay[m_board]); + if (m_trgConfig[m_board]) + m_rbSource->Enable(false); + + m_btCh1->SetValue(m_chnOn[m_board][0]); + m_btCh2->SetValue(m_chnOn[m_board][1]); + m_btCh3->SetValue(m_chnOn[m_board][2]); + m_btCh4->SetValue(m_chnOn[m_board][3]); + + m_slPos1->SetValue(m_chnOffset[m_board][0]/2); + m_slPos2->SetValue(m_chnOffset[m_board][1]/2); + m_slPos3->SetValue(m_chnOffset[m_board][2]/2); + m_slPos4->SetValue(m_chnOffset[m_board][3]/2); + + for (int i=0 ; i<4 ; i++) { + m_screen->SetChnOn(m_board, i, m_chnOn[m_board][i]); + m_osci->SetChnOn(m_board, i, m_chnOn[m_board][i]); + m_screen->SetPos(m_board, i, m_chnOffset[m_board][i]/1000.0); + m_screen->SetScale(m_board, i, m_chnScale[m_board][i]); + + wxString wxst; + if (DOScreen::m_scaleTable[m_chnScale[m_board][i]] >= 1000) + wxst.Printf(wxT("%d V"), DOScreen::m_scaleTable[m_chnScale[m_board][i]]/1000); + else + wxst.Printf(wxT("%dmV"), DOScreen::m_scaleTable[m_chnScale[m_board][i]]); + + if (i == 0) m_stScale1->SetLabel(wxst); + if (i == 1) m_stScale2->SetLabel(wxst); + if (i == 2) m_stScale3->SetLabel(wxst); + if (i == 3) m_stScale4->SetLabel(wxst); + } + + // set initial horizontal scale and offset + m_screen->SetHScale(m_board, m_HScale[m_board]); + + // calculate trigger position from screen offset + double trgFrac = (GetTrgPosition(m_board) - m_HOffset[m_board]) / m_screen->GetScreenSize(m_board); + RecalculateHOffset(trgFrac); + + wxString wxstr; + if (DOScreen::m_hscaleTable[m_screen->GetHScale(m_board)] >= 1000) { + wxstr.Printf(wxT("%d us/div"), DOScreen::m_hscaleTable[m_HScale[m_board]]/1000); + } else { + wxstr.Printf(wxT("%d ns/div"), DOScreen::m_hscaleTable[m_HScale[m_board]]); + } + m_stHScale->SetLabel(wxstr); + + // enable trigger config button for evaluation boards V4.0 & above + if (m_osci->GetNumberOfBoards() > 0) { + if (m_osci->GetCurrentBoard()->GetBoardType() < 8) { + EnableTriggerConfig(false); + } else { + if (m_osci->IsMultiBoard() && m_board > 0) + EnableTriggerConfig(false); + else + EnableTriggerConfig(true); + } + } +} + +/*------------------------------------------------------------------*/ + +float *DOFrame::GetTime(int b, int c) +{ + if (m_epthread) + return m_time[b][c]; + else + return m_osci->GetTime(b, c); +} + +/*------------------------------------------------------------------*/ + +float *DOFrame::GetWaveform(int b, int c) +{ + if (m_epthread) + return m_waveform[b][c]; + else + return m_osci->GetWaveform(b, c); +} + +/*------------------------------------------------------------------*/ + +double DOFrame::GetActSamplingSpeed() +{ + return m_osci->GetTrueSamplingSpeed(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::UpdateStatusBar() +{ + if (m_osci->GetNumberOfBoards() == 0) { + SetStatusText(wxT("No DRS boards found!")); + } else { + DRSBoard *b = m_osci->GetCurrentBoard(); + wxString wxstr; + +#ifdef HAVE_VME + if (b->GetTransport() == 1) + wxstr.Printf(wxT("Connected to VME board slot %2d %s, serial #%d, firmware revision %d, T=%1.1lf C"), + (b->GetSlotNumber() >> 1)+2, ((b->GetSlotNumber() & 1) == 0) ? "upper" : "lower", + b->GetBoardSerialNumber(), b->GetFirmwareVersion(), b->GetTemperature()); + else +#endif + wxstr.Printf(wxT("Connected to USB board #%d, serial #%d, firmware revision %d, T=%1.1lf C"), + b->GetSlotNumber(), b->GetBoardSerialNumber(), b->GetFirmwareVersion(), b->GetTemperature()); + + SetStatusText(wxstr); + } +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SaveConfig() +{ + char str[256], name[256], filename[1024]; + + strcpy(filename, "drsosc.cfg"); + +#ifdef _MSC_VER + if (getenv("APPDATA")) { + strlcpy(filename, getenv("APPDATA"), sizeof(filename)); + strlcat(filename, "\\DRSOsc", sizeof(filename)); + mkdir(filename); + strlcat(filename, "\\drsosc.cfg", sizeof(filename)); + } else + strcpy(filename, "drsosc.cfg"); +#endif + +#ifdef OS_DARWIN + strcpy(filename, "DRSOsc.app/drsosc.cfg"); +#endif + + MXML_WRITER *xml = mxml_open_file(filename); + if (xml == NULL) { + wxMessageBox(wxT("Error writing to configuration file"), wxT("DRSOsc"), wxOK | wxICON_ERROR); + return; + } + + mxml_start_element(xml, "DRSOsc"); + + sprintf(str, "%d", (int)m_multiBoard); + mxml_write_element(xml, "MultiBoard", str); + + sprintf(str, "%d", (int)m_splitMode); + mxml_write_element(xml, "SplitMode", str); + + for (int b=0 ; bGetNumberOfBoards() ; b++) { + sprintf(str, "Board-%d", m_osci->GetBoard(b)->GetBoardSerialNumber()); + mxml_start_element(xml, str); + + sprintf(str, "%1.3lf", m_trgLevel[b][0]); + mxml_write_element(xml, "TrgLevel1", str); + sprintf(str, "%1.3lf", m_trgLevel[b][1]); + mxml_write_element(xml, "TrgLevel2", str); + sprintf(str, "%1.3lf", m_trgLevel[b][2]); + mxml_write_element(xml, "TrgLevel3", str); + sprintf(str, "%1.3lf", m_trgLevel[b][3]); + mxml_write_element(xml, "TrgLevel4", str); + sprintf(str, "%d", m_trgMode[b]); + mxml_write_element(xml, "TrgMode", str); + sprintf(str, "%d", m_trgNegative[b]); + mxml_write_element(xml, "TrgNegative", str); + sprintf(str, "%d", m_trgSource[b]); + mxml_write_element(xml, "TrgSource", str); + sprintf(str, "%d", m_trgDelay[b]); + mxml_write_element(xml, "TrgDelay", str); + sprintf(str, "%d", m_trgConfig[b]); + mxml_write_element(xml, "TrgConfig", str); + + sprintf(str, "%d", m_HScale[b]); + mxml_write_element(xml, "HScale", str); + sprintf(str, "%1.3lg", m_reqSamplingSpeed); + mxml_write_element(xml, "SamplingSpeed", str); + sprintf(str, "%d", m_freqLocked); + mxml_write_element(xml, "FreqLocked", str); + sprintf(str, "%d", m_HOffset[b]); + mxml_write_element(xml, "HOffset", str); + + for (int i=0 ; i<4 ; i++) { + sprintf(name, "ChnOn%d", i); + sprintf(str, "%d", m_chnOn[b][i]); + mxml_write_element(xml, name, str); + sprintf(name, "ChnOffset%d", i); + sprintf(str, "%d", m_chnOffset[b][i]); + mxml_write_element(xml, name, str); + sprintf(name, "ChnScale%d", i); + sprintf(str, "%d", m_chnScale[b][i]); + mxml_write_element(xml, name, str); + } + + sprintf(str, "%d", m_chnSection); + mxml_write_element(xml, "ChnSection", str); + + sprintf(str, "%d", m_clkOn); + mxml_write_element(xml, "ClkOn", str); + + sprintf(str, "%1.2lf", m_range[b]); + mxml_write_element(xml, "Range", str); + + sprintf(str, "%d", m_spikeRemoval); + mxml_write_element(xml, "SpikeRemoval", str); + + sprintf(str, "%d", (int)m_refClk[b]); + mxml_write_element(xml, "ExtRefclk", str); + + sprintf(str, "%d", (int)m_displayScalers); + mxml_write_element(xml, "DisplayScalers", str); + + mxml_end_element(xml); + } + + mxml_end_element(xml); + mxml_close_file(xml); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::LoadConfig(char *error, int size) +{ + int i, j, idx, fh; + char filename[1024]; + + strcpy(filename, "drsosc.cfg"); + +#ifdef _MSC_VER + if (getenv("APPDATA")) { + strlcpy(filename, getenv("APPDATA"), sizeof(filename)); + strlcat(filename, "\\DRSOsc", sizeof(filename)); + mkdir(filename); + strlcat(filename, "\\drsosc.cfg", sizeof(filename)); + } else + strcpy(filename, "drsosc.cfg"); +#endif + +#ifdef OS_DARWIN + strcpy(filename, "DRSOsc.app/drsosc.cfg"); +#endif + + /* try to create configuration file to see if we have write access */ + fh = open(filename, O_RDWR | O_CREAT | O_APPEND, 0644); + if (fh < 0) { + wxString str = wxT("Error creating configuration file "); + str += (const wxString &)filename; + wxMessageBox((const wxChar*)wxString::FromAscii((const char*)str), wxT("DRSOsc"), wxOK | wxICON_ERROR); + return; + } + close(fh); + + PMXML_NODE root = mxml_parse_file(filename, error, size, NULL); + if (root == NULL) { + wxMessageBox(wxT("Error reading from configuration file"), wxT("DRSOsc"), wxOK | wxICON_ERROR); + return; + } + + PMXML_NODE osc = mxml_find_node(root, "DRSOsc"); + if (osc == NULL) { + mxml_free_tree(root); + return; + } + + PMXML_NODE node = mxml_find_node(osc, "MultiBoard"); + if (node) m_multiBoard = atoi(mxml_get_value(node)) > 0; + + node = mxml_find_node(osc, "SplitMode"); + if (node) m_splitMode = atoi(mxml_get_value(node)) > 0; + + for (i=idx=0 ; ; i++) { + PMXML_NODE b = mxml_subnode(osc, i); + if (!b) + break; + + node = mxml_find_node(b, "TrgLevel1"); + if (!node) + continue; // node is not a board + + if (node) m_trgLevel[idx][0] = atof(mxml_get_value(node)); + node = mxml_find_node(b, "TrgLevel2"); + if (node) m_trgLevel[idx][1] = atof(mxml_get_value(node)); + node = mxml_find_node(b, "TrgLevel3"); + if (node) m_trgLevel[idx][2] = atof(mxml_get_value(node)); + node = mxml_find_node(b, "TrgLevel4"); + if (node) m_trgLevel[idx][3] = atof(mxml_get_value(node)); + node = mxml_find_node(b, "TrgMode"); + if (node) m_trgMode[idx] = atoi(mxml_get_value(node)); + node = mxml_find_node(b, "TrgNegative"); + if (node) m_trgNegative[idx] = atoi(mxml_get_value(node)) == 1; + node = mxml_find_node(b, "TrgSource"); + if (node) m_trgSource[idx] = atoi(mxml_get_value(node)); + node = mxml_find_node(b, "TrgDelay"); + if (node) m_trgDelay[idx] = atoi(mxml_get_value(node)); + node = mxml_find_node(b, "TrgConfig"); + if (node) m_trgConfig[idx] = atoi(mxml_get_value(node)); + node = mxml_find_node(b, "HScale"); + if (node) m_HScale[idx] = atoi(mxml_get_value(node)); + node = mxml_find_node(b, "SamplingSpeed"); + if (node) m_reqSamplingSpeed = atof(mxml_get_value(node)); + node = mxml_find_node(b, "FreqLocked"); + if (node) m_freqLocked = atoi(mxml_get_value(node)) == 1; + node = mxml_find_node(b, "HOffset"); + if (node) m_HOffset[idx] = atoi(mxml_get_value(node)); + + for (j=0 ; j<4 ; j++) { + char str[256]; + sprintf(str, "ChnOn%d", j); + node = mxml_find_node(b, str); + if (node) m_chnOn[idx][j] = atoi(mxml_get_value(node)) == 1; + sprintf(str, "ChnOffset%d", j); + node = mxml_find_node(b, str); + if (node) m_chnOffset[idx][j] = atoi(mxml_get_value(node)); + sprintf(str, "ChnScale%d", j); + node = mxml_find_node(b, str); + if (node) m_chnScale[idx][j] = atoi(mxml_get_value(node)); + } + + node = mxml_find_node(b, "ChnSection"); + if (node) m_chnSection = atoi(mxml_get_value(node)); + + node = mxml_find_node(b, "ClkOn"); + if (node) m_clkOn = atoi(mxml_get_value(node)) == 1; + + node = mxml_find_node(b, "Range"); + if (node) m_range[idx] = atof(mxml_get_value(node)); + + node = mxml_find_node(b, "SpikeRemoval"); + if (node) m_spikeRemoval = atoi(mxml_get_value(node)) == 1; + + node = mxml_find_node(b, "ExtRefclk"); + if (node) m_refClk[idx] = atoi(mxml_get_value(node)) == 1; + + node = mxml_find_node(b, "DisplayScalers"); + if (node) m_displayScalers = atoi(mxml_get_value(node)) == 1; + + idx++; + } + + mxml_free_tree(root); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnSave(wxCommandEvent& WXUNUSED(event)) +{ + wxString filename; + + if (!m_WFFile && !m_WFfd) { + filename = wxFileSelector(wxT("Choose a file to write to"), wxEmptyString, + wxEmptyString, wxT(".xml"), wxT("XML file (*.xml)|*.xml|Binary file (*.dat)|*.dat"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT); + + if (!filename.empty()) { + + m_nSaveMax = wxGetNumberFromUser(wxT("Number of events to be saved:"), wxT(""), wxT("DRSOsc"), 1000, 1, 1000000000); + if (m_nSaveMax > 0) { + SetSaveBtn(wxT("Close"), wxT("Stop saving waveforms")); + if (filename.Find(wxT(".xml")) != wxNOT_FOUND) { + m_WFfd = 0; + m_WFFile = mxml_open_file(filename.char_str()); + if (m_WFFile) + mxml_start_element(m_WFFile, "DRSOSC"); + } else { + m_WFFile = NULL; + m_WFfd = open(filename.char_str(), O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0644); + assert(m_WFfd > 0); + } + m_osci->SetEventSerial(1); + m_nSaved = 0; + } + } + } else { + CloseWFFile(false); + } +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SaveHisto() +{ + wxString filename; + + m_osci->Enable(false); + + filename = wxFileSelector(wxT("Choose a file to write to"), wxEmptyString, + wxEmptyString, wxT(".txt"), wxT("Text file (*.txt)|*.txt"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT); + + if (!filename.empty()) { + + int fd = open(filename.char_str(), O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0644); + assert(fd > 0); + + m_screen->SaveHisto(fd); + + close(fd); + } + + m_osci->Enable(true); +} + +/*------------------------------------------------------------------*/ + +wxPrintDialogData g_printDialogData; + +void DOFrame::OnPrint(wxCommandEvent& WXUNUSED(event)) +{ + wxPrinter p(&g_printDialogData); + MyPrintout printout(m_screen, wxT("My printout")); + if (!p.Print(this, &printout, true)) { + if (wxPrinter::GetLastError() == wxPRINTER_ERROR) + wxMessageBox(wxT("There was a problem printing.\nPerhaps your current printer is not set correctly?"), wxT("Printing"), wxOK); + else + wxMessageBox(wxT("You cancelled printing"), + wxT("Printing"), wxOK); + } else + g_printDialogData = p.GetPrintDialogData(); +} + +/*------------------------------------------------------------------*/ + +bool MyPrintout::OnPrintPage(int page) +{ + wxCoord w, h; + + wxDC *dc = wxPrintout::GetDC(); + if (dc == NULL) + return false; + + dc->GetSize(&w, &h); + FitThisSizeToPage(wxSize(800, 600)); + m_screen->DrawScope(*dc, 800, 600, true); + + return true; +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnConfig( wxCommandEvent& event ) +{ + m_configDialog->Show(true); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnMeasure( wxCommandEvent& event ) +{ + m_measureDialog->Show(true); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnDisplay( wxCommandEvent& event ) +{ + m_displayDialog->Show(true); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnExit( wxCommandEvent& event ) +{ + Close(true); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnAbout( wxCommandEvent& event ) +{ + AboutDialog ad(this); + ad.ShowModal(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnTrgLevelChange(wxScrollEvent& event) +{ + double f = (-m_slTrgLevel->GetValue()) / 1000.0; // -0.5 ... 0.5 + + /* convert to voltage according to screen settings */ + int chn = m_trgSource[m_board]; + m_trgLevel[m_board][0] = m_screen->GetScale(m_board, chn)*10*f/1000 + m_screen->GetOffset(m_board, chn); + m_trgLevel[m_board][1] = m_trgLevel[m_board][0]; + m_trgLevel[m_board][2] = m_trgLevel[m_board][0]; + m_trgLevel[m_board][3] = m_trgLevel[m_board][0]; + m_lastTriggerUpdate = time(NULL); + m_osci->SetTriggerLevel(m_trgLevel[m_board][0]); + m_triggerDialog->SetTriggerLevel(m_trgLevel[m_board][chn]); + m_screen->Refresh(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetTrgLevel(int i, double value) +{ + if (i<4) { + m_trgLevel[m_board][i] = value; + m_osci->SetIndividualTriggerLevel(i, value); + } + m_lastTriggerUpdate = time(NULL); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnTrgDelayChange(wxScrollEvent& event) +{ + m_trgDelay[m_board] = 100-m_slTrgDelay->GetValue(); + m_osci->SetTriggerDelay(m_trgDelay[m_board]); + m_trgDelayNs[m_board] = m_osci->GetTriggerDelayNs(); + m_screen->Refresh(); +} + +/*------------------------------------------------------------------*/ + +double DOFrame::GetTrgPosition(int board) +{ + // return current trigger position in ns relative to left edge of waveform + return m_osci->GetWaveformLength() - m_trgDelayNs[board]; +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnTrigger(wxCommandEvent& event) +{ + if (event.GetId() == ID_RUN) { + if (m_running) { + m_running = false; + m_single = false; + m_osci->SetRunning(false); + m_osci->SetSingle(false); + m_btRun->SetLabel(wxT("Run")); + m_acqPerSecond = 0; + m_acquisitions = 0; + m_oldIdle = false; + } else { + m_running = true; + m_single = false; + m_osci->SetSingle(false); + m_osci->SetRunning(true); + m_btRun->SetLabel(wxT("Stop")); + m_acquisitions = 0; + m_oldIdle = false; + m_stopWatch.Start(); + m_stopWatch1.Start(); + } + } else if (event.GetId() == ID_SINGLE) { + if (m_running) + m_osci->SetRunning(false); + m_running = false; + m_osci->SetSingle(true); + m_single = true; + m_btRun->SetLabel(wxT("Run")); + + if (m_osci->IsArmed()) { + /* no trigger happened, so issue a software trigger */ + m_osci->SingleTrigger(); + m_rearm = true; + } else + m_osci->Start(); + + m_acqPerSecond = 0; + m_acquisitions = 0; + } else if (event.GetId() == ID_TRGCFG) { + m_triggerDialog->Show(); + } + + m_screen->Refresh(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnTrgButton(wxCommandEvent& event) +{ + if (event.GetId() == ID_TR_NORMAL) { + m_trgMode[m_board] = TM_NORMAL; + } else if (event.GetId() == ID_TR_AUTO) { + m_trgMode[m_board] = TM_AUTO; + } else if (event.GetId() == ID_TR_POLARITY) { + m_trgNegative[m_board] = !m_trgNegative[m_board]; + if (m_trgNegative[m_board]) + m_bpPolarity->SetBitmapLabel(wxBitmap(neg_xpm)); + else + m_bpPolarity->SetBitmapLabel(wxBitmap(pos_xpm)); + } else if (event.GetId() == ID_TR_SOURCE) { + m_trgSource[m_board] = m_rbSource->GetSelection(); + } + + m_osci->SetTriggerMode(m_trgMode[m_board]); + if (m_trgConfig[m_board]) + m_osci->SetTriggerConfig(m_trgConfig[m_board]); + else + m_osci->SetTriggerSource(m_trgSource[m_board]); + m_osci->SetTriggerPolarity(m_trgNegative[m_board]); + m_osci->SetTriggerDelay(m_trgDelay[m_board]); + m_lastTriggerUpdate = time(NULL); + m_screen->Refresh(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetTriggerSource(int b, int source) +{ + m_trgSource[b] = source; + m_osci->SelectBoard(b); + m_osci->SetTriggerSource(source); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetTriggerPolarity(int b, bool negative) +{ + m_trgNegative[b] = negative; + m_osci->SelectBoard(b); + m_osci->SetTriggerPolarity(negative); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnChnOn(wxCommandEvent& event) +{ + int i, id; + + id = event.GetId(); + + if (id == ID_CHON1) i = 0; + if (id == ID_CHON2) i = 1; + if (id == ID_CHON3) i = 2; + if (id == ID_CHON4) i = 3; + + m_chnOn[m_board][i] = event.IsChecked(); + m_screen->SetChnOn(m_board, i, event.IsChecked()); + m_osci->SetChnOn(0, i, event.IsChecked()); + m_screen->Refresh(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnPosChange(wxScrollEvent& event) +{ + // 2mV per tick -0.5 ... +0.5 V + m_chnOffset[m_board][0] = m_slPos1->GetValue()*2; + m_chnOffset[m_board][1] = m_slPos2->GetValue()*2; + m_chnOffset[m_board][2] = m_slPos3->GetValue()*2; + m_chnOffset[m_board][3] = m_slPos4->GetValue()*2; + for (int i=0 ; i<4 ; i++) + m_screen->SetPos(m_board, i, m_chnOffset[m_board][i]/1000.0); + + m_screen->Refresh(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnScaleChange(wxCommandEvent& event) +{ + int id, i, inc; + + id = event.GetId(); + + if (id == ID_SCALEUP1) { i=0; inc = -1; } + if (id == ID_SCALEUP2) { i=1; inc = -1; } + if (id == ID_SCALEUP3) { i=2; inc = -1; } + if (id == ID_SCALEUP4) { i=3; inc = -1; } + + if (id == ID_SCALEDN1) { i=0; inc = +1; } + if (id == ID_SCALEDN2) { i=1; inc = +1; } + if (id == ID_SCALEDN3) { i=2; inc = +1; } + if (id == ID_SCALEDN4) { i=3; inc = +1; } + + m_chnScale[m_board][i] += inc; + if (m_chnScale[m_board][i] > 9) + m_chnScale[m_board][i] = 9; + if (m_chnScale[m_board][i] < 0) + m_chnScale[m_board][i] = 0; + + m_screen->SetScale(m_board, i, m_chnScale[m_board][i]); + + wxString wxst; + if (DOScreen::m_scaleTable[m_chnScale[m_board][i]] >= 1000) + wxst.Printf(wxT("%d V"), DOScreen::m_scaleTable[m_chnScale[m_board][i]]/1000); + else + wxst.Printf(wxT("%dmV"), DOScreen::m_scaleTable[m_chnScale[m_board][i]]); + + if (i == 0) m_stScale1->SetLabel(wxst); + if (i == 1) m_stScale2->SetLabel(wxst); + if (i == 2) m_stScale3->SetLabel(wxst); + if (i == 3) m_stScale4->SetLabel(wxst); + + m_screen->Refresh(); + StatReset(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::ChangeHScale(int delta) +{ + // remember current trigger position inside screen + double trgFrac = (GetTrgPosition(m_board)-m_screen->GetScreenOffset(m_board)) / m_screen->GetScreenSize(m_board); + + // change screen scale + if (delta) + m_screen->SetHScaleInc(m_board, delta < 0 ? -1 : +1); + m_HScale[m_board] = m_screen->GetHScale(m_board); + + // adjust sampling speed if necessary + if (!m_freqLocked) { + m_reqSamplingSpeed = 100.0/DOScreen::m_hscaleTable[m_HScale[m_board]]; + if (m_reqSamplingSpeed > m_osci->GetMaxSamplingSpeed()) + m_reqSamplingSpeed = m_osci->GetMaxSamplingSpeed(); + if (m_reqSamplingSpeed < m_osci->GetMinSamplingSpeed()) + m_reqSamplingSpeed = m_osci->GetMinSamplingSpeed(); + m_osci->SetSamplingSpeed(m_reqSamplingSpeed); + } + + // update config dialog + if (m_configDialog != NULL) + m_configDialog->FreqChange(); + + RecalculateHOffset(trgFrac); + StatReset(); +} + +void DOFrame::RecalculateHOffset(double trgFrac) +{ + wxString wxstr; + + // force recalculation of trigger delay + m_osci->SetTriggerDelay(m_trgDelay[m_board]); + m_trgDelayNs[m_board] = m_osci->GetTriggerDelayNs(); + + // calculate new screen offset to keep trigger point at same position + m_HOffset[m_board] = (int)(GetTrgPosition(m_board) - trgFrac * (double)m_screen->GetScreenSize(m_board) + 0.5); + + // adjust horizontal slider accordingly + double v = (m_HOffset[m_board] + m_screen->GetScreenSize(m_board)/2 - m_osci->GetWaveformLength()/2) / m_osci->GetWaveformLength(); + if (v < -0.5) // limit range + v = -0.5; + if (v > 0.5) + v = 0.5; + m_slHOffset->SetValue((int)(-v*2000 + 0.5)); + + // convert back slider setting to m_HOffset with valid range + m_HOffset[m_board] = (int)(m_osci->GetWaveformLength()*v - m_screen->GetScreenSize(m_board)/2 + m_osci->GetWaveformLength()/2 + 0.5); + + m_screen->SetScreenOffset(m_board, m_HOffset[m_board]); + + // update label + if (DOScreen::m_hscaleTable[m_HScale[m_board]] >= 1000) { + wxstr.Printf(wxT("%d us/div"), DOScreen::m_hscaleTable[m_HScale[m_board]]/1000); + } else { + wxstr.Printf(wxT("%d ns/div"), DOScreen::m_hscaleTable[m_HScale[m_board]]); + } + m_stHScale->SetLabel(wxstr); + + m_screen->Refresh(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnHScaleChange(wxCommandEvent& event) +{ + if (event.GetId() == ID_HSCALEUP) + ChangeHScale(-1); + else + ChangeHScale(+1); + StatReset(); + m_screen->Refresh(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnHOffsetChange(wxScrollEvent& event) +{ + double v = -m_slHOffset->GetValue()/2000.0; // -0.5 ... +0.5 + + // scale from (size/2-length) to (size/2) + m_HOffset[m_board] = (int)(m_osci->GetWaveformLength()*v - m_screen->GetScreenSize(m_board)/2 + m_osci->GetWaveformLength()/2 + 0.5); + m_screen->SetScreenOffset(m_board, m_HOffset[m_board]); + m_screen->Refresh(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnZero(wxMouseEvent& event) +{ + if (event.GetId() == ID_HOR_POS) { + m_slHOffset->SetValue(0); + OnHOffsetChange((wxScrollEvent&)event); + } + if (event.GetId() == ID_TR_LEVEL) { + m_slTrgLevel->SetValue(0); + OnTrgLevelChange((wxScrollEvent&)event); + } + if (event.GetId() == ID_POS1) { + m_slPos1->SetValue(0); + OnPosChange((wxScrollEvent&)event); + } + if (event.GetId() == ID_POS2) { + m_slPos2->SetValue(0); + OnPosChange((wxScrollEvent&)event); + } + if (event.GetId() == ID_POS3) { + m_slPos3->SetValue(0); + OnPosChange((wxScrollEvent&)event); + } + if (event.GetId() == ID_POS4) { + m_slPos4->SetValue(0); + OnPosChange((wxScrollEvent&)event); + } +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetDisplayDateTime(bool flag) +{ + m_screen->SetDisplayDateTime(flag); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetDisplayShowGrid(bool flag) +{ + m_screen->SetDisplayShowGrid(flag); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetDisplayLines(bool flag) +{ + m_screen->SetDisplayLines(flag); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetDisplayMode(int mode, int n) +{ + m_screen->SetDisplayMode(mode, n); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetDisplayScalers(bool flag) +{ + m_displayScalers = flag; + m_screen->SetDisplayScalers(flag); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetDisplayCalibrated(bool flag) +{ + m_osci->SetCalibrated(flag); + StatReset(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetDisplayCalibrated2(bool flag) +{ + m_osci->SetCalibrated2(flag); + StatReset(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetDisplayTCalOn(bool flag) +{ + m_osci->SetTCalOn(flag); + StatReset(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetDisplayTrgCorr(bool flag) +{ + m_trgCorr = flag; +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetRefclk(int b, bool flag) +{ + m_refClk[b] = flag; + m_osci->SelectBoard(b); + m_osci->SetRefclk(b, flag); + SetSamplingSpeed(m_reqSamplingSpeed); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SelectBoard(int board) +{ + m_board = board; + m_configDialog->SelectBoard(board); + m_triggerDialog->SelectBoard(board); + ClearWaveforms(); + UpdateControls(); + UpdateStatusBar(); + StatReset(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetMultiBoard(bool flag) +{ + m_multiBoard = flag; +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetSource(int board, int firstChannel, int chnSection) +{ + m_board = board; + m_firstChannel = firstChannel; + m_chnSection = chnSection; +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetDisplayRotated(bool flag) +{ + m_osci->SetRotated(flag); + StatReset(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::ToggleControls() +{ + if (m_hideControls) { + m_pnControls->Show(); + m_hideControls = false; + } else { + m_pnControls->Hide(); + m_hideControls = true; + } + this->Layout(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnTimer(wxTimerEvent& event) +{ + char str[256]; + + if (m_first) { + if (m_osci->GetError(str, sizeof(str))) + wxMessageBox((const wxChar*)wxString::FromAscii(str), + wxT("DRS Oscilloscope Error"), wxOK | wxICON_STOP, this); + + if (m_osci->GetNumberOfBoards() == 0) + wxMessageBox(wxT("No DRS board found\r\nRunning in demo mode"), + wxT("DRS Oscilloscope Error"), wxOK | wxICON_STOP, this); + + if (m_osci->GetNumberOfBoards() && + fabs(GetRange() - GetOsci()->GetCalibratedInputRange()) > 0.001) { + wxString str; + + str.Printf(wxT("This board was calibrated at %1.2lg V ... %1.2lg V\nYou must recalibrate the board if you use a different input range"), + GetOsci()->GetCalibratedInputRange()-0.5, GetOsci()->GetCalibratedInputRange()+0.5); + wxMessageBox((const wxChar*)wxString::FromAscii((const char*)str), wxT("DRS Oscilloscope Warning"), wxOK | wxICON_EXCLAMATION, this); + } + + // issue warning if timing calibration not valid + m_osci->CheckTimingCalibration(); + } + + m_first = false; + + /* calculate number of acquistions once per second */ + if (m_osci->GetNumberOfBoards() > 0 && m_stopWatch.Time() > 1000) { + if (g_epcs) + g_epcs->Enter(); + m_acqPerSecond = (int) (1000.0 * m_acquisitions / m_stopWatch.Time() + 0.5); + m_acquisitions = 0; + if (g_epcs) + g_epcs->Leave(); + + m_stopWatch.Start(); + + // update temperature and number of acquisitions + UpdateStatusBar(); + } + + if (m_epthread == NULL) { + // handle event processing in the main thread + if (m_running) { + if (m_osci->HasNewEvent()) { + ProcessEvents(); + m_oldIdle = false; + m_stopWatch1.Start(); + } else { + if (m_osci->GetTriggerMode() == TM_AUTO && m_stopWatch1.Time() > 1000) { + m_osci->SingleTrigger(); + while (!m_osci->HasNewEvent()); + m_osci->ReadWaveforms(); + ProcessEvents(); + m_acquisitions++; + } + } + } + + if (m_single) { + if (m_osci->HasNewEvent()) { + ProcessEvents(); + m_oldIdle = false; + } + } + + if (m_osci->IsIdle() && !m_oldIdle) { + m_oldIdle = true; + m_screen->Refresh(); // need one refresh to display "TRIG?" + } + + m_timer->Start(10, true); + } else { + m_screen->Refresh(); + m_timer->Start(40, true); + } +} + +/*------------------------------------------------------------------*/ + +void DOFrame::ProcessEvents(void) +{ + int status; + wxStopWatch sw; + + while (m_osci->HasNewEvent() && sw.Time() < 100) { + m_osci->ReadWaveforms(); + if (m_rearm) { + m_osci->Start(); + m_rearm = false; + } + + if (m_trgCorr) + m_osci->CorrectTriggerPoint(GetTrgPosition(0)); + if (m_WFFile || m_WFfd) { + status = m_osci->SaveWaveforms(m_WFFile, m_WFfd); + if (status < 0) + CloseWFFile(true); + IncrementSaved(); + if (m_nSaved >= m_nSaveMax) + CloseWFFile(false); + } + + EvaluateMeasurements(); + IncrementAcquisitions(); + + if (m_osci->GetNumberOfBoards() == 0) + break; + } + + m_screen->Refresh(); +} + +void DOFrame::IncrementAcquisitions() +{ + if (g_epcs) + g_epcs->Enter(); + m_acquisitions++; + if (g_epcs) + g_epcs->Leave(); +} + +void DOFrame::IncrementSaved() +{ + m_nSaved++; +} + +/*------------------------------------------------------------------*/ + +void DOFrame::CloseWFFile(bool errorFlag) +{ + if (errorFlag) + wxMessageBox(wxT("Error writing waveforms to file\nWriting will be stopped"), + wxT("DRS Oscilloscope Error"), wxOK | wxICON_STOP, this); + + if (g_epcs) + g_epcs->Enter(); + if (m_WFFile) + mxml_close_file(m_WFFile); + if (m_WFfd) + close(m_WFfd); + m_WFFile = NULL; + m_WFfd = 0; + if (g_epcs) + g_epcs->Leave(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetSaveBtn(wxString l, wxString t) +{ + m_btSave->SetLabel(l); + m_btSave->SetToolTip(t); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::EvaluateMeasurements() +{ + double x1[2048], y1[2048], x2[2048], y2[2048]; + + double t1 = m_screen->GetT1(); + double t2 = m_screen->GetT2(); + + for (int idx = 0 ; idxIsMultiBoard()) + wfIndex = m_osci->GetCurrentBoardIndex(); + else + wfIndex = 0; + + if (m && m_osci->GetWaveformDepth(chn)) { + float *wf1 = m_osci->GetWaveform(wfIndex, chn); + float *wf2 = m_osci->GetWaveform(wfIndex, (chn+1)%4); + float *time1 = m_osci->GetTime(wfIndex, chn); + float *time2 = m_osci->GetTime(wfIndex, (chn+1)%4); + int n_inside = 0; + + for (int i=0 ; iGetWaveformDepth(chn) ; i++) { + if (time1[i] >= t1) { + x1[n_inside] = time1[i]; + y1[n_inside] = wf1[i]; + x2[n_inside] = time2[i]; + y2[n_inside] = wf2[i]; + n_inside++; + } + if (time1[i] > t2) + break; + } + + m->Measure(x1, y1, x2, y2, n_inside); + } + } + } +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnCursor(wxCommandEvent& event) +{ + if (event.GetId() == ID_CURSORA) { + if (m_toggleCursorA->GetValue() == 1) { + m_cursorA = true; + m_actCursor = 1; + } else { + m_cursorA = false; + if (m_actCursor == 1) + m_actCursor = 0; + } + } else { + if (m_toggleCursorB->GetValue() == 1) { + m_cursorB = true; + m_actCursor = 2; + } else { + m_cursorB = false; + if (m_actCursor == 2) + m_actCursor = 0; + } + } + + m_screen->Refresh(); +} + +void DOFrame::SetCursorA(bool flag) +{ + m_cursorA = flag; + m_toggleCursorA->SetValue(flag); +} + +void DOFrame::SetCursorB(bool flag) +{ + m_cursorB = flag; + m_toggleCursorA->SetValue(flag); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::OnSnap(wxCommandEvent& event) +{ + m_snap = event.IsChecked(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetMeasurement(int id, bool flag) +{ + int m, chn; + + m = (id - ID_LEVEL1) / 4; + chn = (id - ID_LEVEL1) % 4; + + if (m < Measurement::N_MEASUREMENTS) { + m_measFlag[m][chn] = flag; + m_measurement[m][chn]->ResetStat(); + } +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetMathDisplay(int id, bool flag) +{ + m_screen->SetMathDisplay(id, flag); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetStat(bool flag) +{ + m_stat = flag; + StatReset(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetHist(bool flag) +{ + m_hist = flag; +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetStatNStat(int n) +{ + for (int i=0 ; iSetNStat(n); +} + + +/*------------------------------------------------------------------*/ + +void DOFrame::SetIndicator(bool flag) +{ + m_indicator = flag; +} + +/*------------------------------------------------------------------*/ + +Measurement* DOFrame::GetMeasurement(int m, int chn) +{ + if (m>=0 && m=0 && chn<4) + if (m_measFlag[m][chn]) + return m_measurement[m][chn]; + + return NULL; +} + +/*------------------------------------------------------------------*/ + +void DOFrame::StatReset() +{ + for (int i=0 ; iResetStat(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetSamplingSpeed(double speed) +{ + if (speed > m_osci->GetMaxSamplingSpeed()) + speed = m_osci->GetMaxSamplingSpeed(); + if (speed < m_osci->GetMinSamplingSpeed()) + speed = m_osci->GetMinSamplingSpeed(); + + // remember current trigger position inside screen + double trgFrac = (GetTrgPosition(m_board)-m_screen->GetScreenOffset(m_board)) / m_screen->GetScreenSize(m_board); + + m_reqSamplingSpeed = speed; + m_osci->SetSamplingSpeed(speed); + + RecalculateHOffset(trgFrac); + StatReset(); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::EnableTriggerConfig(bool flag) +{ + m_trgConfigEnabled[m_board] = flag; + m_btTrgCfg->Enable(flag); + m_btTrgCfg->Show(flag); +} + +/*------------------------------------------------------------------*/ + +void DOFrame::SetTriggerConfig(int id, bool flag) +{ + int chn; + + if (id >= ID_OR1 && id <= ID_OREXT) { + chn = (id - ID_OR1); + if (flag) + m_trgConfig[m_board] |= (1 << chn); + else + m_trgConfig[m_board] &= ~(1 << chn); + } + + if (id >= ID_AND1 && id <= ID_ANDEXT) { + chn = (id - ID_AND1); + if (flag) + m_trgConfig[m_board] |= (1 << (chn+8)); + else + m_trgConfig[m_board] &= ~(1 << (chn+8)); + } + + if (id == ID_TRANS) { + if (flag) { + m_trgConfig[m_board] |= (1<<15); + m_trgConfig[m_board] &= ~((1<<4) | (1<<12)); // remove possible EXT trigger + } else + m_trgConfig[m_board] &= ~(1<<15); + } + + if ((m_trgConfig[m_board] & 0x7FFF) > 0) { + m_rbSource->Enable(false); + m_osci->SetTriggerConfig(m_trgConfig[m_board]); + } else { + m_rbSource->Enable(true); + m_osci->SetTriggerSource(m_trgSource[m_board]); + } + +} + +/*------------------------------------------------------------------*/ + +void DOFrame::EnableEPThread(bool flag) +{ + if (m_epthread) + m_epthread->Enable(flag); +} diff --git a/software/drsosc/DOFrame.h b/software/drsosc/DOFrame.h new file mode 100644 index 0000000..93f07f4 --- /dev/null +++ b/software/drsosc/DOFrame.h @@ -0,0 +1,231 @@ +#ifndef __DOFrame__ +#define __DOFrame__ + +// $Id: DOFrame.h 22327 2016-10-11 13:18:26Z ritt $ + +/** +@file +Subclass of DOFrame_fb, which is generated by wxFormBuilder. +*/ + +class EPThread; + +/** Implementing DOFrame_fb */ +class DOFrame : public DOFrame_fb +{ +protected: + void LoadConfig(char *error, int size); + void SaveConfig(void); + + // Handlers for DOFrame_fb events. + void OnConfig(wxCommandEvent& event); + void OnMeasure(wxCommandEvent& event); + void OnDisplay(wxCommandEvent& event); + void OnPrint(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + void OnSave(wxCommandEvent& event); + void OnTrigger(wxCommandEvent& event); + void OnTrgButton(wxCommandEvent& event); + void OnTrgLevelChange(wxScrollEvent& event); + void OnTrgDelayChange(wxScrollEvent& event); + void OnChnOn(wxCommandEvent& event); + void OnPosChange(wxScrollEvent& event); + void OnScaleChange(wxCommandEvent& event); + void OnHScaleChange(wxCommandEvent& event); + void OnHOffsetChange(wxScrollEvent& event); + void OnZero(wxMouseEvent& event); + void OnTimer(wxTimerEvent& event); + void OnCursor(wxCommandEvent& event); + void OnSnap(wxCommandEvent& event); + + void ProcessEvents(void); + +public: + DOFrame( wxWindow* parent ); + ~DOFrame(); + + ConfigDialog *GetConfigDialog() { return m_configDialog; } + wxColor GetColor(int i, bool p) { return p ? m_pcolor[i]: m_color[i]; } + int GetAcqPerSecond() { return m_acqPerSecond; } + double GetTrgLevel(int i) { return m_trgLevel[m_board][i]; } + bool IsTrgConfigEnabled() { return m_trgConfigEnabled[m_board]; } + int GetTrgMode() { return m_trgMode[m_board]; } + int GetTrgSource(int b) { return m_trgSource[b]; } + int GetTrgPolarity() { return m_trgNegative[m_board]; } + double GetTrgDelay() { return m_trgDelayNs[m_board]; } + int GetTriggerConfig() { return m_trgConfig[m_board]; } + double GetTrgPosition(int board); + time_t GetLastTriggerUpdate() { return m_lastTriggerUpdate; } + bool IsIdle(); + bool GetRearm() { return m_rearm; } + bool GetTrgCorr() { return m_trgCorr; } + MXML_WRITER *GetWFFile() { return m_WFFile; } + int GetWFfd() { return m_WFfd; } + int GetNSaved() { return m_nSaved; } + int GetNSaveMax() { return m_nSaveMax; } + void SetRearm(bool f) { m_rearm = f; } + void SetSamplingSpeed(double speed); + double GetReqSamplingSpeed() { return m_reqSamplingSpeed; } + double GetActSamplingSpeed(); + void SetTrgLevel(int i, double value); + Osci *GetOsci() { return m_osci; } + void SetPaintMode(int pm) { m_screen->SetPaintMode(pm); } + void SetDisplayDateTime(bool flag); + void SetDisplayShowGrid(bool flag); + void SetDisplayLines(bool flag); + void SetDisplayMode(int mode, int n); + void SetDisplayScalers(bool flag); + void SetDisplayCalibrated(bool flag); + void SetDisplayCalibrated2(bool flag); + void SetDisplayTCalOn(bool flag); + void SetDisplayTrgCorr(bool flag); + void SetDisplayRotated(bool flag); + void SetCursorA(bool flag); + void SetCursorB(bool flag); + bool IsCursorA() { return m_cursorA; } + bool IsCursorB() { return m_cursorB; } + int ActiveCursor() { return m_actCursor; } + void SetActiveCursor(int c) { m_actCursor = c; } + bool IsSnap() { return m_snap; } + void ToggleControls(); + void SetMeasurement(int id, bool flag); + void SetMathDisplay(int id, bool flag); + void SetTriggerConfig(int id, bool flag); + void SetTriggerSource(int b, int source); + void SetTriggerPolarity(int b, bool negative); + void SetStat(bool flag); + void SetHist(bool flag); + void SetStatNStat(int n); + int GetNStat() { return m_nStat; } + void SetIndicator(bool flag); + void SetClkOn(bool flag){ m_clkOn = flag; m_osci->SetClkOn(flag) ; } + bool GetClkOn() { return m_clkOn; } + void SelectBoard(int board); + int GetCurrentBoard() { return m_board; } + void SetMultiBoard(bool flag); + void SetSplitMode(bool flag) { m_splitMode = flag; m_screen->SetSplitMode(flag); } + bool GetMultiBoard() { return m_multiBoard; } + void SetSource(int board, int firstChannel, int chnSection); + void SetRefclk(int board, bool flag); + bool GetRefclk() { return m_refClk > 0; } + void SetRange(double range){ m_range[m_board] = range; } + double GetRange() { return m_range[m_board]; } + void SetSpikeRemoval(bool flag) { m_spikeRemoval = flag; m_osci->SetSpikeRemoval(flag); } + bool GetSpikeRemovel() { return m_spikeRemoval; } + void StatReset(); + bool IsStat() { return m_stat; } + bool IsHist() { return m_hist; } + bool IsIndicator() { return m_indicator; } + wxTimer *GetTimer() { return m_timer; } + void UpdateStatusBar(); + bool IsFirst() { return m_first; } + void SetFreqLock(bool flag) { m_freqLocked = flag; } + bool IsFreqLocked() { return m_freqLocked; } + void SetProgress(int prog) { m_progress = prog; } + int GetProgress() { return m_progress; } + void UpdateWaveforms(); + void ClearWaveforms(); + void UpdateControls(); + float *GetWaveform(int b, int c); + float *GetTime(int b, int c); + void EnableTriggerConfig(bool flag); + + bool IsMeasurement(int m, int chn); + double GetMeasurement(int idx, double *x, double *y, int n); + wxString GetMeasurementName(int idx) { return m_measurement[idx][0]->GetName(); } + Measurement* GetMeasurement(int idx, int chn); + void EvaluateMeasurements(void); + void ChangeHScale(int delta); + void RecalculateHOffset(double trgFrac); + void CloseWFFile(bool errorFlag); + void SetSaveBtn(wxString l, wxString t); + void IncrementAcquisitions(); + void IncrementSaved(); + void EnableEPThread(bool flag); + void SaveHisto(); + + +private: + DECLARE_EVENT_TABLE() + + DOScreen *m_screen; + Osci *m_osci; + Measurement *m_measurement[Measurement::N_MEASUREMENTS][4]; + bool m_measFlag[Measurement::N_MEASUREMENTS][4]; + bool m_stat; + bool m_hist; + bool m_indicator; + bool m_first; + + wxTimer *m_timer; + ConfigDialog *m_configDialog; + MeasureDialog *m_measureDialog; + TriggerDialog *m_triggerDialog; + DisplayDialog *m_displayDialog; + EPThread *m_epthread; + + float m_time[MAX_N_BOARDS][4][2048]; + float m_waveform[MAX_N_BOARDS][4][2048]; + char m_xmlError[256]; + bool m_running; + bool m_single; + bool m_rearm; + double m_reqSamplingSpeed; + bool m_freqLocked; + bool m_oldIdle; + + double m_trgLevel[MAX_N_BOARDS][4]; + int m_trgMode[MAX_N_BOARDS]; + bool m_trgNegative[MAX_N_BOARDS]; + int m_trgSource[MAX_N_BOARDS]; + int m_trgDelay[MAX_N_BOARDS]; + double m_trgDelayNs[MAX_N_BOARDS]; + int m_trgConfig[MAX_N_BOARDS]; + bool m_trgConfigEnabled[MAX_N_BOARDS]; + bool m_refClk[MAX_N_BOARDS]; + bool m_trgCorr; + + int m_HScale[MAX_N_BOARDS]; + int m_HOffset[MAX_N_BOARDS]; + + bool m_chnOn[MAX_N_BOARDS][4]; + int m_chnOffset[MAX_N_BOARDS][4]; + int m_chnScale[MAX_N_BOARDS][4]; + bool m_clkOn; + double m_range[MAX_N_BOARDS]; + bool m_spikeRemoval; + bool m_displayScalers; + + wxColour m_color[5]; + wxColour m_pcolor[5]; + + int m_acquisitions; + wxStopWatch m_stopWatch; + wxStopWatch m_stopWatch1; + int m_acqPerSecond; + int m_nStat; + + time_t m_lastTriggerUpdate; + + MXML_WRITER *m_WFFile; + int m_WFfd; + int m_nSaved; + int m_nSaveMax; + int m_actCursor; + bool m_cursorA; + bool m_cursorB; + bool m_snap; + + bool m_hideControls; + + int m_board; + int m_firstChannel; + int m_chnSection; + bool m_multiBoard; + bool m_splitMode; + + int m_progress; +}; + +#endif // __DOFrame__ diff --git a/software/drsosc/DOScreen.cpp b/software/drsosc/DOScreen.cpp new file mode 100644 index 0000000..e308797 --- /dev/null +++ b/software/drsosc/DOScreen.cpp @@ -0,0 +1,1880 @@ +/* + * doscreen.cpp + * DRS Oscilloscope screen class + * $Id: DOScreen.cpp 22327 2016-10-11 13:18:26Z ritt $ + */ + +#include "DRSOscInc.h" + +/*------------------------------------------------------------------*/ + +BEGIN_EVENT_TABLE(DOScreen, wxWindow) + EVT_PAINT (DOScreen::OnPaint) + EVT_SIZE (DOScreen::OnSize) + EVT_MOUSE_EVENTS (DOScreen::OnMouse) + EVT_MOUSEWHEEL (DOScreen::OnMouse) +END_EVENT_TABLE() + +/*------------------------------------------------------------------*/ + +const int DOScreen::m_scaleTable[10] = { 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000 }; +const int DOScreen::m_hscaleTable[13] = { 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000 }; + +/*------------------------------------------------------------------*/ + +DOScreen::DOScreen(wxWindow *parent, Osci *osci, DOFrame *frame) + : wxWindow(parent, wxID_ANY) +{ + m_osci = osci; + m_frame = frame; + m_splitMode = 0; + m_paintMode = kPMWaveform; + m_histAxisAuto = true; + m_histAxisMin = m_histAxisMax = 0; + m_dragMin = m_dragMax = false; + m_displayDateTime = false; + m_displayShowGrid = true; + m_displayLines = true; + m_displayScalers = false; + m_displayMode = ID_DISPSAMPLE; + m_displayN = 16; + m_clientWidth = m_clientHeight = 0; + m_mouseX = m_mouseY = 0; + m_MeasX1 = m_MeasX2 = m_MeasY1 = m_MeasY2 = 0; + m_board = 0; + + for (int b=0 ; bGetWFfd() && !m_frame->GetWFFile()) + m_frame->SetSaveBtn(wxT("Save"), wxT("Save waveforms")); +} + +/*------------------------------------------------------------------*/ + +void DOScreen::DrawDot(wxDC& dc, wxCoord x, wxCoord y, bool printing) +{ + if (printing) + dc.DrawRectangle(x, y, 1, 1); + else + dc.DrawPoint(x, y); +} + +/*------------------------------------------------------------------*/ + +bool DOScreen::FindClosestWafeformPoint(int& idx_min, int& x_min, int& y_min) +{ + int dist, dist_min, x, y; + + // find point on waveform closest to mouse position + idx_min = -1; + dist_min = 1000000; + + int b = m_frame->GetCurrentBoard(); + wxPoint mpos((int)(m_x1[b]+m_mouseX*(m_x2[b]-m_x1[b])), (int)(m_y1[b]+m_mouseY*(m_y2[b]-m_y1[b]))); + + for (int idx=0 ; idx<4 ; idx++) { + if (m_chnon[b][idx]) { + if (m_osci->GetWaveformDepth(idx)) { + float *wf = m_frame->GetWaveform(b, idx); + float *time = m_frame->GetTime(b, idx); + + for (int i=0 ; iGetWaveformDepth(idx) ; i++) { + + x = timeToX(time[i]); + y = voltToY(idx, wf[i]); + + dist = (x-mpos.x)*(x-mpos.x) + + (y-mpos.y)*(y-mpos.y); + if (dist < dist_min) { + dist_min = dist; + idx_min = idx; + x_min = x; + y_min = y; + } + } + } + } + } + + return dist_min < 2000; +} + +/*------------------------------------------------------------------*/ + +int DOScreen::timeToX(float t) +{ + return (int) ((double)(t-m_screenOffset[m_board])/m_screenSize[m_board]*(m_x2[m_board]-m_x1[m_board])+m_x1[m_board] + 0.5); +} + +double DOScreen::XToTime(int x) +{ + return (double) m_screenSize[m_board]*(x - m_x1[m_board])/(m_x2[m_board]-m_x1[m_board])+m_screenOffset[m_board]; +} + +double DOScreen::GetT1() +{ + return (double) m_screenOffset[m_board]; +} + +double DOScreen::GetT2() +{ + return (double) m_screenSize[m_board]+m_screenOffset[m_board]; +} + +int DOScreen::voltToY(float v) +{ + return voltToY(m_chn, v); +} + +int DOScreen::voltToY(int chn, float v) +{ + v = v - m_offset[m_board][chn]*1000; + return (int) ((m_y1[m_board]+m_y2[m_board])/2-v/10.0/m_scaleTable[m_scale[m_board][chn]]*(m_y2[m_board]-m_y1[m_board]) + 0.5); +} + +double DOScreen::YToVolt(int y) +{ + return YToVolt(m_chn, y); +} + +double DOScreen::YToVolt(int chn, int y) +{ + double v; + + v = (((double) m_y1[m_board]+m_y2[m_board])/2 - y)/(m_y2[m_board]-m_y1[m_board])*m_scaleTable[m_scale[m_board][chn]]*10; + v = v + m_offset[m_board][chn]*1000; + + return v; +} + +/*------------------------------------------------------------------*/ + +void DOScreen::SetMathDisplay(int id, bool flag) +{ + int m, chn; + + m = (id - ID_PJ1) / 4; + chn = (id - ID_PJ1) % 4; + + m_mathFlag[m][chn] = flag; +} + +/*------------------------------------------------------------------*/ + +void DOScreen::DrawScopeBottom(wxDC& dc, int board, int x1, int y1, int width, bool printing) +{ + wxString wxst, wxst2; + int w, h, idx; + wxPoint p[6]; + + // show voltage per division + for (idx=0 ; idx<4 ; idx++) { + + dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID)); + dc.SetBrush(m_frame->GetColor(idx, printing)); + + if (m_chnon[board][idx] && !m_frame->IsFirst()) { + if (m_scaleTable[m_scale[board][idx]] >= 1000) + wxst.Printf(wxT("%d V/div"), m_scaleTable[m_scale[board][idx]]/1000); + else + wxst.Printf(wxT("%d mV/div"), m_scaleTable[m_scale[board][idx]]); + if (m_chnon[board][idx] == 2) + wxst+wxT(" CLK"); + dc.GetTextExtent(wxst, &w, &h); + dc.DrawRoundedRectangle(x1 + 10 + idx*80, y1+3, w+10, 15, 2); + dc.DrawText(wxst, x1 + 15 + idx*80, y1+3); + } + } + + // show horizontal resolution + if (m_hscaleTable[m_hscale[board]] >= 1000) + wxst.Printf(wxT("%d us/div "), m_hscaleTable[m_hscale[board]]/1000); + else + wxst.Printf(wxT("%d ns/div "), m_hscaleTable[m_hscale[board]]); + if (m_frame->GetActSamplingSpeed() < 1) + wxst2.Printf(wxT("%1.0lf MS/s Calib"), m_frame->GetActSamplingSpeed()*1000); + else + wxst2.Printf(wxT("%1.4lg GS/s Calib"), m_frame->GetActSamplingSpeed()); + + wxst = wxst+wxst2; + dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID)); + dc.SetBrush(*wxGREEN); + dc.SetTextForeground(*wxBLACK); + dc.GetTextExtent(wxst, &w, &h); + dc.DrawRoundedRectangle(width-w, y1+3, w+10, 15, 2); + dc.DrawText(wxst, width+5-w, y1+3); + + // cross out calibration if not valid + if (m_frame->GetOsci()->GetNumberOfBoards() > 0) { + if (!m_frame->GetOsci()->IsTCalibrated() || !m_frame->GetOsci()->IsTCalOn()) { + dc.SetPen(wxPen(*wxRED, 1, wxSOLID)); + dc.DrawLine(width-22, y1+10, width+6, y1+10); + } + } + + // show trigger settings + int x_start = width - w; + int tc = m_frame->GetTriggerConfig(); + if (tc > 0) { + wxString wxst1, wxst2; + wxst1.Append((char)wxT('(')); + for (int i=0 ; i<5 ; i++) + if (tc & (1< 0) + wxst1 = wxst1.Left(wxst1.Length()-1); + wxst1.Append((char) wxT(')')); + wxst2.Printf(wxT(" %1.0lf ns"), m_frame->GetTrgDelay()); + wxst = wxst1+wxst2; + dc.GetTextExtent(wxst, &w, &h); + dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID)); + dc.SetBrush(m_frame->GetColor(4, printing)); + dc.DrawRoundedRectangle(x_start-20-w-20, y1+3, w+10+20, 15, 2); + dc.DrawText(wxst, x_start-15-w, y1+3); + } else { + if (m_frame->GetTrgSource(board) == 4) + wxst.Printf(wxT("EXT %1.0lf ns"), m_frame->GetTrgDelay()); + else + wxst.Printf(wxT("%1.3lf V %1.0lf ns"), m_frame->GetTrgLevel(m_frame->GetTrgSource(board)), m_frame->GetTrgDelay()); + dc.GetTextExtent(wxst, &w, &h); + dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID)); + dc.SetBrush(m_frame->GetColor(m_frame->GetTrgSource(board), printing)); + dc.DrawRoundedRectangle(x_start-20-w-20, y1+3, w+10+20, 15, 2); + dc.DrawText(wxst, x_start-15-w, y1+3); + } + + if (m_frame->GetTrgPolarity() == 0) { + // positive edge + p[0] = wxPoint(0, 11); + p[1] = wxPoint(5, 11); + p[2] = wxPoint(10, 3); + p[3] = wxPoint(15, 3); + } else { + // negative edge + p[0] = wxPoint(0, 3); + p[1] = wxPoint(5, 3); + p[2] = wxPoint(10,11); + p[3] = wxPoint(15,11); + } + dc.SetPen(wxPen(*wxBLACK, 1, wxSOLID)); + dc.DrawLines(4, p, x_start-20-w-15, y1+3); + + dc.SetBrush(*wxGREEN); + dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID)); + x_start = x_start - 20 - w - 15; + if (m_osci->IsRunning()) { + wxst.Printf(wxT("%d Acq/s"), m_frame->GetAcqPerSecond()); + dc.GetTextExtent(wxst, &w, &h); + dc.DrawRoundedRectangle(x_start-20-w, y1+3, w+10, 15, 2); + dc.DrawText(wxst, x_start-15-w, y1+3); + } + x_start = x_start - 15 - w; + if (m_frame->GetNSaved()) { + wxst.Printf(wxT("%d saved"), m_frame->GetNSaved()); + dc.GetTextExtent(wxst, &w, &h); + dc.DrawRoundedRectangle(x_start-20-w, y1+3, w+10, 15, 2); + dc.DrawText(wxst, x_start-15-w, y1+3); + } +} + +/*------------------------------------------------------------------*/ + +void DOScreen::DrawWaveforms(wxDC& dc, int wfIndex, bool printing) +{ + int x, y, x_old = 0, y_old = 0, w, h; + wxString wxst; + wxPoint p[6]; + + dc.DestroyClippingRegion(); + dc.SetPen(*wxGREY_PEN); + dc.SetBrush(*wxBLACK_BRUSH); + dc.DrawRectangle(m_x1[m_board], m_y1[m_board], m_x2[m_board]-m_x1[m_board], m_y2[m_board]-m_y1[m_board]); + + if (m_splitMode && m_board == m_frame->GetCurrentBoard()) { + dc.SetPen(*wxGREEN_PEN); + dc.DrawRectangle(m_x1[m_board], m_y1[m_board], m_x2[m_board]-m_x1[m_board], m_y2[m_board]-m_y1[m_board]); + dc.DrawRectangle(m_x1[m_board]+1, m_y1[m_board]+1, m_x2[m_board]-m_x1[m_board]-2, m_y2[m_board]-m_y1[m_board]-2); + } + + // draw grid + if (m_displayShowGrid) { + dc.SetPen(*wxGREY_PEN); + for (int i=1 ; i<10 ; i++) { + if (i == 5) { + for (int j=m_x1[m_board]+1 ; j=0 ; idx--) { + if (m_chnon[m_board][idx] && !m_frame->IsFirst()) { + + // draw marker + if (m_board == m_frame->GetCurrentBoard()) { + dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID)); + dc.SetBrush(m_frame->GetColor(idx, printing)); + y = (int) ((m_y1[m_board]+m_y2[m_board])/2+m_offset[m_board][idx]*1000/10.0/m_scaleTable[m_scale[m_board][idx]]*(m_y2[m_board]-m_y1[m_board]) + 0.5); + + if (y < m_y1[m_board]) { + wxPoint p[3]; + p[0] = wxPoint(10, 0); + p[1] = wxPoint(17, 7); + p[2] = wxPoint( 3, 7); + dc.DrawPolygon(3, p, 0, m_y1[m_board]); + } else if (y > m_y2[m_board]) { + wxPoint p[3]; + p[0] = wxPoint(10, 7); + p[1] = wxPoint(17, 0); + p[2] = wxPoint( 3, 0); + dc.DrawPolygon(3, p, 0, m_y2[m_board]-8); + } else { + wxPoint p[7]; + p[0] = wxPoint(0, 6); + p[1] = wxPoint(1, 7); + p[2] = wxPoint(12, 7); + p[3] = wxPoint(19, 0); + p[4] = wxPoint(12,-7); + p[5] = wxPoint(1, -7); + p[6] = wxPoint(0, -6); + dc.DrawPolygon(7, p, 0, y); + + wxst.Printf(wxT("%d"), idx+1); + dc.GetTextExtent(wxst, &w, &h); + dc.SetTextForeground(*wxBLACK); + dc.SetTextBackground(m_frame->GetColor(idx, printing)); + dc.DrawText(wxst, 3, y-h/2); + } + } + + // draw waveform + dc.SetClippingRegion(m_x1[m_board]+1, m_y1[m_board]+1, m_x2[m_board]-m_x1[m_board]-2, m_y2[m_board]-m_y1[m_board]-2); + dc.SetPen(wxPen(m_frame->GetColor(idx, printing), 1, wxSOLID)); + + if (m_osci->GetWaveformDepth(idx)) { + float *wf = m_frame->GetWaveform(wfIndex, idx); + float *time = m_frame->GetTime(wfIndex, idx); + m_chn = idx; + int spacing = timeToX(1/m_osci->GetSamplingSpeed()) - timeToX(0); + + for (int i=0 ; iGetWaveformDepth(idx) ; i++) { + x = timeToX(time[i]); + y = voltToY(wf[i]); + if (x >= m_x1[m_board] && x <= m_x2[m_board]) { + if (m_displayLines) { + if (i > 0) + dc.DrawLine(x_old, y_old, x, y); + if (i > 0 && spacing > 5) { + // draw points if separate by more than 5 pixels + dc.DrawRectangle(x-1, y-1, 3, 3); + dc.DrawPoint(x-2, y); + dc.DrawPoint(x+2, y); + dc.DrawPoint(x, y-2); + dc.DrawPoint(x, y+2); + } + } else + DrawDot(dc, x, y, printing); + } + x_old = x; + y_old = y; + } + } + + dc.DestroyClippingRegion(); + } + } + + // draw trigger level + for (int channel=0 ; channel<4 ; channel++) { + if (!m_frame->GetTriggerConfig() && m_frame->GetTrgSource(m_board) < 4 && channel != m_frame->GetTrgSource(m_board)) + continue; + if (!m_frame->GetTriggerConfig() && m_frame->GetTrgSource(m_board) == 4) + continue; + + double v = (m_frame->GetTrgLevel(channel) - m_offset[m_board][channel])*1000; + y = (int) ((m_y1[m_board]+m_y2[m_board])/2-(v/10.0/m_scaleTable[m_scale[m_board][channel]]*(m_y2[m_board]-m_y1[m_board]) + 0.5)); + + p[0] = wxPoint(-8, 0); + p[1] = wxPoint( 0, -5); + p[2] = wxPoint( 0, 5); + if (m_frame->GetTriggerConfig() && + (m_frame->GetTrgLevel(channel) == m_frame->GetTrgLevel((channel+1) % 4) || + m_frame->GetTrgLevel(channel) == m_frame->GetTrgLevel((channel+2) % 4) || + m_frame->GetTrgLevel(channel) == m_frame->GetTrgLevel((channel+3) % 4))) { + dc.SetBrush(m_frame->GetColor(4, printing)); // gray if two levels overlap + dc.SetPen(m_frame->GetColor(4, printing)); + } else { + dc.SetBrush(m_frame->GetColor(channel, printing)); + dc.SetPen(m_frame->GetColor(channel, printing)); + } + dc.DrawPolygon(3, p, m_x2[m_board]-2, y); + if (time(NULL) - m_frame->GetLastTriggerUpdate() < 2 && !m_frame->IsFirst()) { + dc.DrawLine(m_x1[m_board], y, m_x2[m_board]-2, y); + } + } + + // draw trigger horizontal position marker + p[0] = wxPoint(-5, 0); + p[1] = wxPoint( 4, 0); + p[2] = wxPoint( 4, 7); + p[3] = wxPoint( 0, 11); + p[4] = wxPoint( -1, 11); + p[5] = wxPoint(-5, 7); + dc.SetBrush(m_frame->GetColor(m_frame->GetTrgSource(m_board), printing)); + dc.SetPen(m_frame->GetColor(m_frame->GetTrgSource(m_board), printing)); + dc.DrawPolygon(6, p, (wxCoord)((m_frame->GetTrgPosition(m_board)-GetScreenOffset(m_board)) / GetScreenSize(m_board) * (m_x2[m_board]-m_x1[m_board]) + m_x1[m_board]), + (wxCoord)m_y1[m_board]); + + wxst = wxT("T"); + dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID)); + dc.SetBrush(m_frame->GetColor(m_frame->GetTrgSource(m_board), printing)); + dc.SetTextForeground(*wxBLACK); + dc.GetTextExtent(wxst, &w, &h); + dc.DrawText(wxst, (wxCoord)((m_frame->GetTrgPosition(m_board)-GetScreenOffset(m_board)) / GetScreenSize(m_board) * (m_x2[m_board]-m_x1[m_board]) + m_x1[m_board] - w/2 - 1), + (wxCoord)(m_y1[m_board])); + +} + +/*------------------------------------------------------------------*/ + +void DOScreen::DrawScope(wxDC& dc, wxCoord width, wxCoord height, bool printing) +{ + int x, y, w, h, y_top, n; + int idx_min, x_min, y_min; + wxString wxst, wxst2; + + if (m_frame->GetOsci()->SkipDisplay()) + return; + + // tell DOFrame to pull new waveforms from EPThread + m_frame->UpdateWaveforms(); + + m_dc = &dc; + + // scope area + m_sx1 = 20; + m_sy1 = 1; + m_sx2 = width-1; + m_sy2 = height-20; + + // if histo display is on, only show waveform in upper half + if (m_frame->IsHist()) + m_sy2 = height/2-20; + + // waveform area + m_x1[m_board] = m_sx1; + m_y1[m_board] = m_sy1; + m_x2[m_board] = m_sx2; + m_y2[m_board] = m_sy2; + + y_top = 1; + + dc.SetFont(m_fontNormal); + + // draw overall frame + if (printing) { + dc.SetBackground(*wxWHITE_BRUSH); + dc.SetPen(*wxWHITE_PEN); + dc.SetBrush(*wxWHITE_BRUSH); + } else { + dc.SetBackground(*wxBLACK_BRUSH); + dc.SetPen(*wxBLACK_PEN); + dc.SetBrush(*wxBLACK_BRUSH); + } + + //static int n_event = 0; + //if (++n_event % 30 == 0) { + if (m_frame->IsHist()) + dc.DrawRectangle(0, 0, width, height/2); + else + dc.DrawRectangle(0, 0, width, height); + //} + + DrawScopeBottom(dc, m_frame->GetCurrentBoard(), 20, m_sy2, width-20, printing); + + if (m_splitMode) { + n = m_osci->GetNumberOfBoards(); + w = (m_sx2-m_sx1)/2; + h = (m_sy2-m_sy1) / (((n-1) / 2)+1); + + for (int i=0 ; iGetCurrentBoard(); + m_x1[m_board] = m_sx1; + m_y1[m_board] = m_sy1; + m_x2[m_board] = m_sx2; + m_y2[m_board] = m_sy2; + + int wfIndex; + if (m_osci->IsMultiBoard()) + wfIndex = m_osci->GetCurrentBoardIndex(); + else + wfIndex = 0; + + DrawWaveforms(dc, wfIndex, printing); + } + + // display optional debug messages + if (*m_frame->GetOsci()->GetDebugMsg()) { + wxst = wxString((const wxChar *)m_frame->GetOsci()->GetDebugMsg()); + dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID)); + dc.SetBrush(*wxGREEN); + dc.SetTextForeground(*wxBLACK); + dc.GetTextExtent(wxst, &w, &h); + dc.DrawRoundedRectangle(m_x1[m_board]+2, m_sy1+2, w+5, 15, 2); + dc.DrawText(wxst, m_sx1+4, m_sy1+2); + } + if (m_debugMsg[0]) { + wxst = wxString((const wxChar *)m_debugMsg); + dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID)); + dc.SetBrush(*wxGREEN); + dc.SetTextForeground(*wxBLACK); + dc.GetTextExtent(wxst, &w, &h); + dc.DrawRoundedRectangle(m_sx1+2, m_sy1+2, w+5, 15, 2); + dc.DrawText(wxst, m_sx1+4, m_sy1+2); + } + + // print "TRIG?" or "AUTO" if no recent trigger + if (m_osci->GetNumberOfBoards() && m_osci->IsIdle()) { + dc.SetTextForeground(*wxGREEN); + if (m_osci->GetTriggerMode() == TM_AUTO) + wxst = wxT("AUTO"); + else + wxst = wxT("TRIG?"); + dc.GetTextExtent(wxst, &w, &h); + if (m_osci->GetNumberOfBoards() > 1) + dc.DrawText(wxst, m_x2[m_board] - w - 5, m_y1[m_board] + 22); + else + dc.DrawText(wxst, m_x2[m_board] - w - 5, m_y1[m_board] + 1); + } + + // display date/time + if (m_displayDateTime) { + dc.SetTextForeground(*wxGREEN); + wxst.Printf(wxT("%s"),wxDateTime::Now().Format(wxT("%c")).c_str()); + dc.GetTextExtent(wxst, &w, &h); + dc.DrawText(wxst, m_x2[m_board] - w - 2, m_y2[m_board] - h - 1); + } + + // display board selector buttons + n = m_osci->GetNumberOfBoards(); + if (n > 1) { + if (m_osci->IsMultiBoard()) + n++; + for (int i=0 ; iIsMultiBoard() && i == n-1) { + // display cross icon + dc.SetPen(wxPen(*wxGREEN, 1, wxSOLID)); + if (m_splitMode) { + dc.SetBrush(*wxGREEN); + dc.DrawRoundedRectangle(m_BSX1[i], m_BSY1[i], 16, 16, 2); + dc.SetPen(wxPen(*wxBLACK, 1, wxSOLID)); + } else { + dc.SetBrush(*wxBLACK); + dc.DrawRoundedRectangle(m_BSX1[i], m_BSY1[i], 16, 16, 2); + dc.SetPen(wxPen(*wxGREEN, 1, wxSOLID)); + } + + dc.DrawLine(m_BSX1[i]+8, m_BSY1[i], m_BSX1[i]+8, m_BSY2[i]); + dc.DrawLine(m_BSX1[i], m_BSY1[i]+8, m_BSX2[i], m_BSY1[i]+8); + } else { + // display board number + wxst.Printf(wxT("%d"), i+1); + if (i == m_osci->GetCurrentBoardIndex() && !m_splitMode) { + dc.SetPen(wxPen(*wxGREEN, 1, wxSOLID)); + dc.SetBrush(*wxGREEN); + dc.SetTextForeground(*wxBLACK); + } else { + dc.SetPen(wxPen(*wxGREEN, 1, wxSOLID)); + dc.SetBrush(*wxBLACK); + dc.SetTextForeground(*wxGREEN); + } + dc.DrawRoundedRectangle(m_BSX1[i], m_BSY1[i], 16, 16, 2); + dc.DrawText(wxst, m_BSX1[i]+4, m_BSY1[i]+2); + } + } + } + + // display cursors and measurements only for current board + m_board = m_frame->GetCurrentBoard(); + + // display cursor + if (width > 0 && height > 0) { + int b = m_board; + wxPoint mpos((int)(m_x1[b]+m_mouseX*(m_x2[b]-m_x1[b])), (int)(m_y1[b]+m_mouseY*(m_y2[b]-m_y1[b]))); + if (m_frame->IsCursorA() || m_frame->IsCursorB()) { + + // find point on waveform closest to mouse position + FindClosestWafeformPoint(idx_min, x_min, y_min); + if (m_frame->IsSnap()) { + x = x_min; + y = y_min; + } else { + x = mpos.x; + y = mpos.y; + } + + if (m_frame->ActiveCursor() == 1) { + m_idxA = idx_min; + m_xCursorA = (double)(x - m_x1[b])/(m_x2[b]-m_x1[b]); + m_yCursorA = (double)(y - m_y1[b])/(m_y2[b]-m_y1[b]); + m_uCursorA = YToVolt(y); + m_tCursorA = XToTime(x); + } else if (m_frame->ActiveCursor() == 2) { + m_idxB = idx_min; + m_xCursorB = (double)(x - m_x1[b])/(m_x2[b]-m_x1[b]); + m_yCursorB = (double)(y - m_y1[b])/(m_y2[b]-m_y1[b]); + m_uCursorB = YToVolt(y); + m_tCursorB = XToTime(x); + } + + // draw cursor A + if (m_frame->IsCursorA() && (m_frame->ActiveCursor() != 1 || (m_mouseX > 0 && m_mouseX < 1 && m_mouseY > 0 && m_mouseY < 1))) { + dc.SetPen(wxPen(m_frame->GetColor(m_idxA, printing), 1, wxSHORT_DASH)); + int x = (int)(m_x1[b]+m_xCursorA*(m_x2[b]-m_x1[b])); + int y = (int)(m_y1[b]+m_yCursorA*(m_y2[b]-m_y1[b])); + dc.DrawLine(x, m_y1[b], x, m_y2[b]); + dc.DrawLine(m_x1[b], y, m_x2[b], y); + dc.DrawLine(x-3, y, x, y+3); + dc.DrawLine(x, y+3, x+3, y); + dc.DrawLine(x+3, y, x, y-3); + dc.DrawLine(x, y-3, x-3, y); + + dc.SetTextForeground(*wxGREEN); + dc.GetTextExtent(wxT("Cursor A:"), &w, &h); + dc.DrawText(wxT("Cursor A:"), m_x1[b] + 3, y_top); + wxString str; + str.Printf(wxT("%1.1lf ns / %1.1lf mV"), m_tCursorA, m_uCursorA); + dc.SetTextForeground(m_frame->GetColor(m_idxA, printing)); + dc.DrawText(str, m_x1[b] + w + 10, y_top); + y_top += h; + } + + // draw cursor B + if (m_frame->IsCursorB() && (m_frame->ActiveCursor() != 2 || (m_mouseX > 0 && m_mouseX < 1 && m_mouseY > 0 && m_mouseY < 1))) { + dc.SetPen(wxPen(m_frame->GetColor(m_idxB, printing), 1, wxDOT)); + int x = (int)(m_x1[b]+m_xCursorB*(m_x2[b]-m_x1[b])); + int y = (int)(m_y1[b]+m_yCursorB*(m_y2[b]-m_y1[b])); + dc.DrawLine(x, m_y1[b], x, m_y2[b]); + dc.DrawLine(m_x1[b], y, m_x2[b], y); + dc.DrawLine(x-3, y, x, y+3); + dc.DrawLine(x, y+3, x+3, y); + dc.DrawLine(x+3, y, x, y-3); + dc.DrawLine(x, y-3, x-3, y); + + dc.SetTextForeground(*wxGREEN); + dc.GetTextExtent(wxT("Cursor B:"), &w, &h); + dc.DrawText(wxT("Cursor B:"), m_x1[b] + 3, y_top); + wxString str; + str.Printf(wxT("%1.1lf ns / %1.1lf mV"), m_tCursorB, m_uCursorB); + dc.SetTextForeground(m_frame->GetColor(m_idxB, printing)); + dc.DrawText(str, m_x1[b] + w + 10, y_top); + y_top += h; + } + + // cursor difference + if (m_frame->IsCursorA() && m_frame->IsCursorB()) { + dc.SetTextForeground(*wxGREEN); + dc.GetTextExtent(wxT("Diff:"), &w, &h); + dc.DrawText(wxT("Diff:"), m_x1[b] + 3, y_top); + wxString str; + str.Printf(wxT("%1.3lf ns / %1.1lf mV"), m_tCursorB - m_tCursorA, m_uCursorB - m_uCursorA); + dc.DrawText(str, m_x1[b] + w + 10, y_top); + y_top += h; + } + + y_top += h; // leave some space + } + } + + // count measurements + for (int idx = n = 0 ; idxGetMeasurement(idx, chn) != NULL) + n++; + } + } + + // display measurements + dc.SetFont(m_fontFixed); + dc.GetTextExtent(wxT("Chn delay [CH1]: "), &w, &h); + int nameWidth = w; + dc.GetTextExtent(wxT("-00.000 MHz"), &w, &h); + int valueWidth = w; + + if (m_frame->IsStat() && n > 0) { + dc.SetTextForeground(*wxGREEN); + dc.DrawText(wxT(" Min Max Mean Std N"), m_x1[m_board]+nameWidth+valueWidth, y_top); + dc.GetTextExtent(wxT(" Min Max Mean Std N"), &w, &h); + m_MeasX1 = m_x1[m_board] + nameWidth + valueWidth; + m_MeasX2 = m_MeasX1 + w; + y_top += h; + } + + m_MeasY1 = y_top; + for (int idx = 0 ; idxGetMeasurement(idx, chn); + m_chn = chn; + + if (m != NULL) { + // set parameters from cursor positions + m->SetParam(0, m_tCursorA); + m->SetParam(1, m_uCursorA); + m->SetParam(2, m_tCursorB); + m->SetParam(3, m_uCursorB); + + dc.SetTextForeground(m_frame->GetColor(chn, printing)); + wxString str; + str.Printf(wxT("%s [CH%d]:"), m_frame->GetMeasurementName(idx).c_str(), chn+1); + dc.DrawText(str, m_x1[m_board] + 3, y_top); + + double x1[2048], y1[2048], x2[2048], y2[2048]; + + int wfIndex; + if (m_osci->IsMultiBoard()) + wfIndex = m_osci->GetCurrentBoardIndex(); + else + wfIndex = 0; + + if (m_osci->GetWaveformDepth(chn)) { + float *wf1 = m_frame->GetWaveform(wfIndex, chn); + float *wf2 = m_frame->GetWaveform(wfIndex, (chn+1)%4); + float *time1 = m_frame->GetTime(wfIndex, chn); + float *time2 = m_frame->GetTime(wfIndex, (chn+1)%4); + int n_inside = 0; + + for (int i=0 ; iGetWaveformDepth(chn) ; i++) { + if (timeToX(time1[i]) >= m_x1[m_board]) { + x1[n_inside] = time1[i]; + y1[n_inside] = wf1[i]; + x2[n_inside] = time2[i]; + y2[n_inside] = wf2[i]; + n_inside++; + } + if (timeToX(time1[i]) > m_x2[m_board]) + break; + } + + dc.SetPen(wxPen(m_frame->GetColor(chn, printing), 1, wxSOLID)); + + m->Measure(x1, y1, x2, y2, n_inside, false, m_frame->IsIndicator() && m_chnon[m_board][chn] ? this : NULL); + dc.DrawText(m->GetString(), m_x1[m_board]+nameWidth, y_top+1); + + if (m_frame->IsStat()) { + dc.DrawText(m->GetStat(), m_x1[m_board]+nameWidth+valueWidth, y_top+1); + } + } + + y_top += h; + } + } + } + + m_MeasY2 = y_top; + + // display scalers + if (m_displayScalers) { + y_top += 5; + for (int chn=0 ; chn<5 ; chn++) { + if (chn == 4) + dc.SetTextForeground(*wxLIGHT_GREY); + else + dc.SetTextForeground(m_frame->GetColor(chn, printing)); + unsigned int s = m_osci->GetScaler(chn); + if (chn == 4) { + if (s < 1000) + wxst.Printf(wxT("FreqT: %d Hz"), s); + else if (s < 1000000) + wxst.Printf(wxT("FreqT: %1.3lf kHz"), s/1000.0); + else + wxst.Printf(wxT("FreqT: %1.3lf MHz"), s/1000000.0); + } else { + if (s < 1000) + wxst.Printf(wxT("Freq%d: %d Hz"), chn+1, s); + else if (s < 1000000) + wxst.Printf(wxT("Freq%d: %1.3lf kHz"), chn+1, s/1000.0); + else + wxst.Printf(wxT("Freq%d: %1.3lf MHz"), chn+1, s/1000000.0); + } + dc.GetTextExtent(wxst, &w, &h); + dc.DrawText(wxst, m_x1[m_board] + 3, y_top); + y_top += h; + } + } + + dc.DestroyClippingRegion(); +} + +/*------------------------------------------------------------------*/ + +void DOScreen::DrawHisto(wxDC& dc, wxCoord width, wxCoord height, bool printing) +{ + int i, x, y, x_old, y_old, w, h, y_top; + wxString wxst, wxst2; + int histo[1000], uflow, oflow; + + if (m_frame->GetOsci()->SkipDisplay()) + return; + + if (!m_frame->IsHist()) + return; + + m_dc = &dc; + + // histo area + m_hx1 = 20; + m_hy1 = height/2+1; + m_hx2 = width-1; + m_hy2 = height-20; + + x_old = y_old = 0; + y_top = 1; + + /* if all waveform channels are off, use full screen */ + if (!m_chnon[m_board][0] && !m_chnon[m_board][1] && !m_chnon[m_board][2] && !m_chnon[m_board][3]) + m_sy1 = 1; + + // set font for all text output + dc.SetFont(m_fontFixedBold); + + // draw overall frame + if (printing) { + dc.SetBackground(*wxWHITE_BRUSH); + dc.SetPen(*wxWHITE_PEN); + dc.SetBrush(*wxWHITE_BRUSH); + } else { + dc.SetBackground(*wxBLACK_BRUSH); + dc.SetPen(*wxBLACK_PEN); + dc.SetBrush(*wxBLACK_BRUSH); + } + + dc.DrawRectangle(0, height/2, width, height/2); + dc.SetPen(*wxGREY_PEN); + dc.DrawRectangle(m_hx1, m_hy1, m_hx2-m_hx1, m_hy2-m_hy1); + + if (m_histAxisAuto) { + bool first = true; + for (int idx = 0 ; idxGetMeasurement(idx, chn); + if (m == NULL) + continue; + + /* find min and max of array */ + double *a = m->GetArray(); + int n = m->GetNMeasured(); + + if (first) { + m_histAxisMin = a[0]; + m_histAxisMax = a[0]; + first = false; + } + for (i=1 ; i m_histAxisMax) + m_histAxisMax = a[i]; + } + } + } + } + + for (int idx = 0 ; idxGetMeasurement(idx, chn); + if (m == NULL) + continue; + + /* build histogram */ + double *a = m->GetArray(); + int n = m->GetNMeasured(); + + int nBins = (int) (1.5*sqrt((double)n)); + if (nBins > 1000) + nBins = 1000; + + for (i=0 ; i= nBins) + oflow++; + else if (bin < 0) + uflow++; + else + histo[bin]++; + } + + int hmax = histo[0]; + for (i=1 ; i hmax) + hmax = histo[i]; + } + + /* draw histo */ + dc.SetPen(wxPen(m_frame->GetColor(chn, printing), 1, wxSOLID)); + for (i=0 ; i0) { + dc.DrawLine(x_old, y_old, x, y_old); + dc.DrawLine(x, y_old, x, y); + } + x_old = x; + y_old = y; + } + dc.DrawLine(x_old, y_old, m_hx2, y_old); + + // underflow and overflow bins + dc.SetBrush(wxBrush(m_frame->GetColor(chn, printing))); + + if (uflow) { + y = (int)((double)uflow/hmax*(m_hy2-m_hy1-1)); + if (y > m_hy2-m_hy1-1) + y = m_hy2-m_hy1-1; + dc.DrawRectangle(m_hx1, m_hy2-y, 3, y); + } + if (oflow) { + y = (int)((double)oflow/hmax*(m_hy2-m_hy1-1)); + if (y > m_hy2-m_hy1-1) + y = m_hy2-m_hy1-1; + dc.DrawRectangle(m_hx2-3, m_hy2-y, 3, y); + } + dc.SetBrush(*wxBLACK_BRUSH); + } + } + + DrawHAxis(dc, m_hx1, m_hy2, m_hx2-m_hx1, 3, 4, 5, 7, 0, m_histAxisMin, m_histAxisMax); + + // display statistics + dc.SetFont(m_fontFixed); + y_top = m_hy1 + 1; + if (m_frame->IsStat()) { + dc.SetTextForeground(*wxGREEN); + dc.DrawText(wxT(" Min Max Mean Std N"), m_hx1, y_top); + dc.GetTextExtent(wxT("N"), &w, &h); + y_top += h; + + for (int idx = 0 ; idxGetMeasurement(idx, chn); + if (m == NULL) + continue; + + double *a = m->GetArray(); + int nValues = m->GetNMeasured(); + + double sa = 0; + double sa2 = 0; + int n = 0; + double mean = 0; + double std = 0; + for (i=0 ; i= m_histAxisMin && a[i] <= m_histAxisMax) { + sa += a[i]; + sa2 += a[i]*a[i]; + n++; + } + } + + if (n) { + mean = sa / n; + std = sqrt(sa2/n - sa*sa/n/n); + } + + wxString str; + if (n == 0) + str.Printf(wxT(" N/A N/A N/A N/A %6d"), 0); + else + str.Printf(wxT("%8.3lf %8.3lf %8.3lf %8.4lf %6d"), m_histAxisMin, + m_histAxisMax, mean, std, n); + dc.SetTextForeground(m_frame->GetColor(chn, printing)); + dc.DrawText(str, m_hx1, y_top); + y_top += h; + } + } + } + + dc.SetPen(*wxGREY_PEN); + + if (m_dragMin) { + x = (int) ((m_minCursor - m_histAxisMin) / (m_histAxisMax - m_histAxisMin) * (m_hx2-m_hx1) + m_hx1); + dc.DrawLine(x, m_hy1, x, m_hy2); + } else + x = m_hx1; + + // dragging handles + y = (m_hy1+m_hy2)/2; + dc.DrawLine(x, y-10, x+10, y-10); + dc.DrawEllipticArc(x+5, y-10, 10, 10, 0, 90); + dc.DrawLine(x+15, y-5, x+15, y+5); + dc.DrawEllipticArc(x+5, y, 10, 10, 270, 360); + dc.DrawLine(x, y+10, x+10, y+10); + + dc.DrawLine(x+5, y-6, x+5, y+6); + dc.DrawLine(x+10, y-6, x+10, y+6); + + if (m_dragMax) { + x = (int) ((m_maxCursor - m_histAxisMin) / (m_histAxisMax - m_histAxisMin) * (m_hx2-m_hx1) + m_hx1); + dc.DrawLine(x, m_hy1, x, m_hy2); + } else + x = m_hx2; + + y = (m_hy1+m_hy2)/2; + dc.DrawLine(x, y-10, x-10, y-10); + dc.DrawEllipticArc(x-15, y-10, 10, 10, 90, 180); + dc.DrawLine(x-15, y-5, x-15, y+5); + dc.DrawEllipticArc(x-15, y, 10, 10, 180, 270); + dc.DrawLine(x, y+10, x-10, y+10); + + dc.DrawLine(x-5, y-6, x-5, y+6); + dc.DrawLine(x-10, y-6, x-10, y+6); + + // zoom out box + if (!m_histAxisAuto) { + dc.DrawRoundedRectangle((m_hx1+m_hx2)/2-15, m_hy2-10, 30, 14, 5); + dc.DrawLine((m_hx1+m_hx2)/2-10, m_hy2-3, (m_hx1+m_hx2)/2+10, m_hy2-3); + dc.DrawLine((m_hx1+m_hx2)/2-10, m_hy2-3, (m_hx1+m_hx2)/2-6, m_hy2-7); + dc.DrawLine((m_hx1+m_hx2)/2-10, m_hy2-3, (m_hx1+m_hx2)/2-6, m_hy2+1); + dc.DrawLine((m_hx1+m_hx2)/2+10, m_hy2-3, (m_hx1+m_hx2)/2+6, m_hy2-7); + dc.DrawLine((m_hx1+m_hx2)/2+10, m_hy2-3, (m_hx1+m_hx2)/2+6, m_hy2+1); + } + + // save button + wxString wxs("Save"); + dc.GetTextExtent(wxs, &w, &h); + m_savex1 = m_hx2-w-8; + m_savey1 = m_hy1+4; + m_savex2 = m_hx2-4; + m_savey2 = m_savey1+h+2; + dc.SetPen(wxPen(*wxGREEN, 1, wxSOLID)); + dc.SetBrush(*wxBLACK); + dc.SetTextForeground(*wxGREEN); + dc.DrawRoundedRectangle(m_savex1, m_savey1, m_savex2-m_savex1, m_savey2-m_savey1, 2); + dc.DrawText(wxs, m_savex1+2, m_savey1+2); + +} + +/*------------------------------------------------------------------*/ + +void DOScreen::SaveHisto(int fh) +{ + int i; + wxString wxst, wxst2; + int histo[1000], uflow, oflow; + double mmin, mmax; + + if (m_histAxisAuto) { + bool first = true; + for (int idx = 0 ; idxGetMeasurement(idx, chn); + if (m == NULL) + continue; + + /* find min and max of array */ + double *a = m->GetArray(); + int n = m->GetNMeasured(); + + if (first) { + m_histAxisMin = a[0]; + m_histAxisMax = a[0]; + first = false; + } + for (i=1 ; i m_histAxisMax) + m_histAxisMax = a[i]; + } + } + } + } + + for (int idx = 0 ; idxGetMeasurement(idx, chn); + if (m == NULL) + continue; + + wxst.Printf(wxT("%s [CH%d]\r\n\r\n"), m_frame->GetMeasurementName(idx).c_str(), chn+1); + write(fh, wxst.c_str(), wxst.length()); + + /* build histogram */ + double *a = m->GetArray(); + int n = m->GetNMeasured(); + + int nBins = (int) (1.5*sqrt((double)n)); + if (nBins > 1000) + nBins = 1000; + + for (i=0 ; i= nBins) + oflow++; + else if (bin < 0) + uflow++; + else + histo[bin]++; + if (a[i] > mmax) + mmax = a[i]; + if (a[i] < mmax) + mmin = a[i]; + } + + int hmax = histo[0]; + for (i=1 ; i hmax) + hmax = histo[i]; + } + + if (uflow) { + wxst.Printf(wxT("%8.3lf\t%8.3lf\t%d\r\n"), mmin, m_histAxisMin, uflow); + write(fh, wxst.c_str(), wxst.length()); + } + + /* save histo */ + for (i=0 ; i (b)) ? (a) : (b)) +#endif + +#ifndef MIN +#define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +void DOScreen::DrawHAxis(wxDC &dc, int x1, int y1, int width, + int minor, int major, int text, int label, int grid, double xmin, double xmax) +{ + double dx, int_dx, frac_dx, x_act, label_dx, major_dx, x_screen, maxwidth; + int tick_base, major_base, label_base, n_sig1, n_sig2, xs, w, h; + wxString str; + double base[] = { 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000 }; + + if (xmax <= xmin || width <= 0) + return; + + /* use 5 as min tick distance */ + dx = (xmax - xmin) / (double) (width / 5); + + frac_dx = modf(log(dx) / LN10, &int_dx); + if (frac_dx < 0) { + frac_dx += 1; + int_dx -= 1; + } + + tick_base = frac_dx < LOG2 ? 1 : frac_dx < LOG5 ? 2 : 3; + major_base = label_base = tick_base + 1; + + /* rounding up of dx, label_dx */ + dx = pow(10, int_dx) * base[tick_base]; + major_dx = pow(10, int_dx) * base[major_base]; + label_dx = major_dx; + + /* number of significant digits */ + if (xmin == 0) + n_sig1 = 0; + else + n_sig1 = (int) floor(log(fabs(xmin)) / LN10) - (int) floor(log(fabs(label_dx)) / LN10) + 1; + + if (xmax == 0) + n_sig2 = 0; + else + n_sig2 = + (int) floor(log(fabs(xmax)) / LN10) - (int) floor(log(fabs(label_dx)) / LN10) + 1; + + n_sig1 = MAX(n_sig1, n_sig2); + n_sig1 = MAX(n_sig1, 4); + + /* determination of maximal width of labels */ + str.Printf(wxT("%1.*lG"), n_sig1, floor(xmin / dx) * dx); + dc.GetTextExtent(str, &w, &h); + maxwidth = h / 2 * str.Len(); + str.Printf(wxT("%1.*lG"), n_sig1, floor(xmax / dx) * dx); + maxwidth = MAX(maxwidth, h / 2 * str.Len()); + str.Printf(wxT("%1.*lG"), n_sig1, floor(xmax / dx) * dx + label_dx); + maxwidth = MAX(maxwidth, h / 2 * str.Len()); + + /* increasing label_dx, if labels would overlap */ + while (maxwidth > 0.7 * label_dx / (xmax - xmin) * width) { + label_base++; + label_dx = pow(10, int_dx) * base[label_base]; + if (label_base % 3 == 2 && major_base % 3 == 1) { + major_base++; + major_dx = pow(10, int_dx) * base[major_base]; + } + } + + x_act = floor(xmin / dx) * dx; + + dc.DrawLine(x1, y1, x1 + width, y1); + + do { + x_screen = (x_act - xmin) / (xmax - xmin) * width + x1; + xs = (int) (x_screen + 0.5); + + if (x_screen > x1 + width + 0.001) + break; + + if (x_screen >= x1) { + if (fabs(floor(x_act / major_dx + 0.5) - x_act / major_dx) < + dx / major_dx / 10.0) { + + if (fabs(floor(x_act / label_dx + 0.5) - x_act / label_dx) < + dx / label_dx / 10.0) { + /* label tick mark */ + dc.DrawLine(xs, y1, xs, y1 + text); + + /* grid line */ + if (grid != 0 && xs > x1 && xs < x1 + width) + dc.DrawLine(xs, y1, xs, y1 + grid); + + /* label */ + if (label != 0) { + str.Printf(wxT("%1.*lG"), n_sig1, x_act); + dc.GetTextExtent(str, &w, &h); + dc.DrawText(str, (int) xs - w / 2, y1 + label); + } + } else { + /* major tick mark */ + dc.DrawLine(xs, y1, xs, y1 + major); + + /* grid line */ + if (grid != 0 && xs > x1 && xs < x1 + width) + dc.DrawLine(xs, y1 - 1, xs, y1 + grid); + } + + } else + /* minor tick mark */ + dc.DrawLine(xs, y1, xs, y1 + minor); + + } + + x_act += dx; + + /* supress 1.23E-17 ... */ + if (fabs(x_act) < dx / 100) + x_act = 0; + + } while (1); +} + +/*------------------------------------------------------------------*/ + +void DOScreen::DrawTcalib(wxDC& dc, wxCoord width, wxCoord height, bool printing) +{ + int x, y, x_old, y_old; + double tscale; + wxString str; + + m_dc = &dc; + m_x1[m_board] = 20; + m_y1[m_board] = 1; + m_x2[m_board] = width-1; + m_y2[m_board] = height-20; + x_old = y_old = 0; + tscale = 20/m_osci->GetCurrentBoard()->GetNominalFrequency(); + + // draw overall frame + if (printing) { + dc.SetBackground(*wxWHITE_BRUSH); + dc.SetPen(*wxWHITE_PEN); + dc.SetBrush(*wxWHITE_BRUSH); + } else { + dc.SetBackground(*wxBLACK_BRUSH); + dc.SetPen(*wxBLACK_PEN); + dc.SetBrush(*wxBLACK_BRUSH); + } + + dc.DrawRectangle(0, 0, width, height); + dc.SetPen(*wxGREY_PEN); + dc.DrawRectangle(m_x1[m_board], m_y1[m_board], m_x2[m_board]-m_x1[m_board], m_y2[m_board]-m_y1[m_board]); + + // draw grid + if (m_displayShowGrid) { + dc.SetPen(*wxGREY_PEN); + for (int i=1 ; i<10 ; i++) { + if (i == 5) { + for (int j=m_x1[m_board]+1 ; jGetProgress()/100.0), 6, 2); + + // draw waveform in background + dc.SetClippingRegion(m_x1[m_board]+1, m_y1[m_board]+1, m_x2[m_board]-m_x1[m_board]-2, m_y2[m_board]-m_y1[m_board]-2); + dc.SetPen(*wxMEDIUM_GREY_PEN); + dc.SetTextForeground(*wxLIGHT_GREY); + + if (m_frame->GetProgress() < 100) { + if (m_osci->GetCurrentBoard()->GetBoardType() == 6) + str.Printf(wxT("Calibration waveform chip %d"), m_osci->GetChip()+1); + else + str.Printf(wxT("Calibration waveform")); + dc.DrawText(str, m_x1[m_board] + 10, m_y1[m_board] + 10); + + if (m_osci->GetWaveformDepth(3)) { + float wf[2048]; + int tc = m_osci->GetCurrentBoard()->GetStopCell(m_osci->GetChip()); + + if (m_osci->GetCurrentBoard()->GetBoardType() == 9) + m_osci->GetCurrentBoard()->GetWave(m_osci->GetChip(), 0, wf, true, tc, 0, false); + else + m_osci->GetCurrentBoard()->GetWave(m_osci->GetChip(), 8, wf, true, tc, 0, false); + + float *time = m_osci->GetTime(0, 3); + + for (int i=0 ; iGetWaveformDepth(3) ; i++) { + x = timeToX(time[i]); + y = voltToY(wf[i]); + if (i > 0) + dc.DrawLine(x_old, y_old, x, y); + x_old = x; + y_old = y; + } + } + } + + // draw timing calibration array + dc.SetClippingRegion(m_x1[m_board]+1, m_y1[m_board]+1, m_x2[m_board]-m_x1[m_board]-2, m_y2[m_board]-m_y1[m_board]-2); + + if (m_osci->GetWaveformDepth(3)) { + float time[2048]; + + if (m_osci->GetTimeCalibration(0, 0, 0, time, true)) { + + /* differential nonlinearity */ + dc.SetPen(*wxGREEN_PEN); + dc.SetTextForeground(*wxGREEN); + dc.DrawText(wxT("Effective bin width"), m_x1[m_board] + 10, m_y1[m_board] + 30); + for (int i=1 ; iGetWaveformDepth(3) ; i++) { + x = (int)((double)i/m_osci->GetWaveformDepth(3)*(m_x2[m_board]-m_x1[m_board])+m_x1[m_board] + 0.5); + + y = (int) ((m_y1[m_board]+m_y2[m_board])/2-time[i]/tscale*(m_y2[m_board]-m_y1[m_board]) + 0.5); + + if (i > 1) + dc.DrawLine(x_old, y_old, x, y); + x_old = x; + + y_old = y; + } + + /* integral nonlinearity */ + dc.SetPen(*wxRED_PEN); + dc.SetTextForeground(*wxRED); + dc.DrawText(wxT("Integral nonlinearity"), m_x1[m_board] + 10, m_y1[m_board] + 50); + m_osci->GetTimeCalibration(0, 0, 1, time, true); + for (int i=0 ; iGetWaveformDepth(3) ; i++) { + x = (int)((double)i/m_osci->GetWaveformDepth(3)*(m_x2[m_board]-m_x1[m_board])+m_x1[m_board] + 0.5); + + y = (int) ((m_y1[m_board]+m_y2[m_board])/2-time[i]/tscale*(m_y2[m_board]-m_y1[m_board]) + 0.5); + + if (i > 0) + dc.DrawLine(x_old, y_old, x, y); + x_old = x; + y_old = y; + } + } + } + + dc.DestroyClippingRegion(); +} + +/*------------------------------------------------------------------*/ + +void DOScreen::DrawMath(wxDC& dc, wxCoord width, wxCoord height, bool printing) +{ + for (int math=0 ; math < 2 ; math++) + for (int idx=3 ; idx>=0 ; idx--) + if (m_mathFlag[math][idx]) { + if (math == 0) + DrawPeriodJitter(dc, idx, printing); + } +} + +/*------------------------------------------------------------------*/ + +void DOScreen::DrawPeriodJitter(wxDC& dc, int idx, bool printing) +{ + int i, j, w, h, n_pos, n_neg, xs, ys, x_old, y_old; + double miny, maxy, mean; + double t_pos[1000], t_neg[1000], t_average[1000], t_delta[1000]; + wxString str; + + dc.SetFont(m_fontFixed); + dc.SetClippingRegion(m_x1[m_board]+1, m_y1[m_board]+1, m_x2[m_board]-m_x1[m_board]-2, m_y2[m_board]-m_y1[m_board]-2); + dc.SetPen(wxPen(m_frame->GetColor(idx, printing), 1, wxSOLID)); + + float *y = m_frame->GetWaveform(0, idx); + float *x = m_frame->GetTime(0, idx); + int n = m_osci->GetWaveformDepth(idx); + + miny = maxy = y[0]; + for (i=0 ; i maxy) + maxy = y[i]; + if (y[i] < miny) + miny = y[i]; + } + mean = (miny + maxy)/2; + + if (maxy - miny < 50) + return; + + /* search zero crossings */ + n_pos = n_neg = 0; + for (i=1 ; i mean && y[i-1] <= mean) { + t_pos[n_pos++] = (mean*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + } + if (y[i] < mean && y[i-1] >= mean && n_pos > 0) { + t_neg[n_neg++] = (mean*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + } + } + + if (n_pos == 0 || n_neg == 0) + return; + + for (n=i=j=0 ; ; i++,j++) { + if (i+1 >= n_pos) + break; + t_average[n] = (t_pos[i+1] + t_pos[i]) / 2; + t_delta[n++] = t_pos[i+1] - t_pos[i]; + if (j+1 >= n_neg) + break; + t_average[n] = (t_neg[j+1] + t_neg[j]) / 2; + t_delta[n++] = t_neg[j+1] - t_neg[j]; + } + + for (i=0,mean=0 ; i 0) + dc.DrawLine(x_old, y_old, xs, ys); + x_old = xs; + y_old = ys; + } + + str.Printf(wxT("%1.3lf ns"), mean); + dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID)); + dc.SetTextForeground(*wxGREEN); + dc.SetBrush(*wxBLACK); + dc.GetTextExtent(str, &w, &h); + dc.DrawRoundedRectangle(m_x1[m_board]+1, m_y1[m_board]+(m_y2[m_board]-m_y1[m_board])/2 - h/2, w+5, h, 2); + dc.DrawText(str, m_x1[m_board] + 3, m_y1[m_board]+(m_y2[m_board]-m_y1[m_board])/2 - h/2); + + str.Printf(wxT("+10 ps")); + dc.GetTextExtent(str, &w, &h); + dc.DrawRoundedRectangle(m_x1[m_board]+1, m_y1[m_board]+4*(m_y2[m_board]-m_y1[m_board])/10 - h/2, w+5, h, 2); + dc.DrawText(str, m_x1[m_board]+3, m_y1[m_board]+4*(m_y2[m_board]-m_y1[m_board])/10 - h/2); + + str.Printf(wxT("-10 ps")); + dc.GetTextExtent(str, &w, &h); + dc.DrawRoundedRectangle(m_x1[m_board]+1, m_y1[m_board]+6*(m_y2[m_board]-m_y1[m_board])/10 - h/2, w+5, h, 2); + dc.DrawText(str, m_x1[m_board]+3, m_y1[m_board]+6*(m_y2[m_board]-m_y1[m_board])/10 - h/2); +} + +/*------------------------------------------------------------------*/ + +void DOScreen::OnSize(wxSizeEvent& event) +{ + wxWindow::Refresh(); +} + +/*------------------------------------------------------------------*/ + +void DOScreen::SetScale(int b, int idx, int scale) +{ + m_scale[b][idx] = scale; +} + +/*------------------------------------------------------------------*/ + +void DOScreen::SetHScale(int b, int hscale) +{ + m_hscale[b] = hscale; + m_screenSize[b] = m_hscaleTable[hscale] * 10; +} + +/*------------------------------------------------------------------*/ + +void DOScreen::SetHScaleInc(int b, int increment) +{ + int s = m_hscale[b] += increment; + if (s < 0) + s = 0; + + /* limit to min 500 ns/div */ + if (s > 8) + s = 8; + + SetHScale(b, s); +} + +/*------------------------------------------------------------------*/ + +void DOScreen::OnMouse(wxMouseEvent& event) +{ + wxSize s; + int x, y, i, b; + + if (m_clientHeight > 21 && m_clientWidth > 21) { + m_mouseX = (double) (event.GetPosition().x - m_x1[m_frame->GetCurrentBoard()]) / + (m_x2[m_frame->GetCurrentBoard()] - m_x1[m_frame->GetCurrentBoard()]); + m_mouseY = (double) (event.GetPosition().y - m_y1[m_frame->GetCurrentBoard()]) / + (m_y2[m_frame->GetCurrentBoard()] - m_y1[m_frame->GetCurrentBoard()]); + } + + bool hand = false; + bool sizewe = false; + + x = event.GetPosition().x; + y = event.GetPosition().y; + if (x > m_MeasX1 && x < m_MeasX2 && + y > m_MeasY1 && y < m_MeasY2) { + hand = true; + if (event.LeftDown()) + m_frame->StatReset(); + } + + for (int i=0 ; iGetNumberOfBoards() ; i++) { + if (x > m_BSX1[i] && x < m_BSX2[i] && + y > m_BSY1[i] && y < m_BSY2[i]) { + hand = true; + if (event.LeftDown()) { + m_splitMode = false; + m_frame->SetSplitMode(false); + m_frame->SelectBoard(i); // select different board + m_frame->SetCursorA(false); + m_frame->SetCursorB(false); + } + break; + } + } + + if (m_osci->IsMultiBoard()) { + int i = m_osci->GetNumberOfBoards(); + if (x > m_BSX1[i] && x < m_BSX2[i] && + y > m_BSY1[i] && y < m_BSY2[i]) { + hand = true; + if (event.LeftDown()) { + m_splitMode = true; + m_frame->SetSplitMode(true); + m_frame->SetCursorA(false); + m_frame->SetCursorB(false); + } + } + } + + int tip = 0; + if (m_frame->IsHist()) { + // save button + if (x > m_savex1 && x < m_savex2 && y > m_savey1 && y < m_savey2) { + tip = 4; + if (event.LeftDown()) + m_frame->SaveHisto(); + } + // left handle + if (x > m_hx1 && x < m_hx1+15 && y > (m_hy1+m_hy2)/2-10 && y < (m_hy1+m_hy2)/2+10) { + hand = true; + tip = 1; + if (event.LeftDown()) { + m_minCursor = m_histAxisMin; + m_histAxisAuto = false; + m_dragMin = true; + } + } + // right handle + if (x > m_hx2-15 && x < m_hx2 && y > (m_hy1+m_hy2)/2-10 && y < (m_hy1+m_hy2)/2+10) { + hand = true; + tip = 2; + if (event.LeftDown()) { + m_maxCursor = m_histAxisMax; + m_histAxisAuto = false; + m_dragMax = true; + } + } + // auto scale button + if (!m_histAxisAuto && x > (m_hx1+m_hx2)/2-15 && x < (m_hx1+m_hx2)/2+15 && + y > m_hy2-10 && y < m_hy2+4) { + hand = true; + tip = 3; + if (event.LeftDown()) { + m_histAxisAuto = true; + } + } + + if (event.Dragging() && m_dragMin) { + m_minCursor = m_histAxisMin + (m_histAxisMax - m_histAxisMin) * (x - m_hx1)/(m_hx2 - m_hx1); + sizewe = true; + } + if (event.LeftUp() && m_dragMin) { + m_histAxisMin = m_minCursor; + m_dragMin = false; + } + if (event.Dragging() && m_dragMax) { + m_maxCursor = m_histAxisMin + (m_histAxisMax - m_histAxisMin) * (x - m_hx1)/(m_hx2 - m_hx1); + sizewe = true; + } + if (event.LeftUp() && m_dragMax) { + m_histAxisMax = m_maxCursor; + m_dragMax = false; + } + } + + if (tip == 1) + this->SetToolTip(wxT("Drag right to set minimum")); + else if (tip == 2) + this->SetToolTip(wxT("Drag left to set maximum")); + else if (tip == 3) + this->SetToolTip(wxT("Auto zoom to show all values")); + else if (tip == 4) + this->SetToolTip(wxT("Save histogram")); + else + this->SetToolTip(NULL); + + if (sizewe) + SetCursor(wxCURSOR_SIZEWE); + else if (hand) + SetCursor(wxCURSOR_HAND); + else + SetCursor(wxNullCursor); + + if (event.LeftDown()) { + this->SetFocus(); + + if (m_splitMode) { + for (i=b=0 ; iGetNumberOfBoards() ; i++) { + if (x > m_x1[i] && x < m_x2[i] && + y > m_y1[i] && y < m_y2[i]) { + b = i; + break; + } + } + if (b != m_frame->GetCurrentBoard()) { + m_frame->SelectBoard(b); + } + } + + if (x > m_x1[m_frame->GetCurrentBoard()] && x < m_x2[m_frame->GetCurrentBoard()] && + y > m_y1[m_frame->GetCurrentBoard()] && y < m_y2[m_frame->GetCurrentBoard()]) { + if (m_frame->ActiveCursor() == 1) + m_frame->SetActiveCursor(0); + else if (m_frame->ActiveCursor() == 2) + m_frame->SetActiveCursor(0); + else { + if (m_frame->IsCursorA() && !m_frame->IsCursorB()) + m_frame->SetActiveCursor(1); + else if (!m_frame->IsCursorA() && m_frame->IsCursorB()) + m_frame->SetActiveCursor(2); + else if (m_frame->IsCursorA() && m_frame->IsCursorB()){ + // activate cursor close to mouse pointer + double d1 = (m_xCursorA-m_mouseX)*(m_xCursorA-m_mouseX) + + (m_yCursorA-m_mouseY)*(m_yCursorA-m_mouseY); + double d2 = (m_xCursorB-m_mouseX)*(m_xCursorB-m_mouseX) + + (m_yCursorB-m_mouseY)*(m_yCursorB-m_mouseY); + m_frame->SetActiveCursor(d1 < d2 ? 1 : 2); + } + } + } + } + + if (event.RightDown()) { + m_frame->ToggleControls(); + } + + wxWindow::Refresh(); +} + diff --git a/software/drsosc/DOScreen.h b/software/drsosc/DOScreen.h new file mode 100644 index 0000000..f145499 --- /dev/null +++ b/software/drsosc/DOScreen.h @@ -0,0 +1,169 @@ +/* + * DOScreen.h + * DRS oscilloscope screen header file + * $Id: DOScreen.h 22327 2016-10-11 13:18:26Z ritt $ + */ + +class Osci; +class DOFrame; + +enum PaintModes { + kPMWaveform, + kPMTimeCalibration, +}; + +class DOScreen : public wxWindow +{ +public: + DOScreen(wxWindow* parent, Osci *osci, DOFrame *frame); + ~DOScreen(); + void SelectBoard(int b) { m_board = b; } + void SetChnOn(int b, int i, int value ) { m_chnon[b][i] = value; } + int GetChnOn(int b, int i) { return m_chnon[b][i]; } + int GetCurChn() { return m_chn; } + bool GetSplitMode() { return m_splitMode; } + void SetSplitMode(bool flag) { m_splitMode = flag; } + void SetPaintMode(int pm) { m_paintMode = pm; } + void SetPos(int b, int i, double value) { m_offset[b][i] = value; } + void SetScale(int b, int i, int sclae); + void SetHScale(int b, int hscale); + void SetHScaleInc(int b, int increment); + int GetPaintMode() { return m_paintMode; } + void SetScreenOffset(int b, int offset) { m_screenOffset[b] = offset; } + int GetScreenSize(int b) { return m_screenSize[b]; } + int GetScreenOffset(int b) { return m_screenOffset[b]; } + int GetScaleIndex(int b, int i) { return m_scale[b][i]; } + double GetScale(int b, int i) { return m_scaleTable[m_scale[b][i]]; } + double GetOffset(int b, int i) { return m_offset[b][i]; } + int GetHScale(int b) { return m_hscale[b]; } + void SetDisplayDateTime(bool flag) { m_displayDateTime = flag; } + void SetDisplayShowGrid(bool flag) { m_displayShowGrid = flag; } + void SetDisplayLines(bool flag) { m_displayLines = flag; } + void SetDisplayScalers(bool flag) { m_displayScalers = flag; } + void SetDisplayMode(int mode, int n) { m_displayMode = mode; m_displayN = n; } + void SetMathDisplay(int id, bool flag); + wxDC *GetDC() { return m_dc; } + int GetX1() { return m_x1[m_board]; } + int GetX2() { return m_x2[m_board]; } + int GetY1() { return m_y1[m_board]; } + int GetY2() { return m_y2[m_board]; } + int timeToX(float t); + int voltToY(float v); + int voltToY(int chn, float v); + double XToTime(int x); + double YToVolt(int y); + double YToVolt(int chn, int y); + double GetT1(); + double GetT2(); + + static const int m_scaleTable[10]; + static const int m_hscaleTable[13]; + + // event handlers + void OnPaint(wxPaintEvent& event); + void OnSize(wxSizeEvent& event); + + // drawing routines + void DrawScope(wxDC& dc, wxCoord w, wxCoord h, bool printing); + void DrawScopeBottom(wxDC& dc, int board, int x1, int y1, int width, bool printing); + void DrawWaveforms(wxDC& dc, int wfIndex, bool printing); + void DrawHisto(wxDC& dc, wxCoord w, wxCoord h, bool printing); + void SaveHisto(int fd); + void DrawTcalib(wxDC& dc, wxCoord w, wxCoord h, bool printing); + void DrawMath(wxDC& dc, wxCoord width, wxCoord height, bool printing); + void DrawPeriodJitter(wxDC& dc, int chn, bool printing); + void DrawHAxis(wxDC &dc, int x1, int y1, int width, + int minor, int major, int text, int label, int grid, double xmin, double xmax); + + void OnMouse(wxMouseEvent& event); + +private: + // any class wishing to process wxWidgets events must use this macro + DECLARE_EVENT_TABLE() + + // pointer for main Osci object + Osci *m_osci; + + // pointer to DOFrame object + DOFrame *m_frame; + + // fonts + wxFont m_fontNormal; + wxFont m_fontFixed; + wxFont m_fontFixedBold; + + // coordinates of total scope area + int m_sx1, m_sx2, m_sy1, m_sy2; + + // coordinates of subpanel area + int m_x1[MAX_N_BOARDS], m_x2[MAX_N_BOARDS], m_y1[MAX_N_BOARDS], m_y2[MAX_N_BOARDS]; + + // split mode + bool m_splitMode; + + // current device context + wxDC *m_dc; + + // stop watch for screen updates + wxStopWatch m_sw; + + // paing mode + int m_paintMode; + + // current board index for drawing + int m_board; + + // curent channel index + int m_chn; + + // offset and size of display area in ns + int m_screenSize[MAX_N_BOARDS], m_screenOffset[MAX_N_BOARDS]; + + // cursor variables + int m_clientHeight, m_clientWidth; + double m_mouseX; + double m_mouseY; + int m_MeasX1, m_MeasX2, m_MeasY1, m_MeasY2; + int m_BSX1[MAX_N_BOARDS], m_BSX2[MAX_N_BOARDS], m_BSY1[MAX_N_BOARDS], m_BSY2[MAX_N_BOARDS]; + + double m_xCursorA, m_xCursorB, m_yCursorA, m_yCursorB; + int m_idxA, m_idxB; + double m_uCursorA, m_uCursorB, m_tCursorA, m_tCursorB; + + // waveform propoerties + int m_chnon[MAX_N_BOARDS][4]; + double m_offset[MAX_N_BOARDS][4]; + int m_scale[MAX_N_BOARDS][4]; + int m_hscale[MAX_N_BOARDS]; + + // math display + bool m_mathFlag[2][4]; + + // histogram coordinates + int m_hx1, m_hy1, m_hx2, m_hy2; + + // save button + int m_savex1, m_savey1, m_savex2, m_savey2; + + // histogram x axis + bool m_histAxisAuto; + double m_histAxisMin; + double m_histAxisMax; + double m_minCursor; + double m_maxCursor; + bool m_dragMin, m_dragMax; + + // display properties + bool m_displayDateTime, m_displayShowGrid, m_displayLines, m_displayScalers; + int m_displayMode, m_displayN; + + // grid drawing (screen vs. printer) + void DrawDot(wxDC& dc, wxCoord w, wxCoord h, bool printing); + + // find waveform point close to mouse cursor + bool FindClosestWafeformPoint(int& idx_min, int& x_min, int& y_min); + + // optional debug message + char m_debugMsg[80]; + +}; diff --git a/software/drsosc/DRSOsc.cpp b/software/drsosc/DRSOsc.cpp new file mode 100644 index 0000000..5a0a751 --- /dev/null +++ b/software/drsosc/DRSOsc.cpp @@ -0,0 +1,2072 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Nov 27 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "DRSOsc.h" + +#include "down.xpm" +#include "drsosc.xpm" +#include "left.xpm" +#include "pos.xpm" +#include "right.xpm" +#include "up.xpm" + +/////////////////////////////////////////////////////////////////////////// + +DOFrame_fb::DOFrame_fb( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + m_menubar1 = new wxMenuBar( 0 ); + m_menu1 = new wxMenu(); + wxMenuItem* m_menuSave; + m_menuSave = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("&Save...") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL ); + m_menu1->Append( m_menuSave ); + + wxMenuItem* m_menuPrint; + m_menuPrint = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("&Print") ) , wxEmptyString, wxITEM_NORMAL ); + m_menu1->Append( m_menuPrint ); + + m_menu1->AppendSeparator(); + + wxMenuItem* m_menuExit; + m_menuExit = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("E&xit") ) + wxT('\t') + wxT("Ctrl+X"), wxEmptyString, wxITEM_NORMAL ); + m_menu1->Append( m_menuExit ); + + m_menubar1->Append( m_menu1, wxT("&File") ); + + m_menu4 = new wxMenu(); + wxMenuItem* m_menuCursorA; + m_menuCursorA = new wxMenuItem( m_menu4, ID_CURSORA, wxString( wxT("Cursor A") ) + wxT('\t') + wxT("Ctrl+A"), wxEmptyString, wxITEM_NORMAL ); + m_menu4->Append( m_menuCursorA ); + + wxMenuItem* m_menuCursorB; + m_menuCursorB = new wxMenuItem( m_menu4, ID_CURSORB, wxString( wxT("Cursor B") ) + wxT('\t') + wxT("Ctrl+B"), wxEmptyString, wxITEM_NORMAL ); + m_menu4->Append( m_menuCursorB ); + + wxMenuItem* m_menuItem13; + m_menuItem13 = new wxMenuItem( m_menu4, wxID_ANY, wxString( wxT("Snap Cursor") ) , wxEmptyString, wxITEM_NORMAL ); + m_menu4->Append( m_menuItem13 ); + + m_menubar1->Append( m_menu4, wxT("C&ursor") ); + + m_menu3 = new wxMenu(); + wxMenuItem* m_menuConfig; + m_menuConfig = new wxMenuItem( m_menu3, wxID_ANY, wxString( wxT("Config...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menu3->Append( m_menuConfig ); + + wxMenuItem* m_menuMeasure; + m_menuMeasure = new wxMenuItem( m_menu3, wxID_ANY, wxString( wxT("Measure...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menu3->Append( m_menuMeasure ); + + wxMenuItem* m_menuDisplay; + m_menuDisplay = new wxMenuItem( m_menu3, wxID_ANY, wxString( wxT("Display...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menu3->Append( m_menuDisplay ); + + m_menubar1->Append( m_menu3, wxT("&Tools") ); + + m_menu2 = new wxMenu(); + wxMenuItem* m_menuAbout; + m_menuAbout = new wxMenuItem( m_menu2, wxID_ANY, wxString( wxT("About...") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); + m_menu2->Append( m_menuAbout ); + + m_menubar1->Append( m_menu2, wxT("&Help") ); + + this->SetMenuBar( m_menubar1 ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxHORIZONTAL ); + + m_pnScreen = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER ); + bSizer1->Add( m_pnScreen, 1, wxEXPAND, 5 ); + + m_pnControls = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); + m_pnControls->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer1; + sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_pnControls, wxID_ANY, wxT("Trigger") ), wxVERTICAL ); + + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxHORIZONTAL ); + + m_slTrgLevel = new wxSlider( m_pnControls, ID_TR_LEVEL, -250, -500, 500, wxDefaultPosition, wxSize( 20,120 ), wxSL_VERTICAL|wxSTATIC_BORDER ); + m_slTrgLevel->SetToolTip( wxT("Set Trigger Level") ); + + bSizer4->Add( m_slTrgLevel, 0, 0, 5 ); + + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer32; + bSizer32 = new wxBoxSizer( wxHORIZONTAL ); + + m_btRun = new wxButton( m_pnControls, ID_RUN, wxT("Stop"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_btRun->SetToolTip( wxT("Start/Stop Acquisition") ); + + bSizer32->Add( m_btRun, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_btSingle = new wxButton( m_pnControls, ID_SINGLE, wxT("Single"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_btSingle->SetToolTip( wxT("Arm for Single Trigger") ); + + bSizer32->Add( m_btSingle, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer5->Add( bSizer32, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer18; + sbSizer18 = new wxStaticBoxSizer( new wxStaticBox( m_pnControls, wxID_ANY, wxT("Type") ), wxHORIZONTAL ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + m_rbNormal = new wxRadioButton( m_pnControls, ID_TR_NORMAL, wxT("Normal"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_rbNormal->SetValue( true ); + m_rbNormal->SetToolTip( wxT("Set Normal Trigger Mode") ); + + bSizer7->Add( m_rbNormal, 0, 0, 5 ); + + m_rbAuto = new wxRadioButton( m_pnControls, ID_TR_AUTO, wxT("Auto"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rbAuto->SetToolTip( wxT("Set Auto Trigger Mode") ); + + bSizer7->Add( m_rbAuto, 0, 0, 5 ); + + + sbSizer18->Add( bSizer7, 0, 0, 5 ); + + m_bpPolarity = new wxBitmapButton( m_pnControls, ID_TR_POLARITY, wxBitmap( pos_xpm ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + m_bpPolarity->SetToolTip( wxT("Set Trigger Polarity") ); + + sbSizer18->Add( m_bpPolarity, 0, wxALIGN_CENTER|wxRIGHT|wxLEFT, 2 ); + + m_btTrgCfg = new wxButton( m_pnControls, ID_TRGCFG, wxT("CFG"), wxDefaultPosition, wxSize( 45,-1 ), 0 ); + m_btTrgCfg->SetToolTip( wxT("Show advanced trigger configuration") ); + + sbSizer18->Add( m_btTrgCfg, 1, wxALIGN_CENTER, 5 ); + + + bSizer5->Add( sbSizer18, 0, 0, 5 ); + + wxBoxSizer* bSizer31; + bSizer31 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText59 = new wxStaticText( m_pnControls, wxID_ANY, wxT("Max"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText59->Wrap( -1 ); + bSizer31->Add( m_staticText59, 0, wxRIGHT|wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticText60 = new wxStaticText( m_pnControls, wxID_ANY, wxT("Delay"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText60->Wrap( -1 ); + bSizer31->Add( m_staticText60, 1, wxRIGHT|wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticText61 = new wxStaticText( m_pnControls, wxID_ANY, wxT("Min"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText61->Wrap( -1 ); + bSizer31->Add( m_staticText61, 0, wxALIGN_BOTTOM|wxRIGHT|wxLEFT, 5 ); + + + bSizer5->Add( bSizer31, 0, wxEXPAND, 5 ); + + m_slTrgDelay = new wxSlider( m_pnControls, ID_TR_DELAY, 100, 0, 100, wxDefaultPosition, wxSize( -1,20 ), wxSL_HORIZONTAL|wxSTATIC_BORDER ); + m_slTrgDelay->SetToolTip( wxT("Set Trigger Delay") ); + + bSizer5->Add( m_slTrgDelay, 0, wxEXPAND, 5 ); + + + bSizer4->Add( bSizer5, 1, wxEXPAND, 5 ); + + + sbSizer1->Add( bSizer4, 1, wxEXPAND, 2 ); + + wxString m_rbSourceChoices[] = { wxT("1"), wxT("2"), wxT("3"), wxT("4"), wxT("E") }; + int m_rbSourceNChoices = sizeof( m_rbSourceChoices ) / sizeof( wxString ); + m_rbSource = new wxRadioBox( m_pnControls, ID_TR_SOURCE, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_rbSourceNChoices, m_rbSourceChoices, 1, wxRA_SPECIFY_ROWS ); + m_rbSource->SetSelection( 1 ); + m_rbSource->SetToolTip( wxT("Select channel to trigger on (E for external)") ); + + sbSizer1->Add( m_rbSource, 0, wxALIGN_CENTER, 0 ); + + + bSizer2->Add( sbSizer1, 0, 0, 5 ); + + wxStaticBoxSizer* sbSizer2; + sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_pnControls, wxID_ANY, wxT("Horizontal") ), wxVERTICAL ); + + wxBoxSizer* bSizer20; + bSizer20 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButton2 = new wxBitmapButton( m_pnControls, ID_HSCALEDOWN, wxBitmap( left_xpm ), wxDefaultPosition, wxSize( -1,32 ), wxBU_AUTODRAW ); + bSizer20->Add( m_bpButton2, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 10 ); + + m_stHScale = new wxStaticText( m_pnControls, wxID_ANY, wxT("ns/div"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE|wxST_NO_AUTORESIZE ); + m_stHScale->Wrap( -1 ); + m_stHScale->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 75, 90, 90, false, wxEmptyString ) ); + + bSizer20->Add( m_stHScale, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton3 = new wxBitmapButton( m_pnControls, ID_HSCALEUP, wxBitmap( right_xpm ), wxDefaultPosition, wxSize( -1,32 ), wxBU_AUTODRAW ); + bSizer20->Add( m_bpButton3, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 10 ); + + + sbSizer2->Add( bSizer20, 0, wxEXPAND, 5 ); + + m_slHOffset = new wxSlider( m_pnControls, ID_HOR_POS, 0, -1000, 1000, wxDefaultPosition, wxSize( -1,20 ), wxSL_HORIZONTAL|wxSTATIC_BORDER ); + m_slHOffset->SetToolTip( wxT("Set Horizontal Position") ); + + sbSizer2->Add( m_slHOffset, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 3 ); + + + bSizer2->Add( sbSizer2, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer3; + sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_pnControls, wxID_ANY, wxT("Vertical") ), wxHORIZONTAL ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxVERTICAL ); + + m_btCh1 = new wxToggleButton( m_pnControls, ID_CHON1, wxT("1"), wxDefaultPosition, wxSize( 30,27 ), 0 ); + m_btCh1->SetValue( true ); + m_btCh1->SetFont( wxFont( 12, 74, 90, 92, false, wxEmptyString ) ); + m_btCh1->SetToolTip( wxT("Enable Channel 1") ); + + bSizer9->Add( m_btCh1, 0, wxALIGN_CENTER, 5 ); + + m_slPos1 = new wxSlider( m_pnControls, ID_POS1, 0, -250, 250, wxDefaultPosition, wxSize( -1,70 ), wxSL_VERTICAL|wxSTATIC_BORDER ); + m_slPos1->SetBackgroundColour( wxColour( 255, 255, 0 ) ); + m_slPos1->SetToolTip( wxT("Move Channel 1 Vertical Position") ); + m_slPos1->SetMinSize( wxSize( -1,70 ) ); + m_slPos1->SetMaxSize( wxSize( -1,70 ) ); + + bSizer9->Add( m_slPos1, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButton4 = new wxBitmapButton( m_pnControls, ID_SCALEUP1, wxBitmap( up_xpm ), wxDefaultPosition, wxSize( -1,22 ), wxBU_AUTODRAW ); + bSizer9->Add( m_bpButton4, 0, wxALIGN_CENTER_HORIZONTAL, 0 ); + + m_stScale1 = new wxStaticText( m_pnControls, wxID_ANY, wxT("500mV"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE|wxST_NO_AUTORESIZE ); + m_stScale1->Wrap( -1 ); + m_stScale1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 75, 90, 90, false, wxEmptyString ) ); + + bSizer9->Add( m_stScale1, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL, 0 ); + + m_bpButton5 = new wxBitmapButton( m_pnControls, ID_SCALEDN1, wxBitmap( down_xpm ), wxDefaultPosition, wxSize( -1,22 ), wxBU_AUTODRAW ); + bSizer9->Add( m_bpButton5, 0, wxALIGN_CENTER_HORIZONTAL, 0 ); + + + sbSizer3->Add( bSizer9, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxVERTICAL ); + + m_btCh2 = new wxToggleButton( m_pnControls, ID_CHON2, wxT("2"), wxDefaultPosition, wxSize( 30,27 ), 0 ); + m_btCh2->SetValue( true ); + m_btCh2->SetFont( wxFont( 12, 74, 90, 92, false, wxEmptyString ) ); + m_btCh2->SetToolTip( wxT("Enable Channel 2") ); + + bSizer10->Add( m_btCh2, 0, wxALIGN_CENTER, 5 ); + + m_slPos2 = new wxSlider( m_pnControls, ID_POS2, 0, -250, 250, wxDefaultPosition, wxSize( -1,70 ), wxSL_VERTICAL|wxSTATIC_BORDER ); + m_slPos2->SetBackgroundColour( wxColour( 170, 170, 255 ) ); + m_slPos2->SetToolTip( wxT("Move Channel 2 Vertical Position") ); + m_slPos2->SetMinSize( wxSize( -1,70 ) ); + m_slPos2->SetMaxSize( wxSize( -1,70 ) ); + + bSizer10->Add( m_slPos2, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButton6 = new wxBitmapButton( m_pnControls, ID_SCALEUP2, wxBitmap( up_xpm ), wxDefaultPosition, wxSize( -1,22 ), wxBU_AUTODRAW ); + bSizer10->Add( m_bpButton6, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_stScale2 = new wxStaticText( m_pnControls, wxID_ANY, wxT("500mV"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE|wxST_NO_AUTORESIZE ); + m_stScale2->Wrap( -1 ); + m_stScale2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 75, 90, 90, false, wxEmptyString ) ); + + bSizer10->Add( m_stScale2, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButton7 = new wxBitmapButton( m_pnControls, ID_SCALEDN2, wxBitmap( down_xpm ), wxDefaultPosition, wxSize( -1,22 ), wxBU_AUTODRAW ); + bSizer10->Add( m_bpButton7, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + sbSizer3->Add( bSizer10, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer11; + bSizer11 = new wxBoxSizer( wxVERTICAL ); + + m_btCh3 = new wxToggleButton( m_pnControls, ID_CHON3, wxT("3"), wxDefaultPosition, wxSize( 30,27 ), 0 ); + m_btCh3->SetFont( wxFont( 12, 74, 90, 92, false, wxEmptyString ) ); + m_btCh3->SetToolTip( wxT("Enable Channel 3") ); + + bSizer11->Add( m_btCh3, 0, wxALIGN_CENTER, 5 ); + + m_slPos3 = new wxSlider( m_pnControls, ID_POS3, 0, -250, 250, wxDefaultPosition, wxSize( -1,70 ), wxSL_VERTICAL|wxSTATIC_BORDER ); + m_slPos3->SetBackgroundColour( wxColour( 255, 170, 170 ) ); + m_slPos3->SetToolTip( wxT("Move Channel 3 Vertical Position") ); + m_slPos3->SetMinSize( wxSize( -1,70 ) ); + m_slPos3->SetMaxSize( wxSize( -1,70 ) ); + + bSizer11->Add( m_slPos3, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButton8 = new wxBitmapButton( m_pnControls, ID_SCALEUP3, wxBitmap( up_xpm ), wxDefaultPosition, wxSize( -1,22 ), wxBU_AUTODRAW ); + bSizer11->Add( m_bpButton8, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_stScale3 = new wxStaticText( m_pnControls, wxID_ANY, wxT("500mV"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE|wxST_NO_AUTORESIZE ); + m_stScale3->Wrap( -1 ); + m_stScale3->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 75, 90, 90, false, wxEmptyString ) ); + + bSizer11->Add( m_stScale3, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButton9 = new wxBitmapButton( m_pnControls, ID_SCALEDN3, wxBitmap( down_xpm ), wxDefaultPosition, wxSize( -1,22 ), wxBU_AUTODRAW ); + bSizer11->Add( m_bpButton9, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + sbSizer3->Add( bSizer11, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer13; + bSizer13 = new wxBoxSizer( wxVERTICAL ); + + m_btCh4 = new wxToggleButton( m_pnControls, ID_CHON4, wxT("4"), wxDefaultPosition, wxSize( 30,27 ), 0 ); + m_btCh4->SetFont( wxFont( 12, 74, 90, 92, false, wxEmptyString ) ); + m_btCh4->SetToolTip( wxT("Enable Channel 4") ); + + bSizer13->Add( m_btCh4, 0, wxALIGN_CENTER, 5 ); + + m_slPos4 = new wxSlider( m_pnControls, ID_POS4, 0, -250, 250, wxDefaultPosition, wxSize( -1,70 ), wxSL_VERTICAL|wxSTATIC_BORDER ); + m_slPos4->SetBackgroundColour( wxColour( 170, 255, 170 ) ); + m_slPos4->SetToolTip( wxT("Move Channel 4 Vertical Position") ); + m_slPos4->SetMinSize( wxSize( -1,70 ) ); + m_slPos4->SetMaxSize( wxSize( -1,70 ) ); + + bSizer13->Add( m_slPos4, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButton10 = new wxBitmapButton( m_pnControls, ID_SCALEUP4, wxBitmap( up_xpm ), wxDefaultPosition, wxSize( -1,22 ), wxBU_AUTODRAW ); + bSizer13->Add( m_bpButton10, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_stScale4 = new wxStaticText( m_pnControls, wxID_ANY, wxT("500mV"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE|wxST_NO_AUTORESIZE ); + m_stScale4->Wrap( -1 ); + m_stScale4->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 75, 90, 90, false, wxEmptyString ) ); + + bSizer13->Add( m_stScale4, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButton11 = new wxBitmapButton( m_pnControls, ID_SCALEDN4, wxBitmap( down_xpm ), wxDefaultPosition, wxSize( -1,22 ), wxBU_AUTODRAW ); + bSizer13->Add( m_bpButton11, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + sbSizer3->Add( bSizer13, 1, wxEXPAND, 5 ); + + + bSizer2->Add( sbSizer3, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer8; + sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( m_pnControls, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + wxBoxSizer* bSizer131; + bSizer131 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText76 = new wxStaticText( m_pnControls, wxID_ANY, wxT("Cursor:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText76->Wrap( -1 ); + bSizer131->Add( m_staticText76, 0, wxALIGN_CENTER, 5 ); + + m_toggleCursorA = new wxToggleButton( m_pnControls, ID_CURSORA, wxT("&A"), wxDefaultPosition, wxSize( 40,-1 ), 0 ); + m_toggleCursorA->SetToolTip( wxT("Activate Cursor A") ); + m_toggleCursorA->SetMinSize( wxSize( 40,-1 ) ); + m_toggleCursorA->SetMaxSize( wxSize( 40,-1 ) ); + + bSizer131->Add( m_toggleCursorA, 0, wxALIGN_CENTER, 5 ); + + m_toggleCursorB = new wxToggleButton( m_pnControls, ID_CURSORB, wxT("&B"), wxDefaultPosition, wxSize( 40,-1 ), 0 ); + m_toggleCursorB->SetToolTip( wxT("Activate Cursor B") ); + m_toggleCursorB->SetMinSize( wxSize( 40,-1 ) ); + m_toggleCursorB->SetMaxSize( wxSize( 40,-1 ) ); + + bSizer131->Add( m_toggleCursorB, 0, wxALIGN_CENTER, 5 ); + + m_checkBox8 = new wxCheckBox( m_pnControls, wxID_ANY, wxT("Snap"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer131->Add( m_checkBox8, 1, wxALIGN_CENTER|wxLEFT, 5 ); + + + sbSizer8->Add( bSizer131, 0, wxEXPAND, 5 ); + + + bSizer2->Add( sbSizer8, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer4; + sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_pnControls, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + wxGridSizer* gSizer1; + gSizer1 = new wxGridSizer( 3, 2, 0, 0 ); + + m_btConfig = new wxButton( m_pnControls, ID_CONFIG, wxT("&Config"), wxDefaultPosition, wxDefaultSize, 0 ); + m_btConfig->SetToolTip( wxT("Bring up Configuration Dialog") ); + + gSizer1->Add( m_btConfig, 0, wxEXPAND, 5 ); + + m_btSave = new wxButton( m_pnControls, ID_SAVE, wxT("&Save"), wxDefaultPosition, wxDefaultSize, 0 ); + m_btSave->SetToolTip( wxT("Save Waveforms") ); + + gSizer1->Add( m_btSave, 0, wxEXPAND, 5 ); + + m_btMeasure = new wxButton( m_pnControls, ID_MEASURE, wxT("&Measure"), wxDefaultPosition, wxDefaultSize, 0 ); + m_btMeasure->SetToolTip( wxT("Bring up Measurement Dialog") ); + + gSizer1->Add( m_btMeasure, 0, wxEXPAND, 5 ); + + m_btDisplay = new wxButton( m_pnControls, ID_MEASURE, wxT("&Display"), wxDefaultPosition, wxDefaultSize, 0 ); + m_btDisplay->SetToolTip( wxT("Bring up Measurement Dialog") ); + + gSizer1->Add( m_btDisplay, 0, wxEXPAND, 5 ); + + m_btPrint = new wxButton( m_pnControls, ID_PRINT, wxT("&Print"), wxDefaultPosition, wxDefaultSize, 0 ); + m_btPrint->SetToolTip( wxT("Print Waveforms") ); + + gSizer1->Add( m_btPrint, 0, wxEXPAND, 5 ); + + + sbSizer4->Add( gSizer1, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer2->Add( sbSizer4, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer9; + sbSizer9 = new wxStaticBoxSizer( new wxStaticBox( m_pnControls, wxID_ANY, wxEmptyString ), wxHORIZONTAL ); + + wxGridSizer* gSizer4; + gSizer4 = new wxGridSizer( 1, 2, 0, 0 ); + + m_btAbout = new wxButton( m_pnControls, ID_ABOUT, wxT("About"), wxDefaultPosition, wxDefaultSize, 0 ); + m_btAbout->SetToolTip( wxT("Display About Box") ); + + gSizer4->Add( m_btAbout, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_btExit = new wxButton( m_pnControls, ID_EXIT, wxT("E&xit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_btExit->SetToolTip( wxT("Exit Program") ); + + gSizer4->Add( m_btExit, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + sbSizer9->Add( gSizer4, 1, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer2->Add( sbSizer9, 0, wxALIGN_CENTER|wxEXPAND, 5 ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer2->Add( bSizer3, 1, wxEXPAND, 5 ); + + + m_pnControls->SetSizer( bSizer2 ); + m_pnControls->Layout(); + bSizer2->Fit( m_pnControls ); + bSizer1->Add( m_pnControls, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 0 ); + + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + this->Connect( m_menuSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnSave ) ); + this->Connect( m_menuPrint->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnPrint ) ); + this->Connect( m_menuExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnExit ) ); + this->Connect( m_menuCursorA->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnCursor ) ); + this->Connect( m_menuCursorB->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnCursor ) ); + this->Connect( m_menuItem13->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnSnap ) ); + this->Connect( m_menuConfig->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnConfig ) ); + this->Connect( m_menuMeasure->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnMeasure ) ); + this->Connect( m_menuDisplay->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnDisplay ) ); + this->Connect( m_menuAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnAbout ) ); + m_slTrgLevel->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slTrgLevel->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_btRun->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnTrigger ), NULL, this ); + m_btSingle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnTrigger ), NULL, this ); + m_rbNormal->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DOFrame_fb::OnTrgButton ), NULL, this ); + m_rbAuto->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DOFrame_fb::OnTrgButton ), NULL, this ); + m_bpPolarity->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnTrgButton ), NULL, this ); + m_btTrgCfg->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnTrigger ), NULL, this ); + m_slTrgDelay->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_rbSource->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DOFrame_fb::OnTrgButton ), NULL, this ); + m_bpButton2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnHScaleChange ), NULL, this ); + m_bpButton3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnHScaleChange ), NULL, this ); + m_slHOffset->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slHOffset->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_btCh1->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnChnOn ), NULL, this ); + m_slPos1->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slPos1->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_bpButton4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_bpButton5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_btCh2->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnChnOn ), NULL, this ); + m_slPos2->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slPos2->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_bpButton6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_bpButton7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_btCh3->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnChnOn ), NULL, this ); + m_slPos3->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slPos3->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_bpButton8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_bpButton9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_btCh4->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnChnOn ), NULL, this ); + m_slPos4->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slPos4->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_bpButton10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_bpButton11->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_toggleCursorA->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnCursor ), NULL, this ); + m_toggleCursorB->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnCursor ), NULL, this ); + m_checkBox8->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DOFrame_fb::OnSnap ), NULL, this ); + m_btConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnConfig ), NULL, this ); + m_btSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnSave ), NULL, this ); + m_btMeasure->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnMeasure ), NULL, this ); + m_btDisplay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnDisplay ), NULL, this ); + m_btPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnPrint ), NULL, this ); + m_btAbout->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnAbout ), NULL, this ); + m_btExit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnExit ), NULL, this ); +} + +DOFrame_fb::~DOFrame_fb() +{ + // Disconnect Events + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnSave ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnPrint ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnExit ) ); + this->Disconnect( ID_CURSORA, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnCursor ) ); + this->Disconnect( ID_CURSORB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnCursor ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnSnap ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnConfig ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnMeasure ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnDisplay ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DOFrame_fb::OnAbout ) ); + m_slTrgLevel->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnTrgLevelChange ), NULL, this ); + m_slTrgLevel->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slTrgLevel->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_btRun->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnTrigger ), NULL, this ); + m_btSingle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnTrigger ), NULL, this ); + m_rbNormal->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DOFrame_fb::OnTrgButton ), NULL, this ); + m_rbAuto->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DOFrame_fb::OnTrgButton ), NULL, this ); + m_bpPolarity->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnTrgButton ), NULL, this ); + m_btTrgCfg->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnTrigger ), NULL, this ); + m_slTrgDelay->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_slTrgDelay->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnTrgDelayChange ), NULL, this ); + m_rbSource->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DOFrame_fb::OnTrgButton ), NULL, this ); + m_bpButton2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnHScaleChange ), NULL, this ); + m_bpButton3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnHScaleChange ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnHOffsetChange ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slHOffset->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_btCh1->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnChnOn ), NULL, this ); + m_slPos1->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos1->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slPos1->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_bpButton4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_bpButton5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_btCh2->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnChnOn ), NULL, this ); + m_slPos2->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos2->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slPos2->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_bpButton6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_bpButton7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_btCh3->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnChnOn ), NULL, this ); + m_slPos3->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos3->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slPos3->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_bpButton8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_bpButton9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_btCh4->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnChnOn ), NULL, this ); + m_slPos4->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DOFrame_fb::OnPosChange ), NULL, this ); + m_slPos4->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_slPos4->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DOFrame_fb::OnZero ), NULL, this ); + m_bpButton10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_bpButton11->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnScaleChange ), NULL, this ); + m_toggleCursorA->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnCursor ), NULL, this ); + m_toggleCursorB->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnCursor ), NULL, this ); + m_checkBox8->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DOFrame_fb::OnSnap ), NULL, this ); + m_btConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnConfig ), NULL, this ); + m_btSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnSave ), NULL, this ); + m_btMeasure->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnMeasure ), NULL, this ); + m_btDisplay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnDisplay ), NULL, this ); + m_btPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnPrint ), NULL, this ); + m_btAbout->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnAbout ), NULL, this ); + m_btExit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DOFrame_fb::OnExit ), NULL, this ); + +} + +ConfigDialog_fb::ConfigDialog_fb( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer12; + bSizer12 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer5111; + sbSizer5111 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Board") ), wxVERTICAL ); + + wxBoxSizer* bSizer37; + bSizer37 = new wxBoxSizer( wxHORIZONTAL ); + + wxArrayString m_cbBoardChoices; + m_cbBoard = new wxChoice( this, ID_BSEL, wxDefaultPosition, wxDefaultSize, m_cbBoardChoices, 0 ); + m_cbBoard->SetSelection( 0 ); + bSizer37->Add( m_cbBoard, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + m_btScan = new wxButton( this, wxID_ANY, wxT("Rescan"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer37->Add( m_btScan, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_btInfo = new wxButton( this, wxID_ANY, wxT("Info"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer37->Add( m_btInfo, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + + sbSizer5111->Add( bSizer37, 1, wxEXPAND, 5 ); + + m_cbMulti = new wxCheckBox( this, ID_MULTI, wxT("Configure multi-board daisy-chain"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbMulti->Enable( false ); + + sbSizer5111->Add( m_cbMulti, 0, wxRIGHT|wxLEFT, 5 ); + + + bSizer12->Add( sbSizer5111, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer511; + sbSizer511 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Channels") ), wxVERTICAL ); + + wxString m_rbChHalfChoices[] = { wxT("even channels"), wxT("odd channels"), wxT("combined") }; + int m_rbChHalfNChoices = sizeof( m_rbChHalfChoices ) / sizeof( wxString ); + m_rbChHalf = new wxRadioBox( this, ID_CH_HALF, wxT("2048-bin option"), wxDefaultPosition, wxDefaultSize, m_rbChHalfNChoices, m_rbChHalfChoices, 1, wxRA_SPECIFY_ROWS ); + m_rbChHalf->SetSelection( 0 ); + sbSizer511->Add( m_rbChHalf, 0, wxBOTTOM, 5 ); + + m_cbClkOn = new wxCheckBox( this, wxID_ANY, wxT("Connect reference clock to all channels"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer511->Add( m_cbClkOn, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); + + + bSizer12->Add( sbSizer511, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer17; + sbSizer17 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Input Range") ), wxVERTICAL ); + + wxString m_rbRangeChoices[] = { wxT("-0.5V to +0.5V"), wxT("-0.05V to +0.95V"), wxT("0V to +1V") }; + int m_rbRangeNChoices = sizeof( m_rbRangeChoices ) / sizeof( wxString ); + m_rbRange = new wxRadioBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_rbRangeNChoices, m_rbRangeChoices, 1, wxRA_SPECIFY_ROWS ); + m_rbRange->SetSelection( 2 ); + sbSizer17->Add( m_rbRange, 0, 0, 5 ); + + + bSizer12->Add( sbSizer17, 0, wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer512; + sbSizer512 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Sampling Speed") ), wxVERTICAL ); + + wxBoxSizer* bSizer1813; + bSizer1813 = new wxBoxSizer( wxHORIZONTAL ); + + m_tbFreq = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 40,-1 ), wxTE_PROCESS_ENTER ); + m_tbFreq->SetMaxLength( 0 ); + bSizer1813->Add( m_tbFreq, 0, wxALIGN_CENTER|wxRIGHT|wxLEFT, 5 ); + + m_staticText26 = new wxStaticText( this, wxID_ANY, wxT("GSPS"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText26->Wrap( -1 ); + bSizer1813->Add( m_staticText26, 0, wxALIGN_CENTER|wxBOTTOM|wxRIGHT|wxTOP, 5 ); + + m_cbLocked = new wxCheckBox( this, wxID_ANY, wxT("Lock"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer1813->Add( m_cbLocked, 0, wxALIGN_CENTER|wxLEFT, 10 ); + + m_staticText261 = new wxStaticText( this, wxID_ANY, wxT("Actual speed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText261->Wrap( -1 ); + bSizer1813->Add( m_staticText261, 0, wxALIGN_CENTER|wxLEFT, 40 ); + + m_stActFreq = new wxStaticText( this, wxID_ANY, wxT("0.000 GSPS"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stActFreq->Wrap( -1 ); + bSizer1813->Add( m_stActFreq, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); + + + sbSizer512->Add( bSizer1813, 0, wxEXPAND, 5 ); + + + bSizer12->Add( sbSizer512, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer5; + sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Voltage Calibration") ), wxVERTICAL ); + + wxBoxSizer* bSizer18; + bSizer18 = new wxBoxSizer( wxHORIZONTAL ); + + m_cbCalOn = new wxCheckBox( this, wxID_ANY, wxT("Voltage on"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer18->Add( m_cbCalOn, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_teCal = new wxTextCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxSize( 40,-1 ), wxTE_PROCESS_ENTER ); + m_teCal->SetMaxLength( 0 ); + bSizer18->Add( m_teCal, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_slCal = new wxSlider( this, wxID_ANY, 0, -500, 500, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSTATIC_BORDER ); + bSizer18->Add( m_slCal, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_staticText10 = new wxStaticText( this, wxID_ANY, wxT("mV"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText10->Wrap( -1 ); + bSizer18->Add( m_staticText10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + + sbSizer5->Add( bSizer18, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + m_cbCalibrated = new wxCheckBox( this, ID_DISP_CALIBRATED, wxT("Apply Primary Calibration (Cell)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbCalibrated->SetValue(true); + sbSizer5->Add( m_cbCalibrated, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_cbCalibrated2 = new wxCheckBox( this, ID_DISP_CALIBRATED2, wxT("Apply Secondary Calibration (Readout)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbCalibrated2->SetValue(true); + sbSizer5->Add( m_cbCalibrated2, 0, wxRIGHT|wxLEFT, 5 ); + + m_cbSpikes = new wxCheckBox( this, wxID_ANY, wxT("Remove Spikes"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer5->Add( m_cbSpikes, 0, wxRIGHT|wxLEFT, 5 ); + + m_button13 = new wxButton( this, wxID_ANY, wxT("Execute Voltage Calibration"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer5->Add( m_button13, 0, wxALIGN_CENTER|wxALL, 5 ); + + m_gaugeCalVolt = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,15 ), wxGA_HORIZONTAL ); + sbSizer5->Add( m_gaugeCalVolt, 1, wxEXPAND, 5 ); + + + bSizer12->Add( sbSizer5, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer6; + sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Timing Calibration") ), wxVERTICAL ); + + m_cbRotated = new wxCheckBox( this, ID_DISP_ROTATED, wxT("Rotate waveforms relative to trigger"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbRotated->SetValue(true); + sbSizer6->Add( m_cbRotated, 0, wxRIGHT|wxLEFT, 5 ); + + m_cbTCalOn = new wxCheckBox( this, ID_DISP_TCALIBRATED, wxT("Apply Timing Calibration"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbTCalOn->SetValue(true); + sbSizer6->Add( m_cbTCalOn, 0, wxRIGHT|wxLEFT, 5 ); + + m_cbTrgCorr = new wxCheckBox( this, ID_DISP_TRGCORR, wxT("Correct horizontal trigger position"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbTrgCorr->SetValue(true); + sbSizer6->Add( m_cbTrgCorr, 0, wxRIGHT|wxLEFT, 5 ); + + m_cbExtRefclk = new wxCheckBox( this, ID_REFCLK, wxT("Use external reference clock"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer6->Add( m_cbExtRefclk, 0, wxRIGHT|wxLEFT, 5 ); + + m_button14 = new wxButton( this, wxID_ANY, wxT("Execute Timing Calibration"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer6->Add( m_button14, 0, wxALIGN_CENTER|wxALL, 5 ); + + m_gaugeCalTime = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,15 ), wxGA_HORIZONTAL ); + sbSizer6->Add( m_gaugeCalTime, 1, wxEXPAND, 5 ); + + + bSizer12->Add( sbSizer6, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_button10 = new wxButton( this, wxID_ANY, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer12->Add( m_button10, 0, wxALL|wxALIGN_RIGHT, 5 ); + + + this->SetSizer( bSizer12 ); + this->Layout(); + bSizer12->Fit( this ); + + // Connect Events + m_cbBoard->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDialog_fb::OnBoardSelect ), NULL, this ); + m_btScan->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnRescan ), NULL, this ); + m_btInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnInfo ), NULL, this ); + m_cbMulti->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnBoardSelect ), NULL, this ); + m_rbChHalf->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( ConfigDialog_fb::OnChannelHalf ), NULL, this ); + m_cbClkOn->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnClkOn ), NULL, this ); + m_rbRange->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( ConfigDialog_fb::OnInputRange ), NULL, this ); + m_tbFreq->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ConfigDialog_fb::OnFreq ), NULL, this ); + m_cbLocked->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnLock ), NULL, this ); + m_cbCalOn->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnCalOn ), NULL, this ); + m_teCal->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ConfigDialog_fb::OnCalEnter ), NULL, this ); + m_slCal->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_cbCalibrated->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_cbCalibrated2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_cbSpikes->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnRemoveSpikes ), NULL, this ); + m_button13->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnButtonCalVolt ), NULL, this ); + m_cbRotated->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_cbTCalOn->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_cbTrgCorr->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_cbExtRefclk->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_button14->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnButtonCalTime ), NULL, this ); + m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnClose ), NULL, this ); +} + +ConfigDialog_fb::~ConfigDialog_fb() +{ + // Disconnect Events + m_cbBoard->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDialog_fb::OnBoardSelect ), NULL, this ); + m_btScan->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnRescan ), NULL, this ); + m_btInfo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnInfo ), NULL, this ); + m_cbMulti->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnBoardSelect ), NULL, this ); + m_rbChHalf->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( ConfigDialog_fb::OnChannelHalf ), NULL, this ); + m_cbClkOn->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnClkOn ), NULL, this ); + m_rbRange->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( ConfigDialog_fb::OnInputRange ), NULL, this ); + m_tbFreq->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ConfigDialog_fb::OnFreq ), NULL, this ); + m_cbLocked->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnLock ), NULL, this ); + m_cbCalOn->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnCalOn ), NULL, this ); + m_teCal->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ConfigDialog_fb::OnCalEnter ), NULL, this ); + m_slCal->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_slCal->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( ConfigDialog_fb::OnCalSlider ), NULL, this ); + m_cbCalibrated->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_cbCalibrated2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_cbSpikes->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnRemoveSpikes ), NULL, this ); + m_button13->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnButtonCalVolt ), NULL, this ); + m_cbRotated->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_cbTCalOn->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_cbTrgCorr->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_cbExtRefclk->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnDisplayWaveforms ), NULL, this ); + m_button14->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnButtonCalTime ), NULL, this ); + m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDialog_fb::OnClose ), NULL, this ); + +} + +DisplayDialog_fb::DisplayDialog_fb( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer12; + bSizer12 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer7; + sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Options") ), wxVERTICAL ); + + wxBoxSizer* bSizer34; + bSizer34 = new wxBoxSizer( wxHORIZONTAL ); + + m_checkBox7 = new wxCheckBox( this, wxID_ANY, wxT("Display Date/Time"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer34->Add( m_checkBox7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_checkBox71 = new wxCheckBox( this, wxID_ANY, wxT("Show Grid"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBox71->SetValue(true); + bSizer34->Add( m_checkBox71, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox88 = new wxCheckBox( this, wxID_ANY, wxT("Lines"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBox88->SetValue(true); + bSizer34->Add( m_checkBox88, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + sbSizer7->Add( bSizer34, 1, wxEXPAND, 5 ); + + m_checkBox73 = new wxCheckBox( this, wxID_ANY, wxT("Show hardware scalers"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer7->Add( m_checkBox73, 0, wxALL, 5 ); + + + bSizer12->Add( sbSizer7, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer71; + sbSizer71 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Display Mode") ), wxVERTICAL ); + + m_rbShowSample = new wxRadioButton( this, ID_DISPSAMPLE, wxT("Sample"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rbShowSample->SetValue( true ); + sbSizer71->Add( m_rbShowSample, 0, wxALL, 5 ); + + wxBoxSizer* bSizer39; + bSizer39 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer40; + bSizer40 = new wxBoxSizer( wxVERTICAL ); + + m_rbShowAverage = new wxRadioButton( this, ID_DISPAVERAGE, wxT("Average"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rbShowAverage->Enable( false ); + + bSizer40->Add( m_rbShowAverage, 0, wxALL, 5 ); + + m_rbShowPersist = new wxRadioButton( this, ID_DISPPERSIST, wxT("Persistance"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rbShowPersist->Enable( false ); + + bSizer40->Add( m_rbShowPersist, 0, wxALL, 5 ); + + + bSizer39->Add( bSizer40, 1, wxEXPAND, 5 ); + + m_staticText59 = new wxStaticText( this, wxID_ANY, wxT("Number of waveforms:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText59->Wrap( -1 ); + bSizer39->Add( m_staticText59, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_cbNumber = new wxComboBox( this, ID_DISPNUMBER, wxT("16"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxTE_PROCESS_ENTER ); + m_cbNumber->Append( wxT("2") ); + m_cbNumber->Append( wxT("4") ); + m_cbNumber->Append( wxT("8") ); + m_cbNumber->Append( wxT("16") ); + m_cbNumber->Append( wxT("32") ); + m_cbNumber->Append( wxT("64") ); + m_cbNumber->Append( wxT("128") ); + m_cbNumber->Append( wxT("256") ); + m_cbNumber->Enable( false ); + + bSizer39->Add( m_cbNumber, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + sbSizer71->Add( bSizer39, 1, wxEXPAND, 5 ); + + + bSizer12->Add( sbSizer71, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer711; + sbSizer711 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Math Display") ), wxVERTICAL ); + + wxBoxSizer* bSizer14; + bSizer14 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* gSizer2; + gSizer2 = new wxFlexGridSizer( 3, 5, 0, 0 ); + gSizer2->SetFlexibleDirection( wxBOTH ); + gSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText11 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + gSizer2->Add( m_staticText11, 0, wxALL, 5 ); + + m_staticText12 = new wxStaticText( this, wxID_ANY, wxT("CH1"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + m_staticText12->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText12->SetBackgroundColour( wxColour( 255, 255, 0 ) ); + + gSizer2->Add( m_staticText12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2 ); + + m_staticText13 = new wxStaticText( this, wxID_ANY, wxT("CH2"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13->Wrap( -1 ); + m_staticText13->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText13->SetBackgroundColour( wxColour( 170, 170, 255 ) ); + + gSizer2->Add( m_staticText13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2 ); + + m_staticText14 = new wxStaticText( this, wxID_ANY, wxT("CH3"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText14->Wrap( -1 ); + m_staticText14->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText14->SetBackgroundColour( wxColour( 255, 170, 170 ) ); + + gSizer2->Add( m_staticText14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, wxT("CH4"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + m_staticText15->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText15->SetBackgroundColour( wxColour( 170, 255, 170 ) ); + + gSizer2->Add( m_staticText15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2 ); + + m_staticText17 = new wxStaticText( this, wxID_ANY, wxT("Period Jitter"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText17->Wrap( -1 ); + gSizer2->Add( m_staticText17, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox13 = new wxCheckBox( this, ID_PJ1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox14 = new wxCheckBox( this, ID_PJ2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox15 = new wxCheckBox( this, ID_PJ3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox16 = new wxCheckBox( this, ID_PJ4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer14->Add( gSizer2, 0, 0, 5 ); + + + sbSizer711->Add( bSizer14, 1, wxEXPAND, 5 ); + + + bSizer12->Add( sbSizer711, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_button10 = new wxButton( this, wxID_ANY, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer12->Add( m_button10, 0, wxALL|wxALIGN_RIGHT, 5 ); + + + this->SetSizer( bSizer12 ); + this->Layout(); + bSizer12->Fit( this ); + + // Connect Events + m_checkBox7->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnDateTime ), NULL, this ); + m_checkBox71->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnShowGrid ), NULL, this ); + m_checkBox88->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnLines ), NULL, this ); + m_checkBox73->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnScalers ), NULL, this ); + m_rbShowSample->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DisplayDialog_fb::OnDisplayMode ), NULL, this ); + m_rbShowAverage->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DisplayDialog_fb::OnDisplayMode ), NULL, this ); + m_rbShowPersist->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DisplayDialog_fb::OnDisplayMode ), NULL, this ); + m_cbNumber->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DisplayDialog_fb::OnDisplayMode ), NULL, this ); + m_cbNumber->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DisplayDialog_fb::OnDisplayMode ), NULL, this ); + m_checkBox13->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnButton ), NULL, this ); + m_checkBox14->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnButton ), NULL, this ); + m_checkBox15->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnButton ), NULL, this ); + m_checkBox16->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnButton ), NULL, this ); + m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnClose ), NULL, this ); +} + +DisplayDialog_fb::~DisplayDialog_fb() +{ + // Disconnect Events + m_checkBox7->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnDateTime ), NULL, this ); + m_checkBox71->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnShowGrid ), NULL, this ); + m_checkBox88->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnLines ), NULL, this ); + m_checkBox73->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnScalers ), NULL, this ); + m_rbShowSample->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DisplayDialog_fb::OnDisplayMode ), NULL, this ); + m_rbShowAverage->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DisplayDialog_fb::OnDisplayMode ), NULL, this ); + m_rbShowPersist->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DisplayDialog_fb::OnDisplayMode ), NULL, this ); + m_cbNumber->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DisplayDialog_fb::OnDisplayMode ), NULL, this ); + m_cbNumber->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DisplayDialog_fb::OnDisplayMode ), NULL, this ); + m_checkBox13->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnButton ), NULL, this ); + m_checkBox14->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnButton ), NULL, this ); + m_checkBox15->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnButton ), NULL, this ); + m_checkBox16->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnButton ), NULL, this ); + m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DisplayDialog_fb::OnClose ), NULL, this ); + +} + +MeasureDialog_fb::MeasureDialog_fb( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer14; + bSizer14 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* gSizer2; + gSizer2 = new wxFlexGridSizer( 17, 5, 0, 0 ); + gSizer2->SetFlexibleDirection( wxBOTH ); + gSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText11 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + gSizer2->Add( m_staticText11, 0, wxALL, 5 ); + + m_staticText12 = new wxStaticText( this, wxID_ANY, wxT("CH1"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + m_staticText12->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText12->SetBackgroundColour( wxColour( 255, 255, 0 ) ); + + gSizer2->Add( m_staticText12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2 ); + + m_staticText13 = new wxStaticText( this, wxID_ANY, wxT("CH2"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13->Wrap( -1 ); + m_staticText13->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText13->SetBackgroundColour( wxColour( 170, 170, 255 ) ); + + gSizer2->Add( m_staticText13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2 ); + + m_staticText14 = new wxStaticText( this, wxID_ANY, wxT("CH3"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText14->Wrap( -1 ); + m_staticText14->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText14->SetBackgroundColour( wxColour( 255, 170, 170 ) ); + + gSizer2->Add( m_staticText14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, wxT("CH4"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + m_staticText15->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText15->SetBackgroundColour( wxColour( 170, 255, 170 ) ); + + gSizer2->Add( m_staticText15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2 ); + + m_staticText80 = new wxStaticText( this, wxID_ANY, wxT("Amplitude"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText80->Wrap( -1 ); + m_staticText80->SetFont( wxFont( 16, 74, 90, 92, false, wxEmptyString ) ); + + gSizer2->Add( m_staticText80, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText81 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText81->Wrap( -1 ); + gSizer2->Add( m_staticText81, 0, wxALL, 5 ); + + m_staticText82 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText82->Wrap( -1 ); + gSizer2->Add( m_staticText82, 0, wxALL, 5 ); + + m_staticText83 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText83->Wrap( -1 ); + gSizer2->Add( m_staticText83, 0, wxALL, 5 ); + + m_staticText84 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText84->Wrap( -1 ); + gSizer2->Add( m_staticText84, 0, wxALL, 5 ); + + m_staticText16 = new wxStaticText( this, wxID_ANY, wxT("Level"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + gSizer2->Add( m_staticText16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox9 = new wxCheckBox( this, ID_LEVEL1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox9, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox10 = new wxCheckBox( this, ID_LEVEL2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox11 = new wxCheckBox( this, ID_LEVEL3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox12 = new wxCheckBox( this, ID_LEVEL4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText17 = new wxStaticText( this, wxID_ANY, wxT("Peak-Peak Amplitude"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText17->Wrap( -1 ); + gSizer2->Add( m_staticText17, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox13 = new wxCheckBox( this, ID_PKPK1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox14 = new wxCheckBox( this, ID_PKPK2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox15 = new wxCheckBox( this, ID_PKPK3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox16 = new wxCheckBox( this, ID_PKPK4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText19 = new wxStaticText( this, wxID_ANY, wxT("RMS"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText19->Wrap( -1 ); + gSizer2->Add( m_staticText19, 0, wxALL, 5 ); + + m_checkBox17 = new wxCheckBox( this, ID_RMS1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox17, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_checkBox18 = new wxCheckBox( this, ID_RMS2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox18, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_checkBox19 = new wxCheckBox( this, ID_RMS3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox19, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_checkBox20 = new wxCheckBox( this, ID_RMS4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox20, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_staticText90 = new wxStaticText( this, wxID_ANY, wxT("Vertical slice"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText90->Wrap( -1 ); + gSizer2->Add( m_staticText90, 0, wxALL, 5 ); + + m_checkBox74 = new wxCheckBox( this, ID_VS1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox74, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox75 = new wxCheckBox( this, ID_VS2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox75, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox76 = new wxCheckBox( this, ID_VS3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox76, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox77 = new wxCheckBox( this, ID_VS4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox77, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText91 = new wxStaticText( this, wxID_ANY, wxT("Gated charge"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText91->Wrap( -1 ); + gSizer2->Add( m_staticText91, 0, wxALL, 5 ); + + m_checkBox82 = new wxCheckBox( this, ID_CHRG1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox82, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox83 = new wxCheckBox( this, ID_CHRG2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox83, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox84 = new wxCheckBox( this, ID_CHRG3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox84, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox85 = new wxCheckBox( this, ID_CHRG4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox85, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + gSizer2->Add( m_staticline4, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_staticline41 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + gSizer2->Add( m_staticline41, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_staticline42 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + gSizer2->Add( m_staticline42, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_staticline43 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + gSizer2->Add( m_staticline43, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_staticline44 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + gSizer2->Add( m_staticline44, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_staticText85 = new wxStaticText( this, wxID_ANY, wxT("Time"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText85->Wrap( -1 ); + m_staticText85->SetFont( wxFont( 16, 74, 90, 92, false, wxEmptyString ) ); + + gSizer2->Add( m_staticText85, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText86 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText86->Wrap( -1 ); + gSizer2->Add( m_staticText86, 0, wxALL, 5 ); + + m_staticText87 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText87->Wrap( -1 ); + gSizer2->Add( m_staticText87, 0, wxALL, 5 ); + + m_staticText88 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText88->Wrap( -1 ); + gSizer2->Add( m_staticText88, 0, wxALL, 5 ); + + m_staticText89 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText89->Wrap( -1 ); + gSizer2->Add( m_staticText89, 0, wxALL, 5 ); + + m_staticText20 = new wxStaticText( this, wxID_ANY, wxT("Frequency"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText20->Wrap( -1 ); + gSizer2->Add( m_staticText20, 0, wxALL, 5 ); + + m_checkBox21 = new wxCheckBox( this, ID_FREQ1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox21, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox22 = new wxCheckBox( this, ID_FREQ2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox22, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox23 = new wxCheckBox( this, ID_FREQ3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox23, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox24 = new wxCheckBox( this, ID_FREQ4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox24, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText21 = new wxStaticText( this, wxID_ANY, wxT("Period"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21->Wrap( -1 ); + gSizer2->Add( m_staticText21, 0, wxALL, 5 ); + + m_checkBox25 = new wxCheckBox( this, ID_PERIOD1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox25, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox26 = new wxCheckBox( this, ID_PERIOD2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox26, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox27 = new wxCheckBox( this, ID_PERIOD3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox27, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox28 = new wxCheckBox( this, ID_PERIOD4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox28, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText22 = new wxStaticText( this, wxID_ANY, wxT("Rise time"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText22->Wrap( -1 ); + gSizer2->Add( m_staticText22, 0, wxALL, 5 ); + + m_checkBox29 = new wxCheckBox( this, ID_RISE1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox29, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox30 = new wxCheckBox( this, ID_RISE2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox30, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox31 = new wxCheckBox( this, ID_RISE3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox31, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox32 = new wxCheckBox( this, ID_RISE4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox32, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText23 = new wxStaticText( this, wxID_ANY, wxT("Fall time"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText23->Wrap( -1 ); + gSizer2->Add( m_staticText23, 0, wxALL, 5 ); + + m_checkBox33 = new wxCheckBox( this, ID_FALL1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox33, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox34 = new wxCheckBox( this, ID_FALL2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox34, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox35 = new wxCheckBox( this, ID_FALL3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox35, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox36 = new wxCheckBox( this, ID_FALL4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox36, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText221 = new wxStaticText( this, wxID_ANY, wxT("Positive width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText221->Wrap( -1 ); + gSizer2->Add( m_staticText221, 0, wxALL, 5 ); + + m_checkBox291 = new wxCheckBox( this, ID_POSWIDTH1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox291, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_checkBox2911 = new wxCheckBox( this, ID_POSWIDTH2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox2911, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_checkBox2912 = new wxCheckBox( this, ID_POSWIDTH3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox2912, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_checkBox2913 = new wxCheckBox( this, ID_POSWIDTH4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox2913, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText2211 = new wxStaticText( this, wxID_ANY, wxT("Negative width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2211->Wrap( -1 ); + gSizer2->Add( m_staticText2211, 0, wxALL, 5 ); + + m_checkBox2914 = new wxCheckBox( this, ID_NEGWIDTH1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox2914, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_checkBox2915 = new wxCheckBox( this, ID_NEGWIDTH2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox2915, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_checkBox2916 = new wxCheckBox( this, ID_NEGWIDTH3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox2916, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_checkBox2917 = new wxCheckBox( this, ID_NEGWIDTH4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox2917, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText231 = new wxStaticText( this, wxID_ANY, wxT("CH(x+1)-CH(x) delay"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText231->Wrap( -1 ); + gSizer2->Add( m_staticText231, 0, wxALL, 5 ); + + m_checkBox37 = new wxCheckBox( this, ID_CHNDELAY1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox37, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox38 = new wxCheckBox( this, ID_CHNDELAY2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox38, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox39 = new wxCheckBox( this, ID_CHNDELAY3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox39, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox40 = new wxCheckBox( this, ID_CHNDELAY4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox40, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText901 = new wxStaticText( this, wxID_ANY, wxT("Horizontal slice"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText901->Wrap( -1 ); + gSizer2->Add( m_staticText901, 0, wxALL, 5 ); + + m_checkBox78 = new wxCheckBox( this, ID_HS1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox78, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox79 = new wxCheckBox( this, ID_HS2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox79, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox80 = new wxCheckBox( this, ID_HS3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox80, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBox81 = new wxCheckBox( this, ID_HS4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_checkBox81, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer14->Add( gSizer2, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer14->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer35; + bSizer35 = new wxBoxSizer( wxHORIZONTAL ); + + m_cbStat = new wxCheckBox( this, wxID_ANY, wxT("Display Statistics"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbStat->SetValue(true); + bSizer35->Add( m_cbStat, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_cbHist = new wxCheckBox( this, wxID_ANY, wxT("Display Histograms"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer35->Add( m_cbHist, 1, wxALL|wxEXPAND, 5 ); + + + bSizer14->Add( bSizer35, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText27 = new wxStaticText( this, wxID_ANY, wxT("Accumulate"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText27->Wrap( -1 ); + bSizer25->Add( m_staticText27, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_cbNAverage = new wxComboBox( this, wxID_ANY, wxT("1000"), wxDefaultPosition, wxSize( 100,-1 ), 0, NULL, wxTE_PROCESS_ENTER ); + m_cbNAverage->Append( wxT("10") ); + m_cbNAverage->Append( wxT("50") ); + m_cbNAverage->Append( wxT("100") ); + m_cbNAverage->Append( wxT("500") ); + m_cbNAverage->Append( wxT("1000") ); + m_cbNAverage->Append( wxT("5000") ); + m_cbNAverage->Append( wxT("10000") ); + m_cbNAverage->Append( wxT("50000") ); + m_cbNAverage->Append( wxT("1000000") ); + bSizer25->Add( m_cbNAverage, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText271 = new wxStaticText( this, wxID_ANY, wxT("measurements"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText271->Wrap( -1 ); + bSizer25->Add( m_staticText271, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + + bSizer14->Add( bSizer25, 0, wxEXPAND, 5 ); + + m_button15 = new wxButton( this, wxID_ANY, wxT("Clear"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer14->Add( m_button15, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer14->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); + + m_cbIndicator = new wxCheckBox( this, wxID_ANY, wxT("Display Indicators"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbIndicator->SetValue(true); + bSizer14->Add( m_cbIndicator, 0, wxALL, 5 ); + + m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer14->Add( m_staticline21, 0, wxEXPAND | wxALL, 5 ); + + m_button11 = new wxButton( this, wxID_ANY, wxT("Cl&ose"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer14->Add( m_button11, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + + + this->SetSizer( bSizer14 ); + this->Layout(); + bSizer14->Fit( this ); + + // Connect Events + m_checkBox9->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox10->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox11->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox12->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox13->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox14->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox15->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox16->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox17->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox18->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox19->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox20->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox74->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox75->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox76->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox77->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox82->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox83->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox84->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox85->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox21->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox22->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox23->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox24->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox25->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox26->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox27->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox28->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox29->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox30->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox31->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox32->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox33->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox34->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox35->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox36->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox291->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2911->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2912->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2913->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2914->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2915->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2916->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2917->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox37->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox38->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox39->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox40->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox78->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox79->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox80->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox81->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_cbStat->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnStat ), NULL, this ); + m_cbHist->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnHist ), NULL, this ); + m_cbNAverage->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MeasureDialog_fb::OnStatNAverage ), NULL, this ); + m_cbNAverage->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MeasureDialog_fb::OnStatNAverage ), NULL, this ); + m_button15->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnStatReset ), NULL, this ); + m_cbIndicator->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnIndicator ), NULL, this ); + m_button11->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnClose ), NULL, this ); +} + +MeasureDialog_fb::~MeasureDialog_fb() +{ + // Disconnect Events + m_checkBox9->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox10->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox11->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox12->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox13->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox14->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox15->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox16->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox17->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox18->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox19->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox20->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox74->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox75->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox76->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox77->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox82->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox83->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox84->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox85->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox21->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox22->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox23->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox24->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox25->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox26->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox27->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox28->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox29->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox30->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox31->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox32->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox33->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox34->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox35->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox36->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox291->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2911->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2912->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2913->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2914->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2915->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2916->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox2917->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox37->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox38->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox39->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox40->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox78->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox79->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox80->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_checkBox81->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnButton ), NULL, this ); + m_cbStat->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnStat ), NULL, this ); + m_cbHist->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnHist ), NULL, this ); + m_cbNAverage->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MeasureDialog_fb::OnStatNAverage ), NULL, this ); + m_cbNAverage->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MeasureDialog_fb::OnStatNAverage ), NULL, this ); + m_button15->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnStatReset ), NULL, this ); + m_cbIndicator->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnIndicator ), NULL, this ); + m_button11->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MeasureDialog_fb::OnClose ), NULL, this ); + +} + +TriggerDialog_fb::TriggerDialog_fb( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer14; + bSizer14 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer35; + bSizer35 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText12 = new wxStaticText( this, wxID_ANY, wxT("CH1"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText12->Wrap( -1 ); + m_staticText12->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText12->SetBackgroundColour( wxColour( 255, 255, 0 ) ); + + bSizer35->Add( m_staticText12, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 4 ); + + m_staticText13 = new wxStaticText( this, wxID_ANY, wxT("CH2"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText13->Wrap( -1 ); + m_staticText13->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText13->SetBackgroundColour( wxColour( 170, 170, 255 ) ); + + bSizer35->Add( m_staticText13, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 4 ); + + m_staticText14 = new wxStaticText( this, wxID_ANY, wxT("CH3"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText14->Wrap( -1 ); + m_staticText14->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText14->SetBackgroundColour( wxColour( 255, 170, 170 ) ); + + bSizer35->Add( m_staticText14, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 4 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, wxT("CH4"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText15->Wrap( -1 ); + m_staticText15->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText15->SetBackgroundColour( wxColour( 170, 255, 170 ) ); + + bSizer35->Add( m_staticText15, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 4 ); + + m_staticText16 = new wxStaticText( this, wxID_ANY, wxT("EXT"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText16->Wrap( -1 ); + m_staticText16->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + m_staticText16->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + bSizer35->Add( m_staticText16, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 4 ); + + + bSizer14->Add( bSizer35, 1, wxBOTTOM|wxEXPAND, 5 ); + + m_staticline11 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer14->Add( m_staticline11, 0, wxEXPAND, 5 ); + + m_staticText771 = new wxStaticText( this, wxID_ANY, wxT("Trigger logic"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText771->Wrap( -1 ); + bSizer14->Add( m_staticText771, 0, wxALIGN_CENTER|wxALL, 5 ); + + wxBoxSizer* bSizer36; + bSizer36 = new wxBoxSizer( wxHORIZONTAL ); + + m_cbOR1 = new wxCheckBox( this, ID_OR1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer36->Add( m_cbOR1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText17 = new wxStaticText( this, wxID_ANY, wxT("OR"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText17->Wrap( -1 ); + bSizer36->Add( m_staticText17, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); + + m_cbOR2 = new wxCheckBox( this, ID_OR2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer36->Add( m_cbOR2, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText171 = new wxStaticText( this, wxID_ANY, wxT("OR"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText171->Wrap( -1 ); + bSizer36->Add( m_staticText171, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_cbOR3 = new wxCheckBox( this, ID_OR3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer36->Add( m_cbOR3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText172 = new wxStaticText( this, wxID_ANY, wxT("OR"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText172->Wrap( -1 ); + bSizer36->Add( m_staticText172, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_cbOR4 = new wxCheckBox( this, ID_OR4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer36->Add( m_cbOR4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText173 = new wxStaticText( this, wxID_ANY, wxT("OR"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText173->Wrap( -1 ); + bSizer36->Add( m_staticText173, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_cbOREXT = new wxCheckBox( this, ID_OREXT, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer36->Add( m_cbOREXT, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer14->Add( bSizer36, 1, wxEXPAND|wxRIGHT|wxLEFT, 16 ); + + m_staticText84 = new wxStaticText( this, wxID_ANY, wxT("- OR -"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText84->Wrap( -1 ); + bSizer14->Add( m_staticText84, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer37; + bSizer37 = new wxBoxSizer( wxHORIZONTAL ); + + m_cbAND1 = new wxCheckBox( this, ID_AND1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer37->Add( m_cbAND1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText18 = new wxStaticText( this, wxID_ANY, wxT("AND"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText18->Wrap( -1 ); + bSizer37->Add( m_staticText18, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); + + m_cbAND2 = new wxCheckBox( this, ID_AND2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer37->Add( m_cbAND2, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText181 = new wxStaticText( this, wxID_ANY, wxT("AND"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText181->Wrap( -1 ); + bSizer37->Add( m_staticText181, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_cbAND3 = new wxCheckBox( this, ID_AND3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer37->Add( m_cbAND3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText182 = new wxStaticText( this, wxID_ANY, wxT("AND"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText182->Wrap( -1 ); + bSizer37->Add( m_staticText182, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_cbAND4 = new wxCheckBox( this, ID_AND4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer37->Add( m_cbAND4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText183 = new wxStaticText( this, wxID_ANY, wxT("AND"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText183->Wrap( -1 ); + bSizer37->Add( m_staticText183, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_cbANDEXT = new wxCheckBox( this, ID_ANDEXT, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer37->Add( m_cbANDEXT, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer14->Add( bSizer37, 1, wxEXPAND|wxRIGHT|wxLEFT, 16 ); + + m_cbTrans = new wxCheckBox( this, ID_TRANS, wxT("Enable Transparent Trigger"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer14->Add( m_cbTrans, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer14->Add( m_staticline10, 0, wxEXPAND, 5 ); + + m_staticText77 = new wxStaticText( this, wxID_ANY, wxT("Trigger level"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText77->Wrap( -1 ); + bSizer14->Add( m_staticText77, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + wxBoxSizer* bSizer33; + bSizer33 = new wxBoxSizer( wxHORIZONTAL ); + + m_tbLevel1 = new wxTextCtrl( this, ID_LEVEL1, wxEmptyString, wxDefaultPosition, wxSize( 40,-1 ), wxTE_PROCESS_ENTER ); + bSizer33->Add( m_tbLevel1, 1, wxALL, 5 ); + + m_tbLevel2 = new wxTextCtrl( this, ID_LEVEL2, wxEmptyString, wxDefaultPosition, wxSize( 40,-1 ), wxTE_PROCESS_ENTER ); + bSizer33->Add( m_tbLevel2, 1, wxALL, 5 ); + + m_tbLevel3 = new wxTextCtrl( this, ID_LEVEL3, wxEmptyString, wxDefaultPosition, wxSize( 40,-1 ), wxTE_PROCESS_ENTER ); + bSizer33->Add( m_tbLevel3, 1, wxALL, 5 ); + + m_tbLevel4 = new wxTextCtrl( this, ID_LEVEL4, wxEmptyString, wxDefaultPosition, wxSize( 40,-1 ), wxTE_PROCESS_ENTER ); + bSizer33->Add( m_tbLevel4, 1, wxALL, 5 ); + + m_staticText78 = new wxStaticText( this, wxID_ANY, wxT("Volt"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText78->Wrap( -1 ); + bSizer33->Add( m_staticText78, 1, wxALIGN_CENTER|wxALL, 5 ); + + + bSizer14->Add( bSizer33, 1, wxEXPAND, 5 ); + + m_staticline25 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer14->Add( m_staticline25, 0, wxEXPAND, 5 ); + + m_button11 = new wxButton( this, wxID_ANY, wxT("Cl&ose"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer14->Add( m_button11, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + + + this->SetSizer( bSizer14 ); + this->Layout(); + bSizer14->Fit( this ); + + // Connect Events + m_cbOR1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbOR2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbOR3->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbOR4->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbOREXT->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbAND1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbAND2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbAND3->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbAND4->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbANDEXT->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbTrans->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_tbLevel1->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel1->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel2->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel2->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel3->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel3->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel4->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel4->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_button11->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnClose ), NULL, this ); +} + +TriggerDialog_fb::~TriggerDialog_fb() +{ + // Disconnect Events + m_cbOR1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbOR2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbOR3->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbOR4->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbOREXT->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbAND1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbAND2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbAND3->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbAND4->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbANDEXT->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_cbTrans->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnButton ), NULL, this ); + m_tbLevel1->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel1->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel2->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel2->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel3->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel3->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel4->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_tbLevel4->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TriggerDialog_fb::OnTriggerLevel ), NULL, this ); + m_button11->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TriggerDialog_fb::OnClose ), NULL, this ); + +} + +AboutDialog_fb::AboutDialog_fb( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 74, 90, 90, false, wxEmptyString ) ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer15; + bSizer15 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer17; + bSizer17 = new wxBoxSizer( wxVERTICAL ); + + m_staticText18 = new wxStaticText( this, wxID_ANY, wxT("DRS Oscilloscope"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticText18->Wrap( -1 ); + m_staticText18->SetFont( wxFont( 20, 74, 90, 90, false, wxEmptyString ) ); + + bSizer17->Add( m_staticText18, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10 ); + + m_stVersion = new wxStaticText( this, wxID_ANY, wxT("Version 0.0.0"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stVersion->Wrap( -1 ); + m_stVersion->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + + bSizer17->Add( m_stVersion, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + m_stBuild = new wxStaticText( this, wxID_ANY, wxT("Build 0"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stBuild->Wrap( -1 ); + m_stBuild->SetFont( wxFont( 16, 74, 90, 90, false, wxEmptyString ) ); + + bSizer17->Add( m_stBuild, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText20 = new wxStaticText( this, wxID_ANY, wxT("Stefan Ritt"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText20->Wrap( -1 ); + m_staticText20->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 74, 90, 90, false, wxEmptyString ) ); + + bSizer17->Add( m_staticText20, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_staticText21 = new wxStaticText( this, wxID_ANY, wxT("Paul Scherrer Institute"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21->Wrap( -1 ); + m_staticText21->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 74, 90, 90, false, wxEmptyString ) ); + + bSizer17->Add( m_staticText21, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizer38; + bSizer38 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer38->Add( 0, 0, 1, wxEXPAND, 5 ); + + + bSizer38->Add( 0, 0, 1, wxEXPAND, 5 ); + + + bSizer38->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bitmap1 = new wxStaticBitmap( this, wxID_ANY, wxBitmap( drsosc_xpm ), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer38->Add( m_bitmap1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10 ); + + + bSizer38->Add( 0, 0, 1, wxEXPAND, 5 ); + + + bSizer38->Add( 0, 0, 1, wxEXPAND, 5 ); + + + bSizer38->Add( 0, 0, 1, wxEXPAND, 5 ); + + + bSizer17->Add( bSizer38, 1, wxEXPAND, 5 ); + + m_staticText23 = new wxStaticText( this, wxID_ANY, wxT("For updates please visit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText23->Wrap( -1 ); + m_staticText23->SetFont( wxFont( 18, 74, 90, 90, false, wxEmptyString ) ); + + bSizer17->Add( m_staticText23, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, wxT("http://www.psi.ch/drs"), wxT("http://www.psi.ch/drs"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink1->SetFont( wxFont( 18, 74, 90, 90, false, wxEmptyString ) ); + + bSizer17->Add( m_hyperlink1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + m_button12 = new wxButton( this, wxID_OK, wxT("Ok"), wxDefaultPosition, wxDefaultSize, 0 ); + m_button12->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 74, 90, 90, false, wxEmptyString ) ); + + bSizer17->Add( m_button12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 15 ); + + + bSizer15->Add( bSizer17, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + this->SetSizer( bSizer15 ); + this->Layout(); + bSizer15->Fit( this ); +} + +AboutDialog_fb::~AboutDialog_fb() +{ +} + +InfoDialog_fb::InfoDialog_fb( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer15; + bSizer15 = new wxBoxSizer( wxVERTICAL ); + + wxGridSizer* gSizer2; + gSizer2 = new wxGridSizer( 9, 2, 0, 0 ); + + m_staticText45 = new wxStaticText( this, wxID_ANY, wxT("Board type:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText45->Wrap( -1 ); + gSizer2->Add( m_staticText45, 0, wxALL, 5 ); + + m_stBoardType = new wxStaticText( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stBoardType->Wrap( -1 ); + gSizer2->Add( m_stBoardType, 0, wxALL, 5 ); + + m_staticText47 = new wxStaticText( this, wxID_ANY, wxT("DRS type:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText47->Wrap( -1 ); + gSizer2->Add( m_staticText47, 0, wxALL, 5 ); + + m_stDRSType = new wxStaticText( this, wxID_ANY, wxT("DRS4"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stDRSType->Wrap( -1 ); + gSizer2->Add( m_stDRSType, 0, wxALL, 5 ); + + m_staticText49 = new wxStaticText( this, wxID_ANY, wxT("Serial number:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText49->Wrap( -1 ); + gSizer2->Add( m_staticText49, 0, wxALL, 5 ); + + m_stSerialNumber = new wxStaticText( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stSerialNumber->Wrap( -1 ); + gSizer2->Add( m_stSerialNumber, 0, wxALL, 5 ); + + m_staticText51 = new wxStaticText( this, wxID_ANY, wxT("Firmware revision:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText51->Wrap( -1 ); + gSizer2->Add( m_staticText51, 0, wxALL, 5 ); + + m_stFirmwareRevision = new wxStaticText( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stFirmwareRevision->Wrap( -1 ); + gSizer2->Add( m_stFirmwareRevision, 0, wxALL, 5 ); + + m_staticText53 = new wxStaticText( this, wxID_ANY, wxT("Temperature:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText53->Wrap( -1 ); + gSizer2->Add( m_staticText53, 0, wxALL, 5 ); + + m_stTemperature = new wxStaticText( this, wxID_ANY, wxT("0 C"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stTemperature->Wrap( -1 ); + gSizer2->Add( m_stTemperature, 0, wxALL, 5 ); + + m_staticText55 = new wxStaticText( this, wxID_ANY, wxT("Input range:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText55->Wrap( -1 ); + gSizer2->Add( m_staticText55, 0, wxALL, 5 ); + + m_stInputRange = new wxStaticText( this, wxID_ANY, wxT("-0.5V...0.5V"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stInputRange->Wrap( -1 ); + gSizer2->Add( m_stInputRange, 0, wxALL, 5 ); + + m_staticText57 = new wxStaticText( this, wxID_ANY, wxT("Calibrated range:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText57->Wrap( -1 ); + gSizer2->Add( m_staticText57, 0, wxALL, 5 ); + + m_stCalibratedRange = new wxStaticText( this, wxID_ANY, wxT("-0.5V...0.5V"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stCalibratedRange->Wrap( -1 ); + gSizer2->Add( m_stCalibratedRange, 0, wxALL, 5 ); + + m_staticText59 = new wxStaticText( this, wxID_ANY, wxT("Calibrated frequency:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText59->Wrap( -1 ); + gSizer2->Add( m_staticText59, 0, wxALL, 5 ); + + m_stCalibratedFrequency = new wxStaticText( this, wxID_ANY, wxT("5.000 GSPS"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stCalibratedFrequency->Wrap( -1 ); + gSizer2->Add( m_stCalibratedFrequency, 0, wxALL, 5 ); + + m_staticText61 = new wxStaticText( this, wxID_ANY, wxT("Current frequency:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText61->Wrap( -1 ); + gSizer2->Add( m_staticText61, 0, wxALL, 5 ); + + m_stFrequency = new wxStaticText( this, wxID_ANY, wxT("5.000 GSPS"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stFrequency->Wrap( -1 ); + gSizer2->Add( m_stFrequency, 0, wxALL, 5 ); + + + bSizer15->Add( gSizer2, 1, wxEXPAND, 5 ); + + m_button12 = new wxButton( this, wxID_OK, wxT("Ok"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer15->Add( m_button12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 15 ); + + + this->SetSizer( bSizer15 ); + this->Layout(); + bSizer15->Fit( this ); +} + +InfoDialog_fb::~InfoDialog_fb() +{ +} diff --git a/software/drsosc/DRSOsc.entitlements b/software/drsosc/DRSOsc.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/software/drsosc/DRSOsc.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/software/drsosc/DRSOsc.h b/software/drsosc/DRSOsc.h new file mode 100644 index 0000000..8113dd9 --- /dev/null +++ b/software/drsosc/DRSOsc.h @@ -0,0 +1,604 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Nov 27 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DRSOSC_H__ +#define __DRSOSC_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +#define ID_CURSORA 1000 +#define ID_CURSORB 1001 +#define ID_TR_LEVEL 1002 +#define ID_RUN 1003 +#define ID_SINGLE 1004 +#define ID_TR_NORMAL 1005 +#define ID_TR_AUTO 1006 +#define ID_TR_POLARITY 1007 +#define ID_TRGCFG 1008 +#define ID_TR_DELAY 1009 +#define ID_TR_SOURCE 1010 +#define ID_HSCALEDOWN 1011 +#define ID_HSCALEUP 1012 +#define ID_HOR_POS 1013 +#define ID_CHON1 1014 +#define ID_POS1 1015 +#define ID_SCALEUP1 1016 +#define ID_SCALEDN1 1017 +#define ID_CHON2 1018 +#define ID_POS2 1019 +#define ID_SCALEUP2 1020 +#define ID_SCALEDN2 1021 +#define ID_CHON3 1022 +#define ID_POS3 1023 +#define ID_SCALEUP3 1024 +#define ID_SCALEDN3 1025 +#define ID_CHON4 1026 +#define ID_POS4 1027 +#define ID_SCALEUP4 1028 +#define ID_SCALEDN4 1029 +#define ID_CONFIG 1030 +#define ID_SAVE 1031 +#define ID_MEASURE 1032 +#define ID_PRINT 1033 +#define ID_ABOUT 1034 +#define ID_EXIT 1035 +#define ID_BSEL 1036 +#define ID_MULTI 1037 +#define ID_CH_HALF 1038 +#define ID_DISP_CALIBRATED 1039 +#define ID_DISP_CALIBRATED2 1040 +#define ID_DISP_ROTATED 1041 +#define ID_DISP_TCALIBRATED 1042 +#define ID_DISP_TRGCORR 1043 +#define ID_REFCLK 1044 +#define ID_DISPSAMPLE 1045 +#define ID_DISPAVERAGE 1046 +#define ID_DISPPERSIST 1047 +#define ID_DISPNUMBER 1048 +#define ID_PJ1 1049 +#define ID_PJ2 1050 +#define ID_PJ3 1051 +#define ID_PJ4 1052 +#define ID_LEVEL1 1053 +#define ID_LEVEL2 1054 +#define ID_LEVEL3 1055 +#define ID_LEVEL4 1056 +#define ID_PKPK1 1057 +#define ID_PKPK2 1058 +#define ID_PKPK3 1059 +#define ID_PKPK4 1060 +#define ID_RMS1 1061 +#define ID_RMS2 1062 +#define ID_RMS3 1063 +#define ID_RMS4 1064 +#define ID_VS1 1065 +#define ID_VS2 1066 +#define ID_VS3 1067 +#define ID_VS4 1068 +#define ID_CHRG1 1069 +#define ID_CHRG2 1070 +#define ID_CHRG3 1071 +#define ID_CHRG4 1072 +#define ID_FREQ1 1073 +#define ID_FREQ2 1074 +#define ID_FREQ3 1075 +#define ID_FREQ4 1076 +#define ID_PERIOD1 1077 +#define ID_PERIOD2 1078 +#define ID_PERIOD3 1079 +#define ID_PERIOD4 1080 +#define ID_RISE1 1081 +#define ID_RISE2 1082 +#define ID_RISE3 1083 +#define ID_RISE4 1084 +#define ID_FALL1 1085 +#define ID_FALL2 1086 +#define ID_FALL3 1087 +#define ID_FALL4 1088 +#define ID_POSWIDTH1 1089 +#define ID_POSWIDTH2 1090 +#define ID_POSWIDTH3 1091 +#define ID_POSWIDTH4 1092 +#define ID_NEGWIDTH1 1093 +#define ID_NEGWIDTH2 1094 +#define ID_NEGWIDTH3 1095 +#define ID_NEGWIDTH4 1096 +#define ID_CHNDELAY1 1097 +#define ID_CHNDELAY2 1098 +#define ID_CHNDELAY3 1099 +#define ID_CHNDELAY4 1100 +#define ID_HS1 1101 +#define ID_HS2 1102 +#define ID_HS3 1103 +#define ID_HS4 1104 +#define ID_OR1 1105 +#define ID_OR2 1106 +#define ID_OR3 1107 +#define ID_OR4 1108 +#define ID_OREXT 1109 +#define ID_AND1 1110 +#define ID_AND2 1111 +#define ID_AND3 1112 +#define ID_AND4 1113 +#define ID_ANDEXT 1114 +#define ID_TRANS 1115 + +/////////////////////////////////////////////////////////////////////////////// +/// Class DOFrame_fb +/////////////////////////////////////////////////////////////////////////////// +class DOFrame_fb : public wxFrame +{ + private: + + protected: + wxMenuBar* m_menubar1; + wxMenu* m_menu1; + wxMenu* m_menu4; + wxMenu* m_menu3; + wxMenu* m_menu2; + wxPanel* m_pnScreen; + wxPanel* m_pnControls; + wxSlider* m_slTrgLevel; + wxButton* m_btRun; + wxButton* m_btSingle; + wxRadioButton* m_rbNormal; + wxRadioButton* m_rbAuto; + wxBitmapButton* m_bpPolarity; + wxButton* m_btTrgCfg; + wxStaticText* m_staticText59; + wxStaticText* m_staticText60; + wxStaticText* m_staticText61; + wxSlider* m_slTrgDelay; + wxRadioBox* m_rbSource; + wxBitmapButton* m_bpButton2; + wxStaticText* m_stHScale; + wxBitmapButton* m_bpButton3; + wxSlider* m_slHOffset; + wxToggleButton* m_btCh1; + wxSlider* m_slPos1; + wxBitmapButton* m_bpButton4; + wxStaticText* m_stScale1; + wxBitmapButton* m_bpButton5; + wxToggleButton* m_btCh2; + wxSlider* m_slPos2; + wxBitmapButton* m_bpButton6; + wxStaticText* m_stScale2; + wxBitmapButton* m_bpButton7; + wxToggleButton* m_btCh3; + wxSlider* m_slPos3; + wxBitmapButton* m_bpButton8; + wxStaticText* m_stScale3; + wxBitmapButton* m_bpButton9; + wxToggleButton* m_btCh4; + wxSlider* m_slPos4; + wxBitmapButton* m_bpButton10; + wxStaticText* m_stScale4; + wxBitmapButton* m_bpButton11; + wxStaticText* m_staticText76; + wxToggleButton* m_toggleCursorA; + wxToggleButton* m_toggleCursorB; + wxCheckBox* m_checkBox8; + wxButton* m_btConfig; + wxButton* m_btSave; + wxButton* m_btMeasure; + wxButton* m_btDisplay; + wxButton* m_btPrint; + wxButton* m_btAbout; + wxButton* m_btExit; + + // Virtual event handlers, overide them in your derived class + virtual void OnSave( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPrint( wxCommandEvent& event ) { event.Skip(); } + virtual void OnExit( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCursor( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSnap( wxCommandEvent& event ) { event.Skip(); } + virtual void OnConfig( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMeasure( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDisplay( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAbout( wxCommandEvent& event ) { event.Skip(); } + virtual void OnTrgLevelChange( wxScrollEvent& event ) { event.Skip(); } + virtual void OnZero( wxMouseEvent& event ) { event.Skip(); } + virtual void OnTrigger( wxCommandEvent& event ) { event.Skip(); } + virtual void OnTrgButton( wxCommandEvent& event ) { event.Skip(); } + virtual void OnTrgDelayChange( wxScrollEvent& event ) { event.Skip(); } + virtual void OnHScaleChange( wxCommandEvent& event ) { event.Skip(); } + virtual void OnHOffsetChange( wxScrollEvent& event ) { event.Skip(); } + virtual void OnChnOn( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPosChange( wxScrollEvent& event ) { event.Skip(); } + virtual void OnScaleChange( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DOFrame_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("DRS Oscilloscope"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 1024,768 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + + ~DOFrame_fb(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class ConfigDialog_fb +/////////////////////////////////////////////////////////////////////////////// +class ConfigDialog_fb : public wxDialog +{ + private: + + protected: + wxChoice* m_cbBoard; + wxButton* m_btScan; + wxButton* m_btInfo; + wxCheckBox* m_cbMulti; + wxRadioBox* m_rbChHalf; + wxCheckBox* m_cbClkOn; + wxRadioBox* m_rbRange; + wxTextCtrl* m_tbFreq; + wxStaticText* m_staticText26; + wxCheckBox* m_cbLocked; + wxStaticText* m_staticText261; + wxStaticText* m_stActFreq; + wxCheckBox* m_cbCalOn; + wxTextCtrl* m_teCal; + wxSlider* m_slCal; + wxStaticText* m_staticText10; + wxCheckBox* m_cbCalibrated; + wxCheckBox* m_cbCalibrated2; + wxCheckBox* m_cbSpikes; + wxButton* m_button13; + wxGauge* m_gaugeCalVolt; + wxCheckBox* m_cbRotated; + wxCheckBox* m_cbTCalOn; + wxCheckBox* m_cbTrgCorr; + wxCheckBox* m_cbExtRefclk; + wxButton* m_button14; + wxGauge* m_gaugeCalTime; + wxButton* m_button10; + + // Virtual event handlers, overide them in your derived class + virtual void OnBoardSelect( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRescan( wxCommandEvent& event ) { event.Skip(); } + virtual void OnInfo( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChannelHalf( wxCommandEvent& event ) { event.Skip(); } + virtual void OnClkOn( wxCommandEvent& event ) { event.Skip(); } + virtual void OnInputRange( wxCommandEvent& event ) { event.Skip(); } + virtual void OnFreq( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLock( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCalOn( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCalEnter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCalSlider( wxScrollEvent& event ) { event.Skip(); } + virtual void OnDisplayWaveforms( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRemoveSpikes( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonCalVolt( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonCalTime( wxCommandEvent& event ) { event.Skip(); } + virtual void OnClose( wxCommandEvent& event ) { event.Skip(); } + + + public: + + ConfigDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~ConfigDialog_fb(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class DisplayDialog_fb +/////////////////////////////////////////////////////////////////////////////// +class DisplayDialog_fb : public wxDialog +{ + private: + + protected: + wxCheckBox* m_checkBox7; + wxCheckBox* m_checkBox71; + wxCheckBox* m_checkBox88; + wxCheckBox* m_checkBox73; + wxRadioButton* m_rbShowSample; + wxRadioButton* m_rbShowAverage; + wxRadioButton* m_rbShowPersist; + wxStaticText* m_staticText59; + wxComboBox* m_cbNumber; + wxStaticText* m_staticText11; + wxStaticText* m_staticText12; + wxStaticText* m_staticText13; + wxStaticText* m_staticText14; + wxStaticText* m_staticText15; + wxStaticText* m_staticText17; + wxCheckBox* m_checkBox13; + wxCheckBox* m_checkBox14; + wxCheckBox* m_checkBox15; + wxCheckBox* m_checkBox16; + wxButton* m_button10; + + // Virtual event handlers, overide them in your derived class + virtual void OnDateTime( wxCommandEvent& event ) { event.Skip(); } + virtual void OnShowGrid( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLines( wxCommandEvent& event ) { event.Skip(); } + virtual void OnScalers( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDisplayMode( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButton( wxCommandEvent& event ) { event.Skip(); } + virtual void OnClose( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DisplayDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Display"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~DisplayDialog_fb(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class MeasureDialog_fb +/////////////////////////////////////////////////////////////////////////////// +class MeasureDialog_fb : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText11; + wxStaticText* m_staticText12; + wxStaticText* m_staticText13; + wxStaticText* m_staticText14; + wxStaticText* m_staticText15; + wxStaticText* m_staticText80; + wxStaticText* m_staticText81; + wxStaticText* m_staticText82; + wxStaticText* m_staticText83; + wxStaticText* m_staticText84; + wxStaticText* m_staticText16; + wxCheckBox* m_checkBox9; + wxCheckBox* m_checkBox10; + wxCheckBox* m_checkBox11; + wxCheckBox* m_checkBox12; + wxStaticText* m_staticText17; + wxCheckBox* m_checkBox13; + wxCheckBox* m_checkBox14; + wxCheckBox* m_checkBox15; + wxCheckBox* m_checkBox16; + wxStaticText* m_staticText19; + wxCheckBox* m_checkBox17; + wxCheckBox* m_checkBox18; + wxCheckBox* m_checkBox19; + wxCheckBox* m_checkBox20; + wxStaticText* m_staticText90; + wxCheckBox* m_checkBox74; + wxCheckBox* m_checkBox75; + wxCheckBox* m_checkBox76; + wxCheckBox* m_checkBox77; + wxStaticText* m_staticText91; + wxCheckBox* m_checkBox82; + wxCheckBox* m_checkBox83; + wxCheckBox* m_checkBox84; + wxCheckBox* m_checkBox85; + wxStaticLine* m_staticline4; + wxStaticLine* m_staticline41; + wxStaticLine* m_staticline42; + wxStaticLine* m_staticline43; + wxStaticLine* m_staticline44; + wxStaticText* m_staticText85; + wxStaticText* m_staticText86; + wxStaticText* m_staticText87; + wxStaticText* m_staticText88; + wxStaticText* m_staticText89; + wxStaticText* m_staticText20; + wxCheckBox* m_checkBox21; + wxCheckBox* m_checkBox22; + wxCheckBox* m_checkBox23; + wxCheckBox* m_checkBox24; + wxStaticText* m_staticText21; + wxCheckBox* m_checkBox25; + wxCheckBox* m_checkBox26; + wxCheckBox* m_checkBox27; + wxCheckBox* m_checkBox28; + wxStaticText* m_staticText22; + wxCheckBox* m_checkBox29; + wxCheckBox* m_checkBox30; + wxCheckBox* m_checkBox31; + wxCheckBox* m_checkBox32; + wxStaticText* m_staticText23; + wxCheckBox* m_checkBox33; + wxCheckBox* m_checkBox34; + wxCheckBox* m_checkBox35; + wxCheckBox* m_checkBox36; + wxStaticText* m_staticText221; + wxCheckBox* m_checkBox291; + wxCheckBox* m_checkBox2911; + wxCheckBox* m_checkBox2912; + wxCheckBox* m_checkBox2913; + wxStaticText* m_staticText2211; + wxCheckBox* m_checkBox2914; + wxCheckBox* m_checkBox2915; + wxCheckBox* m_checkBox2916; + wxCheckBox* m_checkBox2917; + wxStaticText* m_staticText231; + wxCheckBox* m_checkBox37; + wxCheckBox* m_checkBox38; + wxCheckBox* m_checkBox39; + wxCheckBox* m_checkBox40; + wxStaticText* m_staticText901; + wxCheckBox* m_checkBox78; + wxCheckBox* m_checkBox79; + wxCheckBox* m_checkBox80; + wxCheckBox* m_checkBox81; + wxStaticLine* m_staticline1; + wxCheckBox* m_cbStat; + wxCheckBox* m_cbHist; + wxStaticText* m_staticText27; + wxComboBox* m_cbNAverage; + wxStaticText* m_staticText271; + wxButton* m_button15; + wxStaticLine* m_staticline2; + wxCheckBox* m_cbIndicator; + wxStaticLine* m_staticline21; + wxButton* m_button11; + + // Virtual event handlers, overide them in your derived class + virtual void OnButton( wxCommandEvent& event ) { event.Skip(); } + virtual void OnStat( wxCommandEvent& event ) { event.Skip(); } + virtual void OnHist( wxCommandEvent& event ) { event.Skip(); } + virtual void OnStatNAverage( wxCommandEvent& event ) { event.Skip(); } + virtual void OnStatReset( wxCommandEvent& event ) { event.Skip(); } + virtual void OnIndicator( wxCommandEvent& event ) { event.Skip(); } + virtual void OnClose( wxCommandEvent& event ) { event.Skip(); } + + + public: + + MeasureDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Select Measurements"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~MeasureDialog_fb(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class TriggerDialog_fb +/////////////////////////////////////////////////////////////////////////////// +class TriggerDialog_fb : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText12; + wxStaticText* m_staticText13; + wxStaticText* m_staticText14; + wxStaticText* m_staticText15; + wxStaticText* m_staticText16; + wxStaticLine* m_staticline11; + wxStaticText* m_staticText771; + wxCheckBox* m_cbOR1; + wxStaticText* m_staticText17; + wxCheckBox* m_cbOR2; + wxStaticText* m_staticText171; + wxCheckBox* m_cbOR3; + wxStaticText* m_staticText172; + wxCheckBox* m_cbOR4; + wxStaticText* m_staticText173; + wxCheckBox* m_cbOREXT; + wxStaticText* m_staticText84; + wxCheckBox* m_cbAND1; + wxStaticText* m_staticText18; + wxCheckBox* m_cbAND2; + wxStaticText* m_staticText181; + wxCheckBox* m_cbAND3; + wxStaticText* m_staticText182; + wxCheckBox* m_cbAND4; + wxStaticText* m_staticText183; + wxCheckBox* m_cbANDEXT; + wxCheckBox* m_cbTrans; + wxStaticLine* m_staticline10; + wxStaticText* m_staticText77; + wxTextCtrl* m_tbLevel1; + wxTextCtrl* m_tbLevel2; + wxTextCtrl* m_tbLevel3; + wxTextCtrl* m_tbLevel4; + wxStaticText* m_staticText78; + wxStaticLine* m_staticline25; + wxButton* m_button11; + + // Virtual event handlers, overide them in your derived class + virtual void OnButton( wxCommandEvent& event ) { event.Skip(); } + virtual void OnTriggerLevel( wxCommandEvent& event ) { event.Skip(); } + virtual void OnClose( wxCommandEvent& event ) { event.Skip(); } + + + public: + + TriggerDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Configure Trigger"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + ~TriggerDialog_fb(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class AboutDialog_fb +/////////////////////////////////////////////////////////////////////////////// +class AboutDialog_fb : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText18; + wxStaticText* m_stVersion; + wxStaticText* m_stBuild; + wxStaticText* m_staticText20; + wxStaticText* m_staticText21; + wxStaticBitmap* m_bitmap1; + wxStaticText* m_staticText23; + wxHyperlinkCtrl* m_hyperlink1; + wxButton* m_button12; + + public: + + AboutDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~AboutDialog_fb(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class InfoDialog_fb +/////////////////////////////////////////////////////////////////////////////// +class InfoDialog_fb : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText45; + wxStaticText* m_stBoardType; + wxStaticText* m_staticText47; + wxStaticText* m_stDRSType; + wxStaticText* m_staticText49; + wxStaticText* m_stSerialNumber; + wxStaticText* m_staticText51; + wxStaticText* m_stFirmwareRevision; + wxStaticText* m_staticText53; + wxStaticText* m_stTemperature; + wxStaticText* m_staticText55; + wxStaticText* m_stInputRange; + wxStaticText* m_staticText57; + wxStaticText* m_stCalibratedRange; + wxStaticText* m_staticText59; + wxStaticText* m_stCalibratedFrequency; + wxStaticText* m_staticText61; + wxStaticText* m_stFrequency; + wxButton* m_button12; + + public: + + InfoDialog_fb( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Info"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~InfoDialog_fb(); + +}; + +#endif //__DRSOSC_H__ diff --git a/software/drsosc/DRSOsc.icns b/software/drsosc/DRSOsc.icns new file mode 100644 index 0000000..83861c5 Binary files /dev/null and b/software/drsosc/DRSOsc.icns differ diff --git a/software/drsosc/DRSOscInc.h b/software/drsosc/DRSOscInc.h new file mode 100644 index 0000000..7e19e4d --- /dev/null +++ b/software/drsosc/DRSOscInc.h @@ -0,0 +1,33 @@ +/* + * DRSOscInc.h + * Collection of all DRS oscilloscope header include files + * $Id: DRSOscInc.h 20924 2013-03-21 13:31:33Z ritt $ + */ + +#define MAX_N_BOARDS 16 + +#include "wx/wx.h" +#include "wx/dcbuffer.h" +#include "wx/print.h" +#include "wx/numdlg.h" +#include "mxml.h" +#include "DRS.h" +#include "DRSOsc.h" +#include "Osci.h" +#include "Measurement.h" +#include "ConfigDialog.h" +#include "DisplayDialog.h" +#include "AboutDialog.h" +#include "InfoDialog.h" +#include "MeasureDialog.h" +#include "TriggerDialog.h" +#include "DOScreen.h" +#include "DOFrame.h" +#include "EPThread.h" + +double ss_nan(); +int ss_isnan(double x); +void ss_sleep(int ms); + + + diff --git a/software/drsosc/DisplayDialog.cpp b/software/drsosc/DisplayDialog.cpp new file mode 100644 index 0000000..da02437 --- /dev/null +++ b/software/drsosc/DisplayDialog.cpp @@ -0,0 +1,60 @@ +/* + * DisplayDialog.cpp + * Modeless Displayuration Dialog class + * $Id: DisplayDialog.cpp 21252 2014-02-06 09:37:27Z ritt $ + */ + +#include "DRSOscInc.h" + +DisplayDialog::DisplayDialog( wxWindow* parent ) +: +DisplayDialog_fb( parent ) +{ + m_frame = (DOFrame *)parent; + m_osci = m_frame->GetOsci(); +} + +void DisplayDialog::OnDateTime( wxCommandEvent& event ) +{ + m_frame->SetDisplayDateTime(event.IsChecked()); +} + +void DisplayDialog::OnShowGrid( wxCommandEvent& event ) +{ + m_frame->SetDisplayShowGrid(event.IsChecked()); +} + +void DisplayDialog::OnLines( wxCommandEvent& event ) +{ + m_frame->SetDisplayLines(event.IsChecked()); +} + +void DisplayDialog::OnDisplayMode( wxCommandEvent& event ) +{ + long n; + m_cbNumber->GetValue().ToLong(&n); + + if (event.GetId() == ID_DISPSAMPLE) + m_frame->SetDisplayMode(ID_DISPSAMPLE, 0); + else if (event.GetId() == ID_DISPAVERAGE) + m_frame->SetDisplayMode(ID_DISPAVERAGE, n); + else if (event.GetId() == ID_DISPPERSIST) + m_frame->SetDisplayMode(ID_DISPPERSIST, n); + else if (event.GetId() == ID_DISPNUMBER) + m_frame->SetDisplayMode(m_rbShowAverage->GetValue()?ID_DISPAVERAGE:ID_DISPPERSIST, n); +} + +void DisplayDialog::OnScalers( wxCommandEvent& event ) +{ + m_frame->SetDisplayScalers(event.IsChecked()); +} + +void DisplayDialog::OnButton( wxCommandEvent& event ) +{ + m_frame->SetMathDisplay(event.GetId(), event.IsChecked()); +} + +void DisplayDialog::OnClose( wxCommandEvent& event ) +{ + this->Hide(); +} diff --git a/software/drsosc/DisplayDialog.h b/software/drsosc/DisplayDialog.h new file mode 100644 index 0000000..3440e99 --- /dev/null +++ b/software/drsosc/DisplayDialog.h @@ -0,0 +1,41 @@ +#ifndef __DisplayDialog__ +#define __DisplayDialog__ + +// $Id: DisplayDialog.h 21252 2014-02-06 09:37:27Z ritt $ + +/** +@file +Subclass of DisplayDialog_fb, which is generated by wxFormBuilder. +*/ + +class DOFrame; +class Osci; + +/** Implementing DisplayDialog_fb */ +class DisplayDialog : public DisplayDialog_fb +{ +protected: + // Handlers for DisplayDialog_fb events. + void OnDateTime(wxCommandEvent& event); + void OnShowGrid(wxCommandEvent& event); + void OnLines(wxCommandEvent& event); + void OnDisplayMode(wxCommandEvent& event); + void OnButton(wxCommandEvent& event); + void OnScalers(wxCommandEvent& event); + + void OnClose(wxCommandEvent& event); + +public: + /** Constructor */ + DisplayDialog( wxWindow* parent ); + +private: + DOFrame *m_frame; + Osci *m_osci; + + void PopulateBoards(void); + void EnableButtons(void); + +}; + +#endif // __DisplayDialog__ diff --git a/software/drsosc/EPThread.cpp b/software/drsosc/EPThread.cpp new file mode 100644 index 0000000..8484f72 --- /dev/null +++ b/software/drsosc/EPThread.cpp @@ -0,0 +1,124 @@ +/* + * EPThread.cpp + * DRS oscilloscope event processing thread + * $Id: EPThread.cpp 21511 2014-10-17 08:02:30Z ritt $ + */ + +#include "DRSOscInc.h" +#include "rb.h" + +extern wxCriticalSection *g_epcs; + +bool g_finished = false; +/*------------------------------------------------------------------*/ + +EPThread::EPThread(DOFrame *f) : wxThread() +{ + m_frame = f; + m_osci = f->GetOsci(); + m_finished = false; + m_stopThread = false; + m_active = false; + m_enabled = true; + Create(); + Run(); +} + +/*------------------------------------------------------------------*/ + +EPThread::~EPThread() +{ +} + +/*------------------------------------------------------------------*/ + +void EPThread::ClearWaveforms() +{ + while (m_osci->HasNewEvent()); + memset(m_time, 0, sizeof(m_time)); + memset(m_waveform, 0, sizeof(m_waveform)); +} + +/*------------------------------------------------------------------*/ + +void EPThread::StopThread() +{ + m_stopThread = true; + do { + wxThread::Sleep(10); + } while (!g_finished); // cannot access m_finished here under Widnows +} + +/*------------------------------------------------------------------*/ + +void EPThread::Enable(bool flag) +{ + m_enabled = flag; + if (!flag) + while (m_active) + wxThread::Sleep(10); +} + +/*------------------------------------------------------------------*/ + +void *EPThread::Entry() +{ + int status; + + do { + if (m_enabled) { + m_active = true; + if (m_osci->HasNewEvent()) { + m_osci->ReadWaveforms(); + if (m_frame->GetRearm()) { + m_osci->Start(); + m_frame->SetRearm(false); + } + + if (m_frame->GetTrgCorr()) + m_osci->CorrectTriggerPoint(m_frame->GetTrgPosition(0)); + + g_epcs->Enter(); + status = 0; + if (m_frame->GetWFFile() || m_frame->GetWFfd()) { + status = m_osci->SaveWaveforms(m_frame->GetWFFile(), m_frame->GetWFfd()); + m_frame->IncrementSaved(); + } + g_epcs->Leave(); + + if (status < 0) + m_frame->CloseWFFile(true); + + if (m_frame->GetWFFile() || m_frame->GetWFfd()) + if (m_frame->GetNSaved() >= m_frame->GetNSaveMax()) + m_frame->CloseWFFile(false); + + m_frame->EvaluateMeasurements(); + m_frame->IncrementAcquisitions(); + + // copy event from oscilloscope + int n = m_osci->IsMultiBoard() ? m_osci->GetNumberOfBoards() : 1; + + g_epcs->Enter(); + for (int i=0 ; iGetTime(i, j), m_osci->GetWaveformDepth(j)*sizeof(float)); + memcpy(m_waveform[i][j], m_osci->GetWaveform(i, j), m_osci->GetWaveformDepth(j)*sizeof(float)); + } + } + g_epcs->Leave(); + } else + wxThread::Sleep(10); + } else { + wxThread::Sleep(10); + m_active = false; + } + + } while (!m_stopThread); + + m_finished = true; + g_finished = true; + + return NULL; +} + diff --git a/software/drsosc/EPThread.h b/software/drsosc/EPThread.h new file mode 100644 index 0000000..ea0da3f --- /dev/null +++ b/software/drsosc/EPThread.h @@ -0,0 +1,29 @@ +/* + * EPThread.h + * DRS oscilloscope event processor header file + * $Id: EPThread.h 21263 2014-02-07 16:38:07Z ritt $ + */ + +class EPThread : public wxThread +{ +public: + EPThread(DOFrame *o); + ~EPThread(); + void *Entry(); + float *GetTime(int b, int c) { return m_time[b][c]; } + float *GetWaveform(int b, int c) { return m_waveform[b][c]; } + void ClearWaveforms(); + void Enable(bool flag); + void StopThread(); + bool IsFinished() { return m_finished; } + +private: + DOFrame *m_frame; + Osci *m_osci; + bool m_stopThread; + bool m_enabled; + bool m_active; + bool m_finished; + float m_waveform[MAX_N_BOARDS][4][2048]; + float m_time[MAX_N_BOARDS][4][2048]; +}; diff --git a/software/drsosc/Icons.xcassets.zip b/software/drsosc/Icons.xcassets.zip new file mode 100644 index 0000000..2fb882e Binary files /dev/null and b/software/drsosc/Icons.xcassets.zip differ diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/Contents.json b/software/drsosc/Icons.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..756963a --- /dev/null +++ b/software/drsosc/Icons.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "DRSOsc16x16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "DRSOsc16x16x2.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "DRSOsc32x32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "DRSOsc32x32x2.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "DRSOsc128x128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "DRSOsc128x128x2.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "DRSOsc256x256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "DRSOsc256x256x2.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "DRSOsc512x512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "DRSOsc512x512x2.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc128x128.png b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc128x128.png new file mode 100644 index 0000000..517d08f Binary files /dev/null and b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc128x128.png differ diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc128x128x2.png b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc128x128x2.png new file mode 100644 index 0000000..e8bb191 Binary files /dev/null and b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc128x128x2.png differ diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc16x16.png b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc16x16.png new file mode 100644 index 0000000..75dcecb Binary files /dev/null and b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc16x16.png differ diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc16x16x2.png b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc16x16x2.png new file mode 100644 index 0000000..414ca27 Binary files /dev/null and b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc16x16x2.png differ diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc256x256.png b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc256x256.png new file mode 100644 index 0000000..e3bb2f1 Binary files /dev/null and b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc256x256.png differ diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc256x256x2.png b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc256x256x2.png new file mode 100644 index 0000000..f969bde Binary files /dev/null and b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc256x256x2.png differ diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc32x32.png b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc32x32.png new file mode 100644 index 0000000..2c67e31 Binary files /dev/null and b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc32x32.png differ diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc32x32x2.png b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc32x32x2.png new file mode 100644 index 0000000..d9c054e Binary files /dev/null and b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc32x32x2.png differ diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc512x512.png b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc512x512.png new file mode 100644 index 0000000..0b1fe0d Binary files /dev/null and b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc512x512.png differ diff --git a/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc512x512x2.png b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc512x512x2.png new file mode 100644 index 0000000..759d258 Binary files /dev/null and b/software/drsosc/Icons.xcassets/AppIcon.appiconset/DRSOsc512x512x2.png differ diff --git a/software/drsosc/InfoDialog.cpp b/software/drsosc/InfoDialog.cpp new file mode 100644 index 0000000..56038ec --- /dev/null +++ b/software/drsosc/InfoDialog.cpp @@ -0,0 +1,59 @@ +/* + * InfoDialog.cpp + * Info Dialog class + * $Id: InfoDialog.cpp 17646 2011-05-11 15:21:02Z ritt $ + */ + +#include "DRSOscInc.h" + +extern char svn_revision[]; +extern char drsosc_version[]; + +InfoDialog::InfoDialog(wxWindow* parent) +: +InfoDialog_fb( parent ) +{ + wxString str; + + DOFrame *frame = (DOFrame*)parent; + DRSBoard *b = frame->GetOsci()->GetCurrentBoard(); + + int t = b->GetBoardType(); + if (t == 5) + str.Printf(wxT("5 (Eval. 2.0)")); + else if (t == 6) + str.Printf(wxT("6 (Mezz. 1.4)")); + else if (t == 7) + str.Printf(wxT("7 (Eval. 3.0)")); + else if (t == 8) + str.Printf(wxT("8 (Eval. 4.0)")); + else + str.Printf(wxT("%d"), t); + m_stBoardType->SetLabel(str); + + str.Printf(wxT("DRS%d"), b->GetDRSType()); + m_stDRSType->SetLabel(str); + + str.Printf(wxT("%d"), b->GetBoardSerialNumber()); + m_stSerialNumber->SetLabel(str); + + str.Printf(wxT("%d"), b->GetFirmwareVersion()); + m_stFirmwareRevision->SetLabel(str); + + str.Printf(wxT("%1.1lf"), b->GetTemperature()); + m_stTemperature->SetLabel(str); + + str.Printf(wxT("%1.2lgV...%1.2lgV"), b->GetInputRange()-0.5, b->GetInputRange()+0.5); + m_stInputRange->SetLabel(str); + + str.Printf(wxT("%1.2lgV...%1.2lgV"), b->GetCalibratedInputRange()-0.5, b->GetCalibratedInputRange()+0.5); + m_stCalibratedRange->SetLabel(str); + + str.Printf(wxT("%1.3lf GSPS"), b->GetCalibratedFrequency()); + m_stCalibratedFrequency->SetLabel(str); + + double freq; + b->ReadFrequency(0, &freq); + str.Printf(wxT("%1.3lf GSPS"), freq); + m_stFrequency->SetLabel(str); +} diff --git a/software/drsosc/InfoDialog.h b/software/drsosc/InfoDialog.h new file mode 100644 index 0000000..445634a --- /dev/null +++ b/software/drsosc/InfoDialog.h @@ -0,0 +1,19 @@ +#ifndef __InfoDialog__ +#define __InfoDialog__ + +// $Id: InfoDialog.h 15243 2010-05-07 14:01:43Z ritt $ + +/** +@file +Subclass of InfoDialog_fb, which is generated by wxFormBuilder. +*/ + +/** Implementing ConfigDialog_fb */ +class InfoDialog : public InfoDialog_fb +{ +public: + /** Constructor */ + InfoDialog( wxWindow* parent ); +}; + +#endif // __InfoDialog__ diff --git a/software/drsosc/Makefile b/software/drsosc/Makefile new file mode 100644 index 0000000..7103b5e --- /dev/null +++ b/software/drsosc/Makefile @@ -0,0 +1,87 @@ +######################################################## +# +# Makefile for drsosc executable under linux +# +# Requires wxWidgets 2.8.9 or newer +# +# S. Ritt, Nov. 2016 +######################################################## + +# determine OS +OSTYPE = $(shell uname) + +# check if wxWidgets is installed +HAVE_WX = $(shell which wx-config) +ifeq ($(HAVE_WX),) +$(error Error: wxWidgets required to compile "drsosc") +endif + +CFLAGS = -g -O2 -Wall -Wuninitialized -Wno-unused-result -fno-strict-aliasing -DHAVE_USB -DHAVE_LIBUSB10 -DUSE_DRS_MUTEX +CFLAGS += -I../include -I../ -I/usr/local/include +WXFLAGS = $(shell wx-config --cxxflags) +LIBS = -L/usr/local/lib -lpthread -lutil +LIBS += $(shell wx-config --libs) + +WX_OBJ = ConfigDialog.o DOFrame.o DOScreen.o DRSOsc.o MeasureDialog.o Measurement.o Osci.o EPThread.o DisplayDialog.o InfoDialog.o AboutDialog.o TriggerDialog.o +OBJECTS = main.o musbstd.o DRS.o rb.o averager.o mxml.o strlcpy.o $(WX_OBJ) + +OUTNAME = drsosc + +# OS specific flags +ifeq ($(OSTYPE),Darwin) +CFLAGS += -DOS_DARWIN -stdlib=libstdc++ +LIBS += -lusb-1.0 +endif + +ifeq ($(OSTYPE),Linux) +CFLAGS += -DOS_LINUX +LIBS += -lusb-1.0 +endif + +all: $(OUTNAME) read_binary +app: DRSOsc.app + +$(OUTNAME): $(OBJECTS) + $(CXX) $(CFLAGS) $(OBJECTS) -o $(OUTNAME) $(LIBS) + +DRSOsc.app: drsosc + -mkdir DRSOsc.app + -mkdir DRSOsc.app/Contents + -mkdir DRSOsc.app/Contents/MacOS + -mkdir DRSOsc.app/Contents/Resources + -mkdir DRSOsc.app/Contents/Resources/English.lproj + echo 'APPL????' > DRSOsc.app/Contents/PkgInfo + cp drsosc.xcodeproj/Info-processed.plist DRSOsc.app/Contents/Info.plist + cp drsosc DRSOsc.app/Contents/MacOS/DRSOsc + cp DRSOsc.icns DRSOsc.app/Contents/Resources + +read_binary: read_binary.cpp + $(CXX) $(CFLAGS) -o $@ $< + +main.o: %.o: %.cpp ../include/mxml.h ../include/DRS.h + $(CXX) $(CFLAGS) $(WXFLAGS) -c $< + +musbstd.o: ../src/musbstd.c ../include/musbstd.h + $(CC) $(CFLAGS) -c $< + +DRS.o: ../src/DRS.cpp ../include/DRS.h + $(CXX) $(CFLAGS) $(WXFLAGS) -c $< + +rb.o: rb.cpp rb.h + $(CXX) $(CFLAGS) -c $< + +averager.o: ../src/averager.cpp ../include/averager.h + $(CXX) $(CFLAGS) -c $< + +mxml.o: ../src/mxml.c ../include/mxml.h + $(CC) $(CFLAGS) -c $< + +strlcpy.o: ../src/strlcpy.c ../include/strlcpy.h + $(CC) $(CFLAGS) -c $< + +$(WX_OBJ): %.o: %.cpp %.h ../include/mxml.h ../include/DRS.h + $(CXX) $(CFLAGS) $(WXFLAGS) -c $< + +clean: + rm -f *.o $(OUTNAME) read_binary + diff --git a/software/drsosc/MeasureDialog.cpp b/software/drsosc/MeasureDialog.cpp new file mode 100644 index 0000000..26e65cb --- /dev/null +++ b/software/drsosc/MeasureDialog.cpp @@ -0,0 +1,64 @@ +/* + * ConfigDialog.cpp + * Modal Measurement Configuration Dialog class + * $Id: MeasureDialog.cpp 21271 2014-02-17 15:20:55Z ritt $ + */ + +#include "DRSOscInc.h" + +MeasureDialog::MeasureDialog( wxWindow* parent ) +: +MeasureDialog_fb( parent ) +{ + m_frame = (DOFrame *)parent; +} + +void MeasureDialog::OnClose( wxCommandEvent& event ) +{ + this->Hide(); +} + +void MeasureDialog::OnButton( wxCommandEvent& event ) +{ + if (event.IsChecked() && event.GetId() >= ID_VS1 && event.GetId() <= ID_VS4) + wxMessageBox(wxT("Please use cursor A to set the location of the vertical slice"), + wxT("DRS Oscilloscope"), wxOK | wxICON_INFORMATION, this); + + if (event.IsChecked() && event.GetId() >= ID_CHRG1 && event.GetId() <= ID_CHRG4) + wxMessageBox(wxT("Please use cursors A and B to define the integration region"), + wxT("DRS Oscilloscope"), wxOK | wxICON_INFORMATION, this); + + if (event.IsChecked() && event.GetId() >= ID_HS1 && event.GetId() <= ID_HS4) + wxMessageBox(wxT("Please use cursor A to set the location of the horizontal slice"), + wxT("DRS Oscilloscope"), wxOK | wxICON_INFORMATION, this); + + m_frame->SetMeasurement(event.GetId(), event.IsChecked()); +} + +void MeasureDialog::OnStat( wxCommandEvent& event ) +{ + m_frame->SetStat(event.IsChecked()); +} + +void MeasureDialog::OnHist( wxCommandEvent& event ) +{ + m_frame->SetHist(event.IsChecked()); +} + +void MeasureDialog::OnStatNAverage( wxCommandEvent& event ) +{ + wxString str = m_cbNAverage->GetValue(); + char buf[100]; + strcpy( buf, (const char*)str.mb_str(wxConvUTF8) ); + m_frame->SetStatNStat(atoi(buf)); +} + +void MeasureDialog::OnIndicator( wxCommandEvent& event ) +{ + m_frame->SetIndicator(event.IsChecked()); +} + +void MeasureDialog::OnStatReset( wxCommandEvent& event ) +{ + m_frame->StatReset(); +} diff --git a/software/drsosc/MeasureDialog.h b/software/drsosc/MeasureDialog.h new file mode 100644 index 0000000..d8c23a8 --- /dev/null +++ b/software/drsosc/MeasureDialog.h @@ -0,0 +1,33 @@ +#ifndef __MeasureDialog__ +#define __MeasureDialog__ + +/* +$Id: MeasureDialog.h 18557 2011-10-28 13:21:44Z ritt $ +*/ + +class DOFrame; + +#include "DRSOsc.h" + +/** Implementing MeasureDialog_fb */ +class MeasureDialog : public MeasureDialog_fb +{ +protected: + // Handlers for MeasureDialog_fb events. + void OnClose( wxCommandEvent& event ); + void OnButton( wxCommandEvent& event ); + void OnStat( wxCommandEvent& event ); + void OnHist( wxCommandEvent& event ); + void OnStatNAverage( wxCommandEvent& event ); + void OnIndicator( wxCommandEvent& event ); + void OnStatReset( wxCommandEvent& event ); + +public: + /** Constructor */ + MeasureDialog( wxWindow* parent ); + +private: + DOFrame *m_frame; +}; + +#endif // __MeasureDialog__ diff --git a/software/drsosc/Measurement.cpp b/software/drsosc/Measurement.cpp new file mode 100644 index 0000000..3c6b450 --- /dev/null +++ b/software/drsosc/Measurement.cpp @@ -0,0 +1,801 @@ +/* + * Measurement.cpp + * Measuremnet class implementation + * $Id: Measurement.cpp 21615 2015-02-25 09:31:08Z ritt $ + */ + +#include "DRSOscInc.h" + +void linfit(double *x, double *y, int n, double &a, double &b); + +Measurement::Measurement(DOFrame *frame, int index) +{ + m_frame = frame; + m_index = index; + memset(m_param, 0, sizeof(m_param)); + m_statIndex = 0; + m_nMeasured = 0; + m_nStat = 1000; + m_statArray = new double[m_nStat]; + m_vsum = m_vvsum = 0; + m_min = m_max = 0; + ResetStat(); +} + +Measurement::~Measurement() +{ + delete m_statArray; +} + +void Measurement::ResetStat() +{ + m_nMeasured = 0; + m_statIndex = 0; +} + +void Measurement::SetNStat(int n) +{ + if (n > 1000000) + n = 1000000; + if (n < 1) + n = 1; + m_nStat = n; + delete m_statArray; + m_statArray = new double[n]; + ResetStat(); +} + +wxString Measurement::GetName() +{ + switch (m_index) { + case 0: return wxT("Level"); break; + case 1: return wxT("Pk-Pk"); break; + case 2: return wxT("RMS"); break; + case 3: return wxT("VSlice"); break; + case 4: return wxT("Charge"); break; + case 5: return wxT("Freq"); break; + case 6: return wxT("Period"); break; + case 7: return wxT("Rise"); break; + case 8: return wxT("Fall"); break; + case 9: return wxT("Pos Width"); break; + case 10: return wxT("Neg Width"); break; + case 11: return wxT("Chn delay"); break; + case 12: return wxT("HSlice"); break; + default: return wxT(""); break; + } +} + +void Measurement::Measure(double *x1, double *y1, double *x2, double *y2, int n) +{ + Measure(x1, y1, x2, y2, n, true, NULL); +} + +double Measurement::Measure(double *x1, double *y1, double *x2, double *y2, int n, bool update, DOScreen *s) +{ + double v; + int i, na; + + switch (m_index) { + case 0: v = MLevel(x1, y1, n, s); break; + case 1: v = MPkPk(x1, y1, n, s); break; + case 2: v = MRMS(x1, y1, n, s); break; + case 3: v = MVSlice(x1, y1, n, s); break; + case 4: v = MCharge(x1, y1, n, s); break; + case 5: v = MFreq(x1, y1, n, s); break; + case 6: v = MPeriod(x1, y1, n, s); break; + case 7: v = MRise(x1, y1, n, s); break; + case 8: v = MFall(x1, y1, n, s); break; + case 9: v = MPosWidth(x1, y1, n, s); break; + case 10: v = MNegWidth(x1, y1, n, s); break; + case 11: v = MChnDelay(x1, y1, x2, y2, n, s); break; + case 12: v = MHSlice(x1, y1, n, s); break; + default: v = 0; break; + } + + m_value = v; + + /* update statistics */ + if (update && !ss_isnan(v)) { + m_statArray[m_statIndex] = v; + m_statIndex = (m_statIndex + 1) % m_nStat; + + if (m_nMeasured < m_nStat) { + m_nMeasured++; + na = m_nMeasured; + } else { + na = m_nStat; + } + + m_vsum = m_vvsum = 0; + m_min = m_max = v; + + for (i=0 ; i m_max) + m_max = m_statArray[i]; + } + } + + return v; +} + +wxString Measurement::GetString() +{ + wxString str; + + if (ss_isnan(m_value)) + str.Printf(wxT(" N/A")); + else { + switch (m_index) { + case 0: + case 1: + case 2: + case 3: str.Printf(wxT("%6.1lf mV"), m_value); break; + case 4: str.Printf(wxT("%6.1lf pC"), m_value); break; + case 5: str.Printf(wxT("%6.1lf MHz"), m_value); break; + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: str.Printf(wxT("%6.3lf ns"), m_value); break; + } + } + + return str; +} + +wxString Measurement::GetStat() +{ + double mean, std; + + if (m_nMeasured == 0) { + mean = 0; + std = 0; + } else { + mean = m_vsum / m_nMeasured; + std = sqrt(m_vvsum/m_nMeasured - m_vsum*m_vsum/m_nMeasured/m_nMeasured); + } + + wxString str; + if (ss_isnan(m_min) || ss_isnan(m_max)) + str.Printf(wxT(" N/A N/A N/A N/A %6d"), m_nMeasured); + else + str.Printf(wxT("%8.3lf %8.3lf %8.3lf %8.4lf %6d"), m_min, m_max, mean, std, m_nMeasured); + return str; +} + +double Measurement::MLevel(double *x, double *y, int n, DOScreen *s) +{ + double l = 0; + for (int i=0 ; i 0) + l /= n; + + if (s) { + s->GetDC()->DrawLine(s->timeToX(x[0]), s->voltToY(l), + s->timeToX(x[n-1]), s->voltToY(l)); + } + return l; +} + +double Measurement::MPkPk(double *x, double *y, int n, DOScreen *s) +{ + double min_x, min_y, max_x, max_y; + + min_x = max_x = x[0]; + min_y = max_y = y[0]; + for (int i=0 ; i max_y) { + max_x = x[i]; + max_y = y[i]; + } + } + + if (s) { + int x_min = s->timeToX(min_x); + int x_max = s->timeToX(max_x); + int y_min = s->voltToY(min_y); + int y_max = s->voltToY(max_y); + + int x_center = (x_min + x_max) / 2; + + if (x_max > x_min) { + s->GetDC()->DrawLine(x_min-20, y_min, x_center+20, y_min); + s->GetDC()->DrawLine(x_center-20, y_max, x_max+20, y_max); + } else { + s->GetDC()->DrawLine(x_max-20, y_max, x_center+20, y_max); + s->GetDC()->DrawLine(x_center-20, y_min, x_min+20, y_min); + } + + s->GetDC()->DrawLine(x_center, y_max, x_center, y_min); + s->GetDC()->DrawLine(x_center, y_max, x_center+2, y_max+6); + s->GetDC()->DrawLine(x_center, y_max, x_center-2, y_max+6); + s->GetDC()->DrawLine(x_center, y_min, x_center+2, y_min-6); + s->GetDC()->DrawLine(x_center, y_min, x_center-2, y_min-6); + + } + + return max_y-min_y; +} + +double Measurement::MRMS(double *x, double *y, int n, DOScreen *s) +{ + double mean = 0; + double rms = 0; + + if (n <= 0) + return 0; + + for (int i=0 ; ivoltToY(mean); + for (int i=0 ; iGetDC()->DrawLine(s->timeToX(x[i]), ym, s->timeToX(x[i]), s->voltToY(y[i])); + } + + return rms; +} + +double Measurement::MVSlice(double *x, double *y, int n, DOScreen *s) +{ + int i; + double u = 0; + + if (n <= 0) + return 0; + + for (i=0 ; i m_param[0]) + break; + + if (i == n-1) + return ss_nan(); + + if (x[i+1] - x[i] == 0) + return ss_nan(); + + u = y[i] + (y[i+1]-y[i]) * (m_param[0] - x[i]) / (x[i+1] - x[i]); + + if (s) { + s->GetDC()->DrawLine(s->timeToX(m_param[0]), s->GetY1(), s->timeToX(m_param[0]), s->GetY2()); + } + + return u; +} + +double Measurement::MCharge(double *x, double *y, int n, DOScreen *s) +{ + double q = 0; + double x1, x2, y1, y2; + + if (n <= 0) + return 0; + + for (int i=0 ; i= m_param[0] && x[i] <= m_param[2]) { + if (x[i] < m_param[0]) { + x1 = m_param[0]; + y1 = y[i] + (y[i+1]-y[i]) * (m_param[0] - x[i]) / (x[i+1] - x[i]); + } else { + x1 = x[i]; + y1 = y[i]; + } + if (x[i+1] > m_param[2]) { + x2 = m_param[2]; + y2 = y[i] + (y[i+1]-y[i]) * (m_param[2] - x[i]) / (x[i+1] - x[i]); + } else { + x2 = x[i+1]; + y2 = y[i+1]; + } + + q += 0.5 * (y1 + y2) * (x2 - x1); + + if (s) { + wxPoint p[4]; + p[0] = wxPoint(s->timeToX(x1), s->voltToY(0)); + p[1] = wxPoint(s->timeToX(x1), s->voltToY(y1)); + p[2] = wxPoint(s->timeToX(x2), s->voltToY(y2)); + p[3] = wxPoint(s->timeToX(x2), s->voltToY(0)); + + s->GetDC()->DrawPolygon(4, p, 0, 0); + } + } + } + + return q / 50; // signal into 50 Ohm +} + +/*-------------------------------------------------------------------------*/ + +double Measurement::MFreq(double *x, double *y, int n, DOScreen *s) +{ + double p = MPeriod(x, y, n, s); + + if (ss_isnan(p) || p == 0) + return ss_nan(); + + return 1000/p; +} + +double Measurement::MPeriod(double *x, double *y, int n, DOScreen *s) +{ + int i, pos_edge, n_pos, n_neg; + double miny, maxy, mean, t1, t2; + + if (n <= 0) + return 0; + + miny = maxy = y[0]; + mean = 0; + for (i=0 ; i maxy) + maxy = y[i]; + if (y[i] < miny) + miny = y[i]; + mean += y[i]; + } + if (n < 5 || maxy - miny < 10) + return ss_nan(); + + mean = mean/n; + + /* count zero crossings */ + n_pos = n_neg = 0; + for (i=1 ; i mean && y[i-1] <= mean) + n_pos++; + if (y[i] < mean && y[i-1] >= mean) + n_neg++; + } + + /* search for zero crossing */ + for (i=n/2+2 ; i>1 ; i--) { + if (n_pos > 1 && y[i] > mean && y[i-1] <= mean) + break; + if (n_neg > 1 && y[i] < mean && y[i-1] >= mean) + break; + } + if (i == 1) + for (i=n/2 ; i 1 && y[i] > mean && y[i-1] <= mean) + break; + if (n_neg > 1 && y[i] < mean && y[i-1] >= mean) + break; + } + if (i == n) + return ss_nan(); + + pos_edge = y[i] > mean; + + t1 = (mean*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + + /* search next zero crossing */ + for (i++ ; i mean && y[i-1] <= mean) + break; + if (!pos_edge && y[i] < mean && y[i-1] >= mean) + break; + } + + if (i == n) + return ss_nan(); + + t2 = (mean*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + + if (s) { + int ym = s->voltToY(mean); + int x1 = s->timeToX(t1); + int x2 = s->timeToX(t2); + s->GetDC()->DrawLine(x1, ym-10, x1, ym+10); + s->GetDC()->DrawLine(x2, ym-10, x2, ym+10); + s->GetDC()->DrawLine(x1, ym, x2, ym); + s->GetDC()->DrawLine(x1, ym, x1+6, ym-2); + s->GetDC()->DrawLine(x1, ym, x1+6, ym+2); + s->GetDC()->DrawLine(x2, ym, x2-6, ym-2); + s->GetDC()->DrawLine(x2, ym, x2-6, ym+2); + } + + return t2 - t1; +} + +double Measurement::MRise(double *x, double *y, int n, DOScreen *s) +{ + int i; + double miny, maxy, t1, t2, y10, y90; + + if (n <= 0) + return 0; + + miny = maxy = y[0]; + for (i=0 ; i maxy) + maxy = y[i]; + if (y[i] < miny) + miny = y[i]; + } + + if (maxy - miny < 10) + return ss_nan(); + + y10 = miny+0.1*(maxy-miny); + y90 = miny+0.9*(maxy-miny); + + /* search for 10% level crossing */ + for (i=n/2+2 ; i>1 ; i--) + if (y[i] > y10 && y[i-1] <= y10) + break; + if (i == 1) + for (i=n/2 ; i y10 && y[i-1] <= y10) + break; + } + if (i == n) + return ss_nan(); + + t1 = (y10*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + + /* search for 90% level crossing */ + for (i++ ; i y90 && y[i-1] <= y90) + break; + + if (i == n) + return ss_nan(); + + t2 = (y90*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + + if (s) { + int y1 = s->voltToY(y10); + int y2 = s->voltToY(y90); + int x1 = s->timeToX(t1); + int x2 = s->timeToX(t2); + int ym = (y1 + y2)/2; + + s->GetDC()->DrawLine(x1, y1+10, x1, ym-10); + s->GetDC()->DrawLine(x2, y2-10, x2, ym+10); + s->GetDC()->DrawLine(x1, ym, x2, ym); + s->GetDC()->DrawLine(x1, ym, x1+6, ym-2); + s->GetDC()->DrawLine(x1, ym, x1+6, ym+2); + s->GetDC()->DrawLine(x2, ym, x2-6, ym-2); + s->GetDC()->DrawLine(x2, ym, x2-6, ym+2); + } + + return t2 - t1; +} + +double Measurement::MFall(double *x, double *y, int n, DOScreen *s) +{ + int i; + double miny, maxy, t1, t2, y10, y90; + + if (n <= 0) + return 0; + + miny = maxy = y[0]; + for (i=0 ; i maxy) + maxy = y[i]; + if (y[i] < miny) + miny = y[i]; + } + + if (maxy - miny < 10) + return ss_nan(); + + y10 = miny+0.1*(maxy-miny); + y90 = miny+0.9*(maxy-miny); + + /* search for 90% level crossing */ + for (i=n/2+2 ; i>1 ; i--) + if (y[i] < y90 && y[i-1] >= y90) + break; + if (i == 1) + for (i=n/2 ; i= y90) + break; + } + if (i == n) + return ss_nan(); + + t1 = (y90*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + + /* search for 10% level crossing */ + for (i++ ; i= y10) + break; + + if (i == n) + return ss_nan(); + + t2 = (y10*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + + if (s) { + int y1 = s->voltToY(y90); + int y2 = s->voltToY(y10); + int x1 = s->timeToX(t1); + int x2 = s->timeToX(t2); + int ym = (y1 + y2)/2; + + s->GetDC()->DrawLine(x1, y1-10, x1, ym+10); + s->GetDC()->DrawLine(x2, y2+10, x2, ym-10); + s->GetDC()->DrawLine(x1, ym, x2, ym); + s->GetDC()->DrawLine(x1, ym, x1+6, ym-2); + s->GetDC()->DrawLine(x1, ym, x1+6, ym+2); + s->GetDC()->DrawLine(x2, ym, x2-6, ym-2); + s->GetDC()->DrawLine(x2, ym, x2-6, ym+2); + } + + return t2 - t1; +} + +double Measurement::MPosWidth(double *x, double *y, int n, DOScreen *s) +{ + int i; + double miny, maxy, mean, t1, t2; + + if (n <= 0) + return 0; + + miny = maxy = y[0]; + for (i=0 ; i maxy) + maxy = y[i]; + if (y[i] < miny) + miny = y[i]; + } + mean = (miny + maxy)/2; + + if (maxy - miny < 10) + return ss_nan(); + + /* search for first pos zero crossing */ + for (i=1 ; i mean && y[i-1] <= mean) + break; + if (i == n) + return ss_nan(); + + t1 = (mean*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + + /* search next neg zero crossing */ + for (i++ ; i= mean) + break; + if (i == n) + return ss_nan(); + + t2 = (mean*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + + if (s) { + int ym = s->voltToY(mean); + int x1 = s->timeToX(t1); + int x2 = s->timeToX(t2); + s->GetDC()->DrawLine(x1, ym-10, x1, ym+10); + s->GetDC()->DrawLine(x2, ym-10, x2, ym+10); + s->GetDC()->DrawLine(x1, ym, x2, ym); + s->GetDC()->DrawLine(x1, ym, x1+6, ym-2); + s->GetDC()->DrawLine(x1, ym, x1+6, ym+2); + s->GetDC()->DrawLine(x2, ym, x2-6, ym-2); + s->GetDC()->DrawLine(x2, ym, x2-6, ym+2); + } + + return t2 - t1; +} + +double Measurement::MNegWidth(double *x, double *y, int n, DOScreen *s) +{ + int i; + double miny, maxy, mean, t1, t2; + + if (n <= 0) + return 0; + + miny = maxy = y[0]; + for (i=0 ; i maxy) + maxy = y[i]; + if (y[i] < miny) + miny = y[i]; + } + mean = (miny + maxy)/2; + + if (maxy - miny < 10) + return ss_nan(); + + /* search for first neg zero crossing */ + for (i=1 ; i= mean) + break; + if (i == n) + return ss_nan(); + + t1 = (mean*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + + /* search next pos zero crossing */ + for (i++ ; i mean && y[i-1] <= mean) + break; + if (i == n) + return ss_nan(); + + t2 = (mean*(x[i]-x[i-1])+x[i-1]*y[i]-x[i]*y[i-1])/(y[i]-y[i-1]); + + if (s) { + int ym = s->voltToY(mean); + int x1 = s->timeToX(t1); + int x2 = s->timeToX(t2); + s->GetDC()->DrawLine(x1, ym-10, x1, ym+10); + s->GetDC()->DrawLine(x2, ym-10, x2, ym+10); + s->GetDC()->DrawLine(x1, ym, x2, ym); + s->GetDC()->DrawLine(x1, ym, x1+6, ym-2); + s->GetDC()->DrawLine(x1, ym, x1+6, ym+2); + s->GetDC()->DrawLine(x2, ym, x2-6, ym-2); + s->GetDC()->DrawLine(x2, ym, x2-6, ym+2); + } + + return t2 - t1; +} + +#define N_FIT 0 + +void linfit(double *x, double *y, int n, double &a, double &b) +{ + int i; + double sx, sxx, sy, syy, sxy; + + sx = sxx = sy = syy = sxy = 0; + + for (i=0 ; iGetTrgLevel(0) * 1000; + pol = m_frame->GetTrgPolarity(); + for (i=1 ; i= thr) + break; + if (pol == 0 && y1[i] > thr && y1[i-1] <= thr) + break; + } + if (i == n) + return ss_nan(); + + t1 = (thr*(x1[i]-x1[i-1])+x1[i-1]*y1[i]-x1[i]*y1[i-1])/(y1[i]-y1[i-1]); + + if (N_FIT > 0 && i>=N_FIT/2) { + i1l = i-N_FIT/2; + i1r = i1l+N_FIT-1; + linfit(&x1[i-N_FIT/2], &y1[i-N_FIT/2], N_FIT, a, b); + if (b != 0) + t1 = (thr-a)/b; + + if (s) { + int xa = s->timeToX(x1[i1l]); + int ya = s->voltToY(s->GetCurChn(), a+b*x1[i1l]); + int xb = s->timeToX(x1[i1r]); + int yb = s->voltToY(s->GetCurChn(), a+b*x1[i1r]); + + s->GetDC()->DrawLine(xa, ya, xb, yb); + } + } + + for (i=1 ; i= thr) + break; + if (pol == 0 && y2[i] > thr && y2[i-1] <= thr) + break; + } + if (i == n) + return ss_nan(); + + t2 = (thr*(x2[i]-x2[i-1])+x2[i-1]*y2[i]-x2[i]*y2[i-1])/(y2[i]-y2[i-1]); + + if (N_FIT > 0 && i>=N_FIT/2) { + i2l = i-N_FIT/2; + i2r = i2l+N_FIT-1; + linfit(&x2[i-N_FIT/2], &y2[i-N_FIT/2], N_FIT, a, b); + if (b != 0) + t2 = (thr-a)/b; + + if (s) { + int xa = s->timeToX(x2[i2l]); + int ya = s->voltToY(s->GetCurChn(), a+b*x2[i2l]); + int xb = s->timeToX(x2[i2r]); + int yb = s->voltToY(s->GetCurChn(), a+b*x2[i2r]); + + s->GetDC()->DrawLine(xa, ya, xb, yb); + } +} + + if (s) { + if (s->GetChnOn(0, (s->GetCurChn()+1)%4)) { /// ### TBG: change board index + int ym1 = s->voltToY(s->GetCurChn(), thr); + int ym2 = s->voltToY((s->GetCurChn()+1)%4, thr); + int xa = s->timeToX(t1); + int xb = s->timeToX(t2); + int ymm = (ym1+ym2)/2; + if (ym1 < ym2) { + s->GetDC()->DrawLine(xa, ym1-10, xa, ymm+10); + s->GetDC()->DrawLine(xb, ymm-10, xb, ym2+10); + } else { + s->GetDC()->DrawLine(xa, ym1+10, xa, ymm-10); + s->GetDC()->DrawLine(xb, ymm+10, xb, ym2-10); + } + s->GetDC()->DrawLine(xa, ymm, xb, ymm); + s->GetDC()->DrawLine(xa, ymm, xa+6, ymm-2); + s->GetDC()->DrawLine(xa, ymm, xa+6, ymm+2); + s->GetDC()->DrawLine(xb, ymm, xb-6, ymm-2); + s->GetDC()->DrawLine(xb, ymm, xb-6, ymm+2); + } + } + + return t2 - t1; +} + +double Measurement::MHSlice(double *x, double *y, int n, DOScreen *s) +{ + int i; + double tmin = ss_nan(); + double t, dtmin = 1E6;; + + if (n <= 0) + return 0; + + for (i=0 ; i m_param[1]) || + (y[i] >= m_param[1] && y[i+1] < m_param[1])) { + + if (y[i+1] - y[i] == 0) + continue; + t = x[i] + (x[i+1]-x[i]) * (m_param[1] - y[i]) / (y[i+1] - y[i]); + if (fabs(t - m_param[0]) < dtmin) { + dtmin = fabs(t - m_param[0]); + tmin = t; + } + } + } + + if (s) { + s->GetDC()->DrawLine(s->GetX1(), s->voltToY(m_param[1]), s->GetX2(), s->voltToY(m_param[1])); + } + + return tmin; +} + + + diff --git a/software/drsosc/Measurement.h b/software/drsosc/Measurement.h new file mode 100644 index 0000000..403f184 --- /dev/null +++ b/software/drsosc/Measurement.h @@ -0,0 +1,60 @@ +/* +$Id: Measurement.h 21271 2014-02-17 15:20:55Z ritt $ +*/ + +class DOScreen; +class DOFrame; + +class Measurement +{ +protected: + DOFrame *m_frame; + wxString m_name; + int m_index; + double m_value; + double m_param[4]; + double *m_statArray; + int m_statIndex; + int m_nMeasured; + int m_nStat; + double m_vsum; + double m_vvsum; + double m_min; + double m_max; + +public: + /** Constructor & Desctructor */ + Measurement(DOFrame *frame, int index); + ~Measurement(); + + wxString GetName(); + wxString GetUnit(); + double Measure(double *x1, double *y1, double *x2, double *y2, int n, bool update, DOScreen *s); + void Measure(double *x1, double *y1, double *x2, double *y2, int n); + wxString GetString(); + wxString GetStat(); + void SetNStat(int n); + int GetNStat() { return m_nStat; } + int GetNMeasured() { return m_nMeasured; } + void ResetStat(); + double *GetArray() { return m_statArray; } + void SetParam(int i, double p) { if (i<4) m_param[i] = p; } + double GetParam(int i) { return m_param[i]; } + + static const int N_MEASUREMENTS = 13; + +private: + double MLevel(double *x1, double *y1, int n, DOScreen *s); + double MPkPk(double *x1, double *y1, int n, DOScreen *s); + double MRMS(double *x1, double *y1, int n, DOScreen *s); + double MVSlice(double *x1, double *y1, int n, DOScreen *s); + double MCharge(double *x1, double *y1, int n, DOScreen *s); + double MFreq(double *x1, double *y1, int n, DOScreen *s); + double MPeriod(double *x1, double *y1, int n, DOScreen *s); + double MRise(double *x1, double *y1, int n, DOScreen *s); + double MFall(double *x1, double *y1, int n, DOScreen *s); + double MPosWidth(double *x1, double *y1, int n, DOScreen *s); + double MNegWidth(double *x1, double *y1, int n, DOScreen *s); + double MChnDelay(double *x1, double *y1, double *x2, double *y2, int n, DOScreen *s); + double MHSlice(double *x1, double *y1, int n, DOScreen *s); +}; diff --git a/software/drsosc/Osci.cpp b/software/drsosc/Osci.cpp new file mode 100644 index 0000000..1afbdfa --- /dev/null +++ b/software/drsosc/Osci.cpp @@ -0,0 +1,1582 @@ +/* + * Osci.cpp + * DRS oscilloscope main class + * $Id: Osci.cpp 22326 2016-10-10 14:21:29Z ritt $ + */ + +#include "DRSOscInc.h" +#include "rb.h" + +#ifndef _MSC_VER +#include +#endif + +int g_rbh; + +#define RB_SIZE (1024*1024*4) // 4 MB fits 60 waveforms for four boards + +void GetTimeStamp(TIMESTAMP &ts); + +/*------------------------------------------------------------------*/ + +Osci::Osci(double samplingSpeed, bool mthread) +{ + m_drs = NULL; + m_thread = NULL; + m_running = false; + m_single = false; + m_armed = false; + m_samplingSpeed = samplingSpeed; + m_triggerCell[0] = 0; + m_writeSR[0] = 0; + m_waveDepth = 1024; + m_trgMode = TM_AUTO; + m_trgNegative = false; + m_trgDelay = 0; + for (int i=0 ; i<4 ; i++) + m_trgLevel[i] = 0; + for (int b=0 ; bStopThread(); + wxThread::Sleep(100); + } + if (g_rbh) + rb_delete(g_rbh); + delete m_drs; +} + +/*------------------------------------------------------------------*/ + +void Osci::StopThread(void) +{ + if (m_thread) { + do { + m_thread->StopThread(); + wxThread::Sleep(100); + } while (!m_thread->IsFinished()); + } +} + +/*------------------------------------------------------------------*/ + +void GetTimeStamp(TIMESTAMP &ts) +{ +#ifdef _MSC_VER + SYSTEMTIME t; + static unsigned int ofs = 0; + + GetLocalTime(&t); + if (ofs == 0) + ofs = timeGetTime() - t.wMilliseconds; + ts.Year = t.wYear; + ts.Month = t.wMonth; + ts.Day = t.wDay; + ts.Hour = t.wHour; + ts.Minute = t.wMinute; + ts.Second = t.wSecond; + ts.Milliseconds = (timeGetTime() - ofs) % 1000; +#else + struct timeval t; + struct tm *lt; + time_t now; + + gettimeofday(&t, NULL); + time(&now); + lt = localtime(&now); + + ts.Year = lt->tm_year+1900; + ts.Month = lt->tm_mon+1; + ts.Day = lt->tm_mday; + ts.Hour = lt->tm_hour; + ts.Minute = lt->tm_min; + ts.Second = lt->tm_sec; + ts.Milliseconds = t.tv_usec/1000; +#endif /* OS_UNIX */ +} + + +/*------------------------------------------------------------------*/ + +int Osci::ScanBoards() +{ + /* pause readout thread if present */ + if (m_thread) + m_thread->Enable(false); + + if (m_drs) + delete m_drs; + + m_drs = new DRS(); + m_drs->SortBoards(); + m_nDRS = m_drs->GetNumberOfBoards(); + m_board = 0; + + for (int i=0 ; i< m_nDRS ; i++) { + DRSBoard *b = m_drs->GetBoard(i); + b->Init(); + if (b->GetBoardType() == 3) { // DRS2 board + b->SetDominoMode(1); + b->EnableTrigger(1, 0); // fast trigger + if (m_samplingSpeed > 2) + m_samplingSpeed = 2; + b->SetFrequency(m_samplingSpeed, true); + m_samplingSpeed = b->GetNominalFrequency(); + b->SetNumberOfChannels(10); +#ifdef _MSC_VER + b->SetCalibrationDirectory("C:/experiment/calibrations"); +#else + b->SetCalibrationDirectory("/home/meg/meg/online/calibrations"); +#endif + + if (i == 0) + printf("Reading calibration for sampling speed %lg GSPS\n", m_samplingSpeed); + + if (!b->GetResponseCalibration()->ReadCalibration(0) || + !b->GetResponseCalibration()->ReadCalibration(1)) { + wxString str; + + str.Printf(wxT("Cannot read calibration for %1.1lf GSPS VME board slot %2d %s, serial #%d"), + m_samplingSpeed, + (b->GetSlotNumber() >> 1)+2, + ((b->GetSlotNumber() & 1) == 0) ? "upper" : "lower", + b->GetBoardSerialNumber()); + + wxMessageBox(str, wxT("DRS Oscilloscope Error"), wxOK | wxICON_STOP, NULL); + } else { + printf("Calibration read for VME board slot %2d %s, serial #%04d\n", + (b->GetSlotNumber() >> 1)+2, + ((b->GetSlotNumber() & 1) == 0) ? "upper" : "lower", + b->GetBoardSerialNumber()); + } + + } else { // DRS4 board + + /* obtain default sampling speed from calibration of first board */ + if (i == 0) + m_samplingSpeed = b->GetCalibratedFrequency(); + + b->SetFrequency(m_samplingSpeed, true); + m_samplingSpeed = b->GetNominalFrequency(); + if (b->GetTransport() == TR_USB2) + b->SetChannelConfig(0, 8, 8); + else + b->SetChannelConfig(7, 8, 8); + b->SetDecimation(0); + b->SetDominoMode(1); + b->SetReadoutMode(1); + b->SetDominoActive(1); + if (b->GetBoardType() == 5 || b->GetBoardType() == 7 || b->GetBoardType() == 8 || b->GetBoardType() == 9) { + b->SetTranspMode(1); // Evaluation board with build-in trigger + b->EnableTrigger(0, 1); // Enable analog trigger + b->SetTriggerSource(0); // on CH0 + } else if (b->GetBoardType() == 6) { + b->SetTranspMode(0); // VPC Mezzanine board + b->EnableTrigger(0, 0); // Disable analog trigger + } + b->SetRefclk(0); + b->SetFrequency(m_samplingSpeed, true); + b->EnableAcal(0, 0); + b->EnableTcal(0, 0); + b->StartDomino(); + } + } + + /* resume readout thread if present */ + if (m_thread) + m_thread->Enable(true); + + return m_nDRS; +} + +/*------------------------------------------------------------------*/ + +void Osci::CheckTimingCalibration() +{ + for (int i=0 ; i< m_nDRS ; i++) { + DRSBoard *b = m_drs->GetBoard(i); + if (b->GetDRSType() == 4) { + + if (!b->IsVoltageCalibrationValid()) { + wxString str; + + if (b->GetTransport() != TR_VME) { + str.Printf(wxT("Board on USB%d has invalid voltage calibration\nOnly raw data will be displayed"), + b->GetSlotNumber()); + } else { + str.Printf(wxT("VME board in slot %2d %s has invalid voltage calibration\nOnly raw data will be displayed"), + (b->GetSlotNumber() >> 1)+2, + ((b->GetSlotNumber() & 1) == 0) ? "upper" : "lower"); + } + wxMessageBox(str, wxT("DRS Oscilloscope Warning"), wxOK | wxICON_EXCLAMATION); + } else { + if (!b->IsTimingCalibrationValid()) { + wxString str; + + if (b->GetTransport() != TR_VME) { + if (b->GetCalibratedFrequency() == -1) + str.Printf(wxT("Board on USB%d has been timing calibrated with an old method. You must redo the timing calibration to obtain precise timing results."), b->GetSlotNumber()); + else + str.Printf(wxT("Board on USB%d has been timing calibrated at %1.4lg GSPS. You must redo the timing calibration at %1.4lg GSPS to obtain precise timing results."), + b->GetSlotNumber(), b->GetCalibratedFrequency(), m_samplingSpeed); + } else { + str.Printf(wxT("VME board in slot %2d %s has been timing calibrated at %1.4lg GSPS. You must redo the timing calibration at %1.4lg GSPS to obtain precise timing results."), + (b->GetSlotNumber() >> 1)+2, + ((b->GetSlotNumber() & 1) == 0) ? "upper" : "lower", + b->GetCalibratedFrequency(), b->GetNominalFrequency()); + } + wxMessageBox(str, wxT("DRS Oscilloscope Warning"), wxOK | wxICON_EXCLAMATION); + } + } + } + } +} + +/*------------------------------------------------------------------*/ + +void Osci::SelectBoard(int board) +{ + if (board >= m_nDRS) + return; + + /* pause readout thread if present */ + if (m_thread) + m_thread->Enable(false); + + m_board = board; + + if (m_thread) + DrainEvents(); + + /* resume readout thread if present */ + if (m_thread) + m_thread->Enable(true); +} + +/*------------------------------------------------------------------*/ + +void Osci::SelectChannel(int firstChannel, int chnSection) +{ + if (m_drs->GetNumberOfBoards() == 0) + return; + + /* pause readout thread if present */ + if (m_thread) + m_thread->Enable(false); + + for (int bi=0 ; bi < m_nDRS ; bi++) { + DRSBoard *b = m_drs->GetBoard(bi); + + /* stop drs_readout state machine to be ready for configuration change */ + if (b->IsBusy()) { + b->SoftTrigger(); + for (int i=0 ; i<10 && b->IsBusy() ; i++) + wxMilliSleep(10); + } + + if (b->GetBoardType() == 6 && b->GetTransport() == TR_USB2) { + if (firstChannel == 0 || firstChannel == 2) { + if (chnSection == 0) + b->SetChannelConfig(1, 8, 8); + else + b->SetChannelConfig(0, 8, 8); + } else { + if (chnSection == 0) + b->SetChannelConfig(3, 8, 8); + else + b->SetChannelConfig(2, 8, 8); + } + m_chip = firstChannel; + m_chnOffset = 0; + m_chnSection = chnSection; + } else { + m_chip = firstChannel; + m_chnOffset = chnSection; + m_chnSection = chnSection; + + if (b->GetBoardType() == 3) { + m_chip = firstChannel / 2; + m_chnOffset = (firstChannel % 2)* 4; + } + + if (b->GetBoardType() == 5 || b->GetBoardType() == 7 || b->GetBoardType() == 8 || b->GetBoardType() == 9) { + if (chnSection == 2) + b->SetChannelConfig(0, 8, 4); + else + b->SetChannelConfig(0, 8, 8); + } else { + if (chnSection == 2) + b->SetChannelConfig(7, 8, 4); + else + b->SetChannelConfig(7, 8, 8); + } + } + + /* resume readout thread if present */ + if (m_thread) + m_thread->Enable(true); + } +} + +/*------------------------------------------------------------------*/ + +void Osci::SetMultiBoard(bool flag) +{ + m_multiBoard = flag; +} + +/*------------------------------------------------------------------*/ + +OsciThread::OsciThread(Osci *o) : wxThread() +{ + m_osci = o; + m_enabled = false; + m_finished = false; + m_active = false; + m_stopThread = false; + Create(); + Run(); +} + +/*------------------------------------------------------------------*/ + +void OsciThread::Enable(bool flag) +{ + m_enabled = flag; + if (!flag) + while (m_active) + wxThread::Sleep(10); +} + +/*------------------------------------------------------------------*/ + +void OsciThread::StopThread() +{ + m_stopThread = true; + while (!m_finished) + wxThread::Sleep(10); +} + +/*------------------------------------------------------------------*/ + +bool OsciThread::IsIdle() +{ + if (m_osci->IsRunning() && m_sw1.Time() > 1000) + return true; + + if (m_osci->IsSingle() && m_osci->IsArmed() && m_sw1.Time() > 1000) + return true; + + return false; +} + +/*------------------------------------------------------------------*/ + +void OsciThread::ResetSW() +{ + m_sw1.Start(); +} + +/*------------------------------------------------------------------*/ + +void *OsciThread::Entry() +{ + int size, index, status, n, m; + unsigned char *pdata; + unsigned short *p; + bool autoTriggered; + DRSBoard *b; + TIMESTAMP ts; + bool skip_event; + + n = m = 0; + autoTriggered = false; + do { + if (m_osci->GetDRS()->GetNumberOfBoards() > 0 && m_enabled) { + m_active = true; + if (m_osci->HasTriggered()) { + + skip_event = false; + n = 0; + if (!autoTriggered) + m_sw1.Start(); // we got a real trigger + autoTriggered = false; + + // wait for space in ring buffer + do { + status = rb_get_wp(g_rbh, (void **)&pdata, 100); + if (status == RB_SUCCESS) { + // put number of boards into ring buffer + p = (unsigned short *)pdata; + *p++ = m_osci->IsMultiBoard() ? m_osci->GetDRS()->GetNumberOfBoards() : 1; + + for (index = 0 ; index < m_osci->GetDRS()->GetNumberOfBoards() ; index++) { + + b = m_osci->GetBoard(index); + if (!m_osci->IsMultiBoard() && m_osci->GetCurrentBoard() != b) + continue; + + // abort event readout if slave board has not triggered + if (m_osci->IsMultiBoard()) + if (index > 0) + if (b->IsBusy()) + skip_event = true; + + if (skip_event) + break; + + // transfer waveforms + b->TransferWaves((unsigned char *)p); + size = b->GetWaveformBufferSize(); + + p += size/sizeof(unsigned short); + *p++ = b->GetStopCell(0); + *p++ = b->GetStopWSR(0); + *p++ = (unsigned short)b->GetBoardSerialNumber(); + } + + // restart boards in invertd order (master last) + for (index = m_osci->GetDRS()->GetNumberOfBoards()-1 ; index>=0 ; index--) { + b = m_osci->GetBoard(index); + if (!m_osci->IsMultiBoard() && m_osci->GetCurrentBoard() != b) + continue; + + if (m_osci->IsRunning()) { + // only if not in multi buffer mode + if (!b->IsMultiBuffer()) + b->StartDomino(); + } + } + + // in single mode, just clear armed flag + if (m_osci->IsSingle()) + m_osci->SetArmed(false); + + if (skip_event) + break; + + // add timestamp + GetTimeStamp(ts); + memcpy(p, &ts, sizeof(ts)); + p += sizeof(ts)/sizeof(unsigned short); + size = (unsigned char*)p - pdata; + + // commit data to ring buffer + rb_increment_wp(g_rbh, size); + } else + wxThread::Sleep(10); + + if (m_stopThread) + break; + + } while (status != RB_SUCCESS && !TestDestroy()); + +#ifndef _MSC_VER // Needed for Linux only, otherwise GUI freezes + if (m++ % 10 == 0) + wxThread::Yield(); +#endif + + } else { + if (m_osci->GetTriggerMode() == TM_AUTO && m_osci->IsRunning() && + m_sw1.Time() > 1000) { + if (m_sw2.Time() > 300) { + wxThread::Sleep(30); // sleep 3 times a second a bit to test for real trigger + m_sw2.Start(); + } + if (!m_osci->HasTriggered()) { + m_osci->SingleTrigger(); + autoTriggered = true; + } + } else { + n++; + // sleep once in a while to save CPU + if (n == 100) { + n = 0; + wxThread::Sleep(100); + } else + wxThread::Yield(); + } + } + } else { + wxThread::Sleep(10); + m_active = false; + } + + } while (!m_stopThread); + + m_finished = true; + + return NULL; +} + +/*------------------------------------------------------------------*/ + +void Osci::SetRunning(bool flag) +{ + m_running = flag; + if (m_running) + Start(); + else { + Stop(); + if (m_drs->GetNumberOfBoards() > 0) + DrainEvents(); + } +} + +/*------------------------------------------------------------------*/ + +void Osci::Enable(bool flag) +{ + if (m_thread) + m_thread->Enable(flag); +} + +/*------------------------------------------------------------------*/ + +void Osci::Start() +{ + /* start domino wave */ + if (m_multiBoard) { + for (int i=0 ; i< m_drs->GetNumberOfBoards() ; i++) + m_drs->GetBoard(i)->StartDomino(); + } else if (m_drs->GetNumberOfBoards()) + m_drs->GetBoard(m_board)->StartDomino(); + + m_armed = true; +} + +/*------------------------------------------------------------------*/ + +void Osci::Stop() +{ + /* stop domino wave */ + if (m_multiBoard) { + for (int i=0 ; i< m_drs->GetNumberOfBoards() ; i++) + m_drs->GetBoard(i)->SoftTrigger(); + } else if (m_drs->GetNumberOfBoards()) + m_drs->GetBoard(m_board)->SoftTrigger(); + m_armed = false; +} + +/*------------------------------------------------------------------*/ + +void Osci::DrainEvents() +{ + while (HasNewEvent()) + ReadWaveforms(); +} + +/*------------------------------------------------------------------*/ + +void Osci::SetSingle(bool flag) +{ + m_single = flag; + if (m_thread) + m_thread->ResetSW(); +} + +/*------------------------------------------------------------------*/ + +void Osci::SingleTrigger() +{ + if (m_multiBoard) { + for (int i=0 ; i< m_drs->GetNumberOfBoards() ; i++) + m_drs->GetBoard(i)->SoftTrigger(); + } else if (m_drs->GetNumberOfBoards()) + m_drs->GetBoard(m_board)->SoftTrigger(); +} + +/*------------------------------------------------------------------*/ + +bool Osci::HasNewEvent() +{ + int n; + + if (m_drs->GetNumberOfBoards() > 0) { + if (m_thread) { + rb_get_buffer_level(g_rbh, &n); + return n > 0; + } else { + if (m_armed && m_drs->GetBoard(m_board)->IsBusy() == 0) + return true; + return false; + } + } else + return m_running; +} + +/*------------------------------------------------------------------*/ + +bool Osci::HasTriggered() +{ + int i; + + if (m_drs->GetNumberOfBoards() > 0) { + if (m_multiBoard) // only first board can trigger + i = 0; + else + i = m_board; + if (m_running) + return m_drs->GetBoard(i)->IsEventAvailable() > 0; + if (m_single && m_armed) + return m_drs->GetBoard(i)->IsEventAvailable() > 0; + return false; + } + return true; +} + +/*------------------------------------------------------------------*/ + +bool Osci::IsIdle() +{ + if (m_thread) + return m_thread->IsIdle(); + return false; +} + +/*------------------------------------------------------------------*/ + +void Osci::ReadWaveforms() +{ +unsigned char *pdata; +unsigned short *p; +int size = 0; +DRSBoard * b; + + m_skipDisplay = false; + m_armed = false; + m_nBoards = 1; + + if (m_drs->GetNumberOfBoards() == 0) { + for (int w=0 ; w<4 ; w++) + for (int i=0 ; iGetBoard(m_board)->GetBoardType() == 3) { + // DRS2 Mezzanine Board 1 + m_drs->GetBoard(m_board)->TransferWaves(); + int tc = m_drs->GetBoard(m_board)->GetTriggerCell(chip); + + m_drs->GetBoard(m_board)->GetTime(chip, 0, m_samplingSpeed, tc, m_time[0][0], m_tcalon, m_rotated); + m_drs->GetBoard(m_board)->GetWave(chip, 0+ofs, m_waveform[0][0], m_calibrated, tc, !m_rotated); + m_drs->GetBoard(m_board)->GetWave(chip, 1+ofs, m_waveform[0][1], m_calibrated, tc, !m_rotated); + m_drs->GetBoard(m_board)->GetWave(chip, 2+ofs, m_waveform[0][2], m_calibrated, tc, !m_rotated); + if (m_clkOn) + m_drs->GetBoard(m_board)->GetWave(chip, 9, m_waveform[0][3], m_calibrated, tc, !m_rotated); + else + m_drs->GetBoard(m_board)->GetWave(chip, 3+ofs, m_waveform[0][3], m_calibrated, tc, !m_rotated); + } else if (m_drs->GetBoard(m_board)->GetBoardType() == 5 || m_drs->GetBoard(m_board)->GetBoardType() == 7 || + m_drs->GetBoard(m_board)->GetBoardType() == 8 || m_drs->GetBoard(m_board)->GetBoardType() == 9) { + + // DRS4 Evaluation Boards 1.1 + 3.0 + 4.0 + if (m_thread) { + // get waveforms from ring buffer + if (rb_get_rp(g_rbh, (void **)&pdata, 0) != RB_SUCCESS) + return; + + // transfer waveforms to buffer + size = m_drs->GetBoard(m_board)->GetWaveformBufferSize(); + p = (unsigned short *)pdata; + m_nBoards = *p++; // number of boards + + for (int i=0 ; iGetBoard(m_board)->TransferWaves(m_wavebuffer[0], 0, 8); + m_triggerCell[0] = m_drs->GetBoard(m_board)->GetStopCell(chip); + m_writeSR[0] = m_drs->GetBoard(m_board)->GetStopWSR(chip); + GetTimeStamp(m_evTimestamp); + } + + for (int i=0 ; i 1) + b = m_drs->GetBoard(i); + else + b = m_drs->GetBoard(m_board); + + // obtain time arrays + m_waveDepth = b->GetChannelDepth(); + + for (int w=0 ; w<4 ; w++) + b->GetTime(0, w*2, m_triggerCell[i], m_time[i][w], m_tcalon, m_rotated); + + if (m_clkOn && GetWaveformDepth(0) > kNumberOfBins) { + for (int j=0 ; jGetChannelCascading() == 2) { + b->GetWave(m_wavebuffer[i], 0, 0, m_waveform[i][0], m_calibrated, m_triggerCell[i], m_writeSR[i], !m_rotated, 0, m_calibrated2); + b->GetWave(m_wavebuffer[i], 0, 1, m_waveform[i][1], m_calibrated, m_triggerCell[i], m_writeSR[i], !m_rotated, 0, m_calibrated2); + b->GetWave(m_wavebuffer[i], 0, 2, m_waveform[i][2], m_calibrated, m_triggerCell[i], m_writeSR[i], !m_rotated, 0, m_calibrated2); + if (m_clkOn && b->GetBoardType() < 9) + b->GetWave(m_wavebuffer[i], 0, 8, m_waveform[i][3], m_calibrated, m_triggerCell[i], 0, !m_rotated); + else + b->GetWave(m_wavebuffer[i], 0, 3, m_waveform[i][3], m_calibrated, m_triggerCell[i], m_writeSR[i], !m_rotated, 0, m_calibrated2); + if (m_spikeRemoval) + RemoveSpikes(i, true); + } else { + b->GetWave(m_wavebuffer[i], 0, 0+ofs, m_waveform[i][0], m_calibrated, m_triggerCell[i], 0, !m_rotated, 0, m_calibrated2); + b->GetWave(m_wavebuffer[i], 0, 2+ofs, m_waveform[i][1], m_calibrated, m_triggerCell[i], 0, !m_rotated, 0, m_calibrated2); + b->GetWave(m_wavebuffer[i], 0, 4+ofs, m_waveform[i][2], m_calibrated, m_triggerCell[i], 0, !m_rotated, 0, m_calibrated2); + if (m_clkOn && b->GetBoardType() < 9) + b->GetWave(m_wavebuffer[i], 0, 8, m_waveform[i][3], m_calibrated, m_triggerCell[i], 0, !m_rotated); + else + b->GetWave(m_wavebuffer[i], 0, 6+ofs, m_waveform[i][3], m_calibrated, m_triggerCell[i], 0, !m_rotated, 0, m_calibrated2); + + if (m_spikeRemoval) + RemoveSpikes(i, false); + } + + // extrapolate the first two samples (are noisy) + for (int j=0 ; j<4 ; j++) { + m_waveform[i][j][1] = 2*m_waveform[i][j][2] - m_waveform[i][j][3]; + m_waveform[i][j][0] = 2*m_waveform[i][j][1] - m_waveform[i][j][2]; + } + + } + } else if (m_drs->GetBoard(m_board)->GetBoardType() == 6) { + // DRS4 Mezzanine Board 1 + m_drs->GetBoard(m_board)->TransferWaves(0, 8); + m_triggerCell[0] = m_drs->GetBoard(m_board)->GetStopCell(chip); + m_writeSR[0] = m_drs->GetBoard(m_board)->GetStopWSR(chip); + m_waveDepth = m_drs->GetBoard(m_board)->GetChannelDepth(); + + m_drs->GetBoard(m_board)->GetTime(chip, 0, m_samplingSpeed, m_triggerCell[0], m_time[0][0], m_tcalon, m_rotated); + if (m_clkOn && GetWaveformDepth(0) > kNumberOfBins) { + for (int i=0 ; iGetBoard(m_board)->GetChannelCascading() == 2) { + m_drs->GetBoard(m_board)->GetWave(chip, 0, m_waveform[0][0], m_calibrated, m_triggerCell[0], m_writeSR[0], !m_rotated, 0, m_calibrated2); + m_drs->GetBoard(m_board)->GetWave(chip, 1, m_waveform[0][1], m_calibrated, m_triggerCell[0], m_writeSR[0], !m_rotated, 0, m_calibrated2); + m_drs->GetBoard(m_board)->GetWave(chip, 2, m_waveform[0][2], m_calibrated, m_triggerCell[0], m_writeSR[0], !m_rotated, 0, m_calibrated2); + if (m_clkOn) + m_drs->GetBoard(m_board)->GetWave(chip, 8, m_waveform[0][3], m_calibrated, m_triggerCell[0], m_writeSR[0], !m_rotated); + else { + m_drs->GetBoard(m_board)->GetWave(chip, 3, m_waveform[0][3], m_calibrated, m_triggerCell[0], m_writeSR[0], !m_rotated, 0, m_calibrated2); + if (m_spikeRemoval) + RemoveSpikes(0, true); + } + } else { + m_drs->GetBoard(m_board)->GetWave(chip, 0+ofs, m_waveform[0][0], m_calibrated, m_triggerCell[0], 0, !m_rotated, 0, m_calibrated2); + m_drs->GetBoard(m_board)->GetWave(chip, 2+ofs, m_waveform[0][1], m_calibrated, m_triggerCell[0], 0, !m_rotated, 0, m_calibrated2); + m_drs->GetBoard(m_board)->GetWave(chip, 4+ofs, m_waveform[0][2], m_calibrated, m_triggerCell[0], 0, !m_rotated, 0, m_calibrated2); + if (m_clkOn) + m_drs->GetBoard(m_board)->GetWave(chip, 8, m_waveform[0][3], m_calibrated, m_triggerCell[0], 0, !m_rotated); + else { + m_drs->GetBoard(m_board)->GetWave(chip, 6+ofs, m_waveform[0][3], m_calibrated, m_triggerCell[0], 0, !m_rotated, 0, m_calibrated2); + if (m_spikeRemoval) + RemoveSpikes(0, false); + } + } + + /* extrapolate the first two samples (are noisy) */ + for (int i=0 ; i<4 ; i++) { + m_waveform[0][i][1] = 2*m_waveform[0][i][2] - m_waveform[0][i][3]; + m_waveform[0][i][0] = 2*m_waveform[0][i][1] - m_waveform[0][i][2]; + } + } + + } + + /* auto-restart in running mode */ + if (m_thread == NULL && m_running) + Start(); +} + +/*------------------------------------------------------------------*/ + +unsigned char buffer[100000]; + +int Osci::SaveWaveforms(MXML_WRITER *xml, int fd) +{ + char str[80], name[80]; + unsigned char *p; + unsigned short d; + float t; + int size; + static unsigned char *buffer; + static int buffer_size = 0; + + if (xml == NULL && fd == 0) + return 0; + + if (xml) { + mxml_start_element(xml, "Event"); + sprintf(str, "%d", m_evSerial); + mxml_write_element(xml, "Serial", str); + sprintf(str, "%4d/%02d/%02d %02d:%02d:%02d.%03d", m_evTimestamp.Year, m_evTimestamp.Month, + m_evTimestamp.Day, m_evTimestamp.Hour, m_evTimestamp.Minute, m_evTimestamp.Second, + m_evTimestamp.Milliseconds); + mxml_write_element(xml, "Time", str); + mxml_write_element(xml, "HUnit", "ns"); + mxml_write_element(xml, "VUnit", "mV"); + + for (int b=0 ; bGetBoard(b)->GetBoardSerialNumber()); + mxml_start_element(xml, str); + sprintf(str, "%d", m_triggerCell[b]); + mxml_write_element(xml, "Trigger_Cell", str); + for (int i=0 ; i<4 ; i++) { + if (m_chnOn[b][i]) { + sprintf(str, "%u", m_drs->GetBoard(b)->GetScaler(i)); + sprintf(name, "Scaler%d", i); + mxml_write_element(xml, name, str); + sprintf(str, "CHN%d", i+1); + mxml_start_element(xml, str); + strcpy(str, "\n"); + for (int j=0 ; jGetBoard(b)->GetBoardSerialNumber(); + p += sizeof(unsigned short); + + for (int i=0 ; i<4 ; i++) { + if (m_chnOn[b][i]) { + sprintf((char *)p, "C%03d", i+1); + p += 4; + float tcal[2048]; + m_drs->GetBoard(b)->GetTimeCalibration(0, i*2, 0, tcal, 0); + for (int j=0 ; jGetBoard(b)->GetBoardSerialNumber(); + p += sizeof(unsigned short); + + // store trigger cell + sprintf((char *)p, "T#"); + p += 2; + *(unsigned short *)p = m_triggerCell[b]; + p += sizeof(unsigned short); + + for (int i=0 ; i<4 ; i++) { + if (m_chnOn[b][i]) { + sprintf((char *)p, "C%03d", i+1); + p += 4; + + unsigned int s = m_drs->GetBoard(b)->GetScaler(i); + memcpy(p, &s, sizeof(int)); + p += sizeof(int); + + for (int j=0 ; jGetNumberOfBoards() == 0) { + m_samplingSpeed = freq; + return; + } + + for (int i=0 ; i< m_drs->GetNumberOfBoards() ; i++) { + DRSBoard *b = m_drs->GetBoard(i); + + b->SetFrequency(freq, true); + m_samplingSpeed = b->GetNominalFrequency(); + wxMilliSleep(10); + + if (b->GetDRSType() == 4 && !b->IsPLLLocked()) { + wxString str; + +#ifdef HAVE_VME + if (b->GetTransport() == 1) + str.Printf(wxT("PLLs did not lock on VME board slot %2d %s, serial #%d"), + (b->GetSlotNumber() >> 1)+2, ((b->GetSlotNumber() & 1) == 0) ? "upper" : "lower", + b->GetBoardSerialNumber()); + else +#endif + str.Printf(wxT("PLLs did not lock on USB board #%d, serial #%d"), + b->GetSlotNumber(), b->GetBoardSerialNumber()); + + wxMessageBox(str, wxT("DRS Oscilloscope Error"), wxOK | wxICON_STOP, NULL); + } + } +} + +/*------------------------------------------------------------------*/ + +double Osci::GetSamplingSpeed() +{ + if (m_drs->GetNumberOfBoards() > 0) { + DRSBoard *b = m_drs->GetBoard(m_board); + return b->GetNominalFrequency(); + } + return m_samplingSpeed; +} + +/*------------------------------------------------------------------*/ + +double Osci::GetTrueSamplingSpeed() +{ + if (m_drs->GetNumberOfBoards() > 0) + return m_drs->GetBoard(m_board)->GetTrueFrequency(); + return m_samplingSpeed; +} + +/*------------------------------------------------------------------*/ + +double Osci::GetMaxSamplingSpeed() +{ + for (int i=0 ; i< m_drs->GetNumberOfBoards() ; i++) + if (m_drs->GetBoard(i)->GetDRSType() == 2) + return 4; + return 5; +} + +/*------------------------------------------------------------------*/ + +double Osci::GetMinSamplingSpeed() +{ + for (int i=0 ; i< m_drs->GetNumberOfBoards() ; i++) + if (m_drs->GetBoard(i)->GetDRSType() == 4) { + if (m_drs->GetBoard(i)->GetBoardSerialNumber() == 2146 || + m_drs->GetBoard(i)->GetBoardSerialNumber() == 2205 || + m_drs->GetBoard(i)->GetBoardSerialNumber() == 2208) + return 0.5; // special modified boards for RFBeta & Slow Muons + return 0.7; + } + return 0.5; +} + +/*------------------------------------------------------------------*/ + +int Osci::GetWaveformDepth(int channel) +{ + if (channel == 3 && m_clkOn && m_waveDepth > kNumberOfBins) + return m_waveDepth - kNumberOfBins; // clock chnnael has only 1024 bins + + return m_waveDepth; +} + +/*------------------------------------------------------------------*/ + +float *Osci::GetTime(int b, int channel) +{ + if (m_drs->GetNumberOfBoards() > 0) { + if (m_drs->GetBoard(m_board)->GetBoardType() < 9) { + if (channel == 3 && m_clkOn) + return (float *)m_timeClk[b]; + } + } + + return (float *)m_time[b][channel]; +} + +/*------------------------------------------------------------------*/ + +bool Osci::IsTCalibrated(void) +{ + return m_drs->GetBoard(m_board)->IsTimingCalibrationValid(); +} + +/*------------------------------------------------------------------*/ + +bool Osci::IsVCalibrated(void) +{ + return m_drs->GetBoard(m_board)->IsVoltageCalibrationValid(); +} + +/*------------------------------------------------------------------*/ + +bool Osci::GetTimeCalibration(int chip, int channel, int mode, float *time, bool force) +{ + if (!force && !IsTCalibrated()) + return false; + + m_drs->GetBoard(m_board)->GetTimeCalibration(chip, channel, mode, time, force); + return true; +} + +/*------------------------------------------------------------------*/ + +void Osci::SetTriggerLevel(double level) +{ + m_trgLevel[0] = m_trgLevel[1] = m_trgLevel[2] = m_trgLevel[3] = level; + + // only change trigger of current board + if (m_drs->GetNumberOfBoards() > 0) + m_drs->GetBoard(m_board)->SetTriggerLevel(level); +} + +/*------------------------------------------------------------------*/ + +void Osci::SetTriggerPolarity(bool negative) +{ + m_trgNegative = negative; + + if (m_drs->GetNumberOfBoards() > 0) + m_drs->GetBoard(m_board)->SetTriggerPolarity(negative); +} + +/*------------------------------------------------------------------*/ + +void Osci::SetIndividualTriggerLevel(int channel, double level) +{ + m_trgLevel[channel] = level; + + if (m_drs->GetNumberOfBoards() > 0) + m_drs->GetBoard(m_board)->SetIndividualTriggerLevel(channel, level); +} + +/*------------------------------------------------------------------*/ + +void Osci::SetTriggerDelay(int delay) +{ + m_trgDelay = delay; + + if (m_drs->GetNumberOfBoards() > 0) + m_drs->GetBoard(m_board)->SetTriggerDelayPercent(delay); +} + +/*------------------------------------------------------------------*/ + +int Osci::GetTriggerDelay() +{ + if (m_drs->GetNumberOfBoards() > 0) + return m_drs->GetBoard(m_board)->GetTriggerDelay(); + else + return 0; +} + +/*------------------------------------------------------------------*/ + +double Osci::GetTriggerDelayNs() +{ + if (m_drs->GetNumberOfBoards() > 0) + return m_drs->GetBoard(m_board)->GetTriggerDelayNs(); + else + return 0; +} + +/*------------------------------------------------------------------*/ + +void Osci::SetTriggerSource(int source) +{ + m_trgSource[m_board] = source; + + if (m_drs->GetNumberOfBoards() > 0) { + if (m_drs->GetBoard(m_board)->GetBoardType() == 8 || m_drs->GetBoard(m_board)->GetBoardType() == 9) { + m_drs->GetBoard(m_board)->EnableTrigger(1, 0); // enable trigger + m_drs->GetBoard(m_board)->SetTriggerSource(1 << source); // simple or of single channel + } else { + if (source == 4) + m_drs->GetBoard(m_board)->EnableTrigger(1, 0); // external trigger + else { + m_drs->GetBoard(m_board)->EnableTrigger(0, 1); // analog trigger + m_drs->GetBoard(m_board)->SetTriggerSource(source); + } + } + } +} + +/*------------------------------------------------------------------*/ + +void Osci::SetTriggerConfig(int tc) +{ + if (m_drs->GetBoard(m_board)->GetBoardType() == 8 || m_drs->GetBoard(m_board)->GetBoardType() == 9) { + m_drs->GetBoard(m_board)->EnableTrigger(1, 0); // enable trigger + m_drs->GetBoard(m_board)->SetTriggerSource(tc); + } +} + +/*------------------------------------------------------------------*/ + +void Osci::SetChnOn(int board, int chn, bool flag) +{ + m_chnOn[board][chn] = flag; +} + +/*------------------------------------------------------------------*/ + +void Osci::SetClkOn(bool flag) +{ + m_clkOn = flag; + for (int i=0 ; i< m_drs->GetNumberOfBoards() ; i++) { + m_drs->GetBoard(i)->EnableTcal(flag ? 1 : 0, 0); + if (m_drs->GetBoard(i)->GetBoardType() == 5 || m_drs->GetBoard(i)->GetBoardType() == 7 || + m_drs->GetBoard(i)->GetBoardType() == 8 || m_drs->GetBoard(i)->GetBoardType() == 9) + m_drs->GetBoard(i)->SelectClockSource(0); // select sync. clock + } +} + +/*------------------------------------------------------------------*/ + +void Osci::SetRefclk(int board, bool flag) +{ + m_refClk[board] = flag; + // only change clock of current board and not all boards to allow daisy-chaining + if (m_drs->GetNumberOfBoards()) { + if (m_drs->GetBoard(board)->GetBoardType() == 6 || + m_drs->GetBoard(board)->GetBoardType() == 8 || + m_drs->GetBoard(board)->GetBoardType() == 9) + m_drs->GetBoard(board)->SetRefclk(flag); + } +} + +/*------------------------------------------------------------------*/ + +void Osci::SetCalibVoltage(bool flag, double voltage) +{ + m_calibOn = flag; + for (int i=0 ; i< m_drs->GetNumberOfBoards() ; i++) + m_drs->GetBoard(i)->EnableAcal(flag, voltage); +} + +/*------------------------------------------------------------------*/ + +void Osci::SetInputRange(double center) +{ + m_inputRange = center; + for (int i=0 ; i< m_drs->GetNumberOfBoards() ; i++) + m_drs->GetBoard(i)->SetInputRange(center); +} + +/*------------------------------------------------------------------*/ + +double Osci::GetCalibratedInputRange() +{ + return m_drs->GetBoard(m_board)->GetCalibratedInputRange(); +} + +/*------------------------------------------------------------------*/ + +unsigned int Osci::GetScaler(int channel) +{ + if (m_drs->GetNumberOfBoards() > 0) + return m_drs->GetBoard(m_board)->GetScaler(channel); + return 0; +} + +/*------------------------------------------------------------------*/ + +void Osci::CorrectTriggerPoint(double t) +{ + int i, n, min_i; + double min_dt, dt, t0, t1, trigPoint[2*kNumberOfBins]; + float *pt; + + /*---- shift first channel according to trigger point ----*/ + + if (m_trgSource[0] == 3 && m_clkOn) + pt = m_timeClk[0]; + else + pt = m_time[0][m_trgSource[0]]; + + if (m_trgSource[0] < 4) { + // search and store all points + for (i = n = 0 ; i= m_trgLevel[m_trgSource[0]]*1000 && + m_waveform[0][m_trgSource[0]][i+1] < m_trgLevel[m_trgSource[0]]*1000) { + + dt = pt[i+1] - pt[i]; + dt = dt * 1 / (1 + (m_trgLevel[m_trgSource[0]]*1000-m_waveform[0][m_trgSource[0]][i+1])/(m_waveform[0][m_trgSource[0]][i]-m_trgLevel[m_trgSource[0]]*1000)); + trigPoint[n++] = pt[i] + dt; + } + } else { + if (m_waveform[0][m_trgSource[0]][i] <= m_trgLevel[m_trgSource[0]]*1000 && + m_waveform[0][m_trgSource[0]][i+1] > m_trgLevel[m_trgSource[0]]*1000) { + + dt = pt[i+1] - pt[i]; + dt = dt * 1 / (1 + (m_waveform[0][m_trgSource[0]][i+1]-m_trgLevel[m_trgSource[0]]*1000)/(m_trgLevel[m_trgSource[0]]*1000-m_waveform[0][m_trgSource[0]][i])); + trigPoint[n++] = pt[i] + dt; + } + } + } + + if (n > 2) { + /* search trigger point closest to trigger in case of many trigger points (like a sine wave) */ + min_dt = 1e6; + min_i = -1; + for (i=0 ; i 0) { + dt = trigPoint[min_i] - t; + + for (int b=0 ; bGetBoard(0)->GetTrueFrequency(); + + for (int w=0 ; w<4 ; w++) + for (i=0 ; i 20) { + if (n_sp[i] < 10) // record maximum of 10 spikes + sp[i][n_sp[i]++] = j; + else + return; // too many spikes -> something wrong + spos[j]++; + } + if (-wf[i][j]+wf[i][(j+1) % 1024]+wf[i][(j+2) % 1024]-wf[i][(j+3) % 1024] < -20) { + if (n_sp[i] < 10) // record maximum of 10 spikes + sp[i][n_sp[i]++] = j; + else + return; // too many spikes -> something wrong + spos[j]++; + } + } + } + + /* find spikes at cell #0 and #1023 */ + for (i=0 ; i 20) { + if (n_sp[i] < 10) + sp[i][n_sp[i]++] = 0; + } + if (-2*wf[i][1021]+wf[i][1022]+wf[i][1023] > 20) { + if (n_sp[i] < 10) + sp[i][n_sp[i]++] = 1020; + } + } + + /* go through all spikes and look for symmetric spikes and neighbors */ + for (i=0 ; i= 2) { + /* if at least two matching spikes, treat this as a real spike */ + for (k=0 ; k rot_sp[k+1] ? rot_sp[k+1] : rot_sp[k]; + x = m_waveform[b][c][ofs+(j+1) % 1024]; + y = m_waveform[b][c][ofs+(j+6) % 1024]; + if (fabs(x-y) < 15) { + m_waveform[b][c][ofs+(j+2) % 1024] = x + 1*(y-x)/5; + m_waveform[b][c][ofs+(j+3) % 1024] = x + 2*(y-x)/5; + m_waveform[b][c][ofs+(j+4) % 1024] = x + 3*(y-x)/5; + m_waveform[b][c][ofs+(j+5) % 1024] = x + 4*(y-x)/5; + } else { + m_waveform[b][c][ofs+(j+2) % 1024] -= 14.8f; + m_waveform[b][c][ofs+(j+3) % 1024] -= 14.8f; + m_waveform[b][c][ofs+(j+4) % 1024] -= 14.8f; + m_waveform[b][c][ofs+(j+5) % 1024] -= 14.8f; + } + } else { + /* remove single spike */ + x = m_waveform[b][c][ofs+rot_sp[k]]; + y = m_waveform[b][c][ofs+(rot_sp[k]+3) % 1024]; + + if (fabs(x-y) < 15) { + m_waveform[b][c][ofs+(rot_sp[k]+1) % 1024] = x + 1*(y-x)/3; + m_waveform[b][c][ofs+(rot_sp[k]+2) % 1024] = x + 2*(y-x)/3; + } else { + m_waveform[b][c][ofs+(rot_sp[k]+1) % 1024] -= 14.8f; + m_waveform[b][c][ofs+(rot_sp[k]+2) % 1024] -= 14.8f; + } + } + } + if (k < n_rsp-1 && rsp[k] == 0 && rsp[k+1] == 1020) + k++; // skip second half of double spike + } + + /* uncomment to show unfixed spikes + m_skipDisplay = true; + for (i=0 ; i<1024 ; i++) + for (j=0 ; j 10 || m_waveform[j][i] < -10) { + m_skipDisplay = false; + break; + } + } + */ +} + +/*------------------------------------------------------------------*/ diff --git a/software/drsosc/Osci.h b/software/drsosc/Osci.h new file mode 100644 index 0000000..98bde65 --- /dev/null +++ b/software/drsosc/Osci.h @@ -0,0 +1,171 @@ +/* + * Osci.h + * DRS oscilloscope header file + * $Id: Osci.h 21496 2014-09-26 14:55:49Z ritt $ + */ + +typedef struct { + unsigned short Year; + unsigned short Month; + unsigned short Day; + unsigned short Hour; + unsigned short Minute; + unsigned short Second; + unsigned short Milliseconds; +} TIMESTAMP; + +#define TM_AUTO 0 +#define TM_NORMAL 1 + +/*------------------------------------------------------------------*/ + +class Osci; + +class OsciThread : public wxThread +{ +public: + OsciThread(Osci *o); + bool IsIdle(); + void *Entry(); + void ResetSW(); + void Enable(bool flag); + void StopThread(); + bool IsFinished() { return m_finished; } + +private: + Osci *m_osci; + wxStopWatch m_sw1, m_sw2; + bool m_enabled; + bool m_active; + bool m_finished; + bool m_stopThread; +}; + +/*------------------------------------------------------------------*/ + +class Osci +{ +public: + Osci(double samplingSpeed = 5, bool mthread = true); + ~Osci(); + void StopThread(void); + int ScanBoards(); + int GetNumberOfBoards() { return m_drs->GetNumberOfBoards(); } + DRSBoard *GetBoard(int i) { return m_drs->GetBoard(i); } + DRSBoard *GetCurrentBoard() { return m_drs->GetBoard(m_board); } + int GetCurrentBoardIndex() { return m_board; } + DRS *GetDRS() { return m_drs; } + bool GetError(char *str, int size) { return m_drs->GetError(str, size); } + void CheckTimingCalibration(); + void SelectBoard(int board); + void SelectChannel(int firstChannel, int chnSection); + void SetMultiBoard(bool multi); + bool IsMultiBoard() { return m_multiBoard; } + void SetRunning(bool flag); + void Enable(bool flag); + bool IsRunning() { return m_running; } + void SetSingle(bool flag); + bool IsSingle() { return m_single; } + void SetArmed(bool flag) { m_armed = flag; } + bool IsArmed() { return m_armed; } + bool IsIdle(); + int GetWaveformDepth(int channel); + double GetWaveformLength() { return m_waveDepth / GetSamplingSpeed(); } + float *GetWaveform(int b, int i) { return (float *)m_waveform[b][i]; } + float *GetTime(int board, int channel); + int GetChip() { return m_chip; } + void SetSamplingSpeed(double freq); + double GetSamplingSpeed(); + double GetTrueSamplingSpeed(); + double GetMinSamplingSpeed(); + double GetMaxSamplingSpeed(); + bool IsTCalibrated(); + bool IsVCalibrated(); + bool GetTimeCalibration(int chip, int channel, int mode, float *time, bool force=false); + void Start(); + void Stop(); + void DrainEvents(); + void SingleTrigger(); + void ReadWaveforms(); + int SaveWaveforms(MXML_WRITER *, int); + bool HasTriggered(); + bool HasNewEvent(); + void SetTriggerLevel(double level); + void SetTriggerPolarity(bool negative); + void SetIndividualTriggerLevel(int i, double level); + void SetTriggerDelay(int delay); + int GetTriggerDelay(); + double GetTriggerDelayNs(); + void SetTriggerMode(int mode) { m_trgMode = mode; } + int GetTriggerMode() { return m_trgMode; } + void SetTriggerSource(int source); + int GetTriggerSource() { return m_trgSource[m_board]; } + void SetTriggerConfig(int tc); + void SetRefclk(int board, bool flag); + void SetChnOn(int board, int chn, bool flag); + void SetClkOn(bool flag); + void SetEventSerial(int serial) { m_evSerial = serial; } + void SetCalibVoltage(bool flag, double voltage); + void SetInputRange(double center); + double GetInputRange() { return m_inputRange; } + double GetCalibratedInputRange(); + unsigned int GetScaler(int channel); + void SetCalibrated(bool flag) { m_calibrated = flag; } + void SetCalibrated2(bool flag) { m_calibrated2 = flag; } + void SetTCalOn(bool flag) { m_tcalon = flag; } + bool IsTCalOn() { return m_tcalon; } + void SetRotated(bool flag) { m_rotated = flag; } + void SetSpikeRemoval(bool flag) { m_spikeRemoval = flag; } + void CorrectTriggerPoint(double t); + void RemoveSpikes(int board, bool cascading); + int CheckWaveforms(); + bool SkipDisplay(void) { return m_skipDisplay; } + int GetChnSection(void) { return m_chnSection; } + char *GetDebugMsg(void) { return m_debugMsg; } + +private: + DRS *m_drs; + OsciThread *m_thread; + bool m_running; + bool m_single; + bool m_armed; + double m_samplingSpeed; + int m_nBoards; + float m_waveform[MAX_N_BOARDS][4][2048]; + float m_refwaveform[2048]; + unsigned char m_wavebuffer[MAX_N_BOARDS][9*1024*2]; + float m_time[MAX_N_BOARDS][4][2048]; + float m_timeClk[MAX_N_BOARDS][1024]; + int m_triggerCell[MAX_N_BOARDS]; + int m_writeSR[MAX_N_BOARDS]; + int m_boardSerial[MAX_N_BOARDS]; + int m_waveDepth; + int m_trgMode; + int m_trgSource[MAX_N_BOARDS]; + bool m_trgNegative; + int m_trgDelay; + double m_trgLevel[4]; + bool m_chnOn[MAX_N_BOARDS][4]; + bool m_clkOn; + bool m_refClk[MAX_N_BOARDS]; + bool m_calibOn; + int m_evSerial; + TIMESTAMP m_evTimestamp; + bool m_calibrated; + bool m_calibrated2; + bool m_tcalon; + bool m_rotated; + int m_nDRS; + int m_board; + int m_chip; + int m_chnOffset; + int m_chnSection; + bool m_spikeRemoval; + double m_inputRange; + bool m_skipDisplay; + bool m_multiBoard; + char m_debugMsg[256]; +}; + +/*------------------------------------------------------------------*/ + diff --git a/software/drsosc/TriggerDialog.cpp b/software/drsosc/TriggerDialog.cpp new file mode 100644 index 0000000..04fb18e --- /dev/null +++ b/software/drsosc/TriggerDialog.cpp @@ -0,0 +1,141 @@ +/* + * TriggerDialog.cpp + * Modal Trigger Configuration Dialog class + * $Id: TriggerDialog.cpp 22292 2016-04-28 10:31:04Z ritt $ + */ + +#include "DRSOscInc.h" + +TriggerDialog::TriggerDialog( wxWindow* parent ) +: +TriggerDialog_fb( parent ) +{ + m_frame = (DOFrame *)parent; + m_board = 0; + + UpdateControls(); +} + +void TriggerDialog::UpdateControls() +{ + if (!m_frame->IsTrgConfigEnabled()) { + m_cbOR1->Disable(); + m_cbOR2->Disable(); + m_cbOR3->Disable(); + m_cbOR4->Disable(); + m_cbOREXT->Disable(); + + m_cbAND1->Disable(); + m_cbAND2->Disable(); + m_cbAND3->Disable(); + m_cbAND4->Disable(); + m_cbANDEXT->Disable(); + + m_cbTrans->Disable(); + + m_tbLevel1->Disable(); + m_tbLevel2->Disable(); + m_tbLevel3->Disable(); + m_tbLevel4->Disable(); + } else { + m_cbOR1->Enable(); + m_cbOR2->Enable(); + m_cbOR3->Enable(); + m_cbOR4->Enable(); + m_cbOREXT->Enable(); + + m_cbAND1->Enable(); + m_cbAND2->Enable(); + m_cbAND3->Enable(); + m_cbAND4->Enable(); + m_cbANDEXT->Enable(); + + m_cbTrans->Enable(); + + m_tbLevel1->Enable(); + m_tbLevel2->Enable(); + m_tbLevel3->Enable(); + m_tbLevel4->Enable(); + + int tc = m_frame->GetTriggerConfig(); + m_cbOR1->SetValue((tc & (1<<0))>0); + m_cbOR2->SetValue((tc & (1<<1))>0); + m_cbOR3->SetValue((tc & (1<<2))>0); + m_cbOR4->SetValue((tc & (1<<3))>0); + m_cbOREXT->SetValue((tc & (1<<4))>0); + + m_cbAND1->SetValue((tc & (1<<8))>0); + m_cbAND2->SetValue((tc & (1<<9))>0); + m_cbAND3->SetValue((tc & (1<<10))>0); + m_cbAND4->SetValue((tc & (1<<11))>0); + m_cbANDEXT->SetValue((tc & (1<<12))>0); + + m_cbTrans->SetValue((tc & (1<<15))>0); + + wxString s; + s.Printf(wxT("%1.3lf"), m_frame->GetTrgLevel(0)); + m_tbLevel1->SetValue(s); + s.Printf(wxT("%1.3lf"), m_frame->GetTrgLevel(1)); + m_tbLevel2->SetValue(s); + s.Printf(wxT("%1.3lf"), m_frame->GetTrgLevel(2)); + m_tbLevel3->SetValue(s); + s.Printf(wxT("%1.3lf"), m_frame->GetTrgLevel(3)); + m_tbLevel4->SetValue(s); + } +} + +void TriggerDialog::OnClose( wxCommandEvent& event ) +{ + this->Hide(); +} + +void TriggerDialog::OnButton( wxCommandEvent& event ) +{ + if (event.GetId() == ID_TRANS) { + DRSBoard *b = m_frame->GetOsci()->GetCurrentBoard(); + if (b->GetFirmwareVersion() < 21699) { + wxMessageBox(wxT("For this operation a boards with firmware\nrevision >= 21699 is required"), + wxT("DRS Oscilloscope"), wxOK | wxICON_STOP, this); + m_cbTrans->SetValue(false); + return; + } + if (event.IsChecked()) { + m_cbOREXT->SetValue(false); + m_cbOREXT->Disable(); + m_cbANDEXT->SetValue(false); + m_cbANDEXT->Disable(); + } else { + m_cbOREXT->Enable(); + m_cbANDEXT->Enable(); + } + } + m_frame->SetTriggerConfig(event.GetId(), event.IsChecked()); +} + +void TriggerDialog::OnTriggerLevel( wxCommandEvent& event ) +{ + if (event.GetId() == ID_LEVEL1) + m_frame->SetTrgLevel(0, atof(m_tbLevel1->GetValue().mb_str())); + if (event.GetId() == ID_LEVEL2) + m_frame->SetTrgLevel(1, atof(m_tbLevel2->GetValue().mb_str())); + if (event.GetId() == ID_LEVEL3) + m_frame->SetTrgLevel(2, atof(m_tbLevel3->GetValue().mb_str())); + if (event.GetId() == ID_LEVEL4) + m_frame->SetTrgLevel(3, atof(m_tbLevel4->GetValue().mb_str())); +} + +void TriggerDialog::SetTriggerLevel(double level) +{ + wxString s; + s.Printf(wxT("%1.3lf"), level); + m_tbLevel1->SetValue(s); + m_tbLevel2->SetValue(s); + m_tbLevel3->SetValue(s); + m_tbLevel4->SetValue(s); +} + +void TriggerDialog::SelectBoard(int board) +{ + m_board = board; + UpdateControls(); +} diff --git a/software/drsosc/TriggerDialog.h b/software/drsosc/TriggerDialog.h new file mode 100644 index 0000000..c384f78 --- /dev/null +++ b/software/drsosc/TriggerDialog.h @@ -0,0 +1,34 @@ +#ifndef __TriggerDialog__ +#define __TriggerDialog__ + +/* +$Id: TriggerDialog.h 22292 2016-04-28 10:31:04Z ritt $ +*/ + +class DOFrame; + +#include "DRSOsc.h" + +/** Implementing TriggerDialog_fb */ +class TriggerDialog : public TriggerDialog_fb +{ +protected: + // Handlers for TriggerDialog_fb events. + void OnClose( wxCommandEvent& event ); + void OnButton( wxCommandEvent& event ); + void OnTriggerLevel( wxCommandEvent& event ); + +public: + /** Constructor */ + TriggerDialog( wxWindow* parent ); + + void SetTriggerLevel(double level); + void SelectBoard(int board); + +private: + DOFrame *m_frame; + int m_board; + void UpdateControls(); +}; + +#endif // __TriggerDialog__ diff --git a/software/drsosc/dist.csv b/software/drsosc/dist.csv new file mode 100644 index 0000000..74b8887 --- /dev/null +++ b/software/drsosc/dist.csv @@ -0,0 +1,4097 @@ +X, Y, Z, Min, Max, Ave, Sigma +0,0, 0, -18.5, 12.8, -1.3, 7.787, +0,0, 1, -23.7, 10.9, -1.1, 7.918, +0,0, 2, -23.4, 11.7, -1.8, 8.466, +0,0, 3, -24.6, 9.7, -2.4, 8.850, +0,0, 4, -19.4, 9.6, -1.8, 7.245, +0,0, 5, -24.9, 8.8, -2.1, 8.044, +0,0, 6, -21.1, 17.1, -0.7, 8.550, +0,0, 7, -24.9, 10.2, -1.7, 8.242, +0,0, 8, -20.8, 17.4, -0.9, 8.057, +0,0, 9, -23.8, 10.1, -2.1, 8.908, +0,0, 10, -18.7, 12.7, -1.1, 8.043, +0,0, 11, -24.5, 10.5, -2.5, 9.072, +0,0, 12, -19.9, 11.9, -1.3, 7.380, +0,0, 13, -22.4, 8.7, -2.1, 7.172, +0,0, 14, -20.8, 12.5, -1.2, 9.187, +0,0, 15, -29.5, 24.9, -1.5, 9.552, +0,0, 16, -19.9, 10.9, -1.8, 7.765, +0,0, 17, -24.6, 13.7, -1.9, 8.467, +0,0, 18, -19.3, 11.4, -1.3, 7.678, +0,0, 19, -25.0, 9.7, -2.3, 8.907, +0,0, 20, -19.7, 11.6, -1.1, 8.081, +0,0, 21, -24.3, 10.3, -2.4, 8.162, +0,0, 22, -17.9, 10.5, -1.9, 7.098, +0,0, 23, -24.7, 10.7, -2.0, 8.428, +0,0, 24, -18.0, 9.8, -1.6, 7.065, +0,0, 25, -25.3, 8.5, -3.5, 9.245, +0,0, 26, -18.4, 11.1, -1.4, 7.637, +0,0, 27, -18.5, 10.6, -1.6, 7.512, +0,0, 28, -18.0, 11.2, -1.5, 7.566, +0,0, 29, -23.7, 10.5, -2.6, 8.260, +0,0, 30, -19.6, 9.8, -1.8, 7.634, +0,0, 31, -24.6, 10.0, -1.6, 7.685, +0,0, 32, -19.1, 11.5, -1.5, 7.958, +0,0, 33, -23.8, 9.7, -1.9, 7.948, +0,0, 34, -20.2, 10.1, -1.5, 7.228, +0,0, 35, -23.8, 9.6, -2.9, 8.638, +0,0, 36, -18.8, 9.3, -2.2, 7.021, +0,0, 37, -24.5, 9.3, -2.0, 7.840, +0,0, 38, -20.5, 11.5, -1.4, 7.856, +0,0, 39, -25.3, 8.5, -2.9, 8.204, +0,0, 40, -18.8, 10.2, -1.3, 7.310, +0,0, 41, -21.9, 10.4, -2.6, 8.672, +0,0, 42, -19.1, 11.3, -1.4, 7.376, +0,0, 43, -23.3, 10.2, -1.2, 7.630, +0,0, 44, -18.4, 15.5, -1.3, 8.480, +0,0, 45, -28.4, 9.5, -3.1, 7.621, +0,0, 46, -21.0, 11.8, -1.3, 8.114, +0,0, 47, -21.4, 13.8, -0.7, 7.726, +0,0, 48, -19.3, 8.9, -2.1, 6.968, +0,0, 49, -23.2, 13.3, -1.7, 8.391, +0,0, 50, -21.0, 7.5, -2.3, 6.693, +0,0, 51, -25.8, 8.3, -2.5, 8.086, +0,0, 52, -20.4, 10.7, -1.5, 8.026, +0,0, 53, -21.7, 9.1, -1.5, 7.282, +0,0, 54, -19.9, 12.1, -0.9, 7.833, +0,0, 55, -26.2, 9.1, -2.8, 7.987, +0,0, 56, -20.2, 12.6, -0.8, 7.580, +0,0, 57, -24.7, 8.7, -2.4, 8.312, +0,0, 58, -21.3, 11.0, -1.1, 7.915, +0,0, 59, -24.3, 11.0, -1.9, 7.798, +0,0, 60, -16.5, 11.5, -1.1, 7.198, +0,0, 61, -25.2, 11.6, -2.5, 7.937, +0,0, 62, -17.3, 15.8, -1.0, 7.099, +0,0, 63, -26.1, 13.5, -1.7, 8.263, +0,0, 64, -22.5, 12.3, -1.5, 7.648, +0,0, 65, -24.0, 11.0, -1.6, 8.318, +0,0, 66, -18.3, 8.5, -1.5, 7.130, +0,0, 67, -25.7, 8.5, -2.1, 7.900, +0,0, 68, -21.3, 10.8, -1.7, 7.921, +0,0, 69, -33.3, 21.3, -2.3, 9.164, -33.3,-28.0,-26.8,-24.8,-24.3,-20.5,-19.7,-19.1,-18.3,-18.0,-17.5,-16.4,-14.9,-14.5,-14.2,-13.1,-13.1,-12.8,-12.0,-11.9,-11.2,-11.0,-10.9,-10.9,-10.5,-10.4,-9.7,-9.4,-9.1,-9.0,-8.9,-8.9,-8.3,-7.4,-7.1,-7.1,-6.9,-6.8,-6.7,-6.7,-6.0,-5.7,-5.1,-4.9,-4.8,-4.7,-4.5,-4.3,-4.1,-3.1,-3.0,-2.8,-2.5,-2.5,-2.5,-1.8,-1.8,-1.5,-1.3,-1.2,-0.9,-0.8,-0.3,0.0,0.0,0.0,0.0,0.1,0.7,1.0,1.2,1.2,1.2,1.2,1.3,1.3,1.6,2.2,2.2,2.4,2.5,2.5,2.6,2.6,2.6,2.7,2.9,2.9,3.0,3.0,3.0,3.2,3.2,3.3,3.7,3.7,3.7,3.8,4.3,4.4,4.6,4.9,4.9,5.0,5.7,5.8,5.8,5.9,6.0,6.0,6.0,6.2,6.4,6.5,6.5,6.5,6.6,6.7,6.7,6.9,7.0,7.3,7.6,7.6,7.7,8.4,8.4,8.5,8.8,9.0,10.5,21.3, +0,0, 70, -20.2, 13.3, -0.7, 7.949, +0,0, 71, -25.2, 17.3, -1.8, 8.409, +0,0, 72, -20.2, 9.9, -1.5, 7.539, +0,0, 73, -23.8, 9.2, -2.4, 7.909, +0,0, 74, -19.5, 12.3, -0.8, 8.208, +0,0, 75, -25.7, 10.5, -1.8, 8.750, +0,0, 76, -20.2, 10.1, -1.8, 7.571, +0,0, 77, -24.2, 8.2, -2.6, 7.441, +0,0, 78, -18.0, 12.0, -0.4, 7.245, +0,0, 79, -25.4, 8.8, -2.4, 8.394, +0,0, 80, -20.1, 11.0, -0.9, 7.752, +0,0, 81, -25.8, 10.2, -2.2, 8.460, +0,0, 82, -22.0, 10.2, -1.6, 7.890, +0,0, 83, -25.3, 8.8, -2.4, 7.612, +0,0, 84, -18.7, 11.4, -0.7, 6.302, +0,0, 85, -23.3, 8.7, -2.1, 8.065, +0,0, 86, -17.0, 12.1, -0.6, 7.099, +0,0, 87, -26.4, 10.1, -2.2, 7.928, +0,0, 88, -16.9, 12.8, -0.8, 7.932, +0,0, 89, -25.2, 9.5, -2.0, 8.086, +0,0, 90, -21.3, 11.1, -1.5, 7.976, +0,0, 91, -22.8, 10.2, -1.8, 8.125, +0,0, 92, -21.3, 11.5, -2.3, 8.034, +0,0, 93, -24.9, 6.4, -3.2, 7.157, +0,0, 94, -18.6, 12.5, -0.4, 7.408, +0,0, 95, -24.3, 8.7, -1.7, 7.925, +0,0, 96, -19.7, 10.3, -1.8, 7.764, +0,0, 97, -21.7, 12.4, -1.0, 8.206, +0,0, 98, -19.0, 11.7, -1.1, 7.132, +0,0, 99, -26.1, 9.0, -2.1, 8.189, +0,0, 100, -20.1, 12.3, -1.0, 7.002, +0,0, 101, -24.0, 12.2, -2.4, 7.979, +0,0, 102, -17.3, 17.7, -0.2, 8.194, +0,0, 103, -26.0, 8.6, -2.4, 7.693, +0,0, 104, -18.6, 10.4, -1.1, 7.419, +0,0, 105, -27.0, 10.8, -2.4, 9.136, +0,0, 106, -19.4, 10.1, -1.2, 7.305, +0,0, 107, -22.7, 8.9, -2.6, 7.793, +0,0, 108, -19.9, 10.6, -1.7, 7.882, +0,0, 109, -24.1, 8.8, -1.5, 6.969, +0,0, 110, -18.0, 11.8, -1.0, 7.827, +0,0, 111, -25.1, 7.4, -2.8, 8.498, +0,0, 112, -22.5, 11.5, -1.4, 7.766, +0,0, 113, -21.0, 8.9, -1.3, 6.804, +0,0, 114, -20.3, 10.9, -2.0, 7.900, +0,0, 115, -24.9, 10.6, -2.3, 7.571, +0,0, 116, -18.1, 14.8, -1.0, 7.056, +0,0, 117, -28.9, 9.5, -2.2, 8.255, +0,0, 118, -17.5, 14.9, -1.4, 7.577, +0,0, 119, -26.2, 8.8, -2.1, 7.377, +0,0, 120, -20.3, 13.3, -0.9, 8.680, +0,0, 121, -22.8, 8.8, -2.7, 8.258, +0,0, 122, -19.7, 10.6, -0.8, 7.369, +0,0, 123, -26.6, 19.8, -1.8, 8.947, +0,0, 124, -18.1, 10.4, -1.3, 7.357, +0,0, 125, -29.5, 12.3, -2.5, 8.079, +0,0, 126, -20.9, 11.5, -1.2, 7.458, +0,0, 127, -28.2, 7.6, -3.2, 8.732, +0,0, 128, -21.8, 10.4, -2.0, 7.755, +0,0, 129, -21.3, 11.0, -1.3, 7.889, +0,0, 130, -17.8, 7.7, -1.7, 6.466, +0,0, 131, -25.4, 11.1, -1.5, 8.260, +0,0, 132, -20.8, 9.8, -1.8, 7.620, +0,0, 133, -25.2, 8.4, -2.5, 8.913, +0,0, 134, -22.4, 12.4, -1.8, 8.171, +0,0, 135, -25.6, 9.0, -2.2, 7.399, +0,0, 136, -21.6, 11.8, -1.3, 8.402, +0,0, 137, -23.0, 12.3, -2.1, 8.427, +0,0, 138, -17.6, 10.4, -1.2, 7.646, +0,0, 139, -25.4, 8.6, -2.9, 8.573, +0,0, 140, -19.6, 11.9, -1.7, 8.172, +0,0, 141, -25.3, 10.9, -1.3, 8.239, +0,0, 142, -19.0, 12.6, -0.2, 7.151, +0,0, 143, -25.1, 9.2, -2.5, 8.843, +0,0, 144, -19.1, 10.5, -1.8, 7.603, +0,0, 145, -23.5, 10.9, -1.3, 7.573, +0,0, 146, -21.8, 10.3, -1.8, 7.695, +0,0, 147, -23.7, 9.7, -2.1, 7.912, +0,0, 148, -17.8, 10.7, -1.4, 7.555, +0,0, 149, -27.5, 8.6, -2.3, 8.581, +0,0, 150, -20.8, 11.5, -1.3, 7.829, +0,0, 151, -24.9, 11.1, -2.1, 7.556, +0,0, 152, -19.8, 15.5, -1.2, 7.983, +0,0, 153, -25.3, 10.2, -2.0, 8.170, +0,0, 154, -21.4, 12.0, -1.1, 7.874, +0,0, 155, -24.1, 8.9, -2.5, 8.174, +0,0, 156, -21.8, 12.1, -1.4, 7.953, +0,0, 157, -22.5, 9.9, -1.6, 7.544, +0,0, 158, -17.7, 8.7, -1.1, 5.732, +0,0, 159, -27.0, 9.7, -2.4, 8.291, +0,0, 160, -19.8, 12.1, -1.3, 7.952, +0,0, 161, -25.9, 9.3, -2.4, 8.063, +0,0, 162, -20.9, 9.8, -2.4, 7.844, +0,0, 163, -27.5, 11.2, -1.9, 8.347, +0,0, 164, -20.7, 11.7, -1.7, 8.726, +0,0, 165, -24.8, 10.1, -1.8, 8.622, +0,0, 166, -21.7, 10.1, -1.9, 7.716, +0,0, 167, -24.8, 10.2, -2.2, 7.619, +0,0, 168, -19.6, 11.6, -1.2, 8.140, +0,0, 169, -24.3, 12.6, -1.4, 8.541, +0,0, 170, -19.3, 8.3, -1.8, 6.804, +0,0, 171, -24.2, 9.1, -2.3, 8.208, +0,0, 172, -18.1, 12.5, -1.8, 7.838, +0,0, 173, -24.2, 9.8, -2.1, 7.671, +0,0, 174, -19.7, 10.2, -1.2, 6.712, +0,0, 175, -23.4, 9.4, -2.1, 8.392, +0,0, 176, -17.3, 11.4, -0.7, 7.002, +0,0, 177, -32.1, 18.7, -2.3, 8.392, -32.1,-23.8,-22.9,-21.7,-19.6,-17.8,-16.4,-15.9,-15.6,-15.2,-14.7,-14.4,-13.8,-13.7,-13.5,-13.4,-13.0,-12.8,-12.7,-12.4,-12.4,-12.0,-11.2,-10.5,-10.5,-10.1,-9.8,-9.6,-9.5,-8.8,-8.2,-7.7,-7.7,-6.8,-6.7,-6.7,-6.1,-6.1,-5.0,-4.6,-4.6,-4.6,-4.6,-4.4,-4.1,-4.1,-3.6,-3.6,-3.1,-3.0,-2.5,-2.5,-2.4,-2.4,-2.4,-1.9,-1.8,-1.7,-1.6,-1.1,-1.1,-0.9,-0.6,-0.4,-0.2,0.0,0.1,0.1,0.5,0.5,0.7,0.7,0.8,1.1,1.1,1.2,1.3,1.3,1.4,1.4,1.6,1.7,1.8,1.9,2.0,2.1,2.1,2.2,2.2,2.2,2.3,2.4,2.6,2.7,2.7,2.8,3.2,3.4,3.6,3.6,3.6,3.7,3.8,3.8,3.9,4.7,4.8,4.9,5.2,5.5,5.6,5.6,5.8,5.8,6.0,6.1,6.3,6.7,6.8,7.0,7.2,7.3,7.4,7.5,7.9,8.6,8.9,9.1,18.5,18.7, +0,0, 178, -17.0, 12.0, -1.1, 7.696, +0,0, 179, -29.1, 18.5, -1.3, 8.498, +0,0, 180, -20.9, 10.1, -2.3, 7.748, +0,0, 181, -25.6, 7.4, -2.0, 7.139, +0,0, 182, -28.9, 14.7, -1.8, 10.035, +0,0, 183, -24.8, 8.6, -2.1, 7.755, +0,0, 184, -20.3, 12.2, -0.8, 7.749, +0,0, 185, -25.7, 11.4, -1.4, 7.343, +0,0, 186, -19.8, 11.6, -1.4, 8.505, +0,0, 187, -20.2, 10.6, -2.3, 8.257, +0,0, 188, -19.1, 10.8, -1.8, 8.060, +0,0, 189, -25.5, 9.2, -1.6, 7.251, +0,0, 190, -19.5, 9.7, -1.9, 7.213, +0,0, 191, -28.9, 9.3, -2.0, 8.071, +0,0, 192, -19.2, 10.3, -1.6, 7.314, +0,0, 193, -25.4, 8.7, -1.9, 7.630, +0,0, 194, -20.8, 10.3, -1.9, 7.700, +0,0, 195, -24.7, 8.7, -1.2, 7.631, +0,0, 196, -19.8, 11.9, -1.8, 8.019, +0,0, 197, -26.3, 8.1, -3.2, 8.238, +0,0, 198, -20.1, 11.4, -1.6, 8.290, +0,0, 199, -24.7, 8.5, -1.9, 7.521, +0,0, 200, -20.9, 11.7, -0.8, 7.588, +0,0, 201, -25.6, 9.8, -2.0, 8.339, +0,0, 202, -20.6, 11.7, -1.2, 9.101, +0,0, 203, -21.9, 10.5, -2.0, 8.404, +0,0, 204, -18.4, 13.1, -1.2, 8.592, +0,0, 205, -23.3, 11.8, -1.4, 8.631, +0,0, 206, -15.3, 10.7, -0.6, 6.248, +0,0, 207, -24.4, 12.1, -2.2, 8.201, +0,0, 208, -17.9, 18.3, -1.2, 8.480, +0,0, 209, -24.7, 9.7, -2.0, 7.688, +0,0, 210, -20.5, 11.5, -1.8, 8.670, +0,0, 211, -22.7, 10.6, -0.9, 7.328, +0,0, 212, -20.0, 12.2, -1.6, 7.993, +0,0, 213, -25.6, 8.4, -2.8, 8.640, +0,0, 214, -21.7, 10.1, -1.9, 7.811, +0,0, 215, -24.2, 9.0, -2.1, 7.890, +0,0, 216, -21.1, 12.2, -0.7, 8.272, +0,0, 217, -25.5, 11.8, -1.8, 8.147, +0,0, 218, -15.5, 11.0, -0.6, 7.093, +0,0, 219, -26.8, 10.2, -2.7, 9.604, +0,0, 220, -21.0, 9.4, -2.1, 7.924, +0,0, 221, -22.8, 11.3, -1.6, 8.055, +0,0, 222, -20.9, 10.6, -1.4, 7.062, +0,0, 223, -24.2, 12.7, -2.5, 8.625, +0,0, 224, -19.1, 13.5, -1.1, 6.937, +0,0, 225, -23.5, 12.7, -2.6, 8.421, +0,0, 226, -19.6, 11.9, -1.3, 6.997, +0,0, 227, -25.4, 12.2, -1.7, 8.534, +0,0, 228, -20.1, 8.6, -1.7, 6.984, +0,0, 229, -26.8, 9.7, -3.2, 9.283, +0,0, 230, -19.0, 9.2, -1.9, 7.348, +0,0, 231, -22.8, 21.3, -1.5, 7.718, +0,0, 232, -20.9, 11.7, -1.0, 7.820, +0,0, 233, -22.4, 10.0, -1.9, 8.015, +0,0, 234, -20.3, 11.7, -1.5, 8.136, +0,0, 235, -24.9, 10.6, -2.6, 9.263, +0,0, 236, -18.8, 11.8, -1.6, 7.954, +0,0, 237, -22.4, 9.8, -2.3, 8.070, +0,0, 238, -19.4, 10.9, -1.3, 7.001, +0,0, 239, -27.2, 9.5, -2.3, 8.043, +0,0, 240, -20.3, 11.0, -1.5, 7.466, +0,0, 241, -23.6, 8.0, -2.3, 7.169, +0,0, 242, -23.3, 11.7, -1.2, 8.444, +0,0, 243, -21.2, 10.6, -1.3, 7.841, +0,0, 244, -22.8, 11.9, -1.5, 8.229, +0,0, 245, -22.7, 7.0, -2.2, 6.900, +0,0, 246, -20.3, 11.4, -1.1, 8.238, +0,0, 247, -21.3, 12.0, -1.1, 7.967, +0,0, 248, -20.0, 9.7, -0.9, 6.868, +0,0, 249, -20.6, 10.9, -1.6, 8.146, +0,0, 250, -20.0, 8.8, -1.8, 7.543, +0,0, 251, -21.7, 9.5, -2.2, 7.970, +0,0, 252, -19.6, 10.1, -2.2, 7.892, +0,0, 253, -21.4, 8.9, -1.5, 6.746, +0,0, 254, -21.3, 10.1, -1.7, 7.157, +0,0, 255, -25.5, 10.0, -2.6, 8.816, +0,0, 256, -21.2, 10.5, -0.9, 6.910, +0,0, 257, -25.9, 9.0, -2.8, 8.249, +0,0, 258, -20.8, 11.1, -1.4, 7.983, +0,0, 259, -25.1, 7.5, -2.4, 7.286, +0,0, 260, -18.5, 14.0, -1.6, 7.795, +0,0, 261, -25.3, 11.6, -1.9, 8.211, +0,0, 262, -22.1, 12.7, -1.1, 7.355, +0,0, 263, -23.7, 10.3, -2.6, 8.988, +0,0, 264, -17.9, 10.8, -0.8, 7.504, +0,0, 265, -24.1, 9.6, -2.1, 7.882, +0,0, 266, -19.5, 10.5, -1.6, 7.509, +0,0, 267, -25.9, 10.8, -2.4, 8.771, +0,0, 268, -20.9, 10.2, -1.4, 7.600, +0,0, 269, -24.3, 10.0, -2.3, 8.239, +0,0, 270, -19.3, 10.9, -1.3, 7.469, +0,0, 271, -23.5, 10.5, -2.2, 8.278, +0,0, 272, -20.1, 12.2, -0.9, 7.910, +0,0, 273, -25.7, 6.8, -2.6, 7.408, +0,0, 274, -19.7, 14.1, -1.0, 8.582, +0,0, 275, -27.2, 8.7, -2.1, 7.647, +0,0, 276, -19.2, 12.5, -0.9, 7.558, +0,0, 277, -23.1, 9.2, -1.2, 7.284, +0,0, 278, -20.8, 13.0, -0.8, 8.489, +0,0, 279, -24.2, 10.1, -2.3, 8.881, +0,0, 280, -21.7, 10.7, -1.5, 7.214, +0,0, 281, -25.6, 8.0, -2.1, 7.683, +0,0, 282, -19.3, 11.4, -1.6, 7.803, +0,0, 283, -23.5, 10.0, -1.4, 7.640, +0,0, 284, -22.4, 10.0, -1.8, 8.235, +0,0, 285, -24.6, 10.6, -2.1, 8.732, +0,0, 286, -18.9, 9.2, -1.6, 6.233, +0,0, 287, -26.0, 8.8, -2.4, 8.117, +0,0, 288, -18.4, 10.7, -1.2, 7.420, +0,0, 289, -24.6, 9.0, -2.3, 7.384, +0,0, 290, -19.2, 11.5, -1.3, 6.966, +0,0, 291, -21.9, 9.9, -1.5, 7.812, +0,0, 292, -21.3, 10.3, -0.8, 7.055, +0,0, 293, -20.9, 8.9, -1.2, 6.701, +0,0, 294, -20.9, 13.9, -0.6, 8.842, +0,0, 295, -24.1, 11.3, -1.3, 8.682, +0,0, 296, -18.6, 9.9, -1.1, 7.077, +0,0, 297, -23.1, 10.1, -2.0, 7.950, +0,0, 298, -19.3, 12.0, -1.4, 7.991, +0,0, 299, -25.5, 9.3, -1.9, 7.605, +0,0, 300, -21.4, 13.0, -0.5, 8.313, +0,0, 301, -22.4, 10.7, -2.0, 8.418, +0,0, 302, -17.7, 10.7, -1.1, 6.823, +0,0, 303, -24.8, 9.1, -1.9, 6.898, +0,0, 304, -19.8, 9.9, -2.1, 7.612, +0,0, 305, -29.1, 9.1, -2.8, 8.394, +0,0, 306, -20.6, 10.5, -0.9, 7.317, +0,0, 307, -24.1, 10.2, -1.1, 7.291, +0,0, 308, -20.4, 12.3, -0.3, 7.852, +0,0, 309, -24.1, 10.3, -1.6, 8.152, +0,0, 310, -18.2, 9.8, -1.3, 7.233, +0,0, 311, -21.9, 11.5, -1.7, 8.389, +0,0, 312, -18.7, 9.9, -1.4, 6.935, +0,0, 313, -23.6, 12.4, -2.1, 8.418, +0,0, 314, -21.7, 14.1, -1.7, 7.770, +0,0, 315, -20.9, 12.0, -1.3, 7.073, +0,0, 316, -20.9, 14.2, -1.0, 7.926, +0,0, 317, -20.1, 10.6, -1.5, 7.117, +0,0, 318, -22.0, 9.1, -1.8, 7.161, +0,0, 319, -24.1, 9.2, -1.1, 6.915, +0,0, 320, -19.4, 11.0, -1.3, 8.043, +0,0, 321, -23.8, 9.7, -1.6, 7.755, +0,0, 322, -20.8, 10.6, -1.2, 7.538, +0,0, 323, -26.3, 9.6, -1.8, 8.058, +0,0, 324, -23.3, 11.3, -1.8, 7.580, +0,0, 325, -24.1, 8.3, -1.6, 7.107, +0,0, 326, -23.3, 12.5, -1.6, 9.164, +0,0, 327, -24.4, 10.7, -1.5, 8.686, +0,0, 328, -20.8, 9.5, -1.6, 6.711, +0,0, 329, -23.4, 9.9, -2.1, 8.257, +0,0, 330, -20.7, 14.1, -1.3, 8.019, +0,0, 331, -22.8, 11.9, -2.2, 7.187, +0,0, 332, -22.0, 11.9, -1.3, 8.254, +0,0, 333, -26.1, 9.4, -2.1, 7.639, +0,0, 334, -22.2, 11.2, -1.6, 7.990, +0,0, 335, -19.3, 10.6, -0.4, 7.067, +0,0, 336, -20.1, 9.5, -2.1, 7.729, +0,0, 337, -25.3, 7.9, -3.1, 7.974, +0,0, 338, -16.3, 12.7, -0.9, 8.340, +0,0, 339, -25.8, 9.0, -1.4, 7.205, +0,0, 340, -20.5, 11.2, -1.8, 7.557, +0,0, 341, -23.2, 9.7, -2.0, 7.759, +0,0, 342, -20.4, 11.7, -1.3, 8.473, +0,0, 343, -22.6, 10.4, -1.4, 8.387, +0,0, 344, -21.5, 9.7, -1.9, 6.959, +0,0, 345, -24.6, 8.5, -2.0, 7.702, +0,0, 346, -17.5, 11.7, -1.4, 7.572, +0,0, 347, -23.9, 10.5, -1.8, 8.577, +0,0, 348, -20.6, 9.1, -2.6, 7.689, +0,0, 349, -23.3, 9.2, -2.2, 7.405, +0,0, 350, -16.0, 8.3, -1.3, 6.158, +0,0, 351, -23.6, 11.4, -2.2, 8.531, +0,0, 352, -22.0, 7.8, -1.9, 7.064, +0,0, 353, -28.5, 7.8, -3.3, 8.460, +0,0, 354, -20.8, 11.8, -2.0, 8.038, +0,0, 355, -24.6, 9.6, -2.1, 7.581, +0,0, 356, -21.8, 11.2, -1.2, 7.248, +0,0, 357, -21.9, 8.4, -2.4, 7.874, +0,0, 358, -22.4, 11.0, -1.9, 8.935, +0,0, 359, -24.1, 11.4, -1.7, 8.677, +0,0, 360, -18.1, 9.4, -1.0, 6.415, +0,0, 361, -24.9, 10.5, -1.3, 7.755, +0,0, 362, -18.4, 11.6, -0.8, 7.046, +0,0, 363, -25.2, 10.0, -1.6, 7.894, +0,0, 364, -18.3, 10.3, -2.0, 7.961, +0,0, 365, -25.7, 8.9, -2.0, 7.708, +0,0, 366, -21.1, 10.0, -2.2, 7.762, +0,0, 367, -24.6, 11.5, -1.5, 7.573, +0,0, 368, -18.8, 15.1, -0.9, 7.703, +0,0, 369, -25.2, 12.4, -2.6, 8.668, +0,0, 370, -21.5, 13.4, -1.5, 8.011, +0,0, 371, -21.9, 8.3, -2.7, 7.179, +0,0, 372, -15.7, 8.8, -1.4, 6.306, +0,0, 373, -23.8, 8.2, -2.7, 7.903, +0,0, 374, -29.2, 9.3, -2.4, 9.119, +0,0, 375, -24.1, 10.7, -1.7, 8.431, +0,0, 376, -20.1, 10.8, -1.4, 7.120, +0,0, 377, -22.2, 8.4, -2.1, 7.481, +0,0, 378, -18.9, 14.5, -1.0, 8.330, +0,0, 379, -25.8, 7.8, -2.7, 7.214, +0,0, 380, -20.0, 10.5, -1.8, 7.980, +0,0, 381, -18.7, 9.9, -1.7, 6.956, +0,0, 382, -19.8, 9.3, -1.9, 7.188, +0,0, 383, -24.1, 9.5, -1.5, 7.195, +0,0, 384, -18.6, 9.5, -2.4, 7.148, +0,0, 385, -29.4, 10.4, -3.5, 9.018, +0,0, 386, -18.9, 14.4, -1.9, 7.691, +0,0, 387, -26.0, 8.8, -2.8, 7.957, +0,0, 388, -20.8, 9.9, -1.7, 7.611, +0,0, 389, -25.9, 9.3, -2.5, 8.693, +0,0, 390, -22.6, 9.9, -1.8, 7.789, +0,0, 391, -25.4, 20.8, -2.7, 8.301, +0,0, 392, -17.6, 11.1, -0.4, 6.826, +0,0, 393, -23.4, 14.5, -1.0, 8.995, +0,0, 394, -18.8, 10.9, -0.9, 7.246, +0,0, 395, -25.8, 10.2, -1.5, 8.274, +0,0, 396, -23.6, 11.7, -1.7, 8.686, +0,0, 397, -22.5, 10.0, -2.0, 8.063, +0,0, 398, -15.9, 12.6, -1.0, 7.321, +0,0, 399, -21.9, 9.3, -2.7, 7.687, +0,0, 400, -18.8, 8.9, -1.7, 7.230, +0,0, 401, -22.3, 10.6, -2.1, 8.132, +0,0, 402, -18.3, 9.2, -1.5, 6.445, +0,0, 403, -28.4, 8.0, -2.6, 8.588, +0,0, 404, -19.3, 12.0, -1.6, 8.464, +0,0, 405, -24.7, 8.2, -2.3, 7.487, +0,0, 406, -18.3, 9.6, -0.7, 6.832, +0,0, 407, -27.2, 9.8, -2.0, 8.386, +0,0, 408, -19.6, 12.7, -1.4, 7.902, +0,0, 409, -25.8, 9.4, -2.0, 8.443, +0,0, 410, -17.8, 11.9, -1.3, 6.733, +0,0, 411, -23.4, 10.2, -2.1, 8.635, +0,0, 412, -17.8, 9.7, -1.4, 6.769, +0,0, 413, -23.4, 9.5, -2.9, 8.717, +0,0, 414, -17.6, 11.1, -0.8, 6.479, +0,0, 415, -28.3, 8.6, -2.9, 7.372, +0,0, 416, -21.9, 9.6, -2.7, 8.130, +0,0, 417, -22.1, 12.3, -1.5, 8.035, +0,0, 418, -17.3, 9.5, -1.0, 6.275, +0,0, 419, -25.2, 8.9, -2.1, 8.310, +0,0, 420, -18.2, 11.6, -1.7, 6.632, +0,0, 421, -27.0, 13.2, -2.4, 7.889, +0,0, 422, -24.5, 16.9, -1.5, 8.793, +0,0, 423, -23.6, 10.5, -1.9, 7.982, +0,0, 424, -19.1, 12.8, -1.6, 7.771, +0,0, 425, -24.2, 9.9, -2.4, 8.135, +0,0, 426, -18.5, 9.3, -1.7, 7.047, +0,0, 427, -25.3, 11.1, -2.4, 8.674, +0,0, 428, -18.9, 8.0, -1.0, 6.117, +0,0, 429, -25.4, 10.1, -1.6, 7.922, +0,0, 430, -18.5, 12.0, -1.1, 7.321, +0,0, 431, -23.6, 7.7, -2.2, 7.244, +0,0, 432, -18.7, 10.9, -1.7, 7.918, +0,0, 433, -22.5, 10.2, -1.1, 7.440, +0,0, 434, -17.0, 9.5, -1.4, 6.808, +0,0, 435, -24.5, 9.7, -1.6, 8.341, +0,0, 436, -18.2, 12.4, -0.7, 7.490, +0,0, 437, -24.3, 12.7, -1.3, 7.467, +0,0, 438, -21.8, 10.1, -1.4, 7.701, +0,0, 439, -27.4, 12.2, -2.2, 7.820, +0,0, 440, -17.5, 15.1, -0.8, 8.057, +0,0, 441, -23.7, 10.0, -2.7, 7.910, +0,0, 442, -19.1, 10.7, -1.4, 7.930, +0,0, 443, -25.6, 7.8, -2.1, 7.730, +0,0, 444, -21.0, 11.3, -0.6, 8.093, +0,0, 445, -24.6, 21.4, -2.6, 8.879, +0,0, 446, -17.8, 11.9, -2.1, 7.852, +0,0, 447, -25.0, 15.8, -1.6, 7.747, +0,0, 448, -17.9, 11.0, -0.4, 6.693, +0,0, 449, -27.2, 9.3, -2.8, 8.704, +0,0, 450, -18.6, 9.5, -1.9, 7.099, +0,0, 451, -26.5, 10.6, -2.5, 8.900, +0,0, 452, -18.4, 9.7, -1.2, 6.358, +0,0, 453, -23.4, 8.7, -2.7, 7.417, +0,0, 454, -19.5, 10.9, -1.4, 7.780, +0,0, 455, -25.8, 8.9, -2.3, 8.113, +0,0, 456, -16.3, 10.9, -1.0, 7.317, +0,0, 457, -22.1, 10.6, -1.9, 7.500, +0,0, 458, -17.4, 8.4, -1.2, 6.658, +0,0, 459, -27.5, 9.7, -2.6, 9.023, +0,0, 460, -20.3, 9.4, -1.4, 7.236, +0,0, 461, -25.5, 10.1, -2.5, 8.254, +0,0, 462, -16.6, 13.0, -1.3, 7.700, +0,0, 463, -22.6, 8.7, -2.0, 7.267, +0,0, 464, -20.1, 10.9, -1.0, 6.837, +0,0, 465, -21.5, 8.4, -2.4, 7.837, +0,0, 466, -22.9, 11.7, -1.5, 7.962, +0,0, 467, -22.5, 9.7, -2.0, 7.846, +0,0, 468, -18.8, 9.1, -1.7, 6.544, +0,0, 469, -20.8, 9.5, -2.2, 7.466, +0,0, 470, -19.6, 10.6, -1.9, 8.193, +0,0, 471, -26.6, 7.9, -2.7, 8.015, +0,0, 472, -20.2, 13.6, -0.9, 7.789, +0,0, 473, -21.5, 9.3, -1.6, 6.991, +0,0, 474, -22.7, 13.7, -0.8, 8.679, +0,0, 475, -21.2, 11.5, -1.3, 8.415, +0,0, 476, -21.7, 11.3, -1.2, 7.591, +0,0, 477, -25.3, 10.4, -3.3, 8.299, +0,0, 478, -18.8, 12.0, -2.1, 8.086, +0,0, 479, -23.9, 9.5, -2.0, 8.023, +0,0, 480, -19.2, 8.9, -1.4, 6.374, +0,0, 481, -19.5, 9.8, -1.4, 7.091, +0,0, 482, -20.8, 11.1, -2.0, 8.004, +0,0, 483, -24.3, 10.8, -1.5, 7.831, +0,0, 484, -18.6, 10.7, -2.0, 7.806, +0,0, 485, -26.1, 9.5, -2.9, 9.048, +0,0, 486, -20.7, 10.4, -2.3, 7.806, +0,0, 487, -27.8, 8.3, -2.4, 8.043, +0,0, 488, -19.6, 11.0, -1.5, 7.984, +0,0, 489, -21.0, 10.2, -1.7, 7.139, +0,0, 490, -21.5, 11.6, -1.5, 8.437, +0,0, 491, -22.3, 11.4, -1.7, 8.323, +0,0, 492, -20.8, 11.9, -0.8, 8.213, +0,0, 493, -24.3, 12.5, -2.2, 8.419, +0,0, 494, -17.6, 13.7, -0.1, 7.450, +0,0, 495, -22.1, 21.5, -2.4, 8.893, +0,0, 496, -17.7, 9.9, -1.9, 7.382, +0,0, 497, -22.1, 10.9, -1.5, 8.226, +0,0, 498, -18.8, 6.3, -1.4, 5.742, +0,0, 499, -25.4, 20.8, -2.6, 8.039, +0,0, 500, -21.9, 11.6, -1.2, 8.950, +0,0, 501, -19.1, 16.6, -1.5, 8.366, +0,0, 502, -16.6, 7.1, -1.5, 5.872, +0,0, 503, -22.7, 12.3, -1.5, 9.159, +0,0, 504, -22.0, 10.7, -1.7, 7.264, +0,0, 505, -24.6, 9.0, -2.3, 7.842, +0,0, 506, -20.1, 8.7, -1.5, 6.734, +0,0, 507, -25.7, 9.2, -2.2, 7.472, +0,0, 508, -20.8, 11.0, -1.5, 8.497, +0,0, 509, -19.8, 11.1, -1.7, 7.792, +0,0, 510, -17.5, 9.3, -1.1, 6.756, +0,0, 511, -21.1, 11.1, -1.4, 7.626, +0,0, 512, -22.4, 7.7, -1.4, 6.093, +0,0, 513, -22.7, 6.8, -2.2, 7.239, +0,0, 514, -23.0, 9.9, -0.9, 7.626, +0,0, 515, -27.3, 9.7, -2.6, 8.845, +0,0, 516, -18.7, 8.9, -0.6, 6.628, +0,0, 517, -19.7, 11.7, -0.8, 7.898, +0,0, 518, -19.8, 9.0, -1.9, 6.388, +0,0, 519, -22.9, 12.9, -0.8, 8.750, +0,0, 520, -19.8, 6.8, -2.0, 6.510, +0,0, 521, -33.1, 25.1, -0.8, 9.984, -33.1,-23.2,-22.0,-21.6,-20.8,-20.0,-17.5,-15.7,-15.5,-15.5,-15.4,-15.1,-14.9,-13.8,-13.8,-13.7,-12.7,-12.6,-12.2,-11.9,-11.5,-11.4,-10.9,-10.4,-10.3,-10.3,-9.6,-9.3,-9.3,-9.1,-8.9,-8.8,-8.1,-7.6,-7.4,-7.4,-6.9,-6.9,-6.8,-6.6,-6.4,-5.4,-5.2,-5.2,-5.1,-4.6,-4.2,-4.0,-3.5,-3.5,-3.4,-3.4,-2.8,-2.7,-2.6,-2.5,-2.5,-1.9,-1.7,-1.6,-1.6,-1.3,-1.0,-0.4,-0.2,-0.0,-0.0,0.0,0.1,0.7,1.2,1.3,1.3,1.6,1.8,2.3,2.5,2.8,2.8,2.8,2.9,3.3,3.3,3.4,3.6,3.7,3.7,3.8,3.8,3.9,4.0,4.3,4.3,4.5,4.5,4.8,5.0,5.9,6.0,6.4,6.5,6.6,7.0,7.5,7.6,8.0,8.1,8.5,8.6,8.7,9.5,9.6,9.6,9.7,10.2,10.4,10.5,10.5,10.6,10.7,11.1,11.7,11.7,12.0,12.0,12.1,12.4,12.9,12.9,13.0,13.4,13.7,23.9,25.1, +0,0, 522, -19.5, 8.5, -2.0, 7.012, +0,0, 523, -22.4, 13.3, -1.3, 8.830, +0,0, 524, -17.7, 8.4, -1.0, 6.229, +0,0, 525, -25.7, 10.6, -1.5, 7.986, +0,0, 526, -23.9, 10.3, -2.4, 8.270, +0,0, 527, -23.4, 11.9, -1.9, 8.421, +0,0, 528, -21.7, 9.9, -1.9, 7.252, +0,0, 529, -24.6, 12.1, -1.1, 8.650, +0,0, 530, -20.2, 9.2, -1.9, 7.569, +0,0, 531, -22.7, 12.8, -1.7, 8.783, +0,0, 532, -19.5, 7.9, -1.7, 5.933, +0,0, 533, -26.2, 10.8, -1.7, 8.344, +0,0, 534, -18.2, 8.6, -1.6, 7.372, +0,0, 535, -21.9, 12.6, -1.8, 9.156, +0,0, 536, -16.8, 6.8, -1.2, 5.277, +0,0, 537, -26.2, 9.8, -2.3, 8.310, +0,0, 538, -18.4, 10.8, -1.4, 7.305, +0,0, 539, -22.4, 11.8, -1.6, 8.529, +0,0, 540, -20.3, 9.2, -1.2, 6.485, +0,0, 541, -29.7, 9.0, -3.1, 8.752, +0,0, 542, -25.9, 11.6, -1.1, 8.583, +0,0, 543, -24.3, 11.2, -2.9, 9.080, +0,0, 544, -22.4, 8.3, -1.4, 6.486, +0,0, 545, -18.6, 11.3, -1.6, 7.672, +0,0, 546, -17.1, 8.7, -1.3, 6.626, +0,0, 547, -22.2, 12.3, -1.1, 8.230, +0,0, 548, -21.1, 8.5, -1.8, 6.396, +0,0, 549, -24.7, 12.4, -1.0, 8.361, +0,0, 550, -24.2, 7.9, -2.9, 7.662, +0,0, 551, -21.6, 11.6, -0.8, 7.692, +0,0, 552, -19.2, 10.2, -1.1, 7.148, +0,0, 553, -25.6, 8.6, -2.3, 8.224, +0,0, 554, -20.6, 11.8, -0.8, 7.767, +0,0, 555, -19.8, 11.4, -2.0, 8.089, +0,0, 556, -21.9, 8.6, -1.9, 6.964, +0,0, 557, -24.4, 9.8, -1.9, 8.416, +0,0, 558, -19.3, 8.7, -1.9, 6.929, +0,0, 559, -22.3, 13.2, -0.4, 8.294, +0,0, 560, -14.2, 9.1, -0.9, 5.637, +0,0, 561, -27.1, 8.8, -2.0, 7.684, +0,0, 562, -20.9, 10.7, -1.3, 6.844, +0,0, 563, -24.4, 10.8, -1.7, 8.920, +0,0, 564, -20.5, 8.6, -2.4, 7.406, +0,0, 565, -21.7, 11.7, -1.3, 8.458, +0,0, 566, -21.4, 9.3, -1.1, 6.616, +0,0, 567, -18.9, 13.8, -0.5, 8.053, +0,0, 568, -19.6, 8.6, -1.1, 5.948, +0,0, 569, -25.9, 9.8, -2.3, 9.214, +0,0, 570, -18.4, 11.1, -1.0, 7.295, +0,0, 571, -20.6, 9.7, -2.2, 7.975, +0,0, 572, -23.0, 8.7, -1.9, 6.988, +0,0, 573, -25.7, 10.6, -2.5, 8.729, +0,0, 574, -17.2, 6.8, -2.0, 6.284, +0,0, 575, -23.8, 19.8, -2.3, 9.301, +0,0, 576, -18.9, 7.7, -1.9, 6.734, +0,0, 577, -38.6, 17.4, -2.5, 8.829, -38.6,-28.6,-25.3,-21.4,-21.1,-20.1,-20.0,-19.4,-18.8,-17.4,-16.9,-16.1,-16.1,-16.0,-15.8,-14.3,-14.2,-14.1,-14.1,-13.9,-13.2,-12.8,-12.3,-11.6,-11.0,-10.8,-10.7,-9.7,-9.5,-9.1,-8.8,-8.3,-8.3,-8.0,-6.3,-6.3,-6.1,-5.9,-5.9,-5.7,-5.5,-5.5,-5.4,-5.1,-5.0,-4.9,-4.7,-4.6,-4.5,-3.7,-3.6,-3.2,-3.2,-3.1,-3.1,-3.0,-2.8,-2.8,-2.7,-2.6,-2.4,-2.4,-2.2,-1.8,-1.5,-1.5,-1.2,-1.0,-0.4,-0.3,-0.2,0.0,0.0,0.2,0.3,0.3,0.4,0.5,0.8,0.8,0.9,1.0,1.3,1.4,1.5,1.5,1.7,1.8,1.9,1.9,1.9,2.0,2.0,2.1,2.1,2.2,2.5,2.5,2.6,2.6,2.7,2.7,2.8,2.9,3.1,3.2,3.4,3.6,3.9,4.0,4.1,4.6,4.7,5.0,5.1,5.2,5.3,5.5,5.7,5.8,5.9,6.0,6.0,6.1,6.1,6.2,6.2,6.3,6.4,6.5,6.5,6.6,6.6,6.7,6.8,7.0,7.1,7.3,7.3,7.3,7.7,14.8,17.4, +0,0, 578, -23.3, 10.3, -1.2, 7.862, +0,0, 579, -25.3, 12.4, -2.4, 9.228, +0,0, 580, -19.0, 6.7, -2.1, 6.301, +0,0, 581, -23.1, 11.7, -1.6, 8.486, +0,0, 582, -24.5, 10.3, -1.3, 7.335, +0,0, 583, -19.3, 16.6, -1.9, 8.723, +0,0, 584, -17.1, 10.1, -1.6, 6.651, +0,0, 585, -22.9, 13.2, -2.0, 9.082, +0,0, 586, -21.8, 20.1, -1.8, 8.158, +0,0, 587, -21.8, 13.3, -2.1, 8.859, +0,0, 588, -20.7, 7.3, -1.7, 6.008, +0,0, 589, -23.7, 12.8, -1.1, 8.259, +0,0, 590, -18.8, 9.5, -1.5, 7.293, +0,0, 591, -25.4, 11.4, -1.9, 9.184, +0,0, 592, -20.1, 8.9, -1.7, 7.069, +0,0, 593, -24.6, 11.8, -2.0, 9.001, +0,0, 594, -17.6, 10.5, -1.6, 7.208, +0,0, 595, -22.9, 12.3, -1.9, 9.253, +0,0, 596, -21.2, 6.9, -2.0, 6.439, +0,0, 597, -24.0, 13.1, -1.0, 8.355, +0,0, 598, -19.3, 8.6, -2.5, 7.465, +0,0, 599, -24.0, 15.3, -1.7, 9.285, +0,0, 600, -20.0, 8.8, -1.6, 5.687, +0,0, 601, -24.7, 13.7, -1.6, 8.897, +0,0, 602, -19.3, 10.1, -1.7, 7.092, +0,0, 603, -22.3, 15.0, -1.7, 8.232, +0,0, 604, -21.8, 9.0, -2.2, 7.483, +0,0, 605, -23.0, 9.8, -1.6, 7.239, +0,0, 606, -25.9, 7.6, -2.7, 7.307, +0,0, 607, -23.3, 11.1, -1.4, 8.155, +0,0, 608, -16.6, 9.7, -1.2, 6.919, +0,0, 609, -19.0, 11.4, -1.7, 7.791, +0,0, 610, -24.4, 6.7, -2.2, 6.438, +0,0, 611, -20.4, 13.3, -1.2, 8.870, +0,0, 612, -24.5, 9.2, -1.7, 6.928, +0,0, 613, -23.7, 10.3, -1.7, 8.289, +0,0, 614, -23.5, 7.8, -3.1, 7.865, +0,0, 615, -23.3, 12.1, -2.1, 8.783, +0,0, 616, -19.3, 7.4, -1.1, 5.754, +0,0, 617, -20.9, 13.6, -0.8, 8.819, +0,0, 618, -21.6, 9.4, -1.7, 6.993, +0,0, 619, -21.1, 13.4, -1.0, 8.636, +0,0, 620, -20.4, 7.2, -1.8, 6.688, +0,0, 621, -25.1, 10.8, -1.8, 7.941, +0,0, 622, -20.1, 8.6, -2.2, 6.570, +0,0, 623, -20.5, 12.1, -1.0, 9.086, +0,0, 624, -18.0, 9.0, -1.3, 6.449, +0,0, 625, -18.6, 12.5, -1.4, 7.822, +0,0, 626, -21.3, 9.2, -1.5, 6.860, +0,0, 627, -22.4, 12.9, -1.3, 8.874, +0,0, 628, -16.1, 6.6, -1.3, 5.461, +0,0, 629, -36.8, 21.0, -1.9, 9.593, -36.8,-24.4,-22.1,-21.2,-21.1,-19.5,-17.7,-16.8,-16.6,-16.6,-16.4,-16.4,-16.1,-15.9,-15.7,-15.7,-14.6,-14.5,-14.3,-14.3,-14.2,-13.7,-13.5,-13.5,-13.3,-12.8,-12.7,-12.3,-10.2,-8.9,-8.8,-8.7,-8.7,-8.6,-8.5,-7.9,-7.6,-7.4,-7.1,-6.6,-5.8,-5.4,-4.8,-4.8,-4.6,-3.6,-3.5,-2.9,-2.7,-2.6,-2.2,-2.2,-2.1,-2.0,-1.8,-1.8,-1.6,-1.6,-1.3,-1.2,-1.0,-0.7,-0.7,-0.6,-0.5,-0.2,-0.2,-0.1,-0.1,0.0,0.0,0.0,0.2,0.2,0.3,0.7,0.7,0.8,0.9,0.9,1.0,1.0,1.3,1.4,1.4,1.4,1.5,1.5,1.5,1.5,1.6,1.7,1.7,1.8,1.9,2.0,2.1,2.1,2.4,2.5,2.5,3.1,3.2,3.3,3.3,3.4,4.4,4.8,5.7,5.9,6.3,6.6,6.6,6.8,7.1,7.3,7.5,7.7,7.9,7.9,8.0,8.1,8.4,8.5,8.5,9.0,9.1,9.6,9.7,9.8,9.8,9.9,10.2,10.5,11.1,18.0,18.1,19.3,21.0, +0,0, 630, -21.2, 9.4, -1.4, 7.057, +0,0, 631, -34.5, 16.2, -1.7, 8.962, -34.5,-22.4,-22.1,-19.6,-19.4,-18.7,-17.8,-16.5,-16.0,-15.9,-15.6,-15.3,-14.4,-14.3,-13.9,-13.4,-13.2,-13.1,-13.0,-12.5,-12.2,-11.7,-11.6,-10.7,-10.5,-9.9,-9.5,-9.3,-9.1,-8.9,-8.4,-8.0,-7.6,-7.6,-7.5,-7.5,-7.4,-6.8,-6.8,-6.7,-6.4,-6.1,-5.2,-4.3,-4.1,-3.8,-3.5,-3.3,-3.1,-3.0,-2.6,-2.3,-2.2,-2.0,-1.8,-1.6,-1.4,-1.4,-1.3,-0.9,-0.8,-0.8,-0.7,-0.5,-0.2,-0.1,-0.1,0.0,0.0,0.1,0.2,0.2,0.3,0.3,0.4,0.5,0.7,0.8,0.9,0.9,1.0,1.1,1.7,1.9,2.0,2.0,2.2,2.3,2.4,2.4,2.4,2.6,2.7,2.7,2.8,2.9,3.1,3.2,3.3,3.3,3.3,3.7,4.0,4.3,4.7,4.9,5.2,5.7,6.0,6.1,6.3,6.6,6.9,7.0,7.8,7.9,8.0,8.4,8.8,9.0,9.0,9.1,9.3,9.6,10.0,10.6,10.6,10.7,10.9,11.1,11.6,12.1,12.2,12.2,14.2,16.2, +0,0, 632, -22.1, 7.7, -1.9, 6.926, +0,0, 633, -24.0, 10.1, -1.2, 7.726, +0,0, 634, -22.0, 11.0, -1.8, 7.614, +0,0, 635, -20.5, 15.2, -1.4, 8.824, +0,0, 636, -20.5, 7.3, -2.3, 6.487, +0,0, 637, -22.9, 9.4, -3.0, 8.255, +0,0, 638, -22.7, 14.5, -2.2, 8.517, +0,0, 639, -20.5, 14.2, -1.4, 9.197, +0,0, 640, -20.0, 7.2, -1.8, 6.419, +0,0, 641, -21.2, 9.3, -1.8, 6.953, +0,0, 642, -22.2, 9.1, -2.3, 7.582, +0,0, 643, -20.1, 10.9, -1.6, 7.881, +0,0, 644, -21.7, 8.4, -1.7, 7.460, +0,0, 645, -24.8, 11.5, -1.6, 8.808, +0,0, 646, -20.7, 10.4, -1.9, 7.139, +0,0, 647, -22.9, 12.8, -0.7, 8.031, +0,0, 648, -17.7, 10.7, -1.4, 7.044, +0,0, 649, -22.4, 12.0, -2.0, 9.104, +0,0, 650, -21.6, 9.6, -2.0, 7.678, +0,0, 651, -18.4, 15.5, -0.1, 8.937, +0,0, 652, -20.6, 8.4, -2.1, 7.049, +0,0, 653, -25.6, 10.2, -2.2, 8.067, +0,0, 654, -21.5, 15.3, -1.7, 8.294, +0,0, 655, -23.7, 13.4, -1.7, 8.475, +0,0, 656, -22.2, 7.6, -1.7, 7.020, +0,0, 657, -21.2, 9.8, -2.1, 7.391, +0,0, 658, -23.5, 9.8, -1.9, 7.882, +0,0, 659, -23.2, 10.8, -2.0, 8.174, +0,0, 660, -20.5, 9.5, -1.4, 7.097, +0,0, 661, -25.8, 10.2, -2.5, 8.652, +0,0, 662, -19.7, 10.2, -2.0, 7.759, +0,0, 663, -23.3, 12.1, -1.3, 8.151, +0,0, 664, -19.2, 9.1, -1.3, 7.127, +0,0, 665, -22.2, 10.5, -2.1, 9.123, +0,0, 666, -20.1, 9.9, -1.6, 7.376, +0,0, 667, -24.1, 10.9, -2.4, 8.753, +0,0, 668, -20.4, 9.1, -0.9, 7.027, +0,0, 669, -22.1, 10.9, -1.4, 8.338, +0,0, 670, -20.3, 10.1, -1.2, 7.011, +0,0, 671, -21.6, 11.5, -1.1, 7.858, +0,0, 672, -16.7, 7.4, -1.4, 5.605, +0,0, 673, -23.4, 12.1, -2.3, 9.841, +0,0, 674, -24.2, 8.5, -2.5, 7.788, +0,0, 675, -17.7, 12.3, -1.2, 7.713, +0,0, 676, -22.4, 9.3, -1.4, 7.442, +0,0, 677, -25.3, 9.6, -2.3, 8.561, +0,0, 678, -18.6, 13.3, -0.2, 7.325, +0,0, 679, -22.3, 12.4, -2.2, 9.013, +0,0, 680, -20.4, 9.9, -1.2, 7.171, +0,0, 681, -24.5, 12.5, -2.2, 9.204, +0,0, 682, -20.2, 10.1, -1.0, 7.446, +0,0, 683, -22.3, 12.7, -1.0, 8.515, +0,0, 684, -20.8, 9.3, -1.6, 6.987, +0,0, 685, -23.9, 10.3, -1.7, 8.451, +0,0, 686, -19.4, 9.8, -1.2, 6.652, +0,0, 687, -22.1, 11.5, -1.8, 8.792, +0,0, 688, -19.4, 8.8, -1.5, 6.800, +0,0, 689, -22.8, 10.9, -2.2, 8.904, +0,0, 690, -20.8, 10.5, -1.1, 6.932, +0,0, 691, -25.1, 11.8, -1.8, 7.951, +0,0, 692, -23.7, 15.6, -0.5, 8.426, +0,0, 693, -22.6, 11.1, -1.6, 7.979, +0,0, 694, -21.3, 16.5, -1.5, 7.285, +0,0, 695, -23.3, 13.0, -1.6, 9.167, +0,0, 696, -21.0, 7.9, -2.6, 7.187, +0,0, 697, -19.5, 12.4, -0.3, 7.441, +0,0, 698, -19.1, 9.5, -1.1, 6.884, +0,0, 699, -24.2, 12.7, -1.5, 8.602, +0,0, 700, -19.2, 8.1, -1.7, 6.524, +0,0, 701, -29.1, 9.0, -2.5, 8.340, +0,0, 702, -21.2, 8.8, -1.8, 7.122, +0,0, 703, -23.8, 11.3, -1.5, 8.657, +0,0, 704, -16.0, 5.0, -1.5, 4.837, +0,0, 705, -22.1, 8.9, -1.1, 7.316, +0,0, 706, -18.4, 10.2, -1.5, 7.156, +0,0, 707, -23.3, 13.6, -1.2, 8.068, +0,0, 708, -22.6, 10.8, -2.2, 7.777, +0,0, 709, -22.2, 14.2, -1.3, 8.052, +0,0, 710, -21.3, 11.3, -2.2, 7.357, +0,0, 711, -26.3, 10.9, -2.5, 8.364, +0,0, 712, -19.5, 8.4, -1.5, 6.532, +0,0, 713, -23.4, 11.9, -0.7, 7.648, +0,0, 714, -22.0, 10.9, -1.2, 7.465, +0,0, 715, -25.3, 10.5, -1.9, 8.596, +0,0, 716, -19.3, 12.3, -1.0, 7.581, +0,0, 717, -23.9, 10.1, -2.3, 8.266, +0,0, 718, -22.9, 11.5, -1.8, 7.877, +0,0, 719, -23.3, 11.9, -1.8, 9.330, +0,0, 720, -20.5, 6.9, -1.5, 6.698, +0,0, 721, -24.7, 10.4, -2.0, 8.220, +0,0, 722, -20.7, 10.6, -1.3, 7.231, +0,0, 723, -23.7, 10.2, -1.0, 8.018, +0,0, 724, -19.1, 6.3, -2.0, 5.600, +0,0, 725, -22.9, 10.0, -2.5, 8.825, +0,0, 726, -22.5, 10.8, -1.4, 7.819, +0,0, 727, -20.8, 11.6, -1.7, 8.554, +0,0, 728, -19.6, 9.9, -0.6, 6.785, +0,0, 729, -24.0, 11.7, -1.8, 8.975, +0,0, 730, -19.8, 8.5, -1.7, 7.000, +0,0, 731, -21.2, 11.6, -2.0, 8.989, +0,0, 732, -20.3, 10.6, -1.7, 7.601, +0,0, 733, -24.0, 12.7, -2.5, 8.568, +0,0, 734, -21.3, 8.7, -1.4, 6.801, +0,0, 735, -21.7, 12.4, -1.3, 8.764, +0,0, 736, -22.2, 6.8, -2.1, 6.560, +0,0, 737, -23.1, 10.8, -2.1, 8.584, +0,0, 738, -19.4, 7.8, -2.4, 7.204, +0,0, 739, -21.5, 11.4, -2.0, 8.803, +0,0, 740, -23.2, 8.6, -1.1, 6.598, +0,0, 741, -24.2, 11.9, -2.2, 9.676, +0,0, 742, -25.1, 9.8, -2.1, 7.786, +0,0, 743, -21.2, 14.5, -1.5, 9.540, +0,0, 744, -17.7, 10.4, -1.0, 6.228, +0,0, 745, -23.5, 10.5, -2.6, 8.507, +0,0, 746, -21.1, 11.9, -1.6, 7.694, +0,0, 747, -22.3, 14.5, -2.0, 9.516, +0,0, 748, -19.0, 7.9, -1.4, 6.382, +0,0, 749, -23.3, 12.2, -2.7, 8.744, +0,0, 750, -20.3, 8.2, -1.7, 6.551, +0,0, 751, -23.1, 12.2, -1.6, 8.599, +0,0, 752, -21.9, 7.8, -1.7, 6.199, +0,0, 753, -24.9, 10.7, -2.3, 9.237, +0,0, 754, -21.8, 8.4, -2.4, 8.116, +0,0, 755, -21.0, 12.7, -1.6, 8.985, +0,0, 756, -20.2, 7.2, -1.4, 5.891, +0,0, 757, -26.1, 11.4, -1.7, 9.696, +0,0, 758, -22.7, 7.5, -2.0, 6.704, +0,0, 759, -22.3, 12.6, -0.9, 8.729, +0,0, 760, -17.6, 10.7, -2.2, 7.167, +0,0, 761, -23.6, 10.5, -2.5, 8.182, +0,0, 762, -19.6, 9.7, -2.1, 7.489, +0,0, 763, -23.9, 15.7, -1.0, 9.613, +0,0, 764, -20.4, 6.7, -2.0, 6.572, +0,0, 765, -22.1, 11.4, -2.3, 8.160, +0,0, 766, -22.8, 7.3, -2.1, 7.116, +0,0, 767, -18.9, 12.9, -1.2, 8.246, +0,0, 768, -20.7, 7.4, -1.3, 6.417, +0,0, 769, -23.1, 9.8, -2.1, 8.830, +0,0, 770, -23.7, 8.5, -3.1, 8.602, +0,0, 771, -25.6, 11.2, -2.5, 9.081, +0,0, 772, -22.6, 8.8, -1.3, 6.737, +0,0, 773, -27.0, 11.0, -2.8, 9.511, +0,0, 774, -20.1, 10.5, -1.6, 7.778, +0,0, 775, -23.2, 11.6, -1.2, 8.000, +0,0, 776, -21.1, 10.1, -2.1, 8.048, +0,0, 777, -23.6, 11.2, -1.9, 8.480, +0,0, 778, -21.2, 8.2, -2.6, 7.642, +0,0, 779, -20.7, 14.0, -1.1, 9.358, +0,0, 780, -20.8, 6.3, -2.2, 6.623, +0,0, 781, -22.7, 12.5, -2.1, 8.654, +0,0, 782, -22.1, 10.1, -2.1, 7.422, +0,0, 783, -22.4, 12.2, -1.3, 8.068, +0,0, 784, -21.9, 7.7, -1.7, 6.535, +0,0, 785, -21.7, 11.4, -1.1, 8.566, +0,0, 786, -23.7, 9.8, -2.6, 8.055, +0,0, 787, -18.1, 12.8, -0.8, 7.620, +0,0, 788, -21.6, 7.5, -2.5, 6.591, +0,0, 789, -23.9, 24.9, -1.2, 8.807, +0,0, 790, -21.2, 9.2, -1.1, 6.828, +0,0, 791, -22.7, 12.3, -1.2, 8.840, +0,0, 792, -18.1, 5.8, -2.2, 6.022, +0,0, 793, -23.3, 9.9, -2.2, 8.040, +0,0, 794, -21.8, 10.9, -0.6, 7.099, +0,0, 795, -20.3, 12.7, -1.5, 8.841, +0,0, 796, -20.3, 7.5, -2.1, 6.742, +0,0, 797, -24.7, 10.8, -1.5, 8.141, +0,0, 798, -20.3, 9.8, -1.7, 6.977, +0,0, 799, -21.7, 14.8, -1.7, 8.146, +0,0, 800, -20.7, 11.3, -1.7, 7.079, +0,0, 801, -27.7, 10.3, -2.5, 8.893, +0,0, 802, -20.5, 10.9, -1.1, 7.052, +0,0, 803, -25.5, 13.2, -2.1, 8.098, +0,0, 804, -21.3, 7.0, -2.2, 6.601, +0,0, 805, -23.4, 11.6, -2.9, 9.220, +0,0, 806, -22.0, 9.7, -1.1, 7.281, +0,0, 807, -25.7, 12.1, -1.9, 9.055, +0,0, 808, -18.2, 8.8, -0.7, 6.628, +0,0, 809, -22.1, 12.2, -1.2, 8.159, +0,0, 810, -22.2, 11.1, -1.8, 7.437, +0,0, 811, -21.0, 12.1, -1.6, 8.866, +0,0, 812, -19.2, 6.8, -2.2, 6.336, +0,0, 813, -19.3, 14.2, -1.6, 8.954, +0,0, 814, -20.8, 8.5, -1.9, 6.736, +0,0, 815, -25.4, 16.6, -1.4, 8.782, +0,0, 816, -20.4, 9.4, -2.1, 6.515, +0,0, 817, -22.2, 14.0, -2.4, 8.902, +0,0, 818, -15.9, 9.0, -1.8, 5.705, +0,0, 819, -22.3, 12.5, -1.7, 8.268, +0,0, 820, -22.4, 7.0, -2.1, 6.811, +0,0, 821, -22.6, 11.5, -1.9, 8.318, +0,0, 822, -20.3, 10.6, -1.0, 7.944, +0,0, 823, -23.5, 12.0, -1.5, 8.423, +0,0, 824, -22.2, 9.9, -1.6, 7.564, +0,0, 825, -21.1, 13.2, -0.9, 8.599, +0,0, 826, -19.1, 8.7, -1.8, 7.085, +0,0, 827, -20.8, 11.4, -1.8, 8.386, +0,0, 828, -19.9, 9.8, -1.5, 6.710, +0,0, 829, -21.7, 11.8, -1.3, 8.304, +0,0, 830, -24.2, 11.5, -2.3, 8.051, +0,0, 831, -20.6, 10.2, -1.9, 7.711, +0,0, 832, -20.5, 7.8, -2.1, 6.866, +0,0, 833, -27.4, 9.4, -2.8, 8.556, +0,0, 834, -20.7, 7.5, -2.7, 6.845, +0,0, 835, -22.8, 11.4, -1.8, 7.908, +0,0, 836, -23.4, 7.3, -2.2, 7.118, +0,0, 837, -21.9, 12.6, -1.6, 8.167, +0,0, 838, -20.2, 11.0, -1.3, 8.354, +0,0, 839, -23.6, 11.8, -1.6, 8.632, +0,0, 840, -17.2, 8.2, -1.4, 6.228, +0,0, 841, -19.6, 13.9, -1.2, 8.446, +0,0, 842, -21.3, 9.1, -1.4, 6.696, +0,0, 843, -33.5, 23.2, -2.4, 10.913, -33.5,-30.2,-30.0,-27.8,-24.1,-22.7,-20.2,-19.7,-19.6,-19.5,-19.3,-19.1,-19.1,-18.2,-17.7,-17.7,-17.4,-16.1,-15.8,-15.7,-14.5,-13.2,-13.2,-12.6,-11.9,-11.7,-11.1,-11.0,-10.0,-9.6,-9.4,-8.6,-8.4,-7.2,-7.0,-6.7,-6.5,-6.5,-5.9,-5.9,-5.9,-5.8,-5.3,-4.5,-4.3,-4.3,-4.2,-3.9,-3.5,-3.3,-3.3,-3.2,-3.0,-2.9,-2.0,-1.4,-1.2,-0.8,-0.8,-0.7,-0.4,-0.2,0.0,0.0,0.1,0.1,0.2,0.3,0.6,0.6,0.7,1.0,1.0,1.2,1.4,1.7,1.8,1.8,1.9,2.0,2.2,2.5,2.8,3.0,3.1,3.4,3.4,3.6,3.9,3.9,4.3,4.9,5.7,6.1,6.2,6.3,6.5,6.6,6.7,6.8,6.8,7.0,7.1,7.5,8.0,8.0,8.1,8.2,8.8,8.9,9.1,9.2,9.4,9.5,9.9,9.9,10.0,10.3,10.6,10.8,11.1,15.5,16.6,23.1,23.2, +0,0, 844, -24.8, 7.9, -2.5, 7.417, +0,0, 845, -33.8, 15.9, -0.3, 9.377, -33.8,-17.8,-17.5,-17.5,-17.5,-17.3,-16.9,-16.2,-15.5,-15.3,-14.6,-14.4,-14.0,-13.9,-13.3,-13.1,-13.0,-12.8,-12.8,-12.6,-12.3,-12.2,-11.9,-11.7,-10.8,-10.1,-9.9,-9.4,-9.3,-8.9,-8.7,-8.7,-8.1,-8.1,-7.7,-7.5,-7.3,-7.1,-6.0,-5.9,-4.8,-4.2,-3.6,-3.3,-3.1,-3.1,-3.0,-2.9,-2.9,-2.8,-2.6,-2.5,-2.5,-2.3,-2.0,-1.9,-1.8,-1.6,-1.6,-1.6,-1.5,-1.3,-1.3,-1.1,-1.0,-0.8,-0.7,-0.5,-0.4,-0.4,-0.2,0.0,0.3,0.6,0.8,1.0,1.4,1.5,2.0,2.6,2.7,2.8,3.2,3.3,3.5,3.5,4.0,4.0,4.1,4.1,4.4,4.5,4.5,4.6,4.6,4.8,4.9,5.0,5.1,5.3,5.3,5.3,5.5,5.5,5.6,6.1,6.1,6.2,6.3,6.6,6.7,7.0,7.4,7.6,8.6,8.8,9.0,9.3,9.3,9.5,10.7,10.8,10.9,11.0,11.0,11.2,11.2,11.3,11.4,11.7,11.9,12.4,12.4,13.0,13.0,13.1,13.6,13.9,14.3,14.4,14.4,15.1,15.9, +0,0, 846, -19.1, 10.1, -1.0, 6.722, +0,0, 847, -22.8, 12.7, -1.1, 9.031, +0,0, 848, -15.7, 6.3, -1.5, 5.156, +0,0, 849, -25.0, 11.7, -1.1, 8.185, +0,0, 850, -23.2, 8.8, -2.4, 7.262, +0,0, 851, -23.4, 13.3, -1.7, 9.107, +0,0, 852, -19.2, 7.8, -1.9, 6.385, +0,0, 853, -23.7, 13.9, -1.3, 8.067, +0,0, 854, -22.8, 11.0, -2.6, 8.992, +0,0, 855, -25.8, 10.3, -2.4, 8.296, +0,0, 856, -19.9, 8.6, -1.9, 6.736, +0,0, 857, -24.9, 12.4, -1.8, 8.615, +0,0, 858, -23.8, 8.7, -2.0, 6.868, +0,0, 859, -22.8, 11.4, -2.2, 8.695, +0,0, 860, -21.8, 10.2, -0.9, 7.304, +0,0, 861, -22.5, 11.0, -1.9, 7.956, +0,0, 862, -21.5, 11.6, -1.6, 7.679, +0,0, 863, -22.4, 11.8, -1.1, 8.437, +0,0, 864, -17.9, 6.9, -0.7, 5.208, +0,0, 865, -25.0, 10.9, -1.6, 8.353, +0,0, 866, -21.9, 9.5, -1.3, 7.146, +0,0, 867, -20.7, 12.4, -1.6, 8.614, +0,0, 868, -21.5, 8.2, -2.2, 7.009, +0,0, 869, -28.2, 16.0, -1.0, 8.422, +0,0, 870, -23.4, 13.7, -1.4, 7.523, +0,0, 871, -22.2, 12.2, -1.0, 7.806, +0,0, 872, -21.4, 8.5, -1.5, 6.947, +0,0, 873, -25.7, 11.2, -2.2, 8.863, +0,0, 874, -21.1, 7.4, -2.6, 6.880, +0,0, 875, -20.9, 12.5, -1.8, 8.331, +0,0, 876, -19.1, 6.9, -1.8, 6.344, +0,0, 877, -22.6, 11.3, -1.2, 8.185, +0,0, 878, -21.7, 11.7, -1.3, 7.330, +0,0, 879, -24.2, 11.2, -1.0, 7.818, +0,0, 880, -17.4, 9.0, -1.3, 6.559, +0,0, 881, -22.8, 9.7, -1.4, 7.373, +0,0, 882, -23.1, 8.9, -1.7, 7.422, +0,0, 883, -19.6, 13.6, -0.9, 8.307, +0,0, 884, -19.1, 8.2, -0.8, 5.814, +0,0, 885, -25.1, 10.6, -1.9, 8.275, +0,0, 886, -19.5, 9.2, -1.8, 7.705, +0,0, 887, -24.2, 12.3, -1.4, 9.032, +0,0, 888, -16.9, 7.6, -1.5, 6.356, +0,0, 889, -25.8, 10.9, -1.9, 8.482, +0,0, 890, -18.3, 10.2, -1.6, 6.711, +0,0, 891, -23.0, 13.4, -0.3, 8.271, +0,0, 892, -19.9, 9.0, -2.0, 7.262, +0,0, 893, -25.0, 8.3, -1.9, 7.808, +0,0, 894, -21.8, 12.1, -0.8, 7.735, +0,0, 895, -21.7, 11.9, -0.7, 7.979, +0,0, 896, -18.3, 7.4, -1.2, 5.828, +0,0, 897, -33.0, 21.0, -2.9, 9.979, -33.0,-32.6,-26.0,-25.4,-25.4,-24.9,-24.2,-22.8,-21.4,-19.8,-19.5,-18.0,-17.9,-17.7,-17.5,-17.2,-16.2,-16.0,-15.4,-14.7,-14.7,-14.7,-14.5,-14.2,-14.2,-13.7,-13.6,-13.5,-13.2,-12.9,-12.6,-12.4,-12.2,-11.5,-11.4,-11.2,-11.1,-10.4,-10.0,-10.0,-10.0,-8.1,-7.6,-7.3,-7.0,-7.0,-6.4,-6.1,-5.9,-4.8,-4.1,-3.7,-3.5,-3.1,-3.1,-3.0,-2.9,-2.8,-2.2,-1.8,-1.6,-1.5,-1.4,-1.3,-1.2,-1.2,-1.1,-1.1,-0.9,-0.7,-0.7,-0.4,-0.3,-0.2,0.0,0.0,0.1,0.2,0.2,0.6,0.8,1.0,1.0,1.0,1.1,1.2,1.5,1.7,1.7,1.8,1.8,1.9,2.0,2.0,2.1,2.2,2.4,2.5,2.6,2.9,3.1,3.1,3.2,3.2,3.2,3.3,3.4,3.4,3.5,3.7,3.9,3.9,3.9,4.2,4.2,4.5,4.7,4.9,4.9,5.2,5.7,6.1,6.3,6.5,6.6,6.7,6.8,6.8,6.9,7.2,7.2,7.3,7.5,7.6,7.6,7.7,7.9,7.9,7.9,8.2,8.2,8.3,8.8,8.8,8.8,9.8,10.4,12.9,21.0, +0,0, 898, -25.8, 8.8, -2.7, 8.740, +0,0, 899, -33.0, 15.8, -1.4, 8.309, -33.0,-21.7,-20.9,-17.6,-17.3,-16.8,-16.7,-16.3,-16.1,-15.8,-15.2,-14.8,-14.7,-14.5,-13.9,-13.7,-13.1,-13.1,-12.8,-12.3,-12.3,-12.1,-11.8,-10.7,-10.3,-10.2,-9.9,-9.7,-9.0,-8.2,-8.0,-8.0,-7.7,-7.6,-7.6,-7.2,-7.0,-6.8,-6.2,-5.6,-5.2,-5.1,-4.5,-4.2,-3.5,-3.5,-3.4,-3.1,-2.9,-2.8,-2.7,-2.5,-2.4,-2.3,-2.2,-2.2,-2.2,-2.1,-1.9,-1.5,-1.5,-1.5,-1.3,-1.2,-1.1,-0.6,-0.6,-0.4,-0.4,-0.3,-0.2,-0.1,-0.1,0.0,0.1,0.2,0.3,0.3,0.4,0.5,0.6,0.8,1.2,1.4,1.5,1.5,1.6,1.7,2.0,2.0,2.0,2.0,2.3,2.3,2.4,2.5,2.6,2.6,3.1,3.1,3.2,3.7,3.8,3.8,3.9,4.1,4.1,4.2,4.3,4.3,4.8,4.8,5.1,5.6,5.9,6.3,6.3,6.4,6.6,6.7,6.9,6.9,6.9,7.1,7.2,7.2,7.5,7.6,7.9,7.9,8.0,8.0,8.0,8.1,8.2,8.2,8.5,8.7,9.0,9.1,9.1,9.7,9.9,10.2,10.2,10.5,15.8, +0,0, 900, -25.2, 9.4, -1.3, 7.221, +0,0, 901, -21.2, 9.8, -1.9, 8.189, +0,0, 902, -22.8, 8.6, -2.8, 7.623, +0,0, 903, -23.3, 11.8, -2.1, 9.427, +0,0, 904, -20.5, 8.6, -1.6, 6.883, +0,0, 905, -23.7, 12.7, -2.0, 8.878, +0,0, 906, -22.3, 8.7, -1.3, 6.797, +0,0, 907, -21.4, 13.6, -0.8, 8.607, +0,0, 908, -20.2, 10.1, -2.3, 6.889, +0,0, 909, -24.6, 14.2, -2.6, 9.103, +0,0, 910, -20.0, 8.6, -2.0, 7.470, +0,0, 911, -20.9, 12.6, -2.3, 8.860, +0,0, 912, -20.1, 7.7, -2.2, 6.759, +0,0, 913, -24.4, 11.8, -1.9, 8.448, +0,0, 914, -21.8, 8.5, -1.8, 6.584, +0,0, 915, -25.6, 11.3, -1.8, 8.850, +0,0, 916, -20.0, 7.8, -2.2, 6.482, +0,0, 917, -24.3, 10.9, -1.9, 8.822, +0,0, 918, -20.1, 10.2, -1.3, 7.107, +0,0, 919, -24.3, 12.3, -2.7, 10.264, +0,0, 920, -19.3, 6.8, -2.1, 6.590, +0,0, 921, -22.9, 12.4, -0.9, 8.191, +0,0, 922, -20.8, 10.7, -2.3, 7.953, +0,0, 923, -23.1, 10.6, -2.6, 8.547, +0,0, 924, -14.2, 7.5, -1.1, 5.583, +0,0, 925, -24.0, 12.9, -1.5, 7.941, +0,0, 926, -24.1, 8.7, -1.7, 7.435, +0,0, 927, -19.2, 12.2, -1.3, 8.042, +0,0, 928, -19.1, 7.5, -1.9, 6.899, +0,0, 929, -22.4, 9.9, -1.8, 7.832, +0,0, 930, -22.6, 9.9, -1.9, 7.584, +0,0, 931, -22.0, 13.0, -1.2, 9.244, +0,0, 932, -18.8, 8.3, -1.7, 6.483, +0,0, 933, -24.8, 12.7, -2.1, 9.049, +0,0, 934, -22.1, 9.4, -1.0, 7.168, +0,0, 935, -22.6, 12.3, -1.7, 9.411, +0,0, 936, -20.3, 7.4, -1.3, 5.762, +0,0, 937, -23.6, 11.7, -1.3, 8.538, +0,0, 938, -19.3, 9.9, -2.2, 7.785, +0,0, 939, -24.7, 9.9, -2.0, 8.157, +0,0, 940, -18.1, 5.0, -1.4, 5.078, +0,0, 941, -20.0, 11.9, -1.2, 8.609, +0,0, 942, -21.6, 8.7, -1.9, 6.976, +0,0, 943, -21.0, 14.6, -0.9, 8.482, +0,0, 944, -20.8, 6.6, -2.3, 6.207, +0,0, 945, -22.1, 10.3, -1.7, 7.250, +0,0, 946, -22.1, 9.6, -1.3, 7.078, +0,0, 947, -24.1, 11.4, -1.2, 9.193, +0,0, 948, -17.3, 9.3, -0.8, 5.691, +0,0, 949, -24.5, 11.8, -1.4, 8.366, +0,0, 950, -19.6, 7.9, -1.8, 7.016, +0,0, 951, -23.2, 17.1, -2.0, 9.737, +0,0, 952, -18.9, 8.1, -1.4, 6.551, +0,0, 953, -37.7, 16.4, -3.4, 10.175, -37.7,-35.9,-34.3,-25.5,-24.8,-23.2,-23.2,-22.7,-18.9,-17.9,-17.0,-16.9,-16.9,-16.8,-16.7,-16.7,-16.6,-16.5,-15.7,-15.5,-14.9,-14.0,-14.0,-13.6,-12.9,-12.8,-12.5,-11.9,-11.7,-10.6,-10.6,-10.5,-10.5,-9.7,-9.1,-9.1,-9.1,-8.6,-8.5,-7.5,-7.4,-7.2,-7.2,-7.2,-6.9,-6.4,-6.2,-6.0,-6.0,-5.1,-4.3,-3.7,-3.2,-2.9,-2.8,-2.3,-2.3,-2.1,-2.0,-2.0,-1.9,-1.8,-1.7,-1.2,-1.1,-1.1,-0.2,0.0,0.1,0.3,0.3,0.3,0.4,0.5,0.6,0.7,0.8,1.0,1.1,1.1,1.1,1.1,1.2,1.2,1.4,1.5,1.6,1.7,1.8,1.9,2.2,2.2,2.3,2.3,2.5,2.6,2.7,2.8,2.8,2.9,2.9,3.0,3.8,3.9,4.6,4.7,4.8,5.5,5.5,5.6,5.7,6.2,6.4,6.7,6.7,7.0,7.1,7.2,7.3,7.4,7.4,7.5,7.6,7.8,7.9,8.1,8.1,8.4,8.7,9.2,9.2,9.4,9.4,14.9,16.4, +0,0, 954, -19.6, 10.1, -1.4, 7.265, +0,0, 955, -21.4, 11.7, -2.1, 8.241, +0,0, 956, -21.2, 6.1, -2.2, 6.660, +0,0, 957, -24.0, 10.1, -2.3, 8.368, +0,0, 958, -21.8, 8.2, -2.3, 7.722, +0,0, 959, -21.5, 13.2, -1.8, 9.006, +0,0, 960, -23.7, 6.6, -2.3, 6.848, +0,0, 961, -25.0, 10.6, -1.6, 7.833, +0,0, 962, -21.6, 14.1, -1.3, 7.578, +0,0, 963, -25.7, 13.8, -2.2, 9.818, +0,0, 964, -22.2, 9.1, -1.9, 7.227, +0,0, 965, -18.8, 12.3, -1.5, 7.882, +0,0, 966, -21.1, 7.2, -2.1, 6.515, +0,0, 967, -22.2, 12.8, -2.1, 9.317, +0,0, 968, -21.3, 8.2, -1.8, 7.243, +0,0, 969, -26.5, 10.9, -2.1, 9.443, +0,0, 970, -19.4, 8.8, -1.8, 7.269, +0,0, 971, -20.6, 12.6, -0.6, 7.913, +0,0, 972, -23.5, 9.7, -2.1, 7.088, +0,0, 973, -21.6, 10.6, -1.7, 8.442, +0,0, 974, -21.5, 9.5, -2.2, 7.741, +0,0, 975, -23.0, 12.6, -1.7, 8.713, +0,0, 976, -19.6, 8.2, -1.9, 6.957, +0,0, 977, -21.4, 15.1, -1.8, 8.171, +0,0, 978, -22.0, 13.3, -2.4, 7.826, +0,0, 979, -23.1, 10.9, -1.5, 8.750, +0,0, 980, -21.4, 8.4, -1.3, 6.486, +0,0, 981, -22.9, 11.1, -1.6, 8.423, +0,0, 982, -21.8, 9.7, -1.6, 7.648, +0,0, 983, -22.1, 12.1, -1.7, 8.701, +0,0, 984, -18.0, 8.6, -0.6, 6.538, +0,0, 985, -26.0, 11.1, -2.3, 8.904, +0,0, 986, -22.0, 8.1, -2.4, 7.143, +0,0, 987, -23.8, 12.6, -1.6, 8.849, +0,0, 988, -21.8, 8.3, -1.7, 7.114, +0,0, 989, -24.6, 11.2, -2.4, 9.300, +0,0, 990, -18.6, 10.0, -0.7, 7.081, +0,0, 991, -24.9, 10.1, -2.1, 8.956, +0,0, 992, -16.8, 7.2, -1.2, 5.865, +0,0, 993, -23.3, 9.5, -1.6, 8.293, +0,0, 994, -21.3, 8.9, -1.6, 7.252, +0,0, 995, -21.8, 9.0, -2.2, 7.766, +0,0, 996, -17.9, 8.9, -1.0, 6.960, +0,0, 997, -26.5, 10.4, -3.3, 8.783, +0,0, 998, -16.0, 9.5, -1.0, 6.319, +0,0, 999, -27.7, 9.3, -1.9, 7.890, +0,0, 1000, -17.7, 8.4, -1.7, 6.649, +0,0, 1001, -23.6, 11.5, -0.8, 8.384, +0,0, 1002, -17.7, 9.4, -0.7, 6.644, +0,0, 1003, -24.2, 10.4, -2.4, 8.620, +0,0, 1004, -22.2, 9.3, -2.2, 8.051, +0,0, 1005, -27.7, 19.4, -1.9, 8.597, +0,0, 1006, -18.6, 9.5, -1.3, 7.241, +0,0, 1007, -29.7, 13.6, -0.9, 8.736, +0,0, 1008, -23.1, 9.6, -1.6, 7.128, +0,0, 1009, -27.7, 8.9, -3.0, 8.668, +0,0, 1010, -19.5, 7.1, -1.4, 5.813, +0,0, 1011, -18.5, 12.4, -0.4, 7.920, +0,0, 1012, -24.5, 12.7, -0.9, 8.433, +0,0, 1013, -19.9, 15.0, -0.9, 8.635, +0,0, 1014, -21.9, 9.0, -1.5, 6.560, +0,0, 1015, -22.3, 13.1, -1.4, 8.650, +0,0, 1016, -25.1, 12.3, -2.1, 7.632, +0,0, 1017, -24.3, 18.5, -0.9, 10.308, +0,0, 1018, -23.5, 12.9, -2.3, 7.508, +0,0, 1019, -24.9, 13.4, -1.4, 8.280, +0,0, 1020, -21.4, 12.4, -2.0, 7.882, +0,0, 1021, -30.1, 12.2, -1.0, 6.818, -30.1,-21.2,-16.3,-15.0,-14.9,-14.2,-13.7,-12.7,-11.6,-11.5,-10.8,-10.7,-10.5,-10.0,-9.9,-9.9,-9.4,-9.4,-8.9,-8.8,-8.8,-8.4,-8.2,-8.0,-7.7,-7.6,-7.5,-7.3,-7.3,-7.1,-6.8,-6.7,-6.7,-6.3,-5.9,-5.6,-5.3,-4.5,-4.3,-4.3,-4.0,-3.9,-3.5,-3.2,-3.2,-3.1,-3.0,-2.9,-2.7,-2.7,-2.6,-2.6,-2.6,-2.4,-1.9,-1.9,-1.9,-1.7,-1.7,-1.6,-1.3,-0.8,-0.8,-0.7,-0.7,-0.6,-0.4,-0.3,-0.3,-0.3,-0.2,-0.2,0.0,0.0,0.0,0.1,0.2,0.2,0.4,0.5,0.7,1.0,1.1,1.2,1.3,1.3,1.4,1.5,1.5,1.6,1.6,2.0,2.2,2.2,2.3,2.3,2.3,2.6,2.7,3.0,3.1,3.2,3.3,3.4,3.4,3.7,3.7,3.8,3.8,3.9,4.1,4.1,4.1,4.3,4.4,4.6,4.6,4.7,4.8,4.8,5.3,5.5,5.5,5.6,5.9,6.0,6.1,6.3,6.8,6.8,7.0,7.0,7.2,7.6,7.7,7.9,8.0,8.2,8.6,8.9,9.1,9.1,10.0,10.5,12.2, +0,0, 1022, -25.7, 10.5, -1.1, 7.909, +0,0, 1023, -25.7, 11.4, -2.7, 8.623, +0,2, 0, -17.3, 10.2, -0.9, 6.480, +0,2, 1, -24.6, 10.5, -2.7, 8.608, +0,2, 2, -24.7, 11.2, -2.2, 8.027, +0,2, 3, -26.6, 11.6, -1.8, 8.390, +0,2, 4, -22.9, 7.0, -2.7, 7.232, +0,2, 5, -25.1, 11.0, -1.9, 8.657, +0,2, 6, -19.5, 13.8, -1.5, 7.659, +0,2, 7, -25.3, 11.3, -2.2, 8.542, +0,2, 8, -22.0, 10.8, -2.1, 7.875, +0,2, 9, -20.0, 10.7, -1.4, 8.350, +0,2, 10, -22.3, 9.1, -2.4, 7.570, +0,2, 11, -24.6, 12.7, -1.6, 8.468, +0,2, 12, -24.9, 7.1, -2.9, 7.386, +0,2, 13, -23.1, 9.1, -1.7, 7.654, +0,2, 14, -22.2, 9.0, -2.5, 8.269, +0,2, 15, -26.6, 25.6, -2.1, 10.588, +0,2, 16, -19.6, 8.8, -1.2, 6.630, +0,2, 17, -25.0, 15.1, -3.0, 9.175, +0,2, 18, -18.7, 8.6, -1.5, 6.313, +0,2, 19, -28.2, 9.4, -2.9, 8.192, +0,2, 20, -23.6, 8.7, -2.5, 8.077, +0,2, 21, -20.6, 13.6, -1.1, 8.634, +0,2, 22, -19.6, 7.9, -1.5, 5.698, +0,2, 23, -24.0, 13.4, -1.2, 9.821, +0,2, 24, -22.4, 10.4, -1.6, 6.920, +0,2, 25, -26.8, 11.5, -1.7, 9.044, +0,2, 26, -19.8, 8.7, -1.8, 7.162, +0,2, 27, -24.2, 11.4, -3.0, 9.445, +0,2, 28, -20.1, 7.9, -1.8, 6.664, +0,2, 29, -25.3, 13.2, -1.0, 8.687, +0,2, 30, -24.0, 9.1, -2.0, 7.164, +0,2, 31, -26.2, 11.2, -2.7, 9.446, +0,2, 32, -20.1, 9.4, -1.5, 7.047, +0,2, 33, -22.8, 9.3, -3.0, 8.575, +0,2, 34, -20.2, 8.8, -1.4, 6.957, +0,2, 35, -26.0, 10.8, -2.9, 9.489, +0,2, 36, -20.9, 6.8, -2.4, 6.795, +0,2, 37, -26.5, 11.0, -2.6, 8.761, +0,2, 38, -21.4, 8.0, -2.0, 6.926, +0,2, 39, -24.9, 12.4, -1.8, 9.436, +0,2, 40, -20.7, 8.3, -1.3, 6.729, +0,2, 41, -22.1, 11.3, -1.9, 8.812, +0,2, 42, -18.0, 9.2, -1.7, 6.785, +0,2, 43, -24.5, 12.8, -2.6, 9.762, +0,2, 44, -20.9, 10.5, -1.5, 7.878, +0,2, 45, -24.7, 10.3, -2.2, 8.731, +0,2, 46, -20.5, 12.0, -2.4, 7.498, +0,2, 47, -25.0, 13.0, -2.6, 9.758, +0,2, 48, -21.0, 9.4, -1.6, 6.836, +0,2, 49, -25.5, 11.8, -3.1, 9.918, +0,2, 50, -18.0, 7.2, -1.3, 6.410, +0,2, 51, -25.3, 12.5, -1.7, 9.397, +0,2, 52, -25.5, 6.7, -2.8, 7.715, +0,2, 53, -21.5, 9.4, -1.9, 7.542, +0,2, 54, -18.7, 9.7, -1.4, 7.301, +0,2, 55, -24.5, 12.1, -2.3, 9.977, +0,2, 56, -22.6, 6.7, -2.7, 7.302, +0,2, 57, -22.3, 12.6, -1.8, 9.637, +0,2, 58, -20.8, 7.9, -2.1, 7.389, +0,2, 59, -24.3, 12.0, -2.6, 9.850, +0,2, 60, -18.9, 7.6, -1.9, 6.186, +0,2, 61, -25.0, 10.9, -2.3, 8.317, +0,2, 62, -22.3, 10.3, -2.7, 7.594, +0,2, 63, -26.0, 11.5, -1.9, 8.417, +0,2, 64, -25.4, 6.4, -3.1, 7.727, +0,2, 65, -22.6, 12.6, -1.6, 8.605, +0,2, 66, -21.6, 5.9, -2.1, 6.444, +0,2, 67, -26.3, 11.4, -2.6, 9.444, +0,2, 68, -21.4, 8.4, -2.0, 6.972, +0,2, 69, -37.1, 19.7, -2.7, 9.386, -37.1,-28.8,-25.3,-23.6,-21.7,-21.2,-21.0,-20.5,-20.4,-18.2,-18.1,-17.8,-17.5,-16.8,-16.8,-16.6,-16.4,-15.9,-14.7,-13.8,-13.6,-12.4,-12.3,-11.9,-11.5,-11.3,-11.3,-11.2,-11.1,-10.1,-10.0,-10.0,-9.9,-9.6,-9.6,-8.7,-7.4,-6.7,-6.6,-6.2,-5.5,-5.4,-5.2,-5.2,-5.0,-4.9,-4.4,-3.6,-3.0,-2.6,-2.5,-2.5,-1.8,-1.6,-1.4,-1.3,-1.2,-1.1,-0.9,-0.9,-0.9,-0.9,-0.8,-0.7,-0.3,-0.3,-0.0,-0.0,-0.0,0.0,0.1,0.1,0.2,0.2,0.3,0.3,0.4,0.4,0.4,0.5,1.0,1.1,1.1,1.1,1.2,1.3,1.4,1.6,1.7,1.7,1.8,1.8,1.9,2.0,2.0,2.0,2.0,2.2,2.4,2.6,2.9,3.0,3.1,3.4,3.5,3.5,3.7,3.9,4.2,4.6,4.6,5.0,5.2,5.2,5.2,5.3,5.6,5.7,5.9,5.9,6.3,6.5,6.6,7.0,7.3,7.3,7.5,7.7,8.1,8.7,8.8,8.8,8.9,9.3,9.4,9.9,10.8,10.9,19.7, +0,2, 70, -22.2, 9.2, -2.5, 8.205, +0,2, 71, -23.1, 15.7, -1.8, 9.366, +0,2, 72, -20.6, 8.2, -1.9, 6.978, +0,2, 73, -21.3, 12.0, -1.5, 8.849, +0,2, 74, -21.2, 8.3, -2.3, 7.446, +0,2, 75, -25.6, 12.5, -2.0, 9.033, +0,2, 76, -19.8, 10.3, -0.7, 7.221, +0,2, 77, -27.0, 10.6, -2.2, 8.357, +0,2, 78, -23.2, 7.9, -2.0, 7.460, +0,2, 79, -24.9, 12.6, -1.3, 7.932, +0,2, 80, -23.4, 6.8, -2.8, 7.250, +0,2, 81, -22.7, 12.2, -1.9, 8.970, +0,2, 82, -23.6, 7.1, -2.3, 7.086, +0,2, 83, -22.4, 12.0, -1.6, 9.096, +0,2, 84, -19.0, 10.6, -1.0, 7.121, +0,2, 85, -23.6, 9.8, -1.7, 8.019, +0,2, 86, -22.0, 9.2, -2.0, 7.684, +0,2, 87, -24.3, 12.3, -1.4, 9.098, +0,2, 88, -16.4, 9.7, -1.7, 6.373, +0,2, 89, -28.0, 10.9, -2.6, 9.492, +0,2, 90, -21.6, 9.1, -2.0, 6.881, +0,2, 91, -24.6, 11.2, -2.5, 8.684, +0,2, 92, -22.3, 11.7, -1.5, 7.446, +0,2, 93, -22.6, 8.4, -2.6, 7.650, +0,2, 94, -22.3, 9.5, -1.9, 7.992, +0,2, 95, -22.3, 12.9, -0.5, 8.078, +0,2, 96, -24.9, 6.0, -3.3, 7.496, +0,2, 97, -22.8, 11.9, -2.5, 8.943, +0,2, 98, -22.0, 7.4, -2.2, 7.016, +0,2, 99, -26.7, 10.9, -3.1, 9.557, +0,2, 100, -19.4, 14.2, -0.8, 7.140, +0,2, 101, -24.2, 12.9, -1.6, 8.676, +0,2, 102, -21.7, 11.3, -2.4, 8.234, +0,2, 103, -23.1, 11.9, -1.5, 8.549, +0,2, 104, -17.6, 7.4, -2.0, 6.206, +0,2, 105, -24.8, 11.3, -2.8, 9.726, +0,2, 106, -17.5, 7.4, -1.0, 6.378, +0,2, 107, -22.5, 12.3, -1.0, 8.693, +0,2, 108, -20.5, 9.0, -1.7, 7.004, +0,2, 109, -24.7, 10.4, -2.1, 8.159, +0,2, 110, -21.6, 9.2, -1.2, 6.243, +0,2, 111, -23.2, 12.1, -1.2, 8.618, +0,2, 112, -24.6, 6.9, -2.8, 7.893, +0,2, 113, -19.7, 11.4, -1.4, 7.785, +0,2, 114, -23.0, 8.4, -2.4, 7.733, +0,2, 115, -24.7, 10.8, -1.6, 8.627, +0,2, 116, -18.6, 11.0, -1.2, 6.720, +0,2, 117, -23.5, 13.2, -0.8, 8.986, +0,2, 118, -20.0, 13.6, -1.7, 7.452, +0,2, 119, -25.9, 9.7, -2.4, 8.302, +0,2, 120, -21.6, 9.2, -1.9, 7.126, +0,2, 121, -22.2, 12.0, -1.4, 8.858, +0,2, 122, -21.7, 8.2, -1.3, 6.632, +0,2, 123, -24.4, 26.6, -1.3, 9.902, +0,2, 124, -19.8, 8.1, -1.6, 6.781, +0,2, 125, -27.4, 15.0, -2.7, 8.481, +0,2, 126, -17.0, 7.7, -1.1, 5.907, +0,2, 127, -26.1, 10.2, -2.3, 9.037, +0,2, 128, -24.3, 6.9, -2.6, 7.425, +0,2, 129, -22.0, 12.4, -1.7, 8.998, +0,2, 130, -21.1, 5.3, -2.6, 6.300, +0,2, 131, -23.6, 12.4, -1.5, 9.083, +0,2, 132, -24.2, 7.3, -1.2, 6.581, +0,2, 133, -23.5, 10.7, -1.6, 8.360, +0,2, 134, -20.1, 11.9, -0.1, 7.583, +0,2, 135, -23.1, 12.4, -2.4, 8.746, +0,2, 136, -24.0, 7.2, -2.8, 7.814, +0,2, 137, -22.8, 13.0, -1.8, 9.403, +0,2, 138, -20.6, 7.8, -2.5, 6.465, +0,2, 139, -23.3, 12.2, -1.4, 9.114, +0,2, 140, -20.5, 8.6, -1.9, 6.887, +0,2, 141, -25.8, 10.6, -2.5, 8.081, +0,2, 142, -20.7, 10.1, -2.0, 7.151, +0,2, 143, -21.7, 11.3, -1.6, 8.654, +0,2, 144, -24.0, 7.6, -2.4, 7.401, +0,2, 145, -20.4, 14.8, -0.8, 9.408, +0,2, 146, -21.1, 8.6, -2.5, 7.454, +0,2, 147, -23.0, 11.8, -1.5, 8.038, +0,2, 148, -19.5, 9.2, -1.0, 6.732, +0,2, 149, -25.7, 10.1, -2.4, 8.937, +0,2, 150, -19.6, 11.1, -1.1, 7.933, +0,2, 151, -22.3, 11.4, -1.8, 8.693, +0,2, 152, -22.4, 9.8, -1.9, 7.587, +0,2, 153, -21.8, 11.3, -1.8, 8.763, +0,2, 154, -18.0, 11.9, -1.6, 6.717, +0,2, 155, -22.8, 10.7, -1.5, 9.017, +0,2, 156, -22.3, 10.8, -1.3, 7.880, +0,2, 157, -23.9, 8.4, -2.3, 7.758, +0,2, 158, -15.0, 7.2, -1.2, 5.706, +0,2, 159, -25.3, 9.6, -2.3, 8.923, +0,2, 160, -24.9, 8.1, -2.8, 7.822, +0,2, 161, -21.4, 13.1, -0.5, 8.554, +0,2, 162, -22.4, 7.2, -1.7, 7.109, +0,2, 163, -27.1, 11.2, -2.4, 8.677, +0,2, 164, -20.1, 9.5, -1.7, 7.201, +0,2, 165, -24.0, 10.3, -1.9, 9.293, +0,2, 166, -17.5, 12.2, -0.7, 7.518, +0,2, 167, -26.6, 12.8, -1.8, 9.188, +0,2, 168, -23.7, 7.9, -1.8, 7.249, +0,2, 169, -23.9, 12.7, -2.1, 9.121, +0,2, 170, -19.3, 7.6, -1.9, 5.924, +0,2, 171, -24.6, 11.1, -2.1, 9.068, +0,2, 172, -17.3, 10.3, -1.2, 6.678, +0,2, 173, -23.6, 9.6, -2.7, 7.845, +0,2, 174, -21.3, 9.1, -1.4, 6.989, +0,2, 175, -23.5, 10.9, -1.9, 9.678, +0,2, 176, -22.1, 6.8, -2.2, 7.326, +0,2, 177, -18.9, 19.3, -0.5, 8.393, +0,2, 178, -22.7, 7.5, -2.3, 7.266, +0,2, 179, -23.4, 18.9, -0.9, 8.900, +0,2, 180, -22.8, 6.5, -1.8, 6.514, +0,2, 181, -21.0, 10.2, -1.0, 8.434, +0,2, 182, -16.7, 12.6, -0.7, 6.689, +0,2, 183, -26.4, 11.4, -2.6, 9.125, +0,2, 184, -22.1, 8.6, -2.2, 7.664, +0,2, 185, -24.0, 11.0, -1.9, 8.529, +0,2, 186, -21.5, 7.4, -1.7, 6.938, +0,2, 187, -26.3, 11.1, -2.7, 9.106, +0,2, 188, -23.0, 7.9, -1.8, 7.364, +0,2, 189, -22.9, 10.3, -2.1, 8.523, +0,2, 190, -18.6, 8.2, -1.3, 6.490, +0,2, 191, -25.5, 12.2, -1.6, 9.372, +0,2, 192, -25.8, 7.3, -2.4, 7.800, +0,2, 193, -23.4, 14.0, -0.9, 8.522, +0,2, 194, -24.6, 8.0, -2.7, 7.465, +0,2, 195, -23.8, 10.1, -3.0, 8.399, +0,2, 196, -20.1, 8.0, -1.9, 6.529, +0,2, 197, -25.8, 9.1, -2.4, 9.642, +0,2, 198, -23.8, 9.2, -1.6, 7.522, +0,2, 199, -24.9, 11.4, -2.7, 8.933, +0,2, 200, -23.1, 6.7, -2.2, 6.637, +0,2, 201, -21.8, 11.0, -2.0, 8.127, +0,2, 202, -22.3, 9.4, -1.4, 7.382, +0,2, 203, -25.9, 11.3, -2.3, 8.931, +0,2, 204, -19.7, 10.9, -1.9, 7.880, +0,2, 205, -25.7, 13.6, -1.8, 8.258, +0,2, 206, -20.7, 8.5, -1.6, 6.247, +0,2, 207, -25.4, 16.0, -1.7, 9.464, +0,2, 208, -23.7, 12.8, -2.8, 7.789, +0,2, 209, -23.6, 13.2, -1.4, 8.542, +0,2, 210, -23.9, 8.1, -2.4, 7.370, +0,2, 211, -21.4, 12.7, -2.1, 8.694, +0,2, 212, -21.7, 7.9, -1.6, 6.609, +0,2, 213, -24.7, 10.6, -1.7, 9.640, +0,2, 214, -17.8, 10.2, -0.5, 7.194, +0,2, 215, -23.9, 11.4, -2.3, 8.032, +0,2, 216, -23.1, 9.4, -2.2, 7.577, +0,2, 217, -23.6, 11.7, -1.9, 9.121, +0,2, 218, -18.4, 7.4, -1.7, 6.550, +0,2, 219, -28.5, 11.8, -3.2, 9.473, +0,2, 220, -20.8, 7.6, -1.8, 7.220, +0,2, 221, -26.1, 10.9, -2.2, 8.487, +0,2, 222, -18.9, 7.2, -1.9, 6.367, +0,2, 223, -26.7, 14.5, -2.7, 9.979, +0,2, 224, -19.1, 10.7, -2.2, 7.078, +0,2, 225, -23.6, 16.2, -0.7, 9.383, +0,2, 226, -22.7, 11.4, -2.8, 7.073, +0,2, 227, -27.2, 9.8, -2.9, 8.857, +0,2, 228, -20.7, 8.3, -1.6, 6.849, +0,2, 229, -26.4, 11.8, -1.3, 10.299, +0,2, 230, -18.3, 9.1, -1.2, 6.870, +0,2, 231, -23.5, 23.7, -1.9, 9.125, +0,2, 232, -23.2, 7.3, -2.1, 6.552, +0,2, 233, -24.0, 11.8, -2.5, 9.374, +0,2, 234, -20.7, 7.9, -1.7, 7.032, +0,2, 235, -25.6, 11.3, -2.5, 9.617, +0,2, 236, -24.3, 8.2, -2.5, 7.568, +0,2, 237, -23.3, 11.2, -2.3, 8.828, +0,2, 238, -18.4, 8.1, -2.0, 6.757, +0,2, 239, -24.6, 9.6, -2.9, 9.008, +0,2, 240, -23.2, 9.3, -2.4, 7.600, +0,2, 241, -23.1, 11.2, -2.1, 8.307, +0,2, 242, -24.5, 8.3, -3.4, 8.005, +0,2, 243, -21.6, 12.4, -2.2, 8.507, +0,2, 244, -23.0, 9.4, -2.5, 7.615, +0,2, 245, -21.7, 9.4, -2.4, 8.918, +0,2, 246, -23.9, 8.3, -2.5, 7.610, +0,2, 247, -24.0, 13.1, -2.1, 9.201, +0,2, 248, -21.6, 6.4, -1.8, 6.506, +0,2, 249, -18.9, 12.9, -1.2, 8.635, +0,2, 250, -20.7, 7.9, -1.8, 7.150, +0,2, 251, -26.1, 9.9, -2.3, 8.961, +0,2, 252, -22.0, 10.0, -1.5, 7.873, +0,2, 253, -22.2, 10.0, -2.1, 8.151, +0,2, 254, -24.1, 7.7, -2.2, 6.946, +0,2, 255, -24.0, 10.2, -1.7, 8.644, +0,2, 256, -21.8, 6.9, -2.1, 6.999, +0,2, 257, -19.9, 10.8, -2.1, 8.061, +0,2, 258, -25.7, 9.7, -1.7, 7.824, +0,2, 259, -25.4, 10.4, -2.4, 8.584, +0,2, 260, -26.3, 10.4, -2.8, 8.510, +0,2, 261, -23.7, 13.1, -2.0, 9.946, +0,2, 262, -22.4, 9.9, -2.4, 7.104, +0,2, 263, -24.3, 11.7, -1.0, 8.249, +0,2, 264, -25.2, 8.1, -2.1, 7.933, +0,2, 265, -21.9, 13.9, -1.3, 8.779, +0,2, 266, -20.9, 7.3, -1.3, 6.862, +0,2, 267, -23.4, 13.6, -1.8, 10.006, +0,2, 268, -20.0, 8.6, -0.9, 6.325, +0,2, 269, -20.3, 14.4, -1.2, 8.618, +0,2, 270, -26.0, 8.6, -2.0, 7.025, +0,2, 271, -23.5, 11.8, -2.0, 9.385, +0,2, 272, -21.6, 8.3, -1.5, 7.239, +0,2, 273, -23.0, 10.0, -2.0, 8.161, +0,2, 274, -22.4, 9.6, -1.4, 7.404, +0,2, 275, -21.2, 11.8, -1.2, 8.647, +0,2, 276, -23.4, 9.7, -2.6, 7.155, +0,2, 277, -23.8, 11.7, -2.1, 8.603, +0,2, 278, -26.0, 8.5, -2.4, 7.604, +0,2, 279, -24.1, 13.0, -1.9, 9.787, +0,2, 280, -22.1, 8.5, -2.2, 7.690, +0,2, 281, -20.3, 11.2, -2.1, 8.603, +0,2, 282, -20.2, 9.2, -1.7, 7.701, +0,2, 283, -24.1, 13.0, -2.3, 9.429, +0,2, 284, -24.7, 7.9, -1.9, 6.881, +0,2, 285, -21.9, 12.9, -2.0, 8.667, +0,2, 286, -20.2, 8.4, -1.9, 6.557, +0,2, 287, -23.1, 11.7, -2.2, 9.105, +0,2, 288, -21.5, 9.7, -1.1, 6.837, +0,2, 289, -23.7, 12.1, -1.6, 8.510, +0,2, 290, -19.6, 7.3, -1.8, 6.764, +0,2, 291, -23.6, 11.7, -2.1, 8.680, +0,2, 292, -24.5, 8.8, -1.4, 7.272, +0,2, 293, -23.3, 12.3, -1.9, 8.597, +0,2, 294, -21.4, 9.5, -1.5, 6.904, +0,2, 295, -25.5, 11.5, -3.0, 9.852, +0,2, 296, -23.9, 9.4, -2.3, 7.751, +0,2, 297, -22.6, 11.4, -1.8, 8.216, +0,2, 298, -21.4, 8.9, -2.2, 7.589, +0,2, 299, -28.1, 10.5, -2.7, 9.282, +0,2, 300, -20.2, 10.5, -1.8, 7.571, +0,2, 301, -18.4, 13.2, -1.3, 8.087, +0,2, 302, -21.6, 7.2, -1.6, 6.615, +0,2, 303, -23.6, 11.0, -2.6, 9.635, +0,2, 304, -20.4, 8.6, -1.2, 6.487, +0,2, 305, -27.7, 9.6, -3.3, 8.923, +0,2, 306, -19.2, 8.4, -1.7, 6.971, +0,2, 307, -26.8, 9.2, -2.3, 8.187, +0,2, 308, -24.1, 7.0, -2.5, 7.392, +0,2, 309, -24.0, 9.9, -2.7, 8.787, +0,2, 310, -20.3, 8.2, -1.8, 6.730, +0,2, 311, -25.3, 11.4, -2.0, 9.126, +0,2, 312, -20.2, 7.7, -1.9, 6.422, +0,2, 313, -23.1, 14.5, -1.6, 8.892, +0,2, 314, -22.7, 11.2, -1.9, 7.489, +0,2, 315, -24.4, 12.7, -1.8, 9.554, +0,2, 316, -22.9, 11.9, -1.4, 7.013, +0,2, 317, -21.0, 13.1, -1.3, 8.376, +0,2, 318, -17.9, 7.5, -2.4, 6.174, +0,2, 319, -27.1, 11.1, -3.6, 9.565, +0,2, 320, -22.9, 8.3, -1.6, 6.827, +0,2, 321, -21.3, 10.3, -1.7, 7.799, +0,2, 322, -21.4, 9.4, -1.3, 7.012, +0,2, 323, -26.3, 11.1, -2.3, 8.690, +0,2, 324, -22.4, 7.8, -2.1, 7.028, +0,2, 325, -19.8, 13.2, -0.7, 8.295, +0,2, 326, -24.7, 8.1, -1.8, 7.197, +0,2, 327, -24.5, 11.4, -1.7, 9.029, +0,2, 328, -18.6, 6.9, -1.8, 6.100, +0,2, 329, -23.9, 13.9, -1.2, 8.853, +0,2, 330, -23.9, 11.9, -2.5, 8.566, +0,2, 331, -21.7, 10.0, -2.0, 8.265, +0,2, 332, -26.3, 10.6, -1.5, 7.277, +0,2, 333, -21.6, 15.2, -1.4, 8.472, +0,2, 334, -25.5, 5.8, -3.1, 7.442, +0,2, 335, -22.8, 11.6, -2.5, 9.106, +0,2, 336, -24.5, 7.2, -2.2, 7.102, +0,2, 337, -23.0, 10.5, -1.8, 8.214, +0,2, 338, -21.8, 12.0, -1.1, 7.766, +0,2, 339, -22.2, 11.1, -1.8, 8.309, +0,2, 340, -23.8, 7.8, -1.6, 6.642, +0,2, 341, -27.2, 11.1, -2.2, 9.509, +0,2, 342, -18.5, 9.2, -1.2, 7.109, +0,2, 343, -23.6, 10.6, -2.9, 9.459, +0,2, 344, -22.6, 6.6, -2.2, 6.752, +0,2, 345, -23.6, 12.7, -2.0, 8.693, +0,2, 346, -21.7, 8.0, -2.4, 7.399, +0,2, 347, -22.7, 12.1, -1.9, 9.298, +0,2, 348, -21.0, 9.0, -0.8, 6.944, +0,2, 349, -18.9, 13.5, -1.5, 8.275, +0,2, 350, -19.1, 5.5, -1.9, 5.742, +0,2, 351, -19.0, 13.8, -0.9, 8.370, +0,2, 352, -21.2, 7.6, -2.2, 7.173, +0,2, 353, -27.3, 9.4, -2.3, 8.425, +0,2, 354, -21.3, 10.9, -1.7, 7.903, +0,2, 355, -23.3, 11.5, -1.7, 8.699, +0,2, 356, -22.0, 7.4, -2.1, 7.107, +0,2, 357, -22.5, 10.9, -1.3, 8.376, +0,2, 358, -21.3, 7.7, -2.2, 7.191, +0,2, 359, -23.7, 12.9, -1.4, 9.482, +0,2, 360, -17.7, 8.1, -1.3, 6.162, +0,2, 361, -25.9, 10.2, -2.8, 8.702, +0,2, 362, -21.1, 8.8, -2.0, 6.703, +0,2, 363, -27.4, 11.4, -1.4, 8.921, +0,2, 364, -21.5, 6.3, -2.3, 6.923, +0,2, 365, -20.1, 13.2, -1.8, 8.497, +0,2, 366, -17.7, 7.7, -1.4, 6.225, +0,2, 367, -26.5, 10.4, -3.8, 9.641, +0,2, 368, -19.3, 15.0, -1.1, 7.473, +0,2, 369, -24.8, 14.4, -2.1, 8.922, +0,2, 370, -22.1, 8.0, -2.0, 7.355, +0,2, 371, -23.7, 11.9, -1.7, 8.582, +0,2, 372, -22.6, 6.6, -1.8, 6.826, +0,2, 373, -26.2, 11.0, -1.3, 8.564, +0,2, 374, -28.0, 7.7, -2.9, 7.901, +0,2, 375, -21.9, 13.2, -1.7, 9.271, +0,2, 376, -20.5, 8.9, -2.3, 6.766, +0,2, 377, -21.9, 10.8, -2.1, 8.455, +0,2, 378, -23.9, 11.3, -2.0, 8.118, +0,2, 379, -23.1, 10.8, -1.6, 8.560, +0,2, 380, -21.1, 8.3, -1.2, 6.776, +0,2, 381, -21.0, 14.3, -1.3, 8.321, +0,2, 382, -18.0, 5.5, -2.0, 5.931, +0,2, 383, -24.9, 10.9, -2.4, 8.938, +0,2, 384, -20.7, 9.6, -1.7, 7.237, +0,2, 385, -26.1, 12.3, -2.0, 8.663, +0,2, 386, -20.8, 9.6, -1.3, 7.562, +0,2, 387, -23.1, 10.7, -2.2, 8.222, +0,2, 388, -24.0, 9.5, -1.9, 7.194, +0,2, 389, -26.8, 10.9, -1.8, 8.478, +0,2, 390, -22.9, 7.1, -2.3, 7.150, +0,2, 391, -26.1, 23.3, -1.2, 9.669, +0,2, 392, -18.7, 8.0, -2.1, 6.596, +0,2, 393, -35.8, 15.3, -1.4, 9.803, -35.8,-24.1,-23.8,-21.8,-21.7,-21.6,-17.9,-17.9,-17.6,-17.6,-17.2,-17.2,-17.1,-16.9,-16.2,-15.9,-15.3,-14.2,-13.7,-13.1,-12.5,-12.3,-11.2,-10.5,-8.7,-8.5,-8.4,-7.9,-7.8,-7.6,-7.3,-6.5,-6.4,-6.4,-6.1,-5.4,-5.1,-5.1,-4.5,-4.4,-3.9,-3.6,-3.5,-3.4,-3.4,-2.7,-2.6,-2.5,-2.4,-2.2,-2.2,-2.1,-1.9,-1.6,-1.5,-1.4,-1.4,-1.3,-0.8,-0.6,-0.4,-0.3,-0.2,-0.2,0.0,0.2,0.3,0.3,0.3,0.5,0.6,0.6,0.6,1.1,1.1,1.3,1.6,1.7,2.0,2.0,2.3,2.6,2.6,3.1,3.5,4.4,4.5,4.5,5.1,5.1,5.2,5.4,5.4,6.0,6.0,6.4,6.6,6.8,6.9,7.0,7.1,7.4,8.2,8.4,8.7,8.8,8.9,9.0,9.0,9.3,9.6,9.6,9.9,9.9,10.0,10.0,10.3,10.4,10.4,10.5,10.6,10.7,11.1,11.1,11.1,11.6,14.8,15.3, +0,2, 394, -22.3, 7.9, -2.5, 7.684, +0,2, 395, -24.5, 10.6, -1.7, 8.927, +0,2, 396, -26.1, 9.5, -2.3, 7.985, +0,2, 397, -23.5, 10.7, -2.3, 8.276, +0,2, 398, -23.1, 7.6, -2.7, 7.626, +0,2, 399, -21.1, 11.6, -1.4, 8.199, +0,2, 400, -19.8, 7.3, -1.5, 5.850, +0,2, 401, -22.7, 12.7, -2.2, 8.989, +0,2, 402, -19.8, 7.7, -2.0, 6.417, +0,2, 403, -22.9, 11.4, -2.4, 8.558, +0,2, 404, -20.7, 8.5, -1.9, 6.982, +0,2, 405, -22.9, 11.6, -2.1, 9.084, +0,2, 406, -19.9, 6.7, -1.6, 6.279, +0,2, 407, -23.3, 11.9, -1.9, 9.152, +0,2, 408, -21.4, 9.3, -1.3, 7.072, +0,2, 409, -22.4, 11.1, -1.8, 8.927, +0,2, 410, -17.2, 8.9, -0.5, 6.224, +0,2, 411, -23.5, 10.7, -1.4, 8.436, +0,2, 412, -16.2, 7.7, -1.4, 6.014, +0,2, 413, -24.8, 12.9, -1.9, 9.622, +0,2, 414, -20.4, 6.6, -2.4, 6.951, +0,2, 415, -24.6, 11.0, -1.9, 8.865, +0,2, 416, -23.3, 8.0, -2.3, 7.239, +0,2, 417, -22.9, 11.6, -2.5, 8.708, +0,2, 418, -21.2, 7.3, -2.1, 6.724, +0,2, 419, -23.4, 11.6, -2.2, 8.493, +0,2, 420, -18.6, 9.8, -1.8, 6.582, +0,2, 421, -29.3, 10.3, -3.3, 10.013, +0,2, 422, -25.7, 14.9, -2.6, 8.664, +0,2, 423, -22.5, 15.2, -1.7, 9.167, +0,2, 424, -18.3, 9.0, -1.3, 6.267, +0,2, 425, -24.0, 11.7, -1.5, 8.766, +0,2, 426, -18.2, 8.9, -1.0, 6.310, +0,2, 427, -25.2, 9.9, -3.0, 9.592, +0,2, 428, -15.8, 8.0, -0.5, 6.094, +0,2, 429, -21.3, 12.2, -1.4, 8.645, +0,2, 430, -19.7, 9.8, -1.7, 6.918, +0,2, 431, -23.6, 10.1, -2.1, 8.101, +0,2, 432, -21.1, 9.6, -1.3, 7.263, +0,2, 433, -23.0, 11.1, -1.9, 8.637, +0,2, 434, -18.3, 7.6, -1.3, 5.941, +0,2, 435, -27.0, 10.7, -2.6, 9.433, +0,2, 436, -20.5, 8.4, -2.9, 7.983, +0,2, 437, -22.9, 13.5, -1.8, 7.844, +0,2, 438, -22.7, 8.7, -1.6, 7.303, +0,2, 439, -25.5, 10.5, -1.7, 8.456, +0,2, 440, -22.7, 12.4, -2.3, 8.034, +0,2, 441, -22.5, 12.5, -1.5, 8.561, +0,2, 442, -22.8, 9.2, -2.0, 7.293, +0,2, 443, -25.2, 8.0, -3.1, 8.352, +0,2, 444, -20.6, 10.7, -1.3, 8.118, +0,2, 445, -27.1, 24.8, -0.1, 8.810, +0,2, 446, -14.6, 8.5, -1.1, 5.981, +0,2, 447, -23.9, 15.3, -1.4, 8.301, +0,2, 448, -22.2, 7.7, -2.7, 7.281, +0,2, 449, -26.5, 9.7, -2.1, 7.880, +0,2, 450, -21.0, 7.8, -2.5, 7.159, +0,2, 451, -23.2, 12.1, -1.5, 9.175, +0,2, 452, -22.0, 7.3, -3.0, 7.495, +0,2, 453, -23.3, 12.6, -1.0, 8.301, +0,2, 454, -22.0, 7.0, -1.7, 6.599, +0,2, 455, -24.9, 11.6, -1.2, 8.610, +0,2, 456, -19.9, 8.6, -1.2, 6.848, +0,2, 457, -22.2, 12.9, -1.8, 9.295, +0,2, 458, -19.3, 6.9, -2.1, 6.381, +0,2, 459, -24.9, 13.7, -1.7, 9.346, +0,2, 460, -21.0, 8.2, -1.5, 6.693, +0,2, 461, -23.1, 12.2, -1.2, 8.923, +0,2, 462, -15.6, 10.2, -1.1, 5.883, +0,2, 463, -22.2, 11.3, -1.8, 8.346, +0,2, 464, -18.2, 7.8, -2.0, 6.876, +0,2, 465, -23.9, 9.8, -2.2, 8.353, +0,2, 466, -24.9, 7.0, -3.1, 8.050, +0,2, 467, -21.5, 13.0, -0.9, 9.097, +0,2, 468, -19.4, 6.8, -1.1, 6.179, +0,2, 469, -23.6, 11.8, -1.3, 8.240, +0,2, 470, -20.0, 8.4, -1.1, 6.763, +0,2, 471, -26.5, 9.9, -2.3, 8.624, +0,2, 472, -19.2, 12.0, -1.0, 7.477, +0,2, 473, -24.1, 11.0, -2.2, 8.288, +0,2, 474, -24.1, 10.5, -2.0, 7.397, +0,2, 475, -25.9, 14.3, -1.7, 8.497, +0,2, 476, -20.7, 14.1, -1.3, 7.519, +0,2, 477, -24.6, 12.8, -1.2, 8.688, +0,2, 478, -16.2, 9.6, -1.3, 6.331, +0,2, 479, -26.7, 11.8, -1.9, 8.218, +0,2, 480, -24.7, 7.3, -1.6, 6.508, +0,2, 481, -21.5, 11.7, -1.9, 8.581, +0,2, 482, -21.7, 7.1, -3.0, 7.768, +0,2, 483, -22.4, 11.0, -2.3, 8.742, +0,2, 484, -20.8, 6.9, -1.8, 6.612, +0,2, 485, -26.5, 9.7, -2.8, 8.339, +0,2, 486, -23.1, 8.9, -1.8, 7.295, +0,2, 487, -28.1, 7.3, -2.8, 8.299, +0,2, 488, -19.0, 11.6, -0.3, 7.793, +0,2, 489, -21.2, 11.6, -1.9, 8.547, +0,2, 490, -22.4, 8.5, -2.2, 7.252, +0,2, 491, -22.1, 14.4, -1.1, 8.347, +0,2, 492, -22.2, 10.0, -2.3, 7.390, +0,2, 493, -24.7, 13.5, -2.1, 8.638, +0,2, 494, -18.2, 12.8, -2.4, 7.234, +0,2, 495, -24.4, 24.2, -1.6, 9.377, +0,2, 496, -22.3, 8.3, -1.4, 6.620, +0,2, 497, -24.7, 11.5, -2.1, 9.426, +0,2, 498, -18.1, 5.7, -1.9, 6.231, +0,2, 499, -26.4, 21.4, -2.1, 9.281, +0,2, 500, -19.3, 9.0, -2.0, 6.767, +0,2, 501, -21.2, 13.7, -1.7, 8.402, +0,2, 502, -17.3, 7.1, -1.3, 6.168, +0,2, 503, -23.1, 14.3, -0.8, 10.285, +0,2, 504, -23.9, 7.7, -2.1, 7.468, +0,2, 505, -25.0, 11.9, -2.2, 8.614, +0,2, 506, -20.2, 8.3, -1.3, 6.464, +0,2, 507, -22.9, 13.2, -1.2, 8.764, +0,2, 508, -23.7, 7.5, -2.3, 7.489, +0,2, 509, -22.3, 11.1, -1.7, 8.547, +0,2, 510, -19.5, 7.7, -1.4, 6.881, +0,2, 511, -19.2, 11.9, -1.0, 8.055, +0,2, 512, -23.4, 6.9, -2.2, 6.091, +0,2, 513, -24.2, 9.9, -2.3, 8.832, +0,2, 514, -25.8, 6.9, -2.4, 7.074, +0,2, 515, -27.4, 10.7, -2.1, 8.817, +0,2, 516, -21.2, 7.3, -2.2, 6.849, +0,2, 517, -21.3, 12.3, -2.1, 8.880, +0,2, 518, -20.6, 7.6, -1.7, 6.111, +0,2, 519, -25.2, 14.5, -1.3, 10.293, +0,2, 520, -20.9, 5.6, -2.3, 6.313, +0,2, 521, -35.6, 27.2, -0.9, 10.793, -35.6,-21.5,-20.7,-20.6,-18.4,-18.0,-18.0,-17.3,-16.8,-16.4,-15.7,-15.5,-15.4,-15.3,-14.9,-14.7,-14.6,-14.3,-13.8,-13.6,-13.1,-12.9,-12.3,-12.2,-12.1,-12.0,-11.3,-11.0,-10.6,-8.6,-8.5,-8.4,-8.1,-7.7,-7.7,-6.9,-6.6,-6.5,-5.7,-5.1,-5.0,-4.9,-4.8,-4.3,-4.3,-4.2,-3.8,-3.6,-3.5,-3.3,-3.1,-2.8,-2.5,-2.2,-1.7,-1.6,-1.5,-1.5,-1.0,-0.8,-0.6,-0.4,-0.1,0.0,0.1,0.2,0.4,0.8,0.9,1.0,1.4,1.5,1.5,1.7,2.0,2.4,2.4,2.8,2.9,3.0,3.2,3.4,3.4,3.5,3.5,3.5,3.6,3.7,3.9,3.9,5.1,5.2,5.4,5.6,6.3,6.7,7.0,7.2,7.7,8.2,9.0,9.6,9.9,10.2,10.7,11.6,11.6,12.0,12.2,12.2,12.3,12.6,12.6,12.9,13.0,13.5,13.5,13.6,13.8,14.5,15.0,15.0,15.4,15.5,27.1,27.2, +0,2, 522, -22.0, 7.5, -2.5, 7.107, +0,2, 523, -23.6, 11.7, -2.4, 8.679, +0,2, 524, -18.9, 6.1, -2.2, 6.378, +0,2, 525, -24.9, 12.5, -1.3, 9.289, +0,2, 526, -23.0, 8.2, -1.2, 7.329, +0,2, 527, -21.5, 12.5, -1.6, 8.036, +0,2, 528, -21.0, 7.8, -2.5, 6.443, +0,2, 529, -20.1, 12.4, -1.6, 8.423, +0,2, 530, -21.6, 12.9, -2.0, 7.391, +0,2, 531, -23.9, 15.7, -1.5, 9.647, +0,2, 532, -17.4, 8.3, -1.4, 5.878, +0,2, 533, -23.8, 11.2, -2.4, 8.130, +0,2, 534, -17.9, 6.8, -2.0, 6.193, +0,2, 535, -24.1, 11.8, -1.1, 8.924, +0,2, 536, -18.9, 6.2, -1.5, 5.474, +0,2, 537, -26.4, 11.2, -2.1, 8.909, +0,2, 538, -21.2, 10.3, -1.7, 7.428, +0,2, 539, -23.3, 12.9, -1.3, 9.080, +0,2, 540, -21.8, 7.8, -1.6, 6.834, +0,2, 541, -24.2, 9.9, -2.1, 8.455, +0,2, 542, -25.3, 7.7, -2.7, 8.418, +0,2, 543, -23.8, 11.2, -2.2, 8.304, +0,2, 544, -22.8, 7.0, -2.2, 7.304, +0,2, 545, -21.9, 12.4, -1.3, 8.351, +0,2, 546, -20.0, 7.0, -1.7, 6.403, +0,2, 547, -26.1, 10.1, -2.7, 9.321, +0,2, 548, -20.1, 8.5, -1.3, 6.556, +0,2, 549, -23.2, 12.0, -2.3, 9.399, +0,2, 550, -23.5, 7.9, -1.6, 8.158, +0,2, 551, -21.7, 10.9, -2.7, 9.137, +0,2, 552, -20.4, 7.2, -1.7, 6.515, +0,2, 553, -26.0, 11.1, -1.8, 8.502, +0,2, 554, -22.7, 8.0, -2.6, 7.818, +0,2, 555, -24.6, 13.0, -1.4, 9.311, +0,2, 556, -19.9, 7.8, -1.6, 6.530, +0,2, 557, -26.3, 12.3, -2.0, 9.836, +0,2, 558, -20.9, 7.9, -1.4, 6.774, +0,2, 559, -19.7, 12.7, -2.1, 9.313, +0,2, 560, -17.6, 7.5, -1.3, 6.253, +0,2, 561, -25.8, 11.9, -1.5, 8.854, +0,2, 562, -22.7, 7.9, -2.2, 7.738, +0,2, 563, -24.6, 12.1, -2.1, 8.735, +0,2, 564, -22.5, 7.1, -2.1, 6.831, +0,2, 565, -22.9, 12.0, -1.7, 8.684, +0,2, 566, -22.2, 7.2, -2.8, 7.368, +0,2, 567, -21.9, 11.9, -1.9, 8.701, +0,2, 568, -18.4, 7.6, -1.2, 5.929, +0,2, 569, -25.6, 11.2, -1.7, 7.986, +0,2, 570, -21.5, 9.0, -2.0, 7.310, +0,2, 571, -24.9, 12.6, -1.4, 9.238, +0,2, 572, -21.2, 7.4, -1.5, 6.645, +0,2, 573, -27.7, 10.5, -2.1, 9.023, +0,2, 574, -21.3, 6.7, -1.6, 6.567, +0,2, 575, -29.1, 23.8, -0.7, 9.596, +0,2, 576, -13.8, 7.3, -0.7, 5.310, +0,2, 577, -31.1, 14.3, -2.5, 8.604, -31.1,-26.5,-26.4,-24.2,-22.4,-20.1,-18.4,-18.4,-17.8,-17.5,-16.6,-16.1,-16.0,-15.1,-15.0,-15.0,-14.8,-14.5,-14.2,-14.0,-13.7,-13.4,-13.4,-13.2,-12.9,-12.9,-12.3,-11.0,-10.2,-9.7,-8.8,-8.7,-8.5,-8.4,-8.2,-8.0,-7.9,-7.6,-7.1,-5.9,-5.8,-5.1,-4.5,-4.5,-4.3,-4.1,-4.0,-3.9,-3.6,-3.6,-3.6,-3.5,-3.2,-2.8,-2.7,-2.3,-2.2,-1.8,-1.5,-1.5,-1.5,-1.5,-1.4,-1.4,-1.2,-1.1,-1.0,-0.9,-0.6,-0.3,-0.2,-0.1,-0.1,-0.0,0.0,0.2,0.2,0.3,0.3,0.5,0.5,0.5,0.6,0.7,0.7,0.7,0.8,0.8,0.9,0.9,0.9,0.9,0.9,1.2,1.3,1.3,1.5,1.5,1.5,1.5,1.6,1.7,1.7,1.8,1.9,1.9,1.9,2.0,2.1,2.1,2.1,2.4,2.5,2.7,3.0,3.2,3.3,4.0,4.0,4.1,4.5,4.9,5.2,5.4,5.7,5.7,6.6,6.8,6.9,7.0,7.1,7.3,7.5,7.7,8.0,8.2,8.3,8.3,8.3,8.4,8.4,8.6,8.7,8.9,9.1,9.5,10.1,14.3, +0,2, 578, -25.3, 6.8, -2.6, 7.316, +0,2, 579, -23.9, 12.8, -1.1, 8.746, +0,2, 580, -21.7, 6.4, -2.3, 6.861, +0,2, 581, -25.9, 12.9, -2.3, 10.006, +0,2, 582, -16.8, 8.8, -1.5, 6.543, +0,2, 583, -23.2, 17.3, -0.9, 8.309, +0,2, 584, -20.4, 7.7, -2.0, 6.532, +0,2, 585, -27.9, 15.9, -1.9, 9.125, +0,2, 586, -21.5, 20.4, -1.3, 7.878, +0,2, 587, -22.6, 12.6, -1.2, 8.712, +0,2, 588, -19.1, 6.4, -1.8, 6.015, +0,2, 589, -26.1, 10.7, -2.1, 8.869, +0,2, 590, -20.2, 6.9, -2.4, 6.720, +0,2, 591, -24.5, 13.2, -1.4, 9.232, +0,2, 592, -20.6, 7.8, -1.9, 6.899, +0,2, 593, -24.8, 12.1, -2.2, 8.967, +0,2, 594, -29.7, 8.0, -2.4, 7.583, +0,2, 595, -21.2, 13.7, -2.1, 10.088, +0,2, 596, -21.6, 5.8, -2.5, 7.197, +0,2, 597, -21.8, 12.1, -2.0, 9.115, +0,2, 598, -23.7, 8.8, -1.1, 6.837, +0,2, 599, -24.2, 14.2, -2.0, 9.183, +0,2, 600, -17.5, 9.6, -1.0, 6.251, +0,2, 601, -27.4, 13.0, -1.9, 9.833, +0,2, 602, -19.2, 10.5, -1.5, 7.062, +0,2, 603, -23.6, 17.7, -2.0, 9.225, +0,2, 604, -23.5, 7.0, -1.8, 6.779, +0,2, 605, -24.7, 11.7, -1.5, 8.514, +0,2, 606, -22.9, 8.5, -2.0, 7.501, +0,2, 607, -23.2, 10.4, -2.3, 9.013, +0,2, 608, -22.3, 8.3, -2.1, 7.548, +0,2, 609, -25.3, 12.6, -1.5, 9.181, +0,2, 610, -21.0, 6.9, -1.6, 6.630, +0,2, 611, -23.1, 13.0, -1.3, 9.106, +0,2, 612, -24.0, 7.0, -2.7, 7.299, +0,2, 613, -23.9, 11.9, -2.0, 9.069, +0,2, 614, -22.8, 7.9, -1.7, 7.136, +0,2, 615, -21.3, 12.5, -2.2, 8.854, +0,2, 616, -20.0, 6.2, -2.4, 6.642, +0,2, 617, -22.0, 13.3, -1.4, 9.664, +0,2, 618, -23.1, 7.1, -2.5, 7.614, +0,2, 619, -20.8, 13.8, -1.7, 8.800, +0,2, 620, -20.4, 6.7, -2.0, 6.499, +0,2, 621, -23.9, 13.6, -1.2, 9.312, +0,2, 622, -19.2, 7.5, -1.4, 6.622, +0,2, 623, -24.6, 11.0, -2.4, 9.145, +0,2, 624, -16.8, 7.1, -1.3, 6.126, +0,2, 625, -25.5, 10.6, -2.3, 8.927, +0,2, 626, -22.0, 7.3, -2.0, 6.230, +0,2, 627, -23.9, 12.1, -1.9, 9.851, +0,2, 628, -17.6, 6.0, -1.7, 5.336, +0,2, 629, -34.2, 24.5, -1.3, 9.661, -34.2,-25.8,-21.6,-21.5,-21.5,-21.0,-20.6,-19.8,-18.4,-18.2,-17.4,-16.8,-16.3,-16.0,-14.0,-13.7,-13.1,-13.0,-12.6,-12.4,-12.3,-11.7,-11.3,-10.0,-9.5,-8.9,-8.8,-8.7,-8.4,-8.2,-8.1,-7.6,-7.4,-7.4,-6.9,-6.9,-6.8,-6.7,-6.3,-6.3,-5.8,-4.9,-4.8,-4.5,-4.3,-4.2,-3.9,-3.8,-3.8,-3.6,-3.6,-3.3,-3.1,-3.1,-3.0,-3.0,-3.0,-2.8,-2.6,-2.5,-2.4,-2.2,-1.5,-1.5,-0.9,-0.6,-0.6,-0.6,-0.5,-0.4,-0.4,-0.3,0.0,0.1,0.2,0.2,0.4,0.5,0.5,0.6,0.8,0.8,1.0,1.2,1.4,1.5,1.5,1.5,1.6,1.8,1.9,2.0,2.0,2.1,2.2,2.5,2.5,2.5,2.5,2.6,2.8,2.8,3.2,3.2,3.3,3.3,3.6,4.3,4.5,5.1,5.4,5.8,6.8,7.1,7.1,7.4,7.5,7.9,7.9,8.0,8.1,8.2,8.3,8.7,9.0,9.0,9.1,9.3,9.4,9.5,9.8,9.8,9.8,10.7,10.8,11.0,11.2,11.4,11.7,12.1,12.2,12.5,22.2,22.8,24.5, +0,2, 630, -22.5, 7.2, -3.0, 7.526, +0,2, 631, -26.5, 14.6, -2.7, 9.591, +0,2, 632, -21.1, 6.0, -1.5, 5.967, +0,2, 633, -23.8, 13.3, -1.2, 9.688, +0,2, 634, -25.2, 7.0, -2.1, 7.436, +0,2, 635, -21.4, 13.6, -0.9, 8.860, +0,2, 636, -20.5, 6.3, -2.3, 6.422, +0,2, 637, -24.2, 13.4, -2.0, 8.172, +0,2, 638, -25.1, 14.3, -2.2, 7.354, +0,2, 639, -22.0, 12.2, -0.9, 9.142, +0,2, 640, -16.9, 7.4, -1.6, 5.977, +0,2, 641, -24.7, 10.8, -2.4, 8.342, +0,2, 642, -19.9, 6.7, -2.0, 6.351, +0,2, 643, -25.1, 12.8, -2.6, 10.132, +0,2, 644, -22.3, 7.7, -1.6, 6.882, +0,2, 645, -22.4, 12.5, -2.2, 8.971, +0,2, 646, -21.4, 7.7, -2.1, 7.350, +0,2, 647, -20.4, 15.7, -1.2, 9.290, +0,2, 648, -24.7, 7.4, -2.4, 7.722, +0,2, 649, -23.3, 14.0, -1.1, 9.923, +0,2, 650, -25.4, 6.5, -2.3, 7.122, +0,2, 651, -21.9, 14.3, -1.4, 9.401, +0,2, 652, -22.6, 7.6, -1.9, 6.868, +0,2, 653, -23.5, 10.7, -2.2, 8.711, +0,2, 654, -25.3, 9.4, -3.2, 8.102, +0,2, 655, -26.7, 15.2, -3.4, 10.575, +0,2, 656, -20.4, 6.5, -1.8, 6.313, +0,2, 657, -20.3, 15.2, -1.1, 9.195, +0,2, 658, -22.1, 6.6, -1.9, 6.492, +0,2, 659, -24.2, 13.3, -2.2, 10.300, +0,2, 660, -21.1, 6.4, -2.0, 6.851, +0,2, 661, -25.2, 10.7, -1.9, 8.983, +0,2, 662, -21.0, 8.5, -1.8, 7.536, +0,2, 663, -20.9, 13.6, -0.8, 8.477, +0,2, 664, -20.2, 5.7, -2.1, 6.104, +0,2, 665, -26.0, 11.5, -2.1, 9.588, +0,2, 666, -22.3, 7.2, -2.3, 7.236, +0,2, 667, -22.5, 13.6, -1.7, 9.115, +0,2, 668, -23.1, 7.1, -2.0, 7.042, +0,2, 669, -25.1, 10.2, -2.7, 9.190, +0,2, 670, -22.1, 6.5, -3.0, 7.487, +0,2, 671, -24.9, 12.1, -1.3, 9.220, +0,2, 672, -17.2, 7.0, -1.1, 5.658, +0,2, 673, -26.4, 12.6, -2.2, 8.862, +0,2, 674, -23.8, 7.1, -2.8, 7.677, +0,2, 675, -21.4, 11.6, -1.3, 8.027, +0,2, 676, -19.3, 7.8, -2.1, 7.324, +0,2, 677, -26.6, 10.1, -2.7, 9.085, +0,2, 678, -21.1, 11.8, -1.5, 8.153, +0,2, 679, -20.7, 13.2, -0.6, 8.247, +0,2, 680, -17.8, 7.6, -1.9, 6.044, +0,2, 681, -23.8, 10.5, -2.1, 8.936, +0,2, 682, -20.7, 7.6, -2.2, 7.213, +0,2, 683, -21.5, 15.4, -0.9, 9.438, +0,2, 684, -20.1, 8.5, -1.9, 6.912, +0,2, 685, -26.1, 11.3, -2.2, 9.300, +0,2, 686, -20.8, 8.4, -1.7, 7.518, +0,2, 687, -23.5, 11.1, -1.7, 8.281, +0,2, 688, -21.1, 7.0, -2.2, 7.283, +0,2, 689, -21.5, 11.7, -1.3, 8.163, +0,2, 690, -25.1, 7.0, -2.7, 7.819, +0,2, 691, -24.0, 15.9, -1.9, 9.532, +0,2, 692, -23.8, 12.8, -2.4, 8.628, +0,2, 693, -22.0, 11.3, -1.5, 8.553, +0,2, 694, -23.7, 11.9, -2.0, 7.527, +0,2, 695, -20.8, 13.4, -0.8, 8.826, +0,2, 696, -20.5, 8.0, -1.8, 7.447, +0,2, 697, -22.7, 11.1, -2.5, 9.437, +0,2, 698, -18.4, 7.7, -1.5, 6.504, +0,2, 699, -23.2, 13.1, -1.5, 9.161, +0,2, 700, -21.8, 9.3, -1.5, 6.507, +0,2, 701, -28.0, 12.0, -2.2, 9.320, +0,2, 702, -18.9, 7.2, -1.7, 6.368, +0,2, 703, -26.4, 11.8, -2.1, 9.486, +0,2, 704, -15.1, 5.7, -1.4, 5.084, +0,2, 705, -28.1, 10.4, -3.5, 9.528, +0,2, 706, -24.6, 8.0, -2.5, 8.190, +0,2, 707, -24.6, 13.6, -2.1, 8.834, +0,2, 708, -22.9, 10.4, -2.1, 7.267, +0,2, 709, -24.4, 16.5, -1.6, 9.163, +0,2, 710, -22.2, 11.6, -1.0, 6.800, +0,2, 711, -23.2, 11.5, -1.6, 9.052, +0,2, 712, -21.1, 7.2, -1.9, 6.957, +0,2, 713, -22.6, 10.8, -1.6, 8.614, +0,2, 714, -23.1, 8.2, -1.7, 6.865, +0,2, 715, -26.7, 11.1, -1.9, 8.922, +0,2, 716, -21.7, 9.3, -2.0, 7.390, +0,2, 717, -23.8, 10.3, -1.6, 8.213, +0,2, 718, -19.2, 10.0, -1.7, 7.005, +0,2, 719, -21.6, 12.4, -1.7, 9.112, +0,2, 720, -20.1, 8.1, -1.2, 6.529, +0,2, 721, -24.6, 10.0, -2.9, 8.506, +0,2, 722, -24.5, 8.1, -2.3, 6.952, +0,2, 723, -23.9, 14.0, -1.8, 9.280, +0,2, 724, -17.5, 7.0, -1.5, 6.202, +0,2, 725, -22.5, 11.2, -1.0, 8.269, +0,2, 726, -24.4, 8.4, -2.2, 7.272, +0,2, 727, -22.6, 13.5, -1.7, 9.420, +0,2, 728, -23.6, 6.1, -2.9, 7.084, +0,2, 729, -25.1, 12.7, -1.6, 8.878, +0,2, 730, -20.6, 6.9, -1.8, 6.377, +0,2, 731, -24.7, 10.4, -1.8, 8.389, +0,2, 732, -19.6, 9.0, -1.9, 7.089, +0,2, 733, -26.7, 11.1, -1.7, 8.878, +0,2, 734, -21.8, 7.9, -1.7, 6.606, +0,2, 735, -24.0, 10.5, -2.7, 8.940, +0,2, 736, -21.5, 7.8, -1.4, 6.674, +0,2, 737, -24.4, 12.4, -1.0, 8.672, +0,2, 738, -19.4, 7.2, -1.1, 5.740, +0,2, 739, -27.3, 12.4, -1.9, 9.128, +0,2, 740, -20.9, 7.2, -1.4, 6.589, +0,2, 741, -23.2, 13.2, -1.1, 9.026, +0,2, 742, -22.9, 8.0, -2.6, 7.350, +0,2, 743, -23.3, 13.6, -1.3, 9.487, +0,2, 744, -22.9, 9.0, -2.4, 6.622, +0,2, 745, -25.4, 12.0, -1.0, 8.339, +0,2, 746, -22.9, 12.3, -1.2, 7.050, +0,2, 747, -24.6, 14.4, -1.9, 8.751, +0,2, 748, -18.4, 8.4, -1.6, 6.326, +0,2, 749, -24.6, 12.2, -1.4, 8.958, +0,2, 750, -21.6, 6.9, -1.7, 6.166, +0,2, 751, -27.0, 11.2, -3.0, 9.953, +0,2, 752, -22.1, 7.1, -2.7, 6.486, +0,2, 753, -25.0, 13.3, -1.2, 9.445, +0,2, 754, -19.9, 8.5, -1.2, 6.312, +0,2, 755, -22.2, 11.9, -2.0, 9.109, +0,2, 756, -18.7, 6.5, -1.6, 5.910, +0,2, 757, -26.1, 12.7, -2.1, 10.173, +0,2, 758, -21.2, 7.7, -2.4, 7.106, +0,2, 759, -22.2, 14.6, -2.2, 10.054, +0,2, 760, -22.8, 9.1, -1.2, 6.487, +0,2, 761, -23.3, 13.0, -1.1, 9.292, +0,2, 762, -20.1, 10.5, -1.8, 7.387, +0,2, 763, -25.2, 13.3, -2.7, 9.089, +0,2, 764, -19.6, 8.3, -1.6, 6.571, +0,2, 765, -24.9, 12.5, -2.6, 9.039, +0,2, 766, -19.1, 7.4, -1.8, 6.672, +0,2, 767, -24.8, 10.8, -2.5, 9.314, +0,2, 768, -21.6, 5.3, -2.1, 5.986, +0,2, 769, -25.5, 9.9, -2.5, 8.564, +0,2, 770, -26.2, 7.2, -2.1, 7.204, +0,2, 771, -26.4, 11.6, -2.4, 9.217, +0,2, 772, -22.8, 8.6, -1.7, 7.174, +0,2, 773, -28.2, 11.1, -2.7, 10.160, +0,2, 774, -26.5, 6.2, -2.8, 7.458, +0,2, 775, -20.6, 12.4, -1.6, 9.252, +0,2, 776, -21.0, 6.9, -2.0, 6.793, +0,2, 777, -24.3, 12.9, -2.5, 9.410, +0,2, 778, -23.2, 5.7, -2.5, 7.085, +0,2, 779, -20.9, 12.4, -1.6, 9.256, +0,2, 780, -21.2, 6.3, -2.1, 6.375, +0,2, 781, -20.8, 13.7, -1.7, 8.790, +0,2, 782, -23.2, 7.3, -2.7, 7.157, +0,2, 783, -27.3, 13.6, -2.4, 10.075, +0,2, 784, -20.4, 7.1, -1.7, 6.005, +0,2, 785, -21.9, 11.9, -1.5, 8.554, +0,2, 786, -24.6, 9.1, -2.4, 8.644, +0,2, 787, -22.2, 14.0, -1.6, 9.233, +0,2, 788, -21.0, 7.6, -1.4, 5.807, +0,2, 789, -25.1, 24.4, -2.0, 10.271, +0,2, 790, -23.6, 7.1, -2.7, 6.902, +0,2, 791, -23.4, 13.0, -1.6, 9.886, +0,2, 792, -16.9, 6.5, -1.4, 5.639, +0,2, 793, -26.1, 10.6, -1.8, 8.670, +0,2, 794, -23.9, 8.9, -2.2, 7.979, +0,2, 795, -26.2, 13.2, -1.5, 9.837, +0,2, 796, -21.7, 6.8, -2.4, 7.109, +0,2, 797, -20.1, 12.1, -1.3, 8.214, +0,2, 798, -22.6, 8.0, -2.2, 6.723, +0,2, 799, -24.8, 14.3, -1.1, 8.940, +0,2, 800, -21.0, 9.9, -2.1, 6.494, +0,2, 801, -22.4, 17.2, -1.2, 9.782, +0,2, 802, -21.1, 8.7, -2.6, 6.714, +0,2, 803, -23.5, 11.8, -2.2, 9.135, +0,2, 804, -22.8, 6.2, -2.2, 6.184, +0,2, 805, -23.3, 13.6, -0.6, 9.065, +0,2, 806, -16.9, 6.7, -1.6, 5.708, +0,2, 807, -22.8, 14.3, -0.5, 9.710, +0,2, 808, -18.7, 6.2, -2.1, 6.373, +0,2, 809, -24.0, 14.4, -2.1, 9.208, +0,2, 810, -26.1, 7.3, -2.4, 6.697, +0,2, 811, -19.9, 13.8, -1.0, 9.366, +0,2, 812, -20.1, 5.1, -2.4, 6.619, +0,2, 813, -20.6, 15.7, -1.0, 8.594, +0,2, 814, -22.0, 7.4, -2.1, 6.663, +0,2, 815, -22.8, 15.7, -1.6, 8.715, +0,2, 816, -18.8, 9.3, -2.1, 6.479, +0,2, 817, -25.5, 12.3, -1.5, 9.415, +0,2, 818, -17.2, 8.3, -1.0, 5.744, +0,2, 819, -21.8, 14.9, -1.4, 9.206, +0,2, 820, -26.0, 5.8, -2.6, 6.685, +0,2, 821, -22.4, 14.0, -1.7, 9.695, +0,2, 822, -20.4, 7.1, -1.8, 6.085, +0,2, 823, -23.1, 13.5, -1.4, 9.231, +0,2, 824, -22.9, 8.0, -2.0, 6.845, +0,2, 825, -23.4, 12.9, -2.7, 9.595, +0,2, 826, -18.4, 7.0, -1.4, 5.896, +0,2, 827, -24.5, 14.2, -0.8, 9.856, +0,2, 828, -21.9, 6.4, -2.5, 6.562, +0,2, 829, -21.8, 13.7, -1.8, 9.160, +0,2, 830, -24.4, 6.1, -2.5, 6.970, +0,2, 831, -21.4, 10.7, -1.8, 8.054, +0,2, 832, -23.5, 6.7, -2.6, 6.894, +0,2, 833, -26.7, 11.5, -2.3, 9.832, +0,2, 834, -22.7, 8.7, -1.1, 6.493, +0,2, 835, -21.5, 12.1, -2.3, 8.692, +0,2, 836, -26.6, 6.0, -2.5, 6.765, +0,2, 837, -22.5, 13.4, -1.9, 9.519, +0,2, 838, -23.7, 6.8, -2.0, 7.028, +0,2, 839, -26.1, 11.5, -2.6, 9.780, +0,2, 840, -19.6, 7.2, -2.1, 6.752, +0,2, 841, -23.3, 13.5, -1.5, 8.973, +0,2, 842, -21.8, 6.5, -2.4, 6.741, +0,2, 843, -24.9, 22.5, -1.8, 10.754, +0,2, 844, -23.9, 6.9, -2.6, 7.299, +0,2, 845, -22.8, 16.5, -1.1, 9.600, +0,2, 846, -19.0, 6.3, -1.8, 6.184, +0,2, 847, -23.9, 11.0, -2.9, 9.261, +0,2, 848, -16.7, 5.4, -1.8, 5.525, +0,2, 849, -22.5, 10.0, -2.4, 8.579, +0,2, 850, -23.9, 7.6, -2.5, 7.797, +0,2, 851, -21.7, 13.2, -1.6, 8.316, +0,2, 852, -23.4, 5.6, -2.5, 6.449, +0,2, 853, -23.8, 14.0, -2.5, 9.444, +0,2, 854, -24.3, 15.5, -1.5, 7.859, +0,2, 855, -25.0, 11.9, -2.2, 8.967, +0,2, 856, -18.2, 7.8, -1.4, 6.461, +0,2, 857, -21.6, 15.1, -0.0, 9.278, +0,2, 858, -22.5, 7.1, -2.2, 6.998, +0,2, 859, -23.3, 12.4, -2.0, 8.674, +0,2, 860, -21.6, 7.5, -2.3, 6.719, +0,2, 861, -22.7, 14.6, -1.6, 9.563, +0,2, 862, -21.3, 10.1, -2.4, 7.740, +0,2, 863, -22.3, 10.7, -2.2, 8.316, +0,2, 864, -13.7, 7.1, -1.0, 5.390, +0,2, 865, -26.8, 10.3, -2.0, 8.634, +0,2, 866, -21.3, 6.8, -2.4, 6.697, +0,2, 867, -22.7, 12.5, -1.9, 8.252, +0,2, 868, -21.5, 6.2, -2.2, 6.933, +0,2, 869, -24.3, 16.1, -2.4, 9.631, +0,2, 870, -22.0, 9.8, -1.7, 7.721, +0,2, 871, -23.3, 10.9, -2.0, 8.721, +0,2, 872, -20.6, 10.2, -1.7, 6.704, +0,2, 873, -20.9, 15.9, -0.6, 9.360, +0,2, 874, -23.4, 6.8, -2.4, 6.966, +0,2, 875, -23.4, 13.4, -2.3, 10.359, +0,2, 876, -19.7, 5.7, -1.6, 5.719, +0,2, 877, -22.4, 12.6, -0.6, 8.328, +0,2, 878, -18.8, 9.9, -1.3, 6.688, +0,2, 879, -23.9, 9.9, -2.0, 8.518, +0,2, 880, -20.2, 8.1, -0.7, 6.785, +0,2, 881, -24.7, 10.9, -2.1, 8.466, +0,2, 882, -20.8, 8.0, -1.9, 7.454, +0,2, 883, -22.4, 12.4, -2.5, 9.867, +0,2, 884, -19.8, 7.1, -2.3, 6.758, +0,2, 885, -24.7, 12.9, -1.5, 9.227, +0,2, 886, -20.9, 8.6, -1.4, 7.099, +0,2, 887, -22.4, 11.5, -1.3, 8.498, +0,2, 888, -17.3, 6.4, -1.7, 5.840, +0,2, 889, -24.7, 13.8, -1.0, 9.584, +0,2, 890, -22.0, 6.4, -2.6, 7.154, +0,2, 891, -24.9, 14.3, -2.2, 10.074, +0,2, 892, -21.2, 7.7, -1.4, 6.507, +0,2, 893, -23.0, 9.2, -2.1, 7.962, +0,2, 894, -25.7, 10.0, -1.5, 8.766, +0,2, 895, -18.0, 12.7, -0.9, 8.193, +0,2, 896, -19.0, 7.7, -1.4, 5.621, +0,2, 897, -22.6, 20.7, -1.2, 8.466, +0,2, 898, -27.2, 8.8, -1.7, 7.952, +0,2, 899, -22.4, 13.9, -1.8, 8.764, +0,2, 900, -25.2, 8.6, -2.6, 7.963, +0,2, 901, -25.7, 10.6, -1.8, 8.394, +0,2, 902, -23.8, 9.2, -1.9, 8.331, +0,2, 903, -23.0, 11.9, -0.9, 8.399, +0,2, 904, -18.5, 7.1, -1.7, 6.330, +0,2, 905, -25.1, 12.0, -1.6, 8.881, +0,2, 906, -19.7, 6.2, -2.4, 6.948, +0,2, 907, -20.9, 11.9, -1.3, 8.296, +0,2, 908, -20.1, 8.9, -2.2, 6.896, +0,2, 909, -26.6, 11.9, -1.8, 9.067, +0,2, 910, -20.5, 8.4, -1.3, 7.011, +0,2, 911, -23.9, 12.0, -1.7, 8.865, +0,2, 912, -19.4, 7.4, -1.3, 6.094, +0,2, 913, -24.7, 9.2, -2.5, 8.556, +0,2, 914, -23.3, 8.1, -2.4, 7.773, +0,2, 915, -20.8, 14.0, -1.2, 9.000, +0,2, 916, -18.5, 7.1, -1.5, 6.066, +0,2, 917, -24.8, 10.9, -1.9, 8.905, +0,2, 918, -22.8, 8.3, -2.0, 7.294, +0,2, 919, -25.1, 13.1, -1.5, 9.731, +0,2, 920, -20.5, 7.5, -1.5, 7.284, +0,2, 921, -21.6, 12.4, -2.1, 9.482, +0,2, 922, -21.1, 10.8, -0.4, 6.963, +0,2, 923, -23.3, 13.3, -1.6, 9.310, +0,2, 924, -18.8, 7.3, -0.9, 5.760, +0,2, 925, -27.6, 12.7, -2.9, 9.785, +0,2, 926, -22.3, 9.1, -1.9, 7.704, +0,2, 927, -21.6, 12.6, -2.3, 9.088, +0,2, 928, -22.1, 7.2, -2.1, 6.476, +0,2, 929, -25.9, 10.9, -2.7, 8.928, +0,2, 930, -26.1, 7.5, -1.5, 7.061, +0,2, 931, -23.7, 11.3, -2.2, 8.944, +0,2, 932, -17.7, 7.6, -2.2, 7.157, +0,2, 933, -26.2, 13.9, -2.2, 10.738, +0,2, 934, -22.4, 8.5, -2.0, 7.385, +0,2, 935, -23.0, 14.2, -2.3, 10.793, +0,2, 936, -16.7, 6.4, -2.0, 6.117, +0,2, 937, -24.1, 11.6, -2.3, 9.547, +0,2, 938, -22.1, 7.6, -1.8, 6.943, +0,2, 939, -21.3, 13.0, -1.8, 9.162, +0,2, 940, -13.1, 6.6, -0.5, 5.229, +0,2, 941, -23.0, 13.7, -1.2, 9.099, +0,2, 942, -20.2, 7.2, -2.0, 6.951, +0,2, 943, -21.1, 13.8, -1.9, 9.205, +0,2, 944, -21.0, 6.1, -1.9, 6.085, +0,2, 945, -21.0, 13.7, -1.9, 8.903, +0,2, 946, -22.2, 8.8, -1.1, 7.091, +0,2, 947, -21.3, 10.9, -2.0, 8.687, +0,2, 948, -15.1, 6.8, -1.7, 6.096, +0,2, 949, -23.4, 11.7, -2.4, 9.262, +0,2, 950, -20.0, 6.4, -1.6, 6.115, +0,2, 951, -24.8, 25.4, -1.1, 11.180, +0,2, 952, -17.8, 6.8, -1.1, 5.802, +0,2, 953, -34.7, 17.9, -1.0, 9.547, -34.7,-22.7,-22.7,-20.9,-19.8,-17.9,-17.6,-17.4,-17.4,-16.8,-15.7,-15.1,-14.4,-14.2,-13.7,-12.7,-12.3,-12.3,-12.2,-12.1,-11.5,-11.3,-11.3,-10.6,-10.6,-10.1,-9.9,-9.4,-9.3,-8.6,-8.4,-8.4,-7.6,-7.0,-6.8,-6.8,-6.5,-6.3,-6.2,-5.6,-5.3,-5.1,-4.9,-4.6,-4.5,-4.3,-4.2,-4.1,-4.0,-3.7,-3.1,-2.9,-2.9,-2.8,-2.7,-2.6,-2.4,-2.3,-2.0,-1.9,-1.9,-1.6,-1.3,-1.2,-0.9,-0.8,-0.8,-0.2,-0.1,0.0,0.1,0.2,0.4,0.6,0.6,0.7,0.9,0.9,1.1,1.1,1.3,1.3,1.4,1.5,2.1,2.4,2.4,2.7,2.8,3.0,3.1,3.3,3.4,3.5,3.8,4.2,4.5,4.5,4.6,4.6,5.0,5.3,5.3,5.7,6.3,6.5,6.7,6.9,8.3,8.7,9.0,9.1,9.4,9.7,9.7,9.8,9.9,10.1,10.2,10.7,11.0,11.1,11.3,11.4,11.5,11.6,11.7,11.8,11.8,11.9,11.9,12.0,12.3,12.5,12.6,13.0,14.9,17.9, +0,2, 954, -20.3, 9.2, -1.7, 7.569, +0,2, 955, -27.9, 8.9, -3.2, 8.965, +0,2, 956, -21.3, 7.3, -1.1, 5.745, +0,2, 957, -24.5, 11.9, -1.3, 8.502, +0,2, 958, -23.7, 7.0, -2.3, 7.246, +0,2, 959, -18.7, 14.3, -1.0, 8.511, +0,2, 960, -23.2, 6.1, -2.7, 7.023, +0,2, 961, -24.9, 10.0, -2.6, 8.512, +0,2, 962, -21.6, 10.5, -1.6, 6.664, +0,2, 963, -24.3, 15.1, -1.0, 9.779, +0,2, 964, -20.2, 11.5, -1.8, 6.936, +0,2, 965, -22.3, 13.5, -1.0, 8.553, +0,2, 966, -20.5, 7.1, -2.7, 6.747, +0,2, 967, -21.4, 11.1, -2.0, 8.714, +0,2, 968, -20.8, 6.0, -2.1, 6.297, +0,2, 969, -21.1, 14.5, -0.2, 9.575, +0,2, 970, -23.6, 7.1, -2.5, 6.926, +0,2, 971, -24.9, 12.1, -2.5, 8.852, +0,2, 972, -24.0, 7.0, -2.1, 7.112, +0,2, 973, -25.6, 13.6, -1.2, 9.146, +0,2, 974, -24.8, 6.4, -2.5, 7.508, +0,2, 975, -22.8, 15.5, -0.3, 9.400, +0,2, 976, -21.5, 7.2, -1.9, 6.588, +0,2, 977, -22.3, 12.6, -1.4, 8.235, +0,2, 978, -22.7, 9.0, -1.7, 6.856, +0,2, 979, -22.3, 15.2, -1.1, 9.623, +0,2, 980, -22.0, 7.3, -1.6, 6.412, +0,2, 981, -23.1, 12.5, -1.9, 8.593, +0,2, 982, -24.2, 7.2, -1.9, 7.014, +0,2, 983, -23.4, 10.7, -2.5, 8.881, +0,2, 984, -19.6, 6.3, -2.0, 6.515, +0,2, 985, -26.8, 12.5, -1.8, 9.285, +0,2, 986, -19.9, 8.8, -1.4, 7.550, +0,2, 987, -23.6, 12.3, -1.6, 8.773, +0,2, 988, -23.9, 6.7, -1.9, 7.075, +0,2, 989, -26.6, 12.7, -2.1, 8.982, +0,2, 990, -23.4, 7.3, -2.7, 7.532, +0,2, 991, -24.2, 12.1, -2.0, 9.047, +0,2, 992, -16.5, 8.2, -0.9, 6.185, +0,2, 993, -22.3, 12.5, -1.8, 9.234, +0,2, 994, -23.3, 8.7, -1.3, 7.921, +0,2, 995, -26.2, 9.7, -3.1, 8.625, +0,2, 996, -19.9, 7.5, -1.7, 6.635, +0,2, 997, -23.4, 13.6, -2.3, 9.690, +0,2, 998, -18.7, 7.9, -1.9, 6.587, +0,2, 999, -26.2, 11.0, -2.4, 8.978, +0,2, 1000, -18.9, 10.1, -0.4, 6.826, +0,2, 1001, -24.4, 12.1, -1.7, 9.034, +0,2, 1002, -20.1, 7.3, -1.8, 6.674, +0,2, 1003, -26.0, 11.3, -2.4, 8.510, +0,2, 1004, -22.0, 9.3, -2.2, 7.566, +0,2, 1005, -32.7, 21.2, -2.5, 10.433, -32.7,-29.1,-24.0,-23.7,-22.9,-22.8,-22.4,-21.2,-20.4,-20.3,-20.2,-19.7,-19.5,-19.2,-19.1,-18.7,-18.0,-17.6,-17.6,-16.7,-16.6,-16.5,-15.9,-15.0,-14.7,-14.4,-14.1,-13.8,-12.9,-12.9,-12.6,-12.5,-12.5,-11.6,-11.5,-11.4,-11.1,-10.7,-10.4,-9.6,-9.5,-9.2,-8.5,-8.2,-8.1,-7.6,-7.5,-7.5,-7.4,-7.3,-6.7,-6.4,-6.3,-6.0,-5.9,-5.1,-4.6,-4.4,-3.8,-3.7,-3.6,-3.5,-3.5,-2.9,-2.8,-2.6,-2.4,-2.1,-1.8,-1.1,-1.1,-1.0,-0.9,-0.8,-0.4,-0.4,-0.1,0.0,0.0,0.0,0.2,0.3,0.3,0.4,0.5,0.5,0.6,0.9,1.1,1.2,1.3,1.5,1.5,1.6,1.7,1.8,1.8,1.9,1.9,2.2,2.2,2.4,2.6,2.6,2.7,3.2,3.3,3.3,3.6,4.0,4.2,4.3,4.5,4.7,4.8,4.8,5.0,5.2,5.3,5.4,6.1,6.2,6.3,6.9,6.9,7.2,7.4,7.5,7.5,8.2,8.2,8.4,8.5,8.8,9.1,9.1,9.2,9.4,9.4,9.8,9.8,10.1,10.4,10.4,10.5,10.6,10.7,10.7,10.8,10.8,11.0,11.4,11.4,11.9,13.1,13.4,21.2, +0,2, 1006, -19.7, 8.7, -1.2, 7.079, +0,2, 1007, -27.5, 15.3, -2.3, 9.383, +0,2, 1008, -19.1, 10.4, -1.5, 7.730, +0,2, 1009, -28.5, 8.5, -2.5, 8.496, +0,2, 1010, -20.2, 7.5, -1.9, 6.598, +0,2, 1011, -24.8, 13.7, -1.8, 9.982, +0,2, 1012, -22.0, 10.1, -1.1, 7.572, +0,2, 1013, -21.1, 15.4, -1.6, 9.381, +0,2, 1014, -19.2, 6.9, -2.1, 6.844, +0,2, 1015, -20.1, 14.9, -0.4, 8.211, +0,2, 1016, -31.4, 10.1, -2.8, 8.713, -31.4,-27.3,-26.1,-25.7,-25.6,-24.5,-22.6,-19.4,-18.7,-18.4,-18.1,-15.9,-14.5,-14.5,-13.8,-13.3,-13.0,-10.6,-10.2,-9.6,-9.3,-9.2,-8.7,-8.7,-8.6,-8.4,-8.3,-8.2,-7.9,-7.8,-7.5,-7.5,-7.5,-7.1,-7.1,-7.0,-6.0,-5.9,-5.7,-5.6,-5.3,-5.2,-5.1,-4.9,-4.7,-4.3,-3.9,-3.8,-3.7,-3.3,-3.1,-2.8,-1.9,-1.8,-1.6,-1.4,-1.3,-0.9,-0.8,-0.6,-0.5,0.0,0.0,0.0,0.1,0.1,0.1,0.1,0.1,0.5,0.5,0.7,0.8,1.0,1.2,1.2,1.3,1.3,1.6,1.7,1.9,2.1,2.1,2.3,2.4,2.7,2.8,3.0,3.0,3.1,3.2,3.3,3.3,3.6,3.6,3.7,3.7,3.8,3.8,3.9,4.0,4.0,4.1,4.2,4.4,4.5,4.5,4.6,5.0,5.2,5.9,5.9,6.2,6.3,6.4,6.6,7.1,7.3,7.6,7.7,8.0,8.4,9.1,9.2,10.1, +0,2, 1017, -25.3, 16.7, -1.6, 10.796, +0,2, 1018, -22.5, 13.9, -1.1, 7.133, +0,2, 1019, -26.2, 16.9, -1.6, 9.066, +0,2, 1020, -24.8, 13.3, -1.9, 8.584, +0,2, 1021, -20.9, 13.9, -1.8, 9.214, +0,2, 1022, -22.7, 9.8, -0.9, 6.980, +0,2, 1023, -21.8, 13.2, -1.3, 8.264, +0,4, 0, -19.3, 10.4, -0.7, 6.660, +0,4, 1, -20.7, 11.1, -2.1, 8.122, +0,4, 2, -23.4, 9.9, -1.6, 6.946, +0,4, 3, -25.3, 11.1, -1.3, 8.253, +0,4, 4, -23.1, 8.1, -2.0, 7.380, +0,4, 5, -21.4, 12.3, -1.7, 8.451, +0,4, 6, -21.1, 10.5, -1.3, 7.504, +0,4, 7, -22.6, 13.8, -1.8, 9.295, +0,4, 8, -23.0, 11.1, -1.6, 8.094, +0,4, 9, -24.0, 11.0, -1.4, 9.025, +0,4, 10, -23.9, 10.1, -1.8, 7.377, +0,4, 11, -19.5, 13.5, -1.2, 9.201, +0,4, 12, -21.8, 7.6, -1.9, 6.707, +0,4, 13, -21.3, 10.9, -0.8, 7.548, +0,4, 14, -26.1, 6.6, -3.0, 7.967, +0,4, 15, -27.8, 25.1, -1.0, 9.768, +0,4, 16, -19.5, 8.6, -1.3, 6.125, +0,4, 17, -23.4, 15.0, -1.4, 8.523, +0,4, 18, -23.3, 7.5, -2.1, 6.938, +0,4, 19, -22.2, 13.9, -0.8, 9.134, +0,4, 20, -18.5, 7.6, -1.4, 6.390, +0,4, 21, -21.7, 14.4, -1.1, 8.802, +0,4, 22, -19.5, 7.0, -2.0, 5.882, +0,4, 23, -24.6, 14.5, -1.4, 10.267, +0,4, 24, -22.6, 7.7, -1.6, 6.734, +0,4, 25, -23.0, 11.7, -1.5, 8.349, +0,4, 26, -21.1, 6.6, -2.4, 6.720, +0,4, 27, -25.3, 11.9, -1.7, 9.304, +0,4, 28, -22.6, 6.7, -2.3, 7.076, +0,4, 29, -22.7, 13.8, 0.2, 8.496, +0,4, 30, -21.9, 6.9, -2.9, 6.819, +0,4, 31, -23.3, 11.6, -2.1, 8.775, +0,4, 32, -20.4, 9.6, -1.2, 7.128, +0,4, 33, -23.1, 10.3, -2.1, 8.500, +0,4, 34, -18.6, 7.6, -1.4, 6.112, +0,4, 35, -24.3, 11.8, -1.9, 8.438, +0,4, 36, -20.5, 7.3, -1.8, 6.936, +0,4, 37, -23.7, 16.2, -0.6, 9.291, +0,4, 38, -18.7, 6.2, -1.6, 5.841, +0,4, 39, -24.2, 11.5, -2.0, 9.316, +0,4, 40, -18.9, 7.8, -1.6, 6.936, +0,4, 41, -24.8, 11.8, -1.7, 9.318, +0,4, 42, -20.5, 7.2, -2.7, 7.106, +0,4, 43, -23.1, 13.3, -1.9, 9.633, +0,4, 44, -25.2, 6.8, -2.2, 7.433, +0,4, 45, -22.8, 12.5, -0.5, 8.217, +0,4, 46, -21.0, 11.9, -2.2, 7.271, +0,4, 47, -25.1, 15.8, -2.1, 9.524, +0,4, 48, -20.9, 9.8, -1.7, 6.668, +0,4, 49, -26.8, 11.4, -2.8, 9.139, +0,4, 50, -19.7, 7.4, -1.4, 6.320, +0,4, 51, -25.5, 12.5, -2.7, 9.759, +0,4, 52, -22.8, 6.2, -3.0, 7.804, +0,4, 53, -20.1, 11.3, -1.9, 8.296, +0,4, 54, -21.3, 7.2, -2.4, 7.607, +0,4, 55, -23.8, 13.0, -1.1, 9.300, +0,4, 56, -22.9, 7.5, -1.7, 6.887, +0,4, 57, -23.7, 12.6, -0.8, 9.430, +0,4, 58, -19.7, 9.1, -1.4, 7.517, +0,4, 59, -23.2, 13.5, -2.4, 9.966, +0,4, 60, -18.3, 6.6, -1.6, 5.809, +0,4, 61, -22.7, 12.1, -1.8, 9.321, +0,4, 62, -22.9, 10.4, -2.3, 7.325, +0,4, 63, -24.0, 10.3, -3.1, 9.250, +0,4, 64, -21.8, 8.2, -2.0, 7.156, +0,4, 65, -23.1, 11.3, -2.6, 9.027, +0,4, 66, -18.2, 6.9, -1.7, 6.267, +0,4, 67, -25.0, 12.9, -2.4, 9.757, +0,4, 68, -24.7, 6.8, -2.7, 7.235, +0,4, 69, -33.4, 16.1, -3.3, 9.681, -33.4,-28.1,-27.2,-25.0,-24.6,-24.4,-23.7,-23.6,-23.3,-23.0,-21.1,-19.3,-18.5,-16.9,-16.8,-16.2,-16.0,-15.8,-15.1,-15.0,-14.8,-14.6,-14.4,-14.3,-14.3,-12.9,-12.3,-12.1,-11.9,-11.1,-10.8,-10.3,-10.2,-9.9,-9.4,-8.5,-8.2,-7.4,-6.9,-6.8,-6.4,-6.4,-6.1,-5.6,-5.5,-5.3,-5.0,-4.9,-4.0,-3.8,-3.6,-3.4,-3.1,-3.1,-2.9,-2.6,-2.6,-2.5,-2.4,-2.3,-2.3,-2.2,-2.2,-1.8,-1.8,-1.4,-1.3,-1.2,-0.9,-0.7,0.0,0.1,0.2,0.3,0.4,0.4,0.6,0.6,0.7,0.7,0.8,0.9,0.9,0.9,1.0,1.1,1.3,1.4,1.5,1.6,1.9,2.0,2.2,2.3,2.4,2.4,2.5,2.5,2.7,2.8,2.9,2.9,3.0,3.0,3.1,3.2,3.2,3.3,3.4,3.7,3.7,3.8,3.8,3.8,4.2,4.3,4.4,4.8,4.8,5.0,5.2,6.0,6.9,7.2,7.3,7.6,7.7,8.0,8.5,8.5,8.8,8.8,8.9,9.0,9.2,9.4,9.6,9.7,10.6,16.1, +0,4, 70, -22.4, 6.9, -2.1, 7.349, +0,4, 71, -23.3, 15.3, -0.4, 9.272, +0,4, 72, -21.3, 7.0, -2.0, 6.984, +0,4, 73, -22.7, 12.9, -1.8, 9.769, +0,4, 74, -21.7, 8.4, -1.8, 6.925, +0,4, 75, -23.5, 11.8, -2.8, 10.151, +0,4, 76, -20.3, 8.0, -1.3, 6.225, +0,4, 77, -21.1, 11.2, -1.9, 8.338, +0,4, 78, -22.3, 7.9, -1.8, 7.178, +0,4, 79, -21.5, 13.6, -0.7, 8.547, +0,4, 80, -22.7, 7.2, -2.2, 7.096, +0,4, 81, -24.5, 11.6, -2.2, 8.815, +0,4, 82, -23.5, 6.6, -2.2, 6.860, +0,4, 83, -24.3, 13.3, -2.0, 9.207, +0,4, 84, -21.9, 7.7, -1.3, 6.710, +0,4, 85, -23.6, 11.5, -1.7, 8.390, +0,4, 86, -22.3, 6.1, -3.2, 7.466, +0,4, 87, -20.9, 14.2, -0.8, 9.556, +0,4, 88, -20.8, 6.9, -2.6, 6.514, +0,4, 89, -23.9, 12.8, -1.8, 10.381, +0,4, 90, -18.2, 7.9, -1.6, 6.595, +0,4, 91, -23.0, 13.1, -2.6, 9.839, +0,4, 92, -21.8, 7.5, -2.0, 7.004, +0,4, 93, -19.6, 12.1, -1.3, 8.015, +0,4, 94, -24.1, 7.9, -1.5, 8.004, +0,4, 95, -22.6, 12.9, -1.4, 8.382, +0,4, 96, -22.4, 8.1, -1.9, 7.544, +0,4, 97, -23.1, 11.7, -1.8, 8.462, +0,4, 98, -20.0, 8.2, -2.4, 7.156, +0,4, 99, -24.7, 13.9, -2.2, 9.454, +0,4, 100, -23.1, 13.3, -1.4, 6.778, +0,4, 101, -25.2, 14.8, -2.1, 8.946, +0,4, 102, -24.3, 12.0, -2.3, 8.273, +0,4, 103, -23.1, 14.0, -1.2, 9.559, +0,4, 104, -18.3, 7.7, -1.0, 6.437, +0,4, 105, -25.4, 14.4, -1.0, 10.357, +0,4, 106, -21.5, 6.7, -2.0, 6.524, +0,4, 107, -23.8, 14.3, -1.2, 9.731, +0,4, 108, -19.7, 8.9, -1.1, 7.140, +0,4, 109, -26.0, 10.7, -2.0, 8.865, +0,4, 110, -19.5, 8.3, -2.3, 7.010, +0,4, 111, -21.9, 12.5, -0.9, 8.393, +0,4, 112, -27.2, 7.2, -3.0, 8.111, +0,4, 113, -20.6, 12.8, -1.4, 8.165, +0,4, 114, -24.5, 8.7, -1.9, 7.486, +0,4, 115, -23.4, 12.1, -1.4, 9.271, +0,4, 116, -20.6, 10.2, -2.1, 6.906, +0,4, 117, -24.7, 12.3, -2.0, 9.137, +0,4, 118, -22.6, 9.3, -3.0, 7.085, +0,4, 119, -23.0, 13.1, -1.3, 9.152, +0,4, 120, -20.8, 7.0, -2.0, 6.826, +0,4, 121, -22.8, 13.8, -1.3, 9.776, +0,4, 122, -18.8, 6.9, -1.5, 6.504, +0,4, 123, -22.5, 26.4, -0.8, 9.654, +0,4, 124, -19.4, 8.8, -1.0, 6.922, +0,4, 125, -27.0, 15.5, -2.1, 8.712, +0,4, 126, -21.9, 8.7, -1.9, 7.052, +0,4, 127, -24.8, 12.3, -1.2, 8.633, +0,4, 128, -24.7, 6.6, -2.8, 7.436, +0,4, 129, -22.7, 12.4, -2.0, 9.072, +0,4, 130, -19.9, 6.0, -1.9, 6.106, +0,4, 131, -21.4, 12.6, -1.0, 8.884, +0,4, 132, -22.2, 7.9, -1.9, 7.092, +0,4, 133, -24.6, 10.6, -1.6, 9.041, +0,4, 134, -23.0, 8.9, -2.1, 8.259, +0,4, 135, -22.8, 12.3, -1.8, 8.341, +0,4, 136, -23.7, 7.5, -2.8, 7.393, +0,4, 137, -22.6, 12.6, -1.5, 9.526, +0,4, 138, -20.3, 7.5, -1.5, 6.423, +0,4, 139, -25.6, 15.2, -0.5, 10.076, +0,4, 140, -20.1, 8.8, -0.9, 7.240, +0,4, 141, -24.7, 10.9, -2.1, 8.383, +0,4, 142, -19.7, 8.7, -1.8, 7.170, +0,4, 143, -23.7, 11.8, -1.6, 8.221, +0,4, 144, -22.9, 6.4, -2.5, 7.158, +0,4, 145, -22.0, 13.8, -1.4, 9.448, +0,4, 146, -23.9, 7.2, -2.6, 7.238, +0,4, 147, -25.4, 12.0, -2.1, 9.210, +0,4, 148, -22.4, 8.0, -1.4, 7.162, +0,4, 149, -23.2, 11.1, -1.9, 8.370, +0,4, 150, -25.0, 7.6, -3.2, 8.067, +0,4, 151, -24.1, 13.6, -0.9, 8.722, +0,4, 152, -25.0, 9.1, -2.5, 7.371, +0,4, 153, -24.9, 12.9, -1.9, 9.668, +0,4, 154, -21.8, 13.1, -1.6, 6.741, +0,4, 155, -22.9, 12.9, -0.8, 8.979, +0,4, 156, -21.7, 11.3, -0.7, 7.772, +0,4, 157, -22.6, 10.7, -1.4, 8.192, +0,4, 158, -19.2, 5.6, -1.6, 5.289, +0,4, 159, -23.0, 14.2, -1.1, 9.488, +0,4, 160, -31.2, 7.0, -2.5, 7.917, -31.2,-25.1,-24.2,-22.5,-22.0,-21.3,-18.9,-18.9,-18.4,-17.7,-15.6,-15.6,-15.4,-15.4,-13.9,-13.3,-13.2,-12.9,-12.4,-12.1,-12.0,-11.4,-11.3,-10.9,-10.5,-9.5,-9.4,-9.4,-9.4,-9.1,-9.0,-8.5,-7.8,-7.6,-7.4,-7.3,-7.1,-7.1,-6.8,-6.6,-6.4,-6.1,-6.0,-5.9,-5.7,-5.5,-5.1,-4.7,-3.8,-3.7,-3.5,-2.8,-2.7,-2.5,-2.5,-2.1,-1.8,-1.7,-1.5,-1.5,-1.5,-1.3,-1.3,-1.1,-1.1,-0.8,-0.5,-0.5,-0.4,-0.4,-0.3,-0.3,0.0,0.0,0.1,0.2,0.3,0.6,0.8,0.9,1.0,1.1,1.2,1.4,1.6,1.9,2.0,2.0,2.0,2.1,2.2,2.3,2.3,2.4,2.4,2.6,2.7,2.7,2.8,2.8,2.8,2.9,3.1,3.1,3.1,3.2,3.3,3.3,3.3,3.4,3.6,3.8,3.8,3.9,4.0,4.0,4.1,4.2,4.3,4.4,4.5,4.5,4.6,4.6,4.6,4.6,4.7,4.7,4.7,4.8,4.8,4.9,5.0,5.0,5.1,5.1,5.2,5.3,5.3,5.4,5.5,5.8,5.9,6.0,6.5,6.6,7.0, +0,4, 161, -21.3, 13.0, -1.2, 8.760, +0,4, 162, -26.1, 6.9, -2.7, 7.580, +0,4, 163, -26.1, 12.7, -1.7, 9.283, +0,4, 164, -20.1, 9.2, -1.7, 6.846, +0,4, 165, -22.8, 10.2, -1.6, 8.880, +0,4, 166, -22.5, 9.5, -1.6, 8.116, +0,4, 167, -24.3, 13.0, -0.9, 9.131, +0,4, 168, -23.2, 7.3, -1.9, 6.732, +0,4, 169, -22.0, 11.8, -1.4, 9.210, +0,4, 170, -17.6, 7.9, -1.4, 5.632, +0,4, 171, -23.5, 12.6, -0.7, 9.194, +0,4, 172, -18.2, 9.7, -0.8, 6.623, +0,4, 173, -23.1, 10.3, -2.0, 7.731, +0,4, 174, -21.6, 7.4, -1.4, 6.036, +0,4, 175, -22.0, 12.4, -1.2, 9.141, +0,4, 176, -21.9, 7.4, -2.3, 7.301, +0,4, 177, -25.0, 17.9, -1.4, 9.633, +0,4, 178, -24.5, 5.9, -2.6, 7.099, +0,4, 179, -23.4, 18.5, -1.1, 9.260, +0,4, 180, -19.0, 7.3, -1.3, 6.076, +0,4, 181, -23.5, 10.7, -1.7, 8.983, +0,4, 182, -17.5, 10.2, -1.9, 6.720, +0,4, 183, -25.6, 12.1, -2.3, 9.528, +0,4, 184, -24.1, 6.3, -2.9, 7.707, +0,4, 185, -25.4, 11.4, -2.6, 9.578, +0,4, 186, -20.3, 6.4, -2.2, 6.504, +0,4, 187, -24.7, 12.3, -1.8, 9.937, +0,4, 188, -20.3, 7.7, -2.1, 6.568, +0,4, 189, -24.0, 10.3, -2.3, 8.427, +0,4, 190, -23.6, 7.8, -1.7, 7.079, +0,4, 191, -27.7, 10.5, -2.2, 9.302, +0,4, 192, -22.4, 6.9, -2.6, 7.415, +0,4, 193, -21.2, 15.3, -0.7, 8.756, +0,4, 194, -25.5, 6.1, -2.6, 7.324, +0,4, 195, -21.5, 12.1, -1.4, 8.787, +0,4, 196, -23.1, 7.6, -1.6, 6.578, +0,4, 197, -21.9, 11.3, -1.0, 9.074, +0,4, 198, -21.0, 9.1, -0.8, 7.460, +0,4, 199, -22.6, 12.2, -1.7, 8.966, +0,4, 200, -22.2, 6.8, -2.3, 6.822, +0,4, 201, -23.3, 12.3, -2.5, 9.025, +0,4, 202, -20.8, 7.7, -1.9, 6.695, +0,4, 203, -25.2, 13.1, -1.5, 9.775, +0,4, 204, -19.5, 8.8, -2.0, 6.676, +0,4, 205, -22.0, 13.3, -2.0, 8.589, +0,4, 206, -22.5, 6.4, -1.6, 5.874, +0,4, 207, -22.8, 15.7, -1.9, 9.209, +0,4, 208, -23.1, 12.2, -2.3, 7.480, +0,4, 209, -21.5, 15.2, -1.4, 9.033, +0,4, 210, -25.1, 8.9, -2.2, 8.039, +0,4, 211, -23.3, 12.6, -1.5, 8.956, +0,4, 212, -21.5, 8.6, -1.4, 6.522, +0,4, 213, -27.5, 11.8, -2.1, 9.427, +0,4, 214, -20.6, 8.4, -1.3, 7.039, +0,4, 215, -22.9, 12.2, -1.8, 8.799, +0,4, 216, -22.5, 6.9, -2.8, 7.655, +0,4, 217, -23.7, 13.6, -1.3, 10.156, +0,4, 218, -20.7, 6.2, -2.0, 6.029, +0,4, 219, -24.7, 14.9, -1.6, 10.503, +0,4, 220, -24.3, 8.0, -1.9, 6.653, +0,4, 221, -24.6, 11.9, -1.8, 8.589, +0,4, 222, -20.9, 7.9, -1.7, 6.376, +0,4, 223, -24.4, 17.3, -1.3, 9.971, +0,4, 224, -21.0, 8.7, -2.1, 7.033, +0,4, 225, -23.0, 17.5, -1.5, 9.723, +0,4, 226, -19.6, 10.1, -1.8, 6.596, +0,4, 227, -25.1, 11.1, -1.9, 8.943, +0,4, 228, -19.9, 6.8, -1.7, 6.173, +0,4, 229, -24.2, 12.3, -0.7, 9.329, +0,4, 230, -19.8, 8.4, -1.1, 7.085, +0,4, 231, -22.4, 24.5, -1.3, 9.671, +0,4, 232, -18.1, 6.8, -2.6, 6.481, +0,4, 233, -23.3, 13.0, -1.8, 10.088, +0,4, 234, -21.6, 6.0, -2.3, 6.267, +0,4, 235, -24.4, 13.5, -1.1, 9.648, +0,4, 236, -21.9, 8.4, -1.8, 6.549, +0,4, 237, -24.4, 11.6, -1.7, 8.244, +0,4, 238, -21.5, 8.0, -1.2, 6.307, +0,4, 239, -22.5, 12.2, -2.0, 9.415, +0,4, 240, -24.6, 7.5, -2.6, 7.980, +0,4, 241, -19.5, 13.9, -1.0, 8.865, +0,4, 242, -25.1, 8.9, -2.3, 7.253, +0,4, 243, -24.0, 11.8, -2.1, 8.554, +0,4, 244, -24.1, 8.5, -1.4, 6.615, +0,4, 245, -21.8, 10.7, -1.2, 8.819, +0,4, 246, -21.2, 9.8, -1.1, 7.911, +0,4, 247, -25.1, 11.6, -2.6, 9.223, +0,4, 248, -21.4, 6.3, -2.2, 6.490, +0,4, 249, -23.9, 14.2, -1.0, 9.587, +0,4, 250, -19.4, 6.1, -1.8, 6.533, +0,4, 251, -24.3, 10.7, -2.4, 9.265, +0,4, 252, -20.3, 7.4, -2.2, 6.783, +0,4, 253, -23.8, 9.8, -2.6, 8.250, +0,4, 254, -21.0, 7.7, -1.5, 6.963, +0,4, 255, -24.2, 11.5, -2.3, 9.374, +0,4, 256, -21.8, 7.8, -2.2, 7.251, +0,4, 257, -22.5, 12.8, -0.8, 8.646, +0,4, 258, -23.4, 8.1, -2.1, 7.596, +0,4, 259, -21.3, 11.1, -2.1, 8.593, +0,4, 260, -24.3, 11.7, -2.5, 7.351, +0,4, 261, -24.7, 13.4, -1.7, 9.513, +0,4, 262, -20.3, 12.3, -1.6, 6.921, +0,4, 263, -23.4, 13.3, -2.0, 9.468, +0,4, 264, -24.1, 7.6, -2.1, 7.202, +0,4, 265, -23.3, 12.1, -2.0, 8.684, +0,4, 266, -24.9, 6.6, -1.7, 7.053, +0,4, 267, -25.9, 14.2, -2.0, 10.982, +0,4, 268, -17.4, 7.4, -1.7, 5.886, +0,4, 269, -23.3, 12.8, -1.7, 8.950, +0,4, 270, -16.8, 8.5, -1.4, 6.829, +0,4, 271, -25.4, 11.4, -1.7, 8.961, +0,4, 272, -21.4, 7.5, -2.2, 7.381, +0,4, 273, -21.3, 11.8, -1.5, 8.614, +0,4, 274, -23.4, 7.1, -2.3, 7.469, +0,4, 275, -21.9, 11.0, -1.9, 8.554, +0,4, 276, -23.9, 9.0, -2.7, 8.065, +0,4, 277, -25.5, 13.7, -2.0, 9.444, +0,4, 278, -24.8, 8.6, -2.3, 7.520, +0,4, 279, -24.2, 12.1, -1.7, 8.869, +0,4, 280, -24.7, 7.2, -2.3, 7.642, +0,4, 281, -23.5, 12.7, -1.9, 8.582, +0,4, 282, -20.5, 7.4, -1.8, 7.140, +0,4, 283, -19.4, 13.8, -0.4, 8.872, +0,4, 284, -25.4, 8.7, -2.2, 7.851, +0,4, 285, -25.3, 11.3, -2.8, 9.529, +0,4, 286, -20.2, 7.2, -1.3, 6.257, +0,4, 287, -24.7, 12.5, -1.5, 9.307, +0,4, 288, -23.3, 7.5, -2.3, 7.234, +0,4, 289, -22.8, 10.9, -2.3, 8.723, +0,4, 290, -18.5, 7.8, -1.3, 6.630, +0,4, 291, -23.1, 11.7, -2.5, 9.609, +0,4, 292, -20.0, 7.9, -1.6, 7.340, +0,4, 293, -21.5, 11.7, -2.3, 8.692, +0,4, 294, -24.6, 7.1, -2.1, 7.239, +0,4, 295, -23.6, 12.7, -1.4, 8.709, +0,4, 296, -24.1, 7.4, -2.0, 7.206, +0,4, 297, -21.8, 11.9, -1.3, 8.851, +0,4, 298, -22.4, 8.0, -1.9, 7.401, +0,4, 299, -21.2, 12.5, -1.6, 9.334, +0,4, 300, -21.6, 10.1, -1.4, 8.304, +0,4, 301, -23.6, 12.8, -2.6, 9.669, +0,4, 302, -18.9, 7.4, -1.6, 6.012, +0,4, 303, -24.8, 12.6, -1.6, 10.025, +0,4, 304, -21.7, 7.1, -1.8, 6.256, +0,4, 305, -25.4, 12.8, -2.0, 9.443, +0,4, 306, -19.8, 7.5, -1.5, 7.086, +0,4, 307, -21.9, 11.2, -2.2, 8.890, +0,4, 308, -24.1, 7.7, -3.1, 8.517, +0,4, 309, -23.5, 9.5, -2.4, 9.237, +0,4, 310, -22.1, 7.6, -2.6, 7.132, +0,4, 311, -23.6, 12.0, -2.1, 8.813, +0,4, 312, -20.9, 7.1, -1.3, 6.579, +0,4, 313, -24.1, 16.5, -1.7, 9.722, +0,4, 314, -22.7, 11.6, -2.5, 7.214, +0,4, 315, -22.6, 14.0, -1.2, 9.661, +0,4, 316, -18.0, 9.3, -1.6, 6.603, +0,4, 317, -22.3, 13.3, -1.3, 8.696, +0,4, 318, -22.2, 5.7, -2.4, 6.556, +0,4, 319, -22.0, 9.8, -2.2, 8.685, +0,4, 320, -20.7, 8.4, -1.5, 7.211, +0,4, 321, -22.7, 12.0, -1.7, 8.287, +0,4, 322, -21.6, 8.2, -1.7, 7.324, +0,4, 323, -24.5, 12.8, -2.2, 9.443, +0,4, 324, -22.3, 7.6, -2.0, 6.645, +0,4, 325, -23.4, 10.6, -2.2, 8.931, +0,4, 326, -22.9, 8.4, -1.6, 6.920, +0,4, 327, -21.8, 12.5, -0.9, 8.635, +0,4, 328, -20.9, 6.4, -1.8, 6.387, +0,4, 329, -24.1, 14.0, -1.8, 9.434, +0,4, 330, -22.9, 10.8, -2.3, 7.934, +0,4, 331, -24.4, 11.6, -1.5, 8.887, +0,4, 332, -19.1, 9.0, -1.7, 6.944, +0,4, 333, -20.8, 16.8, -0.6, 8.201, +0,4, 334, -26.6, 6.8, -2.3, 6.950, +0,4, 335, -22.7, 12.0, -2.1, 9.023, +0,4, 336, -23.4, 6.4, -1.7, 6.446, +0,4, 337, -23.9, 11.8, -2.5, 9.361, +0,4, 338, -23.4, 8.2, -2.3, 7.470, +0,4, 339, -23.7, 12.7, -1.8, 9.303, +0,4, 340, -21.6, 6.5, -1.9, 6.300, +0,4, 341, -27.1, 10.9, -2.4, 9.440, +0,4, 342, -23.2, 10.0, -1.2, 7.618, +0,4, 343, -24.0, 12.4, -1.9, 9.563, +0,4, 344, -21.4, 6.2, -2.4, 6.849, +0,4, 345, -23.1, 15.9, -1.0, 9.802, +0,4, 346, -21.2, 7.0, -2.4, 7.301, +0,4, 347, -23.6, 12.5, -1.0, 9.345, +0,4, 348, -18.5, 7.4, -2.1, 6.726, +0,4, 349, -21.8, 14.5, -1.4, 8.136, +0,4, 350, -16.7, 6.5, -1.3, 5.349, +0,4, 351, -23.7, 12.3, -2.3, 9.661, +0,4, 352, -22.4, 8.4, -1.7, 6.769, +0,4, 353, -20.9, 10.6, -1.6, 8.273, +0,4, 354, -24.4, 7.8, -2.3, 7.752, +0,4, 355, -23.0, 11.8, -2.0, 8.654, +0,4, 356, -23.5, 5.5, -2.6, 6.733, +0,4, 357, -22.3, 12.9, -1.0, 9.377, +0,4, 358, -23.6, 5.9, -2.3, 6.714, +0,4, 359, -21.7, 14.0, -1.7, 9.836, +0,4, 360, -20.6, 6.4, -1.9, 6.443, +0,4, 361, -22.7, 12.6, -1.9, 9.094, +0,4, 362, -19.7, 7.8, -1.6, 6.897, +0,4, 363, -23.1, 13.1, -1.9, 9.619, +0,4, 364, -19.2, 7.1, -1.7, 6.592, +0,4, 365, -22.1, 13.0, -1.0, 8.573, +0,4, 366, -20.7, 8.8, -2.1, 6.532, +0,4, 367, -24.5, 13.9, -2.3, 9.623, +0,4, 368, -21.7, 12.3, -1.4, 6.713, +0,4, 369, -23.8, 13.3, -1.5, 8.767, +0,4, 370, -22.8, 10.5, -2.2, 7.254, +0,4, 371, -24.5, 10.8, -2.8, 8.859, +0,4, 372, -21.0, 6.7, -1.6, 6.294, +0,4, 373, -27.3, 13.8, -0.7, 9.408, +0,4, 374, -20.9, 6.5, -1.9, 6.625, +0,4, 375, -26.2, 14.4, -2.3, 10.350, +0,4, 376, -19.0, 8.5, -1.9, 6.559, +0,4, 377, -24.7, 11.6, -2.2, 9.062, +0,4, 378, -22.8, 9.0, -2.6, 7.929, +0,4, 379, -24.3, 11.7, -2.2, 9.126, +0,4, 380, -21.2, 8.0, -1.7, 6.474, +0,4, 381, -20.8, 14.1, -1.1, 8.275, +0,4, 382, -22.2, 5.1, -2.4, 6.623, +0,4, 383, -24.2, 12.4, -2.7, 9.792, +0,4, 384, -21.5, 9.7, -1.6, 6.728, +0,4, 385, -22.7, 12.1, -2.2, 8.599, +0,4, 386, -22.9, 8.7, -1.8, 7.383, +0,4, 387, -26.3, 11.3, -2.5, 8.847, +0,4, 388, -23.4, 9.4, -1.9, 7.051, +0,4, 389, -23.8, 12.9, -1.2, 9.599, +0,4, 390, -20.2, 5.7, -1.8, 6.352, +0,4, 391, -26.1, 21.2, -1.1, 9.668, +0,4, 392, -21.8, 7.8, -2.5, 6.917, +0,4, 393, -30.7, 13.4, -2.0, 9.511, -30.7,-24.4,-22.5,-21.7,-21.6,-21.2,-19.8,-17.9,-17.4,-16.8,-16.5,-16.5,-15.7,-15.1,-14.9,-14.8,-14.7,-13.8,-13.2,-13.1,-12.0,-12.0,-11.4,-11.3,-11.0,-10.6,-10.2,-9.4,-9.3,-8.9,-8.9,-8.8,-8.2,-8.0,-7.7,-7.6,-7.0,-6.6,-5.8,-5.2,-4.6,-4.2,-4.2,-3.7,-3.7,-3.7,-3.4,-3.3,-2.4,-2.4,-2.4,-2.2,-1.8,-1.7,-1.7,-1.2,-1.2,-0.7,-0.5,-0.3,-0.1,0.0,0.0,0.0,0.0,0.1,0.3,0.3,0.5,0.5,0.7,0.7,0.7,0.9,1.2,1.3,1.6,1.7,1.9,2.0,2.2,2.9,3.7,3.8,3.9,4.1,4.3,4.5,5.4,5.7,5.7,5.8,6.3,6.3,6.5,6.7,6.8,7.2,7.4,7.5,7.9,8.0,8.1,8.3,8.5,8.5,8.5,8.6,8.6,8.6,8.7,8.8,8.8,8.9,9.1,9.5,10.5,10.9,11.0,11.0,11.1,13.1,13.4, +0,4, 394, -22.5, 7.9, -2.3, 7.145, +0,4, 395, -21.9, 11.0, -1.8, 8.654, +0,4, 396, -26.9, 8.2, -2.1, 7.784, +0,4, 397, -19.6, 12.5, -1.7, 7.835, +0,4, 398, -24.0, 5.8, -2.1, 6.407, +0,4, 399, -23.1, 11.6, -2.0, 8.877, +0,4, 400, -19.9, 6.7, -1.4, 5.640, +0,4, 401, -24.6, 12.6, -1.8, 9.030, +0,4, 402, -19.7, 8.6, -1.3, 6.683, +0,4, 403, -24.8, 11.7, -2.3, 8.657, +0,4, 404, -21.9, 7.8, -2.2, 6.968, +0,4, 405, -23.8, 11.1, -2.1, 9.233, +0,4, 406, -20.5, 5.9, -2.3, 6.658, +0,4, 407, -23.7, 14.3, -1.6, 9.506, +0,4, 408, -22.9, 7.5, -2.4, 7.005, +0,4, 409, -24.9, 10.9, -2.3, 9.432, +0,4, 410, -18.4, 6.8, -2.0, 6.411, +0,4, 411, -25.5, 12.0, -1.3, 8.870, +0,4, 412, -18.3, 7.4, -1.7, 6.294, +0,4, 413, -23.0, 11.5, -1.8, 7.772, +0,4, 414, -23.4, 5.5, -3.1, 7.002, +0,4, 415, -22.5, 12.9, -1.4, 8.445, +0,4, 416, -21.7, 7.0, -2.7, 7.054, +0,4, 417, -24.6, 12.1, -1.9, 8.899, +0,4, 418, -21.2, 7.6, -1.9, 6.560, +0,4, 419, -23.3, 12.8, -2.1, 8.522, +0,4, 420, -19.0, 8.1, -1.1, 5.757, +0,4, 421, -24.3, 12.8, -1.5, 10.009, +0,4, 422, -25.3, 15.7, -3.3, 7.859, +0,4, 423, -20.7, 17.4, -0.0, 9.518, +0,4, 424, -19.9, 7.8, -1.7, 6.430, +0,4, 425, -24.7, 11.7, -1.7, 9.466, +0,4, 426, -20.8, 7.7, -0.8, 6.160, +0,4, 427, -25.9, 12.9, -1.6, 9.492, +0,4, 428, -18.1, 7.0, -1.1, 5.404, +0,4, 429, -20.3, 14.1, -2.0, 9.875, +0,4, 430, -18.3, 6.6, -2.2, 7.030, +0,4, 431, -21.3, 13.1, -1.7, 8.751, +0,4, 432, -23.1, 7.4, -2.1, 6.850, +0,4, 433, -23.9, 11.5, -2.0, 8.643, +0,4, 434, -21.1, 6.2, -1.5, 5.913, +0,4, 435, -25.3, 13.0, -2.4, 9.456, +0,4, 436, -22.3, 9.4, -2.0, 7.990, +0,4, 437, -22.0, 14.8, -1.9, 9.733, +0,4, 438, -21.5, 6.2, -2.1, 6.604, +0,4, 439, -23.4, 13.4, -1.8, 8.663, +0,4, 440, -22.2, 10.8, -1.9, 6.829, +0,4, 441, -21.9, 13.2, -1.5, 8.571, +0,4, 442, -21.8, 8.8, -1.4, 6.715, +0,4, 443, -23.1, 11.0, -2.2, 9.126, +0,4, 444, -21.8, 8.6, -1.5, 7.131, +0,4, 445, -33.6, 26.2, -0.2, 9.655, -33.6,-18.8,-17.8,-16.9,-15.7,-15.2,-13.4,-13.3,-12.8,-12.6,-12.5,-12.0,-11.7,-11.5,-11.2,-11.0,-11.0,-10.8,-10.4,-10.2,-9.9,-9.9,-9.7,-8.7,-8.6,-8.6,-8.5,-8.2,-7.8,-7.6,-7.6,-7.5,-7.4,-7.3,-7.1,-7.0,-6.1,-6.0,-5.9,-5.6,-5.3,-5.2,-4.6,-4.3,-4.3,-4.1,-3.8,-3.4,-3.4,-2.6,-2.3,-2.1,-2.0,-1.5,-1.4,-1.2,-1.1,-1.0,-1.0,-0.1,0.0,0.0,0.5,0.8,1.2,2.3,2.4,2.7,2.8,2.8,2.8,3.0,3.2,3.4,4.0,4.0,4.3,4.5,4.5,4.6,4.9,4.9,5.4,5.5,5.9,6.1,6.1,6.1,6.1,6.5,6.8,6.9,7.4,7.5,8.0,8.1,8.1,8.5,8.8,8.9,9.3,9.6,9.7,10.2,10.2,10.3,10.3,11.0,11.9,12.3,12.3,13.0,13.1,13.2,13.7,13.8,13.9,14.1,15.0,25.5,26.2, +0,4, 446, -18.7, 7.7, -0.9, 6.186, +0,4, 447, -23.9, 14.2, -1.6, 8.553, +0,4, 448, -22.6, 8.3, -2.0, 7.601, +0,4, 449, -22.8, 11.8, -1.7, 8.566, +0,4, 450, -20.8, 8.4, -1.6, 6.338, +0,4, 451, -26.4, 9.5, -2.9, 9.442, +0,4, 452, -24.3, 6.5, -2.3, 7.551, +0,4, 453, -23.1, 10.5, -2.0, 8.219, +0,4, 454, -20.7, 8.2, -1.6, 6.342, +0,4, 455, -23.0, 11.9, -1.3, 8.386, +0,4, 456, -20.4, 7.1, -2.4, 6.752, +0,4, 457, -22.0, 13.0, -1.3, 9.002, +0,4, 458, -18.7, 6.9, -1.5, 6.081, +0,4, 459, -22.9, 12.0, -2.0, 9.056, +0,4, 460, -20.6, 6.9, -1.7, 7.045, +0,4, 461, -23.5, 12.8, -1.1, 8.783, +0,4, 462, -19.5, 8.5, -1.3, 6.145, +0,4, 463, -23.7, 12.2, -1.4, 8.592, +0,4, 464, -20.9, 7.9, -2.0, 7.544, +0,4, 465, -21.9, 10.8, -1.7, 8.529, +0,4, 466, -25.0, 6.7, -2.5, 7.330, +0,4, 467, -22.5, 12.5, -1.6, 8.987, +0,4, 468, -17.5, 6.6, -2.2, 6.322, +0,4, 469, -22.1, 13.5, -0.6, 8.231, +0,4, 470, -22.5, 8.0, -1.6, 7.116, +0,4, 471, -21.3, 12.5, -0.6, 8.339, +0,4, 472, -20.6, 9.8, -1.7, 7.362, +0,4, 473, -21.4, 11.9, -1.7, 8.850, +0,4, 474, -21.8, 8.1, -2.4, 7.252, +0,4, 475, -22.0, 16.1, -1.6, 9.116, +0,4, 476, -20.0, 16.1, -1.4, 7.653, +0,4, 477, -22.7, 13.1, -0.7, 8.737, +0,4, 478, -20.8, 10.9, -0.5, 6.584, +0,4, 479, -26.5, 12.4, -1.5, 9.039, +0,4, 480, -18.1, 7.0, -1.4, 5.944, +0,4, 481, -19.8, 13.9, -0.6, 8.820, +0,4, 482, -22.7, 5.5, -2.6, 7.293, +0,4, 483, -23.7, 14.8, -0.9, 9.788, +0,4, 484, -18.8, 8.5, -0.5, 5.858, +0,4, 485, -24.4, 11.5, -1.5, 8.649, +0,4, 486, -21.9, 7.9, -1.9, 7.002, +0,4, 487, -25.3, 9.5, -2.0, 8.476, +0,4, 488, -21.3, 8.1, -1.5, 7.252, +0,4, 489, -21.2, 13.4, -1.7, 8.811, +0,4, 490, -20.3, 7.3, -2.4, 6.910, +0,4, 491, -24.8, 15.7, -2.4, 9.832, +0,4, 492, -22.5, 8.6, -2.1, 6.883, +0,4, 493, -23.1, 15.0, -1.7, 8.981, +0,4, 494, -20.0, 10.9, -1.2, 6.318, +0,4, 495, -25.4, 24.3, -0.7, 8.919, +0,4, 496, -17.5, 7.2, -2.2, 6.945, +0,4, 497, -20.0, 10.5, -1.6, 8.038, +0,4, 498, -18.1, 5.9, -1.6, 5.921, +0,4, 499, -22.4, 20.4, -2.4, 9.624, +0,4, 500, -15.8, 9.5, -0.3, 6.466, +0,4, 501, -24.0, 14.1, -1.1, 8.333, +0,4, 502, -14.8, 7.2, -1.6, 5.645, +0,4, 503, -25.1, 13.3, -1.2, 10.512, +0,4, 504, -23.6, 8.3, -2.2, 7.812, +0,4, 505, -25.8, 12.7, -2.5, 9.301, +0,4, 506, -22.2, 7.1, -2.1, 6.121, +0,4, 507, -22.8, 13.2, -1.9, 8.974, +0,4, 508, -22.9, 6.9, -1.8, 7.108, +0,4, 509, -23.5, 10.8, -2.9, 8.676, +0,4, 510, -20.3, 8.6, -1.1, 7.052, +0,4, 511, -24.3, 12.8, -1.7, 9.044, +0,4, 512, -22.0, 7.2, -1.9, 5.887, +0,4, 513, -24.3, 10.6, -1.2, 8.022, +0,4, 514, -26.3, 7.1, -2.4, 7.783, +0,4, 515, -26.7, 11.1, -1.9, 8.705, +0,4, 516, -17.7, 7.0, -2.0, 6.658, +0,4, 517, -22.3, 13.2, -2.2, 9.771, +0,4, 518, -18.6, 7.4, -0.9, 6.071, +0,4, 519, -25.7, 12.6, -1.9, 9.833, +0,4, 520, -18.7, 4.8, -2.4, 5.734, +0,4, 521, -22.4, 24.9, -0.7, 9.903, +0,4, 522, -20.1, 5.3, -2.2, 6.477, +0,4, 523, -23.3, 14.2, -1.2, 8.926, +0,4, 524, -18.1, 5.9, -2.0, 6.185, +0,4, 525, -22.2, 11.8, -1.9, 9.469, +0,4, 526, -26.4, 7.5, -2.2, 7.864, +0,4, 527, -22.6, 12.1, -1.4, 8.086, +0,4, 528, -20.7, 7.9, -1.5, 5.783, +0,4, 529, -25.5, 12.7, -3.2, 9.847, +0,4, 530, -20.1, 14.2, -1.1, 6.471, +0,4, 531, -25.0, 13.7, -1.8, 8.948, +0,4, 532, -18.8, 9.1, -1.2, 6.061, +0,4, 533, -19.8, 14.6, -0.7, 8.725, +0,4, 534, -21.2, 7.3, -2.0, 6.566, +0,4, 535, -23.8, 12.6, -1.4, 9.323, +0,4, 536, -14.9, 5.6, -1.2, 4.899, +0,4, 537, -22.6, 14.5, -0.9, 9.477, +0,4, 538, -24.2, 8.3, -1.3, 7.223, +0,4, 539, -23.9, 10.8, -1.8, 9.044, +0,4, 540, -21.8, 8.1, -2.3, 7.599, +0,4, 541, -22.8, 11.6, -0.9, 8.364, +0,4, 542, -24.5, 8.2, -2.4, 7.450, +0,4, 543, -21.7, 10.7, -2.0, 7.464, +0,4, 544, -21.4, 5.1, -2.7, 6.487, +0,4, 545, -21.7, 11.9, -1.4, 8.455, +0,4, 546, -18.9, 8.1, -1.7, 6.534, +0,4, 547, -25.1, 10.7, -2.3, 8.839, +0,4, 548, -18.5, 7.4, -2.1, 6.261, +0,4, 549, -24.3, 11.2, -2.9, 9.198, +0,4, 550, -22.9, 7.6, -1.7, 6.892, +0,4, 551, -26.5, 11.6, -3.1, 10.260, +0,4, 552, -18.9, 6.2, -2.0, 6.279, +0,4, 553, -22.1, 10.9, -1.7, 8.327, +0,4, 554, -22.9, 6.8, -2.8, 7.650, +0,4, 555, -22.9, 12.4, -1.1, 8.959, +0,4, 556, -18.0, 6.9, -1.7, 5.947, +0,4, 557, -25.6, 12.4, -1.2, 9.441, +0,4, 558, -19.1, 8.8, -1.4, 6.543, +0,4, 559, -20.4, 12.9, -1.5, 9.724, +0,4, 560, -19.7, 6.5, -1.7, 6.044, +0,4, 561, -25.7, 12.2, -1.5, 8.921, +0,4, 562, -22.4, 9.4, -1.9, 6.982, +0,4, 563, -23.5, 11.7, -1.8, 8.931, +0,4, 564, -23.5, 7.4, -1.4, 6.957, +0,4, 565, -22.9, 12.0, -2.0, 9.351, +0,4, 566, -22.8, 8.2, -2.1, 7.540, +0,4, 567, -23.3, 13.6, -2.4, 10.313, +0,4, 568, -16.9, 7.6, -1.5, 5.759, +0,4, 569, -26.7, 11.0, -1.9, 8.749, +0,4, 570, -21.6, 6.7, -2.2, 6.931, +0,4, 571, -24.7, 11.2, -1.9, 9.022, +0,4, 572, -19.7, 7.2, -1.9, 6.624, +0,4, 573, -23.9, 11.5, -1.6, 9.316, +0,4, 574, -19.7, 8.1, -1.0, 6.777, +0,4, 575, -35.3, 25.0, -1.9, 10.203, -35.3,-22.8,-22.8,-21.5,-21.4,-20.0,-16.5,-16.5,-16.5,-16.1,-15.4,-15.3,-15.0,-14.8,-14.0,-13.6,-13.5,-13.2,-12.8,-12.6,-11.7,-11.6,-11.2,-10.5,-10.5,-10.0,-9.8,-9.8,-9.7,-9.7,-8.9,-8.9,-8.9,-8.7,-8.6,-8.1,-8.1,-8.0,-7.5,-7.5,-7.1,-6.8,-6.4,-6.3,-6.2,-6.0,-5.7,-4.9,-4.9,-4.8,-4.7,-4.2,-3.9,-3.7,-3.1,-2.7,-2.2,-1.7,-1.4,-1.1,-0.7,0.0,0.1,0.2,0.2,0.6,0.7,1.1,1.1,1.2,1.4,1.5,1.5,1.6,1.6,1.7,1.8,2.1,2.1,2.6,3.0,3.2,3.2,3.7,3.8,3.8,3.8,3.9,4.5,4.9,5.0,5.1,6.2,6.8,7.0,7.5,7.5,7.8,8.5,8.6,8.7,8.7,9.0,9.8,10.0,10.1,10.1,10.5,10.6,10.7,10.7,10.9,10.9,11.1,11.2,11.3,11.6,11.9,12.5,13.6,22.6,25.0, +0,4, 576, -17.8, 7.3, -1.1, 5.873, +0,4, 577, -29.5, 11.8, -1.9, 8.964, +0,4, 578, -25.0, 7.8, -2.8, 8.031, +0,4, 579, -23.5, 12.8, -1.2, 8.917, +0,4, 580, -19.7, 6.7, -2.2, 6.421, +0,4, 581, -21.2, 12.7, -0.8, 8.929, +0,4, 582, -24.9, 7.4, -3.0, 7.296, +0,4, 583, -22.8, 15.0, -1.2, 9.370, +0,4, 584, -17.8, 10.2, -1.1, 5.659, +0,4, 585, -22.0, 16.9, -1.1, 9.123, +0,4, 586, -23.3, 17.8, -2.3, 7.933, +0,4, 587, -23.3, 12.1, -1.3, 8.684, +0,4, 588, -16.7, 6.1, -1.4, 5.440, +0,4, 589, -23.0, 10.5, -2.0, 8.879, +0,4, 590, -22.4, 7.4, -2.0, 7.140, +0,4, 591, -22.7, 13.9, -1.0, 8.804, +0,4, 592, -19.1, 6.9, -1.2, 5.448, +0,4, 593, -25.0, 11.1, -1.8, 8.382, +0,4, 594, -21.0, 7.7, -1.8, 7.014, +0,4, 595, -22.6, 12.7, -1.2, 9.245, +0,4, 596, -20.9, 6.0, -2.5, 6.743, +0,4, 597, -22.1, 13.3, -1.6, 9.881, +0,4, 598, -22.3, 7.2, -1.3, 6.848, +0,4, 599, -22.4, 14.1, -1.3, 8.857, +0,4, 600, -18.1, 7.1, -2.1, 5.914, +0,4, 601, -25.8, 14.8, -1.6, 9.828, +0,4, 602, -20.6, 11.0, -1.3, 6.828, +0,4, 603, -22.2, 16.3, -1.8, 8.744, +0,4, 604, -23.5, 6.5, -2.0, 6.416, +0,4, 605, -21.9, 12.0, -1.7, 8.920, +0,4, 606, -23.6, 6.6, -1.9, 6.553, +0,4, 607, -25.2, 10.6, -2.8, 9.008, +0,4, 608, -21.4, 7.8, -2.4, 7.805, +0,4, 609, -25.5, 12.0, -2.1, 9.280, +0,4, 610, -23.9, 7.5, -1.5, 6.929, +0,4, 611, -21.7, 12.8, -1.8, 9.518, +0,4, 612, -24.2, 6.9, -2.8, 7.957, +0,4, 613, -22.9, 14.0, -2.0, 9.977, +0,4, 614, -24.3, 7.9, -1.8, 7.150, +0,4, 615, -21.3, 12.8, -2.5, 9.130, +0,4, 616, -21.3, 6.7, -2.3, 6.417, +0,4, 617, -25.2, 13.1, -1.0, 9.810, +0,4, 618, -24.3, 6.8, -2.9, 7.681, +0,4, 619, -23.3, 13.3, -2.2, 9.046, +0,4, 620, -20.6, 7.7, -1.7, 6.372, +0,4, 621, -23.4, 10.9, -2.2, 9.015, +0,4, 622, -18.8, 6.3, -1.2, 6.256, +0,4, 623, -23.9, 12.5, -2.3, 9.531, +0,4, 624, -16.3, 6.9, -1.4, 6.063, +0,4, 625, -26.0, 11.3, -2.2, 9.958, +0,4, 626, -16.7, 7.3, -1.3, 6.039, +0,4, 627, -23.4, 12.5, -2.2, 10.566, +0,4, 628, -16.1, 6.2, -1.6, 5.338, +0,4, 629, -26.1, 24.1, -1.0, 9.843, +0,4, 630, -22.3, 6.4, -2.3, 6.997, +0,4, 631, -24.4, 13.9, -1.3, 9.214, +0,4, 632, -19.2, 7.2, -1.2, 6.105, +0,4, 633, -22.1, 11.7, -1.4, 9.484, +0,4, 634, -26.1, 7.2, -3.1, 7.814, +0,4, 635, -20.1, 13.9, -1.3, 9.075, +0,4, 636, -19.5, 6.6, -1.5, 6.075, +0,4, 637, -21.4, 13.9, -1.2, 8.258, +0,4, 638, -25.5, 13.0, -1.8, 7.708, +0,4, 639, -22.6, 12.7, -1.4, 10.065, +0,4, 640, -19.6, 8.1, -2.1, 6.155, +0,4, 641, -22.6, 13.6, -1.2, 8.121, +0,4, 642, -26.1, 5.6, -2.4, 6.905, +0,4, 643, -24.3, 11.8, -1.5, 8.778, +0,4, 644, -22.8, 6.5, -2.0, 6.274, +0,4, 645, -24.8, 11.4, -2.0, 8.402, +0,4, 646, -20.5, 8.0, -1.8, 6.985, +0,4, 647, -25.4, 12.5, -2.7, 9.260, +0,4, 648, -23.6, 7.2, -1.7, 7.039, +0,4, 649, -24.3, 14.0, -0.8, 9.974, +0,4, 650, -26.9, 6.3, -2.6, 7.121, +0,4, 651, -20.8, 13.6, -1.3, 9.140, +0,4, 652, -18.7, 6.9, -2.0, 6.712, +0,4, 653, -20.8, 12.8, -0.9, 8.163, +0,4, 654, -23.8, 9.1, -2.4, 7.464, +0,4, 655, -25.4, 14.9, -1.8, 9.387, +0,4, 656, -19.3, 6.6, -1.5, 6.128, +0,4, 657, -21.8, 13.6, -1.5, 8.752, +0,4, 658, -22.6, 5.1, -2.3, 6.300, +0,4, 659, -24.7, 11.3, -2.5, 9.344, +0,4, 660, -18.3, 6.0, -1.5, 5.986, +0,4, 661, -25.2, 10.4, -3.0, 9.205, +0,4, 662, -23.7, 7.9, -1.6, 7.102, +0,4, 663, -19.8, 13.1, -1.7, 8.520, +0,4, 664, -19.2, 6.5, -2.0, 6.374, +0,4, 665, -25.6, 12.7, -1.4, 9.596, +0,4, 666, -22.9, 6.8, -2.2, 6.761, +0,4, 667, -22.8, 14.5, -1.3, 9.466, +0,4, 668, -20.5, 6.0, -1.8, 6.400, +0,4, 669, -24.9, 10.9, -2.6, 9.013, +0,4, 670, -23.0, 7.8, -2.6, 7.463, +0,4, 671, -24.9, 11.8, -2.2, 9.858, +0,4, 672, -16.4, 6.3, -1.5, 5.327, +0,4, 673, -23.5, 13.7, -1.5, 8.868, +0,4, 674, -26.9, 6.9, -2.1, 7.063, +0,4, 675, -21.4, 12.7, -1.8, 8.964, +0,4, 676, -20.3, 7.5, -1.9, 7.009, +0,4, 677, -25.3, 12.3, -2.0, 9.292, +0,4, 678, -25.6, 10.4, -1.8, 8.336, +0,4, 679, -23.8, 12.8, -1.4, 8.798, +0,4, 680, -20.7, 6.1, -2.1, 6.628, +0,4, 681, -23.7, 11.6, -1.1, 9.321, +0,4, 682, -21.4, 7.1, -2.1, 7.052, +0,4, 683, -21.6, 15.3, -1.5, 9.480, +0,4, 684, -21.9, 7.0, -1.7, 6.500, +0,4, 685, -25.9, 11.3, -2.3, 9.339, +0,4, 686, -21.9, 6.8, -2.5, 7.357, +0,4, 687, -23.9, 10.1, -1.3, 8.636, +0,4, 688, -23.0, 6.6, -2.4, 6.948, +0,4, 689, -20.8, 11.2, -1.6, 7.632, +0,4, 690, -21.7, 5.8, -2.7, 7.002, +0,4, 691, -24.4, 15.7, -1.7, 8.947, +0,4, 692, -24.8, 14.8, -1.5, 8.188, +0,4, 693, -23.6, 11.2, -2.1, 8.704, +0,4, 694, -20.3, 12.9, -1.3, 7.487, +0,4, 695, -21.8, 13.6, -1.7, 8.319, +0,4, 696, -23.2, 6.3, -1.6, 6.230, +0,4, 697, -23.2, 12.1, -2.6, 9.676, +0,4, 698, -20.3, 9.2, -1.6, 6.739, +0,4, 699, -27.9, 13.1, -1.8, 9.225, +0,4, 700, -18.8, 9.7, -1.6, 6.170, +0,4, 701, -25.7, 11.4, -1.8, 9.137, +0,4, 702, -20.2, 8.2, -1.4, 6.623, +0,4, 703, -27.4, 13.5, -1.1, 9.056, +0,4, 704, -14.9, 6.3, -0.9, 4.906, +0,4, 705, -26.4, 11.6, -2.2, 10.219, +0,4, 706, -25.3, 7.5, -2.6, 7.864, +0,4, 707, -24.8, 13.5, -1.6, 8.767, +0,4, 708, -20.0, 10.2, -1.9, 6.903, +0,4, 709, -22.8, 18.5, -1.4, 9.359, +0,4, 710, -19.1, 9.2, -1.6, 6.516, +0,4, 711, -22.2, 13.0, -1.9, 9.123, +0,4, 712, -20.4, 6.5, -1.7, 6.829, +0,4, 713, -23.8, 10.9, -2.1, 9.552, +0,4, 714, -20.3, 7.2, -2.0, 6.613, +0,4, 715, -24.2, 12.9, -1.2, 8.996, +0,4, 716, -21.3, 7.0, -2.1, 7.003, +0,4, 717, -23.0, 11.7, -1.3, 9.028, +0,4, 718, -23.4, 9.5, -1.4, 7.416, +0,4, 719, -21.6, 12.4, -1.2, 8.232, +0,4, 720, -20.6, 6.7, -2.2, 6.489, +0,4, 721, -20.2, 11.9, -2.0, 9.146, +0,4, 722, -23.4, 6.9, -2.6, 7.641, +0,4, 723, -22.8, 12.0, -2.0, 9.091, +0,4, 724, -15.3, 6.7, -1.1, 5.584, +0,4, 725, -24.8, 11.0, -1.6, 8.627, +0,4, 726, -21.0, 9.3, -1.2, 6.918, +0,4, 727, -22.3, 12.5, -1.8, 9.252, +0,4, 728, -22.9, 7.6, -2.0, 7.131, +0,4, 729, -25.5, 13.3, -2.7, 10.483, +0,4, 730, -18.2, 7.7, -1.2, 5.872, +0,4, 731, -24.1, 13.9, -0.9, 9.095, +0,4, 732, -19.6, 8.8, -1.6, 7.072, +0,4, 733, -25.5, 10.4, -2.0, 8.539, +0,4, 734, -21.7, 7.3, -2.1, 6.750, +0,4, 735, -21.9, 11.0, -1.7, 8.574, +0,4, 736, -21.4, 8.2, -1.3, 7.330, +0,4, 737, -21.3, 13.6, -1.4, 9.051, +0,4, 738, -18.7, 8.8, -1.0, 6.007, +0,4, 739, -24.5, 11.6, -1.4, 9.264, +0,4, 740, -20.9, 7.1, -2.0, 7.123, +0,4, 741, -24.6, 13.1, -1.2, 8.993, +0,4, 742, -20.9, 9.6, -1.0, 6.815, +0,4, 743, -22.2, 13.0, -1.3, 9.592, +0,4, 744, -20.0, 7.7, -2.5, 6.780, +0,4, 745, -22.1, 11.0, -2.0, 8.604, +0,4, 746, -22.4, 12.8, -1.4, 6.849, +0,4, 747, -24.5, 16.0, -1.1, 8.575, +0,4, 748, -17.6, 8.1, -1.2, 5.956, +0,4, 749, -26.2, 12.8, -1.2, 9.014, +0,4, 750, -19.4, 6.4, -1.5, 5.989, +0,4, 751, -22.4, 10.9, -1.7, 8.754, +0,4, 752, -20.9, 7.4, -1.6, 6.449, +0,4, 753, -22.4, 11.8, -1.5, 8.597, +0,4, 754, -20.0, 8.2, -1.5, 6.194, +0,4, 755, -23.0, 12.0, -0.5, 8.869, +0,4, 756, -15.0, 6.3, -1.6, 5.748, +0,4, 757, -23.8, 13.5, -0.6, 9.388, +0,4, 758, -21.6, 6.3, -2.5, 6.559, +0,4, 759, -21.8, 14.4, -1.4, 9.762, +0,4, 760, -19.7, 7.2, -2.3, 6.860, +0,4, 761, -22.9, 13.1, -0.3, 8.571, +0,4, 762, -22.7, 10.3, -1.9, 6.688, +0,4, 763, -24.8, 15.5, -1.7, 8.712, +0,4, 764, -17.7, 7.5, -1.5, 6.418, +0,4, 765, -24.1, 10.2, -2.6, 8.818, +0,4, 766, -23.2, 8.2, -1.9, 7.183, +0,4, 767, -23.3, 9.5, -2.7, 8.772, +0,4, 768, -19.9, 4.7, -2.4, 5.805, +0,4, 769, -24.4, 10.9, -2.5, 9.325, +0,4, 770, -21.7, 7.5, -2.1, 6.638, +0,4, 771, -23.4, 11.7, -1.7, 8.949, +0,4, 772, -20.9, 7.3, -1.8, 7.011, +0,4, 773, -23.8, 11.9, -1.3, 9.077, +0,4, 774, -24.8, 5.7, -2.9, 7.297, +0,4, 775, -21.5, 13.5, -1.5, 9.465, +0,4, 776, -20.3, 7.3, -1.3, 6.514, +0,4, 777, -24.1, 14.8, -1.0, 9.825, +0,4, 778, -22.7, 7.2, -1.8, 6.930, +0,4, 779, -24.7, 11.3, -2.2, 9.326, +0,4, 780, -21.0, 7.2, -1.4, 6.502, +0,4, 781, -22.1, 13.3, -2.3, 9.329, +0,4, 782, -20.7, 5.2, -2.0, 6.132, +0,4, 783, -23.1, 13.0, -2.2, 9.663, +0,4, 784, -18.4, 6.2, -1.5, 5.946, +0,4, 785, -24.0, 10.4, -2.5, 8.988, +0,4, 786, -24.0, 8.4, -1.9, 7.042, +0,4, 787, -23.5, 11.5, -2.5, 9.174, +0,4, 788, -20.0, 6.4, -1.6, 5.643, +0,4, 789, -25.2, 23.9, -2.1, 11.477, +0,4, 790, -22.6, 6.1, -2.3, 7.279, +0,4, 791, -23.4, 14.5, -1.8, 10.443, +0,4, 792, -16.0, 6.6, -1.3, 5.411, +0,4, 793, -25.5, 10.8, -2.8, 8.956, +0,4, 794, -20.7, 6.8, -2.6, 7.157, +0,4, 795, -25.5, 12.8, -1.9, 9.602, +0,4, 796, -20.6, 7.7, -1.5, 6.894, +0,4, 797, -21.8, 11.6, -2.3, 8.563, +0,4, 798, -20.6, 6.5, -2.3, 6.132, +0,4, 799, -22.1, 16.0, -1.4, 9.609, +0,4, 800, -19.5, 10.2, -1.0, 6.162, +0,4, 801, -24.9, 16.7, -1.9, 9.117, +0,4, 802, -21.6, 7.8, -2.8, 7.209, +0,4, 803, -25.6, 11.7, -2.4, 9.470, +0,4, 804, -21.2, 6.0, -1.4, 5.887, +0,4, 805, -25.8, 14.1, -1.6, 10.084, +0,4, 806, -19.0, 7.2, -1.8, 5.931, +0,4, 807, -29.3, 14.0, -0.8, 9.446, +0,4, 808, -16.0, 7.2, -1.5, 5.934, +0,4, 809, -22.8, 13.7, -2.0, 9.473, +0,4, 810, -17.0, 6.0, -1.9, 6.180, +0,4, 811, -24.0, 13.4, -1.5, 9.968, +0,4, 812, -19.7, 5.7, -2.5, 6.127, +0,4, 813, -23.1, 14.9, -1.0, 9.634, +0,4, 814, -23.0, 5.8, -2.5, 6.297, +0,4, 815, -22.9, 18.3, -1.3, 9.333, +0,4, 816, -18.2, 8.8, -1.5, 5.655, +0,4, 817, -23.9, 13.5, -1.2, 10.252, +0,4, 818, -14.4, 9.3, -1.3, 5.427, +0,4, 819, -21.1, 13.8, -1.2, 8.765, +0,4, 820, -22.2, 5.9, -2.5, 6.081, +0,4, 821, -20.4, 14.4, -0.1, 9.555, +0,4, 822, -25.2, 6.6, -2.1, 6.732, +0,4, 823, -21.9, 13.1, -1.2, 8.813, +0,4, 824, -20.6, 6.6, -2.3, 7.029, +0,4, 825, -25.8, 12.9, -2.3, 9.459, +0,4, 826, -20.6, 7.4, -1.1, 5.852, +0,4, 827, -23.3, 13.7, -1.0, 10.007, +0,4, 828, -20.8, 5.2, -2.4, 6.180, +0,4, 829, -21.8, 14.0, -2.3, 9.469, +0,4, 830, -25.3, 6.3, -2.1, 7.382, +0,4, 831, -22.5, 11.4, -1.6, 8.313, +0,4, 832, -21.1, 7.4, -2.4, 6.733, +0,4, 833, -22.4, 14.0, -1.1, 9.962, +0,4, 834, -16.6, 7.0, -1.8, 6.570, +0,4, 835, -23.5, 11.8, -1.4, 8.936, +0,4, 836, -24.6, 4.9, -2.7, 6.720, +0,4, 837, -22.1, 13.1, -1.8, 9.597, +0,4, 838, -23.9, 6.2, -2.2, 6.761, +0,4, 839, -24.3, 12.8, -1.3, 9.302, +0,4, 840, -19.9, 6.5, -2.2, 6.253, +0,4, 841, -26.0, 12.5, -2.9, 9.349, +0,4, 842, -20.6, 6.1, -2.1, 6.634, +0,4, 843, -24.0, 24.7, -0.7, 9.816, +0,4, 844, -23.5, 6.8, -2.2, 6.717, +0,4, 845, -20.4, 17.3, -1.1, 9.327, +0,4, 846, -20.5, 6.2, -2.2, 6.612, +0,4, 847, -24.1, 14.4, -1.6, 9.390, +0,4, 848, -18.1, 6.2, -1.8, 5.699, +0,4, 849, -24.0, 10.9, -2.9, 9.821, +0,4, 850, -22.8, 8.6, -1.3, 7.311, +0,4, 851, -24.4, 12.9, -2.1, 8.971, +0,4, 852, -21.9, 6.8, -2.4, 6.137, +0,4, 853, -24.1, 15.5, -1.9, 10.028, +0,4, 854, -24.1, 14.6, -1.7, 7.217, +0,4, 855, -23.5, 11.4, -1.8, 9.261, +0,4, 856, -20.0, 7.8, -1.3, 6.534, +0,4, 857, -23.3, 14.7, -1.1, 9.345, +0,4, 858, -21.2, 5.9, -2.2, 6.708, +0,4, 859, -26.4, 13.1, -1.1, 9.387, +0,4, 860, -22.6, 7.0, -2.4, 7.068, +0,4, 861, -22.1, 16.0, -0.7, 9.359, +0,4, 862, -22.8, 6.3, -2.2, 6.938, +0,4, 863, -24.9, 11.6, -2.1, 8.583, +0,4, 864, -15.2, 5.9, -1.7, 5.260, +0,4, 865, -24.0, 10.7, -2.5, 9.408, +0,4, 866, -22.0, 6.5, -2.2, 6.790, +0,4, 867, -22.3, 12.8, -1.2, 8.228, +0,4, 868, -20.9, 6.0, -2.2, 6.500, +0,4, 869, -23.2, 15.9, -2.6, 9.919, +0,4, 870, -21.3, 8.4, -2.6, 7.614, +0,4, 871, -24.1, 10.4, -2.2, 8.546, +0,4, 872, -17.7, 9.6, -1.6, 6.729, +0,4, 873, -23.5, 14.5, -1.0, 8.986, +0,4, 874, -20.2, 6.5, -2.1, 6.289, +0,4, 875, -25.3, 11.6, -2.2, 9.461, +0,4, 876, -17.8, 6.2, -1.5, 5.551, +0,4, 877, -22.7, 13.2, -1.0, 9.020, +0,4, 878, -19.7, 9.4, -1.2, 7.376, +0,4, 879, -22.8, 12.1, -1.6, 9.362, +0,4, 880, -20.2, 7.8, -1.3, 7.068, +0,4, 881, -23.3, 9.4, -2.4, 8.493, +0,4, 882, -21.5, 7.5, -1.8, 7.156, +0,4, 883, -25.1, 12.3, -2.6, 9.760, +0,4, 884, -18.5, 7.5, -1.7, 6.281, +0,4, 885, -22.6, 13.1, -0.8, 8.737, +0,4, 886, -19.6, 9.2, -1.5, 7.331, +0,4, 887, -22.2, 13.0, -1.4, 8.616, +0,4, 888, -17.7, 4.8, -2.0, 5.671, +0,4, 889, -23.2, 12.6, -1.3, 8.981, +0,4, 890, -22.2, 7.4, -1.9, 7.291, +0,4, 891, -24.9, 12.2, -2.5, 9.934, +0,4, 892, -19.0, 8.0, -1.6, 6.509, +0,4, 893, -22.4, 11.3, -1.7, 8.729, +0,4, 894, -20.1, 8.8, -1.8, 7.479, +0,4, 895, -23.1, 12.1, -2.3, 9.116, +0,4, 896, -17.1, 6.7, -0.8, 5.527, +0,4, 897, -23.4, 22.9, -1.7, 9.105, +0,4, 898, -22.9, 7.3, -2.2, 7.378, +0,4, 899, -26.3, 15.5, -2.0, 9.485, +0,4, 900, -22.4, 8.0, -2.2, 7.534, +0,4, 901, -24.7, 12.4, -1.3, 8.159, +0,4, 902, -22.8, 9.1, -0.8, 7.623, +0,4, 903, -23.5, 13.4, -0.8, 8.738, +0,4, 904, -19.5, 6.2, -1.8, 6.076, +0,4, 905, -21.8, 14.0, -0.6, 9.306, +0,4, 906, -21.4, 8.7, -1.9, 7.476, +0,4, 907, -22.6, 13.8, -1.8, 9.997, +0,4, 908, -20.6, 8.3, -1.5, 5.966, +0,4, 909, -24.6, 12.9, -1.1, 9.321, +0,4, 910, -19.9, 10.4, -1.4, 7.238, +0,4, 911, -26.3, 12.0, -1.8, 8.834, +0,4, 912, -20.7, 7.7, -1.3, 6.402, +0,4, 913, -24.4, 10.1, -2.3, 8.049, +0,4, 914, -24.6, 7.5, -2.3, 7.679, +0,4, 915, -20.2, 14.2, -0.8, 8.613, +0,4, 916, -17.2, 6.2, -1.1, 4.903, +0,4, 917, -21.2, 11.9, -1.1, 8.878, +0,4, 918, -21.5, 8.2, -2.2, 7.465, +0,4, 919, -24.1, 12.5, -1.6, 9.057, +0,4, 920, -20.8, 6.8, -2.2, 6.802, +0,4, 921, -24.1, 11.1, -2.6, 9.289, +0,4, 922, -20.9, 9.1, -1.4, 6.888, +0,4, 923, -23.3, 14.2, -0.1, 8.471, +0,4, 924, -16.8, 6.7, -1.7, 5.839, +0,4, 925, -25.1, 12.1, -2.4, 9.112, +0,4, 926, -23.1, 9.1, -1.6, 7.450, +0,4, 927, -24.4, 12.3, -2.5, 9.309, +0,4, 928, -22.6, 6.5, -1.5, 6.096, +0,4, 929, -20.6, 13.7, -1.6, 9.459, +0,4, 930, -24.9, 6.8, -2.7, 7.559, +0,4, 931, -23.0, 11.4, -2.0, 8.860, +0,4, 932, -20.1, 7.2, -1.6, 6.771, +0,4, 933, -24.0, 13.0, -1.6, 9.682, +0,4, 934, -21.0, 8.7, -1.9, 7.042, +0,4, 935, -24.0, 13.0, -1.6, 9.938, +0,4, 936, -19.4, 5.9, -1.9, 6.306, +0,4, 937, -25.1, 13.0, -2.4, 9.685, +0,4, 938, -22.2, 7.9, -0.8, 6.540, +0,4, 939, -23.1, 13.1, -1.7, 9.597, +0,4, 940, -15.6, 6.5, -0.9, 5.491, +0,4, 941, -22.3, 12.0, -2.1, 9.335, +0,4, 942, -18.9, 7.5, -1.7, 6.839, +0,4, 943, -21.5, 13.4, -2.0, 9.152, +0,4, 944, -20.3, 5.9, -1.5, 5.717, +0,4, 945, -26.1, 13.3, -2.4, 9.783, +0,4, 946, -18.0, 8.2, -1.2, 6.802, +0,4, 947, -24.1, 11.3, -2.0, 8.674, +0,4, 948, -16.6, 6.5, -2.1, 5.902, +0,4, 949, -22.7, 13.2, -1.7, 9.833, +0,4, 950, -21.9, 6.8, -1.6, 6.073, +0,4, 951, -29.9, 25.3, -1.4, 11.404, +0,4, 952, -21.3, 6.1, -1.9, 6.289, +0,4, 953, -23.9, 14.8, -0.9, 9.525, +0,4, 954, -23.8, 8.2, -1.8, 7.463, +0,4, 955, -24.6, 12.3, -1.6, 8.808, +0,4, 956, -15.2, 7.7, -0.9, 6.057, +0,4, 957, -22.5, 11.4, -1.8, 8.764, +0,4, 958, -24.6, 7.3, -2.7, 7.535, +0,4, 959, -22.4, 14.7, -1.8, 9.487, +0,4, 960, -22.6, 7.1, -2.6, 6.838, +0,4, 961, -19.6, 13.2, -1.2, 9.115, +0,4, 962, -23.3, 12.4, -1.2, 6.525, +0,4, 963, -24.5, 14.7, -1.3, 9.562, +0,4, 964, -21.1, 13.0, -2.5, 7.735, +0,4, 965, -23.5, 12.3, -2.2, 9.339, +0,4, 966, -21.1, 7.5, -1.4, 6.078, +0,4, 967, -21.7, 12.8, -1.2, 9.516, +0,4, 968, -23.3, 6.4, -1.7, 5.812, +0,4, 969, -22.8, 14.9, -0.2, 9.404, +0,4, 970, -17.8, 7.5, -2.2, 6.866, +0,4, 971, -24.5, 10.6, -2.3, 8.824, +0,4, 972, -21.6, 7.2, -1.5, 6.024, +0,4, 973, -23.6, 12.8, -1.8, 9.225, +0,4, 974, -23.5, 5.3, -2.4, 6.818, +0,4, 975, -20.4, 14.9, -0.6, 8.927, +0,4, 976, -20.0, 5.9, -2.5, 6.356, +0,4, 977, -23.0, 12.8, -1.2, 8.490, +0,4, 978, -24.5, 8.3, -1.8, 6.457, +0,4, 979, -23.2, 15.4, -1.6, 9.520, +0,4, 980, -19.7, 7.6, -1.0, 6.270, +0,4, 981, -23.7, 12.9, -1.4, 8.447, +0,4, 982, -25.4, 5.3, -2.7, 6.706, +0,4, 983, -21.4, 12.7, -1.3, 8.983, +0,4, 984, -19.3, 4.8, -2.3, 6.011, +0,4, 985, -25.9, 12.0, -2.0, 9.534, +0,4, 986, -16.9, 8.3, -1.1, 6.604, +0,4, 987, -23.4, 11.9, -1.8, 8.312, +0,4, 988, -22.0, 6.1, -2.5, 7.009, +0,4, 989, -26.4, 13.0, -1.8, 9.826, +0,4, 990, -23.6, 7.2, -2.4, 7.035, +0,4, 991, -21.5, 12.4, -2.0, 9.124, +0,4, 992, -16.2, 7.4, -1.0, 5.855, +0,4, 993, -22.8, 11.9, -1.4, 8.615, +0,4, 994, -21.5, 6.9, -3.0, 7.770, +0,4, 995, -24.0, 10.6, -2.0, 9.624, +0,4, 996, -19.9, 6.4, -2.2, 6.557, +0,4, 997, -21.5, 13.1, -1.2, 8.735, +0,4, 998, -22.8, 7.1, -2.2, 6.591, +0,4, 999, -24.1, 12.6, -2.2, 9.548, +0,4, 1000, -16.4, 7.3, -1.0, 5.942, +0,4, 1001, -25.6, 11.6, -2.3, 9.699, +0,4, 1002, -18.2, 7.2, -1.1, 6.520, +0,4, 1003, -23.5, 13.5, -1.8, 8.957, +0,4, 1004, -22.2, 8.8, -1.8, 7.447, +0,4, 1005, -36.1, 22.4, -1.6, 9.545, -36.1,-31.7,-22.1,-21.2,-20.6,-20.0,-18.8,-17.2,-16.8,-15.1,-14.8,-14.7,-14.1,-14.1,-14.0,-13.7,-13.5,-13.5,-13.4,-13.0,-12.8,-12.4,-12.4,-11.8,-11.7,-11.6,-11.3,-10.8,-10.7,-10.0,-9.7,-9.6,-9.6,-8.7,-8.5,-8.1,-7.8,-7.8,-7.6,-7.5,-7.3,-6.8,-6.5,-6.2,-6.0,-5.6,-5.4,-4.1,-3.8,-3.7,-2.7,-2.6,-2.2,-2.1,-2.1,-1.7,-1.6,-1.5,-1.0,-0.9,-0.8,-0.8,-0.8,-0.8,-0.7,-0.6,-0.4,-0.4,-0.2,0.0,0.0,0.0,0.1,0.3,0.3,0.4,0.5,0.6,0.6,0.7,0.7,0.7,0.7,0.9,1.0,1.1,1.1,1.4,1.5,1.6,1.6,1.7,2.0,2.1,2.5,2.7,3.1,3.2,3.5,4.0,4.4,5.3,5.4,5.9,6.0,6.1,6.2,6.5,6.7,7.0,7.1,7.1,7.2,7.3,7.4,7.4,7.5,7.7,7.8,8.0,8.2,8.6,8.7,9.1,9.1,9.2,9.3,9.4,9.5,9.5,9.5,9.6,9.7,10.1,10.1,10.2,10.3,10.4,10.4,10.6,10.7,15.3,22.4, +0,4, 1006, -22.0, 6.8, -2.1, 7.098, +0,4, 1007, -32.5, 17.1, -1.5, 10.490, -32.5,-22.8,-21.8,-20.8,-19.9,-19.7,-19.6,-19.6,-19.1,-19.1,-18.4,-18.0,-17.8,-17.4,-16.4,-16.1,-15.9,-15.2,-15.2,-15.1,-15.0,-14.6,-13.4,-13.3,-13.1,-12.9,-12.9,-11.3,-10.7,-10.6,-10.4,-10.4,-10.3,-9.8,-9.6,-9.6,-9.0,-8.7,-8.6,-8.1,-7.2,-6.8,-6.7,-6.6,-6.0,-5.9,-5.9,-5.9,-5.6,-5.6,-5.5,-5.3,-4.8,-4.7,-4.2,-4.0,-3.6,-3.3,-3.0,-2.8,-2.5,-2.5,-2.2,-1.3,-0.9,-0.6,-0.6,-0.2,-0.2,-0.1,0.0,0.1,0.8,1.0,1.1,1.1,1.2,1.6,1.7,1.9,2.0,2.0,2.2,2.9,3.0,3.0,3.1,3.1,3.1,3.2,3.5,3.5,3.5,3.6,3.7,4.3,4.4,4.5,4.6,4.8,4.8,5.5,5.9,6.6,6.6,6.9,7.0,7.5,7.6,7.9,7.9,8.3,8.6,8.7,9.1,9.3,9.5,9.9,10.0,10.1,10.4,10.5,10.7,11.1,11.1,11.6,11.9,12.0,12.3,12.3,12.6,12.6,12.7,12.7,13.0,13.2,13.8,14.3,16.2,16.8,17.1, +0,4, 1008, -22.7, 8.9, -2.0, 7.656, +0,4, 1009, -21.8, 9.6, -1.8, 7.934, +0,4, 1010, -21.1, 7.7, -1.9, 6.701, +0,4, 1011, -24.3, 14.2, -1.0, 10.172, +0,4, 1012, -22.9, 9.0, -2.0, 7.255, +0,4, 1013, -20.9, 13.6, -1.4, 8.027, +0,4, 1014, -21.8, 7.5, -2.1, 7.003, +0,4, 1015, -24.4, 13.8, -1.5, 8.076, +0,4, 1016, -29.4, 11.1, -1.9, 8.512, +0,4, 1017, -24.7, 18.7, -0.3, 10.542, +0,4, 1018, -19.9, 15.2, -1.1, 6.812, +0,4, 1019, -25.7, 22.4, -1.1, 10.102, +0,4, 1020, -26.5, 12.7, -1.9, 8.013, +0,4, 1021, -24.5, 11.6, -2.2, 9.034, +0,4, 1022, -21.6, 9.3, -1.5, 7.066, +0,4, 1023, -23.9, 12.0, -1.2, 7.899, +0,6, 0, -17.7, 9.3, -0.7, 6.263, +0,6, 1, -21.5, 10.5, -2.5, 8.431, +0,6, 2, -25.4, 10.9, -2.1, 7.399, +0,6, 3, -22.7, 11.0, -1.5, 8.318, +0,6, 4, -22.9, 6.9, -2.6, 7.371, +0,6, 5, -21.6, 13.6, -1.0, 8.484, +0,6, 6, -17.9, 11.8, -1.8, 7.080, +0,6, 7, -24.3, 12.1, -2.0, 9.114, +0,6, 8, -24.6, 9.0, -2.2, 7.923, +0,6, 9, -23.8, 11.4, -1.6, 9.329, +0,6, 10, -22.8, 9.6, -2.3, 7.732, +0,6, 11, -21.0, 13.0, -1.2, 8.326, +0,6, 12, -17.8, 6.6, -2.1, 6.363, +0,6, 13, -20.4, 12.0, -0.2, 7.428, +0,6, 14, -25.4, 7.8, -2.4, 8.231, +0,6, 15, -22.7, 24.8, -1.2, 9.612, +0,6, 16, -19.9, 9.8, -0.8, 6.293, +0,6, 17, -24.6, 16.7, -2.1, 9.307, +0,6, 18, -19.9, 8.5, -1.5, 6.701, +0,6, 19, -23.9, 12.9, -1.1, 8.841, +0,6, 20, -22.1, 6.4, -2.1, 6.907, +0,6, 21, -21.2, 13.6, -0.7, 8.392, +0,6, 22, -19.5, 6.5, -1.6, 5.799, +0,6, 23, -24.5, 12.8, -1.7, 9.841, +0,6, 24, -20.8, 10.1, -1.0, 6.551, +0,6, 25, -20.4, 12.8, -0.9, 8.937, +0,6, 26, -20.0, 7.6, -1.9, 7.134, +0,6, 27, -22.8, 10.5, -2.6, 9.125, +0,6, 28, -22.6, 7.9, -2.2, 7.034, +0,6, 29, -22.3, 13.1, -0.4, 8.579, +0,6, 30, -19.5, 7.3, -2.3, 6.835, +0,6, 31, -23.0, 12.3, -1.7, 9.223, +0,6, 32, -21.5, 9.3, -1.4, 6.552, +0,6, 33, -25.5, 10.1, -3.1, 8.959, +0,6, 34, -22.6, 7.0, -1.9, 6.648, +0,6, 35, -23.1, 11.9, -2.3, 9.242, +0,6, 36, -19.8, 6.8, -2.5, 6.670, +0,6, 37, -24.9, 12.1, -2.5, 9.132, +0,6, 38, -24.0, 6.2, -2.2, 6.525, +0,6, 39, -22.2, 12.7, -1.6, 8.873, +0,6, 40, -23.3, 6.9, -1.7, 6.890, +0,6, 41, -25.3, 13.2, -1.1, 9.346, +0,6, 42, -19.4, 8.5, -1.5, 6.792, +0,6, 43, -23.4, 13.1, -2.0, 9.872, +0,6, 44, -25.4, 8.3, -1.8, 7.439, +0,6, 45, -22.9, 12.4, -1.2, 9.177, +0,6, 46, -18.2, 13.2, -1.7, 6.999, +0,6, 47, -21.7, 13.8, -2.1, 9.354, +0,6, 48, -20.7, 8.8, -1.5, 6.844, +0,6, 49, -23.6, 12.8, -2.3, 9.657, +0,6, 50, -19.9, 7.4, -1.5, 6.156, +0,6, 51, -23.1, 13.0, -1.5, 9.428, +0,6, 52, -22.4, 6.9, -2.6, 7.706, +0,6, 53, -21.3, 10.7, -1.7, 7.988, +0,6, 54, -21.1, 7.5, -2.3, 7.636, +0,6, 55, -22.0, 13.7, -0.6, 9.280, +0,6, 56, -21.6, 6.9, -2.0, 7.137, +0,6, 57, -24.5, 12.9, -1.3, 9.948, +0,6, 58, -23.5, 8.0, -1.7, 7.412, +0,6, 59, -22.5, 12.5, -1.9, 9.534, +0,6, 60, -17.2, 7.0, -1.0, 5.666, +0,6, 61, -23.2, 12.5, -2.1, 9.292, +0,6, 62, -23.3, 10.7, -2.4, 7.326, +0,6, 63, -22.0, 12.2, -1.6, 8.609, +0,6, 64, -27.0, 8.9, -2.9, 7.697, +0,6, 65, -21.0, 12.7, -1.9, 8.832, +0,6, 66, -21.4, 6.6, -1.7, 6.461, +0,6, 67, -22.5, 12.7, -1.9, 9.139, +0,6, 68, -21.6, 8.0, -1.1, 6.667, +0,6, 69, -31.0, 19.9, -2.6, 9.366, -31.0,-25.6,-23.9,-23.0,-23.0,-21.0,-20.6,-20.3,-19.9,-19.9,-19.4,-18.9,-18.2,-18.0,-16.5,-16.2,-15.0,-14.9,-14.4,-13.5,-13.3,-13.2,-12.5,-12.4,-11.9,-11.7,-11.6,-11.4,-11.2,-10.8,-10.7,-10.7,-10.5,-9.4,-7.6,-7.0,-6.1,-6.0,-5.9,-5.7,-5.4,-4.6,-4.4,-4.3,-3.6,-3.1,-3.1,-2.6,-2.5,-2.4,-2.4,-2.4,-2.2,-2.1,-2.1,-2.0,-2.0,-1.7,-1.4,-1.3,-1.3,-1.3,-1.2,-1.1,-0.8,-0.3,-0.2,-0.2,0.0,0.0,0.2,0.3,0.4,0.5,0.6,0.7,0.7,0.8,0.9,1.0,1.1,1.1,1.1,1.2,1.2,1.4,1.5,1.7,1.8,1.9,2.1,2.1,2.3,2.3,2.3,2.5,2.5,2.7,2.8,2.9,2.9,3.5,3.7,3.8,3.9,4.3,4.5,4.7,4.7,5.0,5.3,5.5,5.6,5.9,5.9,6.1,6.1,6.5,6.5,7.4,8.1,8.2,8.3,8.7,8.7,8.9,9.1,9.3,9.4,9.9,9.9,10.1,10.2,10.6,11.0,19.9, +0,6, 70, -21.9, 8.5, -2.0, 8.085, +0,6, 71, -23.0, 15.5, -1.2, 9.737, +0,6, 72, -21.7, 7.4, -1.6, 7.019, +0,6, 73, -23.4, 14.7, -1.4, 9.808, +0,6, 74, -20.7, 7.1, -1.8, 6.894, +0,6, 75, -25.5, 12.3, -2.2, 9.647, +0,6, 76, -20.7, 8.5, -1.3, 6.479, +0,6, 77, -23.3, 11.1, -1.8, 7.979, +0,6, 78, -20.8, 7.8, -1.9, 7.223, +0,6, 79, -21.0, 14.2, -1.2, 8.064, +0,6, 80, -23.2, 5.7, -2.7, 7.099, +0,6, 81, -26.8, 11.8, -2.5, 9.073, +0,6, 82, -22.4, 7.2, -1.7, 6.841, +0,6, 83, -24.1, 12.7, -1.8, 9.447, +0,6, 84, -20.4, 9.5, -1.3, 7.062, +0,6, 85, -25.3, 12.3, -1.6, 8.974, +0,6, 86, -22.7, 6.5, -2.7, 7.443, +0,6, 87, -22.9, 12.4, -1.7, 9.601, +0,6, 88, -18.3, 8.1, -1.7, 6.057, +0,6, 89, -23.4, 12.4, -1.8, 10.049, +0,6, 90, -21.0, 7.7, -1.7, 6.932, +0,6, 91, -23.8, 12.0, -2.3, 9.201, +0,6, 92, -23.9, 8.9, -1.3, 6.930, +0,6, 93, -22.6, 10.8, -2.0, 8.006, +0,6, 94, -23.7, 7.9, -2.2, 7.855, +0,6, 95, -21.7, 13.5, -0.8, 8.384, +0,6, 96, -23.8, 6.4, -2.7, 7.388, +0,6, 97, -23.9, 11.5, -2.5, 8.503, +0,6, 98, -23.7, 7.5, -2.1, 7.304, +0,6, 99, -24.2, 12.8, -1.6, 8.941, +0,6, 100, -20.1, 15.4, -0.5, 6.935, +0,6, 101, -24.8, 12.0, -1.8, 8.602, +0,6, 102, -24.9, 11.3, -2.5, 8.673, +0,6, 103, -21.6, 14.4, -1.0, 9.163, +0,6, 104, -18.0, 6.7, -1.1, 5.887, +0,6, 105, -23.2, 12.3, -2.1, 9.966, +0,6, 106, -19.1, 7.5, -1.2, 6.461, +0,6, 107, -23.5, 12.7, -1.1, 9.120, +0,6, 108, -17.7, 8.4, -1.1, 6.684, +0,6, 109, -24.3, 12.2, -2.0, 8.609, +0,6, 110, -15.8, 7.5, -1.7, 5.881, +0,6, 111, -20.0, 11.2, -1.2, 7.974, +0,6, 112, -26.5, 6.3, -2.6, 7.834, +0,6, 113, -18.7, 13.6, -0.9, 8.223, +0,6, 114, -24.5, 6.4, -2.7, 7.657, +0,6, 115, -23.4, 13.5, -1.2, 9.562, +0,6, 116, -18.3, 11.6, -1.4, 6.943, +0,6, 117, -26.2, 13.5, -0.9, 9.148, +0,6, 118, -21.2, 10.7, -2.5, 7.603, +0,6, 119, -23.9, 11.5, -1.7, 8.617, +0,6, 120, -24.2, 7.0, -2.2, 7.054, +0,6, 121, -22.4, 13.4, -1.1, 9.336, +0,6, 122, -17.3, 7.0, -1.9, 6.075, +0,6, 123, -25.0, 25.9, -1.2, 9.769, +0,6, 124, -16.5, 8.5, -1.3, 6.554, +0,6, 125, -26.4, 15.3, -2.6, 8.848, +0,6, 126, -19.2, 7.9, -0.9, 6.215, +0,6, 127, -25.9, 11.8, -1.6, 8.582, +0,6, 128, -22.8, 6.5, -2.7, 7.255, +0,6, 129, -22.1, 12.2, -2.0, 9.106, +0,6, 130, -19.5, 5.9, -2.3, 6.167, +0,6, 131, -23.8, 12.9, -1.1, 9.086, +0,6, 132, -20.9, 7.2, -1.8, 6.617, +0,6, 133, -22.6, 11.5, -1.2, 9.148, +0,6, 134, -19.3, 11.0, -0.8, 7.569, +0,6, 135, -23.9, 13.0, -2.3, 9.110, +0,6, 136, -25.2, 6.7, -2.8, 7.688, +0,6, 137, -24.3, 12.8, -2.1, 9.844, +0,6, 138, -21.4, 6.8, -2.1, 6.162, +0,6, 139, -23.3, 13.6, -1.4, 9.386, +0,6, 140, -18.1, 7.9, -1.6, 6.776, +0,6, 141, -26.4, 11.7, -1.9, 8.489, +0,6, 142, -22.8, 9.5, -1.8, 7.496, +0,6, 143, -22.9, 12.7, -1.1, 8.822, +0,6, 144, -23.0, 6.4, -2.4, 7.284, +0,6, 145, -21.5, 13.0, -1.7, 9.356, +0,6, 146, -24.0, 7.1, -2.4, 7.339, +0,6, 147, -24.7, 14.0, -1.2, 9.020, +0,6, 148, -22.4, 8.2, -1.5, 7.069, +0,6, 149, -25.1, 12.0, -1.6, 9.324, +0,6, 150, -22.4, 9.9, -1.7, 8.411, +0,6, 151, -24.1, 12.6, -1.5, 8.702, +0,6, 152, -24.8, 9.4, -2.3, 7.748, +0,6, 153, -23.0, 12.3, -1.9, 9.390, +0,6, 154, -20.0, 13.5, -1.4, 6.723, +0,6, 155, -24.7, 12.1, -1.3, 9.240, +0,6, 156, -21.9, 10.4, -1.6, 7.610, +0,6, 157, -22.4, 8.7, -2.2, 7.608, +0,6, 158, -18.2, 7.1, -1.5, 5.869, +0,6, 159, -22.4, 12.4, -1.4, 9.667, +0,6, 160, -27.0, 7.3, -2.6, 8.555, +0,6, 161, -22.8, 12.8, -1.5, 8.928, +0,6, 162, -22.5, 7.1, -2.1, 7.176, +0,6, 163, -23.9, 11.6, -1.9, 8.921, +0,6, 164, -21.9, 7.3, -2.0, 6.520, +0,6, 165, -23.6, 11.8, -1.0, 9.038, +0,6, 166, -19.9, 11.7, -1.0, 7.866, +0,6, 167, -24.6, 12.8, -1.2, 8.889, +0,6, 168, -24.2, 6.6, -2.1, 7.108, +0,6, 169, -22.8, 13.8, -1.4, 9.379, +0,6, 170, -18.2, 6.9, -1.9, 5.648, +0,6, 171, -24.1, 12.5, -1.2, 9.335, +0,6, 172, -20.5, 7.5, -1.5, 6.412, +0,6, 173, -22.9, 10.4, -2.1, 7.993, +0,6, 174, -24.4, 7.1, -1.7, 6.839, +0,6, 175, -24.3, 11.2, -1.8, 9.348, +0,6, 176, -21.2, 5.9, -2.4, 6.944, +0,6, 177, -21.8, 18.8, -1.0, 9.121, +0,6, 178, -23.9, 7.5, -1.9, 7.172, +0,6, 179, -21.6, 17.5, -1.0, 8.946, +0,6, 180, -19.6, 6.1, -1.7, 6.225, +0,6, 181, -23.8, 12.0, -0.9, 9.447, +0,6, 182, -18.3, 10.7, -0.9, 6.612, +0,6, 183, -23.9, 12.0, -2.2, 9.219, +0,6, 184, -21.1, 7.1, -2.0, 7.175, +0,6, 185, -21.2, 12.9, -1.5, 8.901, +0,6, 186, -21.6, 6.7, -2.2, 6.365, +0,6, 187, -23.8, 13.6, -1.9, 9.846, +0,6, 188, -23.3, 8.3, -1.8, 6.658, +0,6, 189, -23.2, 12.4, -2.0, 8.797, +0,6, 190, -20.7, 9.2, -1.1, 7.130, +0,6, 191, -26.6, 10.0, -2.3, 9.386, +0,6, 192, -25.0, 7.8, -2.5, 7.619, +0,6, 193, -20.7, 15.9, -0.6, 9.165, +0,6, 194, -27.0, 6.4, -2.8, 7.233, +0,6, 195, -23.7, 11.9, -2.2, 8.756, +0,6, 196, -21.3, 7.6, -1.4, 6.294, +0,6, 197, -24.0, 9.8, -1.5, 8.959, +0,6, 198, -18.4, 8.9, -0.9, 6.789, +0,6, 199, -25.0, 12.6, -2.2, 9.430, +0,6, 200, -22.2, 5.9, -2.1, 6.377, +0,6, 201, -23.7, 13.3, -1.4, 9.390, +0,6, 202, -24.0, 7.2, -1.5, 6.978, +0,6, 203, -23.9, 14.0, -1.8, 9.944, +0,6, 204, -16.7, 8.7, -1.4, 6.547, +0,6, 205, -25.6, 14.5, -1.2, 8.689, +0,6, 206, -21.5, 7.3, -1.9, 6.270, +0,6, 207, -23.7, 16.3, -1.0, 9.699, +0,6, 208, -25.2, 12.9, -2.3, 8.058, +0,6, 209, -23.4, 15.5, -1.3, 9.016, +0,6, 210, -23.4, 7.3, -2.8, 7.698, +0,6, 211, -22.4, 12.6, -2.3, 9.147, +0,6, 212, -22.7, 7.8, -2.1, 6.777, +0,6, 213, -25.2, 10.8, -1.4, 9.447, +0,6, 214, -19.9, 9.7, -0.8, 7.158, +0,6, 215, -22.9, 12.1, -2.0, 8.307, +0,6, 216, -19.7, 7.7, -2.1, 7.327, +0,6, 217, -25.5, 12.2, -1.9, 9.706, +0,6, 218, -17.6, 6.8, -1.6, 6.129, +0,6, 219, -23.0, 13.6, -1.9, 9.675, +0,6, 220, -24.8, 7.1, -2.3, 6.671, +0,6, 221, -23.9, 13.0, -1.4, 8.683, +0,6, 222, -20.6, 7.8, -1.9, 6.646, +0,6, 223, -24.7, 15.4, -1.8, 9.686, +0,6, 224, -19.3, 9.9, -1.8, 7.191, +0,6, 225, -22.4, 17.5, -1.9, 9.532, +0,6, 226, -23.6, 10.5, -1.9, 6.805, +0,6, 227, -24.1, 11.3, -2.5, 9.102, +0,6, 228, -21.6, 7.3, -1.5, 6.228, +0,6, 229, -26.1, 11.8, -0.8, 9.646, +0,6, 230, -17.2, 8.9, -0.9, 6.526, +0,6, 231, -24.3, 24.1, -2.0, 9.770, +0,6, 232, -21.0, 6.7, -2.1, 6.537, +0,6, 233, -22.5, 13.3, -1.6, 9.799, +0,6, 234, -19.4, 7.8, -1.8, 6.519, +0,6, 235, -23.8, 12.5, -1.6, 9.838, +0,6, 236, -23.2, 7.9, -2.2, 7.016, +0,6, 237, -24.7, 13.5, -1.5, 8.732, +0,6, 238, -20.7, 8.5, -1.4, 6.966, +0,6, 239, -22.0, 12.0, -1.6, 9.183, +0,6, 240, -21.7, 7.5, -2.4, 7.343, +0,6, 241, -22.6, 12.7, -1.1, 8.332, +0,6, 242, -26.4, 7.8, -2.7, 7.904, +0,6, 243, -23.6, 12.6, -2.5, 8.715, +0,6, 244, -21.1, 8.8, -1.9, 6.981, +0,6, 245, -24.2, 10.1, -2.5, 9.510, +0,6, 246, -19.3, 8.2, -2.0, 7.206, +0,6, 247, -24.2, 14.1, -1.5, 9.468, +0,6, 248, -21.2, 6.1, -2.1, 6.011, +0,6, 249, -22.3, 13.9, -1.5, 9.416, +0,6, 250, -21.7, 6.8, -2.0, 7.102, +0,6, 251, -24.9, 10.8, -2.2, 9.138, +0,6, 252, -23.2, 7.8, -1.7, 7.126, +0,6, 253, -23.2, 10.1, -2.1, 8.027, +0,6, 254, -19.1, 7.0, -1.9, 6.855, +0,6, 255, -23.3, 9.3, -2.1, 8.470, +0,6, 256, -23.1, 8.1, -2.2, 7.077, +0,6, 257, -21.9, 12.0, -1.6, 8.496, +0,6, 258, -22.4, 7.8, -2.0, 7.211, +0,6, 259, -21.1, 10.7, -2.0, 8.626, +0,6, 260, -21.4, 11.8, -2.0, 7.483, +0,6, 261, -25.2, 11.5, -3.0, 9.775, +0,6, 262, -21.5, 11.3, -1.7, 6.855, +0,6, 263, -22.4, 14.4, -1.1, 9.443, +0,6, 264, -25.5, 6.5, -2.7, 7.890, +0,6, 265, -20.1, 14.0, -1.5, 8.850, +0,6, 266, -20.2, 7.2, -1.7, 6.624, +0,6, 267, -24.8, 13.4, -2.3, 10.617, +0,6, 268, -22.0, 7.9, -1.7, 6.017, +0,6, 269, -23.0, 15.6, -1.0, 9.236, +0,6, 270, -22.6, 7.4, -2.1, 6.632, +0,6, 271, -23.0, 11.9, -1.7, 9.178, +0,6, 272, -23.0, 8.4, -1.8, 7.533, +0,6, 273, -23.3, 11.0, -2.2, 8.298, +0,6, 274, -22.3, 7.2, -2.1, 7.111, +0,6, 275, -23.0, 12.2, -1.8, 9.053, +0,6, 276, -19.3, 11.2, -1.8, 7.440, +0,6, 277, -24.7, 13.3, -2.1, 9.373, +0,6, 278, -23.6, 8.6, -2.6, 7.443, +0,6, 279, -24.6, 12.9, -1.6, 9.215, +0,6, 280, -23.4, 7.5, -2.0, 7.581, +0,6, 281, -22.1, 13.0, -2.2, 9.200, +0,6, 282, -21.0, 6.5, -2.4, 7.275, +0,6, 283, -23.2, 12.8, -2.1, 9.292, +0,6, 284, -21.5, 7.9, -1.9, 6.786, +0,6, 285, -24.9, 12.8, -2.2, 9.336, +0,6, 286, -22.2, 7.8, -1.8, 6.322, +0,6, 287, -26.6, 12.2, -1.9, 9.645, +0,6, 288, -21.0, 8.5, -1.7, 6.879, +0,6, 289, -21.6, 12.3, -1.5, 8.344, +0,6, 290, -21.1, 7.7, -1.9, 6.718, +0,6, 291, -21.2, 14.0, -1.9, 9.548, +0,6, 292, -24.2, 8.7, -1.1, 7.227, +0,6, 293, -22.3, 12.6, -1.9, 8.917, +0,6, 294, -21.2, 9.0, -1.6, 6.691, +0,6, 295, -25.3, 11.9, -2.0, 9.099, +0,6, 296, -24.0, 7.7, -2.2, 7.580, +0,6, 297, -23.1, 11.4, -1.9, 8.837, +0,6, 298, -21.8, 8.0, -2.0, 7.291, +0,6, 299, -23.9, 11.2, -2.0, 9.228, +0,6, 300, -22.0, 8.9, -1.8, 7.616, +0,6, 301, -21.8, 15.3, -1.3, 9.200, +0,6, 302, -20.9, 6.5, -2.0, 6.494, +0,6, 303, -23.7, 12.4, -2.1, 10.124, +0,6, 304, -17.5, 7.2, -1.1, 6.096, +0,6, 305, -26.3, 10.7, -2.6, 8.935, +0,6, 306, -21.8, 7.8, -1.5, 6.932, +0,6, 307, -23.1, 11.2, -1.9, 8.756, +0,6, 308, -22.4, 5.9, -3.3, 7.769, +0,6, 309, -24.4, 10.3, -2.5, 9.166, +0,6, 310, -20.9, 8.9, -1.6, 6.957, +0,6, 311, -23.1, 12.6, -1.6, 8.962, +0,6, 312, -19.4, 7.0, -1.7, 6.188, +0,6, 313, -22.2, 15.5, -1.1, 9.557, +0,6, 314, -23.6, 11.7, -2.1, 7.596, +0,6, 315, -23.0, 11.4, -1.6, 9.051, +0,6, 316, -21.5, 10.7, -1.6, 6.769, +0,6, 317, -20.3, 12.4, -1.2, 8.572, +0,6, 318, -18.9, 7.2, -2.0, 6.450, +0,6, 319, -26.4, 10.8, -2.9, 9.385, +0,6, 320, -23.2, 8.8, -1.2, 6.999, +0,6, 321, -22.2, 10.9, -1.8, 8.010, +0,6, 322, -20.1, 8.6, -1.2, 6.787, +0,6, 323, -25.1, 11.6, -2.5, 9.154, +0,6, 324, -22.4, 6.9, -2.5, 6.969, +0,6, 325, -19.1, 12.6, -1.1, 8.596, +0,6, 326, -25.1, 8.0, -1.7, 6.885, +0,6, 327, -23.3, 14.0, -0.4, 8.736, +0,6, 328, -18.1, 6.7, -1.3, 5.943, +0,6, 329, -25.2, 14.8, -1.0, 9.562, +0,6, 330, -25.0, 11.2, -2.4, 7.978, +0,6, 331, -23.1, 12.3, -1.8, 9.161, +0,6, 332, -22.6, 8.6, -2.0, 6.664, +0,6, 333, -21.0, 17.4, -1.4, 8.845, +0,6, 334, -29.1, 6.3, -2.7, 7.598, +0,6, 335, -21.9, 12.5, -2.2, 9.645, +0,6, 336, -24.1, 6.8, -1.8, 6.921, +0,6, 337, -21.2, 12.0, -1.9, 8.650, +0,6, 338, -22.4, 8.6, -2.2, 7.480, +0,6, 339, -23.4, 13.3, -1.8, 9.188, +0,6, 340, -24.6, 5.6, -2.0, 6.341, +0,6, 341, -25.0, 11.9, -1.7, 9.554, +0,6, 342, -23.1, 7.8, -2.2, 7.017, +0,6, 343, -22.2, 13.5, -2.1, 10.262, +0,6, 344, -17.3, 5.6, -2.4, 6.214, +0,6, 345, -24.4, 14.0, -2.2, 9.649, +0,6, 346, -21.1, 7.1, -2.0, 7.038, +0,6, 347, -24.6, 11.9, -2.1, 9.285, +0,6, 348, -24.7, 6.1, -2.5, 6.902, +0,6, 349, -22.1, 14.6, -1.5, 8.844, +0,6, 350, -20.7, 6.5, -1.6, 5.735, +0,6, 351, -22.1, 13.6, -0.8, 9.400, +0,6, 352, -22.0, 8.7, -2.1, 7.135, +0,6, 353, -24.5, 10.9, -1.5, 8.350, +0,6, 354, -24.4, 8.1, -2.4, 7.721, +0,6, 355, -22.9, 12.4, -1.4, 8.604, +0,6, 356, -22.9, 5.5, -2.0, 6.810, +0,6, 357, -22.1, 12.7, -1.1, 9.277, +0,6, 358, -22.3, 7.7, -2.0, 7.001, +0,6, 359, -21.1, 13.5, -1.1, 9.212, +0,6, 360, -18.8, 6.3, -1.9, 6.182, +0,6, 361, -23.6, 12.0, -2.1, 8.784, +0,6, 362, -20.2, 8.0, -1.8, 6.894, +0,6, 363, -22.8, 13.6, -1.3, 9.216, +0,6, 364, -22.4, 6.7, -2.3, 6.942, +0,6, 365, -21.7, 14.4, -1.8, 9.105, +0,6, 366, -18.5, 8.2, -1.7, 6.467, +0,6, 367, -25.5, 13.0, -3.4, 10.420, +0,6, 368, -21.4, 11.9, -1.1, 6.665, +0,6, 369, -23.4, 14.7, -1.6, 8.817, +0,6, 370, -21.2, 11.2, -1.2, 7.259, +0,6, 371, -23.7, 12.6, -1.7, 8.694, +0,6, 372, -19.7, 7.5, -1.8, 6.447, +0,6, 373, -24.4, 12.1, -1.3, 9.012, +0,6, 374, -23.4, 7.5, -2.1, 7.177, +0,6, 375, -24.2, 12.9, -2.7, 10.027, +0,6, 376, -21.4, 8.8, -1.8, 6.669, +0,6, 377, -23.9, 12.9, -1.8, 9.334, +0,6, 378, -21.7, 9.8, -1.8, 7.877, +0,6, 379, -23.4, 10.1, -2.5, 8.997, +0,6, 380, -22.5, 7.4, -1.5, 6.676, +0,6, 381, -20.9, 13.7, -1.1, 7.853, +0,6, 382, -18.6, 5.5, -2.1, 6.280, +0,6, 383, -24.5, 12.4, -2.7, 9.242, +0,6, 384, -22.2, 9.7, -1.7, 7.153, +0,6, 385, -24.8, 13.2, -1.7, 8.947, +0,6, 386, -21.7, 8.9, -1.1, 7.327, +0,6, 387, -22.8, 12.3, -2.1, 8.749, +0,6, 388, -23.5, 8.6, -2.5, 6.978, +0,6, 389, -22.2, 11.5, -1.1, 8.880, +0,6, 390, -23.4, 7.3, -2.2, 6.834, +0,6, 391, -24.6, 23.5, -1.2, 10.071, +0,6, 392, -20.3, 7.9, -1.7, 6.498, +0,6, 393, -26.1, 15.1, -0.9, 9.577, +0,6, 394, -21.4, 6.8, -2.5, 6.791, +0,6, 395, -22.8, 11.6, -0.4, 8.667, +0,6, 396, -23.2, 8.1, -2.3, 7.413, +0,6, 397, -20.9, 11.7, -1.8, 7.681, +0,6, 398, -25.4, 4.6, -3.4, 7.273, +0,6, 399, -21.1, 12.6, -1.1, 8.485, +0,6, 400, -19.3, 6.6, -1.4, 5.568, +0,6, 401, -22.4, 12.8, -2.4, 8.567, +0,6, 402, -19.6, 6.9, -1.6, 6.086, +0,6, 403, -24.7, 13.0, -2.2, 8.819, +0,6, 404, -23.1, 8.7, -2.2, 6.864, +0,6, 405, -23.2, 12.0, -2.0, 9.552, +0,6, 406, -22.7, 5.6, -2.2, 6.585, +0,6, 407, -22.9, 13.4, -1.1, 9.389, +0,6, 408, -23.0, 9.1, -1.2, 7.236, +0,6, 409, -25.2, 11.6, -1.9, 9.475, +0,6, 410, -19.3, 7.1, -1.5, 6.163, +0,6, 411, -23.0, 12.2, -1.5, 8.821, +0,6, 412, -17.8, 7.2, -1.3, 5.884, +0,6, 413, -24.6, 11.7, -1.9, 8.945, +0,6, 414, -22.2, 6.6, -2.5, 7.382, +0,6, 415, -24.4, 12.7, -1.0, 8.968, +0,6, 416, -21.5, 7.2, -1.9, 6.897, +0,6, 417, -22.2, 10.7, -2.8, 8.754, +0,6, 418, -20.3, 6.6, -2.1, 6.360, +0,6, 419, -21.7, 11.5, -2.0, 7.973, +0,6, 420, -17.9, 8.0, -1.4, 6.497, +0,6, 421, -26.1, 11.1, -2.6, 9.838, +0,6, 422, -24.5, 15.2, -2.5, 7.971, +0,6, 423, -22.6, 16.3, -1.2, 9.364, +0,6, 424, -18.8, 8.3, -1.6, 6.388, +0,6, 425, -23.6, 10.9, -2.0, 9.105, +0,6, 426, -19.8, 7.1, -1.6, 5.984, +0,6, 427, -26.4, 11.5, -2.0, 9.205, +0,6, 428, -15.5, 7.4, -0.9, 5.561, +0,6, 429, -22.0, 13.0, -1.5, 9.356, +0,6, 430, -22.1, 7.1, -1.9, 6.677, +0,6, 431, -23.4, 12.4, -2.0, 8.462, +0,6, 432, -21.2, 7.8, -1.5, 6.811, +0,6, 433, -23.8, 11.8, -1.6, 8.726, +0,6, 434, -21.5, 6.7, -1.4, 6.088, +0,6, 435, -23.6, 12.8, -1.4, 9.503, +0,6, 436, -21.6, 9.3, -1.6, 7.892, +0,6, 437, -21.0, 15.5, -1.5, 8.708, +0,6, 438, -21.5, 7.6, -1.1, 6.540, +0,6, 439, -25.5, 12.0, -2.4, 8.921, +0,6, 440, -25.1, 11.5, -2.6, 7.747, +0,6, 441, -23.9, 13.2, -1.5, 9.466, +0,6, 442, -22.8, 8.3, -1.8, 7.078, +0,6, 443, -24.7, 10.7, -1.9, 8.960, +0,6, 444, -20.7, 9.2, -1.1, 7.557, +0,6, 445, -30.6, 25.8, 0.0, 9.006, -30.6,-20.3,-16.0,-15.7,-14.4,-14.3,-14.1,-13.9,-12.7,-11.9,-11.2,-10.6,-10.4,-10.0,-9.9,-9.9,-9.1,-8.9,-8.6,-8.6,-8.2,-7.9,-7.4,-7.4,-7.2,-7.0,-6.5,-6.2,-6.1,-6.0,-5.9,-5.8,-5.2,-5.2,-5.1,-5.0,-4.7,-4.6,-4.4,-4.0,-3.8,-3.7,-3.6,-3.0,-2.7,-2.5,-2.3,-2.2,-2.2,-1.9,-1.9,-1.5,-0.7,-0.6,-0.6,-0.4,-0.1,0.0,0.1,1.0,1.1,1.3,1.4,1.8,2.0,2.5,2.5,3.1,3.1,3.1,3.1,3.3,3.6,3.8,3.9,4.0,4.0,4.5,4.6,4.8,5.0,5.2,5.5,5.6,6.2,6.4,6.6,7.3,7.5,7.7,7.8,8.1,8.6,8.7,8.8,8.9,9.3,9.4,9.6,10.0,10.0,10.5,10.8,10.9,11.4,11.8,11.9,12.0,12.3,12.4,13.3,13.4,13.5,23.9,25.8, +0,6, 446, -17.6, 7.9, -1.1, 6.128, +0,6, 447, -22.2, 15.1, -0.9, 7.653, +0,6, 448, -21.7, 7.0, -2.5, 7.265, +0,6, 449, -24.9, 11.6, -1.7, 8.485, +0,6, 450, -22.0, 7.2, -2.0, 6.711, +0,6, 451, -25.7, 11.1, -1.9, 9.073, +0,6, 452, -23.7, 5.9, -3.2, 7.289, +0,6, 453, -22.3, 11.5, -1.0, 7.964, +0,6, 454, -20.0, 7.5, -2.0, 6.651, +0,6, 455, -25.4, 11.6, -1.8, 9.045, +0,6, 456, -17.9, 8.7, -1.1, 6.899, +0,6, 457, -21.5, 12.8, -1.6, 8.767, +0,6, 458, -17.6, 7.9, -1.8, 6.154, +0,6, 459, -25.1, 13.4, -2.0, 9.891, +0,6, 460, -23.2, 7.1, -1.9, 6.328, +0,6, 461, -24.5, 13.8, -0.2, 8.796, +0,6, 462, -17.4, 9.1, -1.3, 5.830, +0,6, 463, -23.8, 11.7, -1.8, 8.417, +0,6, 464, -19.7, 7.3, -2.6, 7.033, +0,6, 465, -22.1, 11.9, -1.7, 8.933, +0,6, 466, -27.3, 6.8, -2.9, 7.813, +0,6, 467, -21.4, 13.5, -0.8, 9.210, +0,6, 468, -21.8, 7.2, -2.0, 6.340, +0,6, 469, -21.3, 15.0, -0.1, 8.974, +0,6, 470, -21.2, 7.9, -1.2, 6.927, +0,6, 471, -25.5, 10.7, -1.2, 8.207, +0,6, 472, -20.4, 9.1, -1.1, 6.978, +0,6, 473, -23.6, 12.5, -2.2, 9.105, +0,6, 474, -21.5, 8.1, -2.6, 6.780, +0,6, 475, -22.2, 16.8, -1.6, 9.280, +0,6, 476, -22.0, 16.2, -1.9, 7.233, +0,6, 477, -22.4, 13.4, -1.0, 9.007, +0,6, 478, -18.1, 10.5, -1.1, 6.371, +0,6, 479, -26.9, 11.5, -2.2, 8.481, +0,6, 480, -24.2, 8.1, -1.1, 6.228, +0,6, 481, -20.9, 13.2, -1.2, 9.088, +0,6, 482, -24.8, 6.2, -3.0, 7.625, +0,6, 483, -23.0, 13.1, -1.9, 9.256, +0,6, 484, -21.3, 7.8, -1.6, 6.040, +0,6, 485, -24.8, 10.4, -2.5, 8.898, +0,6, 486, -18.5, 9.0, -1.4, 6.981, +0,6, 487, -26.8, 10.6, -1.5, 8.917, +0,6, 488, -20.4, 8.0, -1.7, 7.190, +0,6, 489, -22.8, 12.2, -2.1, 8.793, +0,6, 490, -22.7, 8.4, -1.8, 6.980, +0,6, 491, -21.4, 15.5, -1.4, 9.041, +0,6, 492, -22.3, 8.4, -2.8, 7.212, +0,6, 493, -23.7, 13.6, -2.4, 8.677, +0,6, 494, -20.2, 10.9, -1.6, 6.849, +0,6, 495, -26.0, 23.8, -0.8, 9.421, +0,6, 496, -25.8, 8.0, -2.0, 6.994, +0,6, 497, -23.3, 11.3, -2.2, 8.835, +0,6, 498, -17.5, 7.1, -1.7, 6.083, +0,6, 499, -24.0, 21.4, -2.0, 9.998, +0,6, 500, -21.5, 8.3, -1.0, 6.611, +0,6, 501, -23.0, 13.8, -0.9, 8.805, +0,6, 502, -15.0, 7.1, -1.4, 5.602, +0,6, 503, -24.6, 12.3, -1.7, 9.806, +0,6, 504, -25.1, 8.8, -1.9, 7.554, +0,6, 505, -22.7, 14.0, -1.9, 8.967, +0,6, 506, -23.5, 9.1, -1.4, 6.641, +0,6, 507, -24.5, 14.1, -1.1, 9.281, +0,6, 508, -22.7, 8.8, -1.2, 7.466, +0,6, 509, -23.2, 9.4, -2.6, 8.496, +0,6, 510, -21.7, 7.5, -1.5, 7.092, +0,6, 511, -21.2, 11.8, -1.7, 8.422, +0,6, 512, -22.2, 7.8, -1.9, 6.041, +0,6, 513, -26.8, 10.1, -2.0, 8.593, +0,6, 514, -22.5, 7.3, -1.8, 7.044, +0,6, 515, -24.9, 11.6, -1.8, 8.779, +0,6, 516, -19.8, 6.8, -2.4, 6.490, +0,6, 517, -24.4, 12.3, -2.8, 9.575, +0,6, 518, -18.3, 7.9, -1.2, 5.556, +0,6, 519, -25.7, 12.8, -1.5, 9.511, +0,6, 520, -17.9, 6.5, -1.9, 5.656, +0,6, 521, -21.8, 25.9, -1.1, 10.197, +0,6, 522, -18.2, 6.4, -1.9, 6.183, +0,6, 523, -22.7, 12.1, -2.2, 8.605, +0,6, 524, -19.4, 6.3, -1.9, 6.278, +0,6, 525, -23.2, 11.9, -2.0, 9.954, +0,6, 526, -25.5, 8.0, -1.6, 7.686, +0,6, 527, -21.5, 12.7, -1.0, 8.242, +0,6, 528, -20.0, 8.6, -1.7, 6.096, +0,6, 529, -24.4, 13.8, -2.6, 9.612, +0,6, 530, -21.5, 14.2, -1.5, 6.790, +0,6, 531, -23.0, 13.8, -1.5, 8.646, +0,6, 532, -18.7, 7.6, -1.1, 5.609, +0,6, 533, -20.7, 13.3, -1.7, 8.507, +0,6, 534, -18.8, 5.7, -2.2, 5.988, +0,6, 535, -24.3, 10.4, -1.7, 8.366, +0,6, 536, -18.1, 7.0, -1.1, 5.313, +0,6, 537, -21.9, 11.5, -2.1, 9.302, +0,6, 538, -21.9, 9.9, -1.3, 7.398, +0,6, 539, -21.7, 11.2, -1.7, 8.610, +0,6, 540, -18.6, 7.9, -1.9, 6.862, +0,6, 541, -21.8, 11.5, -1.1, 8.323, +0,6, 542, -24.7, 8.2, -2.2, 8.072, +0,6, 543, -22.0, 10.7, -1.7, 7.333, +0,6, 544, -22.0, 6.5, -2.7, 6.906, +0,6, 545, -21.2, 13.0, -0.9, 8.325, +0,6, 546, -18.7, 7.7, -1.4, 6.161, +0,6, 547, -25.1, 10.9, -2.3, 9.545, +0,6, 548, -18.5, 7.6, -1.2, 6.375, +0,6, 549, -26.2, 10.6, -1.9, 8.873, +0,6, 550, -22.7, 8.2, -1.5, 8.052, +0,6, 551, -24.6, 11.6, -2.7, 10.069, +0,6, 552, -19.3, 7.1, -1.5, 6.102, +0,6, 553, -23.6, 12.1, -1.4, 8.411, +0,6, 554, -22.7, 6.5, -2.6, 7.488, +0,6, 555, -24.5, 11.7, -1.5, 9.128, +0,6, 556, -20.5, 8.4, -1.2, 6.545, +0,6, 557, -25.0, 11.7, -1.6, 9.243, +0,6, 558, -21.0, 7.9, -1.4, 6.413, +0,6, 559, -22.7, 12.9, -2.2, 10.211, +0,6, 560, -18.8, 7.2, -1.2, 5.907, +0,6, 561, -23.8, 12.2, -1.1, 8.528, +0,6, 562, -20.4, 8.5, -1.5, 7.190, +0,6, 563, -25.0, 13.0, -1.8, 9.192, +0,6, 564, -21.0, 7.4, -1.9, 6.764, +0,6, 565, -24.6, 13.9, -1.4, 9.657, +0,6, 566, -23.7, 7.7, -2.7, 7.564, +0,6, 567, -24.4, 12.8, -2.1, 9.333, +0,6, 568, -18.5, 7.3, -1.1, 5.813, +0,6, 569, -23.1, 11.4, -1.4, 8.207, +0,6, 570, -20.9, 8.0, -2.3, 7.002, +0,6, 571, -24.1, 12.4, -1.6, 8.848, +0,6, 572, -22.7, 8.2, -1.3, 6.764, +0,6, 573, -25.9, 10.5, -2.4, 8.921, +0,6, 574, -18.2, 7.4, -1.2, 6.637, +0,6, 575, -31.6, 24.9, -0.1, 9.428, -31.6,-19.8,-18.5,-18.1,-17.2,-16.6,-15.6,-14.3,-12.6,-12.3,-11.7,-11.4,-11.3,-10.7,-10.1,-10.0,-9.7,-9.3,-9.2,-9.1,-9.0,-8.8,-8.8,-8.3,-7.4,-7.3,-7.2,-7.0,-6.9,-6.9,-6.7,-6.4,-6.1,-6.1,-5.9,-5.8,-5.6,-5.6,-5.6,-5.5,-5.5,-4.8,-4.3,-3.7,-3.3,-3.2,-3.2,-3.1,-2.6,-2.5,-2.5,-2.5,-1.8,-1.6,-0.9,-0.8,-0.7,-0.6,-0.1,0.0,0.4,0.6,1.8,2.0,2.1,2.1,2.2,2.2,2.3,2.5,2.5,3.0,3.1,3.4,3.4,3.5,3.5,3.6,3.7,3.8,3.9,4.4,4.6,4.7,5.0,5.7,6.8,7.2,7.4,7.6,8.3,8.5,8.8,9.2,9.3,9.3,9.7,9.9,10.3,10.5,10.5,10.5,10.7,10.9,10.9,11.1,11.1,11.2,11.6,11.8,11.9,11.9,12.0,12.1,13.0,13.7,13.9,24.0,24.9, +0,6, 576, -14.1, 7.8, -0.3, 5.533, +0,6, 577, -27.0, 12.6, -2.1, 8.666, +0,6, 578, -24.5, 7.2, -2.5, 7.640, +0,6, 579, -22.4, 12.0, -1.3, 8.493, +0,6, 580, -21.7, 7.6, -1.9, 6.732, +0,6, 581, -22.8, 13.9, -1.6, 9.795, +0,6, 582, -20.6, 7.5, -2.7, 6.942, +0,6, 583, -23.9, 15.9, -1.1, 8.466, +0,6, 584, -20.0, 8.4, -1.8, 6.181, +0,6, 585, -22.0, 16.1, -1.4, 8.461, +0,6, 586, -21.6, 18.4, -1.9, 7.384, +0,6, 587, -23.0, 12.8, -1.3, 9.028, +0,6, 588, -20.7, 6.7, -1.7, 5.869, +0,6, 589, -22.3, 11.9, -1.8, 9.050, +0,6, 590, -20.6, 6.2, -2.7, 6.743, +0,6, 591, -25.6, 12.7, -1.9, 8.800, +0,6, 592, -21.3, 9.0, -1.3, 6.495, +0,6, 593, -24.4, 13.5, -0.7, 8.699, +0,6, 594, -23.5, 8.1, -1.5, 7.112, +0,6, 595, -22.4, 12.4, -1.9, 9.105, +0,6, 596, -22.4, 7.4, -2.5, 7.189, +0,6, 597, -22.9, 13.8, -2.0, 10.154, +0,6, 598, -24.4, 8.1, -0.9, 6.426, +0,6, 599, -21.8, 15.9, -2.0, 9.852, +0,6, 600, -18.2, 9.0, -1.8, 6.103, +0,6, 601, -25.2, 14.4, -1.4, 9.326, +0,6, 602, -19.0, 9.7, -1.5, 6.827, +0,6, 603, -22.5, 17.3, -1.8, 8.839, +0,6, 604, -23.7, 6.8, -2.0, 6.510, +0,6, 605, -22.2, 11.6, -1.8, 8.711, +0,6, 606, -23.6, 8.2, -2.1, 7.185, +0,6, 607, -24.2, 11.1, -2.0, 8.650, +0,6, 608, -22.9, 7.8, -2.7, 7.768, +0,6, 609, -27.1, 10.6, -2.2, 9.419, +0,6, 610, -23.0, 7.7, -1.8, 7.075, +0,6, 611, -22.4, 13.9, -1.3, 9.512, +0,6, 612, -26.6, 6.6, -2.9, 7.684, +0,6, 613, -24.4, 13.0, -1.9, 9.554, +0,6, 614, -23.3, 8.2, -1.6, 7.074, +0,6, 615, -23.6, 10.4, -3.5, 8.679, +0,6, 616, -20.9, 6.8, -2.0, 6.544, +0,6, 617, -22.4, 13.5, -0.7, 10.094, +0,6, 618, -25.7, 6.8, -2.6, 7.544, +0,6, 619, -23.9, 12.9, -2.2, 9.049, +0,6, 620, -19.6, 7.4, -1.6, 6.478, +0,6, 621, -24.5, 12.4, -1.8, 9.429, +0,6, 622, -20.2, 7.0, -1.7, 6.326, +0,6, 623, -24.9, 11.5, -2.5, 9.205, +0,6, 624, -16.1, 8.1, -1.1, 6.250, +0,6, 625, -22.2, 10.7, -1.9, 8.981, +0,6, 626, -15.7, 7.1, -1.3, 5.800, +0,6, 627, -22.6, 12.4, -2.0, 9.320, +0,6, 628, -17.3, 5.3, -1.9, 5.355, +0,6, 629, -25.2, 23.5, -1.3, 9.126, +0,6, 630, -23.3, 6.7, -2.4, 7.617, +0,6, 631, -25.0, 12.7, -1.7, 9.732, +0,6, 632, -20.0, 6.3, -1.6, 5.830, +0,6, 633, -23.0, 12.6, -1.3, 9.005, +0,6, 634, -24.3, 6.7, -2.9, 7.464, +0,6, 635, -24.3, 12.9, -1.6, 8.436, +0,6, 636, -20.6, 7.9, -2.2, 6.346, +0,6, 637, -23.1, 13.7, -1.5, 8.204, +0,6, 638, -26.4, 13.8, -2.9, 7.799, +0,6, 639, -22.9, 10.9, -1.8, 9.210, +0,6, 640, -17.0, 9.0, -1.7, 6.053, +0,6, 641, -23.5, 11.6, -2.2, 8.015, +0,6, 642, -22.3, 5.8, -2.2, 6.578, +0,6, 643, -24.0, 12.5, -2.4, 9.866, +0,6, 644, -22.3, 7.2, -1.7, 6.540, +0,6, 645, -23.7, 11.3, -2.3, 8.783, +0,6, 646, -22.4, 7.6, -2.2, 7.141, +0,6, 647, -22.6, 14.5, -1.7, 8.980, +0,6, 648, -23.8, 7.9, -2.4, 7.518, +0,6, 649, -25.0, 13.7, -1.0, 9.804, +0,6, 650, -23.5, 6.1, -2.5, 6.922, +0,6, 651, -20.9, 14.4, -1.0, 8.970, +0,6, 652, -20.3, 8.6, -2.0, 6.516, +0,6, 653, -24.2, 13.0, -2.1, 8.836, +0,6, 654, -26.1, 9.2, -2.7, 7.976, +0,6, 655, -24.8, 15.2, -2.0, 9.533, +0,6, 656, -20.0, 7.2, -1.3, 6.251, +0,6, 657, -22.7, 12.7, -1.9, 8.599, +0,6, 658, -22.9, 6.1, -2.4, 6.768, +0,6, 659, -24.5, 13.2, -1.7, 9.994, +0,6, 660, -21.5, 6.5, -1.7, 6.433, +0,6, 661, -22.8, 11.5, -1.1, 8.499, +0,6, 662, -22.6, 8.0, -1.4, 7.577, +0,6, 663, -22.0, 12.7, -1.4, 8.603, +0,6, 664, -17.3, 6.2, -1.8, 5.946, +0,6, 665, -26.3, 11.3, -2.1, 9.578, +0,6, 666, -23.1, 6.2, -2.3, 7.196, +0,6, 667, -21.1, 13.5, -1.5, 9.090, +0,6, 668, -21.2, 7.5, -1.9, 6.614, +0,6, 669, -24.7, 11.9, -2.1, 9.719, +0,6, 670, -23.5, 7.3, -2.9, 7.695, +0,6, 671, -25.3, 10.4, -2.8, 9.748, +0,6, 672, -16.3, 6.1, -1.4, 5.135, +0,6, 673, -24.7, 11.8, -1.8, 8.032, +0,6, 674, -25.0, 6.9, -2.4, 7.419, +0,6, 675, -22.8, 11.6, -1.8, 8.304, +0,6, 676, -20.2, 8.6, -1.5, 7.083, +0,6, 677, -25.3, 10.0, -3.1, 9.154, +0,6, 678, -21.4, 11.1, -1.8, 8.085, +0,6, 679, -24.9, 12.5, -1.0, 8.610, +0,6, 680, -18.8, 8.0, -2.1, 6.141, +0,6, 681, -25.1, 11.8, -1.5, 9.136, +0,6, 682, -22.2, 7.5, -1.6, 6.967, +0,6, 683, -22.8, 13.2, -1.5, 8.883, +0,6, 684, -21.6, 8.4, -1.8, 6.946, +0,6, 685, -23.4, 12.6, -1.4, 9.267, +0,6, 686, -21.9, 8.2, -2.7, 7.947, +0,6, 687, -26.2, 9.9, -2.0, 8.547, +0,6, 688, -21.3, 7.7, -1.9, 7.196, +0,6, 689, -21.5, 9.9, -1.4, 7.359, +0,6, 690, -23.0, 5.8, -2.7, 6.986, +0,6, 691, -23.7, 15.6, -1.5, 8.983, +0,6, 692, -24.2, 15.3, -2.2, 8.678, +0,6, 693, -22.5, 10.9, -1.8, 8.318, +0,6, 694, -22.1, 12.5, -1.7, 7.547, +0,6, 695, -22.2, 12.1, -1.6, 8.203, +0,6, 696, -20.3, 8.1, -0.8, 6.396, +0,6, 697, -24.2, 13.0, -2.1, 10.045, +0,6, 698, -18.1, 6.7, -1.5, 6.312, +0,6, 699, -25.5, 11.7, -1.9, 8.820, +0,6, 700, -21.7, 9.0, -1.2, 6.294, +0,6, 701, -24.1, 12.7, -1.2, 8.839, +0,6, 702, -20.9, 9.3, -1.1, 6.632, +0,6, 703, -25.0, 10.0, -2.4, 8.869, +0,6, 704, -14.4, 6.1, -1.0, 5.199, +0,6, 705, -23.2, 12.6, -1.8, 10.025, +0,6, 706, -25.7, 8.7, -1.8, 8.250, +0,6, 707, -24.2, 13.2, -2.5, 9.008, +0,6, 708, -21.5, 11.1, -1.8, 7.108, +0,6, 709, -21.8, 16.7, -1.2, 9.163, +0,6, 710, -19.3, 10.2, -1.1, 6.523, +0,6, 711, -21.3, 12.9, -0.9, 8.799, +0,6, 712, -19.9, 7.2, -1.4, 6.904, +0,6, 713, -21.5, 12.5, -2.1, 9.602, +0,6, 714, -21.4, 7.1, -1.5, 6.353, +0,6, 715, -23.5, 12.8, -1.0, 8.884, +0,6, 716, -19.7, 7.0, -1.9, 6.914, +0,6, 717, -24.8, 11.6, -1.5, 8.939, +0,6, 718, -21.1, 9.7, -1.6, 7.082, +0,6, 719, -23.6, 11.8, -1.6, 8.800, +0,6, 720, -17.9, 7.4, -1.7, 6.244, +0,6, 721, -22.7, 11.4, -2.0, 9.050, +0,6, 722, -24.0, 6.8, -2.3, 7.209, +0,6, 723, -24.6, 12.6, -2.0, 9.100, +0,6, 724, -16.3, 6.4, -1.7, 5.901, +0,6, 725, -24.1, 11.7, -0.8, 8.618, +0,6, 726, -21.8, 9.2, -1.7, 6.743, +0,6, 727, -23.9, 12.0, -1.8, 9.168, +0,6, 728, -24.6, 6.5, -2.7, 7.306, +0,6, 729, -24.1, 12.5, -2.3, 9.454, +0,6, 730, -18.6, 7.4, -1.4, 5.861, +0,6, 731, -25.0, 11.7, -1.5, 8.871, +0,6, 732, -21.8, 8.2, -1.8, 7.375, +0,6, 733, -23.7, 10.5, -1.7, 8.275, +0,6, 734, -20.0, 7.1, -1.4, 6.464, +0,6, 735, -25.5, 9.9, -2.2, 8.427, +0,6, 736, -19.1, 7.8, -1.3, 6.528, +0,6, 737, -22.2, 14.2, -1.1, 8.948, +0,6, 738, -16.6, 6.7, -1.2, 5.287, +0,6, 739, -23.8, 10.9, -1.6, 9.085, +0,6, 740, -20.9, 8.1, -2.1, 6.989, +0,6, 741, -22.1, 12.2, -1.6, 8.625, +0,6, 742, -23.2, 9.4, -2.4, 7.537, +0,6, 743, -21.9, 12.5, -1.4, 9.288, +0,6, 744, -19.4, 8.0, -2.4, 6.300, +0,6, 745, -20.4, 12.5, -0.8, 8.093, +0,6, 746, -20.6, 12.0, -1.9, 6.727, +0,6, 747, -25.1, 15.7, -1.4, 8.721, +0,6, 748, -18.0, 7.4, -1.7, 5.886, +0,6, 749, -25.2, 10.5, -1.6, 8.702, +0,6, 750, -21.8, 7.4, -1.4, 6.098, +0,6, 751, -25.5, 11.0, -2.7, 9.782, +0,6, 752, -21.6, 6.7, -2.2, 6.263, +0,6, 753, -24.0, 13.1, -1.0, 9.013, +0,6, 754, -21.2, 8.5, -1.2, 6.171, +0,6, 755, -23.7, 10.2, -2.0, 8.633, +0,6, 756, -19.4, 6.9, -1.4, 5.542, +0,6, 757, -24.5, 13.3, -1.6, 9.938, +0,6, 758, -22.1, 6.6, -2.2, 7.030, +0,6, 759, -23.5, 13.9, -1.9, 9.710, +0,6, 760, -20.1, 8.3, -1.2, 6.471, +0,6, 761, -23.9, 12.2, -1.1, 8.411, +0,6, 762, -21.3, 10.5, -2.1, 7.414, +0,6, 763, -25.5, 13.8, -2.1, 8.875, +0,6, 764, -16.7, 8.8, -1.2, 6.546, +0,6, 765, -24.9, 12.6, -2.6, 8.865, +0,6, 766, -21.5, 7.7, -1.9, 6.979, +0,6, 767, -24.8, 10.9, -2.4, 9.105, +0,6, 768, -21.6, 5.9, -2.0, 5.889, +0,6, 769, -25.6, 10.5, -2.7, 9.300, +0,6, 770, -26.1, 7.5, -2.3, 7.079, +0,6, 771, -24.9, 11.0, -2.2, 8.942, +0,6, 772, -23.1, 8.8, -1.8, 7.358, +0,6, 773, -27.3, 11.8, -2.1, 9.833, +0,6, 774, -25.5, 8.2, -2.2, 7.336, +0,6, 775, -21.9, 13.6, -1.3, 9.871, +0,6, 776, -22.0, 7.7, -1.7, 7.037, +0,6, 777, -24.8, 13.2, -2.5, 9.661, +0,6, 778, -23.8, 7.4, -1.7, 7.052, +0,6, 779, -23.0, 11.8, -1.7, 9.224, +0,6, 780, -17.8, 6.9, -1.5, 6.062, +0,6, 781, -22.0, 13.1, -1.8, 9.467, +0,6, 782, -23.2, 6.8, -2.2, 6.849, +0,6, 783, -23.3, 12.6, -2.1, 9.311, +0,6, 784, -19.5, 8.0, -1.3, 5.632, +0,6, 785, -24.6, 12.2, -1.5, 9.318, +0,6, 786, -25.5, 8.1, -2.0, 7.558, +0,6, 787, -23.2, 13.3, -1.3, 8.958, +0,6, 788, -19.1, 8.3, -1.0, 5.731, +0,6, 789, -22.6, 24.5, -2.0, 11.058, +0,6, 790, -24.2, 7.0, -2.5, 7.101, +0,6, 791, -23.1, 13.1, -1.9, 9.986, +0,6, 792, -18.1, 6.2, -1.2, 5.401, +0,6, 793, -24.3, 11.1, -2.2, 8.462, +0,6, 794, -24.3, 7.6, -2.7, 7.437, +0,6, 795, -22.7, 12.9, -2.1, 9.595, +0,6, 796, -19.0, 7.3, -1.8, 6.733, +0,6, 797, -21.4, 13.9, -1.8, 8.943, +0,6, 798, -22.1, 7.1, -2.3, 6.066, +0,6, 799, -24.0, 13.7, -2.3, 9.002, +0,6, 800, -21.8, 9.5, -1.7, 6.175, +0,6, 801, -26.1, 17.7, -1.8, 9.544, +0,6, 802, -19.8, 8.8, -2.6, 6.749, +0,6, 803, -22.2, 12.7, -1.8, 9.190, +0,6, 804, -21.7, 6.0, -1.9, 6.149, +0,6, 805, -21.6, 12.5, -1.4, 9.327, +0,6, 806, -15.0, 7.9, -1.1, 5.601, +0,6, 807, -25.6, 14.5, -0.7, 9.464, +0,6, 808, -19.1, 6.3, -2.2, 6.005, +0,6, 809, -24.9, 13.2, -2.1, 9.035, +0,6, 810, -23.4, 5.5, -2.4, 6.178, +0,6, 811, -22.8, 14.4, -1.5, 9.550, +0,6, 812, -19.8, 5.2, -2.3, 6.219, +0,6, 813, -21.6, 14.5, -1.0, 8.860, +0,6, 814, -21.8, 7.1, -1.9, 6.400, +0,6, 815, -22.8, 17.5, -1.2, 8.787, +0,6, 816, -17.8, 9.6, -1.5, 5.976, +0,6, 817, -23.0, 12.6, -1.4, 9.595, +0,6, 818, -18.0, 8.0, -1.2, 5.475, +0,6, 819, -21.9, 13.2, -1.2, 8.340, +0,6, 820, -22.1, 5.8, -2.3, 6.226, +0,6, 821, -22.1, 12.6, -1.6, 9.471, +0,6, 822, -22.7, 5.8, -2.2, 6.147, +0,6, 823, -24.1, 14.6, -1.2, 9.566, +0,6, 824, -22.6, 7.2, -2.4, 6.899, +0,6, 825, -25.2, 11.9, -2.3, 9.252, +0,6, 826, -20.5, 6.9, -1.4, 5.884, +0,6, 827, -21.5, 11.6, -1.5, 8.898, +0,6, 828, -21.5, 6.0, -2.6, 6.739, +0,6, 829, -20.6, 12.8, -2.5, 9.325, +0,6, 830, -23.1, 5.9, -2.6, 6.963, +0,6, 831, -23.9, 11.2, -1.7, 7.825, +0,6, 832, -20.4, 5.6, -2.5, 6.404, +0,6, 833, -25.3, 11.3, -2.1, 9.752, +0,6, 834, -22.4, 8.0, -1.0, 6.477, +0,6, 835, -22.8, 12.0, -1.9, 8.894, +0,6, 836, -26.4, 5.8, -2.7, 6.765, +0,6, 837, -21.8, 13.9, -1.8, 9.962, +0,6, 838, -20.8, 6.5, -2.1, 6.501, +0,6, 839, -24.6, 12.4, -1.5, 9.453, +0,6, 840, -21.1, 6.9, -1.7, 6.270, +0,6, 841, -22.6, 14.7, -1.8, 9.377, +0,6, 842, -19.6, 6.6, -2.1, 6.386, +0,6, 843, -23.6, 22.0, -1.6, 9.963, +0,6, 844, -24.9, 6.3, -2.5, 7.142, +0,6, 845, -19.4, 16.2, -1.1, 9.835, +0,6, 846, -17.3, 6.8, -1.4, 6.051, +0,6, 847, -23.2, 13.1, -1.3, 9.209, +0,6, 848, -16.5, 5.7, -1.6, 5.457, +0,6, 849, -24.7, 10.7, -2.2, 9.112, +0,6, 850, -25.7, 8.3, -1.8, 7.187, +0,6, 851, -21.5, 13.3, -2.1, 8.492, +0,6, 852, -19.9, 7.4, -1.6, 6.245, +0,6, 853, -24.4, 14.8, -2.1, 9.912, +0,6, 854, -24.7, 15.4, -1.6, 7.592, +0,6, 855, -23.2, 12.1, -2.0, 9.236, +0,6, 856, -19.0, 7.9, -1.5, 6.440, +0,6, 857, -23.6, 12.9, -1.5, 9.107, +0,6, 858, -24.3, 6.7, -2.5, 6.819, +0,6, 859, -24.5, 13.0, -1.8, 9.735, +0,6, 860, -19.7, 7.4, -1.9, 6.732, +0,6, 861, -21.6, 13.6, -1.4, 9.115, +0,6, 862, -23.5, 9.0, -1.7, 7.445, +0,6, 863, -25.0, 12.6, -2.4, 9.147, +0,6, 864, -13.7, 6.1, -1.3, 5.083, +0,6, 865, -23.6, 10.8, -2.3, 8.849, +0,6, 866, -22.6, 7.5, -1.7, 7.153, +0,6, 867, -22.6, 12.8, -2.2, 8.440, +0,6, 868, -21.3, 5.7, -2.0, 6.707, +0,6, 869, -22.3, 15.9, -2.4, 9.600, +0,6, 870, -19.8, 9.6, -1.8, 7.577, +0,6, 871, -24.2, 11.1, -2.0, 8.919, +0,6, 872, -21.6, 9.3, -1.7, 6.711, +0,6, 873, -19.4, 16.2, -0.2, 9.023, +0,6, 874, -21.7, 7.4, -1.9, 6.490, +0,6, 875, -24.1, 12.5, -2.3, 10.672, +0,6, 876, -17.6, 7.0, -1.3, 5.470, +0,6, 877, -22.6, 12.7, -1.0, 8.633, +0,6, 878, -21.4, 10.3, -1.0, 7.164, +0,6, 879, -25.4, 11.3, -2.2, 9.262, +0,6, 880, -20.8, 8.5, -0.6, 6.901, +0,6, 881, -23.6, 11.9, -1.9, 8.833, +0,6, 882, -21.3, 7.5, -2.0, 7.244, +0,6, 883, -21.9, 13.3, -2.2, 10.251, +0,6, 884, -19.7, 7.1, -2.0, 6.689, +0,6, 885, -23.8, 12.5, -1.6, 8.946, +0,6, 886, -20.8, 9.1, -1.0, 7.204, +0,6, 887, -26.1, 11.8, -2.0, 9.336, +0,6, 888, -18.1, 7.0, -1.6, 5.722, +0,6, 889, -22.0, 13.8, -0.8, 8.867, +0,6, 890, -22.4, 6.6, -2.3, 7.027, +0,6, 891, -26.2, 12.4, -3.0, 10.302, +0,6, 892, -20.7, 7.4, -1.5, 6.168, +0,6, 893, -24.6, 11.7, -1.6, 8.745, +0,6, 894, -24.6, 9.7, -1.6, 8.829, +0,6, 895, -20.8, 12.2, -2.0, 8.668, +0,6, 896, -18.9, 6.9, -1.1, 5.681, +0,6, 897, -24.5, 22.3, -1.9, 9.316, +0,6, 898, -24.9, 7.8, -2.2, 7.943, +0,6, 899, -24.6, 14.8, -1.7, 8.794, +0,6, 900, -21.5, 6.7, -2.1, 7.081, +0,6, 901, -22.8, 12.7, -0.9, 8.543, +0,6, 902, -23.0, 9.4, -1.0, 7.417, +0,6, 903, -25.7, 12.5, -0.4, 9.035, +0,6, 904, -19.6, 6.9, -1.9, 6.521, +0,6, 905, -24.2, 13.1, -1.3, 8.698, +0,6, 906, -22.6, 9.0, -1.8, 7.283, +0,6, 907, -24.0, 12.3, -1.9, 9.420, +0,6, 908, -20.1, 8.2, -2.1, 6.460, +0,6, 909, -25.7, 13.3, -1.7, 9.378, +0,6, 910, -21.9, 8.5, -1.5, 6.632, +0,6, 911, -28.8, 11.5, -1.9, 8.793, +0,6, 912, -23.4, 7.9, -1.4, 6.423, +0,6, 913, -23.0, 11.4, -1.6, 8.706, +0,6, 914, -22.3, 7.4, -2.6, 7.385, +0,6, 915, -23.2, 14.7, -1.0, 8.802, +0,6, 916, -17.8, 6.7, -1.0, 5.338, +0,6, 917, -24.8, 11.5, -1.8, 9.338, +0,6, 918, -20.8, 8.0, -1.8, 7.173, +0,6, 919, -23.2, 10.7, -1.8, 8.661, +0,6, 920, -22.1, 6.8, -2.1, 6.835, +0,6, 921, -25.3, 10.8, -2.7, 9.257, +0,6, 922, -20.1, 9.8, -1.2, 6.966, +0,6, 923, -22.5, 13.4, -0.8, 8.741, +0,6, 924, -19.6, 7.9, -1.0, 5.727, +0,6, 925, -24.1, 14.2, -2.4, 9.591, +0,6, 926, -20.1, 10.4, -1.8, 7.483, +0,6, 927, -24.8, 12.1, -2.7, 9.438, +0,6, 928, -21.1, 7.2, -1.6, 6.489, +0,6, 929, -20.1, 12.6, -1.4, 8.806, +0,6, 930, -22.8, 6.2, -2.5, 6.910, +0,6, 931, -25.6, 12.1, -2.2, 9.077, +0,6, 932, -18.3, 8.0, -1.9, 7.081, +0,6, 933, -23.2, 14.0, -0.8, 9.868, +0,6, 934, -20.6, 10.0, -1.4, 7.205, +0,6, 935, -24.8, 14.0, -1.6, 9.951, +0,6, 936, -16.5, 6.5, -1.7, 6.015, +0,6, 937, -24.7, 13.5, -2.6, 10.374, +0,6, 938, -23.1, 7.9, -2.0, 7.132, +0,6, 939, -24.6, 11.2, -2.9, 9.620, +0,6, 940, -15.0, 6.4, -0.9, 5.410, +0,6, 941, -24.0, 14.4, -0.9, 9.725, +0,6, 942, -22.2, 7.7, -2.3, 7.034, +0,6, 943, -24.7, 11.5, -2.9, 9.119, +0,6, 944, -18.4, 5.8, -1.5, 5.620, +0,6, 945, -20.9, 13.7, -1.3, 9.001, +0,6, 946, -24.5, 8.6, -1.0, 7.113, +0,6, 947, -23.1, 11.9, -1.8, 9.126, +0,6, 948, -15.7, 6.0, -1.7, 5.837, +0,6, 949, -23.2, 12.3, -1.7, 9.305, +0,6, 950, -18.5, 6.3, -1.7, 5.863, +0,6, 951, -26.6, 23.3, -1.3, 10.555, +0,6, 952, -18.8, 7.0, -1.4, 5.746, +0,6, 953, -21.2, 16.4, -0.7, 9.221, +0,6, 954, -22.1, 7.6, -1.6, 7.406, +0,6, 955, -24.8, 10.0, -2.6, 8.240, +0,6, 956, -14.6, 8.6, -1.0, 5.546, +0,6, 957, -20.5, 12.7, -1.0, 8.721, +0,6, 958, -25.1, 6.8, -2.1, 7.425, +0,6, 959, -20.0, 13.4, -0.9, 8.557, +0,6, 960, -22.9, 7.2, -2.4, 6.692, +0,6, 961, -21.4, 12.2, -1.6, 9.092, +0,6, 962, -21.3, 10.8, -1.1, 6.355, +0,6, 963, -20.7, 15.5, -0.3, 9.485, +0,6, 964, -21.5, 12.4, -1.9, 7.323, +0,6, 965, -23.7, 12.1, -1.5, 8.756, +0,6, 966, -20.3, 6.7, -2.0, 6.252, +0,6, 967, -23.8, 13.6, -1.4, 9.336, +0,6, 968, -19.9, 6.6, -1.8, 6.165, +0,6, 969, -22.7, 14.0, -0.9, 9.582, +0,6, 970, -22.3, 7.4, -2.5, 6.872, +0,6, 971, -26.1, 11.1, -2.7, 8.886, +0,6, 972, -23.3, 7.6, -1.8, 6.590, +0,6, 973, -20.6, 16.0, -0.2, 9.498, +0,6, 974, -23.4, 6.6, -1.9, 6.763, +0,6, 975, -21.5, 13.7, -1.0, 9.351, +0,6, 976, -21.6, 6.3, -2.3, 6.301, +0,6, 977, -21.2, 13.4, -1.0, 7.998, +0,6, 978, -23.0, 9.6, -1.7, 6.812, +0,6, 979, -22.7, 15.3, -1.0, 9.257, +0,6, 980, -21.2, 8.3, -1.6, 6.195, +0,6, 981, -22.0, 13.2, -1.5, 8.639, +0,6, 982, -25.5, 5.5, -2.5, 6.715, +0,6, 983, -21.7, 12.3, -1.7, 8.538, +0,6, 984, -20.2, 5.8, -2.3, 6.449, +0,6, 985, -25.5, 12.4, -2.1, 9.930, +0,6, 986, -19.9, 7.2, -1.7, 6.858, +0,6, 987, -22.1, 13.5, -1.3, 8.751, +0,6, 988, -22.3, 7.0, -1.6, 6.818, +0,6, 989, -24.4, 12.4, -2.1, 9.359, +0,6, 990, -24.8, 6.8, -2.6, 7.263, +0,6, 991, -25.2, 12.6, -2.2, 8.939, +0,6, 992, -17.8, 7.9, -1.3, 6.161, +0,6, 993, -24.6, 13.3, -1.5, 9.352, +0,6, 994, -24.6, 7.5, -2.4, 7.998, +0,6, 995, -24.7, 12.0, -1.7, 9.490, +0,6, 996, -21.3, 8.5, -1.4, 6.503, +0,6, 997, -23.5, 12.7, -1.4, 8.635, +0,6, 998, -21.3, 6.3, -2.1, 6.544, +0,6, 999, -24.2, 12.6, -2.2, 9.260, +0,6, 1000, -16.8, 8.9, -0.3, 6.389, +0,6, 1001, -24.4, 11.9, -2.1, 9.504, +0,6, 1002, -20.1, 6.5, -1.8, 6.288, +0,6, 1003, -21.8, 14.2, -1.3, 8.960, +0,6, 1004, -21.7, 6.9, -2.2, 6.671, +0,6, 1005, -36.9, 21.9, -2.2, 10.494, -36.9,-32.6,-27.5,-23.8,-22.4,-21.8,-21.4,-21.0,-20.3,-20.0,-19.3,-18.9,-18.5,-17.6,-17.0,-16.4,-16.3,-16.1,-15.9,-13.8,-13.7,-13.3,-13.3,-12.5,-12.5,-12.3,-12.3,-12.2,-11.5,-11.5,-11.5,-11.4,-10.7,-10.6,-10.5,-10.4,-10.1,-9.2,-8.6,-8.5,-8.5,-8.2,-7.8,-7.6,-7.1,-6.2,-5.6,-5.5,-5.0,-4.9,-4.8,-4.7,-4.2,-3.6,-3.5,-3.1,-2.7,-2.5,-2.5,-2.1,-2.0,-1.8,-1.8,-1.6,-1.6,-1.6,-1.3,-1.3,-0.8,-0.8,-0.5,-0.5,-0.3,0.0,0.0,0.1,0.3,0.4,0.4,0.4,0.7,0.8,0.9,0.9,0.9,0.9,1.2,1.2,1.6,1.6,1.8,1.9,2.1,2.3,2.5,2.7,2.9,3.0,3.0,3.5,3.6,3.6,4.6,4.7,4.8,4.9,5.3,5.4,5.5,5.7,5.8,5.9,6.9,7.1,7.2,7.4,7.6,7.9,7.9,8.2,8.2,8.7,9.1,9.2,9.3,9.4,9.5,9.8,10.0,10.1,10.2,10.4,10.4,10.8,11.0,11.0,11.1,11.3,11.3,11.5,11.6,11.6,11.7,12.4,12.7,21.9, +0,6, 1006, -20.6, 7.5, -1.7, 7.100, +0,6, 1007, -29.8, 16.5, -2.4, 10.043, +0,6, 1008, -21.1, 10.3, -0.9, 7.976, +0,6, 1009, -24.9, 10.8, -1.3, 8.171, +0,6, 1010, -19.3, 7.8, -1.5, 6.615, +0,6, 1011, -23.7, 14.2, -1.4, 9.871, +0,6, 1012, -23.0, 9.3, -2.0, 7.452, +0,6, 1013, -24.4, 14.2, -2.4, 9.493, +0,6, 1014, -19.4, 7.4, -2.0, 7.002, +0,6, 1015, -23.5, 15.0, -1.2, 8.596, +0,6, 1016, -28.3, 10.1, -2.7, 8.429, +0,6, 1017, -25.7, 15.2, -1.2, 10.233, +0,6, 1018, -23.5, 14.9, -1.2, 7.174, +0,6, 1019, -23.0, 21.2, -0.2, 9.744, +0,6, 1020, -28.0, 12.9, -2.2, 8.551, +0,6, 1021, -23.7, 13.7, -2.0, 9.458, +0,6, 1022, -21.7, 9.6, -0.8, 6.651, +0,6, 1023, -22.1, 12.1, -0.9, 7.592, diff --git a/software/drsosc/down.xpm b/software/drsosc/down.xpm new file mode 100644 index 0000000..3f13583 --- /dev/null +++ b/software/drsosc/down.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static const char *down_xpm[]={ +"28 20 4 1", +". c None", +"a c #808080", +"b c #c0c0c0", +"# c #ffffff", +"............................", +"............................", +"............................", +".#########################a.", +".#bbbbbbbbbbbbbbbbbbbbbbbba.", +"..bbbbbbbbbbbbbbbbbbbbbbbba.", +"...bbbbbbbbbbbbbbbbbbbbbbaa.", +"....bbbbbbbbbbbbbbbbbbbbaa..", +".....bbbbbbbbbbbbbbbbbbaa...", +"......bbbbbbbbbbbbbbbbaa....", +".......bbbbbbbbbbbbbbaa.....", +"........bbbbbbbbbbbbaa......", +".........bbbbbbbbbbaa.......", +"..........bbbbbbbbaa........", +"...........bbbbbbaa.........", +"............bbbbaa..........", +".............bbaa...........", +"..............aa............", +"............................", +"............................"}; diff --git a/software/drsosc/drsosc.fbp b/software/drsosc/drsosc.fbp new file mode 100644 index 0000000..7f674e5 --- /dev/null +++ b/software/drsosc/drsosc.fbp @@ -0,0 +1,23693 @@ + + + + + ; + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + DRSOsc + 1000 + none + 0 + DRSOsc + + . + + 1 + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DOFrame_fb + + 1024,768 + wxDEFAULT_FRAME_STYLE + + DRS Oscilloscope + + + + wxTAB_TRAVERSAL + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + + + 0 + wxID_ANY + MyMenuBar + + + m_menubar1 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + &File + m_menu1 + protected + + + 0 + 1 + + wxID_ANY + wxITEM_NORMAL + &Save... + m_menuSave + none + Ctrl+S + + OnSave + + + + + 0 + 1 + + wxID_ANY + wxITEM_NORMAL + &Print + m_menuPrint + none + + + OnPrint + + + + m_separator1 + none + + + + 0 + 1 + + wxID_ANY + wxITEM_NORMAL + E&xit + m_menuExit + none + Ctrl+X + + OnExit + + + + + C&ursor + m_menu4 + protected + + + 0 + 1 + + ID_CURSORA + wxITEM_NORMAL + Cursor A + m_menuCursorA + none + Ctrl+A + + OnCursor + + + + + 0 + 1 + + ID_CURSORB + wxITEM_NORMAL + Cursor B + m_menuCursorB + none + Ctrl+B + + OnCursor + + + + + 0 + 1 + + wxID_ANY + wxITEM_NORMAL + Snap Cursor + m_menuItem13 + none + + + OnSnap + + + + + &Tools + m_menu3 + protected + + + 0 + 1 + + wxID_ANY + wxITEM_NORMAL + Config... + m_menuConfig + none + + + OnConfig + + + + + 0 + 1 + + wxID_ANY + wxITEM_NORMAL + Measure... + m_menuMeasure + none + + + OnMeasure + + + + + 0 + 1 + + wxID_ANY + wxITEM_NORMAL + Display... + m_menuDisplay + none + + + OnDisplay + + + + + &Help + m_menu2 + protected + + + 0 + 1 + + wxID_ANY + wxITEM_NORMAL + About... + m_menuAbout + none + F1 + + OnAbout + + + + + + + bSizer1 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_pnScreen + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxSUNKEN_BORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + wxSYS_COLOUR_BTNFACE + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_pnControls + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer2 + wxVERTICAL + none + + 5 + + 0 + + wxID_ANY + Trigger + + sbSizer1 + wxVERTICAL + none + + + 2 + wxEXPAND + 1 + + + bSizer4 + wxHORIZONTAL + none + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_TR_LEVEL + 500 + + 0 + + -500 + + 0 + + 1 + m_slTrgLevel + 1 + + + protected + 1 + + Resizable + 1 + 20,120 + wxSL_VERTICAL + + 0 + Set Trigger Level + + wxFILTER_NONE + wxDefaultValidator + + -250 + + + wxSTATIC_BORDER + + OnTrgLevelChange + + + + + + + + + + + + + + + + OnZero + + + + + + + + + + + OnZero + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer5 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + + bSizer32 + wxHORIZONTAL + none + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_RUN + Stop + + 0 + + + 0 + + 1 + m_btRun + 1 + + + protected + 1 + + Resizable + 1 + -1,-1 + + + 0 + Start/Stop Acquisition + + wxFILTER_NONE + wxDefaultValidator + + + + + OnTrigger + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_SINGLE + Single + + 0 + + + 0 + + 1 + m_btSingle + 1 + + + protected + 1 + + Resizable + 1 + -1,-1 + + + 0 + Arm for Single Trigger + + wxFILTER_NONE + wxDefaultValidator + + + + + OnTrigger + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + wxID_ANY + Type + + sbSizer18 + wxHORIZONTAL + none + + + 5 + + 0 + + + bSizer7 + wxVERTICAL + none + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_TR_NORMAL + Normal + + 0 + + + 0 + + 1 + m_rbNormal + 1 + + + protected + 1 + + Resizable + 1 + + wxRB_GROUP + + 0 + Set Normal Trigger Mode + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + OnTrgButton + + + + + + + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_TR_AUTO + Auto + + 0 + + + 0 + + 1 + m_rbAuto + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Set Auto Trigger Mode + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + OnTrgButton + + + + + + + + + + + + 2 + wxALIGN_CENTER|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; pos.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_TR_POLARITY + MyButton + + 0 + + + 0 + + 1 + m_bpPolarity + 1 + + + protected + 1 + + Resizable + + 1 + + wxBU_AUTODRAW + + 0 + Set Trigger Polarity + + wxFILTER_NONE + wxDefaultValidator + + + + + OnTrgButton + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_TRGCFG + CFG + + 0 + + + 0 + + 1 + m_btTrgCfg + 1 + + + protected + 1 + + Resizable + 1 + 45,-1 + + + 0 + Show advanced trigger configuration + + wxFILTER_NONE + wxDefaultValidator + + + + + OnTrigger + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer31 + wxHORIZONTAL + none + + 5 + wxRIGHT|wxLEFT|wxALIGN_BOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Max + + 0 + + + 0 + + 1 + m_staticText59 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT|wxALIGN_BOTTOM + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Delay + + 0 + + + 0 + + 1 + m_staticText60 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_BOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Min + + 0 + + + 0 + + 1 + m_staticText61 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_TR_DELAY + 100 + + 0 + + 0 + + 0 + + 1 + m_slTrgDelay + 1 + + + protected + 1 + + Resizable + 1 + -1,20 + wxSL_HORIZONTAL + + 0 + Set Trigger Delay + + wxFILTER_NONE + wxDefaultValidator + + 100 + + + wxSTATIC_BORDER + + OnTrgDelayChange + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALIGN_CENTER + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "1" "2" "3" "4" "E" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_TR_SOURCE + + 1 + + 0 + + + 0 + + 1 + m_rbSource + 1 + + + protected + 1 + + Resizable + 1 + 1 + + wxRA_SPECIFY_ROWS + + 0 + Select channel to trigger on (E for external) + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + OnTrgButton + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Horizontal + + sbSizer2 + wxVERTICAL + none + + + 5 + wxEXPAND + 0 + + + bSizer20 + wxHORIZONTAL + none + + 10 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; left.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_HSCALEDOWN + MyButton + + 0 + + + 0 + + 1 + m_bpButton2 + 1 + + + protected + 1 + + Resizable + + 1 + -1,32 + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnHScaleChange + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,75,0 + 0 + 0 + wxID_ANY + ns/div + + 0 + + + 0 + + 1 + m_stHScale + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE|wxST_NO_AUTORESIZE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; right.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_HSCALEUP + MyButton + + 0 + + + 0 + + 1 + m_bpButton3 + 1 + + + protected + 1 + + Resizable + + 1 + -1,32 + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnHScaleChange + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_HOR_POS + 1000 + + 0 + + -1000 + + 0 + + 1 + m_slHOffset + 1 + + + protected + 1 + + Resizable + 1 + -1,20 + wxSL_HORIZONTAL + + 0 + Set Horizontal Position + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + wxSTATIC_BORDER + + OnHOffsetChange + + + + + + + + + + + + + + + + OnZero + + + + + + + + + + + OnZero + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Vertical + + sbSizer3 + wxHORIZONTAL + none + + + 5 + wxEXPAND + 1 + + + bSizer9 + wxVERTICAL + none + + 5 + wxALIGN_CENTER + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,12,74,0 + 0 + 0 + ID_CHON1 + 1 + + 0 + + + 0 + + 1 + m_btCh1 + 1 + + + protected + 1 + + Resizable + 1 + 30,27 + + 0 + Enable Channel 1 + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + OnChnOn + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + 255,255,0 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_POS1 + 250 + + 0 + -1,70 + -250 + + 0 + -1,70 + 1 + m_slPos1 + 1 + + + protected + 1 + + Resizable + 1 + -1,70 + wxSL_VERTICAL + + 0 + Move Channel 1 Vertical Position + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + wxSTATIC_BORDER + + OnPosChange + + + + + + + + + + + + + + + + OnZero + + + + + + + + + + + OnZero + + + + + + + + + + + + + + + + + + 0 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; up.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_SCALEUP1 + MyButton + + 0 + + + 0 + + 1 + m_bpButton4 + 1 + + + protected + 1 + + Resizable + + 1 + -1,22 + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnScaleChange + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,75,0 + 0 + 0 + wxID_ANY + 500mV + + 0 + + + 0 + + 1 + m_stScale1 + 1 + + + protected + 1 + + Resizable + 1 + -1,-1 + wxALIGN_CENTRE|wxST_NO_AUTORESIZE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; down.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_SCALEDN1 + MyButton + + 0 + + + 0 + + 1 + m_bpButton5 + 1 + + + protected + 1 + + Resizable + + 1 + -1,22 + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnScaleChange + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer10 + wxVERTICAL + none + + 5 + wxALIGN_CENTER + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,12,74,0 + 0 + 0 + ID_CHON2 + 2 + + 0 + + + 0 + + 1 + m_btCh2 + 1 + + + protected + 1 + + Resizable + 1 + 30,27 + + 0 + Enable Channel 2 + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + OnChnOn + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + 170,170,255 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_POS2 + 250 + + 0 + -1,70 + -250 + + 0 + -1,70 + 1 + m_slPos2 + 1 + + + protected + 1 + + Resizable + 1 + -1,70 + wxSL_VERTICAL + + 0 + Move Channel 2 Vertical Position + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + wxSTATIC_BORDER + + OnPosChange + + + + + + + + + + + + + + + + OnZero + + + + + + + + + + + OnZero + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; up.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_SCALEUP2 + MyButton + + 0 + + + 0 + + 1 + m_bpButton6 + 1 + + + protected + 1 + + Resizable + + 1 + -1,22 + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnScaleChange + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,75,0 + 0 + 0 + wxID_ANY + 500mV + + 0 + + + 0 + + 1 + m_stScale2 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE|wxST_NO_AUTORESIZE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; down.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_SCALEDN2 + MyButton + + 0 + + + 0 + + 1 + m_bpButton7 + 1 + + + protected + 1 + + Resizable + + 1 + -1,22 + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnScaleChange + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer11 + wxVERTICAL + none + + 5 + wxALIGN_CENTER + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,12,74,0 + 0 + 0 + ID_CHON3 + 3 + + 0 + + + 0 + + 1 + m_btCh3 + 1 + + + protected + 1 + + Resizable + 1 + 30,27 + + 0 + Enable Channel 3 + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + OnChnOn + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + 255,170,170 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_POS3 + 250 + + 0 + -1,70 + -250 + + 0 + -1,70 + 1 + m_slPos3 + 1 + + + protected + 1 + + Resizable + 1 + -1,70 + wxSL_VERTICAL + + 0 + Move Channel 3 Vertical Position + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + wxSTATIC_BORDER + + OnPosChange + + + + + + + + + + + + + + + + OnZero + + + + + + + + + + + OnZero + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; up.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_SCALEUP3 + MyButton + + 0 + + + 0 + + 1 + m_bpButton8 + 1 + + + protected + 1 + + Resizable + + 1 + -1,22 + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnScaleChange + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,75,0 + 0 + 0 + wxID_ANY + 500mV + + 0 + + + 0 + + 1 + m_stScale3 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE|wxST_NO_AUTORESIZE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; down.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_SCALEDN3 + MyButton + + 0 + + + 0 + + 1 + m_bpButton9 + 1 + + + protected + 1 + + Resizable + + 1 + -1,22 + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnScaleChange + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer13 + wxVERTICAL + none + + 5 + wxALIGN_CENTER + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,12,74,0 + 0 + 0 + ID_CHON4 + 4 + + 0 + + + 0 + + 1 + m_btCh4 + 1 + + + protected + 1 + + Resizable + 1 + 30,27 + + 0 + Enable Channel 4 + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + OnChnOn + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + 170,255,170 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_POS4 + 250 + + 0 + -1,70 + -250 + + 0 + -1,70 + 1 + m_slPos4 + 1 + + + protected + 1 + + Resizable + 1 + -1,70 + wxSL_VERTICAL + + 0 + Move Channel 4 Vertical Position + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + wxSTATIC_BORDER + + OnPosChange + + + + + + + + + + + + + + + + OnZero + + + + + + + + + + + OnZero + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; up.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_SCALEUP4 + MyButton + + 0 + + + 0 + + 1 + m_bpButton10 + 1 + + + protected + 1 + + Resizable + + 1 + -1,22 + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnScaleChange + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,75,0 + 0 + 0 + wxID_ANY + 500mV + + 0 + + + 0 + + 1 + m_stScale4 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE|wxST_NO_AUTORESIZE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; down.xpm + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + ID_SCALEDN4 + MyButton + + 0 + + + 0 + + 1 + m_bpButton11 + 1 + + + protected + 1 + + Resizable + + 1 + -1,22 + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnScaleChange + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + + + sbSizer8 + wxVERTICAL + none + + + 5 + wxEXPAND + 0 + + + bSizer131 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Cursor: + + 0 + + + 0 + + 1 + m_staticText76 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CURSORA + &A + + 0 + 40,-1 + + 0 + 40,-1 + 1 + m_toggleCursorA + 1 + + + protected + 1 + + Resizable + 1 + 40,-1 + + 0 + Activate Cursor A + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + OnCursor + + + + + 5 + wxALIGN_CENTER + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CURSORB + &B + + 0 + 40,-1 + + 0 + 40,-1 + 1 + m_toggleCursorB + 1 + + + protected + 1 + + Resizable + 1 + 40,-1 + + 0 + Activate Cursor B + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + OnCursor + + + + + 5 + wxALIGN_CENTER|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Snap + + 0 + + + 0 + + 1 + m_checkBox8 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSnap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + + + sbSizer4 + wxVERTICAL + none + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 2 + 0 + + gSizer1 + none + 3 + 0 + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CONFIG + &Config + + 0 + + + 0 + + 1 + m_btConfig + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Bring up Configuration Dialog + + wxFILTER_NONE + wxDefaultValidator + + + + + OnConfig + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_SAVE + &Save + + 0 + + + 0 + + 1 + m_btSave + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Save Waveforms + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSave + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_MEASURE + &Measure + + 0 + + + 0 + + 1 + m_btMeasure + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Bring up Measurement Dialog + + wxFILTER_NONE + wxDefaultValidator + + + + + OnMeasure + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_MEASURE + &Display + + 0 + + + 0 + + 1 + m_btDisplay + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Bring up Measurement Dialog + + wxFILTER_NONE + wxDefaultValidator + + + + + OnDisplay + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PRINT + &Print + + 0 + + + 0 + + 1 + m_btPrint + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Print Waveforms + + wxFILTER_NONE + wxDefaultValidator + + + + + OnPrint + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxEXPAND + 0 + + wxID_ANY + + + sbSizer9 + wxHORIZONTAL + none + + + 5 + wxALIGN_CENTER_HORIZONTAL + 1 + + 2 + 0 + + gSizer4 + none + 1 + 0 + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_ABOUT + About + + 0 + + + 0 + + 1 + m_btAbout + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Display About Box + + wxFILTER_NONE + wxDefaultValidator + + + + + OnAbout + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_EXIT + E&xit + + 0 + + + 0 + + 1 + m_btExit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Exit Program + + wxFILTER_NONE + wxDefaultValidator + + + + + OnExit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer3 + wxHORIZONTAL + none + + + + + + + + + 0 + wxAUI_MGR_DEFAULT + wxSYS_COLOUR_BTNFACE + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + -1,-1 + ConfigDialog_fb + + -1,-1 + wxDEFAULT_DIALOG_STYLE + + Configuration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer12 + wxVERTICAL + none + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + wxID_ANY + Board + + sbSizer5111 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + + bSizer37 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_BSEL + + 0 + + + 0 + + 1 + m_cbBoard + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnBoardSelect + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rescan + + 0 + + + 0 + + 1 + m_btScan + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnRescan + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Info + + 0 + + + 0 + + 1 + m_btInfo + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnInfo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + ID_MULTI + Configure multi-board daisy-chain + + 0 + + + 0 + + 1 + m_cbMulti + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnBoardSelect + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + wxID_ANY + Channels + + sbSizer511 + wxVERTICAL + none + + + 5 + wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "even channels" "odd channels" "combined" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CH_HALF + 2048-bin option + 1 + + 0 + + + 0 + + 1 + m_rbChHalf + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_ROWS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + OnChannelHalf + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Connect reference clock to all channels + + 0 + + + 0 + + 1 + m_cbClkOn + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnClkOn + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + wxID_ANY + Input Range + + sbSizer17 + wxVERTICAL + none + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "-0.5V to +0.5V" "-0.05V to +0.95V" "0V to +1V" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 1 + + 0 + + + 0 + + 1 + m_rbRange + 1 + + + protected + 1 + + Resizable + 2 + 1 + + wxRA_SPECIFY_ROWS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + OnInputRange + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + wxID_ANY + Sampling Speed + + sbSizer512 + wxVERTICAL + none + + + 5 + wxEXPAND + 0 + + + bSizer1813 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_tbFreq + 1 + + + protected + 1 + + Resizable + 1 + 40,-1 + wxTE_PROCESS_ENTER + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnFreq + + + + + + + 5 + wxALIGN_CENTER|wxBOTTOM|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + GSPS + + 0 + + + 0 + + 1 + m_staticText26 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + wxALIGN_CENTER|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Lock + + 0 + + + 0 + + 1 + m_cbLocked + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnLock + + + + + + + + + + + + + + + + + + + + + + + + + + 40 + wxALIGN_CENTER|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Actual speed: + + 0 + + + 0 + + 1 + m_staticText261 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0.000 GSPS + + 0 + + + 0 + + 1 + m_stActFreq + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + wxID_ANY + Voltage Calibration + + sbSizer5 + wxVERTICAL + none + + + 5 + wxEXPAND|wxTOP|wxBOTTOM + 1 + + + bSizer18 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Voltage on + + 0 + + + 0 + + 1 + m_cbCalOn + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnCalOn + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_teCal + 1 + + + protected + 1 + + Resizable + 1 + 40,-1 + wxTE_PROCESS_ENTER + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCalEnter + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 500 + + 0 + + -500 + + 0 + + 1 + m_slCal + 1 + + + protected + 1 + + Resizable + 1 + + wxSL_HORIZONTAL + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + wxSTATIC_BORDER + + OnCalSlider + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mV + + 0 + + + 0 + + 1 + m_staticText10 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_DISP_CALIBRATED + Apply Primary Calibration (Cell) + + 0 + + + 0 + + 1 + m_cbCalibrated + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnDisplayWaveforms + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_DISP_CALIBRATED2 + Apply Secondary Calibration (Readout) + + 0 + + + 0 + + 1 + m_cbCalibrated2 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnDisplayWaveforms + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Remove Spikes + + 0 + + + 0 + + 1 + m_cbSpikes + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnRemoveSpikes + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Execute Voltage Calibration + + 0 + + + 0 + + 1 + m_button13 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnButtonCalVolt + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_gaugeCalVolt + 1 + + + protected + 1 + + 100 + Resizable + 1 + -1,15 + wxGA_HORIZONTAL + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + wxID_ANY + Timing Calibration + + sbSizer6 + wxVERTICAL + none + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_DISP_ROTATED + Rotate waveforms relative to trigger + + 0 + + + 0 + + 1 + m_cbRotated + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnDisplayWaveforms + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_DISP_TCALIBRATED + Apply Timing Calibration + + 0 + + + 0 + + 1 + m_cbTCalOn + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnDisplayWaveforms + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_DISP_TRGCORR + Correct horizontal trigger position + + 0 + + + 0 + + 1 + m_cbTrgCorr + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnDisplayWaveforms + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_REFCLK + Use external reference clock + + 0 + + + 0 + + 1 + m_cbExtRefclk + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnDisplayWaveforms + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Execute Timing Calibration + + 0 + + + 0 + + 1 + m_button14 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnButtonCalTime + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_gaugeCalTime + 1 + + + protected + 1 + + 100 + Resizable + 1 + -1,15 + wxGA_HORIZONTAL + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_RIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + &Close + + 0 + + + 0 + + 1 + m_button10 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxAUI_MGR_DEFAULT + wxSYS_COLOUR_BTNFACE + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + -1,-1 + DisplayDialog_fb + + -1,-1 + wxDEFAULT_DIALOG_STYLE + + Display + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer12 + wxVERTICAL + none + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + wxID_ANY + Options + + sbSizer7 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + + bSizer34 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Display Date/Time + + 0 + + + 0 + + 1 + m_checkBox7 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnDateTime + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show Grid + + 0 + + + 0 + + 1 + m_checkBox71 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnShowGrid + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Lines + + 0 + + + 0 + + 1 + m_checkBox88 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnLines + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show hardware scalers + + 0 + + + 0 + + 1 + m_checkBox73 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnScalers + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + wxID_ANY + Display Mode + + sbSizer71 + wxVERTICAL + none + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_DISPSAMPLE + Sample + + 0 + + + 0 + + 1 + m_rbShowSample + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + OnDisplayMode + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer39 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer40 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + ID_DISPAVERAGE + Average + + 0 + + + 0 + + 1 + m_rbShowAverage + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + OnDisplayMode + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + ID_DISPPERSIST + Persistance + + 0 + + + 0 + + 1 + m_rbShowPersist + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + OnDisplayMode + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Number of waveforms: + + 0 + + + 0 + + 1 + m_staticText59 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "2" "4" "8" "16" "32" "64" "128" "256" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + ID_DISPNUMBER + + 0 + + + 0 + + 1 + m_cbNumber + 1 + + + protected + 1 + + Resizable + -1 + 1 + + wxTE_PROCESS_ENTER + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 16 + + + + + OnDisplayMode + + + + + + + + + + + + + + + + + + + + + + + OnDisplayMode + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + wxID_ANY + Math Display + + sbSizer711 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + + bSizer14 + wxVERTICAL + none + + 5 + + 0 + + 5 + wxBOTH + + + 0 + -1,-1 + gSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 3 + 0 + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_staticText11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + 255,255,0 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH1 + + 0 + + + 0 + + 1 + m_staticText12 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + 170,170,255 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH2 + + 0 + + + 0 + + 1 + m_staticText13 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + 255,170,170 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH3 + + 0 + + + 0 + + 1 + m_staticText14 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + 170,255,170 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH4 + + 0 + + + 0 + + 1 + m_staticText15 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Period Jitter + + 0 + + + 0 + + 1 + m_staticText17 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PJ1 + + + 0 + + + 0 + + 1 + m_checkBox13 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PJ2 + + + 0 + + + 0 + + 1 + m_checkBox14 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PJ3 + + + 0 + + + 0 + + 1 + m_checkBox15 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PJ4 + + + 0 + + + 0 + + 1 + m_checkBox16 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_RIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + &Close + + 0 + + + 0 + + 1 + m_button10 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxAUI_MGR_DEFAULT + wxSYS_COLOUR_BTNFACE + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + MeasureDialog_fb + + -1,-1 + wxDEFAULT_DIALOG_STYLE + + Select Measurements + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer14 + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 5 + wxBOTH + + + 0 + -1,-1 + gSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 17 + 0 + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_staticText11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + 255,255,0 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH1 + + 0 + + + 0 + + 1 + m_staticText12 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + 170,170,255 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH2 + + 0 + + + 0 + + 1 + m_staticText13 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + 255,170,170 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH3 + + 0 + + + 0 + + 1 + m_staticText14 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + 170,255,170 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH4 + + 0 + + + 0 + + 1 + m_staticText15 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,16,74,0 + 0 + 0 + wxID_ANY + Amplitude + + 0 + + + 0 + + 1 + m_staticText80 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_staticText81 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_staticText82 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_staticText83 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_staticText84 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Level + + 0 + + + 0 + + 1 + m_staticText16 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_LEVEL1 + + + 0 + + + 0 + + 1 + m_checkBox9 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_LEVEL2 + + + 0 + + + 0 + + 1 + m_checkBox10 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_LEVEL3 + + + 0 + + + 0 + + 1 + m_checkBox11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_LEVEL4 + + + 0 + + + 0 + + 1 + m_checkBox12 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Peak-Peak Amplitude + + 0 + + + 0 + + 1 + m_staticText17 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PKPK1 + + + 0 + + + 0 + + 1 + m_checkBox13 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PKPK2 + + + 0 + + + 0 + + 1 + m_checkBox14 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PKPK3 + + + 0 + + + 0 + + 1 + m_checkBox15 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PKPK4 + + + 0 + + + 0 + + 1 + m_checkBox16 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + RMS + + 0 + + + 0 + + 1 + m_staticText19 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_RMS1 + + + 0 + + + 0 + + 1 + m_checkBox17 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_RMS2 + + + 0 + + + 0 + + 1 + m_checkBox18 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_RMS3 + + + 0 + + + 0 + + 1 + m_checkBox19 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_RMS4 + + + 0 + + + 0 + + 1 + m_checkBox20 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Vertical slice + + 0 + + + 0 + + 1 + m_staticText90 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_VS1 + + + 0 + + + 0 + + 1 + m_checkBox74 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_VS2 + + + 0 + + + 0 + + 1 + m_checkBox75 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_VS3 + + + 0 + + + 0 + + 1 + m_checkBox76 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_VS4 + + + 0 + + + 0 + + 1 + m_checkBox77 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Gated charge + + 0 + + + 0 + + 1 + m_staticText91 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CHRG1 + + + 0 + + + 0 + + 1 + m_checkBox82 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CHRG2 + + + 0 + + + 0 + + 1 + m_checkBox83 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CHRG3 + + + 0 + + + 0 + + 1 + m_checkBox84 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CHRG4 + + + 0 + + + 0 + + 1 + m_checkBox85 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline4 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline41 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline42 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline43 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline44 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,16,74,0 + 0 + 0 + wxID_ANY + Time + + 0 + + + 0 + + 1 + m_staticText85 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_staticText86 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_staticText87 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_staticText88 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_staticText89 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Frequency + + 0 + + + 0 + + 1 + m_staticText20 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_FREQ1 + + + 0 + + + 0 + + 1 + m_checkBox21 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_FREQ2 + + + 0 + + + 0 + + 1 + m_checkBox22 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_FREQ3 + + + 0 + + + 0 + + 1 + m_checkBox23 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_FREQ4 + + + 0 + + + 0 + + 1 + m_checkBox24 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Period + + 0 + + + 0 + + 1 + m_staticText21 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PERIOD1 + + + 0 + + + 0 + + 1 + m_checkBox25 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PERIOD2 + + + 0 + + + 0 + + 1 + m_checkBox26 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PERIOD3 + + + 0 + + + 0 + + 1 + m_checkBox27 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PERIOD4 + + + 0 + + + 0 + + 1 + m_checkBox28 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rise time + + 0 + + + 0 + + 1 + m_staticText22 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_RISE1 + + + 0 + + + 0 + + 1 + m_checkBox29 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_RISE2 + + + 0 + + + 0 + + 1 + m_checkBox30 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_RISE3 + + + 0 + + + 0 + + 1 + m_checkBox31 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_RISE4 + + + 0 + + + 0 + + 1 + m_checkBox32 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Fall time + + 0 + + + 0 + + 1 + m_staticText23 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_FALL1 + + + 0 + + + 0 + + 1 + m_checkBox33 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_FALL2 + + + 0 + + + 0 + + 1 + m_checkBox34 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_FALL3 + + + 0 + + + 0 + + 1 + m_checkBox35 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_FALL4 + + + 0 + + + 0 + + 1 + m_checkBox36 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Positive width + + 0 + + + 0 + + 1 + m_staticText221 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_POSWIDTH1 + + + 0 + + + 0 + + 1 + m_checkBox291 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_POSWIDTH2 + + + 0 + + + 0 + + 1 + m_checkBox2911 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_POSWIDTH3 + + + 0 + + + 0 + + 1 + m_checkBox2912 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_POSWIDTH4 + + + 0 + + + 0 + + 1 + m_checkBox2913 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Negative width + + 0 + + + 0 + + 1 + m_staticText2211 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_NEGWIDTH1 + + + 0 + + + 0 + + 1 + m_checkBox2914 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_NEGWIDTH2 + + + 0 + + + 0 + + 1 + m_checkBox2915 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_NEGWIDTH3 + + + 0 + + + 0 + + 1 + m_checkBox2916 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_NEGWIDTH4 + + + 0 + + + 0 + + 1 + m_checkBox2917 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + CH(x+1)-CH(x) delay + + 0 + + + 0 + + 1 + m_staticText231 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CHNDELAY1 + + + 0 + + + 0 + + 1 + m_checkBox37 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CHNDELAY2 + + + 0 + + + 0 + + 1 + m_checkBox38 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CHNDELAY3 + + + 0 + + + 0 + + 1 + m_checkBox39 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CHNDELAY4 + + + 0 + + + 0 + + 1 + m_checkBox40 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Horizontal slice + + 0 + + + 0 + + 1 + m_staticText901 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_HS1 + + + 0 + + + 0 + + 1 + m_checkBox78 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_HS2 + + + 0 + + + 0 + + 1 + m_checkBox79 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_HS3 + + + 0 + + + 0 + + 1 + m_checkBox80 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_HS4 + + + 0 + + + 0 + + 1 + m_checkBox81 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer35 + wxHORIZONTAL + none + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Display Statistics + + 0 + + + 0 + + 1 + m_cbStat + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnStat + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Display Histograms + + 0 + + + 0 + + 1 + m_cbHist + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnHist + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer25 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Accumulate + + 0 + + + 0 + + 1 + m_staticText27 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "10" "50" "100" "500" "1000" "5000" "10000" "50000" "1000000" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_cbNAverage + 1 + + + protected + 1 + + Resizable + -1 + 1 + 100,-1 + wxTE_PROCESS_ENTER + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1000 + + + + + OnStatNAverage + + + + + + + + + + + + + + + + + + + + + + + OnStatNAverage + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + measurements + + 0 + -1,-1 + + 0 + + 1 + m_staticText271 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Clear + + 0 + + + 0 + + 1 + m_button15 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnStatReset + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline2 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Display Indicators + + 0 + + + 0 + + 1 + m_cbIndicator + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnIndicator + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline21 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Cl&ose + + 0 + + + 0 + + 1 + m_button11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxAUI_MGR_DEFAULT + wxSYS_COLOUR_BTNFACE + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + TriggerDialog_fb + + + wxDEFAULT_DIALOG_STYLE + + Configure Trigger + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer14 + wxVERTICAL + none + + 5 + wxBOTTOM|wxEXPAND + 1 + + + bSizer35 + wxHORIZONTAL + none + + 4 + wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP + 1 + + 1 + 1 + 1 + 1 + + + + + + 255,255,0 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH1 + + 0 + + + 0 + + 1 + m_staticText12 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP + 1 + + 1 + 1 + 1 + 1 + + + + + + 170,170,255 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH2 + + 0 + + + 0 + + 1 + m_staticText13 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP + 1 + + 1 + 1 + 1 + 1 + + + + + + 255,170,170 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH3 + + 0 + + + 0 + + 1 + m_staticText14 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP + 1 + + 1 + 1 + 1 + 1 + + + + + + 170,255,170 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + CH4 + + 0 + + + 0 + + 1 + m_staticText15 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP + 1 + + 1 + 1 + 1 + 1 + + + + + + wxSYS_COLOUR_GRAYTEXT + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + EXT + + 0 + + + 0 + + 1 + m_staticText16 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline11 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Trigger logic + + 0 + + + 0 + + 1 + m_staticText771 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 16 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + + bSizer36 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_OR1 + + + 0 + + + 0 + + 1 + m_cbOR1 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + OR + + 0 + + + 0 + + 1 + m_staticText17 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_OR2 + + + 0 + + + 0 + + 1 + m_cbOR2 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + OR + + 0 + + + 0 + + 1 + m_staticText171 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_OR3 + + + 0 + + + 0 + + 1 + m_cbOR3 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + OR + + 0 + + + 0 + + 1 + m_staticText172 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_OR4 + + + 0 + + + 0 + + 1 + m_cbOR4 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + OR + + 0 + + + 0 + + 1 + m_staticText173 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_OREXT + + + 0 + + + 0 + + 1 + m_cbOREXT + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + - OR - + + 0 + + + 0 + + 1 + m_staticText84 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 16 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + + bSizer37 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_AND1 + + + 0 + + + 0 + + 1 + m_cbAND1 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + AND + + 0 + + + 0 + + 1 + m_staticText18 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_AND2 + + + 0 + + + 0 + + 1 + m_cbAND2 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + AND + + 0 + + + 0 + + 1 + m_staticText181 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_AND3 + + + 0 + + + 0 + + 1 + m_cbAND3 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + AND + + 0 + + + 0 + + 1 + m_staticText182 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_AND4 + + + 0 + + + 0 + + 1 + m_cbAND4 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + AND + + 0 + + + 0 + + 1 + m_staticText183 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_CENTRE + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_ANDEXT + + + 0 + + + 0 + + 1 + m_cbANDEXT + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_TRANS + Enable Transparent Trigger + + 0 + + + 0 + + 1 + m_cbTrans + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnButton + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline10 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Trigger level + + 0 + + + 0 + + 1 + m_staticText77 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer33 + wxHORIZONTAL + none + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_LEVEL1 + + 0 + + + + 0 + + 1 + m_tbLevel1 + 1 + + + protected + 1 + + Resizable + 1 + 40,-1 + wxTE_PROCESS_ENTER + + 0 + + + wxFILTER_NUMERIC + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnTriggerLevel + OnTriggerLevel + + + + + + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_LEVEL2 + + 0 + + + + 0 + + 1 + m_tbLevel2 + 1 + + + protected + 1 + + Resizable + 1 + 40,-1 + wxTE_PROCESS_ENTER + + 0 + + + wxFILTER_NUMERIC + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnTriggerLevel + OnTriggerLevel + + + + + + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_LEVEL3 + + 0 + + + + 0 + + 1 + m_tbLevel3 + 1 + + + protected + 1 + + Resizable + 1 + 40,-1 + wxTE_PROCESS_ENTER + + 0 + + + wxFILTER_NUMERIC + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnTriggerLevel + OnTriggerLevel + + + + + + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_LEVEL4 + + 0 + + + + 0 + + 1 + m_tbLevel4 + 1 + + + protected + 1 + + Resizable + 1 + 40,-1 + wxTE_PROCESS_ENTER + + 0 + + + wxFILTER_NUMERIC + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnTriggerLevel + OnTriggerLevel + + + + + + + 5 + wxALIGN_CENTER|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Volt + + 0 + + + 0 + + 1 + m_staticText78 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline25 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Cl&ose + + 0 + + + 0 + + 1 + m_button11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxAUI_MGR_DEFAULT + wxSYS_COLOUR_BTNFACE + + + 1 + 1 + impl_virtual + + + ,90,90,-1,74,0 + 0 + wxID_ANY + + + AboutDialog_fb + + -1,-1 + wxDEFAULT_DIALOG_STYLE + + About + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer15 + wxVERTICAL + none + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL + 1 + + + bSizer17 + wxVERTICAL + none + + 10 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,20,74,0 + 0 + 0 + wxID_ANY + DRS Oscilloscope + + 0 + + + 0 + + 1 + m_staticText18 + 1 + + + protected + 1 + + Resizable + 1 + -1,-1 + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + Version 0.0.0 + + 0 + + + 0 + + 1 + m_stVersion + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,16,74,0 + 0 + 0 + wxID_ANY + Build 0 + + 0 + + + 0 + + 1 + m_stBuild + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,74,0 + 0 + 0 + wxID_ANY + Stefan Ritt + + 0 + + + 0 + + 1 + m_staticText20 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,74,0 + 0 + 0 + wxID_ANY + Paul Scherrer Institute + + 0 + + + 0 + + 1 + m_staticText21 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer38 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 10 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From File; drsosc.xpm + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_bitmap1 + 1 + + + protected + 1 + + Resizable + 1 + -1,-1 + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,18,74,0 + 0 + 0 + wxID_ANY + For updates please visit + + 0 + + + 0 + + 1 + m_staticText23 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,18,74,0 + 0 + 0 + + wxID_ANY + http://www.psi.ch/drs + + 0 + + + 0 + + 1 + m_hyperlink1 + + 1 + + + protected + 1 + + Resizable + 1 + + wxHL_DEFAULT_STYLE + + 0 + + http://www.psi.ch/drs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 15 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,74,0 + 0 + 0 + wxID_OK + Ok + + 0 + + + 0 + + 1 + m_button12 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxAUI_MGR_DEFAULT + wxSYS_COLOUR_BTNFACE + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + InfoDialog_fb + + -1,-1 + wxDEFAULT_DIALOG_STYLE + + Info + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer15 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 2 + 0 + + gSizer2 + none + 9 + 0 + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Board type: + + 0 + + + 0 + + 1 + m_staticText45 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 + + 0 + + + 0 + + 1 + m_stBoardType + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + DRS type: + + 0 + + + 0 + + 1 + m_staticText47 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + DRS4 + + 0 + + + 0 + + 1 + m_stDRSType + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Serial number: + + 0 + + + 0 + + 1 + m_staticText49 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 + + 0 + + + 0 + + 1 + m_stSerialNumber + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Firmware revision: + + 0 + + + 0 + + 1 + m_staticText51 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 + + 0 + + + 0 + + 1 + m_stFirmwareRevision + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Temperature: + + 0 + + + 0 + + 1 + m_staticText53 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 C + + 0 + + + 0 + + 1 + m_stTemperature + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Input range: + + 0 + + + 0 + + 1 + m_staticText55 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + -0.5V...0.5V + + 0 + + + 0 + + 1 + m_stInputRange + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Calibrated range: + + 0 + + + 0 + + 1 + m_staticText57 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + -0.5V...0.5V + + 0 + + + 0 + + 1 + m_stCalibratedRange + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Calibrated frequency: + + 0 + + + 0 + + 1 + m_staticText59 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 5.000 GSPS + + 0 + + + 0 + + 1 + m_stCalibratedFrequency + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Current frequency: + + 0 + + + 0 + + 1 + m_staticText61 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 5.000 GSPS + + 0 + + + 0 + + 1 + m_stFrequency + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 15 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_OK + Ok + + 0 + + + 0 + + 1 + m_button12 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/software/drsosc/drsosc.ico b/software/drsosc/drsosc.ico new file mode 100644 index 0000000..d8fddfe Binary files /dev/null and b/software/drsosc/drsosc.ico differ diff --git a/software/drsosc/drsosc.rc b/software/drsosc/drsosc.rc new file mode 100644 index 0000000..a22a0c4 --- /dev/null +++ b/software/drsosc/drsosc.rc @@ -0,0 +1 @@ +drsosc ICON "drsosc.ico" diff --git a/software/drsosc/drsosc.sln b/software/drsosc/drsosc.sln new file mode 100644 index 0000000..0ab0b77 --- /dev/null +++ b/software/drsosc/drsosc.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "drsosc", "drsosc.vcxproj", "{668C949B-D0A7-4CCC-BC8F-5F8731DFBCD1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {668C949B-D0A7-4CCC-BC8F-5F8731DFBCD1}.Debug|Win32.ActiveCfg = Debug|Win32 + {668C949B-D0A7-4CCC-BC8F-5F8731DFBCD1}.Debug|Win32.Build.0 = Debug|Win32 + {668C949B-D0A7-4CCC-BC8F-5F8731DFBCD1}.Release|Win32.ActiveCfg = Release|Win32 + {668C949B-D0A7-4CCC-BC8F-5F8731DFBCD1}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/software/drsosc/drsosc.vcproj b/software/drsosc/drsosc.vcproj new file mode 100644 index 0000000..3977a45 --- /dev/null +++ b/software/drsosc/drsosc.vcproj @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/software/drsosc/drsosc.vcxproj b/software/drsosc/drsosc.vcxproj new file mode 100644 index 0000000..d1ed7dd --- /dev/null +++ b/software/drsosc/drsosc.vcxproj @@ -0,0 +1,153 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {668C949B-D0A7-4CCC-BC8F-5F8731DFBCD1} + drsosc + Win32Proj + + + + Application + NotSet + true + v110 + + + Application + NotSet + v110 + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + true + + + + Disabled + ..\;\wxWidgets-3.0.2\include;\wxWidgets-3.0.2\include\msvc;\mxml;\midas\include;\meg\online\drivers\drs\libusb\include;\;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;HAVE_USB;HAVE_LIBUSB10;USE_DRS_MUTEX;_UNICODE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + true + Level3 + EditAndContinue + + + \wxWidgets\include;%(AdditionalIncludeDirectories) + + + wxmsw30ud_adv.lib;wxmsw30ud_core.lib;wxbase30ud.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;odbc32.lib;libusb-1.0.lib;%(AdditionalDependencies) + \libusb-1.0\MS32\static\;\wxWidgets-3.0.2\lib\vc_lib;%(AdditionalLibraryDirectories) + true + Windows + false + + + MachineX86 + LIBCMTD + + + + + \wxWidgets-3.0.2\include;\wxWidgets-3.0.2\include\msvc;..\;\mxml;\midas\include;\libusb-1.0;\;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_WINDOWS;NOPCH;HAVE_USB;HAVE_LIBUSB10;USE_DRS_MUTEX;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + + + + + wxmsw30u_core.lib;wxmsw30u_adv.lib;wxbase30u.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;odbc32.lib;libusb-1.0.lib;%(AdditionalDependencies) + \libusb-1.0\MS32\static;\wxWidgets-3.0.2\lib\vc_lib;%(AdditionalLibraryDirectories) + false + Windows + true + true + false + + + MachineX86 + LIBCMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/software/drsosc/drsosc.vcxproj.filters b/software/drsosc/drsosc.vcxproj.filters new file mode 100644 index 0000000..92d30b3 --- /dev/null +++ b/software/drsosc/drsosc.vcxproj.filters @@ -0,0 +1,139 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/software/drsosc/drsosc.xcodeproj/Info-processed.plist b/software/drsosc/drsosc.xcodeproj/Info-processed.plist new file mode 100644 index 0000000..e567bc9 --- /dev/null +++ b/software/drsosc/drsosc.xcodeproj/Info-processed.plist @@ -0,0 +1,50 @@ + + + + + BuildMachineOSBuild + 11B26 + CFBundleDevelopmentRegion + en + CFBundleExecutable + DRSOsc + CFBundleIconFile + DRSOsc.icns + CFBundleIdentifier + PSI.DRSOsc + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + DRSOsc + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 4B110 + DTPlatformVersion + GM + DTSDKBuild + 11A511a + DTSDKName + macosx10.7 + DTXcode + 0410 + DTXcodeBuild + 4B110 + LSMinimumSystemVersion + 10.7 + NSHumanReadableCopyright + Copyright © 2011 PSI. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/software/drsosc/drsosc.xcodeproj/Info.plist b/software/drsosc/drsosc.xcodeproj/Info.plist new file mode 100644 index 0000000..5fe225c --- /dev/null +++ b/software/drsosc/drsosc.xcodeproj/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + GNU General Public License + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/software/drsosc/drsosc.xcodeproj/Prefix.pch b/software/drsosc/drsosc.xcodeproj/Prefix.pch new file mode 100644 index 0000000..71c4248 --- /dev/null +++ b/software/drsosc/drsosc.xcodeproj/Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'drsosc' target in the 'drsosc' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/software/drsosc/drsosc.xcodeproj/project.pbxproj b/software/drsosc/drsosc.xcodeproj/project.pbxproj new file mode 100644 index 0000000..dfdbac2 --- /dev/null +++ b/software/drsosc/drsosc.xcodeproj/project.pbxproj @@ -0,0 +1,555 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D510F9F91427842C008644A1 /* musbstd.c in Sources */ = {isa = PBXBuildFile; fileRef = D510F9F81427842C008644A1 /* musbstd.c */; }; + D520B6D91427851E00EFBFBE /* DRS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D520B6D81427851E00EFBFBE /* DRS.cpp */; }; + D520B6DC1427855B00EFBFBE /* mxml.c in Sources */ = {isa = PBXBuildFile; fileRef = D520B6DA1427855B00EFBFBE /* mxml.c */; }; + D520B6DD1427855B00EFBFBE /* strlcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = D520B6DB1427855B00EFBFBE /* strlcpy.c */; }; + D5275EBA1844DAA00083CE6A /* averager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D5275EB91844DAA00083CE6A /* averager.cpp */; }; + D54FC057142777CE00A7A6B0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D54FC056142777CE00A7A6B0 /* Cocoa.framework */; }; + D56D7EDE14585114000C7727 /* drsosc.fbp in Resources */ = {isa = PBXBuildFile; fileRef = D56D7EDD14585114000C7727 /* drsosc.fbp */; }; + D593C9E8142779F4006744E6 /* AboutDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9D9142779F4006744E6 /* AboutDialog.cpp */; }; + D593C9E9142779F4006744E6 /* ConfigDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9DA142779F4006744E6 /* ConfigDialog.cpp */; }; + D593C9EA142779F4006744E6 /* DisplayDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9DB142779F4006744E6 /* DisplayDialog.cpp */; }; + D593C9EB142779F4006744E6 /* DOFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9DC142779F4006744E6 /* DOFrame.cpp */; }; + D593C9EC142779F4006744E6 /* DOScreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9DD142779F4006744E6 /* DOScreen.cpp */; }; + D593C9EE142779F4006744E6 /* DRSOsc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9DF142779F4006744E6 /* DRSOsc.cpp */; }; + D593C9EF142779F4006744E6 /* EPThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9E0142779F4006744E6 /* EPThread.cpp */; }; + D593C9F0142779F4006744E6 /* InfoDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9E1142779F4006744E6 /* InfoDialog.cpp */; }; + D593C9F1142779F4006744E6 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9E2142779F4006744E6 /* main.cpp */; }; + D593C9F2142779F4006744E6 /* MeasureDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9E3142779F4006744E6 /* MeasureDialog.cpp */; }; + D593C9F3142779F4006744E6 /* Measurement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9E4142779F4006744E6 /* Measurement.cpp */; }; + D593C9F4142779F4006744E6 /* Osci.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9E5142779F4006744E6 /* Osci.cpp */; }; + D593C9F5142779F4006744E6 /* rb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9E6142779F4006744E6 /* rb.cpp */; }; + D593C9F6142779F4006744E6 /* TriggerDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D593C9E7142779F4006744E6 /* TriggerDialog.cpp */; }; + D5D12D7516691F77000AA21F /* DRSOsc.icns in Resources */ = {isa = PBXBuildFile; fileRef = D5D12D7416691F77000AA21F /* DRSOsc.icns */; }; + D5E513C3188EB93A00F103E1 /* Icons.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D5E513C2188EB93A00F103E1 /* Icons.xcassets */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + D510F9EF14277B66008644A1 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = drsosc.xcodeproj/Info.plist; sourceTree = SOURCE_ROOT; }; + D510F9F114277B78008644A1 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = drsosc.xcodeproj/Prefix.pch; sourceTree = SOURCE_ROOT; }; + D510F9F81427842C008644A1 /* musbstd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = musbstd.c; path = /drs4eb/software/src/musbstd.c; sourceTree = ""; }; + D520B6D81427851E00EFBFBE /* DRS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DRS.cpp; path = /drs4eb/software/src/DRS.cpp; sourceTree = ""; }; + D520B6DA1427855B00EFBFBE /* mxml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mxml.c; path = /drs4eb/software/src/mxml.c; sourceTree = ""; }; + D520B6DB1427855B00EFBFBE /* strlcpy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = strlcpy.c; path = /drs4eb/software/src/strlcpy.c; sourceTree = ""; }; + D5275EB81844DA8C0083CE6A /* averager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = averager.h; path = /drs4eb/software/include/averager.h; sourceTree = ""; }; + D5275EB91844DAA00083CE6A /* averager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = averager.cpp; path = /drs4eb/software/src/averager.cpp; sourceTree = ""; }; + D54FC052142777CE00A7A6B0 /* DRSOsc.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DRSOsc.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D54FC056142777CE00A7A6B0 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + D54FC059142777CE00A7A6B0 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + D54FC05A142777CE00A7A6B0 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + D54FC05B142777CE00A7A6B0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + D56D7EDD14585114000C7727 /* drsosc.fbp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = drsosc.fbp; sourceTree = ""; }; + D57C757018B3AD2A002AD084 /* DRSOsc.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = DRSOsc.entitlements; sourceTree = ""; }; + D593C9D8142779BC006744E6 /* DRS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DRS.h; path = /drs4eb/software/include/DRS.h; sourceTree = ""; }; + D593C9D9142779F4006744E6 /* AboutDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AboutDialog.cpp; sourceTree = SOURCE_ROOT; }; + D593C9DA142779F4006744E6 /* ConfigDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConfigDialog.cpp; sourceTree = SOURCE_ROOT; }; + D593C9DB142779F4006744E6 /* DisplayDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayDialog.cpp; sourceTree = SOURCE_ROOT; }; + D593C9DC142779F4006744E6 /* DOFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOFrame.cpp; sourceTree = SOURCE_ROOT; }; + D593C9DD142779F4006744E6 /* DOScreen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOScreen.cpp; sourceTree = SOURCE_ROOT; }; + D593C9DF142779F4006744E6 /* DRSOsc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DRSOsc.cpp; sourceTree = SOURCE_ROOT; }; + D593C9E0142779F4006744E6 /* EPThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EPThread.cpp; sourceTree = SOURCE_ROOT; }; + D593C9E1142779F4006744E6 /* InfoDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InfoDialog.cpp; sourceTree = SOURCE_ROOT; }; + D593C9E2142779F4006744E6 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = SOURCE_ROOT; }; + D593C9E3142779F4006744E6 /* MeasureDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MeasureDialog.cpp; sourceTree = SOURCE_ROOT; }; + D593C9E4142779F4006744E6 /* Measurement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Measurement.cpp; sourceTree = SOURCE_ROOT; }; + D593C9E5142779F4006744E6 /* Osci.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Osci.cpp; sourceTree = SOURCE_ROOT; }; + D593C9E6142779F4006744E6 /* rb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rb.cpp; sourceTree = SOURCE_ROOT; }; + D593C9E7142779F4006744E6 /* TriggerDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TriggerDialog.cpp; sourceTree = SOURCE_ROOT; }; + D593C9F714277A1F006744E6 /* AboutDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutDialog.h; sourceTree = ""; }; + D593C9F814277A1F006744E6 /* ConfigDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConfigDialog.h; sourceTree = ""; }; + D593C9F914277A1F006744E6 /* DisplayDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplayDialog.h; sourceTree = ""; }; + D593C9FA14277A1F006744E6 /* DOFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOFrame.h; sourceTree = ""; }; + D593C9FB14277A1F006744E6 /* DOScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOScreen.h; sourceTree = ""; }; + D593C9FC14277A1F006744E6 /* DRSOsc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DRSOsc.h; sourceTree = ""; }; + D593C9FD14277A1F006744E6 /* DRSOscInc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DRSOscInc.h; sourceTree = ""; }; + D593C9FE14277A1F006744E6 /* EPThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EPThread.h; sourceTree = ""; }; + D593C9FF14277A1F006744E6 /* InfoDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoDialog.h; sourceTree = ""; }; + D593CA0014277A1F006744E6 /* MeasureDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MeasureDialog.h; sourceTree = ""; }; + D593CA0114277A1F006744E6 /* Measurement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Measurement.h; sourceTree = ""; }; + D593CA0214277A1F006744E6 /* Osci.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Osci.h; sourceTree = ""; }; + D593CA0314277A1F006744E6 /* rb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rb.h; sourceTree = ""; }; + D593CA0414277A1F006744E6 /* TriggerDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerDialog.h; sourceTree = ""; }; + D593CA0914277A3C006744E6 /* mxml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mxml.h; path = /drs4eb/software/include/mxml.h; sourceTree = ""; }; + D593CA0A14277A3C006744E6 /* strlcpy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = strlcpy.h; path = /drs4eb/software/include/strlcpy.h; sourceTree = ""; }; + D593CA0B14277A46006744E6 /* musbstd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = musbstd.h; path = /drs4eb/software/include/musbstd.h; sourceTree = ""; }; + D5D12D7416691F77000AA21F /* DRSOsc.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = DRSOsc.icns; path = /drs4eb/software/drsosc/DRSOsc.icns; sourceTree = ""; }; + D5E513C2188EB93A00F103E1 /* Icons.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Icons.xcassets; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D54FC04F142777CE00A7A6B0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D54FC057142777CE00A7A6B0 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D520B6D6142784FD00EFBFBE /* Source files */ = { + isa = PBXGroup; + children = ( + D5275EB91844DAA00083CE6A /* averager.cpp */, + D520B6DA1427855B00EFBFBE /* mxml.c */, + D520B6DB1427855B00EFBFBE /* strlcpy.c */, + D520B6D81427851E00EFBFBE /* DRS.cpp */, + D510F9F81427842C008644A1 /* musbstd.c */, + ); + name = "Source files"; + sourceTree = ""; + }; + D54FC047142777CD00A7A6B0 = { + isa = PBXGroup; + children = ( + D57C757018B3AD2A002AD084 /* DRSOsc.entitlements */, + D5E513C2188EB93A00F103E1 /* Icons.xcassets */, + D56D7EDB145850EB000C7727 /* Resource files */, + D520B6D6142784FD00EFBFBE /* Source files */, + D593C9D7142779A9006744E6 /* Header files */, + D54FC05C142777CE00A7A6B0 /* drsosc */, + D54FC055142777CE00A7A6B0 /* Frameworks */, + D54FC053142777CE00A7A6B0 /* Products */, + ); + sourceTree = ""; + }; + D54FC053142777CE00A7A6B0 /* Products */ = { + isa = PBXGroup; + children = ( + D54FC052142777CE00A7A6B0 /* DRSOsc.app */, + ); + name = Products; + sourceTree = ""; + }; + D54FC055142777CE00A7A6B0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D54FC056142777CE00A7A6B0 /* Cocoa.framework */, + D54FC058142777CE00A7A6B0 /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + D54FC058142777CE00A7A6B0 /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + D54FC059142777CE00A7A6B0 /* AppKit.framework */, + D54FC05A142777CE00A7A6B0 /* CoreData.framework */, + D54FC05B142777CE00A7A6B0 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + D54FC05C142777CE00A7A6B0 /* drsosc */ = { + isa = PBXGroup; + children = ( + D593C9D9142779F4006744E6 /* AboutDialog.cpp */, + D593C9DA142779F4006744E6 /* ConfigDialog.cpp */, + D593C9DB142779F4006744E6 /* DisplayDialog.cpp */, + D593C9DC142779F4006744E6 /* DOFrame.cpp */, + D593C9DD142779F4006744E6 /* DOScreen.cpp */, + D593C9DF142779F4006744E6 /* DRSOsc.cpp */, + D593C9E0142779F4006744E6 /* EPThread.cpp */, + D593C9E1142779F4006744E6 /* InfoDialog.cpp */, + D593C9E2142779F4006744E6 /* main.cpp */, + D593C9E3142779F4006744E6 /* MeasureDialog.cpp */, + D593C9E4142779F4006744E6 /* Measurement.cpp */, + D593C9E5142779F4006744E6 /* Osci.cpp */, + D593C9E6142779F4006744E6 /* rb.cpp */, + D593C9E7142779F4006744E6 /* TriggerDialog.cpp */, + D54FC05D142777CE00A7A6B0 /* Supporting Files */, + ); + path = drsosc; + sourceTree = ""; + }; + D54FC05D142777CE00A7A6B0 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + D5D12D7416691F77000AA21F /* DRSOsc.icns */, + D510F9F114277B78008644A1 /* Prefix.pch */, + D510F9EF14277B66008644A1 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + D56D7EDB145850EB000C7727 /* Resource files */ = { + isa = PBXGroup; + children = ( + D56D7EDD14585114000C7727 /* drsosc.fbp */, + ); + name = "Resource files"; + sourceTree = ""; + }; + D593C9D7142779A9006744E6 /* Header files */ = { + isa = PBXGroup; + children = ( + D5275EB81844DA8C0083CE6A /* averager.h */, + D593CA0B14277A46006744E6 /* musbstd.h */, + D593CA0914277A3C006744E6 /* mxml.h */, + D593CA0A14277A3C006744E6 /* strlcpy.h */, + D593C9F714277A1F006744E6 /* AboutDialog.h */, + D593C9F814277A1F006744E6 /* ConfigDialog.h */, + D593C9F914277A1F006744E6 /* DisplayDialog.h */, + D593C9FA14277A1F006744E6 /* DOFrame.h */, + D593C9FB14277A1F006744E6 /* DOScreen.h */, + D593C9FC14277A1F006744E6 /* DRSOsc.h */, + D593C9FD14277A1F006744E6 /* DRSOscInc.h */, + D593C9FE14277A1F006744E6 /* EPThread.h */, + D593C9FF14277A1F006744E6 /* InfoDialog.h */, + D593CA0014277A1F006744E6 /* MeasureDialog.h */, + D593CA0114277A1F006744E6 /* Measurement.h */, + D593CA0214277A1F006744E6 /* Osci.h */, + D593CA0314277A1F006744E6 /* rb.h */, + D593CA0414277A1F006744E6 /* TriggerDialog.h */, + D593C9D8142779BC006744E6 /* DRS.h */, + ); + name = "Header files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D54FC051142777CE00A7A6B0 /* DRSOsc */ = { + isa = PBXNativeTarget; + buildConfigurationList = D54FC070142777CE00A7A6B0 /* Build configuration list for PBXNativeTarget "DRSOsc" */; + buildPhases = ( + D54FC04E142777CE00A7A6B0 /* Sources */, + D54FC04F142777CE00A7A6B0 /* Frameworks */, + D54FC050142777CE00A7A6B0 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DRSOsc; + productName = DRSOsc; + productReference = D54FC052142777CE00A7A6B0 /* DRSOsc.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D54FC049142777CD00A7A6B0 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0810; + ORGANIZATIONNAME = PSI; + TargetAttributes = { + D54FC051142777CE00A7A6B0 = { + DevelopmentTeam = YMN55GDSJB; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 0; + }; + }; + }; + }; + }; + buildConfigurationList = D54FC04C142777CD00A7A6B0 /* Build configuration list for PBXProject "drsosc" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D54FC047142777CD00A7A6B0; + productRefGroup = D54FC053142777CE00A7A6B0 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D54FC051142777CE00A7A6B0 /* DRSOsc */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D54FC050142777CE00A7A6B0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D56D7EDE14585114000C7727 /* drsosc.fbp in Resources */, + D5E513C3188EB93A00F103E1 /* Icons.xcassets in Resources */, + D5D12D7516691F77000AA21F /* DRSOsc.icns in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D54FC04E142777CE00A7A6B0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D593C9E8142779F4006744E6 /* AboutDialog.cpp in Sources */, + D593C9E9142779F4006744E6 /* ConfigDialog.cpp in Sources */, + D593C9EA142779F4006744E6 /* DisplayDialog.cpp in Sources */, + D593C9EB142779F4006744E6 /* DOFrame.cpp in Sources */, + D593C9EC142779F4006744E6 /* DOScreen.cpp in Sources */, + D593C9EE142779F4006744E6 /* DRSOsc.cpp in Sources */, + D593C9EF142779F4006744E6 /* EPThread.cpp in Sources */, + D593C9F0142779F4006744E6 /* InfoDialog.cpp in Sources */, + D593C9F1142779F4006744E6 /* main.cpp in Sources */, + D593C9F2142779F4006744E6 /* MeasureDialog.cpp in Sources */, + D5275EBA1844DAA00083CE6A /* averager.cpp in Sources */, + D593C9F3142779F4006744E6 /* Measurement.cpp in Sources */, + D593C9F4142779F4006744E6 /* Osci.cpp in Sources */, + D593C9F5142779F4006744E6 /* rb.cpp in Sources */, + D593C9F6142779F4006744E6 /* TriggerDialog.cpp in Sources */, + D510F9F91427842C008644A1 /* musbstd.c in Sources */, + D520B6D91427851E00EFBFBE /* DRS.cpp in Sources */, + D520B6DC1427855B00EFBFBE /* mxml.c in Sources */, + D520B6DD1427855B00EFBFBE /* strlcpy.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D54FC06E142777CE00A7A6B0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = /usr/local/include; + MACOSX_DEPLOYMENT_TARGET = 10.8; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + D54FC06F142777CE00A7A6B0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = /usr/local/include; + MACOSX_DEPLOYMENT_TARGET = 10.8; + SDKROOT = macosx; + }; + name = Release; + }; + D54FC071142777CE00A7A6B0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LIBRARY = "compiler-default"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; + COMBINE_HIDPI_IMAGES = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = drsosc.xcodeproj/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + OS_DARWIN, + HAVE_USB, + USE_DRS_MUTEX, + HAVE_LIBUSB10, + __WXOSX_COCOA__, + __WXOSX__, + __WXMAC__, + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + HEADER_SEARCH_PATHS = ( + /usr/local/include, + "/usr/local/lib/wx/include/osx_cocoa-unicode-static-3.0", + "/usr/local/include/wx-3.0", + "/usr/local/include/libusb-1.0", + /drs4eb/software/include, + ); + INFOPLIST_FILE = drsosc.xcodeproj/Info.plist; + MACOSX_DEPLOYMENT_TARGET = 10.7; + OTHER_LDFLAGS = ( + "-L/usr/local/lib", + "/usr/local/lib/libusb-1.0.a", + "-framework", + IOKit, + "-framework", + Carbon, + "-framework", + Cocoa, + "-framework", + AudioToolbox, + "-framework", + System, + "-framework", + OpenGL, + "/usr/local/lib/libwx_osx_cocoau_xrc-3.0.a", + "/usr/local/lib/libwx_osx_cocoau_html-3.0.a", + "/usr/local/lib/libwx_osx_cocoau_qa-3.0.a", + "/usr/local/lib/libwx_osx_cocoau_adv-3.0.a", + "/usr/local/lib/libwx_osx_cocoau_core-3.0.a", + "/usr/local/lib/libwx_baseu_xml-3.0.a", + "/usr/local/lib/libwx_baseu_net-3.0.a", + "/usr/local/lib/libwx_baseu-3.0.a", + "-framework", + WebKit, + "-lexpat", + "-lwxregexu-3.0", + "-lwxtiff-3.0", + "-lwxjpeg-3.0", + "-lwxpng-3.0", + "-lz", + "-lpthread", + "-liconv", + ); + PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + D54FC072142777CE00A7A6B0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LIBRARY = "compiler-default"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; + COMBINE_HIDPI_IMAGES = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = drsosc.xcodeproj/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + OS_DARWIN, + HAVE_USB, + USE_DRS_MUTEX, + HAVE_LIBUSB10, + __WXOSX_COCOA__, + __WXOSX__, + __WXMAC__, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + HEADER_SEARCH_PATHS = ( + /usr/local/include, + "/usr/local/lib/wx/include/osx_cocoa-unicode-static-3.0", + "/usr/local/include/wx-3.0", + "/usr/local/include/libusb-1.0", + /drs4eb/software/include, + ); + INFOPLIST_FILE = drsosc.xcodeproj/Info.plist; + MACOSX_DEPLOYMENT_TARGET = 10.7; + OTHER_LDFLAGS = ( + "-L/usr/local/lib", + "/usr/local/lib/libusb-1.0.a", + "-framework", + IOKit, + "-framework", + Carbon, + "-framework", + Cocoa, + "-framework", + AudioToolbox, + "-framework", + System, + "-framework", + OpenGL, + "/usr/local/lib/libwx_osx_cocoau_xrc-3.0.a", + "/usr/local/lib/libwx_osx_cocoau_html-3.0.a", + "/usr/local/lib/libwx_osx_cocoau_qa-3.0.a", + "/usr/local/lib/libwx_osx_cocoau_adv-3.0.a", + "/usr/local/lib/libwx_osx_cocoau_core-3.0.a", + "/usr/local/lib/libwx_baseu_xml-3.0.a", + "/usr/local/lib/libwx_baseu_net-3.0.a", + "/usr/local/lib/libwx_baseu-3.0.a", + "-framework", + WebKit, + "-lexpat", + "-lwxregexu-3.0", + "-lwxtiff-3.0", + "-lwxjpeg-3.0", + "-lwxpng-3.0", + "-lz", + "-lpthread", + "-liconv", + ); + PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D54FC04C142777CD00A7A6B0 /* Build configuration list for PBXProject "drsosc" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D54FC06E142777CE00A7A6B0 /* Debug */, + D54FC06F142777CE00A7A6B0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D54FC070142777CE00A7A6B0 /* Build configuration list for PBXNativeTarget "DRSOsc" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D54FC071142777CE00A7A6B0 /* Debug */, + D54FC072142777CE00A7A6B0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D54FC049142777CD00A7A6B0 /* Project object */; +} diff --git a/software/drsosc/drsosc.xpm b/software/drsosc/drsosc.xpm new file mode 100644 index 0000000..14f48a5 --- /dev/null +++ b/software/drsosc/drsosc.xpm @@ -0,0 +1,691 @@ +/* XPM */ +static const char * drsosc_xpm[] = { +"64 64 624 2", +" c None", +". c #DDDDDD", +"+ c #E4E4E4", +"@ c #EBEBEB", +"# c #EFEFEF", +"$ c #ECECEC", +"% c #EAEAEA", +"& c #E9E9E9", +"* c #E7E7E7", +"= c #E6E6E6", +"- c #E5E5E5", +"; c #E3E3E3", +"> c #E2E2E2", +", c #E1E1E1", +"' c #E0E0E0", +") c #DFDFDF", +"! c #DCDCDC", +"~ c #DBDBDB", +"{ c #DADADA", +"] c #D8D8D8", +"^ c #D7D7D7", +"/ c #D6D6D6", +"( c #D5D5D5", +"_ c #D4D4D4", +": c #D3D3D3", +"< c #D2D2D2", +"[ c #D1D1D1", +"} c #D0D0D0", +"| c #CFCFCF", +"1 c #CECECE", +"2 c #CDCDCD", +"3 c #CCCCCC", +"4 c #C6C6C6", +"5 c #C0C0C0", +"6 c #B6B6B6", +"7 c #F4F4F4", +"8 c #F0F0F0", +"9 c #EEEEEE", +"0 c #EDEDED", +"a c #E8E8E8", +"b c #E3E2E2", +"c c #DEDEDE", +"d c #D9D9D9", +"e c #D6D7D7", +"f c #CACACA", +"g c #C8C8C9", +"h c #C9C9C9", +"i c #B2B2B2", +"j c #E7E7E8", +"k c #C2C2C2", +"l c #C1C1C1", +"m c #BFBFBF", +"n c #BEBEBE", +"o c #BDBDBD", +"p c #BCBCBC", +"q c #BABBBB", +"r c #BABABA", +"s c #B9B9B9", +"t c #B7B7B7", +"u c #B5B5B5", +"v c #B4B4B4", +"w c #B3B3B3", +"x c #B1B1B1", +"y c #B0B0B0", +"z c #AEAEAE", +"A c #ACACAC", +"B c #ABABAB", +"C c #ADADAD", +"D c #A8A8A8", +"E c #A7A7A7", +"F c #A5A5A5", +"G c #A4A4A4", +"H c #A3A3A3", +"I c #A0A0A0", +"J c #9E9E9E", +"K c #9D9D9D", +"L c #9C9C9C", +"M c #9B9B9B", +"N c #999999", +"O c #979797", +"P c #969696", +"Q c #949494", +"R c #939393", +"S c #929292", +"T c #919191", +"U c #909090", +"V c #8E8E8E", +"W c #BBBBBB", +"X c #C4C4C4", +"Y c #C3C3C3", +"Z c #BCBCBB", +"` c #959595", +" . c #8D8D8D", +".. c #8C8C8C", +"+. c #8A8A8A", +"@. c #888888", +"#. c #858585", +"$. c #838383", +"%. c #808080", +"&. c #7E7E7E", +"*. c #7C7C7C", +"=. c #797979", +"-. c #777777", +";. c #757575", +">. c #737373", +",. c #707070", +"'. c #6E6E6E", +"). c #6C6C6C", +"!. c #696969", +"~. c #666666", +"{. c #646464", +"]. c #5F5F5F", +"^. c #787878", +"/. c #6B6B6B", +"(. c #575757", +"_. c #565656", +":. c #535353", +"<. c #505050", +"[. c #4D4D4D", +"}. c #4B4B4B", +"|. c #484848", +"1. c #454545", +"2. c #424242", +"3. c #404040", +"4. c #3D3D3D", +"5. c #3A3A3A", +"6. c #373737", +"7. c #343434", +"8. c #303030", +"9. c #2D2D2D", +"0. c #2A2A2A", +"a. c #272727", +"b. c #242424", +"c. c #202020", +"d. c #1E1E1E", +"e. c #1B1B1B", +"f. c #363636", +"g. c #828282", +"h. c #B7B6B6", +"i. c #8F8F8F", +"j. c #8B8B8B", +"k. c #878787", +"l. c #848484", +"m. c #818181", +"n. c #7F7F7F", +"o. c #7B7B7B", +"p. c #767676", +"q. c #747474", +"r. c #717171", +"s. c #6A6A6A", +"t. c #676767", +"u. c #6D6D6D", +"v. c #5C5C5C", +"w. c #5A5A5A", +"x. c #585858", +"y. c #555555", +"z. c #525252", +"A. c #4A4A4A", +"B. c #434343", +"C. c #414141", +"D. c #3F3F3F", +"E. c #3C3C3C", +"F. c #383838", +"G. c #333333", +"H. c #2C2C2C", +"I. c #292929", +"J. c #262626", +"K. c #232323", +"L. c #161616", +"M. c #131313", +"N. c #2E2E2E", +"O. c #868686", +"P. c #7A7A7A", +"Q. c #626262", +"R. c #515151", +"S. c #4C4C4C", +"T. c #494949", +"U. c #474747", +"V. c #444444", +"W. c #3E3E3E", +"X. c #393939", +"Y. c #323232", +"Z. c #282828", +"`. c #252525", +" + c #222222", +".+ c #1C1C1C", +"++ c #191919", +"@+ c #111111", +"#+ c #0E0E0E", +"$+ c #898989", +"%+ c #727272", +"&+ c #5B5B5B", +"*+ c #545454", +"=+ c #4F4F4F", +"-+ c #464646", +";+ c #3B3B3B", +">+ c #313131", +",+ c #2F2F2F", +"'+ c #181818", +")+ c #121212", +"!+ c #0B0B0B", +"~+ c #494948", +"{+ c #AFAFAF", +"]+ c #7D7D7D", +"^+ c #686868", +"/+ c #656565", +"(+ c #616161", +"_+ c #4E4E4E", +":+ c #353535", +"<+ c #2B2B2B", +"[+ c #0F0F0F", +"}+ c #020202", +"|+ c #AAAAAA", +"1+ c #989898", +"2+ c #C7C7C7", +"3+ c #606060", +"4+ c #212121", +"5+ c #1D1D1D", +"6+ c #151515", +"7+ c #040404", +"8+ c #ABACAC", +"9+ c #6F6F6F", +"0+ c #636363", +"a+ c #595959", +"b+ c #3A383B", +"c+ c #363138", +"d+ c #363536", +"e+ c #322E33", +"f+ c #2D292F", +"g+ c #2C2A2D", +"h+ c #1A1A1A", +"i+ c #171717", +"j+ c #101010", +"k+ c #080808", +"l+ c #CBCBCB", +"m+ c #5D5D5D", +"n+ c #403E40", +"o+ c #3C3A3D", +"p+ c #4F843B", +"q+ c #4E8737", +"r+ c #477933", +"s+ c #477C32", +"t+ c #49872E", +"u+ c #3A5D2B", +"v+ c #251E28", +"w+ c #1F1F1F", +"x+ c #141414", +"y+ c #0D0D0D", +"z+ c #070707", +"A+ c #A2A2A2", +"B+ c #403D41", +"C+ c #475B3F", +"D+ c #54943C", +"E+ c #39393A", +"F+ c #353137", +"G+ c #333134", +"H+ c #302D31", +"I+ c #2B242E", +"J+ c #344C2B", +"K+ c #478F27", +"L+ c #232025", +"M+ c #222122", +"N+ c #0C0C0C", +"O+ c #424043", +"P+ c #4B6540", +"Q+ c #4F7D3D", +"R+ c #38313B", +"S+ c #29282A", +"T+ c #242126", +"U+ c #469525", +"V+ c #212021", +"W+ c #1D1D1E", +"X+ c #444344", +"Y+ c #485841", +"Z+ c #51823F", +"`+ c #39343C", +" @ c #201A22", +".@ c #42931F", +"+@ c #1A131C", +"@@ c #AEADAD", +"#@ c #A9A9A9", +"$@ c #599840", +"%@ c #3A333D", +"&@ c #1F211F", +"*@ c #3B821B", +"=@ c #160F19", +"-@ c #060606", +";@ c #5E5E5E", +">@ c #423C44", +",@ c #599541", +"'@ c #3C393E", +")@ c #1C1A1D", +"!@ c #27471A", +"~@ c #294E17", +"{@ c #141215", +"]@ c #090909", +"^@ c #050505", +"/@ c #4B6542", +"(@ c #4A6640", +"_@ c #3C3B3C", +":@ c #160F18", +"<@ c #377F16", +"[@ c #131014", +"}@ c #0A0A0A", +"|@ c #A1A1A1", +"1@ c #403942", +"2@ c #579740", +"3@ c #3B353D", +"4@ c #151415", +"5@ c #317512", +"6@ c #0E0910", +"7@ c #030303", +"8@ c #424042", +"9@ c #507A40", +"0@ c #424D3E", +"a@ c #2C6412", +"b@ c #131B0F", +"c@ c #A0A1A0", +"d@ c #3F3941", +"e@ c #55903F", +"f@ c #3A363C", +"g@ c #0E0811", +"h@ c #30790E", +"i@ c #08030A", +"j@ c #403F41", +"k@ c #4E783F", +"l@ c #404A3D", +"m@ c #3B3A3B", +"n@ c #0E0C0F", +"o@ c #255D0C", +"p@ c #0E180A", +"q@ c #080708", +"r@ c #8D8C8D", +"s@ c #3D363F", +"t@ c #538F3D", +"u@ c #39343A", +"v@ c #09040B", +"w@ c #2A7109", +"x@ c #040006", +"y@ c #3F3D3F", +"z@ c #48653D", +"A@ c #43593B", +"B@ c #383738", +"C@ c #080509", +"D@ c #266809", +"E@ c #050405", +"F@ c #010101", +"G@ c #3F3F3E", +"H@ c #3B363C", +"I@ c #518D3B", +"J@ c #362F38", +"K@ c #0A090A", +"L@ c #090E07", +"M@ c #205C05", +"N@ c #020004", +"O@ c #7C7C7D", +"P@ c #3D433B", +"Q@ c #487538", +"R@ c #353436", +"S@ c #030006", +"T@ c #267105", +"U@ c #000003", +"V@ c #39373A", +"W@ c #4C8139", +"X@ c #353336", +"Y@ c #040204", +"Z@ c #143804", +"`@ c #0F2C02", +" # c #000000", +".# c #352F37", +"+# c #4B8736", +"@# c #332F34", +"## c #226A01", +"$# c #454445", +"%# c #3D5435", +"&# c #3E5B33", +"*# c #313032", +"=# c #000002", +"-# c #206600", +";# c #423F43", +"># c #488233", +",# c #2F2931", +"'# c #091F00", +")# c #103B00", +"!# c #131214", +"~# c #3E3940", +"{# c #468031", +"]# c #2E2B2F", +"^# c #1E6800", +"/# c #4E4D4E", +"(# c #48623F", +"_# c #37502E", +":# c #2C2B2C", +"<# c #175D00", +"[# c #0B050D", +"}# c #4A474B", +"|# c #50883C", +"1# c #29232B", +"2# c #082400", +"3# c #183C0C", +"4# c #323032", +"5# c #575857", +"6# c #767576", +"7# c #48434A", +"8# c #4C7F39", +"9# c #353236", +"0# c #09030C", +"a# c #2D6D15", +"b# c #2D2A2E", +"c# c #545254", +"d# c #859D7D", +"e# c #6D6A6E", +"f# c #605F60", +"g# c #697464", +"h# c #677961", +"i# c #5C5C5D", +"j# c #3D3C3D", +"k# c #313F2C", +"l# c #262526", +"m# c #6B8C5F", +"n# c #3E4B3A", +"o# c #262427", +"p# c #4F7D3E", +"q# c #312E32", +"r# c #040304", +"s# c #1A1A19", +"t# c #575657", +"u# c #4B7C3A", +"v# c #3B393B", +"w# c #2A2B2A", +"x# c #241E26", +"y# c #589343", +"z# c #312D32", +"A# c #565158", +"B# c #4B8438", +"C# c #373138", +"D# c #383938", +"E# c #24321F", +"F# c #49713B", +"G# c #2B292C", +"H# c #1A1919", +"I# c #565457", +"J# c #467436", +"K# c #373B36", +"L# c #1F1D20", +"M# c #316D1D", +"N# c #383539", +"O# c #171818", +"P# c #555455", +"Q# c #333732", +"R# c #447233", +"S# c #323033", +"T# c #1B141E", +"U# c #32741B", +"V# c #060706", +"W# c #2E2930", +"X# c #468231", +"Y# c #2F2A31", +"Z# c #1D1C1D", +"`# c #24361D", +" $ c #264C19", +".$ c #343335", +"+$ c #171617", +"@$ c #535253", +"#$ c #2D2B2D", +"$$ c #3E6B2E", +"%$ c #31382E", +"&$ c #2E2D2E", +"*$ c #1A171B", +"=$ c #30701A", +"-$ c #150F16", +";$ c #141313", +">$ c #3E762B", +",$ c #2A282B", +"'$ c #171119", +")$ c #2F7118", +"!$ c #151116", +"~$ c #181717", +"{$ c #272328", +"]$ c #3E7D29", +"^$ c #261F28", +"/$ c #181618", +"($ c #254E17", +"_$ c #1D2F17", +":$ c #131213", +"<$ c #262527", +"[$ c #2F4626", +"}$ c #315127", +"|$ c #252425", +"1$ c #171817", +"2$ c #150E17", +"3$ c #2E7516", +"4$ c #120B14", +"5$ c #0F100F", +"6$ c #161516", +"7$ c #211A23", +"8$ c #3A7E24", +"9$ c #211B23", +"0$ c #151516", +"a$ c #192615", +"b$ c #245314", +"c$ c #121013", +"d$ c #211F22", +"e$ c #315C21", +"f$ c #263321", +"g$ c #130E14", +"h$ c #2B7113", +"i$ c #0F0911", +"j$ c #10100F", +"k$ c #1C161E", +"l$ c #35791E", +"m$ c #1C171E", +"n$ c #131612", +"o$ c #266211", +"p$ c #0F0C10", +"q$ c #1C191D", +"r$ c #2E621D", +"s$ c #1F271C", +"t$ c #0F0B11", +"u$ c #276B10", +"v$ c #0E0B0F", +"w$ c #0F0E0F", +"x$ c #17111A", +"y$ c #32791A", +"z$ c #181918", +"A$ c #0F0F10", +"B$ c #111510", +"C$ c #24610F", +"D$ c #0C090D", +"E$ c #171518", +"F$ c #265117", +"G$ c #1E3217", +"H$ c #0D060F", +"I$ c #27710D", +"J$ c #0B060C", +"K$ c #111211", +"L$ c #120A15", +"M$ c #307E15", +"N$ c #120914", +"O$ c #0D0C0D", +"P$ c #142B0C", +"Q$ c #1C480C", +"R$ c #0A080A", +"S$ c #162212", +"T$ c #266013", +"U$ c #100C12", +"V$ c #09010C", +"W$ c #28790B", +"X$ c #06000A", +"Y$ c #0A0A09", +"Z$ c #0C0B0B", +"`$ c #3D3E3D", +" % c #0F0B10", +".% c #225610", +"+% c #172B10", +"@% c #0F0D0F", +"#% c #0B0C0B", +"$% c #07000A", +"%% c #236E0A", +"&% c #0A0D09", +"*% c #0E0E0D", +"=% c #0C030F", +"-% c #28750E", +";% c #0F140D", +">% c #090A09", +",% c #080209", +"'% c #1B4D09", +")% c #143109", +"!% c #080608", +"~% c #297B0C", +"{% c #0E160C", +"]% c #0A070B", +"^% c #070009", +"/% c #194908", +"(% c #154106", +"_% c #050006", +":% c #226609", +"<% c #194809", +"[% c #080609", +"}% c #060208", +"|% c #060307", +"1% c #216D07", +"2% c #113206", +"3% c #030005", +"4% c #070109", +"5% c #0F2508", +"6% c #216907", +"7% c #1E6007", +"8% c #1C5B07", +"9% c #1E6206", +"0% c #1E6005", +"a% c #040305", +"b% c #040504", +"c% c #020101", +"d% c #131212", +"e% c #020005", +"f% c #030004", +"g% c #040005", +"h% c #050605", +"i% c #0D0E0D", +"j% c #141415", +"k% c #121312", +"l% c #101111", +"m% c #0A0A0B", +"n% c #030302", +"o% c #020303", +"p% c #000001", +"q% c #0E0D0E", +"r% c #191A1A", +"s% c #1C1B1B", +"t% c #1C1D1C", +"u% c #1E1E1F", +"v% c #222221", +"w% c #232223", +"x% c #222322", +"y% c #242423", +"z% c #212122", +"A% c #1E1E1D", +"B% c #19191A", +"C% c #181817", +"D% c #1C1D1D", +"E% c #1F1F1E", +"F% c #1F1E1F", +"G% c #1A1A1B", +" . + @ # $ @ % & * = - ; ; > , , , ' ) ) . . . . ! ~ { ~ { ] ] ^ ^ ^ / ( _ : : < [ [ } | | 1 2 3 3 4 5 6 ", +" ~ 7 8 9 0 9 # 0 @ @ & a * = = = - - - + + ; ; b > > , > ' ' ) c c c c ! ! ! ~ ~ { { d ] ] e / / ( ( } 3 f g h i ", +" j # $ 9 8 + [ k l 5 m n o p q r s t 6 u v w x y z z A B t C D E F G H I I J K L M N O P P Q R S T U V L W ( 1 X Y Z ", +" + @ % 8 ( D ` V ...+.@.#.$.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.c.f.g.3 X n h. ", +" 2 & * % i S T S i.i. ...j.@.k.l.g.m.n.*.o.^.p.q.r.'.).s.t.{.o.u.v.w.x.y.z.<.[.A.|.B.C.D.E.F.f.G.8.H.I.J.K.c.e.L.M.N.A 5 s K ", +" = > & x T S R T i.V ..j.+.@.O.l.g.%.&.*.P.-.;.>.r.'.).!.~.Q.P.u.v.w.x.y.R.<.S.T.U.V.C.W.E.X.f.Y.8.H.Z.`. +c..+++L.@+#+o t 6 ", +"m ' ) 2 T R R T i.i.V ..+.$+k.#.l.m.n.&.o.=.p.q.%+,.'./.!.~.Q.P.).&+w.(.*+R.=+}.|.-+B.C.W.;+6.7.>+,+H.Z.J. +d.e.'+L.)+!+~+p {+$+", +"f ] ' G U T U i.V . .j.$+k.#.#.$.%.&.]+o.^.p.q.r.'.)./.^+/+(+=./.w.x.y.z.<._+A.|.-+2.3.4.;+6.:+>+N.<+Z.`. +d.e.'+L.@+[+}+|+A 1+", +"2+: } R i.i.V . ...j.+.k.O.#.g.m.&.]+o.=.p.;.>.r.'./.!.t.{.3+^./.w.x.y.z.<.[.T.U.1.2.D.E.5.f.G.>+N.0.a.b.4+5+e.'+6+@+#+7+u.8+M ", +"X 1 l .V V ...j.+.$+@.O.l.$.m.n.&.*.P.^.p.>.r.9+u./.^+/+0+3+-.!.a+(.:.R.=+S.|.U.V.C.W.b+c+d+e+f+g+I.J.K.4+5+h+i+6+j+#+k+-+D 1+", +"m l+u +.....j.j.+.@.k.#.l.g.m.%.&.*.P.=.p.q.%+,.u./.!.~.{.Q.m+;.!.(._.z.<._+A.U.-+2.n+o+p+q+r+s+t+u+v+`.K.w+5+++L.x+j+y+z+7.A+R ", +"r 4 x $+j.$+$+@.@.O.O.l.$.m.%.&.]+o.^.-.q.>.r.9+).s.^+/+0+3+&+q.t._.*+R.=+[.T.U.V.B+C+D+E+F+G+H+I+J+K+L+M+d.e.++L.)+[+N+z+>+K V ", +"6 k z O.@.k.O.O.l.l.$.g.m.%.]+*.o.^.-.;.>.%+9+)./.^+~.0+Q.].&+>.~.y.z.<._+}.|.-+O+P+Q+R+6.:+Y.,+9.S+T+U+V+W+h+'+x+)+#+!+z+,+O $+", +"i o B l.#.#.l.l.$.g.m.%.n.]+*.o.=.-.;.%+r.9+u./.^+~./+Q.].m+a+r.{.:.R._+S.T.U.X+Y+Z+`+5.6.G.>+N.<+Z.`. @.@+@h+i+x+@+#+!+z+9.S l.", +"@@s #@m.g.$.g.m.m.n.n.&.*.o.=.^.-.;.>.%+,.u./.!.t./+Q.3+m+v.x.r.Q.R.<.[.}.U.-+O+$@%@;+F.:+Y.8.9.0.J.b.V+&@*@=@L.x+@+y+!+-@<+ .%.", +"#@v E n.%.%.n.n.&.]+*.P.P.=.-.p.q.>.,.9+u.s.^+~./+0+(+;@v.w._.9+3+=+[.S.|.U.>@,@'@;+5.f.G.>+9.H.Z.`.K.4+)@!@~@{@)+[+N+]@^@I.@.P.", +"F {+G *.&.&.]+]+o.o.P.=.^.-.;.>.r.,.'.u.s.!.t./+0+(+m+v.w.(.*+).]._+S.T.U.X+/@(@_@5.6.f.Y.8.9.0.a.b.4+w+e.:@<@[@j+#+}@}@^@Z.$.;.", +"I |+|@=.o.P.P.=.^.^.-.p.q.q.%+,.,.'.)./.!.~.{.0+3+m+v.w.x._.R./.m+S.A.U.V.1@2@3@;+F.f.G.>+9.<+I.`.K.4+d.h+i+4@5@6@N+}@]@7@J.n.r.", +"M F J p.-.^.-.-.p.;.;.q.%+r.9+9+).).!.t./+{.Q.3+m+v.w.x._.*+<.!.&+A.|.1.8@9@0@;+X.6.7.>+N.H.0.J.K. +d..+++i+[@a@b@!+]@k+7@`.=.).", +"O c@L q.;.;.;.q.>.%+r.,.9+'.u./.s.^+t./+0+0+3+m+v.w.x.y.:.R._+t.x.|.-+B.d@e@f@5.6.:+Y.8.9.0.Z.`. +c.5+h+i+x+M.g@h@i@]@-@7@K.q.t.", +"T M N ,.%+r.r.,.,.9+'.'.u./.s.!.t./+{.Q.Q.].m+v.a+(.y.:.z.=+}.{._.-+B.j@k@l@m@6.f.Y.8.9.<+I.`.K.4+d..+++L.x+@+n@o@p@q@^@}+4+9+Q.", +"r@P P u.'.'.'.'.).).).s.s.!.t./+/+0+Q.3+m+v.&+x.(.y.z.R.=+S.|.Q.*+2.C.s@t@u@F.f.G.8.N.H.I.a.b.4+w+5+h+i+6+M.j+#+v@w@x@^@}+w+!.m+", +"k.T R s././././.s.!.!.^+~./+{.0+Q.3+].v.&+w.x._.*+z.R.=+S.A.-+].z.3.y@z@A@B@:+7.Y.N.H.0.Z.`. +c.5+e.'+L.x+)+[+N+C@D@E@7+F@5+0+x.", +"g.j.U ~.^+^+t.t.~./+{.{.{.Q.(+3+;@v.v.w.x.(.y.:.R.<.[.S.T.|.V.;@=+G@H@I@J@f.G.>+,+9.0.Z.J. +4+d..+++L.x+)+j+y+}@K@L@M@N@F@e.].:.", +"O@O. .{.~./+/+{.{.0+Q.(+(+].m+v.v.w.a+x.y.*+z.R._+[.}.|.U.1.C.&+[.;+P@Q@R@7.Y.,+H.<+Z.J.b.4+w+5+h+i+6+M.@+[+N+}@]@S@T@U@F@++w.=+", +"^.m.+.3+Q.(+(+(+3+3+;@m+m+v.&+w.a+x._.y.:.R.<._+[.}.|.U.1.B.D.a+}.V@W@X@7.Y.8.9.<+I.J.b.4+w+5+h+'+i+x+@+j+#+}@]@k+Y@Z@`@ #'+_.}.", +">.*.k.m+].].;@m+m+m+v.v.&+w.a+(._.*+:.R.<._+[.S.T.U.1.1.2.C.4._.|..#+#@#>+8.9.H.I.a.`. +w+d..+++L.x+M.j+#+N+}@]@7+^@U@## #i+<.-+", +").^.l.w.v.&+&+w.w.a+a+x.(._.y.*+z.z.R.=+_+S.}.T.U.-+V.2.3.4.5._.$#%#&#*#8.N.<+I.a.`.K.4+d..+h+'+6+M.@+j+N+}@}@z+^@7@=#-# #6+S.B.", +"3+/.g.(.x.a+x.x.(.(._.y.y.:.z.R.<.=+[.S.}.T.U.-+1.2.C.D.4.E.F.:.;#>#,#8.H.H.I.a.b.K.c.w+.+h+'+L.M.@+[+#+!+]@k+^@7@7@ #'#)#!#-+:+", +"&+{.p.<._.y.y.*+:.:.z.R.R.<.=+=+[.S.A.A.|.-+1.B.2.3.W.E.;+F.:+<.~#{#]#9.<+I.a.`.K.4+d.5+e.'+i+x+)+@+#+!+]@k+-@^@7@}+ # #^#6@X.,+", +"(.].q.U.A.=+z.R.R.R.<.=+_+_+[.}.A.T.|.-+1.V.2.3.3.4.;+;+X.6.G./#(#_#:#<+I.Z.`. +4+w+.+h+++L.x+)+j+[+y+}@]@z+^@7@7@ # # #<#[#f.9.", +"z.w.r.V.-+1.-+}.[.S.S.}.A.T.|.|.-+1.B.2.C.3.D.4.;+5.F.f.:+G.,+}#|#1#0.Z.J.K. +c.5+.+h+++6+M.)+[+#+y+}@]@z+7+7@}+F@ # # #2#3#4#0.", +"R.5#6#}.[.[.S.S.}._+R.:.R.<.=+_+[.S.S.A.T.U.-+V.B.C.3.3.W.E.5.7#8#9#G.Y.8.,+N.<+I.a.`.b. +c.w+5+5+h+'+i+L.x+@+#+#+N+N+N+0#a#b#J.", +"[.c#d#e#'.'.'.'.u.u.).).'.,.r.,.,.9+'.u.)./.s.^+^+t.~.{.0+Q.f#g#h#i#&+&+a+x._.y.:.:.z.<.=+=+[.S.A.T.|.-+2.D.W.W.4.4.4.4.j#k#l#h+", +"6+R@m#n#_@;+;+5.5.X.X.F.F.6.f.f.F.X.X.F.6.:+7.G.>+,+N.H.0.I.o#p#q#4+4+d.5+h+++i+L.M.@+j+y+N+}@z+-@7@ #F@ # # # # # # # # #r#s#x+", +")+6+t#u#v#;+;+;+;+5.5.X.F.6.f.:+7.G.Y.>+Y.Y.Y.>+8.8.,+9.H.w#x#y#z#K. +w+d.5+e.'+i+M.)+j+y+!+]@]@k+^@^@7@7@}+ # # # # # # #z+h+6+", +")+i+A#B#C#D#X.F.6.6.6.f.f.:+7.G.Y.>+>+8.N.H.<+0.Z.a.J.`.b.M+E#F#G#.+e.++'+6+x+M.j+[+#+y+!+}@]@k+^@7+7+}+}+F@ # # # # # # #z+H#6+", +")+i+I#J#K#f.f.:+f.:+7.7.Y.Y.>+>+8.,+N.H.H.0.I.Z.a.`.b. +4+L#M#N#Z.h+'+i+6+x+M.@+[+[+y+N+}@}@k+-@^@7+}+}+F@ # # # # # # # #z+++6+", +")+O#P#Q#R#S#G.Y.Y.Y.>+>+>+8.,+N.9.H.H.0.I.Z.Z.J.`.K. +4+c.T#U#F+a.i+i+6+x+M.j+j+[+y+N+]@}@k+-@^@^@7@7@}+ # # # # # # # # #V#++6+", +"@+i+*+W#X#Y#>+>+8.8.,+N.N.9.H.H.<+I.I.Z.Z.J.`.b. +4+c.d.Z#`# $.$`.L.6+x+)+@+j+[+y+N+]@}@]@-@^@^@7@7@}+ # # # # # # # # # #-@++x+", +"@++$@$#$$$%$&$9.9.9.H.H.<+<+I.I.Z.Z.a.`.b.b. +4+4+w+d.5+*$=$-$G.K.x+x+)+j+[+#+y+N+}@}@]@-@^@^@7@7@}+F@ # # # # # # # # # #-@'+;$", +"@+i+R.0.G#>$,$<+<+0.0.I.Z.Z.Z.a.J.`.b.K.4+4+4+w+d.5+.+h+'$)$!$>+4+M.)+j+[+[+y+N+}@}@]@-@^@^@7@}+}+F@ # # # # # # # # # # #-@~$M.", +"j+i+<.Z.{$]$^$I.Z.Z.Z.a.J.`.`.b.b. + +4+4+w+d.5+.+e.h+/$($_$:$8.c.@+j+[+y+N+N+]@}@]@z+^@^@7@}+}+F@ # # # # # # # # # # # #-@L.M.", +"@+L._+`.<$[$}$|$`.`.`.b.K.K. +4+4+4+c.w+d.5+.+e.h+'+1$2$3$4$)+N.d.[+[+y+N+}@}@}@k+-@^@^@7@}+}+F@ # # # # # # # # # # # # #-@L.M.", +"5$6$[. +K.7$8$9$K. + +4+4+4+4+w+w+d.d.5+e.h+h+'+'+i+0$a$b$c$j+H.e.#+y+N+}@]@}@k+-@^@^@7@}+}+F@ # # # # # # # # # # # # # #-@6+)+", +"[+6+}.c. +d$e$f$V+4+c.c.w+d.d.5+5+.+e.h+h+'+'+i+L.6+g$h$i$@+#+0.h+N+N+}@]@]@k+-@^@^@7@}+}+F@ # # # # # # # # # # # # # # #^@x+@+", +"j$6+A.5+w+d.k$l$m$d.d.5+5+.+e.e.h+h+'+'+i+i+L.6+x+M.n$o$p$[+N+Z.'+}@}@}@]@z+^@7+7+7@7@}+F@ # # # # # # # # # # # # # # # #^@x+@+", +"[+6+T.e..+5+q$r$s$e.e.e.h+h+++'+'+'+i+L.6+x+x+M.)+t$u$v$w$y+!+Z.L.]@]@]@-@^@7+^@7@7@}+F@ # # # # # # # # # # # # # # # # #^@)+j+", +"#+x+|.'+h+h+h+x$y$'$z$'+'+i+i+i+L.6+6+x+x+M.@+@+A$B$C$D$y+N+]@J.6+]@z+-@^@^@7+}+7@}+F@ # # # # # # # # # # # # # # # # # #7+)+j+", +"#+x+-+L.i+i+i+E$F$G$+$i+L.6+6+x+x+x+M.)+@+j+j+[+H$I$J$N+!+}@k+b.x+-@^@7+7+7@}+}+}+ # # # # # # # # # # # # # # # # # # # #7+K$j+", +"y+)+1.M.6+6+6+6+L$M$N$x+x+x+M.)+)+@+j+j+[+[+#+O$P$Q$R$}@]@}@z+ +)+7+^@7+7@7@}+F@ # # # # # # # # # # # # # # # # # # # # #7+@+j+", +"N+)+B.)+x+x+x+x+M.S$T$U$)+@+j+j+[+j+[+#+y+y+N+V$W$X$Y$]@]@z+7+4+j+7+7@}+}+}+ # # # # # # # # # # # # # # # # # # # # # # #7+j$[+", +"Z$@+`$[+@+@+@+j+j+ %.%+%@%j+[+[+#+y+y+N+N+#%$%%%&%]@]@z+-@^@7@c.[+}+7@}+F@ # # # # # # # # # # # # # # # # # # # # # # # #7@[+#+", +"!+*%>+[+[+j+j+[+[+[+=%-%;%O$N+y+N+N+!+}@>%,%'%)%!%z+-@^@7+^@}+w+#+}+}+ # # # # # # # # # # # # # # # # # # # # # # # # # #7+#+y+", +"N+N+K.[+y+y+N+y+y+N+N+V$~%{%]%}@}@]@}@}@^%/%(%_%^@^@7+^@7@7@F@5+y+ # # # # # # # # # # # # # # # # # # # # # # # # # # # #z+N+y+", +"}@}@0$y+!+N+!+!+!+!+}@}@$%:%<%$%C@[%}%|%1%2%3%^@^@7+7+7@7@}+ #5+!+ # # # # # # # # # # # # # # # # # # # # # # # # # # # #}@!+}@", +"k+]@)+N+]@]@]@]@}@}@}@}@]@4%5%6%7%8%9%0%a%Y@b%7@7@}+7@}+}+F@ #.+!+ # # # # # # # # # # # # # # # # # # # # # # # # # # #c%y+}@k+", +"7@}@N+d%k+]@]@]@k+z+z+-@z+-@a%3%e%f%N@g%r#7@}+}+}+}+}+F@ # # #h+}@ # # # # # # # # # # # # # # # # # # # # # # # # # # #]@N+!+7@", +" k+]@)+[+^@-@^@^@^@^@^@^@7+^@^@7+7@7@}+}+7@}+}+F@ # # # # # #h+}@ # # # # # # # # # # # # # # # # # # # # # # # # # #h%i%!+]@ ", +" #!+}@j%k%-@7@7+7+7+7+7@7@7@}+}+}+}+}+}+F@ # # # # # # # # #h+}@ # # # # # # # # # # # # # # # # # # # # # # # #F@}@[+N+N+ # ", +" F@!+}@l%'+M.m%-@7@7@7@7@7@7@7@n%o%7@}+}+}+}+}+}+}+}+}+}+F@6$]@}+}+}+}+}+F@}+F@F@F@F@F@ # # # #p%F@F@ # #F@-@N+j+j+O$q%F@ ", +" #}@y+N+j+6+i+i+'+r%s%.+t%5+u%c.c.v%w%K. +x%K.y%b.b.b.b.v%z%K.K. + + +4+c.c.w+d.A%5+.+e.h+B%C%i+L.6+x+M.)+@+j$#+!+ # ", +" #7@}@#+j+@+)+x+x+L.i+i+i+'+++h+h+.+5+t%D%5+W+E%w+w+w+w+w+w+w+w+w+w+F%d.5+5+5+.+.+G%h+++'+i+'+i+L.x+x+M.j+!+7@ # ", +" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # "}; diff --git a/software/drsosc/left.xpm b/software/drsosc/left.xpm new file mode 100644 index 0000000..f246b4a --- /dev/null +++ b/software/drsosc/left.xpm @@ -0,0 +1,35 @@ +/* XPM */ +static const char *left_xpm[]={ +"20 28 4 1", +". c None", +"b c #808080", +"a c #c0c0c0", +"# c #ffffff", +"....................", +"...............#a...", +"..............#aabb.", +".............#aaabb.", +"............#aaaabb.", +"...........#aaaaabb.", +"..........#aaaaaabb.", +".........#aaaaaaabb.", +"........#aaaaaaaabb.", +".......#aaaaaaaaabb.", +"......#aaaaaaaaaabb.", +".....#aaaaaaaaaaabb.", +"....#aaaaaaaaaaaabb.", +"...#aaaaaaaaaaaaabb.", +"....aaaaaaaaaaaaabb.", +".....aaaaaaaaaaaabb.", +"......aaaaaaaaaaabb.", +".......aaaaaaaaaabb.", +"........aaaaaaaaabb.", +".........aaaaaaaabb.", +"..........aaaaaaabb.", +"...........aaaaaabb.", +"............aaaaabb.", +".............aaaabb.", +"..............aaabb.", +"...............aabb.", +"................abb.", +".................bb."}; diff --git a/software/drsosc/main.cpp b/software/drsosc/main.cpp new file mode 100644 index 0000000..4188916 --- /dev/null +++ b/software/drsosc/main.cpp @@ -0,0 +1,84 @@ +/******************************************************************** + Name: main.c + Created by: Stefan Ritt + + Contents: Main wxWidgets application for DRSOsc project + + $Id: main.cpp 21437 2014-07-30 14:13:29Z ritt $ +\********************************************************************/ + +#include "DRSOscInc.h" + +#include "drsosc.xpm" + +class DOApp : public wxApp +{ +public: + virtual bool OnInit(); + virtual int OnExit(); + +private: +}; + +DOApp& wxGetApp(); + +IMPLEMENT_APP(DOApp) + +/*------------------------------------------------------------------*/ +/* NaN's */ +/*------------------------------------------------------------------*/ + +#ifdef _MSC_VER +unsigned long _nan[2]={0xffffffff, 0x7fffffff}; +#endif + +double ss_nan() +{ +#ifdef _MSC_VER + return *(double *)_nan; +#else + return nan(""); +#endif +} + +#ifdef _MSC_VER +#include +#ifndef isnan +#define isnan(x) _isnan(x) +#endif +#ifndef finite +#define finite(x) _finite(x) +#endif +#elif defined(__linux__) +#include +#endif + +int ss_isnan(double x) +{ + return isnan(x); +} + +void ss_sleep(int ms) +{ + wxThread::Sleep(ms); +} + +/*------------------------------------------------------------------*/ +/* DOApp */ +/*------------------------------------------------------------------*/ + +bool DOApp::OnInit() +{ + DOFrame *frame = new DOFrame(NULL); + frame->Show(TRUE); + frame->SetIcon(wxICON(drsosc)); + SetTopWindow(frame); + return true; +} + +/*------------------------------------------------------------------*/ + +int DOApp::OnExit() +{ + return wxApp::OnExit(); +} diff --git a/software/drsosc/neg.xpm b/software/drsosc/neg.xpm new file mode 100644 index 0000000..653ae4f --- /dev/null +++ b/software/drsosc/neg.xpm @@ -0,0 +1,35 @@ +/* XPM */ +static const char *neg_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 20 20 8 1", +/* colors */ +"` c #36349b", +". c #a2a1ba", +"# c #dddfde", +"a c #82818a", +"b c None", +"c c #5959a4", +"d c #babbbd", +"e c #9292a0", +/* pixels */ +"bbbbbbbbbbbbbbbbbbbb", +"bbbbbbbbbbbbbbbbbbbb", +"#######bbbbbbbbbbbbb", +"daaaaaa#bbbbbbbbbbbb", +"b#ddddee#bbbbbbbbbbb", +"bb#####adbbbbbbbbbbb", +"bbbbbbb.ac#bbbbbbbbb", +"bbbbbb.c``.bbbbbbbbb", +"bbbbbbe```a#bbbbbbbb", +"bbbbbbb.``c#bbbbbbbb", +"bbbbbbbb.``dbbbbbbbb", +"bbbbbbbbb.`ebbbbbbbb", +"bbbbbbbbbbaa#bbbbbbb", +"bbbbbbbbbb#adbbbbbbb", +"bbbbbbbbbbb.e#####bb", +"bbbbbbbbbbb#aaaaaadb", +"bbbbbbbbbbbbbdddddd#", +"bbbbbbbbbbbbbb######", +"bbbbbbbbbbbbbbbbbbbb", +"bbbbbbbbbbbbbbbbbbbb" +}; diff --git a/software/drsosc/pos.xpm b/software/drsosc/pos.xpm new file mode 100644 index 0000000..8384bd5 --- /dev/null +++ b/software/drsosc/pos.xpm @@ -0,0 +1,35 @@ +/* XPM */ +static const char *pos_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 20 20 8 1", +/* colors */ +"` c #37369b", +". c #a8a9ab", +"# c #dfdedf", +"a c #c3c3c4", +"b c #7273a4", +"c c #868589", +"d c #5c5ca7", +"e c None", +/* pixels */ +"eeeeeeeeeeeeeeeeeeee", +"eeeeeeeeeeeeeeeeeeee", +"eeeeeeeeeeee#######e", +"eeeeeeeeeee#ccccccae", +"eeeeeeeeeee..aaaaaaa", +"eeeeeeeeee#b#a######", +"eeeeeeeeeedca#eeeeee", +"eeeeeeeeed`a.eeeeeee", +"eeeeeeeed``.aeeeeeee", +"eeeeeeed``d.#eeeeeee", +"eeeeeeb```d.eeeeeeee", +"eeeeeee.``baeeeeeeee", +"eeeeeee..c.#eeeeeeee", +"eeeeee#c#a##eeeeeeee", +"e#####..a#eeeeeeeeee", +".cccccc#aeeeeeeeeeee", +"e#....aa#eeeeeeeeeee", +"ee######eeeeeeeeeeee", +"eeeeeeeeeeeeeeeeeeee", +"eeeeeeeeeeeeeeeeeeee" +}; diff --git a/software/drsosc/rb.cpp b/software/drsosc/rb.cpp new file mode 100644 index 0000000..693a707 --- /dev/null +++ b/software/drsosc/rb.cpp @@ -0,0 +1,387 @@ +/********************************************************************\ + + Name: rb.c + Created by: Stefan Ritt + + $Id: rb.cpp 21437 2014-07-30 14:13:29Z ritt $ + +\********************************************************************/ + +#include +#ifdef OS_DARWIN +#include +#else +#include +#endif +#include +#include + +#include "rb.h" + +/********************************************************************\ +* * +* Ring buffer functions * +* * +* Provide an inter-thread buffer scheme for handling front-end * +* events. This code allows concurrent data acquisition, calibration * +* and network transfer on a multi-CPU machine. One thread reads * +* out the data, passes it vis the ring buffer functions * +* to another thread running on the other CPU, which can then * +* calibrate and/or send the data over the network. * +* * +\********************************************************************/ + +typedef struct { + unsigned char *buffer; + unsigned int size; + unsigned int max_event_size; + unsigned char *rp; + unsigned char *wp; + unsigned char *ep; +} RING_BUFFER; + +#define MAX_RING_BUFFER 100 +RING_BUFFER rb[MAX_RING_BUFFER]; + +volatile int _rb_nonblocking = 0; + +extern void ss_sleep(int ms); + +int rb_set_nonblocking() +/********************************************************************\ + + Routine: rb_set_nonblocking + + Purpose: Set all rb_get_xx to nonblocking. Needed in multi-thread + environments for stopping all theads without deadlock + + Input: + NONE + + Output: + NONE + + Function value: + RB_SUCCESS Successful completion + +\********************************************************************/ +{ + _rb_nonblocking = 1; + + return RB_SUCCESS; +} + +int rb_create(int size, int max_event_size, int *handle) +/********************************************************************\ + + Routine: rb_create + + Purpose: Create a ring buffer with a given size + + Input: + int size Size of ring buffer, must be larger than + 2*max_event_size + int max_event_size Maximum event size to be placed into + ring buffer + Output: + int *handle Handle to ring buffer + + Function value: + DB_SUCCESS Successful completion + DB_NO_MEMORY Maximum number of ring buffers exceeded + DB_INVALID_PARAM Invalid event size specified + +\********************************************************************/ +{ + int i; + + for (i = 0; i < MAX_RING_BUFFER; i++) + if (rb[i].buffer == NULL) + break; + + if (i == MAX_RING_BUFFER) + return RB_NO_MEMORY; + + if (size < max_event_size * 2) + return RB_INVALID_PARAM; + + memset(&rb[i], 0, sizeof(RING_BUFFER)); + rb[i].buffer = (unsigned char *) malloc(size); + assert(rb[i].buffer); + rb[i].size = size; + rb[i].max_event_size = max_event_size; + rb[i].rp = rb[i].buffer; + rb[i].wp = rb[i].buffer; + rb[i].ep = rb[i].buffer; + + *handle = i + 1; + + return RB_SUCCESS; +} + +int rb_delete(int handle) +/********************************************************************\ + + Routine: rb_delete + + Purpose: Delete a ring buffer + + Input: + none + Output: + int handle Handle to ring buffer + + Function value: + DB_SUCCESS Successful completion + +\********************************************************************/ +{ + if (handle < 0 || handle >= MAX_RING_BUFFER || rb[handle - 1].buffer == NULL) + return RB_INVALID_HANDLE; + + free(rb[handle - 1].buffer); + memset(&rb[handle - 1], 0, sizeof(RING_BUFFER)); + + return RB_SUCCESS; +} + +int rb_get_wp(int handle, void **p, int millisec) +/********************************************************************\ + +Routine: rb_get_wp + + Purpose: Retrieve write pointer where new data can be written + + Input: + int handle Ring buffer handle + int millisec Optional timeout in milliseconds if + buffer is full. Zero to not wait at + all (non-blocking) + + Output: + char **p Write pointer + + Function value: + DB_SUCCESS Successful completion + +\********************************************************************/ +{ + int h, i; + unsigned char *rp; + + if (handle < 1 || handle > MAX_RING_BUFFER || rb[handle - 1].buffer == NULL) + return RB_INVALID_HANDLE; + + h = handle - 1; + + for (i = 0; i <= millisec / 10; i++) { + + rp = rb[h].rp; // keep local copy, rb[h].rp might be changed by other thread + + /* check if enough size for wp >= rp without wrap-around */ + if (rb[h].wp >= rp + && rb[h].wp + rb[h].max_event_size <= rb[h].buffer + rb[h].size - rb[h].max_event_size) { + *p = rb[h].wp; + return RB_SUCCESS; + } + + /* check if enough size for wp >= rp with wrap-around */ + if (rb[h].wp >= rp && rb[h].wp + rb[h].max_event_size > rb[h].buffer + rb[h].size - rb[h].max_event_size && rb[h].rp > rb[h].buffer) { // next increment of wp wraps around, so need space at beginning + *p = rb[h].wp; + return RB_SUCCESS; + } + + /* check if enough size for wp < rp */ + if (rb[h].wp < rp && rb[h].wp + rb[h].max_event_size < rp) { + *p = rb[h].wp; + return RB_SUCCESS; + } + + if (millisec == 0) + return RB_TIMEOUT; + + if (_rb_nonblocking) + return RB_TIMEOUT; + + /* wait one time slice */ + ss_sleep(10); + } + + return RB_TIMEOUT; +} + +int rb_increment_wp(int handle, int size) +/********************************************************************\ + + Routine: rb_increment_wp + + Purpose: Increment current write pointer, making the data at + the write pointer available to the receiving thread + + Input: + int handle Ring buffer handle + int size Number of bytes placed at the WP + + Output: + NONE + + Function value: + RB_SUCCESS Successful completion + RB_INVALID_PARAM Event size too large or invalid handle +\********************************************************************/ +{ + int h; + unsigned char *new_wp; + + if (handle < 1 || handle > MAX_RING_BUFFER || rb[handle - 1].buffer == NULL) + return RB_INVALID_HANDLE; + + h = handle - 1; + + if ((unsigned int) size > rb[h].max_event_size) + return RB_INVALID_PARAM; + + new_wp = rb[h].wp + size; + + /* wrap around wp if not enough space */ + if (new_wp > rb[h].buffer + rb[h].size - rb[h].max_event_size) { + rb[h].ep = new_wp; + new_wp = rb[h].buffer; + assert(rb[h].rp != rb[h].buffer); + } + + rb[h].wp = new_wp; + + return RB_SUCCESS; +} + +int rb_get_rp(int handle, void **p, int millisec) +/********************************************************************\ + + Routine: rb_get_rp + + Purpose: Obtain the current read pointer at which new data is + available with optional timeout + + Input: + int handle Ring buffer handle + int millisec Optional timeout in milliseconds if + buffer is full. Zero to not wait at + all (non-blocking) + + Output: + char **p Address of pointer pointing to newly + available data. If p == NULL, only + return status. + + Function value: + RB_SUCCESS Successful completion + +\********************************************************************/ +{ + int i, h; + + if (handle < 1 || handle > MAX_RING_BUFFER || rb[handle - 1].buffer == NULL) + return RB_INVALID_HANDLE; + + h = handle - 1; + + for (i = 0; i <= millisec / 10; i++) { + + if (rb[h].wp != rb[h].rp) { + if (p != NULL) + *p = rb[handle - 1].rp; + return RB_SUCCESS; + } + + if (millisec == 0) + return RB_TIMEOUT; + + if (_rb_nonblocking) + return RB_TIMEOUT; + + /* wait one time slice */ + ss_sleep(10); + } + + return RB_TIMEOUT; +} + +int rb_increment_rp(int handle, int size) +/********************************************************************\ + + Routine: rb_increment_rp + + Purpose: Increment current read pointer, freeing up space for + the writing thread. + + Input: + int handle Ring buffer handle + int size Number of bytes to free up at current + read pointer + + Output: + NONE + + Function value: + RB_SUCCESS Successful completion + RB_INVALID_PARAM Event size too large or invalid handle + +\********************************************************************/ +{ + int h; + + unsigned char *new_rp; + + if (handle < 1 || handle > MAX_RING_BUFFER || rb[handle - 1].buffer == NULL) + return RB_INVALID_HANDLE; + + h = handle - 1; + + if ((unsigned int) size > rb[h].max_event_size) + return RB_INVALID_PARAM; + + new_rp = rb[h].rp + size; + + /* wrap around if not enough space left */ + if (new_rp + rb[h].max_event_size > rb[h].buffer + rb[h].size) + new_rp = rb[h].buffer; + + rb[handle - 1].rp = new_rp; + + return RB_SUCCESS; +} + +int rb_get_buffer_level(int handle, int *n_bytes) +/********************************************************************\ + + Routine: rb_get_buffer_level + + Purpose: Return number of bytes in a ring buffer + + Input: + int handle Handle of the buffer to get the info + + Output: + int *n_bytes Number of bytes in buffer + + Function value: + RB_SUCCESS Successful completion + RB_INVALID_HANDLE Buffer handle is invalid + +\********************************************************************/ +{ + int h; + + if (handle < 1 || handle > MAX_RING_BUFFER || rb[handle - 1].buffer == NULL) + return RB_INVALID_HANDLE; + + h = handle - 1; + + if (rb[h].wp >= rb[h].rp) + *n_bytes = rb[h].wp - rb[h].rp; + else + *n_bytes = rb[h].ep - rb[h].rp + rb[h].wp - rb[h].buffer; + + return RB_SUCCESS; +} diff --git a/software/drsosc/rb.h b/software/drsosc/rb.h new file mode 100644 index 0000000..736c3fb --- /dev/null +++ b/software/drsosc/rb.h @@ -0,0 +1,28 @@ +/********************************************************************\ + + Name: rb.h + Created by: Stefan Ritt + + Contents: Function declarations and constants for ring buffer + routines + + $Id: rb.h 17217 2011-02-25 15:31:29Z ritt $ + +\********************************************************************/ + +#define RB_SUCCESS 1 +#define RB_NO_MEMORY 2 +#define RB_INVALID_PARAM 3 +#define RB_INVALID_HANDLE 4 +#define RB_TIMEOUT 5 + +#define POINTER_T unsigned int + +int rb_set_nonblocking(); +int rb_create(int size, int max_event_size, int *ring_buffer_handle); +int rb_delete(int ring_buffer_handle); +int rb_get_wp(int handle, void **p, int millisec); +int rb_increment_wp(int handle, int size); +int rb_get_rp(int handle, void **p, int millisec); +int rb_increment_rp(int handle, int size); +int rb_get_buffer_level(int handle, int * n_bytes); diff --git a/software/drsosc/read_binary.C b/software/drsosc/read_binary.C new file mode 100644 index 0000000..f2a5c0b --- /dev/null +++ b/software/drsosc/read_binary.C @@ -0,0 +1,176 @@ +/* + + Name: read_binary.C + Created by: Stefan Ritt + Date: July 30th, 2014 + + Purpose: Example program under ROOT to read a binary data file written + by the DRSOsc program. Decode time and voltages from waveforms + and display them as a graph. Put values into a ROOT Tree for + further analysis. + + To run it, do: + + - Crate a file test.dat via the "Save" button in DRSOsc + - start ROOT + root [0] .L read_binary.C+ + root [1] decode("test.dat"); + +*/ + + +#include +#include +#include "TFile.h" +#include "TTree.h" +#include "TString.h" +#include "TGraph.h" +#include "TCanvas.h" +#include "Getline.h" + +typedef struct { + char time_header[4]; + char bn[2]; + unsigned short board_serial_number; +} THEADER; + +typedef struct { + char event_header[4]; + unsigned int event_serial_number; + unsigned short year; + unsigned short month; + unsigned short day; + unsigned short hour; + unsigned short minute; + unsigned short second; + unsigned short millisecond; + unsigned short reserved1; + char bs[2]; + unsigned short board_serial_number; + char tc[2]; + unsigned short trigger_cell; +} EHEADER; + +/*-----------------------------------------------------------------------------*/ + +void decode(char *filename) { + THEADER th; + EHEADER eh; + char hdr[4]; + unsigned short voltage[1024]; + double waveform[4][1024], time[4][1024]; + float bin_width[4][1024]; + char rootfile[256]; + int i, j, ch, n, chn_index; + double t1, t2, dt; + + // open the binary waveform file + FILE *f = fopen(Form("%s", filename), "r"); + if (f == NULL) { + printf("Cannot find file \'%s\'\n", filename); + return; + } + + //open the root file + strcpy(rootfile, filename); + if (strchr(rootfile, '.')) + *strchr(rootfile, '.') = 0; + strcat(rootfile, ".root"); + TFile *outfile = new TFile(rootfile, "RECREATE"); + + // define the rec tree + TTree *rec = new TTree("rec","rec"); + rec->Branch("t1", time[0] ,"t1[1024]/D"); + rec->Branch("t2", time[1] ,"t2[1024]/D"); + rec->Branch("t3", time[2] ,"t3[1024]/D"); + rec->Branch("t4", time[3] ,"t4[1024]/D"); + rec->Branch("w1", waveform[0] ,"w1[1024]/D"); + rec->Branch("w2", waveform[1] ,"w2[1024]/D"); + rec->Branch("w3", waveform[2] ,"w3[1024]/D"); + rec->Branch("w4", waveform[3] ,"w4[1024]/D"); + + // create canvas + TCanvas *c1 = new TCanvas(); + + // create graph + TGraph *g = new TGraph(1024, (double *)time[0], (double *)waveform[0]); + + // read time header + fread(&th, sizeof(th), 1, f); + printf("Found data for board #%d\n", th.board_serial_number); + + // read time bin widths + memset(bin_width, sizeof(bin_width), 0); + for (ch=0 ; ch<5 ; ch++) { + fread(hdr, sizeof(hdr), 1, f); + if (hdr[0] != 'C') { + // event header found + fseek(f, -4, SEEK_CUR); + break; + } + i = hdr[3] - '0' - 1; + printf("Found timing calibration for channel #%d\n", i+1); + fread(&bin_width[i][0], sizeof(float), 1024, f); + } + + // loop over all events in data file + for (n=0 ; n<5 ; n++) { + // read event header + i = fread(&eh, sizeof(eh), 1, f); + if (i < 1) + break; + + printf("Found event #%d\n", eh.event_serial_number); + + // reach channel data + for (ch=0 ; ch<5 ; ch++) { + i = fread(hdr, sizeof(hdr), 1, f); + if (i < 1) + break; + if (hdr[0] != 'C') { + // event header found + fseek(f, -4, SEEK_CUR); + break; + } + chn_index = hdr[3] - '0' - 1; + fread(voltage, sizeof(short), 1024, f); + + for (i=0 ; i<1024 ; i++) { + // convert data to volts + waveform[chn_index][i] = (voltage[i] / 65536. - 0.5); + + // calculate time for this cell + for (j=0,time[chn_index][i]=0 ; jFill(); + + // fill graph + for (i=0 ; i<1024 ; i++) + g->SetPoint(i, time[0][i], waveform[0][i]); + + // draw graph and wait for user click + g->Draw("ACP"); + c1->Update(); + gPad->WaitPrimitive(); + } + + // print number of events + printf("%d events processed, \"%s\" written.\n", n, rootfile); + + // save and close root file + rec->Write(); + outfile->Close(); +} diff --git a/software/drsosc/read_binary.cpp b/software/drsosc/read_binary.cpp new file mode 100644 index 0000000..d977e1f --- /dev/null +++ b/software/drsosc/read_binary.cpp @@ -0,0 +1,250 @@ +/* + Name: read_binary.cpp + Created by: Stefan Ritt + Date: July 30th, 2014 + + Purpose: Example file to read binary data saved by DRSOsc. + + Compile and run it with: + + gcc -o read_binary read_binary.cpp + + ./read_binary + + This program assumes that a pulse from a signal generator is split + and fed into channels #1 and #2. It then calculates the time difference + between these two pulses to show the performance of the DRS board + for time measurements. + + $Id: read_binary.cpp 22321 2016-08-25 12:26:12Z ritt $ +*/ + +#include +#include +#include +#include +#include + +typedef struct { + char tag[3]; + char version; +} FHEADER; + +typedef struct { + char time_header[4]; +} THEADER; + +typedef struct { + char bn[2]; + unsigned short board_serial_number; +} BHEADER; + +typedef struct { + char event_header[4]; + unsigned int event_serial_number; + unsigned short year; + unsigned short month; + unsigned short day; + unsigned short hour; + unsigned short minute; + unsigned short second; + unsigned short millisecond; + unsigned short range; +} EHEADER; + +typedef struct { + char tc[2]; + unsigned short trigger_cell; +} TCHEADER; + +typedef struct { + char c[1]; + char cn[3]; +} CHEADER; + +/*-----------------------------------------------------------------------------*/ + +int main(int argc, const char * argv[]) +{ + FHEADER fh; + THEADER th; + BHEADER bh; + EHEADER eh; + TCHEADER tch; + CHEADER ch; + + unsigned int scaler; + unsigned short voltage[1024]; + double waveform[16][4][1024], time[16][4][1024]; + float bin_width[16][4][1024]; + int i, j, b, chn, n, chn_index, n_boards; + double t1, t2, dt; + char filename[256]; + + int ndt; + double threshold, sumdt, sumdt2; + + if (argc > 1) + strcpy(filename, argv[1]); + else { + printf("Usage: read_binary \n"); + return 0; + } + + // open the binary waveform file + FILE *f = fopen(filename, "rb"); + if (f == NULL) { + printf("Cannot find file \'%s\'\n", filename); + return 0; + } + + // read file header + fread(&fh, sizeof(fh), 1, f); + if (fh.tag[0] != 'D' || fh.tag[1] != 'R' || fh.tag[2] != 'S') { + printf("Found invalid file header in file \'%s\', aborting.\n", filename); + return 0; + } + + if (fh.version != '2') { + printf("Found invalid file version \'%c\' in file \'%s\', should be \'2\', aborting.\n", fh.version, filename); + return 0; + } + + // read time header + fread(&th, sizeof(th), 1, f); + if (memcmp(th.time_header, "TIME", 4) != 0) { + printf("Invalid time header in file \'%s\', aborting.\n", filename); + return 0; + } + + for (b = 0 ; ; b++) { + // read board header + fread(&bh, sizeof(bh), 1, f); + if (memcmp(bh.bn, "B#", 2) != 0) { + // probably event header found + fseek(f, -4, SEEK_CUR); + break; + } + + printf("Found data for board #%d\n", bh.board_serial_number); + + // read time bin widths + memset(bin_width[b], sizeof(bin_width[0]), 0); + for (chn=0 ; chn<5 ; chn++) { + fread(&ch, sizeof(ch), 1, f); + if (ch.c[0] != 'C') { + // event header found + fseek(f, -4, SEEK_CUR); + break; + } + i = ch.cn[2] - '0' - 1; + printf("Found timing calibration for channel #%d\n", i+1); + fread(&bin_width[b][i][0], sizeof(float), 1024, f); + // fix for 2048 bin mode: double channel + if (bin_width[b][i][1023] > 10 || bin_width[b][i][1023] < 0.01) { + for (j=0 ; j<512 ; j++) + bin_width[b][i][j+512] = bin_width[b][i][j]; + } + } + } + n_boards = b; + + // initialize statistics + ndt = 0; + sumdt = sumdt2 = 0; + + // loop over all events in the data file + for (n=0 ; ; n++) { + // read event header + i = (int)fread(&eh, sizeof(eh), 1, f); + if (i < 1) + break; + + printf("Found event #%d %d %d\n", eh.event_serial_number, eh.second, eh.millisecond); + + // loop over all boards in data file + for (b=0 ; b 1) + printf("Found data for board #%d\n", bh.board_serial_number); + + // reach channel data + for (chn=0 ; chn<4 ; chn++) { + + // read channel header + fread(&ch, sizeof(ch), 1, f); + if (ch.c[0] != 'C') { + // event header found + fseek(f, -4, SEEK_CUR); + break; + } + chn_index = ch.cn[2] - '0' - 1; + fread(&scaler, sizeof(int), 1, f); + fread(voltage, sizeof(short), 1024, f); + + for (i=0 ; i<1024 ; i++) { + // convert data to volts + waveform[b][chn_index][i] = (voltage[i] / 65536. + eh.range/1000.0 - 0.5); + + // calculate time for this cell + for (j=0,time[b][chn_index][i]=0 ; j= threshold) { + t1 = (threshold-waveform[b][0][i])/(waveform[b][0][i+1]-waveform[b][0][i])*(time[b][0][i+1]-time[b][0][i])+time[b][0][i]; + break; + } + + // find peak in channel 2 above threshold + for (i=0 ; i<1022 ; i++) + if (waveform[b][1][i] < threshold && waveform[b][1][i+1] >= threshold) { + t2 = (threshold-waveform[b][1][i])/(waveform[b][1][i+1]-waveform[b][1][i])*(time[b][1][i+1]-time[b][1][i])+time[b][1][i]; + break; + } + + // calculate distance of peaks with statistics + if (t1 > 0 && t2 > 0) { + ndt++; + dt = t2 - t1; + sumdt += dt; + sumdt2 += dt*dt; + } + } + } + + // print statistics + printf("dT = %1.3lfns +- %1.1lfps\n", sumdt/ndt, 1000*sqrt(1.0/(ndt-1)*(sumdt2-1.0/ndt*sumdt*sumdt))); + + return 1; +} + diff --git a/software/drsosc/read_binary.xcodeproj/project.pbxproj b/software/drsosc/read_binary.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c4a6cc5 --- /dev/null +++ b/software/drsosc/read_binary.xcodeproj/project.pbxproj @@ -0,0 +1,230 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D52687A518C8A3A500D244A2 /* read_binary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D52687A418C8A3A500D244A2 /* read_binary.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + D526879618C8A2A800D244A2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + D526879818C8A2A800D244A2 /* read_binary */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = read_binary; sourceTree = BUILT_PRODUCTS_DIR; }; + D52687A418C8A3A500D244A2 /* read_binary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = read_binary.cpp; path = /drs4eb/software/drsosc/read_binary.cpp; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D526879518C8A2A800D244A2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D526878F18C8A2A800D244A2 = { + isa = PBXGroup; + children = ( + D526879A18C8A2A800D244A2 /* read_binary */, + D526879918C8A2A800D244A2 /* Products */, + ); + sourceTree = ""; + }; + D526879918C8A2A800D244A2 /* Products */ = { + isa = PBXGroup; + children = ( + D526879818C8A2A800D244A2 /* read_binary */, + ); + name = Products; + sourceTree = ""; + }; + D526879A18C8A2A800D244A2 /* read_binary */ = { + isa = PBXGroup; + children = ( + D52687A418C8A3A500D244A2 /* read_binary.cpp */, + ); + path = read_binary; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D526879718C8A2A800D244A2 /* read_binary */ = { + isa = PBXNativeTarget; + buildConfigurationList = D52687A118C8A2A800D244A2 /* Build configuration list for PBXNativeTarget "read_binary" */; + buildPhases = ( + D526879418C8A2A800D244A2 /* Sources */, + D526879518C8A2A800D244A2 /* Frameworks */, + D526879618C8A2A800D244A2 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = read_binary; + productName = read_binary; + productReference = D526879818C8A2A800D244A2 /* read_binary */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D526879018C8A2A800D244A2 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "Stefan Ritt"; + }; + buildConfigurationList = D526879318C8A2A800D244A2 /* Build configuration list for PBXProject "read_binary" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D526878F18C8A2A800D244A2; + productRefGroup = D526879918C8A2A800D244A2 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D526879718C8A2A800D244A2 /* read_binary */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + D526879418C8A2A800D244A2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D52687A518C8A3A500D244A2 /* read_binary.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D526879F18C8A2A800D244A2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.9; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + D52687A018C8A2A800D244A2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.9; + SDKROOT = macosx; + }; + name = Release; + }; + D52687A218C8A2A800D244A2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + D52687A318C8A2A800D244A2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D526879318C8A2A800D244A2 /* Build configuration list for PBXProject "read_binary" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D526879F18C8A2A800D244A2 /* Debug */, + D52687A018C8A2A800D244A2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D52687A118C8A2A800D244A2 /* Build configuration list for PBXNativeTarget "read_binary" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D52687A218C8A2A800D244A2 /* Debug */, + D52687A318C8A2A800D244A2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D526879018C8A2A800D244A2 /* Project object */; +} diff --git a/software/drsosc/right.xpm b/software/drsosc/right.xpm new file mode 100644 index 0000000..756042a --- /dev/null +++ b/software/drsosc/right.xpm @@ -0,0 +1,35 @@ +/* XPM */ +static const char *right_xpm[]={ +"20 28 4 1", +". c None", +"b c #808080", +"a c #c0c0c0", +"# c #ffffff", +"....................", +"...###..............", +"...#aa#.............", +"...#aaa#............", +"...#aaaa#...........", +"...#aaaaa#..........", +"...#aaaaaa#.........", +"...#aaaaaaa#........", +"...#aaaaaaaa#.......", +"...#aaaaaaaaa#......", +"...#aaaaaaaaaa#.....", +"...#aaaaaaaaaaa#....", +"...#aaaaaaaaaaaa#...", +"...#aaaaaaaaaaaaa#..", +"...#aaaaaaaaaaaaab..", +"...#aaaaaaaaaaaabb..", +"...#aaaaaaaaaaabb...", +"...#aaaaaaaaaabb....", +"...#aaaaaaaaabb.....", +"...#aaaaaaaabb......", +"...#aaaaaaabb.......", +"...#aaaaaabb........", +"...#aaaaabb.........", +"...#aaaabb..........", +"...#aaabb...........", +"...#aabb............", +"....abb.............", +"...................."}; diff --git a/software/drsosc/root.C b/software/drsosc/root.C new file mode 100644 index 0000000..260c9c6 --- /dev/null +++ b/software/drsosc/root.C @@ -0,0 +1,5 @@ +{ +TTree *t = new TTree("t", "t"); +t->ReadFile("du_u.txt", "E:Ch:Cell:U:dU"); +t->Draw("U:dU"); +} diff --git a/software/drsosc/up.xpm b/software/drsosc/up.xpm new file mode 100644 index 0000000..f18c2c9 --- /dev/null +++ b/software/drsosc/up.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static const char *up_xpm[]={ +"28 20 4 1", +". c None", +"b c #808080", +"a c #c0c0c0", +"# c #ffffff", +"............................", +"............................", +"............##..............", +"...........##aa.............", +"..........##aaaa............", +".........##aaaaaa...........", +"........##aaaaaaaa..........", +".......##aaaaaaaaaa.........", +"......##aaaaaaaaaaaa........", +".....##aaaaaaaaaaaaaa.......", +"....##aaaaaaaaaaaaaaaa......", +"...##aaaaaaaaaaaaaaaaaa.....", +"..##aaaaaaaaaaaaaaaaaaaa....", +".##aaaaaaaaaaaaaaaaaaaaaa...", +".#aaaaaaaaaaaaaaaaaaaaaaaa..", +".#aaaaaaaaaaaaaaaaaaaaaaaab.", +".#bbbbbbbbbbbbbbbbbbbbbbbbb.", +"..bbbbbbbbbbbbbbbbbbbbbbbbb.", +"............................", +"............................"}; diff --git a/software/include/DRS.h b/software/include/DRS.h new file mode 100644 index 0000000..2606989 --- /dev/null +++ b/software/include/DRS.h @@ -0,0 +1,950 @@ +/******************************************************************** + DRS.h, S.Ritt, M. Schneebeli - PSI + + $Id: DRS.h 21309 2014-04-11 14:51:29Z ritt $ + +********************************************************************/ +#ifndef DRS_H +#define DRS_H +#include +#include +#include "averager.h" + +#ifdef HAVE_LIBUSB +# ifndef HAVE_USB +# define HAVE_USB +# endif +#endif + +#ifdef HAVE_USB +# include +#endif // HAVE_USB + +#ifdef HAVE_VME +# include +#endif // HAVE_VME + +/* disable "deprecated" warning */ +#ifdef _MSC_VER +#pragma warning(disable: 4996) +#endif + +#ifndef NULL +#define NULL 0 +#endif + +int drs_kbhit(); +unsigned int millitime(); + +/* transport mode */ +#define TR_VME 1 +#define TR_USB 2 +#define TR_USB2 3 + +/* address types */ +#ifndef T_CTRL +#define T_CTRL 1 +#define T_STATUS 2 +#define T_RAM 3 +#define T_FIFO 4 +#endif + +/*---- Register addresses ------------------------------------------*/ + +#define REG_CTRL 0x00000 /* 32 bit control reg */ +#define REG_DAC_OFS 0x00004 +#define REG_DAC0 0x00004 +#define REG_DAC1 0x00006 +#define REG_DAC2 0x00008 +#define REG_DAC3 0x0000A +#define REG_DAC4 0x0000C +#define REG_DAC5 0x0000E +#define REG_DAC6 0x00010 +#define REG_DAC7 0x00012 +#define REG_CHANNEL_CONFIG 0x00014 // low byte +#define REG_CONFIG 0x00014 // high byte +#define REG_CHANNEL_MODE 0x00016 +#define REG_ADCCLK_PHASE 0x00016 +#define REG_FREQ_SET_HI 0x00018 // DRS2 +#define REG_FREQ_SET_LO 0x0001A // DRS2 +#define REG_TRG_DELAY 0x00018 // DRS4 +#define REG_FREQ_SET 0x0001A // DRS4 +#define REG_TRIG_DELAY 0x0001C +#define REG_LMK_MSB 0x0001C // DRS4 Mezz +#define REG_CALIB_TIMING 0x0001E // DRS2 +#define REG_EEPROM_PAGE_EVAL 0x0001E // DRS4 Eval +#define REG_EEPROM_PAGE_MEZZ 0x0001A // DRS4 Mezz +#define REG_TRG_CONFIG 0x0001C // DRS4 Eval4 +#define REG_LMK_LSB 0x0001E // DRS4 Mezz +#define REG_WARMUP 0x00020 // DRS4 Mezz +#define REG_COOLDOWN 0x00022 // DRS4 Mezz +#define REG_READ_POINTER 0x00026 // DRS4 Mezz + +#define REG_MAGIC 0x00000 +#define REG_BOARD_TYPE 0x00002 +#define REG_STATUS 0x00004 +#define REG_RDAC_OFS 0x0000E +#define REG_RDAC0 0x00008 +#define REG_STOP_CELL0 0x00008 +#define REG_RDAC1 0x0000A +#define REG_STOP_CELL1 0x0000A +#define REG_RDAC2 0x0000C +#define REG_STOP_CELL2 0x0000C +#define REG_RDAC3 0x0000E +#define REG_STOP_CELL3 0x0000E +#define REG_RDAC4 0x00000 +#define REG_RDAC5 0x00002 +#define REG_STOP_WSR0 0x00010 +#define REG_STOP_WSR1 0x00011 +#define REG_STOP_WSR2 0x00012 +#define REG_STOP_WSR3 0x00013 +#define REG_RDAC6 0x00014 +#define REG_RDAC7 0x00016 +#define REG_EVENTS_IN_FIFO 0x00018 +#define REG_EVENT_COUNT 0x0001A +#define REG_FREQ1 0x0001C +#define REG_FREQ2 0x0001E +#define REG_WRITE_POINTER 0x0001E +#define REG_TEMPERATURE 0x00020 +#define REG_TRIGGER_BUS 0x00022 +#define REG_SERIAL_BOARD 0x00024 +#define REG_VERSION_FW 0x00026 +#define REG_SCALER0 0x00028 +#define REG_SCALER1 0x0002C +#define REG_SCALER2 0x00030 +#define REG_SCALER3 0x00034 +#define REG_SCALER4 0x00038 +#define REG_SCALER5 0x0003C + +/*---- Control register bit definitions ----------------------------*/ + +#define BIT_START_TRIG (1<<0) // write a "1" to start domino wave +#define BIT_REINIT_TRIG (1<<1) // write a "1" to stop & reset DRS +#define BIT_SOFT_TRIG (1<<2) // write a "1" to stop and read data to RAM +#define BIT_EEPROM_WRITE_TRIG (1<<3) // write a "1" to write into serial EEPROM +#define BIT_EEPROM_READ_TRIG (1<<4) // write a "1" to read from serial EEPROM +#define BIT_MULTI_BUFFER (1<<16) // Use multi buffering when "1" +#define BIT_DMODE (1<<17) // (*DRS2*) 0: single shot, 1: circular +#define BIT_ADC_ACTIVE (1<<17) // (*DRS4*) 0: stop ADC when running, 1: ADC always clocked +#define BIT_LED (1<<18) // 1=on, 0=blink during readout +#define BIT_TCAL_EN (1<<19) // switch on (1) / off (0) for 33 MHz calib signal +#define BIT_TCAL_SOURCE (1<<20) +#define BIT_REFCLK_SOURCE (1<<20) +#define BIT_FREQ_AUTO_ADJ (1<<21) // DRS2/3 +#define BIT_TRANSP_MODE (1<<21) // DRS4 +#define BIT_ENABLE_TRIGGER1 (1<<22) // External LEMO/FP/TRBUS trigger +#define BIT_LONG_START_PULSE (1<<23) // (*DRS2*) 0:short start pulse (>0.8GHz), 1:long start pulse (<0.8GHz) +#define BIT_READOUT_MODE (1<<23) // (*DRS3*,*DRS4*) 0:start from first bin, 1:start from domino stop +#define BIT_DELAYED_START (1<<24) // DRS2: start domino wave 400ns after soft trigger, used for waveform + // generator startup +#define BIT_NEG_TRIGGER (1<<24) // DRS4: use high-to-low trigger if set +#define BIT_ACAL_EN (1<<25) // connect DRS to inputs (0) or to DAC6 (1) +#define BIT_TRIGGER_DELAYED (1<<26) // select delayed trigger from trigger bus +#define BIT_ADCCLK_INVERT (1<<26) // invert ADC clock +#define BIT_REFCLK_EXT (1<<26) // use external MMCX CLKIN refclk +#define BIT_DACTIVE (1<<27) // keep domino wave running during readout +#define BIT_STANDBY_MODE (1<<28) // put chip in standby mode +#define BIT_TR_SOURCE1 (1<<29) // trigger source selection bits +#define BIT_DECIMATION (1<<29) // drop all odd samples (DRS4 mezz.) +#define BIT_TR_SOURCE2 (1<<30) // trigger source selection bits +#define BIT_ENABLE_TRIGGER2 (1<<31) // analog threshold (internal) trigger + +/* DRS4 configuration register bit definitions */ +#define BIT_CONFIG_DMODE (1<<8) // 0: single shot, 1: circular +#define BIT_CONFIG_PLLEN (1<<9) // write a "1" to enable the internal PLL +#define BIT_CONFIG_WSRLOOP (1<<10) // write a "1" to connect WSROUT to WSRIN internally + +/*---- Status register bit definitions -----------------------------*/ + +#define BIT_RUNNING (1<<0) // one if domino wave running or readout in progress +#define BIT_NEW_FREQ1 (1<<1) // one if new frequency measurement available +#define BIT_NEW_FREQ2 (1<<2) +#define BIT_PLL_LOCKED0 (1<<1) // 1 if PLL has locked (DRS4 evaluation board only) +#define BIT_PLL_LOCKED1 (1<<2) // 1 if PLL DRS4 B has locked (DRS4 mezzanine board only) +#define BIT_PLL_LOCKED2 (1<<3) // 1 if PLL DRS4 C has locked (DRS4 mezzanine board only) +#define BIT_PLL_LOCKED3 (1<<4) // 1 if PLL DRS4 D has locked (DRS4 mezzanine board only) +#define BIT_SERIAL_BUSY (1<<5) // 1 if EEPROM operation in progress +#define BIT_LMK_LOCKED (1<<6) // 1 if PLL of LMK chip has locked (DRS4 mezzanine board only) +#define BIT_2048_MODE (1<<7) // 1 if 2048-bin mode has been soldered + +enum DRSBoardConstants { + kNumberOfChannelsMax = 10, + kNumberOfCalibChannelsV3 = 10, + kNumberOfCalibChannelsV4 = 8, + kNumberOfBins = 1024, + kNumberOfChipsMax = 4, + kFrequencyCacheSize = 10, + kBSplineOrder = 4, + kPreCaliculatedBSplines = 1000, + kPreCaliculatedBSplineGroups = 5, + kNumberOfADCBins = 4096, + kBSplineXMinOffset = 20, + kMaxNumberOfClockCycles = 100, +}; + +enum DRSErrorCodes { + kSuccess = 0, + kInvalidTriggerSignal = -1, + kWrongChannelOrChip = -2, + kInvalidTransport = -3, + kZeroSuppression = -4, + kWaveNotAvailable = -5 +}; + +/*---- callback class ----*/ + +class DRSCallback +{ +public: + virtual void Progress(int value) = 0; + virtual ~DRSCallback() {}; +}; + +/*------------------------*/ + +class DRSBoard; + +class ResponseCalibration { +protected: + + class CalibrationData { + public: + class CalibrationDataChannel { + public: + unsigned char fLimitGroup[kNumberOfBins]; //! + float fMin[kNumberOfBins]; //! + float fRange[kNumberOfBins]; //! + short fOffset[kNumberOfBins]; //! + short fGain[kNumberOfBins]; //! + unsigned short fOffsetADC[kNumberOfBins]; //! + short *fData[kNumberOfBins]; //! + unsigned char *fLookUp[kNumberOfBins]; //! + unsigned short fLookUpOffset[kNumberOfBins]; //! + unsigned char fNumberOfLookUpPoints[kNumberOfBins]; //! + float *fTempData; //! + + private: + CalibrationDataChannel(const CalibrationDataChannel &c); // not implemented + CalibrationDataChannel &operator=(const CalibrationDataChannel &rhs); // not implemented + + public: + CalibrationDataChannel(int numberOfGridPoints) + :fTempData(new float[numberOfGridPoints]) { + int i; + for (i = 0; i < kNumberOfBins; i++) { + fData[i] = new short[numberOfGridPoints]; + } + memset(fLimitGroup, 0, sizeof(fLimitGroup)); + memset(fMin, 0, sizeof(fMin)); + memset(fRange, 0, sizeof(fRange)); + memset(fOffset, 0, sizeof(fOffset)); + memset(fGain, 0, sizeof(fGain)); + memset(fOffsetADC, 0, sizeof(fOffsetADC)); + memset(fLookUp, 0, sizeof(fLookUp)); + memset(fLookUpOffset, 0, sizeof(fLookUpOffset)); + memset(fNumberOfLookUpPoints, 0, sizeof(fNumberOfLookUpPoints)); + } + ~CalibrationDataChannel() { + int i; + delete fTempData; + for (i = 0; i < kNumberOfBins; i++) { + delete fData[i]; + delete fLookUp[i]; + } + } + }; + + bool fRead; //! + CalibrationDataChannel *fChannel[10]; //! + unsigned char fNumberOfGridPoints; //! + int fHasOffsetCalibration; //! + float fStartTemperature; //! + float fEndTemperature; //! + int *fBSplineOffsetLookUp[kNumberOfADCBins]; //! + float **fBSplineLookUp[kNumberOfADCBins]; //! + float fMin; //! + float fMax; //! + unsigned char fNumberOfLimitGroups; //! + static float fIntRevers[2 * kBSplineOrder - 2]; + + private: + CalibrationData(const CalibrationData &c); // not implemented + CalibrationData &operator=(const CalibrationData &rhs); // not implemented + + public: + CalibrationData(int numberOfGridPoints); + ~CalibrationData(); + static int CalculateBSpline(int nGrid, float value, float *bsplines); + void PreCalculateBSpline(); + void DeletePreCalculatedBSpline(); + }; + + // General Fields + DRSBoard *fBoard; + + double fPrecision; + + // Fields for creating the Calibration + bool fInitialized; + bool fRecorded; + bool fFitted; + bool fOffset; + bool fCalibrationValid[2]; + + int fNumberOfPointsLowVolt; + int fNumberOfPoints; + int fNumberOfMode2Bins; + int fNumberOfSamples; + int fNumberOfGridPoints; + int fNumberOfXConstPoints; + int fNumberOfXConstGridPoints; + double fTriggerFrequency; + int fShowStatistics; + FILE *fCalibFile; + + int fCurrentLowVoltPoint; + int fCurrentPoint; + int fCurrentSample; + int fCurrentFitChannel; + int fCurrentFitBin; + + float *fResponseX[10][kNumberOfBins]; + float *fResponseY; + unsigned short **fWaveFormMode3[10]; + unsigned short **fWaveFormMode2[10]; + short **fWaveFormOffset[10]; + unsigned short **fWaveFormOffsetADC[10]; + unsigned short *fSamples; + int *fSampleUsed; + + float *fPntX[2]; + float *fPntY[2]; + float *fUValues[2]; + float *fRes[kNumberOfBins]; + float *fResX[kNumberOfBins]; + + double *fXXFit; + double *fYYFit; + double *fWWFit; + double *fYYFitRes; + double *fYYSave; + double *fXXSave; + double fGainMin; + double fGainMax; + + float **fStatisticsApprox; + float **fStatisticsApproxExt; + + // Fields for applying the Calibration + CalibrationData *fCalibrationData[kNumberOfChipsMax]; + +private: + ResponseCalibration(const ResponseCalibration &c); // not implemented + ResponseCalibration &operator=(const ResponseCalibration &rhs); // not implemented + +public: + ResponseCalibration(DRSBoard* board); + ~ResponseCalibration(); + + void SetCalibrationParameters(int numberOfPointsLowVolt, int numberOfPoints, int numberOfMode2Bins, + int numberOfSamples, int numberOfGridPoints, int numberOfXConstPoints, + int numberOfXConstGridPoints, double triggerFrequency, int showStatistics = 0); + void ResetCalibration(); + bool RecordCalibrationPoints(int chipNumber); + bool RecordCalibrationPointsV3(int chipNumber); + bool RecordCalibrationPointsV4(int chipNumber); + bool FitCalibrationPoints(int chipNumber); + bool FitCalibrationPointsV3(int chipNumber); + bool FitCalibrationPointsV4(int chipNumber); + bool OffsetCalibration(int chipNumber); + bool OffsetCalibrationV3(int chipNumber); + bool OffsetCalibrationV4(int chipNumber); + double GetTemperature(unsigned int chipIndex); + + bool WriteCalibration(unsigned int chipIndex); + bool WriteCalibrationV3(unsigned int chipIndex); + bool WriteCalibrationV4(unsigned int chipIndex); + bool ReadCalibration(unsigned int chipIndex); + bool ReadCalibrationV3(unsigned int chipIndex); + bool ReadCalibrationV4(unsigned int chipIndex); + bool Calibrate(unsigned int chipIndex, unsigned int channel, unsigned short *adcWaveform, short *uWaveform, + int triggerCell, float threshold, bool offsetCalib); + bool SubtractADCOffset(unsigned int chipIndex, unsigned int channel, unsigned short *adcWaveform, + unsigned short *adcCalibratedWaveform, unsigned short newBaseLevel); + bool IsRead(int chipIndex) const { return fCalibrationValid[chipIndex]; } + double GetPrecision() const { return fPrecision; }; + + double GetOffsetAt(int chip,int chn,int bin) const { return fCalibrationData[chip]->fChannel[chn]->fOffset[bin]; }; + double GetGainAt(int chip,int chn,int bin) const { return fCalibrationData[chip]->fChannel[chn]->fGain[bin]; }; + double GetMeasPointXAt(int ip) const { return fXXSave[ip]; }; + double GetMeasPointYAt(int ip) const { return fYYSave[ip]; }; + +protected: + void InitFields(int numberOfPointsLowVolt, int numberOfPoints, int numberOfMode2Bins, int numberOfSamples, + int numberOfGridPoints, int numberOfXConstPoints, int numberOfXConstGridPoints, + double triggerFrequency, int showStatistics); + void DeleteFields(); + void CalibrationTrigger(int mode, double voltage); + void CalibrationStart(double voltage); + + static float GetValue(float *coefficients, float u, int n); + static int Approx(float *p, float *uu, int np, int nu, float *coef); + static void LeastSquaresAccumulation(float **matrix, int nb, int *ip, int *ir, int mt, int jt); + static int LeastSquaresSolving(float **matrix, int nb, int ip, int ir, float *x, int n); + static void Housholder(int lpivot, int l1, int m, float **u, int iU1, int iU2, float *up, float **c, int iC1, + int iC2, int ice, int ncv); + + static int MakeDir(const char *path); + static void Average(int method,float *samples,int numberOfSamples,float &mean,float &error,float sigmaBoundary); +}; + + +class DRSBoard { +protected: + class TimeData { + public: + class FrequencyData { + public: + int fFrequency; + double fBin[kNumberOfBins]; + }; + + enum { + kMaxNumberOfFrequencies = 4000 + }; + int fChip; + int fNumberOfFrequencies; + FrequencyData *fFrequency[kMaxNumberOfFrequencies]; + + private: + TimeData(const TimeData &c); // not implemented + TimeData &operator=(const TimeData &rhs); // not implemented + + public: + TimeData() + :fChip(0) + ,fNumberOfFrequencies(0) { + } + ~TimeData() { + int i; + for (i = 0; i < fNumberOfFrequencies; i++) { + delete fFrequency[i]; + } + } + }; + +public: + // DAC channels (CMC Version 1 : DAC_COFSA,DAC_COFSB,DAC_DRA,DAC_DSA,DAC_TLEVEL,DAC_ACALIB,DAC_DSB,DAC_DRB) + unsigned int fDAC_COFSA; + unsigned int fDAC_COFSB; + unsigned int fDAC_DRA; + unsigned int fDAC_DSA; + unsigned int fDAC_TLEVEL; + unsigned int fDAC_ACALIB; + unsigned int fDAC_DSB; + unsigned int fDAC_DRB; + // DAC channels (CMC Version 2+3 : DAC_COFS,DAC_DSA,DAC_DSB,DAC_TLEVEL,DAC_ADCOFS,DAC_CLKOFS,DAC_ACALIB) + unsigned int fDAC_COFS; + unsigned int fDAC_ADCOFS; + unsigned int fDAC_CLKOFS; + // DAC channels (CMC Version 4 : DAC_ROFS_1,DAC_DSA,DAC_DSB,DAC_ROFS_2,DAC_ADCOFS,DAC_ACALIB,DAC_INOFS,DAC_BIAS) + unsigned int fDAC_ROFS_1; + unsigned int fDAC_ROFS_2; + unsigned int fDAC_INOFS; + unsigned int fDAC_BIAS; + // DAC channels (USB EVAL1 (fBoardType 5) : DAC_ROFS_1,DAC_CMOFS,DAC_CALN,DAC_CALP,DAC_BIAS,DAC_TLEVEL,DAC_ONOFS) + // DAC channels (USB EVAL3 (fBoardType 7) : DAC_ROFS_1,DAC_CMOFS,DAC_CALN,DAC_CALP,DAC_BIAS,DAC_TLEVEL,DAC_ONOFS) + unsigned int fDAC_CMOFS; + unsigned int fDAC_CALN; + unsigned int fDAC_CALP; + unsigned int fDAC_ONOFS; + // DAC channels (DRS4 MEZZ1 (fBoardType 6) : DAC_ONOFS,DAC_CMOFSP,DAC_CALN,DAC_CALP,DAC_BIAS,DAC_CMOFSN,DAC_ROFS_1) + unsigned int fDAC_CMOFSP; + unsigned int fDAC_CMOFSN; + // DAC channels (DRS4 EVAL4 (fBoardType 8) : DAC_ONOFS,DAC_TLEVEL4,DAC_CALN,DAC_CALP,DAC_BIAS,DAC_TLEVEL1,DAC_TLEVEL2,DAC_TLEVEL3) + unsigned int fDAC_TLEVEL1; + unsigned int fDAC_TLEVEL2; + unsigned int fDAC_TLEVEL3; + unsigned int fDAC_TLEVEL4; + +protected: + // Fields for DRS + int fDRSType; + int fBoardType; + int fNumberOfChips; + int fNumberOfChannels; + int fRequiredFirmwareVersion; + int fFirmwareVersion; + int fBoardSerialNumber; + int fHasMultiBuffer; + unsigned int fTransport; + unsigned int fCtrlBits; + int fNumberOfReadoutChannels; + int fReadoutChannelConfig; + int fADCClkPhase; + bool fADCClkInvert; + double fExternalClockFrequency; +#ifdef HAVE_USB + MUSB_INTERFACE *fUsbInterface; +#endif +#ifdef HAVE_VME + MVME_INTERFACE *fVmeInterface; + mvme_addr_t fBaseAddress; +#endif + int fSlotNumber; + double fNominalFrequency; + double fTrueFrequency; + double fTCALFrequency; + double fRefClock; + int fMultiBuffer; + int fDominoMode; + int fDominoActive; + int fADCActive; + int fChannelConfig; + int fChannelCascading; + int fChannelDepth; + int fWSRLoop; + int fReadoutMode; + unsigned short fReadPointer; + int fNMultiBuffer; + int fTriggerEnable1; + int fTriggerEnable2; + int fTriggerSource; + int fTriggerDelay; + double fTriggerDelayNs; + int fSyncDelay; + int fDelayedStart; + int fTranspMode; + int fDecimation; + unsigned short fStopCell[4]; + unsigned char fStopWSR[4]; + unsigned short fTriggerBus; + double fROFS; + double fRange; + double fCommonMode; + int fAcalMode; + int fbkAcalMode; + double fAcalVolt; + double fbkAcalVolt; + int fTcalFreq; + int fbkTcalFreq; + int fTcalLevel; + int fbkTcalLevel; + int fTcalPhase; + int fTcalSource; + int fRefclk; + + unsigned char fWaveforms[kNumberOfChipsMax * kNumberOfChannelsMax * 2 * kNumberOfBins]; + + // Fields for Calibration + int fMaxChips; + char fCalibDirectory[1000]; + + // Fields for Response Calibration old method + ResponseCalibration *fResponseCalibration; + + // Fields for Calibration new method + bool fVoltageCalibrationValid; + double fCellCalibratedRange; + double fCellCalibratedTemperature; + unsigned short fCellOffset[kNumberOfChipsMax * kNumberOfChannelsMax][kNumberOfBins]; + unsigned short fCellOffset2[kNumberOfChipsMax * kNumberOfChannelsMax][kNumberOfBins]; + double fCellGain[kNumberOfChipsMax * kNumberOfChannelsMax][kNumberOfBins]; + + double fTimingCalibratedFrequency; + double fCellDT[kNumberOfChipsMax][kNumberOfChannelsMax][kNumberOfBins]; + + // Fields for Time Calibration + TimeData **fTimeData; + int fNumberOfTimeData; + + // General debugging flag + int fDebug; + + // Fields for wave transfer + bool fWaveTransferred[kNumberOfChipsMax * kNumberOfChannelsMax]; + + // Waveform Rotation + int fTriggerStartBin; // Start Bin of the trigger + +private: + DRSBoard(const DRSBoard &c); // not implemented + DRSBoard &operator=(const DRSBoard &rhs); // not implemented + +public: + // Public Methods +#ifdef HAVE_USB + DRSBoard(MUSB_INTERFACE * musb_interface, int usb_slot); +#endif +#ifdef HAVE_VME + DRSBoard(MVME_INTERFACE * mvme_interface, mvme_addr_t base_address, int slot_number); + + MVME_INTERFACE *GetVMEInterface() const { return fVmeInterface; }; +#endif + ~DRSBoard(); + + int SetBoardSerialNumber(unsigned short serialNumber); + int GetBoardSerialNumber() const { return fBoardSerialNumber; } + int HasMultiBuffer() const { return fHasMultiBuffer; } + int GetFirmwareVersion() const { return fFirmwareVersion; } + int GetRequiredFirmwareVersion() const { return fRequiredFirmwareVersion; } + int GetDRSType() const { return fDRSType; } + int GetBoardType() const { return fBoardType; } + int GetNumberOfChips() const { return fNumberOfChips; } + // channel : Flash ADC index + // readout channel : VME readout index + // input : Input on board + int GetNumberOfChannels() const { return fNumberOfChannels; } + int GetChannelDepth() const { return fChannelDepth; } + int GetChannelCascading() const { return fChannelCascading; } + inline int GetNumberOfReadoutChannels() const; + inline int GetWaveformBufferSize() const; + inline int GetNumberOfInputs() const; + inline int GetNumberOfCalibInputs() const; + inline int GetClockChannel() const; + inline int GetTriggerChannel() const; + inline int GetClockInput() const { return Channel2Input(GetClockChannel()); } + inline int GetTriggerInput() const { return fDRSType < 4 ? Channel2Input(GetTriggerChannel()) : -1; } + inline int Channel2Input(int channel) const; + inline int Channel2ReadoutChannel(int channel) const; + inline int Input2Channel(int input, int ind = 0) const; + inline int Input2ReadoutChannel(int input, int ind = 0) const; + inline int ReadoutChannel2Channel(int readout) const; + inline int ReadoutChannel2Input(int readout) const; + + inline bool IsCalibChannel(int ch) const; + inline bool IsCalibInput(int input) const; + int GetSlotNumber() const { return fSlotNumber; } + int InitFPGA(void); + int Write(int type, unsigned int addr, void *data, int size); + int Read(int type, void *data, unsigned int addr, int size); + int GetTransport() const { return fTransport; } + void RegisterTest(void); + int RAMTest(int flag); + int ChipTest(); + unsigned int GetCtrlReg(void); + unsigned short GetConfigReg(void); + unsigned int GetStatusReg(void); + void SetLED(int state); + int SetChannelConfig(int firstChannel, int lastChannel, int nConfigChannels); + void SetADCClkPhase(int phase, bool invert); + void SetWarmup(unsigned int ticks); + void SetCooldown(unsigned int ticks); + int GetReadoutChannelConfig() { return fReadoutChannelConfig; } + void SetNumberOfChannels(int nChannels); + int EnableTrigger(int flag1, int flag2); + int GetTriggerEnable(int i) { return i?fTriggerEnable2:fTriggerEnable1; } + int SetDelayedTrigger(int flag); + int SetTriggerDelayPercent(int delay); + int SetTriggerDelayNs(int delay); + int GetTriggerDelay() { return fTriggerDelay; } + double GetTriggerDelayNs() { return fTriggerDelayNs; } + int SetSyncDelay(int ticks); + int SetTriggerLevel(double value); + int SetIndividualTriggerLevel(int channel, double voltage); + int SetTriggerPolarity(bool negative); + int SetTriggerSource(int source); + int GetTriggerSource() { return fTriggerSource; } + int SetDelayedStart(int flag); + int SetTranspMode(int flag); + int SetStandbyMode(int flag); + int SetDecimation(int flag); + int GetDecimation() { return fDecimation; } + int IsBusy(void); + int IsEventAvailable(void); + int IsPLLLocked(void); + int IsLMKLocked(void); + int IsNewFreq(unsigned char chipIndex); + int SetDAC(unsigned char channel, double value); + int ReadDAC(unsigned char channel, double *value); + int GetRegulationDAC(double *value); + int StartDomino(); + int StartClearCycle(); + int FinishClearCycle(); + int Reinit(); + int Init(); + void SetDebug(int debug) { fDebug = debug; } + int Debug() { return fDebug; } + int SetDominoMode(unsigned char mode); + int SetDominoActive(unsigned char mode); + int SetReadoutMode(unsigned char mode); + int SoftTrigger(void); + int ReadFrequency(unsigned char chipIndex, double *f); + int SetFrequency(double freq, bool wait); + double VoltToFreq(double volt); + double FreqToVolt(double freq); + double GetNominalFrequency() const { return fNominalFrequency; } + double GetTrueFrequency(); + int RegulateFrequency(double freq); + int SetExternalClockFrequency(double frequencyMHz); + double GetExternalClockFrequency(); + int SetMultiBuffer(int flag); + int IsMultiBuffer() { return fMultiBuffer; } + void ResetMultiBuffer(void); + int GetMultiBufferRP(void); + int SetMultiBufferRP(unsigned short rp); + int GetMultiBufferWP(void); + void IncrementMultiBufferRP(void); + void SetVoltageOffset(double offset1, double offset2); + int SetInputRange(double center); + double GetInputRange(void) { return fRange; } + double GetCalibratedInputRange(void) { return fCellCalibratedRange; } + double GetCalibratedTemperature(void) { return fCellCalibratedTemperature; } + double GetCalibratedFrequency(void) { return fTimingCalibratedFrequency; } + int TransferWaves(int numberOfChannels = kNumberOfChipsMax * kNumberOfChannelsMax); + int TransferWaves(unsigned char *p, int numberOfChannels = kNumberOfChipsMax * kNumberOfChannelsMax); + int TransferWaves(int firstChannel, int lastChannel); + int TransferWaves(unsigned char *p, int firstChannel, int lastChannel); + int DecodeWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, + unsigned short *waveform); + int DecodeWave(unsigned int chipIndex, unsigned char channel, unsigned short *waveform); + int GetWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, short *waveform, + bool responseCalib = false, int triggerCell = -1, int wsr = -1, bool adjustToClock = false, + float threshold = 0, bool offsetCalib = true); + int GetWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, float *waveform, + bool responseCalib = false, int triggerCell = -1, int wsr = -1, bool adjustToClock = false, + float threshold = 0, bool offsetCalib = true); + int GetWave(unsigned int chipIndex, unsigned char channel, short *waveform, bool responseCalib = false, + int triggerCell = -1, int wsr = -1, bool adjustToClock = false, float threshold = 0, bool offsetCalib = true); + int GetWave(unsigned int chipIndex, unsigned char channel, float *waveform, bool responseCalib, + int triggerCell = -1, int wsr = -1, bool adjustToClock = false, float threshold = 0, bool offsetCalib = true); + int GetWave(unsigned int chipIndex, unsigned char channel, float *waveform); + int GetRawWave(unsigned int chipIndex, unsigned char channel, unsigned short *waveform, bool adjustToClock = false); + int GetRawWave(unsigned char *waveforms,unsigned int chipIndex, unsigned char channel, + unsigned short *waveform, bool adjustToClock = false); + bool IsTimingCalibrationValid(void); + bool IsVoltageCalibrationValid(void) { return fVoltageCalibrationValid; } + int GetTime(unsigned int chipIndex, int channelIndex, double freq, int tc, float *time, bool tcalibrated=true, bool rotated=true); + int GetTime(unsigned int chipIndex, int channelIndex, int tc, float *time, bool tcalibrated=true, bool rotated=true); + int GetTimeCalibration(unsigned int chipIndex, int channelIndex, int mode, float *time, bool force=false); + int GetTriggerCell(unsigned int chipIndex); + int GetStopCell(unsigned int chipIndex); + unsigned char GetStopWSR(unsigned int chipIndex); + int GetTriggerCell(unsigned char *waveforms,unsigned int chipIndex); + void TestDAC(int channel); + void MeasureSpeed(); + void InteractSpeed(); + void MonitorFrequency(); + int TestShift(int n); + int EnableAcal(int mode, double voltage); + int GetAcalMode() { return fAcalMode; } + double GetAcalVolt() { return fAcalVolt; } + int EnableTcal(int freq, int level=0, int phase=0); + int SelectClockSource(int source); + int SetRefclk(int source); + int GetRefclk() { return fRefclk; } + int GetTcalFreq() { return fTcalFreq; } + int GetTcalLevel() { return fTcalLevel; } + int GetTcalPhase() { return fTcalPhase; } + int GetTcalSource() { return fTcalSource; } + int SetCalibVoltage(double value); + int SetCalibTiming(int t1, int t2); + double GetTemperature(); + int Is2048ModeCapable(); + int GetTriggerBus(); + unsigned int GetScaler(int channel); + int ReadEEPROM(unsigned short page, void *buffer, int size); + int WriteEEPROM(unsigned short page, void *buffer, int size); + bool HasCorrectFirmware(); + int ConfigureLMK(double sampFreq, bool freqChange, int calFreq, int calPhase); + + bool InitTimeCalibration(unsigned int chipIndex); + void SetCalibrationDirectory(const char *calibrationDirectoryPath); + void GetCalibrationDirectory(char *calibrationDirectoryPath); + + ResponseCalibration *GetResponseCalibration() const { return fResponseCalibration; } + + double GetPrecision() const { return fResponseCalibration ? fResponseCalibration->GetPrecision() : 0.1; } + int CalibrateWaveform(unsigned int chipIndex, unsigned char channel, unsigned short *adcWaveform, + short *waveform, bool responseCalib, int triggerCell, bool adjustToClock, + float threshold, bool offsetCalib); + + static void LinearRegression(double *x, double *y, int n, double *a, double *b); + + void ReadSingleWaveform(int nChips, int nChan, + unsigned short wfu[kNumberOfChipsMax][kNumberOfChannelsMax][kNumberOfBins], bool rotated); + int AverageWaveforms(DRSCallback *pcb, int chipIndex, int nChan, int prog1, int prog2, unsigned short *awf, int n, bool rotated); + int RobustAverageWaveforms(DRSCallback *pcb, int chipIndex, int nChan, int prog1, int prog2, unsigned short *awf, int n, bool rotated); + int CalibrateVolt(DRSCallback *pcb); + int AnalyzePeriod(Averager *ave, int iIter, int nIter, int channel, float wf[kNumberOfBins], int tCell, double cellDV[kNumberOfBins], double cellDT[kNumberOfBins]); + int AnalyzeSlope(Averager *ave, int iIter, int nIter, int channel, float wf[kNumberOfBins], int tCell, double cellDV[kNumberOfBins], double cellDT[kNumberOfBins]); + int CalibrateTiming(DRSCallback *pcb); + static void RemoveSymmetricSpikes(short **wf, int nwf, + short diffThreshold, int spikeWidth, + short maxPeakToPeak, short spikeVoltage, + int nTimeRegionThreshold); +protected: + // Protected Methods + void ConstructBoard(); + void ReadSerialNumber(); + void ReadCalibration(void); + + TimeData *GetTimeCalibration(unsigned int chipIndex, bool reinit = false); + + int GetStretchedTime(float *time, float *measurement, int numberOfMeasurements, float period); +}; + +int DRSBoard::GetNumberOfReadoutChannels() const +{ + return (fDRSType == 4 && fReadoutChannelConfig == 4) ? 5 : fNumberOfChannels; +} + +int DRSBoard::GetWaveformBufferSize() const +{ + int nbin=0; + if (fDRSType < 4) { + nbin = fNumberOfChips * fNumberOfChannels * kNumberOfBins; + } else { + if (fBoardType == 6) { + if (fDecimation) { + nbin = fNumberOfChips * (4 * kNumberOfBins + kNumberOfBins / 2); + } else { + nbin = fNumberOfChips * 5 * kNumberOfBins; + } + } else if (fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + nbin = fNumberOfChips * fNumberOfChannels * kNumberOfBins; + } + return nbin * static_cast(sizeof(short int)); +} + +int DRSBoard::GetNumberOfInputs() const +{ + // return number of input channels excluding clock and trigger channels. + if (fDRSType < 4) { + return fNumberOfChannels - 2; + } else { + return fNumberOfChannels / 2; + } +} +int DRSBoard::GetNumberOfCalibInputs() const +{ + return (fDRSType < 4) ? 2 : 1; +} +int DRSBoard::GetClockChannel() const +{ + return fDRSType < 4 ? 9 : 8; +} +int DRSBoard::GetTriggerChannel() const +{ + return fDRSType < 4 ? 8 : -1; +} + +int DRSBoard::Channel2Input(int channel) const +{ + return (fDRSType < 4) ? channel : channel / 2; +} +int DRSBoard::Channel2ReadoutChannel(int channel) const +{ + if (fDRSType < 4) { + return channel; + } else { + if (fReadoutChannelConfig == 4) { + return channel / 2; + } else { + return channel; + } + } +} +int DRSBoard::Input2Channel(int input, int ind) const +{ + if (fChannelCascading == 1) { + return (fDRSType < 4) ? input : (input * 2 + ind); + } else { + if (input == 4) { // clock + return 8; + } else { + return input; + } + } +} +int DRSBoard::Input2ReadoutChannel(int input, int ind) const +{ + if (fDRSType < 4) { + return input; + } else { + if (fReadoutChannelConfig == 4) { + return input; + } else { + return (input * 2 + ind); + } + } +} +int DRSBoard::ReadoutChannel2Channel(int readout) const +{ + if (fDRSType < 4) { + return readout; + } else { + if (fReadoutChannelConfig == 4) { + return readout * 2; + } else { + return readout; + } + } +} +int DRSBoard::ReadoutChannel2Input(int readout) const +{ + if (fDRSType < 4) { + return readout; + } else { + if (fReadoutChannelConfig == 4) { + return readout; + } else { + return readout / 2; + } + } +} +bool DRSBoard::IsCalibChannel(int ch) const +{ + // return if it is clock or trigger channel + if (fDRSType < 4) + return ch == GetClockChannel() || ch == GetTriggerChannel(); + else + return ch == GetClockChannel(); +} +bool DRSBoard::IsCalibInput(int input) const +{ + // return if it is clock or trigger channel + int ch = Input2Channel(input); + if (fDRSType < 4) + return ch == GetClockChannel() || ch == GetTriggerChannel(); + else + return ch == GetClockChannel(); +} + +class DRS { +protected: + // constants + enum { + kMaxNumberOfBoards = 40 + }; + +protected: + DRSBoard *fBoard[kMaxNumberOfBoards]; + int fNumberOfBoards; + char fError[256]; +#ifdef HAVE_VME + MVME_INTERFACE *fVmeInterface; +#endif + +private: + DRS(const DRS &c); // not implemented + DRS &operator=(const DRS &rhs); // not implemented + +public: + // Public Methods + DRS(); + ~DRS(); + + DRSBoard *GetBoard(int i) { return fBoard[i]; } + void SetBoard(int i, DRSBoard *b); + DRSBoard **GetBoards() { return fBoard; } + int GetNumberOfBoards() const { return fNumberOfBoards; } + bool GetError(char *str, int size); + void SortBoards(); + +#ifdef HAVE_VME + MVME_INTERFACE *GetVMEInterface() const { return fVmeInterface; }; +#endif +}; + +#endif // DRS_H diff --git a/software/include/averager.h b/software/include/averager.h new file mode 100644 index 0000000..71b9558 --- /dev/null +++ b/software/include/averager.h @@ -0,0 +1,28 @@ +/********************************************************************\ + + Name: averager.h + Created by: Stefan Ritt + + Contents: Robust averager + + $Id: averager.h 21220 2013-12-20 13:47:43Z ritt $ + +\********************************************************************/ + +class Averager { + int fNx, fNy, fNz, fDim; + float *fArray; + unsigned short *fN; + +public: + Averager(int nx, int ny, int nz, int dim); + ~Averager(); + + void Add(int x, int y, int z, float value); + void Reset(); + double Average(int x, int y, int z); + double Median(int x, int y, int z); + double RobustAverage(double range, int x, int y, int z); + int SaveNormalizedDistribution(const char *filename, int x, float range); + +}; diff --git a/software/include/musbstd.h b/software/include/musbstd.h new file mode 100644 index 0000000..45a6981 --- /dev/null +++ b/software/include/musbstd.h @@ -0,0 +1,95 @@ +/********************************************************************\ + + Name: musbstd.h + Created by: Konstantin Olchanski, Stefan Ritt + + Contents: Midas USB access + + $Id$ + +\********************************************************************/ + +#ifndef MUSBSTD_H +#define MUSBSTD_H + +#if defined(HAVE_LIBUSB) + +#include + +typedef struct { + usb_dev_handle *dev; + int usb_configuration; + int usb_interface; + int usb_type; +} MUSB_INTERFACE; + +#elif defined(HAVE_LIBUSB10) + +#include + +typedef struct { + libusb_device_handle *dev; + int usb_configuration; + int usb_interface; + int usb_type; +} MUSB_INTERFACE; + +#elif defined(_MSC_VER) + +#include + +typedef struct { + HANDLE rhandle; + HANDLE whandle; + int usb_type; +} MUSB_INTERFACE; + +#elif defined(OS_DARWIN) + +typedef struct { + void *device; + void *interface; + int usb_configuration; + int usb_interface; + int usb_type; +} MUSB_INTERFACE; + +#else +#error Do not know how to access USB devices +#endif + +/*---- status codes ------------------------------------------------*/ + +#define MUSB_SUCCESS 1 +#define MUSB_NOT_FOUND 2 +#define MUSB_INVALID_PARAM 3 +#define MUSB_NO_MEM 4 +#define MUSB_ACCESS_ERROR 5 + +/* make functions callable from a C++ program */ +#ifdef __cplusplus +extern "C" { +#endif + +/* make functions under WinNT dll exportable */ +#ifndef EXPRT +#if defined(_MSC_VER) && defined(_USRDLL) +#define EXPRT __declspec(dllexport) +#else +#define EXPRT +#endif +#endif + +int EXPRT musb_open(MUSB_INTERFACE **musb_interface, int vendor, int product, int instance, int configuration, int usbinterface); +int EXPRT musb_close(MUSB_INTERFACE *musb_interface); +int EXPRT musb_write(MUSB_INTERFACE *musb_interface,int endpoint,const void *buf,int count,int timeout_ms); +int EXPRT musb_read(MUSB_INTERFACE *musb_interface,int endpoint,void *buf,int count,int timeout_ms); +int EXPRT musb_reset(MUSB_INTERFACE *musb_interface); +int EXPRT musb_set_altinterface(MUSB_INTERFACE *musb_interface, int index); +int EXPRT musb_get_device(MUSB_INTERFACE *musb_interface); + +#ifdef __cplusplus +} +#endif + +#endif // MUSBSTD_H diff --git a/software/include/mxml.h b/software/include/mxml.h new file mode 100644 index 0000000..6fc72d5 --- /dev/null +++ b/software/include/mxml.h @@ -0,0 +1,156 @@ +/********************************************************************\ + + Name: mxml.h + Created by: Stefan Ritt + Copyright 2000 + Stefan Ritt + + Contents: Header file for mxml.c + + This file is part of MIDAS XML Library. + + MIDAS XML Library is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + MIDAS XML Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with MIDAS XML Library. If not, see . + +\********************************************************************/ + +/*------------------------------------------------------------------*/ + +#ifndef _MXML_H_ +#define _MXML_H_ + +#define MXML_NAME_LENGTH 64 + +#define ELEMENT_NODE 1 +#define TEXT_NODE 2 +#define PROCESSING_INSTRUCTION_NODE 3 +#define COMMENT_NODE 4 +#define DOCUMENT_NODE 5 + +#define INTERNAL_ENTITY 0 +#define EXTERNAL_ENTITY 1 +#define MXML_MAX_ENTITY 500 + +#define MXML_MAX_CONDITION 10 + +#ifdef _MSC_VER +#define DIR_SEPARATOR '\\' +#else +#define DIR_SEPARATOR '/' +#endif + +typedef struct { + int fh; + char *buffer; + int buffer_size; + int buffer_len; + int level; + int element_is_open; + int data_was_written; + char **stack; + int translate; +} MXML_WRITER; + +typedef struct mxml_struct *PMXML_NODE; + +typedef struct mxml_struct { + char name[MXML_NAME_LENGTH]; // name of element <[name]>[value] + int node_type; // type of node XXX_NODE + char *value; // value of element + int n_attributes; // list of attributes + char *attribute_name; + char **attribute_value; + int line_number_start; // first line number in XML file, starting from 1 + int line_number_end; // last line number in XML file, starting from 1 + PMXML_NODE parent; // pointer to parent element + int n_children; // list of children + PMXML_NODE child; +} MXML_NODE; + +/*------------------------------------------------------------------*/ + +/* make functions callable from a C++ program */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef EXPRT +#if defined(EXPORT_DLL) +#define EXPRT __declspec(dllexport) +#else +#define EXPRT +#endif +#endif + +void mxml_suppress_date(int suppress); +MXML_WRITER *mxml_open_file(const char *file_name); +MXML_WRITER *mxml_open_buffer(void); +int mxml_set_translate(MXML_WRITER *writer, int flag); +int mxml_start_element(MXML_WRITER *writer, const char *name); +int mxml_start_element_noindent(MXML_WRITER *writer, const char *name); +int mxml_end_element(MXML_WRITER *writer); +int mxml_write_comment(MXML_WRITER *writer, const char *string); +int mxml_write_element(MXML_WRITER *writer, const char *name, const char *value); +int mxml_write_attribute(MXML_WRITER *writer, const char *name, const char *value); +int mxml_write_value(MXML_WRITER *writer, const char *value); +int mxml_write_empty_line(MXML_WRITER *writer); +char *mxml_close_buffer(MXML_WRITER *writer); +int mxml_close_file(MXML_WRITER *writer); + +int mxml_get_number_of_children(PMXML_NODE pnode); +PMXML_NODE mxml_get_parent(PMXML_NODE pnode); +PMXML_NODE mxml_subnode(PMXML_NODE pnode, int idx); +PMXML_NODE mxml_find_node(PMXML_NODE tree, const char *xml_path); +int mxml_find_nodes(PMXML_NODE tree, const char *xml_path, PMXML_NODE **nodelist); +char *mxml_get_name(PMXML_NODE pnode); +char *mxml_get_value(PMXML_NODE pnode); +int mxml_get_line_number_start(PMXML_NODE pnode); +int mxml_get_line_number_end(PMXML_NODE pnode); +PMXML_NODE mxml_get_node_at_line(PMXML_NODE tree, int linenumber); +char *mxml_get_attribute(PMXML_NODE pnode, const char *name); + +int mxml_add_attribute(PMXML_NODE pnode, const char *attrib_name, const char *attrib_value); +PMXML_NODE mxml_add_special_node(PMXML_NODE parent, int node_type, const char *node_name, const char *value); +PMXML_NODE mxml_add_special_node_at(PMXML_NODE parent, int node_type, const char *node_name, const char *value, int idx); +PMXML_NODE mxml_add_node(PMXML_NODE parent, const char *node_name, const char *value); +PMXML_NODE mxml_add_node_at(PMXML_NODE parent, const char *node_name, const char *value, int idx); + +PMXML_NODE mxml_clone_tree(PMXML_NODE tree); +int mxml_add_tree(PMXML_NODE parent, PMXML_NODE tree); +int mxml_add_tree_at(PMXML_NODE parent, PMXML_NODE tree, int idx); + +int mxml_replace_node_name(PMXML_NODE pnode, const char *new_name); +int mxml_replace_node_value(PMXML_NODE pnode, const char *value); +int mxml_replace_subvalue(PMXML_NODE pnode, const char *name, const char *value); +int mxml_replace_attribute_name(PMXML_NODE pnode, const char *old_name, const char *new_name); +int mxml_replace_attribute_value(PMXML_NODE pnode, const char *attrib_name, const char *attrib_value); + +int mxml_delete_node(PMXML_NODE pnode); +int mxml_delete_attribute(PMXML_NODE, const char *attrib_name); + +PMXML_NODE mxml_create_root_node(void); +PMXML_NODE mxml_parse_file(const char *file_name, char *error, int error_size, int *error_line); +PMXML_NODE mxml_parse_buffer(const char *buffer, char *error, int error_size, int *error_line); +int mxml_parse_entity(char **buf, const char* file_name, char *error, int error_size, int *error_line); +int mxml_write_tree(const char *file_name, PMXML_NODE tree); +void mxml_debug_tree(PMXML_NODE tree, int level); +void mxml_free_tree(PMXML_NODE tree); + +void mxml_dirname(char* path); +void mxml_basename(char *path); + +#ifdef __cplusplus +} +#endif + +#endif /* _MXML_H_ */ +/*------------------------------------------------------------------*/ diff --git a/software/include/strlcpy.h b/software/include/strlcpy.h new file mode 100644 index 0000000..589a644 --- /dev/null +++ b/software/include/strlcpy.h @@ -0,0 +1,55 @@ +/********************************************************************\ + + Name: strlcpy.h + Created by: Stefan Ritt + Copyright 2000 + Stefan Ritt + + Contents: Header file for strlcpy.c + + This file is part of MIDAS XML Library. + + MIDAS XML Library is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + MIDAS XML Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with MIDAS XML Library. If not, see . + +\********************************************************************/ + +#ifndef _STRLCPY_H_ +#define _STRLCPY_H_ + +// some version of gcc have a built-in strlcpy +#ifdef strlcpy +#define STRLCPY_DEFINED +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef EXPRT +#if defined(EXPORT_DLL) +#define EXPRT __declspec(dllexport) +#else +#define EXPRT +#endif +#endif + +#ifndef STRLCPY_DEFINED +size_t EXPRT strlcpy(char *dst, const char *src, size_t size); +size_t EXPRT strlcat(char *dst, const char *src, size_t size); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /*_STRLCPY_H_ */ diff --git a/software/libusb-1.0/amd64/WdfCoInstaller01009.dll b/software/libusb-1.0/amd64/WdfCoInstaller01009.dll new file mode 100644 index 0000000..1731b96 Binary files /dev/null and b/software/libusb-1.0/amd64/WdfCoInstaller01009.dll differ diff --git a/software/libusb-1.0/amd64/winusbcoinstaller2.dll b/software/libusb-1.0/amd64/winusbcoinstaller2.dll new file mode 100644 index 0000000..30e5502 Binary files /dev/null and b/software/libusb-1.0/amd64/winusbcoinstaller2.dll differ diff --git a/software/libusb-1.0/drs4_eval5.inf b/software/libusb-1.0/drs4_eval5.inf new file mode 100644 index 0000000..2c36081 --- /dev/null +++ b/software/libusb-1.0/drs4_eval5.inf @@ -0,0 +1,145 @@ +; drs4_eval5.inf +; Jan 31st, 2014 S. Ritt, PSI +; + +; ===================== Strings ======================= + +[Strings] + +; ===================================================== +; ========= START USER CONFIGURABLE SECTION =========== +; ===================================================== + +DeviceName = "DRS4 Evaluation Board" +VendorID = "VID_04B4" +ProductID = "PID_1175" +DeviceGUID = "{9EB890AE-898F-4980-968D-C39EF0BBC3E4}" +DeviceClassGUID = "{78a1c341-4539-11d3-b88d-00c04fad5171}" +Date = "01/31/2014" + +; ===================================================== +; ========== END USER CONFIGURABLE SECTION ============ +; ===================================================== + +ProviderName = "libusb 1.0" +WinUSB_SvcDesc = "WinUSB Driver Service" +DiskName = "libusb (WinUSB) Device Install Disk" +ClassName = "libusb (WinUSB) devices" + +; ====================== Version ====================== + +[Version] +DriverVer = %Date% +Signature = "$Windows NT$" +Class = %ClassName% +ClassGuid = %DeviceClassGUID% +Provider = %ProviderName% +CatalogFile = libusb_device.cat + +; =================== Class section =================== + +; Since the device is not a standard USB device, we define a new class for it. +[ClassInstall32] +Addreg = WinUSBDeviceClassReg + +[WinUSBDeviceClassReg] +HKR,,,0,%ClassName% +; -20 is for the USB icon +HKR,,Icon,,-20 + +; =========== Manufacturer/Models sections ============ + +[Manufacturer] +%ProviderName% = libusbDevice_WinUSB,NTx86,NTamd64 + +[libusbDevice_WinUSB.NTx86] +%DeviceName% = USB_Install, USB\%VendorID%&%ProductID% + +[libusbDevice_WinUSB.NTamd64] +%DeviceName% = USB_Install, USB\%VendorID%&%ProductID% + +; ==================== Installation =================== + +; The Include and Needs directives in the USB_Install section are required for +; installing WinUSB on Windows Vista systems. Windows XP systems ignore these +; directives. These directives should not be modified. +[USB_Install] +Include=winusb.inf +Needs=WINUSB.NT + +; The Include directive in the USB_Install.Services section includes the system- +; supplied INF for WinUSB. This INF is installed by the WinUSB co-installer if +; it is not already on the target system. The AddService directive specifies +; WinUsb.sys as the device’s function driver. These directives should not be +; modified. +[USB_Install.Services] +Include=winusb.inf +AddService=WinUSB,0x00000002,WinUSB_ServiceInstall + +; The WinUSB_ServiceInstall section contains the data for installing WinUsb.sys +; as a service. This section should not be modified. +[WinUSB_ServiceInstall] +DisplayName = %WinUSB_SvcDesc% +ServiceType = 1 +StartType = 3 +ErrorControl = 1 +ServiceBinary = %12%\WinUSB.sys + +; The KmdfService directive installs WinUsb.sys as a kernel-mode service. The +; referenced WinUSB_Install section specifies the KMDF library version. +; Usually, the version can be derived from the WdfCoInstallerxxyyy.dll with +; xx = major, yyy = minor +[USB_Install.Wdf] +KmdfService=WINUSB, WinUsb_Install + +[WinUSB_Install] +KmdfLibraryVersion=1.9 + +; USB_Install.HW is the key section in the INF. It specifies the device +; interface globally unique identifier (GUID) for your device. The AddReg +; directive puts the interface GUID in a standard registry value. When +; WinUsb.sys is loaded as the device’s function driver, it reads the registry +; value and uses the specified GUID to represent the device interface. You +; should replace the GUID in this example with one that you create specifically +; for your device. If the protocols for the device change, you should create a +; new device interface GUID. +[USB_Install.HW] +AddReg=Dev_AddReg + +[Dev_AddReg] +HKR,,DeviceInterfaceGUIDs,0x10000,%DeviceGUID% + +; The USB_Install.CoInstallers section, including the referenced AddReg and +; CopyFiles sections, contains data and instructions to install the WinUSB and +; KMDF co installers and associate them with the device. Most USB devices can +; use these sections and directives without modification. +[USB_Install.CoInstallers] +AddReg=CoInstallers_AddReg +CopyFiles=CoInstallers_CopyFiles + +[CoInstallers_AddReg] +HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll" + +[CoInstallers_CopyFiles] +WinUSBCoInstaller2.dll +WdfCoInstaller01009.dll + +[DestinationDirs] +CoInstallers_CopyFiles=11 + +; =============== Source Media Section ================ + +; The x86 and x64 versions of Windows have separate co installers. This example +; stores them on the installation disk in folders that are named x86 and amd64 +[SourceDisksNames] +1 = %DiskName%,,,\x86 +2 = %DiskName%,,,\amd64 + +[SourceDisksFiles.x86] +WinUSBCoInstaller2.dll=1 +WdfCoInstaller01009.dll=1 + +[SourceDisksFiles.amd64] +WinUSBCoInstaller2.dll=2 +WdfCoInstaller01009.dll=2 + diff --git a/software/libusb-1.0/libusb-1.0.lib b/software/libusb-1.0/libusb-1.0.lib new file mode 100644 index 0000000..53faa8a Binary files /dev/null and b/software/libusb-1.0/libusb-1.0.lib differ diff --git a/software/libusb-1.0/libusb.h b/software/libusb-1.0/libusb.h new file mode 100644 index 0000000..c6078ed --- /dev/null +++ b/software/libusb-1.0/libusb.h @@ -0,0 +1,1446 @@ +/* + * Public libusb header file + * Copyright (C) 2007-2008 Daniel Drake + * Copyright (c) 2001 Johannes Erdfelt + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * $Id: libusb.h 21254 2014-02-06 11:13:37Z ritt $ + * + */ + +#ifndef LIBUSB_H +#define LIBUSB_H + +#ifdef _MSC_VER +/* on MS environments, the inline keyword is available in C++ only */ +#define inline __inline +/* ssize_t is also not available (copy/paste from MinGW) */ +#ifndef _SSIZE_T_DEFINED +#define _SSIZE_T_DEFINED +#undef ssize_t +#ifdef _WIN64 + typedef __int64 ssize_t; +#else + typedef int ssize_t; +#endif /* _WIN64 */ +#endif /* _SSIZE_T_DEFINED */ +#endif /* _MSC_VER */ + +/* stdint.h is also not usually available on MS */ +#if defined(_MSC_VER) && (_MSC_VER < 1600) && (!defined(_STDINT)) && (!defined(_STDINT_H)) +typedef unsigned __int8 uint8_t; +typedef unsigned __int16 uint16_t; +typedef unsigned __int32 uint32_t; +#else +#include +#endif + +#include +#include +#include + +#if defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__) +#include +#endif + +/* 'interface' might be defined as a macro on Windows, so we need to + * undefine it so as not to break the current libusb API, because + * libusb_config_descriptor has an 'interface' member + * As this can be problematic if you include windows.h after libusb.h + * in your sources, we force windows.h to be included first. */ +#if defined(_WIN32) || defined(__CYGWIN__) +#include +#if defined(interface) +#undef interface +#endif +#endif + +/** \def LIBUSB_CALL + * \ingroup misc + * libusb's Windows calling convention. + * + * Under Windows, the selection of available compilers and configurations + * means that, unlike other platforms, there is not one true calling + * convention (calling convention: the manner in which parameters are + * passed to funcions in the generated assembly code). + * + * Matching the Windows API itself, libusb uses the WINAPI convention (which + * translates to the stdcall convention) and guarantees that the + * library is compiled in this way. The public header file also includes + * appropriate annotations so that your own software will use the right + * convention, even if another convention is being used by default within + * your codebase. + * + * The one consideration that you must apply in your software is to mark + * all functions which you use as libusb callbacks with this LIBUSB_CALL + * annotation, so that they too get compiled for the correct calling + * convention. + * + * On non-Windows operating systems, this macro is defined as nothing. This + * means that you can apply it to your code without worrying about + * cross-platform compatibility. + */ +/* LIBUSB_CALL must be defined on both definition and declaration of libusb + * functions. You'd think that declaration would be enough, but cygwin will + * complain about conflicting types unless both are marked this way. + * The placement of this macro is important too; it must appear after the + * return type, before the function name. See internal documentation for + * API_EXPORTED. + */ +#if defined(_WIN32) || defined(__CYGWIN__) +#define LIBUSB_CALL WINAPI +#else +#define LIBUSB_CALL +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** \def libusb_cpu_to_le16 + * \ingroup misc + * Convert a 16-bit value from host-endian to little-endian format. On + * little endian systems, this function does nothing. On big endian systems, + * the bytes are swapped. + * \param x the host-endian value to convert + * \returns the value in little-endian byte order + */ +static inline uint16_t libusb_cpu_to_le16(const uint16_t x) +{ + union { + uint8_t b8[2]; + uint16_t b16; + } _tmp; + _tmp.b8[1] = x >> 8; + _tmp.b8[0] = x & 0xff; + return _tmp.b16; +} + +/** \def libusb_le16_to_cpu + * \ingroup misc + * Convert a 16-bit value from little-endian to host-endian format. On + * little endian systems, this function does nothing. On big endian systems, + * the bytes are swapped. + * \param x the little-endian value to convert + * \returns the value in host-endian byte order + */ +#define libusb_le16_to_cpu libusb_cpu_to_le16 + +/* standard USB stuff */ + +/** \ingroup desc + * Device and/or Interface Class codes */ +enum libusb_class_code { + /** In the context of a \ref libusb_device_descriptor "device descriptor", + * this bDeviceClass value indicates that each interface specifies its + * own class information and all interfaces operate independently. + */ + LIBUSB_CLASS_PER_INTERFACE = 0, + + /** Audio class */ + LIBUSB_CLASS_AUDIO = 1, + + /** Communications class */ + LIBUSB_CLASS_COMM = 2, + + /** Human Interface Device class */ + LIBUSB_CLASS_HID = 3, + + /** Physical */ + LIBUSB_CLASS_PHYSICAL = 5, + + /** Printer class */ + LIBUSB_CLASS_PRINTER = 7, + + /** Image class */ + LIBUSB_CLASS_PTP = 6, /* legacy name from libusb-0.1 usb.h */ + LIBUSB_CLASS_IMAGE = 6, + + /** Mass storage class */ + LIBUSB_CLASS_MASS_STORAGE = 8, + + /** Hub class */ + LIBUSB_CLASS_HUB = 9, + + /** Data class */ + LIBUSB_CLASS_DATA = 10, + + /** Smart Card */ + LIBUSB_CLASS_SMART_CARD = 0x0b, + + /** Content Security */ + LIBUSB_CLASS_CONTENT_SECURITY = 0x0d, + + /** Video */ + LIBUSB_CLASS_VIDEO = 0x0e, + + /** Personal Healthcare */ + LIBUSB_CLASS_PERSONAL_HEALTHCARE = 0x0f, + + /** Diagnostic Device */ + LIBUSB_CLASS_DIAGNOSTIC_DEVICE = 0xdc, + + /** Wireless class */ + LIBUSB_CLASS_WIRELESS = 0xe0, + + /** Application class */ + LIBUSB_CLASS_APPLICATION = 0xfe, + + /** Class is vendor-specific */ + LIBUSB_CLASS_VENDOR_SPEC = 0xff +}; + +/** \ingroup desc + * Descriptor types as defined by the USB specification. */ +enum libusb_descriptor_type { + /** Device descriptor. See libusb_device_descriptor. */ + LIBUSB_DT_DEVICE = 0x01, + + /** Configuration descriptor. See libusb_config_descriptor. */ + LIBUSB_DT_CONFIG = 0x02, + + /** String descriptor */ + LIBUSB_DT_STRING = 0x03, + + /** Interface descriptor. See libusb_interface_descriptor. */ + LIBUSB_DT_INTERFACE = 0x04, + + /** Endpoint descriptor. See libusb_endpoint_descriptor. */ + LIBUSB_DT_ENDPOINT = 0x05, + + /** HID descriptor */ + LIBUSB_DT_HID = 0x21, + + /** HID report descriptor */ + LIBUSB_DT_REPORT = 0x22, + + /** Physical descriptor */ + LIBUSB_DT_PHYSICAL = 0x23, + + /** Hub descriptor */ + LIBUSB_DT_HUB = 0x29, +}; + +/* Descriptor sizes per descriptor type */ +#define LIBUSB_DT_DEVICE_SIZE 18 +#define LIBUSB_DT_CONFIG_SIZE 9 +#define LIBUSB_DT_INTERFACE_SIZE 9 +#define LIBUSB_DT_ENDPOINT_SIZE 7 +#define LIBUSB_DT_ENDPOINT_AUDIO_SIZ 9 /* Audio extension */ +#define LIBUSB_DT_HUB_NONVAR_SIZE 7 + +#define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */ +#define LIBUSB_ENDPOINT_DIR_MASK 0x80 + +/** \ingroup desc + * Endpoint direction. Values for bit 7 of the + * \ref libusb_endpoint_descriptor::bEndpointAddress "endpoint address" scheme. + */ +enum libusb_endpoint_direction { + /** In: device-to-host */ + LIBUSB_ENDPOINT_IN = 0x80, + + /** Out: host-to-device */ + LIBUSB_ENDPOINT_OUT = 0x00 +}; + +#define LIBUSB_TRANSFER_TYPE_MASK 0x03 /* in bmAttributes */ + +/** \ingroup desc + * Endpoint transfer type. Values for bits 0:1 of the + * \ref libusb_endpoint_descriptor::bmAttributes "endpoint attributes" field. + */ +enum libusb_transfer_type { + /** Control endpoint */ + LIBUSB_TRANSFER_TYPE_CONTROL = 0, + + /** Isochronous endpoint */ + LIBUSB_TRANSFER_TYPE_ISOCHRONOUS = 1, + + /** Bulk endpoint */ + LIBUSB_TRANSFER_TYPE_BULK = 2, + + /** Interrupt endpoint */ + LIBUSB_TRANSFER_TYPE_INTERRUPT = 3 +}; + +/** \ingroup misc + * Standard requests, as defined in table 9-3 of the USB2 specifications */ +enum libusb_standard_request { + /** Request status of the specific recipient */ + LIBUSB_REQUEST_GET_STATUS = 0x00, + + /** Clear or disable a specific feature */ + LIBUSB_REQUEST_CLEAR_FEATURE = 0x01, + + /* 0x02 is reserved */ + + /** Set or enable a specific feature */ + LIBUSB_REQUEST_SET_FEATURE = 0x03, + + /* 0x04 is reserved */ + + /** Set device address for all future accesses */ + LIBUSB_REQUEST_SET_ADDRESS = 0x05, + + /** Get the specified descriptor */ + LIBUSB_REQUEST_GET_DESCRIPTOR = 0x06, + + /** Used to update existing descriptors or add new descriptors */ + LIBUSB_REQUEST_SET_DESCRIPTOR = 0x07, + + /** Get the current device configuration value */ + LIBUSB_REQUEST_GET_CONFIGURATION = 0x08, + + /** Set device configuration */ + LIBUSB_REQUEST_SET_CONFIGURATION = 0x09, + + /** Return the selected alternate setting for the specified interface */ + LIBUSB_REQUEST_GET_INTERFACE = 0x0A, + + /** Select an alternate interface for the specified interface */ + LIBUSB_REQUEST_SET_INTERFACE = 0x0B, + + /** Set then report an endpoint's synchronization frame */ + LIBUSB_REQUEST_SYNCH_FRAME = 0x0C, +}; + +/** \ingroup misc + * Request type bits of the + * \ref libusb_control_setup::bmRequestType "bmRequestType" field in control + * transfers. */ +enum libusb_request_type { + /** Standard */ + LIBUSB_REQUEST_TYPE_STANDARD = (0x00 << 5), + + /** Class */ + LIBUSB_REQUEST_TYPE_CLASS = (0x01 << 5), + + /** Vendor */ + LIBUSB_REQUEST_TYPE_VENDOR = (0x02 << 5), + + /** Reserved */ + LIBUSB_REQUEST_TYPE_RESERVED = (0x03 << 5) +}; + +/** \ingroup misc + * Recipient bits of the + * \ref libusb_control_setup::bmRequestType "bmRequestType" field in control + * transfers. Values 4 through 31 are reserved. */ +enum libusb_request_recipient { + /** Device */ + LIBUSB_RECIPIENT_DEVICE = 0x00, + + /** Interface */ + LIBUSB_RECIPIENT_INTERFACE = 0x01, + + /** Endpoint */ + LIBUSB_RECIPIENT_ENDPOINT = 0x02, + + /** Other */ + LIBUSB_RECIPIENT_OTHER = 0x03, +}; + +#define LIBUSB_ISO_SYNC_TYPE_MASK 0x0C + +/** \ingroup desc + * Synchronization type for isochronous endpoints. Values for bits 2:3 of the + * \ref libusb_endpoint_descriptor::bmAttributes "bmAttributes" field in + * libusb_endpoint_descriptor. + */ +enum libusb_iso_sync_type { + /** No synchronization */ + LIBUSB_ISO_SYNC_TYPE_NONE = 0, + + /** Asynchronous */ + LIBUSB_ISO_SYNC_TYPE_ASYNC = 1, + + /** Adaptive */ + LIBUSB_ISO_SYNC_TYPE_ADAPTIVE = 2, + + /** Synchronous */ + LIBUSB_ISO_SYNC_TYPE_SYNC = 3 +}; + +#define LIBUSB_ISO_USAGE_TYPE_MASK 0x30 + +/** \ingroup desc + * Usage type for isochronous endpoints. Values for bits 4:5 of the + * \ref libusb_endpoint_descriptor::bmAttributes "bmAttributes" field in + * libusb_endpoint_descriptor. + */ +enum libusb_iso_usage_type { + /** Data endpoint */ + LIBUSB_ISO_USAGE_TYPE_DATA = 0, + + /** Feedback endpoint */ + LIBUSB_ISO_USAGE_TYPE_FEEDBACK = 1, + + /** Implicit feedback Data endpoint */ + LIBUSB_ISO_USAGE_TYPE_IMPLICIT = 2, +}; + +/** \ingroup desc + * A structure representing the standard USB device descriptor. This + * descriptor is documented in section 9.6.1 of the USB 2.0 specification. + * All multiple-byte fields are represented in host-endian format. + */ +struct libusb_device_descriptor { + /** Size of this descriptor (in bytes) */ + uint8_t bLength; + + /** Descriptor type. Will have value + * \ref libusb_descriptor_type::LIBUSB_DT_DEVICE LIBUSB_DT_DEVICE in this + * context. */ + uint8_t bDescriptorType; + + /** USB specification release number in binary-coded decimal. A value of + * 0x0200 indicates USB 2.0, 0x0110 indicates USB 1.1, etc. */ + uint16_t bcdUSB; + + /** USB-IF class code for the device. See \ref libusb_class_code. */ + uint8_t bDeviceClass; + + /** USB-IF subclass code for the device, qualified by the bDeviceClass + * value */ + uint8_t bDeviceSubClass; + + /** USB-IF protocol code for the device, qualified by the bDeviceClass and + * bDeviceSubClass values */ + uint8_t bDeviceProtocol; + + /** Maximum packet size for endpoint 0 */ + uint8_t bMaxPacketSize0; + + /** USB-IF vendor ID */ + uint16_t idVendor; + + /** USB-IF product ID */ + uint16_t idProduct; + + /** Device release number in binary-coded decimal */ + uint16_t bcdDevice; + + /** Index of string descriptor describing manufacturer */ + uint8_t iManufacturer; + + /** Index of string descriptor describing product */ + uint8_t iProduct; + + /** Index of string descriptor containing device serial number */ + uint8_t iSerialNumber; + + /** Number of possible configurations */ + uint8_t bNumConfigurations; +}; + +/** \ingroup desc + * A structure representing the standard USB endpoint descriptor. This + * descriptor is documented in section 9.6.3 of the USB 2.0 specification. + * All multiple-byte fields are represented in host-endian format. + */ +struct libusb_endpoint_descriptor { + /** Size of this descriptor (in bytes) */ + uint8_t bLength; + + /** Descriptor type. Will have value + * \ref libusb_descriptor_type::LIBUSB_DT_ENDPOINT LIBUSB_DT_ENDPOINT in + * this context. */ + uint8_t bDescriptorType; + + /** The address of the endpoint described by this descriptor. Bits 0:3 are + * the endpoint number. Bits 4:6 are reserved. Bit 7 indicates direction, + * see \ref libusb_endpoint_direction. + */ + uint8_t bEndpointAddress; + + /** Attributes which apply to the endpoint when it is configured using + * the bConfigurationValue. Bits 0:1 determine the transfer type and + * correspond to \ref libusb_transfer_type. Bits 2:3 are only used for + * isochronous endpoints and correspond to \ref libusb_iso_sync_type. + * Bits 4:5 are also only used for isochronous endpoints and correspond to + * \ref libusb_iso_usage_type. Bits 6:7 are reserved. + */ + uint8_t bmAttributes; + + /** Maximum packet size this endpoint is capable of sending/receiving. */ + uint16_t wMaxPacketSize; + + /** Interval for polling endpoint for data transfers. */ + uint8_t bInterval; + + /** For audio devices only: the rate at which synchronization feedback + * is provided. */ + uint8_t bRefresh; + + /** For audio devices only: the address if the synch endpoint */ + uint8_t bSynchAddress; + + /** Extra descriptors. If libusb encounters unknown endpoint descriptors, + * it will store them here, should you wish to parse them. */ + const unsigned char *extra; + + /** Length of the extra descriptors, in bytes. */ + int extra_length; +}; + +/** \ingroup desc + * A structure representing the standard USB interface descriptor. This + * descriptor is documented in section 9.6.5 of the USB 2.0 specification. + * All multiple-byte fields are represented in host-endian format. + */ +struct libusb_interface_descriptor { + /** Size of this descriptor (in bytes) */ + uint8_t bLength; + + /** Descriptor type. Will have value + * \ref libusb_descriptor_type::LIBUSB_DT_INTERFACE LIBUSB_DT_INTERFACE + * in this context. */ + uint8_t bDescriptorType; + + /** Number of this interface */ + uint8_t bInterfaceNumber; + + /** Value used to select this alternate setting for this interface */ + uint8_t bAlternateSetting; + + /** Number of endpoints used by this interface (excluding the control + * endpoint). */ + uint8_t bNumEndpoints; + + /** USB-IF class code for this interface. See \ref libusb_class_code. */ + uint8_t bInterfaceClass; + + /** USB-IF subclass code for this interface, qualified by the + * bInterfaceClass value */ + uint8_t bInterfaceSubClass; + + /** USB-IF protocol code for this interface, qualified by the + * bInterfaceClass and bInterfaceSubClass values */ + uint8_t bInterfaceProtocol; + + /** Index of string descriptor describing this interface */ + uint8_t iInterface; + + /** Array of endpoint descriptors. This length of this array is determined + * by the bNumEndpoints field. */ + const struct libusb_endpoint_descriptor *endpoint; + + /** Extra descriptors. If libusb encounters unknown interface descriptors, + * it will store them here, should you wish to parse them. */ + const unsigned char *extra; + + /** Length of the extra descriptors, in bytes. */ + int extra_length; +}; + +/** \ingroup desc + * A collection of alternate settings for a particular USB interface. + */ +struct libusb_interface { + /** Array of interface descriptors. The length of this array is determined + * by the num_altsetting field. */ + const struct libusb_interface_descriptor *altsetting; + + /** The number of alternate settings that belong to this interface */ + int num_altsetting; +}; + +/** \ingroup desc + * A structure representing the standard USB configuration descriptor. This + * descriptor is documented in section 9.6.3 of the USB 2.0 specification. + * All multiple-byte fields are represented in host-endian format. + */ +struct libusb_config_descriptor { + /** Size of this descriptor (in bytes) */ + uint8_t bLength; + + /** Descriptor type. Will have value + * \ref libusb_descriptor_type::LIBUSB_DT_CONFIG LIBUSB_DT_CONFIG + * in this context. */ + uint8_t bDescriptorType; + + /** Total length of data returned for this configuration */ + uint16_t wTotalLength; + + /** Number of interfaces supported by this configuration */ + uint8_t bNumInterfaces; + + /** Identifier value for this configuration */ + uint8_t bConfigurationValue; + + /** Index of string descriptor describing this configuration */ + uint8_t iConfiguration; + + /** Configuration characteristics */ + uint8_t bmAttributes; + + /** Maximum power consumption of the USB device from this bus in this + * configuration when the device is fully opreation. Expressed in units + * of 2 mA. */ + uint8_t MaxPower; + + /** Array of interfaces supported by this configuration. The length of + * this array is determined by the bNumInterfaces field. */ + const struct libusb_interface *interface; + + /** Extra descriptors. If libusb encounters unknown configuration + * descriptors, it will store them here, should you wish to parse them. */ + const unsigned char *extra; + + /** Length of the extra descriptors, in bytes. */ + int extra_length; +}; + +/** \ingroup asyncio + * Setup packet for control transfers. */ +struct libusb_control_setup { + /** Request type. Bits 0:4 determine recipient, see + * \ref libusb_request_recipient. Bits 5:6 determine type, see + * \ref libusb_request_type. Bit 7 determines data transfer direction, see + * \ref libusb_endpoint_direction. + */ + uint8_t bmRequestType; + + /** Request. If the type bits of bmRequestType are equal to + * \ref libusb_request_type::LIBUSB_REQUEST_TYPE_STANDARD + * "LIBUSB_REQUEST_TYPE_STANDARD" then this field refers to + * \ref libusb_standard_request. For other cases, use of this field is + * application-specific. */ + uint8_t bRequest; + + /** Value. Varies according to request */ + uint16_t wValue; + + /** Index. Varies according to request, typically used to pass an index + * or offset */ + uint16_t wIndex; + + /** Number of bytes to transfer */ + uint16_t wLength; +}; + +#define LIBUSB_CONTROL_SETUP_SIZE (sizeof(struct libusb_control_setup)) + +/* libusb */ + +struct libusb_context; +struct libusb_device; +struct libusb_device_handle; + +/** \ingroup lib + * Structure representing the libusb version. + */ +struct libusb_version { + /** Library major version. */ + const uint16_t major; + + /** Library minor version. */ + const uint16_t minor; + + /** Library micro version. */ + const uint16_t micro; + + /** Library nano version. This field is only nonzero on Windows. */ + const uint16_t nano; + + /** Library release candidate suffix string, e.g. "-rc4". */ + const char *rc; + + /** Output of `git describe --tags` at library build time. */ + const char *describe; +}; + +/** \ingroup lib + * Structure representing a libusb session. The concept of individual libusb + * sessions allows for your program to use two libraries (or dynamically + * load two modules) which both independently use libusb. This will prevent + * interference between the individual libusb users - for example + * libusb_set_debug() will not affect the other user of the library, and + * libusb_exit() will not destroy resources that the other user is still + * using. + * + * Sessions are created by libusb_init() and destroyed through libusb_exit(). + * If your application is guaranteed to only ever include a single libusb + * user (i.e. you), you do not have to worry about contexts: pass NULL in + * every function call where a context is required. The default context + * will be used. + * + * For more information, see \ref contexts. + */ +typedef struct libusb_context libusb_context; + +/** \ingroup dev + * Structure representing a USB device detected on the system. This is an + * opaque type for which you are only ever provided with a pointer, usually + * originating from libusb_get_device_list(). + * + * Certain operations can be performed on a device, but in order to do any + * I/O you will have to first obtain a device handle using libusb_open(). + * + * Devices are reference counted with libusb_ref_device() and + * libusb_unref_device(), and are freed when the reference count reaches 0. + * New devices presented by libusb_get_device_list() have a reference count of + * 1, and libusb_free_device_list() can optionally decrease the reference count + * on all devices in the list. libusb_open() adds another reference which is + * later destroyed by libusb_close(). + */ +typedef struct libusb_device libusb_device; + + +/** \ingroup dev + * Structure representing a handle on a USB device. This is an opaque type for + * which you are only ever provided with a pointer, usually originating from + * libusb_open(). + * + * A device handle is used to perform I/O and other operations. When finished + * with a device handle, you should call libusb_close(). + */ +typedef struct libusb_device_handle libusb_device_handle; + +/** \ingroup dev + * Speed codes. Indicates the speed at which the device is operating. + */ +enum libusb_speed { + /** The OS doesn't report or know the device speed. */ + LIBUSB_SPEED_UNKNOWN = 0, + + /** The device is operating at low speed (1.5MBit/s). */ + LIBUSB_SPEED_LOW = 1, + + /** The device is operating at full speed (12MBit/s). */ + LIBUSB_SPEED_FULL = 2, + + /** The device is operating at high speed (480MBit/s). */ + LIBUSB_SPEED_HIGH = 3, + + /** The device is operating at super speed (5000MBit/s). */ + LIBUSB_SPEED_SUPER = 4, +}; + +/** \ingroup misc + * Error codes. Most libusb functions return 0 on success or one of these + * codes on failure. + * You can call \ref libusb_error_name() to retrieve a string representation + * of an error code. + */ +enum libusb_error { + /** Success (no error) */ + LIBUSB_SUCCESS = 0, + + /** Input/output error */ + LIBUSB_ERROR_IO = -1, + + /** Invalid parameter */ + LIBUSB_ERROR_INVALID_PARAM = -2, + + /** Access denied (insufficient permissions) */ + LIBUSB_ERROR_ACCESS = -3, + + /** No such device (it may have been disconnected) */ + LIBUSB_ERROR_NO_DEVICE = -4, + + /** Entity not found */ + LIBUSB_ERROR_NOT_FOUND = -5, + + /** Resource busy */ + LIBUSB_ERROR_BUSY = -6, + + /** Operation timed out */ + LIBUSB_ERROR_TIMEOUT = -7, + + /** Overflow */ + LIBUSB_ERROR_OVERFLOW = -8, + + /** Pipe error */ + LIBUSB_ERROR_PIPE = -9, + + /** System call interrupted (perhaps due to signal) */ + LIBUSB_ERROR_INTERRUPTED = -10, + + /** Insufficient memory */ + LIBUSB_ERROR_NO_MEM = -11, + + /** Operation not supported or unimplemented on this platform */ + LIBUSB_ERROR_NOT_SUPPORTED = -12, + + /* NB! Remember to update libusb_error_name() + when adding new error codes here. */ + + /** Other error */ + LIBUSB_ERROR_OTHER = -99, +}; + +/** \ingroup asyncio + * Transfer status codes */ +enum libusb_transfer_status { + /** Transfer completed without error. Note that this does not indicate + * that the entire amount of requested data was transferred. */ + LIBUSB_TRANSFER_COMPLETED, + + /** Transfer failed */ + LIBUSB_TRANSFER_ERROR, + + /** Transfer timed out */ + LIBUSB_TRANSFER_TIMED_OUT, + + /** Transfer was cancelled */ + LIBUSB_TRANSFER_CANCELLED, + + /** For bulk/interrupt endpoints: halt condition detected (endpoint + * stalled). For control endpoints: control request not supported. */ + LIBUSB_TRANSFER_STALL, + + /** Device was disconnected */ + LIBUSB_TRANSFER_NO_DEVICE, + + /** Device sent more data than requested */ + LIBUSB_TRANSFER_OVERFLOW, +}; + +/** \ingroup asyncio + * libusb_transfer.flags values */ +enum libusb_transfer_flags { + /** Report short frames as errors */ + LIBUSB_TRANSFER_SHORT_NOT_OK = 1<<0, + + /** Automatically free() transfer buffer during libusb_free_transfer() */ + LIBUSB_TRANSFER_FREE_BUFFER = 1<<1, + + /** Automatically call libusb_free_transfer() after callback returns. + * If this flag is set, it is illegal to call libusb_free_transfer() + * from your transfer callback, as this will result in a double-free + * when this flag is acted upon. */ + LIBUSB_TRANSFER_FREE_TRANSFER = 1<<2, + + /** Terminate transfers that are a multiple of the endpoint's + * wMaxPacketSize with an extra zero length packet. This is useful + * when a device protocol mandates that each logical request is + * terminated by an incomplete packet (i.e. the logical requests are + * not separated by other means). + * + * This flag only affects host-to-device transfers to bulk and interrupt + * endpoints. In other situations, it is ignored. + * + * This flag only affects transfers with a length that is a multiple of + * the endpoint's wMaxPacketSize. On transfers of other lengths, this + * flag has no effect. Therefore, if you are working with a device that + * needs a ZLP whenever the end of the logical request falls on a packet + * boundary, then it is sensible to set this flag on every + * transfer (you do not have to worry about only setting it on transfers + * that end on the boundary). + * + * This flag is currently only supported on Linux. + * On other systems, libusb_submit_transfer() will return + * LIBUSB_ERROR_NOT_SUPPORTED for every transfer where this flag is set. + * + * Available since libusb-1.0.9. + */ + LIBUSB_TRANSFER_ADD_ZERO_PACKET = 1 << 3, +}; + +/** \ingroup asyncio + * Isochronous packet descriptor. */ +struct libusb_iso_packet_descriptor { + /** Length of data to request in this packet */ + unsigned int length; + + /** Amount of data that was actually transferred */ + unsigned int actual_length; + + /** Status code for this packet */ + enum libusb_transfer_status status; +}; + +struct libusb_transfer; + +/** \ingroup asyncio + * Asynchronous transfer callback function type. When submitting asynchronous + * transfers, you pass a pointer to a callback function of this type via the + * \ref libusb_transfer::callback "callback" member of the libusb_transfer + * structure. libusb will call this function later, when the transfer has + * completed or failed. See \ref asyncio for more information. + * \param transfer The libusb_transfer struct the callback function is being + * notified about. + */ +typedef void (LIBUSB_CALL *libusb_transfer_cb_fn)(struct libusb_transfer *transfer); + +/** \ingroup asyncio + * The generic USB transfer structure. The user populates this structure and + * then submits it in order to request a transfer. After the transfer has + * completed, the library populates the transfer with the results and passes + * it back to the user. + */ +struct libusb_transfer { + /** Handle of the device that this transfer will be submitted to */ + libusb_device_handle *dev_handle; + + /** A bitwise OR combination of \ref libusb_transfer_flags. */ + uint8_t flags; + + /** Address of the endpoint where this transfer will be sent. */ + unsigned char endpoint; + + /** Type of the endpoint from \ref libusb_transfer_type */ + unsigned char type; + + /** Timeout for this transfer in millseconds. A value of 0 indicates no + * timeout. */ + unsigned int timeout; + + /** The status of the transfer. Read-only, and only for use within + * transfer callback function. + * + * If this is an isochronous transfer, this field may read COMPLETED even + * if there were errors in the frames. Use the + * \ref libusb_iso_packet_descriptor::status "status" field in each packet + * to determine if errors occurred. */ + enum libusb_transfer_status status; + + /** Length of the data buffer */ + int length; + + /** Actual length of data that was transferred. Read-only, and only for + * use within transfer callback function. Not valid for isochronous + * endpoint transfers. */ + int actual_length; + + /** Callback function. This will be invoked when the transfer completes, + * fails, or is cancelled. */ + libusb_transfer_cb_fn callback; + + /** User context data to pass to the callback function. */ + void *user_data; + + /** Data buffer */ + unsigned char *buffer; + + /** Number of isochronous packets. Only used for I/O with isochronous + * endpoints. */ + int num_iso_packets; + + /** Isochronous packet descriptors, for isochronous transfers only. */ + struct libusb_iso_packet_descriptor iso_packet_desc +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) + [] /* valid C99 code */ +#else + [0] /* non-standard, but usually working code */ +#endif + ; +}; + +/** \ingroup misc + * Capabilities supported by this instance of libusb. Test if the loaded + * library supports a given capability by calling + * \ref libusb_has_capability(). + */ +enum libusb_capability { + /** The libusb_has_capability() API is available. */ + LIBUSB_CAP_HAS_CAPABILITY = 0, +}; + +int LIBUSB_CALL libusb_init(libusb_context **ctx); +void LIBUSB_CALL libusb_exit(libusb_context *ctx); +void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level); +const struct libusb_version * LIBUSB_CALL libusb_get_version(void); +int LIBUSB_CALL libusb_has_capability(uint32_t capability); +const char * LIBUSB_CALL libusb_error_name(int errcode); + +ssize_t LIBUSB_CALL libusb_get_device_list(libusb_context *ctx, + libusb_device ***list); +void LIBUSB_CALL libusb_free_device_list(libusb_device **list, + int unref_devices); +libusb_device * LIBUSB_CALL libusb_ref_device(libusb_device *dev); +void LIBUSB_CALL libusb_unref_device(libusb_device *dev); + +int LIBUSB_CALL libusb_get_configuration(libusb_device_handle *dev, + int *config); +int LIBUSB_CALL libusb_get_device_descriptor(libusb_device *dev, + struct libusb_device_descriptor *desc); +int LIBUSB_CALL libusb_get_active_config_descriptor(libusb_device *dev, + struct libusb_config_descriptor **config); +int LIBUSB_CALL libusb_get_config_descriptor(libusb_device *dev, + uint8_t config_index, struct libusb_config_descriptor **config); +int LIBUSB_CALL libusb_get_config_descriptor_by_value(libusb_device *dev, + uint8_t bConfigurationValue, struct libusb_config_descriptor **config); +void LIBUSB_CALL libusb_free_config_descriptor( + struct libusb_config_descriptor *config); +uint8_t LIBUSB_CALL libusb_get_bus_number(libusb_device *dev); +uint8_t LIBUSB_CALL libusb_get_device_address(libusb_device *dev); +int LIBUSB_CALL libusb_get_device_speed(libusb_device *dev); +int LIBUSB_CALL libusb_get_max_packet_size(libusb_device *dev, + unsigned char endpoint); +int LIBUSB_CALL libusb_get_max_iso_packet_size(libusb_device *dev, + unsigned char endpoint); + +int LIBUSB_CALL libusb_open(libusb_device *dev, libusb_device_handle **handle); +void LIBUSB_CALL libusb_close(libusb_device_handle *dev_handle); +libusb_device * LIBUSB_CALL libusb_get_device(libusb_device_handle *dev_handle); + +int LIBUSB_CALL libusb_set_configuration(libusb_device_handle *dev, + int configuration); +int LIBUSB_CALL libusb_claim_interface(libusb_device_handle *dev, + int interface_number); +int LIBUSB_CALL libusb_release_interface(libusb_device_handle *dev, + int interface_number); + +libusb_device_handle * LIBUSB_CALL libusb_open_device_with_vid_pid( + libusb_context *ctx, uint16_t vendor_id, uint16_t product_id); + +int LIBUSB_CALL libusb_set_interface_alt_setting(libusb_device_handle *dev, + int interface_number, int alternate_setting); +int LIBUSB_CALL libusb_clear_halt(libusb_device_handle *dev, + unsigned char endpoint); +int LIBUSB_CALL libusb_reset_device(libusb_device_handle *dev); + +int LIBUSB_CALL libusb_kernel_driver_active(libusb_device_handle *dev, + int interface_number); +int LIBUSB_CALL libusb_detach_kernel_driver(libusb_device_handle *dev, + int interface_number); +int LIBUSB_CALL libusb_attach_kernel_driver(libusb_device_handle *dev, + int interface_number); + +/* async I/O */ + +/** \ingroup asyncio + * Get the data section of a control transfer. This convenience function is here + * to remind you that the data does not start until 8 bytes into the actual + * buffer, as the setup packet comes first. + * + * Calling this function only makes sense from a transfer callback function, + * or situations where you have already allocated a suitably sized buffer at + * transfer->buffer. + * + * \param transfer a transfer + * \returns pointer to the first byte of the data section + */ +static inline unsigned char *libusb_control_transfer_get_data( + struct libusb_transfer *transfer) +{ + return transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE; +} + +/** \ingroup asyncio + * Get the control setup packet of a control transfer. This convenience + * function is here to remind you that the control setup occupies the first + * 8 bytes of the transfer data buffer. + * + * Calling this function only makes sense from a transfer callback function, + * or situations where you have already allocated a suitably sized buffer at + * transfer->buffer. + * + * \param transfer a transfer + * \returns a casted pointer to the start of the transfer data buffer + */ +static inline struct libusb_control_setup *libusb_control_transfer_get_setup( + struct libusb_transfer *transfer) +{ + return (struct libusb_control_setup *) transfer->buffer; +} + +/** \ingroup asyncio + * Helper function to populate the setup packet (first 8 bytes of the data + * buffer) for a control transfer. The wIndex, wValue and wLength values should + * be given in host-endian byte order. + * + * \param buffer buffer to output the setup packet into + * \param bmRequestType see the + * \ref libusb_control_setup::bmRequestType "bmRequestType" field of + * \ref libusb_control_setup + * \param bRequest see the + * \ref libusb_control_setup::bRequest "bRequest" field of + * \ref libusb_control_setup + * \param wValue see the + * \ref libusb_control_setup::wValue "wValue" field of + * \ref libusb_control_setup + * \param wIndex see the + * \ref libusb_control_setup::wIndex "wIndex" field of + * \ref libusb_control_setup + * \param wLength see the + * \ref libusb_control_setup::wLength "wLength" field of + * \ref libusb_control_setup + */ +static inline void libusb_fill_control_setup(unsigned char *buffer, + uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, + uint16_t wLength) +{ + struct libusb_control_setup *setup = (struct libusb_control_setup *) buffer; + setup->bmRequestType = bmRequestType; + setup->bRequest = bRequest; + setup->wValue = libusb_cpu_to_le16(wValue); + setup->wIndex = libusb_cpu_to_le16(wIndex); + setup->wLength = libusb_cpu_to_le16(wLength); +} + +struct libusb_transfer * LIBUSB_CALL libusb_alloc_transfer(int iso_packets); +int LIBUSB_CALL libusb_submit_transfer(struct libusb_transfer *transfer); +int LIBUSB_CALL libusb_cancel_transfer(struct libusb_transfer *transfer); +void LIBUSB_CALL libusb_free_transfer(struct libusb_transfer *transfer); + +/** \ingroup asyncio + * Helper function to populate the required \ref libusb_transfer fields + * for a control transfer. + * + * If you pass a transfer buffer to this function, the first 8 bytes will + * be interpreted as a control setup packet, and the wLength field will be + * used to automatically populate the \ref libusb_transfer::length "length" + * field of the transfer. Therefore the recommended approach is: + * -# Allocate a suitably sized data buffer (including space for control setup) + * -# Call libusb_fill_control_setup() + * -# If this is a host-to-device transfer with a data stage, put the data + * in place after the setup packet + * -# Call this function + * -# Call libusb_submit_transfer() + * + * It is also legal to pass a NULL buffer to this function, in which case this + * function will not attempt to populate the length field. Remember that you + * must then populate the buffer and length fields later. + * + * \param transfer the transfer to populate + * \param dev_handle handle of the device that will handle the transfer + * \param buffer data buffer. If provided, this function will interpret the + * first 8 bytes as a setup packet and infer the transfer length from that. + * \param callback callback function to be invoked on transfer completion + * \param user_data user data to pass to callback function + * \param timeout timeout for the transfer in milliseconds + */ +static inline void libusb_fill_control_transfer( + struct libusb_transfer *transfer, libusb_device_handle *dev_handle, + unsigned char *buffer, libusb_transfer_cb_fn callback, void *user_data, + unsigned int timeout) +{ + struct libusb_control_setup *setup = (struct libusb_control_setup *) buffer; + transfer->dev_handle = dev_handle; + transfer->endpoint = 0; + transfer->type = LIBUSB_TRANSFER_TYPE_CONTROL; + transfer->timeout = timeout; + transfer->buffer = buffer; + if (setup) + transfer->length = LIBUSB_CONTROL_SETUP_SIZE + + libusb_le16_to_cpu(setup->wLength); + transfer->user_data = user_data; + transfer->callback = callback; +} + +/** \ingroup asyncio + * Helper function to populate the required \ref libusb_transfer fields + * for a bulk transfer. + * + * \param transfer the transfer to populate + * \param dev_handle handle of the device that will handle the transfer + * \param endpoint address of the endpoint where this transfer will be sent + * \param buffer data buffer + * \param length length of data buffer + * \param callback callback function to be invoked on transfer completion + * \param user_data user data to pass to callback function + * \param timeout timeout for the transfer in milliseconds + */ +static inline void libusb_fill_bulk_transfer(struct libusb_transfer *transfer, + libusb_device_handle *dev_handle, unsigned char endpoint, + unsigned char *buffer, int length, libusb_transfer_cb_fn callback, + void *user_data, unsigned int timeout) +{ + transfer->dev_handle = dev_handle; + transfer->endpoint = endpoint; + transfer->type = LIBUSB_TRANSFER_TYPE_BULK; + transfer->timeout = timeout; + transfer->buffer = buffer; + transfer->length = length; + transfer->user_data = user_data; + transfer->callback = callback; +} + +/** \ingroup asyncio + * Helper function to populate the required \ref libusb_transfer fields + * for an interrupt transfer. + * + * \param transfer the transfer to populate + * \param dev_handle handle of the device that will handle the transfer + * \param endpoint address of the endpoint where this transfer will be sent + * \param buffer data buffer + * \param length length of data buffer + * \param callback callback function to be invoked on transfer completion + * \param user_data user data to pass to callback function + * \param timeout timeout for the transfer in milliseconds + */ +static inline void libusb_fill_interrupt_transfer( + struct libusb_transfer *transfer, libusb_device_handle *dev_handle, + unsigned char endpoint, unsigned char *buffer, int length, + libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout) +{ + transfer->dev_handle = dev_handle; + transfer->endpoint = endpoint; + transfer->type = LIBUSB_TRANSFER_TYPE_INTERRUPT; + transfer->timeout = timeout; + transfer->buffer = buffer; + transfer->length = length; + transfer->user_data = user_data; + transfer->callback = callback; +} + +/** \ingroup asyncio + * Helper function to populate the required \ref libusb_transfer fields + * for an isochronous transfer. + * + * \param transfer the transfer to populate + * \param dev_handle handle of the device that will handle the transfer + * \param endpoint address of the endpoint where this transfer will be sent + * \param buffer data buffer + * \param length length of data buffer + * \param num_iso_packets the number of isochronous packets + * \param callback callback function to be invoked on transfer completion + * \param user_data user data to pass to callback function + * \param timeout timeout for the transfer in milliseconds + */ +static inline void libusb_fill_iso_transfer(struct libusb_transfer *transfer, + libusb_device_handle *dev_handle, unsigned char endpoint, + unsigned char *buffer, int length, int num_iso_packets, + libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout) +{ + transfer->dev_handle = dev_handle; + transfer->endpoint = endpoint; + transfer->type = LIBUSB_TRANSFER_TYPE_ISOCHRONOUS; + transfer->timeout = timeout; + transfer->buffer = buffer; + transfer->length = length; + transfer->num_iso_packets = num_iso_packets; + transfer->user_data = user_data; + transfer->callback = callback; +} + +/** \ingroup asyncio + * Convenience function to set the length of all packets in an isochronous + * transfer, based on the num_iso_packets field in the transfer structure. + * + * \param transfer a transfer + * \param length the length to set in each isochronous packet descriptor + * \see libusb_get_max_packet_size() + */ +static inline void libusb_set_iso_packet_lengths( + struct libusb_transfer *transfer, unsigned int length) +{ + int i; + for (i = 0; i < transfer->num_iso_packets; i++) + transfer->iso_packet_desc[i].length = length; +} + +/** \ingroup asyncio + * Convenience function to locate the position of an isochronous packet + * within the buffer of an isochronous transfer. + * + * This is a thorough function which loops through all preceding packets, + * accumulating their lengths to find the position of the specified packet. + * Typically you will assign equal lengths to each packet in the transfer, + * and hence the above method is sub-optimal. You may wish to use + * libusb_get_iso_packet_buffer_simple() instead. + * + * \param transfer a transfer + * \param packet the packet to return the address of + * \returns the base address of the packet buffer inside the transfer buffer, + * or NULL if the packet does not exist. + * \see libusb_get_iso_packet_buffer_simple() + */ +static inline unsigned char *libusb_get_iso_packet_buffer( + struct libusb_transfer *transfer, unsigned int packet) +{ + int i; + size_t offset = 0; + int _packet; + + /* oops..slight bug in the API. packet is an unsigned int, but we use + * signed integers almost everywhere else. range-check and convert to + * signed to avoid compiler warnings. FIXME for libusb-2. */ + if (packet > INT_MAX) + return NULL; + _packet = packet; + + if (_packet >= transfer->num_iso_packets) + return NULL; + + for (i = 0; i < _packet; i++) + offset += transfer->iso_packet_desc[i].length; + + return transfer->buffer + offset; +} + +/** \ingroup asyncio + * Convenience function to locate the position of an isochronous packet + * within the buffer of an isochronous transfer, for transfers where each + * packet is of identical size. + * + * This function relies on the assumption that every packet within the transfer + * is of identical size to the first packet. Calculating the location of + * the packet buffer is then just a simple calculation: + * buffer + (packet_size * packet) + * + * Do not use this function on transfers other than those that have identical + * packet lengths for each packet. + * + * \param transfer a transfer + * \param packet the packet to return the address of + * \returns the base address of the packet buffer inside the transfer buffer, + * or NULL if the packet does not exist. + * \see libusb_get_iso_packet_buffer() + */ +static inline unsigned char *libusb_get_iso_packet_buffer_simple( + struct libusb_transfer *transfer, unsigned int packet) +{ + int _packet; + + /* oops..slight bug in the API. packet is an unsigned int, but we use + * signed integers almost everywhere else. range-check and convert to + * signed to avoid compiler warnings. FIXME for libusb-2. */ + if (packet > INT_MAX) + return NULL; + _packet = packet; + + if (_packet >= transfer->num_iso_packets) + return NULL; + + return transfer->buffer + (transfer->iso_packet_desc[0].length * _packet); +} + +/* sync I/O */ + +int LIBUSB_CALL libusb_control_transfer(libusb_device_handle *dev_handle, + uint8_t request_type, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, + unsigned char *data, uint16_t wLength, unsigned int timeout); + +int LIBUSB_CALL libusb_bulk_transfer(libusb_device_handle *dev_handle, + unsigned char endpoint, unsigned char *data, int length, + int *actual_length, unsigned int timeout); + +int LIBUSB_CALL libusb_interrupt_transfer(libusb_device_handle *dev_handle, + unsigned char endpoint, unsigned char *data, int length, + int *actual_length, unsigned int timeout); + +/** \ingroup desc + * Retrieve a descriptor from the default control pipe. + * This is a convenience function which formulates the appropriate control + * message to retrieve the descriptor. + * + * \param dev a device handle + * \param desc_type the descriptor type, see \ref libusb_descriptor_type + * \param desc_index the index of the descriptor to retrieve + * \param data output buffer for descriptor + * \param length size of data buffer + * \returns number of bytes returned in data, or LIBUSB_ERROR code on failure + */ +static inline int libusb_get_descriptor(libusb_device_handle *dev, + uint8_t desc_type, uint8_t desc_index, unsigned char *data, int length) +{ + return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN, + LIBUSB_REQUEST_GET_DESCRIPTOR, (desc_type << 8) | desc_index, 0, data, + (uint16_t) length, 1000); +} + +/** \ingroup desc + * Retrieve a descriptor from a device. + * This is a convenience function which formulates the appropriate control + * message to retrieve the descriptor. The string returned is Unicode, as + * detailed in the USB specifications. + * + * \param dev a device handle + * \param desc_index the index of the descriptor to retrieve + * \param langid the language ID for the string descriptor + * \param data output buffer for descriptor + * \param length size of data buffer + * \returns number of bytes returned in data, or LIBUSB_ERROR code on failure + * \see libusb_get_string_descriptor_ascii() + */ +static inline int libusb_get_string_descriptor(libusb_device_handle *dev, + uint8_t desc_index, uint16_t langid, unsigned char *data, int length) +{ + return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN, + LIBUSB_REQUEST_GET_DESCRIPTOR, (uint16_t)((LIBUSB_DT_STRING << 8) | desc_index), + langid, data, (uint16_t) length, 1000); +} + +int LIBUSB_CALL libusb_get_string_descriptor_ascii(libusb_device_handle *dev, + uint8_t desc_index, unsigned char *data, int length); + +/* polling and timeouts */ + +int LIBUSB_CALL libusb_try_lock_events(libusb_context *ctx); +void LIBUSB_CALL libusb_lock_events(libusb_context *ctx); +void LIBUSB_CALL libusb_unlock_events(libusb_context *ctx); +int LIBUSB_CALL libusb_event_handling_ok(libusb_context *ctx); +int LIBUSB_CALL libusb_event_handler_active(libusb_context *ctx); +void LIBUSB_CALL libusb_lock_event_waiters(libusb_context *ctx); +void LIBUSB_CALL libusb_unlock_event_waiters(libusb_context *ctx); +int LIBUSB_CALL libusb_wait_for_event(libusb_context *ctx, struct timeval *tv); + +int LIBUSB_CALL libusb_handle_events_timeout(libusb_context *ctx, + struct timeval *tv); +int LIBUSB_CALL libusb_handle_events_timeout_completed(libusb_context *ctx, + struct timeval *tv, int *completed); +int LIBUSB_CALL libusb_handle_events(libusb_context *ctx); +int LIBUSB_CALL libusb_handle_events_completed(libusb_context *ctx, int *completed); +int LIBUSB_CALL libusb_handle_events_locked(libusb_context *ctx, + struct timeval *tv); +int LIBUSB_CALL libusb_pollfds_handle_timeouts(libusb_context *ctx); +int LIBUSB_CALL libusb_get_next_timeout(libusb_context *ctx, + struct timeval *tv); + +/** \ingroup poll + * File descriptor for polling + */ +struct libusb_pollfd { + /** Numeric file descriptor */ + int fd; + + /** Event flags to poll for from . POLLIN indicates that you + * should monitor this file descriptor for becoming ready to read from, + * and POLLOUT indicates that you should monitor this file descriptor for + * nonblocking write readiness. */ + short events; +}; + +/** \ingroup poll + * Callback function, invoked when a new file descriptor should be added + * to the set of file descriptors monitored for events. + * \param fd the new file descriptor + * \param events events to monitor for, see \ref libusb_pollfd for a + * description + * \param user_data User data pointer specified in + * libusb_set_pollfd_notifiers() call + * \see libusb_set_pollfd_notifiers() + */ +typedef void (LIBUSB_CALL *libusb_pollfd_added_cb)(int fd, short events, + void *user_data); + +/** \ingroup poll + * Callback function, invoked when a file descriptor should be removed from + * the set of file descriptors being monitored for events. After returning + * from this callback, do not use that file descriptor again. + * \param fd the file descriptor to stop monitoring + * \param user_data User data pointer specified in + * libusb_set_pollfd_notifiers() call + * \see libusb_set_pollfd_notifiers() + */ +typedef void (LIBUSB_CALL *libusb_pollfd_removed_cb)(int fd, void *user_data); + +const struct libusb_pollfd ** LIBUSB_CALL libusb_get_pollfds( + libusb_context *ctx); +void LIBUSB_CALL libusb_set_pollfd_notifiers(libusb_context *ctx, + libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb, + void *user_data); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/software/libusb-1.0/x86/WdfCoInstaller01009.dll b/software/libusb-1.0/x86/WdfCoInstaller01009.dll new file mode 100644 index 0000000..30e81af Binary files /dev/null and b/software/libusb-1.0/x86/WdfCoInstaller01009.dll differ diff --git a/software/libusb-1.0/x86/winusbcoinstaller2.dll b/software/libusb-1.0/x86/winusbcoinstaller2.dll new file mode 100644 index 0000000..fc450d2 Binary files /dev/null and b/software/libusb-1.0/x86/winusbcoinstaller2.dll differ diff --git a/software/src/DRS.cpp b/software/src/DRS.cpp new file mode 100644 index 0000000..2b60164 --- /dev/null +++ b/software/src/DRS.cpp @@ -0,0 +1,7734 @@ +/******************************************************************** + + Name: DRS.cpp + Created by: Stefan Ritt, Matthias Schneebeli + + Contents: Library functions for DRS mezzanine and USB boards + + $Id: DRS.cpp 22289 2016-04-27 09:40:58Z ritt $ + +\********************************************************************/ + +#define NEW_TIMING_CALIBRATION + +#ifdef USE_DRS_MUTEX +#include "wx/wx.h" // must be before +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "strlcpy.h" +#include "DRS.h" + +#ifdef _MSC_VER +#pragma warning(disable:4996) +# include +# include +#else +# include +# include +inline void Sleep(useconds_t x) +{ + usleep(x * 1000); +} +#endif + +#ifdef _MSC_VER +#include +#define drs_kbhit() kbhit() +#else +#include + +int drs_kbhit() +{ + int n; + + ioctl(0, FIONREAD, &n); + return (n > 0); +} +static inline int getch() +{ + return getchar(); +} +#endif + +#include + +#ifdef _MSC_VER +extern "C" { +#endif + +#include + +#ifdef _MSC_VER +} +#endif + +/*---- minimal FPGA firmvare version required for this library -----*/ +const int REQUIRED_FIRMWARE_VERSION_DRS2 = 5268; +const int REQUIRED_FIRMWARE_VERSION_DRS3 = 6981; +const int REQUIRED_FIRMWARE_VERSION_DRS4 = 15147; + +/*---- calibration methods to be stored in EEPROMs -----------------*/ + +#define VCALIB_METHOD_V4 1 +#define TCALIB_METHOD_V4 1 + +#define VCALIB_METHOD 2 +#define TCALIB_METHOD 2 // correct for sampling frequency, calibrate every channel + +/*---- VME addresses -----------------------------------------------*/ +#ifdef HAVE_VME +/* assuming following DIP Switch settings: + + SW1-1: 1 (off) use geographical addressing (1=left, 21=right) + SW1-2: 1 (off) \ + SW1-3: 1 (off) > VME_WINSIZE = 8MB, subwindow = 1MB + SW1-4: 0 (on) / + SW1-5: 0 (on) reserverd + SW1-6: 0 (on) reserverd + SW1-7: 0 (on) reserverd + SW1-8: 0 (on) \ + | + SW2-1: 0 (on) | + SW2-2: 0 (on) | + SW2-3: 0 (on) | + SW2-4: 0 (on) > VME_ADDR_OFFSET = 0 + SW2-5: 0 (on) | + SW2-6: 0 (on) | + SW2-7: 0 (on) | + SW2-8: 0 (on) / + + which gives + VME base address = SlotNo * VME_WINSIZE + VME_ADDR_OFFSET + = SlotNo * 0x80'0000 +*/ +#define GEVPC_BASE_ADDR 0x00000000 +#define GEVPC_WINSIZE 0x800000 +#define GEVPC_USER_FPGA (GEVPC_WINSIZE*2/8) +#define PMC1_OFFSET 0x00000 +#define PMC2_OFFSET 0x80000 +#define PMC_CTRL_OFFSET 0x00000 /* all registers 32 bit */ +#define PMC_STATUS_OFFSET 0x10000 +#define PMC_FIFO_OFFSET 0x20000 +#define PMC_RAM_OFFSET 0x40000 +#endif // HAVE_VME +/*---- USB addresses -----------------------------------------------*/ +#define USB_TIMEOUT 1000 // one second +#ifdef HAVE_USB +#define USB_CTRL_OFFSET 0x00 /* all registers 32 bit */ +#define USB_STATUS_OFFSET 0x40 +#define USB_RAM_OFFSET 0x80 +#define USB_CMD_IDENT 0 // Query identification +#define USB_CMD_ADDR 1 // Address cycle +#define USB_CMD_READ 2 // "VME" read +#define USB_CMD_WRITE 3 // "VME" write +#define USB_CMD_READ12 4 // 12-bit read +#define USB_CMD_WRITE12 5 // 12-bit write + +#define USB2_CMD_READ 1 +#define USB2_CMD_WRITE 2 +#define USB2_CTRL_OFFSET 0x00000 /* all registers 32 bit */ +#define USB2_STATUS_OFFSET 0x10000 +#define USB2_FIFO_OFFSET 0x20000 +#define USB2_RAM_OFFSET 0x40000 +#endif // HAVE_USB + +/*------------------------------------------------------------------*/ + +using namespace std; + +#ifdef HAVE_USB +#define USB2_BUFFER_SIZE (1024*1024+10) +unsigned char static *usb2_buffer = NULL; +#endif + +/*------------------------------------------------------------------*/ + +#ifdef USE_DRS_MUTEX +static wxMutex *s_drsMutex = NULL; // used for wxWidgets multi-threaded programs +#endif + +/*------------------------------------------------------------------*/ + +DRS::DRS() +: fNumberOfBoards(0) +#ifdef HAVE_VME + , fVmeInterface(0) +#endif +{ +#ifdef HAVE_USB + MUSB_INTERFACE *usb_interface; +#endif + +#if defined(HAVE_VME) || defined(HAVE_USB) + int index = 0, i=0; +#endif + + memset(fError, 0, sizeof(fError)); + +#ifdef HAVE_VME + unsigned short type, fw, magic, serial, temperature; + mvme_addr_t addr; + + if (mvme_open(&fVmeInterface, 0) == MVME_SUCCESS) { + + mvme_set_am(fVmeInterface, MVME_AM_A32); + mvme_set_dmode(fVmeInterface, MVME_DMODE_D16); + + /* check all VME slave slots */ + for (index = 2; index <= 21; index++) { + + /* check PMC1 */ + addr = GEVPC_BASE_ADDR + index * GEVPC_WINSIZE; // VME board base address + addr += GEVPC_USER_FPGA; // UsrFPGA base address + addr += PMC1_OFFSET; // PMC1 offset + + mvme_set_dmode(fVmeInterface, MVME_DMODE_D16); + i = mvme_read(fVmeInterface, &magic, addr + PMC_STATUS_OFFSET + REG_MAGIC, 2); + if (i == 2) { + if (magic != 0xC0DE) { + printf("Found old firmware, please upgrade immediately!\n"); + fBoard[fNumberOfBoards] = new DRSBoard(fVmeInterface, addr, (index - 2) << 1); + fNumberOfBoards++; + } else { + + /* read board type */ + mvme_read(fVmeInterface, &type, addr + PMC_STATUS_OFFSET + REG_BOARD_TYPE, 2); + type &= 0xFF; + if (type == 2 || type == 3 || type == 4) { // DRS2 or DRS3 or DRS4 + + /* read firmware number */ + mvme_read(fVmeInterface, &fw, addr + PMC_STATUS_OFFSET + REG_VERSION_FW, 2); + + /* read serial number */ + mvme_read(fVmeInterface, &serial, addr + PMC_STATUS_OFFSET + REG_SERIAL_BOARD, 2); + + /* read temperature register to see if CMC card is present */ + mvme_read(fVmeInterface, &temperature, addr + PMC_STATUS_OFFSET + REG_TEMPERATURE, 2); + + /* LED blinking */ +#if 0 + do { + data = 0x00040000; + mvme_write(fVmeInterface, addr + PMC_CTRL_OFFSET + REG_CTRL, &data, sizeof(data)); + mvme_write(fVmeInterface, addr + PMC2_OFFSET + PMC_CTRL_OFFSET + REG_CTRL, &data, + sizeof(data)); + + Sleep(500); + + data = 0x00000000; + mvme_write(fVmeInterface, addr + PMC_CTRL_OFFSET + REG_CTRL, &data, sizeof(data)); + mvme_write(fVmeInterface, addr + PMC2_OFFSET + PMC_CTRL_OFFSET + REG_CTRL, data, + sizeof(data)); + + Sleep(500); + + } while (1); +#endif + + if (temperature == 0xFFFF) { + printf("Found VME board in slot %d, fw %d, but no CMC board in upper slot\n", index, fw); + } else { + printf("Found DRS%d board %2d in upper VME slot %2d, serial #%d, firmware revision %d\n", type, fNumberOfBoards, index, serial, fw); + + fBoard[fNumberOfBoards] = new DRSBoard(fVmeInterface, addr, (index - 2) << 1); + if (!fBoard[fNumberOfBoards]->HasCorrectFirmware()) + sprintf(fError, "Wrong firmware version: board has %d, required is %d. Board may not work correctly.\n", + fBoard[fNumberOfBoards]->GetFirmwareVersion(), + fBoard[fNumberOfBoards]->GetRequiredFirmwareVersion()); + fNumberOfBoards++; + } + } + } + } + + /* check PMC2 */ + addr = GEVPC_BASE_ADDR + index * GEVPC_WINSIZE; // VME board base address + addr += GEVPC_USER_FPGA; // UsrFPGA base address + addr += PMC2_OFFSET; // PMC2 offset + + mvme_set_dmode(fVmeInterface, MVME_DMODE_D16); + i = mvme_read(fVmeInterface, &fw, addr + PMC_STATUS_OFFSET + REG_MAGIC, 2); + if (i == 2) { + if (magic != 0xC0DE) { + printf("Found old firmware, please upgrade immediately!\n"); + fBoard[fNumberOfBoards] = new DRSBoard(fVmeInterface, addr, (index - 2) << 1 | 1); + fNumberOfBoards++; + } else { + + /* read board type */ + mvme_read(fVmeInterface, &type, addr + PMC_STATUS_OFFSET + REG_BOARD_TYPE, 2); + type &= 0xFF; + if (type == 2 || type == 3 || type == 4) { // DRS2 or DRS3 or DRS4 + + /* read firmware number */ + mvme_read(fVmeInterface, &fw, addr + PMC_STATUS_OFFSET + REG_VERSION_FW, 2); + + /* read serial number */ + mvme_read(fVmeInterface, &serial, addr + PMC_STATUS_OFFSET + REG_SERIAL_BOARD, 2); + + /* read temperature register to see if CMC card is present */ + mvme_read(fVmeInterface, &temperature, addr + PMC_STATUS_OFFSET + REG_TEMPERATURE, 2); + + if (temperature == 0xFFFF) { + printf("Found VME board in slot %d, fw %d, but no CMC board in lower slot\n", index, fw); + } else { + printf("Found DRS%d board %2d in lower VME slot %2d, serial #%d, firmware revision %d\n", type, fNumberOfBoards, index, serial, fw); + + fBoard[fNumberOfBoards] = new DRSBoard(fVmeInterface, addr, ((index - 2) << 1) | 1); + if (!fBoard[fNumberOfBoards]->HasCorrectFirmware()) + sprintf(fError, "Wrong firmware version: board has %d, required is %d. Board may not work correctly.\n", + fBoard[fNumberOfBoards]->GetFirmwareVersion(), + fBoard[fNumberOfBoards]->GetRequiredFirmwareVersion()); + fNumberOfBoards++; + } + } + } + } + } + } else + printf("Cannot access VME crate, check driver, power and connection\n"); +#endif // HAVE_VME + +#ifdef HAVE_USB + unsigned char buffer[512]; + int found, one_found, usb_slot; + + one_found = 0; + usb_slot = 0; + for (index = 0; index < 127; index++) { + found = 0; + + /* check for USB-Mezzanine test board */ + if (musb_open(&usb_interface, 0x10C4, 0x1175, index, 1, 0) == MUSB_SUCCESS) { + + /* check ID */ + buffer[0] = USB_CMD_IDENT; + musb_write(usb_interface, 2, buffer, 1, USB_TIMEOUT); + + i = musb_read(usb_interface, 1, (char *) buffer, sizeof(buffer), USB_TIMEOUT); + if (strcmp((char *) buffer, "USB_MEZZ2 V1.0") != 0) { + /* no USB-Mezzanine board found */ + musb_close(usb_interface); + } else { + usb_interface->usb_type = 1; // USB 1.1 + fBoard[fNumberOfBoards] = new DRSBoard(usb_interface, usb_slot++); + if (!fBoard[fNumberOfBoards]->HasCorrectFirmware()) + sprintf(fError, "Wrong firmware version: board has %d, required is %d. Board may not work correctly.\n", + fBoard[fNumberOfBoards]->GetFirmwareVersion(), + fBoard[fNumberOfBoards]->GetRequiredFirmwareVersion()); + fNumberOfBoards++; + found = 1; + one_found = 1; + } + } + + /* check for DRS4 evaluation board */ + if (musb_open(&usb_interface, 0x04B4, 0x1175, index, 1, 0) == MUSB_SUCCESS) { + + /* check ID */ + if (musb_get_device(usb_interface) != 1) { + /* no DRS evaluation board found */ + musb_close(usb_interface); + } else { + + /* drain any data from Cy7C68013 FIFO if FPGA startup caused erratic write */ + do { + i = musb_read(usb_interface, 8, buffer, sizeof(buffer), 100); + if (i > 0) + printf("%d bytes stuck in buffer\n", i); + } while (i > 0); + + usb_interface->usb_type = 2; // USB 2.0 + fBoard[fNumberOfBoards] = new DRSBoard(usb_interface, usb_slot++); + if (!fBoard[fNumberOfBoards]->HasCorrectFirmware()) + sprintf(fError, "Wrong firmware version: board has %d, required is %d. Board may not work correctly.\n", + fBoard[fNumberOfBoards]->GetFirmwareVersion(), + fBoard[fNumberOfBoards]->GetRequiredFirmwareVersion()); + fNumberOfBoards++; + found = 1; + one_found = 1; + } + } + + if (!found) { + if (!one_found) + printf("USB successfully scanned, but no boards found\n"); + break; + } + } +#endif // HAVE_USB + + return; +} + +/*------------------------------------------------------------------*/ + +DRS::~DRS() +{ + int i; + for (i = 0; i < fNumberOfBoards; i++) { + delete fBoard[i]; + } + +#ifdef HAVE_USB + if (usb2_buffer) { + free(usb2_buffer); + usb2_buffer = NULL; + } +#endif + +#ifdef HAVE_VME + mvme_close(fVmeInterface); +#endif +} + +/*------------------------------------------------------------------*/ + +void DRS::SortBoards() +{ + /* sort boards according to serial number (simple bubble sort) */ + for (int i=0 ; iGetBoardSerialNumber() < fBoard[j]->GetBoardSerialNumber()) { + DRSBoard* b = fBoard[i]; + fBoard[i] = fBoard[j]; + fBoard[j] = b; + } + } + } +} + +/*------------------------------------------------------------------*/ + +void DRS::SetBoard(int i, DRSBoard *b) +{ + fBoard[i] = b; +} + +/*------------------------------------------------------------------*/ + +bool DRS::GetError(char *str, int size) +{ + if (fError[0]) + strlcpy(str, fError, size); + + return fError[0] > 0; +} + +/*------------------------------------------------------------------*/ + +#ifdef HAVE_USB +DRSBoard::DRSBoard(MUSB_INTERFACE * musb_interface, int usb_slot) +: fDAC_COFSA(0) + , fDAC_COFSB(0) + , fDAC_DRA(0) + , fDAC_DSA(0) + , fDAC_TLEVEL(0) + , fDAC_ACALIB(0) + , fDAC_DSB(0) + , fDAC_DRB(0) + , fDAC_COFS(0) + , fDAC_ADCOFS(0) + , fDAC_CLKOFS(0) + , fDAC_ROFS_1(0) + , fDAC_ROFS_2(0) + , fDAC_INOFS(0) + , fDAC_BIAS(0) + , fDRSType(0) + , fBoardType(0) + , fRequiredFirmwareVersion(0) + , fFirmwareVersion(0) + , fBoardSerialNumber(0) + , fHasMultiBuffer(0) + , fCtrlBits(0) + , fNumberOfReadoutChannels(0) + , fReadoutChannelConfig(0) + , fADCClkPhase(0) + , fADCClkInvert(0) + , fExternalClockFrequency(0) + , fUsbInterface(musb_interface) +#ifdef HAVE_VME + , fVmeInterface(0) + , fBaseAddress(0) +#endif + , fSlotNumber(usb_slot) + , fNominalFrequency(0) + , fMultiBuffer(0) + , fDominoMode(0) + , fDominoActive(0) + , fChannelConfig(0) + , fChannelCascading(1) + , fChannelDepth(1024) + , fWSRLoop(0) + , fReadoutMode(0) + , fReadPointer(0) + , fNMultiBuffer(0) + , fTriggerEnable1(0) + , fTriggerEnable2(0) + , fTriggerSource(0) + , fTriggerDelay(0) + , fTriggerDelayNs(0) + , fSyncDelay(0) + , fDelayedStart(0) + , fTranspMode(0) + , fDecimation(0) + , fRange(0) + , fCommonMode(0.8) + , fAcalMode(0) + , fAcalVolt(0) + , fTcalFreq(0) + , fTcalLevel(0) + , fTcalPhase(0) + , fTcalSource(0) + , fRefclk(0) + , fMaxChips(0) + , fResponseCalibration(0) + , fVoltageCalibrationValid(false) + , fCellCalibratedRange(0) + , fCellCalibratedTemperature(0) + , fTimeData(0) + , fNumberOfTimeData(0) + , fDebug(0) + , fTriggerStartBin(0) +{ + if (musb_interface->usb_type == 1) + fTransport = TR_USB; + else + fTransport = TR_USB2; + memset(fStopCell, 0, sizeof(fStopCell)); + memset(fStopWSR, 0, sizeof(fStopWSR)); + fTriggerBus = 0; + ConstructBoard(); +} + +#endif + +#ifdef HAVE_VME +/*------------------------------------------------------------------*/ + +DRSBoard::DRSBoard(MVME_INTERFACE * mvme_interface, mvme_addr_t base_address, int slot_number) +:fDAC_COFSA(0) +, fDAC_COFSB(0) +, fDAC_DRA(0) +, fDAC_DSA(0) +, fDAC_TLEVEL(0) +, fDAC_ACALIB(0) +, fDAC_DSB(0) +, fDAC_DRB(0) +, fDAC_COFS(0) +, fDAC_ADCOFS(0) +, fDAC_CLKOFS(0) +, fDAC_ROFS_1(0) +, fDAC_ROFS_2(0) +, fDAC_INOFS(0) +, fDAC_BIAS(0) +, fDRSType(0) +, fBoardType(0) +, fRequiredFirmwareVersion(0) +, fFirmwareVersion(0) +, fBoardSerialNumber(0) +, fHasMultiBuffer(0) +, fTransport(TR_VME) +, fCtrlBits(0) +, fNumberOfReadoutChannels(0) +, fReadoutChannelConfig(0) +, fADCClkPhase(0) +, fADCClkInvert(0) +, fExternalClockFrequency(0) +#ifdef HAVE_USB +, fUsbInterface(0) +#endif +#ifdef HAVE_VME +, fVmeInterface(mvme_interface) +, fBaseAddress(base_address) +, fSlotNumber(slot_number) +#endif +, fNominalFrequency(0) +, fRefClock(0) +, fMultiBuffer(0) +, fDominoMode(1) +, fDominoActive(1) +, fChannelConfig(0) +, fChannelCascading(1) +, fChannelDepth(1024) +, fWSRLoop(1) +, fReadoutMode(0) +, fReadPointer(0) +, fNMultiBuffer(0) +, fTriggerEnable1(0) +, fTriggerEnable2(0) +, fTriggerSource(0) +, fTriggerDelay(0) +, fTriggerDelayNs(0) +, fSyncDelay(0) +, fDelayedStart(0) +, fTranspMode(0) +, fDecimation(0) +, fRange(0) +, fCommonMode(0.8) +, fAcalMode(0) +, fAcalVolt(0) +, fTcalFreq(0) +, fTcalLevel(0) +, fTcalPhase(0) +, fTcalSource(0) +, fRefclk(0) +, fMaxChips(0) +, fResponseCalibration(0) +, fTimeData(0) +, fNumberOfTimeData(0) +, fDebug(0) +, fTriggerStartBin(0) +{ + ConstructBoard(); +} + +#endif + +/*------------------------------------------------------------------*/ + +DRSBoard::~DRSBoard() +{ + int i; +#ifdef HAVE_USB + if (fTransport == TR_USB || fTransport == TR_USB2) + musb_close(fUsbInterface); +#endif + +#ifdef USE_DRS_MUTEX + if (s_drsMutex) + delete s_drsMutex; + s_drsMutex = NULL; +#endif + + // Response Calibration + delete fResponseCalibration; + + // Time Calibration + for (i = 0; i < fNumberOfTimeData; i++) { + delete fTimeData[i]; + } + delete[]fTimeData; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::ConstructBoard() +{ + unsigned char buffer[2]; + unsigned int bits; + + fDebug = 0; + fWSRLoop = 1; + fCtrlBits = 0; + + fExternalClockFrequency = 1000. / 30.; + strcpy(fCalibDirectory, "."); + + /* check board communication */ + if (Read(T_STATUS, buffer, REG_MAGIC, 2) < 0) { + InitFPGA(); + if (Read(T_STATUS, buffer, REG_MAGIC, 2) < 0) + return; + } + + ReadSerialNumber(); + + /* set correct reference clock */ + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + fRefClock = 60; + else + fRefClock = 33; + + /* get mode from hardware */ + bits = GetCtrlReg(); + fMultiBuffer = (bits & BIT_MULTI_BUFFER) > 0; + fNMultiBuffer = 0; + if (fHasMultiBuffer && fMultiBuffer) + fNMultiBuffer = 3; + if (fDRSType == 4) { + fDominoMode = (bits & BIT_CONFIG_DMODE) > 0; + } else { + fDominoMode = (bits & BIT_DMODE) > 0; + } + fTriggerEnable1 = (bits & BIT_ENABLE_TRIGGER1) > 0; + fTriggerEnable2 = (bits & BIT_ENABLE_TRIGGER2) > 0; + fTriggerSource = ((bits & BIT_TR_SOURCE1) > 0) | (((bits & BIT_TR_SOURCE2) > 0) << 1); + fReadoutMode = (bits & BIT_READOUT_MODE) > 0; + Read(T_CTRL, &fReadPointer, REG_READ_POINTER, 2); + fADCClkInvert = (bits & BIT_ADCCLK_INVERT) > 0; + fDominoActive = (bits & BIT_DACTIVE) > 0; + ReadFrequency(0, &fNominalFrequency); + if (fNominalFrequency < 0.1 || fNominalFrequency > 6) + fNominalFrequency = 1; + + /* initialize number of channels */ + if (fDRSType == 4) { + if (fBoardType == 6) { + unsigned short d; + Read(T_CTRL, &d, REG_CHANNEL_MODE, 2); + fReadoutChannelConfig = d & 0xFF; + if (d == 7) + fNumberOfReadoutChannels = 9; + else + fNumberOfReadoutChannels = 5; + } else + fNumberOfReadoutChannels = 9; + } else + fNumberOfReadoutChannels = 10; + + if (fBoardType == 1) { + fDAC_COFSA = 0; + fDAC_COFSB = 1; + fDAC_DRA = 2; + fDAC_DSA = 3; + fDAC_TLEVEL = 4; + fDAC_ACALIB = 5; + fDAC_DSB = 6; + fDAC_DRB = 7; + } else if (fBoardType == 2 || fBoardType == 3) { + fDAC_COFS = 0; + fDAC_DSA = 1; + fDAC_DSB = 2; + fDAC_TLEVEL = 3; + fDAC_CLKOFS = 5; + fDAC_ACALIB = 6; + fDAC_ADCOFS = 7; + } else if (fBoardType == 4) { + fDAC_ROFS_1 = 0; + fDAC_DSA = 1; + fDAC_DSB = 2; + fDAC_ROFS_2 = 3; + fDAC_BIAS = 4; + fDAC_INOFS = 5; + fDAC_ACALIB = 6; + fDAC_ADCOFS = 7; + } else if (fBoardType == 5) { + fDAC_ROFS_1 = 0; + fDAC_CMOFS = 1; + fDAC_CALN = 2; + fDAC_CALP = 3; + fDAC_BIAS = 4; + fDAC_TLEVEL = 5; + fDAC_ONOFS = 6; + } else if (fBoardType == 6) { + fDAC_ONOFS = 0; + fDAC_CMOFSP = 1; + fDAC_CALN = 2; + fDAC_CALP = 3; + fDAC_CMOFSN = 5; + fDAC_ROFS_1 = 6; + fDAC_BIAS = 7; + } else if (fBoardType == 7) { + fDAC_ROFS_1 = 0; + fDAC_CMOFS = 1; + fDAC_CALN = 2; + fDAC_CALP = 3; + fDAC_BIAS = 4; + fDAC_TLEVEL = 5; + fDAC_ONOFS = 6; + } else if (fBoardType == 8 || fBoardType == 9) { + fDAC_ROFS_1 = 0; + fDAC_TLEVEL4 = 1; + fDAC_CALN = 2; + fDAC_CALP = 3; + fDAC_BIAS = 4; + fDAC_TLEVEL1 = 5; + fDAC_TLEVEL2 = 6; + fDAC_TLEVEL3 = 7; + } + + if (fDRSType < 4) { + // Response Calibration + fResponseCalibration = new ResponseCalibration(this); + + // Time Calibration + fTimeData = new DRSBoard::TimeData *[kNumberOfChipsMax]; + fNumberOfTimeData = 0; + } +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::ReadSerialNumber() +{ + unsigned char buffer[2]; + int number; + + // check magic number + if (Read(T_STATUS, buffer, REG_MAGIC, 2) < 0) { + printf("Cannot read from board\n"); + return; + } + + number = (static_cast < int >(buffer[1]) << 8) +buffer[0]; + if (number != 0xC0DE) { + printf("Invalid magic number: %04X\n", number); + return; + } + + // read board type + Read(T_STATUS, buffer, REG_BOARD_TYPE, 2); + fDRSType = buffer[0]; + fBoardType = buffer[1]; + + // read firmware version + Read(T_STATUS, buffer, REG_VERSION_FW, 2); + fFirmwareVersion = (static_cast < int >(buffer[1]) << 8) +buffer[0]; + + // retrieve board serial number + Read(T_STATUS, buffer, REG_SERIAL_BOARD, 2); + number = (static_cast < int >(buffer[1]) << 8) +buffer[0]; + fBoardSerialNumber = number; + + // determine DRS type and board type for old boards from setial number + if (fBoardType == 0) { + // determine board version from serial number + if (number >= 2000 && number < 5000) { + fBoardType = 6; + fDRSType = 4; + } else if (number >= 1000) { + fBoardType = 4; + fDRSType = 3; + } else if (number >= 100) + fBoardType = 3; + else if (number > 0) + fBoardType = 2; + else { + fBoardType = 3; + fDRSType = 2; + fRequiredFirmwareVersion = REQUIRED_FIRMWARE_VERSION_DRS2; + } + } + + // set constants according to board type + if (fBoardType == 6) + fNumberOfChips = 4; + else + fNumberOfChips = 1; + + if (fDRSType == 4) + fNumberOfChannels = 9; + else + fNumberOfChannels = 10; + + // retrieve firmware version + if (fDRSType == 2) + fRequiredFirmwareVersion = REQUIRED_FIRMWARE_VERSION_DRS2; + if (fDRSType == 3) + fRequiredFirmwareVersion = REQUIRED_FIRMWARE_VERSION_DRS3; + if (fDRSType == 4) + fRequiredFirmwareVersion = REQUIRED_FIRMWARE_VERSION_DRS4; + + fHasMultiBuffer = ((fBoardType == 6) && fTransport == TR_VME); +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::ReadCalibration(void) +{ + unsigned short buf[1024*16]; // 32 kB + int i, j, chip; + + fVoltageCalibrationValid = false; + fTimingCalibratedFrequency = 0; + + memset(fCellOffset, 0, sizeof(fCellOffset)); + memset(fCellGain, 0, sizeof(fCellGain)); + memset(fCellOffset2, 0, sizeof(fCellOffset2)); + memset(fCellDT, 0, sizeof(fCellDT)); + + /* read offsets and gain from eeprom */ + if (fBoardType == 9) { + memset(buf, 0, sizeof(buf)); + ReadEEPROM(0, buf, 4096); + + /* check voltage calibration method */ + if ((buf[2] & 0xFF) == VCALIB_METHOD) + fVoltageCalibrationValid = true; + else { + fCellCalibratedRange = 0; + fCellCalibratedTemperature = -100; + return; + } + + /* check timing calibration method */ + if ((buf[2] >> 8) == TCALIB_METHOD) { + float fl; // float from two 16-bit integers + memcpy(&fl, &buf[8], sizeof(float)); + fTimingCalibratedFrequency = fl; + } else + fTimingCalibratedFrequency = -1; + + fCellCalibratedRange = ((int) (buf[10] & 0xFF)) / 100.0; // -50 ... +50 => -0.5 V ... +0.5 V + fCellCalibratedTemperature = (buf[10] >> 8) / 2.0; + + ReadEEPROM(1, buf, 1024*32); + for (i=0 ; i<8 ; i++) + for (j=0 ; j<1024; j++) { + fCellOffset[i][j] = buf[(i*1024+j)*2]; + fCellGain[i][j] = buf[(i*1024+j)*2 + 1]/65535.0*0.4+0.7; + } + + ReadEEPROM(2, buf, 1024*32); + for (i=0 ; i<8 ; i++) + for (j=0 ; j<1024; j++) + fCellOffset2[i][j] = buf[(i*1024+j)*2]; + + } else if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8) { + memset(buf, 0, sizeof(buf)); + ReadEEPROM(0, buf, 32); + + /* check voltage calibration method */ + if ((buf[2] & 0xFF) == VCALIB_METHOD_V4) // board < 9 has "1", board 9 has "2" + fVoltageCalibrationValid = true; + else { + fCellCalibratedRange = 0; + return; + } + fCellCalibratedTemperature = -100; + + /* check timing calibration method */ + if ((buf[4] & 0xFF) == TCALIB_METHOD_V4) { // board < 9 has "1", board 9 has "2" + fTimingCalibratedFrequency = buf[6] / 1000.0; + } else + fTimingCalibratedFrequency = -1; + + fCellCalibratedRange = ((int) (buf[2] >> 8)) / 100.0; // -50 ... +50 => -0.5 V ... +0.5 V + ReadEEPROM(1, buf, 1024*32); + for (i=0 ; i<8 ; i++) + for (j=0 ; j<1024; j++) { + fCellOffset[i][j] = buf[(i*1024+j)*2]; + fCellGain[i][j] = buf[(i*1024+j)*2 + 1]/65535.0*0.4+0.7; + } + + ReadEEPROM(2, buf, 1024*5*4); + for (i=0 ; i<1 ; i++) + for (j=0 ; j<1024; j++) { + fCellOffset[i+8][j] = buf[(i*1024+j)*2]; + fCellGain[i+8][j] = buf[(i*1024+j)*2 + 1]/65535.0*0.4+0.7; + } + + for (i=0 ; i<4 ; i++) + for (j=0 ; j<1024; j++) { + fCellOffset2[i*2][j] = buf[2*1024+(i*1024+j)*2]; + fCellOffset2[i*2+1][j] = buf[2*1024+(i*1024+j)*2+1]; + } + + } else if (fBoardType == 6) { + ReadEEPROM(0, buf, 16); + + /* check voltage calibration method */ + if ((buf[2] & 0xFF) == VCALIB_METHOD) + fVoltageCalibrationValid = true; + else { + fCellCalibratedRange = 0; + return; + } + + /* check timing calibration method */ + if ((buf[4] & 0xFF) == TCALIB_METHOD) + fTimingCalibratedFrequency = buf[6] / 1000.0; // 0 ... 6000 => 0 ... 6 GHz + else + fTimingCalibratedFrequency = 0; + + fCellCalibratedRange = ((int) (buf[2] >> 8)) / 100.0; // -50 ... +50 => -0.5 V ... +0.5 V + + for (chip=0 ; chip<4 ; chip++) { + ReadEEPROM(1+chip, buf, 1024*32); + for (i=0 ; i<8 ; i++) + for (j=0 ; j<1024; j++) { + fCellOffset[i+chip*9][j] = buf[(i*1024+j)*2]; + fCellGain[i+chip*9][j] = buf[(i*1024+j)*2 + 1]/65535.0*0.4+0.7; + } + } + + ReadEEPROM(5, buf, 1024*4*4); + for (chip=0 ; chip<4 ; chip++) + for (j=0 ; j<1024; j++) { + fCellOffset[8+chip*9][j] = buf[j*2+chip*0x0800]; + fCellGain[8+chip*9][j] = buf[j*2+1+chip*0x0800]/65535.0*0.4+0.7; + } + + ReadEEPROM(7, buf, 1024*32); + for (i=0 ; i<8 ; i++) { + for (j=0 ; j<1024; j++) { + fCellOffset2[i][j] = buf[i*0x800 + j*2]; + fCellOffset2[i+9][j] = buf[i*0x800 + j*2+1]; + } + } + + ReadEEPROM(8, buf, 1024*32); + for (i=0 ; i<8 ; i++) { + for (j=0 ; j<1024; j++) { + fCellOffset2[i+18][j] = buf[i*0x800 + j*2]; + fCellOffset2[i+27][j] = buf[i*0x800 + j*2+1]; + } + } + + } else + return; + + /* read timing calibration from eeprom */ + if (fBoardType == 9) { + if (fTimingCalibratedFrequency == 0) { + for (i=0 ; i<8 ; i++) + for (j=0 ; j<1024 ; j++) { + fCellDT[0][i][j] = 1/fNominalFrequency; + } + } else { + ReadEEPROM(2, buf, 1024*32); + for (i=0 ; i<8 ; i++) + for (j=0 ; j<1024; j++) { + fCellDT[0][i][j] = (buf[(i*1024+j)*2+1] - 1000) / 10000.0; + } + } + } else if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8) { + if (fTimingCalibratedFrequency == 0) { + for (i=0 ; i<1024 ; i++) + fCellDT[0][0][i] = 1/fNominalFrequency; + } else { + ReadEEPROM(0, buf, 1024*sizeof(short)*2); + for (i=0 ; i<8 ; i++) { + for (j=0 ; j<1024; j++) { + // use calibration for all channels + fCellDT[0][i][j] = buf[j*2+1]/10000.0; + } + } + } + } else if (fBoardType == 6) { + if (fTimingCalibratedFrequency == 0) { + for (i=0 ; i<1024 ; i++) + for (j=0 ; j<4 ; j++) + fCellDT[0][j][i] = 1/fNominalFrequency; + } else { + ReadEEPROM(6, buf, 1024*sizeof(short)*4); + for (i=0 ; i<1024; i++) { + fCellDT[0][0][i] = buf[i*2]/10000.0; + fCellDT[1][0][i] = buf[i*2+1]/10000.0; + fCellDT[2][0][i] = buf[i*2+0x800]/10000.0; + fCellDT[3][0][i] = buf[i*2+0x800+1]/10000.0; + } + } + } + +#if 0 + /* Read Daniel's file */ + int fh = open("cal_ch2.dat", O_RDONLY); + float v; + read(fh, &v, sizeof(float)); + for (i=0 ; i<1024 ; i++) { + read(fh, &v, sizeof(float)); + fCellDT[0][2][(i+0) % 1024] = v; + } + close(fh); + fh = open("cal_ch4.dat", O_RDONLY); + read(fh, &v, sizeof(float)); + for (i=0 ; i<1024 ; i++) { + read(fh, &v, sizeof(float)); + fCellDT[0][6][(i+0)%1024] = v; + } + close(fh); +#endif + +#if 0 + /* write timing calibration to EEPROM page 0 */ + double t1, t2; + ReadEEPROM(0, buf, sizeof(buf)); + for (i=0,t1=0 ; i<1024; i++) { + t2 = fCellT[0][i] - t1; + t2 = (unsigned short) (t2 * 10000 + 0.5); + t1 += t2 / 10000.0; + buf[i*2+1] = (unsigned short) t2; + } + + /* write calibration method and frequency */ + buf[4] = TCALIB_METHOD; + buf[6] = (unsigned short) (fNominalFrequency * 1000 + 0.5); + fTimingCalibratedFrequency = buf[6] / 1000.0; + WriteEEPROM(0, buf, sizeof(buf)); +#endif + +} + +/*------------------------------------------------------------------*/ + +bool DRSBoard::HasCorrectFirmware() +{ + /* check for required firmware version */ + return (fFirmwareVersion >= fRequiredFirmwareVersion); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::InitFPGA(void) +{ + +#ifdef HAVE_USB + if (fTransport == TR_USB2) { + unsigned char buffer[1]; + int i, status; + + /* blink Cy7C68013A LED and issue an FPGA reset */ + buffer[0] = 0; // LED off + musb_write(fUsbInterface, 1, buffer, 1, 100); + Sleep(50); + + buffer[0] = 1; // LED on + musb_write(fUsbInterface, 1, buffer, 1, 100); + + /* wait until EEPROM page #0 has been read */ + for (i=0 ; i<100 ; i++) { + Read(T_STATUS, &status, REG_STATUS, 4); + if ((status & BIT_SERIAL_BUSY) == 0) + break; + Sleep(10); + } + } +#endif + + return 1; +} + +/*------------------------------------------------------------------*/ + +/* Generic read function accessing VME or USB */ + +int DRSBoard::Write(int type, unsigned int addr, void *data, int size) +{ +#ifdef USE_DRS_MUTEX + if (!s_drsMutex) { + s_drsMutex = new wxMutex(); + assert(s_drsMutex); + } + s_drsMutex->Lock(); +#endif + + if (fTransport == TR_VME) { + +#ifdef HAVE_VME + unsigned int base_addr; + + base_addr = fBaseAddress; + + if (type == T_CTRL) + base_addr += PMC_CTRL_OFFSET; + else if (type == T_STATUS) + base_addr += PMC_STATUS_OFFSET; + else if (type == T_RAM) + base_addr += PMC_RAM_OFFSET; + + if (size == 1) { + /* 8-bit write access */ + mvme_set_dmode(fVmeInterface, MVME_DMODE_D8); + mvme_write(fVmeInterface, base_addr + addr, static_cast < mvme_locaddr_t * >(data), size); + } else if (size == 2) { + /* 16-bit write access */ + mvme_set_dmode(fVmeInterface, MVME_DMODE_D16); + mvme_write(fVmeInterface, base_addr + addr, static_cast < mvme_locaddr_t * >(data), size); + } else { + mvme_set_dmode(fVmeInterface, MVME_DMODE_D32); + + /* as long as no block transfer is supported, do pseudo block transfer */ + mvme_set_blt(fVmeInterface, MVME_BLT_NONE); + + mvme_write(fVmeInterface, base_addr + addr, static_cast < mvme_locaddr_t * >(data), size); + } + +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + return size; +#endif // HAVE_VME + + } else if (fTransport == TR_USB) { +#ifdef HAVE_USB + unsigned char buffer[64], ack; + unsigned int base_addr; + int i, j, n; + + if (type == T_CTRL) + base_addr = USB_CTRL_OFFSET; + else if (type == T_STATUS) + base_addr = USB_STATUS_OFFSET; + else if (type == T_RAM) + base_addr = USB_RAM_OFFSET; + else + base_addr = 0; + + if (type != T_RAM) { + + /*---- register access ----*/ + + if (size == 2) { + /* word swapping: first 16 bit sit at upper address */ + if ((addr % 4) == 0) + addr = addr + 2; + else + addr = addr - 2; + } + + buffer[0] = USB_CMD_WRITE; + buffer[1] = base_addr + addr; + buffer[2] = size; + + for (i = 0; i < size; i++) + buffer[3 + i] = *((unsigned char *) data + i); + + /* try 10 times */ + ack = 0; + for (i = 0; i < 10; i++) { + n = musb_write(fUsbInterface, 2, buffer, 3 + size, USB_TIMEOUT); + if (n == 3 + size) { + for (j = 0; j < 10; j++) { + /* wait for acknowledge */ + n = musb_read(fUsbInterface, 1, &ack, 1, USB_TIMEOUT); + if (n == 1 && ack == 1) + break; + + printf("Redo receive\n"); + } + } + + if (ack == 1) { +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + return size; + } + + printf("Redo send\n"); + } + } else { + + /*---- RAM access ----*/ + + buffer[0] = USB_CMD_ADDR; + buffer[1] = base_addr + addr; + musb_write(fUsbInterface, 2, buffer, 2, USB_TIMEOUT); + + /* chop buffer into 60-byte packets */ + for (i = 0; i <= (size - 1) / 60; i++) { + n = size - i * 60; + if (n > 60) + n = 60; + buffer[0] = USB_CMD_WRITE12; + buffer[1] = n; + + for (j = 0; j < n; j++) + buffer[2 + j] = *((unsigned char *) data + j + i * 60); + + musb_write(fUsbInterface, 2, buffer, 2 + n, USB_TIMEOUT); + + for (j = 0; j < 10; j++) { + /* wait for acknowledge */ + n = musb_read(fUsbInterface, 1, &ack, 1, USB_TIMEOUT); + if (n == 1 && ack == 1) + break; + + printf("Redo receive acknowledge\n"); + } + } + +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + return size; + } +#endif // HAVE_USB + } else if (fTransport == TR_USB2) { +#ifdef HAVE_USB + unsigned int base_addr; + int i; + + if (usb2_buffer == NULL) + usb2_buffer = (unsigned char *) malloc(USB2_BUFFER_SIZE); + assert(usb2_buffer); + + /* only accept even address and number of bytes */ + assert(addr % 2 == 0); + assert(size % 2 == 0); + + /* check for maximum size */ + assert(size <= USB2_BUFFER_SIZE - 10); + + if (type == T_CTRL) + base_addr = USB2_CTRL_OFFSET; + else if (type == T_STATUS) + base_addr = USB2_STATUS_OFFSET; + else if (type == T_FIFO) + base_addr = USB2_FIFO_OFFSET; + else if (type == T_RAM) + base_addr = USB2_RAM_OFFSET; + else + base_addr = 0; + + if (type != T_RAM && size == 2) { + /* word swapping: first 16 bit sit at upper address */ + if ((addr % 4) == 0) + addr = addr + 2; + else + addr = addr - 2; + } + + addr += base_addr; + + usb2_buffer[0] = USB2_CMD_WRITE; + usb2_buffer[1] = 0; + + usb2_buffer[2] = (addr >> 0) & 0xFF; + usb2_buffer[3] = (addr >> 8) & 0xFF; + usb2_buffer[4] = (addr >> 16) & 0xFF; + usb2_buffer[5] = (addr >> 24) & 0xFF; + + usb2_buffer[6] = (size >> 0) & 0xFF; + usb2_buffer[7] = (size >> 8) & 0xFF; + usb2_buffer[8] = (size >> 16) & 0xFF; + usb2_buffer[9] = (size >> 24) & 0xFF; + + for (i = 0; i < size; i++) + usb2_buffer[10 + i] = *((unsigned char *) data + i); + + i = musb_write(fUsbInterface, 4, usb2_buffer, 10 + size, USB_TIMEOUT); + if (i != 10 + size) + printf("musb_write error: %d\n", i); + +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + return i; +#endif // HAVE_USB + } + +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + return 0; +} + +/*------------------------------------------------------------------*/ + +/* Generic read function accessing VME or USB */ + +int DRSBoard::Read(int type, void *data, unsigned int addr, int size) +{ +#ifdef USE_DRS_MUTEX + if (!s_drsMutex) { + s_drsMutex = new wxMutex(); + assert(s_drsMutex); + } + s_drsMutex->Lock(); +#endif + + memset(data, 0, size); + + if (fTransport == TR_VME) { + +#ifdef HAVE_VME + unsigned int base_addr; + int n, i; + + base_addr = fBaseAddress; + + if (type == T_CTRL) + base_addr += PMC_CTRL_OFFSET; + else if (type == T_STATUS) + base_addr += PMC_STATUS_OFFSET; + else if (type == T_RAM) + base_addr += PMC_RAM_OFFSET; + else if (type == T_FIFO) + base_addr += PMC_FIFO_OFFSET; + + mvme_set_dmode(fVmeInterface, MVME_DMODE_D32); + + n = 0; + if (size == 1) { + /* 8-bit read access */ + mvme_set_dmode(fVmeInterface, MVME_DMODE_D8); + n = mvme_read(fVmeInterface, static_cast < mvme_locaddr_t * >(data), base_addr + addr, size); + } else if (size == 2) { + /* 16-bit read access */ + mvme_set_dmode(fVmeInterface, MVME_DMODE_D16); + n = mvme_read(fVmeInterface, static_cast < mvme_locaddr_t * >(data), base_addr + addr, size); + } else { + mvme_set_dmode(fVmeInterface, MVME_DMODE_D32); + + //mvme_set_blt(fVmeInterface, MVME_BLT_NONE); // pseudo block transfer + mvme_set_blt(fVmeInterface, MVME_BLT_2EVME); // 2eVME if implemented + n = mvme_read(fVmeInterface, static_cast < mvme_locaddr_t * >(data), base_addr + addr, size); + while (n != size) { + printf("Only read %d out of %d, retry with %d: ", n, size, size - n); + i = mvme_read(fVmeInterface, static_cast < mvme_locaddr_t * >(data) + n / 4, base_addr + addr + n, + size - n); + printf("read %d\n", i); + if (i == 0) { + printf("Error reading VME\n"); + return n; + } + n += i; + } + + //for (i = 0; i < size; i += 4) + // mvme_read(fVmeInterface, (mvme_locaddr_t *)((char *)data+i), base_addr + addr+i, 4); + } + +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + + return n; + +#endif // HAVE_VME + } else if (fTransport == TR_USB) { +#ifdef HAVE_USB + unsigned char buffer[64]; + unsigned int base_addr; + int i, j, ret, n; + + if (type == T_CTRL) + base_addr = USB_CTRL_OFFSET; + else if (type == T_STATUS) + base_addr = USB_STATUS_OFFSET; + else if (type == T_RAM) + base_addr = USB_RAM_OFFSET; + else + assert(0); // FIFO not implemented + + if (type != T_RAM) { + + /*---- register access ----*/ + + if (size == 2) { + /* word swapping: first 16 bit sit at uppder address */ + if ((addr % 4) == 0) + addr = addr + 2; + else + addr = addr - 2; + } + + buffer[0] = USB_CMD_READ; + buffer[1] = base_addr + addr; + buffer[2] = size; + + musb_write(fUsbInterface, 2, buffer, 2 + size, USB_TIMEOUT); + i = musb_read(fUsbInterface, 1, data, size, USB_TIMEOUT); + +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + if (i != size) + return 0; + + return size; + } else { + + /*---- RAM access ----*/ + + /* in RAM mode, only the 2048-byte page can be selected */ + buffer[0] = USB_CMD_ADDR; + buffer[1] = base_addr + (addr >> 11); + musb_write(fUsbInterface, 2, buffer, 2, USB_TIMEOUT); + + /* receive data in 60-byte packets */ + for (i = 0; i <= (size - 1) / 60; i++) { + n = size - i * 60; + if (n > 60) + n = 60; + buffer[0] = USB_CMD_READ12; + buffer[1] = n; + musb_write(fUsbInterface, 2, buffer, 2, USB_TIMEOUT); + + ret = musb_read(fUsbInterface, 1, buffer, n, USB_TIMEOUT); + + if (ret != n) { + /* try again */ + ret = musb_read(fUsbInterface, 1, buffer, n, USB_TIMEOUT); + if (ret != n) { +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + return 0; + } + } + + for (j = 0; j < ret; j++) + *((unsigned char *) data + j + i * 60) = buffer[j]; + } + +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + return size; + } +#endif // HAVE_USB + } else if (fTransport == TR_USB2) { +#ifdef HAVE_USB + unsigned char buffer[10]; + unsigned int base_addr; + int i; + + /* only accept even address and number of bytes */ + assert(addr % 2 == 0); + assert(size % 2 == 0); + + /* check for maximum size */ + assert(size <= USB2_BUFFER_SIZE - 10); + + if (type == T_CTRL) + base_addr = USB2_CTRL_OFFSET; + else if (type == T_STATUS) + base_addr = USB2_STATUS_OFFSET; + else if (type == T_FIFO) + base_addr = USB2_FIFO_OFFSET; + else if (type == T_RAM) + base_addr = USB2_RAM_OFFSET; + else + base_addr = 0; + + if (type != T_RAM && size == 2) { + /* word swapping: first 16 bit sit at upper address */ + if ((addr % 4) == 0) + addr = addr + 2; + else + addr = addr - 2; + } + + addr += base_addr; + + buffer[0] = USB2_CMD_READ; + buffer[1] = 0; + + buffer[2] = (addr >> 0) & 0xFF; + buffer[3] = (addr >> 8) & 0xFF; + buffer[4] = (addr >> 16) & 0xFF; + buffer[5] = (addr >> 24) & 0xFF; + + buffer[6] = (size >> 0) & 0xFF; + buffer[7] = (size >> 8) & 0xFF; + buffer[8] = (size >> 16) & 0xFF; + buffer[9] = (size >> 24) & 0xFF; + + i = musb_write(fUsbInterface, 4, buffer, 10, USB_TIMEOUT); + if (i != 10) + printf("musb_read error %d\n", i); + + i = musb_read(fUsbInterface, 8, data, size, USB_TIMEOUT); +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + return i; +#endif // HAVE_USB + } + +#ifdef USE_DRS_MUTEX + s_drsMutex->Unlock(); +#endif + return 0; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::SetLED(int state) +{ + // Set LED state + if (state) + fCtrlBits |= BIT_LED; + else + fCtrlBits &= ~BIT_LED; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetChannelConfig(int firstChannel, int lastChannel, int nConfigChannels) +{ + unsigned short d; + + if (lastChannel < 0 || lastChannel > 10) { + printf("Invalid number of channels: %d (must be between 0 and 10)\n", lastChannel); + return 0; + } + + // Set number of channels + if (fDRSType == 2) { + // register must contain last channel to read out starting from 9 + d = 9 - lastChannel; + Write(T_CTRL, REG_CHANNEL_CONFIG, &d, 2); + } else if (fDRSType == 3) { + // upper four bits of register must contain last channel to read out starting from 9 + d = (firstChannel << 4) | lastChannel; + Write(T_CTRL, REG_CHANNEL_MODE, &d, 2); + + // set bit pattern for write shift register + switch (nConfigChannels) { + case 1: + d = 0x001; + break; + case 2: + d = 0x041; + break; + case 3: + d = 0x111; + break; + case 4: + d = 0x249; + break; + case 6: + d = 0x555; + break; + case 12: + d = 0xFFF; + break; + default: + printf("Invalid channel configuration\n"); + return 0; + } + Write(T_CTRL, REG_CHANNEL_CONFIG, &d, 2); + } else if (fDRSType == 4) { + + int oldMultiBuffer = fMultiBuffer; + + // make sure FPGA state machine is idle + if (fHasMultiBuffer) { + SetMultiBuffer(0); + if (IsBusy()) { + SoftTrigger(); + while (IsBusy()); + } + } + + if (fBoardType == 6) { + // determined channel readout mode A/C[even/odd], B/D[even/odd] or A/B/C/D + fReadoutChannelConfig = firstChannel; + Read(T_CTRL, &d, REG_CHANNEL_MODE, 2); + d = (d & 0xFF00) | firstChannel; // keep higher 8 bits which are ADClkPhase + Write(T_CTRL, REG_CHANNEL_MODE, &d, 2); + } else { + // upper four bits of register must contain last channel to read out starting from 9 + Read(T_CTRL, &d, REG_CHANNEL_MODE, 2); + d = (d & 0xFF00) | (firstChannel << 4) | lastChannel; // keep higher 8 bits which are ADClkPhase + Write(T_CTRL, REG_CHANNEL_MODE, &d, 2); + } + + // set bit pattern for write shift register + fChannelConfig = 0; + switch (nConfigChannels) { + case 1: + fChannelConfig = 0x01; + fChannelCascading = 8; + break; + case 2: + fChannelConfig = 0x11; + fChannelCascading = 4; + break; + case 4: + fChannelConfig = 0x55; + fChannelCascading = 2; + break; + case 8: + fChannelConfig = 0xFF; + fChannelCascading = 1; + break; + default: + printf("Invalid channel configuration\n"); + return 0; + } + d = fChannelConfig | (fDominoMode << 8) | (1 << 9) | (fWSRLoop << 10) | (0xF8 << 8); + + Write(T_CTRL, REG_CHANNEL_CONFIG, &d, 2); + + fChannelDepth = fChannelCascading * (fDecimation ? kNumberOfBins/2 : kNumberOfBins); + + if (fHasMultiBuffer && oldMultiBuffer) { + Reinit(); // set WP=0 + SetMultiBuffer(oldMultiBuffer); + SetMultiBufferRP(0); + } + } + + if (fBoardType == 6) { + if (fReadoutChannelConfig == 7) + fNumberOfReadoutChannels = 9; + else + fNumberOfReadoutChannels = 5; + } else { + fNumberOfReadoutChannels = lastChannel - firstChannel + 1; + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::SetNumberOfChannels(int nChannels) +{ + SetChannelConfig(0, nChannels - 1, 12); +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::SetADCClkPhase(int phase, bool invert) +{ + unsigned short d = 0; + + /* Set the clock phase of the ADC via the variable phase shift + in the Xilinx DCM. One unit is equal to the clock period / 256, + so at 30 MHz this is about 130ps. The possible range at 30 MHz + is -87 ... +87 */ + + // keep lower 8 bits which are the channel mode + Read(T_CTRL, &d, REG_ADCCLK_PHASE, 2); + d = (d & 0x00FF) | (phase << 8); + Write(T_CTRL, REG_ADCCLK_PHASE, &d, 2); + + if (invert) + fCtrlBits |= BIT_ADCCLK_INVERT; + else + fCtrlBits &= ~BIT_ADCCLK_INVERT; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + fADCClkPhase = phase; + fADCClkInvert = invert; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::SetWarmup(unsigned int microseconds) +{ + /* Set the "warmup" time. When starting the domino wave, the DRS4 + chip together with its power supply need some time to stabilize + before high resolution data can be taken (jumping baseline + problem). This sets the time in ticks of 900ns before triggers + are accepted */ + + unsigned short ticks; + + if (microseconds == 0) + ticks = 0; + else + ticks = (unsigned short) (microseconds / 0.9 + 0.5) - 1; + Write(T_CTRL, REG_WARMUP, &ticks, 2); +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::SetCooldown(unsigned int microseconds) +{ + /* Set the "cooldown" time. When stopping the domino wave, the + power supply needs some time to stabilize before high resolution + data can read out (slanted baseline problem). This sets the + time in ticks of 900 ns before the readout is started */ + + unsigned short ticks; + + ticks = (unsigned short) (microseconds / 0.9 + 0.5) - 1; + Write(T_CTRL, REG_COOLDOWN, &ticks, 2); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetDAC(unsigned char channel, double value) +{ + // Set DAC value + unsigned short d; + + /* normalize to 2.5V for 16 bit */ + if (value < 0) + value = 0; + if (value > 2.5) + value = 2.5; + d = static_cast < unsigned short >(value / 2.5 * 0xFFFF + 0.5); + + Write(T_CTRL, REG_DAC_OFS + (channel * 2), &d, 2); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::ReadDAC(unsigned char channel, double *value) +{ + // Readback DAC value from control register + unsigned char buffer[2]; + + /* map 0->1, 1->0, 2->3, 3->2, etc. */ + //ofs = channel + 1 - 2*(channel % 2); + + Read(T_CTRL, buffer, REG_DAC_OFS + (channel * 2), 2); + + /* normalize to 2.5V for 16 bit */ + *value = 2.5 * (buffer[0] + (buffer[1] << 8)) / 0xFFFF; + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetRegulationDAC(double *value) +{ + // Get DAC value from status register (-> freq. regulation) + unsigned char buffer[2]; + + if (fBoardType == 1) + Read(T_STATUS, buffer, REG_RDAC3, 2); + else if (fBoardType == 2 || fBoardType == 3 || fBoardType == 4) + Read(T_STATUS, buffer, REG_RDAC1, 2); + else + memset(buffer, 0, sizeof(buffer)); + + /* normalize to 2.5V for 16 bit */ + *value = 2.5 * (buffer[0] + (buffer[1] << 8)) / 0xFFFF; + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::StartDomino() +{ + // Start domino sampling + fCtrlBits |= BIT_START_TRIG; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + fCtrlBits &= ~BIT_START_TRIG; + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::Reinit() +{ + // Stop domino sampling + // reset readout state machine + // reset FIFO counters + fCtrlBits |= BIT_REINIT_TRIG; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + fCtrlBits &= ~BIT_REINIT_TRIG; + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::Init() +{ + // Init FPGA on USB2 board + InitFPGA(); + + // Turn off multi-buffer mode to avoid immediate startup + SetMultiBuffer(0); + + // Reinitialize + fCtrlBits |= BIT_REINIT_TRIG; // reset readout state machine + if (fDRSType == 2) + fCtrlBits &= ~BIT_FREQ_AUTO_ADJ; // turn auto. freq regul. off + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + fCtrlBits &= ~BIT_REINIT_TRIG; + + if (fBoardType == 1) { + // set max. domino speed + SetDAC(fDAC_DRA, 2.5); + SetDAC(fDAC_DSA, 2.5); + SetDAC(fDAC_DRB, 2.5); + SetDAC(fDAC_DSB, 2.5); + // set readout offset + SetDAC(fDAC_COFSA, 0.9); + SetDAC(fDAC_COFSB, 0.9); + SetDAC(fDAC_TLEVEL, 1.7); + } else if (fBoardType == 2 || fBoardType == 3) { + // set max. domino speed + SetDAC(fDAC_DSA, 2.5); + SetDAC(fDAC_DSB, 2.5); + + // set readout offset + SetDAC(fDAC_COFS, 0.9); + SetDAC(fDAC_TLEVEL, 1.7); + SetDAC(fDAC_ADCOFS, 1.7); // 1.7 for DC coupling, 1.25 for AC + SetDAC(fDAC_CLKOFS, 1); + } else if (fBoardType == 4) { + // set max. domino speed + SetDAC(fDAC_DSA, 2.5); + SetDAC(fDAC_DSB, 2.5); + + // set readout offset + SetDAC(fDAC_ROFS_1, 1.25); // LVDS level + //SetDAC(fDAC_ROFS_2, 0.85); // linear range 0.1V ... 1.1V + SetDAC(fDAC_ROFS_2, 1.05); // differential input from Lecce splitter + + SetDAC(fDAC_ADCOFS, 1.25); + SetDAC(fDAC_ACALIB, 0.5); + SetDAC(fDAC_INOFS, 0.6); + SetDAC(fDAC_BIAS, 0.70); // a bit above the internal bias of 0.68V + + } else if (fBoardType == 5) { + // DRS4 USB Evaluation Board 1.1 + 2.0 + + // set max. domino speed + SetDAC(fDAC_DSA, 2.5); + + // set readout offset + fROFS = 1.6; // differential input range -0.5V ... +0.5V + fRange = 0; + SetDAC(fDAC_ROFS_1, fROFS); + + // set common mode offset + fCommonMode = 0.8; // 0.8V +- 0.5V inside NMOS range + SetDAC(fDAC_CMOFS, fCommonMode); + + // calibration voltage + SetDAC(fDAC_CALP, fCommonMode); + SetDAC(fDAC_CALN, fCommonMode); + + // OUT- offset + SetDAC(fDAC_ONOFS, 1.25); + + SetDAC(fDAC_BIAS, 0.70); + + } else if (fBoardType == 6) { + // DRS4 Mezzanine Board 1.0 + + // set readout offset + fROFS = 1.6; // differential input range -0.5V ... +0.5V + fRange = 0; + SetDAC(fDAC_ROFS_1, fROFS); + + // set common mode offset + fCommonMode = 0.8; // 0.8V +- 0.5V inside NMOS range + SetDAC(fDAC_CMOFSP, fCommonMode); + SetDAC(fDAC_CMOFSN, fCommonMode); + + // calibration voltage + SetDAC(fDAC_CALN, fCommonMode); + SetDAC(fDAC_CALP, fCommonMode); + + // OUT- offset + SetDAC(fDAC_ONOFS, 1.25); + + SetDAC(fDAC_BIAS, 0.70); + } else if (fBoardType == 7) { + // DRS4 USB Evaluation 3.0 + + // set max. domino speed + SetDAC(fDAC_DSA, 2.5); + + // set readout offset + fROFS = 1.6; // differential input range -0.5V ... +0.5V + fRange = 0; + SetDAC(fDAC_ROFS_1, fROFS); + + // set common mode for THS4508 + SetDAC(fDAC_CMOFS, 2.4); + + // calibration voltage + fCommonMode = 0.8; // 0.8V +- 0.5V inside NMOS range + SetDAC(fDAC_CALP, fCommonMode); + SetDAC(fDAC_CALN, fCommonMode); + + // OUT- offset + SetDAC(fDAC_ONOFS, 1.25); + + SetDAC(fDAC_BIAS, 0.70); + } else if (fBoardType == 8 || fBoardType == 9) { + // DRS4 USB Evaluation 4.0 + + // set readout offset + fROFS = 1.6; // differential input range -0.5V ... +0.5V + fRange = 0; + SetDAC(fDAC_ROFS_1, fROFS); + + // calibration voltage + fCommonMode = 0.8; // 0.8V +- 0.5V inside NMOS range + SetDAC(fDAC_CALP, fCommonMode); + SetDAC(fDAC_CALN, fCommonMode); + + SetDAC(fDAC_BIAS, 0.70); + } + + /* set default number of channels per chip */ + if (fDRSType == 4) { + if (fTransport == TR_USB2) + SetChannelConfig(0, fNumberOfReadoutChannels - 1, 8); + else + SetChannelConfig(7, fNumberOfReadoutChannels - 1, 8); + } else + SetChannelConfig(0, fNumberOfReadoutChannels - 1, 12); + + // set ADC clock phase + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + fADCClkPhase = 0; + fADCClkInvert = 0; + } else if (fBoardType == 6) { + fADCClkPhase = 65; + fADCClkInvert = 0; + } + + // default settings + fMultiBuffer = 0; + fNMultiBuffer = 0; + fDominoMode = 1; + fReadoutMode = 1; + fReadPointer = 0; + fTriggerEnable1 = 0; + fTriggerEnable2 = 0; + fTriggerSource = 0; + fTriggerDelay = 0; + fTriggerDelayNs = 0; + fSyncDelay = 0; + fNominalFrequency = 1; + fDominoActive = 1; + + // load calibration from EEPROM + ReadCalibration(); + + // get some settings from hardware + fRange = GetCalibratedInputRange(); + if (fRange < 0 || fRange > 0.5) + fRange = 0; + fNominalFrequency = GetCalibratedFrequency(); + if (fNominalFrequency < 0.1 || fNominalFrequency > 6) + fNominalFrequency = 1; + + + if (fHasMultiBuffer) { + SetMultiBuffer(fMultiBuffer); + SetMultiBufferRP(fReadPointer); + } + SetDominoMode(fDominoMode); + SetReadoutMode(fReadoutMode); + EnableTrigger(fTriggerEnable1, fTriggerEnable2); + SetTriggerSource(fTriggerSource); + SetTriggerDelayPercent(0); + SetSyncDelay(fSyncDelay); + SetDominoActive(fDominoActive); + SetFrequency(fNominalFrequency, true); + SetInputRange(fRange); + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + SelectClockSource(0); // FPGA clock + if (fBoardType == 6) { + SetADCClkPhase(fADCClkPhase, fADCClkInvert); + SetWarmup(0); + SetCooldown(100); + SetDecimation(0); + } + + // disable calibration signals + EnableAcal(0, 0); + SetCalibTiming(0, 0); + EnableTcal(0); + + // got to idle state + Reinit(); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetDominoMode(unsigned char mode) +{ + // Set domino mode + // mode == 0: single sweep + // mode == 1: run continously + // + fDominoMode = mode; + + if (fDRSType == 4) { + unsigned short d; + Read(T_CTRL, &d, REG_CONFIG, 2); + fChannelConfig = d & 0xFF; + + d = fChannelConfig | (fDominoMode << 8) | (1 << 9) | (fWSRLoop << 10) | (0xF8 << 8); + Write(T_CTRL, REG_CONFIG, &d, 2); + } else { + if (mode) + fCtrlBits |= BIT_DMODE; + else + fCtrlBits &= ~BIT_DMODE; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetDominoActive(unsigned char mode) +{ + // Set domino activity + // mode == 0: stop during readout + // mode == 1: keep domino wave running + // + fDominoActive = mode; + if (mode) + fCtrlBits |= BIT_DACTIVE; + else + fCtrlBits &= ~BIT_DACTIVE; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetReadoutMode(unsigned char mode) +{ + // Set readout mode + // mode == 0: start from first bin + // mode == 1: start from domino stop + // + fReadoutMode = mode; + if (mode) + fCtrlBits |= BIT_READOUT_MODE; + else + fCtrlBits &= ~BIT_READOUT_MODE; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SoftTrigger(void) +{ + // Send a software trigger + fCtrlBits |= BIT_SOFT_TRIG; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + fCtrlBits &= ~BIT_SOFT_TRIG; + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::EnableTrigger(int flag1, int flag2) +{ + // Enable external trigger + fTriggerEnable1 = flag1; + fTriggerEnable2 = flag2; + if (flag1) + fCtrlBits |= BIT_ENABLE_TRIGGER1; + else + fCtrlBits &= ~BIT_ENABLE_TRIGGER1; + + if (flag2) + fCtrlBits |= BIT_ENABLE_TRIGGER2; + else + fCtrlBits &= ~BIT_ENABLE_TRIGGER2; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetDelayedTrigger(int flag) +{ + // Select delayed trigger from trigger bus + if (flag) + fCtrlBits |= BIT_TRIGGER_DELAYED; + else + fCtrlBits &= ~BIT_TRIGGER_DELAYED; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetTriggerPolarity(bool negative) +{ + if (fBoardType == 5 || fBoardType == 7) { + fTcalLevel = negative; + + if (negative) + fCtrlBits |= BIT_NEG_TRIGGER; + else + fCtrlBits &= ~BIT_NEG_TRIGGER; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + return 1; + } else if (fBoardType == 8 || fBoardType == 9) { + fTcalLevel = negative; + + if (negative) + fCtrlBits |= BIT_NEG_TRIGGER; + else + fCtrlBits &= ~BIT_NEG_TRIGGER; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + return 1; + } + + return 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetTriggerLevel(double voltage) +{ + if (fBoardType == 5 || fBoardType == 7) { + return SetDAC(fDAC_TLEVEL, voltage/2 + 0.8); + } else if (fBoardType == 8 || fBoardType == 9) { + SetIndividualTriggerLevel(0, voltage); + SetIndividualTriggerLevel(1, voltage); + SetIndividualTriggerLevel(2, voltage); + SetIndividualTriggerLevel(3, voltage); + return 1; + } + + return 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetIndividualTriggerLevel(int channel, double voltage) +{ + if (fBoardType == 8 || fBoardType == 9) { + switch (channel) { + case 0: SetDAC(fDAC_TLEVEL1, voltage/2 + 0.8); break; + case 1: SetDAC(fDAC_TLEVEL2, voltage/2 + 0.8); break; + case 2: SetDAC(fDAC_TLEVEL3, voltage/2 + 0.8); break; + case 3: SetDAC(fDAC_TLEVEL4, voltage/2 + 0.8); break; + default: return -1; + } + } + + return 0; +} + +/*------------------------------------------------------------------*/ + +#define LUT_DELAY_S3_8 6.2 // Spartan 3 Octal LUTs 2 GSPS +#define LUT_DELAY_S3_4 2.1 // Spartan 3 Quad LUTs +#define LUT_DELAY_V2_8 4.6 // Virtex PRO II Octal LUTs +#define LUT_DELAY_V2_4 2.3 // Virtex PRO II Quad LUTs + + +int DRSBoard::SetTriggerDelayPercent(int delay) +/* set trigger delay in percent 0..100 */ +{ + short ticks, reg; + fTriggerDelay = delay; + + if (fBoardType == 5 || fBoardType == 6 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + // convert delay (0..100) into ticks + ticks = (unsigned short) (delay/100.0*255+0.5); + if (ticks > 255) + ticks = 255; + if (ticks < 0) + ticks = 0; + + // convert delay into ns + if (fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + if (fFirmwareVersion >= 17147) + fTriggerDelayNs = ticks * LUT_DELAY_S3_8; + else + fTriggerDelayNs = ticks * LUT_DELAY_S3_4; + } else { + if (fFirmwareVersion >= 17382) + fTriggerDelayNs = ticks * LUT_DELAY_V2_8; + else + fTriggerDelayNs = ticks * LUT_DELAY_V2_4; + } + + // adjust for fixed delay, measured and approximated experimentally + fTriggerDelayNs += 23.5 + 28.2/fNominalFrequency; + + Read(T_CTRL, ®, REG_TRG_DELAY, 2); + reg = (reg & 0xFF00) | ticks; + Write(T_CTRL, REG_TRG_DELAY, &ticks, 2); + + return 1; + } + + return 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetTriggerDelayNs(int delay) +/* set trigger delay in nanoseconds */ +{ + short ticks, reg; + fTriggerDelayNs = delay; + + if (fBoardType == 5 || fBoardType == 6 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + + // convert delay in ns into ticks + if (fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + if (fFirmwareVersion >= 17147) + ticks = (short int)(delay / LUT_DELAY_S3_8 + 0.5); + else + ticks = (short int)(delay / LUT_DELAY_S3_4 + 0.5); + } else { + if (fFirmwareVersion >= 17382) + ticks = (short int)(delay / LUT_DELAY_V2_8 + 0.5); + else + ticks = (short int)(delay / LUT_DELAY_V2_4 + 0.5); + } + + if (ticks > 255) + ticks = 255; + if (ticks < 0) + ticks = 0; + + fTriggerDelay = ticks / 255 * 100; + + Read(T_CTRL, ®, REG_TRG_DELAY, 2); + reg = (reg & 0xFF00) | ticks; + Write(T_CTRL, REG_TRG_DELAY, &ticks, 2); + + return 1; + } + + return 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetSyncDelay(int ticks) +{ + short int reg; + + if (fBoardType == 5 || fBoardType == 6 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + Read(T_CTRL, ®, REG_TRG_DELAY, 2); + reg = (reg & 0xFF) | (ticks << 8); + Write(T_CTRL, REG_TRG_DELAY, ®, 2); + + return 1; + } + + return 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetTriggerSource(int source) +{ + short int reg; + + fTriggerSource = source; + if (fBoardType == 5 || fBoardType == 7) { + // Set trigger source + // 0=CH1, 1=CH2, 2=CH3, 3=CH4 + if (source & 1) + fCtrlBits |= BIT_TR_SOURCE1; + else + fCtrlBits &= ~BIT_TR_SOURCE1; + if (source & 2) + fCtrlBits |= BIT_TR_SOURCE2; + else + fCtrlBits &= ~BIT_TR_SOURCE2; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + } else if (fBoardType == 8 || fBoardType == 9) { + // Set trigger configuration + // OR Bit0=CH1, Bit1=CH2, Bit2=CH3, Bit3=CH4, Bit4=EXT + // AND Bit8=CH1, Bit9=CH2, Bit10=CH3, Bit11=CH4, Bit12=EXT + // TRANSP Bit15 + reg = (unsigned short) source; + Write(T_CTRL, REG_TRG_CONFIG, ®, 2); + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetDelayedStart(int flag) +{ + // Enable external trigger + fDelayedStart = flag; + if (flag) + fCtrlBits |= BIT_DELAYED_START; + else + fCtrlBits &= ~BIT_DELAYED_START; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetTranspMode(int flag) +{ + // Enable/disable transparent mode + fTranspMode = flag; + if (flag) + fCtrlBits |= BIT_TRANSP_MODE; + else + fCtrlBits &= ~BIT_TRANSP_MODE; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetStandbyMode(int flag) +{ + // Enable/disable standby mode + fTranspMode = flag; + if (flag) + fCtrlBits |= BIT_STANDBY_MODE; + else + fCtrlBits &= ~BIT_STANDBY_MODE; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetDecimation(int flag) +{ + // Drop every odd sample + fDecimation = flag; + if (flag) + fCtrlBits |= BIT_DECIMATION; + else + fCtrlBits &= ~BIT_DECIMATION; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + // Calculate channel depth + fChannelDepth = fChannelCascading * (fDecimation ? kNumberOfBins/2 : kNumberOfBins); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::IsBusy() +{ + // Get running flag + unsigned int status; + + Read(T_STATUS, &status, REG_STATUS, 4); + return (status & BIT_RUNNING) > 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::IsEventAvailable() +{ + if (!fMultiBuffer) + return !IsBusy(); + + return GetMultiBufferWP() != fReadPointer; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::IsPLLLocked() +{ + // Get running flag + unsigned int status; + + Read(T_STATUS, &status, REG_STATUS, 4); + if (GetBoardType() == 6) + return ((status >> 1) & 0x0F) == 0x0F; + return (status & BIT_PLL_LOCKED0) > 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::IsLMKLocked() +{ + // Get running flag + unsigned int status; + + Read(T_STATUS, &status, REG_STATUS, 4); + if (GetBoardType() == 6) + return (status & BIT_LMK_LOCKED) > 0; + return 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::IsNewFreq(unsigned char chipIndex) +{ + unsigned int status; + + Read(T_STATUS, &status, REG_STATUS, 4); + if (chipIndex == 0) + return (status & BIT_NEW_FREQ1) > 0; + return (status & BIT_NEW_FREQ2) > 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::ReadFrequency(unsigned char chipIndex, double *f) +{ + if (fDRSType == 4) { + + if (fBoardType == 6) { + *f = fNominalFrequency; + return 1; + } + + unsigned short ticks; + + Read(T_CTRL, &ticks, REG_FREQ_SET, 2); + ticks += 2; + + /* convert rounded ticks back to frequency */ + if (ticks > 2) + *f = 1.024 / ticks * fRefClock; + else + *f = 0; + } else { + // Read domino sampling frequency + unsigned char buffer[2]; + + if (chipIndex == 0) + Read(T_STATUS, buffer, REG_FREQ1, 2); + else + Read(T_STATUS, buffer, REG_FREQ2, 2); + + *f = (static_cast < unsigned int >(buffer[1]) << 8) +buffer[0]; + + /* convert counts to frequency */ + if (*f != 0) + *f = 1024 * 200 * (32.768E6 * 4) / (*f) / 1E9; + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +double DRSBoard::VoltToFreq(double volt) +{ + if (fDRSType == 3) { + if (volt <= 1.2001) + return (volt - 0.6) / 0.2; + else + return 0.73 / 0.28 + sqrt((0.73 / 0.28) * (0.73 / 0.28) - 2.2 / 0.14 + volt / 0.14); + } else + return (volt - 0.5) / 0.2; +} + +/*------------------------------------------------------------------*/ + +double DRSBoard::FreqToVolt(double freq) +{ + if (fDRSType == 3) { + if (freq <= 3) + return 0.6 + 0.2 * freq; + else + return 2.2 - 0.73 * freq + 0.14 * freq * freq; + } else + return 0.55 + 0.25 * freq; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::ConfigureLMK(double sampFreq, bool freqChange, int calFreq, int calPhase) +{ + unsigned int data[] = { 0x80000100, // RESET=1 + 0x0007FF00, // CLKOUT0: EN=1, DIV=FF (=510) MUX=Div&Delay + 0x00000101, // CLKOUT1: Disabled + 0x0082000B, // R11: DIV4=0 + 0x028780AD, // R13: VCO settings + 0x0830000E, // R14: PLL settings + 0xC000000F }; // R15: PLL settings + + /* calculate dividing ratio */ + int divider, vco_divider, n_counter, r_counter; + unsigned int status; + double clk, vco; + + if (fTransport == TR_USB2) { + /* 30 MHz clock */ + data[4] = 0x028780AD; // R13 according to CodeLoader 4 + clk = 30; + if (sampFreq < 1) { + r_counter = 1; + vco_divider = 8; + n_counter = 5; + } else { + r_counter = 1; + vco_divider = 5; + n_counter = 8; + } + } else { + + if (fCtrlBits & BIT_REFCLK_SOURCE) { + /* 19.44 MHz clock */ + data[4] = 0x0284C0AD; // R13 according to CodeLoader 4 + clk = 19.44; // global clock through P2 + + r_counter = 2; + vco_divider = 8; + n_counter = 16; + } else { + /* 33 MHz clock */ + data[4] = 0x028840AD; // R13 according to CodeLoader 4 + clk = 33; // FPGA clock + + r_counter = 2; + vco_divider = 8; + n_counter = 9; + } + } + + vco = clk/r_counter*n_counter*vco_divider; + divider = (int) ((vco / vco_divider / (sampFreq/2.048) / 2.0) + 0.5); + + /* return exact frequency */ + fNominalFrequency = vco/vco_divider/(divider*2)*2.048; + + /* return exact timing calibration frequency */ + fTCALFrequency = vco/vco_divider; + + /* change registers accordingly */ + data[1] = 0x00070000 | (divider << 8); // R0 + data[5] = 0x0830000E | (r_counter << 8); // R14 + data[6] = 0xC000000F | (n_counter << 8) | (vco_divider << 26); // R15 + + /* enable TCA output if requested */ + if (calFreq) { + if (calFreq == 1) + data[2] = 0x00050001 | ( 1<<8) ; // 148.5 MHz (33 MHz PLL) + // 150 MHz (30 MHz PLL) + // 155.52 MHz (19.44 MHz PLL) + else if (calFreq == 2) { + data[2] = 0x00070001 | ( 4<<8); // above values divided by 8 + fTCALFrequency /= 8; + } else if (calFreq == 3) { + data[2] = 0x00070001 | (255<<8); // above values divided by 510 + fTCALFrequency /= 510; + } + } + + /* set delay to adjsut phase */ + if (calPhase > 0) + data[2] |= (( calPhase & 0x0F) << 4); + else if (calPhase < 0) + data[1] |= ((-calPhase & 0x0F) << 4); + + if (freqChange) { + /* set all registers */ + for (int i=0 ; i<(int)(sizeof(data)/sizeof(unsigned int)) ; i++) { + Write(T_CTRL, REG_LMK_LSB, &data[i], 2); + Write(T_CTRL, REG_LMK_MSB, ((char *)&data[i])+2, 2); + // poll on serial_busy flag + for (int j=0 ; j<100 ; j++) { + Read(T_STATUS, &status, REG_STATUS, 4); + if ((status & BIT_SERIAL_BUSY) == 0) + break; + } + } + } else { + /* only enable/disable timing calibration frequency */ + Write(T_CTRL, REG_LMK_LSB, &data[1], 2); + Write(T_CTRL, REG_LMK_MSB, ((char *)&data[1])+2, 2); + + /* poll on serial_busy flag */ + for (int j=0 ; j<100 ; j++) { + Read(T_STATUS, &status, REG_STATUS, 4); + if ((status & BIT_SERIAL_BUSY) == 0) + break; + } + + Write(T_CTRL, REG_LMK_LSB, &data[2], 2); + Write(T_CTRL, REG_LMK_MSB, ((char *)&data[2])+2, 2); + + /* poll on serial_busy flag */ + for (int j=0 ; j<100 ; j++) { + Read(T_STATUS, &status, REG_STATUS, 4); + if ((status & BIT_SERIAL_BUSY) == 0) + break; + } + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetFrequency(double demand, bool wait) +{ + // Set domino sampling frequency + double freq, voltage, delta_voltage; + unsigned short ticks; + int i, index, timeout; + int dominoModeSave = fDominoMode; + int triggerEnableSave1 = fTriggerEnable1; + int triggerEnableSave2 = fTriggerEnable2; + + if (fDRSType == 4) { + /* allowed range is 100 MHz to 6 GHz */ + if (demand > 6 || demand < 0.1) + return 0; + + if (fBoardType == 6) { + for (i=1 ; i<100 ; i++) { + ConfigureLMK(demand, true, fTcalFreq, fTcalPhase); + Sleep(10); + if (IsLMKLocked()) + return 1; + printf("Re-start LMK in VME slot %2d %s\n", + (GetSlotNumber() >> 1)+2, ((GetSlotNumber() & 1) == 0) ? "upper" : "lower"); + } + return 0; + } + + /* convert frequency in GHz into ticks counted by reference clock */ + if (demand == 0) + ticks = 0; // turn off frequency generation + else + ticks = static_cast < unsigned short >(1.024 / demand * fRefClock + 0.5); + + ticks -= 2; // firmware counter need two additional clock cycles + Write(T_CTRL, REG_FREQ_SET, &ticks, 2); + ticks += 2; + + /* convert rounded ticks back to frequency */ + if (demand > 0) + demand = 1.024 / ticks * fRefClock; + fNominalFrequency = demand; + + /* wait for PLL lock if asked */ + if (wait) { + StartDomino(); + for (i=0 ; i<1000 ; i++) + if (GetStatusReg() & BIT_PLL_LOCKED0) + break; + SoftTrigger(); + if (i == 1000) { + printf("PLL did not lock for frequency %lf\n", demand); + return 0; + } + } + } else { // fDRSType == 4 + SetDominoMode(1); + EnableTrigger(0, 0); + EnableAcal(0, 0); + + fNominalFrequency = demand; + + /* turn automatic adjustment off */ + fCtrlBits &= ~BIT_FREQ_AUTO_ADJ; + + /* disable external trigger */ + fCtrlBits &= ~BIT_ENABLE_TRIGGER1; + fCtrlBits &= ~BIT_ENABLE_TRIGGER2; + + /* set start pulse length for future DRSBoard_domino_start() */ + if (fDRSType == 2) { + if (demand < 0.8) + fCtrlBits |= BIT_LONG_START_PULSE; + else + fCtrlBits &= ~BIT_LONG_START_PULSE; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + } + + /* stop any running domino wave */ + Reinit(); + + /* estimate DAC setting */ + voltage = FreqToVolt(demand); + + SetDAC(fDAC_DSA, voltage); + SetDAC(fDAC_DSB, voltage); + + /* wait until new DAC value has settled */ + Sleep(10); + + /* restart domino wave */ + StartDomino(); + + ticks = static_cast < unsigned short >(1024 * 200 * (32.768E6 * 4) / demand / 1E9); + + /* iterate over both DRS chips */ + for (index = 0; index < 2; index++) { + + /* starting voltage */ + voltage = FreqToVolt(demand); + + for (i = 0; i < 100; i++) { + + /* wait until measurement finished */ + for (timeout = 0; timeout < 1000; timeout++) + if (IsNewFreq(index)) + break; + + freq = 0; + if (timeout == 1000) + break; + + ReadFrequency(index, &freq); + + delta_voltage = FreqToVolt(demand) - FreqToVolt(freq); + + if (fDebug) { + if (fabs(freq - demand) < 0.001) + printf("CHIP-%d, iter%3d: %1.5lf(%05d) %7.5lf\n", index, i, voltage, + static_cast < int >(voltage / 2.5 * 65535 + 0.5), freq); + else + printf("CHIP-%d, iter%3d: %1.5lf(%05d) %7.5lf %+5d\n", index, i, voltage, + static_cast < int >(voltage / 2.5 * 65535 + 0.5), freq, + static_cast < int >(delta_voltage / 2.5 * 65535 + 0.5)); + } + + if (fabs(freq - demand) < 0.001) + break; + + voltage += delta_voltage; + if (voltage > 2.5) + voltage = 2.5; + if (voltage < 0) + voltage = 0; + + if (freq == 0) + break; + + if (index == 0) + SetDAC(fDAC_DSA, voltage); + else + SetDAC(fDAC_DSB, voltage); + + Sleep(10); + } + if (i == 100 || freq == 0 || timeout == 1000) { + printf("Board %d --> Could not set frequency of CHIP-#%d to %1.3f GHz\n", GetBoardSerialNumber(), + index, demand); + return 0; + } + } + + SetDominoMode(dominoModeSave); + EnableTrigger(triggerEnableSave1, triggerEnableSave2); + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::RegulateFrequency(double demand) +{ + // Set frequency regulation + unsigned short target, target_hi, target_lo; + + if (demand < 0.42 || demand > 5.2) + return 0; + + fNominalFrequency = demand; + + /* first iterate DAC value from host */ + if (!SetFrequency(demand, true)) + return 0; + + /* convert frequency in GHz into counts for 200 cycles */ + target = static_cast < unsigned short >(1024 * 200 * (32.768E6 * 4) / demand / 1E9); + target_hi = target + 6; + target_lo = target - 6; + Write(T_CTRL, REG_FREQ_SET_HI, &target_hi, 2); + Write(T_CTRL, REG_FREQ_SET_LO, &target_lo, 2); + + /* turn on regulation */ + fCtrlBits |= BIT_FREQ_AUTO_ADJ; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + /* optional monitoring code ... */ +#if 0 + do { + double freq; + unsigned short dac, cnt; + + ReadFrequency(0, &freq); + + if (fBoardType == 1) + Read(T_STATUS, &dac, REG_RDAC3, 2); + else if (fBoardType == 2 || fBoardType == 3) + Read(T_STATUS, &dac, REG_RDAC1, 2); + + Read(T_STATUS, &cnt, REG_FREQ1, 2); + + if (cnt < 65535) + printf("%5d %5d %5d %1.5lf\n", dac, target, cnt, freq); + + Sleep(500); + } while (1); +#endif + + return 1; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::RegisterTest() +{ + // Register test +#define N_REG 8 + + int i, n, n_err; + unsigned int buffer[N_REG], ret[N_REG]; + + /* test single register */ + buffer[0] = 0x12345678; + Write(T_CTRL, 0, buffer, 4); + memset(ret, 0, sizeof(ret)); + i = Read(T_CTRL, ret, 0, 4); + while (i != 4) + printf("Read error single register!\n"); + + printf("Reg.0: %08X - %08X\n", buffer[0], ret[0]); + + n_err = 0; + for (n = 0; n < 100; n++) { + for (i = 0; i < N_REG; i++) + buffer[i] = (rand() << 16) | rand(); + Write(T_CTRL, 0, buffer, sizeof(buffer)); + + memset(ret, 0, sizeof(ret)); + i = Read(T_CTRL, ret, 0, sizeof(ret)); + while (i != sizeof(ret)) { + printf("Read error!\n"); + return; + } + + for (i = 0; i < N_REG; i++) { + if (n == 0) + printf("Reg.%d: %08X - %08X\n", i, buffer[i], ret[i]); + if (buffer[i] != ret[i]) { + n_err++; + } + } + } + + printf("Register test: %d errors\n", n_err); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::RAMTest(int flag) +{ +#define MAX_N_BYTES 128*1024 // 128 kB + + int i, j, n, bits, n_bytes, n_words, n_dwords; + unsigned int buffer[MAX_N_BYTES/4], ret[MAX_N_BYTES/4]; + time_t now; + + if (fBoardType == 6 && fTransport == TR_VME) { + bits = 32; + n_bytes = 128*1024; // test full 128 kB + n_words = n_bytes/2; + n_dwords = n_words/2; + } else { + bits = 24; + n_words = 9*1024; + n_bytes = n_words * 2; + n_dwords = n_words/2; + } + + if (flag & 1) { + /* integrety test */ + printf("Buffer size: %d (%1.1lfk)\n", n_words * 2, n_words * 2 / 1024.0); + if (flag & 1) { + for (i = 0; i < n_dwords; i++) { + if (bits == 24) + buffer[i] = (rand() | rand() << 16) & 0x00FFFFFF; // random 24-bit values + else + buffer[i] = (rand() | rand() << 16); // random 32-bit values + } + + Reinit(); + Write(T_RAM, 0, buffer, n_bytes); + memset(ret, 0, n_bytes); + Read(T_RAM, ret, 0, n_bytes); + Reinit(); + + for (i = n = 0; i < n_dwords; i++) { + if (buffer[i] != ret[i]) { + n++; + } + if (i < 10) + printf("written: %08X read: %08X\n", buffer[i], ret[i]); + } + + printf("RAM test: %d errors\n", n); + } + } + + /* speed test */ + if (flag & 2) { + /* read continously to determine speed */ + time(&now); + while (now == time(NULL)); + time(&now); + i = n = 0; + do { + memset(ret, 0, n_bytes); + + for (j = 0; j < 10; j++) { + Read(T_RAM, ret, 0, n_bytes); + i += n_bytes; + } + + if (flag & 1) { + for (j = 0; j < n_dwords; j++) + if (buffer[j] != ret[j]) + n++; + } + + if (now != time(NULL)) { + if (flag & 1) + printf("%d read/sec, %1.2lf MB/sec, %d errors\n", static_cast < int >(i / n_bytes), + i / 1024.0 / 1024.0, n); + else + printf("%d read/sec, %1.2lf MB/sec\n", static_cast < int >(i / n_bytes), + i / 1024.0 / 1024.0); + time(&now); + i = 0; + } + + if (drs_kbhit()) + break; + + } while (1); + + while (drs_kbhit()) + getch(); + } + + return 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::ChipTest() +{ + int i, j, t; + double freq, old_freq, min, max, mean, std; + float waveform[1024]; + + Init(); + SetChannelConfig(0, 8, 8); + SetDominoMode(1); + SetReadoutMode(1); + SetDominoActive(1); + SetTranspMode(0); + EnableTrigger(0, 0); + EnableTcal(1, 0); + SelectClockSource(0); + EnableAcal(1, 0); + + /* test 1 GHz */ + SetFrequency(1, true); + StartDomino(); + Sleep(100); + if (!(GetStatusReg() & BIT_PLL_LOCKED0)) { + puts("PLL did not lock at 1 GHz"); + return 0; + } + + /* test up to 6 GHz */ + for (freq = 5 ; freq < 6 ; freq += 0.1) { + SetFrequency(freq, false); + Sleep(10); + if (!(GetStatusReg() & BIT_PLL_LOCKED0)) { + printf("Max. frequency is %1.1lf GHz\n", old_freq); + break; + } + ReadFrequency(0, &old_freq); + } + + /* read and check at 0 calibration voltage */ + SetFrequency(5, true); + Sleep(10); + SoftTrigger(); + while (IsBusy()); + TransferWaves(0, 8); + + for (i=0 ; i<8 ; i++) { + t = GetStopCell(0); + GetWave(0, i, waveform, false, t, 0, false); + for (j=0 ; j<1024; j++) + if (waveform[j] < -100 || waveform[j] > 100) { + if (j<5) { + /* skip this cells */ + } else { + printf("Cell error on channel %d, cell %d: %1.1lf mV instead 0 mV\n", i, j, waveform[j]); + return 0; + } + } + } + + /* read and check at +0.5V calibration voltage */ + EnableAcal(1, 0.5); + StartDomino(); + SoftTrigger(); + while (IsBusy()); + TransferWaves(0, 8); + + for (i=0 ; i<8 ; i++) { + t = GetStopCell(0); + GetWave(0, i, waveform, false, t, 0, false); + for (j=0 ; j<1024; j++) + if (waveform[j] < 350) { + if (j<5) { + /* skip this cell */ + } else { + printf("Cell error on channel %d, cell %d: %1.1lf mV instead 400 mV\n", i, j, waveform[j]); + return 0; + } + } + } + + /* read and check at -0.5V calibration voltage */ + EnableAcal(1, -0.5); + StartDomino(); + Sleep(10); + SoftTrigger(); + while (IsBusy()); + TransferWaves(0, 8); + + for (i=0 ; i<8 ; i++) { + t = GetStopCell(0); + GetWave(0, i, waveform, false, t, 0, false); + for (j=0 ; j<1024; j++) + if (waveform[j] > -350) { + if (j<5) { + /* skip this cell */ + } else { + printf("Cell error on channel %d, cell %d: %1.1lf mV instead -400mV\n", i, j, waveform[j]); + return 0; + } + } + } + + /* check clock channel */ + GetWave(0, 8, waveform, false, 0, 0); + min = max = mean = std = 0; + for (j=0 ; j<1024 ; j++) { + if (waveform[j] > max) + max = waveform[j]; + if (waveform[j] < min) + min = waveform[j]; + mean += waveform[j]; + } + mean /= 1024.0; + for (j=0 ; j<1024 ; j++) + std += (waveform[j] - mean) * (waveform[j] - mean); + std = sqrt(std/1024); + + if (max - min < 400) { + printf("Error on clock channel amplitude: %1.1lf mV\n", max-min); + return 0; + } + + if (std < 100 || std > 300) { + printf("Error on clock channel Std: %1.1lf mV\n", std); + return 0; + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::SetVoltageOffset(double offset1, double offset2) +{ + if (fDRSType == 3) { + SetDAC(fDAC_ROFS_1, 0.95 - offset1); + SetDAC(fDAC_ROFS_2, 0.95 - offset2); + } else if (fDRSType == 2) + SetDAC(fDAC_COFS, 0.9 - offset1); + + // let DAC settle + Sleep(100); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetInputRange(double center) +{ + if (fBoardType == 5 || fBoardType == 6 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + // DRS4 USB Evaluation Boards + Mezzanine Board + + // only allow -0.5...0.5 to 0...1.0 + if (center < 0 || center > 0.5) + return 0; + + // remember range + fRange = center; + + // correct for sampling cell charge injection + center *= 1.125; + + // set readout offset + fROFS = 1.6 - center; + SetDAC(fDAC_ROFS_1, fROFS); + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetExternalClockFrequency(double frequencyMHz) +{ + // Set the frequency of the external clock + fExternalClockFrequency = frequencyMHz; + return 0; +} + +/*------------------------------------------------------------------*/ + +double DRSBoard::GetExternalClockFrequency() +{ + // Return the frequency of the external clock + return fExternalClockFrequency; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetMultiBuffer(int flag) +{ + if (fHasMultiBuffer) { + // Enable/disable multi-buffering + fMultiBuffer = flag; + if (flag) + fCtrlBits |= BIT_MULTI_BUFFER; + else + fCtrlBits &= ~BIT_MULTI_BUFFER; + + if (flag) { + if (fBoardType == 6) + fNMultiBuffer = 3; // 3 buffers for VME board + } else + fNMultiBuffer = 0; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + } + return 1; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::ResetMultiBuffer(void) +{ + Reinit(); // set WP=0 + fReadPointer = 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetMultiBufferRP(void) +{ + return fReadPointer; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetMultiBufferRP(unsigned short rp) +{ + if (fHasMultiBuffer) { + fReadPointer = rp; + Write(T_CTRL, REG_READ_POINTER, &rp, 2); + } + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetMultiBufferWP(void) +{ + unsigned short wp = 0; + + if (fHasMultiBuffer) + Read(T_STATUS, &wp, REG_WRITE_POINTER, 2); + else + wp = 0; + return wp; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::IncrementMultiBufferRP() +{ + if (fHasMultiBuffer && fMultiBuffer) + SetMultiBufferRP((fReadPointer + 1) % fNMultiBuffer); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::TransferWaves(int numberOfChannels) +{ + return TransferWaves(fWaveforms, numberOfChannels); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::TransferWaves(unsigned char *p, int numberOfChannels) +{ + return TransferWaves(p, 0, numberOfChannels - 1); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::TransferWaves(int firstChannel, int lastChannel) +{ + int offset; + + if (fTransport == TR_USB) + offset = firstChannel * sizeof(short int) * kNumberOfBins; + else + offset = 0; //in VME and USB2, always start from zero + + return TransferWaves(fWaveforms + offset, firstChannel, lastChannel); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::TransferWaves(unsigned char *p, int firstChannel, int lastChannel) +{ + // Transfer all waveforms at once from VME or USB to location + int n, i, offset, n_requested, n_bins; + unsigned int dw; + unsigned short w; + unsigned char *ptr; + + if (lastChannel >= fNumberOfChips * fNumberOfChannels) + lastChannel = fNumberOfChips * fNumberOfChannels - 1; + if (lastChannel < 0) { + printf("Error: Invalid channel index %d\n", lastChannel); + return 0; + } + + if (firstChannel < 0 || firstChannel > fNumberOfChips * fNumberOfChannels) { + printf("Error: Invalid channel index %d\n", firstChannel); + return 0; + } + + if (fTransport == TR_VME) { + /* in VME, always transfer all waveforms, since channels sit 'next' to each other */ + firstChannel = 0; + lastChannel = fNumberOfChips * fNumberOfChannels - 1; + if (fReadoutChannelConfig == 4) + lastChannel = fNumberOfChips * 5 - 1; // special mode to read only even channels + clock + } + + else if (fTransport == TR_USB2) { + /* USB2 FPGA contains 9 (Eval) or 10 (Mezz) channels */ + firstChannel = 0; + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + lastChannel = 8; + else if (fBoardType == 6) + lastChannel = 9; + } + + else if (fTransport == TR_USB) { + /* USB1 FPGA contains only 16 channels */ + if (lastChannel > 15) + lastChannel = 15; + } + + n_bins = fDecimation ? kNumberOfBins/2 : kNumberOfBins; + n_requested = (lastChannel - firstChannel + 1) * sizeof(short int) * n_bins; + offset = firstChannel * sizeof(short int) * n_bins; + + if (fBoardType == 6 && fFirmwareVersion >= 17147) + n_requested += 16; // add trailer four chips + + if ((fBoardType == 7 || fBoardType == 8 || fBoardType == 9) && fFirmwareVersion >= 17147) + n_requested += 4; // add trailer one chip + + if (fMultiBuffer) + offset += n_requested * fReadPointer; + + n = Read(T_RAM, p, offset, n_requested); + + if (fMultiBuffer) + IncrementMultiBufferRP(); + + if (n != n_requested) { + printf("Error: only %d bytes read instead of %d\n", n, n_requested); + return n; + } + + // read trigger cells + if (fDRSType == 4) { + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + if ((fBoardType == 7 || fBoardType == 8 || fBoardType == 9) && fFirmwareVersion >= 17147) { + // new code reading trailer + ptr = p + n_requested - 4; + fStopCell[0] = *((unsigned short *)(ptr)); + fStopWSR[0] = *(ptr + 2); + } else { + // old code reading status register + Read(T_STATUS, fStopCell, REG_STOP_CELL0, 2); + Read(T_STATUS, &w, REG_STOP_WSR0, 2); + fStopWSR[0] = (w >> 8) & 0xFFFF; + } + } else { + + if (fBoardType == 6) { + // new code reading trailer + ptr = p + n_requested - 16; + for (i=0 ; i<4 ; i++) { + fStopCell[i] = *((unsigned short *)(ptr + i*2)); + fStopWSR[i] = *(ptr + 8 + i); + } + fTriggerBus = *((unsigned short *)(ptr + 12)); + } else { + // old code reading registers + Read(T_STATUS, &dw, REG_STOP_CELL0, 4); + fStopCell[0] = (dw >> 16) & 0xFFFF; + fStopCell[1] = (dw >> 0) & 0xFFFF; + Read(T_STATUS, &dw, REG_STOP_CELL2, 4); + fStopCell[2] = (dw >> 16) & 0xFFFF; + fStopCell[3] = (dw >> 0) & 0xFFFF; + + Read(T_STATUS, &dw, REG_STOP_WSR0, 4); + fStopWSR[0] = (dw >> 24) & 0xFF; + fStopWSR[1] = (dw >> 16) & 0xFF; + fStopWSR[2] = (dw >> 8) & 0xFF; + fStopWSR[3] = (dw >> 0) & 0xFF; + + Read(T_STATUS, &fTriggerBus, REG_TRIGGER_BUS, 2); + } + } + } + + return n; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::DecodeWave(unsigned int chipIndex, unsigned char channel, unsigned short *waveform) +{ + return DecodeWave(fWaveforms, chipIndex, channel, waveform); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::DecodeWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, + unsigned short *waveform) +{ + // Get waveform + int i, offset=0, ind, n_bins; + + /* check valid parameters */ + assert((int)channel < fNumberOfChannels); + assert((int)chipIndex < fNumberOfChips); + + /* remap channel */ + if (fBoardType == 1) { + if (channel < 8) + channel = 7 - channel; + else + channel = 16 - channel; + } else if (fBoardType == 6) { + if (fReadoutChannelConfig == 7) { + if (channel < 8) + channel = 7-channel; + } else if (fReadoutChannelConfig == 4) { + if (channel == 8) + channel = 4; + else + channel = 3 - channel/2; + } else { + channel = channel / 2; + if (channel != 4) + channel = 3-channel; + } + } /* else + channel = channel; */ + + // Read channel + if (fTransport == TR_USB) { + offset = kNumberOfBins * 2 * (chipIndex * 16 + channel); + for (i = 0; i < kNumberOfBins; i++) { + // 12-bit data + waveform[i] = ((waveforms[i * 2 + 1 + offset] & 0x0f) << 8) + waveforms[i * 2 + offset]; + } + } else if (fTransport == TR_USB2) { + + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + // see dpram_map_eval1.xls + offset = kNumberOfBins * 2 * (chipIndex * 16 + channel); + else if (fBoardType == 6) { + // see dpram_map_mezz1.xls mode 0-3 + offset = (kNumberOfBins * 4) * (channel % 9) + 2 * (chipIndex/2); + } + for (i = 0; i < kNumberOfBins; i++) { + // 16-bit data + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + waveform[i] = ((waveforms[i * 2 + 1 + offset] & 0xff) << 8) + waveforms[i * 2 + offset]; + else if (fBoardType == 6) + waveform[i] = ((waveforms[i * 4 + 1 + offset] & 0xff) << 8) + waveforms[i * 4 + offset]; + } + + } else if (fTransport == TR_VME) { + + if (fBoardType == 6) { + n_bins = fDecimation ? kNumberOfBins/2 : kNumberOfBins; + if (fReadoutChannelConfig == 7) // see dpram_map_mezz1.xls mode 7 + offset = (n_bins * 4) * (channel % 9 + 9*(chipIndex % 2)) + 2 * (chipIndex/2); + else if (fReadoutChannelConfig == 4) // see dpram_map_mezz1.xls mode 4 + offset = (n_bins * 4) * (channel % 5 + 5*(chipIndex % 2)) + 2 * (chipIndex/2); + for (i = 0; i < n_bins; i++) + waveform[i] = ((waveforms[i * 4 + 1 + offset] & 0xff) << 8) + waveforms[i * 4 + offset]; + } else { + offset = (kNumberOfBins * 4) * channel; + for (i = 0; i < kNumberOfBins; i++) { + ind = i * 4 + offset; + if (chipIndex == 0) + // lower 12 bit + waveform[i] = ((waveforms[ind + 1] & 0x0f) << 8) | waveforms[ind]; + else + // upper 12 bit + waveform[i] = (waveforms[ind + 2] << 4) | (waveforms[ind + 1] >> 4); + } + } + } else { + printf("Error: invalid transport %d\n", fTransport); + return kInvalidTransport; + } + return kSuccess; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetWave(unsigned int chipIndex, unsigned char channel, float *waveform) +{ + return GetWave(chipIndex, channel, waveform, true, fStopCell[chipIndex], -1, false, 0, true); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetWave(unsigned int chipIndex, unsigned char channel, short *waveform, bool responseCalib, + int triggerCell, int wsr, bool adjustToClock, float threshold, bool offsetCalib) +{ + return GetWave(fWaveforms, chipIndex, channel, waveform, responseCalib, triggerCell, wsr, adjustToClock, + threshold, offsetCalib); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetWave(unsigned int chipIndex, unsigned char channel, float *waveform, bool responseCalib, + int triggerCell, int wsr, bool adjustToClock, float threshold, bool offsetCalib) +{ + return GetWave(fWaveforms, chipIndex, channel, waveform, responseCalib, triggerCell, wsr, adjustToClock, threshold, + offsetCalib); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, + float *waveform, bool responseCalib, int triggerCell, int wsr, bool adjustToClock, + float threshold, bool offsetCalib) +{ + int ret, i; + short waveS[2*kNumberOfBins]; + ret = + GetWave(waveforms, chipIndex, channel, waveS, responseCalib, triggerCell, wsr, adjustToClock, threshold, + offsetCalib); + if (responseCalib) + for (i = 0; i < fChannelDepth ; i++) + waveform[i] = static_cast < float >(static_cast (waveS[i]) * GetPrecision()); + else { + for (i = 0; i < fChannelDepth ; i++) { + if (fBoardType == 4 || fBoardType == 5 || fBoardType == 6 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + waveform[i] = static_cast < float >(waveS[i] * GetPrecision()); + } else + waveform[i] = static_cast < float >(waveS[i]); + } + } + return ret; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, + short *waveform, bool responseCalib, int triggerCell, int wsr, bool adjustToClock, + float threshold, bool offsetCalib) +{ + unsigned short adcWaveform[kNumberOfBins]; + int i, ret; + + if (fChannelCascading == 1 || channel == 8) { + /* single channel configuration */ + ret = DecodeWave(waveforms, chipIndex, channel, adcWaveform); + if (ret != kSuccess) + return ret; + + ret = CalibrateWaveform(chipIndex, channel, adcWaveform, waveform, responseCalib, + triggerCell, adjustToClock, threshold, offsetCalib); + + return ret; + } else if (fChannelCascading == 2) { + /* double channel configuration */ + short wf1[kNumberOfBins]; + short wf2[kNumberOfBins]; + + // first half + ret = DecodeWave(waveforms, chipIndex, 2*channel, adcWaveform); + if (ret != kSuccess) + return ret; + + ret = CalibrateWaveform(chipIndex, 2*channel, adcWaveform, wf1, responseCalib, + triggerCell, adjustToClock, threshold, offsetCalib); + + // second half + ret = DecodeWave(waveforms, chipIndex, 2*channel+1, adcWaveform); + if (ret != kSuccess) + return ret; + + ret = CalibrateWaveform(chipIndex, 2*channel+1, adcWaveform, wf2, responseCalib, + triggerCell, adjustToClock, threshold, offsetCalib); + + + // combine two halfs correctly, see 2048_mode.ppt + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + if ((wsr == 0 && triggerCell < 767) || + (wsr == 1 && triggerCell >= 767)) { + for (i=0 ; i select correct calibration channel + if (fBoardType == 6 && (fReadoutChannelConfig == 0 || fReadoutChannelConfig == 2) && + channel != 8) + channel++; + + // Channel readout mode #4 -> select correct calibration channel + if (fBoardType == 6 && fReadoutChannelConfig == 4 && channel % 2 == 0 && channel != 8) + channel++; + + n_bins = fDecimation ? kNumberOfBins/2 : kNumberOfBins; + skip = fDecimation ? 2 : 1; + for (j = 0; j < n_bins; j++) { + value = adcWaveform[j] - fCellOffset[channel+chipIndex*9][(j*skip + triggerCell) % kNumberOfBins]; + value = value / fCellGain[channel+chipIndex*9][(j*skip + triggerCell) % kNumberOfBins]; + if (offsetCalib && channel != 8) + value = value - fCellOffset2[channel+chipIndex*9][j*skip] + 32768; + + /* convert to units of 0.1 mV */ + value = value / 65536.0 * 1000 * 10; + + /* apply clipping */ + if (channel != 8) { + if (adcWaveform[j] >= 0xFFF0 || value > (fRange * 1000 + 500) * 10) + value = (fRange * 1000 + 500) * 10; + if (adcWaveform[j] < 0x0010 || value < (fRange * 1000 - 500) * 10) + value = (fRange * 1000 - 500) * 10; + } + + if (adjustToClock) + waveform[(j + triggerCell) % kNumberOfBins] = (short) (value + 0.5); + else + waveform[j] = (short) (value + 0.5); + } + + // check for stuck pixels and replace by average of neighbors + for (j = 0 ; j < n_bins; j++) { + if (adjustToClock) { + if (fCellOffset[channel+chipIndex*9][j*skip] == 0) { + left = waveform[(j-1+kNumberOfBins) % kNumberOfBins]; + right = waveform[(j+1) % kNumberOfBins]; + waveform[j] = (short) ((left+right)/2); + } + } else { + if (fCellOffset[channel+chipIndex*9][(j*skip + triggerCell) % kNumberOfBins] == 0) { + left = waveform[(j-1+kNumberOfBins) % kNumberOfBins]; + right = waveform[(j+1) % kNumberOfBins]; + waveform[j] = (short) ((left+right)/2); + } + } + } + + } else { + if (!fResponseCalibration-> + Calibrate(chipIndex, channel % 10, adcWaveform, waveform, triggerCell, threshold, offsetCalib)) + return kZeroSuppression; // return immediately if below threshold + } + } else { + if (GetDRSType() == 4) { + // if Mezz though USB2 -> select correct calibration channel + if (fBoardType == 6 && (fReadoutChannelConfig == 0 || fReadoutChannelConfig == 2) && + channel != 8) + channel++; + for (j = 0 ; j < kNumberOfBins; j++) { + value = adcWaveform[j]; + + /* convert to units of 0.1 mV */ + value = (value - 32768) / 65536.0 * 1000 * 10; + + /* correct for range */ + value += fRange * 1000 * 10; + + if (adjustToClock) + waveform[(j + triggerCell) % kNumberOfBins] = (short) (value + 0.5); + else + waveform[j] = (short) (value + 0.5); + } + } else { + for (j = 0; j < kNumberOfBins; j++) { + if (adjustToClock) { + // rotate waveform such that waveform[0] corresponds to bin #0 on the chip + waveform[j] = adcWaveform[(kNumberOfBins-triggerCell+j) % kNumberOfBins]; + } else { + waveform[j] = adcWaveform[j]; + } + } + } + } + + // fix bad cells for single turn mode + if (GetDRSType() == 2) { + if (fDominoMode == 0 && triggerCell == -1) { + waveform[0] = 2 * waveform[1] - waveform[2]; + short m1 = (waveform[kNumberOfBins - 5] + waveform[kNumberOfBins - 6]) / 2; + short m2 = (waveform[kNumberOfBins - 6] + waveform[kNumberOfBins - 7]) / 2; + waveform[kNumberOfBins - 4] = m1 - 1 * (m2 - m1); + waveform[kNumberOfBins - 3] = m1 - 2 * (m2 - m1); + waveform[kNumberOfBins - 2] = m1 - 3 * (m2 - m1); + waveform[kNumberOfBins - 1] = m1 - 4 * (m2 - m1); + } + } + + return kSuccess; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetStretchedTime(float *time, float *measurement, int numberOfMeasurements, float period) +{ + int j; + if (*time >= measurement[numberOfMeasurements - 1]) { + *time -= measurement[numberOfMeasurements - 1]; + return 1; + } + if (*time < measurement[0]) { + *time = *time - measurement[0] - (numberOfMeasurements - 1) * period / 2; + return 1; + } + for (j = 0; j < numberOfMeasurements - 1; j++) { + if (*time > measurement[j] && *time <= measurement[j + 1]) { + *time = + (period / 2) / (measurement[j + 1] - measurement[j]) * (*time - measurement[j + 1]) - + (numberOfMeasurements - 2 - j) * period / 2; + return 1; + } + } + return 0; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetTriggerCell(unsigned int chipIndex) +{ + if (fDRSType == 4) + return GetStopCell(chipIndex); + + return GetTriggerCell(fWaveforms, chipIndex); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetTriggerCell(unsigned char *waveforms, unsigned int chipIndex) +{ + int j, triggerCell; + bool calib; + unsigned short baseLevel = 1000; + unsigned short triggerChannel[1024]; + + if (fDRSType == 4) + return GetStopCell(chipIndex); + + GetRawWave(waveforms, chipIndex, 8, triggerChannel); + calib = fResponseCalibration->SubtractADCOffset(chipIndex, 8, triggerChannel, triggerChannel, baseLevel); + + triggerCell = -1; + for (j = 0; j < kNumberOfBins; j++) { + if (calib) { + if (triggerChannel[j] <= baseLevel + 200 + && triggerChannel[(j + 1) % kNumberOfBins] > baseLevel + 200) { + triggerCell = j; + break; + } + } else { + if (fDRSType == 3) { + if (triggerChannel[j] <= 2000 && triggerChannel[(j + 1) % kNumberOfBins] > 2000) { + triggerCell = j; + break; + } + } else { + if (triggerChannel[j] >= 2000 && triggerChannel[(j + 1) % kNumberOfBins] < 2000) { + triggerCell = j; + break; + } + } + } + } + if (triggerCell == -1) { + return kInvalidTriggerSignal; + } + fStopCell[0] = triggerCell; + return triggerCell; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetStopCell(unsigned int chipIndex) +{ + return fStopCell[chipIndex]; +} + +/*------------------------------------------------------------------*/ + +unsigned char DRSBoard::GetStopWSR(unsigned int chipIndex) +{ + return fStopWSR[chipIndex]; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::TestDAC(int channel) +{ + // Test DAC + int status; + + do { + status = SetDAC(channel, 0); + Sleep(1000); + status = SetDAC(channel, 0.5); + Sleep(1000); + status = SetDAC(channel, 1); + Sleep(1000); + status = SetDAC(channel, 1.5); + Sleep(1000); + status = SetDAC(channel, 2); + Sleep(1000); + status = SetDAC(channel, 2.5); + Sleep(1000); + } while (status); +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::MeasureSpeed() +{ + // Measure domino sampling speed + FILE *f; + double vdr, vds, freq; + + f = fopen("speed.txt", "wt"); + fprintf(f, "\t"); + printf("\t"); + for (vdr = 0.5; vdr <= 2.501; vdr += 0.05) { + fprintf(f, "%1.2lf\t", vdr); + printf("%1.2lf\t", vdr); + } + fprintf(f, "\n"); + printf("\n"); + + for (vds = 0.5; vds <= 2.501; vds += 0.05) { + fprintf(f, "%1.2lf\t", vds); + printf("%1.2lf\t", vds); + + SetDAC(fDAC_DSA, vds); + StartDomino(); + Sleep(1000); + ReadFrequency(0, &freq); + + fprintf(f, "%1.3lf\t", freq); + printf("%1.3lf\t", freq); + + fprintf(f, "\n"); + printf("\n"); + fflush(f); + } +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::InteractSpeed() +{ + int status, i; + double freq, vds; + + do { + printf("DS: "); + scanf("%lf", &vds); + if (vds == 0) + break; + + SetDAC(fDAC_DSA, vds); + SetDAC(fDAC_DSB, vds); + + StartDomino(); + for (i = 0; i < 4; i++) { + Sleep(1000); + + status = ReadFrequency(0, &freq); + if (!status) + break; + printf("%1.6lf GHz\n", freq); + } + + /* turn BOARD_LED off */ + SetLED(0); + + } while (1); +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::MonitorFrequency() +{ + // Monitor domino sampling frequency + int status; + unsigned int data; + double freq, dac; + FILE *f; + time_t now; + char str[256]; + + f = fopen("DRSBoard.log", "w"); + + do { + Sleep(1000); + + status = ReadFrequency(0, &freq); + if (!status) + break; + + data = 0; + if (fBoardType == 1) + Read(T_STATUS, &data, REG_RDAC3, 2); + else if (fBoardType == 2 || fBoardType == 3) + Read(T_STATUS, &data, REG_RDAC1, 2); + + dac = data / 65536.0 * 2.5; + printf("%1.6lf GHz, %1.4lf V\n", freq, dac); + time(&now); + strcpy(str, ctime(&now) + 11); + str[8] = 0; + + fprintf(f, "%s %1.6lf GHz, %1.4lf V\n", str, freq, dac); + fflush(f); + + } while (!drs_kbhit()); + + fclose(f); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::TestShift(int n) +{ + // Test shift register + unsigned char buffer[3]; + + memset(buffer, 0, sizeof(buffer)); + +#if 0 + buffer[0] = CMD_TESTSHIFT; + buffer[1] = n; + + status = msend_usb(buffer, 2); + if (status != 2) + return status; + + status = mrecv_usb(buffer, sizeof(buffer)); + if (status != 1) + return status; +#endif + + if (buffer[0] == 1) + printf("Shift register %c works correctly\n", 'A' + n); + else if (buffer[0] == 2) + printf("SROUT%c does hot go high after reset\n", 'A' + n); + else if (buffer[0] == 3) + printf("SROUT%c does hot go low after 1024 clocks\n", 'A' + n); + + return 1; +} + +/*------------------------------------------------------------------*/ + +unsigned int DRSBoard::GetCtrlReg() +{ + unsigned int status; + + Read(T_CTRL, &status, REG_CTRL, 4); + return status; +} + +/*------------------------------------------------------------------*/ + +unsigned short DRSBoard::GetConfigReg() +{ + unsigned short status; + + Read(T_CTRL, &status, REG_CONFIG, 2); + return status; +} + +/*------------------------------------------------------------------*/ + +unsigned int DRSBoard::GetStatusReg() +{ + unsigned int status; + + Read(T_STATUS, &status, REG_STATUS, 4); + return status; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::EnableTcal(int freq, int level, int phase) +{ + fTcalFreq = freq; + fTcalLevel = level; + fTcalPhase = phase; + + if (fBoardType == 6) { + ConfigureLMK(fNominalFrequency, false, freq, phase); + } else { + if (fBoardType == 9) { + // Enable clock a switch channel multiplexers + if (freq) { + fCtrlBits |= (BIT_TCAL_EN | BIT_ACAL_EN); + } else + fCtrlBits &= ~(BIT_TCAL_EN | BIT_ACAL_EN); + + } else { + // Enable clock channel + if (freq) + fCtrlBits |= BIT_TCAL_EN; + else + fCtrlBits &= ~(BIT_TCAL_EN | BIT_TCAL_SOURCE); + + // Set output level, needed for gain calibration + if (fDRSType == 4) { + if (level) + fCtrlBits |= BIT_NEG_TRIGGER; + else + fCtrlBits &= ~BIT_NEG_TRIGGER; + } + } + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SelectClockSource(int source) +{ + fTcalSource = source; + + // Select clock source: + // EVAL1: synchronous (0) or asynchronous (1) (2nd quartz) + if (fBoardType <= 8) { + if (source) + fCtrlBits |= BIT_TCAL_SOURCE; + else + fCtrlBits &= ~BIT_TCAL_SOURCE; + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetRefclk(int source) +{ + // Select reference clock source to internal FPGA (0) or external P2 (1) + if (fBoardType == 6) { + if (source) + fCtrlBits |= BIT_REFCLK_SOURCE; + else + fCtrlBits &= ~BIT_REFCLK_SOURCE; + } else if (fBoardType == 8 || fBoardType == 9) { + if (source) + fCtrlBits |= BIT_REFCLK_EXT; + else + fCtrlBits &= ~BIT_REFCLK_EXT; + } + + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + fRefclk = source; + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::EnableAcal(int mode, double voltage) +{ + double t1, t2; + + fAcalMode = mode; + fAcalVolt = voltage; + + if (mode == 0) { + /* turn calibration off */ + SetCalibTiming(0, 0); + if (fBoardType == 5 || fBoardType == 6) { + /* turn voltages off (50 Ohm analog switch!) */ + SetDAC(fDAC_CALP, 0); + SetDAC(fDAC_CALN, 0); + } + if (fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + SetCalibVoltage(0); + + fCtrlBits &= ~BIT_ACAL_EN; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + } else if (mode == 1) { + /* static calibration */ + SetCalibVoltage(voltage); + SetCalibTiming(0, 0); + fCtrlBits |= BIT_ACAL_EN; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + } else if (mode == 2) { + /* first part calibration: + stop domino wave after 1.2 revolutions + turn on calibration voltage after 0.1 revolutions */ + + /* ensure circulating domino wave */ + SetDominoMode(1); + + /* set calibration voltage but do not turn it on now */ + SetCalibVoltage(voltage); + fCtrlBits &= ~BIT_ACAL_EN; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + /* calculate duration of DENABLE signal as 1.2 revolutions */ + t1 = 1 / fNominalFrequency * 1024 * 1.2; // ns + t1 = static_cast < int >((t1 - 30) / 30 + 1); // 30 ns offset, 30 ns units, rounded up + t2 = 1 / fNominalFrequency * 1024 * 0.1; // ns + t2 = static_cast < int >((t2 - 30) / 30 + 1); // 30 ns offset, 30 ns units, rounded up + SetCalibTiming(static_cast < int >(t1), static_cast < int >(t2)); + + } else if (mode == 3) { + /* second part calibration: + stop domino wave after 1.05 revolutions */ + + /* ensure circulating domino wave */ + SetDominoMode(1); + + /* turn on and let settle calibration voltage */ + SetCalibVoltage(voltage); + fCtrlBits |= BIT_ACAL_EN; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + + /* calculate duration of DENABLE signal as 1.1 revolutions */ + t1 = 1 / fNominalFrequency * 1024 * 1.05; // ns + t1 = static_cast < int >((t1 - 30) / 30 + 1); // 30 ns offset, 30 ns units, rounded up + SetCalibTiming(static_cast < int >(t1), 0); + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetCalibTiming(int t_enable, int t_cal) +{ + unsigned short d; + + if (fDRSType == 2) { + d = t_cal | (t_enable << 8); + Write(T_CTRL, REG_CALIB_TIMING, &d, 2); + } + + if (fDRSType == 3) { + d = t_cal; + Write(T_CTRL, REG_CALIB_TIMING, &d, 2); + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetCalibVoltage(double value) +{ + // Set Calibration Voltage + if (fBoardType == 5 || fBoardType == 6 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + if (fBoardType == 5) + value = value * (1+fNominalFrequency/65); // rough correction factor for input current + if (fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + value = value * (1+fNominalFrequency/47); // rough correction factor for input current + SetDAC(fDAC_CALP, fCommonMode + value / 2); + SetDAC(fDAC_CALN, fCommonMode - value / 2); + } else + SetDAC(fDAC_ACALIB, value); + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::StartClearCycle() +{ + /* clear cycle is necessary for DRS4 to reduce noise */ + + fbkAcalVolt = fAcalVolt; + fbkAcalMode = fAcalMode; + fbkTcalFreq = fTcalFreq; + fbkTcalLevel = fTcalLevel; + + /* switch all inputs to zero */ + EnableAcal(1, 0); + + /* start, stop and readout of zero */ + StartDomino(); + SoftTrigger(); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::FinishClearCycle() +{ + while (IsBusy()); + + /* restore old values */ + EnableAcal(fbkAcalMode, fbkAcalVolt); + + return 1; +} + +/*------------------------------------------------------------------*/ + +double DRSBoard::GetTemperature() +{ + // Read Out Temperature Sensor + unsigned char buffer[2]; + unsigned short d; + double temperature; + + Read(T_STATUS, buffer, REG_TEMPERATURE, 2); + + d = (static_cast < unsigned int >(buffer[1]) << 8) +buffer[0]; + temperature = ((d >> 3) & 0x0FFF) * 0.0625; + + return temperature; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::Is2048ModeCapable() +{ + unsigned int status; + + if (fFirmwareVersion < 21305) + return 0; + + // Read pin J44 and return 1 if 2048 mode has been soldered + Read(T_STATUS, &status, REG_STATUS, 4); + if ((status & BIT_2048_MODE)) + return 0; + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetTriggerBus() +{ + unsigned size, d; + + if (fBoardType == 6 && fTransport == TR_VME) { + if (fReadoutChannelConfig == 4) + size = (20 * sizeof(short int) * (fDecimation ? kNumberOfBins/2 : kNumberOfBins) + 16); + else + size = (36 * sizeof(short int) * (fDecimation ? kNumberOfBins/2 : kNumberOfBins) + 16); + + Read(T_RAM, &d, size * fReadPointer + size - 16 + 12, 4); + fTriggerBus = (unsigned short)d; + } else { + Read(T_STATUS, &fTriggerBus, REG_TRIGGER_BUS, 2); + } + return static_cast < int >(fTriggerBus); +} + + +/*------------------------------------------------------------------*/ + +unsigned int DRSBoard::GetScaler(int channel) +{ + int reg = 0; + unsigned d; + + if (fBoardType < 9 || fFirmwareVersion < 21000 || fTransport != TR_USB2) + return 0; + + switch (channel ) { + case 0: reg = REG_SCALER0; break; + case 1: reg = REG_SCALER1; break; + case 2: reg = REG_SCALER2; break; + case 3: reg = REG_SCALER3; break; + case 4: reg = REG_SCALER4; break; + case 5: reg = REG_SCALER5; break; + } + + Read(T_STATUS, &d, reg, 4); + + return static_cast < unsigned int >(d * 10); // measurement clock is 10 Hz +} + + +/*------------------------------------------------------------------*/ + +int DRSBoard::SetBoardSerialNumber(unsigned short serialNumber) +{ + unsigned char buf[32768]; + + unsigned short dac; + + if (fDRSType < 4) { + // read current DAC register + Read(T_CTRL, &dac, REG_DAC0, 2); + + // put serial in DAC register + Write(T_CTRL, REG_DAC0, &serialNumber, 2); + + // execute flash + fCtrlBits |= BIT_EEPROM_WRITE_TRIG; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + fCtrlBits &= ~BIT_EEPROM_WRITE_TRIG; + + // wait 6ms per word + Sleep(20); + + // write back old DAC registers + Write(T_CTRL, REG_DAC0, &dac, 2); + + // read back serial number + ReadSerialNumber(); + + } else if (fDRSType == 4) { + /* merge serial number into eeprom page #0 */ + ReadEEPROM(0, buf, sizeof(buf)); + buf[0] = serialNumber & 0xFF; + buf[1] = serialNumber >> 8; + WriteEEPROM(0, buf, sizeof(buf)); + + /* erase DPRAM */ + memset(buf, 0, sizeof(buf)); + Write(T_RAM, 0, buf, sizeof(buf)); + + /* read back EEPROM */ + ReadEEPROM(0, buf, sizeof(buf)); + + /* check if correctly set */ + if (((buf[1] << 8) | buf[0]) != serialNumber) + return 0; + + fBoardSerialNumber = serialNumber; + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::ReadEEPROM(unsigned short page, void *buffer, int size) +{ + int i; + unsigned long status; + // write eeprom page number + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + Write(T_CTRL, REG_EEPROM_PAGE_EVAL, &page, 2); + else if (fBoardType == 6) + Write(T_CTRL, REG_EEPROM_PAGE_MEZZ, &page, 2); + else + return -1; + + // execute eeprom read + fCtrlBits |= BIT_EEPROM_READ_TRIG; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + fCtrlBits &= ~BIT_EEPROM_READ_TRIG; + + // poll on serial_busy flag + for (i=0 ; i<100 ; i++) { + Read(T_STATUS, &status, REG_STATUS, 4); + if ((status & BIT_SERIAL_BUSY) == 0) + break; + Sleep(10); + } + + return Read(T_RAM, buffer, 0, size); +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::WriteEEPROM(unsigned short page, void *buffer, int size) +{ + int i; + unsigned long status; + unsigned char buf[32768]; + + // read previous page + ReadEEPROM(page, buf, sizeof(buf)); + + // combine with new page + memcpy(buf, buffer, size); + + // write eeprom page number + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + Write(T_CTRL, REG_EEPROM_PAGE_EVAL, &page, 2); + else if (fBoardType == 6) + Write(T_CTRL, REG_EEPROM_PAGE_MEZZ, &page, 2); + else + return -1; + + // write eeprom page to RAM + Write(T_RAM, 0, buf, size); + + // execute eeprom write + fCtrlBits |= BIT_EEPROM_WRITE_TRIG; + Write(T_CTRL, REG_CTRL, &fCtrlBits, 4); + fCtrlBits &= ~BIT_EEPROM_WRITE_TRIG; + + // poll on serail_busy flag + for (i=0 ; i<500 ; i++) { + Read(T_STATUS, &status, REG_STATUS, 4); + if ((status & BIT_SERIAL_BUSY) == 0) + break; + Sleep(10); + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +bool DRSBoard::IsTimingCalibrationValid() +{ + return fabs(fNominalFrequency - fTimingCalibratedFrequency) < 0.001; +} + +double DRSBoard::GetTrueFrequency() +{ + int i; + double f; + + if (IsTimingCalibrationValid()) { + /* calculate true frequency */ + for (i=0,f=0 ; i<1024 ; i++) + f += fCellDT[0][0][i]; + f = 1024.0 / f; + } else + f = fNominalFrequency; + + return f; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetTime(unsigned int chipIndex, int channelIndex, int tc, float *time, bool tcalibrated, bool rotated) +{ + int i, scale, iend; + double gt0, gt; + + /* for DRS2, please use function below */ + if (fDRSType < 4) + return GetTime(chipIndex, channelIndex, fNominalFrequency, tc, time, tcalibrated, rotated); + + scale = fDecimation ? 2 : 1; + + if (!IsTimingCalibrationValid() || !tcalibrated) { + double t0 = tc / fNominalFrequency; + for (i = 0; i < fChannelDepth; i++) { + if (rotated) + time[i] = static_cast < float >(((i*scale+tc) % kNumberOfBins) / fNominalFrequency - t0); + else + time[i] = static_cast < float >((i*scale) / fNominalFrequency); + if (time[i] < 0) + time[i] += static_cast < float > (kNumberOfBins / fNominalFrequency); + if (i*scale >= kNumberOfBins) + time[i] += static_cast < float > (kNumberOfBins / fNominalFrequency); + } + return 1; + } + + time[0] = 0; + for (i=1 ; i 0) { + // correct all channels to channel 0 (Daniel's method) + iend = tc >= 700 ? 700+1024 : 700; + for (i=tc,gt0=0 ; i (fCellDT[chipIndex][channelIndex][i]); + } else { + /* integral nonlinearity */ + for (i=0,tint=0; i (tint - i/fNominalFrequency); + tint += (float)fCellDT[chipIndex][channelIndex][i]; + } + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::GetTime(unsigned int chipIndex, int channelIndex, double freqGHz, int tc, float *time, bool tcalibrated, bool rotated) +{ + /* for DRS4, use function above */ + if (fDRSType == 4) + return GetTime(chipIndex, channelIndex, tc, time, tcalibrated, rotated); + + int i, irot; + DRSBoard::TimeData * init; + DRSBoard::TimeData::FrequencyData * freq; + int frequencyMHz = (int)(freqGHz*1000); + + init = GetTimeCalibration(chipIndex); + + if (init == NULL) { + for (i = 0; i < kNumberOfBins; i++) + time[i] = static_cast < float >(i / fNominalFrequency); + return 1; + } + freq = NULL; + for (i = 0; i < init->fNumberOfFrequencies; i++) { + if (init->fFrequency[i]->fFrequency == frequencyMHz) { + freq = init->fFrequency[i]; + break; + } + } + if (freq == NULL) { + for (i = 0; i < kNumberOfBins; i++) + time[i] = static_cast < float >(i / fNominalFrequency); + return 1; + } + for (i = 0; i < kNumberOfBins; i++) { + irot = (fStopCell[chipIndex] + i) % kNumberOfBins; + if (fStopCell[chipIndex] + i < kNumberOfBins) + time[i] = static_cast < float >((freq->fBin[irot] - freq->fBin[fStopCell[chipIndex]]) / fNominalFrequency); + else + time[i] = + static_cast < + float + >((freq->fBin[irot] - freq->fBin[fStopCell[chipIndex]] + freq->fBin[kNumberOfBins - 1] - 2 * freq->fBin[0] + + freq->fBin[1]) / fNominalFrequency); + } + return 1; +} + +/*------------------------------------------------------------------*/ + +bool DRSBoard::InitTimeCalibration(unsigned int chipIndex) +{ + return GetTimeCalibration(chipIndex, true) != NULL; +} + +/*------------------------------------------------------------------*/ + +DRSBoard::TimeData * DRSBoard::GetTimeCalibration(unsigned int chipIndex, bool reinit) +{ + int i, l, index; + char *cstop; + char fileName[500]; + char error[240]; + PMXML_NODE node, rootNode, mainNode; + + index = fNumberOfTimeData; + for (i = 0; i < fNumberOfTimeData; i++) { + if (fTimeData[i]->fChip == static_cast < int >(chipIndex)) { + if (!reinit) + return fTimeData[i]; + else { + index = i; + break; + } + } + } + + fTimeData[index] = new DRSBoard::TimeData(); + DRSBoard::TimeData * init = fTimeData[index]; + + init->fChip = chipIndex; + + for (i = 0; i < init->kMaxNumberOfFrequencies; i++) { + if (i <= 499 || (i >= 501 && i <= 999) || (i >= 1001 && i <= 1499) || (i >= 1501 && i <= 1999) || + (i >= 2001 && i <= 2499) || i >= 2501) + continue; + sprintf(fileName, "%s/board%d/TimeCalib_board%d_chip%d_%dMHz.xml", fCalibDirectory, fBoardSerialNumber, + fBoardSerialNumber, chipIndex, i); + rootNode = mxml_parse_file(fileName, error, sizeof(error), NULL); + if (rootNode == NULL) + continue; + + init->fFrequency[init->fNumberOfFrequencies] = new DRSBoard::TimeData::FrequencyData(); + init->fFrequency[init->fNumberOfFrequencies]->fFrequency = i; + + mainNode = mxml_find_node(rootNode, "/DRSTimeCalibration"); + + for (l = 0; l < kNumberOfBins; l++) { + node = mxml_subnode(mainNode, l + 2); + init->fFrequency[init->fNumberOfFrequencies]->fBin[l] = strtod(mxml_get_value(node), &cstop); + } + mxml_free_tree(rootNode); + init->fNumberOfFrequencies++; + } + if (init->fNumberOfFrequencies == 0) { + printf("Board %d --> Could not find time calibration file\n", GetBoardSerialNumber()); + } + + if (index == fNumberOfTimeData) + fNumberOfTimeData++; + + return fTimeData[index]; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::SetCalibrationDirectory(const char *calibrationDirectoryPath) +{ + strncpy(fCalibDirectory, calibrationDirectoryPath, strlen(calibrationDirectoryPath)); + fCalibDirectory[strlen(calibrationDirectoryPath)] = 0; +}; + +/*------------------------------------------------------------------*/ + +void DRSBoard::GetCalibrationDirectory(char *calibrationDirectoryPath) +{ + strncpy(calibrationDirectoryPath, fCalibDirectory, strlen(fCalibDirectory)); + calibrationDirectoryPath[strlen(fCalibDirectory)] = 0; +}; + +/*------------------------------------------------------------------*/ + +void DRSBoard::LinearRegression(double *x, double *y, int n, double *a, double *b) +{ + int i; + double sx, sxx, sy, sxy; + + sx = sxx = sy = sxy = 0; + for (i = 0; i < n; i++) { + sx += x[i]; + sxx += x[i] * x[i]; + sy += y[i]; + sxy += x[i] * y[i]; + } + + *a = (n * sxy - sx * sy) / (n * sxx - sx * sx); + *b = (sy - *a * sx) / n; +} + +/*------------------------------------------------------------------*/ + +void DRSBoard::ReadSingleWaveform(int nChip, int nChan, + unsigned short wf[kNumberOfChipsMax][kNumberOfChannelsMax][kNumberOfBins], + bool rotated) +{ + int i, j, k, tc; + + StartDomino(); + SoftTrigger(); + while (IsBusy()); + TransferWaves(); + + for (i=0 ; iProgress(prog1); + + memset(center, 0, sizeof(center)); + + for (i=0 ; i 5) { + /* calculate and subtract common mode */ + for (l=0,cm=0 ; l old_prog) { + old_prog = prog; + if (pcb != NULL) + pcb->Progress(prog); + } + } + + for (i=0 ; iProgress(prog1); + + Averager *ave = new Averager(nChip, nChan, kNumberOfBins, 200); + + /* fill histograms */ + for (i=0 ; iAdd(j, k, l, swf[j][k][l]); + + /* update progress bar */ + prog = (int)(((double)(i+10)/(n+10))*(prog2-prog1)+prog1); + if (prog > old_prog) { + old_prog = prog; + if (pcb != NULL) + pcb->Progress(prog); + } + } + + /* + FILE *fh = fopen("calib.csv", "wt"); + for (i=40 ; i<60 ; i++) { + for (j=0 ; jRobustAverage(100, i, j, k); + + ave->SaveNormalizedDistribution("wv.csv", 0, 100); + + /* + FILE *fh = fopen("calib.csv", "wt"); + for (i=40 ; i<60 ; i++) { + fprintf(fh, "%d;", icenter[0][0][0] + (i - WFH_SIZE/2)*16); + fprintf(fh, "%d;", wfh[0][0][0][i]); + if (i == 50) + fprintf(fh, "%d;", awf[0]); + fprintf(fh, "\n"); + } + fclose(fh); + */ + + if (pcb != NULL) + pcb->Progress(prog2); + + delete ave; + + return 1; +} + +/*------------------------------------------------------------------*/ + +int idx[4][10] = { + { 0, 2, 4, 6, 8, 18, 20, 22, 24, 26 }, + { 1, 3, 5, 7, 39, 19, 21, 23, 25, 39 }, + { 9, 11, 13, 15, 17, 27, 29, 31, 33, 35 }, + { 10, 12, 14, 16, 39, 28, 30, 32, 34, 39 }, +}; + +#define F1(x) ((int) (84.0/24 * (x))) +#define F2(x) ((int) (92.0/8 * (x))) + +static unsigned short wft[kNumberOfChipsMax*kNumberOfChannelsMax*kNumberOfChipsMax][1024], + wf1[kNumberOfChipsMax*kNumberOfChannelsMax*kNumberOfChipsMax][1024], + wf2[kNumberOfChipsMax*kNumberOfChannelsMax*kNumberOfChipsMax][1024], + wf3[kNumberOfChipsMax*kNumberOfChannelsMax*kNumberOfChipsMax][1024]; + +int DRSBoard::CalibrateVolt(DRSCallback *pcb) +{ +int i, j, nChan, timingChan, chip, config, p, clkon, refclk, trg1, trg2, n_stuck, readchn, casc; +double f, r; +unsigned short buf[1024*16]; // 32 kB + + f = fNominalFrequency; + r = fRange; + clkon = (GetCtrlReg() & BIT_TCAL_EN) > 0; + refclk = (GetCtrlReg() & BIT_REFCLK_SOURCE) > 0; + trg1 = fTriggerEnable1; + trg2 = fTriggerEnable2; + readchn = fNumberOfReadoutChannels; + casc = fChannelCascading; + + Init(); + fNominalFrequency = f; + SetRefclk(refclk); + SetFrequency(fNominalFrequency, true); + SetDominoMode(1); + SetDominoActive(1); + SetReadoutMode(1); + SetInputRange(r); + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) + SelectClockSource(0); + else if (fBoardType == 6) + SetRefclk(refclk); + EnableTrigger(0, 0); + if (readchn == 5) + SetChannelConfig(4, 8, 8); // even channel readout mode + + // WSROUT toggling causes some noise, so calibrate that out + if (casc == 2) { + if (fTransport == TR_USB2) + SetChannelConfig(0, 8, 4); + else + SetChannelConfig(7, 8, 4); + } + + StartDomino(); + + nChan = 0; + timingChan = 0; + + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8 || fBoardType == 9) { + if (fBoardType == 9) { + nChan = 8; + timingChan = -1; + } else { + nChan = 9; + timingChan = 8; + } + + /* measure offset */ + if (fBoardType == 5) + EnableAcal(0, 0); // no inputs signal is allowed during calibration! + else + EnableAcal(1, 0); // disconnect analog inputs + EnableTcal(0, 0); + Sleep(100); + RobustAverageWaveforms(pcb, 1, nChan, 0, 25, wf1[0], 200, true); + + /* measure gain at upper range */ + EnableAcal(1, fRange+0.4); + EnableTcal(0, 1); + Sleep(100); + RobustAverageWaveforms(pcb, 1, nChan, 25, 50, wf2[0], 200, true); + + } else if (fBoardType == 6) { + if (fTransport == TR_USB2) { + nChan = 36; + timingChan = 8; + memset(wf1, 0, sizeof(wf1)); + memset(wf2, 0, sizeof(wf2)); + memset(wf3, 0, sizeof(wf3)); + for (config=p=0 ; config<4 ; config++) { + SetChannelConfig(config, 8, 8); + + /* measure offset */ + EnableAcal(1, 0); + EnableTcal(0, 0); + Sleep(100); + RobustAverageWaveforms(pcb, 0, 10, F1(p), F1(p+1), wft[0], 500, true); p++; + for (i=0 ; i<5 ; i++) + memcpy(wf1[idx[config][i]], wft[i*2], sizeof(float)*kNumberOfBins); + RobustAverageWaveforms(pcb, 2, 10, F1(p), F1(p+1), wft[0], 500, true); p++; + for (i=0 ; i<5 ; i++) + memcpy(wf1[idx[config][i+5]], wft[i*2], sizeof(float)*kNumberOfBins); + + /* measure gain at +400 mV */ + EnableAcal(1, 0.4); + EnableTcal(0, 0); + Sleep(100); + RobustAverageWaveforms(pcb, 0, 8, F1(p), F1(p+1), wft[0], 500, true); p++; + for (i=0 ; i<4 ; i++) + memcpy(wf2[idx[config][i]], wft[i*2], sizeof(float)*kNumberOfBins); + RobustAverageWaveforms(pcb, 2, 8, F1(p), F1(p+1), wft[0], 500, true); p++; + for (i=0 ; i<4 ; i++) + memcpy(wf2[idx[config][i+5]], wft[i*2], sizeof(float)*kNumberOfBins); + + /* measure gain at -400 mV */ + EnableAcal(1, -0.4); + EnableTcal(0, 1); + Sleep(100); + RobustAverageWaveforms(pcb, 0, 8, F1(p), F1(p+1), wft[0], 500, true); p++; + for (i=0 ; i<4 ; i++) + memcpy(wf3[idx[config][i]], wft[i], sizeof(float)*kNumberOfBins); + RobustAverageWaveforms(pcb, 2, 8, F1(p), F1(p+1), wft[0], 500, true); p++; + for (i=0 ; i<4 ; i++) + memcpy(wf3[idx[config][i+5]], wft[i], sizeof(float)*kNumberOfBins); + } + } else { + nChan = 36; + timingChan = 8; + + /* measure offset */ + EnableAcal(0, 0); // no inputs signal is allowed during calibration! + EnableTcal(0, 0); + Sleep(100); + RobustAverageWaveforms(pcb, 4, 9, 0, 25, wf1[0], 500, true); + + /* measure gain at upper range */ + EnableAcal(1, fRange+0.4); + EnableTcal(0, 0); + Sleep(100); + RobustAverageWaveforms(pcb, 4, 9, 25, 50, wf2[0], 500, true); + } + } + + /* convert offsets and gains to 16-bit values */ + memset(fCellOffset, 0, sizeof(fCellOffset)); + n_stuck = 0; + for (i=0 ; i 1.1) { + if ((fBoardType == 7 || fBoardType == 8 || fBoardType == 9) && i % 2 == 1) { + /* channels are not connected, so don't print error */ + } else { + printf("Gain of %6.3lf for channel %2d, cell %4d out of range 0.5 ... 1.1\n", + fCellGain[i][j], i, j); + } + fCellGain[i][j] = 1; + } + } + } + + /* + FILE *fh = fopen("calib.txt", "wt"); + for (i=0 ; iProgress(93); + + + /* write secondary calibration to EEPROM page 2 */ + ReadEEPROM(2, buf, 1024*32); + for (i=0 ; i<8 ; i++) + for (j=0 ; j<1024; j++) + buf[(i*1024+j)*2] = fCellOffset2[i][j]; + WriteEEPROM(2, buf, 1024*32); + if (pcb != NULL) + pcb->Progress(96); + + /* update page # 0 */ + ReadEEPROM(0, buf, 4096); // 0-0x0FFF + /* write calibration method */ + buf[2] = (buf[2] & 0xFF00) | VCALIB_METHOD; + /* write temperature and range */ + buf[10] = ((unsigned short) (GetTemperature() * 2 + 0.5) << 8) | ((signed char)(fRange * 100)); + buf[11] = 1; // EEPROM page #1+2 + WriteEEPROM(0, buf, 4096); + fCellCalibratedRange = fRange; + if (pcb != NULL) + pcb->Progress(100); + + + } else if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8) { + /* write calibration CH0-CH7 to EEPROM page 1 */ + for (i=0 ; i<8 ; i++) + for (j=0 ; j<1024; j++) { + buf[(i*1024+j)*2] = fCellOffset[i][j]; + buf[(i*1024+j)*2+1] = (unsigned short) ((fCellGain[i][j] - 0.7) / 0.4 * 65535); + } + WriteEEPROM(1, buf, 1024*32); + + /* write calibration CH8 and secondary calibration to EEPROM page 2 */ + for (j=0 ; j<1024; j++) { + buf[j*2] = fCellOffset[8][j]; + buf[j*2+1] = (unsigned short) ((fCellGain[8][j] - 0.7) / 0.4 * 65535); + } + for (i=0 ; i<4 ; i++) + for (j=0 ; j<1024; j++) { + buf[2*1024+(i*1024+j)*2] = fCellOffset2[i*2][j]; + buf[2*1024+(i*1024+j)*2+1] = fCellOffset2[i*2+1][j]; + } + WriteEEPROM(2, buf, 1024*5*4); + + /* write calibration method and range */ + ReadEEPROM(0, buf, 2048); // 0-0x0FFF + buf[2] = VCALIB_METHOD_V4 | ((signed char)(fRange * 100)) << 8; + WriteEEPROM(0, buf, 2048); + fCellCalibratedRange = fRange; + + } else if (fBoardType == 6) { + for (chip=0 ; chip<4 ; chip++) { + /* write calibration of A0 to A7 to EEPROM page 1 + B0 to B7 to EEPROM page 2 and so on */ + for (i=0 ; i<8 ; i++) + for (j=0 ; j<1024; j++) { + buf[(i*1024+j)*2] = fCellOffset[i+chip*9][j]; + buf[(i*1024+j)*2+1] = (unsigned short) ((fCellGain[i+chip*9][j] - 0.7) / 0.4 * 65535); + } + WriteEEPROM(1+chip, buf, 1024*32); + if (pcb != NULL) + pcb->Progress(75+chip*4); + } + + /* write calibration A/B/C/D/CLK to EEPROM page 5 */ + ReadEEPROM(5, buf, 1024*4*4); + for (chip=0 ; chip<4 ; chip++) { + for (j=0 ; j<1024; j++) { + buf[j*2+chip*0x0800] = fCellOffset[8+chip*9][j]; + buf[j*2+1+chip*0x0800] = (unsigned short) ((fCellGain[8+chip*9][j] - 0.7) / 0.4 * 65535); + } + } + WriteEEPROM(5, buf, 1024*4*4); + if (pcb != NULL) + pcb->Progress(90); + + /* write secondary calibration to EEPROM page 7 and 8 */ + for (i=0 ; i<8 ; i++) { + for (j=0 ; j<1024; j++) { + buf[i*0x800 + j*2] = fCellOffset2[i][j]; + buf[i*0x800 + j*2+1] = fCellOffset2[i+9][j]; + } + } + WriteEEPROM(7, buf, 1024*32); + if (pcb != NULL) + pcb->Progress(94); + + for (i=0 ; i<8 ; i++) { + for (j=0 ; j<1024; j++) { + buf[i*0x800 + j*2] = fCellOffset2[i+18][j]; + buf[i*0x800 + j*2+1] = fCellOffset2[i+27][j]; + } + } + WriteEEPROM(8, buf, 1024*32); + if (pcb != NULL) + pcb->Progress(98); + + /* write calibration method and range */ + ReadEEPROM(0, buf, 2048); // 0-0x0FFF + buf[2] = VCALIB_METHOD | ((signed char)(fRange * 100)) << 8; + WriteEEPROM(0, buf, 2048); + fCellCalibratedRange = fRange; + if (pcb != NULL) + pcb->Progress(100); + } + + if (n_stuck) + printf("\nFound %d stuck pixels on this board\n", n_stuck); + + fVoltageCalibrationValid = true; + + /* remove calibration voltage */ + EnableAcal(0, 0); + EnableTcal(clkon, 0); + EnableTrigger(trg1, trg2); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int DRSBoard::AnalyzeSlope(Averager *ave, int iIter, int nIter, int channel, float wf[kNumberOfBins], int tCell, + double cellDV[kNumberOfBins], double cellDT[kNumberOfBins]) +{ + int i; + float dv, llim, ulim; + double sum, dtCell; + + if (fNominalFrequency > 3) { + llim = -100; + ulim = 100; + } else { + llim = -300; + ulim = 300; + } + + // rising edges ---- + + // skip first cells after trigger cell + for (i=tCell+5 ; i llim && + wf[(i+1) % kNumberOfBins] < ulim) { + + // calculate delta_v + dv = wf[(i+1) % kNumberOfBins] - wf[i % kNumberOfBins]; + + // average delta_v + ave->Add(0, channel, i % kNumberOfBins, dv); + } + } + + // falling edges ---- + + // skip first cells after trigger cell + for (i=tCell+5 ; i wf[(i+2) % kNumberOfBins] && + wf[i % kNumberOfBins] < ulim && + wf[(i+1) % kNumberOfBins] > llim) { + + // calcualte delta_v + dv = wf[(i+1) % kNumberOfBins] - wf[i % kNumberOfBins]; + + ave->Add(0, channel, i % kNumberOfBins, -dv); + } + } + + // calculate calibration every 100 events + if ((iIter + 1) % 100 == 0) { + // average over all 1024 dU + sum = 0; + for (i=0 ; iMedian(0, channel, i); + else { + // use empirically found limits for averaging + if (fNominalFrequency >= 4) + cellDV[i] = ave->RobustAverage(3, 0, channel, i); + else if (fNominalFrequency >= 3) + cellDV[i] = ave->RobustAverage(6, 0, channel, i); + else + cellDV[i] = ave->Median(0, channel, i); + } + + sum += cellDV[i]; + } + + sum /= kNumberOfBins; + dtCell = (float)1/fNominalFrequency; + + // here comes the central calculation, dT = dV/average * dt_cell + for (i=0 ; i= 4) + dv_limit = 4; + else if (fNominalFrequency >= 3) + dv_limit = 6; + else + dv_limit = 10000; + + for (edge = 0 ; edge < 2 ; edge ++) { + + /* find edge zero crossing with wrap-around */ + for (i=tCell+5,nzx=0 ; i 0) { // falling edge + if (fBoardType != 9 || fabs(dv-cellDV[i % 1024]) < dv_limit) // only if DV is not more the dv_limit away from average + zeroXing[nzx++] = i % 1024; + } + } else { + if (wf[(i+1) % 1024] > 0 && wf[i % 1024] < 0) { // rising edge + if (fBoardType != 9 || fabs(dv-cellDV[i % 1024]) < dv_limit) + zeroXing[nzx++] = i % 1024; + } + } + } + + /* abort if uncorrect number of edges is found */ + if (abs(nest - nzx) > nest / 3) + return 0; + + for (i=n_correct=0 ; i= 2) + corr_limit = 0.001; + else if (fBoardType == 9) + corr_limit = 0.004; + else + corr_limit = 0.01; + + if (fBoardType == 9 && fabs(1-corr) > corr_limit) + continue; + + /* remeber number of valid corrections */ + n_correct++; + + /* apply damping factor */ + corr = (corr-1)*damping + 1; + + /* apply from i1 to i2-1 inclusive */ + if (i1 == i2) + continue; + + /* distribute correciton equally into bins inside the region ... */ + for (j=i1 ; j<=i2 ; j++) + cellDT[j % 1024] *= corr; + + /* test correction */ + tPeriod = cellDT[i1]*(1/(1-wf[i1]/wf[(i1 + 1) % 1024])); + for (j=i1+1 ; j 0; + if (fBoardType == 6) + refclk = (GetCtrlReg() & BIT_REFCLK_SOURCE) > 0; + trg1 = fTriggerEnable1; + trg2 = fTriggerEnable2; + + Init(); + fNominalFrequency = f; + fTimingCalibratedFrequency = 0; + if (fBoardType == 6) // don't set refclk for evaluation boards + SetRefclk(refclk); + SetFrequency(fNominalFrequency, true); + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8) + fTCALFrequency = 132; // 132 MHz for EVAL1, for MEZZ this is set by ConfigureLMK + else if (fBoardType == 9) + fTCALFrequency = 100; + SetDominoMode(1); + SetDominoActive(1); + SetReadoutMode(1); + EnableTrigger(0, 0); + if (fBoardType == 5 || fBoardType == 7) { + EnableTcal(1, 0, 0); + SelectClockSource(1); // 2nd quartz + } else if (fBoardType == 8) { + nIterSlope = 0; + nIterPeriod = 1500; + EnableTcal(1, 0, 0); + SelectClockSource(1); // 2nd quartz + ave = new Averager(1, 1, 1024, 500); // one chip, 1 channel @ 1024 bins + } else if (fBoardType == 9) { + EnableTcal(1); + nIterSlope = 500; + nIterPeriod = 500; + ave = new Averager(1, 9, 1024, 500); // one chip, 9 channels @ 1024 bins + } + StartDomino(); + + /* initialize time array */ + for (i=0 ; i<1024 ; i++) + for (chip=0 ; chip<4 ; chip++) + for (channel = 0 ; channel < 8 ; channel++) { + fCellDT[chip][channel][i] = (float)1/fNominalFrequency; // [ns] + } + + error = 0; + + for (index = 0 ; index < nIterSlope+nIterPeriod ; index++) { + if (index % 10 == 0) + if (pcb) + pcb->Progress(100*index/(nIterSlope+nIterPeriod)); + + if (fTransport == TR_VME) { + SoftTrigger(); + while (IsBusy()); + + /* select random phase */ + phase = (rand() % 30) - 15; + if (phase == 0) + phase = 15; + EnableTcal(1, 0, phase); + + StartDomino(); + TransferWaves(); + + for (chip=0 ; chip<4 ; chip++) { + tCell = GetStopCell(chip); + GetWave(chip, 8, wf, true, tCell, 0, true); + status = AnalyzePeriod(ave, index, nIterPeriod, 0, wf, tCell, cellDV[chip], fCellDT[chip][0]); + + if (!status) + n_error++; + + if (n_error > nIterPeriod / 10) { + error = 1; + break; + } + } + } else { + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8) { // DRS4 Evaluation board: 1 Chip + SoftTrigger(); + while (IsBusy()); + + StartDomino(); + TransferWaves(); + + tCell = GetStopCell(0); + GetWave(0, 8, wf, true, tCell, 0, true); + + if (index < nIterSlope) + status = AnalyzeSlope(ave, index, nIterSlope, 0, wf, tCell, cellDV[0], fCellDT[0][0]); + else + status = AnalyzePeriod(ave, index, nIterPeriod, 0, wf, tCell, cellDV[0], fCellDT[0][0]); + + if (!status) + n_error++; + + if (n_error > nIterPeriod / 10) { + error = 1; + break; + } + } else if (fBoardType == 9) { // DRS4 Evaluation board V5: all channels from one chip + SoftTrigger(); + while (IsBusy()); + + StartDomino(); + TransferWaves(); + + // calibrate all channels individually + for (channel = 0 ; channel < 8 ; channel+=2) { + tCell = GetStopCell(0); + GetWave(0, channel, wf, true, tCell, 0, true); + + if (index < nIterSlope) + status = AnalyzeSlope(ave, index, nIterSlope, channel, wf, tCell, cellDV[channel], fCellDT[0][channel]); + else + status = AnalyzePeriod(ave, index, nIterPeriod, channel, wf, tCell, cellDV[channel], fCellDT[0][channel]); + + if (!status) + n_error++; + + if (n_error > nIterPeriod / 2) { + error = 1; + break; + } + } + if (!status) + break; + + } else { // DRS4 Mezzanine board: 4 Chips + for (mode=0 ; mode<2 ; mode++) { + SetChannelConfig(mode*2, 8, 8); + SoftTrigger(); + while (IsBusy()); + + /* select random phase */ + phase = (rand() % 30) - 15; + if (phase == 0) + phase = 15; + EnableTcal(1, 0, phase); + + StartDomino(); + TransferWaves(); + + for (chip=0 ; chip<4 ; chip+=2) { + tCell = GetStopCell(chip+mode); + GetWave(chip+mode, 8, wf, true, tCell, 0, true); + status = AnalyzePeriod(ave, index, nIterPeriod, 0, wf, tCell, cellDV[chip+mode], fCellDT[chip+mode][0]); + + if (!status) { + error = 1; + break; + } + } + if (!status) + break; + + } + } + } + } + + if (pcb) + pcb->Progress(100); + + // DRS4 Evaluation board V5: copy even channels to odd channels (usually not connected) + if (fBoardType == 9) { + for (channel = 0 ; channel < 8 ; channel+=2) + memcpy(fCellDT[0][channel+1], fCellDT[0][channel], sizeof(unsigned short)*1024); + } + + // use following lines to save calibration into an ASCII file +#if 0 + FILE *fh; + + fh = fopen("cellt.csv", "wt"); + if (!fh) + printf("Cannot open file \"cellt.csv\"\n"); + else { + fprintf(fh, "index,dt_ch1,dt_ch2,dt_ch3,dt_ch4\n"); + for (i=0 ; i<1024 ; i++) + fprintf(fh, "%4d,%5.3lf,%5.3lf,%5.3lf,%5.3lf\n", i, fCellDT[0][0][i], fCellDT[0][2][i], fCellDT[0][4][i], fCellDT[0][6][i]); + fclose(fh); + } +#endif + + if (fBoardType == 5 || fBoardType == 7 || fBoardType == 8) { + /* write timing calibration to EEPROM page 0 */ + ReadEEPROM(0, buf, sizeof(buf)); + for (i=0,t1[0]=0 ; i<1024; i++) + buf[i*2+1] = (unsigned short) (fCellDT[0][0][i] * 10000 + 0.5); + + /* write calibration method and frequency */ + buf[4] = TCALIB_METHOD_V4; + buf[6] = (unsigned short)(fNominalFrequency*1000+0.5); + + fTimingCalibratedFrequency = fNominalFrequency; + WriteEEPROM(0, buf, sizeof(buf)); + + // copy calibration to all channels + for (i=1 ; i<8 ; i++) + for (j=0 ; j<1024; j++) + fCellDT[0][i][j] = fCellDT[0][0][j]; + + } else if (fBoardType == 9) { + + /* write timing calibration to EEPROM page 2 */ + ReadEEPROM(2, buf, sizeof(buf)); + for (i=0 ; i<8 ; i++) { + tTrue = 0; // true cellT + tRounded = 0; // rounded cellT + for (j=0 ; j<1024; j++) { + tTrue += fCellDT[0][i][j]; + dT = tTrue - tRounded; + // shift by 1 ns to allow negative widths + dT = (unsigned short) (dT*10000+1000+0.5); + tRounded += (dT - 1000) / 10000.0; + buf[(i*1024+j)*2+1] = (unsigned short) dT; + } + } + WriteEEPROM(2, buf, sizeof(buf)); + + /* write calibration method and frequency to EEPROM page 0 */ + ReadEEPROM(0, buf, sizeof(buf)); + buf[4] = 1; // number of calibrations + buf[2] = (TCALIB_METHOD << 8) | (buf[2] & 0xFF); // calibration method + float fl = (float) fNominalFrequency; + memcpy(&buf[8], &fl, sizeof(float)); // exact freqeuncy + + fTimingCalibratedFrequency = fNominalFrequency; + WriteEEPROM(0, buf, sizeof(buf)); + + } else { + + /* write timing calibration to EEPROM page 6 */ + ReadEEPROM(6, buf, sizeof(buf)); + for (c=0 ; c<4 ; c++) + t1[c] = 0; + for (i=0 ; i<1024; i++) { + for (c=0 ; c<4 ; c++) { + t2[c] = fCellDT[0][c][i] - t1[c]; + t2[c] = (unsigned short) (t2[c] * 10000 + 0.5); + t1[c] += t2[c] / 10000.0; + } + buf[i*2] = (unsigned short) t2[0]; + buf[i*2+1] = (unsigned short) t2[1]; + buf[i*2+0x800] = (unsigned short) t2[2]; + buf[i*2+0x800+1] = (unsigned short) t2[3]; + } + WriteEEPROM(6, buf, sizeof(buf)); + + /* write calibration method and frequency */ + ReadEEPROM(0, buf, 16); + buf[4] = TCALIB_METHOD; + buf[6] = (unsigned short) (fNominalFrequency * 1000 + 0.5); + fTimingCalibratedFrequency = buf[6] / 1000.0; + WriteEEPROM(0, buf, 16); + } + + if (ave) + delete ave; + + /* remove calibration voltage */ + EnableAcal(0, 0); + EnableTcal(clkon, 0); + SetInputRange(range); + EnableTrigger(trg1, trg2); + + if (error) + return 0; + + return 1; +} + + +/*------------------------------------------------------------------*/ + + +void DRSBoard::RemoveSymmetricSpikes(short **wf, int nwf, + short diffThreshold, int spikeWidth, + short maxPeakToPeak, short spikeVoltage, + int nTimeRegionThreshold) +{ + // Remove a specific kind of spike on DRS4. + // This spike has some features, + // - Common on all the channels on a chip + // - Constant heigh and width + // - Two spikes per channel + // - Symmetric to cell #0. + // + // This is not general purpose spike-removing function. + // + // wf : Waveform data. cell#0 must be at bin0, + // and number of bins must be kNumberOfBins. + // nwf : Number of channels which "wf" holds. + // diffThreshold : Amplitude threshold to find peak + // spikeWidth : Width of spike + // maxPeakToPeak : When peak-to-peak is larger than this, the channel + // is not used to find spikes. + // spikeVoltage : Amplitude of spikes. When it is 0, it is calculated in this function + // from voltage difference from neighboring bins. + // nTimeRegionThreshold : Requirement of number of time regions having spike at common position. + // Total number of time regions is 2*"nwf". + + if (!wf || !nwf || !diffThreshold || !spikeWidth) { + return; + } + + int ibin, jbin, kbin; + double v; + int nbin; + int iwf; + short maximum, minimum; + int spikeCount[kNumberOfBins / 2]; + int spikeCountSum[kNumberOfBins / 2] = {0}; + bool largePulse[kNumberOfChannelsMax * 2] = {0}; + const short diffThreshold2 = diffThreshold + diffThreshold; + + const short maxShort = 0xFFFF>>1; + const short minShort = -maxShort - 1; + + // search spike + for (iwf = 0; iwf < nwf; iwf++) { + // first half + memset(spikeCount, 0, sizeof(spikeCount)); + maximum = minShort; + minimum = maxShort; + for (ibin = 0; ibin < kNumberOfBins / 2; ibin++) { + jbin = ibin; + maximum = max(maximum, wf[iwf][jbin]); + minimum = min(minimum, wf[iwf][jbin]); + if (jbin - 1 >= 0 && jbin + spikeWidth < kNumberOfBins) { + v = 0; + nbin = 0; + for (kbin = 0; kbin < spikeWidth; kbin++) { + v += wf[iwf][jbin + kbin]; + nbin++; + } + if ((nbin == 2 && v - (wf[iwf][jbin - 1] + wf[iwf][jbin + spikeWidth]) > diffThreshold2) || + (nbin != 2 && nbin && v / nbin - (wf[iwf][jbin - 1] + wf[iwf][jbin + spikeWidth]) / 2 > diffThreshold)) { + spikeCount[ibin]++; + } + } + } + if (maximum != minShort && minimum != maxShort && + (!maxPeakToPeak || maximum - minimum < maxPeakToPeak)) { + for (ibin = 0; ibin < kNumberOfBins / 2; ibin++) { + spikeCountSum[ibin] += spikeCount[ibin]; + } + largePulse[iwf] = false; +#if 0 /* this part can be enabled to skip checking other channels */ + if (maximum != minShort && minimum != maxShort && + maximum - minimum < diffThreshold) { + return; + } +#endif + } else { + largePulse[iwf] = true; + } + + // second half + memset(spikeCount, 0, sizeof(spikeCount)); + maximum = minShort; + minimum = maxShort; + for (ibin = 0; ibin < kNumberOfBins / 2; ibin++) { + jbin = kNumberOfBins - 1 - ibin; + maximum = max(maximum, wf[iwf][jbin]); + minimum = min(minimum, wf[iwf][jbin]); + if (jbin + 1 < kNumberOfBins && jbin - spikeWidth >= 0) { + v = 0; + nbin = 0; + for (kbin = 0; kbin < spikeWidth; kbin++) { + v += wf[iwf][jbin - kbin]; + nbin++; + } + if ((nbin == 2 && v - (wf[iwf][jbin + 1] + wf[iwf][jbin - spikeWidth]) > diffThreshold2) || + (nbin != 2 && nbin && v / nbin - (wf[iwf][jbin + 1] + wf[iwf][jbin - spikeWidth]) / 2 > diffThreshold)) { + spikeCount[ibin]++; + } + } + } + if (maximum != minShort && minimum != maxShort && + maximum - minimum < maxPeakToPeak) { + for (ibin = 0; ibin < kNumberOfBins / 2; ibin++) { + spikeCountSum[ibin] += spikeCount[ibin]; + } + largePulse[iwf + nwf] = false; +#if 0 /* this part can be enabled to skip checking other channels */ + if (maximum != minShort && minimum != maxShort && + maximum - minimum < diffThreshold) { + return; + } +#endif + } else { + largePulse[iwf + nwf] = true; + } + } + + // Find common spike + int commonSpikeBin = -1; + int commonSpikeMax = -1; + for (ibin = 0; ibin < kNumberOfBins / 2; ibin++) { + if (commonSpikeMax < spikeCountSum[ibin]) { + commonSpikeMax = spikeCountSum[ibin]; + commonSpikeBin = ibin; + } + } + + if (spikeCountSum[commonSpikeBin] >= nTimeRegionThreshold) { + if (spikeVoltage == 0) { + // Estimate spike amplitude + double baseline = 0; + int nBaseline = 0; + double peakAmplitude = 0; + int nPeakAmplitude = 0; + for (iwf = 0; iwf < nwf; iwf++) { + // first half + if (!largePulse[iwf]) { + // baseline + if ((jbin = commonSpikeBin - 1) >= 0 && jbin < kNumberOfBins) { + baseline += wf[iwf][jbin]; + nBaseline++; + } + if ((jbin = commonSpikeBin + spikeWidth + 1) >= 0 && jbin < kNumberOfBins) { + baseline += wf[iwf][jbin]; + nBaseline++; + } + // spike + for (ibin = 0; ibin < spikeWidth; ibin++) { + if ((jbin = commonSpikeBin + ibin) >= 0 && jbin < kNumberOfBins) { + peakAmplitude += wf[iwf][jbin]; + nPeakAmplitude++; + } + } + } + + // second half + if (!largePulse[iwf + nwf]) { + // baseline + if ((jbin = kNumberOfBins - 1 - commonSpikeBin + 1) >= 0 && jbin < kNumberOfBins) { + baseline += wf[iwf][jbin]; + nBaseline++; + } + if ((jbin = kNumberOfBins - 1 - commonSpikeBin - spikeWidth - 1) >= 0 && jbin < kNumberOfBins) { + baseline += wf[iwf][jbin]; + nBaseline++; + } + // spike + for (ibin = 0; ibin < spikeWidth; ibin++) { + if ((jbin = kNumberOfBins - 1 - commonSpikeBin - ibin) >= 0 && jbin < kNumberOfBins) { + peakAmplitude += wf[iwf][jbin]; + nPeakAmplitude++; + } + } + } + } + if (nBaseline && nPeakAmplitude) { + baseline /= nBaseline; + peakAmplitude /= nPeakAmplitude; + spikeVoltage = static_cast(peakAmplitude - baseline); + } else { + spikeVoltage = 0; + } + } + + // Remove spike + if (spikeVoltage > 0) { + for (iwf = 0; iwf < nwf; iwf++) { + for (ibin = 0; ibin < spikeWidth; ibin++) { + if ((jbin = commonSpikeBin + ibin) >= 0 && jbin < kNumberOfBins) { + wf[iwf][jbin] -= spikeVoltage; + } + if ((jbin = kNumberOfBins - 1 - commonSpikeBin - ibin) >= 0 && jbin < kNumberOfBins) { + wf[iwf][jbin] -= spikeVoltage; + } + } + } + } + } +} + +/*------------------------------------------------------------------*/ + +void ResponseCalibration::SetCalibrationParameters(int numberOfPointsLowVolt, int numberOfPoints, + int numberOfMode2Bins, int numberOfSamples, + int numberOfGridPoints, int numberOfXConstPoints, + int numberOfXConstGridPoints, double triggerFrequency, + int showStatistics) +{ + DeleteFields(); + InitFields(numberOfPointsLowVolt, numberOfPoints, numberOfMode2Bins, numberOfSamples, numberOfGridPoints, + numberOfXConstPoints, numberOfXConstGridPoints, triggerFrequency, showStatistics); +} + +/*------------------------------------------------------------------*/ + +void ResponseCalibration::ResetCalibration() +{ + int i; + for (i = 0; i < kNumberOfChipsMax; i++) + fCalibrationData[i]->fRead = false; + fCurrentPoint = 0; + fCurrentLowVoltPoint = 0; + fCurrentSample = 0; + fCurrentFitChannel = 0; + fCurrentFitBin = 0; + fRecorded = false; + fFitted = false; + fOffset = false; +}; + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::WriteCalibration(unsigned int chipIndex) +{ + if (!fOffset) + return false; + if (fBoard->GetDRSType() == 3) + return WriteCalibrationV4(chipIndex); + else + return WriteCalibrationV3(chipIndex); +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::WriteCalibrationV3(unsigned int chipIndex) +{ + if (!fOffset) + return false; + + int ii, j, k; + char str[1000]; + char strt[1000]; + short tempShort; + CalibrationData *data = fCalibrationData[chipIndex]; + CalibrationData::CalibrationDataChannel * chn; + + // Open File + fBoard->GetCalibrationDirectory(strt); + sprintf(str, "%s/board%d", strt, fBoard->GetBoardSerialNumber()); + if (MakeDir(str) == -1) { + printf("Error: Cannot create directory \"%s\"\n", str); + return false; + } + sprintf(str, "%s/board%d/ResponseCalib_board%d_chip%d_%dMHz.bin", strt, fBoard->GetBoardSerialNumber(), + fBoard->GetBoardSerialNumber(), chipIndex, static_cast < int >(fBoard->GetNominalFrequency() * 1000)); + fCalibFile = fopen(str, "wb"); + if (fCalibFile == NULL) { + printf("Error: Cannot write to file \"%s\"\n", str); + return false; + } + // Write File + fwrite(&data->fNumberOfGridPoints, 1, 1, fCalibFile); + tempShort = static_cast < short >(data->fStartTemperature) * 10; + fwrite(&tempShort, 2, 1, fCalibFile); + tempShort = static_cast < short >(data->fEndTemperature) * 10; + fwrite(&tempShort, 2, 1, fCalibFile); + fwrite(&data->fMin, 4, 1, fCalibFile); + fwrite(&data->fMax, 4, 1, fCalibFile); + fwrite(&data->fNumberOfLimitGroups, 1, 1, fCalibFile); + + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + chn = data->fChannel[ii]; + for (j = 0; j < kNumberOfBins; j++) { + fwrite(&chn->fLimitGroup[j], 1, 1, fCalibFile); + fwrite(&chn->fLookUpOffset[j], 2, 1, fCalibFile); + fwrite(&chn->fNumberOfLookUpPoints[j], 1, 1, fCalibFile); + for (k = 0; k < chn->fNumberOfLookUpPoints[j]; k++) { + fwrite(&chn->fLookUp[j][k], 1, 1, fCalibFile); + } + for (k = 0; k < data->fNumberOfGridPoints; k++) { + fwrite(&chn->fData[j][k], 2, 1, fCalibFile); + } + fwrite(&chn->fOffsetADC[j], 2, 1, fCalibFile); + fwrite(&chn->fOffset[j], 2, 1, fCalibFile); + } + } + fclose(fCalibFile); + + printf("Calibration successfully written to\n\"%s\"\n", str); + return true; +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::WriteCalibrationV4(unsigned int chipIndex) +{ + if (!fOffset) + return false; + + int ii, j; + char str[1000]; + char strt[1000]; + CalibrationData *data = fCalibrationData[chipIndex]; + CalibrationData::CalibrationDataChannel * chn; + + // Open File + fBoard->GetCalibrationDirectory(strt); + sprintf(str, "%s/board%d", strt, fBoard->GetBoardSerialNumber()); + if (MakeDir(str) == -1) { + printf("Error: Cannot create directory \"%s\"\n", str); + return false; + } + sprintf(str, "%s/board%d/ResponseCalib_board%d_chip%d_%dMHz.bin", strt, fBoard->GetBoardSerialNumber(), + fBoard->GetBoardSerialNumber(), chipIndex, static_cast < int >(fBoard->GetNominalFrequency() * 1000)); + fCalibFile = fopen(str, "wb"); + if (fCalibFile == NULL) { + printf("Error: Cannot write to file \"%s\"\n", str); + return false; + } + // Write File + for (ii = 0; ii < kNumberOfCalibChannelsV4; ii++) { + chn = data->fChannel[ii]; + for (j = 0; j < kNumberOfBins; j++) { + fwrite(&chn->fOffset[j], 2, 1, fCalibFile); + fwrite(&chn->fGain[j], 2, 1, fCalibFile); + } + } + fclose(fCalibFile); + + printf("Calibration successfully written to\n\"%s\"\n", str); + return true; +} + +/*------------------------------------------------------------------*/ + +void ResponseCalibration::CalibrationTrigger(int mode, double voltage) +{ + fBoard->Reinit(); + fBoard->EnableAcal(mode, voltage); + fBoard->StartDomino(); + fBoard->SoftTrigger(); + while (fBoard->IsBusy()) { + } +} + +/*------------------------------------------------------------------*/ + +void ResponseCalibration::CalibrationStart(double voltage) +{ + fBoard->SetDominoMode(1); + fBoard->EnableAcal(0, voltage); + fBoard->StartDomino(); + fBoard->IsBusy(); + fBoard->IsBusy(); + fBoard->IsBusy(); +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::RecordCalibrationPoints(int chipNumber) +{ + if (!fInitialized) + return true; + if (fBoard->GetDRSType() == 3) + return RecordCalibrationPointsV4(chipNumber); + else + return RecordCalibrationPointsV3(chipNumber); +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::RecordCalibrationPointsV3(int chipNumber) +{ + int j, k, ii; + int notdone, nsample; + double voltage; + float mean; + const double minVolt = 0.006; + const double xpos[50] = + { 0.010, 0.027, 0.052, 0.074, 0.096, 0.117, 0.136, 0.155, 0.173, 0.191, 0.208, 0.226, 0.243, 0.260, + 0.277, 0.294, 0.310, + 0.325, 0.342, 0.358, 0.374, 0.390, 0.406, 0.422, 0.439, 0.457, 0.477, 0.497, 0.520, 0.546, 0.577, 0.611, + 0.656, 0.710, + 0.772, 0.842, 0.916, + 0.995, 1.075, 1.157, 1.240, 1.323, 1.407, 1.490, 1.575, 1.659, 1.744, 1.829, 1.914, 2.000 + }; + + // Initialisations + if (fCurrentLowVoltPoint == 0) { + fBoard->SetDAC(fBoard->fDAC_CLKOFS, 0); + // Record Temperature + fCalibrationData[chipNumber]->fStartTemperature = static_cast < float >(fBoard->GetTemperature()); + } + // Record current Voltage + if (fCurrentLowVoltPoint < fNumberOfPointsLowVolt) + voltage = + (xpos[0] - minVolt) * fCurrentLowVoltPoint / static_cast < + double >(fNumberOfPointsLowVolt) + minVolt; + else + voltage = xpos[fCurrentPoint]; + fBoard->SetCalibVoltage(voltage); + fResponseY[fCurrentPoint + fCurrentLowVoltPoint] = static_cast < float >(voltage) * 1000; + + // Loop Over Number Of Samples For Statistics + for (j = 0; j < fNumberOfSamples; j++) { + // Read Out Second Part of the Waveform + CalibrationTrigger(3, voltage); + fBoard->TransferWaves(); + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + fBoard->GetRawWave(chipNumber, ii, fWaveFormMode3[ii][j]); + } + // Read Out First Part of the Waveform + CalibrationStart(voltage); + CalibrationTrigger(2, voltage); + fBoard->TransferWaves(); + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + fBoard->GetRawWave(chipNumber, ii, fWaveFormMode2[ii][j]); + } + CalibrationStart(voltage); + } + // Average Sample Points + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + for (k = 0; k < kNumberOfBins; k++) { + fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] = 0; + for (j = 0; j < fNumberOfSamples; j++) { + fSampleUsed[j] = 1; + if (k < fNumberOfMode2Bins) + fSamples[j] = fWaveFormMode2[ii][j][k]; + else + fSamples[j] = fWaveFormMode3[ii][j][k]; + fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] += fSamples[j]; + } + mean = fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] / fNumberOfSamples; + notdone = 1; + nsample = fNumberOfSamples; + while (notdone) { + notdone = 0; + for (j = 0; j < fNumberOfSamples; j++) { + if (fSampleUsed[j] && abs(static_cast < int >(fSamples[j] - mean)) > 3) { + notdone = 1; + fSampleUsed[j] = 0; + nsample--; + fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] -= fSamples[j]; + mean = fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] / nsample; + } + } + } + fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] = mean; + } + } + if (fCurrentLowVoltPoint < fNumberOfPointsLowVolt) + fCurrentLowVoltPoint++; + else + fCurrentPoint++; + + if (fCurrentPoint == fNumberOfPoints) { + fCalibrationData[chipNumber]->fEndTemperature = static_cast < float >(fBoard->GetTemperature()); + fRecorded = true; + fFitted = false; + fOffset = false; + fCalibrationData[chipNumber]->fRead = false; + fCalibrationData[chipNumber]->fHasOffsetCalibration = false; + fBoard->SetCalibVoltage(0.0); + fBoard->EnableAcal(1, 0.0); + fBoard->SetDAC(fBoard->fDAC_CLKOFS, 0.0); + return true; + } + + return false; +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::RecordCalibrationPointsV4(int chipNumber) +{ + int i, j, k, n; + double voltage, s, s2, average; + + if (fCurrentPoint == 0) { + fBoard->SetDominoMode(1); + fBoard->EnableAcal(1, 0); + fBoard->SoftTrigger(); + while (fBoard->IsBusy()); + fBoard->StartDomino(); + fCalibrationData[chipNumber]->fStartTemperature = static_cast < float >(fBoard->GetTemperature()); + } + voltage = 1.0 * fCurrentPoint / (static_cast < double >(fNumberOfPoints) - 1) +0.1; + fBoard->SetCalibVoltage(voltage); + Sleep(10); + fBoard->SetCalibVoltage(voltage); + Sleep(10); + + // One dummy cycle for unknown reasons + fBoard->SoftTrigger(); + while (fBoard->IsBusy()); + fBoard->StartDomino(); + Sleep(50); + fBoard->TransferWaves(); + + // Loop over number of samples for statistics + for (i = 0; i < fNumberOfSamples; i++) { + if (fBoard->Debug()) { + printf("%02d:%02d\r", fNumberOfPoints - fCurrentPoint, fNumberOfSamples - i); + fflush(stdout); + } + + + fBoard->SoftTrigger(); + while (fBoard->IsBusy()); + fBoard->StartDomino(); + Sleep(50); + fBoard->TransferWaves(); + for (j = 0; j < kNumberOfCalibChannelsV4; j++) { + fBoard->GetRawWave(chipNumber, j, fWaveFormMode3[j][i]); + } + } + + // Calculate averages + for (i = 0; i < kNumberOfCalibChannelsV4; i++) { + for (k = 0; k < kNumberOfBins; k++) { + s = s2 = 0; + + for (j = 0; j < fNumberOfSamples; j++) { + s += fWaveFormMode3[i][j][k]; + s2 += fWaveFormMode3[i][j][k] * fWaveFormMode3[i][j][k]; + } + n = fNumberOfSamples; + average = s / n; + + fResponseX[i][k][fCurrentPoint] = static_cast < float >(average); + } + } + + fCurrentPoint++; + if (fCurrentPoint == fNumberOfPoints) { + fCalibrationData[chipNumber]->fEndTemperature = static_cast < float >(fBoard->GetTemperature()); + fRecorded = true; + return true; + } + + return false; +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::FitCalibrationPoints(int chipNumber) +{ + if (!fRecorded || fFitted) + return true; + if (fBoard->GetDRSType() == 3) + return FitCalibrationPointsV4(chipNumber); + else + return FitCalibrationPointsV3(chipNumber); +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::FitCalibrationPointsV3(int chipNumber) +{ + int i, j, k; + float x1, x2, y1, y2; + float uu; + float yc, yr; + float xminExt, xrangeExt; + float xmin, xrange; + float average, averageError, averageExt, averageErrorExt; + unsigned short i0, i1; + + CalibrationData *data = fCalibrationData[chipNumber]; + CalibrationData::CalibrationDataChannel * chn = data->fChannel[fCurrentFitChannel]; + + data->DeletePreCalculatedBSpline(); + + if (fCurrentFitBin == 0 && fCurrentFitChannel == 0) { + data->fNumberOfLimitGroups = 0; + data->fMin = 100000; + data->fMax = -100000; + for (i = 0; i < kNumberOfCalibChannelsV3; i++) { + for (j = 0; j < kNumberOfBins; j++) { + if (data->fMin > fResponseX[i][j][fNumberOfPointsLowVolt + fNumberOfPoints - 1]) + data->fMin = fResponseX[i][j][fNumberOfPointsLowVolt + fNumberOfPoints - 1]; + if (data->fMax < fResponseX[i][j][fNumberOfPointsLowVolt]) + data->fMax = fResponseX[i][j][fNumberOfPointsLowVolt]; + } + } + } + // Low Volt + i0 = static_cast < unsigned short >(fResponseX[fCurrentFitChannel][fCurrentFitBin][0]); + i1 = static_cast < + unsigned short >(fResponseX[fCurrentFitChannel][fCurrentFitBin][fNumberOfPointsLowVolt]) + 1; + chn->fLookUpOffset[fCurrentFitBin] = i0; + delete chn->fLookUp[fCurrentFitBin]; + if (i0 - i1 + 1 < 2) { + chn->fNumberOfLookUpPoints[fCurrentFitBin] = 2; + chn->fLookUp[fCurrentFitBin] = new unsigned char[2]; + chn->fLookUp[fCurrentFitBin][0] = 0; + chn->fLookUp[fCurrentFitBin][1] = 0; + } else { + chn->fNumberOfLookUpPoints[fCurrentFitBin] = i0 - i1 + 1; + chn->fLookUp[fCurrentFitBin] = new unsigned char[i0 - i1 + 1]; + for (i = 0; i < i0 - i1 + 1; i++) { + for (j = 0; j < fNumberOfPointsLowVolt; j++) { + if (i0 - i >= fResponseX[fCurrentFitChannel][fCurrentFitBin][j + 1]) { + x1 = fResponseX[fCurrentFitChannel][fCurrentFitBin][j]; + x2 = fResponseX[fCurrentFitChannel][fCurrentFitBin][j + 1]; + y1 = fResponseY[j]; + y2 = fResponseY[j + 1]; + chn->fLookUp[fCurrentFitBin][i] = + static_cast < unsigned char >(((y2 - y1) * (i0 - i - x1) / (x2 - x1) + y1) / fPrecision); + break; + } + } + } + } + + // Copy Points + for (i = 0; i < fNumberOfPoints; i++) { + fPntX[0][i] = fResponseX[fCurrentFitChannel][fCurrentFitBin][fNumberOfPointsLowVolt + i]; + fPntY[0][i] = fResponseY[fNumberOfPointsLowVolt + i]; + } + // Fit BSpline + for (i = 0; i < fNumberOfPoints; i++) { + fUValues[0][i] = static_cast < float >(1 - i / (fNumberOfPoints - 1.)); + } + if (!Approx(fPntX[0], fUValues[0], fNumberOfPoints, fNumberOfGridPoints, fResX[fCurrentFitBin])) + return true; + if (!Approx(fPntY[0], fUValues[0], fNumberOfPoints, fNumberOfGridPoints, fRes[fCurrentFitBin])) + return true; + + // X constant fit + for (k = 0; k < fNumberOfXConstPoints - 2; k++) { + fPntX[1][k + 1] = + GetValue(fResX[fCurrentFitBin], + static_cast < float >(1 - k / static_cast < float >(fNumberOfXConstPoints - 3)), + fNumberOfGridPoints); + fPntY[1][k + 1] = + GetValue(fRes[fCurrentFitBin], + static_cast < float >(1 - k / static_cast < float >(fNumberOfXConstPoints - 3)), + fNumberOfGridPoints); + } + xmin = fPntX[1][fNumberOfXConstPoints - 2]; + xrange = fPntX[1][1] - xmin; + + for (i = 0; i < fNumberOfXConstPoints - 2; i++) { + fUValues[1][i + 1] = (fPntX[1][i + 1] - xmin) / xrange; + } + + if (!Approx + (&fPntY[1][1], &fUValues[1][1], fNumberOfXConstPoints - 2, fNumberOfXConstGridPoints, chn->fTempData)) + return true; + + // error statistics + if (fShowStatistics) { + for (i = 0; i < fNumberOfPoints; i++) { + uu = (fPntX[0][i] - xmin) / xrange; + yc = GetValue(chn->fTempData, uu, fNumberOfXConstGridPoints); + yr = fPntY[0][i]; + fStatisticsApprox[i][fCurrentFitBin + fCurrentFitChannel * kNumberOfBins] = yc - yr; + } + } + // Add min and max point + chn->fLimitGroup[fCurrentFitBin] = 0; + while (xmin - kBSplineXMinOffset > data->fMin + kBSplineXMinOffset * chn->fLimitGroup[fCurrentFitBin]) { + chn->fLimitGroup[fCurrentFitBin]++; + } + if (data->fNumberOfLimitGroups <= chn->fLimitGroup[fCurrentFitBin]) + data->fNumberOfLimitGroups = chn->fLimitGroup[fCurrentFitBin] + 1; + xminExt = data->fMin + kBSplineXMinOffset * chn->fLimitGroup[fCurrentFitBin]; + xrangeExt = data->fMax - xminExt; + + fPntX[1][0] = data->fMax; + uu = (fPntX[1][0] - xmin) / xrange; + fPntY[1][0] = GetValue(chn->fTempData, uu, fNumberOfXConstGridPoints); + + fPntX[1][fNumberOfXConstPoints - 1] = xminExt; + uu = (fPntX[1][fNumberOfXConstPoints - 1] - xmin) / xrange; + fPntY[1][fNumberOfXConstPoints - 1] = GetValue(chn->fTempData, uu, fNumberOfXConstGridPoints); + + for (i = 0; i < fNumberOfXConstPoints; i++) { + fUValues[1][i] = (fPntX[1][i] - xminExt) / xrangeExt; + } + + if (!Approx(fPntY[1], fUValues[1], fNumberOfXConstPoints, fNumberOfXConstGridPoints, chn->fTempData)) + return true; + + // error statistics + if (fShowStatistics) { + for (i = 0; i < fNumberOfPoints; i++) { + uu = (fPntX[0][i] - xminExt) / xrangeExt; + yc = GetValue(chn->fTempData, uu, fNumberOfXConstGridPoints); + yr = fPntY[0][i]; + fStatisticsApproxExt[i][fCurrentFitBin + fCurrentFitChannel * kNumberOfBins] = yc - yr; + } + } + for (i = 0; i < fNumberOfXConstGridPoints; i++) { + chn->fData[fCurrentFitBin][i] = static_cast < short >(chn->fTempData[i] / fPrecision); + } + + // write end of file + fCurrentFitBin++; + if (fCurrentFitBin == kNumberOfBins) { + fCurrentFitChannel++; + fCurrentFitBin = 0; + } + if (fCurrentFitChannel == kNumberOfCalibChannelsV3) { + if (fShowStatistics) { + for (i = 0; i < fNumberOfPoints; i++) { + average = 0; + averageError = 0; + averageExt = 0; + averageErrorExt = 0; + for (j = 0; j < kNumberOfCalibChannelsV3 * kNumberOfBins; j++) { + average += fStatisticsApprox[i][j]; + averageError += fStatisticsApprox[i][j] * fStatisticsApprox[i][j]; + averageExt += fStatisticsApproxExt[i][j]; + averageErrorExt += fStatisticsApproxExt[i][j] * fStatisticsApproxExt[i][j]; + } + average /= kNumberOfCalibChannelsV3 * kNumberOfBins; + averageError = + sqrt((averageError - + average * average / kNumberOfCalibChannelsV3 * kNumberOfBins) / + (kNumberOfCalibChannelsV3 * kNumberOfBins - 1)); + averageExt /= kNumberOfCalibChannelsV3 * kNumberOfBins; + averageErrorExt = + sqrt((averageErrorExt - + averageExt * averageExt / kNumberOfCalibChannelsV3 * kNumberOfBins) / + (kNumberOfCalibChannelsV3 * kNumberOfBins - 1)); + printf("Error at %3.1f V : % 2.3f +- % 2.3f ; % 2.3f +- % 2.3f\n", fPntY[0][i], average, + averageError, averageExt, averageErrorExt); + } + } + fFitted = true; + fOffset = false; + fCalibrationData[chipNumber]->fRead = true; + fCalibrationData[chipNumber]->fHasOffsetCalibration = false; + data->PreCalculateBSpline(); + return true; + } + return false; +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::FitCalibrationPointsV4(int chipNumber) +{ + if (!fRecorded || fFitted) + return true; + int i; + double par[2]; + static int error; + + CalibrationData *data = fCalibrationData[chipNumber]; + CalibrationData::CalibrationDataChannel * chn = data->fChannel[fCurrentFitChannel]; + + if (fCurrentFitBin == 0 && fCurrentFitChannel == 0) { + error = 0; + for (i = 0; i < fNumberOfPoints; i++) + fWWFit[i] = 1; + } + + for (i = 0; i < fNumberOfPoints; i++) { + fXXFit[i] = 1.0 * i / (static_cast < double >(fNumberOfPoints) - 1) +0.1; + fYYFit[i] = fResponseX[fCurrentFitChannel][fCurrentFitBin][i]; + if (fCurrentFitBin == 10 && fCurrentFitChannel == 1) { + fXXSave[i] = fXXFit[i]; + fYYSave[i] = fYYFit[i]; + } + } + + // DRSBoard::LinearRegression(fXXFit, fYYFit, fNumberOfPoints, &par[1], &par[0]); + // exclude first two points (sometimes are on limit of FADC) + DRSBoard::LinearRegression(fXXFit + 2, fYYFit + 2, fNumberOfPoints - 2, &par[1], &par[0]); + + chn->fOffset[fCurrentFitBin] = static_cast < unsigned short >(par[0] + 0.5); + chn->fGain[fCurrentFitBin] = static_cast < unsigned short >(par[1] + 0.5); + + // Remember min/max of gain + if (fCurrentFitBin == 0 && fCurrentFitChannel == 0) + fGainMin = fGainMax = chn->fGain[0]; + if (chn->fGain[fCurrentFitBin] < fGainMin) + fGainMin = chn->fGain[fCurrentFitBin]; + if (chn->fGain[fCurrentFitBin] > fGainMax) + fGainMax = chn->fGain[fCurrentFitBin]; + + // abort if outside normal region + if (chn->fGain[fCurrentFitBin] / 4096.0 < 0.8 || chn->fGain[fCurrentFitBin] / 4096.0 > 1) { + error++; + + if (error < 20) + printf("Gain=%1.3lf for bin %d on channel %d on chip %d outside valid region\n", + chn->fGain[fCurrentFitBin] / 4096.0, fCurrentFitBin, fCurrentFitChannel, chipNumber); + } + + if (fCurrentFitChannel == 1 && fCurrentFitBin == 10) { + for (i = 0; i < fNumberOfPoints; i++) { + fXXSave[i] = fXXFit[i]; + fYYSave[i] = (fYYFit[i] - chn->fOffset[10]) / chn->fGain[10] - fXXFit[i]; + } + } + + fCurrentFitBin++; + if (fCurrentFitBin == kNumberOfBins) { + fCurrentFitChannel++; + fCurrentFitBin = 0; + } + if (fCurrentFitChannel == kNumberOfCalibChannelsV4) { + + if (fBoard->Debug()) { + printf("Gain min=%1.3lf max=%1.3lf\n", fGainMin / 4096.0, fGainMax / 4096.0); + fflush(stdout); + } + // allow up to three bad bins + if (error > 3) { + printf("Aborting calibration!\n"); + return true; + } + + fFitted = true; + fOffset = false; + fCalibrationData[chipNumber]->fRead = true; + fCalibrationData[chipNumber]->fHasOffsetCalibration = false; + return true; + } + + return false; +} + +unsigned int millitime() +{ +#ifdef _MSC_VER + + return (int) GetTickCount(); + +#else + struct timeval tv; + + gettimeofday(&tv, NULL); + + return tv.tv_sec * 1000 + tv.tv_usec / 1000; +#endif + return 0; +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::OffsetCalibration(int chipNumber) +{ + if (!fFitted || fOffset) + return true; + if (fBoard->GetDRSType() == 3) + return OffsetCalibrationV4(chipNumber); + else + return OffsetCalibrationV3(chipNumber); +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::OffsetCalibrationV3(int chipNumber) +{ + int k, ii, j; + int t1, t2; + float mean, error; + CalibrationData *data = fCalibrationData[chipNumber]; + CalibrationData::CalibrationDataChannel * chn; + + if (fCurrentSample == 0) { + data->fHasOffsetCalibration = false; + fBoard->SetCalibVoltage(0.0); + fBoard->EnableAcal(0, 0.0); + } + // Loop Over Number Of Samples For Statistics + t1 = millitime(); + fBoard->SoftTrigger(); + while (fBoard->IsBusy()) { + } + fBoard->TransferWaves(); + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + fBoard->GetRawWave(chipNumber, ii, fWaveFormOffsetADC[ii][fCurrentSample]); + fBoard->CalibrateWaveform(chipNumber, ii, fWaveFormOffsetADC[ii][fCurrentSample], + fWaveFormOffset[ii][fCurrentSample], true, false, false, 0, true); + } + fBoard->StartDomino(); + fBoard->IsBusy(); + fBoard->IsBusy(); + fBoard->IsBusy(); + t2 = millitime(); + while (t2 - t1 < (1000 / fTriggerFrequency)) { + t2 = millitime(); + } + fCurrentSample++; + + if (fCurrentSample == fNumberOfSamples) { + // Average Sample Points + float *sample = new float[fNumberOfSamples]; + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + chn = data->fChannel[ii]; + for (k = 0; k < kNumberOfBins; k++) { + for (j = 0; j < fNumberOfSamples; j++) + sample[j] = static_cast < float >(fWaveFormOffset[ii][j][k]); + Average(1, sample, fNumberOfSamples, mean, error, 2); + chn->fOffset[k] = static_cast < short >(mean); + for (j = 0; j < fNumberOfSamples; j++) + sample[j] = fWaveFormOffsetADC[ii][j][k]; + Average(1, sample, fNumberOfSamples, mean, error, 2); + chn->fOffsetADC[k] = static_cast < unsigned short >(mean); + } + } + fOffset = true; + fCalibrationData[chipNumber]->fHasOffsetCalibration = true; + delete[] sample; + return true; + } + + return false; +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::OffsetCalibrationV4(int chipNumber) +{ + int k, ii, j; + float mean, error; + CalibrationData *data = fCalibrationData[chipNumber]; + CalibrationData::CalibrationDataChannel * chn; + + /* switch DRS to input, hope that no real signal occurs */ + if (fCurrentSample == 0) { + data->fHasOffsetCalibration = false; + fBoard->SetCalibVoltage(0.0); + fBoard->EnableAcal(0, 0.0); + /* one dummy trigger for unknown reasons */ + fBoard->SoftTrigger(); + while (fBoard->IsBusy()); + fBoard->StartDomino(); + Sleep(50); + } + // Loop Over Number Of Samples For Statistics + fBoard->SoftTrigger(); + while (fBoard->IsBusy()); + fBoard->TransferWaves(); + for (ii = 0; ii < kNumberOfCalibChannelsV4; ii++) + fBoard->GetRawWave(chipNumber, ii, fWaveFormOffsetADC[ii][fCurrentSample]); + + fBoard->StartDomino(); + Sleep(50); + fCurrentSample++; + + if (fBoard->Debug()) { + printf("%02d\r", fNumberOfSamples - fCurrentSample); + fflush(stdout); + } + + if (fCurrentSample == fNumberOfSamples) { + // Average Sample Points + float *sample = new float[fNumberOfSamples]; + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + chn = data->fChannel[ii]; + for (k = 0; k < kNumberOfBins; k++) { + for (j = 0; j < fNumberOfSamples; j++) + sample[j] = static_cast < float >(fWaveFormOffsetADC[ii][j][k]); + Average(1, sample, fNumberOfSamples, mean, error, 2); + chn->fOffset[k] = static_cast < unsigned short >(mean); + } + } + fOffset = true; + fCalibrationData[chipNumber]->fHasOffsetCalibration = true; + delete[] sample; + return true; + } + + return false; +} + +/*------------------------------------------------------------------*/ + +void ResponseCalibration::InitFields(int numberOfPointsLowVolt, int numberOfPoints, int numberOfMode2Bins, + int numberOfSamples, int numberOfGridPoints, int numberOfXConstPoints, + int numberOfXConstGridPoints, double triggerFrequency, + int showStatistics) +{ + int ii, j, i; + fInitialized = true; + fNumberOfPointsLowVolt = numberOfPointsLowVolt; + fNumberOfPoints = numberOfPoints; + fNumberOfMode2Bins = numberOfMode2Bins; + fNumberOfSamples = numberOfSamples; + fNumberOfGridPoints = numberOfGridPoints; + fNumberOfXConstPoints = numberOfXConstPoints; + fNumberOfXConstGridPoints = numberOfXConstGridPoints; + fTriggerFrequency = triggerFrequency; + fShowStatistics = showStatistics; + fCurrentPoint = 0; + fCurrentSample = 0; + fCurrentFitChannel = 0; + fCurrentFitBin = 0; + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + for (j = 0; j < kNumberOfBins; j++) { + fResponseX[ii][j] = new float[fNumberOfPoints + fNumberOfPointsLowVolt]; + } + } + fResponseY = new float[fNumberOfPoints + fNumberOfPointsLowVolt]; + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + fWaveFormMode3[ii] = new unsigned short *[fNumberOfSamples]; + fWaveFormMode2[ii] = new unsigned short *[fNumberOfSamples]; + fWaveFormOffset[ii] = new short *[fNumberOfSamples]; + fWaveFormOffsetADC[ii] = new unsigned short *[fNumberOfSamples]; + for (i = 0; i < fNumberOfSamples; i++) { + fWaveFormMode3[ii][i] = new unsigned short[kNumberOfBins]; + fWaveFormMode2[ii][i] = new unsigned short[kNumberOfBins]; + fWaveFormOffset[ii][i] = new short[kNumberOfBins]; + fWaveFormOffsetADC[ii][i] = new unsigned short[kNumberOfBins]; + } + } + fSamples = new unsigned short[fNumberOfSamples]; + fSampleUsed = new int[fNumberOfSamples]; + + for (j = 0; j < kNumberOfBins; j++) { + fRes[j] = new float[fNumberOfGridPoints]; + fResX[j] = new float[fNumberOfGridPoints]; + } + for (i = 0; i < 2; i++) { + fPntX[i] = new float[fNumberOfPoints * (1 - i) + fNumberOfXConstPoints * i]; + fPntY[i] = new float[fNumberOfPoints * (1 - i) + fNumberOfXConstPoints * i]; + fUValues[i] = new float[fNumberOfPoints * (1 - i) + fNumberOfXConstPoints * i]; + } + fXXFit = new double[fNumberOfPoints]; + fYYFit = new double[fNumberOfPoints]; + fWWFit = new double[fNumberOfPoints]; + fYYFitRes = new double[fNumberOfPoints]; + fYYSave = new double[fNumberOfPoints]; + fXXSave = new double[fNumberOfPoints]; + + fStatisticsApprox = new float *[fNumberOfPoints]; + fStatisticsApproxExt = new float *[fNumberOfPoints]; + for (i = 0; i < fNumberOfPoints; i++) { + fStatisticsApprox[i] = new float[kNumberOfCalibChannelsV3 * kNumberOfBins]; + fStatisticsApproxExt[i] = new float[kNumberOfCalibChannelsV3 * kNumberOfBins]; + } + for (i = 0; i < kNumberOfChipsMax; i++) { + fCalibrationData[i] = new CalibrationData(numberOfXConstGridPoints); + } +} + +/*------------------------------------------------------------------*/ + +void ResponseCalibration::DeleteFields() +{ + if (!fInitialized) + return; + fInitialized = false; + int ii, j, i; + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + for (j = 0; j < kNumberOfBins; j++) { + delete fResponseX[ii][j]; + } + } + delete fResponseY; + for (ii = 0; ii < kNumberOfCalibChannelsV3; ii++) { + for (i = 0; i < fNumberOfSamples; i++) { + if (fWaveFormMode3[ii] != NULL) + delete fWaveFormMode3[ii][i]; + if (fWaveFormMode2[ii] != NULL) + delete fWaveFormMode2[ii][i]; + if (fWaveFormOffset[ii] != NULL) + delete fWaveFormOffset[ii][i]; + if (fWaveFormOffsetADC[ii] != NULL) + delete fWaveFormOffsetADC[ii][i]; + } + delete fWaveFormMode3[ii]; + delete fWaveFormMode2[ii]; + delete fWaveFormOffset[ii]; + delete fWaveFormOffsetADC[ii]; + } + delete fSamples; + delete fSampleUsed; + + for (j = 0; j < kNumberOfBins; j++) { + delete fRes[j]; + delete fResX[j]; + } + for (i = 0; i < 2; i++) { + delete fPntX[i]; + delete fPntY[i]; + delete fUValues[i]; + } + delete fXXFit; + delete fYYFit; + delete fWWFit; + delete fYYFitRes; + delete fYYSave; + delete fXXSave; + + for (i = 0; i < fNumberOfPoints; i++) { + delete fStatisticsApprox[i]; + delete fStatisticsApproxExt[i]; + } + delete fStatisticsApprox; + delete fStatisticsApproxExt; + for (i = 0; i < kNumberOfChipsMax; i++) + delete fCalibrationData[i]; +} + +/*------------------------------------------------------------------*/ + +double ResponseCalibration::GetTemperature(unsigned int chipIndex) +{ + if (fCalibrationData[chipIndex] == NULL) + return 0; + if (!fCalibrationData[chipIndex]->fRead) + return 0; + return (fCalibrationData[chipIndex]->fStartTemperature + fCalibrationData[chipIndex]->fEndTemperature) / 2; +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::Calibrate(unsigned int chipIndex, unsigned int channel, unsigned short *adcWaveform, + short *uWaveform, int triggerCell, float threshold, bool offsetCalib) +{ + int i; + unsigned int NumberOfCalibChannels; + int hasOffset; + bool aboveThreshold; + float wave, v; + int j, irot; + + CalibrationData *data = fCalibrationData[chipIndex]; + CalibrationData::CalibrationDataChannel * chn; + + if (fBoard->GetDRSType() == 3) + NumberOfCalibChannels = kNumberOfCalibChannelsV4; + else + NumberOfCalibChannels = kNumberOfCalibChannelsV3; + + if (channel >= NumberOfCalibChannels || data == NULL) { + for (i = 0; i < kNumberOfBins; i++) { + irot = i; + if (triggerCell > -1) + irot = (triggerCell + i) % kNumberOfBins; + + uWaveform[i] = adcWaveform[irot]; + } + return true; + } + if (!data->fRead) { + for (i = 0; i < kNumberOfBins; i++) { + uWaveform[i] = adcWaveform[i]; + } + return true; + } + + chn = data->fChannel[channel]; + + hasOffset = data->fHasOffsetCalibration; + aboveThreshold = (threshold == 0); // if threshold equal zero, always return true + + short offset; + + // Calibrate + for (i = 0; i < kNumberOfBins; i++) { + if (fBoard->GetDRSType() != 3) { + irot = i; + if (triggerCell > -1) + irot = (triggerCell + i) % kNumberOfBins; + offset = offsetCalib ? chn->fOffset[irot] : 0; + if (adcWaveform[irot] > chn->fLookUpOffset[irot]) { + uWaveform[i] = + ((chn->fLookUp[irot][0] - chn->fLookUp[irot][1]) * (adcWaveform[irot] - + chn->fLookUpOffset[irot]) + + chn->fLookUp[irot][0]); + } else if (adcWaveform[irot] <= chn->fLookUpOffset[irot] + && adcWaveform[irot] > chn->fLookUpOffset[irot] - chn->fNumberOfLookUpPoints[irot]) { + uWaveform[i] = chn->fLookUp[irot][chn->fLookUpOffset[irot] - adcWaveform[irot]]; + } else { + wave = 0; + for (j = 0; j < kBSplineOrder; j++) { + wave += + chn->fData[irot][data->fBSplineOffsetLookUp[adcWaveform[irot]][chn->fLimitGroup[irot]] + j] + * data->fBSplineLookUp[adcWaveform[irot]][chn->fLimitGroup[irot]][j]; + } + uWaveform[i] = static_cast < short >(wave); + } + // Offset Calibration + if (hasOffset) + uWaveform[i] -= offset; + } else { + irot = i; + if (triggerCell > -1) + irot = (triggerCell + i) % kNumberOfBins; +#if 0 /* not enabled yet for DRS3 */ + offset = offsetCalib ? chn->fOffset[irot] : 0; +#else + offset = chn->fOffset[irot]; +#endif + v = static_cast < float >(adcWaveform[irot] - offset) / chn->fGain[irot]; + uWaveform[i] = static_cast < short >(v * 1000 / GetPrecision() + 0.5); + } + + // Check for Threshold + if (!aboveThreshold) { + if (uWaveform[i] >= threshold) + aboveThreshold = true; + } + } + return aboveThreshold; +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::SubtractADCOffset(unsigned int chipIndex, unsigned int channel, + unsigned short *adcWaveform, + unsigned short *adcCalibratedWaveform, + unsigned short newBaseLevel) +{ + int i; + unsigned int NumberOfCalibChannels; + CalibrationData *data = fCalibrationData[chipIndex]; + CalibrationData::CalibrationDataChannel * chn; + + if (fBoard->GetDRSType() == 3) + NumberOfCalibChannels = kNumberOfCalibChannelsV4; + else + NumberOfCalibChannels = kNumberOfCalibChannelsV3; + + if (channel >= NumberOfCalibChannels || data == NULL) + return false; + if (!data->fRead || !data->fHasOffsetCalibration) + return false; + + chn = data->fChannel[channel]; + for (i = 0; i < kNumberOfBins; i++) + adcCalibratedWaveform[i] = adcWaveform[i] - chn->fOffsetADC[i] + newBaseLevel; + return true; +} + + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::ReadCalibration(unsigned int chipIndex) +{ + if (fBoard->GetDRSType() == 3) + return ReadCalibrationV4(chipIndex); + else + return ReadCalibrationV3(chipIndex); +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::ReadCalibrationV3(unsigned int chipIndex) +{ + int k, l, m, num; + unsigned char ng; + short tempShort; + char fileName[2000]; + FILE *fileHandle; + char calibDir[1000]; + + // Read Response Calibration + delete fCalibrationData[chipIndex]; + fCalibrationData[chipIndex] = NULL; + + fBoard->GetCalibrationDirectory(calibDir); + sprintf(fileName, "%s/board%d/ResponseCalib_board%d_chip%d_%dMHz.bin", calibDir, + fBoard->GetBoardSerialNumber(), fBoard->GetBoardSerialNumber(), chipIndex, + static_cast < int >(fBoard->GetNominalFrequency() * 1000)); + + fileHandle = fopen(fileName, "rb"); + if (fileHandle == NULL) { + printf("Board %d --> Could not find response calibration file:\n", fBoard->GetBoardSerialNumber()); + printf("%s\n", fileName); + return false; + } + // Number Of Grid Points + num = fread(&ng, 1, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'NumberOfGridPoints'.\n"); + return false; + } + + fCalibrationData[chipIndex] = new CalibrationData(ng); + CalibrationData *data = fCalibrationData[chipIndex]; + CalibrationData::CalibrationDataChannel * chn; + data->fRead = true; + data->fHasOffsetCalibration = 1; + data->DeletePreCalculatedBSpline(); + fCalibrationValid[chipIndex] = true; + + // Start Temperature + num = fread(&tempShort, 2, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'StartTemperature'.\n"); + return false; + } + data->fStartTemperature = static_cast < float >(tempShort) / 10; + // End Temperature + num = fread(&tempShort, 2, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'EndTemperature'.\n"); + return false; + } + data->fEndTemperature = static_cast < float >(tempShort) / 10; + if (fBoard->GetDRSType() != 3) { + // Min + num = fread(&data->fMin, 4, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'Min'.\n"); + return false; + } + // Max + num = fread(&data->fMax, 4, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'Max'.\n"); + return false; + } + // Number Of Limit Groups + num = fread(&data->fNumberOfLimitGroups, 1, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'NumberOfLimitGroups'.\n"); + return false; + } + } + // read channel + for (k = 0; k < kNumberOfCalibChannelsV3; k++) { + chn = data->fChannel[k]; + for (l = 0; l < kNumberOfBins; l++) { + if (fBoard->GetDRSType() != 3) { + // Range Group + num = fread(&chn->fLimitGroup[l], 1, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'RangeGroup' of channel %d bin %d.\n", k, l); + return false; + } + // Look Up Offset + num = fread(&chn->fLookUpOffset[l], 2, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'LookUpOffset' of channel %d bin %d.\n", k, l); + return false; + } + // Number Of Look Up Points + num = fread(&chn->fNumberOfLookUpPoints[l], 1, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'NumberOfLookUpPoints' of channel %d bin %d.\n", k, l); + return false; + } + // Look Up Points + delete chn->fLookUp[l]; + chn->fLookUp[l] = new unsigned char[chn->fNumberOfLookUpPoints[l]]; + for (m = 0; m < chn->fNumberOfLookUpPoints[l]; m++) { + num = fread(&chn->fLookUp[l][m], 1, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'LookUp %d' of channel %d bin %d.\n", m, k, l); + return false; + } + } + // Points + for (m = 0; m < data->fNumberOfGridPoints; m++) { + num = fread(&chn->fData[l][m], 2, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'Point %d' of channel %d bin %d.\n", m, k, l); + return false; + } + } + // ADC Offset + num = fread(&chn->fOffsetADC[l], 2, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'ADC Offset' of channel %d bin %d.\n", k, l); + return false; + } + } + // Offset + num = fread(&chn->fOffset[l], 2, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'Offset' of channel %d bin %d.\n", k, l); + return false; + } + if (fBoard->GetDRSType() == 3) { + // Gain + num = fread(&chn->fGain[l], 2, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'Gain' of channel %d bin %d.\n", k, l); + return false; + } + } + } + } + fclose(fileHandle); + + if (fBoard->GetDRSType() != 3) { + data->PreCalculateBSpline(); + } + + return true; +} + +/*------------------------------------------------------------------*/ + +bool ResponseCalibration::ReadCalibrationV4(unsigned int chipIndex) +{ + int k, l, num; + char fileName[2000]; + FILE *fileHandle; + char calibDir[1000]; + + // Read Response Calibration + + fBoard->GetCalibrationDirectory(calibDir); + sprintf(fileName, "%s/board%d/ResponseCalib_board%d_chip%d_%dMHz.bin", calibDir, + fBoard->GetBoardSerialNumber(), fBoard->GetBoardSerialNumber(), chipIndex, + static_cast < int >(fBoard->GetNominalFrequency() * 1000)); + + fileHandle = fopen(fileName, "rb"); + if (fileHandle == NULL) { + printf("Board %d --> Could not find response calibration file:\n", fBoard->GetBoardSerialNumber()); + printf("%s\n", fileName); + return false; + } + + if (fInitialized) + delete fCalibrationData[chipIndex]; + fCalibrationData[chipIndex] = new CalibrationData(1); + CalibrationData *data = fCalibrationData[chipIndex]; + CalibrationData::CalibrationDataChannel * chn; + data->fRead = true; + data->fHasOffsetCalibration = 1; + fCalibrationValid[chipIndex] = true; + data->fStartTemperature = 0; + data->fEndTemperature = 0; + + // read channel + for (k = 0; k < kNumberOfCalibChannelsV4; k++) { + chn = data->fChannel[k]; + for (l = 0; l < kNumberOfBins; l++) { + // Offset + num = fread(&chn->fOffset[l], 2, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'Offset' of channel %d bin %d.\n", k, l); + return false; + } + if (fBoard->GetDRSType() == 3) { + // Gain + num = fread(&chn->fGain[l], 2, 1, fileHandle); + if (num != 1) { + printf("Error while reading response calibration file '%s'\n", fileName); + printf(" at 'Gain' of channel %d bin %d.\n", k, l); + return false; + } + } + } + } + + fclose(fileHandle); + return true; +} + +/*------------------------------------------------------------------*/ + +float ResponseCalibration::GetValue(float *coefficients, float u, int n) +{ + int j, ii; + float bsplines[4]; + ii = CalibrationData::CalculateBSpline(n, u, bsplines); + + float s = 0; + for (j = 0; j < kBSplineOrder; j++) { + s += coefficients[ii + j] * bsplines[j]; + } + return s; +} + +/*------------------------------------------------------------------*/ + +int ResponseCalibration::Approx(float *p, float *uu, int np, int nu, float *coef) +{ + int i, iu, j; + + const int mbloc = 50; + int ip = 0; + int ir = 0; + int mt = 0; + int ileft, irow; + float bu[kBSplineOrder]; + float *matrix[kBSplineOrder + 2]; + for (i = 0; i < kBSplineOrder + 2; i++) + matrix[i] = new float[mbloc + nu + 1]; + for (iu = kBSplineOrder - 1; iu < nu; iu++) { + for (i = 0; i < np; i++) { + if (1 <= uu[i]) + ileft = nu - 1; + else if (uu[i] < 0) + ileft = kBSplineOrder - 2; + else + ileft = kBSplineOrder - 1 + static_cast < int >(uu[i] * (nu - kBSplineOrder + 1)); + if (ileft != iu) + continue; + irow = ir + mt; + mt++; + CalibrationData::CalculateBSpline(nu, uu[i], bu); + for (j = 0; j < kBSplineOrder; j++) { + matrix[j][irow] = bu[j]; + } + matrix[kBSplineOrder][irow] = p[i]; + if (mt < mbloc) + continue; + LeastSquaresAccumulation(matrix, kBSplineOrder, &ip, &ir, mt, iu - kBSplineOrder + 1); + mt = 0; + } + if (mt == 0) + continue; + LeastSquaresAccumulation(matrix, kBSplineOrder, &ip, &ir, mt, iu - kBSplineOrder + 1); + mt = 0; + } + if (!LeastSquaresSolving(matrix, kBSplineOrder, ip, ir, coef, nu)) { + for (i = 0; i < kBSplineOrder + 2; i++) + delete matrix[i]; + return 0; + } + + for (i = 0; i < kBSplineOrder + 2; i++) + delete matrix[i]; + return 1; +} + +/*------------------------------------------------------------------*/ + +void ResponseCalibration::LeastSquaresAccumulation(float **matrix, int nb, int *ip, int *ir, int mt, int jt) +{ + int i, j, l, mu, k, kh; + float rho; + + if (mt <= 0) + return; + if (jt != *ip) { + if (jt > (*ir)) { + for (i = 0; i < mt; i++) { + for (j = 0; j < nb + 1; j++) { + matrix[j][jt + mt - i] = matrix[j][(*ir) + mt - i]; + } + } + for (i = 0; i < jt - (*ir); i++) { + for (j = 0; j < nb + 1; j++) { + matrix[j][(*ir) + i] = 0; + } + } + *ir = jt; + } + mu = min(nb - 1, (*ir) - (*ip) - 1); + if (mu != 0) { + for (l = 0; l < mu; l++) { + k = min(l + 1, jt - (*ip)); + for (i = l + 1; i < nb; i++) { + matrix[i - k][(*ip) + l + 1] = matrix[i][(*ip) + l + 1]; + } + for (i = 0; i < k; i++) { + matrix[nb - i - 1][(*ip) + l + 1] = 0; + } + } + } + *ip = jt; + } + kh = min(nb + 1, (*ir) + mt - (*ip)); + + for (i = 0; i < kh; i++) { + Housholder(i, max(i + 1, (*ir) - (*ip)), (*ir) + mt - (*ip), matrix, i, (*ip), &rho, matrix, i + 1, + (*ip), 1, nb - i); + } + + *ir = (*ip) + kh; + if (kh < nb + 1) + return; + for (i = 0; i < nb; i++) { + matrix[i][(*ir) - 1] = 0; + } +} + +/*------------------------------------------------------------------*/ + +int ResponseCalibration::LeastSquaresSolving(float **matrix, int nb, int ip, int ir, float *x, int n) +{ + int i, j, l, ii; + float s, rsq; + for (j = 0; j < n; j++) { + x[j] = matrix[nb][j]; + } + rsq = 0; + if (n <= ir - 1) { + for (j = n; j < ir; j++) { + rsq += pow(matrix[nb][j], 2); + } + } + + for (ii = 0; ii < n; ii++) { + i = n - ii - 1; + s = 0; + l = max(0, i - ip); + if (i != n - 1) { + for (j = 1; j < min(n - i, nb); j++) { + s += matrix[j + l][i] * x[i + j]; + } + } + if (matrix[l][i] == 0) { + printf("Error in LeastSquaresSolving.\n"); + return 0; + } + x[i] = (x[i] - s) / matrix[l][i]; + } + return 1; +} + +/*------------------------------------------------------------------*/ + +void ResponseCalibration::Housholder(int lpivot, int l1, int m, float **u, int iU1, int iU2, float *up, + float **c, int iC1, int iC2, int ice, int ncv) +{ + int i, j, incr; + float tol = static_cast < float >(1e-20); + float tolb = static_cast < float >(1e-24); + float cl, clinv, sm, b; + + if (lpivot < 0 || lpivot >= l1 || l1 > m - 1) + return; + cl = fabs(u[iU1][iU2 + lpivot]); + + // Construct the transformation + for (j = l1 - 1; j < m; j++) + cl = max(fabsf(u[iU1][iU2 + j]), cl); + if (cl < tol) + return; + clinv = 1 / cl; + sm = pow(u[iU1][iU2 + lpivot] * clinv, 2); + for (j = l1; j < m; j++) { + sm = sm + pow(u[iU1][iU2 + j] * clinv, 2); + } + cl *= sqrt(sm); + if (u[iU1][iU2 + lpivot] > 0) + cl = -cl; + *up = u[iU1][iU2 + lpivot] - cl; + u[iU1][iU2 + lpivot] = cl; + + if (ncv <= 0) + return; + b = (*up) * u[iU1][iU2 + lpivot]; + if (fabs(b) < tolb) + return; + if (b >= 0) + return; + b = 1 / b; + incr = ice * (l1 - lpivot); + for (j = 0; j < ncv; j++) { + sm = c[iC1 + j][iC2 + lpivot] * (*up); + for (i = l1; i < m; i++) { + sm = sm + c[iC1 + j][iC2 + lpivot + incr + (i - l1) * ice] * u[iU1][iU2 + i]; + } + if (sm == 0) + continue; + sm *= b; + c[iC1 + j][iC2 + lpivot] = c[iC1 + j][iC2 + lpivot] + sm * (*up); + for (i = l1; i < m; i++) { + c[iC1 + j][iC2 + lpivot + incr + (i - l1) * ice] = + c[iC1 + j][iC2 + lpivot + incr + (i - l1) * ice] + sm * u[iU1][iU2 + i]; + } + } +} + +/*------------------------------------------------------------------*/ + +int ResponseCalibration::MakeDir(const char *path) +{ + struct stat buf; + if (stat(path, &buf)) { +#ifdef _MSC_VER + return mkdir(path); +#else + return mkdir(path, 0711); +#endif // R__UNIX + } + return 0; +} + +/*------------------------------------------------------------------*/ + +ResponseCalibration::ResponseCalibration(DRSBoard * board) +: fBoard(board) + , fPrecision(0.1) // mV + , fInitialized(false) + , fRecorded(false) + , fFitted(false) + , fOffset(false) + , fNumberOfPointsLowVolt(0) + , fNumberOfPoints(0) + , fNumberOfMode2Bins(0) + , fNumberOfSamples(0) + , fNumberOfGridPoints(0) + , fNumberOfXConstPoints(0) + , fNumberOfXConstGridPoints(0) + , fTriggerFrequency(0) + , fShowStatistics(0) + , fCalibFile(0) + , fCurrentLowVoltPoint(0) + , fCurrentPoint(0) + , fCurrentSample(0) + , fCurrentFitChannel(0) + , fCurrentFitBin(0) + , fResponseY(0) + , fSamples(0) + , fSampleUsed(0) + , fXXFit(0) + , fYYFit(0) + , fWWFit(0) + , fYYFitRes(0) + , fYYSave(0) + , fXXSave(0) + , fStatisticsApprox(0) + , fStatisticsApproxExt(0) +{ + int i; + // Initializing the Calibration Class + CalibrationData::fIntRevers[0] = 0; + for (i = 1; i < 2 * kBSplineOrder - 2; i++) { + CalibrationData::fIntRevers[i] = static_cast < float >(1.) / i; + } + for (i = 0; i < kNumberOfChipsMax; i++) { + fCalibrationData[i] = NULL; + } + // Initializing the Calibration Creation + fCalibrationValid[0] = false; + fCalibrationValid[1] = false; +} + +/*------------------------------------------------------------------*/ + +ResponseCalibration::~ResponseCalibration() +{ + // Delete the Calibration + for (int i=0 ; i xrange) { + uu = 1; + } + fBSplineOffsetLookUp[i][j] = static_cast < int >(uu * nk); + CalculateBSpline(fNumberOfGridPoints, uu, fBSplineLookUp[i][j]); + } + } +} + +/*------------------------------------------------------------------*/ + +void ResponseCalibration::CalibrationData::DeletePreCalculatedBSpline() +{ + int i, j; + for (i = 0; i < kNumberOfADCBins; i++) { + if (fBSplineLookUp[i] != NULL) { + for (j = 0; j < fNumberOfLimitGroups; j++) + delete fBSplineLookUp[i][j]; + } + delete fBSplineLookUp[i]; + delete fBSplineOffsetLookUp[i]; + } +} + +/*------------------------------------------------------------------*/ + +ResponseCalibration::CalibrationData::~CalibrationData() +{ + int i, j; + for (i = 0; i < kNumberOfCalibChannelsV3; i++) { + delete fChannel[i]; + } + for (i = 0; i < kNumberOfADCBins; i++) { + if (fBSplineLookUp[i] != NULL) { + for (j = 0; j < fNumberOfLimitGroups; j++) { + delete fBSplineLookUp[i][j]; + } + } + delete fBSplineLookUp[i]; + delete fBSplineOffsetLookUp[i]; + } +}; + +/*------------------------------------------------------------------*/ + +int ResponseCalibration::CalibrationData::CalculateBSpline(int nGrid, float value, float *bsplines) +{ + int minimum; + int maximum; + float xl; + + int nk = nGrid - kBSplineOrder + 1; + float vl = value * nk; + int ivl = static_cast < int >(vl); + + if (1 <= value) { + xl = vl - nk + 1; + minimum = 1 - nk; + } else if (value < 0) { + xl = vl; + minimum = 0; + } else { + xl = vl - ivl; + minimum = -ivl; + } + maximum = nk + minimum; + +// printf("xl = %f\n",xl); + float vm, vmprev; + int jl, ju; + int nb = 0; + + bsplines[0] = 1; + for (int i = 0; i < kBSplineOrder - 1; i++) { + vmprev = 0; + for (int j = 0; j < nb + 1; j++) { + jl = max(minimum, j - nb); + ju = min(maximum, j + 1); + vm = bsplines[j] * fIntRevers[ju - jl]; + bsplines[j] = vm * (ju - xl) + vmprev; + vmprev = vm * (xl - jl); + } + nb++; + bsplines[nb] = vmprev; + } + return -minimum; +} + +/*------------------------------------------------------------------*/ + +void ResponseCalibration::Average(int method, float *points, int numberOfPoints, float &mean, float &error, + float sigmaBoundary) +{ + // Methods : + // 0 : Average + // 1 : Average inside sigmaBoundary*sigma + int i; + float sum = 0; + float sumSquare = 0; + + if (method == 0 || method == 1) { + for (i = 0; i < numberOfPoints; i++) { + sum += points[i]; + sumSquare += points[i] * points[i]; + } + + mean = sum / numberOfPoints; + error = sqrt((sumSquare - sum * sum / numberOfPoints) / (numberOfPoints - 1)); + } + if (method == 1) { + int numberOfGoodPoints = numberOfPoints; + bool found = true; + bool *goodSample = new bool[numberOfGoodPoints]; + for (i = 0; i < numberOfGoodPoints; i++) + goodSample[i] = true; + + while (found) { + found = false; + for (i = 0; i < numberOfPoints; i++) { + if (goodSample[i] && fabs(points[i] - mean) > sigmaBoundary * error) { + found = true; + goodSample[i] = false; + numberOfGoodPoints--; + sum -= points[i]; + sumSquare -= points[i] * points[i]; + mean = sum / numberOfGoodPoints; + error = sqrt((sumSquare - sum * sum / numberOfGoodPoints) / (numberOfGoodPoints - 1)); + } + } + } + delete[] goodSample; + } +} diff --git a/software/src/averager.cpp b/software/src/averager.cpp new file mode 100644 index 0000000..a838518 --- /dev/null +++ b/software/src/averager.cpp @@ -0,0 +1,214 @@ +/********************************************************************\ + + Name: averager.cpp + Created by: Stefan Ritt + + Contents: Robust averager + + $Id: averager.cpp 21210 2013-12-12 11:36:59Z ritt $ + +\********************************************************************/ + +#include +#include +#include +#include +#include + +#include "averager.h" + +/*----------------------------------------------------------------*/ + +Averager::Averager(int nx, int ny, int nz, int dim) +{ + fNx = nx; + fNy = ny; + fNz = nz; + fDim = dim; + + int size = sizeof(float)*nx*ny*nz * dim; + fArray = (float *)malloc(size); + assert(fArray); + memset(fArray, 0, size); + size = sizeof(float)*nx*ny*nz; + fN = (unsigned short *)malloc(size); + assert(fN); + memset(fN, 0, size); +} + +/*----------------------------------------------------------------*/ + +Averager::~Averager() +{ + if (fN) + free(fN); + if (fArray) + free(fArray); + fN = NULL; + fArray = NULL; +} + +/*----------------------------------------------------------------*/ + +void Averager::Add(int x, int y, int z, float value) +{ + assert(x < fNx); + assert(y < fNy); + assert(z < fNz); + + int nIndex = (x*fNy + y)*fNz + z; + if (fN[nIndex] == fDim - 1) // check if array full + return; + + int aIndex = ((x*fNy + y)*fNz + z) * fDim + fN[nIndex]; + fN[nIndex]++; + fArray[aIndex] = value; +} + +/*----------------------------------------------------------------*/ + +void Averager::Reset() +{ + int size = sizeof(float)*fNx*fNy*fNz * fDim; + memset(fArray, 0, size); + size = sizeof(float)*fNx*fNy*fNz; + memset(fN, 0, size); +} + +/*----------------------------------------------------------------*/ + +int compar(const void *a, const void *b); + +int compar(const void *a, const void *b) +{ + if (*((float *)a) == *((float *)b)) + return 0; + + return (*((float *)a) < *((float *)b)) ? -1 : 1; +} + +double Averager::Average(int x, int y, int z) +{ + assert(x < fNx); + assert(y < fNy); + assert(z < fNz); + + double a = 0; + + int nIndex = (x*fNy + y)*fNz + z; + int aIndex = ((x*fNy + y)*fNz + z) * fDim; + + for (int i=0 ; i 0) + a /= fN[nIndex]; + + return a; +} + +/*----------------------------------------------------------------*/ + +double Averager::Median(int x, int y, int z) +{ + assert(x < fNx); + assert(y < fNy); + assert(z < fNz); + + double m = 0; + + int nIndex = (x*fNy + y)*fNz + z; + int aIndex = ((x*fNy + y)*fNz + z) * fDim; + + qsort(&fArray[aIndex], fN[nIndex], sizeof(float), compar); + m = fArray[aIndex + fN[nIndex]/2]; + + return m; +} + +/*----------------------------------------------------------------*/ + +double Averager::RobustAverage(double range, int x, int y, int z) +{ + assert(x < fNx); + assert(y < fNy); + assert(z < fNz); + + double ra = 0; + int n = 0; + double m = Median(x, y, z); + + int nIndex = (x*fNy + y)*fNz + z; + int aIndex = ((x*fNy + y)*fNz + z) * fDim; + + for (int i=0 ; i m - range && fArray[aIndex + i] < m + range) { + ra += fArray[aIndex + i]; + n++; + } + } + + if (n > 0) + ra /= n; + + //if (y == 0 && z == 7 && fN[nIndex] > 10) + // printf("%d %lf %lf %lf\n", fN[nIndex], a, m, ra); + + return ra; +} + +/*----------------------------------------------------------------*/ + +int Averager::SaveNormalizedDistribution(const char *filename, int x, float range) +{ + assert(x < fNx); + FILE *f = fopen(filename, "wt"); + + if (!f) + return 0; + + fprintf(f, "X, Y, Z, Min, Max, Ave, Sigma\n"); + + for (int y=0 ; y 1) { + fprintf(f, "%d,%d, %d, ", x, y, z); + + double s = 0; + double s2 = 0; + double min = 0; + double max = 0; + int n = fN[nIndex]; + double m = Median(x, y, z); + + for (int i=0 ; i max) + max = v; + } + double sigma = sqrt((n * s2 - s * s) / (n * (n-1))); + double average = s / n; + + fprintf(f, "%3.1lf, %3.1lf, %3.1lf, %3.3lf, ", min, max, average, sigma); + + if (min < -range || max > range) { + for (int i=0 ; i +#include +#include + +#ifdef _MSC_VER // Windows includes + +#include +#include +#include + +#include +#include /* Required for GUID definition */ + +// link with SetupAPI.Lib. +#pragma comment (lib, "setupapi.lib") + +// disable "deprecated" warning +#pragma warning( disable: 4996) + +// {CBEB3FB1-AE9F-471c-9016-9B6AC6DCD323} +DEFINE_GUID(GUID_CLASS_MSCB_BULK, 0xcbeb3fb1, 0xae9f, 0x471c, 0x90, 0x16, 0x9b, 0x6a, 0xc6, 0xdc, 0xd3, 0x23); + +#elif defined(OS_DARWIN) + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#elif defined(OS_LINUX) // Linux includes + +#include +#include +#include + +#endif + +#ifdef HAVE_LIBUSB +#include +#include +#endif + +#ifdef HAVE_LIBUSB10 +#include +#include +#endif + +#if !defined(HAVE_LIBUSB) && !defined(HAVE_LIBUSB10) +#ifdef OS_DARWIN + +IOReturn darwin_configure_device(MUSB_INTERFACE* musb) +{ + IOReturn status; + io_iterator_t iter; + io_service_t service; + IOCFPlugInInterface **plugin; + SInt32 score; + IOUSBInterfaceInterface **uinterface; + UInt8 numend; + + IOUSBDeviceInterface **device = (IOUSBDeviceInterface **)musb->device; + + status = (*device)->SetConfiguration(device, musb->usb_configuration); + assert(status == kIOReturnSuccess); + + IOUSBFindInterfaceRequest request; + + request.bInterfaceClass = kIOUSBFindInterfaceDontCare; + request.bInterfaceSubClass = kIOUSBFindInterfaceDontCare; + request.bInterfaceProtocol = kIOUSBFindInterfaceDontCare; + request.bAlternateSetting = kIOUSBFindInterfaceDontCare; + + status = (*device)->CreateInterfaceIterator(device, &request, &iter); + assert(status == kIOReturnSuccess); + + while ((service = IOIteratorNext(iter))) { + int i; + status = + IOCreatePlugInInterfaceForService(service, kIOUSBInterfaceUserClientTypeID, + kIOCFPlugInInterfaceID, &plugin, &score); + assert(status == kIOReturnSuccess); + + status = + (*plugin)->QueryInterface(plugin, CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID), + (void *) &uinterface); + assert(status == kIOReturnSuccess); + + + status = (*uinterface)->USBInterfaceOpen(uinterface); + fprintf(stderr, "musb_open: USBInterfaceOpen status 0x%x\n", status); + assert(status == kIOReturnSuccess); + + status = (*uinterface)->GetNumEndpoints(uinterface, &numend); + assert(status == kIOReturnSuccess); + + fprintf(stderr, "musb_open: endpoints: %d\n", numend); + + for (i=1; i<=numend; i++) { + status = (*uinterface)->GetPipeStatus(uinterface, i); + fprintf(stderr, "musb_open: pipe %d status: 0x%x\n", i, status); + +#if 0 + status = (*uinterface)->ClearPipeStall(uinterface, i); + fprintf(stderr, "musb_open: pipe %d ClearPipeStall() status: 0x%x\n", i, status); + status = (*uinterface)->ResetPipe(uinterface, i); + fprintf(stderr, "musb_open: pipe %d ResetPipe() status: 0x%x\n", i, status); + status = (*uinterface)->AbortPipe(uinterface, i); + fprintf(stderr, "musb_open: pipe %d AbortPipe() status: 0x%x\n", i, status); +#endif + } + + musb->interface = uinterface; + return kIOReturnSuccess; + } + + assert(!"Should never be reached!"); + return -1; +} + +#endif + +#endif + +int musb_open(MUSB_INTERFACE **musb_interface, int vendor, int product, int instance, int configuration, int usbinterface) +{ +#if defined(HAVE_LIBUSB) + + struct usb_bus *bus; + struct usb_device *dev; + int count = 0; + + usb_init(); + usb_find_busses(); + usb_find_devices(); + usb_set_debug(3); + + for (bus = usb_get_busses(); bus; bus = bus->next) + for (dev = bus->devices; dev; dev = dev->next) + if (dev->descriptor.idVendor == vendor && dev->descriptor.idProduct == product) { + if (count == instance) { + int status; + usb_dev_handle *udev; + + udev = usb_open(dev); + if (!udev) { + fprintf(stderr, "musb_open: usb_open() error\n"); + return MUSB_ACCESS_ERROR; + } + + status = usb_set_configuration(udev, configuration); + if (status < 0) { + fprintf(stderr, "musb_open: usb_set_configuration() error %d (%s)\n", status, + strerror(-status)); + fprintf(stderr, + "musb_open: Found USB device 0x%04x:0x%04x instance %d, but cannot initialize it: please check permissions on \"/proc/bus/usb/%s/%s\" and \"/dev/bus/usb/%s/%s\"\n", + vendor, product, instance, bus->dirname, dev->filename, bus->dirname, dev->filename); + return MUSB_ACCESS_ERROR; + } + + /* see if we have write access */ + status = usb_claim_interface(udev, usbinterface); + if (status < 0) { + fprintf(stderr, "musb_open: usb_claim_interface() error %d (%s)\n", status, + strerror(-status)); + +#ifdef _MSC_VER + fprintf(stderr, + "musb_open: Found USB device 0x%04x:0x%04x instance %d, but cannot initialize it:\nDevice is probably used by another program\n", + vendor, product, instance); +#else + fprintf(stderr, + "musb_open: Found USB device 0x%04x:0x%04x instance %d, but cannot initialize it: please check permissions on \"/proc/bus/usb/%s/%s\"\n", + vendor, product, instance, bus->dirname, dev->filename); +#endif + + return MUSB_ACCESS_ERROR; + } + + *musb_interface = (MUSB_INTERFACE*)calloc(1, sizeof(MUSB_INTERFACE)); + (*musb_interface)->dev = udev; + (*musb_interface)->usb_configuration = configuration; + (*musb_interface)->usb_interface = usbinterface; + return MUSB_SUCCESS; + } + + count++; + } + + return MUSB_NOT_FOUND; + +#elif defined(HAVE_LIBUSB10) + + static int first_call = 1; + + libusb_device **dev_list; + libusb_device_handle *dev; + struct libusb_device_descriptor desc; + + int status, i, n; + int count = 0; + + if (first_call) { + first_call = 0; + libusb_init(NULL); + // libusb_set_debug(NULL, 3); + } + + n = libusb_get_device_list(NULL, &dev_list); + + for (i=0 ; idev = dev; + (*musb_interface)->usb_configuration = configuration; + (*musb_interface)->usb_interface = usbinterface; + return MUSB_SUCCESS; + + } + count++; + } + } + + libusb_free_device_list(dev_list, 1); + + return MUSB_NOT_FOUND; + +#elif defined(OS_DARWIN) + + kern_return_t status; + io_iterator_t iter; + io_service_t service; + IOCFPlugInInterface **plugin; + SInt32 score; + IOUSBDeviceInterface **device; + UInt16 xvendor, xproduct; + int count = 0; + + *musb_interface = calloc(1, sizeof(MUSB_INTERFACE)); + + status = IORegistryCreateIterator(kIOMasterPortDefault, kIOUSBPlane, kIORegistryIterateRecursively, &iter); + assert(status == kIOReturnSuccess); + + while ((service = IOIteratorNext(iter))) { + status = + IOCreatePlugInInterfaceForService(service, kIOUSBDeviceUserClientTypeID, kIOCFPlugInInterfaceID, + &plugin, &score); + assert(status == kIOReturnSuccess); + + status = IOObjectRelease(service); + assert(status == kIOReturnSuccess); + + status = + (*plugin)->QueryInterface(plugin, CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (void *) &device); + assert(status == kIOReturnSuccess); + + status = (*plugin)->Release(plugin); + + status = (*device)->GetDeviceVendor(device, &xvendor); + assert(status == kIOReturnSuccess); + status = (*device)->GetDeviceProduct(device, &xproduct); + assert(status == kIOReturnSuccess); + + //fprintf(stderr, "musb_open: Found USB device: vendor 0x%04x, product 0x%04x\n", xvendor, xproduct); + + if (xvendor == vendor && xproduct == product) { + if (count == instance) { + + fprintf(stderr, "musb_open: Found USB device: vendor 0x%04x, product 0x%04x, instance %d\n", xvendor, xproduct, instance); + + status = (*device)->USBDeviceOpen(device); + fprintf(stderr, "musb_open: USBDeviceOpen status 0x%x\n", status); + + assert(status == kIOReturnSuccess); + + (*musb_interface)->usb_configuration = configuration; + (*musb_interface)->usb_interface = usbinterface; + (*musb_interface)->device = (void*)device; + (*musb_interface)->interface = NULL; + + status = darwin_configure_device(*musb_interface); + + if (status == kIOReturnSuccess) + return MUSB_SUCCESS; + + fprintf(stderr, "musb_open: USB device exists, but configuration fails!"); + return MUSB_NOT_FOUND; + } + + count++; + } + + (*device)->Release(device); + } + + return MUSB_NOT_FOUND; +#elif defined(_MSC_VER) + GUID guid; + HDEVINFO hDevInfoList; + SP_DEVICE_INTERFACE_DATA deviceInfoData; + PSP_DEVICE_INTERFACE_DETAIL_DATA functionClassDeviceData; + ULONG predictedLength, requiredLength; + int status; + char device_name[256], str[256]; + + *musb_interface = (MUSB_INTERFACE *)calloc(1, sizeof(MUSB_INTERFACE)); + + guid = GUID_CLASS_MSCB_BULK; + + // Retrieve device list for GUID that has been specified. + hDevInfoList = SetupDiGetClassDevs(&guid, NULL, NULL, (DIGCF_PRESENT | DIGCF_DEVICEINTERFACE)); + + status = FALSE; + if (hDevInfoList != NULL) { + + // Clear data structure + memset(&deviceInfoData, 0, sizeof(deviceInfoData)); + deviceInfoData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA); + + // retrieves a context structure for a device interface of a device information set. + if (SetupDiEnumDeviceInterfaces(hDevInfoList, 0, &guid, instance, &deviceInfoData)) { + // Must get the detailed information in two steps + // First get the length of the detailed information and allocate the buffer + // retrieves detailed information about a specified device interface. + functionClassDeviceData = NULL; + + predictedLength = requiredLength = 0; + + SetupDiGetDeviceInterfaceDetail(hDevInfoList, &deviceInfoData, NULL, // Not yet allocated + 0, // Set output buffer length to zero + &requiredLength, // Find out memory requirement + NULL); + + predictedLength = requiredLength; + functionClassDeviceData = (PSP_DEVICE_INTERFACE_DETAIL_DATA) malloc(predictedLength); + functionClassDeviceData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA); + + // Second, get the detailed information + if (SetupDiGetDeviceInterfaceDetail(hDevInfoList, + &deviceInfoData, functionClassDeviceData, + predictedLength, &requiredLength, NULL)) { + + // Save the device name for subsequent pipe open calls + strcpy(device_name, functionClassDeviceData->DevicePath); + free(functionClassDeviceData); + + // Signal device found + status = TRUE; + } else + free(functionClassDeviceData); + } + } + // SetupDiDestroyDeviceInfoList() destroys a device information set + // and frees all associated memory. + SetupDiDestroyDeviceInfoList(hDevInfoList); + + if (status) { + + // Get the read handle + sprintf(str, "%s\\PIPE00", device_name); + (*musb_interface)->rhandle = CreateFile(str, + GENERIC_WRITE | GENERIC_READ, + FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); + + if ((*musb_interface)->rhandle == INVALID_HANDLE_VALUE) + return MUSB_ACCESS_ERROR; + + // Get the write handle + sprintf(str, "%s\\PIPE01", device_name); + (*musb_interface)->whandle = CreateFile(str, + GENERIC_WRITE | GENERIC_READ, + FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); + + if ((*musb_interface)->whandle == INVALID_HANDLE_VALUE) + return MUSB_ACCESS_ERROR; + + return MUSB_SUCCESS; + } + + return MUSB_NOT_FOUND; +#endif +} + +int musb_set_altinterface(MUSB_INTERFACE *musb_interface, int index) +{ +#if defined (HAVE_LIBUSB) + int status; + + status = usb_set_altinterface(musb_interface->dev, index); + if (status < 0) + fprintf(stderr, "musb_set_altinterface: usb_set_altinterface() error %d\n", status); + + return status; +#else + return -1; +#endif +} + +int musb_close(MUSB_INTERFACE *musb_interface) +{ +#if defined(HAVE_LIBUSB) + + int status; + status = usb_release_interface(musb_interface->dev, musb_interface->usb_interface); + if (status < 0) + fprintf(stderr, "musb_close: usb_release_interface() error %d\n", status); + +#ifdef OS_LINUX // linux wants a reset, otherwise the device cannot be accessed next time + musb_reset(musb_interface); +#endif + + status = usb_close(musb_interface->dev); + if (status < 0) + fprintf(stderr, "musb_close: usb_close() error %d\n", status); + +#elif defined(HAVE_LIBUSB10) + + int status; + status = libusb_release_interface(musb_interface->dev, musb_interface->usb_interface); + if (status < 0) + fprintf(stderr, "musb_close: libusb_release_interface() error %d\n", status); + +#ifdef OS_LINUX // linux wants a reset, otherwise the device cannot be accessed next time + musb_reset(musb_interface); +#endif + + libusb_close(musb_interface->dev); + +#elif defined(OS_DARWIN) + + IOReturn status; + IOUSBInterfaceInterface **interface = (IOUSBInterfaceInterface **)musb_interface->interface; + + status = (*interface)->USBInterfaceClose(interface); + if (status != kIOReturnSuccess) + fprintf(stderr, "musb_close: USBInterfaceClose() status %d 0x%x\n", status, status); + + status = (*interface)->Release(interface); + if (status != kIOReturnSuccess) + fprintf(stderr, "musb_close: USB Interface Release() status %d 0x%x\n", status, status); + + IOUSBDeviceInterface **device = (IOUSBDeviceInterface**)musb_interface->device; + status = (*device)->USBDeviceClose(device); + if (status != kIOReturnSuccess) + fprintf(stderr, "musb_close: USBDeviceClose() status %d 0x%x\n", status, status); + + status = (*device)->Release(device); + if (status != kIOReturnSuccess) + fprintf(stderr, "musb_close: USB Device Release() status %d 0x%x\n", status, status); + +#elif defined(_MSC_VER) + + CloseHandle(musb_interface->rhandle); + CloseHandle(musb_interface->whandle); + +#else + assert(!"musb_close() is not implemented"); +#endif + + /* free memory allocated in musb_open() */ + free(musb_interface); + return 0; +} + +int musb_write(MUSB_INTERFACE *musb_interface, int endpoint, const void *buf, int count, int timeout) +{ + int n_written; + +#if defined(HAVE_LIBUSB) + n_written = usb_bulk_write(musb_interface->dev, endpoint, (char*)buf, count, timeout); + if (n_written != count) { + fprintf(stderr, "musb_write: requested %d, wrote %d, errno %d (%s)\n", count, n_written, errno, strerror(errno)); + } +#elif defined(HAVE_LIBUSB10) + int status = libusb_bulk_transfer(musb_interface->dev, endpoint, (unsigned char*)buf, count, &n_written, timeout); + if (n_written != count) { + fprintf(stderr, "musb_write: requested %d, wrote %d, errno %d (%s)\n", count, n_written, status, strerror(status)); + } +#elif defined(OS_DARWIN) + IOReturn status; + IOUSBInterfaceInterface182 **interface = (IOUSBInterfaceInterface182 **)musb_interface->interface; + status = (*interface)->WritePipeTO(interface, endpoint, buf, count, 0, timeout); + if (status != 0) { + fprintf(stderr, "musb_write: WritePipe() status %d 0x%x\n", status, status); + return -1; + } + n_written = count; +#elif defined(_MSC_VER) + WriteFile(musb_interface->whandle, buf, count, &n_written, NULL); +#endif + + //fprintf(stderr, "musb_write(ep %d, %d bytes) (%s) returns %d\n", endpoint, count, buf, n_written); + + return n_written; +} + +int musb_read(MUSB_INTERFACE *musb_interface, int endpoint, void *buf, int count, int timeout) +{ + int n_read = 0; + +#if defined(HAVE_LIBUSB) + + n_read = usb_bulk_read(musb_interface->dev, endpoint | 0x80, (char*)buf, count, timeout); + /* errors should be handled in upper layer .... + if (n_read <= 0) { + fprintf(stderr, "musb_read: requested %d, read %d, errno %d (%s)\n", count, n_read, errno, strerror(errno)); + } + */ + +#elif defined(HAVE_LIBUSB10) + + libusb_bulk_transfer(musb_interface->dev, endpoint | 0x80, (unsigned char*)buf, count, &n_read, timeout); + /* errors should be handled in upper layer .... + if (n_read <= 0) { + fprintf(stderr, "musb_read: requested %d, read %d, errno %d (%s)\n", count, n_read, status, strerror(status)); + } + */ + +#elif defined(OS_DARWIN) + + UInt32 xcount = count; + IOReturn status; + IOUSBInterfaceInterface182 **interface = (IOUSBInterfaceInterface182 **)musb_interface->interface; + + status = (*interface)->ReadPipeTO(interface, endpoint, buf, &xcount, 0, timeout); + if (status != kIOReturnSuccess) { + fprintf(stderr, "musb_read: requested %d, read %d, ReadPipe() status %d 0x%x (%s)\n", count, n_read, status, status, strerror(status)); + return -1; + } + + n_read = xcount; + +#elif defined(_MSC_VER) + + OVERLAPPED overlapped; + int status; + + memset(&overlapped, 0, sizeof(overlapped)); + overlapped.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + n_read = 0; + + status = ReadFile(musb_interface->rhandle, buf, count, &n_read, &overlapped); + + if (!status) { + + status = GetLastError(); + if (status != ERROR_IO_PENDING) + return 0; + + /* wait for completion with timeout */ + status = WaitForSingleObject(overlapped.hEvent, timeout); + if (status == WAIT_TIMEOUT) + CancelIo(musb_interface->rhandle); + else + GetOverlappedResult(musb_interface->rhandle, &overlapped, &n_read, FALSE); + } + + CloseHandle(overlapped.hEvent); + +#endif + + //fprintf(stderr, "musb_read(ep %d, %d bytes) returns %d (%s)\n", endpoint, count, n_read, buf); + + return n_read; +} + +int musb_reset(MUSB_INTERFACE *musb_interface) +{ +#if defined(HAVE_LIBUSB) + + /* Causes re-enumeration: After calling usb_reset, the device will need + to re-enumerate and thusly, requires you to find the new device and + open a new handle. The handle used to call usb_reset will no longer work */ + + int status; + status = usb_reset(musb_interface->dev); + if (status < 0) + fprintf(stderr, "musb_reset: usb_reset() status %d\n", status); + +#elif defined(HAVE_LIBUSB10) + + int status; + status = libusb_reset_device(musb_interface->dev); + if (status < 0) + fprintf(stderr, "musb_reset: usb_reset() status %d\n", status); + +#elif defined(OS_DARWIN) + + IOReturn status; + IOUSBDeviceInterface **device = (IOUSBDeviceInterface**)musb_interface->device; + + status = (*device)->ResetDevice(device); + fprintf(stderr, "musb_reset: ResetDevice() status 0x%x\n", status); + + status = darwin_configure_device(musb_interface); + assert(status == kIOReturnSuccess); + +#elif defined(_MSC_VER) + +#define IOCTL_BULKUSB_RESET_DEVICE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) +#define IOCTL_BULKUSB_RESET_PIPE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + int status, n_bytes; + + status = DeviceIoControl(musb_interface->rhandle, + IOCTL_BULKUSB_RESET_DEVICE, + NULL, 0, NULL, 0, &n_bytes, NULL); + status = DeviceIoControl(musb_interface->whandle, + IOCTL_BULKUSB_RESET_DEVICE, + NULL, 0, NULL, 0, &n_bytes, NULL); + status = DeviceIoControl(musb_interface->rhandle, + IOCTL_BULKUSB_RESET_PIPE, + NULL, 0, NULL, 0, &n_bytes, NULL); + status = DeviceIoControl(musb_interface->whandle, + IOCTL_BULKUSB_RESET_PIPE, + NULL, 0, NULL, 0, &n_bytes, NULL); + return status; + +#endif + return 0; +} + +int musb_get_device(MUSB_INTERFACE *usb_interface) +{ +#ifdef HAVE_LIBUSB + struct usb_device_descriptor d; + usb_get_descriptor(usb_interface->dev, USB_DT_DEVICE, 0, &d, sizeof(d)); + return d.bcdDevice; +#elif HAVE_LIBUSB10 + struct libusb_device_descriptor d; + libusb_get_descriptor(usb_interface->dev, LIBUSB_DT_DEVICE, 0, (unsigned char *)&d, sizeof(d)); + return d.bcdDevice; +#else + return 0; +#endif +} + +/* end */ diff --git a/software/src/mxml.c b/software/src/mxml.c new file mode 100644 index 0000000..b5ef635 --- /dev/null +++ b/software/src/mxml.c @@ -0,0 +1,2366 @@ +/********************************************************************\ + + Name: mxml.c + Created by: Stefan Ritt + Copyright 2000 + Stefan Ritt + + Contents: Midas XML Library + + This is a simple implementation of XML functions for writing and + reading XML files. For writing an XML file from scratch, following + functions can be used: + + writer = mxml_open_file(file_name); + mxml_start_element(writer, name); + mxml_write_attribute(writer, name, value); + mxml_write_value(writer, value); + mxml_end_element(writer); + ... + mxml_close_file(writer); + + To read an XML file, the function + + tree = mxml_parse_file(file_name, error, sizeof(error)); + + is used. It parses the complete XML file and stores it in a + hierarchical tree in memory. Nodes in that tree can be searched + for with + + mxml_find_node(tree, xml_path); + + or + + mxml_find_nodes(tree, xml_path, &nodelist); + + which support a subset of the XPath specification. Another set of + functions is availabe to retrieve attributes and values from nodes + in the tree and for manipulating nodes, like replacing, adding and + deleting nodes. + + + This file is part of MIDAS XML Library. + + MIDAS XML Library is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + MIDAS XML Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with MIDAS XML Library. If not, see . + +\********************************************************************/ + +#include +#include +#include +#include + +#ifdef _MSC_VER + +#include +#include +#include + +#pragma warning( disable: 4996) /* disable "deprecated" warning */ + +#else + +#define TRUE 1 +#define FALSE 0 + +#ifndef O_TEXT +#define O_TEXT 0 +#define O_BINARY 0 +#endif + +#include +#include +#include +#include +#include +#ifndef OS_VXWORKS +#include +#endif +#include + +#endif + +#include "mxml.h" +#ifndef HAVE_STRLCPY +#include "strlcpy.h" +#endif + +#define XML_INDENT " " + +#if defined(__GNUC__) && !defined(__MAKECINT__) +# define MXML_GNUC_PRINTF( format_idx, arg_idx ) \ + __attribute__((format (printf, format_idx, arg_idx))) +# define MXML_GNUC_SCANF( format_idx, arg_idx ) \ + __attribute__((format (scanf, format_idx, arg_idx))) +# define MXML_GNUC_FORMAT( arg_idx ) \ + __attribute__((format_arg (arg_idx))) +#else +# define MXML_GNUC_PRINTF( format_idx, arg_idx ) +# define MXML_GNUC_SCANF( format_idx, arg_idx ) +# define MXML_GNUC_FORMAT( arg_idx ) +#endif + +static int mxml_suppress_date_flag = 0; /* suppress writing date at the top of file. */ + +/* local prototypes */ +static PMXML_NODE read_error(PMXML_NODE root, const char *file_name, int line_number, char *error, int error_size, int *error_line, const char *format, ...) MXML_GNUC_PRINTF(7, 8); +static void mxml_encode(char *src, int size, int translate); +static void mxml_decode(char *str); +static int mxml_write_subtree(MXML_WRITER *writer, PMXML_NODE tree, int indent); +static int mxml_write_line(MXML_WRITER *writer, const char *line); +static int mxml_start_element1(MXML_WRITER *writer, const char *name, int indent); +static int mxml_add_resultnode(PMXML_NODE node, const char *xml_path, PMXML_NODE **nodelist, int *found); +static int mxml_find_nodes1(PMXML_NODE tree, const char *xml_path, PMXML_NODE **nodelist, int *found); +static void *mxml_malloc(size_t size); +static void *mxml_realloc(void *p, size_t size); +static void mxml_free(void *p); +static void mxml_deallocate(void); + +/*------------------------------------------------------------------*/ + +static char *_encode_buffer = NULL; +static char *_data_enc = NULL; + +/*------------------------------------------------------------------*/ + +void *mxml_malloc(size_t size) +{ + return malloc(size); +} + +/*------------------------------------------------------------------*/ + +void *mxml_realloc(void *p, size_t size) +{ + return realloc(p, size); +} + +/*------------------------------------------------------------------*/ + +void mxml_free(void *p) +{ + free(p); +} + +/*------------------------------------------------------------------*/ + +void mxml_deallocate(void) +{ + if (_encode_buffer != NULL) { + mxml_free(_encode_buffer); + _encode_buffer = NULL; + } + if (_data_enc != NULL) { + mxml_free(_data_enc); + _data_enc = NULL; + } +} + +/*------------------------------------------------------------------*/ + +int mxml_write_line(MXML_WRITER *writer, const char *line) +{ + int len; + + len = (int)strlen(line); + + if (writer->buffer) { + if (writer->buffer_len + len >= writer->buffer_size) { + writer->buffer_size += 10000; + writer->buffer = (char *)mxml_realloc(writer->buffer, writer->buffer_size); + } + strcpy(writer->buffer + writer->buffer_len, line); + writer->buffer_len += len; + return len; + } else { + return (int)write(writer->fh, line, len); + } + + return 0; +} + +/*------------------------------------------------------------------*/ + +/** + * open a memory buffer and write XML header + */ +MXML_WRITER *mxml_open_buffer(void) +{ + char str[256], line[1000]; + time_t now; + MXML_WRITER *writer; + + writer = (MXML_WRITER *)mxml_malloc(sizeof(MXML_WRITER)); + memset(writer, 0, sizeof(MXML_WRITER)); + writer->translate = 1; + + writer->buffer_size = 10000; + writer->buffer = (char *)mxml_malloc(10000); + writer->buffer[0] = 0; + writer->buffer_len = 0; + + /* write XML header */ + strcpy(line, "\n"); + mxml_write_line(writer, line); + time(&now); + strcpy(str, ctime(&now)); + str[24] = 0; + sprintf(line, "\n", str); + if (mxml_suppress_date_flag == 0) + mxml_write_line(writer, line); + + /* initialize stack */ + writer->level = 0; + writer->element_is_open = 0; + + return writer; +} + +/*------------------------------------------------------------------*/ + +/** + * suppress writing date at the top of file. + */ +void mxml_suppress_date(int suppress) +{ + mxml_suppress_date_flag = suppress; +} + +/*------------------------------------------------------------------*/ + +/** + * open a file and write XML header + */ +MXML_WRITER *mxml_open_file(const char *file_name) +{ + char str[256], line[1000]; + time_t now; + MXML_WRITER *writer; + + writer = (MXML_WRITER *)mxml_malloc(sizeof(MXML_WRITER)); + memset(writer, 0, sizeof(MXML_WRITER)); + writer->translate = 1; + + writer->fh = open(file_name, O_RDWR | O_CREAT | O_TRUNC | O_TEXT, 0644); + + if (writer->fh == -1) { + sprintf(line, "Unable to open file \"%s\": ", file_name); + perror(line); + mxml_free(writer); + return NULL; + } + + /* write XML header */ + strcpy(line, "\n"); + mxml_write_line(writer, line); + time(&now); + strcpy(str, ctime(&now)); + str[24] = 0; + sprintf(line, "\n", str); + if (mxml_suppress_date_flag == 0) + mxml_write_line(writer, line); + + /* initialize stack */ + writer->level = 0; + writer->element_is_open = 0; + + return writer; +} + +/*------------------------------------------------------------------*/ + +/** + * convert '<' '>' '&' '"' ''' into &xx; + */ +void mxml_encode(char *src, int size, int translate) +{ + char *ps, *pd; + static int buffer_size = 1000; + + assert(size); + + if (_encode_buffer == NULL) { + _encode_buffer = (char *) mxml_malloc(buffer_size); + atexit(mxml_deallocate); + } + + if (size > buffer_size) { + _encode_buffer = (char *) mxml_realloc(_encode_buffer, size*2); + buffer_size = size; + } + + pd = _encode_buffer; + for (ps = src ; *ps && (size_t)pd - (size_t)_encode_buffer < (size_t)(size-10) ; ps++) { + + if (translate) { /* tranlate "<", ">", "&", """, "'" */ + switch (*ps) { + case '<': + strcpy(pd, "<"); + pd += 4; + break; + case '>': + strcpy(pd, ">"); + pd += 4; + break; + case '&': + strcpy(pd, "&"); + pd += 5; + break; + case '\"': + strcpy(pd, """); + pd += 6; + break; + case '\'': + strcpy(pd, "'"); + pd += 6; + break; + default: + *pd++ = *ps; + } + } else { + switch (*ps) { /* translate only illegal XML characters "<" and "&" */ + case '<': + strcpy(pd, "<"); + pd += 4; + break; + case '&': + strcpy(pd, "&"); + pd += 5; + break; + default: + *pd++ = *ps; + } + } + } + *pd = 0; + + strlcpy(src, _encode_buffer, size); +} + +/*------------------------------------------------------------------*/ + +/** + * reverse of mxml_encode, strip leading or trailing '"' + */ +void mxml_decode(char *str) +{ + char *p; + + p = str; + while ((p = strchr(p, '&')) != NULL) { + if (strncmp(p, "<", 4) == 0) { + *(p++) = '<'; + memmove(p, p+3, strlen(p+3) + 1); + } + else if (strncmp(p, ">", 4) == 0) { + *(p++) = '>'; + memmove(p, p+3, strlen(p+3) + 1); + } + else if (strncmp(p, "&", 5) == 0) { + *(p++) = '&'; + memmove(p, p+4, strlen(p+4) + 1); + } + else if (strncmp(p, """, 6) == 0) { + *(p++) = '\"'; + memmove(p, p+5, strlen(p+5) + 1); + } + else if (strncmp(p, "'", 6) == 0) { + *(p++) = '\''; + memmove(p, p+5, strlen(p+5) + 1); + } + else { + p++; // skip unknown entity + } + } +/* if (str[0] == '\"' && str[strlen(str)-1] == '\"') { + memmove(str, str+1, strlen(str+1) + 1); + str[strlen(str)-1] = 0; + }*/ +} + +/*------------------------------------------------------------------*/ + +/** + * set translation of <,>,",',&, on/off in writer + */ +int mxml_set_translate(MXML_WRITER *writer, int flag) +{ + int old_flag; + + old_flag = writer->translate; + writer->translate = flag; + return old_flag; +} +/*------------------------------------------------------------------*/ + +/** + * start a new XML element, must be followed by mxml_end_elemnt + */ +int mxml_start_element1(MXML_WRITER *writer, const char *name, int indent) +{ + int i; + char line[1000], name_enc[1000]; + + if (writer->element_is_open) { + mxml_write_line(writer, ">\n"); + writer->element_is_open = FALSE; + } + + line[0] = 0; + if (indent) + for (i=0 ; ilevel ; i++) + strlcat(line, XML_INDENT, sizeof(line)); + strlcat(line, "<", sizeof(line)); + strlcpy(name_enc, name, sizeof(name_enc)); + mxml_encode(name_enc, sizeof(name_enc), writer->translate); + strlcat(line, name_enc, sizeof(line)); + + /* put element on stack */ + if (writer->level == 0) + writer->stack = (char **)mxml_malloc(sizeof(char *)); + else + writer->stack = (char **)mxml_realloc(writer->stack, sizeof(char *)*(writer->level+1)); + + writer->stack[writer->level] = (char *) mxml_malloc(strlen(name_enc)+1); + strcpy(writer->stack[writer->level], name_enc); + writer->level++; + writer->element_is_open = TRUE; + writer->data_was_written = FALSE; + + return mxml_write_line(writer, line) == (int)strlen(line); +} + +/*------------------------------------------------------------------*/ + +int mxml_start_element(MXML_WRITER *writer, const char *name) +{ + return mxml_start_element1(writer, name, TRUE); +} + +/*------------------------------------------------------------------*/ + +int mxml_start_element_noindent(MXML_WRITER *writer, const char *name) +{ + return mxml_start_element1(writer, name, FALSE); +} + +/*------------------------------------------------------------------*/ + +/** + * close an open XML element + */ +int mxml_end_element(MXML_WRITER *writer) +{ + int i; + char line[1000]; + + if (writer->level == 0) + return 0; + + writer->level--; + + if (writer->element_is_open) { + writer->element_is_open = FALSE; + mxml_free(writer->stack[writer->level]); + if (writer->level == 0) + mxml_free(writer->stack); + strcpy(line, "/>\n"); + return mxml_write_line(writer, line) == (int)strlen(line); + } + + line[0] = 0; + if (!writer->data_was_written) { + for (i=0 ; ilevel ; i++) + strlcat(line, XML_INDENT, sizeof(line)); + } + + strlcat(line, "stack[writer->level], sizeof(line)); + mxml_free(writer->stack[writer->level]); + if (writer->level == 0) + mxml_free(writer->stack); + strlcat(line, ">\n", sizeof(line)); + writer->data_was_written = FALSE; + + return mxml_write_line(writer, line) == (int)strlen(line); +} + +/*------------------------------------------------------------------*/ + +/** + * write an attribute to the currently open XML element + */ +int mxml_write_attribute(MXML_WRITER *writer, const char *name, const char *value) +{ + char name_enc[4096], val_enc[4096], line[8192]; + + if (!writer->element_is_open) + return FALSE; + + strcpy(name_enc, name); + mxml_encode(name_enc, sizeof(name_enc), writer->translate); + strcpy(val_enc, value); + mxml_encode(val_enc, sizeof(val_enc), writer->translate); + + sprintf(line, " %s=\"%s\"", name_enc, val_enc); + + return mxml_write_line(writer, line) == (int)strlen(line); +} + +/*------------------------------------------------------------------*/ + +/** + * write value of an XML element, like <[name]>[value] + */ +int mxml_write_value(MXML_WRITER *writer, const char *data) +{ + static int data_size = 0; + + if (!writer->element_is_open) + return FALSE; + + if (mxml_write_line(writer, ">") != 1) + return FALSE; + writer->element_is_open = FALSE; + writer->data_was_written = TRUE; + + if (data_size == 0) { + _data_enc = (char *)mxml_malloc(1000); + data_size = 1000; + } else if ((int)strlen(data)*2+1000 > data_size) { + data_size = 1000+(int)strlen(data)*2; + _data_enc = (char *)mxml_realloc(_data_enc, data_size); + } + + strcpy(_data_enc, data); + mxml_encode(_data_enc, data_size, writer->translate); + return mxml_write_line(writer, _data_enc) == (int)strlen(_data_enc); +} + +/*------------------------------------------------------------------*/ + +/** + * write empty line + */ +int mxml_write_empty_line(MXML_WRITER *writer) +{ + if (writer->element_is_open) { + mxml_write_line(writer, ">\n"); + writer->element_is_open = FALSE; + } + + if (mxml_write_line(writer, "\n") != 1) + return FALSE; + + return TRUE; +} + +/*------------------------------------------------------------------*/ + +/** + * write a comment to an XML file, enclosed in "" + */ +int mxml_write_comment(MXML_WRITER *writer, const char *string) +{ + int i; + char line[1000]; + + if (writer->element_is_open) { + mxml_write_line(writer, ">\n"); + writer->element_is_open = FALSE; + } + + line[0] = 0; + for (i=0 ; ilevel ; i++) + strlcat(line, XML_INDENT, sizeof(line)); + + strlcat(line, "\n", sizeof(line)); + if (mxml_write_line(writer, line) != (int)strlen(line)) + return FALSE; + + return TRUE; +} + +/*------------------------------------------------------------------*/ + +/** + * shortcut to write an element with a value but without attribute + */ +int mxml_write_element(MXML_WRITER *writer, const char *name, const char *value) +{ + int i; + + i = mxml_start_element(writer, name); + i += mxml_write_value(writer, value); + i += mxml_end_element(writer); + return i; +} + +/*------------------------------------------------------------------*/ + +/** + * close a file opened with mxml_open_writer + */ +char *mxml_close_buffer(MXML_WRITER *writer) +{ + int i; + char *p; + + if (writer->element_is_open) { + writer->element_is_open = FALSE; + if (mxml_write_line(writer, ">\n") != 2) + return NULL; + } + + /* close remaining open levels */ + for (i = 0 ; ilevel ; i++) + mxml_end_element(writer); + + p = writer->buffer; + mxml_free(writer); + return p; +} + +/*------------------------------------------------------------------*/ + +/** + * close a file opened with mxml_open_writer + */ +int mxml_close_file(MXML_WRITER *writer) +{ + int i; + + if (writer->element_is_open) { + writer->element_is_open = FALSE; + if (mxml_write_line(writer, ">\n") != 2) + return 0; + } + + /* close remaining open levels */ + for (i = 0 ; ilevel ; i++) + mxml_end_element(writer); + + close(writer->fh); + mxml_free(writer); + return 1; +} + +/*------------------------------------------------------------------*/ + +/** + * create root node of an XML tree + */ +PMXML_NODE mxml_create_root_node(void) +{ + PMXML_NODE root; + + root = (PMXML_NODE)calloc(sizeof(MXML_NODE), 1); + strcpy(root->name, "root"); + root->node_type = DOCUMENT_NODE; + + return root; +} + +/*------------------------------------------------------------------*/ + +/** + * add a subnode (child) to an existing parent node as a specific position + */ +PMXML_NODE mxml_add_special_node_at(PMXML_NODE parent, int node_type, const char *node_name, const char *value, int idx) +{ + PMXML_NODE pnode, pchild; + int i, j; + + assert(parent); + if (parent->n_children == 0) + parent->child = (PMXML_NODE)mxml_malloc(sizeof(MXML_NODE)); + else + parent->child = (PMXML_NODE)mxml_realloc(parent->child, sizeof(MXML_NODE)*(parent->n_children+1)); + assert(parent->child); + + /* move following nodes one down */ + if (idx < parent->n_children) + for (i=parent->n_children ; i > idx ; i--) + memcpy(&parent->child[i], &parent->child[i-1], sizeof(MXML_NODE)); + + /* correct parent pointer for children */ + for (i=0 ; in_children ; i++) { + pchild = parent->child+i; + for (j=0 ; jn_children ; j++) + pchild->child[j].parent = pchild; + } + + /* initialize new node */ + pnode = &parent->child[idx]; + memset(pnode, 0, sizeof(MXML_NODE)); + strlcpy(pnode->name, node_name, sizeof(pnode->name)); + pnode->node_type = node_type; + pnode->parent = parent; + + parent->n_children++; + + if (value && *value) { + pnode->value = (char *)mxml_malloc(strlen(value)+1); + assert(pnode->value); + strcpy(pnode->value, value); + } + + return pnode; +} + +/*------------------------------------------------------------------*/ + +/** + * add a subnode (child) to an existing parent node at the end + */ +PMXML_NODE mxml_add_special_node(PMXML_NODE parent, int node_type, const char *node_name, const char *value) +{ + return mxml_add_special_node_at(parent, node_type, node_name, value, parent->n_children); +} + +/*------------------------------------------------------------------*/ + +/** + * write value of an XML element, like <[name]>[value] + */ +PMXML_NODE mxml_add_node(PMXML_NODE parent, const char *node_name, const char *value) +{ + return mxml_add_special_node_at(parent, ELEMENT_NODE, node_name, value, parent->n_children); +} + +/*------------------------------------------------------------------*/ + +/** + * add a subnode (child) to an existing parent node at the end + */ +PMXML_NODE mxml_add_node_at(PMXML_NODE parent, const char *node_name, const char *value, int idx) +{ + return mxml_add_special_node_at(parent, ELEMENT_NODE, node_name, value, idx); +} + +/*------------------------------------------------------------------*/ + +/** + * add a whole node tree to an existing parent node at a specific position + */ +int mxml_add_tree_at(PMXML_NODE parent, PMXML_NODE tree, int idx) +{ + PMXML_NODE pchild; + int i, j, k; + + assert(parent); + assert(tree); + if (parent->n_children == 0) + parent->child = (PMXML_NODE)mxml_malloc(sizeof(MXML_NODE)); + else { + pchild = parent->child; + parent->child = (PMXML_NODE)mxml_realloc(parent->child, sizeof(MXML_NODE)*(parent->n_children+1)); + + if (parent->child != pchild) { + /* correct parent pointer for children */ + for (i=0 ; in_children ; i++) { + pchild = parent->child+i; + for (j=0 ; jn_children ; j++) + pchild->child[j].parent = pchild; + } + } + } + assert(parent->child); + + if (idx < parent->n_children) + for (i=parent->n_children ; i > idx ; i--) { + /* move following nodes one down */ + memcpy(&parent->child[i], &parent->child[i-1], sizeof(MXML_NODE)); + + /* correct parent pointer for children */ + for (j=0 ; jn_children ; j++) { + pchild = parent->child+j; + for (k=0 ; kn_children ; k++) + pchild->child[k].parent = pchild; + } + } + + /* initialize new node */ + memcpy(parent->child+idx, tree, sizeof(MXML_NODE)); + parent->n_children++; + parent->child[idx].parent = parent; + + /* correct parent pointer for children */ + for (i=0 ; in_children ; i++) { + pchild = parent->child+i; + for (j=0 ; jn_children ; j++) + pchild->child[j].parent = pchild; + } + + return TRUE; +} + +/*------------------------------------------------------------------*/ + +/** + * add a whole node tree to an existing parent node at the end + */ +int mxml_add_tree(PMXML_NODE parent, PMXML_NODE tree) +{ + return mxml_add_tree_at(parent, tree, parent->n_children); +} + +/*------------------------------------------------------------------*/ + +/** + * add an attribute to an existing node + */ +int mxml_add_attribute(PMXML_NODE pnode, const char *attrib_name, const char *attrib_value) +{ + if (pnode->n_attributes == 0) { + pnode->attribute_name = (char*)mxml_malloc(MXML_NAME_LENGTH); + pnode->attribute_value = (char**)mxml_malloc(sizeof(char *)); + } else { + pnode->attribute_name = (char*)mxml_realloc(pnode->attribute_name, MXML_NAME_LENGTH*(pnode->n_attributes+1)); + pnode->attribute_value = (char**)mxml_realloc(pnode->attribute_value, sizeof(char *)*(pnode->n_attributes+1)); + } + + strlcpy(pnode->attribute_name+pnode->n_attributes*MXML_NAME_LENGTH, attrib_name, MXML_NAME_LENGTH); + pnode->attribute_value[pnode->n_attributes] = (char *)mxml_malloc(strlen(attrib_value)+1); + strcpy(pnode->attribute_value[pnode->n_attributes], attrib_value); + pnode->n_attributes++; + + return TRUE; +} + +/*------------------------------------------------------------------*/ + +/** + * return number of subnodes (children) of a node + */ +int mxml_get_number_of_children(PMXML_NODE pnode) +{ + assert(pnode); + return pnode->n_children; +} + +/*------------------------------------------------------------------*/ + +/** + * return number of subnodes (children) of a node + */ +PMXML_NODE mxml_subnode(PMXML_NODE pnode, int idx) +{ + assert(pnode); + if (idx < pnode->n_children) + return &pnode->child[idx]; + return NULL; +} + +/*------------------------------------------------------------------*/ + + +int mxml_find_nodes1(PMXML_NODE tree, const char *xml_path, PMXML_NODE **nodelist, int *found); + +int mxml_add_resultnode(PMXML_NODE node, const char *xml_path, PMXML_NODE **nodelist, int *found) +{ + /* if at end of path, add this node */ + if (*xml_path == 0) { + if (*found == 0) + *nodelist = (PMXML_NODE *)mxml_malloc(sizeof(PMXML_NODE)); + else + *nodelist = (PMXML_NODE *)mxml_realloc(*nodelist, sizeof(PMXML_NODE)*(*found + 1)); + + (*nodelist)[*found] = node; + (*found)++; + } else { + /* if not at end of path, branch into subtree */ + return mxml_find_nodes1(node, xml_path+1, nodelist, found); + } + + return 1; +} + +/*------------------------------------------------------------------*/ + +/** + Return list of XML nodes with a subset of XPATH specifications. + Following elemets are possible + + ///..../ Find a node in the tree hierarchy + /[idx] Find child #[idx] of node (index starts from 1) + /[idx]/ Find subnode of the above + /[=] Find a node which has a specific subnode + /[=]/ Find subnode of the above + /[@=]/ Find a node which has a specific attribute +*/ +int mxml_find_nodes1(PMXML_NODE tree, const char *xml_path, PMXML_NODE **nodelist, int *found) +{ + PMXML_NODE pnode; + const char *p1,*p2; + char *p3, node_name[256], condition[256]; + char cond_name[MXML_MAX_CONDITION][256], cond_value[MXML_MAX_CONDITION][256]; + int cond_type[MXML_MAX_CONDITION]; + int i, j, k, idx, num_cond; + int cond_satisfied,cond_index; + size_t len; + + p1 = xml_path; + pnode = tree; + + /* skip leading '/' */ + if (*p1 && *p1 == '/') + p1++; + + do { + p2 = p1; + while (*p2 && *p2 != '/' && *p2 != '[') + p2++; + len = (size_t)p2 - (size_t)p1; + if (len >= sizeof(node_name)) + return 0; + + memcpy(node_name, p1, len); + node_name[len] = 0; + idx = 0; + num_cond = 0; + while (*p2 == '[') { + cond_name[num_cond][0] = cond_value[num_cond][0] = cond_type[num_cond] = 0; + p2++; + if (isdigit(*p2)) { + /* evaluate [idx] */ + idx = atoi(p2); + p2 = strchr(p2, ']'); + if (p2 == NULL) + return 0; + p2++; + } else { + /* evaluate [<@attrib>/=] */ + while (*p2 && isspace((unsigned char)*p2)) + p2++; + strlcpy(condition, p2, sizeof(condition)); + if (strchr(condition, ']')) + *strchr(condition, ']') = 0; + else + return 0; + p2 = strchr(p2, ']')+1; + if ((p3 = strchr(condition, '=')) != NULL) { + if (condition[0] == '@') { + cond_type[num_cond] = 1; + strlcpy(cond_name[num_cond], &condition[1], sizeof(cond_name[num_cond])); + } else { + strlcpy(cond_name[num_cond], condition, sizeof(cond_name[num_cond])); + } + + *strchr(cond_name[num_cond], '=') = 0; + while (cond_name[num_cond][0] && isspace(cond_name[num_cond][strlen(cond_name[num_cond])-1])) + cond_name[num_cond][strlen(cond_name[num_cond])-1] = 0; + + p3++; + while (*p3 && isspace(*p3)) + p3++; + if (*p3 == '\"') { + strlcpy(cond_value[num_cond], p3+1, sizeof(cond_value[num_cond])); + while (cond_value[num_cond][0] && isspace(cond_value[num_cond][strlen(cond_value[num_cond])-1])) + cond_value[num_cond][strlen(cond_value[num_cond])-1] = 0; + if (cond_value[num_cond][0] && cond_value[num_cond][strlen(cond_value[num_cond])-1] == '\"') + cond_value[num_cond][strlen(cond_value[num_cond])-1] = 0; + } else if (*p3 == '\'') { + strlcpy(cond_value[num_cond], p3+1, sizeof(cond_value[num_cond])); + while (cond_value[num_cond][0] && isspace(cond_value[num_cond][strlen(cond_value[num_cond])-1])) + cond_value[num_cond][strlen(cond_value[num_cond])-1] = 0; + if (cond_value[num_cond][0] && cond_value[num_cond][strlen(cond_value[num_cond])-1] == '\'') + cond_value[num_cond][strlen(cond_value[num_cond])-1] = 0; + } else { + strlcpy(cond_value[num_cond], p3, sizeof(cond_value[num_cond])); + while (cond_value[num_cond][0] && isspace(cond_value[num_cond][strlen(cond_value[num_cond])-1])) + cond_value[num_cond][strlen(cond_value[num_cond])-1] = 0; + } + num_cond++; + } + } + } + + cond_index = 0; + for (i=j=0 ; in_children ; i++) { + if (num_cond) { + cond_satisfied = 0; + for (k=0;kchild[i].name, node_name) == 0) + if (mxml_get_attribute(pnode->child+i, cond_name[k]) && + strcmp(mxml_get_attribute(pnode->child+i, cond_name[k]), cond_value[k]) == 0) + cond_satisfied++; + } + else { + /* search subnode */ + for (j=0 ; jchild[i].n_children ; j++) + if (strcmp(pnode->child[i].child[j].name, cond_name[k]) == 0) + if (strcmp(pnode->child[i].child[j].value, cond_value[k]) == 0) + cond_satisfied++; + } + } + if (cond_satisfied==num_cond) { + cond_index++; + if (idx == 0 || cond_index == idx) { + if (!mxml_add_resultnode(pnode->child+i, p2, nodelist, found)) + return 0; + } + } + } else { + if (strcmp(pnode->child[i].name, node_name) == 0) + if (idx == 0 || ++j == idx) + if (!mxml_add_resultnode(pnode->child+i, p2, nodelist, found)) + return 0; + } + } + + if (i == pnode->n_children) + return 1; + + pnode = &pnode->child[i]; + p1 = p2; + if (*p1 == '/') + p1++; + + } while (*p2); + + return 1; +} + +/*------------------------------------------------------------------*/ + +int mxml_find_nodes(PMXML_NODE tree, const char *xml_path, PMXML_NODE **nodelist) +{ + int status, found = 0; + + status = mxml_find_nodes1(tree, xml_path, nodelist, &found); + + if (status == 0) + return -1; + + return found; +} + +/*------------------------------------------------------------------*/ + +/** + * Search for a specific XML node with a subset of XPATH specifications. + * Return first found node. For syntax see mxml_find_nodes() + */ +PMXML_NODE mxml_find_node(PMXML_NODE tree, const char *xml_path) +{ + PMXML_NODE *node, pnode; + int n; + + n = mxml_find_nodes(tree, xml_path, &node); + if (n > 0) { + pnode = node[0]; + mxml_free(node); + } else + pnode = NULL; + + return pnode; +} + +/*------------------------------------------------------------------*/ + +PMXML_NODE mxml_get_parent(PMXML_NODE pnode) +{ + assert(pnode); + return pnode->parent; +} + +/*------------------------------------------------------------------*/ + +char *mxml_get_name(PMXML_NODE pnode) +{ + assert(pnode); + return pnode->name; +} + +/*------------------------------------------------------------------*/ + +char *mxml_get_value(PMXML_NODE pnode) +{ + assert(pnode); + return pnode->value; +} + +/*------------------------------------------------------------------*/ + +int mxml_get_line_number_start(PMXML_NODE pnode) +{ + assert(pnode); + return pnode->line_number_start; +} + +/*------------------------------------------------------------------*/ + +int mxml_get_line_number_end(PMXML_NODE pnode) +{ + assert(pnode); + return pnode->line_number_end; +} + +/*------------------------------------------------------------------*/ + +char *mxml_get_attribute(PMXML_NODE pnode, const char *name) +{ + int i; + + assert(pnode); + for (i=0 ; in_attributes ; i++) + if (strcmp(pnode->attribute_name+i*MXML_NAME_LENGTH, name) == 0) + return pnode->attribute_value[i]; + + return NULL; +} + +/*------------------------------------------------------------------*/ + +int mxml_replace_node_name(PMXML_NODE pnode, const char *name) +{ + strlcpy(pnode->name, name, sizeof(pnode->name)); + return TRUE; +} + +/*------------------------------------------------------------------*/ + +int mxml_replace_node_value(PMXML_NODE pnode, const char *value) +{ + if (pnode->value) + pnode->value = (char *)mxml_realloc(pnode->value, strlen(value)+1); + else if (value) + pnode->value = (char *)mxml_malloc(strlen(value)+1); + else + pnode->value = NULL; + + if (value) + strcpy(pnode->value, value); + + return TRUE; +} + +/*------------------------------------------------------------------*/ + +/** + replace value os a subnode, like + + + value + + + if pnode=parent, and "name"="child", then "value" gets replaced +*/ +int mxml_replace_subvalue(PMXML_NODE pnode, const char *name, const char *value) +{ + int i; + + for (i=0 ; in_children ; i++) + if (strcmp(pnode->child[i].name, name) == 0) + break; + + if (i == pnode->n_children) + return FALSE; + + return mxml_replace_node_value(&pnode->child[i], value); +} + +/*------------------------------------------------------------------*/ + +/** + * change the name of an attribute, keep its value + */ +int mxml_replace_attribute_name(PMXML_NODE pnode, const char *old_name, const char *new_name) +{ + int i; + + for (i=0 ; in_attributes ; i++) + if (strcmp(pnode->attribute_name+i*MXML_NAME_LENGTH, old_name) == 0) + break; + + if (i == pnode->n_attributes) + return FALSE; + + strlcpy(pnode->attribute_name+i*MXML_NAME_LENGTH, new_name, MXML_NAME_LENGTH); + return TRUE; +} + +/*------------------------------------------------------------------*/ + +/** + * change the value of an attribute + */ +int mxml_replace_attribute_value(PMXML_NODE pnode, const char *attrib_name, const char *attrib_value) +{ + int i; + + for (i=0 ; in_attributes ; i++) + if (strcmp(pnode->attribute_name+i*MXML_NAME_LENGTH, attrib_name) == 0) + break; + + if (i == pnode->n_attributes) + return FALSE; + + pnode->attribute_value[i] = (char *)mxml_realloc(pnode->attribute_value[i], strlen(attrib_value)+1); + strcpy(pnode->attribute_value[i], attrib_value); + return TRUE; +} + +/*------------------------------------------------------------------*/ + +/** + * free memory of a node and remove it from the parent's child list + */ +int mxml_delete_node(PMXML_NODE pnode) +{ + PMXML_NODE parent; + int i, j; + + /* remove node from parent's list */ + parent = pnode->parent; + + if (parent) { + for (i=0 ; in_children ; i++) + if (&parent->child[i] == pnode) + break; + + /* free allocated node memory recursively */ + mxml_free_tree(pnode); + + if (i < parent->n_children) { + for (j=i ; jn_children-1 ; j++) + memcpy(&parent->child[j], &parent->child[j+1], sizeof(MXML_NODE)); + parent->n_children--; + if (parent->n_children) + parent->child = (PMXML_NODE)mxml_realloc(parent->child, sizeof(MXML_NODE)*(parent->n_children)); + else + mxml_free(parent->child); + } + } else + mxml_free_tree(pnode); + + return TRUE; +} + +/*------------------------------------------------------------------*/ + +int mxml_delete_attribute(PMXML_NODE pnode, const char *attrib_name) +{ + int i, j; + + for (i=0 ; in_attributes ; i++) + if (strcmp(pnode->attribute_name+i*MXML_NAME_LENGTH, attrib_name) == 0) + break; + + if (i == pnode->n_attributes) + return FALSE; + + mxml_free(pnode->attribute_value[i]); + for (j=i ; jn_attributes-1 ; j++) { + strcpy(pnode->attribute_name+j*MXML_NAME_LENGTH, pnode->attribute_name+(j+1)*MXML_NAME_LENGTH); + pnode->attribute_value[j] = pnode->attribute_value[j+1]; + } + + if (pnode->n_attributes > 0) { + pnode->attribute_name = (char *)mxml_realloc(pnode->attribute_name, MXML_NAME_LENGTH*(pnode->n_attributes-1)); + pnode->attribute_value = (char **)mxml_realloc(pnode->attribute_value, sizeof(char *)*(pnode->n_attributes-1)); + } else { + mxml_free(pnode->attribute_name); + mxml_free(pnode->attribute_value); + } + + return TRUE; +} + +/*------------------------------------------------------------------*/ + +#define HERE root, file_name, line_number, error, error_size, error_line + +/** + * used inside mxml_parse_file for reporting errors + */ +PMXML_NODE read_error(PMXML_NODE root, const char *file_name, int line_number, char *error, int error_size, int *error_line, const char *format, ...) +{ + char *msg, str[1000]; + va_list argptr; + + if (file_name && file_name[0]) + sprintf(str, "XML read error in file \"%s\", line %d: ", file_name, line_number); + else + sprintf(str, "XML read error, line %d: ", line_number); + msg = (char *)mxml_malloc(error_size); + if (error) + strlcpy(error, str, error_size); + + va_start(argptr, format); + vsprintf(str, (char *) format, argptr); + va_end(argptr); + + if (error) + strlcat(error, str, error_size); + if (error_line) + *error_line = line_number; + + mxml_free(msg); + mxml_free_tree(root); + + return NULL; +} + +/*------------------------------------------------------------------*/ + +/** + * Parse a XML buffer and convert it into a tree of MXML_NODE's. + * Return NULL in case of an error, return error description. + * Optional file_name is used for error reporting if called from mxml_parse_file() + */ +PMXML_NODE mxml_parse_buffer(const char *buf, char *error, int error_size, int *error_line) +{ + char node_name[256], attrib_name[256], attrib_value[1000], quote; + const char *p, *pv; + int i,j, line_number; + PMXML_NODE root, ptree, pnew; + int end_element; + size_t len; + char *file_name = NULL; /* dummy for 'HERE' */ + + p = buf; + line_number = 1; + + root = mxml_create_root_node(); + ptree = root; + + /* parse file contents */ + do { + if (*p == '<') { + + end_element = FALSE; + + /* found new element */ + p++; + while (*p && isspace(*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) + return read_error(HERE, "Unexpected end of file"); + + if (strncmp(p, "!--", 3) == 0) { + + /* found comment */ + + pnew = mxml_add_special_node(ptree, COMMENT_NODE, "Comment", NULL); + pnew->line_number_start = line_number; + pv = p+3; + while (*pv == ' ') + pv++; + + p += 3; + if (strstr(p, "-->") == NULL) + return read_error(HERE, "Unterminated comment"); + + while (strncmp(p, "-->", 3) != 0) { + if (*p == '\n') + line_number++; + p++; + } + + len = (size_t)p - (size_t)pv; + pnew->value = (char *)mxml_malloc(len+1); + memcpy(pnew->value, pv, len); + pnew->value[len] = 0; + pnew->line_number_end = line_number; + mxml_decode(pnew->value); + + p += 3; + + } else if (*p == '?') { + + /* found ?...? element */ + pnew = mxml_add_special_node(ptree, PROCESSING_INSTRUCTION_NODE, "PI", NULL); + pnew->line_number_start = line_number; + pv = p+1; + + p++; + if (strstr(p, "?>") == NULL) + return read_error(HERE, "Unterminated ?...? element"); + + while (strncmp(p, "?>", 2) != 0) { + if (*p == '\n') + line_number++; + p++; + } + + len = (size_t)p - (size_t)pv; + pnew->value = (char *)mxml_malloc(len+1); + memcpy(pnew->value, pv, len); + pnew->value[len] = 0; + pnew->line_number_end = line_number; + mxml_decode(pnew->value); + + p += 2; + + } else if (strncmp(p, "!DOCTYPE", 8) == 0 ) { + + /* found !DOCTYPE element , skip it */ + p += 8; + if (strstr(p, ">") == NULL) + return read_error(HERE, "Unterminated !DOCTYPE element"); + + j = 0; + while (*p && (*p != '>' || j > 0)) { + if (*p == '\n') + line_number++; + else if (*p == '<') + j++; + else if (*p == '>') + j--; + p++; + } + if (!*p) + return read_error(HERE, "Unexpected end of file"); + + p++; + + } else { + + /* found normal element */ + if (*p == '/') { + end_element = TRUE; + p++; + while (*p && isspace((unsigned char)*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) + return read_error(HERE, "Unexpected end of file"); + } + + /* extract node name */ + i = 0; + node_name[i] = 0; + while (*p && !isspace((unsigned char)*p) && *p != '/' && *p != '>' && *p != '<') + node_name[i++] = *p++; + node_name[i] = 0; + if (!*p) + return read_error(HERE, "Unexpected end of file"); + if (*p == '<') + return read_error(HERE, "Unexpected \'<\' inside element \"%s\"", node_name); + + mxml_decode(node_name); + + if (end_element) { + + if (!ptree) + return read_error(HERE, "Found unexpected ", node_name); + + /* close previously opened element */ + if (strcmp(ptree->name, node_name) != 0) + return read_error(HERE, "Found , expected ", node_name, ptree->name); + ptree->line_number_end = line_number; + + /* go up one level on the tree */ + ptree = ptree->parent; + + } else { + + if (ptree == NULL) + return read_error(HERE, "Unexpected second top level node"); + + /* allocate new element structure in parent tree */ + pnew = mxml_add_node(ptree, node_name, NULL); + pnew->line_number_start = line_number; + pnew->line_number_end = line_number; + + while (*p && isspace((unsigned char)*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) + return read_error(HERE, "Unexpected end of file"); + + while (*p != '>' && *p != '/') { + + /* found attribute */ + pv = p; + while (*pv && !isspace((unsigned char)*pv) && *pv != '=' && *pv != '<' && *pv != '>') + pv++; + if (!*pv) + return read_error(HERE, "Unexpected end of file"); + if (*pv == '<' || *pv == '>') + return read_error(HERE, "Unexpected \'%c\' inside element \"%s\"", *pv, node_name); + + /* extract attribute name */ + len = (size_t)pv - (size_t)p; + if (len > sizeof(attrib_name)-1) + len = sizeof(attrib_name)-1; + memcpy(attrib_name, p, len); + attrib_name[len] = 0; + mxml_decode(attrib_name); + + p = pv; + while (*p && isspace((unsigned char)*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) + return read_error(HERE, "Unexpected end of file"); + if (*p != '=') + return read_error(HERE, "Expect \"=\" here"); + + p++; + while (*p && isspace((unsigned char)*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) + return read_error(HERE, "Unexpected end of file"); + if (*p != '\"' && *p != '\'') + return read_error(HERE, "Expect \" or \' here"); + quote = *p; + p++; + + /* extract attribute value */ + pv = p; + while (*pv && *pv != quote) + pv++; + if (!*pv) + return read_error(HERE, "Unexpected end of file"); + + len = (size_t)pv - (size_t)p; + if (len > sizeof(attrib_value)-1) + len = sizeof(attrib_value)-1; + memcpy(attrib_value, p, len); + attrib_value[len] = 0; + mxml_decode(attrib_value); + + /* add attribute to current node */ + mxml_add_attribute(pnew, attrib_name, attrib_value); + + p = pv+1; + while (*p && isspace((unsigned char)*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) + return read_error(HERE, "Unexpected end of file"); + } + + if (*p == '/') { + + /* found empty node, like , just skip closing bracket */ + p++; + + while (*p && isspace((unsigned char)*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) + return read_error(HERE, "Unexpected end of file"); + if (*p != '>') + return read_error(HERE, "Expected \">\" after \"/\""); + p++; + } + + if (*p == '>') { + + p++; + + /* check if we have sub-element or value */ + pv = p; + while (*pv && isspace((unsigned char)*pv)) { + if (*pv == '\n') + line_number++; + pv++; + } + if (!*pv) + return read_error(HERE, "Unexpected end of file"); + + if (*pv == '<' && *(pv+1) != '/') { + + /* start new subtree */ + ptree = pnew; + p = pv; + + } else { + + /* extract value */ + while (*pv && *pv != '<') { + if (*pv == '\n') + line_number++; + pv++; + } + if (!*pv) + return read_error(HERE, "Unexpected end of file"); + + len = (size_t)pv - (size_t)p; + pnew->value = (char *)mxml_malloc(len+1); + memcpy(pnew->value, p, len); + pnew->value[len] = 0; + mxml_decode(pnew->value); + p = pv; + + ptree = pnew; + } + } + } + } + } + + /* go to next element */ + while (*p && *p != '<') { + if (*p == '\n') + line_number++; + p++; + } + } while (*p); + + return root; +} + +/*------------------------------------------------------------------*/ + +/** + * parse !ENTYTY entries of XML files and replace with references. + * Return 0 in case of no errors, return error description. + * Optional file_name is used for error reporting if called from mxml_parse_file() + */ +int mxml_parse_entity(char **buf, const char *file_name, char *error, int error_size, int *error_line) +{ + char *p; + char *pv; + char delimiter; + int i, j, k, line_number, status; + char *replacement; + char entity_name[MXML_MAX_ENTITY][256]; + char entity_reference_name[MXML_MAX_ENTITY][256]; + char *entity_value[MXML_MAX_ENTITY]; + int entity_type[MXML_MAX_ENTITY]; /* internal or external */ + int entity_line_number[MXML_MAX_ENTITY]; + int nentity; + int fh, length, len; + char *buffer; + int ip; /* counter for entity value */ + char directoryname[FILENAME_MAX]; + char filename[FILENAME_MAX]; + int entity_value_length[MXML_MAX_ENTITY]; + int entity_name_length[MXML_MAX_ENTITY]; + + PMXML_NODE root = mxml_create_root_node(); /* dummy for 'HERE' */ + + for (ip = 0; ip < MXML_MAX_ENTITY; ip++) + entity_value[ip] = NULL; + + line_number = 1; + nentity = -1; + status = 0; + + if (!buf || !(*buf) || !strlen(*buf)) + return 0; + + strcpy(directoryname, file_name); + mxml_dirname(directoryname); + + /* copy string to temporary space */ + buffer = (char *) mxml_malloc(strlen(*buf) + 1); + if (buffer == NULL) { + read_error(HERE, "Cannot allocate memory."); + status = 1; + goto error; + } + strcpy(buffer, *buf); + + p = strstr(buffer, "!DOCTYPE"); + if (p == NULL) { /* no entities */ + status = 0; + goto error; + } + + pv = strstr(p, "["); + if (pv == NULL) { /* no entities */ + status = 1; + goto error; + } + + p = pv + 1; + + /* search !ENTITY */ + do { + if (*p == ']') + break; + + if (*p == '<') { + + /* found new entity */ + p++; + while (*p && isspace((unsigned char)*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) { + read_error(HERE, "Unexpected end of file"); + status = 1; + goto error; + } + + if (strncmp(p, "!--", 3) == 0) { + /* found comment */ + p += 3; + if (strstr(p, "-->") == NULL) { + read_error(HERE, "Unterminated comment"); + status = 1; + goto error; + } + + while (strncmp(p, "-->", 3) != 0) { + if (*p == '\n') + line_number++; + p++; + } + p += 3; + } + + else if (strncmp(p, "!ENTITY", 7) == 0) { + /* found entity */ + nentity++; + if (nentity >= MXML_MAX_ENTITY) { + read_error(HERE, "Too much entities"); + status = 1; + goto error; + } + + entity_line_number[nentity] = line_number; + + pv = p + 7; + while (*pv == ' ') + pv++; + + /* extract entity name */ + p = pv; + + while (*p && isspace((unsigned char)*p) && *p != '<' && *p != '>') { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) { + read_error(HERE, "Unexpected end of file"); + status = 1; + goto error; + } + if (*p == '<' || *p == '>') { + read_error(HERE, "Unexpected \'%c\' inside !ENTITY", *p); + status = 1; + goto error; + } + + pv = p; + while (*pv && !isspace((unsigned char)*pv) && *pv != '<' && *pv != '>') + pv++; + + if (!*pv) { + read_error(HERE, "Unexpected end of file"); + status = 1; + goto error; + } + if (*pv == '<' || *pv == '>') { + read_error(HERE, "Unexpected \'%c\' inside entity \"%s\"", *pv, &entity_name[nentity][1]); + status = 1; + goto error; + } + + entity_name[nentity][0] = '&'; + i = 1; + entity_name[nentity][i] = 0; + while (*p && !isspace((unsigned char)*p) && *p != '/' && *p != '>' && *p != '<' && i < 253) + entity_name[nentity][i++] = *p++; + entity_name[nentity][i++] = ';'; + entity_name[nentity][i] = 0; + + if (!*p) { + read_error(HERE, "Unexpected end of file"); + status = 1; + goto error; + } + if (*p == '<') { + read_error(HERE, "Unexpected \'<\' inside entity \"%s\"", &entity_name[nentity][1]); + status = 1; + goto error; + } + + /* extract replacement or SYSTEM */ + while (*p && isspace((unsigned char)*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) { + read_error(HERE, "Unexpected end of file"); + status = 1; + goto error; + } + if (*p == '>') { + read_error(HERE, "Unexpected \'>\' inside entity \"%s\"", &entity_name[nentity][1]); + status = 1; + goto error; + } + + /* check if SYSTEM */ + if (strncmp(p, "SYSTEM", 6) == 0) { + entity_type[nentity] = EXTERNAL_ENTITY; + p += 6; + } else { + entity_type[nentity] = INTERNAL_ENTITY; + } + + /* extract replacement */ + while (*p && isspace((unsigned char)*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) { + read_error(HERE, "Unexpected end of file"); + status = 1; + goto error; + } + if (*p == '>') { + read_error(HERE, "Unexpected \'>\' inside entity \"%s\"", &entity_name[nentity][1]); + status = 1; + goto error; + } + + if (*p != '\"' && *p != '\'') { + read_error(HERE, "Replacement was not found for entity \"%s\"", &entity_name[nentity][1]); + status = 1; + goto error; + } + delimiter = *p; + p++; + if (!*p) { + read_error(HERE, "Unexpected end of file"); + status = 1; + goto error; + } + pv = p; + while (*pv && *pv != delimiter) + pv++; + + if (!*pv) { + read_error(HERE, "Unexpected end of file"); + status = 1; + goto error; + } + if (*pv == '<') { + read_error(HERE, "Unexpected \'%c\' inside entity \"%s\"", *pv, &entity_name[nentity][1]); + status = 1; + goto error; + } + + len = (int)((size_t) pv - (size_t) p); + replacement = (char *) mxml_malloc(len + 1); + if (replacement == NULL) { + read_error(HERE, "Cannot allocate memory."); + status = 1; + goto error; + } + + memcpy(replacement, p, len); + replacement[len] = 0; + mxml_decode(replacement); + + if (entity_type[nentity] == EXTERNAL_ENTITY) { + strcpy(entity_reference_name[nentity], replacement); + } else { + entity_value[nentity] = (char *) mxml_malloc(strlen(replacement)); + if (entity_value[nentity] == NULL) { + read_error(HERE, "Cannot allocate memory."); + status = 1; + goto error; + } + strcpy(entity_value[nentity], replacement); + } + mxml_free(replacement); + + p = pv; + while (*p && isspace((unsigned char)*p)) { + if (*p == '\n') + line_number++; + p++; + } + if (!*p) { + read_error(HERE, "Unexpected end of file"); + status = 1; + goto error; + } + } + } + + /* go to next element */ + while (*p && *p != '<') { + if (*p == '\n') + line_number++; + p++; + } + } while (*p); + nentity++; + + /* read external file */ + for (i = 0; i < nentity; i++) { + if (entity_type[i] == EXTERNAL_ENTITY) { + if ( entity_reference_name[i][0] == DIR_SEPARATOR ) /* absolute path */ + strcpy(filename, entity_reference_name[i]); + else /* relative path */ + sprintf(filename, "%s%c%s", directoryname, DIR_SEPARATOR, entity_reference_name[i]); + fh = open(filename, O_RDONLY | O_TEXT, 0644); + + if (fh == -1) { + line_number = entity_line_number[i]; + read_error(HERE, "%s is missing", entity_reference_name[i]); + status = 1; + goto error; + } else { + length = (int)lseek(fh, 0, SEEK_END); + lseek(fh, 0, SEEK_SET); + if (length == 0) { + entity_value[i] = (char *) mxml_malloc(1); + if (entity_value[i] == NULL) { + read_error(HERE, "Cannot allocate memory."); + close(fh); + status = 1; + goto error; + } + entity_value[i][0] = 0; + } else { + entity_value[i] = (char *) mxml_malloc(length); + if (entity_value[i] == NULL) { + read_error(HERE, "Cannot allocate memory."); + close(fh); + status = 1; + goto error; + } + + /* read complete file at once */ + length = (int)read(fh, entity_value[i], length); + entity_value[i][length - 1] = 0; + close(fh); + + /* recursive parse */ + if (mxml_parse_entity(&entity_value[i], filename, error, error_size, error_line) != 0) { + status = 1; + goto error; + } + } + } + } + } + + /* count length of output string */ + length = (int)strlen(buffer); + for (i = 0; i < nentity; i++) { + p = buffer; + entity_value_length[i] = (int)strlen(entity_value[i]); + entity_name_length[i] = (int)strlen(entity_name[i]); + while (1) { + pv = strstr(p, entity_name[i]); + if (pv) { + length += entity_value_length[i] - entity_name_length[i]; + p = pv + 1; + } else { + break; + } + } + } + + /* re-allocate memory */ + *buf = (char *) mxml_realloc(*buf, length + 1); + if (*buf == NULL) { + read_error(HERE, "Cannot allocate memory."); + status = 1; + goto error; + } + + /* replace entities */ + p = buffer; + pv = *buf; + do { + if (*p == '&') { + /* found entity */ + for (j = 0; j < nentity; j++) { + if (strncmp(p, entity_name[j], entity_name_length[j]) == 0) { + for (k = 0; k < (int) entity_value_length[j]; k++) + *pv++ = entity_value[j][k]; + p += entity_name_length[j]; + break; + } + } + } + *pv++ = *p++; + } while (*p); + *pv = 0; + +error: + + if (buffer != NULL) + mxml_free(buffer); + for (ip = 0; ip < MXML_MAX_ENTITY; ip++) + if (entity_value[ip] != NULL) + mxml_free(entity_value[ip]); + + return status; +} + +/*------------------------------------------------------------------*/ + +/** + * parse a XML file and convert it into a tree of MXML_NODE's. + * Return NULL in case of an error, return error description + */ +PMXML_NODE mxml_parse_file(const char *file_name, char *error, int error_size, int *error_line) +{ + char *buf, line[1000]; + int fh, length; + PMXML_NODE root; + + if (error) + error[0] = 0; + + fh = open(file_name, O_RDONLY | O_TEXT, 0644); + + if (fh == -1) { + sprintf(line, "Unable to open file \"%s\": ", file_name); + strlcat(line, strerror(errno), sizeof(line)); + strlcpy(error, line, error_size); + return NULL; + } + + length = (int)lseek(fh, 0, SEEK_END); + lseek(fh, 0, SEEK_SET); + buf = (char *)mxml_malloc(length+1); + if (buf == NULL) { + close(fh); + sprintf(line, "Cannot allocate buffer: "); + strlcat(line, strerror(errno), sizeof(line)); + strlcpy(error, line, error_size); + return NULL; + } + + /* read complete file at once */ + length = (int)read(fh, buf, length); + buf[length] = 0; + close(fh); + + if (mxml_parse_entity(&buf, file_name, error, error_size, error_line) != 0) { + mxml_free(buf); + return NULL; + } + + root = mxml_parse_buffer(buf, error, error_size, error_line); + + mxml_free(buf); + + return root; +} + +/*------------------------------------------------------------------*/ + +/** + * write complete subtree recursively into file opened with mxml_open_document() + */ +int mxml_write_subtree(MXML_WRITER *writer, PMXML_NODE tree, int indent) +{ + int i; + + mxml_start_element1(writer, tree->name, indent); + for (i=0 ; in_attributes ; i++) + if (!mxml_write_attribute(writer, tree->attribute_name+i*MXML_NAME_LENGTH, tree->attribute_value[i])) + return FALSE; + + if (tree->value) + if (!mxml_write_value(writer, tree->value)) + return FALSE; + + for (i=0 ; in_children ; i++) + if (!mxml_write_subtree(writer, &tree->child[i], (tree->value == NULL) || i > 0)) + return FALSE; + + return mxml_end_element(writer); +} + +/*------------------------------------------------------------------*/ + +/** + * write a complete XML tree to a file + */ +int mxml_write_tree(const char *file_name, PMXML_NODE tree) +{ + MXML_WRITER *writer; + int i; + + assert(tree); + writer = mxml_open_file(file_name); + if (!writer) + return FALSE; + + for (i=0 ; in_children ; i++) + if (tree->child[i].node_type == ELEMENT_NODE) /* skip PI and comments */ + if (!mxml_write_subtree(writer, &tree->child[i], TRUE)) + return FALSE; + + if (!mxml_close_file(writer)) + return FALSE; + + return TRUE; +} + +/*------------------------------------------------------------------*/ + +PMXML_NODE mxml_clone_tree(PMXML_NODE tree) +{ + PMXML_NODE clone; + int i; + + clone = (PMXML_NODE)calloc(sizeof(MXML_NODE), 1); + + /* copy name, node_type, n_attributes and n_children */ + memcpy(clone, tree, sizeof(MXML_NODE)); + + clone->value = NULL; + mxml_replace_node_value(clone, tree->value); + + clone->attribute_name = NULL; + clone->attribute_value = NULL; + for (i=0 ; in_attributes ; i++) + mxml_add_attribute(clone, tree->attribute_name+i*MXML_NAME_LENGTH, tree->attribute_value[i]); + + clone->child = NULL; + clone->n_children = 0; + for (i=0 ; in_children ; i++) + mxml_add_tree(clone, mxml_clone_tree(mxml_subnode(tree, i))); + + return clone; +} + +/*------------------------------------------------------------------*/ + +/** + * print XML tree for debugging + */ +void mxml_debug_tree(PMXML_NODE tree, int level) +{ + int i, j; + + for (i=0 ; iname); + for (i=0 ; ivalue); + for (i=0 ; inode_type); + for (i=0 ; iline_number_start); + for (i=0 ; iline_number_end); + + for (j=0 ; jn_attributes ; j++) { + for (i=0 ; iattribute_name+j*MXML_NAME_LENGTH, + tree->attribute_value[j]); + } + + for (i=0 ; iparent); + for (i=0 ; in_children); + + for (i=0 ; in_children ; i++) + mxml_debug_tree(tree->child+i, level+1); + + if (level == 0) + printf("\n"); +} + +/*------------------------------------------------------------------*/ + +/** + * free memory of XML tree, must be called after any + * mxml_create_root_node() or mxml_parse_file() + */ +void mxml_free_tree(PMXML_NODE tree) +{ + int i; + + /* first free children recursively */ + for (i=0 ; in_children ; i++) + mxml_free_tree(&tree->child[i]); + if (tree->n_children) + mxml_free(tree->child); + + /* now free dynamic data */ + for (i=0 ; in_attributes ; i++) + mxml_free(tree->attribute_value[i]); + + if (tree->n_attributes) { + mxml_free(tree->attribute_name); + mxml_free(tree->attribute_value); + } + + if (tree->value) + mxml_free(tree->value); + + /* if we are the root node, free it */ + if (tree->parent == NULL) + mxml_free(tree); +} + +/*------------------------------------------------------------------*/ + +/* +void mxml_test() +{ + char err[256]; + PMXML_NODE tree, tree2, node; + + tree = mxml_parse_file("c:\\tmp\\test.xml", err, sizeof(err)); + tree2 = mxml_clone_tree(tree); + + printf("Orig:\n"); + mxml_debug_tree(tree, 0); + + printf("\nClone:\n"); + mxml_debug_tree(tree2, 0); + + printf("\nCombined:\n"); + node = mxml_find_node(tree2, "cddb"); + mxml_add_tree(tree, node); + mxml_debug_tree(tree, 0); + + mxml_free_tree(tree); +} +*/ + +/*------------------------------------------------------------------*/ + /** + mxml_basename deletes any prefix ending with the last slash '/' character + present in path. mxml_dirname deletes the filename portion, beginning with + the last slash '/' character to the end of path. Followings are examples + from these functions + + path dirname basename + "/" "/" "" + "." "." "." + "" "" "" + "/test.txt" "/" "test.txt" + "path/to/test.txt" "path/to" "test.txt" + "test.txt "." "test.txt" + + Under Windows, '\\' and ':' are recognized ad separator too. + */ + +void mxml_basename(char *path) +{ + char str[FILENAME_MAX]; + char *p; + char *name; + + if (path) { + strcpy(str, path); + p = str; + name = str; + while (1) { + if (*p == 0) + break; + if (*p == '/' +#ifdef _MSC_VER + || *p == ':' || *p == '\\' +#endif + ) + name = p + 1; + p++; + } + strcpy(path, name); + } + + return; +} + +void mxml_dirname(char *path) +{ + char *p; +#ifdef _MSC_VER + char *pv; +#endif + + if (!path || strlen(path) == 0) + return; + + p = strrchr(path, '/'); +#ifdef _MSC_VER + pv = strrchr(path, ':'); + if (pv > p) + p = pv; + pv = strrchr(path, '\\'); + if (pv > p) + p = pv; +#endif + + if (p == 0) /* current directory */ + strcpy(path, "."); + else if (p == path) /* root directory */ + sprintf(path, "%c", *p); + else + *p = 0; + + return; +} + +/*------------------------------------------------------------------*/ + +/** + * Retieve node at a certain line number + */ +PMXML_NODE mxml_get_node_at_line(PMXML_NODE tree, int line_number) +{ + int i; + PMXML_NODE pn; + + if (tree->line_number_start == line_number) + return tree; + + for (i=0 ; in_children ; i++) { + pn = mxml_get_node_at_line(&tree->child[i], line_number); + if (pn) + return pn; + } + + return NULL; +} + diff --git a/software/src/strlcpy.c b/software/src/strlcpy.c new file mode 100644 index 0000000..586c2bc --- /dev/null +++ b/software/src/strlcpy.c @@ -0,0 +1,101 @@ +/********************************************************************\ + + Name: strlcpy.c + Created by: Stefan Ritt + Copyright 2000 + Stefan Ritt + + Contents: Contains strlcpy and strlcat which are versions of + strcpy and strcat, but which avoid buffer overflows + + + This file is part of MIDAS XML Library. + + MIDAS XML Library is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + MIDAS XML Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with MIDAS XML Library. If not, see . + +\********************************************************************/ + +#include +#include +#include "strlcpy.h" + +/* +* Copy src to string dst of size siz. At most siz-1 characters +* will be copied. Always NUL terminates (unless size == 0). +* Returns strlen(src); if retval >= siz, truncation occurred. +*/ +#ifndef STRLCPY_DEFINED + +size_t strlcpy(char *dst, const char *src, size_t size) +{ + char *d = dst; + const char *s = src; + size_t n = size; + + /* Copy as many bytes as will fit */ + if (n != 0 && --n != 0) { + do { + if ((*d++ = *s++) == 0) + break; + } while (--n != 0); + } + + /* Not enough room in dst, add NUL and traverse rest of src */ + if (n == 0) { + if (size != 0) + *d = '\0'; /* NUL-terminate dst */ + while (*s++); + } + + return (s - src - 1); /* count does not include NUL */ +} + +/*-------------------------------------------------------------------*/ + +/* +* Appends src to string dst of size siz (unlike strncat, siz is the +* full size of dst, not space left). At most siz-1 characters +* will be copied. Always NUL terminates (unless size <= strlen(dst)). +* Returns strlen(src) + MIN(size, strlen(initial dst)). +* If retval >= size, truncation occurred. +*/ +size_t strlcat(char *dst, const char *src, size_t size) +{ + char *d = dst; + const char *s = src; + size_t n = size; + size_t dlen; + + /* Find the end of dst and adjust bytes left but don't go past end */ + while (n-- != 0 && *d != '\0') + d++; + dlen = d - dst; + n = size - dlen; + + if (n == 0) + return (dlen + strlen(s)); + while (*s != '\0') { + if (n != 1) { + *d++ = *s; + n--; + } + s++; + } + *d = '\0'; + + return (dlen + (s - src)); /* count does not include NUL */ +} + +/*-------------------------------------------------------------------*/ + +#endif // STRLCPY_DEFINED