Encoding method and apparatus, decoding method and apparatus, and storage medium

文档序号:1908552 发布日期:2021-11-30 浏览:16次 中文

阅读说明:本技术 编码方法及装置、解码方法及装置、以及存储介质 (Encoding method and apparatus, decoding method and apparatus, and storage medium ) 是由 孙长宇 陈朝喜 于 2020-05-22 设计创作,主要内容包括:本公开是关于一种编码方法及装置、解码方法及装置、以及存储介质。编码方法包括:获取信号值初始状态以及对应发生跳变的符号编码值和符号编码值对应的符号编码;基于获取的信号值初始状态以及对应发生跳变的符号编码进行跳变,并通过电子表格显示跳变后的信号值终始状态,完成编码。解码方法包括:获取信号值初始状态以及信号值初始状态对应的信号值终始状态;将信号值初始状态跳变为信号值终始状态的过程进行解码,并通过电子表格显示对应信号值初始状态发生跳变的符号编码。通过本公开提供的方法,解码和编码的过程均能在电子表格中实现,使测试者能够直观的获取信号值状态发生跳变的过程。(The present disclosure relates to an encoding method and apparatus, a decoding method and apparatus, and a storage medium. The encoding method comprises the following steps: acquiring a signal value initial state, a symbol code value which correspondingly jumps and a symbol code corresponding to the symbol code value; and jumping based on the acquired initial state of the signal value and the symbol code corresponding to the jumping, and displaying the final state of the jumped signal value through a spreadsheet to finish coding. The decoding method comprises the following steps: acquiring a signal value initial state and a signal value final state corresponding to the signal value initial state; and decoding the process of changing the signal value initial state jump into the signal value final state, and displaying symbol codes jumping corresponding to the signal value initial state through a spreadsheet. By the method, the decoding and encoding processes can be realized in the spreadsheet, so that a tester can intuitively acquire the process of the jump of the signal value state.)

1. An encoding method, characterized in that the encoding method comprises:

acquiring an initial state of a signal value;

acquiring a symbol coding value which is hopped correspondingly to the initial state of the signal value and a symbol code which is corresponding to the symbol coding value, wherein different symbol codes are used for representing different hopping processes of the state of the signal value;

and jumping the initial state of the signal value according to the symbol code corresponding to the symbol code value based on the acquired initial state of the signal value and the symbol code value corresponding to the initial state of the signal value, and displaying the final state of the signal value after jumping of the initial state of the signal value through a spreadsheet to finish the coding.

2. The encoding method according to claim 1, wherein said obtaining the symbol code value corresponding to the hopped symbol code value and the symbol code corresponding to the symbol code value in the initial state of the signal value comprises:

acquiring one or more binary transmission data, wherein each binary transmission data respectively corresponds to a plurality of continuous symbol codes and is used for representing a plurality of continuous hopping processes of a signal value state;

and acquiring a plurality of symbol codes which are subjected to a plurality of continuous jumps corresponding to the initial state of the signal value and the symbol code value corresponding to each symbol code based on each binary transmission data, and displaying the symbol codes and the symbol code values through the electronic table.

3. The encoding method according to claim 2, wherein each binary transmission data respectively corresponds to a plurality of consecutive symbol encodings, comprising: each 16-bit binary transmission data corresponds to seven consecutive symbol encodings.

4. The encoding method according to claim 1 or 2,

the signal value initial state comprises: signal value initial signal voltage;

the signal value end state includes: signal value end signal voltage;

the encoding method further includes:

and displaying a signal voltage jump process diagram corresponding to the signal value initial state in the spreadsheet based on the signal value initial signal voltage and the signal value final signal voltage corresponding to the signal value initial signal voltage.

5. The encoding method according to claim 4,

the signal value initial state further comprises: a signal value initial differential voltage;

the signal value end state further includes: the signal value is the initial differential voltage;

the encoding method further includes:

and displaying a differential voltage jump process graph corresponding to the signal value initial state in the spreadsheet based on the signal value initial differential voltage and the signal value final differential voltage corresponding to the signal value initial differential voltage.

6. A decoding method, characterized in that the decoding method comprises:

acquiring a signal value initial state and a signal value final state corresponding to the signal value initial state;

decoding the process of jumping the signal value initial state into the signal value final state based on the acquired signal value initial state and the signal value final state corresponding to the signal value initial state to obtain a symbol code which correspondingly jumps and a symbol code value corresponding to the symbol code, and displaying the symbol code value and the symbol code value through a spreadsheet to finish the decoding;

different symbol codes correspond to different symbol code values and are used for representing the hopping process of different signal value states.

7. The decoding method of claim 6, further comprising:

acquiring a plurality of symbol codes which are continuously hopped and correspond to the initial state of the signal value;

and obtaining one or more binary transmission data based on the symbol codes, and displaying the binary transmission data through the spreadsheet, wherein each binary transmission data corresponds to a plurality of continuous symbol codes and is used for representing a plurality of continuous jumping processes of the signal value state.

8. The decoding method according to claim 7, wherein each binary transmission data respectively corresponds to a plurality of consecutive symbol encodings, comprising: each 16-bit binary transmission data corresponds to seven consecutive symbol encodings.

9. The decoding method according to claim 6 or 7,

the signal value initial state comprises: signal value initial signal voltage;

the signal value end state includes: signal value end signal voltage;

the decoding method further includes:

and displaying a signal voltage jump process diagram corresponding to the signal value initial state in the spreadsheet based on the signal value initial signal voltage and the signal value final signal voltage corresponding to the signal value initial signal voltage.

10. The decoding method according to claim 9,

the signal value initial state further comprises: a signal value initial differential voltage;

the signal value end state further includes: the signal value is the initial differential voltage;

the decoding method further includes:

and displaying a differential voltage jump process graph corresponding to the signal value initial state in the spreadsheet based on the signal value initial differential voltage and the signal value final differential voltage corresponding to the signal value initial differential voltage.

11. An encoding apparatus, characterized in that the encoding apparatus comprises:

the device comprises an acquisition unit, a processing unit and a control unit, wherein the acquisition unit is used for acquiring a signal value initial state, acquiring a symbol code value which is hopped corresponding to the signal value initial state and a symbol code corresponding to the symbol code value, and different symbol codes are used for representing different hopping processes of the signal value state;

and the coding unit is used for jumping the initial state of the signal value according to the symbol code corresponding to the symbol code value based on the acquired initial state of the signal value and the symbol code value corresponding to the initial state of the signal value, displaying the final state of the signal value after jumping of the initial state of the signal value through a spreadsheet, and finishing the coding.

12. The encoding apparatus as claimed in claim 11, wherein the obtaining unit obtains the symbol code value of the signal value in the initial state and the symbol code corresponding to the symbol code value by:

acquiring one or more binary transmission data, wherein each binary transmission data respectively corresponds to a plurality of continuous symbol codes and is used for representing a plurality of continuous hopping processes of a signal value state;

and acquiring a plurality of symbol codes which are subjected to a plurality of continuous jumps corresponding to the initial state of the signal value and the symbol code value corresponding to each symbol code based on each binary transmission data, and displaying the symbol codes and the symbol code values through the electronic table.

13. The encoding apparatus as claimed in claim 12, wherein each binary transmission data respectively corresponds to a plurality of consecutive symbol encodings, comprising: each 16-bit binary transmission data corresponds to seven consecutive symbol encodings.

14. The encoding device according to claim 11 or 12,

the signal value initial state comprises: signal value initial signal voltage;

the signal value end state includes: signal value end signal voltage;

the encoding device further includes:

and the display unit is used for displaying a signal voltage jump process diagram corresponding to the signal value initial state in the spreadsheet based on the signal value initial signal voltage and the signal value final signal voltage corresponding to the signal value initial signal voltage.

15. The encoding device according to claim 14,

the signal value initial state further comprises: a signal value initial differential voltage;

the signal value end state further includes: the signal value is the initial differential voltage;

the display unit is further configured to:

