[go: up one dir, main page]

JP2008158779A - Information processing apparatus, ECC control apparatus, and ECC control method - Google Patents

Information processing apparatus, ECC control apparatus, and ECC control method Download PDF

Info

Publication number
JP2008158779A
JP2008158779A JP2006346292A JP2006346292A JP2008158779A JP 2008158779 A JP2008158779 A JP 2008158779A JP 2006346292 A JP2006346292 A JP 2006346292A JP 2006346292 A JP2006346292 A JP 2006346292A JP 2008158779 A JP2008158779 A JP 2008158779A
Authority
JP
Japan
Prior art keywords
data
ecc
cache memory
buffer memory
memory
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.)
Pending
Application number
JP2006346292A
Other languages
Japanese (ja)
Inventor
Shinji Kunishige
伸治 国重
Kazuo Chottogi
一夫 一寸木
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2006346292A priority Critical patent/JP2008158779A/en
Publication of JP2008158779A publication Critical patent/JP2008158779A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

【課題】バッファーメモリの使用効率およびアクセス速度を出来るだけ落とさずに、最適なECC制御を行う。
【解決手段】情報処理装置1は、データおよび当該データを訂正するためのECCを格納するバッファーメモリ5と、バッファーメモリから転送されるデータおよびECCを取り込んで、データおよびECCを格納するキャッシュメモリ20と、バッファーメモリからキャッシュメモリにデータおよびECCが転送される場合に、データをECCを用いて訂正するECC処理部28と、キャッシュメモリに格納されたデータを利用して処理を行うプロセッサ12と、を有するECC制御装置10を備える。
【選択図】図1
[PROBLEMS] To perform optimum ECC control without reducing the use efficiency and access speed of a buffer memory as much as possible.
An information processing apparatus includes a buffer memory that stores data and an ECC for correcting the data, and a cache memory that takes in the data and ECC transferred from the buffer memory and stores the data and ECC. An ECC processor 28 that corrects data using ECC when data and ECC are transferred from the buffer memory to the cache memory; a processor 12 that performs processing using the data stored in the cache memory; The ECC control device 10 is provided.
[Selection] Figure 1

Description

本発明は、バッファーメモリに記憶されたデータのECC処理を行う情報処理装置、ECC制御装置およびECC制御方法に関する。   The present invention relates to an information processing apparatus, an ECC control apparatus, and an ECC control method that perform ECC processing of data stored in a buffer memory.

現在、例えばハードディスク制御用のLSI(Large Scale Integration)などの情報処理装置には、DRAM(DynamicRandom Access Memory)であるバッファーメモリが設けられており、データを一時的に格納するために利用されている。この情報処理装置において、バッファーメモリの不良が発生して、バッファーメモリの記憶回路の一部が正常に機能しない場合がある。このようなバッファーメモリの不良に対処するための一般的な技術として、ハードディスク制御用のLSIに、バッファーメモリ用のECC(ErrorCorrecting Code)機能が設けられている。   Currently, for example, an information processing apparatus such as an LSI (Large Scale Integration) for controlling a hard disk is provided with a buffer memory which is a DRAM (Dynamic Random Access Memory), and is used for temporarily storing data. . In this information processing apparatus, a defect in the buffer memory may occur, and a part of the buffer memory storage circuit may not function normally. As a general technique for coping with such a failure of the buffer memory, an ECC (Error Correcting Code) function for the buffer memory is provided in the hard disk control LSI.

情報処理装置のバッファーメモリには、主に、ファイルデータなどのユーザーデータが格納されており、そのユーザーデータは基本的にセクタ(例えば512バイト)単位でアクセスされる。したがって、セクタ中の最大ビットのエラー訂正を行う場合、それに応じたビットのECCを追加する必要がある。セクタ単位でリードする時にECCも同時にリードすることで、最大ビットまでのエラー訂正が可能となる。   The buffer memory of the information processing apparatus mainly stores user data such as file data, and the user data is basically accessed in units of sectors (for example, 512 bytes). Therefore, when error correction of the maximum bit in the sector is performed, it is necessary to add ECC corresponding to the bit. By simultaneously reading the ECC when reading in units of sectors, it is possible to correct errors up to the maximum bit.

しかしながら、情報処理装置のバッファーメモリには、ユーザーデータ以外に、ファームウェア制御用コードやデータ、情報処理装置を出荷する前の検査時に実行するヒートランプログラムなどのシステムデータが格納される場合もある。その場合、バッファーメモリは短いビット単位(例えば64/32/16/8ビット単位)でアクセス(リード/ライト)される。この場合、上記のセクタ単位のECCを用いてのエラー訂正をすることができない。   However, in addition to user data, the buffer memory of the information processing apparatus may store system data such as firmware control code and data, and a heat run program executed at the time of inspection before shipping the information processing apparatus. In this case, the buffer memory is accessed (read / written) in short bit units (for example, 64/32/16/8 bit units). In this case, error correction using the sector-unit ECC cannot be performed.

バッファーメモリに短いビット単位でアクセスする場合を考慮して、8ビットのデータ単位でECCを追加すると、8ビットのデータに対して3ビットのECCが必要とされるため、ECCのデータ量が飛躍的に増大する。よって、メモリ実効使用可能領域が下がり、メモリ実効アクセス速度も落ちてしまうため、この方法は現実的ではない。   Considering the case of accessing the buffer memory in units of short bits, if ECC is added in units of 8-bit data, 3-bit ECC is required for 8-bit data, so the amount of ECC data jumps. Increase. Therefore, this method is not practical because the effective memory usable area decreases and the effective memory access speed also decreases.

なお、従来文献(特許文献1)には、バッファーメモリを有し、ECC処理を行う情報処理装置の一例が示されている。
特開平5‐88987号公報
Note that the conventional document (Patent Document 1) shows an example of an information processing apparatus that has a buffer memory and performs ECC processing.
JP-A-5-88987

上述したように、バッファーメモリにセクタ単位でアクセスすることを考慮してセクタ単位でECCを生成すると、バッファーメモリの使用効率およびアクセス速度を向上させることができるが、バッファーメモリに短いビット単位でアクセスする場合にエラー訂正処理を行うことができない。一方、バッファーメモリに短いビット単位でアクセスすることを考慮して短いビット単位でECCを生成すると、ECCのデータ量が増大して、バッファーメモリの使用効率およびアクセス速度が低下してしまう。   As described above, when ECC is generated in units of sectors in consideration of accessing the buffer memory in units of sectors, the use efficiency and access speed of the buffer memory can be improved, but the buffer memory is accessed in units of short bits. Error correction processing cannot be performed. On the other hand, if ECC is generated in a short bit unit in consideration of accessing the buffer memory in a short bit unit, the amount of ECC data increases, and the use efficiency and access speed of the buffer memory decrease.

本発明は、上記の課題を解決するためになされたもので、バッファーメモリの使用効率およびアクセス速度を出来るだけ落とさずに、最適なECC制御を行うことが可能な情報処理装置、ECC制御装置およびECC制御方法を提供することを目的とする。   The present invention has been made to solve the above-described problems, and is an information processing apparatus, an ECC control apparatus, and an information processing apparatus capable of performing optimal ECC control without reducing the use efficiency and access speed of the buffer memory as much as possible. An object is to provide an ECC control method.

上述した目的を達成するために、本発明の情報処理装置は、データおよび当該データを訂正するためのECCを格納するバッファーメモリと、バッファーメモリから転送されるデータおよびECCを取り込んで、データおよびECCを格納するキャッシュメモリと、バッファーメモリからキャッシュメモリにデータおよびECCが転送される場合に、データをECCを用いて訂正するECC処理部と、キャッシュメモリに格納されたデータを利用して処理を行うプロセッサと、を有するECC制御装置を備えることを特徴とする。   In order to achieve the above-described object, an information processing apparatus according to the present invention includes a buffer memory that stores data and an ECC for correcting the data, and takes in the data and ECC transferred from the buffer memory. A cache memory for storing data, an ECC processing unit for correcting data using ECC when data and ECC are transferred from the buffer memory to the cache memory, and processing using data stored in the cache memory And an ECC controller having a processor.

