CN113050519A - CRC 16-based single-bit error correction FPGA implementation method - Google Patents

CRC 16-based single-bit error correction FPGA implementation method Download PDF

Info

Publication number
CN113050519A
CN113050519A CN202110344958.2A CN202110344958A CN113050519A CN 113050519 A CN113050519 A CN 113050519A CN 202110344958 A CN202110344958 A CN 202110344958A CN 113050519 A CN113050519 A CN 113050519A
Authority
CN
China
Prior art keywords
data
bit
module
value
crc
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.)
Granted
Application number
CN202110344958.2A
Other languages
Chinese (zh)
Other versions
CN113050519B (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.)
Shandong Institute of Commerce and Technology
Original Assignee
Shandong Institute of Commerce and Technology
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 Shandong Institute of Commerce and Technology filed Critical Shandong Institute of Commerce and Technology
Priority to CN202110344958.2A priority Critical patent/CN113050519B/en
Publication of CN113050519A publication Critical patent/CN113050519A/en
Application granted granted Critical
Publication of CN113050519B publication Critical patent/CN113050519B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Detection And Correction Of Errors (AREA)

Abstract

The invention relates to a single-bit error correction FPGA implementation method based on CRC16, which comprises a data cache module, a read cache control module, an error judgment arbitration module and a sending control module, wherein the error judgment arbitration module comprises a CRC calculation module, a Hash mapping module and an error query judgment module.

Description