and displaying a differential voltage jump process graph corresponding to the signal value initial state in the spreadsheet based on the signal value initial differential voltage and the signal value final differential voltage corresponding to the signal value initial differential voltage.

16. A decoding apparatus, characterized in that the decoding apparatus comprises:

the state acquisition unit is used for acquiring a signal value initial state and a signal value final state corresponding to the signal value initial state;

the decoding unit is used for decoding the process of jumping from the initial state of the signal value to the final state of the signal value based on the acquired initial state of the signal value and the final state of the signal value corresponding to the initial state of the signal value to obtain a symbol code corresponding to jumping and a symbol code value corresponding to the symbol code, and displaying the symbol code value and the symbol code value through a spreadsheet to finish the decoding;

different symbol codes correspond to different symbol code values and are used for representing the hopping process of different signal value states.

17. The decoding apparatus of claim 16, wherein the decoding unit is further configured to:

acquiring a plurality of symbol codes which are continuously hopped and correspond to the initial state of the signal value;

and obtaining one or more binary transmission data based on the symbol codes, and displaying the binary transmission data through the spreadsheet, wherein each binary transmission data corresponds to a plurality of continuous symbol codes and is used for representing a plurality of continuous jumping processes of the signal value state.

18. The decoding apparatus according to claim 17, wherein each binary transmission data respectively corresponds to a plurality of consecutive symbol encodings, comprising: each 16-bit binary transmission data corresponds to seven consecutive symbol encodings.

19. The decoding apparatus according to claim 16 or 17,

the signal value initial state comprises: signal value initial signal voltage;

the signal value end state includes: signal value end signal voltage;

the decoding apparatus further includes:

and the display unit is used for displaying a signal voltage jump process diagram corresponding to the signal value initial state in the spreadsheet based on the signal value initial signal voltage and the signal value final signal voltage corresponding to the signal value initial signal voltage.

20. The decoding apparatus according to claim 19,

the signal value initial state further comprises: a signal value initial differential voltage;

the signal value end state further includes: the signal value is the initial differential voltage;

the display unit is further configured to:

and displaying a differential voltage jump process graph corresponding to the signal value initial state in the spreadsheet based on the signal value initial differential voltage and the signal value final differential voltage corresponding to the signal value initial differential voltage.

21. An encoding apparatus, wherein the encoding apparatus comprises:

a memory to store instructions; and

a processor for invoking the memory-stored instructions to perform the encoding method of any one of claims 1-5.

22. A computer-readable storage medium having stored therein instructions which, when executed by a processor, perform the encoding method of any one of claims 1-5.

23. A decoding apparatus, wherein the decoding apparatus comprises:

a memory to store instructions; and

a processor for invoking the memory-stored instructions to perform the decoding method of any one of claims 6-10.

24. A computer readable storage medium having stored therein instructions which, when executed by a processor, perform a decoding method according to any one of claims 6 to 10.

Technical Field

The present disclosure relates to the field of data transmission technologies, and in particular, to an encoding method and apparatus, a decoding method and apparatus, and a storage medium.

Background

Along with the gradually powerful function of shooing of smart mobile phone, the pixel of making a video recording that obtains is also more and more, and high definition display screen has obtained wide application. Therefore, the communication protocol of the display module for high-speed bandwidth is increasingly required. In order to realize high-speed transmission, a Camera Serial Interface-Port physical Layer (C-PHY) protocol is often used as a communication protocol in an Interface physical Layer of a Camera for transmission. The data transmission process based on the C-PHY protocol is to complete data transmission by continuously changing the signal value state to form symbol (symbol) codes. In the related art, when performing data transmission test, it is necessary to combine with related instruments in a laboratory, for example: an oscilloscope, etc. However, when symbol encoding/decoding is performed, a tester cannot intuitively acquire the process of signal value initial state transmission jump, and the operation of related instruments such as an oscilloscope and the like needs to be performed by a tester with certain related professional knowledge.

Disclosure of Invention

To overcome the problems in the related art, the present disclosure provides an encoding method, a decoding method, an encoding apparatus, a decoding apparatus, and a storage medium.

According to a first aspect of the embodiments of the present disclosure, there is provided an encoding method, including: acquiring an initial state of a signal value; acquiring symbol coding values which are hopped correspondingly to the initial state of the signal value and symbol codes corresponding to the symbol coding values, wherein different symbol coding values are used for representing different hopping processes of the state of the signal value; and jumping the initial state of the signal value according to the symbol code corresponding to the symbol code value based on the acquired initial state of the signal value and the symbol code value which is correspondingly jumped in the initial state of the signal value, and displaying the final state of the signal value after jumping in the initial state of the signal value through an electronic form to finish coding.

In one embodiment, obtaining a symbol code value of a signal value in an initial state corresponding to a transition and a symbol code corresponding to the symbol code value includes: acquiring one or more binary transmission data, wherein each binary transmission data corresponds to a plurality of continuous symbol codes respectively and is used for representing a continuous hopping process of a signal value state for a plurality of times; and acquiring a plurality of symbol codes which are subjected to continuous hopping for a plurality of times corresponding to the initial state of the signal value and symbol code values corresponding to the symbol codes based on each binary transmission data, and displaying the symbol codes and the symbol code values through a spreadsheet.

In another embodiment, each binary transmission data respectively corresponds to a plurality of consecutive symbol encodings, including: each 16-bit binary transmission data corresponds to seven consecutive symbol encodings.

In yet another embodiment, the signal value initial state comprises: signal value initial signal voltage; the signal value end state includes: signal value end signal voltage; the encoding method further includes: and displaying a signal voltage jump process diagram corresponding to the signal value initial state in the spreadsheet based on the signal value initial signal voltage and the signal value final signal voltage corresponding to the signal value initial signal voltage.

In yet another embodiment, the signal value initial state further comprises: a signal value initial differential voltage; the signal value end state further includes: the signal value is the initial differential voltage; the encoding method further includes: and displaying a differential voltage jump process diagram corresponding to the initial state of the signal value in the spreadsheet based on the initial differential voltage of the signal value and the final differential voltage of the signal value corresponding to the initial differential voltage of the signal value.

According to a second aspect of the embodiments of the present disclosure, there is provided a decoding method including: acquiring a signal value initial state and a signal value final state corresponding to the signal value initial state; decoding the process of jumping the initial state of the signal value into the final state of the signal value based on the acquired initial state of the signal value and the final state of the signal value corresponding to the initial state of the signal value to obtain a symbol code corresponding to the jumping and a symbol code value corresponding to the symbol code, and displaying through a spreadsheet to finish the decoding; different symbol codes correspond to different symbol code values and are used for representing the hopping process of different signal value states.

In an embodiment, the decoding method further comprises: acquiring a plurality of symbol codes which are continuously hopped and correspond to the initial state of a signal value; and obtaining one or more binary transmission data based on each symbol code, and displaying the binary transmission data through a spreadsheet, wherein each binary transmission data corresponds to a plurality of continuous symbol codes respectively and is used for representing a plurality of continuous jumping processes of the signal value state.

In another embodiment, each binary transmission data respectively corresponds to a plurality of consecutive symbol encodings, including: each 16-bit binary transmission data corresponds to seven consecutive symbol encodings.

In yet another embodiment, the signal value initial state comprises: signal value initial signal voltage; the signal value end state includes: signal value end signal voltage; the decoding method further includes: and displaying a signal voltage jump process diagram corresponding to the signal value initial state in the spreadsheet based on the signal value initial signal voltage and the signal value final signal voltage corresponding to the signal value initial signal voltage.

In yet another embodiment, the signal value initial state further comprises: a signal value initial differential voltage; the signal value end state further includes: the signal value is the initial differential voltage; the decoding method further includes: and displaying a differential voltage jump process diagram corresponding to the initial state of the signal value in the spreadsheet based on the initial differential voltage of the signal value and the final differential voltage of the signal value corresponding to the initial differential voltage of the signal value.