また、本発明のECC制御装置は、データおよび当該データを訂正するためのECCを格納するバッファーメモリと、バッファーメモリから転送されるデータおよびECCを取り込んで、データおよびECCを格納するキャッシュメモリと、バッファーメモリからキャッシュメモリにデータおよびECCが転送される場合に、データをECCを用いて訂正するECC処理部と、キャッシュメモリに格納されたデータを利用して処理を行うプロセッサと、を備えることを特徴とする。   Further, the ECC control device of the present invention includes a buffer memory that stores data and an ECC for correcting the data, a cache memory that stores the data and ECC transferred from the buffer memory, and stores the data and ECC. An ECC processing unit that corrects data using ECC when the data and ECC are transferred from the buffer memory to the cache memory, and a processor that performs processing using the data stored in the cache memory. Features.

また、本発明のECC制御方法は、バッファーメモリ、キャッシュメモリおよびプロセッサとを備える装置におけるECC制御方法であって、バッファーメモリからキャッシュメモリに、データおよび当該データを訂正するためのECCを転送する際に、データをECCを用いて訂正するECC処理ステップと、ECCを用いて訂正されたデータをキャッシュメモリに格納するデータ格納ステップと、を含むECC制御方法である。   The ECC control method according to the present invention is an ECC control method in an apparatus including a buffer memory, a cache memory, and a processor, and transfers data and an ECC for correcting the data from the buffer memory to the cache memory. The ECC control method includes an ECC processing step for correcting data using ECC and a data storage step for storing data corrected using ECC in a cache memory.

本発明によれば、バッファーメモリの使用効率およびアクセス速度を出来るだけ落とさずに、最適なECC制御を行うことが可能な情報処理装置、ECC制御装置およびECC制御方法を提供することができる。   According to the present invention, it is possible to provide an information processing apparatus, an ECC control apparatus, and an ECC control method capable of performing optimum ECC control without reducing the use efficiency and access speed of the buffer memory as much as possible.

以下、添付図面を参照して、本発明の好適な実施形態について詳細に説明する。なお、説明において、同一要素又は同一機能を有する要素には、同一符号を用いることとし、重複する説明は省略する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the description, the same reference numerals are used for the same elements or elements having the same function, and redundant description is omitted.

図1は、本実施形態に係る情報処理装置1を示すブロック図である。情報処理装置1は、情報処理装置1自体を示すホスト3と、データを一時的に格納するバッファーメモリ5と、磁気を利用したディスク状の記憶媒体であるハードディスク7と、ハードディスク7に関する制御を行うハードディスクコントローラ10と、を備えている。なお、情報処理装置1としては、例えば、ハードディスク7を記憶媒体として有するコンピュータ装置や、放送波を受信して得られる音声映像データをハードディスク7に記録する録画再生装置などである。   FIG. 1 is a block diagram showing an information processing apparatus 1 according to this embodiment. The information processing device 1 controls the host 3 indicating the information processing device 1 itself, a buffer memory 5 that temporarily stores data, a hard disk 7 that is a disk-shaped storage medium using magnetism, and the hard disk 7. A hard disk controller 10. The information processing apparatus 1 is, for example, a computer apparatus having the hard disk 7 as a storage medium or a recording / reproducing apparatus for recording audio / video data obtained by receiving broadcast waves on the hard disk 7.

バッファーメモリ5は、ハードディスクコントローラ10により処理されるデータを一時的に格納するために用いられる記憶媒体であり、DRAM(Dynamic Random Access Memory)により構成されている。図2に示されるように、バッファーメモリ5には、ユーザにより利用されるユーザデータ(例えば、ファイルデータや音声映像データなど)を格納するためのユーザデータ領域と、ユーザデータ訂正用のECC(ErrorCorrecting Code:誤り訂正符号)を格納するためのECC領域1と、システムデータ(例えば、ファームウェア制御用のコードおよびデータや、出荷前検査用のヒートランプログラムなど)を格納するためのシステムデータ領域と、システムデータ訂正用のECCを格納するためのECC領域2と、が設けられている。   The buffer memory 5 is a storage medium used for temporarily storing data processed by the hard disk controller 10, and is configured by a DRAM (Dynamic Random Access Memory). As shown in FIG. 2, the buffer memory 5 has a user data area for storing user data (for example, file data and audio / video data) used by the user, and an ECC (Error Correcting) for correcting user data. Code: ECC area 1 for storing error correction system, system data area for storing system data (for example, firmware control code and data, pre-shipment heat run program, etc.), and system An ECC area 2 for storing ECC for data correction is provided.

ここで、バッファーメモリ5は、ユーザデータ領域、ECC領域1、システムデータ領域およびECC領域2の各々の記憶容量を任意に調節可能となっている。例えば、バッファーメモリ5は、ユーザデータを多く格納する必要がある場合には、ユーザデータ領域の記憶容量を増やして、他の領域の記憶容量を減らす。また例えば、バッファーメモリ5は、システムデータを多く格納する必要がある場合には、システムデータ領域の記憶容量を増やして、他の領域の記憶容量を減らす。なお、バッファーメモリ5のECC領域1,2には、8bitの空きbitを挿入することなく、複数のECCを連続して書き込むことができる。   Here, the buffer memory 5 can arbitrarily adjust the storage capacities of the user data area, the ECC area 1, the system data area, and the ECC area 2. For example, when it is necessary to store a lot of user data, the buffer memory 5 increases the storage capacity of the user data area and decreases the storage capacity of other areas. For example, when it is necessary to store a lot of system data, the buffer memory 5 increases the storage capacity of the system data area and decreases the storage capacity of other areas. It should be noted that a plurality of ECCs can be written continuously in the ECC areas 1 and 2 of the buffer memory 5 without inserting an 8-bit empty bit.

ハードディスクコントローラ10は、主要な構成として、ハードディスクコントローラ10を統括的に制御するプロセッサであるCPU(Central Processing Unit)12と、ホスト3とのコマンドやデータなどの受け渡しを制御するホスト制御部14と、バッファーメモリ5とのデータやECCなどの受け渡しを制御するメモリ制御部16と、ハードディスク7に対するデータの書き込みおよび読み出しを制御するディスク制御部18と、を備えている。なお、ハードディスクコントローラ10は、特許請求の範囲におけるECC制御装置に相当する。   The hard disk controller 10 includes, as main components, a CPU (Central Processing Unit) 12 that is a processor that comprehensively controls the hard disk controller 10, a host control unit 14 that controls the exchange of commands and data with the host 3, A memory control unit 16 that controls the exchange of data and ECC with the buffer memory 5 and a disk control unit 18 that controls the writing and reading of data to and from the hard disk 7 are provided. The hard disk controller 10 corresponds to the ECC control device in the claims.

ハードディスクコントローラ10は、CPU12とメモリ制御部16との間に、キャッシュメモリ(SRAM:Static Random Access Memory)20と、ECC処理部28と、を備えている。また、ハードディスクコントローラ10は、ホスト制御部14とメモリ制御部16との間に、別のキャッシュメモリ(SRAM)30と、別のECC処理部38と、を備えている。また、ハードディスクコントローラ10は、ディスク制御部18とメモリ制御部16との間に、さらに別のキャッシュメモリ(SRAM)40と、さらに別のECC処理部48とを備えている。   The hard disk controller 10 includes a cache memory (SRAM: Static Random Access Memory) 20 and an ECC processing unit 28 between the CPU 12 and the memory control unit 16. Further, the hard disk controller 10 includes another cache memory (SRAM) 30 and another ECC processing unit 38 between the host control unit 14 and the memory control unit 16. The hard disk controller 10 further includes another cache memory (SRAM) 40 and another ECC processing unit 48 between the disk control unit 18 and the memory control unit 16.

キャッシュメモリ20は、バッファーメモリ5に格納されたデータやECCなどの一部を一時的に格納するために用いられる記憶媒体であり、SRAM(Static Random Access Memory)により構成されている。キャッシュメモリ20は、ユーザデータおよびシステムデータを格納するためのデータ記憶領域22と、データ記憶領域22に格納されたユーザデータおよびシステムデータを訂正するためのECCを格納するためのECC記憶領域24と、を有する。   The cache memory 20 is a storage medium used for temporarily storing a part of data stored in the buffer memory 5, ECC, and the like, and is configured by an SRAM (Static Random Access Memory). The cache memory 20 includes a data storage area 22 for storing user data and system data, and an ECC storage area 24 for storing ECC for correcting user data and system data stored in the data storage area 22. Have.