CRC 16-based single-bit error correction FPGA implementation method
Technical Field
The invention relates to the technical field of computers, in particular to a data transmission processing technology, and specifically relates to a single-bit error correction FPGA implementation method based on CRC 16.
Background
Today in the big data era, higher requirements are placed on security and efficiency of data transmission. The main point in security is the correctness of data transmission. The transmission efficiency is that less bandwidth is occupied under the condition of transmitting the same data, namely more data is transmitted under the condition of constant bandwidth. If the data transmission is wrong, the data needs to be retransmitted, which occupies extra bandwidth, resulting in reduced transmission efficiency. Today, electronic devices are so popular that electromagnetic interference exists everywhere, which causes great disadvantages to the security of data transmission, and also puts higher demands on data transmission and processing equipment.
CRC (cyclic redundancy check) is an important linear block code, not only has a very strong transmission error detection capability, but also is easily implemented inside an FPGA (field programmable gate array) by using a parallel processing method. The method is particularly suitable for positioning single-bit errors in high-speed data transmission.
In order to identify and correct abnormal errors generated in the data transmission process, a data sending party needs to add redundant information of data and effective data to send to a receiving party together, so that the receiving party can judge whether the data transmission is abnormal or not and correct the errors in the abnormal process. As shown in fig. 1, the prior art process is as follows:
(1) after receiving the data, the receiving device firstly carries out CRC operation on the data part;
(2) the CRC value computed by the receiving device is compared to the received CRC value. If the data are the same, the transmission is normal; if not, jumping to the step (3) to look up the table;
(3) and using the calculated CRC value as a retrieval address of the RAM for table lookup. The look-up table yields whether it is a singleton norm or a multi-bit anomaly and gives the anomaly bit in the case of singleton norms.
The prior art is divided into two types of implementation in a CPU (central processing unit) and an FPGA (field programmable gate array), the CPU can not implement parallel processing of data, the efficiency is low, the implementation scheme of the FPGA usually processes data information and redundancy check information separately at a receiving end, the time delay is increased, the data processing efficiency is reduced, a CRC (cyclic redundancy check) value obtained by calculation is used as a retrieval address of a RAM (random access memory) in the table look-up process, and the data bit width is large, so that too many on-chip RAMs and logic resources of the FPGA are occupied, and the resource waste is caused. The existing scheme has low efficiency and large resource consumption.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a simple and efficient single-bit error correction FPGA implementation method based on CRC16 for single-bit abnormal errors in the high-speed data transmission process.
The invention is realized by the following technical scheme, and provides a single-bit error correction FPGA realization method based on CRC16, which comprises a data cache module, a read cache control module, an error judgment arbitration module and a sending control module, and is characterized in that the error judgment arbitration module comprises a CRC calculation module, a Hash (Hash function) mapping module and an error query judgment module, and the process is as follows:
(1) data sent from a network is sent to a data caching module through a mac layer to realize caching of the data;
(2) when the read cache control module judges that data exist in the cache module, reading cached data information and redundant information and sending the data information and the redundant information to the CRC calculation module;
(3) performing CRC calculation on the data information and the redundant information by using a CRC calculation module, indicating that data transmission is normal when the calculation result is 0, and directly returning the normal result to the read cache control module; when the calculation result is not 0, indicating that the data transmission is abnormal, and sending the CRC calculation result to a Hash mapping module;
(4) hash mapping module instantiating a depth of 2n+1The RAM is n + m in width, wherein n is the bit width of the unique normal position serial number; m is the bit width of the data obtained by the CRC calculation module, and the Hash mapping module converts the CRC value into shorter data serving as an index value for retrieving the data of the corresponding address of the RAM;
(5) and the error query judging module receives the data sent by the hash mapping module in real time. If the value is 0, the multi-bit exception is indicated; if not, the data is represented as the abnormal position of the single bit of the current data. The judgment result is sent to the sending control module.
(6) And the sending control module controls the data to be directly sent and discarded or to be subjected to single-bit turnover correction for sending according to the returned result.
Preferably, the initialization method of the RAM in the step (4) is as follows:
firstly, initializing data under an address corresponding to a hash index value corresponding to a single-bit error are a single-bit normal position serial number (high n-bit data) and a corresponding CRC value (low m-bit data);
when the hash value conflicts, carrying out XOR operation on the hash value of n +1 bits and the low n +1 bits of the CRC value to obtain a value which is used as an address again, and storing the current single-bit abnormal position serial number (high n-bit data) and the corresponding CRC value (low m-bit data) under the address change;
and all the rest addresses are initialized to 0.
Preferably, the data processing flow of the module in the step (4) is as follows:
reading out data under the address according to the index address;
judging data:
A. if the low m bit data under the address is 0, indicating that the multi-bit is abnormal, sending the high n bit 0 to an error query judgment module;
B. if the low m-bit data under the address is equal to the CRC value currently used for hash operation, the position serial number of the high n-bit is sent to an error query judgment module;
C. and if not, performing XOR operation on the hash value of the n +1 bit and the lower n +1 bit of the CRC value, taking the obtained value as the address again, and jumping to the step B.
In summary, the invention sends the data information and the redundant information to the CRC calculation module for Hash operation, thereby reducing the delay in the data processing and judging processes, and reducing the data bit width, i.e. reducing the address space for data retrieval.
Drawings
FIG. 1 is a block diagram of data transmission in the prior art;
FIG. 2 is a block diagram of the transmission error determination module according to the present invention;
FIG. 3 is a schematic diagram of the correction process when the ratio is more specific in the present invention.
Detailed Description
In order to clearly illustrate the technical features of the present invention, the present invention is further illustrated by the following detailed description with reference to the accompanying drawings.
The receiver-side check code calculated value is only related to the transmission error and the generator polynomial, and is not related to the transmitted information data. With respect to the above conclusions, a brief explanation is given of CRC-16 with a production polynomial of x16+ x12+ x5+1, as shown in Table 1.
TABLE 1 CRC values for single bit errors
Figure BDA0003000365910000031
Figure BDA0003000365910000041
In this embodiment, as shown in fig. 2 and fig. 3, the method for implementing a single-bit error correction FPGA based on CRC16 includes a data cache module, a read cache control module, an error judgment arbitration module, and a sending control module, and is characterized in that the error judgment arbitration module includes a CRC calculation module, a Hash mapping module, and an error query judgment module, and the process is as follows:
(1) data sent from a network is sent to a data caching module through a mac layer to realize caching of the data;
(2) when the read cache control module judges that data exist in the cache module, reading cached data information and redundant information and sending the data information and the redundant information to the CRC calculation module;
(3) performing CRC calculation on the data information and the redundant information by using a CRC calculation module, indicating that data transmission is normal when the calculation result is 0, and directly returning the normal result to the read cache control module; when the calculation result is not 0, indicating that the data transmission is abnormal, and sending the CRC calculation result to a Hash mapping module;
(4) h Hash mapping module, instantiating a depth of 2n+1The RAM is n + m in width, wherein n is the bit width of the unique normal position serial number; m is the bit width of the data obtained by the CRC calculation module, and the Hash mapping module converts the CRC value into shorter data serving as an index value for retrieving the data of the corresponding address of the RAM;
(5) and the error query judging module receives the data sent by the hash mapping module in real time. If the value is 0, the multi-bit exception is indicated; if not, the data is represented as the abnormal position of the single bit of the current data. The judgment result is sent to the sending control module.
(6) And the sending control module controls the data to be directly sent and discarded or to be subjected to single-bit turnover correction for sending according to the returned result.
In this embodiment, the method for initializing the RAM in step (4) is as follows:
firstly, initializing data under an address corresponding to a hash index value corresponding to a single-bit error are a single-bit normal position serial number (high n-bit data) and a corresponding CRC value (low m-bit data);
when the hash value conflicts, carrying out XOR operation on the hash value of n +1 bits and the low n +1 bits of the CRC value to obtain a value which is used as an address again, and storing the current single-bit abnormal position serial number (high n-bit data) and the corresponding CRC value (low m-bit data) under the address change;
and all the rest addresses are initialized to 0.
The data processing flow of the module in the step (4) is as follows:
reading out data under the address according to the index address;
judging data:
A. if the low m bit data under the address is 0, indicating that the multi-bit is abnormal, sending the high n bit 0 to an error query judgment module;
B. if the low m-bit data under the address is equal to the CRC value currently used for hash operation, the position serial number of the high n-bit is sent to an error query judgment module;
C. and if not, performing XOR operation on the hash value of the n +1 bit and the lower n +1 bit of the CRC value, taking the obtained value as the address again, and jumping to the step B.
Finally, it should be further noted that the above examples and descriptions are not limited to the above embodiments, and technical features of the present invention that are not described may be implemented by or using the prior art, and are not described herein again; the above embodiments and drawings are only for illustrating the technical solutions of the present invention and not for limiting the present invention, and the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that changes, modifications, additions or substitutions within the spirit and scope of the present invention may be made by those skilled in the art without departing from the spirit of the present invention, and shall also fall within the scope of the claims of the present invention.

