Method, device and equipment for data verification, medium and program product
By reading multiple sets of data from memory in high-performance computing system for aggregation and encoding, and using enhanced error correction code algorithm, the problem of insufficient ECC capabilities in traditional HBM memory is solved, and higher error detection and error correction capabilities and reliability are achieved. to adapt to dynamic updates of different needs.
Patent Information
- Application Number
- CN202311126669.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-29
- Filing Date
- 2023-08-31
- Publication Date
- 2024-12-31
AI Technical Summary
The high demand for memory bandwidth of high-performance computing systems has resulted in limited error detection and correction capabilities of traditional HBM's ECC algorithms, which cannot meet the needs of high failure rate and multi-bit error correction, and it is difficult to take into account both the hardware redundancy ratio and the delay requirements.
By reading multiple sets of data from memory units for aggregation, using error correction code encoding, a larger encoding unit is realized to support stronger error detection and error correction capabilities, and algorithms such as Reed-Solomon encoding are used to dynamically update the encoding. to meet different needs.
Under the same hardware conditions, the error detection and error correction reliability of memory ECC is significantly improved, the uncorrectable errors are reduced, the higher error correction and error detection needs are met, business interruptions are avoided, and business continuity is ensured under the consideration of miscorrection risks.
Smart Images

Figure CN119226028A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of memory technology, and more specifically, to a method, apparatus, device, medium, and computer program product for verifying data in a memory. Background Art
[0002] In the application fields of artificial intelligence (AI) and other computing-intensive applications, the demand for high performance and the integration of central processing unit (CPU) and graphics processing unit (GPU) computing power has led to the rapid development of high performance computing (HPC) systems with computing power above E-class (supporting 1018 floating-point operations per second). Such high computing power systems have high requirements for memory bandwidth, which in turn promotes the widespread application of high bandwidth memory (HBM) in HPC systems.
[0003] HBM is a high-performance dynamic random access memory based on 3D stacking technology. HBM technology achieves large-capacity and high-bit-width memory arrays by stacking multiple Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM or DDR for short) particles in three-dimensional space. HBM supports multi-channel parallel reading of memory, thereby significantly improving the reading speed. Summary of the invention
[0004] An embodiment of the present application provides a data verification solution.
[0005] In a first aspect, a method for data verification is provided. The method includes: obtaining N groups of data from a memory, each group of the N groups of data includes a check bit, wherein N is a positive integer greater than or equal to 2; aggregating the N groups of data to obtain aggregated data, the aggregated data includes an aggregated check bit, and the aggregated check bit is an aggregation of the check bits of the N groups of data; performing error correction code (ECC) encoding on the aggregated data to obtain coded data; decomposing the coded data into N groups of coded data, each group of the N groups of coded data includes a check bit; and writing the N groups of coded data into the memory respectively. Thus, multiple groups of data read from the memory unit can be aggregated to obtain a larger coding unit for ECC encoding. Therefore, under the same hardware conditions such as redundancy ratio, this method can support memory ECC functions with stronger error detection and correction capabilities compared to traditional technologies, and meet higher error correction and error detection requirements.
[0006] In some embodiments of the first aspect, obtaining N groups of data from the memory includes: reading data from N channels or N memory bank groups of the memory, wherein the data of each channel or each memory bank is a group of data. Thus, the data as the coding unit can be aggregated from the spatial dimension to obtain a larger coding unit.
[0007] In some embodiments of the first aspect, acquiring N groups of data from the memory includes: reading data from M channels or M memory bank groups of the memory in L time slices, where N=L*M, and the time slice is the duration of a burst transmission of reading data from the memory. Thus, it is possible to aggregate as encoded data from the time and space dimensions to obtain a larger encoding unit.
[0008] In some embodiments of the first aspect, performing ECC encoding on the aggregated data includes: determining a method for obtaining N groups of data from a memory according to a preset encoding method; and performing ECC encoding on the aggregated data according to the preset encoding method. Thus, a flexible, configurable, and customizable ECC error detection and correction function is provided, which can provide a variety of ECC encoding and decoding methods that meet different needs of users under the same hardware environment.
[0009] In some embodiments of the first aspect, performing ECC encoding on the aggregated data according to a preset encoding method includes: presetting the encoding method according to a user input, the input including an ECC performance requirement for a memory, thereby automatically providing an optimal encoding method under hardware conditions based on the ECC performance requirement.
[0010] In some embodiments of the first aspect, the method further comprises: in response to the encoding method being updated, acquiring data from the memory according to the updated encoding method to update the check bit of the acquired data. Thus, the relevant configuration can be dynamically updated without restarting in response to demand changes, thereby avoiding business interruption caused by updating the configuration.
[0011] In some embodiments of the first aspect, the encoding method includes Reed-Solomon (RS) encoding. RS encoding can detect and correct multi-bit errors, significantly improving the error detection and correction capabilities of the generated ECC code.
[0012] In some embodiments of the first aspect, the method further comprises: determining a corresponding decoding method according to the encoding method; and when reading data from the memory for use, generating error-corrected data bits for the data based on the check bits of the read data according to the decoding method. Thus, it can be used in combination with the ECC encoding process of aggregating multiple groups of data, so that under the same hardware conditions, an ECC function with stronger error detection and correction capabilities and performance can be achieved compared with traditional methods.
[0013] In some embodiments of the first aspect, the method further includes: determining the number of bits that are different between the corrected data bits and the read data bits; if the number of bits satisfies a threshold condition, generating a prompt indicating that there may be an error in the corrected data bits. Thus, a more cautious error correction result can be provided, and the decision of whether to use risky data can be handed over to an upper-layer application, thereby ensuring the continuous operation of the business as much as possible while taking into account the risk of miscorrection.
[0014] In a second aspect, a device for data verification is provided, the device comprising: an acquisition module, configured to acquire N groups of data from a memory, each group of the N groups of data comprising a check bit, wherein N is a positive integer greater than or equal to 2; an aggregation module, configured to aggregate the N groups of data to obtain aggregated data, the aggregated data comprising an aggregated check bit, the aggregated check bit being an aggregation of the check bits of the N groups of data; an encoding module, configured to perform error correction code ECC encoding on the aggregated data to obtain encoded data; a decomposition module, configured to decompose the encoded data into N groups of encoded data, each group of the N groups of encoded data comprising a check bit; and a writing module, writing the N groups of encoded data into the memory respectively.
[0015] In some embodiments of the second aspect, the acquisition module includes a first reading module, which is configured to read data from N channels or N memory bank groups of the memory, wherein the data of each channel or each memory bank is a group of data.
[0016] In some embodiments of the second aspect, the acquisition module includes a second read module, which is configured to read data from M channels or M storage memory groups of the memory in L time slices, where N=L*M, and the time slice is the duration of a burst transmission of reading data from the memory.
[0017] In some embodiments of the second aspect, the encoding module includes: a determination module, configured to determine a method for obtaining N groups of data from a memory according to a preset encoding method; and an ECC encoding module, configured to perform ECC encoding on the aggregated data according to a preset encoding method.
[0018] In some embodiments of the second aspect, the ECC encoding module includes: pre-setting the encoding method according to user input, where the input includes ECC performance requirements for the memory.
[0019] In some embodiments of the second aspect, the apparatus further comprises an updating module, wherein the updating module is configured to: in response to the encoding method being updated, obtain data from the memory according to the updated encoding method to update a check bit of the obtained data.
[0020] In some embodiments of the second aspect, the encoding scheme includes Reed-Solomon encoding.
[0021] In some embodiments of the second aspect, the device also includes: a decoding method determination module, configured to determine a corresponding decoding method according to an encoding method; and an error correction module, configured to generate error-corrected data bits for the data based on the check bits of the read data according to the decoding method when reading data from the memory for use.
[0022] In some embodiments of the second aspect, the device also includes: a difference bit number determination module, which determines the number of different bits between the error-corrected data bits and the data bits of the read data; a prompt module, which is configured to generate a prompt when the different number of bits meets a threshold condition, and the prompt indicates that there may be an error in the error-corrected data bits.
[0023] In a third aspect, an electronic device is provided, including a processor and a memory, wherein computer instructions are stored in the memory, and when the computer instructions are executed by the processor, the electronic device performs actions according to the method in the first aspect or any embodiment thereof.
[0024] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores computer-executable instructions, which, when executed by an electronic device, enable the electronic device to perform the operation of the method according to the first aspect or any of its embodiments.
[0025] In a fifth aspect, a computer program product is provided. The computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions, which, when executed, implement the operations of the method according to the first aspect or any of its embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0027] Figure 1 A schematic diagram showing an example environment in which various embodiments of the present application can be implemented;
[0028] Figure 2 A flowchart showing an example method for data verification according to some embodiments of the present application is shown;
[0029] Figure 3 A schematic diagram showing a non-limiting example of reading data for aggregation according to some embodiments of the present application;
[0030] Figure 4 A schematic diagram showing a non-limiting example of aggregating multiple sets of data for ECC encoding according to some embodiments of the present application;
[0031] Figure 5 A schematic diagram showing a non-limiting example of decomposing and writing ECC-encoded aggregate data into a memory according to some embodiments of the present application;
[0032] Figure 6 A flowchart showing an example method for performing error detection and correction on data according to some embodiments of the present application is shown;
[0033] Figure 7 A flowchart showing an example method for data verification according to some embodiments of the present application is shown;
[0034] Figure 8 A schematic block diagram of a message transmission device according to some embodiments of the present application is shown; and
[0035] Fig. 9 A schematic block diagram of an example device that can be used to implement embodiments of the present application is shown. DETAILED DESCRIPTION
[0036] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0037] In the description of the embodiments of the present application, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0038] HBM is based on 3D stacking technology, which can provide multi-channel parallel reading of memory. In application fields that require HPC, HBM is widely used due to the high demand for memory bandwidth in high-computing systems. The structure of HBM determines that it has no separate redundant particles, and the redundancy ratio is also lower than that of general DDR. Due to the limited redundancy ratio and other reasons, the ECC algorithm that conventional HBM can support is relatively simple and has limited error detection and correction capabilities. For example, for 128 bits of data, 8-bit Hamming code ECC can detect and correct one bit error. If you want to detect two-bit errors, you need 9-bit Hamming code ECC.
[0039] Some HBM providers provide 16 redundant bits for ECC check bits for 128-bit data. This redundancy ratio can support 8-bit basic Hamming code check bits and 8-bit parity check bits, where each parity check bit is calculated for 16 bits of 128-bit data. This method can achieve single-grain error correction, but its error correction requires multiple trial calculations, resulting in a large delay. In addition, to implement this method, the redundancy ratio of the memory needs to be increased to 8:1, which increases the cost of the hardware. Moreover, Hamming code-based ECC cannot correct multi-bit errors. If more than two bits of errors occur, missed detection or miscorrection will still occur, that is, it cannot achieve the ability to correct multi-bit errors required to cope with hard failures.
[0040] On the other hand, with the development of memory technology, the amount of charge stored in a unit decreases, and the probability that instantaneous errors may lead to multi-bit errors is increased. In addition, the design and manufacturing process of the memory may also introduce an increased probability of multi-bit errors. At the same time, the HPC field where HBM is often used has high requirements for data reliability and latency. Therefore, the capabilities and performance of traditional simple encoding methods for HBM may not meet application requirements. In addition, more and more dedicated chips encapsulate CPUs and HBM and other memories in a system on chip (System On Chip, SoC). The high failure rate of the memory may directly lead to the return of the entire SoC, making the after-sales cost and service risk very high. Therefore, there is a challenge in how to improve the ECC error correction and error detection capabilities and performance for HBM and other memories under the constraints of limited hardware redundancy ratio and certain latency requirements.
[0041] In order to solve the above problems and other problems, an embodiment of the present disclosure provides a data verification scheme. The scheme aggregates multiple groups of data read from memory units (for example, from dimensions such as space and time) to obtain larger coding units for ECC encoding. Thus, under the same hardware conditions such as redundancy ratio, the scheme can support ECC-related functions for memory with stronger error detection and correction capabilities than traditional technologies, thereby significantly improving the reliability of ECC error detection and correction of memory and reducing uncorrectable errors, meeting higher error correction and error detection requirements. It should be understood that although HBM may be used as an example in the description herein, the scheme according to the embodiment of the present application is also applicable to various other memory forms, such as DDR, mobile DDR, and storage class memory (SCM).
[0042] First reference Figure 1 , which shows a schematic diagram of an example environment 100 in which multiple embodiments of the present application can be implemented. The example environment 100 includes a computing device 110. The computing device 110 includes a processor 120 and a memory 130. The processor 120 may include a CPU, a GPU, various types of dedicated computing units (such as, AI chips, etc.), various controllers, or a suitable combination of the foregoing items. The processor 120 can perform various processing actions according to computer program instructions stored in or loaded into the memory 130.
[0043] The memory 130 may be a random access memory (RAM), such as a dynamic random access memory (DRAM), which may support fast random reads and writes from the processor 120, thereby directly supporting the calculations of the processor 120. That is, given a random address in the memory 130, the processor 120 may be able to quickly read data from or write data to the address. Therefore, when the processor 120 performs a process, it may read data required for execution (such as instructions and / or calculation parameters) from the memory 130 and write data (such as the output of the calculation) to the memory 130.
[0044] The computing device 110 also includes (multiple) memory controllers 140 as part of the processor 120. The memory controller 140 is a component of the computing device 110 used to control and manage data transmission between a computing unit such as a CPU / GPU and the memory 130. The processor 120 reads and writes data from the memory 130 via the memory controller 140. Each memory controller 140 can be implemented as a separate chip, or integrated into another larger chip, such as a controller built into a CPU or a north bridge.
[0045] In some embodiments of the present disclosure, data may be transmitted between the processor 120 and the memory 130 in a burst transmission. The burst transmission has a certain burst length. During the duration of a burst transmission (hereinafter also referred to as a data cycle), the memory controller 140 may continuously read / write a number of consecutive storage cells equal to the burst length according to a specified starting address without continuously providing addresses. As a non-limiting example, in the case where a unit burst length is capable of reading 64 bits of data from the memory 130 via a single channel, during a data cycle with a burst length equal to 2, the processor 120 may read 128 bits of data from the storage area via a single channel.
[0046] In some embodiments, there are multiple parallel communication channels between the memory 130 and the memory controller 140, so that the processor 120 can read / write data simultaneously via multiple channels in parallel. For example, the memory 130 may include multiple bank groups, each of which can be read and written independently, so that data can be read / written from multiple bank groups at the same time. For example, the memory 130 can be an HBM based on 3D stacking technology, in which multiple bank groups are stacked together in a three-dimensional manner.
[0047] In some such embodiments, there may be multiple memory controllers 140, each of which controls data transmission for a portion of the memory bank groups, and can read data from the multiple memory bank groups in parallel via multiple channels. In some such embodiments, the memory 130 also supports virtual channels. Virtual channel technology can split each physical channel into multiple virtual channels, so that the number of single data that can be transmitted in parallel between the processor 120 and the memory 130 is greater than the number of physical channels. The embodiments of the present application are not limited to the specific number of memory controllers, memory bank groups, or channels / virtual channels.
[0048] In an embodiment of the present application, the memory 130 supports an error-correcting code (ECC) check function. In this case, for a group of data bits to be written to the memory 130, the processor 120 can, for example, use the memory controller 140 to calculate the corresponding ECC. When the group of data bits is written to the memory 130, the calculated ECC is also written to the memory 130 as a check bit. Later, when the group of data bits is read back for use by the processor 120, the corresponding check bits are also read together.
[0049] The memory controller 140 then recalculates the ECC for the read data bits and compares it with the ECC in the read check bits. If the two do not match, the memory controller 140 can determine that there is an error in the read data bits. In this case, the memory controller 140 can perform further error correction decoding on the data bits to determine which one or more bits are incorrect. Then, the erroneous bits are corrected. For binary data bits, this correction can mean that the erroneous bits are flipped. The correction of the data enables the processor 120 to correctly perform subsequent tasks, thereby ensuring the normal operation of the computing device 110.
[0050] To achieve this function, optionally, the memory 130 may include a data portion 150 specifically storing actual data bits and a check portion 160 storing check bits. The processor 120 may write the check bits of the data bits into the check portion 160 based on the corresponding read-write specifications. It should be understood that the data portion 150 and the check portion 160 are shown only as examples. In some embodiments, there may be no separate particles storing check bits in the memory 130. The memory 130 may also store data bits and corresponding check bits in other appropriate structures.
[0051] In addition, the processor 120 includes a paired ECC encoding circuit and decoding circuit (not shown), for example, in the memory controller 140 or in another part thereof. A pair of encoding circuits can implement the encoding and decoding functions of a specific ECC algorithm, for example, a Hamming code algorithm, and a Reed-Solomon encoding algorithm. The encoding circuit can be used to calculate the ECC of the data bit. The decoding circuit can decode the calculated ECC to determine the error bit in the corresponding data bit and correct it. In some embodiments, the memory controller 140 may include multiple pairs of encoding circuits and decoding circuits, and switch between different circuits according to the system settings to perform the ECC function using different algorithms.
[0052] The data unit targeted by ECC encoding is called a codeword. Each codeword includes actual data bits and redundant check bits including ECC. To achieve a certain error correction capability, the number of check bits needs to meet certain conditions, which are usually limited to the achievable hardware redundancy ratio between the capacity of the data part 150 and the check part 160. Take the ECC function of the basic Hamming code with a hardware redundancy ratio of 16:1 as an example. For a codeword including 128 data bits, a maximum of 8 additional check bits can support the detection and correction of one bit of error. If it is necessary to ensure reliable detection of two-bit errors, the redundancy ratio needs to be increased. If two-bit errors are to be detected and one-bit errors are to be corrected, 128-bit data requires 9 bits of ECC. In this case, a higher hardware redundancy ratio can be provided, that is, the capacity of the check part 160 is increased while the capacity of the data part 150 remains unchanged. This approach will reduce the cost of hardware. Without increasing the hardware cost, the size of the coding unit needs to be increased. For example, the processor 120 can increase the size of the coding unit according to the method of an embodiment of the present application, as will be described in detail later.
[0053] It should be understood that the architecture and functions in the example environment 100 are described only for exemplary purposes, and no limitation on the scope of the present application is implied. In addition, other devices, systems or components not shown may also exist in the example environment 100. In addition, the embodiments of the present application may also be applied to other environments with different and / or other functions. For example, in some high-performance computing systems, the processor 120 and the memory 130 may be packaged in the same SoC. For example, the read and write and data verification actions for the memory 130 may also be performed by the base die. The embodiments of the present application will be generally described below in the context of the computing device 110 using the processor 120 to perform actions.
[0054] Reference now Figure 2 , which shows a flow chart of an example method 200 for data verification according to some embodiments of the present application. The example method 200 may be, for example, Figure 1 It should be understood that the method 200 may also include additional actions not shown, and the scope of the present application is not limited in this respect. Figure 1 The method 200 is described in detail with reference to the example environment 100 of FIG.
[0055] At 210, N groups of data are obtained from the memory, each of which includes a check bit. Wherein N is an integer greater than or equal to 2. For example, the computing device 110 can read N groups of data from the memory 130 to the processor 120 via the memory controller 140, wherein each of the N groups of data includes actual data bits and a check bit. The check bit can be used to store the ECC check code of the group of data bits. At this time, the check bit can be empty or may need to be updated.
[0056] In some embodiments, the processor 120 may read N groups of data in parallel from N memory bank groups or N channels of the memory 130. In some embodiments, the N channels may be virtual channels. The N groups of data read in parallel may be aggregated for encoding as described below, and compared with ECC encoding of a single group of data obtained from each channel, this reading method can obtain more numbers of encoding units without increasing latency.
[0057] In some embodiments, the processor 120 can read N groups of data from M channels or M storage banks of the memory in L time slices, where L and M are integers, and N=L*M. Each of the L time slices is the duration of a burst transmission of data read from the memory. As known to those skilled in the art, the burst transmission has a certain burst length. When the hardware capability and burst length are determined, the duration of a burst transmission can be used as a unit time for configuration. Figure 3 Examples of reading data from multiple channels and / or multiple time slices for ECC encoding are described in more detail.
[0058] Continue to refer Figure 2 At 220, the N groups of data are aggregated to obtain aggregated data, the aggregated data including an aggregated check bit, the aggregated check bit being an aggregation of the check bits of the N groups of data. For example, the processor 120 may aggregate the N groups of data obtained at 210 to obtain aggregated data, including an aggregated check bit of the check bits of the N groups of data.
[0059] In some embodiments, the processor 120 may concatenate the data bits of the N groups of data and the check bits of the N groups of data to obtain aggregated data. It should be understood that such aggregation may be a logical aggregation, as long as the processor 120 is able to know which bits in the aggregated data are data bits and which bits are check bits.
[0060] At 230, the aggregated data is ECC-encoded to obtain encoded data. For example, the processor 120 may perform ECC encoding on the aggregated data obtained at 220 to obtain encoded data. In some embodiments, the ECC encoding may be a Hamming code encoding and its various variations. For example, the processor 120 may calculate a Hamming code for the aggregated data, calculate a parity check bit for each of the multiple segments of the aggregated data, and use both as part of the check bits of the encoded data. In some embodiments, the ECC encoding may be a RS encoding with stronger error correction and detection capabilities. Figure 4 Let's describe in more detail an example of aggregating N groups of data for ECC encoding.
[0061] Continue to refer Figure 2 At 240, the coded data is decomposed into N groups of coded data, each of which includes a check bit. For example, the processor 120 may decompose the coded data obtained at 230 into N groups of coded data, each of which includes a check bit. Similarly, this decomposition may be a logical decomposition, as long as the processor 120 can correctly process (e.g., transmit) the N groups of coded data in groups.
[0062] At 250, the N groups of encoded data are written to the memory separately. For example, the processor 120 may write the N groups of encoded data decomposed at 240 to the memory 130 separately. The processor 120 may write data to the memory 130 in a manner corresponding to the manner in which the data is read from the memory 130 at 210. In some embodiments, in some embodiments, the processor 120 may write the N groups of data to N memory bank groups or N channels (or virtual channels) in parallel. In some embodiments, the processor 120 may write the N groups of data to M channels or M memory bank groups in L time slices, where L and M are integers, and N=L*M. The following will be combined with Figure 5 Let's describe an example of decomposing encoded data in more detail.
[0063] Using method 200, multiple single groups of data read from the memory unit are aggregated from dimensions such as space and time, and a larger coding unit can be obtained for ECC encoding. Therefore, under the same hardware conditions, method 200 can support memory ECC functions with stronger error detection and correction capabilities (such as RS encoding with stronger capabilities than Hamming code) compared to traditional methods, thereby significantly improving the reliability of memory ECC error detection and correction functions and reducing the occurrence of uncorrectable errors (UCE). In addition, method 200 can also meet the increased demand by aggregating data without changing hardware characteristics such as hardware redundancy ratio after the error correction and error detection requirements of memory ECC increase.
[0064] Reference now Figure 3 , which shows a schematic diagram 300 of a non-limiting example of reading data for aggregation according to some embodiments of the present application. The schematic diagram 300 shows a processor 310, which communicates with an HBM 320 supporting multiple channels. The processor 310 and the HBM 320 can be respectively Figure 1 An example implementation of the processor 120 and the memory 130 in Figure 3 The actions described in can be Figure 2 An example implementation of action 210 in method 200 of .
[0065] In the schematic diagram 300, the processor 310 reads data in parallel via a plurality of controllers 330-1 to 330-I (individually or collectively referred to as controller 330). For the purpose of illustration, controller 330-1 is taken as an example, which is capable of controlling the data transmission of channels 340-1 and 340-2. In each data cycle of a burst transmission, controller 330-1 can read a group of unit data from each channel of channels 340-1 and 340-2 into its own buffer. The duration of a data cycle depends on the burst length of the burst transmission and the hardware conditions of the relevant components. Therefore, the group of unit data can be regarded as data read in a unit time slice.
[0066] As shown in the figure, in the first time slice, the controller 330-1 can read data 311 from the channel 340-1 and read data 312 from the channel 340-2. In the second time slice, the controller 330-1 can read data 313 from the channel 340-1 and read data 314 from the channel 340-2. Each group of data in the data 311 to 314 includes an additional check bit of the actual data bit. It should be understood that, depending on the scenario, the check bit at this time can be a null value reserved for later writing to the HBM 320.
[0067] Conventionally, the controller 330-1 may calculate the check bit for each piece of data as a codeword, and for the example codeword of 128+8 bits, the Hamming code encoding for detecting and correcting single bit errors may be used. Figure 3 In the example of , the controller 330-1 can aggregate the data 311 to 314 into a longer codeword for ECC encoding. Thus, in this example, the longer codeword includes 32 check bits, thereby supporting 4 RS8 redundant encodings. RS encoding is widely used in DDR4 and DDR5. It is a symbol-based algorithm that can be used to correct errors in one or more symbols, each of which can be 8 bits, for example.
[0068] According to the Reed-Solomon theory, using RS8 redundant coding based on finite field algorithm to calculate the 32-bit check bits can correct the errors of two random RS symbols at most, that is, it can correct 16-bit errors, which can cover the failure modes involving more errors. In this way, the error detection and correction capabilities of the memory can be significantly improved, and the occurrence of UCE can be reduced.
[0069] In this non-limiting example, the processor 310 aggregates data based on the data read in parallel by each controller 330. It should be understood that this is for illustration purposes only. In some embodiments, the computing device (e.g., computing device 110) can determine the manner of obtaining N groups of data for aggregation from the memory according to a preset encoding manner. For example, the number of channels that should be used to read data in parallel and / or the data read in how many time slices should be aggregated can be preset.
[0070] In some embodiments, the computing device may set the configuration information of the encoding method according to the parameter values (e.g., the number of channels and the number of time slices) input by the user. In some such embodiments, the input includes ECC performance requirements for the memory. For example, the correctable rate, the expected error correction delay, and the expected missed detection rate. The computing device can then adapt the configuration parameters of the encoding method based on these performance requirements and the hardware conditions of the memory 130.
[0071] Reference now Figure 4 , which shows a schematic diagram 400 of a non-limiting example of aggregating multiple groups of data for ECC encoding according to some embodiments of the present application, wherein the schematic diagram 400 shows multiple groups of data 411 to 414 read at multiple time slices and / or from multiple channels. Figure 4 The actions described in can be Figure 2 The example implementation of actions 220 and 230 in method 200, and the plurality of sets of data 411 to 414 may be Figure 3 For the sake of illustration, the following will continue with the example of data 311 to 314 read from HBM 320. Figure 3 The processor 310 is described in the context of performing actions Figure 4 .
[0072] like Figure 4 As described above, each group of data in data 411 to 414 includes a group of data bits and a group of check bits, such as data bit 425 and check bit 435 of data 411. In some embodiments, the check bit can be empty at this time. In some embodiments, the check bit can be a placeholder added by the processor according to the hardware redundancy ratio of the memory.
[0073] Instead of calculating the check digit value for each set of data separately, processor 310 may aggregate data 411 to 414 before performing the calculation. Figure 4 In the example of , to aggregate the data, the processor 310 concatenates the data bits of the data 411 to 414 together to form an aggregate 445 of data bits, and concatenates the check bits of the data 411 to 414 together to form an aggregate 455 of check bits. Then, the aggregate 445 of data bits and the aggregate 455 of check bits are aggregated (in this example, concatenated) to form final aggregate data 465. Aggregate data 455 includes aggregate data bits 475 and aggregate check bits 485.
[0074] Then, the processor 310 can perform ECC encoding on the aggregate data 465 to obtain the encoded data. Specifically, the processor 310 can calculate the value of the check bit of the aggregate data 465 according to the pre-set ECC encoding method, and put it into the aggregate check bit 485. In some embodiments, the processor 310 can perform ECC encoding on the aggregate data 465 according to the pre-set encoding method. For example, the processor 310 can configure its ECC encoding circuit according to the parameters in the encoding setting to perform ECC encoding for the aggregate data. In some embodiments, the encoding method can be RS encoding with specific parameters, which specify various properties of the RS encoding algorithm and the codeword. In some embodiments, the processor 310 may include multiple ECC encoding circuits. According to the pre-set encoding method, the processor 310 can switch to the corresponding encoding circuit and configure the encoding circuit according to the set parameters to perform ECC encoding for the aggregate data.
[0075] Reference now Figure 5 , which shows a schematic diagram 500 of a non-limiting example of decomposing and writing ECC-encoded aggregate data into a memory according to some embodiments of the present application. Figure 5 The actions described in can be Figure 2 An example implementation of actions 240 and 250 in method 200, and aggregate data 565 may be Figure 4 For the sake of convenience, the following will continue in Figure 3 The processor 310 is described in the context of performing actions Figure 5 .
[0076] After performing ECC encoding on the aggregate data 565, the processor 310 also needs to write each data bit and check bit of the encoded aggregate data 565 to the corresponding address. Therefore, the processor 310 can perform the reverse process of the above-mentioned aggregation process, and rewrite the encoded data (for example, via the controller 330) to the HBM 320 in an analogous manner to reading N groups of data from the HBM.
[0077] like Figure 5 As shown, aggregate data 565 may be a collection of multiple sets of data (e.g., Figure 4 The data bits 575 of the aggregated data 565 are aggregated from the data 411 to 414 in the plurality of data sets, and the data bits 575 thereof include a plurality of parts, such as part 545, from the plurality of data sets. In addition, the number of bits of the check bits 585 of the aggregated data 565 is also equal to the aggregation of the plurality of check bits of the plurality of data sets. After the processor has ECC-encoded the aggregated data 565 as a long codeword, the check bits 585 include the ECC values calculated for the data bits 575. The check bits 575 can be regarded as including a plurality of parts, such as 555, corresponding to the check bits of each data set in the plurality of data sets.
[0078] On this basis, the processor 310 can decompose the data bits 575 into multiple groups of data bits again, and decompose the check bits 585 into multiple groups of check bits. The processor 310 can then combine each group of data bits in the multiple groups of data bits with the corresponding check bits to re-obtain multiple groups of data, in this example, data 511 to 514. Each group of data in the data 511 to 514 has the same structure as the multiple groups of data previously obtained by the processor 310 and includes a portion of the calculated check bits 585.
[0079] In this way, the processor 310 can rewrite N sets of data into the HBM 320 according to the corresponding read / write specification in an analogous manner to the previous reading of multiple sets of data. Figure 3 For example, as shown in the figure, the controller 330 - 1 of the processor 310 may write the data 511 to 514 to the HBM 320 in parallel in two time slices via the channel 340 - 1 and the channel 340 - 2 .
[0080] It should be understood that Figure 4 and Figure 5 The aggregated and decomposed data structures described in the above are only logical examples. Various implementation variations that conform to such logical structures also fall within the scope of this application, as long as the processor can correctly operate and transmit the corresponding bits of data. It should also be understood that Figures 3 to 5 The controllers, time slices, and number of channels shown in the example are only examples, which can be determined based on the input parameters and / or performance requirements for the encoding configuration as described above, and the encoding configuration can be changed. Figure 7 An example where the ECC encoding configuration is changed in more detail.
[0081] After ECC encoding the data in the memory, when the processor 120 needs to obtain the ECC-encoded data for use later (for example, by an application process running on the processor 120), it can use the check bits of the encoded data to detect whether an error occurs when the actual data bits of the encoded data are written and correct the error. Figure 6 , which shows a flow chart of an example method 600 for performing error detection and correction on data according to some embodiments of the present application. The example method 600 may be performed by, for example, Figure 1 It should be understood that the method 600 may also include additional actions not shown, and some actions in the method 600 may be omitted, and the scope of the present application is not limited in this respect. Figure 1 The method 600 is described in detail with reference to the example environment 100 of FIG.
[0082] At 610, for example, based on instructions from an application program, the processor 120 may read a corresponding amount of encoded data from the memory 130 into a cache line thereof, such as a cache line of the controller 140. The encoded data includes data bits to be used by the program and corresponding check bits. When these data bits were previously written, the check bits may be written by the processor 120 based on the method of an embodiment of the present application (e.g., regarding Figures 2 to 5 described method).
[0083] According to the currently configured ECC encoding mode, the processor 120 can determine the corresponding decoding mode. For example, when the computing device 110 is started, the processor 120 can configure the corresponding ECC encoding and decoding path according to the current ECC encoding configuration information. The processor 120 can then read the amount of encoded data suitable for the current decoding mode to perform decoding according to the decoding mode. For example, the processor 120 can read multiple groups of encoded data from (multiple) channels and / or (multiple) time slices in a manner similar to the above-mentioned acquisition of multiple groups of data to combine into codewords suitable for the current decoding mode.
[0084] The processor 120 may perform error detection on the encoded data read, and if necessary, attempt to generate error-corrected data bits for the data based on the read check bits. Specifically, at 615, the processor 120 may generate check bits for the data bits of the encoded data read based on the current decoding method. Then, at 620, the processor 120 may compare the check bits generated at 615 with the check bits of the encoded data read at 610 to determine whether the two sets of check bits match.
[0085] If the two sets of check bits match, the processor 120 can determine that the data bits of the encoded data read are consistent with when the data bits were written, that is, there are no errors in the data bits. In this case, the method 600 can proceed to 625, where the detected data is provided to the application process for further use. Then, the method 600 can return to 610, where the processor 120 can read the next batch of data of the decoding unit size and its check bits.
[0086] If the two sets of check bits do not match, the processor 120 may determine that there are errors in the data bits. In this case, the processor 120 needs to attempt to perform error correction on the data bits to correct the erroneous bits. Therefore, the method 600 proceeds to 630, where the processor 120 may decode the read check bits according to the currently active ECC decoding path (e.g., the RS decoding circuit path). Such a decoding process is intended to determine the location of the erroneous bit in the corresponding data bit for correction.
[0087] Different ECC algorithms with different parameters have different error correction capabilities. In some cases, the situation that the error of data cannot be corrected may occur, that is, there is UCE in the data. If the processor 120 finds UCE at 635, the method 600 proceeds to 640, where the processor 120 can trigger the UCE interrupt. If no UCE is found, the method 600 proceeds to 645, where the processor 120 can generate the result of error correction. That is, the processor 120 can correct the error in the detected data bit based on the result of decoding the check bit to generate the data bit through error correction. For a binary erroneous data bit in the data bit, this can mean the flipping of the value.
[0088] As mentioned above, a specific ECC decoding method has a certain error detection and correction capability. When the errors in the data bits detected by it exceed its capability, in addition to ECC, miscorrection may also occur. That is, using the current decoding method to perform ECC decoding on the check code can obtain a certain result, but in fact there may be errors in the result.
[0089] In some cases, method 600 may further detect the reliability of the corrected data. At 650, processor 120 may determine whether to perform a reliability test on the corrected data. For example, processor 120 may turn this function on or off according to a pre-set configuration, thereby implementing two different error correction modes. If it is determined that the reliability test is not to be performed, method 600 proceeds to 655, where processor 120 may provide the corrected data to the application process for further use. At 655, processor 120 may also record a relevant error correction log. Then, method 600 may return to 610.
[0090] If it is determined to perform reliability testing, the method 600 proceeds to 660, where the processor 120 can determine the difference between the error-corrected data bits generated at 645 and the read data bits. In some embodiments, the processor 120 can determine the number of bits that are different between the error-corrected data bits and the data bits of the read data. In some embodiments, the processor 120 can also determine the distribution of these different bits in the data bits. Then, at 665, the processor 120 can determine whether the difference meets a threshold condition.
[0091] In some embodiments, the processor 120 may determine that the number of bits that differ between the error-corrected data bits and the data bits of the read data exceeds a threshold. The threshold is associated with the maximum number of bits that can be corrected in a group of data bits by the ECC encoding and decoding method used. For example, if an ECC method that can detect at most one bit of data generates a correction result that corrects two bits, then the result meets the threshold condition, that is, the correction result may include an error.
[0092] In some embodiments, the threshold condition is also related to the distribution of the error bits. For example, if the ECC method can reliably detect errors of j consecutive bits, but if the error bits are discontinuous, it can only reliably detect fewer k bits of errors. If the error-corrected data bits correct the errors of i discontinuous bits, the processor 120 can still determine that the result meets the threshold condition.
[0093] If the difference does not meet the threshold condition, the method proceeds to 655. If the difference meets the threshold condition, the method proceeds to 670, where the processor 120 can generate a hint indicating that there may be an error in the corrected data bit. Then, at 675, the processor 120 can provide the corrected data with the hint (e.g., as an additional mark) to the application process for use. The processor 120 can also record the relevant error correction log for tracking and analysis. Then, the method 600 can return to 610.
[0094] In this way, more cautious error correction results can be provided to upper-level applications, and the decision of whether to use risky data can be handed over to upper-level applications, so as to ensure the continuous operation of the business while taking into account the risk of miscorrection. For example, when the data is an image to be displayed by an application, errors involving several pixels may not affect the display. Therefore, the application can choose to use the data. As another example, when the application has high requirements for data correctness, it can discard the corrected data that is marked as possibly erroneous. In other embodiments of the present application, for example, in a security server where the correctness of the data is very important, in order to ensure the reliability of the data as much as possible, after determining that there may be errors in the corrected data bits, instead of generating a prompt at 670, the processor 120 can trigger an interrupt.
[0095] Method 600 can be combined with the above Figures 2 to 5 The ECC encoding process is used in combination with the ECC encoding process, thereby realizing an ECC function that can achieve stronger error detection and correction performance than the traditional method under the same hardware conditions. In addition, the above process of detecting and prompting the reliability of the error-corrected data can also be used separately with other ECC decoding processes to provide the related benefits as described above.
[0096] As described above, the computing device 110 can read data and perform ECC functions on the data according to a preset encoding method. In addition, these encoding methods can be updated due to changes in ECC-related requirements for the computing device 110. In some embodiments, the update of the encoding method can occur during system operation, and the update does not require the system to be restarted for it to take effect.
[0097] Reference now Figure 7 To describe the setting and updating of encoding methods. Figure 7 1 shows a flow chart of an example method 700 for data verification according to some embodiments of the present application, wherein an ECC encoding configuration for data verification is updated during system operation. The example method 700 may be performed, for example, by Figure 1 It should be understood that method 700 may also include additional actions not shown, and some actions in method 700 may be omitted, and the scope of the present application is not limited in this respect. Figure 1 The method 700 is described in detail with reference to the example environment 100 of FIG.
[0098] The method 700 begins with the system on the computing device 110 starting at 710. Here, the computing device 110 can configure the components that perform ECC encoding and decoding based on the preset encoding method to initialize the ECC error correction and error detection functions. For example, the computing device 110 can be configured based on a configuration file that stores relevant parameters of the encoding method. The values of these relevant parameters can be default values that are not changed or restored, or can be values previously entered by a user.
[0099] In some embodiments, the configuration parameters may include the number of channels that should be used to read data in parallel and / or the number of time slices over which the data read should be aggregated. For example, the computing device 110 may configure its ECC encoding function to encode based on N groups of data read in parallel from M channels or M groups of memory banks aggregated over L time slices, as described above with respect to method 200.
[0100] In some embodiments, for example, as part of the processor 120, the computing device 110 may include multiple ECC encoding circuits and corresponding decoding circuits, such as a circuit implementing a Hamming code algorithm and a circuit implementing a RS algorithm. According to the encoding algorithm specified in the configuration file, the computing device 110 may enable and configure the corresponding circuit and perform ECC-related functions.
[0101] It should be understood that in addition to the above configurations affecting the encoding method, the computing device 110 may also perform other ECC-related configurations. For example, according to requirements such as the missed detection rate for ECC decoding, the computing device 110 may include a function of enabling or disabling reliability detection of error-corrected data after it is generated, as described in detail above with respect to method 600.
[0102] At 720, the processor 120 of the computing device 110 begins to run various system and application processes, and continuously communicates with the memory 130 to read and write data, etc. During this period, the configured ECC-related functions are utilized. The processor 120 (for example, in its internal buffer) can perform ECC encoding on the data to be written to the memory 130, and write the data bits of the data and the calculated check bits to the memory 130 according to the corresponding read and write specifications. And, when reading the encoded data for use, the processor 120 can use the configured ECC-related functions to read in the data bits and corresponding check bits of the data for decoding, thereby performing ECC error correction and error detection on the data.
[0103] The computing device 110 may be configured based on the ECC error correction and error detection function, according to the above Figures 2 to 6 The method described herein performs ECC encoding on the aggregated long codeword and correspondingly performs ECC decoding, which will not be described in detail herein. Depending on the implementation, this process may be performed by the memory controller 140 or another component of the processor. Figure 7 Not shown, but if a UCE is found during the decoding process, the computing device 110 performs relevant error handling actions, such as triggering an interrupt.
[0104] During system operation, at 730, the computing device 110 may receive an update indication for the ECC encoding method, for example, via a user interface. The update indication may include update information for one or more parameters, such as the number of channels for reading the data to be aggregated in parallel, the number of time slices for reading the data to be aggregated, and the encoding algorithm. In response to receiving the update indication, at 740, the computing device 110 may configure the relevant components according to the update to switch to a new encoding method. For example, the computing device 110 may switch the encoding circuit to another encoding circuit, and correspondingly switch the decoding circuit to a decoding circuit paired with another encoding circuit. After switching to the new encoding method, the processor 120 of the computing device 110 may perform subsequent ECC encoding and decoding actions according to the new encoding method.
[0105] When the update of the encoding method occurs during system operation, after the update, there may be data encoded with check bits in the method before the update in the memory 130. If the processor 120 reads this data for error detection and error correction, it will use the updated decoding method to perform these actions. This will produce wrong results or no results. To solve this problem, at 750, the computing device 110 can cause the processor 120 to update the check bits of the encoded data in the memory 130 with the updated encoding method.
[0106] To this end, the processor 120 can read the encoded data from the memory 130 into its buffer according to the updated encoding method to update the check bit of the data. According to the ECC encoding process as described above, the processor 120 can use the number of channels and the number of time slices indicated in the updated configuration to read and aggregate the long codeword for ECC encoding, and use the updated encoding method to calculate the check bit of the long codeword. Then, the processor 120 can write the data bits and check bits of the long codeword back to the corresponding addresses, thereby keeping the data bits unchanged and overwriting the previous check bits. The processor 120 can continue to read and aggregate the next long codeword to update the check bit until the required update is completed.
[0107] Method 700 provides customizable ECC error detection and correction functions that are flexible and configurable in multiple dimensions such as space, time, and encoding algorithms. In this way, multiple ECC encoding and decoding methods that meet different needs of users can be provided under the same hardware environment. In addition, the relevant configuration can be dynamically updated without restarting in response to changes in demand, thereby avoiding business interruptions caused by updating ECC-related function configurations. The method can be used for operational configuration optimization of data centers, etc. Multiple ECC-related function configurations can be adopted and tested for a period of time to clarify the most important memory failure modes and determine the best configuration parameters.
[0108] As described above, given the hardware constraints of the memory system (e.g., the redundancy ratio of data bits and check bits that it can support, etc.), the user can configure the ECC related functions according to the requirements of memory error detection and correction in its application scenario. In some embodiments, the user can directly input parameter values to configure the parameters according to the requirements.
[0109] For example, in the case where the processor 120 includes multiple pairs of encoding and decoding circuits, for scenarios requiring 1-bit error correction, for cost considerations, the user can configure the encoding algorithm to a Hamming code encoding algorithm. For example, for higher error detection requirements, the user can configure the encoding algorithm to a more capable RS encoding algorithm and encode on the basis of aggregated long codewords to achieve error correction capabilities for multiple consecutive symbols. As another non-limiting example, the user can enter a configuration value to specify RS8 encoding based on the aggregation of two time slice data read in parallel from two channels. However, if less latency is to be achieved without changing the encoding algorithm, the user can modify the configuration to aggregate the data of one time slice read in parallel from four channels for RS8 encoding.
[0110] In other embodiments, instead of directly inputting parameter values, user input may include ECC performance requirements for memory 130. The computing device 110 may automatically adapt the parameters of the encoding method that can meet the performance requirements and meet the hardware and other constraints according to these ECC performance requirements and the hardware constraints of the memory 130, and use these parameters to set or update the ECC related function configuration. In some embodiments, these performance requirements may include the expected delay caused by ECC error correction, and the expected reliability indicators of the corresponding data using the generated verification data, such as the expected missed detection rate or the false correction rate. In some embodiments, the hardware constraints of the memory 130 may include the redundancy ratio between the capacity used to store the original data and the capacity used to store the verification data in the memory 130.
[0111] In some embodiments, the computing device 110 may provide preset multiple parameter combinations, and corresponding requirements to these multiple parameter combination mapping rules. In this way, the computing device 110 may provide corresponding parameter combinations based on the mapping rules to configure ECC related functions. In some embodiments, the computing device 110 may implement a configuration planning function. This function takes performance requirements and constraints as input, and outputs the optimal configuration parameters for extreme reliability that meet various constraints, such as the number of channels and time slices on which the aggregated data is based, and the ECC encoding algorithm to be used. The optimal configuration parameters can then be used to configure ECC related functions.
[0112] Figure 8 800 according to some embodiments of the present application. The device 800 may be implemented as or included in Figure 1 The computing device 110 of the embodiment of the present invention may include a plurality of modules for executing corresponding actions in the method 200, the method 600 and the method 700, for example.
[0113] As shown in the figure, the device 800 includes the following modules: an acquisition module 810, configured to acquire N groups of data from a memory, each group of data in the N groups of data includes a check bit, wherein N is a positive integer greater than or equal to 2; an aggregation module 820, configured to aggregate the N groups of data to obtain aggregated data, the aggregated data includes an aggregated check bit, and the aggregated check bit is an aggregation of the check bits of the N groups of data; an encoding module 830, configured to perform error correction code ECC encoding on the aggregated data to obtain encoded data; a decomposition module 840, configured to decompose the encoded data into N groups of encoded data, each group of encoded data in the N groups of encoded data includes a check bit; and a writing module 850, configured to write the N groups of encoded data into the memory respectively.
[0114] In some embodiments, the acquisition module 810 includes a first reading module, which is configured to read data from N channels or N memory bank groups of the memory, wherein the data of each channel or each memory bank is a group of data.
[0115] In some embodiments, the acquisition module 810 includes a second read module, which is configured to read data from M channels or M memory bank groups of the memory in L time slices, where N=L*M, and the time slice is the duration of a burst transmission of reading data from the memory.
[0116] In some embodiments, the encoding module 830 includes: a determination module configured to determine a method for obtaining N groups of data from a memory according to a preset encoding method; and an ECC encoding module configured to perform ECC encoding on the aggregated data according to a preset encoding method.
[0117] In some embodiments, the ECC encoding module includes: presetting the encoding method according to user input, where the input includes ECC performance requirements for the memory.
[0118] In some embodiments, the apparatus 800 further includes an updating module, wherein the updating module is configured to: in response to the encoding method being updated, obtain data from the memory according to the updated encoding method to update the check bit of the obtained data.
[0119] In some embodiments, the encoding scheme includes Reed-Solomon encoding.
[0120] In some embodiments, the device 800 also includes: a decoding method determination module, configured to determine a corresponding decoding method according to an encoding method; and an error correction module, configured to generate error-corrected data bits for the data based on the check bits of the read data according to the decoding method when reading data from the memory for use.
[0121] In some embodiments, the device 800 also includes: a difference bit number determination module, which determines the number of different bits between the corrected data bits and the data bits of the read data; a prompt module, which is configured to generate a prompt when the different number of bits meets a threshold condition, and the prompt indicates that there may be errors in the corrected data bits.
[0122] Fig. 9 Schematic block diagram of an example device 900 that can be used to implement embodiments of the present application is shown. The device 900 can be used to implement Figure 1 900. As shown in the figure, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to computer program instructions stored in a random access memory (RAM) 903 and / or a read-only memory (ROM) 902 or computer program instructions loaded from a storage unit 908 into the RAM 903 and / or the ROM 902. Various programs and data required for the operation of the device 900 can also be stored in the RAM 903 and / or the ROM 902. As a non-limiting example, the computing unit 901 and the RAM 903 can respectively implement Figure 1 The functions of the processor 120 and the memory 130 shown in FIG. 901 and the RAM 903 and / or the ROM 902 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0123] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0124] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Figure 1The functions of the processor 120 in the device 900. Some examples of the computing unit 901 include, but are not limited to, a CPU, a GPU, various dedicated AI computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as methods 200, 600, and 700. For example, in some embodiments, methods 200, 600, and 700 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via RAM and / or ROM and / or a communication unit 909. When the computer program is loaded into RAM and / or ROM and executed by the computing unit 901, one or more steps of the methods 200, 600, or 700 described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the method 200 , 600 , or 700 in any other appropriate manner (eg, by means of firmware).
[0125] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a server or terminal, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a server or terminal or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (such as a floppy disk, a hard disk and a tape, etc.), an optical medium (such as a digital video disk (digital video disk, DVD), etc.), or a semiconductor medium (such as a solid-state hard disk, etc.).
[0126] In addition, although each operation is described in a specific order, this should be understood as requiring such operation to be performed in the specific order shown or in a sequential order, or requiring that all illustrated operations should be performed to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the application. Some features described in the context of a separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination mode.
[0127] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for data verification, comprising: Acquire N groups of data from a memory, each group of data in the N groups of data includes a check bit, wherein N is a positive integer greater than or equal to 2; Aggregating the N groups of data to obtain aggregated data, where the aggregated data includes an aggregated check bit, where the aggregated check bit is an aggregation of check bits of the N groups of data; Performing error correction code (ECC) encoding on the aggregated data to obtain encoded data; Decomposing the coded data into N groups of coded data, each group of the N groups of coded data including a check bit; and The N groups of encoded data are written into the memory respectively.
2. The method according to claim 1, characterized in that Getting N sets of data from the memory includes: Data are read from N channels or N memory bank groups of the memory, wherein data of each channel or each memory bank group constitutes a group of data.
3. The method according to claim 1, characterized in that Getting N sets of data from the memory includes: Data is read from M channels or M memory bank groups of the memory in L time slices, where N=L*M, and the time slice is the duration of one burst transmission of reading data from the memory.
4. The method according to claim 1, characterized in that: Performing error correction code (ECC) encoding on the aggregated data includes: Determining a method for acquiring the N groups of data from the memory according to a preset encoding method; and The aggregated data is ECC-encoded according to the preset encoding method.
5. The method according to claim 4, characterized in that Performing ECC encoding on the aggregated data according to the preset encoding method includes: The encoding mode is preset according to a user input, wherein the input includes an ECC performance requirement for the memory.
6. The method according to claim 4, characterized in that Also includes: In response to the encoding method being updated, data is retrieved from the memory according to the updated encoding method to update a check bit of the retrieved data.
7. The method according to claim 4, characterized in that The encoding method includes Reed-Solomon encoding.
8. The method according to claim 4, characterized in that Also includes: Determine a corresponding decoding method according to the encoding method; as well as When data is read from the memory for use, error-corrected data bits for the data are generated based on the parity bits of the read data according to the decoding method.
9. The method according to claim 8, characterized in that Also includes: determining the number of bits that differ between the error-corrected data bits and the read data bits of the data; If the number of bits satisfies a threshold condition, an indication is generated indicating that there is likely an error in the error-corrected data bits.
10. A device for data verification, characterized in that: include: An acquisition module is configured to acquire N groups of data from a memory, each group of data in the N groups of data includes a check bit, wherein N is a positive integer greater than or equal to 2; an aggregation module, configured to aggregate the N groups of data to obtain aggregated data, wherein the aggregated data includes an aggregated check bit, and the aggregated check bit is an aggregation of check bits of the N groups of data; An encoding module, configured to perform error correction code (ECC) encoding on the aggregated data to obtain encoded data; a decomposition module configured to decompose the coded data into N groups of coded data, each group of coded data in the N groups of coded data including a check bit; and The N groups of data are written into the memory respectively, wherein N is a positive integer greater than or equal to 2.
11. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 9.
12. A computer storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed by an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 9.
13. A computer program product, characterized in that The computer program product comprises instructions, which, when executed by an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 9.
Citation Information
Cited By
Coding and decoding method and device and electronic equipment
CN120123141A
Coding and decoding method, device and electronic equipment
CN120123141B