キャッシュメモリ20は、バッファーメモリ5に格納されたデータおよびECCのうち、CPU12により頻繁に利用されるデータおよびECCの一部を格納し、格納されたデータおよびECCの一部をCPU12に利用可能に提供する。CPU12は、キャッシュメモリ20のシステムデータを、64bit、32bit、16bit、8ビットなどの可変のデータ単位でリードまたはライトすることが可能である。一方、バッファーメモリ5とキャッシュメモリ20との間では、キャッシュメモリ20の1ラインが256bitであるため、256bitという固定されたデータ単位でデータおよびECCが受け渡しされる。なお、256bitのデータをエラー訂正するためには、少なくとも10bitのECCが必要となる。   The cache memory 20 stores data and a part of ECC frequently used by the CPU 12 among the data and ECC stored in the buffer memory 5, and makes the stored data and a part of the ECC available to the CPU 12. provide. The CPU 12 can read or write the system data in the cache memory 20 in variable data units such as 64 bits, 32 bits, 16 bits, and 8 bits. On the other hand, since one line of the cache memory 20 is 256 bits between the buffer memory 5 and the cache memory 20, data and ECC are transferred in a fixed data unit of 256 bits. In addition, in order to perform error correction on 256-bit data, at least 10-bit ECC is required.

キャッシュメモリ20に格納されたデータがCPU12により書き換えられた場合には、バッファーメモリ5に格納されたデータは最新のデータではなくなるため(ダーティ状態)、バッファーメモリ5に格納されたデータを更新する必要が生じる。よって、適切なタイミングで、キャッシュメモリ20からバッファーメモリ5に最新のデータが転送されて、バッファーメモリ5のデータが更新される。このようなキャッシュメモリ20の機能は、コピーバック機能またはライトバック機能と呼ばれる。   When the data stored in the cache memory 20 is rewritten by the CPU 12, the data stored in the buffer memory 5 is not the latest data (dirty state), so the data stored in the buffer memory 5 needs to be updated. Occurs. Therefore, the latest data is transferred from the cache memory 20 to the buffer memory 5 at an appropriate timing, and the data in the buffer memory 5 is updated. Such a function of the cache memory 20 is called a copy back function or a write back function.

キャッシュメモリ20は、データ記憶領域22に格納されたデータおよびECCのバッファーメモリ5におけるアドレスを指示するポインタを保持しており、このポインタを用いてキャッシュヒットまたはキャッシュミスヒットを判定している。すなわち、キャッシュメモリ20は、CPU12からリード対象のデータのポインタ指定を受けた場合に、そのポインタを保持していればリード対象のデータはキャッシュメモリ20に有るため、リード対象のデータについてキャッシュヒットを判定する。一方、キャッシュメモリ20は、そのポインタを保持していなければリード対象のデータはキャッシュメモリ20に無いため、リード対象のデータについてキャッシュミスヒットを判定する。   The cache memory 20 holds a pointer indicating the data stored in the data storage area 22 and the address of the ECC buffer memory 5, and uses this pointer to determine a cache hit or a cache miss hit. That is, when the cache memory 20 receives a pointer designation of data to be read from the CPU 12, if the pointer is held, the data to be read exists in the cache memory 20, and therefore, the cache memory 20 performs a cache hit on the data to be read. judge. On the other hand, if the cache memory 20 does not hold the pointer, the read target data does not exist in the cache memory 20, and therefore, a cache miss hit is determined for the read target data.

また、キャッシュメモリ20は、リード対象のデータのポインタに基づいて、そのデータに対応するECCのバッファーメモリ5におけるアドレスを指示するポインタに変換するアドレス変換部26を有しており、このアドレス変換部26を利用してキャッシュヒットまたはキャッシュミスヒットを判定している。すなわち、キャッシュメモリ20は、CPU12からリード対象のデータのポインタ指定を受けた場合に、アドレス変換部26によりECCのポインタに変換し、そのECCのポインタを保持していればECCはキャッシュメモリ20に有るため、ECCについてキャッシュヒットを判定する。一方、キャッシュメモリ20は、そのECCのポインタを保持していなければECCはキャッシュメモリ20に無いため、ECCについてキャッシュミスヒットを判定する。なお、アドレス変換部は、データのポインタを変数としてECCのポインタを算出可能なアドレス変換関数を利用するものでもよいし、データのポインタにECCのポインタが対応付けられたアドレス変換テーブルを利用するものでもよい。   Further, the cache memory 20 has an address conversion unit 26 that converts a pointer to the address in the ECC buffer memory 5 corresponding to the data based on the pointer of the data to be read. 26 is used to determine a cache hit or a cache miss hit. That is, when the cache memory 20 receives a pointer designation of data to be read from the CPU 12, the address is converted into an ECC pointer by the address conversion unit 26, and if the ECC pointer is held, the ECC is stored in the cache memory 20. Therefore, a cache hit is determined for the ECC. On the other hand, if the cache memory 20 does not hold the ECC pointer, the ECC does not exist in the cache memory 20, and therefore a cache miss hit is determined for the ECC. The address conversion unit may use an address conversion function that can calculate an ECC pointer using a data pointer as a variable, or use an address conversion table in which an ECC pointer is associated with a data pointer. But you can.

また、キャッシュメモリ20は、バッファーメモリ5から読み出されたデータおよびECCが更新されたか否かを判定する更新判定機能を有している。キャッシュメモリ20に格納されているデータおよびECCが更新されている場合には、バッファーメモリ5のデータおよびECCは最新ではないため、キャッシュメモリ20のデータおよびECCをバッファーメモリ5に転送して、バッファーメモリ5のデータおよびECCを更新する必要がある。なお、キャッシュメモリ20のデータおよびECCが更新されておらず、バッファーメモリ5に格納されたデータおよびECCが最新である状態を、「クリーン(clean)」という。一方、キャッシュメモリ20のデータおよびECCが更新されており、バッファーメモリ5に格納されたデータおよびECCが最新ではない状態を、「ダーティ(dirty)」という。   In addition, the cache memory 20 has an update determination function for determining whether the data read from the buffer memory 5 and the ECC have been updated. When the data and ECC stored in the cache memory 20 are updated, the data and ECC in the buffer memory 5 are not the latest, so the data and ECC in the cache memory 20 are transferred to the buffer memory 5 and the buffer is stored. It is necessary to update the data and ECC of the memory 5. The state in which the data and ECC in the cache memory 20 are not updated and the data and ECC stored in the buffer memory 5 are the latest is referred to as “clean”. On the other hand, the state in which the data and ECC in the cache memory 20 are updated and the data and ECC stored in the buffer memory 5 are not the latest is referred to as “dirty”.

なお、キャッシュメモリ20は、CPU12による書き換え処理が複数回行われた後に、データおよびECCをバッファーメモリ5に転送する。このため、キャッシュメモリ20とバッファーメモリ5との間のデータ転送の冗長性やオーバーヘッドを低減させて、転送効率を向上させることができる。またCPU12による書き換え処理ごとにバッファーメモリ5が受信処理を行うことがないため、バッファーメモリ5に別の処理を行わせることができる。   The cache memory 20 transfers the data and ECC to the buffer memory 5 after the rewriting process by the CPU 12 is performed a plurality of times. For this reason, redundancy and overhead of data transfer between the cache memory 20 and the buffer memory 5 can be reduced, and transfer efficiency can be improved. In addition, since the buffer memory 5 does not perform the reception process every time the CPU 12 performs the rewrite process, the buffer memory 5 can perform another process.

ECC処理部28は、キャッシュメモリ20とバッファーメモリ5との間でデータが転送されるときに、転送されるデータを訂正するためのECCを生成する機能を有する。また、ECC処理部28は、キャッシュメモリ20とバッファーメモリ5との間でデータが転送されるときに、転送されるデータをECCを用いてエラー訂正する機能を有する。   The ECC processing unit 28 has a function of generating an ECC for correcting the transferred data when the data is transferred between the cache memory 20 and the buffer memory 5. The ECC processing unit 28 has a function of performing error correction on the transferred data using the ECC when the data is transferred between the cache memory 20 and the buffer memory 5.

ホスト制御部14とメモリ制御部16との間に設けられたキャッシュメモリ(SRAM)30およびECC処理部38は、上述したキャッシュメモリ20およびECC処理部28と類似する処理を行う。すなわち、ホスト3からバッファーメモリ5にデータが転送されるときには、ECC処理部38は、バッファーメモリ5の不良に対処するために、転送されるデータをエラー訂正するためのECCを生成し、データとともにECCをバッファーメモリ5に格納する。なお、ホスト制御部14とメモリ制御部16との間では、512bitという固定されたデータ単位でデータが転送されており、ECC処理部38は512bitのデータをエラー訂正するために少なくとも13bitのECCを生成する。   A cache memory (SRAM) 30 and an ECC processing unit 38 provided between the host control unit 14 and the memory control unit 16 perform processing similar to the cache memory 20 and the ECC processing unit 28 described above. That is, when data is transferred from the host 3 to the buffer memory 5, the ECC processing unit 38 generates an ECC for error correction of the transferred data in order to deal with a defect in the buffer memory 5, along with the data. The ECC is stored in the buffer memory 5. Note that data is transferred between the host control unit 14 and the memory control unit 16 in a fixed data unit of 512 bits, and the ECC processing unit 38 performs at least 13-bit ECC correction for error correction of 512-bit data. Generate.

一方、バッファーメモリ5からホスト3にデータが転送されるときには、ECC処理部38は、バッファーメモリ5からECCを読み出して、ECCを用いてバッファーメモリ5の不良に起因するエラーを検出し訂正する。なお、キャッシュメモリ30は、少なくとも2セクタ(512bit×2)分の記憶領域をもつ記憶媒体であり、ECC処理部38によるECC生成処理およびエラー訂正処理のための一時的な記憶領域として利用される。   On the other hand, when data is transferred from the buffer memory 5 to the host 3, the ECC processing unit 38 reads the ECC from the buffer memory 5, and detects and corrects an error caused by a defect in the buffer memory 5 using the ECC. The cache memory 30 is a storage medium having a storage area for at least two sectors (512 bits × 2), and is used as a temporary storage area for ECC generation processing and error correction processing by the ECC processing unit 38. .

ディスク制御部18とメモリ制御部16との間に設けられたキャッシュメモリ(SRAM)40およびECC処理部48は、上述したキャッシュメモリ20およびECC処理部28と類似する処理を行う。すなわち、ハードディスク7からバッファーメモリ5にデータが転送されるときには、ECC処理部48は、バッファーメモリ5の不良に対処するために、転送されるデータをエラー訂正するためのECCを生成し、データとともにECCをバッファーメモリ5に格納する。なお、ディスク制御部18とメモリ制御部16との間では、512bitという固定されたデータ単位でデータが転送されており、ECC処理部48は512bitのデータをエラー訂正するために少なくとも13bitのECCを生成する。   A cache memory (SRAM) 40 and an ECC processing unit 48 provided between the disk control unit 18 and the memory control unit 16 perform processing similar to the cache memory 20 and the ECC processing unit 28 described above. That is, when data is transferred from the hard disk 7 to the buffer memory 5, the ECC processing unit 48 generates an ECC for error correction of the transferred data in order to deal with a defect in the buffer memory 5, and together with the data The ECC is stored in the buffer memory 5. Note that data is transferred between the disk control unit 18 and the memory control unit 16 in a fixed data unit of 512 bits, and the ECC processing unit 48 uses at least 13 bits of ECC to correct errors of 512 bits of data. Generate.

一方、バッファーメモリ5からハードディスク7にデータが転送されるときには、ECC処理部48は、バッファーメモリ5からECCを読み出して、ECCを用いてバッファーメモリ5の不良に起因するエラーを検出し訂正する。なお、キャッシュメモリ40は、少なくとも2セクタ(512bit×2)分の記憶領域をもつ記憶媒体であり、ECC処理部48によるECC生成処理およびエラー訂正処理のための一時的な記憶領域として利用される。   On the other hand, when data is transferred from the buffer memory 5 to the hard disk 7, the ECC processing unit 48 reads the ECC from the buffer memory 5, and detects and corrects an error caused by a defect in the buffer memory 5 using the ECC. The cache memory 40 is a storage medium having a storage area for at least two sectors (512 bits × 2), and is used as a temporary storage area for ECC generation processing and error correction processing by the ECC processing unit 48. .

図3は、キャッシュメモリ20のデータ格納状況を場合分けして示す一覧表である。キャッシュメモリ20は、CPU12からデータリードまたはデータライトの要求があった場合に、データのヒット判定を行うとともに、そのデータについてエラー訂正を行うためのECCのヒット判定を行う。また、キャッシュメモリ20は、データおよびECCのヒット判定を行うとともに、キャッシュメモリ20に格納されたデータおよびECCが、バッファーメモリ5に格納されたデータおよびECCと同一(clean)であるか、または相違(dirty)であるかの判定を行う。そして、キャッシュメモリ20は、データ格納状況に応じた処理を行う。   FIG. 3 is a list showing the data storage status of the cache memory 20 for each case. When there is a data read or data write request from the CPU 12, the cache memory 20 performs data hit determination and also performs ECC hit determination for error correction of the data. Further, the cache memory 20 performs hit determination of data and ECC, and the data and ECC stored in the cache memory 20 are the same (clean) as or different from the data and ECC stored in the buffer memory 5. It is determined whether or not (dirty). Then, the cache memory 20 performs processing according to the data storage status.

以降に説明する状況1〜状況7の処理は、CPU12によるデータリード時の処理である。   The processing of situation 1 to situation 7 described below is processing at the time of data read by the CPU 12.

(状況1)
状況1は、CPU12によるデータリードにおいて、キャッシュメモリ20のデータ用記憶領域においてリード対象のデータがヒットし、ECC用記憶領域においてそのデータに対応するECCがヒットした場合である。図4は、状況1におけるハードディスクコントローラ10の処理を示すフローチャートである。状況1では、CPU12は、キャッシュメモリ20に格納されたユーザデータまたはシステムデータを読み出し可能であるため、キャッシュメモリ20からユーザデータまたはシステムデータを読み出す(S401)。
(Situation 1)
Situation 1 is a case where the data to be read hits in the data storage area of the cache memory 20 and the ECC corresponding to the data hits in the ECC storage area in the data read by the CPU 12. FIG. 4 is a flowchart showing the processing of the hard disk controller 10 in the situation 1. In the situation 1, since the CPU 12 can read the user data or system data stored in the cache memory 20, the CPU 12 reads the user data or system data from the cache memory 20 (S401).

(状況2)
状況2は、CPU12によるデータリードにおいて、キャッシュメモリ20のデータ用記憶領域においてリード対象のデータがヒットしたが、ECC用記憶領域においてそのデータに対応するECCがミスヒットした場合である。図4は、状況2におけるハードディスクコントローラ10の処理も示している。状況2では、CPU12は、キャッシュメモリ20に格納されたユーザデータまたはシステムデータを読み出し可能であるため、キャッシュメモリ20からユーザデータまたはシステムデータを読み出す(S401)。
(Situation 2)
Situation 2 is a case in which the data to be read hits in the data storage area of the cache memory 20 in the data read by the CPU 12, but the ECC corresponding to the data hits in the ECC storage area. FIG. 4 also shows processing of the hard disk controller 10 in situation 2. In the situation 2, since the CPU 12 can read the user data or system data stored in the cache memory 20, the CPU 12 reads the user data or system data from the cache memory 20 (S401).

