CN113839965B - Multi-protocol coprocessor based on CRC (Cyclic redundancy check) check code and processing method thereof - Google Patents

Multi-protocol coprocessor based on CRC (Cyclic redundancy check) check code and processing method thereof Download PDF

Info

Publication number
CN113839965B
CN113839965B CN202111417216.4A CN202111417216A CN113839965B CN 113839965 B CN113839965 B CN 113839965B CN 202111417216 A CN202111417216 A CN 202111417216A CN 113839965 B CN113839965 B CN 113839965B
Authority
CN
China
Prior art keywords
crc
signal
control signal
data
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111417216.4A
Other languages
Chinese (zh)
Other versions
CN113839965A (en
Inventor
招继恩
汪旭
胡建国
邝伟锋
王德明
丁颜玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nexwise Intelligence China Ltd
Original Assignee
Nexwise Intelligence China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nexwise Intelligence China Ltd filed Critical Nexwise Intelligence China Ltd
Priority to CN202111417216.4A priority Critical patent/CN113839965B/en
Publication of CN113839965A publication Critical patent/CN113839965A/en
Application granted granted Critical
Publication of CN113839965B publication Critical patent/CN113839965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Error Detection And Correction (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Detection And Correction Of Errors (AREA)

Abstract

The invention provides a multi-protocol coprocessor based on CRC check codes and a processing method thereof, wherein the coprocessor comprises a protocol selection module, a control module, a data cache module, a calculation module and a data processing module; the protocol selection module is used for receiving an external signal and generating a first control signal according to a transmission protocol of the external signal; the control module is used for generating a second control signal according to whether the received external signal is normal or not; the data caching module is used for caching the data signals in the received external signals according to a second control signal; the calculation module is used for generating a CRC check code according to the cached data signal and caching the CRC check code to the data caching module; and the data processing module is used for comparing and checking the cached CRC code and the data signal and outputting a checking result. The invention improves the CRC checking efficiency and is compatible with various transmission protocols.

Description

Multi-protocol coprocessor based on CRC (Cyclic redundancy check) check code and processing method thereof
Technical Field
The invention relates to the technical field of communication, in particular to a multi-protocol coprocessor based on CRC check codes and a processing method thereof.
Background
In the process of data transmission, even if the transmission path is continuously optimized and improved, errors still occur in the transmitted data, so the accuracy of the transmitted data needs to be checked. In data transmission checking, parity checking and CRC (Cyclic Redundancy Check) are commonly used. CRC checks have better performance than parity checks, while having error checking and correction capabilities that parity checks do not have.
The essence of calculating the CRC check code is a polynomial calculation process. Each calculation requires adding the result of the previous calculation to the present calculation. Specifically, the first step of the calculation is to assign initial values to the calculation part, the definition of the initial values being different in different protocols. And calculating the initial value and the input result according to the polynomial to obtain the CRC check code calculated for the first time. The second step of the calculation is to judge whether the calculation is finished or not, if the calculation is finished, and the result of the previous step of the calculation is a final result; if the calculation is not finished, the calculation is continued, and the result of the previous calculation and the result of the re-input are calculated according to the polynomial to obtain a new calculation result; and repeating the second step until the calculation is completed.
In the calculation process, the calculation unit needs to match initial values calculated by different protocols to ensure the accuracy of the calculation result. Meanwhile, additional functions are required to be added for CRC check. Therefore, the existing coprocessor can only be applied to CRC check of one protocol.
Disclosure of Invention
The invention provides a multi-protocol coprocessor based on a CRC (cyclic redundancy check) code and a processing method thereof, which are used for solving the defect that the coprocessor can only be suitable for CRC of one protocol in the prior art and realizing multi-protocol CRC.
The invention provides a multi-protocol coprocessor based on CRC check codes, which comprises a protocol selection module, a control module, a data cache module, a calculation module and a data processing module, wherein the protocol selection module is used for selecting a protocol to be processed;
the protocol selection module is used for receiving an external signal, generating a first control signal according to a transmission protocol of the external signal, and sending the first control signal to the control module, the calculation module and the data processing module;
the control module is used for generating a second control signal according to whether the received external signal is normal or not after receiving the first control signal, and sending the second control signal to the data cache module, the calculation module and the data processing module;
the data caching module is used for caching the data signals in the received external signals according to the second control signals and sending the cached data signals to the computing module and the data processing module;
the calculation module is used for generating a CRC (cyclic redundancy check) code according to the second control signal, the transmission protocol corresponding to the first control signal and the cached data signal, and outputting the CRC code to the data caching module for caching;
and the data processing module is used for comparing and checking the cached CRC code and the data signal according to the transmission protocol corresponding to the second control signal and the first control signal, and outputting the checking result of the data signal.
According to the multi-protocol coprocessor based on the CRC, the control module is used for acquiring that the external signal is abnormal under the condition of receiving the abnormal signal of the external signal;
and under the condition that the transmission protocol of the external signal is not a preset transmission protocol, acquiring that the external signal is abnormal.
According to the multi-protocol coprocessor based on the CRC, the control module is used for recording the receiving progress of the external signal in a state machine mode;
and under the condition that the receiving progress is 100%, sending the second control signal to the data caching module, the calculating module and the data processing module.
According to the multiprotocol coprocessor based on the CRC provided by the invention, the calculation module is used for:
under the condition that the second control signal is generated according to the normal external signal, for a first parameter value in the data signal, obtaining an initial value corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal, taking the first parameter value and the initial value as the input of a preset polynomial, and taking the output of the preset polynomial as the CRC (cyclic redundancy check) code;
and regarding other parameter values except the first parameter value in the data signal, taking the other parameter values and a CRC check code generated according to the parameter value before the other parameter values as the input of the preset polynomial, and taking the output of the preset polynomial as the CRC check code.
According to the multi-protocol coprocessor based on the CRC provided by the invention, the data processing module is used for:
under the condition that the second control signal is generated according to the normal external signal, acquiring CRC (cyclic redundancy check) time corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
comparing a CRC (cyclic redundancy check) code generated according to the parameter value at any moment in the data signal with a CRC code corresponding to the CRC moment in the data signal under the condition that the any moment in the data signal exists in the CRC moment corresponding to the transmission protocol to obtain a check result;
and the CRC code corresponding to the CRC time is generated by the sending end according to the parameter value of the CRC time in the data signal.
According to the multiprotocol coprocessor provided by the invention and based on the CRC, the calculation module is further used for:
acquiring a preset polynomial corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
and taking the first parameter value and the initial value as the input of a preset polynomial corresponding to the transmission protocol, or taking the CRC check code corresponding to the other parameter values and the previous parameter value as the input of the preset polynomial corresponding to the transmission protocol, and acquiring the CRC check code.
The invention also provides a processing method of the multi-protocol coprocessor based on the CRC, which comprises the following steps:
generating a first control signal according to a transmission protocol of an external signal;
generating a second control signal according to whether the external signal is normal or not;
caching the data signal in the received external signal according to the second control signal;
generating a CRC (cyclic redundancy check) code according to the second control signal, the transmission protocol corresponding to the first control signal and the cached data signal, and caching the CRC code;
and comparing and checking the cached CRC code and the data signal according to the transmission protocol corresponding to the second control signal and the first control signal, and outputting a checking result of the data signal.
According to a processing method provided by the present invention, the generating a CRC check code according to the second control signal, the transmission protocol corresponding to the first control signal, and the buffered data signal includes:
under the condition that the second control signal is generated according to the normal external signal, for a first parameter value in the data signal, obtaining an initial value corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal, taking the first parameter value and the initial value as the input of a preset polynomial, and taking the output of the preset polynomial as the CRC (cyclic redundancy check) code;
and regarding other parameter values except the first parameter value in the data signal, taking the other parameter values and a CRC check code generated according to the parameter value before the other parameter values as the input of the preset polynomial, and taking the output of the preset polynomial as the CRC check code.
According to a processing method provided by the present invention, the comparing and checking the buffered CRC check code and the data signal according to a transmission protocol corresponding to the second control signal and the first control signal, and outputting a check result of the data signal includes:
under the condition that the second control signal is generated according to the normal external signal, acquiring CRC (cyclic redundancy check) time corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
comparing a CRC (cyclic redundancy check) code generated according to the parameter value at any moment in the data signal with a CRC code corresponding to the CRC moment in the data signal under the condition that the any moment in the data signal exists in the CRC moment corresponding to the transmission protocol to obtain a check result;
and the CRC code corresponding to the CRC time is generated by the sending end according to the parameter value of the CRC time in the data signal.
According to a processing method provided by the present invention, the generating a CRC check code according to the second control signal, the transmission protocol corresponding to the first control signal, and the buffered data signal includes:
under the condition that the external signal is normal according to the second control signal, acquiring a preset polynomial corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
and taking the first parameter value and the initial value as the input of a preset polynomial corresponding to the transmission protocol, or taking the CRC check code corresponding to the other parameter values and the previous parameter value as the input of the preset polynomial corresponding to the transmission protocol, and acquiring the CRC check code.
The invention provides a multi-protocol coprocessor based on CRC check codes and a processing method thereof.A protocol selection module sends a control signal to select a protocol, and a control module controls the whole calculation stage so as to control the flow direction of data in time, thereby improving the calculation rate and quickly obtaining a calculation result and a check result; the received data and the generated CRC data signal are cached through the data caching module, a synchronization function is realized, real-time data processing is realized, the data processing rate is improved, and the data processing system is compatible with various transmission protocols.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic structural diagram of a multi-protocol coprocessor based on CRC provided by the present invention;
FIG. 2 is a schematic structural diagram of a protocol selection module in the multi-protocol coprocessor based on CRC provided in the present invention;
FIG. 3 is a schematic structural diagram of a control module in the multi-protocol coprocessor based on CRC provided by the present invention;
FIG. 4 is a schematic structural diagram of a data caching module in the multi-protocol coprocessor based on CRC provided in the present invention;
FIG. 5 is a schematic structural diagram of a computation module in the multi-protocol coprocessor based on CRC provided in the present invention;
FIG. 6 is a schematic structural diagram of a data processing module in the multi-protocol coprocessor based on CRC provided in the present invention;
fig. 7 is a schematic processing flow diagram of the multi-protocol coprocessor based on CRC check code according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The multi-protocol coprocessor based on the CRC check code of the present invention is described below with reference to fig. 1, and includes a protocol selection module 1, a control module 2, a data cache module 3, a calculation module 5, and a data processing module 4;
in order to facilitate signal transmission, the control module 2, the data processing module 4 and the calculation module 5 are respectively connected with the protocol selection module 1; the data cache module 3, the data processing module 4 and the calculation module 5 are respectively connected with the control module 2; the data caching module 3 is respectively connected with the data processing module 4 and the computing module 5.
The protocol selection module 1 is configured to receive an external signal, generate a first control signal according to a transmission protocol of the external signal, and send the first control signal to the control module 2, the calculation module 5, and the data processing module 4;
as shown in fig. 2, the protocol selection module includes a protocol selection unit 11 and a protocol control unit 12. The protocol selection unit 11 receives an external signal sent by a sending end, determines a transmission protocol used by the external signal, and sends the transmission protocol to the protocol control unit 12 to generate a first control signal.
The external signal in this embodiment is a signal sent by a sending end, and is an interactive signal between the sending end and a receiving end, such as a signal requesting to establish a connection with the receiving end.
The protocol selection unit 11 determines the transmission protocol used by the external signal according to the transmission protocol identifier in the external signal. Optionally, logic information in the external signal is identified to convert the transmission protocol identifier into an information data signal representing the information, a transmission protocol used by the external signal is determined, and the first control signal is generated according to the information data signal.
The protocol control unit 12 generates a first control signal according to a transmission protocol used by the external signal, and transmits the first control signal to the control module 2, the data processing module 4, and the calculation module 5. The first control signal is used for controlling the corresponding module to carry out CRC check according to the transmission protocol used by the external signal.
For example, if the transmission protocol identification represents the use of the ISO14443type a transmission protocol, the control calculation module 5 and the data processing module 4 enter the ISO14443type a mode; if the transmission protocol identification represents that the ISO14443TypeB transmission protocol is used, the control calculation module 5 and the data processing module 4 enter an ISO14443TypeB mode; if the transmission protocol identification represents the use of the ISO15693 transmission protocol, the control calculation module 5 and the data processing module 4 enter the ISO15693 mode.
The control module 2 is configured to generate a second control signal according to whether the received external signal is normal or not after receiving the first control signal, and send the second control signal to the data cache module 3, the calculation module 5, and the data processing module 4;
as shown in fig. 3, the control module 2 includes a calculation state unit 21, an abnormality determination unit 22, and a first control unit 23. The first control signal is a trigger condition for the control module 2 to perform the abnormality judgment.
The calculation status unit 21 is configured to determine the progress of reception of the external signal and send the progress of reception of the external signal to the first control unit 23.
The abnormality determination unit 22 determines whether the received external signal is abnormal. If the external signal is an abnormal signal, controlling the first control unit 23 to generate a second control signal according to the external signal received by the abnormality determining unit 22, where the second control signal is a signal for not starting a CRC check operation; otherwise, the first control unit 23 generates a second control signal according to the receiving progress of the external signal, where the second control signal is a signal for starting a CRC check operation. And controlling the caching of the data signal, whether CRC (cyclic redundancy check) code calculation is carried out and whether CRC comparison check is carried out according to the second control signal.
The first control unit 23 sends the generated second control signal to the data buffer module 3, the data processing module 4 and the calculation module 5, respectively, to control the whole CRC check stage, so as to control the flow direction of data in time, thereby improving the calculation rate and obtaining the calculation result and the check result quickly.
The data caching module is used for caching the data signals in the received external signals according to the second control signals and sending the cached data signals to the computing module and the data processing module;
as shown in fig. 4, the data buffer module 3 includes a second control unit 31 and a data buffer unit 32. The second control unit 31 receives a data signal in the external signal and correspondingly sends the data signal to the data buffer unit 32; after receiving the second control signal, the data buffer unit 32 parses the second control signal, and controls the data signal in the external signal to flow into and/or out of the data buffer unit 32. The data signal received by the data caching unit 32 is cached, the outgoing data signal is respectively sent to the data processing module 4 and the calculation module 5, the CRC check code generated by the calculation module 5 is cached, and the CRC check code generated by the calculation module is cached and then sent to the data processing module 4, so that the calculation and check synchronization function is realized, the data processing is performed in real time, and the data processing efficiency is improved.
The calculation module 5 is configured to generate a CRC check code according to the second control signal, the transmission protocol corresponding to the first control signal, and the buffered data signal, and output the CRC check code to the data buffering module for buffering;
as shown in fig. 5, the calculation module 5 includes a fourth control unit 51 and a combinational logic calculation unit 52. After receiving the first control signal and the second control signal, the fourth control unit 51 receives the data signal sent by the data buffer module, and correspondingly sends the data signal to the combinational logic calculation unit 52, so as to control the combinational logic calculation unit 52. After receiving the data signal, the combinational logic calculating unit 52 performs combinational logic calculation on the received data signal, and outputs and sends the generated CRC check code to the data buffer module 3 for buffering.
And the data processing module is used for comparing and checking the cached CRC code and the data signal according to the transmission protocol corresponding to the second control signal and the first control signal, and outputting the checking result of the data signal.
As shown in fig. 6, the data processing module 4 includes a third control unit 41 and a data comparison unit 42. The third control unit 41 receives the first control signal, the second control signal and the data signal, and sends them to the data comparing unit 42, so as to control the data comparing unit 42; after receiving the first control signal, the second control signal and the data signal, the data comparing unit 42 performs comparison and verification processing on the received data signal, and outputs a verification result.
In the embodiment, the protocol selection module sends the control signal to select the protocol, and the control module controls the whole calculation stage so as to control the flow direction of data in time, thereby improving the calculation rate and quickly obtaining the calculation result and the verification result; the received data and the generated CRC data signal are cached through the data caching module, a synchronization function is realized, real-time data processing is realized, the data processing rate is improved, and the data processing system is compatible with various transmission protocols.
On the basis of the foregoing embodiment, in this embodiment, the control module is configured to learn that the external signal is abnormal when receiving an abnormal signal of the external signal; and under the condition that the transmission protocol of the external signal is not a preset transmission protocol, acquiring that the external signal is abnormal.
Specifically, if the external device knows that the external signal is an abnormal signal through the early warning judgment, the external device sends the abnormal signal of the external signal to the abnormality judgment unit 22. The abnormality judgment unit 22 determines that the external signal is abnormal if an abnormal signal of the external signal is received.
The abnormality judgment unit 22 determines that the external signal is abnormal if the transmission protocol used for the external signal is determined not to be the preset transmission protocol by matching.
The external signal includes a data signal and an abnormal signal. If an abnormality signal is received, the abnormality signal is sent to the abnormality determination unit 22. After receiving the abnormal signal, the abnormality determining unit 22 determines whether the abnormal signal is abnormal, so as to determine whether the first control unit 23 is controlled by the abnormal signal to generate the second control signal, or the first control unit 23 generates the second control signal according to the data signal received by the abnormal signal, so that the coprocessor can be controlled by the external abnormal signal, or by the internal computing unit, thereby effectively improving the computing rate and ensuring the accuracy of the computing process.
It should be noted that when the abnormality determination unit 22 determines an abnormal signal, the logic information carried in the abnormal signal may be identified, so that the abnormal signal is translated into an information data signal representing the information, which is sent to the first control unit 23, and after it is further convenient to determine that there is no abnormality, the first control unit 23 generates a second control signal according to the data signal of the information.
On the basis of the above embodiment, in this embodiment, the control module is configured to record the receiving progress of the external signal in a state machine; and under the condition that the receiving progress is 100%, sending the second control signal to the data caching module, the calculating module and the data processing module.
The calculation state unit 21 includes a calculation state machine, and the calculation state machine records the receiving progress of the external signal by means of the state machine, and controls the output direction of the external signal after entering the control module 2.
And after receiving the external signal, the state machine judges the receiving progress of the external signal. For example, the reception progress of the external signal is obtained by dividing the number of parameter values of the currently received external signal by the total number of all parameter values of the external signal. If the reception progress is 100%, that is, the external signal is completely received, the data signal among the external signals is transmitted to the first control unit 23.
On the basis of the foregoing embodiments, in this embodiment, the calculation module is configured to: under the condition that the second control signal is generated according to the normal external signal, for a first parameter value in the data signal, obtaining an initial value corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal, taking the first parameter value and the initial value as the input of a preset polynomial, and taking the output of the preset polynomial as the CRC (cyclic redundancy check) code;
and the calculation module performs CRC check code calculation when receiving the second control signal and determining that the second control signal is generated according to the normal external signal. Each transmission protocol corresponds to a different initial value calculated by the CRC check code. The data signal is independent of time and dependent on some parameter indicative of the data, such as amplitude, frequency or phase. The parameter value in the data signal is the value of a certain parameter in the data signal at a certain moment.
And the transmission protocol is pre-associated with the initial value, when the first CRC calculation is carried out on the data signal, the corresponding initial value is selected for calculation according to the transmission protocol corresponding to the data signal and the first control signal, and only the data signal is acquired from the cache.
And regarding other parameter values except the first parameter value in the data signal, taking the other parameter values and a CRC check code generated according to the parameter value before the other parameter values as the input of the preset polynomial, and taking the output of the preset polynomial as the CRC check code.
When the data signal is subjected to non-first CRC check code calculation, calculation is carried out according to the data signal and the CRC check code calculated last time, and the data signal and the CRC check code calculated last time are simultaneously obtained from the cache.
On the basis of the foregoing embodiments, in this embodiment, the data processing module is configured to: under the condition that the external signal is normal according to the second control signal, acquiring CRC (cyclic redundancy check) time corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
in order to reduce the calculation amount of the verification, parameter values at partial time are selected from the data signals to be verified. The parameter values selected for each transmission protocol differ in time.
Comparing a CRC (cyclic redundancy check) code generated according to the parameter value at any moment in the data signal with a CRC code corresponding to the CRC moment in the data signal under the condition that the any moment in the data signal exists in the CRC moment corresponding to the transmission protocol to obtain a check result; and the CRC code corresponding to the CRC time is generated by the sending end according to the parameter value of the CRC time in the data signal.
The data signal sent by the sending end not only comprises the parameter value to be transmitted, but also comprises a CRC check code generated by performing CRC check on the parameter value at the appointed time. For example, the parameter values of the last two time instants are subjected to CRC check, and the generated CRC check code is placed at the end of the data signal.
When the CRC check code of one parameter value is generated, whether the time corresponding to the parameter value is the selected time is judged, if yes, the parameter value can be checked directly, and checking is not needed after the CRC check codes of all the parameter values are calculated, so that the checking efficiency is improved.
On the basis of the foregoing embodiment, in this embodiment, the calculating module is further configured to: acquiring a preset polynomial corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal; and taking the first parameter value and the initial value as the input of a preset polynomial corresponding to the transmission protocol, or taking the CRC check code corresponding to the other parameter values and the previous parameter value as the input of the preset polynomial corresponding to the transmission protocol, and acquiring the CRC check code.
The present embodiment performs CRC checks using different polynomials for different transport protocols. For example, the ISO14443 transmission protocol uses a polynomial of
Figure 125005DEST_PATH_IMAGE001
. The same check parts among the transmission protocols are integrated, and different check parts among the transmission protocols are checked differently according to the transmission protocols and the corresponding relations thereof.
The processing method of the multi-protocol coprocessor based on the CRC check code according to the present invention is described below, and the processing method of the multi-protocol coprocessor based on the CRC check code described below and the multi-protocol coprocessor based on the CRC check code described above may be referred to in correspondence with each other.
As shown in fig. 7, the processing method of the multiprotocol coprocessor based on the CRC check code in this embodiment includes: step 701, generating a first control signal according to a transmission protocol of an external signal;
step 702, generating a second control signal according to whether the external signal is normal or not;
step 703, caching the data signal in the received external signal according to the second control signal;
step 704, generating a CRC check code according to the second control signal, the transmission protocol corresponding to the first control signal, and the buffered data signal, and buffering the CRC check code;
step 705, comparing and checking the buffered CRC check code and the data signal according to the transmission protocol corresponding to the second control signal and the first control signal, and outputting a check result of the data signal.
In the embodiment, the control signal is generated according to the external signal to select the protocol, and the control signal is generated according to whether the external signal is normal or not to control the whole calculation stage, so that the flow direction of data is controlled in time, the calculation rate is improved, and the calculation result and the verification result are obtained quickly; the received data and the generated CRC data signal are cached to realize the synchronization function so as to realize the real-time processing of the data, thereby improving the data processing rate and being compatible with various transmission protocols.
On the basis of the foregoing embodiment, in this embodiment, the generating a CRC check code according to the transmission protocol corresponding to the second control signal and the first control signal and the buffered data signal includes: under the condition that the second control signal is generated according to the normal external signal, for a first parameter value in the data signal, obtaining an initial value corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal, taking the first parameter value and the initial value as the input of a preset polynomial, and taking the output of the preset polynomial as the CRC (cyclic redundancy check) code;
and regarding other parameter values except the first parameter value in the data signal, taking the other parameter values and a CRC check code generated according to the parameter value before the other parameter values as the input of the preset polynomial, and taking the output of the preset polynomial as the CRC check code.
On the basis of the foregoing embodiment, in this embodiment, the performing comparison check on the buffered CRC check code and the data signal according to the transmission protocol corresponding to the second control signal and the first control signal, and outputting a check result of the data signal includes: under the condition that the second control signal is generated according to the normal external signal, acquiring CRC (cyclic redundancy check) time corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
comparing a CRC (cyclic redundancy check) code generated according to the parameter value at any moment in the data signal with a CRC code corresponding to the CRC moment in the data signal under the condition that the any moment in the data signal exists in the CRC moment corresponding to the transmission protocol to obtain a check result;
and the CRC code corresponding to the CRC time is generated by the sending end according to the parameter value of the CRC time in the data signal.
On the basis of the foregoing embodiment, in this embodiment, the generating a CRC check code according to the transmission protocol corresponding to the second control signal and the first control signal and the buffered data signal includes: under the condition that the external signal is normal according to the second control signal, acquiring a preset polynomial corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
and taking the first parameter value and the initial value as the input of a preset polynomial corresponding to the transmission protocol, or taking the CRC check code corresponding to the other parameter values and the previous parameter value as the input of the preset polynomial corresponding to the transmission protocol, and acquiring the CRC check code.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A multi-protocol coprocessor based on CRC check codes is characterized by comprising a protocol selection module, a control module, a data cache module, a calculation module and a data processing module;
the protocol selection module is used for receiving an external signal, generating a first control signal according to a transmission protocol of the external signal, and sending the first control signal to the control module, the calculation module and the data processing module;
the control module is used for generating a second control signal according to whether the received external signal is normal or not after receiving the first control signal, and sending the second control signal to the data cache module, the calculation module and the data processing module;
the data caching module is used for caching the data signals in the received external signals according to the second control signals and sending the cached data signals to the computing module and the data processing module;
the calculation module is used for generating a CRC (cyclic redundancy check) code according to the second control signal, the transmission protocol corresponding to the first control signal and the cached data signal, and outputting the CRC code to the data caching module for caching;
and the data processing module is used for comparing and checking the cached CRC code and the data signal according to the transmission protocol corresponding to the second control signal and the first control signal, and outputting the checking result of the data signal.
2. The multi-protocol coprocessor based on the CRC check code according to claim 1, wherein the control module is configured to learn that the external signal is abnormal when an abnormal signal of the external signal is received;
and under the condition that the transmission protocol of the external signal is not a preset transmission protocol, acquiring that the external signal is abnormal.
3. The multi-protocol coprocessor based on CRC code according to claim 1, wherein the control module is used to record the receiving progress of the external signal in a state machine manner;
and under the condition that the receiving progress is 100%, sending the second control signal to the data caching module, the calculating module and the data processing module.
4. The CRC check code based multiprotocol coprocessor of any of claims 1-3, wherein the computation module is configured to:
under the condition that the second control signal is generated according to the normal external signal, for a first parameter value in the data signal, obtaining an initial value corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal, taking the first parameter value and the initial value as the input of a preset polynomial, and taking the output of the preset polynomial as the CRC (cyclic redundancy check) code;
and regarding other parameter values except the first parameter value in the data signal, taking the other parameter values and a CRC check code generated according to the parameter value before the other parameter values as the input of the preset polynomial, and taking the output of the preset polynomial as the CRC check code.
5. The CRC check code based multiprotocol coprocessor of any of claims 1-3, wherein the data processing module is configured to:
under the condition that the second control signal is generated according to the normal external signal, acquiring CRC (cyclic redundancy check) time corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
comparing a CRC (cyclic redundancy check) code generated according to the parameter value at any moment in the data signal with a CRC code corresponding to the CRC moment in the data signal under the condition that the any moment in the data signal exists in the CRC moment corresponding to the transmission protocol to obtain a check result;
and the CRC code corresponding to the CRC time is generated by the sending end according to the parameter value of the CRC time in the data signal.
6. The CRC check code based multiprotocol coprocessor of claim 4, wherein the calculation module is further configured to:
acquiring a preset polynomial corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
and taking the first parameter value and the initial value as the input of a preset polynomial corresponding to the transmission protocol, or taking the CRC check code corresponding to the other parameter values and the previous parameter value as the input of the preset polynomial corresponding to the transmission protocol, and acquiring the CRC check code.
7. A processing method of a multi-protocol coprocessor based on CRC check code according to any of claims 1 to 6, comprising:
generating a first control signal according to a transmission protocol of an external signal;
generating a second control signal according to whether the external signal is normal or not;
caching the data signal in the received external signal according to the second control signal;
generating a CRC (cyclic redundancy check) code according to the second control signal, the transmission protocol corresponding to the first control signal and the cached data signal, and caching the CRC code;
and comparing and checking the cached CRC code and the data signal according to the transmission protocol corresponding to the second control signal and the first control signal, and outputting a checking result of the data signal.
8. The processing method according to claim 7, wherein the generating a CRC check code according to the second control signal, the transmission protocol corresponding to the first control signal, and the buffered data signal comprises:
under the condition that the second control signal is generated according to the normal external signal, for a first parameter value in the data signal, obtaining an initial value corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal, taking the first parameter value and the initial value as the input of a preset polynomial, and taking the output of the preset polynomial as the CRC (cyclic redundancy check) code;
and regarding other parameter values except the first parameter value in the data signal, taking the other parameter values and a CRC check code generated according to the parameter value before the other parameter values as the input of the preset polynomial, and taking the output of the preset polynomial as the CRC check code.
9. The processing method according to claim 7, wherein the comparing and checking the buffered CRC code and the data signal according to the transmission protocol corresponding to the second control signal and the first control signal, and outputting the check result of the data signal comprises:
under the condition that the second control signal is generated according to the normal external signal, acquiring CRC (cyclic redundancy check) time corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
comparing a CRC (cyclic redundancy check) code generated according to the parameter value at any moment in the data signal with a CRC code corresponding to the CRC moment in the data signal under the condition that the any moment in the data signal exists in the CRC moment corresponding to the transmission protocol to obtain a check result;
and the CRC code corresponding to the CRC time is generated by the sending end according to the parameter value of the CRC time in the data signal.
10. The processing method according to claim 8, wherein the generating a CRC check code according to the second control signal, the transmission protocol corresponding to the first control signal, and the buffered data signal comprises:
under the condition that the external signal is normal according to the second control signal, acquiring a preset polynomial corresponding to a transmission protocol according to the transmission protocol corresponding to the first control signal;
and taking the first parameter value and the initial value as the input of a preset polynomial corresponding to the transmission protocol, or taking the CRC check code corresponding to the other parameter values and the previous parameter value as the input of the preset polynomial corresponding to the transmission protocol, and acquiring the CRC check code.
CN202111417216.4A 2021-11-26 2021-11-26 Multi-protocol coprocessor based on CRC (Cyclic redundancy check) check code and processing method thereof Active CN113839965B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111417216.4A CN113839965B (en) 2021-11-26 2021-11-26 Multi-protocol coprocessor based on CRC (Cyclic redundancy check) check code and processing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111417216.4A CN113839965B (en) 2021-11-26 2021-11-26 Multi-protocol coprocessor based on CRC (Cyclic redundancy check) check code and processing method thereof

Publications (2)

Publication Number Publication Date
CN113839965A CN113839965A (en) 2021-12-24
CN113839965B true CN113839965B (en) 2022-02-01

Family

ID=78971474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111417216.4A Active CN113839965B (en) 2021-11-26 2021-11-26 Multi-protocol coprocessor based on CRC (Cyclic redundancy check) check code and processing method thereof

Country Status (1)

Country Link
CN (1) CN113839965B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115484323A (en) * 2022-08-03 2022-12-16 和芯星通科技(北京)有限公司 Device and method for checking multiple instruction protocol codes
CN116126747B (en) * 2023-04-17 2023-07-25 上海云脉芯联科技有限公司 Caching method, caching architecture, heterogeneous architecture and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6427179B1 (en) * 1997-10-01 2002-07-30 Globespanvirata, Inc. System and method for protocol conversion in a communications system
CN101783688A (en) * 2010-03-05 2010-07-21 苏州和迈微电子技术有限公司 Design method of 64-bit parallel multi-mode CRC code generation circuit
CN106200561A (en) * 2016-07-31 2016-12-07 上海新时达电气股份有限公司 Coder controller and collocation method
WO2017121334A1 (en) * 2016-01-12 2017-07-20 中兴通讯股份有限公司 Data-processing method and device
CN113452381A (en) * 2020-03-26 2021-09-28 上海大学 CRC implementation system based on FPGA

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6427179B1 (en) * 1997-10-01 2002-07-30 Globespanvirata, Inc. System and method for protocol conversion in a communications system
CN101783688A (en) * 2010-03-05 2010-07-21 苏州和迈微电子技术有限公司 Design method of 64-bit parallel multi-mode CRC code generation circuit
WO2017121334A1 (en) * 2016-01-12 2017-07-20 中兴通讯股份有限公司 Data-processing method and device
CN106200561A (en) * 2016-07-31 2016-12-07 上海新时达电气股份有限公司 Coder controller and collocation method
CN113452381A (en) * 2020-03-26 2021-09-28 上海大学 CRC implementation system based on FPGA

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Design and implementation of fiber channel based high speed serial transmitter for data protocol on FPGA;Padmavathi Narapureddy;《2016 IEEE International Conference on Recent Trends in Electronics, Information & Communication Technology (RTEICT)》;20170109;第926-931页 *
基于FPGA的CRC算法的实现;顾文斌;《计算机与现代化》;20080515(第5期);第111-113页 *

Also Published As

Publication number Publication date
CN113839965A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
CN113839965B (en) Multi-protocol coprocessor based on CRC (Cyclic redundancy check) check code and processing method thereof
JP5689544B2 (en) A novel combination of error correction and error detection for transmitting digital data
KR0175111B1 (en) Error correction apparatus and method
JP5084832B2 (en) Transmitting apparatus and communication system
WO2022116088A1 (en) Firmware data processing method and apparatus
CN107483157A (en) A kind of CRC check method and system based on FPGA
US10014981B2 (en) Transmission method and device based on management data input/output multi-source agreements
CN109981671B (en) Data processing method based on encryption machine and encryption machine
CN109286471B (en) CRC (Cyclic redundancy check) method and device for SRIO (serial peripheral input/output) controller
JP2006254429A (en) Method and means for checking fault-free transmission data
JP5250505B2 (en) Mobile communication device test system and test method
JP2006505983A (en) Format detection
US20120044954A1 (en) Communication device
US11675717B2 (en) Transmission of diagnostic and/or parameter data between a control module and an input/output module
CN113411198B (en) Communication method and device based on dual channels and RSSP-I, electronic equipment and storage medium
EP1187342A2 (en) Signal processing apparatus and method, and recording medium
US6948110B2 (en) Transmission data loss detection system
CN112005508B (en) Information processing device, information processing method, and computer-readable recording medium
CN103401638B (en) Dispensing device and communication system
KR102119764B1 (en) Appartus and method for transmiting/receiving message packet in vehicle
US20100064056A1 (en) Communication system and method
CN110740009B (en) Data transmission checking device and method
CN117785782A (en) Data detection method, device, equipment and medium based on NVMe 2.0 protocol
JP3549702B2 (en) Bus control circuit and test method thereof
US8020067B2 (en) Apparatus and method for detecting an end point of an information frame

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant