Data processing method and device, electronic device and computer readable storage medium
Through cyclic redundancy verification technology, the accompanying formula is generated and the error type and location is determined, and error correction is achieved, which solves the problem of insufficient memory error correction capabilities in low-cost application scenarios, and improves data transmission efficiency and system stability.
Patent Information
- Application Number
- CN202411187106.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-08
AI Technical Summary
In the low-cost application scenarios, the memory error correction capability is insufficient, especially when random errors occur frequently in link transmission, resulting in system stability and availability.
Cyclic redundant verification (CRC) technology is used to generate companion formulas, and the data error type and location are determined through XOR operation and lookup tables, which can correct errors of memory data, reduce the number of retransmissions, and improve data transmission efficiency.
Effectively correct data errors and improve data transmission efficiency. It is suitable for low-cost scenarios that do not support Error Correcting Code (ECC) technology, reducing power consumption and bandwidth waste and improving system stability.
Smart Images

Figure CN118916210A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to a data processing method and apparatus, an electronic device, and a computer-readable storage medium. Background Art
[0002] Memory, such as Double Data Rate (DDR) memory, is subject to interference from environmental factors such as electromagnetic interference during operation, which can lead to memory errors. For example, for users with high stability requirements, memory errors can cause fatal problems.
[0003] Memory errors can be categorized into three types based on severity: correctable errors (CE), uncorrectable errors (UE), and undetectable errors. Sources of these errors include errors introduced during link transmission, potential flips caused by unstable hold times in memory chips, and circuit failures.
[0004] For example, in situations where high system stability is required, memory sticks with Error Correcting Code (ECC) are used. The memory controller of the processor (e.g., CPU) generates an ECC code while writing data to the memory stick. This code is then stored together with the data being written. When reading data, the data and the ECC code are read together, and the ECC code is used for error correction. This method protects the entire data flow and is one of the most reliable data protection methods. However, this method requires increasing the total number of memory chips (e.g., adding memory chips to store the ECC code), which significantly increases cost and power consumption. Summary of the Invention
[0005] At least one embodiment of the present disclosure provides a data processing method, comprising: receiving first data and a first cyclic redundancy check code of the first data; performing a cyclic redundancy check operation on the first data to generate a second cyclic redundancy check code; generating a syndrome based on the first cyclic redundancy check code and the second cyclic redundancy check code; and performing error correction on the first data based on the syndrome.
[0006] For example, according to a data processing method of at least one embodiment of the present disclosure, performing error correction on first data based on a syndrome includes: determining whether there is an error in the first data based on the syndrome; and correcting the first data in response to determining that there is an error in the first data.
[0007] For example, according to a data processing method of at least one embodiment of the present disclosure, in response to determining that an error exists in the first data, the first data is corrected, including: in response to determining that an error exists in the first data, determining whether the error is a correctable error based on a syndrome value of a syndrome; and in response to the error being a correctable error, determining an error location of the error, and correcting the data at the error location.
[0008] For example, according to at least one embodiment of the present disclosure, a data processing method generates a syndrome based on a first cyclic redundancy check code and a second cyclic redundancy check code, including: performing an XOR operation on the first cyclic redundancy check code and the second cyclic redundancy check code to generate a syndrome; and determining whether there is an error in the first data based on the syndrome, including: determining that there is no error in the first data in response to the syndrome being 0; and determining that there is an error in the first data in response to the syndrome being not 0.
[0009] For example, according to a data processing method of at least one embodiment of the present disclosure, determining whether an error is a correctable error and determining the error position of the error based on the syndrome value of the syndrome includes: determining whether the error is a correctable error and determining the error position of the error through the syndrome value and a lookup table, wherein the lookup table records a target syndrome value characterizing the error as a correctable error and a corresponding target error position.
[0010] For example, according to at least one embodiment of the present disclosure, a data processing method for determining whether an error is a correctable error and determining an error position of the error through a syndrome value and a lookup table includes: indexing the lookup table based on the syndrome value to determine whether the syndrome value hits a target syndrome value; and in response to a hit, determining that the error is a correctable error and determining the target error position corresponding to the syndrome value in the lookup table as the error position; or in response to a miss, determining that the error is an uncorrectable error.
[0011] For example, according to the data processing method of at least one embodiment of the present disclosure, in response to the error being an uncorrectable error, an error signal is output.
[0012] For example, according to the data processing method of at least one embodiment of the present disclosure, in response to the error being a correctable error, the data at the error position is corrected, including: in response to the error being a correctable error, flipping the bit at the error position to obtain the first data after error correction.
[0013] For example, the data processing method according to at least one embodiment of the present disclosure further includes: in response to determining that there is no error in the first data, using the first data as error-corrected first data.
[0014] For example, the data processing method according to at least one embodiment of the present disclosure further includes: outputting only the data corresponding to the data code in the first data after error correction, and not outputting the data corresponding to the cyclic redundancy check code in the first data after error correction.
[0015] For example, according to the data processing method of at least one embodiment of the present disclosure, the data processing method is applied to the 5th generation double data rate memory standard, and the cyclic redundancy check operation includes utilizing the cyclic redundancy check generation algorithm defined in the protocol of the 5th generation double data rate memory standard.
[0016] For example, according to the data processing method of at least one embodiment of the present disclosure, the first data and the first cyclic redundancy check code are received via transmission of the link, and the first cyclic redundancy check code before transmission is generated by performing a cyclic redundancy check operation on the first data before transmission.
[0017] At least one embodiment of the present disclosure provides a data processing device, comprising: a cyclic redundancy check (CRC) generation module configured to: receive first data; perform a CRC operation on the first data to generate a second CRC code; and a CRC error correction module configured to: receive a first CRC code of the first data; generate a syndrome based on the first CRC code and the second CRC code; and perform error correction on the first data based on the syndrome.
[0018] For example, according to a data processing device of at least one embodiment of the present disclosure, in order to correct errors in the first data based on the syndrome, the cyclic redundancy check error correction module is further configured to: determine whether there is an error in the first data based on the syndrome; and correct the first data in response to determining that there is an error in the first data.
[0019] For example, according to the data processing device of at least one embodiment of the present disclosure, in order to correct the first data in response to determining that an error exists in the first data, the cyclic redundancy check error correction module is further configured to: in response to determining that an error exists in the first data, determine whether the error is a correctable error based on the syndrome value of the syndrome; and in response to the error being a correctable error, determine the error position of the error and correct the data at the error position.
[0020] For example, in a data processing device according to at least one embodiment of the present disclosure, in order to determine whether an error is a correctable error and determine the error position of the error based on the syndrome value of the syndrome, the cyclic redundancy check error correction module is further configured to: determine whether the error is a correctable error and determine the error position of the error through the syndrome value and a lookup table, wherein the lookup table records a target syndrome value characterizing the error as a correctable error and a corresponding target error position.
[0021] For example, according to the data processing device of at least one embodiment of the present disclosure, in order to correct the data at the error position in response to the error being a correctable error, the cyclic redundancy check error correction module is also configured to: in response to the error being a correctable error, flip the bits at the error position to obtain the first data after error correction.
[0022] For example, according to the data processing device of at least one embodiment of the present disclosure, in order to generate a syndrome based on the first cyclic redundancy check code and the second cyclic redundancy check code, the cyclic redundancy check error correction module is further configured to: perform an XOR operation on the first cyclic redundancy check code and the second cyclic redundancy check code to generate the syndrome; in order to determine whether there is an error in the first data based on the syndrome, the cyclic redundancy check error correction module is further configured to: determine that there is no error in the first data in response to the syndrome being 0; and determine that there is an error in the first data in response to the syndrome not being 0.
[0023] For example, according to the data processing device of at least one embodiment of the present disclosure, the data processing device is a memory controller or a memory.
[0024] For example, according to a data processing device of at least one embodiment of the present disclosure, the data processing device is applied to DDR5, and the cyclic redundancy check operation includes utilizing a cyclic redundancy check generation algorithm defined in a protocol of DDR5.
[0025] At least one embodiment of the present disclosure provides an electronic device comprising at least one processing unit and a memory; wherein the memory stores computer-readable instructions and is communicatively connected to the at least one processing unit; and the at least one processing unit is configured to execute the computer-readable instructions stored in the memory to implement the data processing method described above.
[0026] At least one embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions. When a processor executes the computer-readable instructions, the data processing method described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings of the embodiments of the present disclosure. Obviously, the drawings described below only relate to some embodiments of the present disclosure, and are not intended to limit the present disclosure.
[0028] Figure 1 A schematic diagram showing an exemplary memory controller reading and writing DDR5 DRAM;
[0029] Figure 2 A flowchart of a data processing method according to at least one embodiment of the present disclosure is shown;
[0030] Figure 3 A schematic diagram of a data processing device 300 according to at least one embodiment of the present disclosure is shown;
[0031] Figure 4 A schematic diagram illustrating a CRC error correction architecture according to at least one embodiment of the present disclosure is shown;
[0032] Figure 5 A schematic diagram illustrating the distribution of data bits and CRC in a single DDR5 memory chip according to at least one embodiment of the present disclosure is shown;
[0033] Figure 6 A schematic diagram of an exemplary CRC check module is shown;
[0034] Figure 7 A schematic diagram of a CRC error correction module according to at least one embodiment of the present disclosure is shown;
[0035] Figure 8 A schematic diagram illustrating the use of CRC error correction in a 32-bit DDR5 channel according to at least one embodiment of the present disclosure is shown;
[0036] Figure 9 A schematic diagram illustrating an electronic device according to at least one embodiment of the present disclosure is shown;
[0037] Figure 10 A schematic diagram illustrating a computer-readable storage medium according to at least one embodiment of the present disclosure is shown;
[0038] Figure 11 A schematic diagram illustrating another electronic device according to at least one embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0039] Reference will now be made in detail to specific embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. Although the present disclosure will be described in conjunction with specific embodiments, it will be understood that the disclosure is not intended to be limited to the described embodiments. On the contrary, it is intended to cover variations, modifications, and equivalents within the spirit and scope of the present disclosure as defined by the appended claims. It should be noted that the method operations described herein can be implemented by any functional block or functional arrangement, and any functional block or functional arrangement can be implemented as a physical entity or a logical entity, or a combination of the two.
[0040] In order to enable those skilled in the art to better understand the present disclosure, the present disclosure is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0041] Note that the examples described below are merely specific examples and are not intended to limit the embodiments of the present disclosure to the specific configurations, hardware, connections, operations, values, conditions, data, sequences, etc. shown and described. Those skilled in the art can apply the concepts of the present disclosure to construct further embodiments not described herein by reading this specification.
[0042] The terms used in this disclosure are those commonly used in the art currently in consideration of the functions of the present disclosure, but these terms may vary according to the intentions of those skilled in the art, precedents, or new technologies in the art. In addition, specific terms may be selected by the applicant, and in such cases, their detailed meanings will be described in the detailed description of the present disclosure. Therefore, the terms used in the specification should not be understood as simple names, but rather as a general description based on the meaning of the terms and the present disclosure.
[0043] Flowcharts are used in this disclosure to illustrate the operations performed by the systems according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, the various steps may be processed in reverse order or simultaneously, as needed. Furthermore, other operations may be added to these processes, or one or more operations may be removed from these processes.
[0044] First, the abbreviations and related terms involved in this application are defined and explained.
[0045] DDR (Double Data Rate): Double data rate.
[0046] DDR5: The fifth generation of Double Data Rate memory standard.
[0047] DDR SDRAM: Double data rate synchronous dynamic random access memory, commonly known as DDR.
[0048] ECC (Error Check Correction): Error correction code or error correction coding is a technology that can implement "error checking and correction", which can improve the stability of computer operation and increase reliability.
[0049] CE (Correctable Error): Correctable error. CE refers to errors that can be corrected by the hardware (chip) based on the ECC algorithm used by the hardware. Due to different memory controller designs, the ability to correct errors may vary. For example, in the memory controller of a mainstream x86 server (which supports memory modules with ECC), any error within a memory chip with a 4-bit data width (X4 width / bit width) is correctable during a read operation. If a memory group (rank) is composed of memory chips with an 8-bit data width (X8 width / bit width), its correction capability remains consistent with the memory chips and positions of the X4 width. In a memory chip with an X8 width, including 8 bits of data from DQ0-7, only DQ0-3 or DQ4-7 can be corrected.
[0050] UE (Uncorrectable Error): Uncorrectable error. UE refers to an error that cannot be corrected by the hardware (chip) based on the ECC algorithm used by itself. For example, in a read operation, the erroneous data bits are distributed in the range of memory particles with different X4 widths, that is, an error occurs across memory particles. From the perspective of existing memory control design, this is an uncorrectable error. For another example, a memory group is composed of memory particles with an X8 width, and its correction capability is still consistent with the memory particles and positions with an X4 width. In a memory particle with an X8 width, if the error position is, for example, DQ2-5, although it is an X4 width, the position does not correspond to the X4 width, where the error position DQ2-3 corresponds to an X4 bit width, and the error position DQ4-5 corresponds to another X4 bit width, that is, when the error position of a memory particle spans different X4 bit widths, it cannot be corrected. For example, if a memory group is composed of memory chips with a width of X8, its correction capability remains consistent with that of memory chips with a width of X4 and their positions. In an X8 memory chip, if it is, for example, DQ0-4, the wrong bit width (X5 in this case) exceeds the correctable bit width (X4) and cannot be corrected.
[0051] CRC (Cyclic Redundancy Check): Cyclic redundancy check is a fast algorithm that generates a short, fixed-bit check code based on data. It is mainly used to detect or check errors that may occur during data transmission or storage.
[0052] It is understood that the terms defined above are merely exemplary definitions in specific application scenarios to facilitate a better understanding of the present application, and the present disclosure is not limited thereto. For example, the exemplary definitions described above for a specific memory can be extended to other types of memory or other storage. For another example, the exemplary definitions described above do not exclude their conventional meanings in the field.
[0053] The inventors of the present application realize that in low-cost application scenarios, there is a need to not use a memory with an ECC function.
[0054] For example, in low-cost application scenarios, memory sticks with ECC are generally not used. On-chip ECC (on-die-ECC) technology has been introduced in DDR5 memory particles (referred to as particles). This is an error correction method implemented inside the memory particles. The written data is also used to generate the ECC code, which is then stored together with the data to be written. The ECC code is used for error correction during reading, and the corrected data is then sent out from the memory particles. This technology can greatly reduce the potential reversal caused by the unstable retention time in the memory particles, thereby protecting the data inside the memory particles. Although this technology provides a certain degree of protection for the data inside the memory particles, random errors on the data transmission link (referred to as "link") are not within the protection range of on-die-ECC. Therefore, not using memory sticks with ECC will still result in a large number of errors on the link not being directly corrected.
[0055] For example, random errors often occur during transmission on high-speed links. This is because the link speed is increasing, which poses greater challenges to signal integrity. The bit error rate is generally used as an indicator to evaluate link reliability. For example, the maximum link bit error rate specified in the DDR5 protocol is 10^-16. At this level of link reliability, if DDR5 runs continuously at a rate of tens of GB / s, it will encounter a link transmission error every few hours. This error interval is completely unacceptable, so DDR5 also defines CRC check.
[0056] For example, the general process of CRC verification is that the link transmitter generates a CRC code via a CRC generation module, and the link receiver verifies the CRC code. If the CRC verification fails, the link transmitter initiates a retransmission request or reports the UE to the system. CRC verification can only protect the data on the link. For example, during the data reading process, if the data initially sent to the link has errors (such as errors caused by voltage flips within the memory chip), the link transmitter will directly use the erroneous data to generate a CRC code. If no random errors occur during the transmission process, the CRC verification will pass. In the absence of ECC chips, the read erroneous data will be sent directly to the system (the upper level system of the memory controller, such as the CPU or cache).
[0057] Figure 1 A schematic diagram showing an exemplary memory controller reading and writing DDR5 DRAM.
[0058] See also Figure 1 , the memory controller 102 can perform data read / write operations with the memory particles 104 via the link.
[0059] The memory controller 102 and the memory chip 104 may respectively have a CRC generation module 106 and a CRC generation module 108 for performing CRC calculation on corresponding data or executing corresponding algorithms to generate CRC codes.
[0060] The memory controller 102 and the memory chip 104 may respectively include a CRC check module 110 and a CRC check module 112 for performing CRC check.
[0061] like Figure 1 The CRC codes in the DDR5 link shown can be divided into read CRC (Write CRC) and write CRC (Read CRC), which correspond to the read and write directions respectively. Generally, the read CRC and write CRC codes are generated using the same CRC algorithm.
[0062] exist Figure 1 In the illustrated memory system, an exemplary write process generally involves memory controller 102 performing a CRC calculation on the data (Wdata) to be transmitted to memory chip 104 via CRC generation module 106 to obtain a WCRC code serving as a checksum. Memory controller 102 then transmits the data and WCRC code to memory chip 104. Memory chip 104 then performs a CRC calculation on the received data via CRC generation module 108 (or CRC check module 112) to obtain a CRC code. Memory chip 104 then performs a consistency comparison between the received WCRC code and the calculated CRC code via CRC check module 112, thereby performing a CRC check. If the CRC check passes, e.g., the received WCRC code and the calculated CRC code are consistent, indicating that the data is error-free, memory chip 104 may store the read data in its storage array 114. If the CRC check fails, e.g., the received WCRC code and the calculated CRC code are inconsistent, indicating that the data is error-free, CRC check module 112 sends a retransmission request to CRC generation module 106, prompting the memory controller to retransmit the data Wdata to the memory controller.
[0063] The reading process is similar to the above-mentioned writing process, except that the sender and receiver of the data and the direction of data transmission are opposite. For example, the sender of the data is changed from the memory controller 102 to the memory particle 104, and the receiver of the data is changed from the memory particle 104 to the memory controller 102, and the data Wdata transmitted between the two will be changed to Rdata, and the WCRC code will be changed to RCRC code. In order to avoid blurring this application, it will not be described here. It will be understood that in order to facilitate the distinction between the CRC check process between the reading and writing processes, the CRC check between the reading and writing processes will be referred to as read CRC check and write CRC check respectively.
[0064] The inventors of the present application have realized that, in the above Figure 1 In the memory system shown, CRC is generally used only to detect errors, and after the error is detected, the error is overcome by retransmission.
[0065] Taking the memory controller 102 reading data from the memory chip 104 as an example, after an error is detected through the read CRC check, it is generally believed that the data is still stored "intact" (i.e., without error) in the memory chip 104. The correct data can be obtained by rereading it once by the receiving end. Therefore, if an error is detected through the read CRC check, the memory controller 102 will generally send a retransmission request to read the data at this address from the memory chip 104 again.
[0066] However, the aforementioned retransmissions result in a significant amount of bandwidth being wasted. For example, retransmissions require resending instructions (such as retransmission requests) before the transmitter can resend the data based on these instructions. During this time, the link is unable to function properly. Furthermore, retransmissions also incur significant power consumption overhead. Furthermore, if the link is severely interfered with for a period of time, the bit error rate may increase significantly. In this case, the data retransmitted during this period may not be completely correct, resulting in each CRC check failing. The number of retransmission requests reaches the upper limit set by the system, and ultimately, the UE can only be reported to the system. Although errors can always be detected in this way, the system may eventually crash, seriously affecting its stability and availability.
[0067] At least one embodiment of the present application provides a data processing method and device, an electronic device, and a computer-readable storage medium, which can correct data errors, improve data transmission efficiency, and achieve data protection in, for example, low-cost scenarios.
[0068] Figure 2 FIG2 shows a flow chart of a data processing method 200 according to at least one embodiment of the present disclosure. Figure 2 The described data processing method 200 and its additional aspects may be implemented in a data processing device, electronic device, hardware structure, software structure, or a combination of hardware and software described below.
[0069] See also Figure 2 , the data processing method 200 includes steps S210 to S240.
[0070] In step S210 , first data and a first cyclic redundancy check code of the first data are received.
[0071] It can be understood that the transmission of data can be carried out via a data transmission link (link).
[0072] In some embodiments, the first data may be data transmitted between a data sender and a data receiver. For example, the first data may be data transmitted between a memory controller and a memory (including a memory cell).
[0073] In step S220, a cyclic redundancy check operation is performed on the first data to generate a second cyclic redundancy check code.
[0074] A cyclic redundancy check (CRC) operation on the first data can generate a short fixed-bit check code corresponding to the first data, ie, the second cyclic redundancy check code.
[0075] In step S230, a syndrome is generated based on the first cyclic redundancy check code and the second cyclic redundancy check code.
[0076] The syndrome data can thus indicate the consistency between the first cyclic redundancy check code and the second cyclic redundancy check code, and thus can indicate whether there is an error in the first data.
[0077] In step S240 , error correction is performed on the first data based on the syndrome.
[0078] In some embodiments, when there is an error in the data, since the syndrome can represent information about the error, the error can be corrected on the first data by, for example, bit flipping or other operations.
[0079] As described above, the data processing method according to at least one embodiment of the present disclosure can correct data errors by using the syndrome data obtained based on two CRC codes. Figure 1 Compared with the idea that the CRC used in the memory architecture described above can generally only be used for error detection, the data processing method according to at least one embodiment of the present disclosure can use CRC for error correction, thereby correcting data errors.
[0080] In other additional aspects, for example, see e.g. Figure 1 Compared to the memory architecture described above, which uses retransmissions to avoid errors, the data processing method according to at least one embodiment of the present disclosure can use CRC for error correction, thereby reducing the number of retransmissions and improving data transmission efficiency. For another example, the data processing method according to at least one embodiment of the present disclosure can use CRC for error correction, and thus can be applied to low-cost scenarios that do not support ECC technology, thereby achieving data protection in low-cost scenarios.
[0081] Some exemplary additional aspects of the data processing method according to at least one embodiment of the present disclosure are described below.
[0082] For example, according to a data processing method of at least one embodiment of the present disclosure, performing error correction on first data based on a syndrome includes: determining whether there is an error in the first data based on the syndrome; and performing error correction on the first data in response to determining that there is an error in the first data.
[0083] In this way, the data processing method according to at least one embodiment of the present disclosure can correct erroneous data.
[0084] For example, according to a data processing method of at least one embodiment of the present disclosure, in response to determining that an error exists in the first data, the first data is corrected, including: in response to determining that an error exists in the first data, determining whether the error is a correctable error based on a syndrome value of a syndrome; and in response to the error being a correctable error, determining an error location of the error, and correcting the data at the error location.
[0085] In this way, the data processing method according to at least one embodiment of the present disclosure can determine whether the type of data error is a correctable error and the error location of the correctable error based on the syndrome, and correct the data at the error location, thereby correcting the data error.
[0086] In an additional or alternative embodiment, in response to determining that an error exists in the first data, error correction is performed on the first data, including: in response to determining that an error exists in the first data, determining whether the error is an uncorrectable error based on the syndrome value of the syndrome; and in response to the error being a correctable error, optionally determining the error location of the error and correcting the data at the error location. That is, the data processing method according to at least one embodiment of the present disclosure can also partially correct uncorrectable errors. For example, for a memory, when the correctable error is a 1-bit error in each x4 memory chip, for a 2-bit error in a certain x4 memory chip, the data processing method according to at least one embodiment of the present disclosure can correct the 1-bit error of the x4 memory chip. In terms of the appendix, other algorithms or redundant information can be combined to achieve error correction of the remaining errors, thereby achieving error correction of uncorrectable errors.
[0087] For example, according to at least one embodiment of the present disclosure, a data processing method generates a syndrome based on a first cyclic redundancy check code and a second cyclic redundancy check code, including: performing an XOR operation on the first cyclic redundancy check code and the second cyclic redundancy check code to generate a syndrome; and determining whether there is an error in the first data based on the syndrome, including: determining that there is no error in the first data in response to the syndrome being 0; and determining that there is an error in the first data in response to the syndrome being not 0.
[0088] In this way, the data processing method according to at least one embodiment of the present disclosure can simply obtain the syndrome through an XOR operation, thereby determining whether there is an error in the data based on the syndrome.
[0089] In additional or alternative embodiments, other operations (such as XOR, addition, subtraction, etc.) may be performed on the first cyclic redundancy check code and the second cyclic redundancy check code to generate a syndrome, and the presence of an error in the data may be adaptively determined based on the corresponding syndrome value. For example, an XOR operation may be performed on the first cyclic redundancy check code and the second cyclic redundancy check code to generate a syndrome. If the syndrome is all 1s, it is determined that the first data does not have an error. If the syndrome is not all 1s, it is determined that the first data has an error.
[0090] For example, according to a data processing method of at least one embodiment of the present disclosure, determining whether an error is a correctable error and determining the error position of the error based on the syndrome value of the syndrome includes: determining whether the error is a correctable error and determining the error position of the error through the syndrome value and a lookup table, wherein the lookup table records a target syndrome value characterizing the error as a correctable error and a corresponding target error position.
[0091] Thus, the data processing method according to at least one embodiment of the present disclosure can determine the error type and error location through a lookup table. In additional aspects, for example, for data transmitted between a memory and a memory controller, since the data corresponds to the pins of a specific memory chip, the relationship between the obtained syndrome value and the error location is generally fixed. In this case, the error type and error location can be efficiently obtained through a pre-obtained lookup table.
[0092] In additional or alternative embodiments, the type and location of the error may be determined by hardware logic (eg, a processor) or other circuitry.
[0093] In additional or alternative embodiments, the lookup table may selectively record part or all of the target syndrome values indicating that the error is an uncorrectable error, or the lookup table may selectively record part or all of the target syndrome values indicating that no error exists.
[0094] For example, according to at least one embodiment of the present disclosure, a data processing method for determining whether an error is a correctable error and determining an error position of the error through a syndrome value and a lookup table includes: indexing the lookup table based on the syndrome value to determine whether the syndrome value hits a target syndrome value; and in response to a hit, determining that the error is a correctable error and determining the target error position corresponding to the syndrome value in the lookup table as the error position; or in response to a miss, determining that the error is an uncorrectable error.
[0095] In this way, the data processing method according to at least one embodiment of the present disclosure can determine the type and location of an error by indexing a lookup table using a syndrome value.
[0096] For example, the data processing method according to at least one embodiment of the present disclosure further includes: outputting an error signal in response to the error being an uncorrectable error.
[0097] In this way, the data processing method according to at least one embodiment of the present disclosure can output an uncorrectable error, for example, instructing a technician to perform corresponding operations, such as replacing corresponding components or adjusting the environment that caused the data error.
[0098] For example, according to a data processing method of at least one embodiment of the present disclosure, in which, in response to the error being a correctable error, the data at the error position is corrected, the method includes: in response to the error being a correctable error, flipping the bit at the error position to obtain the first data after error correction.
[0099] In this way, the data processing method according to at least one embodiment of the present disclosure can correct the data at the error position, thereby obtaining the error-corrected data.
[0100] In additional or alternative embodiments, the bit at the error position may be flipped by performing an XOR operation on the first data and the data at the error position, thereby obtaining error-corrected data.
[0101] For example, the data processing method according to at least one embodiment of the present disclosure further includes: in response to determining that there is no error in the first data, using the first data as error-corrected first data.
[0102] In this way, the data processing method according to at least one embodiment of the present disclosure can avoid unnecessary error correction operations on data without errors, thereby saving corresponding computing overhead.
[0103] For example, the data processing method according to at least one embodiment of the present disclosure further includes: outputting only the data corresponding to the data code in the first data after error correction, and not outputting the data corresponding to the cyclic redundancy check code in the first data after error correction.
[0104] Thus, the data processing method according to at least one embodiment of the present disclosure can avoid unnecessary transmission of cyclic redundancy check codes, thereby improving data code transmission efficiency. In additional aspects, for example, for data transmitted between a memory and a memory controller, only the information code can be stored in the memory, thereby improving the memory storage efficiency.
[0105] For example, according to the data processing method of at least one embodiment of the present disclosure, the data processing method is applied to DDR5, and the cyclic redundancy check operation includes utilizing a cyclic redundancy check generation algorithm defined in the protocol of DDR5.
[0106] In this way, the data processing method according to at least one embodiment of the present disclosure can be applied to the memory controller and / or memory particles in DDR5, for example, and the corresponding CRC check can be implemented based on the CRC generation algorithm defined in the DDR5 protocol.
[0107] For example, according to the data processing method of at least one embodiment of the present disclosure, the first data and the first cyclic redundancy check code are received via transmission of the link, and the first cyclic redundancy check code before transmission is generated by performing a cyclic redundancy check operation on the first data before transmission.
[0108] The link here can be a link between any data receiver and data transmitter. For example, the link can be a data link between a memory controller and a memory. In some examples, the memory controller and the memory can be memory controller and memory that support DDR5.
[0109] In this way, the data processing method according to at least one embodiment of the present disclosure can correct data errors in link transmission.
[0110] Corresponding to the data processing method 200 according to at least one embodiment of the present disclosure, at least one embodiment of the present disclosure further provides a data processing device.
[0111] Figure 3 FIG2 shows a schematic diagram of a data processing device 300 according to at least one embodiment of the present disclosure.
[0112] See also Figure 3 According to at least one embodiment of the present disclosure, the data processing device 300 includes a CRC generation module 310 and a CRC error correction module 320 .
[0113] The CRC generation module 310 is configured to: receive first data; and perform a cyclic redundancy check operation on the first data to generate a second cyclic redundancy check code.
[0114] The CRC error correction module 320 is configured to: receive a first cyclic redundancy check code of first data; generate a syndrome based on the first cyclic redundancy check code and a second cyclic redundancy check code; and perform error correction on the first data based on the syndrome.
[0115] As described above, the data processing device according to at least one embodiment of the present disclosure can correct data errors, improve data transmission efficiency, and achieve data protection in, for example, a low-cost scenario.
[0116] The above-mentioned additional aspects of the data processing device 300 according to at least one embodiment of the present disclosure may correspond to the additional aspects of the data processing method 200 according to at least one embodiment of the present disclosure. Therefore, the technical effects of the additional aspects of the data processing method 200 according to at least one embodiment of the present disclosure may also be mapped to the additional aspects of the data processing device 300 according to at least one embodiment of the present disclosure, which will not be repeated here.
[0117] Some exemplary additional aspects of the data processing device 300 according to at least one embodiment of the present disclosure are described below.
[0118] For example, according to a data processing device of at least one embodiment of the present disclosure, in order to correct errors in the first data based on the syndrome, the cyclic redundancy check error correction module is further configured to: determine whether there is an error in the first data based on the syndrome; and correct the first data in response to determining that there is an error in the first data.
[0119] For example, according to the data processing device of at least one embodiment of the present disclosure, in order to correct the first data in response to determining that an error exists in the first data, the cyclic redundancy check error correction module is further configured to: in response to determining that an error exists in the first data, determine whether the error is a correctable error based on the syndrome value of the syndrome; and in response to the error being a correctable error, determine the error position of the error and correct the data at the error position.
[0120] For example, according to the data processing device of at least one embodiment of the present disclosure, in order to generate a syndrome based on the first cyclic redundancy check code and the second cyclic redundancy check code, the cyclic redundancy check error correction module is further configured to: perform an XOR operation on the first cyclic redundancy check code and the second cyclic redundancy check code to generate the syndrome; in order to determine whether there is an error in the first data based on the syndrome, the cyclic redundancy check error correction module is further configured to: determine that there is no error in the first data in response to the syndrome being 0; and determine that there is an error in the first data in response to the syndrome not being 0.
[0121] For example, in a data processing device according to at least one embodiment of the present disclosure, in order to determine whether an error is a correctable error and determine the error position of the error based on the syndrome value of the syndrome, the cyclic redundancy check error correction module is further configured to: determine whether the error is a correctable error and determine the error position of the error through the syndrome value and a lookup table, wherein the lookup table records a target syndrome value characterizing the error as a correctable error and a corresponding target error position.
[0122] For example, according to the data processing device of at least one embodiment of the present disclosure, in order to correct the data at the error position in response to the error being a correctable error, the cyclic redundancy check error correction module is also configured to: in response to the error being a correctable error, flip the bits at the error position to obtain the first data after error correction.
[0123] For example, according to the data processing device of at least one embodiment of the present disclosure, the data processing device is a memory controller or a memory.
[0124] For example, according to a data processing device of at least one embodiment of the present disclosure, the data processing device is applied to DDR5, and the cyclic redundancy check operation includes utilizing a cyclic redundancy check generation algorithm defined in a protocol of DDR5.
[0125] The following describes the above combination with the example application scenario Figure 2 and Figure 3 It is understood that the example application scenarios described below are only examples and not limitations, and are intended to achieve the above combination in specific application scenarios. Figure 2 and Figure 3 One or more aspects of the present invention, and the various aspects described below in conjunction with the example application scenario can be combined with the above Figure 2 and Figure 3 one or more aspects of a combination.
[0126] Figure 4 FIG2 shows a schematic diagram of a CRC error correction architecture according to at least one embodiment of the present disclosure. Figure 4 The CRC error correction architecture shown is described as an example application scenario, and the various aspects described therein can also be mapped to other types of memories and memory controllers or other data processing devices with data processing capabilities.
[0127] See also Figure 4 , the memory controller 402 can perform data read / write operations with the memory particles 404 via the link.
[0128] The memory controller 402 and the memory chip 404 may respectively have a CRC generation module 406 and a CRC generation module 408 for performing CRC calculation or algorithm on the corresponding data to generate a CRC code. The CRC generation module 406 and the CRC generation module 408 here may be as described above. Figure 3 The CRC generation module 310 is described.
[0129] The memory controller 402 and the memory chip 404 may respectively have a CRC error correction module 410 and a CRC error correction module 412. The CRC error correction module 410 and the CRC error correction module 412 may be as described above. Figure 3 The CRC error correction module 320 is described.
[0130] In this CRC error correction architecture, CRC error correction module 410 and CRC error correction module 412 can use CRC to perform error correction and directly output the corrected data, thereby protecting the data on the link, reducing the number of retransmissions, and improving bandwidth efficiency.
[0131] The above-mentioned CRC error correction architecture is provided with a CRC error correction module 410 and a CRC error correction module 412 on both sides of the memory controller 402 and the memory particles 404, thereby achieving data error correction during both data writing and reading. However, depending on the limitations or needs of the memory system design, the CRC error correction module can also be provided only on one side, thereby achieving data error correction only during data writing or reading. For example, the CRC error correction module 410 can be provided only in the memory controller 402 to achieve data error correction during the reading process. For another example, the CRC error correction module 412 can be provided only in the memory particles 404 to achieve data error correction during reading and writing.
[0132] Figure 4 The CRC error correction architecture described can be implemented in a DDR5 memory system. For example, Figure 4 The memory controller 402 may be a memory controller supporting DDR5 (referred to as DDR5 memory controller), Figure 4 The memory particles 404 in can be memory particles that support DDR5 (check DDR5 memory particles).
[0133] Figure 5 A schematic diagram showing the distribution of data bits and CRC in a single DDR5 memory chip according to at least one embodiment of the present disclosure is shown.
[0134] See also Figure 5 DDR5 memory systems send 18 data bursts (burst 0 to 17) in a single transmission. A x4 device has four DQ pins, meaning each data entry is 4 bits long. Each x4 device sends a total of 64 bits of data. After the data is sent, the DDR5 device continues with a CRC code, which consists of bursts 16 and 17, for a total of 8 bits.
[0135] I understand. Figure 5The data bit and CRC distribution described above is for illustrative purposes only and can be adjusted as needed. For example, after generating the CRC code, the data in the burst corresponding to the same pin within each memory cell or between memory cells (i.e., the data in each pin column) can be swapped during transmission.
[0136] An exemplary generation formula for an 8-bit CRC code is as follows:
[0137] CRC[0]=D
[63] ^D
[60] ^D
[56] ^D
[54] ^D
[53] ^D
[52] ^D
[50] ^D
[49] ^D
[48] ^D
[45] ^D
[43] ^D
[40] ^D
[39] ^D[3 5]^D
[34] ^D
[31] ^D
[30] ^D
[28] ^D
[23] ^D
[21] ^D
[19] ^D
[18] ^D
[16] ^D
[14] ^D
[12] ^D[8]^D[7]^D[6]^D[0];
[0138] CRC[1]=D
[63] ^D
[61] ^D
[60] ^D
[57] ^D
[56] ^D
[55] ^D
[52] ^D
[51] ^D
[48] ^D
[46] ^D
[45] ^D
[44] ^D
[43] ^D
[41] ^D
[39] ^D
[36] ^D
[34] ^D[3 2]^D
[30] ^D
[29] ^D
[28] ^D
[24] ^D
[23] ^D
[22] ^D
[21] ^D
[20] ^D
[18] ^D
[17] ^D
[16] ^D
[15] ^D
[14] ^D
[13] ^D
[12] ^D[9]^D[6]^D[1]^D[0];
[0139] CRC[2]=D
[63] ^D
[62] ^D
[61] ^D
[60] ^D
[58] ^D
[57] ^D
[54] ^D
[50] ^D
[48] ^D
[47] ^D
[46] ^D
[44] ^D
[43] ^D
[42] ^D
[39] ^D[3 7]^D
[34] ^D
[33] ^D
[29] ^D
[28] ^D
[25] ^D
[24] ^D
[22] ^D
[17] ^D
[15] ^D
[13] ^D
[12] ^D
[10] ^D[8]^D[6]^D[2]^D[1]^D[0];
[0140] CRC[3]=D
[63] ^D
[62] ^D
[61] ^D
[59] ^D
[58] ^D
[55] ^D
[51] ^D
[49] ^D
[48] ^D
[47] ^D
[45] ^D
[44] ^D
[43] ^D
[40] ^D
[38] ^D
[35] ^D
[34] ^D
[30] ^D
[29] ^D
[26] ^D
[25] ^D
[23] ^D
[18] ^D
[16] ^D
[14] ^D
[13] ^D
[11] ^D[9]^D[7]^D[3]^D[2]^D[1];
[0141] CRC[4]=D
[63] ^D
[62] ^D
[60] ^D
[59] ^D
[56] ^D
[52] ^D
[50] ^D
[49] ^D
[48] ^D
[46] ^D
[45] ^D
[44] ^D
[41] ^D
[39] ^D
[36] ^D
[35] ^D
[31] ^D
[30] ^D
[27] ^D
[26] ^D
[24] ^D
[19] ^D
[17] ^D
[15] ^D
[14] ^D
[12] ^D
[10] ^D[8]^D[4]^D[3]^D[2];
[0142] CRC[5]=D
[63] ^D
[61] ^D
[60] ^D
[57] ^D
[53] ^D
[51] ^D
[50] ^D
[49] ^D
[47] ^D
[46] ^D
[45] ^D
[42] ^D
[40] ^D
[37] ^D
[36] ^D
[32] ^D
[31] ^D
[28] ^D
[27] ^D
[25] ^D
[20] ^D
[18] ^D
[16] ^D
[15] ^D
[13] ^D
[11] ^D[9]^D[5]^D[4]^D[3];
[0143] CRC[6]=D
[62] ^D
[61] ^D
[58] ^D
[54] ^D
[52] ^D
[51] ^D
[50] ^D
[48] ^D
[47] ^D
[46] ^D
[43] ^D
[41] ^D
[38] ^D
[37] ^D
[33] ^D
[32] ^D
[29] ^D
[28] ^D
[26] ^D
[21] ^D
[19] ^D
[17] ^D
[16] ^D
[14] ^D
[12] ^D
[10] ^D[6]^D[5]^D[4];
[0144] CRC[7]=D
[63] ^D
[62] ^D
[59] ^D
[55] ^D
[53] ^D
[52] ^D
[51] ^D
[49] ^D
[48] ^D
[47] ^D
[44] ^D
[42] ^D
[39] ^D[38 ]^D
[34] ^D
[33] ^D
[30] ^D
[29] ^D
[27] ^D
[22] ^D
[20] ^D
[18] ^D
[17] ^D
[15] ^D
[13] ^D
[11] ^D[7]^D[6]^D[5].
[0145] The above operator combination "^" indicates an exclusive OR (Xor) operation.
[0146] The above-mentioned CRC generation formula is, for example, the CRC generation formula specified by the DDR5 protocol.
[0147] Figure 6 Schematic diagram of an exemplary CRC check module is shown. The CRC check module is, for example, Figure 1 Describes the CRC check module.
[0148] See also Figure 6 , an exemplary CRC check is to use CRC to do the check, that is, in the CRC generation module, the same generation formula is used to pass the data (i.e. Figure 6 Then, the generated CRC (output by the CRC generation module) is compared with the read CRC (i.e. Figure 6 If they are inconsistent, the CRC_error signal is output and reported to the control module. The control module then sends a retransmission request to the sending end, or directly reports the UE to the system.
[0149] Figure 7 A schematic diagram of a CRC error correction module according to at least one embodiment of the present disclosure is shown. The CRC error correction module is, for example, or includes, CRC error correction module 320, CRC error correction module 410, and CRC error correction module 412, or is a part thereof.
[0150] See also Figure 7 , you can use the generated CRC (output by the CRC generation module) and the read CRC (ie Figure 6 The CRC in the CRC is Xored to get the syndrome:
[0151] If the syndrome is 0, it is determined that there is no error and the original data is output directly;
[0152] If the syndrome is not 0, then perform an index lookup table:
[0153] The size of the lookup table is 72 entries, corresponding to 64+8 bits;
[0154] If the syndrome value (e.g., the syndrome value corresponding to the above text) is in the lookup table, the error is a correctable error, and the corresponding bit can be corrected and the corrected data can be output; if the syndrome value is not in the lookup table, the error is an uncorrectable error.
[0155] An example lookup table is as follows:
[0156]
[0157]
[0158]
[0159] As can be seen from the exemplary lookup table, the lookup table can include syndrome values (e.g., corresponding to the target syndrome values described above) and corresponding error locations (e.g., corresponding to the target error locations described above). If the syndrome value is in the first column of the table, i.e., a hit, then the second column of the same row indicates the error location. In this way, the lookup table can be used to determine whether an error is correctable and the error location.
[0160] If the syndrome value is not in the lookup table, i.e., a miss, then the error is an uncorrectable error and a CRC_error signal may be output.
[0161] After the error location is determined, the bit at the error location can be flipped to obtain error-corrected data. Figure 7 When the syndrome value equals the lookup table value, the corresponding bit is flipped to obtain the error-corrected data CorData. For example, the value output by the ==0x7 module is 1 bit. If the syndrome value is 0x07, then CorData[0] = Data[0] xor 1.
[0162] In addition, the error correction module can also perform error correction on the 8-bit CRC code value. However, in some embodiments, it is not necessary to output the corrected CRC code value (e.g., the data corresponding to the cyclic redundancy check code in the corrected first data), and the CRC code value can be used only to determine whether the current error is correctable or uncorrectable.
[0163] Figure 8 A schematic diagram illustrating the use of CRC error correction in a 32-bit DDR5 channel according to at least one embodiment of the present disclosure is shown.
[0164] Figure 8The DDR5 channel shown corresponds to 8 DDR5 memory chips, namely x4 devices 0 to 7. The distribution of data bits and CRC in each DDR5 memory chip can be compared with the distribution of data bits and CRC in the DDR5 channel shown in the figure. Figure 5 The distribution of data bits in the described memory particles is the same as that of CRC.
[0165] See also Figure 8 , a transmission sent by a 32-bit DDR5 channel includes 18 data (burst0 to burst 17), of which burst 16 and burst 17 can be CRC codes. Figure 8 As shown, 8 x4 particles correspond to a 32-bit DDR5 channel, and these 8 particles are all data particles.
[0166] Of course, the embodiments of the present disclosure are not limited to this, and the embodiments of the present disclosure can be applied to all DDR5 memory sticks, regardless of whether they have ECC functions. For example, the embodiments of the present disclosure can also be applied to 36-bit DDR5 channels and 40-bit DDR5 channels. For example, a 36-bit DDR5 channel can correspond to 8 x4 data particles, plus 1 x4 ECC particle, because the ECC particles also generate CRC, and thus can correct errors that occur on the link. Similarly, for example, a 40-bit DDR5 channel corresponds to 8 x4 data particles, plus 2 x4 ECC particles, and CRC error correction can also be performed. Each particle can correct 1-bit errors in the 18 data + CRC sent.
[0167] The DDR5 protocol specifies that all 64 bits of data sent over every four DQs form a data packet. An 8-bit CRC code is generated using a CRC generation algorithm and appended to the data to protect data integrity. For example, the CRC error correction algorithm used in this example application scenario can correct any single-bit error in the transmission of each x4 memory chip.
[0168] like Figure 8 As shown, there is only a single bit error (shown by the shaded block) in the area corresponding to each x4 memory chip. Therefore, the situation in the above figure is a correctable error and can be corrected. For example, during the data reading process, the memory controller 402 can output the corrected data directly from the memory controller, without the need for the memory chip 404 to retransmit it. For another example, during the data reading process, the memory chip 404 can store the corrected data directly into the storage array 414, without the need for the memory controller 402 to retransmit it.
[0169] Therefore, the above example describes a new type of CRC error correction hardware structure for one or more aspects of the scenario, utilizing the CRC generation algorithm defined in the DDR5 protocol and performing error correction through the CRC error correction module, thereby greatly improving the efficiency of link transmission.
[0170] The exemplary technical effects of the above example scenario include at least one of the following:
[0171] 1. Errors on the DDR5 link can be corrected without retransmission or the need for additional ECC memory chips;
[0172] 2. Each 4DQ and BL 18 (Burst Length 18, meaning one transmission corresponds to 18 data records) transmission consisting of 6 bits of data and an 8-bit CRC code can correct 1 bit of error;
[0173] 3. Even if an uncorrectable error occurs, it is still possible to report it correctly to the UE;
[0174] 4. It can correct both data bits and CRC code values, providing complete protection for the entire link and reducing the link’s bit error rate;
[0175] 5. Direct error correction can reduce bandwidth waste caused by retransmission and improve bandwidth efficiency.
[0176] Figure 9 FIG. 1 is a schematic diagram of an electronic device 900 according to at least one embodiment of the present disclosure.
[0177] like Figure 9 As shown, the electronic device 900 includes at least one processing unit 920 and a memory 910. The memory 910 stores computer-readable instructions and is in communication with the processing unit 920. The processing unit 920 executes the computer-readable instructions stored in the memory 910 to implement the data processing method and additional aspects thereof according to at least one embodiment of the present disclosure.
[0178] For example, the memory 910 and the processing unit 920 may communicate with each other directly or indirectly. Figure 9 As shown, the electronic device 900 may further include a system bus 930, and the memory 910 and the processing unit 920 may communicate with each other via the system bus 930. For example, the processing unit 920 may access the memory 910 via the system bus 930. For example, in other examples, components such as the memory 910 and the processing unit 920 may communicate via a network on chip (NOC) connection.
[0179] For example, the processing unit 920 can control other components in the electronic device 900 to perform desired functions. The processing unit 920 can be a device with data processing capabilities and / or program execution capabilities, such as a central processing unit (CPU), a tensor processing unit (TPU), a network processor (NP), or a graphics processing unit (GPU). It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0180] For example, the memory 910 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, a flash memory, etc.
[0181] For example, the memory 910 may store one or more computer-readable instructions, and the processing unit 920 may execute the computer-readable instructions to implement various functions. The computer-readable storage medium may also store various applications and various data, such as instruction processing code and various data used and / or generated by the application.
[0182] For example, when some computer instructions stored in the memory 910 are executed by the processing unit 920 , one or more steps in the data processing method described above can be performed.
[0183] For example, Figure 9 As shown, the electronic device 900 may further include an input interface 940 that allows external devices to communicate with the electronic device 900. For example, the input interface 940 may be used to receive instructions from an external computer device, from a user, etc. The electronic device 900 may further include an output interface 950 that connects the electronic device 900 to one or more external devices. For example, the electronic device 900 may use the output interface 950, etc.
[0184] It should be noted that the electronic device 900 according to at least one embodiment of the present disclosure is exemplary rather than restrictive. According to actual application requirements, the electronic device 900 may also include other conventional components or structures. For example, to realize the necessary functions of the electronic device, those skilled in the art may set other conventional components or structures according to the specific application scenario, and the embodiments of the present disclosure do not limit this.
[0185] At least one embodiment of the present disclosure further provides a processor, such as an SMT processor, which includes an electronic device according to at least one embodiment of the present disclosure. The SMT processor can support a maximum number of threads, such as 2, 4, or 8, and can be a single-core or multi-core processor. For example, the processor core can adopt a microarchitecture such as X86, ARM, or RISC-V, and can include one or more levels of cache, which is not limited by the embodiments of the present disclosure.
[0186] At least one embodiment of the present disclosure also provides a computer-readable storage medium. Figure 10 A schematic diagram of a computer-readable storage medium 1000 is shown, according to at least one embodiment of the present disclosure.
[0187] For example, Figure 10 As shown, the computer-readable storage medium 1000 stores computer-readable instructions 1010 , which, when executed by a computer (including a processor), can implement the data processing method according to at least one embodiment of the present disclosure and additional aspects thereof.
[0188] For example, one or more computer-readable instructions may be stored on the computer-readable storage medium 1000. Some of the computer-readable instructions stored on the computer-readable storage medium 1000 may be, for example, instructions for implementing one or more steps in the above-mentioned data processing method.
[0189] For example, the computer-readable storage medium may include a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a compact disc read-only memory (CD-ROM), a flash memory, or any combination thereof, or other suitable storage media. For example, the computer-readable storage medium 1000 may include the memory 910 in the electronic device 900 described above.
[0190] At least some embodiments of the present disclosure also provide an electronic device. Figure 11 A schematic diagram of another electronic device 1100 is shown, in accordance with at least one embodiment of the present disclosure.
[0191] The electronic device according to at least one embodiment of the present disclosure can be implemented as but not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., as well as fixed terminals such as digital TVs, desktop computers, etc.
[0192] Figure 11The electronic device 1100 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0193] For example, Figure 11 As shown, in some examples, the electronic device 1100 includes a processor 1101, which may include a processor of any of the above-mentioned embodiments (e.g., an SMT processor), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage device 1108 into a random access memory (RAM) 1103. Various programs and data required for the operation of the computer system are also stored in the RAM 1103. The processor 1101, ROM 1102, and RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0194] For example, the following components can be connected to the I / O interface 1105: an input device 1106 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1109 which can also include, for example, a network interface card such as a LAN card, a modem, etc. The communication device 1109 can allow the electronic device 1100 to communicate with other devices wirelessly or by wire to exchange data, and perform communication processing via a network such as the Internet. The drive 1110 is also connected to the I / O interface 1105 as needed. Removable media 1111, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive 1110 as needed, so that the computer program read therefrom can be installed into the storage device 1108 as needed. Although Figure 11 The electronic device 1100 is shown as including various devices, but it should be understood that it is not required to implement or include all of the devices shown. More or fewer devices may be implemented or included instead.
[0195] For example, the electronic device 1100 may further include a peripheral interface (not shown in the figure), etc. The peripheral interface may be various types of interfaces, such as a USB interface, a lightning interface, etc. The communication device 1109 may communicate with a network and other devices through wireless communication, such as the Internet, an intranet, and / or a wireless network such as a cellular phone network, a wireless local area network (LAN), and / or a metropolitan area network (MAN). Wireless communications may use any of a variety of communication standards, protocols, and technologies, including, but not limited to, Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Bluetooth, Wi-Fi (e.g., based on IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, and / or IEEE 802.11n standards), Voice over Internet Protocol (VoIP), Wi-MAX, protocols for email, instant messaging, and / or Short Message Service (SMS), or any other suitable communication protocol.
[0196] In addition to the above exemplary descriptions, the following points need to be explained:
[0197] (1) The drawings of the embodiments of the present disclosure only relate to the structures related to the embodiments of the present disclosure. Other structures may refer to conventional designs.
[0198] (2) In the absence of conflict, the embodiments of the present disclosure and the features therein may be combined with each other to form new embodiments.
[0199] The foregoing description is merely an exemplary embodiment of the present disclosure and is not intended to limit the scope of protection of the present disclosure. The scope of protection of the present disclosure is determined by the appended claims.
Claims
1. A data processing method, comprising: receiving first data and a first cyclic redundancy check code of the first data; Performing a cyclic redundancy check operation on the first data to generate a second cyclic redundancy check code; generating a syndrome based on the first cyclic redundancy check code and the second cyclic redundancy check code; as well as Error correction is performed on the first data based on the syndrome.
2. The data processing method according to claim 1, wherein: Correcting the first data based on the syndrome includes: determining whether there is an error in the first data based on the syndrome; In response to determining that the first data has an error, the first data is corrected.
3. The data processing method according to claim 2, wherein: In response to determining that the first data has an error, correcting the first data includes: In response to determining that an error exists in the first data, determining whether the error is a correctable error based on a syndrome value of the syndrome; and In response to the error being a correctable error, an error location of the error is determined, and error correction is performed on data at the error location.
4. The data processing method according to claim 2, wherein: Generating a syndrome based on the first cyclic redundancy check code and the second cyclic redundancy check code includes: performing an XOR operation on the first cyclic redundancy check code and the second cyclic redundancy check code to generate the syndrome, Determining whether there is an error in the first data based on the syndrome includes: In response to the syndrome being 0, determining that there is no error in the first data; and In response to the syndrome being not 0, it is determined that an error exists in the first data.
5. The data processing method according to claim 3, wherein: Determining whether the error is a correctable error and determining an error location of the error based on the syndrome value of the syndrome includes: Whether the error is a correctable error and the error position of the error are determined by using the syndrome value and a lookup table, wherein the lookup table records a target syndrome value indicating that the error is a correctable error and a corresponding target error position.
6. The data processing method according to claim 5, wherein: Determining whether the error is a correctable error and determining the error position of the error by using the syndrome value and the lookup table includes: Indexing a lookup table based on the syndrome value to determine whether the syndrome value hits the target syndrome value; and In response to a hit, determining that the error is a correctable error, and determining a target error position corresponding to the syndrome value in the lookup table as the error position; or In response to a miss, the error is determined to be an uncorrectable error.
7. The data processing method according to claim 3, further comprising: In response to the error being an uncorrectable error, an error signal is outputted.
8. The data processing method according to claim 3, wherein: In response to the error being a correctable error, correcting the data at the error location, including: In response to the error being a correctable error, the bit at the error position is flipped to obtain first data after error correction.
9. The data processing method according to claim 2, further comprising: In response to determining that the first data does not have errors, the first data is used as error-corrected first data.
10. The data processing method according to claim 1, further comprising: Only the data corresponding to the data code in the error-corrected first data is output, and the data corresponding to the cyclic redundancy check code in the error-corrected first data is not output.
11. The data processing method according to any one of claims 1 to 10, wherein: The data processing method is applied to the fifth generation double data rate memory standard, and the cyclic redundancy check operation includes utilizing a cyclic redundancy check generation algorithm defined in a protocol of the fifth generation double data rate memory standard.
12. The data processing method according to any one of claims 1 to 10, wherein: The first data and the first cyclic redundancy check code are received via transmission of a link, and the first cyclic redundancy check code before transmission is generated by performing a cyclic redundancy check operation on the first data before transmission.
13. A data processing device, comprising: The cyclic redundancy check generation module is configured as follows: receiving first data; Performing a cyclic redundancy check operation on the first data to generate a second cyclic redundancy check code; as well as The cyclic redundancy check error correction module is configured as follows: Receiving a first cyclic redundancy check code of the first data; generating a syndrome based on the first cyclic redundancy check code and the second cyclic redundancy check code; and Error correction is performed on the first data based on the syndrome.
14. The data processing apparatus according to claim 13, wherein: In order to perform error correction on the first data based on the syndrome, the cyclic redundancy check error correction module is further configured to: determining whether there is an error in the first data based on the syndrome; In response to determining that the first data has an error, the first data is corrected.
15. The data processing apparatus according to claim 14, wherein: In order to correct errors in the first data in response to determining that the first data has errors, the cyclic redundancy check error correction module is further configured to: In response to determining that an error exists in the first data, determining whether the error is a correctable error based on a syndrome value of the syndrome; as well as In response to the error being a correctable error, an error location of the error is determined, and error correction is performed on data at the error location.
16. The data processing apparatus according to claim 15, wherein: In order to determine whether the error is a correctable error and determine the error position of the error based on the syndrome value of the syndrome, the cyclic redundancy check error correction module is further configured to: Whether the error is a correctable error and the error position of the error are determined by using the syndrome value and a lookup table, wherein the lookup table records a target syndrome value indicating that the error is a correctable error and a corresponding target error position.
17. The data processing apparatus according to claim 15, wherein: In order to correct the data at the error location in response to the error being a correctable error, the cyclic redundancy check error correction module is further configured to: In response to the error being a correctable error, the bit at the error position is flipped to obtain first data after error correction.
18. The data processing apparatus according to claim 14, wherein: In order to generate a syndrome based on the first cyclic redundancy check code and the second cyclic redundancy check code, the cyclic redundancy check error correction module is further configured to: performing an XOR operation on the first cyclic redundancy check code and the second cyclic redundancy check code to generate the syndrome, In order to determine whether the first data has an error based on the syndrome, the cyclic redundancy check error correction module is further configured to: In response to the syndrome being 0, determining that there is no error in the first data; as well as In response to the syndrome being not 0, it is determined that an error exists in the first data.
19. An electronic device comprising at least one processing unit and a memory; wherein: The memory stores computer-readable instructions and is communicatively connected to the at least one processing unit; The at least one processing unit is configured to execute the computer-readable instructions stored in the memory to implement the data processing method according to any one of claims 1 to 12.
20. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-readable instructions. When the processor executes the computer-readable instructions, the data processing method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Method for processing and checking local data in multi-media product
CN101625653A
Data processing method and device and storage system
CN116092567A
Method for error-correcting by circulation redundance calibrating for personal hand-helding system
CN1815937A
ECC system for generating a CRC syndrome over randomized data in a computer storage device
US6052815A
Cited By
Data transmission method, board card, device and medium
CN119728025A
