JP5217570B2 - Memory device and memory control method - Google Patents

Memory device and memory control method Download PDF

Info

Publication number
JP5217570B2
JP5217570B2 JP2008091750A JP2008091750A JP5217570B2 JP 5217570 B2 JP5217570 B2 JP 5217570B2 JP 2008091750 A JP2008091750 A JP 2008091750A JP 2008091750 A JP2008091750 A JP 2008091750A JP 5217570 B2 JP5217570 B2 JP 5217570B2
Authority
JP
Japan
Prior art keywords
data
adr
bytes
src
byte
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008091750A
Other languages
Japanese (ja)
Other versions
JP2009245218A (en
Inventor
栄治 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2008091750A priority Critical patent/JP5217570B2/en
Publication of JP2009245218A publication Critical patent/JP2009245218A/en
Application granted granted Critical
Publication of JP5217570B2 publication Critical patent/JP5217570B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明は、メモリ装置に関し、特に、誤り訂正等データの信頼性向上を図る冗長コードを格納するメモリ装置と方法に関する。   The present invention relates to a memory device, and more particularly to a memory device and a method for storing a redundant code for improving data reliability such as error correction.

関連技術として、例えば特許文献1には、可変長の誤り訂正符号を使用して誤り率の変化に応じて使用可能な冗長を動的に変え、ペイロードと冗長との間での効率的なメモリ割当を可能とするためのシステムと方法が開示されている。すなわち、図8に示すように、ユーザが格納するデータと、誤り訂正符号が別のエリアに保存されており、誤り訂正符号が状況に応じて可変としている。1Dataあたり16バイト(Byte)であり、データ部(201)とECC(Error Checking and Correcting Code、又は Error Corrcting(Correction) Code:誤り訂正符号)部(202)とがそれぞれ別エリアに保存され、ECC部(202)が可変長であることから、ECCに2バイトや4バイトといった訂正能力の高い符号が設定可能とされている。なお、図8に示す例では、ECCは2バイト構成とされる。   As a related technique, for example, Patent Document 1 discloses that an efficient memory between a payload and a redundancy can be obtained by dynamically changing a usable redundancy according to a change in an error rate using a variable-length error correction code. A system and method for enabling allocation is disclosed. That is, as shown in FIG. 8, the data stored by the user and the error correction code are stored in different areas, and the error correction code is variable depending on the situation. 16 bytes (bytes) per data, and a data part (201) and an ECC (Error Checking and Correcting Code or Error Corrcting (Correction) Code) part (202) are stored in separate areas, respectively. Since the section (202) has a variable length, it is possible to set a code having a high correction capability such as 2 bytes or 4 bytes in the ECC. In the example shown in FIG. 8, the ECC has a 2-byte configuration.

特開2003−131954号公報JP 2003-131954 A

特許文献1の開示事項は、本書に引用をもって繰り込み記載されているものとする。以下に本発明による関連技術の分析を与える。   It is assumed that the disclosure of Patent Document 1 is incorporated herein by reference. The following is an analysis of the related art according to the present invention.

図8に示したメモリ構成においては、格納するデータのビット数に対して、必要としているECC(誤り訂正符号)のビット数を多く取ることができるため、高い訂正能力はあるが、以下のような問題点を有している。   In the memory configuration shown in FIG. 8, since the required number of ECC (error correction code) bits can be increased with respect to the number of bits of data to be stored, high correction capability is provided. Has the following problems.

第1の問題点は、メモリ制御に用いた場合、データのリード・ライト時や、誤りが発生した時の訂正処理が複雑となり、メモリのアクセス・スピードが遅くなる、ということである。図8の構成は、一般的なメモリのリード・ライト回路の延長線で実現できるものではなく、特殊な回路構成となる。これは、図8に示す構成のメモリ管理においては、データ部と誤り訂正符号(ECCコード)部を、互いに異なるアドレス上に配置していることによる。   The first problem is that, when used for memory control, correction processing at the time of data read / write or when an error occurs becomes complicated, and the access speed of the memory becomes slow. The configuration of FIG. 8 cannot be realized by an extension of a general memory read / write circuit, and has a special circuit configuration. This is because, in the memory management having the configuration shown in FIG. 8, the data part and the error correction code (ECC code) part are arranged at different addresses.

データ部(201)の読み出しを行う場合でも、データ部(201)とECC部(202)の両方へのメモリ・アクセスを行う必要があり、これら2つのアドレスは、完全に別のアドレスになっているため、連続して読み出すことができない。このため、それぞれを個々にアクセスすることが必要とされるとともに、アドレスやデータそのものを一時的に保存する回路や、リードしたECCコードのバイト位置を特定することが必要となる。したがって、図8の構成は、一般の回路とは異なる回路構成が必要となり、回路構成も複雑になる。   Even when reading the data part (201), it is necessary to perform memory access to both the data part (201) and the ECC part (202), and these two addresses are completely different addresses. Therefore, it cannot be read continuously. For this reason, it is necessary to access each of them individually, and it is necessary to specify a circuit for temporarily storing an address and data itself and a byte position of the read ECC code. Therefore, the configuration of FIG. 8 requires a circuit configuration different from a general circuit, and the circuit configuration becomes complicated.

第2の問題点は、ECCを格納しているメモリ領域が故障した場合、故障の影響範囲が広く、データの復旧に時間がかかり、信頼性の低下を招くことになる、ということである。これは、ECC(202)を、データ部(201)とは別のメモリ領域にまとめて格納しているためである。ECCをまとめて格納するメモリ領域が故障してしまうと、複数のECCを読み出すことができない。例えばECCを格納するメモリ1ワードに、データ部の8ワード分のECCを格納した場合、最悪は、ECCを格納するメモリの1ワード分のメモリ障害で、8ワード分のデータのECCが読み出せないことになる。このように、1つの故障に対する影響範囲が大きい。   The second problem is that when the memory area storing the ECC fails, the influence range of the failure is wide, and it takes a long time to recover the data, leading to a decrease in reliability. This is because the ECC (202) is stored together in a memory area different from the data part (201). If a memory area that stores ECCs collectively fails, a plurality of ECCs cannot be read. For example, when 8 words of ECC of the data part are stored in 1 word of memory storing ECC, the worst case is a memory failure of 1 word of memory storing ECC, and the ECC of data of 8 words can be read. There will be no. Thus, the influence range for one failure is large.

また別の関連技術として、例えば図9に示すように1ワード内にデータ部(301)とECC部(302)を保存する構成が、従来より知られている。この構成においては、72ビットの汎用DIMM(Dual Inline Memory Module)等によって構成される安価なDIMMでメモリを構成することができ、多用されている。しかしながら、図9の構成の場合、ECCコードを保存するバイト数が少なく、保存するバイト数には制限があり、一定の信頼性を得ることはできるが、さらに高信頼性を図るメモリには適用できない。   As another related technique, for example, a configuration in which a data part (301) and an ECC part (302) are stored in one word as shown in FIG. 9 is conventionally known. In this configuration, a memory can be configured with an inexpensive DIMM configured by a 72-bit general-purpose DIMM (Dual Inline Memory Module) or the like, and is frequently used. However, in the case of the configuration of FIG. 9, the number of bytes for storing the ECC code is small, and the number of bytes to be stored is limited, so that a certain level of reliability can be obtained, but this is applied to a memory with higher reliability. Can not.

これは、72ビット汎用DIMMを2個並列にした場合などでは(並列144ビット)、1ワードは、16バイト(128ビット)のデータと2バイト(16ビット)のECC(誤り訂正符号)が最大となり、ECCは、2バイトまでしか定義できないためである。   For example, when two 72-bit general-purpose DIMMs are arranged in parallel (parallel 144 bits), one word has a maximum of 16 bytes (128 bits) of data and 2 bytes (16 bits) of ECC (error correction code). This is because ECC can only be defined up to 2 bytes.

もし、ECCを4バイトとすることが必要となった場合には、72ビット汎用DIMMであれば、4個並列(72×4ビット)に動作させることが必要となり、メモリ制御側のピン数が増大し、コストの上昇を招く。   If it is necessary to set the ECC to 4 bytes, a 72-bit general-purpose DIMM must be operated in parallel (72 x 4 bits), and the number of pins on the memory control side Increases and increases costs.

したがって本発明の目的は、汎用のDIMM製品を利用でき、チップ故障を含めてデータの訂正ができ、高速・高信頼性な装置、方法を提供することにある。   Therefore, an object of the present invention is to provide a high-speed and high-reliability apparatus and method that can use a general-purpose DIMM product and correct data including a chip failure.

本願で開示される発明は、前記課題を解決するため、概略以下の構成とされる。   In order to solve the above-described problems, the invention disclosed in the present application is generally configured as follows.

本発明の1つの側面によれば、メモリに格納されるデータに対する冗長コードの長さを指定する手段と、データと該データに対応する冗長コードが1ワード内に存在するようにメモリに配置する手段を備えている装置が提供される。   According to one aspect of the present invention, means for designating the length of a redundant code for data stored in the memory, and the data and the redundant code corresponding to the data are arranged in the memory so that they exist in one word. An apparatus comprising means is provided.

本発明において、前記メモリのデータ格納先のアドレスが予め定められた所定値となると、トレーラ情報を格納する手段を備えた構成としてもよい。   In the present invention, a configuration may be provided that includes means for storing trailer information when an address of a data storage destination of the memory reaches a predetermined value.

本発明の1つの側面においては、1ワードがpバイト幅のデータと該データに関連するqバイト幅の冗長コード(ただし、p、qは予め定められた所定の正整数)の書き込み要求に対して、
1ワードのデータ幅がrバイト(ただし、rはr<pの正整数)、sバイト(ただし、sはs<qの正整数)の冗長コード領域を備えた構成のメモリに格納するにあたり、
前記メモリでの1ワードのデータ幅を(r+s−q)バイトとし、冗長コード幅をqバイトとして扱い、
書き込みデータの先頭アドレスADR_SRCを、(r+s−q)で除算した値{ADR_SRC/(r+s−q)}の整数値ADR_PLUSに(q−s)を乗じた値ADR_PLUS×(q−s)をADR_SRCに加算したアドレスADR_MEMを演算し、
前記pバイトのデータのうち、演算後のアドレスADR_MEMからアドレスADR_SRC+(r+s−q)−1まで[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを格納し、
アドレス{ADR_SRC+(r+s−q)}から前記qバイトの冗長コードのうちの(q−s)バイトの冗長コードを格納し、前記qバイトの冗長コードの残りのsバイトを、前記sバイトの冗長コード領域に格納し、
前記pバイトのデータのうち残りのp−[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを、ADR_SRC+(r+s−q)+(q−s)=ADR_SRC+r、すなわち、次のワードから格納し、データ書き込み先の前記メモリにおいて、前記データに対応する冗長コードと、データの少なくとも一部とが、同一ワード中に配置されるように、書き込みを行う。
In one aspect of the present invention, one word corresponds to a write request for p-byte wide data and a q-byte wide redundant code (p and q are predetermined positive integers) associated with the data. And
When storing in a memory having a redundant code area having a data width of one word of r bytes (where r is a positive integer r <p) and s bytes (where s is a positive integer s <q),
The data width of one word in the memory is (r + s−q) bytes, the redundant code width is treated as q bytes,
The value ADR_PLUS × (q−s) obtained by multiplying the integer value ADR_PLUS of the value {ADR_SRC / (r + s−q)} by dividing the start address ADR_SRC of the write data by (r + s−q) and (q−s) to ADR_SRC. Calculate the added address ADR_MEM,
Among the p bytes of data, [{ADR_SRC + (r + s−q)} − ADR_MEM] bytes of data from the address ADR_MEM after the operation to the address ADR_SRC + (r + s−q) −1 are stored.
The redundant code of (q−s) bytes among the redundant code of q bytes is stored from the address {ADR_SRC + (r + s−q)}, and the remaining s bytes of the redundant code of q bytes are stored as the redundant code of s bytes. Stored in the code area,
The remaining p-[{ADR_SRC + (r + s-q)}-ADR_MEM] bytes of the p-byte data are stored from ADR_SRC + (r + s-q) + (q-s) = ADR_SRC + r, that is, from the next word. Then, in the memory to which data is written, writing is performed so that the redundant code corresponding to the data and at least a part of the data are arranged in the same word.

本発明においては、1ワードがpバイト幅のデータと該データに関連するqバイト幅の冗長コード(ただし、p、qは予め定められた所定の正整数)の読み込み要求に対して、
1ワードのデータ幅がrバイト(ただし、rはr<pの正整数)、sバイト(ただし、sはs<qの正整数)の冗長コード領域を備えた構成のメモリからデータを読み込み、読み出しデータを応答として返すにあたり、
前記メモリでの1ワードのデータ幅を(r+s−q)バイトとし、冗長コード幅をqバイトとして扱い、
読み出しデータの先頭アドレスADR_SRCを、(r+s−q)で除算した値{ADR_SRC/(r+s−q)}の整数値ADR_PLUSに(q−s)を乗じた値ADR_PLUS×(q−s)をADR_SRCに加算したアドレスADR_MEMを演算し、
前記pバイトのデータのうち、演算後のアドレスADR_MEMからアドレスADR_SRC+(r+s−q)−1まで[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを読み出し、残りのp−[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを、ADR_SRC+(r+s−q)+(q−s)=ADR_SRC+r、すなわち、次のワードから読み出して合成し、1ワードが、pバイトのデータを復元し、
前記qバイトの冗長コードのうち、アドレス{ADR_SRC+(r+s−q)}からの(q−s)バイトの冗長コードを読み出し、前記qバイトの冗長コードの残りのsバイトを、前記sバイトの冗長コード領域から読み出し、qバイトのデータを復元し、
前記復元された1ワードがpバイトのデータとqバイトのデータをリードデータとして要求元へ返す。
In the present invention, in response to a read request for data in which 1 word is p bytes wide and a q byte wide redundant code (p and q are predetermined positive integers) related to the data,
Data is read from a memory having a redundant code area having a data width of one byte of r bytes (where r is a positive integer r <p) and s bytes (where s is a positive integer s <q), When returning read data as a response,
The data width of one word in the memory is (r + s−q) bytes, the redundant code width is treated as q bytes,
The value ADR_PLUS × (q−s) obtained by multiplying the integer value ADR_PLUS of the value {ADR_SRC / (r + s−q)} by dividing (Q + s) the start address ADR_SRC of the read data by (r + s−q) is set to ADR_SRC. Calculate the added address ADR_MEM,
Of the p-byte data, [{ADR_SRC + (r + s-q)}-ADR_MEM] bytes of data are read from the calculated address ADR_MEM to the address ADR_SRC + (r + s−q) −1, and the remaining p − [{ADR_SRC + ( r + s−q)} − ADR_MEM] bytes of data are read from ADR_SRC + (r + s−q) + (q−s) = ADR_SRC + r, that is, read from the next word, and one word restores p bytes of data. ,
Among the q-byte redundant codes, a (q-s) -byte redundant code from the address {ADR_SRC + (r + s-q)} is read, and the remaining s bytes of the q-byte redundant code are read as the s-byte redundant code. Read from the code area, restore q bytes of data,
The restored one word returns p-byte data and q-byte data as read data to the request source.

本発明によれば、メモリに格納されるデータに対する冗長コードの長さを指定し、データと該データに対応する冗長コードが1ワード内に存在するようにメモリに配置するメモリアクセス方法が提供される。   According to the present invention, there is provided a memory access method for designating the length of a redundant code for data stored in the memory and arranging the data and the redundant code corresponding to the data in the memory so as to exist in one word. The

本発明によれば、指定された長さの冗長コードに対して、データと該データに対応する冗長コードを、両者が1ワード内に存在するようにメモリに配置する構成としたことにより、汎用のDIMM製品を利用でき、チップ故障を含めてデータの訂正が行え、高速・高信頼性を実現することができる。   According to the present invention, for a redundant code of a specified length, the data and the redundant code corresponding to the data are arranged in the memory so that both exist in one word. DIMM products can be used, data correction including chip failure can be performed, and high speed and high reliability can be realized.

上記した本発明についてさらに詳細に説述すべく添付図面を参照して以下に説明する。本発明においては、指定されたECC(誤り訂正符号)等の冗長コードの長さに応じて、データと該データに対応する冗長コードを、両者が1ワード内に存在するようにメモリに配置する。ECC(誤り訂正符号)等の冗長コードを用いてメモリ訂正を行いデータの信頼性向上を図り、データ保全を目的としているサーバ装置やディスクアレイ装置などの高信頼性が求められるデータ処理装置等に適用可能とされる。さらに、本発明によれば、既製の汎用DIMMが利用できるメモリ制御回路において、チップ故障を含めてデータの訂正ができ、一般的な汎用のDIMMではできなかった8ビット訂正や16ビット訂正の誤り訂正符号を適用する可能とし、高速・高信頼性を実現するものである。以下実施例に即して説明する。   The above-described present invention will be described below with reference to the accompanying drawings in order to explain in more detail. In the present invention, in accordance with the length of a designated redundant code such as ECC (error correction code), data and a redundant code corresponding to the data are arranged in a memory so that both are present in one word. . For data processing devices that require high reliability such as server devices and disk array devices for the purpose of data maintenance by performing memory correction using redundant codes such as ECC (Error Correction Code) to improve data reliability Applicable. Furthermore, according to the present invention, in a memory control circuit that can use an off-the-shelf general-purpose DIMM, it is possible to correct data including a chip failure, and an error of 8-bit correction or 16-bit correction that cannot be performed by a general general-purpose DIMM. A correction code can be applied to achieve high speed and high reliability. Hereinafter, description will be made with reference to examples.

図1は、本発明の一実施例の構成を示す図である。図1を参照すると、本実施例に係るメモリ装置は、リクエスト入力部(1)と、リプライ出力部(2)と、訂正能力設定回路(3)と、アドレス演算回路(4)と、データ分割合成部(5)と、メモリ制御回路(6)と、メモリ(7)と、データ復元回路(8)と、を備えている。   FIG. 1 is a diagram showing the configuration of an embodiment of the present invention. Referring to FIG. 1, the memory device according to this embodiment includes a request input unit (1), a reply output unit (2), a correction capability setting circuit (3), an address calculation circuit (4), and data division. A synthesis unit (5), a memory control circuit (6), a memory (7), and a data restoration circuit (8) are provided.

訂正能力設定回路(3)は、メモリ(7)上に定義すべきECC(誤り訂正符号)のバイト数を定義する。訂正能力設定回路(3)は、静的に訂正能力を各回路に通知する。訂正能力は、外部インタフェース(不図示)経由で設定されるか、あるいは、訂正能力設定回路(3)内部において半固定的に設定される。   The correction capability setting circuit (3) defines the number of ECC (error correction code) bytes to be defined on the memory (7). The correction capability setting circuit (3) statically notifies each circuit of the correction capability. The correction capability is set via an external interface (not shown), or is set semi-fixed in the correction capability setting circuit (3).

アドレス演算回路(4)は、メモリ制御回路(6)に入ってくるメモリ(7)へのアクセスアドレスを分析し、アドレス演算を行う。   The address calculation circuit (4) analyzes an access address to the memory (7) that enters the memory control circuit (6) and performs an address calculation.

アドレス演算回路(4)は、訂正能力設定回路(3)から通知されたバイト数に関連したアドレス分を加算し、メモリ制御回路(6)にアドレスを渡す。   The address calculation circuit (4) adds the addresses corresponding to the number of bytes notified from the correction capability setting circuit (3), and passes the address to the memory control circuit (6).

データ分割合成回路(5)は、メモリ制御回路(6)に入ってくるメモリ(7)へのデータを分析し、訂正能力設定回路(3)及びアドレス演算回路(4)からの演算結果から得られた情報を基にして、データの分割/構成変更を行う。   The data division and synthesis circuit (5) analyzes the data to the memory (7) that enters the memory control circuit (6), and obtains it from the calculation results from the correction capability setting circuit (3) and the address calculation circuit (4). Based on the received information, data division / configuration change is performed.

データ分割合成回路(5)により、ECC(誤り訂正符号)を含めたメモリ(7)へのデータ処理を行い、後述するように、図3(A)、(B)、(C)に示すような、メモリマッピングでデータを保存する。   As shown in FIGS. 3A, 3B, and 3C, as will be described later, the data division synthesis circuit (5) performs data processing on the memory (7) including the ECC (error correction code). Save data with memory mapping.

メモリ制御回路(6)は、アドレス演算回路(4)から指定されたメモリ空間のデータのメモリ(7)に対するリード・ライト動作を処理する。メモリ制御回路(6)は、DIMMなどのメモリ(7)を制御する。   The memory control circuit (6) processes a read / write operation of data in the memory space designated by the address arithmetic circuit (4) with respect to the memory (7). The memory control circuit (6) controls a memory (7) such as a DIMM.

データ復元回路(8)は、メモリ(7)から読み出したデータを、データ要求元に対して、正常な状態にデータを復元する。データ復元回路(8)は、メモリ(7)上に格納されているデータを、データ要求元の適正なデータに成形し直し、ECC(誤り訂正符号)によるデータの正当性のチェックを行い、ECC(誤り訂正符号)によるデータ復元を行う。   The data restoration circuit (8) restores the data read from the memory (7) to a normal state with respect to the data request source. The data restoration circuit (8) reshapes the data stored in the memory (7) into appropriate data of the data request source, checks the validity of the data by ECC (error correction code), and performs ECC. Data restoration by (error correction code) is performed.

訂正能力設定回路(3)は、ECC(誤り訂正符号)のバイト数を各回路に転送する。例えば、一般的な汎用DIMMを2枚並列に用いた場合、16バイトのデータと2バイトのECCを搭載することができるため、訂正能力設定回路(3)では、ECC(誤り訂正符号)のバイト数として、2バイト以上の値と設定する。なお、誤り訂正設定回路(3)では、ECC(誤り訂正符号)のバイト数を動的に可変することはなく、静的に設定する。   The correction capability setting circuit (3) transfers the number of ECC (error correction code) bytes to each circuit. For example, when two general-purpose DIMMs are used in parallel, 16 bytes of data and 2 bytes of ECC can be mounted. Therefore, in the correction capability setting circuit (3), an ECC (error correction code) byte The number is set to a value of 2 bytes or more. In the error correction setting circuit (3), the number of ECC (error correction code) bytes is set dynamically without dynamically changing.

本実施例において、ECCのバイト長を4バイトとした場合、訂正能力設定回路(3)は「4」を、各回路に伝達する。   In this embodiment, when the ECC byte length is 4 bytes, the correction capability setting circuit (3) transmits “4” to each circuit.

データ転送元(リクエスト要求元)からメモリへのデータ転送要求(20)がリクエスト入力部(1)に入力された場合について説明する。   A case where a data transfer request (20) from the data transfer source (request request source) to the memory is input to the request input unit (1) will be described.

アドレス演算回路(4)では、訂正能力設定回路(3)から供給された「4」から「2」を引いた値(「2」は、メモリ(7)を構成する汎用DIMMのECC格納部分の容量である2バイトに対応する)を用いてアクセスするアドレス変換を行う。アドレスの変換は、以下となる。   In the address arithmetic circuit (4), a value obtained by subtracting “2” from “4” supplied from the correction capability setting circuit (3) (“2” is the ECC storage portion of the general-purpose DIMM constituting the memory (7)). Address conversion is performed using (corresponding to 2 bytes of capacity). The address conversion is as follows.

ADR_PLUS=INT(ADR_SRC/(1ワードのデータ長(18バイト−4))) …(1)   ADR_PLUS = INT (ADR_SRC / (data length of one word (18 bytes−4))) (1)

ADR_MEM=ADR_SRC+(ADR_PLUS*(ECCのバイト長−2)) …(2)   ADR_MEM = ADR_SRC + (ADR_PLUS * (ECC byte length−2)) (2)

ただし、(1)、(2)において、
ADR_SRCは、転送元のアドレス(実際にメモリに書き込もうとした時のアドレス)、
ADR_PLUSは、実際のメモリアドレスに変換するための差分アドレス、
ADR_MEMは、実際のメモリ上のアクセスアドレス、
である。
However, in (1) and (2)
ADR_SRC is the address of the transfer source (the address when actually trying to write to the memory),
ADR_PLUS is a differential address for conversion to an actual memory address,
ADR_MEM is the access address on the actual memory,
It is.

上式(1)、(2)により、アドレス演算回路(4)は、メモリ(7)にアクセスすべきアドレスADR_MEMを計算する。   From the above equations (1) and (2), the address calculation circuit (4) calculates an address ADR_MEM to be accessed to the memory (7).

データ分割合成回路(5)は、アドレスADR_MEMの下位4ビットの値によって、データをシフトし(例えばデータを上位バイト側にShift)、その後、メモリ(7)に納める1ワードの値で分割を行う。この分割は、最大メモリの1ワードのバイト数−2まで、つまり、16−2=14バイトまで、分割され、1ワードには、必ず分割されたデータと該データのECC(誤り訂正符号)の両方が納められる。つまり、分割されたデータのバイト数(14バイト)と、ECC(誤り訂正符号)のバイト数(4バイト)の和が、必ず、DIMMの1ワード(=16バイト+2バイト)に収まる。   The data dividing / synthesizing circuit (5) shifts the data by the value of the lower 4 bits of the address ADR_MEM (for example, shifts the data to the upper byte side), and then divides by the value of 1 word stored in the memory (7). . This division is performed up to the number of bytes of one word in the maximum memory minus 2, that is, 16-2 = 14 bytes. In one word, the divided data and the ECC (error correction code) of the data are always included. Both are paid. That is, the sum of the number of bytes of divided data (14 bytes) and the number of bytes of ECC (error correction code) (4 bytes) always fits in one word (= 16 bytes + 2 bytes) of DIMM.

このように、本実施例においては、既製のDIMMのバイト幅(1ワード=16バイト+2バイト)の範囲を超えない状態としているため、安価なメモリが使えることになる。   As described above, in this embodiment, since the byte width of the ready-made DIMM (1 word = 16 bytes + 2 bytes) is not exceeded, an inexpensive memory can be used.

データ分割合成回路(5)では、ECC(誤り訂正符号)をデータと同じワード位置に配置するため、メモリ制御回路(6)は、メモリ(7)への1回のアクセスで、データとECC(誤り訂正符号)が得られる。   In the data division / synthesis circuit (5), since the ECC (error correction code) is arranged at the same word position as the data, the memory control circuit (6) can access the data and the ECC ( Error correction code).

本実施例において、もとのデータは分割されているため、複数のワード位置に対してアクセスが必要であるが、一般的に、DDR2−DIMMやその他のメモリにおいても、連続したアドレスに対しては、1回の処理で、一連の作業(複数アクセス)が可能となるバースト転送がサポートされている。バースト転送の処理により、連続した複数のワードに、データが分割されている場合に、高速なデータ転送が行われる。   In the present embodiment, since the original data is divided, it is necessary to access a plurality of word positions. Generally, however, in DDR2-DIMM and other memories, continuous addresses are also used. Supports burst transfer that enables a series of operations (multiple accesses) in one process. When the data is divided into a plurality of continuous words by the burst transfer process, high-speed data transfer is performed.

以下に本実施例の動作を概説する。データ要求元(リクエスト要求元)からのリクエスト(命令)(20)をリクエスト入力部(1)が受信する。このリクエスト入力部(1)に入るリクエスト(20)は、特に制限されないが、一般的なPCI(Peropheral Component Interconenct)−XバスやPCI−Expressなどの汎用インタフェースが用いられる。   The operation of this embodiment will be outlined below. The request input unit (1) receives a request (command) (20) from a data request source (request request source). The request (20) entering the request input unit (1) is not particularly limited, but a general-purpose interface such as a general PCI (Peripheral Component Interconnect) -X bus or PCI-Express is used.

訂正能力設定回路(3)は、ECC(誤り訂正符号)のバイト数を提示する回路であるが、外部インタフェースおよび内部で半固定的に値が格納されており、静的に変化できる値を有する。1ワードが16バイト(データ)+2バイト(ECC)構成のDIMMを用い、ECC(誤り訂正符号)は4バイトとした場合で説明する。この場合、14バイト(データ)+4バイト(ECC)となる。   The correction capability setting circuit (3) is a circuit that presents the number of ECC (error correction code) bytes, but has a value that can be changed statically because the value is stored semi-fixed internally in the external interface. . A case will be described in which a DIMM in which one word is 16 bytes (data) +2 bytes (ECC) is used, and ECC (error correction code) is 4 bytes. In this case, 14 bytes (data) +4 bytes (ECC).

リクエスト入力部(1)は、メモリアクセス要求されるアドレス(21)とデータ(31)とに分割を行い、アドレス(21)についてはアドレス演算回路(4)に受け渡される。リクエスト要求元の処理イメージは、図3(A)に示すように、16バイト(データ)+4バイト(ECC)である。例えばアドレスをADR_SRC=0020h(ただし、hはヘキサデシマル表現を示す)とする。   The request input unit (1) divides the memory access requested address (21) and data (31), and the address (21) is transferred to the address arithmetic circuit (4). The processing image of the request request source is 16 bytes (data) +4 bytes (ECC) as shown in FIG. For example, it is assumed that the address is ADR_SRC = 0020h (where h indicates hexadecimal expression).

アドレス演算回路(4)は、リクエスト入力部(1)からアドレス(21)(ADR_SRC=0020h)を受け取ると、訂正能力設定回路(3)より受けとった、ECC(誤り訂正符号)コードのバイト数=4バイトを基にして、式(1)と式(2)から、アドレスを演算する。   When the address arithmetic circuit (4) receives the address (21) (ADR_SRC = 0020h) from the request input unit (1), the number of ECC (error correction code) code bytes received from the correction capability setting circuit (3) = Based on 4 bytes, the address is calculated from the equations (1) and (2).

ADR_SRC=0020hより、ADL_PLUS=0020h/(18−4)=32/14=2   From ADR_SRC = 0020h, ADL_PLUS = 0020h / (18-4) = 32/14 = 2

ADR_MEM=0020h+(2*(4−2))=0024h   ADR_MEM = 0020h + (2 * (4-2)) = 0024h

データ分割合成回路(5)は、アドレス演算回路(4)から演算結果(ADR_MEM=0024h)を受けとり、アドレス(ADR_MEM)の下位の4ビット情報(=0100b)に応じてデータを分割/シフト動作をし、目的のデータに合わせる。この場合、元のソースアドレスADR_SRC=0020hからアドレス002Fhまでの計16バイトのデータを、4バイト上位バイト側にシフトする。アドレス0020hのバイトデータはアドレス0024hバイトに移動する。図3(B)に示すように、もとの16バイトのデータは、シフト後、アドレス0024hからアドレス002Dhの10バイト分のデータと、アドレス0030hからアドレス0035hの6バイトのデータに分割される。もとの4バイトのECCのうち2バイトは、アドレス002Ehと002Fhの2バイトに格納され、0020hからの16バイトデータに対応するDIMMの2バイトに格納され、図3(B)のように、E2として格納される。   The data division synthesis circuit (5) receives the calculation result (ADR_MEM = 0024h) from the address calculation circuit (4), and performs the division / shift operation on the data according to the lower 4 bits information (= 0100b) of the address (ADR_MEM). And adjust to the target data. In this case, a total of 16 bytes of data from the original source address ADR_SRC = 0020h to the address 002Fh is shifted to the upper 4 bytes side. The byte data at address 0020h moves to address 0024h bytes. As shown in FIG. 3B, the original 16-byte data is divided into 10-byte data from address 0024h to address 002Dh and 6-byte data from address 0030h to address 0035h after the shift. Of the original 4-byte ECC, 2 bytes are stored in 2 bytes of addresses 002Eh and 002Fh, and stored in 2 bytes of DIMM corresponding to 16-byte data from 0020h, as shown in FIG. Stored as E2.

図3(C)に示すように、もとのデータ幅:16バイト、ECC:4バイトの(D2、E2)は、1ワードのデータ幅:16バイト、ECC:2バイトのDIMM内に、データ幅:14バイト、ECC:4バイトのフォーマット(計18バイト)に変換されて、書き込まれる。図3には、同様にアドレス変換、データ分割された、もとのデータ幅:16バイト、ECC:4バイトの(D0、E0)、(D1、E1)、(D3、E3)・・・のメモリ保存形態が示されている。   As shown in FIG. 3C, the original data width: 16 bytes and ECC: 4 bytes (D2, E2) are stored in a 1 word data width: 16 bytes, ECC: 2 bytes DIMM. It is converted into a format of width: 14 bytes and ECC: 4 bytes (18 bytes in total) and written. In FIG. 3, the same data conversion, data division, original data width: 16 bytes, ECC: 4 bytes (D0, E0), (D1, E1), (D3, E3). The memory storage form is shown.

図3に示した本実施例のメモリアクセス動作は以下のようになる。1ワードがpバイト幅(図3では、p=16)のデータと該データに関連するqバイト幅(q=4)の冗長コード(ECC)の書き込み要求に対して、1ワードのデータ幅がrバイト(r=16)、sバイト(s=2)のECC領域を備えた構成のメモリに格納するにあたり、前記メモリでの1ワードのデータ幅を(r+s−q)バイト(16+4−2=14)とし、ECC幅をqバイト(4バイト)として扱い、書き込みデータの先頭アドレスADR_SRCを、(r+s−q)で除算した値{ADR_SRC/(r+s−q)}の整数値ADR_PLUSに(q−s)を乗じた値ADR_PLUS×(q−s)をADR_SRCに加算したアドレスADR_MEMを演算する。前記pバイト(16バイト)のデータ(D2)のうち、演算後のアドレスADR_MEMからアドレスADR_SRC+(r+s−q)−1まで[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを格納する。アドレス{ADR_SRC+(r+s−q)}(0020h+000Eh)からqバイトのECCのうちの(q−s)バイト(2バイト)のECCを格納し、qバイトのECCの残りのsバイトを、sバイトのECC領域に格納する。pバイトのデータのうち残りのp−[{ADR_SRC+(r+s−q)}−ADR_MEM]バイト(6バイト)のデータを、ADR_SRC+(r+s−q)+(q−s)=ADR_SRC+r、すなわち、次のワードから格納する。このように、データ書き込み先のメモリにおいて、データに対応するECCが、データと同一ワード中に含まれる配置となるように、書き込みを行う。   The memory access operation of this embodiment shown in FIG. 3 is as follows. One word has a data width of 1 byte in response to a write request for data of p bytes wide (p = 16 in FIG. 3) and a redundant code (ECC) of q bytes wide (q = 4) related to the data. When storing in a memory having an ECC area of r bytes (r = 16) and s bytes (s = 2), the data width of one word in the memory is (r + s−q) bytes (16 + 4-2 = 14), the ECC width is handled as q bytes (4 bytes), and the leading value ADR_SRC of the write data is divided by (r + s−q) to the integer value ADR_PLUS of {ADR_SRC / (r + s−q)} (q− An address ADR_MEM obtained by adding a value ADR_PLUS × (q−s) multiplied by s) to ADR_SRC is calculated. Of the p-byte (16-byte) data (D2), [{ADR_SRC + (r + s-q)}-ADR_MEM] bytes of data from the calculated address ADR_MEM to the address ADR_SRC + (r + s-q) -1 are stored. (Q-s) bytes (2 bytes) of q-byte ECC is stored from address {ADR_SRC + (r + s-q)} (0020h + 000Eh), and the remaining s bytes of q-byte ECC are stored in s bytes Store in the ECC area. The remaining p-[{ADR_SRC + (r + s-q)}-ADR_MEM] bytes (6 bytes) of the p-byte data is converted into ADR_SRC + (r + s-q) + (q-s) = ADR_SRC + r, that is, Store from word. In this way, writing is performed so that the ECC corresponding to the data is arranged in the same word as the data in the data write destination memory.

データ転送要求元のリクエスト(20)がメモリからのデータ読み出しである場合には、メモリ制御回路(6)から読み出されたデータをデータ復元回路(8)が受信する。   When the data transfer request source request (20) is to read data from the memory, the data restoration circuit (8) receives the data read from the memory control circuit (6).

データ復元回路(8)は、読み出されたECCのチェックを行い、訂正可能なエラーが発生した場合には、訂正を行い、それと同時に、アドレス演算回路(4)から得られているアドレス演算結果(24)を基にしてデータを復元し、リプライ出力部(2)でリクエスト要求元に対するリプライ(30)を生成する。   The data restoration circuit (8) checks the read ECC and corrects the error when a correctable error occurs. At the same time, the address calculation result obtained from the address calculation circuit (4). Data is restored based on (24), and a reply (30) for the request source is generated by the reply output unit (2).

図2は、本発明の一実施例におけるライト動作を示すフローチャートである。ECCのバイト数を予め設定しておく(ステップS1)。前述したように、この設定は、動的には変更せず、システムとして存在する時に静的に値を設定しておくものであり、ここでは、ECCのバイト数は4バイトとする。すなわち、本実施例では、ECCのバイト長を動的に可変させることは想定していない。   FIG. 2 is a flowchart showing a write operation in one embodiment of the present invention. The number of ECC bytes is set in advance (step S1). As described above, this setting is not dynamically changed but is set statically when existing as a system. Here, the number of bytes of ECC is 4 bytes. That is, in this embodiment, it is not assumed that the ECC byte length is dynamically varied.

データ要求元からリクエストを受信すると(ステップS2)、アドレス演算回路(4)は上式(1)、(2)にしたがい、アドレスADR_MEMの演算を行う(ステップS3)。アドレス演算回路(4)でのアドレス演算はデータ部分を1ワード16バイトから、1ワード14バイトに変更する為のアドレス演算であり、要求元のアドレスに対して、差分を求め、加算することで、1ワード14バイトの時のアドレス位置を示す。   When a request is received from the data request source (step S2), the address calculation circuit (4) calculates the address ADR_MEM according to the above equations (1) and (2) (step S3). The address calculation in the address calculation circuit (4) is an address calculation for changing the data portion from 16 bytes per word to 14 bytes per word. By calculating and adding the difference to the request source address Indicates the address position when one word is 14 bytes.

例えばリクエスト要求元のアドレス10hへのアクセスが発生した場合では、上式(1)、(2)より、内部のアドレスADR_MEMは12hとなる。すなわち、
ADR_PLUS=10h/14=16/14=1
ADR_MEM=10h+1*(4−2)=12h
For example, when an access to the request source address 10h occurs, the internal address ADR_MEM is 12h from the above equations (1) and (2). That is,
ADR_PLUS = 10h / 14 = 16/14 = 1
ADR_MEM = 10h + 1 * (4-2) = 12h

また、リクエスト要求元のアドレス0020hへのアクセスが発生した場合では、アドレス演算回路(4)のアドレスADR_MEMは0024hとなる。アドレスADR_MEMとしては、14バイト加算されるごとに、02hずつアドレスが加算されることになる。   Further, when an access to the request request source address 0020h occurs, the address ADR_MEM of the address arithmetic circuit (4) is 0024h. The address ADR_MEM is incremented by 02h every time 14 bytes are added.

データについては、リクエスト要求元のアドレス0020hのアクセスが発生した場合、アドレスとして4バイト分ずれる(シフトする)必要があるため、4バイト分データをシフトさせながら、1ワード14バイトとしてデータを丸め込む(ステップS4)。   As for the data, when access to the address 0020h of the request request source occurs, it is necessary to shift (shift) 4 bytes as the address, so the data is rounded as 14 bytes per word while shifting the data by 4 bytes ( Step S4).

また、この時のECCについては、そのまま無加工として、上記の14バイトに付加することにより、1ワード18バイトとしてデータを生成する(ステップS5)。   Further, the ECC at this time is not processed as it is, and is added to the above 14 bytes to generate data as 18 bytes per word (step S5).

メモリ(7)への書き込みを行う(ステップS6)。   Writing to the memory (7) is performed (step S6).

これにより、アドレスとデータの位置を一致させることが可能となり、一般的なメモリ回路を用いてメモリにデータを書き込むことが可能となる。   As a result, the address and the data position can be matched, and data can be written into the memory using a general memory circuit.

図4は、本発明の一実施例のリード動作を説明するフローチャートである。図5は、メモリ読み出し動作のデータ、ECCの形態を説明する図である。図5(A)は、図3(A)と同じくリクエスト要求元の処理イメージである。以下では、リクエスト要求元がアドレス(ADR_SRC)0020hのデータ(D2、E2)の読み出し要求を行ったものとする。   FIG. 4 is a flowchart for explaining the read operation according to the embodiment of the present invention. FIG. 5 is a diagram for explaining the data and ECC format of the memory read operation. FIG. 5A is a processing image of the request request source as in FIG. In the following, it is assumed that the request request source makes a read request for data (D2, E2) at address (ADR_SRC) 0020h.

図4において、ECCバイトの幅設定のステップS11、リクエスト受信のステップS12、アドレスの演算のステップS13のは、ライト動作のステップS1〜S3と同じであるため説明は省略する。   In FIG. 4, the step S11 for setting the ECC byte width, the step S12 for receiving a request, and the step S13 for calculating an address are the same as steps S1 to S3 for a write operation, and thus description thereof is omitted.

リード動作では、ステップS13で演算されたアドレスADR_MEM(0024h)を用いて、図5(B)に示すように、メモリ(7)からデータ(16バイト)D2、ECC(4バイト)E2の読み出しを行う(ステップS14)。   In the read operation, using the address ADR_MEM (0024h) calculated in step S13, as shown in FIG. 5B, data (16 bytes) D2 and ECC (4 bytes) E2 are read from the memory (7). Perform (step S14).

そして、ADR_SRCで示された位置にまでデータをシフトする(ステップS15)。この場合、まず、ADR_MEM=0024hから002Dhまでの10バイトデータを4バイト分、低位側にシフトさせる。   Then, the data is shifted to the position indicated by ADR_SRC (step S15). In this case, first, 10-byte data from ADR_MEM = 0024h to 002Dh is shifted by 4 bytes to the lower side.

また、1ワード14バイトから16バイトに復元させるために、図5(C)に示すように、次ワードのデータ(0030h〜0035hの6バイトデータ)と合成(concatenate)することで、リクエスト要求元へのリプライデータが生成される(ステップS16)。   Further, in order to restore from 14 bytes to 16 bytes per word, as shown in FIG. 5C, the request request source is concatenated with data of the next word (6-byte data from 0030h to 0035h). Reply data to is generated (step S16).

リクエスト要求元にデータをリプライする(ステップS17)。   Data is replied to the request request source (step S17).

また、上記処理において、ECCの再生成やデータ作り直しは不要であり、回路構成が簡素化される。   Further, in the above processing, it is not necessary to regenerate ECC or regenerate data, and the circuit configuration is simplified.

図6は、本発明の第2の実施例の構成を示す図である。本実施例においては、図3の構成にトレーラ生成回路(10)が追加されている。アドレス演算回路(4)の演算結果において、トレーラ生成回路(10)を動かし、一定のブロック単位に、セクタ番号や各処理用のフラグ等を埋め込む。   FIG. 6 is a diagram showing the configuration of the second exemplary embodiment of the present invention. In this embodiment, a trailer generation circuit (10) is added to the configuration of FIG. In the calculation result of the address calculation circuit (4), the trailer generation circuit (10) is moved to embed a sector number, a flag for each processing, etc. in a certain block unit.

トレーラ生成回路(10)は、アドレス演算結果が一定の値になると動作し、内部に書かれているセクタ番号等を、メモリ(7)上に埋め込む事で、トレーラデータをデータ内部に埋め込む。   The trailer generation circuit (10) operates when the address operation result becomes a constant value, and embeds the trailer data in the data by embedding the sector number and the like written in the memory (7).

図7は、1ワード14バイト、ECCが4バイトのデータ列で格納するような場合を示す。これは、リクエスト要求元からのデータフォーマット(101)に対して、メモリへの書き込み状態(103)を示したものであり、データを、1ワード=14バイトにアライメントし直された場合、トレーラ(TRL)(104)を納めるエリアがある。   FIG. 7 shows a case where data is stored in a data string of 14 bytes per word and 4 bytes of ECC. This shows the write state (103) to the memory with respect to the data format (101) from the request request source. When the data is realigned to 1 word = 14 bytes, the trailer ( TRL) (104).

トレーラ(TRL)(104)は、D0〜D6のCRC(Cyclic Redundancy Check)演算を行った物を入れる場合や、D0〜D6を1セクタと設定し、セクタ番号を埋め込む事が可能となり、トレーラ(104)としてメモリ(7)に埋め込む。トレーラ(TRL)(104)に、CRCを埋め込むと、1セクタ単位のECCによるチェックおよびCRCによるチェックと、2重のチェックを行うことができ、信頼性の高いメモリ装置を構築することができる。   The trailer (TRL) (104) can be used to insert a CRC (Cyclic Redundancy Check) operation of D0 to D6, or to set D0 to D6 as one sector and embed a sector number. 104) is embedded in the memory (7). By embedding CRC in the trailer (TRL) (104), a check by ECC and a check by CRC and a double check can be performed, and a highly reliable memory device can be constructed.

本実施例の作用効果を説明する。本実施例によれば、ECC(誤り訂正符号)のビット幅を任意に設定できるため、4バイトや8バイトといった、4バイト以上のECCコードを搭載することができ、メモリの訂正能力が向上することにより、高信頼性なメモリ装置を実現することができる。   The operational effects of the present embodiment will be described. According to the present embodiment, since the bit width of ECC (error correction code) can be arbitrarily set, an ECC code of 4 bytes or more such as 4 bytes or 8 bytes can be mounted, and the correction capability of the memory is improved. Thus, a highly reliable memory device can be realized.

データ読み出し/書き込みにおいて、データとECC等の誤り訂正符号が同じワード位置に格納されていることにより、前述の効果が期待できる回路でありながら、単純な回路構成で構築可能となり、安価なメモリ装置の提供ができる。   In data reading / writing, data and error correction codes such as ECC are stored at the same word position, so that the above-described effects can be expected, but the circuit can be constructed with a simple circuit configuration and is inexpensive. Can be provided.

本発明の全開示(請求の範囲を含む)の枠内において、さらにその基本的技術思想に基づいて、実施形態ないし実施例の変更・調整が可能である。また、本発明の請求の範囲の枠内において種々の開示要素の多様な組み合わせないし選択が可能である。すなわち、本発明は、請求の範囲を含む全開示、技術的思想にしたがって当業者であればなし得るであろう各種変形、修正を含むことは勿論である。   Within the scope of the entire disclosure (including claims) of the present invention, the embodiments and examples can be changed and adjusted based on the basic technical concept. Various combinations and selections of various disclosed elements are possible within the scope of the claims of the present invention. That is, the present invention of course includes various variations and modifications that could be made by those skilled in the art according to the entire disclosure including the claims and the technical idea.

本発明の一実現例の構成を示す図である。It is a figure which shows the structure of the implementation example of this invention. 本発明の一実現例におけるメモリのライト動作のフローチャートである。It is a flowchart of the write operation of the memory in one implementation example of the present invention. 本発明の一実現例におけるライト動作を説明する図である。It is a figure explaining the write-in operation in one implementation example of the present invention. 本発明の一実現例におけるメモリのリードのフローチャートである。It is a flowchart of the read of the memory in one implementation example of the present invention. 本発明の一実現例におけるリード動作を説明する図である。It is a figure explaining read operation in one example of realization of the present invention. 本発明の他の実現例の構成を示す図である。It is a figure which shows the structure of the other implementation example of this invention. 本発明の他の実施例におけるメモリの保存形態を説明する図である。It is a figure explaining the preservation | save form of the memory in the other Example of this invention. 関連技術1におけるメモリの保存形態を説明する図である。It is a figure explaining the preservation | save form of the memory in related technology 1. FIG. 関連技術2におけるメモリの保存形態を説明する図である。It is a figure explaining the preservation | save form of the memory in related technology 2. FIG.

符号の説明Explanation of symbols

1 リクエスト入力部
2 リプライ出力部
3 訂正能力設定回路
4 アドレス演算回路
5 データ分割合成回路
6 メモリ制御回路
7 メモリ
8 データ復元回路
10 トレーラ生成回路
20 リクエスト要求元からの命令(アドレス及びデータ等)
21 リクエストアドレス
22 訂正能力設定回路からのECCコードのバイト数
23 アドレス演算結果
24 アドレス演算結果
26 ライトデータおよびECCコード
27 リードデータおよびECCコード
28 メモリアクセスアドレスおよびデータ
29 復元されたデータ
30 リクエスト要求元に返却するリプライデータ
31 ライトデータ
101 データフォーマット
102 分割生成処理のライトデータ
103 ECCデータ
104 トレーラ
201 データ部
202 ECC部(ECCコード)
301 データ
302 ECC部(ECCコード)
DESCRIPTION OF SYMBOLS 1 Request input part 2 Reply output part 3 Correction capability setting circuit 4 Address arithmetic circuit 5 Data division synthesis circuit 6 Memory control circuit 7 Memory 8 Data restoration circuit 10 Trailer generation circuit 20 Instruction (address, data, etc.) from request request source
21 Request address 22 Number of bytes of ECC code from correction capability setting circuit 23 Address operation result 24 Address operation result 26 Write data and ECC code 27 Read data and ECC code 28 Memory access address and data 29 Restored data 30 Request request source Reply data to be returned 31 Write data 101 Data format 102 Write data 103 for split generation processing ECC data 104 Trailer 201 Data portion 202 ECC portion (ECC code)
301 Data 302 ECC part (ECC code)

Claims (7)

メモリに格納されるデータに対する冗長コードの長さを指定する手段と、
データと該データに対応する冗長コードが1ワード内に存在するようにメモリに配置する手段と、
を備え、
1ワードがpバイト幅のデータと該データに関連するqバイト幅の冗長コード(ただし、p、qは予め定められた所定の正整数)の書き込み要求に対して、
1ワードのデータ幅がrバイト(ただし、rはr<pの正整数)、sバイト(ただし、sはs<qの正整数)の冗長コード領域を備えた構成のメモリに格納するにあたり、
前記メモリでの1ワードのデータ幅を(r+s−q)バイトとし、冗長コード幅をqバイトとして扱い、
書き込みデータの先頭アドレスADR_SRCを、(r+s−q)で除算した値{ADR_SRC/(r+s−q)}の整数値ADR_PLUSに(q−s)を乗じた値ADR_PLUS×(q−s)をADR_SRCに加算したアドレスADR_MEMを演算する手段と、
前記pバイトのデータのうち、演算後のアドレスADR_MEMからアドレスADR_SRC+(r+s−q)−1まで[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを格納し、
アドレス{ADR_SRC+(r+s−q)}から前記qバイトの冗長コードのうちの(q−s)バイトの冗長コードを格納し、前記qバイトの冗長コードの残りのsバイトを、前記sバイトの冗長コード領域に格納し、
前記pバイトのデータのうち残りのp−[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを、ADR_SRC+(r+s−q)+(q−s)=ADR_SRC+r、すなわち、次のワードから格納する手段と、
を備え、データ書き込み先の前記メモリにおいて、前記データに対応する冗長コードと、データの少なくとも一部とが、同一ワード中に配置されるように、書き込みを行う、ことを特徴とするメモリ装置。
Means for specifying the length of the redundant code for the data stored in the memory;
Means for arranging in a memory such that data and a redundant code corresponding to the data are present in one word;
With
In response to a write request for 1 byte of data having a p-byte width and a q-byte-wide redundant code (p and q are predetermined positive integers) associated with the data,
When storing in a memory having a redundant code area having a data width of one word of r bytes (where r is a positive integer r <p) and s bytes (where s is a positive integer s <q),
The data width of one word in the memory is (r + s−q) bytes, the redundant code width is treated as q bytes,
The value ADR_PLUS × (q−s) obtained by multiplying the integer value ADR_PLUS of the value {ADR_SRC / (r + s−q)} by dividing the start address ADR_SRC of the write data by (r + s−q) and (q−s) to ADR_SRC. Means for calculating the added address ADR_MEM;
Among the p bytes of data, [{ADR_SRC + (r + s−q)} − ADR_MEM] bytes of data from the address ADR_MEM after the operation to the address ADR_SRC + (r + s−q) −1 are stored.
The redundant code of (q−s) bytes among the redundant code of q bytes is stored from the address {ADR_SRC + (r + s−q)}, and the remaining s bytes of the redundant code of q bytes are stored as the redundant code of s bytes. Stored in the code area,
The remaining p-[{ADR_SRC + (r + s-q)}-ADR_MEM] bytes of the p-byte data are stored from ADR_SRC + (r + s-q) + (q-s) = ADR_SRC + r, that is, from the next word. Means to
The memory device, wherein the data is written so that the redundant code corresponding to the data and at least a part of the data are arranged in the same word.
前記冗長コードが誤り訂正符号(Error Correction Code)を含む、ことを特徴とする請求項1記載のメモリ装置。   The memory device according to claim 1, wherein the redundant code includes an error correction code. 前記メモリのデータ格納先のアドレスが予め定められた所定値となると、トレーラ情報を格納する手段を備えている、ことを特徴とする請求項1又は2記載のメモリ装置。   3. The memory device according to claim 1, further comprising means for storing trailer information when an address of a data storage destination of the memory reaches a predetermined value. 前記トレーラ情報がCRC(Cyclic Redundancy Code)情報、又はセクタ情報を含む、ことを特徴とする請求項3記載のメモリ装置。   4. The memory device according to claim 3, wherein the trailer information includes CRC (Cyclic Redundancy Code) information or sector information. 1ワードがpバイト幅のデータと該データに関連するqバイト幅の冗長コード(ただし、p、qは予め定められた所定の正整数)の読み込み要求に対して、
1ワードのデータ幅がrバイト(ただし、rはr<pの正整数)、sバイト(ただし、sはs<qの正整数)の冗長コード領域を備えた構成のメモリからデータを読み込み、読み出しデータを応答として返すにあたり、
前記メモリでの1ワードのデータ幅を(r+s−q)バイトとし、冗長コード幅をqバイトとして扱い、
読み出しデータの先頭アドレスADR_SRCを、(r+s−q)で除算した値{ADR_SRC/(r+s−q)}の整数値ADR_PLUSに(q−s)を乗じた値ADR_PLUS×(q−s)をADR_SRCに加算したアドレスADR_MEMを演算する手段と、
前記pバイトのデータのうち、演算後のアドレスADR_MEMからアドレスADR_SRC+(r+s−q)−1まで[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを読み出し、残りのp−[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを、ADR_SRC+(r+s−q)+(q−s)=ADR_SRC+r、すなわち、次のワードから読み出して合成し、1ワードが、pバイトのデータを復元し、
前記qバイトの冗長コードのうち、アドレス{ADR_SRC+(r+s−q)}からの(q−s)バイトの冗長コードを読み出し、前記qバイトの冗長コードの残りのsバイトを、前記sバイトの冗長コード領域から読み出し、qバイトのデータを復元する手段と、を備え、
前記復元された1ワードがpバイトのデータとqバイトのデータをリードデータとして要求元へ返す、請求項1記載のメモリ装置。
In response to a read request for data in which 1 word is p bytes wide and a q byte wide redundant code (p and q are predetermined positive integers) related to the data,
Data is read from a memory having a redundant code area having a data width of one byte of r bytes (where r is a positive integer r <p) and s bytes (where s is a positive integer s <q), When returning read data as a response,
The data width of one word in the memory is (r + s−q) bytes, the redundant code width is treated as q bytes,
The value ADR_PLUS × (q−s) obtained by multiplying the integer value ADR_PLUS of the value {ADR_SRC / (r + s−q)} by dividing (Q + s) the start address ADR_SRC of the read data by (r + s−q) is set to ADR_SRC. Means for calculating the added address ADR_MEM;
Of the p-byte data, [{ADR_SRC + (r + s-q)}-ADR_MEM] bytes of data are read from the calculated address ADR_MEM to the address ADR_SRC + (r + s−q) −1, and the remaining p − [{ADR_SRC + ( r + s−q)} − ADR_MEM] bytes of data are read from ADR_SRC + (r + s−q) + (q−s) = ADR_SRC + r, that is, read from the next word, and one word restores p bytes of data. ,
Among the q-byte redundant codes, a (q-s) -byte redundant code from the address {ADR_SRC + (r + s-q)} is read, and the remaining s bytes of the q-byte redundant code are read as the s-byte redundant code. Means for reading from the code area and restoring q bytes of data,
The memory device according to claim 1, wherein the restored one word returns p-byte data and q-byte data as read data to the request source.
1ワードがpバイト幅のデータと該データに関連するqバイト幅の冗長コード(ただし、p、qは予め定められた所定の正整数)の書き込み要求に対して、
1ワードのデータ幅がrバイト(ただし、rはr<pの正整数)、sバイト(ただし、sはs<qの正整数)の冗長コード領域を備えた構成のメモリに格納するにあたり、
前記メモリでの1ワードのデータ幅を(r+s−q)バイトとし、冗長コード幅をqバイトとして扱い、
書き込みデータの先頭アドレスADR_SRCを、(r+s−q)で除算した値{ADR_SRC/(r+s−q)}の整数値ADR_PLUSに(q−s)を乗じた値ADR_PLUS×(q−s)をADR_SRCに加算したアドレスADR_MEMを演算し、
前記pバイトのデータのうち、演算後のアドレスADR_MEMからアドレスADR_SRC+(r+s−q)−1まで[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを格納し、
アドレス{ADR_SRC+(r+s−q)}から前記qバイトの冗長コードのうちの(q−s)バイトの冗長コードを格納し、前記qバイトの冗長コードの残りのsバイトを、前記sバイトの冗長コード領域に格納し、
前記pバイトのデータのうち残りのp−[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを、ADR_SRC+(r+s−q)+(q−s)=ADR_SRC+r、すなわち、次のワードから格納し、
データ書き込み先の前記メモリにおいて、前記データに対応する冗長コードと、データの少なくとも一部とが、同一ワード中に配置されるように、書き込みを行う、メモリ制御方法。
In response to a write request for 1 byte of data having a p-byte width and a q-byte-wide redundant code (p and q are predetermined positive integers) associated with the data,
When storing in a memory having a redundant code area having a data width of one word of r bytes (where r is a positive integer r <p) and s bytes (where s is a positive integer s <q),
The data width of one word in the memory is (r + s−q) bytes, the redundant code width is treated as q bytes,
The value ADR_PLUS × (q−s) obtained by multiplying the integer value ADR_PLUS of the value {ADR_SRC / (r + s−q)} by dividing the start address ADR_SRC of the write data by (r + s−q) and (q−s) to ADR_SRC. Calculate the added address ADR_MEM,
Among the p bytes of data, [{ADR_SRC + (r + s−q)} − ADR_MEM] bytes of data from the address ADR_MEM after the operation to the address ADR_SRC + (r + s−q) −1 are stored.
The redundant code of (q−s) bytes among the redundant code of q bytes is stored from the address {ADR_SRC + (r + s−q)}, and the remaining s bytes of the redundant code of q bytes are stored as the redundant code of s bytes. Stored in the code area,
The remaining p-[{ADR_SRC + (r + s-q)}-ADR_MEM] bytes of the p-byte data are stored from ADR_SRC + (r + s-q) + (q-s) = ADR_SRC + r, that is, from the next word. And
A memory control method for performing writing so that a redundant code corresponding to the data and at least a part of the data are arranged in the same word in the memory to which data is written.
1ワードがpバイト幅のデータと該データに関連するqバイト幅の冗長コード(ただし、p、qは予め定められた所定の正整数)の読み込み要求に対して、
1ワードのデータ幅がrバイト(ただし、rはr<pの正整数)、sバイト(ただし、sはs<qの正整数)の冗長コード領域を備えた構成のメモリからデータを読み込み、読み出しデータを応答として返すにあたり、
前記メモリでの1ワードのデータ幅を(r+s−q)バイトとし、冗長コード幅をqバイトとして扱い、
読み出しデータの先頭アドレスADR_SRCを、(r+s−q)で除算した値{ADR_SRC/(r+s−q)}の整数値ADR_PLUSに(q−s)を乗じた値ADR_PLUS×(q−s)をADR_SRCに加算したアドレスADR_MEMを演算し、
前記pバイトのデータのうち、演算後のアドレスADR_MEMからアドレスADR_SRC+(r+s−q)−1まで[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを読み出し、残りのp−[{ADR_SRC+(r+s−q)}−ADR_MEM]バイトのデータを、ADR_SRC+(r+s−q)+(q−s)=ADR_SRC+r、すなわち、次のワードから読み出して合成し、1ワードが、pバイトのデータを復元し、
前記qバイトの冗長コードのうち、アドレス{ADR_SRC+(r+s−q)}からの(q−s)バイトの冗長コードを読み出し、前記qバイトの冗長コードの残りのsバイトを、前記sバイトの冗長コード領域から読み出し、qバイトのデータを復元し、
前記復元された1ワードがpバイトのデータとqバイトのデータをリードデータとして要求元へ返す、請求項記載のメモリ制御方法。
In response to a read request for data in which 1 word is p bytes wide and a q byte wide redundant code (p and q are predetermined positive integers) related to the data,
Data is read from a memory having a redundant code area having a data width of one byte of r bytes (where r is a positive integer r <p) and s bytes (where s is a positive integer s <q), When returning read data as a response,
The data width of one word in the memory is (r + s−q) bytes, the redundant code width is treated as q bytes,
The value ADR_PLUS × (q−s) obtained by multiplying the integer value ADR_PLUS of the value {ADR_SRC / (r + s−q)} by dividing (Q + s) the start address ADR_SRC of the read data by (r + s−q) is set to ADR_SRC. Calculate the added address ADR_MEM,
Of the p-byte data, [{ADR_SRC + (r + s-q)}-ADR_MEM] bytes of data are read from the calculated address ADR_MEM to the address ADR_SRC + (r + s−q) −1, and the remaining p − [{ADR_SRC + ( r + s−q)} − ADR_MEM] bytes of data are read from ADR_SRC + (r + s−q) + (q−s) = ADR_SRC + r, that is, read from the next word, and one word restores p bytes of data. ,
Among the q-byte redundant codes, a (q-s) -byte redundant code from the address {ADR_SRC + (r + s-q)} is read, and the remaining s bytes of the q-byte redundant code are read as the s-byte redundant code. Read from the code area, restore q bytes of data,
7. The memory control method according to claim 6 , wherein the restored one word returns p-byte data and q-byte data to the request source as read data.
JP2008091750A 2008-03-31 2008-03-31 Memory device and memory control method Expired - Fee Related JP5217570B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008091750A JP5217570B2 (en) 2008-03-31 2008-03-31 Memory device and memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008091750A JP5217570B2 (en) 2008-03-31 2008-03-31 Memory device and memory control method

Publications (2)

Publication Number Publication Date
JP2009245218A JP2009245218A (en) 2009-10-22
JP5217570B2 true JP5217570B2 (en) 2013-06-19

Family

ID=41307021

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008091750A Expired - Fee Related JP5217570B2 (en) 2008-03-31 2008-03-31 Memory device and memory control method

Country Status (1)

Country Link
JP (1) JP5217570B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012177964A (en) * 2011-02-25 2012-09-13 Nec Computertechno Ltd Memory system and memory module control method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06187248A (en) * 1992-12-16 1994-07-08 Nec Corp Data error detection and correction control circuit
JPH10312340A (en) * 1997-05-12 1998-11-24 Kofu Nippon Denki Kk Error detection and correction system of semiconductor storage device
JPH11212873A (en) * 1998-01-27 1999-08-06 Seiko Epson Corp Operating method for computer system
JP4953648B2 (en) * 2006-02-03 2012-06-13 パナソニック株式会社 Nonvolatile storage device and memory controller
KR101042197B1 (en) * 2008-12-30 2011-06-20 (주)인디링스 Memory controller and method for memory management

Also Published As

Publication number Publication date
JP2009245218A (en) 2009-10-22

Similar Documents

Publication Publication Date Title
CN107943609B (en) Memory module, memory controller and system and corresponding operating method thereof
EP2068245B1 (en) Reliability, availability, and serviceability solutions for memory technology
CN108268340B (en) Method for correcting errors in memory
JP5132687B2 (en) Error detection and correction method and apparatus using cache in memory
US8886892B2 (en) Memory module and method employing a multiplexer to replace a memory device
KR20090028507A (en) Non-volatile memory error correction system and method
JP2008198330A (en) Semiconductor memory device for byte-based masking operation and method of generating parity data
JP5529751B2 (en) Error correction in memory arrays
US10761930B2 (en) Memory with error correction function that is compatible with different data length and an error correction method
JP2005202957A (en) Data partitioning for error correction
KR20190012566A (en) Memory system having an error correction function and operating method of memory module and memory controller
US20130117632A1 (en) Storage control apparatus
US11218165B2 (en) Memory-mapped two-dimensional error correction code for multi-bit error tolerance in DRAM
US20040225944A1 (en) Systems and methods for processing an error correction code word for storage in memory components
JP4819843B2 (en) ECC code generation method for memory device
JP2010079856A (en) Storage device and memory control method
JP4956230B2 (en) Memory controller
JP5217570B2 (en) Memory device and memory control method
US7240272B2 (en) Method and system for correcting errors in a memory device
KR20180087494A (en) Memory device, memory system and operation method of the memory system
KR20200018156A (en) Memory system having ECC functionality for memory apparatus and method of operating the memory system
JP5213061B2 (en) Mirroring control device, mirroring control circuit, mirroring control method and program thereof
US20060282754A1 (en) Device, data sector, method of processing data, and signal-bearing medium embodying program of device
CN108762975B (en) ECC data storage method, system and storage medium
JP2010102640A (en) Memory controller, computer and memory mirroring method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110204

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121120

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130118

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130205

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130218

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160315

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5217570

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees