WO2014146488A1 - 用于将数据写入存储器的过程的方法 - Google Patents

用于将数据写入存储器的过程的方法 Download PDF

Info

Publication number
WO2014146488A1
WO2014146488A1 PCT/CN2014/000294 CN2014000294W WO2014146488A1 WO 2014146488 A1 WO2014146488 A1 WO 2014146488A1 CN 2014000294 W CN2014000294 W CN 2014000294W WO 2014146488 A1 WO2014146488 A1 WO 2014146488A1
Authority
WO
WIPO (PCT)
Prior art keywords
bit
data
bits
supervisory
supervised
Prior art date
Application number
PCT/CN2014/000294
Other languages
English (en)
French (fr)
Inventor
亚历山大
Original Assignee
西安华芯半导体有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西安华芯半导体有限公司 filed Critical 西安华芯半导体有限公司
Publication of WO2014146488A1 publication Critical patent/WO2014146488A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices

Definitions

  • the present invention relates to a method for writing data to a memory, and more particularly to the generation of supervisory bits for data error checking and correction. Background technique
  • data When data is stored, it is usually stored in units of a certain length of data; the length of data thus stored as a whole can be called “prefetched data length". In the process of writing, storing and reading data, data bit errors may occur, so the stored data needs to be detected and corrected.
  • ECC Error Correction Code
  • the data of each set of prefetched data lengths is generally taken as a whole, and a number of supervised bits (panty bk) are generated for it; and the data thus obtained (including the plurality of supervised bits and The data of the prefetched data length is stored in memory, wherein the generation of each supervised bit is defined by the encoding rules used.
  • the Hamming code is a coding technique that inserts a number of check codes, that is, supervisor bits, into the original data for error checking and correction. Taking a typical 4-bit data encoding as an example, the Hamming code will add 3 supervised bits, so that the actual data bits reach 7 (bits). 8-bit data generally requires 4 supervisory bits, and 64-bit data generally requires 7 supervisory bits.
  • the appropriate coding rules and number of supervisory bits can be selected based on the length of the data and the number of bits needed to be detected and corrected.
  • the prefetch data length is usually 32 bits, 64 bits, 128 bits, and so on.
  • the prefetched data length is 64 bits
  • a reasonable compromise solution in the prior art can use 7 or 8 bit supervised bits for every 64 bits of data, depending on different ECC algorithms;
  • the method generally waits for all 64-bit data to be acquired, and performs unified calculation and generates a supervised bit, which takes a long time.
  • the present invention is directed to alleviating or overcoming the above-mentioned problems of the prior art supervisory bit generation time.
  • a method for a process of writing data to a memory wherein a predetermined number of supervisory bits are generated for data bits of a prefetched data length according to an encoding rule, the encoding rule specifying Each of the supervised bits is equal to a bit generated by performing a predetermined operation on a plurality of associated bits associated with the data bits of the prefetched data length, the method comprising the following steps:
  • step II repeating step 1), until the data bits of the prefetched data length are all acquired, wherein the step of executing is performed such that each data bit in the data bits of the prefetched data length is acquired only once,
  • Each of the supervisory bits is equal to its temporary position that was ultimately generated.
  • a method for quickly generating a supervised bit in an in-memory data comprising the following steps:
  • step 2 taking n-bit data from the remaining stored data to the write path, and generating a new temporary supervision bit by the coding rule obtained by the monitoring bit obtained in step 1;
  • step 2 Repeat step 2], until the last n-bit data and the last temporary supervisory level are generated by the coding rules to generate the final supervisory position;
  • N-bit stored data and the final supervisory bit data are simultaneously stored in the memory or the N-bit stored data and the final supervisory bit data are stored in the memory, and the last DDR is the last one-time write.
  • the N-bit storage data and the final supervisory bit data are the most After one-time write.
  • the representation bit is a data bit used to characterize whether there is a data mask (DM); wherein the characterizing bit only judges whether or not a DM occurs, does not participate in the coding generation of the supervised bit, and directly writes.
  • DM data mask
  • the above N may be divisible by n, and n N/2.
  • the above supervised bits are 7 or 8 bits.
  • the time of writing the path per n-bit data is one clock cycle or half clock cycle.
  • the supervised bit rapid generation method is based on the fact that when the data is stored, it does not wait for all the data to generate the supervised bit after the data storage is completed, but the data is divided into the data, and the amount of each operation is reduced. This reduces the time required for final supervisory bits and simplifies the algorithm.
  • Figure 1 is a diagram schematically showing data writing
  • FIG. 2 is a schematic view showing an exemplary embodiment of the present invention. detailed description
  • an existing supervisory bit generation method will be exemplarily described by using a Hamming code to generate 7 supervised bits as a whole stored 64-bit data.
  • the 64-bit data is BIT01-BIT064 from low to high.
  • the seven supervisory positions are P01-P07.
  • each of the seven supervisory bits can be generated by performing an exclusive-OR operation on a plurality of bits of the 64-bit data; the 64-bit data is used to generate each supervisory bit.
  • These bits may be referred to as associated bits associated with the supervisory bit, and the associated bits associated with each supervisory bit are defined by the rules of the Hamming code itself.
  • the supervisory bit P01 can use the 35 associated bits of the 64-bit data associated with it BIT01, BIT02, BIT04, BIT05, BIT07, BIT09, BIT011, BIT012, BIT014, BIT016, BIT018 ... BIT057, BIT058, BIT060, BIT062 , BIT064 (35 digits in total) is generated by XOR operation, namely:
  • P01 BIT01 ® BIT02 ® BIT04 ® BIT05 ® BIT07 ® BIT09 ® BIT011 ® BITO 12 ® BIT014 ® BIT016 ® BIT018 ® ... ® BIT057 ® BIT058 ® BIT060 ® BIT062 ® BIT064 , where @ stands for XOR or XOR.
  • a relatively efficient method of calculating P01 is as follows:
  • the 35 bits of BIT01, BIT02, BIT04, BIT05, BIT07, BIT09, BITO 11, BIT012, BIT014, BIT016, BIT018...BIT057, BIT058, BIT060, BIT062, BIT064 are divided into 17 groups of two and one The remaining single bits, XOR operation of two bits in each of the 17 groups yields 17 intermediate bits (first level);
  • the 17 intermediate bits and the remaining single bits in the above (in the previous stage) are divided into 9 groups each consisting of two bits, and two bits in each of the nine groups are XORed to obtain 9 Middle position (second level);
  • the 9 intermediate bits are divided into 4 groups consisting of two bits and one remaining single intermediate bit, and two bits in each of the four groups are XORed to obtain 4 intermediate bits (third Level);
  • the two intermediate bits and the remaining single intermediate bits in the above are divided into one group consisting of two bits and one remaining single intermediate bit, and an exclusive OR operation is performed on two bits in the one group. 1 middle position (fifth level);
  • P01 needs to perform 6-level two-OR operation: through the first-level operation, 18 bits are obtained by 35 bits; by the second-level operation, 9 bits are obtained by 18 bits; by the third-level operation, 9 bits are obtained. 5 bits; through the fourth level operation, 3 bits are obtained by 5 bits; by the fifth level operation, 2 bits are obtained by 2 bits; by the sixth level operation, 1 bit is obtained by 2 bits, that is, P01.
  • This process can be simplified as 35 18 9 5 3 2 1 .
  • the generation of the other 6 supervised bits is similar to the generation of P01 and will not be described here.
  • the idea of the present invention is: in the process of writing the data bits of the prefetched data length into the memory, after acquiring (receiving) some of the data bits therein, calculating the temporary bit of the supervised bit while waiting for the subsequent data bit, in obtaining The previously obtained temporary bits are used for the recalculation of the supervisory bits after the subsequent data bits have been received.
  • each of P1-P7 is equal to a bit generated by, for example, an exclusive OR operation on a plurality of associated bits associated with it in BIT1-BIT64.
  • P1 shall be equal to the associated bits BIT1, BIT2, BIT4, BIT5, BIT7, BIT9, BIT11, BIT12, BIT14, BIT16, BIT18 ... BIT57, BIT58, BIT60, BIT62, BIT64 associated with BIT1-BIT64 ( A total of 35 bits) The bits generated by the XOR operation.
  • 8-bit data of the 64-bit data may be acquired first, and for each of the acquired 8-bit data, each supervised bit containing the associated bit associated with it is included in the 8-bit data.
  • the associated associated bits are, for example, XORed to generate their temporary bits (first step).
  • the temporary bit of PI can be generated by XORing the associated bits BIT1, BIT2, BIT4, BIT5, BIT7 associated with the supervised bit P1 contained in BIT1-BIT8.
  • each supervised bit of the associated bit associated with it is included in the other 8 bits of data: if its temporary bit has been previously generated, for example by its temporary bit and the associated bit contained in the other 8 bits of data, for example The XOR operation regenerates its temporary bit. If its temporary bit has not been generated previously, its temporary bit can be generated by performing an exclusive OR operation on the associated bit contained in the other 8 bits of data (second step).
  • BIT9-BIT16 For example, suppose the other 8 bits of data are BIT9-BIT16, and can pass the temporary bit of the previously generated P1 and the associated bit associated with P1 contained in BIT9-BIT16 (ie, BIT9, BIT11, BIT12, BIT14, BIT16). Perform an XOR operation to regenerate the temporary location of the PI.
  • the second step can be repeated until all 64-bit data is acquired.
  • each bit of the 64-bit data is acquired only once, where each supervisory bit is equal to its temporary bit generated last time.
  • the data acquired in the last iteration step is ⁇ 57- ⁇ 64
  • P1 is taken as an example to calculate it, that is, to generate its final temporary bit, only the temporary bit generated by the previous step and
  • the associated bits ( , ⁇ 57, ⁇ 58, ⁇ 60, ⁇ 62, ⁇ 64) (the total of 6 bits) included in ⁇ 57- ⁇ 64 are subjected to, for example, an exclusive OR operation, that is:
  • P1 only needs to perform a 3-level two-OR operation: through the first stage, 6 bits get 3 bits; through the second level, 3 bits Get 2 bits; through the third level, get 1 bit from 2 bits, ie Pl. This process can be simplified as 6 3 2 1 .
  • the generation of the supervisory bit P1 can be saved by 50% of the time compared to the prior art method using the same encoding rule Hamming code.
  • the 7-bit supervised bit is no longer generated from the 64-bit data once, so that the encoding logic is simplified and speeded up.
  • the data acquired in each step is a continuous data bit among the 64-bit data to be stored as a whole.
  • each of the 64-bit data is acquired in the same order as the sequence in which it is transmitted.
  • the generated 7-bit supervised bit can be inserted into the 64-bit data to be stored as a whole, and the thus obtained 71-bit data is stored in the memory.
  • a characterizing bit can be added to the 71-bit data before it is stored in the memory, which is used to characterize the presence or absence of data masking, as needed.
  • the present invention can be applied to applications in which data is written to a memory such as a DDR memory, an SRAM memory, a flash memory or the like.
  • the present invention can be applied to applications that employ different data prefetch lengths.
  • the supervised bits are calculated using the sequentially obtained data points, so that the calculation of the single supervised bit is divided into a plurality of operations in which the amount of computation is significantly reduced, simplifying the algorithm.
  • Figure 1 shows schematically a write-once process for a set of 64-bit data.
  • the clock signal and data stream are shown in Figure 1.
  • the transmission of data to be written to the memory is typically referenced to the clock signal.
  • 8 bits of data are transferred every clock cycle (Tck) or every half clock cycle (Tck/2).
  • Figure 1 schematically shows a set of 64-bit write data streams in eight shaded blocks, each shaded block representing 8 bits of data.
  • the burst length of the data is 8, and each half of the clock cycle is used for 8-bit data.
  • FIG. 2 is a schematic view showing an exemplary embodiment of the present invention.
  • the eight shaded blocks from top to bottom correspond to Bits ⁇ 8:l>, Bits ⁇ 16:9>, Bits ⁇ 24:17>, Bits ⁇ 32:25 in 64-bit data to be stored as a whole. >, Bits ⁇ 40:33>, Bits ⁇ 48:41>, Bits ⁇ 56:49>, Bits ⁇ 64:57>.
  • the 8-bit data represented by each shaded block can be prefetched to the write path every half clock cycle (Tck/2) or every clock cycle (Tck).
  • 7-bit supervisory bits P1-P7 (P7...P1) are generated for this 64-bit data. As shown in FIG.
  • FIG. 2 is only schematic.
  • the temporary supervisory bit (temporary bit) corresponding to each shaded block in Fig. 2 is marked as " ⁇ 7' ... ⁇ ", it is not necessarily all after each 8-bit data represented by a shaded block is acquired.
  • the supervised bits P1-P7 generate or regenerate the temporary bits, but each supervised bit containing the associated bit associated with the 8-bit data represented by the shaded block: if it has previously generated its temporary bit, it is temporarily The bit (temporary supervisory bit) and the associated bit associated with the 8-bit data are regenerated to regenerate their temporary bit. If the temporary bit has not been previously generated, the associated bit associated with the 8-bit data is associated with it.
  • the predetermined operation is performed to generate its temporary bit; that is, after each 8-bit data represented by a shaded block is acquired, the generation or re-generation of the temporary bit (temporary supervisory bit) is only for the following supervised bits: Associated associated bits.
  • the associated bits used in this 64-bit data to generate each supervised bit, the specific predetermined operation for supervising bit generation, is determined by the encoding algorithm chosen, i.e., the specific encoding logic is determined by the selected ECC algorithm.
  • the temporary supervisory bit obtained after receiving the last 8 bits of the 64-bit data ie, the 8-bit data ⁇ 64:57> represented by the lowermost shaded block
  • Pl-P7 is Supervisory position Pl-P7.
  • a characterizing bit Bks ⁇ 65> for judging whether or not there is data masking.
  • characterizing bits are optional. For example, if you need to store information about data masking at the 65th bit data bit, you can add the table bit before storing the data in memory. This representation bit does not participate in the calculation and generation of supervisory bits.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Detection And Correction Of Errors (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

本发明提供一种用于将数据写入存储器的过程的方法。根据本发明,在将预取数据长度的数据位写入存储器的过程中,在获取(接收到)其中的部分数据位后在等待后续的数据位期间计算监督位的临时位,在获取(接收到)后续的数据位后将先前得到的临时位用于监督位的重新计算。由此,利用本发明,可以实现将顺序写入数据位的时间用于监督位计算,并且可以将单个监督位的计算分割成运算量显著减少的多次计算,从而节省时间,简化计算。

Description

用于将数据写入存储器的过程的方法 技术领域
本发明涉及一种用于将数据写入存储器的过程的方法, 更具体而言, 涉及用于数据错误检查和纠正的监督位的生成。 背景技术
在进行数据存储时, 通常以一定长度的数据为单位进行存储; 这样被 作为一个整体存储的数据的长度可以称为 "预取数据长度" 。 在数据的写 入、 存储以及读出过程中, 都可能会产生数据位错误, 因而需要对存储的 数据进行检测并纠错。
目前, 内存技术中多采用 ECC (Error Correction Code, 纠错码)检测 和纠正出错的数据。 例如, 在将数据写入存储器时, 通常将每组预取数据 长度的数据作为一个整体, 为其生成若干个监督位 (panty bk) ; 并将由 此得到的数据 (包括这若干个监督位及该预取数据长度的数据) 存储到存 储器中, 其中每个监督位的生成由所用的编码规则限定。
有很多种已知算法可支持 ECC, 例如最常用的汉明码 (Hamming Code) 。 汉明码是一种在原有数据中插入若干校验码即监督位来进行错误 检查和纠正的编码技术。 以典型的 4位 (bit) 数据编码为例, 汉明码将加 入 3个监督位, 从而使实际的数据位达到 7个 (位) 。 8位数据一般需要 4位监督位, 64位数据一般需要 7位监督位。
可基于数据长度以及所需检测和纠正的位数选取合适的编码规则和 监督位数量。
例如, 对于不同的 DDR结构 (DDR1/2/3 ) , 在进行典型的流输入输 出 (streaminandout)数据读写时, 预取数据长度通常为 32位、 64位、 128 位等。 以预取数据长度为 64位的情况而言, 现有技术中一种合理的折中 解决办法可以对每 64位数据使用 7位或者 8位的监督位, 取决于不同的 ECC算法; 但目前的方法一般是在等待获取了全部 64位数据后, 统一进 行计算并生成监督位, 该方法耗时较长。 发明内容
本发明旨在缓解或克服上文提到的现有技术监督位生成时间较长的 问题。
根据本发明的一方面, 提供一种用于将数据写入存储器的过程的方 法, 其中按照一种编码规则为预取数据长度的数据位生成预定数量的监督 位, 所述编码规则规定, 所述监督位中的每个监督位等于对所述预取数据 长度的数据位中与其关联的多个关联位进行预定操作所生成的位, 该方法 包括以下歩骤:
I )获取所述预取数据长度的数据位中的部分数据位, 对于该部分数据 位中包含与其关联的关联位的每个监督位: 若先前已生成了其临时位, 通 过对其临时位以及该部分数据位中包含的与其关联的关联位进行所述预 定操作重新生成其临时位, 若先前尚未生成其临时位, 通过对该部分数据 位中包含的与其关联的关联位进行所述预定操作生成其临时位;
II ) 重复歩骤 1 ) , 直至所述预取数据长度的数据位全部被获取, 其中执行所述歩骤使得所述预取数据长度的数据位中的每个数据位 仅被获取一次,
其中每个监督位等于最终生成的其临时位。
根据本发明的另一方面, 提供一种内存数据中监督位快速生成方法, 该方法包括以下歩骤:
1]从 N位存储数据中预取 n位数据到写入路径, 通过编码规则生成临 时监督位, 其中, n N;
2]从剩余存储数据中再取 n位数据到写入路径, 并与歩骤 1得到的监 督位通过编码规则生成新的临时监督位;
3]重复歩骤 2], 直至最后 n位数据与上一次得到的临时监督位通过编 码规则生成最终的监督位;
4]将 N位存储数据和最终的监督位数据同时存入存储器或将 N位存储 数据和最终的监督位数据分歩存入存储器, 一般 DDR中是最后一次性写 入。
对于 DDR存储器, 优选地, N位存储数据和最终的监督位数据是最 后一次性写入。
上述写入的数据中若存在表征位, 则在歩骤 3]中将最后一次写入路径 的数据、 上一次得到的监督位、 加入的表征位通过编码规则生成最终的监 督位后存储; 所述表征位是用于表征是否存在数据屏蔽 (DM) 的数据位; 其中表征位只判断是否有 DM发生, 不参与监督位的编码产生, 直接写入。
优选地, 上述 N可以被 n整除, 且 n N/2。
优选地, 上述 N=64, n=4、 8、 16、 32; 或 N=128, n=4、 16、 32、 64; 或 N=32, n=4、 16。
优选地, 上述监督位为 7位或 8位。
优选地, 上述每 n位数据 (例如每 8位数据) 写入路径的时间为一个 时钟周期或半个时钟周期。
该内存数据中监督位快速生成方法由于在存入数据时, 并不等待数据 存储完成后依赖全部数据生成监督位, 而是将存入数据进行割裂运算, 减 小每次的运算量, 从整体上减少了最终监督位生成的时间, 同时也简化了 算法。
本发明的优点如下:
在写入被作为一个整体存储的数据时, 并不等待全部数据被获取后依 赖全部数据生成监督位, 而是利用顺序获取的数据分歩计算监督位, 使得 单个监督位的计算被分割成运算量显著减少的多次运算。 由此, 等待后续 数据的时间可以被用于监督位的计算, 从整体上减少了用于监督位生成的 时间, 同时也简化了算法。 附图说明
图 1为示意性示出数据写入的图;
图 2为示出本发明的一个示例性实施例的示意图。 具体实施方式
在描述本发明之前, 以利用汉明码为将作为一个整体存储的 64位数 据生成 7个监督位为例对现有的监督位生成方法进行示例性描述。
为便于描述, 假设这 64位数据从低位到高位依次为 BIT01-BIT064, 这 7个监督位分别为 P01-P07。
另外, 根据汉明码, 这 7个监督位中的每个监督位可通过对这 64位 数据中的多个位进行异或操作来生成; 这 64位数据中的用于生成每个监 督位的这些位可以称为与该监督位关联的关联位, 与每个监督位关联的关 联位由汉明码本身的规则限定。 例如, 监督位 P01可以用这 64位数据中 与其关联的 35个关联位 BIT01、 BIT02、 BIT04、 BIT05、 BIT07、 BIT09、 BIT011、 BIT012、 BIT014、 BIT016、 BIT018 ...BIT057、 BIT058、 BIT060、 BIT062、 BIT064 (共 35位) 进行异或操作生成, 即:
P01=BIT01 ® BIT02 ® BIT04 ® BIT05 ® BIT07 ® BIT09 ® BIT011 ® BITO 12 ® BIT014 ® BIT016 ® BIT018 ® ... ® BIT057 ® BIT058 ® BIT060 ® BIT062 ® BIT064, 其中 @代表 XOR即异或。
计算 P01的一种相对高效的方法如下:
将 BIT01、 BIT02、 BIT04、 BIT05、 BIT07、 BIT09、 BITO 11 , BIT012、 BIT014、 BIT016、 BIT018...BIT057, BIT058、 BIT060、 BIT062, BIT064 这 35位分成 17个各由两位组成的组以及一个剩余的单个位, 对这 17个 组中的每个组中的两位进行异或操作得到 17个中间位 (第一级) ;
将这 17个中间位和上述 (前一级中) 剩余的单个位分成 9个各由两 位组成的组, 对这 9个组中的每个组中的两位进行异或操作得到 9个中间 位 (第二级) ;
将这 9个中间位分成 4个各由两位组成的组以及一个剩余的单个中间 位, 对这 4个组中的每个组中的两位进行异或操作得到 4个中间位 (第三 级) ;
将这 4个中间位和上述(前一级中) 剩余的单个中间位分成 2个各由 两位组成的组及一个剩余的单个中间位, 对这 2个组中的每个组中的两位 进行异或操作得到 2个中间位 (第四级) ;
将这 2个中间位和上述(前一级中) 剩余的单个中间位分成 1个由两 位组成的组及一个剩余的单个中间位, 对这 1个组中的两位进行异或操作 得到 1个中间位 (第五级) ;
将这 1个中间位与上述(前一级中) 剩余的单个中间位进行异或操作 得到 P01 (第六级) 。
可见, 得到 P01需要进行 6级两位异或操作: 通过第一级操作, 由 35 位得到 18位; 通过第二级操作, 由 18位得到 9位; 通过第三级操作, 由 9位得到 5位; 通过第四级操作, 由 5位得到 3位; 通过第五级操作, 由 3位得到 2位; 通过第六级操作, 由 2位得到 1位, 即 P01。 这个过程可 以简化地表示为 35 18 9 5 3 2 1。
其它 6位监督位的生成类似于 P01的生成, 这里不再赘述。
以下结合附图及实施例对本发明进行详述。
本发明的思想是: 在将预取数据长度的数据位写入存储器的过程中, 在获取 (接收到) 其中的部分数据位后在等待后续的数据位期间计算监督 位的临时位, 在获取 (接收到) 后续的数据位后将先前得到的临时位用于 监督位的重新计算。 由此, 利用本发明, 可以实现将顺序写入数据位的时 间用于监督位计算, 并且可以将单个监督位的计算分割成运算量显著减少 的多次计算, 从而节省时间, 简化计算。
下面通过一个示例性实施例说明本发明的方法, 在该实施例中, 利用 汉明码为将作为一个整体存储的 64位数据生成 7个监督位。
为便于描述, 假设这 64位数据从低位到高位依次为 BIT1-BIT64, 这 7个监督位分别为 Pl-P7。根据汉明码, P1-P7中的每个等于对 BIT1-BIT64 中与其关联的多个关联位进行例如异或操作所生成的位。例如, P1应等于 对 BIT1-BIT64中与其关联的关联位 BIT1、 BIT2、 BIT4、 BIT5、 BIT7、 BIT9、 BIT11、 BIT12、 BIT14、 BIT16、 BIT 18 ...BIT57、 BIT58、 BIT60、 BIT62、 BIT64 (共 35位) 进行异或操作所生成的位。
在该实施例中, 可以先获取这 64位数据中的例如 8位数据, 对于获 取的这 8位数据中包含与其关联的关联位的每个监督位, 通过对这 8位数 据中包含的与其关联的关联位进行例如异或操作生成其临时位 (第一歩 骤) 。 例如, 假设这 8位数据为 BIT1-BIT8, 可以通过对 BIT1-BIT8中包 含的与监督位 P1关联的关联位 BIT1、 BIT2、 BIT4、 BIT5、 BIT7进行异 或操作生成 PI的临时位 ΡΓ。
在该实施例中, 然后可以获取这 64位数据中的例如另 8位数据, 对 于这另 8位数据中包含与其关联的关联位的每个监督位: 若先前已生成了 其临时位, 可以通过对其临时位以及这另 8位数据中包含的与其关联的关 联位进行例如异或操作重新生成其临时位, 若先前尚未生成其临时位, 可 以通过对这另 8位数据中包含的与其关联的关联位进行例如异或操作生成 其临时位(第二歩骤) 。 例如, 假设这另 8位数据为 BIT9-BIT16, 可以通 过对先前生成的 P1的临时位 ΡΓ以及 BIT9-BIT16中包含的与 P1关联的关 联位 (即, BIT9、 BIT11、 BIT12、 BIT14、 BIT16) 进行异或操作重新生 成 PI的临时位 ΡΓ。
然后, 可以重复第二歩骤, 直至 64位数据全部被获取。
在该实施例中, 执行上述歩骤使得所述 64位数据中的每位数据仅被 获取一次, 其中每个监督位等于最后一次生成的其临时位。
在该实施例中,假设在最后的重复歩骤中获取的数据为 ΒΙΤ57-ΒΙΤ64, 以 P1为例, 计算它, 即生成其最终临时位, 只需对前一歩骤生成的其临 时位 ΡΓ以及 ΒΙΤ57-ΒΙΤ64中包含的与它关联的关联位( , ΒΙΤ57、ΒΙΤ58、 ΒΙΤ60、 ΒΙΤ62、 ΒΙΤ64) (共 6位) 进行例如异或操作, 即:
Pl= ΒΙΤ57 ® ΒΙΤ58 ® ΒΙΤ60 ® ΒΙΤ62 ® ΒΙΤ64 ® Ρ1 '
若以上文提到的相对高效的两位异或操作进行计算, 得到 P1只需进 行 3级两位异或操作: 通过第一级, 由 6位得到 3位; 通过第二级, 由 3 位得到 2位; 通过第三级, 由 2位得到 1位, 即 Pl。 该过程可以简化地表 示为 6 3 2 1。
在该实施例中,对于其他监督位, 有关其的生成和计算类似于关于 P1 所述的, 这里不再赘述。
可见, 相比于利用相同编码规则汉明码的现有技术的方法, 在上述本 发明的实施例中, 监督位 P1的生成可以节约 50%的时间。
在上述实施例中, 不再一次从 64位数据生成 7位监督位, 使得编码 逻辑得到了简化和加快。 除此之外, 还能利用等待后续数据的时间进行监 督位运算, 使数据写入过程更高效。
在该实施例中, 优选的是, 在每个歩骤中获取的数据是将作为一个整 体存储的这 64位数据中的连续数据位。 在该实施例中, 优选的是, 所述 64位数据中的每位数据被获取的先 后顺序与其被传输的先后顺序一致。
在该实施例中, 可以将生成的 7位监督位插入将作为一个整体存储的 这 64位数据中, 并将由此得到的 71位数据存储在存储器中。 另外, 根据 需要, 可以在将这 71位数据存储在存储器中之前将一个表征位添加到其 中, 该表征位用于表征是否存在数据屏蔽。
提供上文的实施例仅出于说明本发明的目的, 不意在对本发明进行限 制。 例如, 本发明可以适用于将数据写入如 DDR存储器、 SRAM存储器、 Flash存储器等存储器的应用。例如,本发明可以适用于采用不同的数据预 取长度的应用。
本领域技术人员将意识到, 利用本发明, 由于将等待后续数据位的时 间用于监督位的计算, 无疑具有节约时间的好处。 对于不同的 ECC算法, 节约时间的程度会有所不同。 另外, 根据本发明, 利用顺序获取的数据分 歩计算监督位, 使得单个监督位的计算被分割成运算量显著减少的多次运 算, 简化了算法。
图 1示意性示出了一次写入过程, 针对一组 64位的数据。 图 1中示 出了时钟信号和数据流。 如本领域技术人员已知的, 待写入存储器的数据 的传输通常以时钟信号为参考。 例如, 在每个时钟周期 (Tck) 或每半个 时钟周期(Tck/2) 内, 传输 8位数据。 图 1以 8个阴影块示意性示出了一 组 64位的写入数据流, 每个阴影块代表 8位数据。 在图 1中, 数据的簇 发长度 (burst length) 为 8, 每半个时钟周期用于 8位数据。
图 2是示出本发明的一个示例性实施例的示意图。 从上至下的 8个阴 影块分别对应于待被作为一个整体存储的 64位数据中的 Bits<8:l>、 Bits<16:9>、 Bits<24:17>、 Bits<32:25>、 Bits<40:33>、 Bits<48:41>、 Bits<56:49>、 Bits<64:57>。 每个阴影块所表示的 8位数据可以在每半个时 钟周期 (Tck/2) 或者每个时钟周期 (Tck) 的时间内被预取到写入路径。 在图 2的实施例中, 为这 64位数据生成 7位监督位 P1-P7 (P7...P1 ) 。 如 图 2中所示, 每获取一个阴影块所表示的 8位数据, 生成或重新生成监督 位 P1-P7中至少部分监督位的临时位; 关于此, 具体可参照前文关于本发 明的实施例所述的相关内容, 这里不再赘述。 需要说明的是, 图 2只是示 意性的。 例如, 虽然图 2中对应于每个阴影块的临时监督位 (临时位) 被 标为 "Ρ7' ...ΡΓ " , 但在每获取一个阴影块所表示的 8位数据后, 未必为 所有监督位 P1-P7生成或重新生成临时位, 而是对于该阴影块所表示的 8 位数据中包含与其关联的关联位的每个监督位: 若先前已生成了其临时 位, 通过对其临时位 (临时监督位) 以及这 8位数据中包含的与其关联的 关联位进行预定操作重新生成其临时位, 若先前尚未生成其临时位, 通过 对这 8位数据中包含的与其关联的关联位进行预定操作生成其临时位; 就 是说, 每获取一个阴影块所表示的 8位数据后, 对临时位 (临时监督位) 的生成或重新生成仅针对如下监督位: 这 8位数据中包含与其关联的关联 位。 这 64位数据中用于生成每个监督位的关联位、 用于监督位生成的具 体预定操作由所选用的编码算法决定,即具体的编码逻辑由所选取的 ECC 算法决定。 如图 2中所示, 在接收到这 64位数据中的最后 8位数据 (即 最下面的阴影块所表示的 8位数据 Β^<64:57>)后所得到的临时监督位即 为监督位 Pl-P7。
图 2中还示出了用于判断是否有数据屏蔽的表征位 Bks<65>。 本领域 技术人员应理解, 这样的表征位是可选的。 例如, 如果需要在第 65位数 据位存储有关数据屏蔽的信息, 可在将数据存储在存储器中之前加上该表 征位。 该表征位不参与监督位的计算和生成。