According to a third aspect of the embodiments of the present disclosure, there is provided an encoding apparatus including: the acquisition unit is used for acquiring a signal value initial state, acquiring a symbol code value which is hopped corresponding to the signal value initial state and a symbol code corresponding to the symbol code value, wherein different symbol codes are used for representing different hopping processes of the signal value state; and the coding unit is used for jumping the initial state of the signal value according to the symbol code corresponding to the symbol code value based on the acquired initial state of the signal value and the symbol code value which is correspondingly jumped in the initial state of the signal value, displaying the final state of the signal value after jumping in the initial state of the signal value through an electronic form, and finishing coding.

In an embodiment, the obtaining unit obtains a symbol code value of the signal value initial state corresponding to the occurrence of the transition and a symbol code corresponding to the symbol code value by the following method: acquiring one or more binary transmission data, wherein each binary transmission data respectively corresponds to a plurality of continuous symbol codes and is used for representing a plurality of continuous hopping processes of signal value states; and acquiring a plurality of symbol codes which are subjected to continuous hopping for a plurality of times corresponding to the initial state of the signal value and each symbol code value corresponding to the symbol codes based on each binary transmission data, and displaying through a spreadsheet.

In another embodiment, each binary transmission data respectively corresponds to a plurality of consecutive symbol encodings, including: each 16-bit binary transmission data corresponds to seven consecutive symbol encodings.

In yet another embodiment, the signal value initial state comprises: signal value initial signal voltage; the signal value end state includes: signal value end signal voltage; the encoding device further includes: and the display unit is used for displaying a signal voltage jump process diagram corresponding to the initial state of the signal value in the spreadsheet based on the initial signal voltage of the signal value and the final signal voltage of the signal value corresponding to the initial signal voltage of the signal value.

In yet another embodiment, the signal value initial state further comprises: a signal value initial differential voltage; the signal value end state further includes: the signal value is the initial differential voltage; the display unit is further configured to: and displaying a differential voltage jump process diagram corresponding to the initial state of the signal value in the spreadsheet based on the initial differential voltage of the signal value and the final differential voltage of the signal value corresponding to the initial differential voltage of the signal value.

According to a fourth aspect of the embodiments of the present disclosure, there is provided a decoding apparatus including: the state acquisition unit is used for acquiring a signal value initial state and a signal value final state corresponding to the signal value initial state; the decoding unit is used for decoding the process of changing the signal value initial state jumping process into the signal value end state based on the acquired signal value initial state and the signal value end state corresponding to the signal value initial state to obtain the symbol code which correspondingly jumps and the symbol code value corresponding to the symbol code, and displaying the symbol code and the symbol code value through a spreadsheet to finish decoding; different symbol codes correspond to different symbol code values and are used for representing the hopping process of different signal value states.

In an embodiment, the decoding unit is further configured to: acquiring a plurality of symbol codes which are continuously hopped and correspond to the initial state of a signal value; and obtaining one or more binary transmission data based on each symbol code, and displaying the binary transmission data through a spreadsheet, wherein each binary transmission data corresponds to a plurality of continuous symbol codes and is used for representing a plurality of continuous jumping processes of the signal value state.

In another embodiment, each binary transmission data respectively corresponds to a plurality of consecutive symbol encodings, including: each 16-bit binary transmission data corresponds to seven consecutive symbol encodings.

In yet another embodiment, the signal value initial state comprises: signal value initial signal voltage; the signal value end state includes: signal value end signal voltage; the decoding apparatus further includes: and the display unit is used for displaying a signal voltage jump process diagram corresponding to the initial state of the signal value in the spreadsheet based on the initial signal voltage of the signal value and the final signal voltage of the signal value corresponding to the initial signal voltage of the signal value.

In yet another embodiment, the signal value initial state further comprises: a signal value initial differential voltage; the signal value end state further includes: the signal value is the initial differential voltage; the display unit is further configured to: and displaying a differential voltage jump process diagram corresponding to the initial state of the signal value in the spreadsheet based on the initial differential voltage of the signal value and the final differential voltage of the signal value corresponding to the initial differential voltage of the signal value.

According to a fifth aspect of the embodiments of the present disclosure, there is provided another encoding apparatus including: a memory to store instructions; and the processor is used for calling the instructions stored in the memory to execute any one of the coding methods.

According to a sixth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing instructions that, when executed by a processor, perform any one of the encoding methods described above.

According to a seventh aspect of the embodiments of the present disclosure, there is provided another decoding apparatus comprising: a memory to store instructions; and the processor is used for calling the instructions stored in the memory to execute any one of the decoding methods.

According to an eighth aspect of the embodiments of the present disclosure, there is provided another computer-readable storage medium storing instructions that, when executed by a processor, perform any one of the decoding methods described above.

The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:

according to the coding method provided by the disclosure, the acquired initial state of the signal value is hopped according to a hopping process corresponding to the symbol coding value, and the encoded initial state of the signal value is displayed through an electronic form. When the transmission test is carried out, a tester can visually acquire the jump process of the initial state of the signal value from the spreadsheet, and the flexible test is further facilitated. And the test is carried out through the spreadsheet, so that the coding reading process of a tester is facilitated, the tester can quickly finish the test, and the test experience is more friendly.

According to the decoding method provided by the disclosure, the acquired initial state of the signal value is decoded according to the process of changing the initial state of the signal value into the final state of the signal value after jumping, and the symbol coding value corresponding to the jumping process is displayed through the spreadsheet, so that a tester can intuitively acquire how the initial state of the signal value is changed into the final state of the signal value from the spreadsheet, and further perform flexible testing. And the test is carried out through the spreadsheet, so that the decoding process of a tester is facilitated, the tester can quickly finish the test, and the test experience is more friendly.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.

Fig. 1 is a flow chart illustrating an encoding method according to an example embodiment.

Fig. 2 is a schematic diagram illustrating a symbol encoding variation according to an exemplary embodiment.

Fig. 3 is a diagram illustrating a signal voltage transition process according to an example embodiment.

Fig. 4 is a diagram illustrating a differential voltage transition process, according to an example embodiment.

Fig. 5 is a flow chart illustrating another encoding method according to an example embodiment.

FIG. 6 is a diagram illustrating a mapping relationship, according to an example embodiment.

Fig. 7 is a circuit diagram illustrating according to an example embodiment.

Fig. 8 is a diagram illustrating a process of successive transitions of a signal voltage according to an example embodiment.

Fig. 9 is a diagram illustrating a differential voltage successive transition process according to an exemplary embodiment.

Fig. 10 is a flow chart illustrating a decoding method according to an example embodiment.

Fig. 11 is a diagram illustrating another signal voltage transition process according to an example embodiment.

Fig. 12 is a diagram illustrating another differential voltage transition process according to an example embodiment.

Fig. 13 is a flow chart illustrating another decoding method according to an example embodiment.

Fig. 14 is another circuit diagram shown in accordance with an example embodiment.

Fig. 15 is a diagram illustrating another process of successive transitions of a signal voltage according to an example embodiment.

Fig. 16 is a diagram illustrating another differential voltage successive transition process, according to an example embodiment.

Fig. 17 is a block diagram illustrating an encoding apparatus according to an example embodiment.

Fig. 18 is a block diagram illustrating a decoding apparatus according to an example embodiment.

Detailed Description

Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

It will be further understood that the terms "first," "second," and the like are used to describe various information and that such information should not be limited by these terms. These terms are only used to distinguish one type of information from another and do not denote a particular order or importance. Indeed, the terms "first," "second," and the like are fully interchangeable. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure.

Mobile Industry Processor Interface (MIPI) is an open standard and a specification established for Mobile application processors by the MIPI alliance. Three protocols can be included in the physical layer of MIPI: M-PHY, D-PHY and C-PHY. The three differences are shown in the following table 1:

TABLE 1