Claims (3)

1. A single-bit error correction FPGA implementation method based on CRC16 comprises a data cache module, a read cache control module, an error judgment arbitration module and a sending control module, and is characterized in that the error judgment arbitration module comprises a CRC calculation module, a Hash mapping module and an error query judgment module, and the process is as follows:
(1) data sent from a network is sent to a data caching module through a mac layer to realize caching of the data;
(2) when the read cache control module judges that data exist in the cache module, reading cached data information and redundant information and sending the data information and the redundant information to the CRC calculation module;
(3) performing CRC calculation on the data information and the redundant information by using a CRC calculation module, indicating that data transmission is normal when the calculation result is 0, and directly returning the normal result to the read cache control module; when the calculation result is not 0, indicating that the data transmission is abnormal, and sending the CRC calculation result to a Hash mapping module;
(4) hash mapping module instantiating a depth of 2n+1The RAM is n + m in width, wherein n is the bit width of the unique normal position serial number; m is the bit width of the data obtained by the CRC calculation module, and the Hash mapping module converts the CRC value into shorter data serving as an index value for retrieving the data of the corresponding address of the RAM;
(5) and the error query judging module receives the data sent by the hash mapping module in real time. If the value is 0, the multi-bit exception is indicated; if not, the data is represented as the abnormal position of the single bit of the current data. The judgment result is sent to the sending control module.
(6) And the sending control module controls the data to be directly sent and discarded or to be subjected to single-bit turnover correction for sending according to the returned result.
2. The method for implementing the single-bit error correction FPGA based on the CRC16 of claim 1, wherein the initialization method of the RAM in the step (4) is as follows:
firstly, initializing data under an address corresponding to a hash index value corresponding to a single-bit error are a single-bit normal position serial number (high n-bit data) and a corresponding CRC value (low m-bit data);
when the hash value conflicts, carrying out XOR operation on the hash value of n +1 bits and the low n +1 bits of the CRC value to obtain a value which is used as an address again, and storing the current single-bit abnormal position serial number (high n-bit data) and the corresponding CRC value (low m-bit data) under the address change;
and all the rest addresses are initialized to 0.
3. The method for implementing the single-bit error correction FPGA based on the CRC16 of claim 2, wherein the data processing flow of the module in the step (4) is as follows:
reading out data under the address according to the index address;
judging data:
A. if the low m bit data under the address is 0, indicating that the multi-bit is abnormal, sending the high n bit 0 to an error query judgment module;
B. if the low m-bit data under the address is equal to the CRC value currently used for hash operation, the position serial number of the high n-bit is sent to an error query judgment module;
C. and if not, performing XOR operation on the hash value of the n +1 bit and the lower n +1 bit of the CRC value, taking the obtained value as the address again, and jumping to the step B.
CN202110344958.2A 2021-03-31 2021-03-31 CRC 16-based single-bit error correction FPGA implementation method Active CN113050519B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110344958.2A CN113050519B (en) 2021-03-31 2021-03-31 CRC 16-based single-bit error correction FPGA implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110344958.2A CN113050519B (en) 2021-03-31 2021-03-31 CRC 16-based single-bit error correction FPGA implementation method

Publications (2)

Publication Number Publication Date
CN113050519A true CN113050519A (en) 2021-06-29
CN113050519B CN113050519B (en) 2022-04-12

Family

ID=76516905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110344958.2A Active CN113050519B (en) 2021-03-31 2021-03-31 CRC 16-based single-bit error correction FPGA implementation method

Country Status (1)