Claims

权 利 要 求 书
1. 一种用于将数据写入存储器的过程的方法,其中按照一种编码规则 为预取数据长度的数据位生成预定数量的监督位, 所述编码规则规定, 所 述监督位中的每个监督位等于对所述预取数据长度的数据位中与其关联 的多个关联位进行预定操作所生成的位, 该方法包括以下歩骤:
I )获取所述预取数据长度的数据位中的部分数据位, 对于该部分数据 位中包含与其关联的关联位的每个监督位: 若先前已生成了其临时位, 通 过对其临时位以及该部分数据位中包含的与其关联的关联位进行所述预 定操作重新生成其临时位, 若先前尚未生成其临时位, 通过对该部分数据 位中包含的与其关联的关联位进行所述预定操作生成其临时位;
II ) 重复歩骤 1 ) , 直至所述预取数据长度的数据位全部被获取, 其中执行所述歩骤使得所述预取数据长度的数据位中的每个数据位 仅被获取一次,
其中每个监督位等于最终生成的其临时位。
2. 如权利要求 1所述的方法, 其中在每个歩骤中获取的部分数据位 是所述预取数据长度的数据位中的多个连续数据位。
3. 如权利要求 1所述的方法, 其中在每个歩骤中获取的部分数据位 具有相同的位数。
4.如权利要求 3所述的方法,其中所述预取数据长度的数据位包括 N 位, 在每个歩骤中获取的部分数据位包括 n位, 其中 N和 n为正整数, 且 N是 n的多倍, 其中 N=32, n=4、 8或 16; 或者, N=64, n=4、 8、 16或 32; 或者, N=128, n=4、 8、 16、 32或 64。
5. 如权利要求 1所述的方法, 其中所述预取数据长度的数据位中的 每个数据位被获取的先后顺序与其被传输的先后顺序一致。
6. 如权利要求 1所述的方法, 还包括将所述监督位插入所述预取数 据长度的数据位中。
7. 如权利要求 6所述的方法, 还包括将插入了监督位的所述预取数 据长度的数据位存储在所述存储器中。
8. 如权利要求 7所述的方法, 其中所述预取数据长度的数据位包括 64位, 所述预定数量的监督位包括 7位或 8位监督位。
9. 如权利要求 7所述的方法, 还包括在将插入了监督位的所述预取 数据长度的数据位存储在所述存储器中之前将一个表征位添加到其中, 所 述表征位用于表征是否存在数据屏蔽。
10. 如权利要求 1-9中任一项所述的方法, 其中所述存储器是 DDR 存储器、 SRAM存储器或 Flash存储器。
11. 如权利要求 1-9中任一项所述的方法, 其中所述编码规则是汉明 码。
12. 如权利要求 1-9中任一项所述的方法, 其中所述预定操作是异或 操作。
13. 一种内存数据中监督位快速生成方法, 其特征在于, 包括以下歩 骤:
1]从 N位存储数据中预取 n位数据到写入路径, 通过编码规则生成临 时监督位, 其中, n≤N;
2]从剩余存储数据中再取 n位数据到写入路径, 并与歩骤 1得到的监 督位通过编码规则生成新的临时监督位;
3]重复歩骤 2], 直至最后 n位数据与上一次得到的临时监督位通过编 码规则生成最终的监督位;
4]将 N位存储数据和最终的监督位数据同时存入存储器或将 N位存储 数据和最终的监督位数据分歩存入存储器, 一般 DDR中是最后一次性写 入。
14. 根据权利要求 13所述的监督位快速生成方法, 其特征在于: 所 述写入的数据中若存在表征位, 则在歩骤 3]中将最后一次写入路径的数 据、 上一次得到的监督位、 加入的表征位通过编码规则生成最终的监督位 后存储; 所述表征位是用于表征是否存在数据屏蔽 (DM) 的数据位; 其 中表征位只判断是否有 DM发生, 不参与监督位的编码产生, 直接写入。
15. 根据权利要求 13所述的监督位快速生成方法, 其特征在于: 所 述 N可以被 n整除, 且 n≤N/2。
16. 根据权利要求 14所述的监督位快速生成方法, 其特征在于: 所 述 N=64, n=4、 8、 16、 32; 或 N=128, n=4、 16、 32、 64; 或 N=32, n=4、 16。
17. 根据权利要求 16所述的监督位快速生成方法, 其特征在于: 所 述监督位为 7位或 8位。
18. 根据权利要求 13至 17中任一项所述的监督位快速生成方法, 其 特征在于: 所述每 n位数据写入路径的时间为一个时钟周期或半个时钟周 期。
PCT/CN2014/000294 2013-03-19 2014-03-19 用于将数据写入存储器的过程的方法 WO2014146488A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2013100888121A CN103197986A (zh) 2013-03-19 2013-03-19 内存数据中监督位快速生成方法
CN201310088812.1 2013-03-19