Of these three protocols, the data transmission amount of M-PHY is the largest, but in the field of imagable, there are few cases of application of M-PHY. The main reason is that in connection with the development of applications for cameras, cameras have not continued to develop significantly higher pixel count after reaching 20M pixels, as expected by the MIPI organization. The development of M-Phy devices is complicated and not supported by the device vendors, so that camera devices have stayed on the D-Phy protocol for a long time. With the wide application of high-definition display screens, the communication protocol demand of the display module for high-speed bandwidth is increasing. The high-speed communication protocol is required for large-data-volume transmission, and the C-PHY is increasingly used in the communication protocol of the camera because the speed of the C-PHY can reach 5.7Gbps which is larger than that of the traditional D-PHY. In the data transmission process based on the C-PHY protocol, symbol codes are formed by continuously changing the signal value state, and the content of data transmission is hidden in the symbol codes to complete data transmission.

In the related art, coding/decoding is performed on symbol mainly through a payment plug-in of a related instrument such as an oscilloscope. In the present disclosure, by designing an electronic form, a mapping relationship is pre-stored in the electronic form, and then encoding/decoding is performed according to an initial state of a signal value and a symbol code value corresponding to the symbol code or a final state of an adjacent signal value, so that a tester can intuitively decode information included in the symbol code, determine whether data is transmitted or how to transmit the data, and then perform a flexible test. And the matching use of instruments and payment plug-ins is not needed, so that the cost is saved.

Fig. 1 is a flow chart illustrating an encoding method according to an exemplary embodiment, in the present disclosure, the encoding method may be applied to data transmission based on a C-PHY protocol, as a carrier of data information, and the data information is transmitted during the data information transmission. As shown in fig. 1, the encoding method 10 includes the following steps S11 to S13.

In step S11, a signal value initial state is acquired.

In the embodiment of the present disclosure, the C-PHY protocol has no clock line, and therefore, the receiving end needs to derive the clock frequency according to the variation edge of the demodulated data in the decoding process. The C-PHY protocol is located at the interface physical layer, and each channel in the physical layer includes A, B, C three data lines, corresponding to a set of differential lines (Dp 3/4V, Dm-1/4V) and a common-mode line Dc-1/2V. A, B, C pieces of data are assigned to Dp, Dm, and Dc respectively for a total of 3 × 2 × 1 ═ 6 permutation combinations, and these 6 combinations are defined as 6 symbols of + X, -X, + Y, -Y, + Z, and-Z representing the respective signal value states. The signal value initial state may be any one of the 6 signal value states. The signal value initial state may be a specified signal value state, or may be a signal value initial state of a camera device currently under test. The acquisition of the initial state of the signal value is beneficial to determining the data to be transmitted, so that the jump of the state of the signal value is conveniently completed through symbol coding, and the receiving end can acquire the change frequency of the clock.

In step S12, a symbol code value corresponding to the initial state of the signal value and a symbol code corresponding to the symbol code value are obtained.

In the disclosed embodiment, the jumping of one signal value state to another signal value state is implemented based on Symbol encoding. In the data transmission process of the C-PHY protocol, symbol codes are formed by continuously changing the signal value state, and then the data transmission is completed. Different symbol encodings are used to characterize different hopping processes in which signal value states are to be transmitted. In the process of data transmission, the symbol code is a carrier of data information. In order to ensure that the data edge of the receiving end can obtain the clock frequency, the data edge change needs to occur, so that each signal value state has 5 effective transitions, namely, other 5 signal value states except the signal value state of the signal value state. When the signal value state jumps, the receiving end can obtain the clock frequency. If the signal value state is not changed, a changed edge cannot be formed, and the receiving end cannot acquire the clock. Aiming at different hopping processes, different definition numbers are adopted to distinguish different symbol codes, and the different definition numbers are symbol code values corresponding to the different symbol codes. Defining the number includes: <0>, <1>, <2>, <3>, <4 >. By acquiring the symbol coded value corresponding to the initial state of the signal value, what kind of jump process occurs in the initial state of the signal value can be determined according to the symbol coded value. The symbol code corresponding to the symbol code value is obtained while the symbol code value is obtained, which is helpful for a tester to intuitively and clearly determine how the initial state of the signal value jumps according to the symbol code to become the final state of the signal value,

in step S13, based on the obtained signal value initial state and the symbol code value that the signal value initial state corresponds to and has hopped, the signal value initial state is hopped according to the symbol code corresponding to the symbol code value, and the electronic form displays the signal value end state after the signal value initial state has hopped, thereby completing the coding.

In the embodiment of the present disclosure, the obtained signal value initial state and the symbol code value corresponding to the signal value initial state are input into the electronic form. And according to a C-PHY protocol pre-stored in the electronic table, jumping the initial state of the signal value according to the obtained symbol code corresponding to the symbol code value to obtain the final state of the corresponding signal value, displaying the final state of the corresponding signal value through the electronic table, and finishing the coding of data transmission. The process of the initial state of the signal value jumping is displayed through the spreadsheet, which is helpful for determining how the line voltage in each channel corresponding to the initial state of the signal value is converted into the final state of the signal value according to symbol codes when the initial state of the signal value jumps, and thus, data transmission is completed. For example: given a signal value initial state of + X, a symbol code value of 2, and a corresponding symbol code of [0,1,0], it means that the signal value initial state is rotated clockwise, and the resulting signal value final state is + Y, in the process, transmission of symbol code of [0,1,0] is performed. And the process of jumping the initial state of the signal value is displayed through the spreadsheet, so that the operation is convenient, the learning is simple and easy, and the test experience of a tester is facilitated to be improved.

In practical application, when each signal value state is transmitted to the receiving end, the voltage difference between the data lines in each signal value state is compared through a comparator arranged at the receiving end. The comparison result is greater than 0 and is 1, and the comparison result is less than 0 and is 0. Therefore, the receiving end can obtain the values of Rx _ AB, Rx _ BC, and Rx _ CA, i.e. the signal output received by the receiving end in the signal value state. The corresponding relationship between each signal value state and the signal voltage of each corresponding data line, the voltage difference between each data line obtained by the receiving end comparator, and the signal output received by the receiving end can be shown in the following table 2:

TABLE 2

The C-PHY protocol includes the signal voltage corresponding to the signal value state shown in table 2, the correspondence between the voltage difference obtained by each receiving-end comparator and the signal output received by the receiving end, and the signal value state change rule represented by each symbol code and the corresponding symbol code value. The process of changing the state of the signal value once is equivalent to a data change, i.e. transmitting one bit of data. There are five possibilities for a change in the state of a signal value, and therefore it can be understood that the transmission of symbol is 5-ary. In practical application, transmission is based on a machine, so that in the transmission process, a 5-ary number is represented by a 3-bit (bit) binary number. The [ Flip, Rotation, polarity ] burst formed by the combination of the attributes "Flip-flop", "Rotation-rotate", "polarity-polarity" 3 bits represents 5 symbol encodings. That is, 5 symbols are equivalent to: <0> <0, 0,0 ]; <1> <0, 0,1 >; <2> <0, 1,0 ]; <3> <0, 1,1 ]; <4> <1, 0,0 ]. In 5 symbols, only the first bit of <4> -100 has a binary value of 1, the other 4 symbols have bits of 0, and the first bit Flip represents "Flip". Therefore, as shown in FIG. 2, based on the C-PHY protocol, the Symbol coding variation principle has the following specifications:

when Flip is 1, Rotation and policy are invalid, Rotation and policy may be any binary digits in symbol encoding, that is, binary coded symbol may be represented as [1, x, x ], and in practical applications, it is usually represented by [1,0,0] to indicate that the state of a signal value is inverted, for example: the initial state of the signal value is + X, and the initial state of the signal value is changed into-X through the jump of symbol coding as [1,0,0 ]. The initial state of the signal value is-Y, and the initial state of the signal value becomes + Y through the jump of symbol coded as [1,0,0 ].

When Flip is 0, the initial state of the signal value is not inverted, and at this time Rotation and policy are valid. Rotation denotes Rotation, the order of X- > Y- > Z- > X is defined as positive Rotation, and the order of X- > Z- > Y- > X is defined as negative Rotation. Polority indicates whether the polarity, i.e., "+", "-" sign, is changed.

(1) Rotation-0, policy-0: as shown in fig. 2, the reverse order is shown with the sign unchanged.

(2) Rotation-0, policy-1: indicating the reverse order, sign change.

