Supercharge Your Innovation With Domain-Expert AI Agents!

Method and device for calculating CRC value of any data

A data and numerical technology, which is applied in the field of CRC value calculation method and device for arbitrary data, can solve the problems of low efficiency and long time consumption of CRC check code, and achieve saving of hardware resources, fast calculation speed, and less hardware resource occupation Effect

Pending Publication Date: 2021-11-05
SUZHOU LANGCHAO INTELLIGENT TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Among them, the serial calculation uses the cyclic calculation of the CRC check code of the data sequence bit by bit, and the serial calculation processes 1 bit data sequence per clock cycle. When the data sequence is long, the calculation of the CRC check code takes a long time and is inefficient.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for calculating CRC value of any data
  • Method and device for calculating CRC value of any data
  • Method and device for calculating CRC value of any data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0056] refer to figure 1 As shown, this embodiment provides a method for calculating the CRC value of arbitrary data, including:

[0057] S100, performing zero padding on high bits of the data sequence to obtain the target data sequence, the length of the target data sequence being an integer multiple of the width of the parallel operation module;

[0058] In the specific implementation process, refer to figure 2 As shown, the process of padding the high bits of the data sequence to obtain the target data sequence includes:

[0059] S101, obtain the length N of the data sequence; when many existing communication protocols perform data encapsulation and transmission, the length information of the data sequence will be stored in the set bit of the encapsulation data, such as the data length information stored in the Ethernet frame, by reading Get the data in the set bit to get the length of the data sequence.

[0060] S102, dividing the length N of the data sequence by the w...

Embodiment 2

[0146] refer to Figure 5 As shown, this embodiment provides a device for calculating the CRC value of arbitrary data, including a data sequence parameter processing module, the data sequence parameter processing module is used to obtain the length of the data sequence, and divide the length of the data sequence by the parallel operation module Get and save the quotient and remainder of the width;

[0147] A zero padding module, the zero padding module is used to obtain the remainder from the data sequence parameter processing module and use the remainder to calculate the number of zero padding, perform zero padding at the high position of the data sequence according to the number of zero padding, and generate the target data sequence for storage;

[0148] A grouping module, the grouping module is used to group the target data sequence generated by the zero padding module into several sub-target data sequences according to the width of the parallel computing module;

[0149] ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a method and device for calculating a CRC value of any data, and the method comprises the steps: carrying out the zero padding of a high order of a data sequence, and obtaining a target data sequence, the length of the target data sequence being an integral multiple of the width of a parallel operation module; dividing the target data sequence into a plurality of ordered sub-target data sequences by taking the width of the parallel operation module as a stepping length; defining and initializing a CRC value; sequentially inputting the sub-target data sequences into the parallel operation module to calculate CRC values until the last sub-target data sequence is processed, enabling the parallel operation module to realize a CRC parallel iteration formula, the CRC parallel iteration formula being as follows: the current CRC value is equal to CRCk (the previous CRC value, the input sub-target data sequence)^correction value, wherein when the first sub-target data sequence is substituted, the previous CRC value is equal to the initialized CRC value. According to the method, the CRC value calculation can be carried out on the data with any length by utilizing the parallel calculation module with the fixed bit width, the occupied resources of calculation are few, and the speed is high.

Description

technical field [0001] The present application relates to the field of CRC calculation methods, in particular to a method and device for calculating CRC values ​​of arbitrary data. Background technique [0002] CRC check is an important method to check whether there is an error in the data sequence during the communication process. The principle is to calculate the y-bit check code sequence (CRC code) of the transmitted x-width data sequence according to the CRC calculation rule, and combine the x-width data sequence and the y-bit check code sequence to send. After the data is transmitted, check the x-width data sequence and y-bit check code to determine whether there is an error in the data sequence. [0003] In the prior art, methods for calculating CRC check codes include serial calculation and parallel calculation. Among them, the serial calculation uses the cyclic calculation of the CRC check code of the data sequence bit by bit, and the serial calculation processes a...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/10
CPCG06F11/1004Y02D10/00
Inventor 张旭佑
Owner SUZHOU LANGCHAO INTELLIGENT TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More