(状況3)
状況3は、CPU12によるデータリードにおいて、キャッシュメモリ20のデータ用記憶領域においてリード対象のデータがミスヒットしたが、ECC用記憶領域においてそのデータに対応するECCがヒットした場合であり、さらに、キャッシュメモリ20においてリプレイス対象のデータがクリーンである場合である。図5は、状況3におけるハードディスクコントローラ10の処理を示すフローチャートである。
バッファーメモリ5からキャッシュメモリ20にリード対象のデータが転送される(S501)。このデータ転送の際に、ECC処理部28は、キャッシュ内のECCを用いて、転送されるデータのエラーを検出し訂正する(S502)。CPU12は、キャッシュメモリ20からリード対象のユーザデータまたはシステムデータを読み出す(S502)。
(Situation 3)
Situation 3 is a case where, in the data read by the CPU 12, the data to be read has been miss-hit in the data storage area of the cache memory 20, but the ECC corresponding to the data has been hit in the ECC storage area. This is a case where the data to be replaced in the memory 20 is clean. FIG. 5 is a flowchart showing the processing of the hard disk controller 10 in the situation 3.
Data to be read is transferred from the buffer memory 5 to the cache memory 20 (S501). During this data transfer, the ECC processing unit 28 detects and corrects an error in the transferred data using the ECC in the cache (S502). The CPU 12 reads user data or system data to be read from the cache memory 20 (S502).

(状況4)
状況4は、CPU12によるデータリードにおいて、キャッシュメモリ20のデータ用記憶領域においてリード対象のデータがミスヒットしたが、ECC用記憶領域においてそのデータに対応するECCがヒットした場合であり、さらに、キャッシュメモリ20においてリプレイス対象のデータがダーティである場合である。図6は、状況4におけるハードディスクコントローラ10の処理を示すフローチャートである。
キャッシュメモリ20からバッファーメモリ5にリプレイス対象のデータが転送される(S601)。ECC処理部28は、転送されるデータをエラー訂正するためのECCを生成し、生成されたECCをキャッシュメモリ20に書き込む(S602)。バッファーメモリ5からキャッシュメモリ20にリード対象のデータが転送される(S603)。ECC処理部28は、キャッシュメモリ20のECCを用いて、転送されるデータのエラーを検出し訂正する(S604)。CPU12は、キャッシュメモリ20からリード対象のユーザデータまたはシステムデータを読み出す(S605)。
(Situation 4)
Situation 4 is a case where, in the data read by the CPU 12, the data to be read has been mis-hit in the data storage area of the cache memory 20, but the ECC corresponding to the data has been hit in the ECC storage area. This is a case where the data to be replaced in the memory 20 is dirty. FIG. 6 is a flowchart showing the processing of the hard disk controller 10 in the situation 4.
Data to be replaced is transferred from the cache memory 20 to the buffer memory 5 (S601). The ECC processing unit 28 generates an ECC for error correction of the transferred data, and writes the generated ECC in the cache memory 20 (S602). Data to be read is transferred from the buffer memory 5 to the cache memory 20 (S603). The ECC processing unit 28 detects and corrects an error in the transferred data using the ECC of the cache memory 20 (S604). The CPU 12 reads user data or system data to be read from the cache memory 20 (S605).

(状況5)
状況5は、CPU12によるデータリードにおいて、キャッシュメモリ20のデータ用記憶領域においてリード対象のデータがミスヒットし、ECC用記憶領域においてそのデータに対応するECCがミスヒットした場合であり、さらに、キャッシュメモリ20においてリプレイス対象のデータおよびECCがクリーンである場合である。図7は、状況5におけるハードディスクコントローラ10の処理を示すフローチャートである。
バッファーメモリ5からキャッシュメモリ20にリード対象のデータおよびそのECCを転送する(S701)。ECC処理部28は、転送されるECCを用いて、転送されるデータのエラーを検出し訂正する(S702)。CPU12は、キャッシュメモリ20からリード対象のユーザデータまたはシステムデータを読み出す(S703)。
(Situation 5)
Situation 5 is a case where, in the data read by the CPU 12, the read target data has a miss in the data storage area of the cache memory 20, and the ECC corresponding to that data has a miss in the ECC storage area. This is a case where the data and ECC to be replaced in the memory 20 are clean. FIG. 7 is a flowchart showing the processing of the hard disk controller 10 in the situation 5.
Data to be read and its ECC are transferred from the buffer memory 5 to the cache memory 20 (S701). The ECC processing unit 28 detects and corrects an error in the transferred data using the transferred ECC (S702). The CPU 12 reads user data or system data to be read from the cache memory 20 (S703).

(状況6)
状況6は、CPU12によるデータリードにおいて、キャッシュメモリ20のデータ用記憶領域においてリード対象のデータがミスヒットし、ECC用記憶領域においてそのデータに対応するECCがミスヒットした場合であり、さらに、キャッシュメモリ20においてリプレイス対象のデータがクリーンであり、ECCがダーティである場合である。図8は、状況6におけるハードディスクコントローラ10の処理を示すフローチャートである。
キャッシュメモリ20からバッファーメモリ5にリプレイス対象のECCが転送される(S801)。バッファーメモリ5からキャッシュメモリ20にリード対象のデータおよびそのECCが転送される(S802)。ECC処理部28は、転送されるECCを用いて、転送されるデータのエラーを検出し訂正する(S803)。CPU12は、キャッシュメモリ20からリード対象のユーザデータまたはシステムデータを読み出す(S804)。
(Situation 6)
Situation 6 is a case where, in the data read by the CPU 12, the read target data is mis-hit in the data storage area of the cache memory 20, and the ECC corresponding to the data is miss-hit in the ECC storage area. This is a case where the data to be replaced in the memory 20 is clean and the ECC is dirty. FIG. 8 is a flowchart showing the processing of the hard disk controller 10 in the situation 6.
The ECC to be replaced is transferred from the cache memory 20 to the buffer memory 5 (S801). Data to be read and its ECC are transferred from the buffer memory 5 to the cache memory 20 (S802). The ECC processing unit 28 detects and corrects an error in the transferred data using the transferred ECC (S803). The CPU 12 reads user data or system data to be read from the cache memory 20 (S804).

(状況7)
状況7は、CPU12によるデータリードにおいて、キャッシュメモリ20のデータ用記憶領域においてリード対象のデータがミスヒットし、ECC用記憶領域においてそのデータに対応するECCがミスヒットした場合であり、さらに、キャッシュメモリ20においてリプレイス対象のデータがダーティである場合である。図9は、状況7におけるハードディスクコントローラ10の処理を示すフローチャートである。
キャッシュメモリ20からバッファーメモリ5にリプレイス対象のデータが転送される(S901)。ECC処理部28は、転送されるデータをエラー訂正するためのECCを生成し、バッファーメモリ5に転送する(S902)。バッファーメモリ5からキャッシュメモリ20にリード対象のデータおよびそのECCが転送される(S903)。ECC処理部28は、転送されるECCを用いて、転送されるデータのエラーを検出し訂正する(S904)。CPU12は、キャッシュメモリ20からリード対象のユーザデータまたはシステムデータを読み出す(S905)。
(Situation 7)
Situation 7 is a case where, in the data read by the CPU 12, the read target data has a miss in the data storage area of the cache memory 20, and the ECC corresponding to that data has a miss in the ECC storage area. This is a case where the data to be replaced in the memory 20 is dirty. FIG. 9 is a flowchart showing the processing of the hard disk controller 10 in the situation 7.
The data to be replaced is transferred from the cache memory 20 to the buffer memory 5 (S901). The ECC processing unit 28 generates an ECC for error correction of the transferred data and transfers it to the buffer memory 5 (S902). Data to be read and its ECC are transferred from the buffer memory 5 to the cache memory 20 (S903). The ECC processing unit 28 detects and corrects an error in the transferred data using the transferred ECC (S904). The CPU 12 reads user data or system data to be read from the cache memory 20 (S905).

以降に説明する状況8〜状況14の処理は、CPU12によるデータライト時の処理である。   The processing of situation 8 to situation 14 described below is processing at the time of data writing by the CPU 12.

(状況8)
状況8は、CPU12によるデータライトにおいて、キャッシュメモリ20のデータ用記憶領域においてライト対象のデータがヒットし、ECC用記憶領域においてそのデータに対応するECCがヒットした場合である。図10は、状況8におけるハードディスクコントローラ10の処理を示すフローチャートである。状況8では、CPU12は、ライトデータをキャッシュに書き込む(S1001)。
(Situation 8)
Situation 8 is a case where the data to be written hits in the data storage area of the cache memory 20 and the ECC corresponding to the data hits in the ECC storage area in the data write by the CPU 12. FIG. 10 is a flowchart showing the processing of the hard disk controller 10 in the situation 8. In situation 8, the CPU 12 writes the write data to the cache (S1001).