(3) Rotation 1, policy 0: indicating positive sequence and unchanged sign.

Rotation 1, policy 1: indicating positive order, sign change.

In one implementation scenario, table 2 and the signal value state change rules represented by each symbol code and the corresponding symbol code value are stored in a spreadsheet respectively in advance. In order to facilitate the tester to quickly identify the state variation rule of the signal value corresponding to each symbol code, the corresponding symbol code value and the corresponding state variation rule of the signal value can be formed into a table as shown in the following table 3 and stored in an electronic table.

symbol Flip Rotation Polority Change rules
0 0 0 0 Reverse order, homopolar
1 0 0 1 Reverse order, reverse polarity
2 0 1 0 Sequential, homopolar
3 0 1 1 Sequential, reverse polarity
4 1 0 0 Roll-over

TABLE 3

Before the obtained initial state of the signal value is hopped according to the obtained symbol code, a signal value state hopping table in which the state of each signal value is hopped to other signal value states based on each symbol code may be obtained in advance, for example, as shown in table 4:

TABLE 4

Through the signal value state hopping table, a tester can visually and clearly know the corresponding hopping situation when the signal value state hops based on each symbol code, and further can clearly understand the data content transmission process when data transmission is carried out based on the C-PHY protocol. In the electronic table, when encoding is performed according to the acquired signal value initial state and the corresponding symbol code value, the probability of all symbol code values and the corresponding signal value initial states in table 4 can be traversed through the code, and the jump result corresponding to the acquired corresponding symbol code value in the acquired signal value initial state is determined through the logical relationship, so that the signal value end state after the signal value initial state jumps is obtained and displayed through the electronic table.

In another implementation scenario, in order to facilitate a tester to visually and clearly observe the channel voltage change when the state of one signal value is changed into another signal value state, the change of each voltage difference in the comparator of the receiving end, and the change of the signal value received by the receiving end when encoding is performed based on the C-PHY protocol, as shown in the following table 5, while the initial state of the signal value is obtained, the channel voltage corresponding to the initial state of the signal value, each voltage difference in the comparator of the receiving end, and the signal value received by the receiving end are obtained, the jump is performed based on the obtained symbol encoding value, the final state of the signal value is obtained, and the channel voltage corresponding to the final state of the signal value, each adjacent voltage difference in the comparator of the receiving end, and the signal value received by the receiving end are displayed together.

TABLE 5

Through the embodiment, the obtained initial state of the signal value is hopped according to the corresponding symbol coding value, and the hopped initial state of the signal value is displayed through the electronic form. When the transmission test is carried out, a tester can visually acquire the jump process of the initial state of the signal value from the spreadsheet, and the flexible test is further facilitated. And the test is carried out through the spreadsheet, so that the test is convenient and quick, a tester can complete the test quickly, and the test experience is more friendly.

In an embodiment, in order to make it easier for a tester to more intuitively and clearly determine the change of the signal voltage values of the 3 data lines a \ B \ C in the physical layer before and after the initial state of the signal value jumps. The method comprises the steps of obtaining a signal value initial signal voltage based on a signal value initial state, namely the signal voltage corresponding to the A \ B \ C three lines in a channel of the signal value initial state, and obtaining a signal value final signal voltage based on a signal value final state, namely the signal voltage corresponding to the A \ B \ C three lines in the channel of the signal value final state. The signal voltage jump process diagram is generated through the electronic form, the electronic form can be directly used for obtaining without being connected with an oscilloscope, and the method is convenient and fast. In the signal voltage jump process diagram, the voltage change that the voltage value of 3 data lines A \ B \ C jumps from the signal value initial signal voltage to the signal value final signal voltage can be clearly seen, and a tester can be further facilitated to flexibly test according to the graphic result. In one implementation scenario, a signal value state encoding process shown in table 5 is employed, there is a signal value initial state + X that jumps the signal state to a signal value final state-X by a symbol encoding value, and a signal voltage jump process diagram shown in fig. 3 is generated based on a signal value initial signal voltage included in the signal value initial state + X and a signal value final signal voltage included in the signal value final state-X. The signal voltage jump process diagram is generated through the electronic table, so that a tester can visually determine the jump process of the initial state of the signal value according to the generated signal voltage jump process diagram, and the tester can read the symbol code.

In another embodiment, the initial state of the signal value further includes an initial differential voltage of the signal value, that is, a voltage difference between voltages corresponding to the a \ B \ C three lines in the channel and data lines in the receiving end comparator in the initial state of the signal value. The signal value end state further includes: the signal value initial differential voltage is the voltage difference between the voltages corresponding to the A \ B \ C three lines in the channel at each data line in the receiving end comparator in the initial state of the signal value. The differential voltage jump process diagram is generated through the electronic form, the electronic form can be directly used for obtaining without being connected with an oscilloscope, and the method is convenient and fast. In the differential voltage jump process diagram, the change of the voltage difference between the lines acquired by the receiving end in the initial state of the signal value after the jump of the voltage difference between the lines acquired by the receiving end can be clearly seen, so that a tester can flexibly test according to the diagram result. In one implementation scenario, a signal value state encoding process shown in table 5 is employed, there is a signal value initial state + X that jumps the signal state to a signal value final state-X through the symbol encoded value, and a differential voltage jump process diagram shown in fig. 4 is generated based on the signal value initial differential voltage included in the signal value initial state + X and the signal value final differential voltage included in the signal value final state-X. The jump process diagram of the differential voltage is generated through the spreadsheet, so that a tester can visually determine the jump process of the initial state of the signal value according to the generated jump process diagram of the differential voltage, and the tester can read the symbol code.

Fig. 5 is a flowchart illustrating an encoding method according to an exemplary embodiment, and as shown in fig. 5, the encoding method 20 includes the following steps S21 to S24.

In step S21, a signal value initial state is acquired.

In step S22, one or more binary transmission data are acquired.

In the embodiment of the present disclosure, binary transmission data is formed based on multiple and consecutive symbol codes, and each binary transmission data corresponds to multiple consecutive symbol codes respectively, and is used for representing multiple consecutive transition processes of a signal value state. By acquiring binary transmission data, the problem of easy generation of the transmission data can be found based on continuous multi-hop of multi-time signal value states, so that the problem can be found in time and the test efficiency can be improved. In practical application, the transmission data is transmitted in units of "words", and during the transmission process, the transmission data is transmitted in binary data of 16 bits, so that the obtained binary transmission data can be the binary transmission data of 16 bits. Through the binary transmission data, the continuous jump process of the initial state of the signal value can be determined.

In step S23, a plurality of symbol codes corresponding to a plurality of consecutive transitions of the initial state of the signal value and a symbol code value corresponding to each symbol code are obtained based on each binary transmission data, and displayed through a spreadsheet.

In the embodiment of the disclosure, the numbers on each bit in the binary transmission data are different, and the multiple continuous jumping processes of the corresponding signal value states are different. The mapping relationship between the binary transmission data and the plurality of symbol codes is stored in the spreadsheet in advance. And converting the obtained binary transmission data into a plurality of corresponding continuous symbol codes according to the mapping relation, and further obtaining a plurality of continuous hopping processes of the initial state of the signal value, so that a tester can clearly determine the content of the transmitted data. Each symbol code and the corresponding symbol code value are displayed through the electronic form, so that a tester can intuitively acquire the initial state of the signal value and the specific jump situation of multiple continuous jumps. And the final state of the obtained signal value is the initial state of the signal value of the next jump after each jump.

In step S24, based on the obtained signal value initial state and the symbol code value that the signal value initial state corresponds to and has hopped, the signal value initial state is hopped according to the symbol code corresponding to the symbol code value, and the electronic form displays the signal value end state after the signal value initial state has hopped, thereby completing the coding.

In the present disclosure, the implementation of step S21 and step S24 are the same as the implementation of step S11 and step S13 in the above coding method 10, respectively, and are not repeated here.

