Error correction system and method based on data characteristics
By using neural network training data characteristics in the memory controller to dynamically select the error correction level, the problems of increased resource consumption and latency in the prior art are solved, and more efficient data correction and memory performance are achieved.
Patent Information
- Application Number
- CN202410601340.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-05-19
- Filing Date
- 2024-05-15
- Publication Date
- 2024-11-22
AI Technical Summary
In existing semiconductor memory technologies, conventional error correction methods cannot dynamically adjust the error correction level according to the relative importance of the data, resulting in increased resource consumption and latency.
By using the characteristics of neural network training data in the memory controller, the error correction level is dynamically selected, and different levels of error correction are applied according to the relative importance of the data.
It reduces resource consumption and latency, and improves the data reliability and efficiency of the memory.
Smart Images

Figure CN119003230A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate generally to memory and, more particularly, in one or more illustrated embodiments, to systems and methods for error correction in memory. Background Art
[0002] High data reliability, high speed memory access and reduced chip size are required features of semiconductor memory. Semiconductor memory (e.g., dynamic random access memory (DRAM)) can use various methods to improve reliability and data integrity by detecting and / or correcting errors in data written to the memory. Various conventional methods range from single parity bits to more complex encoding algorithms. Typically, in a given application, a single method is used for all data, regardless of the relative importance of the data. For more complex encoding algorithms, this may result in increased latency and resource consumption to accommodate the increased security and / or reliability required for a subset of data. A more detailed method to mitigate errors in data is desired. Summary of the invention
[0003] One aspect of the present disclosure discloses a method, comprising: receiving data from a host device at a memory controller; determining characteristics of the received data; selecting an error correction level from a plurality of error correction levels of the received data based on the determined characteristics; and writing the received data and an error correction code generated based on the selected error correction level to a memory.
[0004] Another aspect of the present disclosure discloses a method, which includes: receiving a plurality of data; receiving characteristics associated with the plurality of data; generating a training data set using the plurality of data and the characteristics associated with the plurality of data; and training a neural network using the training data set to determine data characteristics of specific data.
[0005] Another aspect of the present disclosure discloses an apparatus comprising: a memory controller configured to: receive data from a host device; determine characteristics of the received data; select an error correction level from a plurality of error correction levels of the received data based on the determined characteristics; and write the received data and an error correction code generated based on the selected error correction level to a memory. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] Figure 1 is a schematic block diagram illustrating a system for error correction based on data characteristics according to various embodiments. Figure 2 is a block diagram illustrating a processing unit arranged in a computing system according to various embodiments.
[0007] Figure 3 is a schematic diagram illustrating a neural network according to various embodiments.
[0008] Figure 4 is a flow chart illustrating a process for training a neural network to determine characteristics of data, according to various embodiments.
[0009] Figure 5 is a flow chart illustrating a process for selecting an error correction level based on data characteristics according to various embodiments. DETAILED DESCRIPTION
[0010] Memory devices may utilize error correction coding (ECC). Typically, ECC techniques may encode raw data with additional encoded bits to protect the raw bits intended to be stored, retrieved, and / or transmitted. However, using ECC may increase the amount of resources (e.g., processing and memory resources) used by the memory, and ECC may increase latency. Therefore, the present application describes techniques that may dynamically adjust error correction to reduce resource consumption compared to conventional ECC implementations, such as based on the characteristics of the data. For example, the methods described herein may include applying different levels of error correction based on the relative importance of the data.
[0011] Various embodiments of the present disclosure will be explained in detail below with reference to the accompanying drawings. The following detailed description refers to the accompanying drawings that show specific aspects and embodiments of the present disclosure in an illustrative manner. The detailed description contains sufficient details to enable a person skilled in the art to practice the embodiments of the present disclosure. Other embodiments may be utilized, and structural changes, logical changes, and electrical changes may be made without departing from the scope of the present disclosure. The various embodiments disclosed herein are not necessarily mutually exclusive, as some disclosed embodiments may be combined with one or more other disclosed embodiments to form new embodiments.
[0012] Figure 1is a schematic block diagram illustrating a system 100 for error correction based on data characteristics according to various embodiments. The system 100 includes a host computing device 104 coupled to a memory controller 102, which can control one or more memory devices 112. In some examples, the memory controller 102 is embodied in or is an element of the host computing device 104. In these and other implementations, the host computing device 104 may include a system on a chip (SOC), a central processing unit (CPU), a graphics processing unit (GPU), a field programmable gate array (FPGA), or the like, and the memory controller 102 may include logic, circuitry, or components of such a SOC, CPU, GPU, and / or FPGA. In some examples, the host computing device 104 may be one physical device and the memory controller 102 may be separate physical devices (e.g., each may be a chiplet in a chiplet system). In some cases, memory controller 102 and memory devices 112 may be elements of a module (eg, a dual in-line memory module (DIMM), a card, or a drive) and host computing device 104 may be a separate processor.
[0013] The memory controller 102 may include a host interface 114, which may be coupled to a host bus 122 for connecting to a host computing device 104. The host interface 114 is coupled to and / or may be implemented using a processor 106 or processing resource, which may be a SOC, an application specific integrated circuit (ASIC), an FPGA, or the like, and may be separate from or may be an element of the host computing device 104, as described above. The processor 106 may include data characteristic logic 108 and memory control logic 110. The host interface 114 and processor 106 may also be coupled to a cache 116, for example, via an internal memory controller bus. The processor 106 may be coupled to the memory device 112 via a memory interface 118 and a corresponding memory bus 124. The memory interface 118 may also be coupled to the cache 116, for example, also via an internal memory controller bus. Cache 116 may be coupled to error correction logic 120 , which may perform error correction on data communicated to / from cache 116 .
[0014] Memory device 112 may store data retrieved and / or accessed by host computing device 104. As an example, in operation, host computing device 104 processes a data set (e.g., an image or content data set) for use by one or more neural networks hosted on host computing device 104. The data set may be stored on memory device 112. For example, processor 106 may obtain the data set from one or more memory devices 112 via host bus 122. Memory device 112 may be included in one or more computing devices and / or may store data for one or more computing devices, such as, but not limited to, computing devices in a data center or personal computing devices. Processor 106 may store a data set (e.g., an image) in one or more of memory devices 112 (e.g., the data set may be distributed among memory devices 112). Processor 106 may store discrete units of a data set (e.g., an image or a video frame) in memory device 112.
[0015] The memory device 112 stores and provides information (e.g., data and instructions) in response to a memory access request received from the memory controller 102 (e.g., a memory access request from the host computing device 104 that is routed or processed by the processor 106). In operation, the memory device 112 processes the memory access request to store and / or retrieve information based on the memory access request. For example, the host computing device 104 may include a host processor that can execute a user application that requests stored data and / or stored instructions (and / or requests to store data / instructions) at the memory device 112. When executed, the user application generates a memory access request to access data or instructions in the memory device 112. Typically, the memory access request may include a command and an address, such as a memory command and a memory address. In various embodiments, the memory access request may include a command and an address for a read operation, a write operation, an activation operation, or a refresh operation at the memory device 112. Typically, the received command and address may facilitate the execution of a memory access operation for the memory device 112 at the memory device 112, such as a read operation, a write operation, an activation operation, and / or a refresh operation. Thus, a memory access request may be or include at least one memory address of one or more of the memory devices 112. In the example of a write operation, the memory access request may include data in addition to the command and address, for example. In some examples, the memory access request and / or additional data received with the memory access request may also include information about the data, such as the relative importance of the data or other data characteristics (e.g., received from the host computing device 104). The memory access request from the host computing device 104 is provided to the processor 106 via the host bus 122.
[0016] After receiving one or more memory access requests for memory devices 112 at processor 106, memory controller 102 may perform error correction on data associated with the memory access requests to produce error-corrected data, for example, using error correction logic 120. Additionally or alternatively, memory controller 102 may perform address translation using memory access requests (e.g., commands and addresses) to translate logical memory addresses into physical memory addresses. For example, the memory address in the memory address request may be a logical address known, for example, to a user application executing at host computing device 104. Memory controller 102 may be configured to translate that memory address into a physical address of one of memory devices 112 using memory control logic 110.
[0017] Additionally or alternatively, when processing a memory access request at the processor 106 of the memory controller 102, the memory controller 102 may, for example, in response to receiving a command and / or an address, perform error correction on data associated with the memory access request using the error correction logic 120. For example, in the context of a write operation, after performing an address translation using the memory control logic 110, the processor 106 may control error correction of data associated with the memory access request using the error correction logic 120. In the context of a read operation, the processor 106 may control error correction data read from the memory device 112 at the error correction logic 120 for the memory access request.
[0018] Whether it is a read or write operation, the error correction logic 120 can correct erroneous data associated with that operation (e.g., perform an error correction operation). The error correction logic 120 can correct erroneous data or information obtained from the memory device 112. For example, the error correction logic 120 can correct erroneous data according to an expected bit error rate (BER) for the operation of the memory device 112. For example, the error correction logic 120 can include low-density parity check correction logic that can correct erroneous data according to a low-density parity check (LDPC) code. Therefore, the error correction logic 120 can include an LDPC encoder. Additionally or alternatively, the error correction logic 120 can include a single parity check (SPC) encoder and / or an algebraic error correction circuit, such as one of a group including a Bose-Chaudhuri-Hocquenghem (BCH) encoder and / or a Reed Solomon ECC encoder and other types of error correction circuits. When utilizing error correction logic 120, memory controller 102 may correct errors that may occur to data during memory retrieval from or storage at memory device 112. The desired BER may be specified by host computing device 104 or a user executing a user application at host computing device 104.
[0019] Error correction logic 120 may be implemented using discrete components, such as an application specific integrated circuit (ASIC) or other circuitry, or the components may reflect functionality provided by circuitry within memory controller 102 that is not necessarily in a discrete physical form separate from other portions of memory controller 102. Figure 1 1 as a component within the memory controller 102 , the error correction logic 120 may be external to the memory controller 102 or have one or more components within the memory controller 102 and one or more components external to the memory controller 102 .
[0020] In operation, for erroneous data to be corrected using error correction logic 120, cache 116 may provide data (e.g., data obtained from memory device 112) to error correction logic 120 to correct that data, and subsequently receive the error-corrected data from error correction logic 120. In some implementations, cache 116 may be directly coupled to a storage device (such as a static random access memory (SRAM) or DRAM storage device) that is part of host computing device 104 and obtain data directly from that storage device. For example, a memory access request provided to host interface 114 may include a memory access command provided to cache to access a storage device on host computing device 104 to obtain data associated with the memory access request. In various implementations, cache 116 may be a dynamic memory device (such as DRAM), and may interact with processor 106. For example, cache 116 may be a data cache that includes or corresponds to one or more cache levels L1, L2, L3, L4 (e.g., as a multi-level cache), or any other cache level. In the context of a read operation, data retrieved from the memory device 112 may be stored at the cache 116 (eg, in a buffer or queue) so that the error correction logic 120 corrects the data as part of the read operation in the memory access request.
[0021] In some embodiments, when one or more memory access requests for memory device 112 are received at processor 106, processor 106 may route or store at least a portion of the one or more memory access requests in a queue or (several) buffers (e.g., request, processing, or data buffers) at cache 116. Data to be corrected at error correction logic 120 may be stored in a data buffer at cache 116. Additionally or alternatively, memory access requests may be stored in a queue or buffer for processing by processor 106, and / or portions of processed memory access requests may be stored in a processing buffer. For example, processor 106 may identify based on the memory access request that a memory address of the memory access request is to be stored in a NAND device. In order to store data in the NAND device, processor 106 may first control a NAND memory device of memory device 112 to erase data at a physical address (e.g., a memory address as translated by memory control logic 110). Thus, after processing the erase operation, processor 106 may store the write operation to be performed in the processing buffer.
[0022] Error correction operations (e.g., generating error correction codes or error-corrected data) may increase the use of resources and / or increase latency. For example, the error correction logic 120 may generate error correction codes to be stored in the memory device 112 along with data received with a write operation (e.g., from the host computing device 104), but the generation of the error correction codes increases the latency of the write operation and the storage of the error correction codes uses more storage resources of the memory device 112. Therefore, the disclosed systems and methods dynamically adjust the error correction level based on the characteristics of the data. For example, data associated with a write operation may be received from the host computing device 104 at the memory controller 102. Before performing an error correction operation (e.g., to generate error correction codes by the error correction logic 120), the received data is analyzed by the data characteristic logic 108 to determine one or more characteristics of the data. For example, the data characteristic logic 108 may determine the relative importance of the data. Using the one or more characteristics determined by the data characteristic logic 108, the memory control logic 110 may select an error correction level to be applied to the data. The error correction level may be selected from a plurality of error correction levels. For example, when the data is relatively unimportant (e.g., importance level 1), the first level of error correction may not apply error correction, when the data is of ordinary importance (e.g., importance level 2), the second level of error correction may apply normal error correction, and when the data is very important (e.g., importance level 3), the third level of error correction may apply additional error correction. Without departing from the scope of the present disclosure, two importance levels or more than three importance levels may be implemented. After the error correction level is selected by the memory control logic 110, the data associated with the write operation may be appropriately directed for further processing and storage. For example, when error correction is not applied, that data may be sent to the one or more memory devices 112 via the memory interface 118 and the one or more memory buses 124 without error correction codes. When error correction is applied, the data may be provided to the error correction logic 120 and / or the cache 116 to perform error correction operations. For example, the error correction logic 120 may generate error correction codes according to the selected error correction level, and the error correction codes may be stored in the one or more memory devices 112 together with the data. In some implementations, different error correction levels may correspond to different ones of the memory devices 112. For example, a first level of error correction may be performed for data stored in a first one of the memory devices, a second level of error correction may be performed for data stored in a second one of the memory devices, and so on. Advantageously, the system 100 applies error correction levels based on characteristics of the data, such as the relative importance of the data.Thus, resources (e.g., processing and / or storage resources) may be saved for relatively unimportant data (e.g., by forgoing the generation and storage of error correction codes), and additional error correction may be applied to more important data (e.g., by generating and storing more ECC bits or storing redundant copies of the data) to increase the likelihood that errors in the data can be detected and / or corrected. Table 1 below illustrates examples of data characteristics and corresponding error correction levels.
[0023]
[0024] In operation, in response to one or more memory access requests including read operations, the memory device 112 provides access to the requested data such that the read data is provided as plaintext data from the memory controller 102 to the host computing device 104 via the host bus 122. The memory interface 118 may provide the data via the memory bus 124 and an internal memory controller bus between the memory interface 118 and the cache 116, such as to be stored in the cache 116 for access by the error correction logic 120. Thus, the cache 116 may obtain the requested data from the memory devices 112 and their respective memory buses 124.
[0025] In the examples described herein, the memory device 112 may be a non-volatile memory device (e.g., a NAND memory device) or a volatile memory device. Typically, volatile memory may have some improved characteristics relative to non-volatile memory (e.g., volatile memory may be faster). The memory device 112 may also include one or more types of memory, including but not limited to: DRAM, SRAM, three-level cell (TLC) NAND, single-level cell (SLC) NAND, solid-state drive (SSD), or 3D XPoint memory device. Data stored in the memory device 112 or data to be accessed from the memory device 112 may be communicated from the memory controller 102 via a memory bus 124. For example, the memory bus 124 may be a peripheral component interconnect express (PCIe) bus operating according to the non-volatile memory express (NVMe) protocol.
[0026] In an example embodiment, processor 106 may include any type of microprocessor, central processing unit (CPU), ASIC, digital signal processor (DSP) implemented as part of a field programmable gate array (FPGA), system on chip (SoC), or other hardware. For example, processor 106 may be implemented using discrete components such as an application specific integrated circuit (ASIC) or other circuit system, or the components may reflect functionality provided by circuit system within memory controller 102, which circuit system does not necessarily have a discrete physical form separate from other parts of memory controller 102. Portions of processor 106 may be implemented by a combination of discrete components. For example, memory control logic 110 may be implemented as an ASIC, while data characteristic logic 108 may be implemented as an FPGA having various stages in a specified configuration. Although in Figure 1 102 , but the processor 106 may be external to the memory controller 102 or have one or more components located within the memory controller 102 and one or more components located external to the memory controller 102 .
[0027] In various embodiments, the memory controller 102 may be an NVMe memory controller that may be coupled to the host computing device 104 via a host bus 122. The host bus 122 may be implemented as a PCIe bus operating according to the NVMe protocol. In an example, the memory bus 124 may be an NVMe bus operating according to the NVMe protocol. For example, in such embodiments, the memory device 112 may be implemented using a NAND memory device that is coupled to the NVMe memory controller 102 via a corresponding PCIe bus operating according to the NVMe protocol. Therefore, the memory bus 124 may be referred to as an NVMe memory bus. Compared to a memory system that can access a NAND memory device via a single host bus coupled to the host computing device 104, the system 100 may advantageously increase the rate and amount of processing by the number of NVMe memory buses 124 connected to the corresponding memory devices 112. Therefore, in an embodiment in which the processor 106 is an FPGA, the system 100 may be referred to as "accelerating" memory access and storage because the system 100 increases the availability of data transfers performed through the memory bus 124.
[0028] Additionally or alternatively, the memory controller 102 may be a non-volatile dual in-line memory module (NVDIMM) memory controller that is coupled to the host computing device 104 via a host bus 122. The host bus 122 may operate according to an NVDIMM protocol (e.g., NVDIMM-F, NVDIMM-N, NVDIMM-P, or NVDIMM-X). For example, in such implementations, the memory device 112 may be a NAND memory device or a 3D XPoint memory device. Thus, in such implementations, the memory device 112 may operate as a permanent storage device for the cache 116 (which may be a volatile memory device) and / or as a permanent storage device for any volatile memory on the memory controller 102 or the host computing device 104.
[0029] Figure 2 is a block diagram illustrating a processing unit 205 arranged in a computing system 200 according to various embodiments. In some examples, Figure 1 The host computing device 104 and / or the memory controller 102 may implement the system 200. The processing unit 205 may be configured to implement a neural network (e.g., Figure 3 A neural network 350) may be provided, such as a neural network trained to determine data characteristics and / or select a level of error correction based on data characteristics.
[0030] The processing unit 205 may receive input data (e.g., X(i,j)) 210a-c from a computing system (e.g., a host computing device). In some examples, the input data 210a-c may be data used to perform a memory access operation (e.g., a read operation or a write operation). The processing unit 205 may include multiplication units / accumulation units 212a-c, 216a-c and memory lookup units 214a-c, 218a-c that, when mixed with coefficient data retrieved from the memory 230, may generate output data (e.g., B(u,v)) 220a-c. In some examples, the output data 220a-c may be used as input data for another processing stage or as output data, such as one or more data characteristics of the input data 210a-c. In other words, the processing unit 205 may include one or more stages of a neural network such that the processing unit 205 receives input data 210a-c including data for performing a memory access operation and generates output data 220a-c including one or more characteristics of the input data 210a-c. In some implementations, the output data 220a-c additionally or alternatively includes an error correction level of the input data 210a-c, which may be selected from a plurality of error correction levels.
[0031] When one or more processing units 205 are implemented, a computer-readable medium at an electronic device (e.g., host computing device 104) may execute corresponding control instructions to perform operations through executable instructions 215 within the processing unit 205. For example, the control instructions provide instructions to the processing unit 205 that, when executed by the electronic device, cause the processing unit 205 to configure the multiplication units 212a-c to multiply the input data 210a-c with the coefficient data and to configure the accumulation units 216a-c to accumulate the processing results to generate the output data 220a-c.
[0032] The multiplication unit / accumulation unit 212a-c, 216a-c multiplies two operands from the input data 210a-c to produce a multiplication process result that is accumulated by the accumulation unit portion of the multiplication unit / accumulation unit 212a-c, 216a-c. The multiplication unit / accumulation unit 212a-c, 216a-c adds the multiplication process results to update the process results stored in the accumulation unit portion, thereby accumulating the multiplication process results. For example, the multiplication unit / accumulation unit 212a-c, 216a-c can perform a multiplication-accumulation operation such that two operands M and N are multiplied and then added to P to produce a new version of P stored in its corresponding multiplication unit / accumulation unit. The memory lookup unit 214a-c, 218a-c retrieves coefficient data stored in the memory 230. For example, the memory lookup unit can be a lookup table that retrieves a specific coefficient. The output of the memory lookup unit 214a-c, 218a-c is provided to the multiplication unit / accumulation unit 212a-c, 216a-c, which can be used as a multiplication operand in the multiplication unit portion of the multiplication unit / accumulation unit 212a-c, 216a-c. Using this circuit system arrangement, output data (e.g., B(u,v)) 220a-c can be generated from input data (e.g., X(i,j)) 210a-c.
[0033] In some examples, for example, the coefficient data from the memory 230 may be mixed with the input data X(i, j) 210a to c to generate the output data B(u, v) 220a to c. The relationship between the coefficient data based on the input data X(i, j) 210a to c and the output data B(u, v) 220a to c may be expressed as:
[0034]
[0035] where a' k,l 、a” m,n214a to c, 218a to c. As described above, the memory lookup units 214a to c, 218a to c retrieve coefficients to mix with the input data. Thus, the output data can be provided by manipulating the input data by the multiplication / accumulation units using a set of coefficients stored in memory associated with the data characteristics and / or the desired error correction level. The resulting mapped data can be manipulated by additional multiplication / accumulation units using a set of additional coefficients stored in memory associated with the data characteristics and / or the desired error correction level. The set of coefficients multiplied at each stage of the processing unit 205 can represent or provide an estimate of processing the input data in specially designed hardware (e.g., FPGA).
[0036] Furthermore, it can be shown that, as represented by Equation 1, system 200 can approximate any nonlinear mapping with arbitrarily small error in some instances and by coefficients a′ k,l 、a” m,n The mapping of system 200 is determined. For example, if such coefficient data is specified, system 200 can perform any mapping and processing between input data X(i,j) 210a to c and output data B(u,v) 220a to c. This relationship (as derived from the circuit system arrangement depicted in system 200) can be used to train the entities of computing system 200 to generate coefficient data. For example, using equation (1), the entities of computing system 200 can compare input data with output data to generate coefficient data.
[0037] In an example of system 200, processing unit 205 mixes coefficient data with input data X(i,j) 210a to c using memory lookup units 214a to c, 218a to c. In some examples, memory lookup units 214a to c, 218a to c may be referred to as lookup table units. Coefficient data may be associated with a mapping relationship between input data X(i,j) 210a to c and output data B(u,v) 220a to c. For example, coefficient data may represent a nonlinear mapping of input data X(i,j) 210a to c and output data B(u,v) 220a to c. In some examples, the nonlinear mapping of coefficient data may represent a Gaussian function, a piecewise linear function, a sigmoid function, a thin plate spline function, a multi-quadratic function, a cubic approximation, an inverse multi-quadratic function, or a combination thereof. In some examples, some or all of memory lookup units 214a to c, 218a to c may be deactivated. For example, one or more of the memory lookup units 214a-c, 218a-c may operate as gain units with unity gain. In this case, executable instructions (e.g., executable instructions 215) may facilitate selecting a unity gain processing mode for some or all of the memory lookup units 214a-c, 218a-c.
[0038] Each of the multiplication units / accumulation units 212a to c, 216a to c may include multiple multipliers, multiple accumulation units, and / or multiple adders. Any of the multiplication units / accumulation units 212a to c, 216a to c may be implemented using an arithmetic logic unit (ALU). In some examples, any of the multiplication units / accumulation units 212a to c, 216a to c may include one multiplier and one adder that each perform multiple multiplications and multiple additions, respectively. The input-output relationship of the multiplication / accumulation units 212, 216 may be represented as:
[0039]
[0040] where “I” represents the number of multiplications performed in that unit, and C i represents the coefficients accessible from the memory (memory 230), and B in (i) represents a factor from the input data X(i,j) 210a to c or from the output of the multiplication unit / accumulation unit 212a to c, 216a to c. In the example, the output B of a group of multiplication units / accumulation units out Equal to coefficient data C i Multiply by the output B of another set of multiplication unit / accumulation unit in The sum of (i). in (i) It is also possible to make the output B of a set of multiplication units / accumulation units out Equal to coefficient data C i Multiplies the sum of the input data.
[0041] Figure 3 is a schematic diagram illustrating a neural network 350 according to various embodiments. The neural network 350 may be used Figure 1 The host computing device 104 and / or the memory controller 102 and / or Figure 2 The computing system 200 includes a processing unit 205.
[0042] Neural network 350 includes three levels (e.g., layers). Figure 3 360, 362, 364, and 366. Additional, fewer, and / or different components may be used in other examples.
[0043] Typically, a neural network including multiple levels of nodes may be used, such as neural network 350. The nodes may use processing units (e.g., Figure 2 The neural network may be implemented as a processing unit 205 that performs one or more functions on inputs received from a previous stage and provides outputs of the functions to the next stage of the neural network. The processing unit may be implemented using, for example, one or more processors, controllers, and / or custom circuitry, such as an application specific integrated circuit (ASIC) and / or a field programmable gate array (FPGA). The processing unit may be implemented as a combiner and / or summer and / or any other structure for performing the functions assigned to the processing unit. In some examples, certain elements of the neural network described herein perform weighted summations, such as may be implemented using one or more multiply / accumulate units, which may be implemented using processor(s) and / or other circuitry.
[0044] exist Figure 3 In the example of , neural network 350 may have an input layer, which may be a first level of a neural network including nodes 368, 369, 372, and 374. Nodes 368, 369, 372, and 374 may implement a linear function that converts input signals (e.g., x1(n), x2(n), . . . x) into N (n)) is provided to another level (e.g., a 'hidden level' or 'hidden layer') of the neural network. Thus, in Figure 3In an example of , N signals of input data may be provided to an input stage (e.g., an input layer) of a neural network during operation. In some examples, the input data may be data associated with a memory access operation (e.g., a read and / or write operation). The N signals of input data may be output by a first stage of neural network 350 to a next stage of neural network 350. In some examples, the connection between the first and second stages of neural network 350 may not be weighted—e.g., in some examples, a processing unit in the second stage may receive the signal from the first stage unchanged. Each of the input signals may be provided to a plurality of the processing units in the next stage. Although an input layer is shown, in some examples, an input layer may not be present.
[0045] Neural network 350 may have a next layer, which in some instances may be referred to as a 'hidden layer'. The next layer may include combiner 352, combiner 354, combiner 356, and combiner 358, although any number of elements may be used. Although the processing elements in the second stage of neural network 350 are referred to as combiners, typically the processing elements in the second stage may perform a non-linear activation function using the input signal received at the processing element. Any number of non-linear activation functions may be used. Examples of functions that may be used include Gaussian functions, such as:
[0046]
[0047] Examples of functions that can be used include polyquadratic functions, such as f(r)=(r 2 +σ 2 ) 1 / 2 Examples of functions that can be used include inverse multiquadratic functions, such as f(r) = (r 2 +σ 2 ) -1 / 2 Examples of functions that can be used include thin plate spline functions, such as f(r) = r 2 log(r). Examples of functions that can be used include piecewise linear functions, such as:
[0048]
[0049] Examples of functions that can be used include cubic approximation functions, such as:
[0050]
[0051] In these example functions, σ represents a real parameter (eg, a scaling parameter) and r is the distance between the input vector and the current vector. The distance can be measured using any of a variety of metrics, including the Euclidean norm.
[0052] Each element in the 'hidden layer' may receive as input a selected signal (e.g., some or all) of the input data. For example, each element in the 'hidden layer' may receive as input the output of a plurality of selected units (e.g., some or all of the units) in the input layer. For example, combiner 352 may receive as input the output of node 368, node 369, node 372, and node 374. Although in Figure 3 A single 'hidden layer' is shown by way of example in , but any number of 'hidden layers' may be present and may be connected in series. Although four units are shown in the 'hidden layer', any number may be used, and the number of units may be the same or different than the number of nodes in the input layer and / or the number of nodes in any other hidden layer. The nodes in the hidden layer may evaluate at least one nonlinear function using a combination of data received at the hidden layer nodes (e.g., elements). In this manner, the hidden layer may provide intermediate data at the output of one or more hidden layers.
[0053] Neural network 350 may have an output layer. Figure 3 The output layer in the example of may include combiner 360, combiner 362, combiner 364 and combiner 366, but any number of elements may be used. Although the processing elements in the output stage of neural network 350 are referred to as combiners, the processing elements in the output layer may generally use the intermediate processing results from the last 'hidden layer' in the neural network to perform any combination or other operations. Each element in the output layer may receive the selected intermediate processing results (e.g., some or all) of the data provided by the last 'hidden layer' as input. For example, combiner 360 may receive the outputs of combiner 352, combiner 354, combiner 356 and combiner 358 as input. The connection between the hidden layer and the output layer may be weighted. For example, a set of weights W may be specified. In some examples, each connection between a hidden layer node and an output layer node may have a weight. In some examples, each hidden layer node may have a weight that may be applied to the data provided by that node to each connected output node. Other weight distributions may also be used. The weight may be multiplied with the output of the hidden layer before the output is provided to the output layer. In this manner, the output layer can perform a summation of weighted inputs. Thus, the output of the neural network 350 (e.g., the output of the output layer) can be referred to as a weighted sum. The output layer can accordingly combine intermediate data received from one or more hidden layers using weights to provide output data.
[0054] In some examples, neural network 350 may be used to provide L output signals representing processed data corresponding to N input signals. Figure 3 In the example, N input signals (x1(n), x2(n), . . . x N (n)) and provide L output signals (y1(n), y2(n), ..L The neural network 350 may be trained such that the weights used and / or the functions provided by the elements of the hidden layer cause the neural network 350 to provide output signals representing processed data corresponding to the N input signals. The input signals may be data associated with memory access operations (e.g., write operations), and the weights and / or functions provided by the elements of the hidden layer may be selected according to corresponding data characteristics of the data (e.g., data significance) and / or an error correction level.
[0055] Examples of trainable neural networks. Training generally refers to the process of determining weights, functions, and / or other properties to be used by a neural network to create a desired transformation of input data to output data. In some examples, a neural network described herein can be trained to determine one or more characteristics of the input data. In some examples, a neural network described herein can be trained to select a level of error correction for the input data.
[0056] In various examples, the training described herein can be supervised or unsupervised. In some examples, training can be performed using known pairs of expected input and expected output data. For example, training can utilize known pairs of input data and output data to train a neural network to receive subsequent input data (e.g., data for memory access operations) and process the subsequent input data into output data (e.g., data characteristics and / or error correction levels). Examples of training can include determining the information to be transmitted by the neural network (e.g., Figure 3 The weights used by the neural network 350 of the training program are stored in memory. In some examples, the same neural network hardware is used during training as will be used during operation. However, in some examples, different neural network hardware may be used during training, and the weights, functions, or other properties determined during training may be stored for use by other neural network hardware during operation.
[0057] The training examples can be described mathematically. For example, consider the input data given as follows at time (n): X(n) = [x1(n), x2(n), ... x N (n)] T The center vector of each element (e.g., combiner 352, combiner 354, combiner 356, and combiner 358) in the hidden layer(s) of neural network 350 may be represented as C i (for i=1,2,...,H, where H is the number of elements in the hidden layer).
[0058] The output of each element in the hidden layer can be given as:
[0059] h i (n) = f i (∥X(n)-C i / / ) For (i=1, 2, ..., H) (Equation 3), the connection between the last hidden layer and the output layer can be weighted. Each element in the output layer can have a linear input-output relationship so that it can perform a summation (e.g., a weighted summation). Therefore, the output of the i-th element in the output layer at time n can be written as:
[0060]
[0061] For (i=1,2,...,L), where L is the number of output elements of the output layer and W ij is the connection weight between the jth element in the hidden layer and the ith element in the output layer.
[0062] Typically, a neural network architecture (e.g. Figure 3 The neural network 350 may include several elements and may have center vectors distributed in the input domain. In general, the choice of transfer function used by the elements in the hidden layer may not affect the mapping performance of the neural network, and therefore, in some examples, functions that can be easily implemented in hardware may be used. For example, thin plate spline functions and / or Gaussian functions may be used in various examples and may provide sufficient approximation capabilities. Other functions may also be used.
[0063] An instance of a neural network may be specified by attributes (e.g., parameters) accordingly. In some examples, two sets of parameters may be used to specify a neural network: connection weights and a center vector (e.g., threshold). The parameters may be determined from selected input data (e.g., encoded input data) by solving an optimization function. An example optimization function may be given as:
[0064] Where M is the number of trained input vectors (e.g., trained encoded data inputs) and Y(n) is the output vector calculated from the sample input vector using Equations 3 and 4 above, and is the corresponding expected (eg, known) output vector. The output vector Y(n) can be written as: Y(n) = [y1(n), y2(n), ...y L (n)] T .
[0065] Various methods (e.g., gradient descent procedures) can be used to solve the optimization function. However, in some examples, another method can be used to determine the parameters of the neural network, which can generally include two steps: (1) determine the center vector C i (i=1,2,...,H) and (2) determine the weight.
[0066] In some instances, the center vector may be selected from a subset of available sample vectors. In such instances, the number of elements in the (several) hidden layers may be relatively large to cover the entire input domain. Therefore, in some instances, it may be desirable to apply the k-means clustering algorithm. Typically, the k-means clustering algorithm distributes the center vector according to the natural measure of the attractor (e.g., if the density of data points is high, the density of the center is also high). The k-means clustering algorithm may find a set of cluster centers and divide the training samples into subsets. Each cluster center may be associated with one of the H hidden layer elements in this network. The data may be divided in such a way that the training points are assigned to the cluster with the nearest center. The cluster center corresponds to one of the minimum values of the optimization function. An example optimization function used with the k-means clustering algorithm may be given as:
[0067] Among them B jn is a cluster partition or membership function forming an H×M matrix. Each column may represent an available sample vector (eg, known input data) and each row may represent a cluster. Each column may contain a single '1' in the row corresponding to the cluster closest to that training point, and zeros elsewhere.
[0068] The center of each cluster can be initialized to a different randomly selected training point. Each training instance can then be assigned to the element closest to it. When all training points have been assigned, the average position of the training points for each cluster can be found and the cluster center moved to that point. The cluster can become the desired center for the hidden layer element.
[0069] In some examples, for some transfer functions (e.g., Gaussian functions), a scaling factor σ may be determined, and the scaling factor may be determined before determining the connection weights. The scaling factor may be selected to cover the training points to allow for a smooth fit of the desired network output. Typically, this refers to any point within the convex hull of the processing element center that may significantly activate more than one element. To achieve this goal, each hidden layer element may activate at least one other hidden layer element to a significant extent. A suitable method for determining the scaling parameter a may be based on the P nearest neighbor heuristic, which may be given as:
[0070]
[0071] Among them C j (for i=1,2,...,H) is C i The P nearest neighbors.
[0072] Connection weights may additionally or alternatively be determined during training. In the example of a neural network (e.g. Figure 3In a neural network 350 with one hidden layer of weighted connections and an output element as a summing unit, once the center vector and scaling parameters have been determined, the optimization function of Equation 5 can be transformed into a linear least squares problem. The linear least squares problem can be written as
[0073]
[0074] where W = {Wij} is the L×H matrix of connection weights, F is the H×M matrix of the outputs of the hidden layer processing elements and its matrix elements are expressed using F in =f i ∥X(n)-C i ∥)(i=1,2,...,H;n=1,2,...,M) to calculate, and is an L×M matrix of desired (eg, known) outputs. The connection weight matrix W can be found from Equation 7 and can be written as follows:
[0075]
[0076] Among them, F + is the pseudo-inverse of F. In this way, the above may provide a batch method for determining the connection weights of a neural network. The batch method may be applied, for example, to situations where all input sample sets are available simultaneously. In some examples, each new sample set may become available recursively, for example, in a recursive least squares algorithm (RLS). In such cases, the connection weights may be determined as follows.
[0077] First, the connection weights can be initialized to any value (for example, random values can be used). The output vector Y(n) can be calculated using Equation 4. The error term e for each output element in the output layer can be calculated as follows i (n):
[0078]
[0079] Next, the connection weights can be adjusted based on the error term, for example as follows:
[0080] W ij (n+1)=W ij (n)+γe i (n)f j (∥X(n)-C i ∥)(i=1,2,...,L;j=1,2,...,M)(Equation 9)where γ is the learning rate parameter, which can be fixed or time-varying.
[0081] The total error can be calculated based on the output from the output layer and the expected (known) data:
[0082]
[0083] The process can be iterated by again calculating the new output vector, the error term, and again adjusting the connection weights. The process can continue until a weight that reduces the error to equal to or less than a threshold error is identified.
[0084] Therefore, it is trainable Figure 3 The neural network 350 may be trained to determine parameters (e.g., weights) used by the neural network 350 to perform a particular mapping between input and output data. For example, training the neural network 350 may provide a set of parameters to use to determine the characteristics of a first channel when receiving input data. Additionally or alternatively, training the neural network 350 may provide that set of parameters to use to determine the characteristics of a second channel when receiving input data. For example, the neural network 350 (and / or another neural network) may be trained multiple times using different known input / output data pairs. Multiple trainings may produce multiple sets of connection weights.
[0085] To recap, Figure 3 The structure of the neural network 350 is provided by way of example only. Other multi-layer neural network structures may be used in other examples. In addition, the training procedures described herein are also provided by way of example. For example, other training techniques (e.g., learning algorithms) may be used to solve the local minimum problem and / or the vanishing gradient problem. The determined weights and / or vectors of each decoder may be obtained through an offline learning mode of the neural network, which may advantageously provide more resources and data. Such implementations that have accumulated intermediate processing results in corresponding processing elements (e.g., corresponding MAC units) may also include a memory lookup (MLU) unit that is configured to retrieve a plurality of coefficients and provide the plurality of coefficients as connection weights (e.g., determined weights) of that corresponding layer of the MAC unit to be mixed with the input data.
[0086] Figure 4 is a flow chart illustrating a process 400 for training a neural network to determine data characteristics according to various embodiments. The process 400 may be performed, for example, using Figure 1 At least a portion of the system 100 (e.g., the host computing device 104 and / or the memory controller 102) and / or Figure 2 The neural network trained using process 400 may be Figure 3 Neural Network 350.
[0087] Process 400 includes, at 402, receiving a plurality of data. For example, each of the plurality of data may be data associated with a memory access operation (e.g., a write operation or a read operation). In some examples, data may be written to and / or read from a memory, such as a memory access operation. Figure 1 One or more of the memory devices 112.
[0088] Process 400 further includes, at 404, receiving a characteristic associated with a plurality of data. For example, the characteristic may include at least a relative importance associated with each of the plurality of data. In some implementations, the characteristic may include one of a first relative importance associated with relatively unimportant data, a second relative importance associated with data of ordinary importance, and a third relative importance associated with highly important data. The characteristic associated with the plurality of data may also include an error correction level applied to or associated with the data. As described herein, the error correction level may indicate an amount of error correction performed on the data (e.g., the number of ECC bits stored with the data), and the error correction level may correspond to the relative importance of the data (e.g., little or no error correction is performed on unimportant data and greater error correction is performed on highly important data).
[0089] Process 400 further includes, at 406, generating a training data set using the plurality of data and characteristics associated with the plurality of data. For example, the training data set may include a correlation between the error correction level and one or more other characteristics associated with the corresponding data (e.g., the relative importance of the data). In some embodiments, the characteristics received at 404 include only the error correction level of the data. In these and other embodiments, generating the training data set may include calculating one or more variable values associated with the data, such as values of variables associated with the amount or type of the data or other data attributes. For example, the variable values may be calculated to indicate the amount of redundancy in the data. Additionally or alternatively, the variable values may be calculated based on the content of the data.
[0090] Process 400 further includes, at 408, training a neural network using the training data set to determine data characteristics of the received data. Training the neural network may be as described in reference to Figure 2 and 3 For example, when trained, a neural network may receive data associated with a memory access operation and determine one or more characteristics of the data, such as the relative importance of the data and / or a level of error correction that should be applied to the data. Training the neural network may include configuring the neural network (e.g., by iterating a training operation) to generate an output (e.g., a characteristic of the data and / or a level of error correction) based on received input (e.g., input data associated with a memory access operation).
[0091] In some implementations, process 400 further includes applying the trained neural network to determine one or more data characteristics of the specific data and / or selecting an error correction level based on determining one or more data characteristics of the specific data. For example, process 400 may include Figure 5 One or more operations of process 500.
[0092] Once trained, the neural network can be stored for use, for example, in Figure 1 The data characteristics are used in logic 108.
[0093] In some implementations, process 400 includes testing the trained neural network. For example, a portion of the received data and received characteristics may be excluded from the training data set and used as test data to evaluate the accuracy of the trained neural network. The trained neural network may be applied to the test data to determine whether the trained neural network correctly determines the characteristics of the data (e.g., data associated with memory access operations) and / or the error correction level of the data with an accuracy exceeding a threshold level (e.g., 70%, 80%, 90%, etc.). If the trained neural network does not exceed the threshold accuracy, the neural network may be retrained or discarded in favor of a more accurate model.
[0094] Retraining the neural network can include training the neural network at least a second time using the training data set, training the neural network with a different (e.g., expanded) training data set, applying different weights to the training data set, rebalancing the training data set, and the like.
[0095] Figure 5 is a flow chart illustrating a process 500 for selecting an error correction level based on data characteristics according to various embodiments. For example, process 500 may use Figure 1 At least a portion of the system 100 (eg, the memory controller 102) and / or Figure 2 In some embodiments, at least a portion of process 500 may be performed at least in part using a neural network (e.g., Figure 3 Neural Network 350 and / or use Figure 4 The process 400 of training the neural network) is performed.
[0096] Process 500 includes receiving data from a host device at a memory controller at 502. For example, the data may include data for performing a memory access operation, such as data to be written to a memory pursuant to a write operation.
[0097] Process 500 further includes determining a characteristic of the received data at 504. For example, data characteristic logic (e.g., Figure 1 108) may determine a data characteristic of the received data, which may be a level of importance (e.g., not important, of ordinary importance, very important) of the received data. In some implementations, the data characteristic may be determined using a neural network. In some implementations, the characteristic may be received from a host device. For example, the received data may include metadata indicating the characteristic, such as the level of importance of the data.
[0098] Process 500 further includes, at 506, selecting an error correction level for the received data based on the characteristic. The error correction level may be selected from a plurality of error correction levels, such as corresponding error correction levels for data of certain importance levels. For example, no error correction may be performed for unimportant data, ordinary error correction may be performed for data of ordinary importance, and additional data error correction may be performed for data of very important importance. The error correction level may be determined by a memory controller (e.g., Figure 1 102) data characteristic logic (for example, Figure 1 108) and / or memory control logic (e.g., Figure 1 110)Select.
[0099] Process 500 further includes writing the data to a memory along with the error correction code at 508. The error correction code is generated based on the selected error correction level. In some implementations, process 500 includes generating the error correction code. In some implementations, the error correction code is not generated, for example, when the error correction level indicates that error correction should not be performed.
[0100] In some implementations, process 500 includes writing different data to different memories, for example based on data characteristics and / or importance levels. For example, second received data and a second error correction code corresponding to a second selected error correction level of the plurality of error correction levels different from the selected error correction level may be written to a second memory.
[0101] Although processes 400 and 500 include certain operations depicted as being performed in a certain order, it should be appreciated that more or fewer operations may be included in processes 400 and 500 without departing from the teachings of the present disclosure. Additionally, the operations of processes 400 and / or 500 may be performed in a different order, including performing one or more operations in parallel.
[0102] It should be understood that any of the examples, embodiments, or processes described herein may be combined with one or more other examples, embodiments, and / or processes, or separated and / or performed in a separate device or device portion according to the present systems, devices, and methods.
[0103] Although the present technology has been disclosed in the context of certain preferred embodiments and examples, it will be understood by those skilled in the art that the disclosed technology extends beyond the specifically disclosed embodiments to other alternative embodiments and / or uses of the technology and obvious modifications and equivalents thereof. In addition, based on the present disclosure, other modifications within the scope of the disclosed technology will be readily apparent to those skilled in the art. It is also contemplated that various combinations or sub-combinations may be made to the specific features and aspects of the embodiments and still fall within the scope of the disclosed technology. It should be understood that the various features and aspects of the disclosed embodiments may be combined or permuted with each other to form different modes of the disclosed technology. Therefore, the scope of at least some of the present technology disclosed herein is intended not to be limited by the specific disclosed embodiments described above.
Claims
1. A method comprising: receiving data from a host device at a memory controller; determining a characteristic of the received data; selecting an error correction level from a plurality of error correction levels for the received data based on the determined characteristic; and The received data and an error correction code generated based on the selected error correction level are written to a memory.
2. The method of claim 1, further comprising generating the error correction code based on the selected error correction level.
3. The method of claim 1, further comprising selecting no error correction level as the selected error correction level for the received data. The method of claim 1 , further comprising determining, as the characteristic, a level of importance associated with the received data.
5. The method of claim 1, further comprising receiving the characteristic of the received data from the host device.
6. The method according to claim 1, further comprising: Second received data and a second error correction code corresponding to a second selected error correction level of the plurality of error correction levels different from the selected error correction level are written to a second memory.
7. The method of claim 1, wherein the characteristic of the received data is determined using a neural network.
8. A method comprising: Receive multiple data; receiving characteristics associated with the plurality of data; generating a training data set using the plurality of data and the characteristics associated with the plurality of data; and A neural network is trained using the training data set to determine data characteristics of specific data.
9. The method of claim 8, further comprising receiving, as the characteristics associated with the plurality of data, importance of at least some of the plurality of data and an error correction level of the plurality of data.
10. The method of claim 9, wherein the error correction level is selected from a plurality of error correction levels. The method of claim 10 , wherein the plurality of error correction levels includes a no error correction level.
12. The method according to claim 8, further comprising: applying the trained neural network to determine the data characteristics of the specific data; and An error correction level among a plurality of error correction levels for the particular data is selected based on the determined data characteristic.
13. An apparatus comprising: A memory controller configured to: receiving data from a host device; determining a characteristic of the received data; selecting an error correction level from a plurality of error correction levels for the received data based on the determined characteristic; and The received data and an error correction code generated based on the selected error correction level are written to a memory.
14. The apparatus of claim 13, further comprising the memory.
15. The apparatus of claim 13, wherein the memory controller is further configured to generate the error correction code based on the selected error correction level.
16. The apparatus of claim 13, wherein the memory controller is further configured to select no error correction level as the selected error correction level for the received data.
17. The apparatus of claim 13, wherein the memory controller is further configured to determine a level of importance associated with the received data as the characteristic.
18. The apparatus of claim 13, wherein the memory controller is further configured to receive the characteristic of the received data from the host device.
19. The apparatus of claim 13, wherein the memory controller is further configured to: Second received data and a second error correction code corresponding to a second selected error correction level of the plurality of error correction levels different from the selected error correction level are written to a second memory.
20. The apparatus of claim 13, wherein the memory controller is configured to determine the characteristic of the received data using a neural network.