(状況9)
状況9は、CPU12によるデータライトにおいて、キャッシュメモリ20のデータ用記憶領域においてライト対象のデータがヒットしたが、ECC用記憶領域においてそのデータに対応するECCがミスヒットした場合である。図10は、状況9におけるハードディスクコントローラ10の処理も示している。状況9では、CPU12は、ライトデータをキャッシュに書き込む(S1001)。
(Situation 9)
Situation 9 is a case in which the data to be written hits in the data storage area of the cache memory 20 in the data write by the CPU 12, but the ECC corresponding to the data hits in the ECC storage area. FIG. 10 also shows processing of the hard disk controller 10 in the situation 9. In situation 9, the CPU 12 writes the write data to the cache (S1001).

(状況10)
状況10は、CPU12によるデータライトにおいて、キャッシュメモリ20のデータ用記憶領域においてライト対象のデータがミスヒットしたが、ECC用記憶領域においてそのデータに対応するECCがヒットした場合であり、さらに、キャッシュメモリ20においてリプレイス対象のデータがクリーンである場合である。図11は、状況10におけるハードディスクコントローラ10の処理を示すフローチャートである。
バッファーメモリ5からキャッシュメモリ20にライト対象のデータが転送される(S1101)。ECC処理部28は、キャッシュメモリのECCを用いて、転送されるデータのエラーを検出し訂正する(S1102)。CPU12からのライトデータがキャッシュに書き込まれる(S1103)。
(Situation 10)
Situation 10 is a case where, during data write by the CPU 12, the write target data has a miss-hit in the data storage area of the cache memory 20, but the ECC corresponding to that data has hit in the ECC storage area. This is a case where the data to be replaced in the memory 20 is clean. FIG. 11 is a flowchart showing processing of the hard disk controller 10 in the situation 10.
Data to be written is transferred from the buffer memory 5 to the cache memory 20 (S1101). The ECC processing unit 28 detects and corrects an error in the transferred data using the ECC of the cache memory (S1102). Write data from the CPU 12 is written into the cache (S1103).

(状況11)
状況11は、CPU12によるデータライトにおいて、キャッシュメモリ20のデータ用記憶領域においてライト対象のデータがミスヒットしたが、ECC用記憶領域においてそのデータに対応するECCがヒットした場合であり、さらに、キャッシュメモリ20においてリプレイス対象のデータがダーティである場合である。図12は、状況11におけるハードディスクコントローラ10の処理を示すフローチャートである。
キャッシュメモリ20からバッファーメモリ5にリプレイス対象のデータが転送される(S1201)。ECC処理部28は、転送されるデータをエラー訂正するためのECCを生成し、キャッシュメモリ20に書き込む(S1202)。バッファーメモリ5からキャッシュメモリ20にライト対象のデータが転送される(S1203)。ECC処理部28は、キャッシュメモリ20のECCを用いて、転送されるデータのエラーを検出し訂正する(S1204)。CPU12からのライトデータがキャッシュに書き込まれる(S1205)。
(Situation 11)
Situation 11 is a case where, during data write by the CPU 12, the write target data has a miss-hit in the data storage area of the cache memory 20, but the ECC corresponding to that data has hit in the ECC storage area. This is a case where the data to be replaced in the memory 20 is dirty. FIG. 12 is a flowchart showing the processing of the hard disk controller 10 in the situation 11.
Data to be replaced is transferred from the cache memory 20 to the buffer memory 5 (S1201). The ECC processing unit 28 generates an ECC for error correction of the transferred data and writes it in the cache memory 20 (S1202). Data to be written is transferred from the buffer memory 5 to the cache memory 20 (S1203). The ECC processing unit 28 detects and corrects an error in the transferred data using the ECC of the cache memory 20 (S1204). Write data from the CPU 12 is written into the cache (S1205).

(状況12)
状況12は、CPU12によるデータライトにおいて、キャッシュメモリ20のデータ用記憶領域においてライト対象のデータがミスヒットし、ECC用記憶領域においてそのデータに対応するECCがミスヒットした場合であり、さらに、キャッシュメモリ20においてリプレイス対象のデータがクリーンであり、そのデータに対応するECCがクリーンである場合である。図13は、状況12におけるハードディスクコントローラ10の処理を示すフローチャートである。
バッファーメモリ5からキャッシュメモリ20にライト対象のデータおよびそのECCが転送される(S1301)。ECC処理部28は、転送されるECCを用いて、転送されるデータのエラーを検出し訂正する(S1302)。CPU12からのライトデータがキャッシュに書き込まれる(S1303)。
(Situation 12)
Situation 12 is a case where, during data write by the CPU 12, the write target data has a mishit in the data storage area of the cache memory 20, and the ECC corresponding to the data has a mishit in the ECC storage area. This is a case where the data to be replaced in the memory 20 is clean and the ECC corresponding to the data is clean. FIG. 13 is a flowchart showing the processing of the hard disk controller 10 in the situation 12.
Data to be written and its ECC are transferred from the buffer memory 5 to the cache memory 20 (S1301). The ECC processing unit 28 detects and corrects an error in the transferred data using the transferred ECC (S1302). Write data from the CPU 12 is written to the cache (S1303).

(状況13)
状況13は、CPU12によるデータライトにおいて、キャッシュメモリ20のデータ用記憶領域においてライト対象のデータがミスヒットし、ECC用記憶領域においてそのデータに対応するECCがミスヒットした場合であり、さらに、キャッシュメモリ20においてリプレイス対象のデータがクリーンであり、そのデータに対応するECCがダーティである場合である。図14は、状況13におけるハードディスクコントローラ10の処理を示すフローチャートである。
キャッシュメモリ20からバッファーメモリ5にリプレイス対象のECCが転送される(S1401)。バッファーメモリ5からキャッシュメモリ20にライト対象のデータおよびそのECCが転送される(S1402)。ECC処理部28は、転送されるECCを用いて、転送されるデータのエラーを検出し訂正する(S1403)。CPU12からのライトデータがキャッシュに書き込まれる(S1404)。
(Situation 13)
Situation 13 is a case where, during data write by the CPU 12, the write target data has a miss in the data storage area of the cache memory 20, and the ECC corresponding to that data has a miss in the ECC storage area. This is a case where the data to be replaced in the memory 20 is clean and the ECC corresponding to the data is dirty. FIG. 14 is a flowchart showing the processing of the hard disk controller 10 in the situation 13.
The ECC to be replaced is transferred from the cache memory 20 to the buffer memory 5 (S1401). Data to be written and its ECC are transferred from the buffer memory 5 to the cache memory 20 (S1402). The ECC processing unit 28 detects and corrects an error in the transferred data using the transferred ECC (S1403). Write data from the CPU 12 is written into the cache (S1404).

(状況14)
状況14は、CPU12によるデータライトにおいて、キャッシュメモリ20のデータ用記憶領域においてライト対象のデータがミスヒットし、ECC用記憶領域においてそのデータに対応するECCがミスヒットした場合であり、さらに、キャッシュメモリ20においてリプレイス対象のデータがダーティである場合である。図15は、状況14におけるハードディスクコントローラ10の処理を示すフローチャートである。
キャッシュメモリ20からバッファーメモリ5にリプレイス対象のデータが転送される(S1501)。ECC処理部28は、転送されるデータをエラー訂正するためのECCを生成し、バッファーメモリ5に転送する(S1502)。バッファーメモリ5からキャッシュメモリ20にライト対象のデータおよびそのECCが転送される(S1503)。ECC処理部28は、転送されるECCを用いて、転送されるデータのエラーを検出し訂正する(S1504)。CPU12からのライトデータがキャッシュに書き込まれる(S1505)。
(Situation 14)
The situation 14 is a case where, during data write by the CPU 12, the write target data has a miss in the data storage area of the cache memory 20, and the ECC corresponding to that data has a miss in the ECC storage area. This is a case where the data to be replaced in the memory 20 is dirty. FIG. 15 is a flowchart showing the processing of the hard disk controller 10 in the situation 14.
Data to be replaced is transferred from the cache memory 20 to the buffer memory 5 (S1501). The ECC processing unit 28 generates an ECC for error correction of the transferred data and transfers it to the buffer memory 5 (S1502). Data to be written and its ECC are transferred from the buffer memory 5 to the cache memory 20 (S1503). The ECC processing unit 28 detects and corrects an error in the transferred data using the transferred ECC (S1504). Write data from the CPU 12 is written into the cache (S1505).

