From: Gerhard Sittig Date: Wed, 12 Aug 2020 17:04:13 +0000 (+0200) Subject: sdq: introduce SDQ decoder test (bits, bytes, break) X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=427c8efea87baa1a3e94be5aafe6cb315ef26e57;p=sigrok-test.git sdq: introduce SDQ decoder test (bits, bytes, break) Add a simple test on a short snippet of the SDQ capture. This covers the extraction of bits and bytes, and the synchronization on BREAK symbols. --- diff --git a/decoder/test/sdq/iphone_se_snippet.output b/decoder/test/sdq/iphone_se_snippet.output new file mode 100644 index 0000000..6aec09b --- /dev/null +++ b/decoder/test/sdq/iphone_se_snippet.output @@ -0,0 +1,346 @@ +2001-2015 sdq: break: "Break" "BR" +2019-2029 sdq: bit: "Bit: 0" "0" +2030-2040 sdq: bit: "Bit: 1" "1" +2040-2050 sdq: bit: "Bit: 1" "1" +2050-2060 sdq: bit: "Bit: 0" "0" +2060-2070 sdq: bit: "Bit: 1" "1" +2070-2080 sdq: bit: "Bit: 1" "1" +2080-2090 sdq: bit: "Bit: 1" "1" +2090-2100 sdq: bit: "Bit: 0" "0" +2019-2100 sdq: byte: "Byte: 0x76" "0x76" +2113-2123 sdq: bit: "Bit: 0" "0" +2123-2133 sdq: bit: "Bit: 0" "0" +2134-2144 sdq: bit: "Bit: 0" "0" +2144-2154 sdq: bit: "Bit: 0" "0" +2154-2164 sdq: bit: "Bit: 1" "1" +2164-2174 sdq: bit: "Bit: 0" "0" +2174-2184 sdq: bit: "Bit: 0" "0" +2184-2194 sdq: bit: "Bit: 0" "0" +2113-2194 sdq: byte: "Byte: 0x10" "0x10" +2207-2221 sdq: break: "Break" "BR" +2244-2254 sdq: bit: "Bit: 1" "1" +2254-2264 sdq: bit: "Bit: 1" "1" +2264-2274 sdq: bit: "Bit: 1" "1" +2274-2284 sdq: bit: "Bit: 0" "0" +2284-2294 sdq: bit: "Bit: 1" "1" +2294-2304 sdq: bit: "Bit: 1" "1" +2304-2314 sdq: bit: "Bit: 1" "1" +2314-2324 sdq: bit: "Bit: 0" "0" +2244-2324 sdq: byte: "Byte: 0x77" "0x77" +2337-2347 sdq: bit: "Bit: 1" "1" +2347-2357 sdq: bit: "Bit: 0" "0" +2357-2367 sdq: bit: "Bit: 0" "0" +2367-2377 sdq: bit: "Bit: 0" "0" +2377-2387 sdq: bit: "Bit: 0" "0" +2387-2397 sdq: bit: "Bit: 0" "0" +2398-2408 sdq: bit: "Bit: 0" "0" +2408-2418 sdq: bit: "Bit: 0" "0" +2337-2418 sdq: byte: "Byte: 0x01" "0x01" +2430-2440 sdq: bit: "Bit: 1" "1" +2440-2450 sdq: bit: "Bit: 0" "0" +2450-2460 sdq: bit: "Bit: 1" "1" +2460-2470 sdq: bit: "Bit: 0" "0" +2470-2480 sdq: bit: "Bit: 0" "0" +2481-2491 sdq: bit: "Bit: 1" "1" +2491-2501 sdq: bit: "Bit: 0" "0" +2501-2511 sdq: bit: "Bit: 0" "0" +2430-2511 sdq: byte: "Byte: 0x25" "0x25" +2523-2533 sdq: bit: "Bit: 1" "1" +2533-2543 sdq: bit: "Bit: 0" "0" +2543-2553 sdq: bit: "Bit: 0" "0" +2554-2564 sdq: bit: "Bit: 0" "0" +2564-2574 sdq: bit: "Bit: 0" "0" +2574-2584 sdq: bit: "Bit: 0" "0" +2584-2594 sdq: bit: "Bit: 0" "0" +2594-2604 sdq: bit: "Bit: 0" "0" +2523-2604 sdq: byte: "Byte: 0x01" "0x01" +2616-2626 sdq: bit: "Bit: 0" "0" +2627-2637 sdq: bit: "Bit: 0" "0" +2637-2647 sdq: bit: "Bit: 0" "0" +2647-2657 sdq: bit: "Bit: 0" "0" +2657-2667 sdq: bit: "Bit: 0" "0" +2667-2677 sdq: bit: "Bit: 0" "0" +2677-2687 sdq: bit: "Bit: 0" "0" +2687-2697 sdq: bit: "Bit: 1" "1" +2616-2697 sdq: byte: "Byte: 0x80" "0x80" +2710-2720 sdq: bit: "Bit: 0" "0" +2720-2730 sdq: bit: "Bit: 1" "1" +2730-2740 sdq: bit: "Bit: 0" "0" +2740-2750 sdq: bit: "Bit: 1" "1" +2750-2760 sdq: bit: "Bit: 0" "0" +2760-2770 sdq: bit: "Bit: 0" "0" +2770-2780 sdq: bit: "Bit: 0" "0" +2781-2791 sdq: bit: "Bit: 1" "1" +2710-2791 sdq: byte: "Byte: 0x8a" "0x8a" +2803-2813 sdq: bit: "Bit: 1" "1" +2813-2823 sdq: bit: "Bit: 1" "1" +2823-2833 sdq: bit: "Bit: 0" "0" +2833-2843 sdq: bit: "Bit: 0" "0" +2843-2853 sdq: bit: "Bit: 1" "1" +2853-2863 sdq: bit: "Bit: 1" "1" +2864-2874 sdq: bit: "Bit: 1" "1" +2874-2884 sdq: bit: "Bit: 0" "0" +2803-2884 sdq: byte: "Byte: 0x73" "0x73" +2896-2906 sdq: bit: "Bit: 1" "1" +2906-2916 sdq: bit: "Bit: 1" "1" +2916-2926 sdq: bit: "Bit: 0" "0" +2926-2936 sdq: bit: "Bit: 0" "0" +2936-2946 sdq: bit: "Bit: 0" "0" +2947-2957 sdq: bit: "Bit: 1" "1" +2957-2967 sdq: bit: "Bit: 0" "0" +2967-2977 sdq: bit: "Bit: 0" "0" +2896-2977 sdq: byte: "Byte: 0x23" "0x23" +2989-2999 sdq: bit: "Bit: 1" "1" +2999-3009 sdq: bit: "Bit: 1" "1" +3009-3019 sdq: bit: "Bit: 0" "0" +3020-3030 sdq: bit: "Bit: 0" "0" +3030-3040 sdq: bit: "Bit: 1" "1" +3040-3050 sdq: bit: "Bit: 1" "1" +3050-3060 sdq: bit: "Bit: 1" "1" +3060-3070 sdq: bit: "Bit: 0" "0" +2989-3070 sdq: byte: "Byte: 0x73" "0x73" +3082-3092 sdq: bit: "Bit: 1" "1" +3092-3102 sdq: bit: "Bit: 1" "1" +3103-3113 sdq: bit: "Bit: 1" "1" +3113-3123 sdq: bit: "Bit: 1" "1" +3123-3133 sdq: bit: "Bit: 1" "1" +3133-3143 sdq: bit: "Bit: 0" "0" +3143-3153 sdq: bit: "Bit: 0" "0" +3153-3163 sdq: bit: "Bit: 1" "1" +3082-3163 sdq: byte: "Byte: 0x9f" "0x9f" +3175-3185 sdq: bit: "Bit: 0" "0" +3186-3196 sdq: bit: "Bit: 1" "1" +3196-3206 sdq: bit: "Bit: 1" "1" +3206-3216 sdq: bit: "Bit: 0" "0" +3216-3226 sdq: bit: "Bit: 1" "1" +3226-3236 sdq: bit: "Bit: 1" "1" +3236-3246 sdq: bit: "Bit: 0" "0" +3246-3256 sdq: bit: "Bit: 0" "0" +3175-3256 sdq: byte: "Byte: 0x36" "0x36" +3269-3279 sdq: bit: "Bit: 1" "1" +3279-3289 sdq: bit: "Bit: 0" "0" +3289-3299 sdq: bit: "Bit: 1" "1" +3299-3309 sdq: bit: "Bit: 0" "0" +3309-3319 sdq: bit: "Bit: 0" "0" +3319-3329 sdq: bit: "Bit: 1" "1" +3329-3339 sdq: bit: "Bit: 0" "0" +3340-3350 sdq: bit: "Bit: 1" "1" +3269-3350 sdq: byte: "Byte: 0xa5" "0xa5" +5203-5217 sdq: break: "Break" "BR" +5222-5232 sdq: bit: "Bit: 0" "0" +5232-5242 sdq: bit: "Bit: 0" "0" +5242-5252 sdq: bit: "Bit: 0" "0" +5252-5262 sdq: bit: "Bit: 1" "1" +5262-5272 sdq: bit: "Bit: 1" "1" +5272-5282 sdq: bit: "Bit: 1" "1" +5283-5293 sdq: bit: "Bit: 1" "1" +5293-5303 sdq: bit: "Bit: 0" "0" +5222-5303 sdq: byte: "Byte: 0x78" "0x78" +5315-5325 sdq: bit: "Bit: 1" "1" +5326-5336 sdq: bit: "Bit: 1" "1" +5336-5346 sdq: bit: "Bit: 1" "1" +5346-5356 sdq: bit: "Bit: 1" "1" +5356-5366 sdq: bit: "Bit: 0" "0" +5366-5376 sdq: bit: "Bit: 0" "0" +5376-5386 sdq: bit: "Bit: 0" "0" +5387-5397 sdq: bit: "Bit: 0" "0" +5315-5397 sdq: byte: "Byte: 0x0f" "0x0f" +5409-5423 sdq: break: "Break" "BR" +5446-5456 sdq: bit: "Bit: 1" "1" +5456-5466 sdq: bit: "Bit: 0" "0" +5466-5476 sdq: bit: "Bit: 0" "0" +5477-5487 sdq: bit: "Bit: 1" "1" +5487-5497 sdq: bit: "Bit: 1" "1" +5497-5507 sdq: bit: "Bit: 1" "1" +5507-5517 sdq: bit: "Bit: 1" "1" +5517-5527 sdq: bit: "Bit: 0" "0" +5446-5527 sdq: byte: "Byte: 0x79" "0x79" +5539-5549 sdq: bit: "Bit: 0" "0" +5550-5560 sdq: bit: "Bit: 0" "0" +5560-5570 sdq: bit: "Bit: 1" "1" +5570-5580 sdq: bit: "Bit: 0" "0" +5580-5590 sdq: bit: "Bit: 0" "0" +5590-5600 sdq: bit: "Bit: 0" "0" +5600-5610 sdq: bit: "Bit: 1" "1" +5610-5620 sdq: bit: "Bit: 0" "0" +5539-5620 sdq: byte: "Byte: 0x44" "0x44" +5633-5643 sdq: bit: "Bit: 1" "1" +5643-5653 sdq: bit: "Bit: 0" "0" +5653-5663 sdq: bit: "Bit: 0" "0" +5663-5673 sdq: bit: "Bit: 1" "1" +5673-5683 sdq: bit: "Bit: 1" "1" +5683-5693 sdq: bit: "Bit: 0" "0" +5693-5703 sdq: bit: "Bit: 1" "1" +5703-5713 sdq: bit: "Bit: 0" "0" +5633-5713 sdq: byte: "Byte: 0x59" "0x59" +5726-5736 sdq: bit: "Bit: 1" "1" +5736-5746 sdq: bit: "Bit: 1" "1" +5746-5756 sdq: bit: "Bit: 1" "1" +5756-5766 sdq: bit: "Bit: 0" "0" +5766-5776 sdq: bit: "Bit: 0" "0" +5776-5786 sdq: bit: "Bit: 0" "0" +5787-5797 sdq: bit: "Bit: 1" "1" +5797-5807 sdq: bit: "Bit: 0" "0" +5726-5807 sdq: byte: "Byte: 0x47" "0x47" +5819-5829 sdq: bit: "Bit: 0" "0" +5829-5839 sdq: bit: "Bit: 0" "0" +5839-5849 sdq: bit: "Bit: 0" "0" +5849-5859 sdq: bit: "Bit: 1" "1" +5859-5869 sdq: bit: "Bit: 1" "1" +5870-5880 sdq: bit: "Bit: 1" "1" +5880-5890 sdq: bit: "Bit: 0" "0" +5890-5900 sdq: bit: "Bit: 0" "0" +5819-5900 sdq: byte: "Byte: 0x38" "0x38" +5912-5922 sdq: bit: "Bit: 1" "1" +5922-5932 sdq: bit: "Bit: 0" "0" +5932-5942 sdq: bit: "Bit: 0" "0" +5943-5953 sdq: bit: "Bit: 0" "0" +5953-5963 sdq: bit: "Bit: 1" "1" +5963-5973 sdq: bit: "Bit: 1" "1" +5973-5983 sdq: bit: "Bit: 0" "0" +5983-5993 sdq: bit: "Bit: 0" "0" +5912-5993 sdq: byte: "Byte: 0x31" "0x31" +6005-6015 sdq: bit: "Bit: 1" "1" +6015-6025 sdq: bit: "Bit: 0" "0" +6026-6036 sdq: bit: "Bit: 0" "0" +6036-6046 sdq: bit: "Bit: 0" "0" +6046-6056 sdq: bit: "Bit: 1" "1" +6056-6066 sdq: bit: "Bit: 1" "1" +6066-6076 sdq: bit: "Bit: 0" "0" +6076-6086 sdq: bit: "Bit: 0" "0" +6005-6086 sdq: byte: "Byte: 0x31" "0x31" +6099-6109 sdq: bit: "Bit: 0" "0" +6109-6119 sdq: bit: "Bit: 0" "0" +6119-6129 sdq: bit: "Bit: 1" "1" +6129-6139 sdq: bit: "Bit: 0" "0" +6139-6149 sdq: bit: "Bit: 1" "1" +6149-6159 sdq: bit: "Bit: 1" "1" +6159-6169 sdq: bit: "Bit: 0" "0" +6169-6179 sdq: bit: "Bit: 0" "0" +6099-6179 sdq: byte: "Byte: 0x34" "0x34" +6192-6202 sdq: bit: "Bit: 1" "1" +6202-6212 sdq: bit: "Bit: 0" "0" +6212-6222 sdq: bit: "Bit: 0" "0" +6222-6232 sdq: bit: "Bit: 0" "0" +6232-6242 sdq: bit: "Bit: 1" "1" +6242-6252 sdq: bit: "Bit: 1" "1" +6253-6263 sdq: bit: "Bit: 0" "0" +6263-6273 sdq: bit: "Bit: 0" "0" +6192-6273 sdq: byte: "Byte: 0x31" "0x31" +6285-6295 sdq: bit: "Bit: 0" "0" +6295-6305 sdq: bit: "Bit: 0" "0" +6305-6315 sdq: bit: "Bit: 0" "0" +6315-6325 sdq: bit: "Bit: 0" "0" +6325-6335 sdq: bit: "Bit: 1" "1" +6336-6346 sdq: bit: "Bit: 1" "1" +6346-6356 sdq: bit: "Bit: 0" "0" +6356-6366 sdq: bit: "Bit: 0" "0" +6285-6366 sdq: byte: "Byte: 0x30" "0x30" +6378-6388 sdq: bit: "Bit: 0" "0" +6388-6398 sdq: bit: "Bit: 0" "0" +6398-6408 sdq: bit: "Bit: 0" "0" +6409-6419 sdq: bit: "Bit: 0" "0" +6419-6429 sdq: bit: "Bit: 1" "1" +6429-6439 sdq: bit: "Bit: 0" "0" +6439-6449 sdq: bit: "Bit: 1" "1" +6449-6459 sdq: bit: "Bit: 0" "0" +6378-6459 sdq: byte: "Byte: 0x50" "0x50" +6471-6481 sdq: bit: "Bit: 0" "0" +6481-6491 sdq: bit: "Bit: 0" "0" +6492-6502 sdq: bit: "Bit: 0" "0" +6502-6512 sdq: bit: "Bit: 1" "1" +6512-6522 sdq: bit: "Bit: 0" "0" +6522-6532 sdq: bit: "Bit: 0" "0" +6532-6542 sdq: bit: "Bit: 1" "1" +6542-6552 sdq: bit: "Bit: 0" "0" +6471-6552 sdq: byte: "Byte: 0x48" "0x48" +6565-6575 sdq: bit: "Bit: 0" "0" +6575-6585 sdq: bit: "Bit: 1" "1" +6585-6595 sdq: bit: "Bit: 1" "1" +6595-6605 sdq: bit: "Bit: 0" "0" +6605-6615 sdq: bit: "Bit: 0" "0" +6615-6625 sdq: bit: "Bit: 0" "0" +6625-6635 sdq: bit: "Bit: 1" "1" +6635-6645 sdq: bit: "Bit: 0" "0" +6565-6645 sdq: byte: "Byte: 0x46" "0x46" +6658-6668 sdq: bit: "Bit: 0" "0" +6668-6678 sdq: bit: "Bit: 1" "1" +6678-6688 sdq: bit: "Bit: 0" "0" +6688-6698 sdq: bit: "Bit: 1" "1" +6698-6708 sdq: bit: "Bit: 0" "0" +6708-6718 sdq: bit: "Bit: 0" "0" +6719-6729 sdq: bit: "Bit: 1" "1" +6729-6739 sdq: bit: "Bit: 0" "0" +6658-6739 sdq: byte: "Byte: 0x4a" "0x4a" +6751-6761 sdq: bit: "Bit: 1" "1" +6761-6771 sdq: bit: "Bit: 0" "0" +6771-6781 sdq: bit: "Bit: 0" "0" +6781-6791 sdq: bit: "Bit: 1" "1" +6791-6801 sdq: bit: "Bit: 1" "1" +6802-6812 sdq: bit: "Bit: 0" "0" +6812-6822 sdq: bit: "Bit: 1" "1" +6822-6832 sdq: bit: "Bit: 0" "0" +6751-6832 sdq: byte: "Byte: 0x59" "0x59" +6844-6854 sdq: bit: "Bit: 0" "0" +6854-6864 sdq: bit: "Bit: 0" "0" +6864-6874 sdq: bit: "Bit: 0" "0" +6875-6885 sdq: bit: "Bit: 1" "1" +6885-6895 sdq: bit: "Bit: 0" "0" +6895-6905 sdq: bit: "Bit: 0" "0" +6905-6915 sdq: bit: "Bit: 1" "1" +6915-6925 sdq: bit: "Bit: 0" "0" +6844-6925 sdq: byte: "Byte: 0x48" "0x48" +6937-6947 sdq: bit: "Bit: 1" "1" +6947-6957 sdq: bit: "Bit: 0" "0" +6958-6968 sdq: bit: "Bit: 0" "0" +6968-6978 sdq: bit: "Bit: 0" "0" +6978-6988 sdq: bit: "Bit: 0" "0" +6988-6998 sdq: bit: "Bit: 0" "0" +6998-7008 sdq: bit: "Bit: 1" "1" +7008-7018 sdq: bit: "Bit: 0" "0" +6937-7018 sdq: byte: "Byte: 0x41" "0x41" +7030-7040 sdq: bit: "Bit: 1" "1" +7041-7051 sdq: bit: "Bit: 0" "0" +7051-7061 sdq: bit: "Bit: 0" "0" +7061-7071 sdq: bit: "Bit: 0" "0" +7071-7081 sdq: bit: "Bit: 1" "1" +7081-7091 sdq: bit: "Bit: 0" "0" +7091-7101 sdq: bit: "Bit: 1" "1" +7101-7111 sdq: bit: "Bit: 0" "0" +7030-7111 sdq: byte: "Byte: 0x51" "0x51" +7124-7134 sdq: bit: "Bit: 0" "0" +7134-7144 sdq: bit: "Bit: 0" "0" +7144-7154 sdq: bit: "Bit: 0" "0" +7154-7164 sdq: bit: "Bit: 0" "0" +7164-7174 sdq: bit: "Bit: 0" "0" +7174-7184 sdq: bit: "Bit: 0" "0" +7184-7194 sdq: bit: "Bit: 0" "0" +7195-7205 sdq: bit: "Bit: 0" "0" +7124-7205 sdq: byte: "Byte: 0x00" "0x00" +7217-7227 sdq: bit: "Bit: 1" "1" +7227-7237 sdq: bit: "Bit: 1" "1" +7237-7247 sdq: bit: "Bit: 0" "0" +7247-7257 sdq: bit: "Bit: 0" "0" +7257-7267 sdq: bit: "Bit: 1" "1" +7268-7278 sdq: bit: "Bit: 0" "0" +7278-7288 sdq: bit: "Bit: 0" "0" +7288-7298 sdq: bit: "Bit: 1" "1" +7217-7298 sdq: byte: "Byte: 0x93" "0x93" +7310-7320 sdq: bit: "Bit: 0" "0" +7320-7330 sdq: bit: "Bit: 0" "0" +7330-7340 sdq: bit: "Bit: 0" "0" +7340-7350 sdq: bit: "Bit: 1" "1" +7351-7361 sdq: bit: "Bit: 0" "0" +7361-7371 sdq: bit: "Bit: 0" "0" +7371-7381 sdq: bit: "Bit: 0" "0" +7381-7391 sdq: bit: "Bit: 1" "1" +7310-7391 sdq: byte: "Byte: 0x88" "0x88" +7403-7413 sdq: bit: "Bit: 1" "1" +7413-7423 sdq: bit: "Bit: 0" "0" +7424-7434 sdq: bit: "Bit: 0" "0" +7434-7444 sdq: bit: "Bit: 0" "0" +7444-7454 sdq: bit: "Bit: 1" "1" +7454-7464 sdq: bit: "Bit: 0" "0" +7464-7474 sdq: bit: "Bit: 1" "1" +7474-7484 sdq: bit: "Bit: 0" "0" +7403-7484 sdq: byte: "Byte: 0x51" "0x51" diff --git a/decoder/test/sdq/test.conf b/decoder/test/sdq/test.conf new file mode 100644 index 0000000..fd003ef --- /dev/null +++ b/decoder/test/sdq/test.conf @@ -0,0 +1,4 @@ +test iphone_se_snippet + protocol-decoder sdq channel sdq=0 + input sdq/iphone_se_snippet.sr + output sdq annotation match iphone_se_snippet.output