From: Gerhard Sittig Date: Sun, 8 Nov 2020 12:46:36 +0000 (+0100) Subject: parallel: add test case for parallel PD on SQI traffic X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f47a7a3b76716f1b83fe3d06ae27e8032736eb5c;p=sigrok-test.git parallel: add test case for parallel PD on SQI traffic The parallel decoder can also be used to interpret SQI communication. Using the chip select as the reset/enable signal increases robustness. Implement a test case to cover this recently added decoder feature. --- diff --git a/decoder/test/parallel/spi_sqi_four_lines_three_transfers.output b/decoder/test/parallel/spi_sqi_four_lines_three_transfers.output new file mode 100644 index 0000000..289f3f5 --- /dev/null +++ b/decoder/test/parallel/spi_sqi_four_lines_three_transfers.output @@ -0,0 +1,63 @@ +258-279 parallel: item: "8" +279-299 parallel: item: "0" +258-299 parallel: word: "80" +299-320 parallel: item: "0" +320-340 parallel: item: "0" +299-340 parallel: word: "00" +340-361 parallel: item: "0" +361-381 parallel: item: "0" +340-381 parallel: word: "00" +381-402 parallel: item: "1" +402-422 parallel: item: "0" +381-422 parallel: word: "10" +422-443 parallel: item: "2" +443-463 parallel: item: "2" +422-463 parallel: word: "22" +463-484 parallel: item: "4" +484-504 parallel: item: "2" +463-504 parallel: word: "42" +504-525 parallel: item: "4" +525-545 parallel: item: "f" +504-545 parallel: word: "4f" +545-566 parallel: item: "4" +566-586 parallel: item: "f" +545-586 parallel: word: "4f" +586-607 parallel: item: "5" +607-627 parallel: item: "4" +586-627 parallel: word: "54" +627-648 parallel: item: "0" +648-668 parallel: item: "0" +627-668 parallel: word: "00" +668-689 parallel: item: "8" +689-709 parallel: item: "0" +668-709 parallel: word: "80" +709-730 parallel: item: "0" +730-750 parallel: item: "0" +709-750 parallel: word: "00" +750-770 parallel: item: "0" +770-791 parallel: item: "0" +750-791 parallel: word: "00" +791-811 parallel: item: "a" +811-832 parallel: item: "8" +791-832 parallel: word: "a8" +832-852 parallel: item: "8" +852-873 parallel: item: "5" +832-873 parallel: word: "85" +873-893 parallel: item: "7" +893-914 parallel: item: "7" +873-914 parallel: word: "77" +914-934 parallel: item: "0" +934-955 parallel: item: "0" +914-955 parallel: word: "00" +955-975 parallel: item: "2" +975-996 parallel: item: "0" +955-996 parallel: word: "20" +996-1016 parallel: item: "4" +1016-1037 parallel: item: "e" +996-1037 parallel: word: "4e" +1037-1057 parallel: item: "0" +1057-1078 parallel: item: "0" +1037-1078 parallel: word: "00" +1078-1098 parallel: item: "0" +1098-1170 parallel: item: "0" +1078-1170 parallel: word: "00" diff --git a/decoder/test/parallel/spi_sqi_four_lines_three_transfers.python b/decoder/test/parallel/spi_sqi_four_lines_three_transfers.python new file mode 100644 index 0000000..b12bc7b --- /dev/null +++ b/decoder/test/parallel/spi_sqi_four_lines_three_transfers.python @@ -0,0 +1,189 @@ +258-279 parallel: ['ITEM', 8] +279-299 parallel: ['ITEM', 0] +258-299 parallel: ['WORD', 128] +299-320 parallel: ['ITEM', 0] +320-340 parallel: ['ITEM', 0] +299-340 parallel: ['WORD', 0] +340-361 parallel: ['ITEM', 0] +361-381 parallel: ['ITEM', 0] +340-381 parallel: ['WORD', 0] +381-402 parallel: ['ITEM', 1] +402-422 parallel: ['ITEM', 0] +381-422 parallel: ['WORD', 16] +422-443 parallel: ['ITEM', 2] +443-463 parallel: ['ITEM', 2] +422-463 parallel: ['WORD', 34] +463-484 parallel: ['ITEM', 4] +484-504 parallel: ['ITEM', 2] +463-504 parallel: ['WORD', 66] +504-525 parallel: ['ITEM', 4] +525-545 parallel: ['ITEM', 15] +504-545 parallel: ['WORD', 79] +545-566 parallel: ['ITEM', 4] +566-586 parallel: ['ITEM', 15] +545-586 parallel: ['WORD', 79] +586-607 parallel: ['ITEM', 5] +607-627 parallel: ['ITEM', 4] +586-627 parallel: ['WORD', 84] +627-648 parallel: ['ITEM', 0] +648-668 parallel: ['ITEM', 0] +627-668 parallel: ['WORD', 0] +668-689 parallel: ['ITEM', 8] +689-709 parallel: ['ITEM', 0] +668-709 parallel: ['WORD', 128] +709-730 parallel: ['ITEM', 0] +730-750 parallel: ['ITEM', 0] +709-750 parallel: ['WORD', 0] +750-770 parallel: ['ITEM', 0] +770-791 parallel: ['ITEM', 0] +750-791 parallel: ['WORD', 0] +791-811 parallel: ['ITEM', 10] +811-832 parallel: ['ITEM', 8] +791-832 parallel: ['WORD', 168] +832-852 parallel: ['ITEM', 8] +852-873 parallel: ['ITEM', 5] +832-873 parallel: ['WORD', 133] +873-893 parallel: ['ITEM', 7] +893-914 parallel: ['ITEM', 7] +873-914 parallel: ['WORD', 119] +914-934 parallel: ['ITEM', 0] +934-955 parallel: ['ITEM', 0] +914-955 parallel: ['WORD', 0] +955-975 parallel: ['ITEM', 2] +975-996 parallel: ['ITEM', 0] +955-996 parallel: ['WORD', 32] +996-1016 parallel: ['ITEM', 4] +1016-1037 parallel: ['ITEM', 14] +996-1037 parallel: ['WORD', 78] +1037-1057 parallel: ['ITEM', 0] +1057-1078 parallel: ['ITEM', 0] +1037-1078 parallel: ['WORD', 0] +1078-1098 parallel: ['ITEM', 0] +1098-1170 parallel: ['ITEM', 0] +1078-1170 parallel: ['WORD', 0] +1658-1679 parallel: ['ITEM', 8] +1679-1699 parallel: ['ITEM', 0] +1658-1699 parallel: ['WORD', 128] +1699-1720 parallel: ['ITEM', 0] +1720-1740 parallel: ['ITEM', 0] +1699-1740 parallel: ['WORD', 0] +1740-1761 parallel: ['ITEM', 0] +1761-1781 parallel: ['ITEM', 0] +1740-1781 parallel: ['WORD', 0] +1781-1802 parallel: ['ITEM', 1] +1802-1822 parallel: ['ITEM', 0] +1781-1822 parallel: ['WORD', 16] +1822-1843 parallel: ['ITEM', 2] +1843-1863 parallel: ['ITEM', 2] +1822-1863 parallel: ['WORD', 34] +1863-1884 parallel: ['ITEM', 4] +1884-1904 parallel: ['ITEM', 2] +1863-1904 parallel: ['WORD', 66] +1904-1925 parallel: ['ITEM', 4] +1925-1945 parallel: ['ITEM', 15] +1904-1945 parallel: ['WORD', 79] +1945-1966 parallel: ['ITEM', 4] +1966-1986 parallel: ['ITEM', 15] +1945-1986 parallel: ['WORD', 79] +1986-2007 parallel: ['ITEM', 5] +2007-2027 parallel: ['ITEM', 4] +1986-2027 parallel: ['WORD', 84] +2027-2048 parallel: ['ITEM', 0] +2048-2068 parallel: ['ITEM', 0] +2027-2068 parallel: ['WORD', 0] +2068-2089 parallel: ['ITEM', 8] +2089-2109 parallel: ['ITEM', 0] +2068-2109 parallel: ['WORD', 128] +2109-2130 parallel: ['ITEM', 0] +2130-2150 parallel: ['ITEM', 0] +2109-2150 parallel: ['WORD', 0] +2150-2170 parallel: ['ITEM', 0] +2170-2191 parallel: ['ITEM', 0] +2150-2191 parallel: ['WORD', 0] +2191-2211 parallel: ['ITEM', 10] +2211-2232 parallel: ['ITEM', 8] +2191-2232 parallel: ['WORD', 168] +2232-2252 parallel: ['ITEM', 8] +2252-2273 parallel: ['ITEM', 5] +2232-2273 parallel: ['WORD', 133] +2273-2293 parallel: ['ITEM', 7] +2293-2314 parallel: ['ITEM', 7] +2273-2314 parallel: ['WORD', 119] +2314-2334 parallel: ['ITEM', 0] +2334-2355 parallel: ['ITEM', 0] +2314-2355 parallel: ['WORD', 0] +2355-2375 parallel: ['ITEM', 2] +2375-2396 parallel: ['ITEM', 0] +2355-2396 parallel: ['WORD', 32] +2396-2416 parallel: ['ITEM', 4] +2416-2437 parallel: ['ITEM', 14] +2396-2437 parallel: ['WORD', 78] +2437-2457 parallel: ['ITEM', 0] +2457-2478 parallel: ['ITEM', 0] +2437-2478 parallel: ['WORD', 0] +2478-2498 parallel: ['ITEM', 0] +2498-2570 parallel: ['ITEM', 0] +2478-2570 parallel: ['WORD', 0] +3058-3079 parallel: ['ITEM', 8] +3079-3099 parallel: ['ITEM', 0] +3058-3099 parallel: ['WORD', 128] +3099-3120 parallel: ['ITEM', 0] +3120-3140 parallel: ['ITEM', 0] +3099-3140 parallel: ['WORD', 0] +3140-3161 parallel: ['ITEM', 0] +3161-3181 parallel: ['ITEM', 0] +3140-3181 parallel: ['WORD', 0] +3181-3202 parallel: ['ITEM', 1] +3202-3222 parallel: ['ITEM', 0] +3181-3222 parallel: ['WORD', 16] +3222-3243 parallel: ['ITEM', 2] +3243-3263 parallel: ['ITEM', 2] +3222-3263 parallel: ['WORD', 34] +3263-3284 parallel: ['ITEM', 4] +3284-3304 parallel: ['ITEM', 2] +3263-3304 parallel: ['WORD', 66] +3304-3325 parallel: ['ITEM', 4] +3325-3345 parallel: ['ITEM', 15] +3304-3345 parallel: ['WORD', 79] +3345-3366 parallel: ['ITEM', 4] +3366-3386 parallel: ['ITEM', 15] +3345-3386 parallel: ['WORD', 79] +3386-3407 parallel: ['ITEM', 5] +3407-3427 parallel: ['ITEM', 4] +3386-3427 parallel: ['WORD', 84] +3427-3448 parallel: ['ITEM', 0] +3448-3468 parallel: ['ITEM', 0] +3427-3468 parallel: ['WORD', 0] +3468-3489 parallel: ['ITEM', 8] +3489-3509 parallel: ['ITEM', 0] +3468-3509 parallel: ['WORD', 128] +3509-3530 parallel: ['ITEM', 0] +3530-3550 parallel: ['ITEM', 0] +3509-3550 parallel: ['WORD', 0] +3550-3570 parallel: ['ITEM', 0] +3570-3591 parallel: ['ITEM', 0] +3550-3591 parallel: ['WORD', 0] +3591-3611 parallel: ['ITEM', 10] +3611-3632 parallel: ['ITEM', 8] +3591-3632 parallel: ['WORD', 168] +3632-3652 parallel: ['ITEM', 8] +3652-3673 parallel: ['ITEM', 5] +3632-3673 parallel: ['WORD', 133] +3673-3693 parallel: ['ITEM', 7] +3693-3714 parallel: ['ITEM', 7] +3673-3714 parallel: ['WORD', 119] +3714-3734 parallel: ['ITEM', 0] +3734-3755 parallel: ['ITEM', 0] +3714-3755 parallel: ['WORD', 0] +3755-3775 parallel: ['ITEM', 2] +3775-3796 parallel: ['ITEM', 0] +3755-3796 parallel: ['WORD', 32] +3796-3816 parallel: ['ITEM', 4] +3816-3837 parallel: ['ITEM', 14] +3796-3837 parallel: ['WORD', 78] +3837-3857 parallel: ['ITEM', 0] +3857-3878 parallel: ['ITEM', 0] +3837-3878 parallel: ['WORD', 0] +3878-3898 parallel: ['ITEM', 0] +3898-3970 parallel: ['ITEM', 0] +3878-3970 parallel: ['WORD', 0] diff --git a/decoder/test/parallel/test.conf b/decoder/test/parallel/test.conf index 1c650bb..1e751a4 100644 --- a/decoder/test/parallel/test.conf +++ b/decoder/test/parallel/test.conf @@ -26,3 +26,9 @@ test hd44780_word_demux protocol-decoder parallel channel clk=3 channel d0=4 channel d1=5 channel d2=6 channel d3=7 option clock_edge=falling option wordsize=2 option endianness=big input display/hd44780/hd44780-reset-init-hello.sr output parallel annotation match hd44780_word_demux.output + +test spi_sqi_four_lines_one_xfer + protocol-decoder parallel channel clk=2 channel d0=4 channel d1=5 channel d2=6 channel d3=7 channel rst=3 option clock_edge=rising option reset_polarity=high-active option wordsize=2 option endianness=big + input spi/sqi/sqi-four-data-lines-one-transfer.sr + output parallel annotation match spi_sqi_four_lines_three_transfers.output + output parallel python match spi_sqi_four_lines_one_xfer.python