本実施形態のハードディスクコントローラ10によれば、バッファーメモリ5に書き込まれるユーザデータおよびシステムデータをエラー訂正するためにECCを生成するため、バッファーメモリ5に書き込まれたユーザデータおよびシステムデータのビットエラーをECCを用いて検出し訂正することができる。よって、バッファーメモリ5に不良メモリセルが存在しても、ECCを用いたエラー訂正処理によりバッファーメモリ5の不良を補償することで、バッファーメモリ5の不良メモリセルを原因とするハードディスクコントローラ10の不良率を抑制することができる。   According to the hard disk controller 10 of the present embodiment, an ECC is generated in order to correct the user data and system data written in the buffer memory 5, so that bit errors in the user data and system data written in the buffer memory 5 are detected. It can be detected and corrected using ECC. Therefore, even if a defective memory cell exists in the buffer memory 5, the defect of the hard disk controller 10 caused by the defective memory cell of the buffer memory 5 is compensated by correcting the defect of the buffer memory 5 by error correction processing using ECC. The rate can be suppressed.

また、本実施形態のハードディスクコントローラ10によれば、キャッシュメモリ20およびECC処理部28が設けられているため、バッファーメモリ5の使用効率およびアクセス速度を出来るだけ落とさずに、最適なECC制御を行うことができる。すなわち、バッファーメモリ5とキャッシュメモリ20との間で、256bitという固定されたデータ単位でデータが送受信されるため、256bitのデータに対応してECCを10bitという小容量で済ませることができる。よって、バッファーメモリ5の使用可能領域(ECCを除く記憶領域)を増加させることができる。一方、CPU12は、キャッシュメモリ20のシステムデータを、64bit、32bit、16bit、8ビットなどの可変のデータ単位でリードまたはライトすることが可能であるため、CPU12は必要なデータだけをリードまたはライトすることができ、CPU12からのアクセス速度を向上することができる。   Further, according to the hard disk controller 10 of the present embodiment, since the cache memory 20 and the ECC processing unit 28 are provided, optimal ECC control is performed without reducing the usage efficiency and access speed of the buffer memory 5 as much as possible. be able to. That is, since data is transmitted and received between the buffer memory 5 and the cache memory 20 in a fixed data unit of 256 bits, the ECC can be completed with a small capacity of 10 bits corresponding to 256 bits of data. Therefore, the usable area (storage area excluding ECC) of the buffer memory 5 can be increased. On the other hand, the CPU 12 can read or write the system data of the cache memory 20 in variable data units such as 64 bits, 32 bits, 16 bits, and 8 bits, so the CPU 12 reads or writes only necessary data. The access speed from the CPU 12 can be improved.

また、本実施形態では、バッファーメモリ5からキャッシュメモリ20にデータが転送されるので、CPU12はデータリードおよびデータライトのためにキャッシュメモリ20にアクセスする。よって、バッファーメモリ5とキャッシュメモリ20との間でデータ転送が行われない場合には、バッファーメモリ5は他の処理を行うことができる。   In the present embodiment, since data is transferred from the buffer memory 5 to the cache memory 20, the CPU 12 accesses the cache memory 20 for data reading and data writing. Therefore, when data transfer is not performed between the buffer memory 5 and the cache memory 20, the buffer memory 5 can perform other processes.

また、ホスト3とバッファーメモリ5との間のデータ転送、および、ディスク制御部18とバッファーメモリ5との間のデータ転送についても、上述したハードディスク7とバッファーメモリ5との間のデータ送受と同じことが言える。すなわち、バッファーメモリ5に不良メモリセルが存在しても、ユーザデータおよびシステムデータのエラー訂正をすることにより、バッファーメモリ5の不良メモリセルを原因とするハードディスクコントローラ10の不良率を抑制することができる。そして、バッファーメモリ5の使用可能領域を増加させることができる。   The data transfer between the host 3 and the buffer memory 5 and the data transfer between the disk controller 18 and the buffer memory 5 are the same as the data transmission / reception between the hard disk 7 and the buffer memory 5 described above. I can say that. That is, even if a defective memory cell exists in the buffer memory 5, the error rate of the hard disk controller 10 caused by the defective memory cell of the buffer memory 5 can be suppressed by correcting the error of the user data and the system data. it can. Then, the usable area of the buffer memory 5 can be increased.

本実施形態に係る情報処理装置を示すブロック図である。It is a block diagram which shows the information processing apparatus which concerns on this embodiment. バッファーメモリのデータ構成を示す図である。It is a figure which shows the data structure of a buffer memory. キャッシュメモリのデータ格納状況を場合分けして示す一覧表である。It is a list which shows the data storage situation of cache memory classified according to a case. CPUのリード時の処理を示す第1のフローチャートである。It is a 1st flowchart which shows the process at the time of reading of CPU. CPUのリード時の処理を示す第2のフローチャートである。It is a 2nd flowchart which shows the process at the time of reading of CPU. CPUのリード時の処理を示す第3のフローチャートである。It is a 3rd flowchart which shows the process at the time of reading of CPU. CPUのリード時の処理を示す第4のフローチャートである。It is a 4th flowchart which shows the process at the time of reading of CPU. CPUのリード時の処理を示す第5のフローチャートである。It is a 5th flowchart which shows the process at the time of reading of CPU. CPUのリード時の処理を示す第6のフローチャートである。It is a 6th flowchart which shows the process at the time of reading of CPU. CPUのライト時の処理を示す第1のフローチャートである。It is a 1st flowchart which shows the process at the time of writing of CPU. CPUのライト時の処理を示す第2のフローチャートである。It is a 2nd flowchart which shows the process at the time of writing of CPU. CPUのライト時の処理を示す第3のフローチャートである。It is a 3rd flowchart which shows the process at the time of writing of CPU. CPUのライト時の処理を示す第4のフローチャートである。It is a 4th flowchart which shows the process at the time of writing of CPU. CPUのライト時の処理を示す第5のフローチャートである。It is a 5th flowchart which shows the process at the time of writing of CPU. CPUのライト時の処理を示す第6のフローチャートである。It is a 6th flowchart which shows the process at the time of writing of CPU.

符号の説明Explanation of symbols

1…情報処理装置、3…ホスト、5…バッファーメモリ、7…ハードディスク、10…ハードディスクコントローラ、12…CPU、14…ホスト制御部、16…メモリ制御部、18…ディスク制御部、20…キャッシュメモリ、26…アドレス変換部、28…ECC処理部、30…キャッシュメモリ、38…ECC処理部、40…キャッシュメモリ、48…ECC処理部。   DESCRIPTION OF SYMBOLS 1 ... Information processing apparatus, 3 ... Host, 5 ... Buffer memory, 7 ... Hard disk, 10 ... Hard disk controller, 12 ... CPU, 14 ... Host control part, 16 ... Memory control part, 18 ... Disk control part, 20 ... Cache memory , 26 ... address conversion unit, 28 ... ECC processing unit, 30 ... cache memory, 38 ... ECC processing unit, 40 ... cache memory, 48 ... ECC processing unit.

Claims (11)

