(1) Field of the Invention
The invention relates to a system and method for data synchronization, and more particularly to a system and method for synchronizing data between circuit boards.
(2) Description of the Prior Art
Refer to
Refer to
The content data 14 may be program codes, digital data, image data, or audio data. It is the main information to be transmitted between the transferring end 2 and the receiving end 4. The recognizing data 12 serves the beginning of the content data 14 in the data string 8. When the receiving end 4 receives the data string 8 and recognizes the recognizing data 12, it treats the follow on data string 8 as the content data 14 and processes accordingly.
However, errors could occur while the receiving end 4 identifies the recognizing data 12. For instance, if the recognizing data 12 is 00001, when the content data 14 also contains 00001, it could be treated mistakenly as the recognizing data 12. This mistaken recognizing may be reduced by increasing the bit number of the recognizing data 12, such as change the previous recognizing data 12 that contains five bits of 00001 to nine bits of 000000001. However, such an approach increases the overhead of data transmission and reduces data transmission efficiency. Moreover, the length of the recognizing data at the transferring end and the receiving end usually are fixed in the same system. For data that is more important or a circuit transmission path that has a longer link, to adjust the length and content of the recognizing data 12 is not flexible.
Therefore it is an object of the present invention to provide a more efficient system and method of data synchronization to overcome the aforesaid problems by adjusting the length and content of the recognizing data.
In one aspect, the present invention aims to provide a system and method for data synchronization to reduce the probability of mistaken recognition of the recognizing data without increasing the bit number thereof so that the transmission efficiency of the content data may be improved.
The system and method for data synchronization according to the present invention is adaptable for transmitting data strings from a transferring end to a receiving end through a data packet. The data packet includes a recognizing data and a content data. The recognizing data includes a guard data and a pattern data. The content data has a selected length, and may be program codes, digital data, image data, or audio data.
The method of the present invention includes the following procedure: first, select the bit number of the pattern data; next, generate a plurality of recognizing data sets according to the guard data and the bit number corresponding to the pattern data.
Transform the recognizing data sets to a plurality of counting data sets through a bit mapping procedure. Derive a plurality of contrast parameters from the counting data sets through a half-autocorrelation procedure.
Select a chosen recognizing data among the recognizing data sets that has the smallest contrast parameter. Finally combine the chosen recognizing data and the content data to form the data packet.
The receiving end compares the chosen recognizing data that has the smallest contrast number with the received transmission data string. When the received transmission data string has data matching the recognizing data, the follow on transmitting data string of a selected length is treated as the content data.
Thus the invention provides a more efficient system and method for data synchronization that uses bit mapping and half-autocorrelation to generate corresponding contrast parameters for all recognizing data and selects the recognizing data with the smallest contrast parameter without increasing the bit number of the recognizing data to reduce the probability of mistaken recognition of the recognizing data. Thereby recognizing accuracy of the content data improves and transmission efficiency of the content data increases.
The present invention will now be specified with reference to its preferred embodiments illustrated in the drawings, in which
Refer to
Referring to
The pattern number recording module 32 aims to register the bit number of the pattern data. The recording bit number is jointly determined by the transferring end and the receiving end. In general, the guard data has a fixed number of bits. But it may be changed through the pattern number recording module 32.
The bit number of the pattern number is determined by the content data. In principle, more important content data are given more bit number of the pattern number. In practice, automatic determination may be made according to the bit number of the content data. When the bit number of the content data increases, the bit number of the corresponding pattern data also increases. Another approach is to treat the program codes and digital data as important content data, while the image data and audio data as less important content data. The important data are given more bit number of the pattern number.
The recognizing data arranging module 34 generates a plurality of recognizing data sets according to the guard data and the bit number corresponding to the pattern data, and arranges the recognizing data sets. More details will be discussed later accompanying
The bit mapping module 36 transforms the recognizing data sets to a plurality of counting data sets through a bit mapping procedure. Details will be discussed later accompanying
The processing module 38 processes the counting data sets through a half-autocorrelation procedure to derive a plurality of corresponding contrast parameters. Details of the half-autocorrelation procedure will be discussed later accompanying
The recognizing data selection module 40 aims to select a chosen recognizing data among the recognizing data sets that has the smallest contrast parameter. The recognizing data arranging module 34 has arranged the sequence of all recognizing data according to a selected sequencing principle to allow the transferring end and the receiving end to produce the same sequence. When the recognizing data selection module 40 recognizes there are two or more equal smallest contrast parameters, the recognizing data with the smallest contrast parameter that is sequenced first is chosen.
Finally, the data combining module 42 combines the chosen recognizing data and the content data to form the data packet for the transferring end to transmit to the receiving end, and to enable both ends to perform recognition and synchronization processes.
In practice, the transferring end and the receiving end can include the recognizing data arranging module 34, bit mapping module 36, processing module 38, and recognizing data selection module 40 so that the receiving end can generate the data packet while the receiving end can recognize the data packet. The pattern number recording module 32 may be located respectively in the transferring end and the receiving end, or externally connected to the transferring end and the receiving end to facilitate defining the bit number of the pattern data in a coincided manner. The data combining module 42 functions only in the transferring end.
Refer to
The recognizing data comparing module 44 aims to compare the chosen recognizing data of the smallest contrast parameter with the transmitting data string received from the transferring end 2. When the received transmitting data string matches the recognizing data, the data packet receiving module 46 treats the follow on transmitting data string as the content data to achieve synchronization of the content data.
Refer to
Referring to
Refer to
Referring to
First, replicate the counting data (−1,−1,1) to become a first counting data (−1,−1,1) D1 and a second counting data (−1,−1,1) D2. Multiply the corresponding bits at the same position of the first counting data D1 and the second counting data D2 and sum up a first counting value V1. In
Referring to
Repeat the processes depicted in
Next, all of the recognizing data arranged by the recognizing data arranging module 34 in the pattern candidate generating shown in
Refer to
In data synchronization system 30, the pattern number recording module 32, recognizing data arranging module 34, bit mapping module 36, processing module 38, recognizing data selection module 40, data combining module 42 and recognizing data comparing module 44 may be application programs (AP) written by C language or assembly language, and stored in the memory (such as ROM or Flash memory). They may be executed in a desired processor (such as a Digital Signal Processor—DSP or Micro Controller Unit—MCU) to perform required functions. They also may be written by Verilog or VHDL language, and compiled and stored in a Complex Programmable Logic Device (CPLD) or FPGA to perform the required functions.
The data synchronization system 30 previously discussed also elaborates the method of the invention. Refer to
Step S02: First, select a bit number of the pattern data, same for the transferring end 2 and the receiving end 4.
Step S04: Generate a plurality of recognizing data sets according to the guard data and the bit number corresponding to the pattern data, and according to a sequence arranged by a selected sequencing principle (such as a numeric number from small to large, i.e. 0 is ahead 1). This step may also be called pattern candidate generating, and must be performed on the transferring end 2 and the receiving end 4 so that they generate the same sequence.
Step S06: Transform the recognizing data sets to a plurality of counting data sets through a bit mapping procedure. This step may be performed respectively at the transferring end 2 and the receiving end 4, and the counting data sets are same at both ends.
Step S08: Process the counting data sets through a half-autocorrelation procedure to derive a plurality of corresponding contrast parameters. This step may be performed respectively at the transferring end 2 and the receiving end 4.
Step S10: Determine whether there are at least two smallest contract parameters of the same value in the recognizing data. This step may be performed respectively at the transferring end 2 and the receiving end 4.
Step S12: If the outcome of Step S10 is positive, select a chosen recognizing data corresponding to the smallest contrast parameter that is sequenced first as the chosen recognizing data. This step may be performed respectively at the transferring end 2 and the receiving end 4.
Step S14: If the outcome of Step S10 is negative, select a chosen recognizing data corresponding to the smallest contrast parameter as the chosen recognizing data. This step may be performed respectively at the transferring end 2 and the receiving end 4.
Step S16: At the transferring end 2, combine the chosen recognizing data and the content data to form the data packet.
Step S18: At the receiving end 4, compare the chosen recognizing data of the smallest contrast parameter with the transmission data string received from the transferring end 2.
Step S20: At the receiving end 4, receive the transmission data string sequentially. When the transmission data string has data same as the recognizing data, a selected length of the follow on data of the transmission data string is treated as the content data.
Thus the data synchronization system 30 and the method thereof is more efficient. Through the bit mapping procedure and the half-autocorrelation process, corresponding contrast parameters may be generated for all recognizing data, and the recognizing data of the smaller contrast parameter may be chosen without increasing the bit number of the recognizing data to reduce error probability of mistaken recognition of the recognizing data. The probability of accurate recognition of the content data improves, and the transmission efficiency of the content data also increases.
While the preferred embodiments of the present invention have been set forth for the purpose of disclosure, modifications of the disclosed embodiments of the present invention as well as other embodiments thereof may occur to those skilled in the art. Accordingly, the appended claims are intended to cover all embodiments which do not depart from the spirit and scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
93109228 | Apr 2004 | TW | national |