Manchester decoding method and device for microsecond channel protocol, and electronic device
By synchronizing, filtering and high-frequency sampling of Manchester encoded data streams of the microsecond channel protocol, the decoding error problem caused by interference during the transmission process is solved, and the stability and accuracy of data transmission are achieved.
Patent Information
- Application Number
- CN202411945297.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-01
AI Technical Summary
Manchester encoded data streams are easily disturbed by external interference during transmission, resulting in glitches or data offsets during transmission, which in turn causes loss of frames and decoding errors of the data stream.
Glitches in the data stream are removed by synchronizing and filtering the data stream in Manchester encoded format based on the microsecond channel protocol. Then, a high-frequency clock is generated, and its baud rate is determined based on the baud rate of the data stream, and the target data stream is accurately sampled to obtain the sampling results. Finally, the target data stream is decoded based on the count value in the sampling result.
Effectively recover accurate clock signals and data from the interfered data stream, improve the accuracy of data decoding, significantly reduce transmission errors caused by data loss frames, and ensure the stability of data transmission.
Smart Images

Figure CN119743232A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of digital chip design, for example, to a Manchester decoding method and device, and electronic equipment for microsecond channel protocols. Background Art
[0002] The MSC (Micro Second Channel) protocol is a standard protocol used in automotive chips for communicating with power devices. Its upper channel supports data streams in Manchester encoding format. Manchester encoding is a two-phase encoding that represents data by high-low level conversion. In Manchester encoding, there is a level conversion in the middle of each bit, which serves as both a clock signal and a data signal. The receiving end needs to detect the level conversion to achieve data decoding, thereby realizing synchronous data transmission.
[0003] In order to achieve synchronous data transmission, the related art discloses a CDR (Clock Data Recovery) technology, which includes: extracting clock information from the data stream to recover the clock signal, and synchronizing the data stream. The synchronized data stream is sampled using the same frequency clock, so as to correctly decode it.
[0004] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in the related art:
[0005] Manchester coded data streams are susceptible to external interference during transmission, resulting in glitches or data offsets during transmission. If there is inter-code interference in the receiving circuit, it is very easy to cause frame loss in the data stream, which has a significant impact on the duty cycle or code elements of the data stream, resulting in decoding errors and transmission errors.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0007] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0008] The embodiments of the present disclosure provide a Manchester decoding method and device, and an electronic device for a microsecond channel protocol, which can improve the accuracy of decoding and reduce transmission errors caused by data loss frames.
[0009] In some embodiments, the Manchester decoding method for a microsecond channel protocol includes: synchronizing a data stream in a Manchester encoding format based on a microsecond channel protocol; starting counting through a sampling counter when a falling edge appears in the data stream to sample the synchronized data stream and storing multiple sampling values in a shift register; in the case where the same sampling value exists in multiple sampling values, taking the same sampling value as a valid sampling value to obtain a target data stream; sampling the target data stream through a generated high-frequency clock to obtain a sampling result; wherein the baud rate of the high-frequency clock is determined according to the baud rate of the data stream; and decoding the target data stream according to the count value in the sampling result.
[0010] Optionally, the target data stream is sampled by the generated high-frequency clock to obtain a sampling result, including: when a falling edge appears in the target data stream, counting is performed; when the count value reaches a set threshold, latching the current code element as the sampling result; wherein the number of bits of the code element corresponds to the set threshold.
[0011] Optionally, the data stream is decoded according to the count value in the sampling result, including: when the data stream jumps, obtaining a comparison result between the count value and the expected value; when the comparison result is that the count value is consistent with the expected value, directly decoding the current codeword in the sampling result; when the comparison result is that the count value is inconsistent with the expected value, obtaining a deviation result based on the size of the count value and the expected value, so as to use the deviation result to decode the codeword in the sampling result.
[0012] Optionally, when the comparison result is that the count value is inconsistent with the expected value, the deviation result is obtained according to the size of the count value and the expected value, including: when the data stream is a rising edge and the count value is less than the expected value, the deviation result is a left deviation of the rising edge; when the data stream is a rising edge and the count value is greater than the expected value, the deviation result is a right deviation of the rising edge; when the data stream is a falling edge and the count value is less than the expected value, the deviation result is a left deviation of the falling edge; when the data stream is a falling edge and the count value is greater than the expected value, the deviation result is a right deviation of the falling edge.
[0013] Optionally, the deviation result is used to decode the codewords in the sampling result, including: identifying the codewords with jitter in the sampling result according to the deviation result; and decoding the codewords with jitter according to a preset decoding rule.
[0014] Optionally, when there are identical sampling values among multiple sampling values, the identical sampling values are taken as valid sampling values, including: after storing the multiple sampling values in the shift register, resetting the sampling counter and shifting the shift register one position to the left; when two of the three sampling values in the shift register are identical, taking the identical sampling values as valid sampling values.
[0015] Optionally, the Manchester decoding method for a microsecond channel protocol further includes: correcting a count value of a next cycle according to a current count value so that the count value of the next cycle is a valid sampling value.
[0016] In some embodiments, the Manchester decoding device for a microsecond channel protocol includes: a synchronization circuit, configured to synchronize a data stream in a Manchester encoding format based on a microsecond channel protocol; a filtering circuit, the filtering circuit includes a shift register and a sampling counter, configured to start counting through the sampling counter when a falling edge appears in the data stream, so as to sample the synchronized data stream and store multiple sampling values in the shift register; when there are identical sampling values in multiple sampling values, the identical sampling values are used as valid sampling values to obtain a target data stream; a clock generation circuit, configured to sample the target data stream through a generated high-frequency clock to obtain a sampling result; wherein the baud rate of the high-frequency clock is determined according to the baud rate of the data stream; an edge detection circuit, the edge detection circuit includes a counter, configured to decode the target data stream according to the count value in the sampling result.
[0017] In some embodiments, the Manchester decoding device for microsecond channel protocol includes: a processor and a memory storing program instructions, and the processor is configured to execute the Manchester decoding method for microsecond channel protocol as described above when running the program instructions.
[0018] In some embodiments, the electronic device includes: an electronic device body; and the Manchester decoding device for the microsecond channel protocol as described above, installed in the electronic device body.
[0019] The Manchester decoding method, device, and electronic device for microsecond channel protocol provided by the embodiments of the present disclosure can achieve the following technical effects:
[0020] In the disclosed embodiment, the data stream in the Manchester encoding format based on the MSC protocol is first synchronized to the sampling clock domain to ensure the timing accuracy of the data stream. The synchronized data stream is filtered to remove the burrs in the data stream. Secondly, a high-frequency clock is generated, and the baud rate of the high-frequency clock is determined according to the baud rate of the data stream to meet the needs of high-frequency sampling. The target data stream is accurately sampled using the high-frequency clock to obtain the sampling result. Finally, according to the count value in the sampling result, the target data stream is decoded to restore the original data information to achieve data synchronization and transmission. The disclosed embodiment can effectively recover accurate clock signals and data from the disturbed data stream, improve the accuracy of data decoding, thereby significantly reducing the transmission errors caused by data loss frames and ensuring the stability of data transmission.
[0021] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0023] Figure 1 is a schematic diagram of an implementation environment of a Manchester decoding method for a microsecond channel protocol according to an embodiment of the present disclosure;
[0024] Figure 2 is a schematic diagram of a Manchester decoding method for a microsecond channel protocol provided by an embodiment of the present disclosure;
[0025] Figure 3 is a schematic diagram of a Manchester-encoded data stream without deviation provided by an embodiment of the present disclosure;
[0026] Figure 4 is a schematic diagram of another Manchester decoding method for a microsecond channel protocol provided by an embodiment of the present disclosure;
[0027] Figure 5 is a schematic diagram of a Manchester decoding device for a microsecond channel protocol provided by an embodiment of the present disclosure;
[0028] Figure 6 It is a schematic diagram of another Manchester decoding device for a microsecond channel protocol provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0030] The terms "first", "second", etc. in the technical solutions described in the embodiments of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0031] Unless otherwise stated, the term "plurality" means two or more.
[0032] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0033] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0034] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0035] At present, Manchester encoding has different conventions, among which the most common are the Thomas-Manchester convention and the William Stanley Stallings convention. In the Thomas-Manchester convention, logic 0 is represented by a low-high level, and logic 1 is represented by a high-low level. In the William Stanley Stallings convention, logic 0 is represented by a high-low level, and logic 1 is represented by a low-high level. The Manchester encoded data streams in the embodiments of the present disclosure all adopt the Thomas-Manchester convention.
[0036] In the actual communication process, Manchester-coded data streams are susceptible to external interference during transmission, resulting in transmission errors. The disclosed embodiment performs real-time detection on the Manchester-coded data stream, filters out glitches, and then uses a high-frequency clock to sample, track, compensate, latch and decode the data stream, and finally realizes data recovery, thereby solving the problem of communication errors caused by interference to the Manchester-coded data stream.
[0037] Combination Figure 1 , Figure 1 FIG. 1 is a schematic diagram of the implementation environment of the Manchester decoding method for microsecond channel protocol according to an embodiment of the present disclosure. Figure 1 As shown, the implementation environment may include a synchronization circuit, a filtering circuit, a clock generation circuit, and an edge detection circuit. The synchronization circuit is used to synchronize the data stream in Manchester encoding format to the clock domain used for sampling; the filtering circuit is used to filter the burrs in the synchronized data stream, and the three-into-two principle is adopted to achieve the purpose of filtering. The clock generation circuit is used to generate the high-frequency clock required for the sampling data stream, and according to the baud rate of the data stream in the uplink Manchester encoding format, an 8-fold baud rate clock is generated for sampling. The edge detection circuit is used to detect the edge jump moment of Manchester encoding. According to the value of the counter at the jump moment, the data is decoded to realize data communication.
[0038] Combination Figure 2As shown, the embodiment of the present disclosure provides a Manchester decoding method for a microsecond channel protocol, comprising:
[0039] S201: The processor synchronizes a data stream in a Manchester encoding format based on a microsecond channel protocol.
[0040] S202, when a falling edge appears in the data stream, the processor starts counting through the sampling counter to sample the synchronized data stream and store a plurality of sampling values into the shift register.
[0041] S203: When there is an identical sampling value among the multiple sampling values, the processor uses the identical sampling value as a valid sampling value to obtain a target data stream.
[0042] S204, the processor samples the target data stream through the generated high-frequency clock to obtain a sampling result; wherein the baud rate of the high-frequency clock is determined according to the baud rate of the data stream.
[0043] S205: The processor decodes the target data stream according to the count value in the sampling result.
[0044] The Manchester decoding method for microsecond channel protocol provided by the embodiment of the present disclosure is adopted. First, the data stream in the Manchester encoding format based on the MSC protocol is synchronized to the sampling clock domain to ensure the timing accuracy of the data stream. The synchronized data stream is filtered to remove the burrs in the data stream. Secondly, a high-frequency clock is generated, and the baud rate of the high-frequency clock is determined according to the baud rate of the data stream to meet the requirements of high-frequency sampling. The target data stream is accurately sampled using the high-frequency clock to obtain the sampling result. Finally, according to the count value in the sampling result, the target data stream is decoded to restore the original data information to achieve data synchronization and transmission. The embodiment of the present disclosure can effectively recover accurate clock signals and data from the disturbed data stream, improve the accuracy of data decoding, thereby significantly reducing the transmission errors caused by data loss frames and ensuring the stability of data transmission.
[0045] Optionally, the target data stream is sampled by the generated high-frequency clock to obtain a sampling result, including: when a falling edge appears in the target data stream, counting is performed; when the count value reaches a set threshold, latching the current code element as the sampling result; wherein the number of bits of the code element corresponds to the set threshold.
[0046] In the disclosed embodiment, the target data stream is continuously sampled using the generated high-frequency clock. More specifically, the baud rate of the high-frequency clock is 8 times the baud rate of the data stream to ensure accurate sampling at the middle moment of each bit. When a falling edge appears in the target data stream, each bit of the data stream begins to be counted, and the clock information and data information in the data stream can be captured through the counting process. The counting starts from 0, and the count value is updated each time a jump on the data stream is detected. When the count value reaches the set threshold, it indicates that the sampling cycle of a code element has been completed, and the current code element is latched as the sampling result. The number of bits of the current code element corresponds to the set threshold. For example, if the threshold is set to 7, the length of the code element is 8 bits. In this way, the required code element can be accurately extracted from the data stream and latched as the sampling result, providing accurate data for the subsequent decoding process.
[0047] The disclosed embodiment can accurately capture each code element in the data stream, and perform sampling and latching at the correct time, thereby ensuring the accuracy and integrity of the data. In the case where the data stream is interfered with by the outside world or there are glitches, the correct data information can also be effectively identified and extracted through the high-frequency clock. The reliability of data transmission is improved, communication errors caused by external interference can be reduced, and the stability and real-time performance of data transmission are ensured. In addition, this method also has good adaptability, and the frequency of the high-frequency clock can be dynamically adjusted according to the baud rate of different data streams, so as to be suitable for different communication environments and requirements.
[0048] Optionally, the data stream is decoded according to the count value in the sampling result, including: when the data stream jumps, obtaining a comparison result between the count value and the expected value; when the comparison result is that the count value is consistent with the expected value, directly decoding the current codeword in the sampling result; when the comparison result is that the count value is inconsistent with the expected value, obtaining a deviation result based on the size of the count value and the expected value, so as to use the deviation result to decode the codeword in the sampling result.
[0049] In the disclosed embodiment, when the data stream changes, the current count value is obtained, and the count value represents the number of clock cycles from the previous change point to the current change point. The count value is compared with the expected value, where the expected value is pre-set based on the Manchester encoding rule and the baud rate of the data stream. If the count value is consistent with the expected value, it means that there is no deviation in the change edge of the data stream, and the current code element in the sampling result can be directly decoded, that is, the code element is converted into a corresponding logical value according to the Manchester encoding rule. Figure 3 As shown, in an ideal case, the Manchester coded data stream will only jump in the middle of each bit during transmission. It only needs simple synchronization and sampling of the synchronized data stream using the same frequency clock to correctly decode it.
[0050] If the count value is inconsistent with the expected value, it means that there is a deviation in the transition edge of the data stream. The deviation result is obtained based on the deviation between the count value and the expected value. The deviation result is used to characterize the advance or delay of the transition edge. The deviation result is used to adjust and decode the code elements in the sampling result to ensure that the original data information can be accurately restored even when the data stream is disturbed or has glitches.
[0051] According to the comparison result of the count value of the jump point and the expected value, each code element in the data stream can be accurately decoded. In this way, when the data stream is interfered by the outside world or there are glitches, by comparing the count value with the expected value, the deviation can be identified and corresponding adjustments can be made, thereby ensuring the accuracy and integrity of the data.
[0052] In practical applications, such as Figure 1 As shown, the data stream conforming to the MSC uplink frame format is effectively decoded. The synchronization circuit is used to synchronize the Manchester coded data stream to the clock domain used for sampling. The filtering circuit is used to filter the burrs in the synchronized data stream, and the three-into-two principle is adopted to achieve the purpose of filtering. The clock generation circuit is used to generate the high-frequency clock required for the sampling data stream, and according to the baud rate of the uplink Manchester coded data stream, an 8-fold baud rate clock is generated for sampling. The edge detection circuit is used to detect the edge jump moment of Manchester coding. When the rising edge or falling edge is detected in the data stream, it means that the data stream signal in the Manchester coded format is at the jump moment of the continuous same polarity signal. According to the value of the counter, the count value of the next cycle is corrected, and the data valid flag is generated to decode the current 8-bit data. According to the current count value, it can be known that the edge jump moment is earlier or later than the normal moment, and the correct shift value can be obtained according to the sampled 8-bit code element.
[0053] For example, if the current is a rising edge and the count value is greater than the expected count value, it means that the rising edge is right-biased. When the count reaches 7, the 8-bit code element is latched. When a deviation occurs, the code element will jitter. When the code element is 11100000, it is decoded as 1.
[0054] Optionally, when the comparison result is that the count value is inconsistent with the expected value, the deviation result is obtained according to the size of the count value and the expected value, including: when the data stream is a rising edge and the count value is less than the expected value, the deviation result is a left deviation of the rising edge; when the data stream is a rising edge and the count value is greater than the expected value, the deviation result is a right deviation of the rising edge; when the data stream is a falling edge and the count value is less than the expected value, the deviation result is a left deviation of the falling edge; when the data stream is a falling edge and the count value is greater than the expected value, the deviation result is a right deviation of the falling edge.
[0055] In the disclosed embodiment, the system detects the type of transition in the data stream and distinguishes between the rising edge and the falling edge. For the rising edge, if the count value is less than the expected value, the system determines the deviation result as the left deviation of the rising edge, indicating that the actual transition point is earlier than the expected transition point, which may be because the data signal arrives in advance. If the count value is greater than the expected value, it is determined as the right deviation of the rising edge, indicating that the actual transition point is later than the expected transition point, which may be due to the delayed arrival of the data signal. For the falling edge, if the count value is less than the expected value, it is the left deviation of the falling edge, indicating that the actual transition point is earlier than the expected transition point. If the count value is greater than the expected value, it is the right deviation of the falling edge, indicating that the actual transition point is later than the expected transition point. The deviation result can accurately identify and compensate for the timing deviation in the data stream, ensuring that the original data information can be accurately restored even when the data stream is disturbed or has glitches. By judging the left deviation or right deviation of the transition edge, the subsequent sampling clock can be adjusted to correct the data stream, thereby reducing data errors caused by timing deviation. The accuracy and reliability of data transmission are improved, and communication errors caused by data sampling errors are reduced.
[0056] Optionally, decoding the code elements in the sampling result using the deviation result includes: identifying the code elements in the sampling result that are jittered according to the deviation result; and decoding the code elements that are jittered according to a preset decoding rule.
[0057] In the disclosed embodiment, the code element that may be jittered in the sampling result is identified according to the left or right deviation of the transition edge. Jitter refers to the inaccurate sampling point of the code element due to the timing deviation, which affects the correct decoding of the data. According to the preset decoding rules, the code element with jitter is decoded. The decoding rules are formulated based on the characteristics of Manchester coding, and the corresponding logical value is determined according to the sampling value and deviation result of the code element. For example, ideally, if the currently latched 8-bit code element is 00001111, the data is decoded as 0, and if the code element is 11110000, it is decoded as 1. When a deviation occurs, the code element will jitter. When the code element is 11100000 or 1110001, it is decoded as 1, and when the code element is 0001111 or 00001110, it is decoded as 0.
[0058] Decoding using deviation results greatly improves the tolerance to deviations and jitters in the data stream. By accurately identifying and compensating for deviations, the accuracy and integrity of the data can be ensured. This can significantly reduce communication errors caused by data sampling errors and improve the overall performance of the communication system.
[0059] Optionally, when there are identical sampling values among multiple sampling values, the identical sampling values are taken as valid sampling values, including: after storing the multiple sampling values in the shift register, resetting the sampling counter and shifting the shift register one position to the left; when two of the three sampling values in the shift register are identical, taking the identical sampling values as valid sampling values.
[0060] In the disclosed embodiment, the synchronized data stream is continuously sampled. The sampled values are sequentially stored in a shift register, which operates on a first-in-first-out principle, and each time a new sample value comes in, the oldest value is shifted out. As the sampling proceeds, multiple sample values are accumulated in the shift register. Next, the system checks the sample values, and if there are identical sample values, the system identifies the identical value and determines it as a valid sample value.
[0061] Specifically, the filter circuit can detect a glitch of a maximum of one clock cycle during the sampling process, and filter out the glitch using the principle of three-into-two based on the sampling result. If two of the three sampling values are the same, the sampling value is considered valid.
[0062] In this way, accurate data signals can be effectively extracted from noise interference. By storing multiple sampling values in the shift register and selecting the value with the most occurrences as the valid sampling value, the system can reduce erroneous sampling caused by transient noise or signal fluctuations, and improve the accuracy and reliability of data sampling. In addition, the embodiments of the present disclosure can adapt to different signal qualities and communication environments by dynamically adjusting the sampling strategy and the size of the shift register to adapt to different communication requirements and conditions.
[0063] Optionally, the Manchester decoding method for a microsecond channel protocol further includes: correcting a count value of a next cycle according to a current count value so that the count value of the next cycle is a valid sampling value.
[0064] Combination Figure 4 As shown, the embodiment of the present disclosure provides another Manchester decoding method for a microsecond channel protocol, comprising:
[0065] S401, the processor synchronizes the data stream in Manchester encoding format based on the microsecond channel protocol.
[0066] S402, when a falling edge appears in the data stream, the processor starts counting through the sampling counter to sample the synchronized data stream and store a plurality of sampling values into the shift register.
[0067] S403: When there is an identical sampling value among the multiple sampling values, the processor uses the identical sampling value as a valid sampling value to obtain a target data stream.
[0068] S404, the processor samples the target data stream through the generated high-frequency clock to obtain a sampling result; wherein the baud rate of the high-frequency clock is determined according to the baud rate of the data stream.
[0069] S405: The processor decodes the target data stream according to the count value in the sampling result.
[0070] S406: The processor corrects the count value of the next cycle according to the current count value, so that the count value of the next cycle is a valid sampling value.
[0071] In the disclosed embodiment, after completing the sampling of the current data stream and obtaining the count value, the count value is compared with the expected sampling point. If the current count value is inconsistent with the expected value, it indicates that the sampling point may be inaccurate due to interference or clock deviation, and the count value of the next cycle will be adjusted according to the size and direction of the deviation. Specifically, if the current count value is less than the expected value, it indicates that the sampling point is advanced, and the count value of the next cycle will be increased to postpone the next sampling point. If the current count value is greater than the expected value, it indicates that the sampling point is delayed, and the count value of the next cycle will be reduced to advance the next sampling point. In this way, the sampling clock can be dynamically adjusted to ensure that each sampling point can fall in the middle of the data stream, that is, the optimal sampling time, so as to obtain a valid sampling value.
[0072] By dynamically correcting the count value of the next cycle, the deviation can be compensated in real time to ensure that each sampling point can accurately capture the jump in the data stream, thereby improving the accuracy of the data, reducing communication errors caused by sampling errors, and improving the overall performance of the communication system.
[0073] Combination Figure 5 As shown, the embodiment of the present disclosure provides a Manchester decoding device 50 for a microsecond channel protocol, including a synchronization circuit 501, a filtering circuit 502, a clock generation circuit 503 and an edge detection circuit 504. The synchronization circuit 501 is configured to synchronize a data stream in a Manchester encoding format based on a microsecond channel protocol; the filtering circuit 502 includes a shift register and a sampling counter, and is configured to start counting through the sampling counter when a falling edge appears in the data stream, so as to sample the synchronized data stream and store multiple sampling values in the shift register; in the case where there are identical sampling values in multiple sampling values, the identical sampling values are used as valid sampling values to obtain a target data stream; the clock generation circuit 503 is configured to sample the target data stream through a generated high-frequency clock to obtain a sampling result; wherein the baud rate of the high-frequency clock is determined according to the baud rate of the data stream; the edge detection circuit 504 includes a counter, and is configured to decode the target data stream according to the count value in the sampling result.
[0074] Using the device provided by the embodiment of the present disclosure, the synchronization circuit 501 synchronizes the data stream in the Manchester encoding format based on the MSC protocol to the sampling clock domain to ensure the timing accuracy of the data stream. The filtering circuit 502 performs filtering processing on the synchronized data stream to remove the burrs in the data stream. The clock generation circuit 503 generates a high-frequency clock, and the baud rate of the high-frequency clock is determined according to the baud rate of the data stream to meet the requirements of high-frequency sampling. The target data stream is accurately sampled using the high-frequency clock to obtain the sampling result. Finally, the edge detection circuit 504 decodes the target data stream according to the count value in the sampling result, recovers the original data information, and realizes data synchronization and transmission. The embodiment of the present disclosure can effectively recover accurate clock signals and data from the disturbed data stream, improves the accuracy of data decoding, and can significantly reduce the transmission errors caused by data loss frames, ensuring the stability of data transmission.
[0075] Combination Figure 6 As shown, the embodiment of the present disclosure provides a Manchester decoding device 60 for a microsecond channel protocol, including a processor 600 and a memory 601. Optionally, the device 60 may also include a communication interface 602 and a bus 603. The processor 600, the communication interface 602, and the memory 601 may communicate with each other through the bus 603. The communication interface 602 may be used for information transmission. The processor 600 may call the logic instructions in the memory 601 to execute the Manchester decoding method for the microsecond channel protocol of the above embodiment.
[0076] In addition, the logic instructions in the memory 601 described above can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0077] The memory 601 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor 600 executes the functional application and data processing by running the program instructions / modules stored in the memory 601, that is, the Manchester decoding method for the microsecond channel protocol in the above-mentioned embodiment is implemented.
[0078] The memory 601 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 601 may include a high-speed random access memory and may also include a non-volatile memory.
[0079] The disclosed embodiments provide an electronic device, comprising: an electronic device body, and the above-mentioned Manchester decoding device for the microsecond channel protocol. The Manchester decoding device for the microsecond channel protocol is installed in the electronic device body. The installation relationship described here is not limited to placement inside the electronic device body, but also includes installation connections with other components of the electronic device, including but not limited to physical connections, electrical connections or signal transmission connections. It can be understood by those skilled in the art that the Manchester decoding device for the microsecond channel protocol can be adapted to a feasible electronic device body, thereby realizing other feasible embodiments.
[0080] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes.
[0081] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0082] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0083] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0084] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A Manchester decoding method for microsecond channel protocol, characterized in that: include: Synchronize the data stream in Manchester encoding format based on microsecond channel protocol; When a falling edge appears in the data stream, the sampling counter starts counting to sample the synchronized data stream and store a plurality of sampling values in the shift register; In the case that the same sampling value exists in the multiple sampling values, the same sampling value is taken as a valid sampling value to obtain a target data stream; The target data stream is sampled by the generated high-frequency clock to obtain a sampling result; wherein the baud rate of the high-frequency clock is determined according to the baud rate of the data stream; The target data stream is decoded according to the count value in the sampling result.
2. The Manchester decoding method according to claim 1, characterized in that: The target data stream is sampled by the generated high-frequency clock to obtain sampling results, including: When a falling edge appears in the target data stream, counting is performed; When the count value reaches the set threshold, the current code element is latched as the sampling result; wherein the number of bits of the code element corresponds to the set threshold.
3. The Manchester decoding method according to claim 1, characterized in that: According to the count value in the sampling result, the data stream is decoded, including: When a jump occurs in the data stream, a comparison result between the count value and the expected value is obtained; When the comparison result shows that the count value is consistent with the expected value, the current code element in the sampling result is directly decoded; When the comparison result shows that the count value is inconsistent with the expected value, a deviation result is obtained according to the magnitude of the count value and the expected value, so as to decode the code element in the sampling result using the deviation result.
4. The Manchester decoding method according to claim 3, characterized in that: When the comparison result shows that the count value is inconsistent with the expected value, the deviation result is obtained according to the size of the count value and the expected value, including: When the data stream is a rising edge and the count value is less than the expected value, the deviation result is a left deviation of the rising edge; When the data stream is a rising edge and the count value is greater than the expected value, the deviation result is a rising edge right deviation; When the data stream is a falling edge and the count value is less than the expected value, the deviation result is a left deviation of the falling edge; When the data stream is a falling edge and the count value is greater than the expected value, the deviation result is a falling edge right deviation.
5. The Manchester decoding method according to claim 3, characterized in that: The deviation result is used to decode the codewords in the sampling result, including: Identify the code element with jitter in the sampling result according to the deviation result; According to the preset decoding rules, the jittered code elements are decoded.
6. The Manchester decoding method according to any one of claims 1 to 5, characterized in that: When there are identical sampling values among multiple sampling values, the identical sampling values are taken as valid sampling values, including: After storing multiple sample values in the shift register, the sample counter is reset and the shift register is shifted left by one position; When two sampling values among the three sampling values of the shift register are identical, the identical sampling values are taken as valid sampling values.
7. The Manchester decoding method according to any one of claims 1 to 5, characterized in that: Also includes: According to the current count value, the count value of the next cycle is corrected to make the count value of the next cycle a valid sampling value.
8. A Manchester decoding device for microsecond channel protocol, characterized in that: include: A synchronization circuit configured to synchronize a data stream in a Manchester encoding format based on a microsecond channel protocol; The filtering circuit includes a shift register and a sampling counter, and is configured to start counting through the sampling counter when a falling edge appears in the data stream, so as to sample the synchronized data stream and store a plurality of sampling values in the shift register; When there is an identical sampling value among the multiple sampling values, the identical sampling value is taken as a valid sampling value to obtain a target data stream; A clock generation circuit is configured to sample the target data stream through the generated high-frequency clock to obtain a sampling result; wherein the baud rate of the high-frequency clock is determined according to the baud rate of the data stream; The edge detection circuit includes a counter and is configured to decode the target data stream according to the count value in the sampling result.
9. A Manchester decoding device for a microsecond channel protocol, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the Manchester decoding method for a microsecond channel protocol according to any one of claims 1 to 7 when running the program instructions.
10. An electronic device, characterized in that: include: Electronic device body; The Manchester decoding device for microsecond channel protocol as described in claim 8 or 9 is installed in the electronic device body.
Citation Information
Cited By
FPGA (Field Programmable Gate Array) method for increasing communication distance and stability of communication data
CN121560818A