With the above embodiment, the mapping relationship between the binary transmission data and the plurality of symbol codes is stored in the electronic table in advance. And converting the obtained binary transmission data into a plurality of continuous symbols according to the mapping relation, further determining the jump result of the initial state of the signal value under each symbol, and displaying the jump result through a spreadsheet. The tester can intuitively and clearly determine that the initial state of the signal value is in the process of continuous jumping during data transmission based on the C-PHY protocol, and the initial state of the signal value is obtained after jumping every time, so that the tester can determine how to transmit data information carried by symbol coding based on the C-PHY protocol.

In an implementation scenario, since the data transmission process is performed by using 16-bit binary transmission data, a mapping relationship is formed between the 16-bit binary transmission data and a 5-bit symbol code value to obtain 216=5xWherein x is an integer, and the physical meaning represented by x is the transmission number (digit) of the binary number of 16 bits mapped into the coded value of 5 symbols. To ensure that all 16bit binary numbers can be mapped, 2 would be required1665536 numbers are all included in 5xWithin, therefore, the inequality needs to be satisfied by 5(x-1)<216<5xFurther, x is 7. And 5 is6<216<57Therefore, 7 can satisfy the transmission number (number of bits) of symbol code values that map all 16-bit binary numbers, and thus it is derived that data can be mapped to 7 5-bit symbol code values by 16-bit binary transmission. In the C-PHY protocol specification, the mapping relationship between 16bit binary transmission data and 7 symbol codes can be as shown in fig. 6: the mapping relation between each segment of 16-bit binary transmission data and the continuous 7 symbols depends on the number of Flip contained in the 7 symbols. For example: when no Flip occurs in 7 symbol codes, the mapping relationship between the 16-bit binary transmission data between 0x 0000-0 x3fff and each symbol code is as follows: flip [6:0]==0x00==[0,0,0,0,0,0,0]

[0,0,ro6,po6,ro5,po5,ro4,po4,ro3,po3,ro2,po2,rp1,po1,rp0,po0]Wherein rp0 and po0 represent [0, Rotation ] coded by symbol with the 1 st transition0,Polority0]Rp1 and po1 represent symbol-encoded [0, Rotation ] respectively in the occurrence of the 2 nd transition1,Polority1]By analogy, ro6, po6 represent symbol-encoded [0, Rotation ] in the occurrence of the 7 th transition, respectively6,Polority6]. When one Flip occurs in 7 symbol codes, the mapping relationship between the 16-bit binary transmission data between 0x 4000-0 x4fff and each symbol code is as follows: flip [6:0]==0x01==[0,0,0,0,0,1,0][0,1,0,0,ro6,po6,ro5,po5,ro4,po4,ro3,po3,ro2,po2,rp1,po1]The symbol code of the first jump of the initial state of the signal value is considered as [1, 0]]The mapping relationship of the remaining 6 symbols is the same as that when no Flip appears in the 7 symbols.

Since data transmission based on the C-PHY protocol is used in the physical layer, the mapping relationship between the 16-bit binary transmission data and the 7 symbols symbol codes can be realized by the circuit diagram shown in fig. 7, and the logic of the circuit is realized in the spreadsheet by the code. The data on the left side of the circuit diagram is corresponding 16-bit binary transmission data, and the corresponding relation between the corresponding number on each bit and each symbol code on the right side of the circuit diagram is determined. The data between the 0 th bit data and the 7 th bit data in the 16-bit binary transmission data are grouped into a group from low bit to high bit, each group corresponds to the rotation bit and the polarity bit in the corresponding symbol code, and the symbol codes with the state transition from the 1 st time to the 5 th time of the control signal value are determined. The data between the 8 th bit and the 15 th bit is grouped into two groups from the upper bit to the lower bit, and the corresponding relationship between the acquired 16-bit binary transmission data and the Flip is determined to belong to which symbol code mapping relationship shown in fig. 6, so as to acquire 7 consecutive symbol codes (for convenience of representation, symbol is abbreviated as sym in table 6 and the following tables in the whole text). The physical and logical relationships can be shown in tables 6 and 7, for example: when mux0 (switch 0) has a value of 0, mux0 is closed and the symbol code for the first transition (sym0) is [0,1,1 ]. When muxa1 has a value of 1 and muxb1 has a value of 0, then muxa1 is open, muxb1 is closed, and the symbol code for the second hop (sym1) is [0,1,1 ].

TABLE 6

Number of symbols Flip Rotation polority Coded value of symbol
sym0 0 1 1 3
sym1 0 1 1 3
sym2 0 1 1 3
sym3 0 1 1 3
sym4 1 0 0 4
sym5 0 1 1 3
sym6 1 0 0 4

TABLE 7

In yet another implementation scenario, tables 6 and 7 may be stored in advance in the spreadsheet in order to facilitate the spreadsheet to directly use the conversion logic between the 16bit binary transmission data and the 7 symbols in the circuit diagram of FIG. 7. When the system is used, any one group of specified 16-bit binary transmission data can be input into the electronic form, so that continuous 7 symbol codes can be obtained according to the mapping relation between the 16-bit binary transmission data and the 7 symbol codes prestored in the electronic form, and the continuous 7 symbol codes are displayed in a specified area of the electronic form in sequence, so that the initial state of the obtained signal value can be continuously jumped according to the obtained symbol codes, and the data can be transmitted. In the process of continuous jumping, the initial state of the signal value obtained by jumping each time can be displayed through the spreadsheet, so that a tester can easily decode the data transmission process based on symbol coding, and can conveniently and quickly know the coding process based on the C-PHY protocol. For example: as shown in table 7, if the obtained symbol code values corresponding to 7 consecutive symbol codes are 3,3,3,3,4,3, and 4, respectively, then as shown in table 8, 7 consecutive signal value states can also be obtained. And further obtaining the voltage value of each data line corresponding to each signal value state and the difference value of each adjacent voltage in the comparator of the receiving end.

TABLE 8

In yet another implementation scenario, the signal voltage continuous transition process diagram shown in fig. 8 or the differential voltage continuous transition process diagram shown in fig. 9 can be generated by a spreadsheet according to the signal value state encoding process shown in table 8. And furthermore, a tester can visually define the jump process of the initial state of the signal value according to the generated differential voltage jump process diagram, so that the tester can read the Symbol code.

Based on the same concept, the embodiment of the present disclosure further provides a decoding method, which is an inverse operation of the encoding method, and the specific calculation process thereof may refer to the encoding process of the encoding method, and will not be described in detail herein.

Fig. 10 is a flowchart illustrating a decoding method according to an exemplary embodiment, and as shown in fig. 10, the decoding method 30 may be applied to data transmission based on the C-PHY protocol, including the following steps S31 to S32.

In step S31, a signal value initial state and a signal value end state corresponding to the signal value initial state are acquired.

In the embodiment of the present disclosure, the data transmission process of the C-PHY forms symbol codes by continuously changing the State of the Wire State, thereby completing data transmission. According to the embodiment of the coding method, the initial state of the signal value is hopped based on symbol coding to obtain the final state of the signal value, and then data transmission is realized. In the process of data transmission, the symbol code is transmitted, and the content of data transmission is hidden in the symbol code. And the decryption process is to decrypt based on the states of two adjacent signal values to obtain the transmitted data content, namely symbol code. The signal value initial state and the corresponding signal value final state are two adjacent signal value states. And then, by acquiring the initial state of the signal value and the final state of the signal value corresponding to the initial state of the signal value, the data content transmitted by the jump from the initial state of the signal value to the final state of the signal value can be acquired for decoding.

In step S32, based on the acquired signal value initial state and the signal value end state corresponding to the signal value initial state, the process of changing the signal value initial state into the signal value end state is decoded to obtain the symbol code corresponding to the jump and the symbol code value corresponding to the symbol code, and the symbol code value is displayed through the spreadsheet to complete decoding.