データおよび当該データを訂正するためのECCを格納するバッファーメモリと、
前記バッファーメモリから転送される前記データおよび前記ECCを取り込んで、前記データおよび前記ECCを格納するキャッシュメモリと、
前記バッファーメモリから前記キャッシュメモリに前記データおよび前記ECCが転送される場合に、前記データを前記ECCを用いて訂正するECC処理部と、
前記キャッシュメモリに格納されたデータを利用して処理を行うプロセッサと、
を有するECC制御装置を備えることを特徴とする情報処理装置。
A buffer memory for storing data and ECC for correcting the data;
A cache memory that takes in the data and the ECC transferred from the buffer memory and stores the data and the ECC;
An ECC processing unit that corrects the data using the ECC when the data and the ECC are transferred from the buffer memory to the cache memory;
A processor that performs processing using data stored in the cache memory;
An information processing apparatus comprising an ECC control apparatus having
前記ECC処理部は、前記キャッシュメモリから前記バッファーメモリに前記データが転送される場合に、前記データを訂正するためのECCを生成することを特徴とする請求項1に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the ECC processing unit generates an ECC for correcting the data when the data is transferred from the cache memory to the buffer memory. 前記バッファーメモリと前記キャッシュメモリとの間のデータ転送は、固定されたデータ単位で行われ、
前記キャッシュメモリと前記プロセッサとの間のデータ転送は、可変するデータ単位で行われることを特徴とする請求項1に記載の情報処理装置。
Data transfer between the buffer memory and the cache memory is performed in fixed data units,
The information processing apparatus according to claim 1, wherein data transfer between the cache memory and the processor is performed in variable data units.
前記キャッシュメモリは、データのヒット判定を行うと共に、当該データに対応するECCのヒット判定を行う機能を有することを特徴とする請求項1に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the cache memory has a function of determining hit of a data and determining hit of an ECC corresponding to the data. 前記キャッシュメモリは、データのアドレス情報を、当該データに対応するECCのアドレス情報に変換するアドレス変換部を有することを特徴とする請求項4に記載の情報処理装置。   The information processing apparatus according to claim 4, wherein the cache memory includes an address conversion unit that converts address information of data into ECC address information corresponding to the data. 前記キャッシュメモリは、当該キャッシュメモリに格納された前記データまたは前記ECCが、前記バッファーメモリに格納された前記データまたは前記ECCと同一であるか否かを判定する機能を有することを特徴とする請求項1に記載の情報処理装置。   The cache memory has a function of determining whether the data or the ECC stored in the cache memory is the same as the data or the ECC stored in the buffer memory. Item 4. The information processing apparatus according to Item 1. 前記ECC制御装置は、外部から前記バッファーメモリにデータが転送される場合に、転送される当該データを訂正するためのECCを生成し、生成されたECCを前記バッファーメモリに転送する第2のECC処理部を備えることを特徴とする請求項1に記載の情報処理装置。   When the data is transferred from the outside to the buffer memory, the ECC control device generates an ECC for correcting the transferred data, and transfers the generated ECC to the buffer memory. The information processing apparatus according to claim 1, further comprising a processing unit. 前記第2のECC処理部は、前記バッファーメモリから外部にデータが転送される場合に、転送される当該データを前記ECCを用いて訂正することを特徴とする請求項7に記載の情報処理装置。   8. The information processing apparatus according to claim 7, wherein when the data is transferred from the buffer memory to the outside, the second ECC processing unit corrects the transferred data using the ECC. . 前記ECC制御装置は、ハードディスクコントローラであることを特徴とする請求項1に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the ECC control apparatus is a hard disk controller. データおよび当該データを訂正するためのECCを格納するバッファーメモリと、
前記バッファーメモリから転送される前記データおよび前記ECCを取り込んで、前記データおよび前記ECCを格納するキャッシュメモリと、
前記バッファーメモリから前記キャッシュメモリに前記データおよび前記ECCが転送される場合に、前記データを前記ECCを用いて訂正するECC処理部と、
前記キャッシュメモリに格納されたデータを利用して処理を行うプロセッサと、
を備えることを特徴とするECC制御装置。
A buffer memory for storing data and ECC for correcting the data;
A cache memory that takes in the data and the ECC transferred from the buffer memory and stores the data and the ECC;
An ECC processing unit that corrects the data using the ECC when the data and the ECC are transferred from the buffer memory to the cache memory;
A processor that performs processing using data stored in the cache memory;
An ECC control device comprising:
バッファーメモリ、キャッシュメモリおよびプロセッサを備える装置におけるECC制御方法であって、
前記バッファーメモリから前記キャッシュメモリに、データおよび当該データを訂正するためのECCを転送する際に、前記データを前記ECCを用いて訂正するECC処理ステップと、
前記ECCを用いて訂正された前記データを前記キャッシュメモリに格納するデータ格納ステップと、
を含むECC制御方法。
An ECC control method in an apparatus including a buffer memory, a cache memory, and a processor,
An ECC processing step of correcting the data using the ECC when transferring the data and ECC for correcting the data from the buffer memory to the cache memory;
A data storing step of storing the data corrected using the ECC in the cache memory;
ECC control method including:
JP2006346292A 2006-12-22 2006-12-22 Information processing apparatus, ECC control apparatus, and ECC control method Pending JP2008158779A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006346292A JP2008158779A (en) 2006-12-22 2006-12-22 Information processing apparatus, ECC control apparatus, and ECC control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006346292A JP2008158779A (en) 2006-12-22 2006-12-22 Information processing apparatus, ECC control apparatus, and ECC control method

Publications (1)

Publication Number Publication Date
JP2008158779A true JP2008158779A (en) 2008-07-10

Family

ID=39659619

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006346292A Pending JP2008158779A (en) 2006-12-22 2006-12-22 Information processing apparatus, ECC control apparatus, and ECC control method

Country Status (1)

Country Link
JP (1) JP2008158779A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013092854A (en) * 2011-10-25 2013-05-16 Sony Corp Storage control apparatus, storage apparatus, information processing system, and storage control method
US9136872B2 (en) 2012-01-30 2015-09-15 Samsung Electronics Co., Ltd. Memory, memory system, and error checking and correcting method for memory
US9141485B2 (en) 2012-08-02 2015-09-22 Fujitsu Limited Storage device, control device and data protection method
CN109726147A (en) * 2017-10-30 2019-05-07 三星电子株式会社 The device and method with built-in storage are accessed using data protection

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013092854A (en) * 2011-10-25 2013-05-16 Sony Corp Storage control apparatus, storage apparatus, information processing system, and storage control method
US9136872B2 (en) 2012-01-30 2015-09-15 Samsung Electronics Co., Ltd. Memory, memory system, and error checking and correcting method for memory
US9141485B2 (en) 2012-08-02 2015-09-22 Fujitsu Limited Storage device, control device and data protection method
CN109726147A (en) * 2017-10-30 2019-05-07 三星电子株式会社 The device and method with built-in storage are accessed using data protection
JP2019083005A (en) * 2017-10-30 2019-05-30 三星電子株式会社Samsung Electronics Co.,Ltd. Computing device, processor, and operation method
JP7430482B2 (en) 2017-10-30 2024-02-13 三星電子株式会社 How the light works
CN109726147B (en) * 2017-10-30 2024-06-18 三星电子株式会社 Device and method for accessing in-band storage using data protection

Similar Documents

Publication Publication Date Title
US7917803B2 (en) Data conflict resolution for solid-state memory devices
JP5535128B2 (en) Memory system
US7549021B2 (en) Enhanced data integrity using parallel volatile and non-volatile transfer buffers
TWI590049B (en) Memory device and operating method of same
US9251057B2 (en) Nonvolatile cache memory, processing method of nonvolatile cache memory, and computer system
JP4116740B2 (en) Information recording medium, information recording method, information recording apparatus, and information reproducing apparatus
JP2011040051A5 (en)
US20080177938A1 (en) Hybrid hard disk drive, computer system including the same, and flash memory DMA circuit for hybrid HDD
TWI406127B (en) How to update user data
JP2000322838A (en) Information playback device
US9015445B2 (en) Method and system for manipulating data
JP6540363B2 (en) Storage control device, storage control method, and storage control program
JP2010237739A (en) Cache control device, information processing device, and cache control program
US10635356B2 (en) Data management method and storage controller using the same
US9785438B1 (en) Media cache cleaning based on workload
US10152244B2 (en) Programmable memory command sequencer
JP2019023936A (en) Memory device and memory system
US8892832B2 (en) Storage apparatus, storage management method, and storage medium storing storage management program
JP2013196318A (en) Storage control apparatus, storage system and storage control method
JP2008158779A (en) Information processing apparatus, ECC control apparatus, and ECC control method
JP6225731B2 (en) Storage control device, storage system, and storage control method
JPWO2013038618A1 (en) Information storage medium library array apparatus, information recording method, and information recording program
WO2017012391A1 (en) Method and apparatus for achieving raid level conversion
JP2000322837A (en) Information recording medium, information recording method, information recording device, and information reproducing device
JP4369523B2 (en) Degeneration control device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080806

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20080718