Country Link
CN (1) CN113050519B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113904754A (en) * 2021-09-29 2022-01-07 山东云海国创云计算装备产业创新中心有限公司 CRC error correction method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829099A (en) * 2006-01-20 2006-09-06 北京华环电子股份有限公司 Single-bit error correction and form-checking method based on CRC and its circuit
CN101232348A (en) * 2006-10-04 2008-07-30 马维尔国际贸易有限公司 Method and device for error correcting using cyclic redundancy check
US20080288845A1 (en) * 2007-05-15 2008-11-20 Texas Instruments Incorporated Range Extension and Noise Mitigation For Wireless Communication Links Utilizing a CRC Based Single and Multiple Bit Error Correction Mechanism
CN106788878A (en) * 2015-11-24 2017-05-31 中国航空工业第六八研究所 A kind of Parallel CRC error correction method with monobit errro correction function
CN107330047A (en) * 2017-06-28 2017-11-07 华信塞姆(成都)科技有限公司 A kind of FPGA training and enquiry circuit implementation method based on perfect hash algorithm
CN111327397A (en) * 2020-01-21 2020-06-23 武汉大学 Longitudinal redundancy check error correction coding and decoding method for information data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829099A (en) * 2006-01-20 2006-09-06 北京华环电子股份有限公司 Single-bit error correction and form-checking method based on CRC and its circuit
CN101232348A (en) * 2006-10-04 2008-07-30 马维尔国际贸易有限公司 Method and device for error correcting using cyclic redundancy check
US20080288845A1 (en) * 2007-05-15 2008-11-20 Texas Instruments Incorporated Range Extension and Noise Mitigation For Wireless Communication Links Utilizing a CRC Based Single and Multiple Bit Error Correction Mechanism
CN106788878A (en) * 2015-11-24 2017-05-31 中国航空工业第六八研究所 A kind of Parallel CRC error correction method with monobit errro correction function
CN107330047A (en) * 2017-06-28 2017-11-07 华信塞姆(成都)科技有限公司 A kind of FPGA training and enquiry circuit implementation method based on perfect hash algorithm
CN111327397A (en) * 2020-01-21 2020-06-23 武汉大学 Longitudinal redundancy check error correction coding and decoding method for information data

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
D. YUN, G. NING, D. ZAIWANG: ""CRC Look-up Table Optimization for Single-Bit Error Correction"", 《TSINGHUA SCIENCE AND TECHNOLOGY》 *
于翔等: "基于FPGA的MAC层地址表设计与仿真", 《计算机工程与设计》 *
李列文等: "一种基于FPGA的低功耗、容错状态机设计方法", 《湖南大学学报(自然科学版)》 *
毛劲松等: "一种高速FPGA配置电路设计", 《复旦学报(自然科学版)》 *
田芳等: "利用数据冗余性的高速缓存压缩校验技术", 《小型微型计算机***》 *
韩骥宇等: "具有单比特纠错功能的并行CRC实现方法", 《大众科技》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113904754A (en) * 2021-09-29 2022-01-07 山东云海国创云计算装备产业创新中心有限公司 CRC error correction method and related device

Also Published As

Publication number Publication date
CN113050519B (en) 2022-04-12

Similar Documents

Publication Publication Date Title
US10572164B2 (en) Systems and methods for improving efficiencies of a memory system
CN1083189C (en) Method and apparatus for decoder optimization
Dai et al. Bloom filter with noisy coding framework for multi-set membership testing
US7350131B2 (en) Error protecting groups of data words
US7535908B2 (en) Method for data transfer
TWI524355B (en) Error correction mechanisms for 8-bit memory devices
TW201105049A (en) Multiple compression techniques for packetized information
KR20180031572A (en) Method of operating memory device, memory device using the same and memory system including the device
CN105190766A (en) Memory device having error correction logic
US11669466B2 (en) Memory module data object processing systems and methods
CN103531246B (en) The memorizer error correction method quickly write with reading
US12019516B2 (en) Instant write scheme with delayed parity/raid
CN113050519B (en) CRC 16-based single-bit error correction FPGA implementation method
KR20230021949A (en) Memory device and operating method thereof
CN115632665B (en) Storage verification system and server
US11146352B2 (en) Message correction and dynamic correction adjustment for communication systems
CN115016981A (en) Setting method of storage area, data reading and writing method and related device
CN111601342B (en) Bit error-based low-speed wireless personal area network error data packet recovery method
US8045459B2 (en) Packet processing method for wireless communications
JPH0685793A (en) Transmission error detection system
US11978525B2 (en) Base die, memory system, and semiconductor structure
US20230134961A1 (en) Base die, memory system, and semiconductor structure
US6738945B2 (en) Signal transmission device and method for avoiding transmission error
CN118113511A (en) Data error control method, system, device, electronic equipment and storage medium
CN114157306A (en) Correction method and correction system for comma detection and byte alignment

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