In the embodiments of the present disclosure, different symbol codes correspond to different symbol code values, and are used to characterize different hopping processes of a signal value state. And inputting the acquired signal value initial state and the signal value final state corresponding to the signal value initial state into the spreadsheet. And decoding the process of converting the initial state jump process of the signal value into the final state of the signal value according to a C-PHY protocol prestored in the electronic table, and displaying the coded value of the symbol corresponding to the initial state of the signal value and the final state of the signal value and the symbol corresponding to the coded value of the symbol through the electronic table. The process of jumping the initial state of the signal value is decoded and displayed through the spreadsheet, so that a tester can be helped to determine the jumping process based on which the initial state of the signal value is changed into the final state of the signal value, and the test experience of the tester is further prompted. The decoding process based on the C-PHY protocol realizes that the state of two adjacent signal values is given according to a comparator of an analog receiving end to obtain symbol coding.

In one implementation scenario, table 2 and the signal value state change rules represented by each symbol code and the corresponding symbol code value are stored in a spreadsheet respectively in advance. In order to facilitate the tester to quickly identify the state variation rule of the signal value corresponding to each symbol, the corresponding symbol value and the corresponding state variation rule of the signal value may be formed into a table as shown in table 3 and stored in an electronic table. During decoding, according to the initial state of the signal value and the final state of the corresponding signal value in table 9, the possibility of the final state of all the signal values and the initial state of all the corresponding signal values in table 4 are traversed through the code, the obtained initial state of the signal value is determined to jump to the coded value of symbol corresponding to the final state of the signal value through a logical relationship, and then the coded value of symbol and the coded value of symbol corresponding to the coded value of symbol are displayed through a spreadsheet to complete decoding, so that a tester can visually obtain a decoding process.

TABLE 9

Through the embodiment, the obtained initial state of the signal value is decoded according to the process of changing the initial state of the signal value into the final state of the signal value after jumping, and the coded value of symbol corresponding to the jumping process is displayed through the spreadsheet, so that a tester can intuitively obtain how the initial state of the signal value is changed into the final state of the signal value from the spreadsheet, and further perform flexible test. And the test is carried out through the spreadsheet, so that the test is convenient and quick, a tester can complete the test quickly, and the test experience is more friendly.

In an embodiment, in order to make it easier for a tester to more intuitively and clearly determine the change of the signal voltage values of the 3 data lines a \ B \ C in the physical layer before and after the initial state of the signal value jumps. The method comprises the steps of obtaining a signal value initial signal voltage based on a signal value initial state, namely the signal voltage corresponding to the A \ B \ C three lines in a channel of the signal value initial state, and obtaining a signal value final signal voltage based on a signal value final state, namely the signal voltage corresponding to the A \ B \ C three lines in the channel of the signal value final state. The signal voltage jump process diagram is generated through the electronic form, the electronic form can be directly used for obtaining without being connected with an oscilloscope, and the method is convenient and fast. In the signal voltage jump process diagram, the voltage change that the voltage value of 3 data lines A \ B \ C jumps from the signal value initial signal voltage to the signal value final signal voltage can be clearly seen, and a tester can be further facilitated to flexibly test according to the graphic result. In one implementation scenario, a decoding process as shown in Table 9 is used to generate a signal voltage transition process diagram as shown in FIG. 11 according to the signal value initial signal voltage in signal value initial state + X and the signal value final signal voltage in signal value final state-Y. The signal voltage jump process diagram is generated through the spreadsheet, so that a tester can visually acquire the jump process of the initial state of the signal value without other professional instruments or permission of price difference, the method is convenient and quick, and flexible test is easy to perform.

In another embodiment, the initial state of the signal value further includes an initial differential voltage of the signal value, that is, a voltage difference between voltages corresponding to the a \ B \ C three lines in the channel and data lines in the receiving end comparator in the initial state of the signal value. The signal value end state further includes: the signal value initial differential voltage is the voltage difference between the voltages corresponding to the A \ B \ C three lines in the channel at each data line in the receiving end comparator in the initial state of the signal value. The C-PHY protocol does not contain a clock line, and the clock frequency is obtained by depending on the change edge of the demodulation data in the decoding process. The differential voltage jump process diagram is generated through the electronic form, the electronic form can be directly used for obtaining without being connected with an oscilloscope, and the method is convenient and fast. In the differential voltage jump process diagram, the change of the voltage difference between the lines acquired by the receiving end in the initial state of the signal value after the jump of the voltage difference between the lines acquired by the receiving end can be clearly seen, so that a tester can flexibly test according to the diagram result. In one implementation scenario, a signal value state decoding process as shown in Table 9 is employed to generate a differential voltage transition process diagram as shown in FIG. 12 based on the signal value initial differential voltage in signal value initial state + X and the signal value final differential voltage in signal value final state-Y. The jump process diagram of the differential voltage is generated through the spreadsheet, so that a tester can visually determine the jump process of the initial state of the signal value according to the generated jump process diagram of the differential voltage, and the tester can further read the decoding process of the state of the signal value.

Fig. 13 is a flowchart illustrating a decoding method according to an exemplary embodiment, and as shown in fig. 13, the decoding method 40 includes the following steps S41 to S44.

In step S41, a signal value initial state and a signal value end state corresponding to the signal value initial state are acquired.

In step S42, based on the acquired signal value initial state and the signal value end state corresponding to the signal value initial state, the process of changing the signal value initial state into the signal value end state is decoded to obtain the symbol code corresponding to the jump and the symbol code value corresponding to the symbol code, and the symbol code value is displayed through the spreadsheet to complete decoding.

In the present disclosure, the implementation of step S41 and step S42 are the same as the implementation of step S31 and step S32 in the decoding method 30, respectively, and are not repeated herein.

In step S43, a plurality of symbol codes corresponding to the continuous transitions in the initial state of the signal value are obtained.

In the embodiment of the present disclosure, the data transmission process based on the C-PHY protocol is to form symbol codes by continuously changing the signal value state, so as to complete data transmission. By acquiring a plurality of symbol codes of which the initial state of the signal value continuously jumps, the continuous jump process of the initial state of the signal value can be determined. In practical application, the transmission data is transmitted by using 'word' as a unit, and is transmitted by using 16-bit binary data in the transmission process. Therefore, a plurality of continuous symbols are obtained, binary transmission data can be generated based on the mapping relationship between the binary transmission data and the plurality of symbols, and the computer can further recognize the binary transmission data to obtain transmission data carried by the symbols, and in an implementation scenario, the generated binary transmission data can be 16-bit binary transmission data.

In step S44, one or more binary transmission data are obtained based on each symbol encoding and displayed by a spreadsheet.

In the disclosed embodiment, one binary transmission data corresponds to a plurality of consecutive symbol codes, and different binary transmission data corresponds to a different plurality of consecutive symbol codes. Binary transmission data is used for representing a plurality of continuous jumping processes of signal value states. The mapping relationship between the binary transmission data and the plurality of symbol codes is stored in the spreadsheet in advance. And obtaining binary transmission data corresponding to the plurality of symbol codes based on the obtained continuous symbol codes and mapping relations, and displaying the binary transmission data through a spreadsheet. The tester can make sure the specific content of the transmission data during transmission when the initial state of the signal value continuously jumps, and the decoding process can be read by the tester, so that the decoding process is more clear and more intuitive to know.

With the above embodiment, the mapping relationship between a plurality of symbol codes and binary transmission data is stored in the spreadsheet in advance. Obtaining symbol codes generated by multiple jumps of the initial state of the signal value, converting the symbol codes into binary transmission data which can be identified by a computer according to a mapping relation, and displaying the binary transmission data by a spreadsheet. The tester can intuitively and clearly determine that the initial state of the signal value changes the state of the signal value through continuous jumping when data transmission is carried out based on the C-PHY protocol, so that symbol coding is formed, the understanding of data transmission based on the C-PHY protocol is further deepened, and the use is more flexible when coding/decoding test is carried out.

In one implementation scenario, the mapping between 7 symbols and 16-bit binary transmission data is stored in a spreadsheet. The mapping relationship between 7 symbol codes and 16bit binary transmission data can be realized by a circuit diagram as shown in fig. 14, and the logic of the circuit is realized in a spreadsheet by codes. The data on the left side of the circuit diagram are coded in symbols, the corresponding 16-bit binary transmission data are arranged on the left side of the circuit diagram, and the corresponding relation between the symbols and the 16-bit binary transmission data is formed according to the logical relation of the circuit diagram. The logical circuit relationship of "mapping relationship between 7 symbol codes and 16bit binary transmission data" in fig. 14 is opposite to the logical circuit relationship of "mapping relationship between 16bit binary transmission data and 7 symbol codes" in fig. 7. And generating mapped 16-bit binary transmission data of the symbol code corresponding to the 7 continuous symbol code values based on the 7 continuous symbol code values corresponding to the acquired signal value initial state.

In another implementation scenario, according to the circuit logic in fig. 14, based on the obtained signal value initial state and the corresponding 7 consecutive symbol values, filling them in the corresponding area of the electronic form, can obtain the form shown in table 10. Through the table, a tester can intuitively and clearly observe the process of changing the initial state of the signal value into the state of the next signal value.

Watch 10

Through table 11, 7 symbol codes which hop continuously are obtained to obtain 7 symbol codes, and then 16bit binary transmission data as described in table 12 is obtained based on the mapping relationship between the 7 symbol codes and the 16bit binary transmission data stored in the electronic table, so that the transmission data transmitted based on the C-PHY protocol can be directly obtained and determined through the electronic table when the initial state of the signal value jumps for multiple times, so that a tester can know the encoding/decoding process of the C-PHY protocol more easily, and can decode the data transmission process based on the symbol codes more easily.

Number of symbols Coded value of symbol Flip Rotation polority
sym0 3 0 1 1
sym1 3 0 1 1
sym2 3 0 1 1
sym3 3 0 1 1
sym4 4 1 0 0
sym5 3 0 1 1
sym6 4 1 0 0

TABLE 11

TABLE 12

In yet another implementation scenario, according to the transition process of each signal value state in the table 10, the voltage difference between the signal voltage corresponding to each signal value state and each data line in the comparator at the receiving end can be obtained, and a signal voltage continuous transition process diagram as shown in fig. 15 or a differential voltage continuous transition process diagram as shown in fig. 16 is generated. And furthermore, a tester can visually define the jump process of the initial state of the signal value according to the generated differential voltage jump process diagram, so that the tester can read the Symbol code.

Based on the same conception, the embodiment of the disclosure also provides an encoding device and a decoding device.

It is understood that the encoding device and the decoding device provided by the embodiments of the present disclosure include hardware structures and/or software units for performing the respective functions in order to realize the functions. The disclosed embodiments can be implemented in hardware or a combination of hardware and computer software, in combination with the exemplary elements and algorithm steps disclosed in the disclosed embodiments. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.

Fig. 17 is a block diagram illustrating an encoding apparatus according to an example embodiment. Referring to fig. 17, the encoding apparatus 100 includes an acquisition unit 101 and an encoding unit 102.

The obtaining unit 101 is configured to obtain an initial state of a signal value, and obtain a symbol code value of a symbol that has hopped corresponding to the initial state of the signal value and a symbol code corresponding to the symbol code value, where different symbol codes are used to represent different hopping processes of the signal value.

And the encoding unit 102 is configured to hop the signal value initial state according to the symbol code corresponding to the symbol code value based on the acquired signal value initial state and the symbol code value that has hopped correspondingly to the signal value initial state, and display the signal value end state after the signal value initial state has hopped through the spreadsheet to complete encoding.

In an embodiment, the obtaining unit 101 obtains a symbol code value of a signal value initial state corresponding to a transition and a symbol code corresponding to the symbol code value by the following method: acquiring one or more binary transmission data, wherein each binary transmission data respectively corresponds to a plurality of continuous symbol codes and is used for representing a plurality of continuous hopping processes of signal value states; and acquiring a plurality of symbol codes which are subjected to continuous hopping for a plurality of times corresponding to the initial state of the signal value and each symbol code value corresponding to each symbol code based on each binary transmission data, and displaying through a spreadsheet.

In another embodiment, each binary transmission data respectively corresponding to a plurality of consecutive symbol encodings comprises: each 16-bit binary transmission data corresponds to seven consecutive symbol encodings.

In yet another embodiment, the signal value initial state comprises: signal value initial signal voltage; the signal value end state includes: the signal value begins the signal voltage. The encoding apparatus 100 further includes: and the display unit is used for displaying a signal voltage jump process diagram corresponding to the initial state of the signal value in the spreadsheet based on the initial signal voltage of the signal value and the final signal voltage of the signal value corresponding to the initial signal voltage of the signal value.

In yet another embodiment, the signal value initial state further comprises: a signal value initial differential voltage; the signal value end state further includes: the signal value is the initial differential voltage; the display unit is further configured to: and displaying a differential voltage jump process diagram corresponding to the initial state of the signal value in the spreadsheet based on the initial differential voltage of the signal value and the final differential voltage of the signal value corresponding to the initial differential voltage of the signal value.

Fig. 18 is a block diagram illustrating a decoding apparatus according to an example embodiment. Referring to fig. 18, the decoding apparatus 200 includes a state acquisition unit 201 and a decoding unit 202.

The state obtaining unit 201 is configured to obtain a signal value initial state and a signal value final state corresponding to the signal value initial state.

The decoding unit 220 is configured to decode a process of changing the initial state of the signal value into the final state of the signal value based on the obtained initial state of the signal value and the final state of the signal value corresponding to the initial state of the signal value, obtain a symbol code corresponding to the signal value and a symbol code value corresponding to the symbol code, display the symbol code and the symbol code value through a spreadsheet, and complete decoding; different symbol codes correspond to different symbol code values and are used for representing the hopping process of different signal value states.

In an embodiment, the decoding unit 202 is further configured to: acquiring a plurality of symbol codes which are continuously hopped and correspond to the initial state of a signal value; and obtaining one or more binary transmission data based on each symbol code, and displaying the binary transmission data through a spreadsheet, wherein each binary transmission data corresponds to a plurality of continuous symbol codes respectively and is used for representing a plurality of continuous jumping processes of the signal value state.

In another embodiment, each binary transmission data respectively corresponding to a plurality of consecutive symbol encodings comprises: each 16-bit binary transmission data corresponds to seven consecutive symbol encodings.

In yet another embodiment, the signal value initial state comprises: signal value initial signal voltage; the signal value end state includes: signal value end signal voltage; the decoding apparatus 200 further includes: and the display unit is used for displaying a signal voltage jump process diagram corresponding to the initial state of the signal value in the spreadsheet based on the initial signal voltage of the signal value and the final signal voltage of the signal value corresponding to the initial signal voltage of the signal value.

In yet another embodiment, the signal value initial state further comprises: a signal value initial differential voltage; the signal value end state further includes: the signal value is the initial differential voltage; the display unit is further configured to: and displaying a differential voltage jump process diagram corresponding to the initial state of the signal value in the spreadsheet based on the initial differential voltage of the signal value and the final differential voltage of the signal value corresponding to the initial differential voltage of the signal value.

With regard to the apparatus in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.

In the present disclosure, there is also provided another encoding apparatus including: a memory to store instructions; and the processor is used for calling the instructions stored in the memory to execute any one of the coding methods.

In the present disclosure, a computer-readable storage medium is further provided, which stores instructions that, when executed by a processor, perform any one of the above-mentioned encoding methods.

In the present disclosure, there is also provided another decoding apparatus including: a memory to store instructions; and the processor is used for calling the instructions stored in the memory to execute any one of the decoding methods.

In the present disclosure, another computer-readable storage medium is provided, which stores instructions that, when executed by a processor, perform any one of the decoding methods described above.

It is further understood that the use of "a plurality" in this disclosure means two or more, as other terms are analogous. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. The singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

It is further to be understood that while operations are depicted in the drawings in a particular order, this is not to be understood as requiring that such operations be performed in the particular order shown or in serial order, or that all illustrated operations be performed, to achieve desirable results. In certain environments, multitasking and parallel processing may be advantageous.

Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

35页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种深度图压缩方法、装置、系统及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类