Publications (1)

Publication Number Publication Date
WO2014146488A1 true WO2014146488A1 (zh) 2014-09-25

Family

ID=48720573

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/000294 WO2014146488A1 (zh) 2013-03-19 2014-03-19 用于将数据写入存储器的过程的方法

Country Status (2)

Country Link
CN (1) CN103197986A (zh)
WO (1) WO2014146488A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103197986A (zh) * 2013-03-19 2013-07-10 西安华芯半导体有限公司 内存数据中监督位快速生成方法
CN103594120B (zh) * 2013-10-31 2018-08-21 西安紫光国芯半导体有限公司 以读代写的存储器纠错方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042633A (zh) * 2006-03-21 2007-09-26 国际商业机器公司 生成校验值的raid存储适配器、系统和方法
CN101345606A (zh) * 2008-08-21 2009-01-14 炬力集成电路设计有限公司 一种确定汉明纠错码校验位的方法与装置
CN102594334A (zh) * 2012-01-10 2012-07-18 复旦大学 一种流水线型fpga回读帧ecc电路
CN103197986A (zh) * 2013-03-19 2013-07-10 西安华芯半导体有限公司 内存数据中监督位快速生成方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7313749B2 (en) * 2004-06-29 2007-12-25 Hewlett-Packard Development Company, L.P. System and method for applying error correction code (ECC) erasure mode and clearing recorded information from a page deallocation table
CN101477481A (zh) * 2009-02-06 2009-07-08 中国科学院计算技术研究所 一种自动纠错系统及方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042633A (zh) * 2006-03-21 2007-09-26 国际商业机器公司 生成校验值的raid存储适配器、系统和方法
CN101345606A (zh) * 2008-08-21 2009-01-14 炬力集成电路设计有限公司 一种确定汉明纠错码校验位的方法与装置
CN102594334A (zh) * 2012-01-10 2012-07-18 复旦大学 一种流水线型fpga回读帧ecc电路
CN103197986A (zh) * 2013-03-19 2013-07-10 西安华芯半导体有限公司 内存数据中监督位快速生成方法

