From: Michalis Pappas Date: Thu, 26 Apr 2018 16:10:13 +0000 (+0300) Subject: Add tests for atsha204a X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1fddbced44d10533e1c15eb237822181084c0a3b;p=sigrok-test.git Add tests for atsha204a --- diff --git a/decoder/test/atsha204a/atsha204a_snippet.output b/decoder/test/atsha204a/atsha204a_snippet.output new file mode 100644 index 0000000..9a96e78 --- /dev/null +++ b/decoder/test/atsha204a/atsha204a_snippet.output @@ -0,0 +1,202 @@ +1562-1642 atsha204a: waddr: "Word addr: RESET" +2821-2901 atsha204a: count: "Count: 4" +2911-2991 atsha204a: data: "Data: 11" +3001-3171 atsha204a: crc: "CRC: 33 43" +2821-3171 atsha204a: status: "Status: Ready" +3557-3637 atsha204a: waddr: "Word addr: COMMAND" +3647-3727 atsha204a: count: "Count: 7" +3737-3817 atsha204a: opcode: "Opcode: Random" +3827-3907 atsha204a: param1: "Mode: 00" +3917-4087 atsha204a: param2: "Zero: 00 00" +4097-4267 atsha204a: crc: "CRC: 24 CD" +54732-54812 atsha204a: count: "Count: 35" +54822-57692 atsha204a: data: "Data: da bc 99 5f 77 d8 28 aa 05 a5 ba 45 ab f4 f2 79 03 ef 2a 5d 3a c7 88 c1 56 42 b4 d9 49 77 fa 44" +57702-57872 atsha204a: crc: "CRC: 05 C0" +58478-58558 atsha204a: waddr: "Word addr: COMMAND" +58568-58648 atsha204a: count: "Count: 7" +58658-58738 atsha204a: opcode: "Opcode: DevRev" +58748-58828 atsha204a: param1: "Mode: 00" +58838-59008 atsha204a: param2: "-" +59018-59188 atsha204a: crc: "CRC: 03 5D" +61572-61652 atsha204a: count: "Count: 7" +61662-62012 atsha204a: data: "Data: 00 02 00 09" +62022-62192 atsha204a: crc: "CRC: 60 2B" +62691-62771 atsha204a: waddr: "Word addr: COMMAND" +62781-62861 atsha204a: count: "Count: 27" +62871-62951 atsha204a: opcode: "Opcode: Nonce" +62961-63041 atsha204a: param1: "Mode: 00" +63051-63221 atsha204a: param2: "Zero: 00 00" +63231-65021 atsha204a: data: "Data: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13" +65031-65201 atsha204a: crc: "CRC: 53 B5" +125605-125685 atsha204a: count: "Count: 35" +125695-128565 atsha204a: data: "Data: 12 a7 0b b0 8b d7 d9 ec b2 14 65 40 6f de e6 6e 69 fc 72 fb 93 0b 90 b5 48 24 60 30 77 3a 02 bd" +128575-128745 atsha204a: crc: "CRC: 60 C2" +129053-129133 atsha204a: waddr: "Word addr: COMMAND" +129143-129223 atsha204a: count: "Count: 39" +129233-129313 atsha204a: opcode: "Opcode: Nonce" +129323-129403 atsha204a: param1: "Mode: 03" +129413-129583 atsha204a: param2: "Zero: 00 00" +129593-132463 atsha204a: data: "Data: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff" +132473-132643 atsha204a: crc: "CRC: 0F B6" +195205-195285 atsha204a: count: "Count: 4" +195295-195375 atsha204a: data: "Data: 00" +195385-195555 atsha204a: crc: "CRC: 03 40" +195205-195555 atsha204a: status: "Status: Command success" +196197-196277 atsha204a: waddr: "Word addr: COMMAND" +196287-196367 atsha204a: count: "Count: 39" +196377-196457 atsha204a: opcode: "Opcode: Nonce" +196467-196547 atsha204a: param1: "Mode: 03" +196557-196727 atsha204a: param2: "Zero: 00 00" +196737-199607 atsha204a: data: "Data: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff" +199617-199787 atsha204a: crc: "CRC: 0F B6" +260194-260274 atsha204a: count: "Count: 4" +260284-260364 atsha204a: data: "Data: 00" +260374-260544 atsha204a: crc: "CRC: 03 40" +260194-260544 atsha204a: status: "Status: Command success" +260783-260863 atsha204a: waddr: "Word addr: COMMAND" +260873-260953 atsha204a: count: "Count: 7" +260963-261043 atsha204a: opcode: "Opcode: GenDig" +261053-261133 atsha204a: param1: "Zone: DATA" +261143-261313 atsha204a: param2: "SlotID: 00 03" +261323-261493 atsha204a: crc: "CRC: 3F 08" +304883-304963 atsha204a: count: "Count: 4" +304973-305053 atsha204a: data: "Data: 0f" +305063-305233 atsha204a: crc: "CRC: 23 42" +304883-305233 atsha204a: status: "Status: Execution error" +305750-305830 atsha204a: waddr: "Word addr: COMMAND" +305840-305920 atsha204a: count: "Count: 39" +305930-306010 atsha204a: opcode: "Opcode: Nonce" +306020-306100 atsha204a: param1: "Mode: 03" +306110-306280 atsha204a: param2: "Zero: 00 00" +306290-309160 atsha204a: data: "Data: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff" +309170-309340 atsha204a: crc: "CRC: 0F B6" +369742-369822 atsha204a: count: "Count: 4" +369832-369912 atsha204a: data: "Data: 00" +369922-370092 atsha204a: crc: "CRC: 03 40" +369742-370092 atsha204a: status: "Status: Command success" +370343-370423 atsha204a: waddr: "Word addr: COMMAND" +370433-370513 atsha204a: count: "Count: 7" +370523-370603 atsha204a: opcode: "Opcode: HMAC" +370613-370693 atsha204a: param1: "Mode: 04" +370703-370873 atsha204a: param2: "SlotID: 00 00" +370883-371053 atsha204a: crc: "CRC: BC 8F" +440443-440523 atsha204a: count: "Count: 35" +440533-443403 atsha204a: data: "Data: c5 bc b0 d0 68 8f 49 c0 ac 5e 50 bf 89 7d 2d 33 3f 7c e9 06 a7 8a ce 0e 31 83 40 d9 fa 47 dd 71" +443413-443583 atsha204a: crc: "CRC: 77 FC" +444169-444249 atsha204a: waddr: "Word addr: COMMAND" +444259-444339 atsha204a: count: "Count: 39" +444349-444429 atsha204a: opcode: "Opcode: Nonce" +444439-444519 atsha204a: param1: "Mode: 03" +444529-444699 atsha204a: param2: "Zero: 00 00" +444709-447579 atsha204a: data: "Data: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff" +447589-447759 atsha204a: crc: "CRC: 0F B6" +508152-508232 atsha204a: count: "Count: 4" +508242-508322 atsha204a: data: "Data: 00" +508332-508502 atsha204a: crc: "CRC: 03 40" +508152-508502 atsha204a: status: "Status: Command success" +508780-508860 atsha204a: waddr: "Word addr: COMMAND" +508870-508950 atsha204a: count: "Count: 39" +508960-509040 atsha204a: opcode: "Opcode: MAC" +509050-509130 atsha204a: param1: "Mode: 06" +509140-509310 atsha204a: param2: "SlotID: 00 00" +509320-512190 atsha204a: data: "Challenge: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff" +512200-512370 atsha204a: crc: "CRC: 73 EE" +547753-547833 atsha204a: count: "Count: 35" +547843-550713 atsha204a: data: "Data: c2 e6 6a 0b e7 c5 8f f9 c3 93 f5 f5 e4 37 60 48 76 00 6c f4 e0 f9 97 97 45 85 ef fd 20 fe 27 57" +550723-550893 atsha204a: crc: "CRC: C2 1C" +551480-551560 atsha204a: waddr: "Word addr: COMMAND" +551570-551650 atsha204a: count: "Count: 39" +551660-551740 atsha204a: opcode: "Opcode: Nonce" +551750-551830 atsha204a: param1: "Mode: 03" +551840-552010 atsha204a: param2: "Zero: 00 00" +552020-554890 atsha204a: data: "Data: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff" +554900-555070 atsha204a: crc: "CRC: 0F B6" +615461-615541 atsha204a: count: "Count: 4" +615551-615631 atsha204a: data: "Data: 00" +615641-615811 atsha204a: crc: "CRC: 03 40" +615461-615811 atsha204a: status: "Status: Command success" +616086-616166 atsha204a: waddr: "Word addr: COMMAND" +616176-616256 atsha204a: count: "Count: 39" +616266-616346 atsha204a: opcode: "Opcode: MAC" +616356-616436 atsha204a: param1: "Mode: 06" +616446-616616 atsha204a: param2: "SlotID: 00 00" +616626-619496 atsha204a: data: "Challenge: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff" +619506-619676 atsha204a: crc: "CRC: 73 EE" +655057-655137 atsha204a: count: "Count: 35" +655147-658017 atsha204a: data: "Data: c2 e6 6a 0b e7 c5 8f f9 c3 93 f5 f5 e4 37 60 48 76 00 6c f4 e0 f9 97 97 45 85 ef fd 20 fe 27 57" +658027-658197 atsha204a: crc: "CRC: C2 1C" +658501-658581 atsha204a: waddr: "Word addr: COMMAND" +658591-658671 atsha204a: count: "Count: 39" +658681-658761 atsha204a: opcode: "Opcode: Nonce" +658771-658851 atsha204a: param1: "Mode: 03" +658861-659031 atsha204a: param2: "Zero: 00 00" +659041-661911 atsha204a: data: "Data: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff" +661921-662091 atsha204a: crc: "CRC: 0F B6" +722476-722556 atsha204a: count: "Count: 4" +722566-722646 atsha204a: data: "Data: 00" +722656-722826 atsha204a: crc: "CRC: 03 40" +722476-722826 atsha204a: status: "Status: Command success" +723168-723248 atsha204a: waddr: "Word addr: COMMAND" +723258-723338 atsha204a: count: "Count: 84" +723348-723428 atsha204a: opcode: "Opcode: CheckMac" +723438-723518 atsha204a: param1: "Mode: 06" +723528-723698 atsha204a: param2: "SlotID: 00 00" +723708-726578 atsha204a: data: "ClientChal: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee" +726588-729458 atsha204a: data: "ClientResp: c2 e6 6a 0b e7 c5 8f f9 c3 93 f5 f5 e4 37 60 48 76 00 6c f4 e0 f9 97 97 45 85 ef fd 20 fe 27" +729468-730628 atsha204a: data: "OtherData: 08 06 00 00 00 00 00 00 00 00 00 00" +730638-730808 atsha204a: crc: "CRC: 49 3C" +769249-769329 atsha204a: count: "Count: 4" +769339-769419 atsha204a: data: "Data: 00" +769429-769599 atsha204a: crc: "CRC: 03 40" +769249-769599 atsha204a: status: "Status: Command success" +770082-770162 atsha204a: waddr: "Word addr: COMMAND" +770172-770252 atsha204a: count: "Count: 7" +770262-770342 atsha204a: opcode: "Opcode: SHA" +770352-770432 atsha204a: param1: "Mode: 00" +770442-770612 atsha204a: param2: "-" +770622-770792 atsha204a: crc: "CRC: 2E 85" +793197-793277 atsha204a: count: "Count: 4" +793287-793367 atsha204a: data: "Data: 00" +793377-793547 atsha204a: crc: "CRC: 03 40" +793197-793547 atsha204a: status: "Status: Command success" +793876-793956 atsha204a: waddr: "Word addr: COMMAND" +793966-794046 atsha204a: count: "Count: 71" +794056-794136 atsha204a: opcode: "Opcode: SHA" +794146-794226 atsha204a: param1: "Mode: 01" +794236-794406 atsha204a: param2: "-" +794416-800166 atsha204a: data: "Data: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00" +800176-800346 atsha204a: crc: "CRC: 4F 81" +822739-822819 atsha204a: count: "Count: 35" +822829-825699 atsha204a: data: "Data: 47 73 d1 2e 23 71 bb 93 5b 9a 0f 54 39 b4 a1 c3 ad 3f 24 14 b8 69 80 f8 41 8d 1c fa bd fa df ef" +825709-825879 atsha204a: crc: "CRC: 11 A6" +826473-826553 atsha204a: waddr: "Word addr: COMMAND" +826563-826643 atsha204a: count: "Count: 39" +826653-826733 atsha204a: opcode: "Opcode: Nonce" +826743-826823 atsha204a: param1: "Mode: 03" +826833-827003 atsha204a: param2: "Zero: 00 00" +827013-829883 atsha204a: data: "Data: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff" +829893-830063 atsha204a: crc: "CRC: 0F B6" +890457-890537 atsha204a: count: "Count: 4" +890547-890627 atsha204a: data: "Data: 00" +890637-890807 atsha204a: crc: "CRC: 03 40" +890457-890807 atsha204a: status: "Status: Command success" +891042-891122 atsha204a: waddr: "Word addr: COMMAND" +891132-891212 atsha204a: count: "Count: 7" +891222-891302 atsha204a: opcode: "Opcode: DeriveKey" +891312-891392 atsha204a: param1: "Random: 4" +891402-891572 atsha204a: param2: "TargetKey: 00 04" +891582-891752 atsha204a: crc: "CRC: 8A 8F" +954188-954268 atsha204a: count: "Count: 4" +954278-954358 atsha204a: data: "Data: 00" +954368-954538 atsha204a: crc: "CRC: 03 40" +954188-954538 atsha204a: status: "Status: Command success" +955008-955088 atsha204a: waddr: "Word addr: COMMAND" +955098-955178 atsha204a: count: "Count: 7" +955188-955268 atsha204a: opcode: "Opcode: Pause" +955278-955358 atsha204a: param1: "Selector: 00" +955368-955538 atsha204a: param2: "Zero: 00 00" +955548-955718 atsha204a: crc: "CRC: 3C 2D" +958093-958173 atsha204a: count: "Count: 4" +958183-958263 atsha204a: data: "Data: 00" +958273-958443 atsha204a: crc: "CRC: 03 40" +958093-958443 atsha204a: status: "Status: Command success" diff --git a/decoder/test/atsha204a/test.conf b/decoder/test/atsha204a/test.conf new file mode 100644 index 0000000..7702271 --- /dev/null +++ b/decoder/test/atsha204a/test.conf @@ -0,0 +1,6 @@ +test atsha204a_snippet + protocol-decoder i2c channel sda=0 channel scl=1 + protocol-decoder atsha204a + stack i2c atsha204a + input i2c/crypto/microchip_atsha204a/atsha204a_snippet.sr + output atsha204a annotation match atsha204a_snippet.output