Also Published As

Publication number Publication date
CN103197986A (zh) 2013-07-10

Similar Documents

Publication Publication Date Title
JP5043562B2 (ja) エラー訂正回路、その方法及び前記回路を備える半導体メモリ装置
KR100632952B1 (ko) 정전으로 인한 프로그램 페일의 유무를 판별할 수 있는방법 및 장치
US8112699B2 (en) Error detecting/correcting scheme for memories
WO2010115371A1 (zh) 一种循环冗余校验crc码的实现方法和装置
JP2008165808A (ja) 誤り訂正確率を減らすエラー訂正回路、その方法及び前記回路を備える半導体メモリ装置
JP2011514743A (ja) 受信したシンボル列におけるフェーズドバーストエラー、消失、シンボルエラー、及び、ビットエラーを検出及び訂正するための方法及びシステム
US10741212B2 (en) Error correction code (ECC) encoders, ECC encoding methods capable of encoding for one clock cycle, and memory controllers including the ECC encoders
CN103594120A (zh) 以读代写的存储器纠错方法
US9553608B2 (en) Data storage device decoder and method of operation
CN101281788A (zh) 闪存系统及其控制方法
CN105353974A (zh) 一种适用于磁盘阵列及分布式存储系统的二容错编码方法
KR101482684B1 (ko) 디코딩 방법 및 이를 포함하는 메모리 시스템의 동작 방법
WO2017088507A1 (zh) 一种更新错误检测和纠正ecc码的方法及装置
CN103283149A (zh) 用于处理数据元素序列的装置和方法
CN101800560A (zh) Flash控制器中BCH编译码的纠错能力扩展方法
WO2014146488A1 (zh) 用于将数据写入存储器的过程的方法
JP2012050008A (ja) 誤り検出訂正方法および半導体メモリ装置
JP5283989B2 (ja) メモリシステム及びメモリアクセス方法
CN103151078B (zh) 一种存储器检错纠错码生成方法
CN105027084B (zh) 在移动通信系统中控制存储器的装置和方法
CN110492889B (zh) 检测纠正两位错误的编码解码方法、编码解码器及处理器
CN112286716A (zh) 一种1024字节的存储系统差错控制模块
JP5617776B2 (ja) メモリ回路,メモリ装置及びメモリデータの誤り訂正方法
WO2018119741A1 (zh) 数据访问方法及闪存设备
JP2005011386A (ja) 誤り訂正装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14769833

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14769833

Country of ref document: EP

Kind code of ref document: A1