Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5344634B2 - Semiconductor memory device and control method thereof - Google Patents
[go: Go Back, main page]

JP5344634B2 - Semiconductor memory device and control method thereof - Google Patents

Semiconductor memory device and control method thereof Download PDF

Info

Publication number
JP5344634B2
JP5344634B2 JP2010278836A JP2010278836A JP5344634B2 JP 5344634 B2 JP5344634 B2 JP 5344634B2 JP 2010278836 A JP2010278836 A JP 2010278836A JP 2010278836 A JP2010278836 A JP 2010278836A JP 5344634 B2 JP5344634 B2 JP 5344634B2
Authority
JP
Japan
Prior art keywords
data
address
memory cell
output
holding means
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
JP2010278836A
Other languages
Japanese (ja)
Other versions
JP2012128902A (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 Computertechno Ltd
Original Assignee
NEC Computertechno Ltd
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 Computertechno Ltd filed Critical NEC Computertechno Ltd
Priority to JP2010278836A priority Critical patent/JP5344634B2/en
Publication of JP2012128902A publication Critical patent/JP2012128902A/en
Application granted granted Critical
Publication of JP5344634B2 publication Critical patent/JP5344634B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Static Random-Access Memory (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a semiconductor memory device capable of improving reliability of data without spoiling program processing performance. <P>SOLUTION: A semiconductor memory device of the invention comprises: a memory cell 2 for executing a data reading/writing operation in accordance with an address; detection means 15 for detecting that the same address has been used for reading in two or more cycles in the memory cell 2; error correction means 3 for correcting an error of data read from the memory cell 2; and data holding means 6 for holding the data having been corrected in error. The memory cell 2 writes, in accordance with a detection result obtained by the detection means 15, data held by the data holding means 6 correspondingly to the address. The data holding means 6 outputs the data held therein as read data corresponding to the address. <P>COPYRIGHT: (C)2012,JPO&amp;INPIT

Description

本発明は半導体記憶装置およびその制御方法に関し、特に誤り訂正回路を含む半導体記憶装置およびその制御方法に関する。   The present invention relates to a semiconductor memory device and a control method thereof, and more particularly to a semiconductor memory device including an error correction circuit and a control method thereof.

一般的に、DRAM(Dynamic Random Access Memory)等の半導体メモリを含む回路では、α線や中性子線が原因で発生するソフトエラーの影響を受ける。このソフトエラーの影響を少なくするために、1ビットエラー訂正、2ビットエラー検出の機能を有するECC(Error Checking & Correction)回路が設けられている。さらに、メモリからデータを読み出す際に1ビットエラーが発生するとECC回路によりそのデータを訂正し、その訂正後のデータを同じアドレスに書き込む動作(再書き込み動作)を行うことにより、メモリから読み出されるデータの信頼性を高めることができる。このような再書き込み動作はパトロール方式とも呼ばれ、特許文献1乃至3にその技術が開示されている。   In general, a circuit including a semiconductor memory such as a DRAM (Dynamic Random Access Memory) is affected by a soft error caused by α rays or neutron rays. In order to reduce the influence of this soft error, an ECC (Error Checking & Correction) circuit having a function of 1-bit error correction and 2-bit error detection is provided. Further, when a 1-bit error occurs when reading data from the memory, the data is read from the memory by correcting the data by the ECC circuit and writing the corrected data to the same address (rewrite operation). Can improve the reliability. Such a rewriting operation is also called a patrol method, and the techniques are disclosed in Patent Documents 1 to 3.

また、SRAM(Static Random Access Memory)においても、半導体素子構造の微細化および記憶容量の増加に伴い、ソフトエラーによる影響が無視できないものとなってきている。特許文献4には、このソフトエラーによる影響を少なくするための技術が開示されている。特許文献4に開示されている半導体メモリでは、メモリセルからのデータを読み出し、エラー訂正、メモリセルへの書き戻し、といった一連の動作を1クロックサイクルで実現している。また、特許文献5には強誘電体メモリのソフトエラーによりシステムへの大きなダメージが引き起こされる確率を低減する技術が開示されている。   Also in SRAM (Static Random Access Memory), the influence of soft errors cannot be ignored with the miniaturization of the semiconductor element structure and the increase in storage capacity. Patent Document 4 discloses a technique for reducing the influence of this soft error. The semiconductor memory disclosed in Patent Document 4 realizes a series of operations such as reading data from a memory cell, error correction, and writing back to the memory cell in one clock cycle. Patent Document 5 discloses a technique for reducing the probability that a system error is caused by a soft error of a ferroelectric memory.

特開昭59−53949号公報JP 59-53949 A 特開平2−103652号公報JP-A-2-103652 特開平4−23295号公報JP-A-4-23295 特開2006−114141号公報JP 2006-114141 A 特開2004−199713号公報Japanese Patent Laid-Open No. 2004-199713

背景技術で説明したように、パトロール方式を用いた半導体記憶装置(例えば、DRAM)では、1ビットエラーや2ビットエラー等が発生する割合を小さくすることができるため、半導体記憶装置の信頼性を向上させることができる。しかしながら、パトロール方式を用いた半導体記憶装置では、パトロール処理を実行している間、プログラムを処理するためのメモリアクセスは待たされるため、プログラム処理性能を損なうという問題があった。   As described in the background art, in the semiconductor memory device (for example, DRAM) using the patrol method, the rate of occurrence of 1-bit error or 2-bit error can be reduced, so that the reliability of the semiconductor memory device is improved. Can be improved. However, the semiconductor memory device using the patrol method has a problem of deteriorating the program processing performance because a memory access for processing a program is awaited while the patrol process is being executed.

上記課題に鑑み本発明の目的は、プログラム処理性能を損なうことなくデータの信頼性を向上させることが可能な半導体記憶装置およびその制御方法を提供することである。   In view of the above problems, an object of the present invention is to provide a semiconductor memory device and a control method therefor capable of improving data reliability without impairing program processing performance.

本発明にかかる半導体記憶装置は、アドレスに応じたデータの読み出しまたは書き込みを実施するメモリセルと、前記メモリセルに対して2サイクル以上同一アドレスで読み出しを行なっていることを検出する検出手段と、前記メモリセルから読み出されたデータのエラーを訂正するエラー訂正手段と、前記エラー訂正後のデータを保持するデータ保持手段と、を備え、前記メモリセルは、前記検出手段の検出結果に応じて、前記データ保持手段に保持されている前記データを前記アドレスに対応づけて書き込み、前記データ保持手段は、前記アドレスに応じた読み出しデータとして前記データ保持手段に保持されている前記データを出力する。   A semiconductor memory device according to the present invention includes a memory cell that reads or writes data according to an address, and a detecting unit that detects that the memory cell is read at the same address for two cycles or more, An error correction unit that corrects an error in data read from the memory cell; and a data holding unit that holds the data after the error correction. The memory cell corresponds to a detection result of the detection unit. The data held in the data holding unit is written in association with the address, and the data holding unit outputs the data held in the data holding unit as read data corresponding to the address.

本発明にかかる、アドレスに応じたデータの読み出しまたは書き込みを実施するメモリセルと、前記メモリセルに対して2サイクル以上同一アドレスで読み出しを行なっていることを検出する検出手段と、前記メモリセルから読み出されたデータのエラーを訂正するエラー訂正手段と、前記エラー訂正後のデータを保持するデータ保持手段と、を備える半導体記憶装置の制御方法は、前記メモリセルが、前記検出手段の検出結果に応じて、前記データ保持手段に保持されている前記データを前記アドレスに対応づけて書き込み、前記データ保持手段が、前記アドレスに応じた読み出しデータとして前記データ保持手段に保持されている前記データを出力する。   According to the present invention, a memory cell that reads or writes data according to an address, a detecting unit that detects that data is being read from the memory cell at the same address for two cycles or more, and the memory cell A control method of a semiconductor memory device comprising: an error correction unit that corrects an error in the read data; and a data holding unit that holds the data after the error correction, wherein the memory cell has a detection result of the detection unit In response, the data held in the data holding unit is written in association with the address, and the data holding unit writes the data held in the data holding unit as read data corresponding to the address. Output.

本発明により、プログラム処理性能を損なうことなくデータの信頼性を向上させることが可能な半導体記憶装置およびその制御方法を提供することができる。   According to the present invention, it is possible to provide a semiconductor memory device and a control method therefor capable of improving data reliability without impairing program processing performance.

実施の形態1にかかる半導体記憶装置を示す図である。1 is a diagram illustrating a semiconductor memory device according to a first embodiment; 実施の形態1にかかる半導体記憶装置の動作を説明するためのタイミングチャートである。3 is a timing chart for explaining an operation of the semiconductor memory device according to the first exemplary embodiment; 実施の形態2にかかる半導体記憶装置を示す図である。FIG. 3 is a diagram illustrating a semiconductor memory device according to a second embodiment; 実施の形態2にかかる半導体記憶装置の動作を説明するためのタイミングチャートである。6 is a timing chart for explaining an operation of the semiconductor memory device according to the second embodiment;

実施の形態1
以下、図面を参照して本発明の実施の形態について説明する。
図1は、本発明の実施の形態1にかかる半導体記憶装置を示す図である。
本実施の形態にかかる半導体記憶装置1は、アドレスに応じたデータの読み出しまたは書き込みを実施するメモリセル2と、メモリセル2に対して2サイクル以上同一アドレスで読み出しを行なっていることを検出する検出手段15と、メモリセル2から読み出されたデータのエラーを訂正するエラー訂正手段(ECC回路)3と、エラー訂正後のデータを保持するデータ保持手段(レジスタ(REWR))6と、を備える。メモリセル2は、検出手段15の検出結果に応じて、データ保持手段6に保持されているデータを前記アドレスに対応づけて書き込む。また、データ保持手段6は、前記アドレスに応じた読み出しデータとしてデータ保持手段6に保持されているデータを出力する。以下、本実施の形態にかかる半導体記憶装置について詳細に説明する。
Embodiment 1
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a diagram illustrating a semiconductor memory device according to a first embodiment of the present invention.
The semiconductor memory device 1 according to the present embodiment detects that the memory cell 2 that reads or writes data according to the address and that the memory cell 2 is being read at the same address for two cycles or more. A detection unit 15; an error correction unit (ECC circuit) 3 that corrects an error in data read from the memory cell 2; and a data holding unit (register (REWR)) 6 that holds data after error correction. Prepare. The memory cell 2 writes the data held in the data holding unit 6 in association with the address according to the detection result of the detection unit 15. The data holding unit 6 outputs data held in the data holding unit 6 as read data corresponding to the address. Hereinafter, the semiconductor memory device according to this embodiment will be described in detail.

図1に示す半導体記憶装置は、1ポートRAMと呼ばれ(1RW RAMとも呼ばれる)、1サイクルに読み出し又は書き込みのどちらか一方しか実行できないタイプのRAMである。図1に示す半導体記憶装置では、2サイクル以上読み出しアドレスに変化がなかった際に、読み出したデータをECC回路にて訂正後、メモリセル2への再書き込みを実施することが可能である。   The semiconductor memory device shown in FIG. 1 is a type of RAM called a 1-port RAM (also called a 1RW RAM) that can execute only one of reading and writing in one cycle. In the semiconductor memory device shown in FIG. 1, when there is no change in the read address for two cycles or more, the read data can be rewritten to the memory cell 2 after being corrected by the ECC circuit.

図1に示す半導体記憶装置1は、メモリセル2、ECC回路3、レジスタ4〜6、比較器7、ANDゲート8、9、セレクタ10、13、14、インバータ11、およびORゲート12を有する。ここで、レジスタ4、5、比較器7、およびANDゲート8、9は検出手段15を構成する。半導体記憶装置1にはアドレス信号(ADIN)、ライトイネーブル信号(WEIN)、および書き込みデータ(WDIN)が入力される。また、半導体記憶装置1はアドレス信号(ADIN)に対応する読み出しデータ(RDOUT)を出力する。なお、ライトイネーブル信号(WEIN)が"1"の時に書き込みを行なうか、また"0"の時に書き込みを行なうかについては任意に設定することができるが、本実施の形態ではライトイネーブル信号(WEIN)が"1"の時に書き込みを行なうものとする。   The semiconductor memory device 1 shown in FIG. 1 includes a memory cell 2, an ECC circuit 3, registers 4 to 6, a comparator 7, AND gates 8 and 9, selectors 10, 13, and 14, an inverter 11, and an OR gate 12. Here, the registers 4 and 5, the comparator 7, and the AND gates 8 and 9 constitute detection means 15. An address signal (ADIN), a write enable signal (WEIN), and write data (WDIN) are input to the semiconductor memory device 1. Further, the semiconductor memory device 1 outputs read data (RDOUT) corresponding to the address signal (ADIN). Note that it is possible to arbitrarily set whether writing is performed when the write enable signal (WEIN) is “1” or when it is “0”, but in this embodiment, the write enable signal (WEIN) is set. ) Shall be written when "1".

レジスタ(ADR)4は、端子ADINから供給されたアドレス信号(ADIN)を保持するレジスタである。比較器7は、一方の入力に端子ADINから供給されたアドレス信号(ADIN)が供給され、他方の入力にレジスタ4の出力が供給され、これらの比較結果をANDゲート9に出力する。すなわち、比較器7は、端子ADINから供給されたアドレス信号(ADIN)と、レジスタ4に保持された1サイクル前のアドレス信号とを比較し、2サイクル以上アドレス信号に変化がないか否かをチェックする。比較器7は、端子ADINから供給されたアドレス信号(ADIN)と、レジスタ4に保持された1サイクル前のアドレス信号とが同一である場合、ハイレベルの信号("1")を出力する。   The register (ADR) 4 is a register that holds an address signal (ADIN) supplied from the terminal ADIN. The comparator 7 is supplied with the address signal (ADIN) supplied from the terminal ADIN at one input, supplied with the output of the register 4 at the other input, and outputs the comparison result to the AND gate 9. That is, the comparator 7 compares the address signal (ADIN) supplied from the terminal ADIN with the address signal one cycle before held in the register 4 and determines whether or not the address signal has changed for two cycles or more. To check. The comparator 7 outputs a high-level signal (“1”) when the address signal (ADIN) supplied from the terminal ADIN and the address signal one cycle before held in the register 4 are the same.

レジスタ(WER)5は、端子WEINから供給されたライトイネーブル信号(WEIN)をインバータ11で反転させた信号を保持するレジスタである。ANDゲート(第1のANDゲート)8は、一方の入力に端子WEINから供給されたライトイネーブル信号(WEIN)をインバータ11で反転させた信号が供給され、他方の入力にレジスタ5の出力が供給され、これらの論理積をANDゲート9に出力する。すなわち、ANDゲート8は、端子WEINから供給されたライトイネーブル信号(WEIN)をインバータ11で反転させた信号と、レジスタ5に保持された1サイクル前の反転されたライトイネーブル信号(WEIN)とを比較し、2サイクル以上書き込みがないこと(つまり、2サイクル以上ライトイネーブル信号(WEIN)が"0"であること)をチェックする。   The register (WER) 5 is a register that holds a signal obtained by inverting the write enable signal (WEIN) supplied from the terminal WEIN by the inverter 11. The AND gate (first AND gate) 8 is supplied with a signal obtained by inverting the write enable signal (WEIN) supplied from the terminal WEIN at the inverter 11 at one input and the output of the register 5 at the other input. These logical products are output to the AND gate 9. That is, the AND gate 8 receives the signal obtained by inverting the write enable signal (WEIN) supplied from the terminal WEIN by the inverter 11 and the inverted write enable signal (WEIN) held in the register 5 one cycle before. In comparison, it is checked that there is no writing for two cycles or more (that is, the write enable signal (WEIN) is “0” for two cycles or more).

ANDゲート(第2のANDゲート)9は、一方の入力に比較器7の出力が供給され、他方の入力にANDゲート8の出力が供給され、これらの論理積を出力する。つまり、ANDゲート9は、2サイクル以上同じアドレスで読み出しを行なっていることを検出する。半導体記憶装置1が2サイクル以上同じアドレスで読み出しを行なっている場合、ANDゲート9はハイレベルの信号("1")を出力する。   The AND gate (second AND gate) 9 is supplied with the output of the comparator 7 at one input and the output of the AND gate 8 at the other input, and outputs a logical product of these. That is, the AND gate 9 detects that reading is performed at the same address for two cycles or more. When the semiconductor memory device 1 performs reading at the same address for two cycles or more, the AND gate 9 outputs a high level signal (“1”).

ORゲート12は、端子WEINから供給されたライトイネーブル信号(WEIN)とANDゲート9の出力とを入力し、論理和を出力する。ここで、ANDゲート9の出力はメモリセル2への再書き込み時のライトイネーブル信号となる。よって、ORゲート12はメモリセル2のライトイネーブル(WE)に、メモリセル2への再書き込みを意味するライトイネーブル信号(ANDゲート9の出力)、またはメモリセル2への書き込みを意味するライトイネーブル信号(WEIN)を出力する。   The OR gate 12 inputs the write enable signal (WEIN) supplied from the terminal WEIN and the output of the AND gate 9 and outputs a logical sum. Here, the output of the AND gate 9 becomes a write enable signal at the time of rewriting to the memory cell 2. Therefore, the OR gate 12 sets the write enable (WE) of the memory cell 2, the write enable signal (output of the AND gate 9) that means rewriting to the memory cell 2, or the write enable that means writing to the memory cell 2. A signal (WEIN) is output.

メモリセル2は、ライトイネーブル(WE)がハイレベルの時にアドレス(AD)に対応した書き込みデータ(WD)を保持する。また、ライトイネーブル(WE)がロウレベルの時にアドレス(AD)に対応した読み出しデータ(RD)を出力する。   The memory cell 2 holds write data (WD) corresponding to the address (AD) when the write enable (WE) is at a high level. Further, when the write enable (WE) is at a low level, read data (RD) corresponding to the address (AD) is output.

ECC回路3は、メモリセル2の読み出しデータ(RD)を入力し、当該データにエラーがある場合は当該データを訂正する。レジスタ(REWR)6は、ECC回路3で訂正されたデータをメモリセル2に書き戻すために、当該訂正されたデータを保持する。   The ECC circuit 3 inputs read data (RD) of the memory cell 2 and corrects the data when there is an error in the data. The register (REWR) 6 holds the corrected data in order to write the data corrected by the ECC circuit 3 back to the memory cell 2.

セレクタ14は、ANDゲート9の出力に応じて、ECC回路3で訂正されたデータまたはレジスタ6に保持されているデータを選択し、レジスタ6に出力する。つまり、セレクタ14は、端子ADINから供給されたアドレス信号(ADIN)が毎サイクル異なる場合(この場合はANDゲート9がロウレベルであり、メモリセル2への再書き込みが実施されない)、ECC回路3で訂正されたデータを選択する。また、セレクタ14は、端子ADINから供給されたアドレス信号(ADIN)が2サイクル以上同一でかつ読み出しを行なっている場合(この場合はANDゲート9がハイレベルであり、メモリセル2への再書き込みが実施される)、レジスタ6のデータをホールドする。   The selector 14 selects the data corrected by the ECC circuit 3 or the data held in the register 6 according to the output of the AND gate 9 and outputs the selected data to the register 6. That is, when the address signal (ADIN) supplied from the terminal ADIN is different every cycle (in this case, the AND gate 9 is at a low level and rewriting to the memory cell 2 is not performed), the selector 14 performs the ECC circuit 3 Select the corrected data. Further, the selector 14 is in the case where the address signal (ADIN) supplied from the terminal ADIN is the same for two cycles or more and reading is performed (in this case, the AND gate 9 is at the high level and rewriting to the memory cell 2 is performed) The data in the register 6 is held.

セレクタ(第1のセレクタ)13は、ANDゲート9の出力に応じて、書き込みデータ(WDIN)またはレジスタ6に保持されているデータを選択し、メモリセル2へ出力する。つまり、セレクタ13は、端子ADINから供給されたアドレス信号(ADIN)が毎サイクル異なる場合またはメモリセル2への書き込みを指示するライトイネーブル信号(WEIN)が供給された場合(この場合はANDゲート9がロウレベルであり、メモリセル2への再書き込みが実施されない)、書き込みデータ(WDIN)を選択する。また、セレクタ13は、端子ADINから供給されたアドレス信号(ADIN)が2サイクル以上同一でかつ読み出しを行なっている場合(この場合はANDゲート9がハイレベルであり、メモリセル2への再書き込みが実施される)、レジスタ6に保持されているデータを選択する。   The selector (first selector) 13 selects write data (WDIN) or data held in the register 6 according to the output of the AND gate 9 and outputs the selected data to the memory cell 2. That is, when the address signal (ADIN) supplied from the terminal ADIN is different every cycle or the selector 13 is supplied with a write enable signal (WEIN) instructing writing to the memory cell 2 (in this case, the AND gate 9). Is low level and rewriting to the memory cell 2 is not performed), and write data (WDIN) is selected. Further, the selector 13 is in the case where the address signal (ADIN) supplied from the terminal ADIN is the same for two cycles or more and reading is performed (in this case, the AND gate 9 is at the high level and rewriting to the memory cell 2 is performed) The data held in the register 6 is selected.

セレクタ10は、ANDゲート9の出力に応じて、ECC回路3で訂正されたデータまたはレジスタ6に保持されているデータを選択し、半導体記憶装置1の読み出しデータ(RDOUT)として出力する。つまり、セレクタ10は、端子ADINから供給されたアドレス信号(ADIN)が毎サイクル異なる場合(この場合はANDゲート9がロウレベルであり、メモリセル2への再書き込みが実施されない)、ECC回路3で訂正されたデータを選択する。また、セレクタ10は、端子ADINから供給されたアドレス信号(ADIN)が2サイクル以上同一でかつ読み出しを行なっている場合(この場合はANDゲート9がハイレベルであり、メモリセル2への再書き込みが実施される)、レジスタ6に保持されているデータを選択する。   The selector 10 selects the data corrected by the ECC circuit 3 or the data held in the register 6 according to the output of the AND gate 9 and outputs it as read data (RDOUT) of the semiconductor memory device 1. That is, when the address signal (ADIN) supplied from the terminal ADIN is different every cycle (in this case, the AND gate 9 is at the low level and rewriting to the memory cell 2 is not performed), the selector 10 performs the ECC circuit 3 Select the corrected data. Further, the selector 10 is in the case where the address signal (ADIN) supplied from the terminal ADIN is the same for two cycles or more and reading is performed (in this case, the AND gate 9 is at the high level and rewriting to the memory cell 2 is performed) The data held in the register 6 is selected.

次に、本実施の形態にかかる半導体記憶装置の動作について、図2に示すタイミングチャートを用いて説明する。図2に示すタイミングチャートでは、端子ADINから供給されたアドレス信号(ADIN)が"2"の時に2サイクル間同一アドレスの読み出しが実施される。また、アドレス信号(ADIN)が"5"の時に3サイクル間同一アドレスが続くが、最初の1サイクルはアドレス"5"への書き込み(つまり、WEINがハイレベルとなる)が実施される。また、アドレス信号(ADIN)が"6"の時に3サイクル間同一アドレスの読み出しが実施される。なお、図2のタイミングチャートに示すように、本実施の形態にかかる半導体記憶装置ではアドレス信号(ADIN)が入力された後、1サイクル遅れて各アドレス信号(ADIN)に対応した各レジスタへのデータの保持や読み出しデータ(RDOUT)の出力等が行なわれる。   Next, the operation of the semiconductor memory device according to the present embodiment will be described with reference to the timing chart shown in FIG. In the timing chart shown in FIG. 2, when the address signal (ADIN) supplied from the terminal ADIN is “2”, the same address is read for two cycles. In addition, when the address signal (ADIN) is “5”, the same address continues for three cycles, but writing to the address “5” is performed (that is, WEIN becomes high level) in the first cycle. When the address signal (ADIN) is “6”, the same address is read for 3 cycles. As shown in the timing chart of FIG. 2, in the semiconductor memory device according to the present embodiment, after the address signal (ADIN) is input, the register corresponding to each address signal (ADIN) is delayed by one cycle. Data is held and read data (RDOUT) is output.

まず、半導体記憶装置1にアドレス信号(ADIN)として"0"が供給されると、レジスタ(ADR)4はADR="0"を保持する。このとき、ライトイネーブル信号(WEIN)はロウレベル("0")であるので、レジスタ(WER)5はWER="1"を保持する。ANDゲート9の出力はロウレベルとなる。ライトイネーブル信号(WEIN)およびANDゲート9の出力が共にロウレベルであるので、メモリセル2のライトイネーブル(WE)はロウレベルとなる。メモリセル2のアドレス(AD)には、アドレス信号(ADIN)である"0"が供給される。このとき、メモリセル2は、AD="0"に対応した読み出しデータ(RD="D0")をECC回路3に出力する。セレクタ14は、ANDゲート9の出力がロウレベルであるので、ECC回路3の出力を選択する。レジスタ(REWR)6はECC回路3の出力"D0"を保持する。セレクタ10は、ANDゲート9の出力がロウレベルであるので、ECC回路3の出力を選択する。よって、半導体記憶装置1の出力(RDOUT)として"D0"が出力される。以降、アドレス信号(ADIN)が"1"、1つ目の"2"の場合も同様の動作となる。   First, when “0” is supplied to the semiconductor memory device 1 as the address signal (ADIN), the register (ADR) 4 holds ADR = “0”. At this time, since the write enable signal (WEIN) is at the low level (“0”), the register (WER) 5 holds WER = “1”. The output of the AND gate 9 becomes low level. Since both the write enable signal (WEIN) and the output of the AND gate 9 are at the low level, the write enable (WE) of the memory cell 2 is at the low level. An address signal (ADIN) “0” is supplied to the address (AD) of the memory cell 2. At this time, the memory cell 2 outputs read data (RD = “D0”) corresponding to AD = “0” to the ECC circuit 3. The selector 14 selects the output of the ECC circuit 3 because the output of the AND gate 9 is at a low level. The register (REWR) 6 holds the output “D0” of the ECC circuit 3. The selector 10 selects the output of the ECC circuit 3 because the output of the AND gate 9 is at a low level. Therefore, “D0” is output as the output (RDOUT) of the semiconductor memory device 1. Thereafter, the same operation is performed when the address signal (ADIN) is “1” and the first “2”.

半導体記憶装置1にアドレス信号(ADIN)として2つ目の"2"が供給されると、比較器7は、供給されたアドレス信号(ADIN)とレジスタ(ADR)4に保持されている値が共に"2"であるので、ANDゲート9にハイレベルの信号を出力する。また、ANDゲート8は、供給されたライトイネーブル信号(WEIN)を反転した信号とレジスタ(WER)5に保持されている値が共にハイレベルであるので、ANDゲート9にハイレベルの信号を出力する。よって、ANDゲート9の出力はハイレベルとなる。   When the second “2” is supplied as the address signal (ADIN) to the semiconductor memory device 1, the comparator 7 determines that the supplied address signal (ADIN) and the value held in the register (ADR) 4 are the same. Since both are “2”, a high level signal is output to the AND gate 9. The AND gate 8 outputs a high level signal to the AND gate 9 because the inverted signal of the supplied write enable signal (WEIN) and the value held in the register (WER) 5 are both at a high level. To do. Therefore, the output of the AND gate 9 becomes high level.

ANDゲート9の出力がハイレベルであるので、ORゲート12はメモリセル2のライトイネーブル(WE)にハイレベルの信号を出力する。メモリセル2のアドレス(AD)には、アドレス信号(ADIN)である"2"が供給される。セレクタ14は、ANDゲート9の出力がハイレベルであるので、レジスタ(REWR)6の値をホールドする。セレクタ13は、ANDゲート9の出力がハイレベルであるので、レジスタ(REWR)6の値であるREWR="D2"をメモリセル2の書き込みデータ(WD)として供給する。このとき、メモリセル2のライトイネーブル(WE)がハイレベルであるので、アドレス(AD="2")に対応した書き込みデータWD="D2"がメモリセル2に再書き込みされる。一方、セレクタ10はANDゲート9の出力がハイレベルであるので、レジスタ(REWR)6に保持されているデータ"D2"を選択する。よって、半導体記憶装置1の出力(RDOUT)として"D2"が出力される。   Since the output of the AND gate 9 is at a high level, the OR gate 12 outputs a high level signal to the write enable (WE) of the memory cell 2. An address signal (ADIN) “2” is supplied to the address (AD) of the memory cell 2. The selector 14 holds the value of the register (REWR) 6 because the output of the AND gate 9 is at a high level. Since the output of the AND gate 9 is at a high level, the selector 13 supplies REWR = “D2”, which is the value of the register (REWR) 6, as the write data (WD) of the memory cell 2. At this time, since the write enable (WE) of the memory cell 2 is at the high level, the write data WD = "D2" corresponding to the address (AD = "2") is rewritten to the memory cell 2. On the other hand, the selector 10 selects the data “D2” held in the register (REWR) 6 because the output of the AND gate 9 is at a high level. Therefore, “D2” is output as the output (RDOUT) of the semiconductor memory device 1.

アドレス信号(ADIN)として"3"、"4"が供給された場合の動作についても、上記で説明したアドレス信号(ADIN)として"0"が供給された場合の動作と同様である。   The operation when “3” and “4” are supplied as the address signal (ADIN) is the same as the operation when “0” is supplied as the address signal (ADIN) described above.

次に、アドレス信号(ADIN)として3サイクル間"5"が供給される場合について説明する。この場合、最初の1サイクルはアドレス"5"への書き込み(つまり、WEINがハイレベル)が実施される。アドレス信号(ADIN)として最初のアドレス信号ADIN="5"が供給されると、比較器7は、レジスタ4に保持されているADR="4"と、供給されたアドレス信号ADIN="5"とが異なるのでANDゲート9にロウレベルの信号を出力する。よって、ANDゲート9の出力はロウレベルとなる。   Next, a case where “5” is supplied as an address signal (ADIN) for three cycles will be described. In this case, in the first cycle, writing to the address “5” (that is, WEIN is high level) is performed. When the first address signal ADIN = “5” is supplied as the address signal (ADIN), the comparator 7 receives the ADR = “4” held in the register 4 and the supplied address signal ADIN = “5”. Therefore, a low level signal is output to the AND gate 9. Therefore, the output of the AND gate 9 becomes a low level.

また、端子WEINからハイレベルのライトイネーブル信号(WEIN)が供給されると、ORゲート12は、メモリセル2のライトイネーブル(WE)にハイレベルの信号を出力する。このとき、セレクタ13は、ANDゲート9の出力がロウレベルであるので、端子WDINから供給された書き込みデータWDIN="D5"をメモリセル2の書き込みデータ(WD)として出力する。そして、メモリセル2のライトイネーブル(WE)がハイレベルであるので、アドレス(AD="5")に対応した書き込みデータ(WD="D5")がメモリセル2に書き込まれる。   When a high level write enable signal (WEIN) is supplied from the terminal WEIN, the OR gate 12 outputs a high level signal to the write enable (WE) of the memory cell 2. At this time, since the output of the AND gate 9 is at the low level, the selector 13 outputs the write data WDIN = “D5” supplied from the terminal WDIN as the write data (WD) of the memory cell 2. Since the write enable (WE) of the memory cell 2 is at a high level, write data (WD = “D5”) corresponding to the address (AD = “5”) is written into the memory cell 2.

なお、この場合はANDゲート9の出力がロウレベルであるので、セレクタ10、14はECC回路3の出力を選択する。しかし、メモリセル2からは読み出しデータ(RD)が出力されないので、半導体記憶装置1のデータ出力(RDOUT)とレジスタ(REWR)6の値は"不定"となる。   In this case, since the output of the AND gate 9 is at a low level, the selectors 10 and 14 select the output of the ECC circuit 3. However, since the read data (RD) is not output from the memory cell 2, the data output (RDOUT) of the semiconductor memory device 1 and the value of the register (REWR) 6 become “undefined”.

次に、アドレス信号(ADIN)として、2つ目のADIN="5"と3つ目のADIN="5"が順次供給される。このときの動作は、上記で説明した1つ目のADIN="2"と2つ目のADIN="2"が供給された場合の動作と同様であるので重複した説明は省略する。   Next, the second ADIN = “5” and the third ADIN = “5” are sequentially supplied as the address signal (ADIN). Since the operation at this time is the same as the operation when the first ADIN = “2” and the second ADIN = “2” described above are supplied, the redundant description is omitted.

次に、アドレス信号(ADIN)として、3サイクル間ADIN="6"が供給される。アドレス信号(ADIN)として、1つ目のADIN="6"と2つ目のADIN="6"が供給された場合の動作は、上記で説明した1つ目のADIN="2"と2つ目のADIN="2"が供給された場合の動作と同様であるので重複した説明は省略する。   Next, ADIN = “6” is supplied for three cycles as the address signal (ADIN). The operation when the first ADIN = “6” and the second ADIN = “6” are supplied as the address signal (ADIN) is the same as the first ADIN = “2” and 2 described above. Since the operation is the same as that when the first ADIN = “2” is supplied, redundant description is omitted.

2つ目のADIN="6"が供給された後、アドレス信号(ADIN)として3つ目のADIN="6"が供給される。このとき、比較器7は、供給されたアドレス信号(ADIN)とレジスタ(ADR)4に保持されている値が共に"6"であるので、ANDゲート9にハイレベルの信号を出力する。また、AND8は、供給されたライトイネーブル信号(WEIN)を反転した信号とレジスタ(WER)5に保持されている値が共にハイレベルであるので、ANDゲート9にハイレベルの信号を出力する。よって、ANDゲート9の出力はハイレベルとなる。   After the second ADIN = “6” is supplied, the third ADIN = “6” is supplied as the address signal (ADIN). At this time, the comparator 7 outputs a high-level signal to the AND gate 9 because both the supplied address signal (ADIN) and the value held in the register (ADR) 4 are “6”. The AND 8 outputs a high level signal to the AND gate 9 because both the inverted signal of the supplied write enable signal (WEIN) and the value held in the register (WER) 5 are at a high level. Therefore, the output of the AND gate 9 becomes high level.

ANDゲート9の出力がハイレベルであるので、ORゲート12はメモリセル2のライトイネーブル(WE)にハイレベルの信号を出力する。メモリセル2のアドレス(AD)には、アドレス信号(ADIN)である"6"が供給される。セレクタ14は、ANDゲート9の出力がハイレベルであるので、レジスタ(REWR)6の値をホールドする。セレクタ13は、ANDゲート9の出力がハイレベルであるので、レジスタ(REWR)6の値であるREWR="D6"をメモリセル2の書き込みデータ(WD)として供給する。このとき、メモリセル2のライトイネーブル(WE)がハイレベルであるので、アドレス(AD="6")に対応した書き込みデータ(WD="D6")がメモリセル2に再書き込みされる。一方、セレクタ10はANDゲート9の出力がハイレベルであるので、レジスタ(REWR)6に保持されているECC回路3でエラー訂正済みのデータ"D6"を選択する。よって、半導体記憶装置1の出力(RDOUT)として"D6"が出力される。   Since the output of the AND gate 9 is at a high level, the OR gate 12 outputs a high level signal to the write enable (WE) of the memory cell 2. An address signal (ADIN) “6” is supplied to the address (AD) of the memory cell 2. The selector 14 holds the value of the register (REWR) 6 because the output of the AND gate 9 is at a high level. Since the output of the AND gate 9 is at a high level, the selector 13 supplies REWR = “D6”, which is the value of the register (REWR) 6, as the write data (WD) of the memory cell 2. At this time, since the write enable (WE) of the memory cell 2 is at the high level, the write data (WD = “D6”) corresponding to the address (AD = “6”) is rewritten to the memory cell 2. On the other hand, since the output of the AND gate 9 is at the high level, the selector 10 selects the error-corrected data “D6” by the ECC circuit 3 held in the register (REWR) 6. Therefore, “D6” is output as the output (RDOUT) of the semiconductor memory device 1.

本実施の形態にかかる半導体記憶装置の動作についてまとめると次のようになる。
(1)同一アドレスn(nは任意の整数)が入力される1サイクル目に対応するタイミング。
ANDゲート9の出力はロウレベルとなる。メモリセル2は、アドレスnに対応した読み出しデータ(RD)を出力する。レジスタ(REWR)6はアドレスnに応じたエラー訂正後のデータを保持する。また、セレクタ10は、ECC回路3から出力されたアドレスnに対応したエラー訂正後のデータを半導体記憶装置の出力(RDOUT)として出力する。
The operation of the semiconductor memory device according to the present embodiment is summarized as follows.
(1) Timing corresponding to the first cycle in which the same address n (n is an arbitrary integer) is input.
The output of the AND gate 9 becomes low level. The memory cell 2 outputs read data (RD) corresponding to the address n. The register (REWR) 6 holds data after error correction corresponding to the address n. Further, the selector 10 outputs data after error correction corresponding to the address n output from the ECC circuit 3 as an output (RDOUT) of the semiconductor memory device.

(2)同一アドレスnが入力される2サイクル目に対応するタイミング。
ANDゲート9の出力はハイレベルとなる。メモリセル2はアドレスnに対応づけてレジスタ(REWR)6に保持されているデータを書き込む(再書き込み)。レジスタ(REWR)6は、アドレスnに対応した読み出しデータとしてレジスタ(REWR)6に保持されているデータを半導体記憶装置1のデータ出力(RDOUT)として出力する。
(2) Timing corresponding to the second cycle in which the same address n is input.
The output of the AND gate 9 becomes high level. The memory cell 2 writes the data held in the register (REWR) 6 in association with the address n (rewriting). The register (REWR) 6 outputs data held in the register (REWR) 6 as read data corresponding to the address n as a data output (RDOUT) of the semiconductor memory device 1.

背景技術で説明したように、パトロール方式を用いた半導体記憶装置(例えば、DRAM)では、パトロール処理を実行している間、プログラムを処理するためのメモリアクセスは待たされるため、プログラム処理性能を損なうという問題があった。すなわち、パトロール実行中のメモリアドレスやバンクが、プログラムを処理する通常命令によるメモリアクセスと重なった場合、通常のメモリアクセスはパトロール処理を実行しているアドレスが異なるアドレスに遷移するまで待たされるという問題があった。   As described in the background art, in a semiconductor memory device (for example, a DRAM) using a patrol system, memory access for processing a program is awaited while the patrol process is being performed, so that the program processing performance is impaired. There was a problem. That is, when the memory address or bank being executed for patrol overlaps with the memory access by the normal instruction for processing the program, the normal memory access is waited until the address at which the patrol process is executed transitions to a different address. was there.

また、キャッシュメモリなどに使われる半導体記憶装置(例えば、SRAM)に於いては、高速でプログラムを処理する情報処理装置のクロック周波数が高いため、特許文献4に開示されているような技術では遅延制約を満たすことが困難であるという問題があった。  Further, in a semiconductor memory device (for example, SRAM) used for a cache memory or the like, the clock frequency of an information processing device that processes a program at a high speed is high, so that the technology disclosed in Patent Document 4 has a delay. There was a problem that it was difficult to satisfy the constraints.

これに対して本実施の形態にかかる半導体記憶装置1では、2サイクル以上同じアドレスで読み出しを行なっている場合、レジスタ(REWR)6に保持されている1つ前のサイクルのデータをメモリセル2へ再書き込みすると同時に、当該保持されているデータを半導体記憶装置1の出力(RDOUT)として出力している。よって、メモリセル2が1サイクルに読み出し又は書き込みのどちらか一方しか実行できない場合であっても、メモリセル2へのデータの再書き込みと、半導体記憶装置1からのデータの出力(データの読み出し)とを1サイクルで同時に実施することができる。したがって、メモリアクセスタイミングを変更する必要がなくなり、クロック周波数が高い場合であっても遅延制約を満たすことができる。   On the other hand, in the semiconductor memory device 1 according to the present embodiment, when reading is performed at the same address for two cycles or more, the data of the previous cycle held in the register (REWR) 6 is stored in the memory cell 2. At the same time, the held data is output as the output (RDOUT) of the semiconductor memory device 1. Therefore, even when the memory cell 2 can execute only one of reading and writing in one cycle, rewriting data to the memory cell 2 and outputting data from the semiconductor memory device 1 (reading data) Can be performed simultaneously in one cycle. Therefore, it is not necessary to change the memory access timing, and the delay constraint can be satisfied even when the clock frequency is high.

よって、本実施の形態にかかる発明により、プログラム処理性能を損なうことなくデータの信頼性を向上させることが可能な半導体記憶装置およびその制御方法を提供することができる。   Therefore, the invention according to the present embodiment can provide a semiconductor memory device and a control method thereof that can improve data reliability without deteriorating program processing performance.

実施の形態2
次に、本発明の実施の形態2について説明する。図3は、実施の形態2にかかる半導体記憶装置を示す図である。本実施の形態にかかる半導体記憶装置では、再書き込み動作ついて巡回機能を追加している。これ以外の構成は、基本的には実施の形態1で説明した半導体記憶装置と同様である。ここで巡回機能とは、1ポートRAMにおいて4サイクル以上読み出しアドレスに変化がない場合に、その変化しなくなったアドレスを開始アドレスとして2サイクルに1回の割合でアドレスをインクリメントし、1サイクル目に読み出したデータをECC回路にて訂正後、2サイクル目に書き戻すことを順次繰り返す機能である。
Embodiment 2
Next, a second embodiment of the present invention will be described. FIG. 3 is a diagram of the semiconductor memory device according to the second embodiment. In the semiconductor memory device according to the present embodiment, a cyclic function is added for the rewrite operation. The other configuration is basically the same as that of the semiconductor memory device described in the first embodiment. Here, the cyclic function means that when there is no change in the read address for 4 cycles or more in the 1-port RAM, the address is changed at a rate of once every 2 cycles with the changed address as the start address. This is a function for sequentially repeating reading data in the second cycle after the read data is corrected by the ECC circuit.

図3に示す半導体記憶装置20は、メモリセル21、ECC回路22、レジスタ23〜28、比較器29、ANDゲート30、31、セレクタ32、34〜37、40、インバータ33、38、およびORゲート39を有する。ここで、レジスタ23、24、比較器29、およびANDゲート30、31は検出手段45を構成する。また、レジスタ28、セレクタ32、およびインバータ33は、メモリセル21からのデータの読み出しまたはメモリセル21へのデータの書き込みをサイクル毎に交互に切り替える切り替え手段46を構成する。また、レジスタ25およびセレクタ34、35は、2サイクルに1回アドレスをインクリメントするアドレス生成手段47を構成する。また、本実施の形態ではデータ保持手段48は、エラー訂正後のデータを保持する第1のデータ保持手段(レジスタ(REWR))27と、エラー訂正後のデータを保持すると共に当該データを検出手段45の検出結果に応じてホールド可能な第2のデータ保持手段(レジスタ(HLDR))26と、を備える。   3 includes a memory cell 21, an ECC circuit 22, registers 23 to 28, a comparator 29, AND gates 30 and 31, selectors 32, 34 to 37, and 40, inverters 33 and 38, and an OR gate. 39. Here, the registers 23 and 24, the comparator 29, and the AND gates 30 and 31 constitute a detection unit 45. Further, the register 28, the selector 32, and the inverter 33 constitute a switching unit 46 that alternately switches the reading of data from the memory cell 21 or the writing of data to the memory cell 21 every cycle. The register 25 and the selectors 34 and 35 constitute address generating means 47 that increments the address once every two cycles. Further, in the present embodiment, the data holding means 48 is a first data holding means (register (REWR)) 27 that holds data after error correction, and holds data after error correction and detects the data. Second data holding means (register (HLDR)) 26 capable of holding according to 45 detection results.

半導体記憶装置20にはアドレス信号(ADIN)、ライトイネーブル信号(WEIN)、および書き込みデータ(WDIN)が入力される。また、半導体記憶装置20はアドレス信号(ADIN)に対応する読み出しデータ(RDOUT)を出力する。なお、ライトイネーブル信号(WEIN)が"1"の時に書き込みを行なうか、また"0"の時に書き込みを行なうのかについては任意に設定することができるが、本実施の形態ではライトイネーブル信号(WEIN)が"1"の時に書き込みを行なうものとする。   The semiconductor memory device 20 receives an address signal (ADIN), a write enable signal (WEIN), and write data (WDIN). Further, the semiconductor memory device 20 outputs read data (RDOUT) corresponding to the address signal (ADIN). Note that it is possible to arbitrarily set whether the write is performed when the write enable signal (WEIN) is “1” or when the write enable signal (WEIN) is “0”, but in this embodiment, the write enable signal (WEIN) is set. ) Shall be written when "1".

レジスタ(ADR)23は、端子ADINから供給されたアドレス信号(ADIN)を保持するレジスタである。比較器29は、端子ADINから供給されたアドレス信号(ADIN)とレジスタ23の出力とを入力し、これらの比較結果をANDゲート31に出力する。すなわち、比較器29は、端子ADINから供給されたアドレス信号(ADIN)と、レジスタ23に保持された1サイクル前のアドレス信号とを比較し、2サイクル以上アドレス信号に変化がないか否かをチェックする。比較器29は、端子ADINから供給されたアドレス信号(ADIN)と、レジスタ23に保持された1サイクル前のアドレス信号とが同一である場合、ハイレベルの信号を出力する。   The register (ADR) 23 is a register that holds an address signal (ADIN) supplied from the terminal ADIN. The comparator 29 receives the address signal (ADIN) supplied from the terminal ADIN and the output of the register 23 and outputs the comparison result to the AND gate 31. That is, the comparator 29 compares the address signal (ADIN) supplied from the terminal ADIN with the address signal one cycle before held in the register 23 and determines whether or not the address signal has changed for two cycles or more. To check. The comparator 29 outputs a high-level signal when the address signal (ADIN) supplied from the terminal ADIN and the address signal one cycle before held in the register 23 are the same.

レジスタ(WER)24は、端子WEINから供給されたライトイネーブル信号(WEIN)をインバータ38で反転させた信号を保持するレジスタである。ANDゲート30は、端子WEINから供給されたライトイネーブル信号(WEIN)をインバータ38で反転させた信号とレジスタ24の出力とを入力し、これらの論理積をANDゲート31に出力する。すなわち、ANDゲート30は、端子WEINから供給されたライトイネーブル信号(WEIN)をインバータ38で反転させた信号と、レジスタ24に保持された1サイクル前の反転されたライトイネーブル信号(WEIN)とを比較し、2サイクル以上書き込みがないこと(つまり、2サイクル以上ライトイネーブル信号(WEIN)が"0"であること)をチェックする。   The register (WER) 24 is a register that holds a signal obtained by inverting the write enable signal (WEIN) supplied from the terminal WEIN by the inverter 38. The AND gate 30 inputs a signal obtained by inverting the write enable signal (WEIN) supplied from the terminal WEIN by the inverter 38 and the output of the register 24, and outputs a logical product of these signals to the AND gate 31. That is, the AND gate 30 receives the signal obtained by inverting the write enable signal (WEIN) supplied from the terminal WEIN by the inverter 38 and the inverted write enable signal (WEIN) held in the register 24 one cycle before. In comparison, it is checked that there is no writing for two cycles or more (that is, the write enable signal (WEIN) is “0” for two cycles or more).

ANDゲート31は、比較器29の出力およびANDゲート30の出力を入力し、これらの論理積を出力する。つまり、ANDゲート31は、2サイクル以上同じアドレスで読み出しを行なっていることを検出する。半導体記憶装置20が2サイクル以上同じアドレスで読み出しを行なっている場合、ANDゲート31はハイレベルの信号("1")を出力する。なお、本実施の形態では、半導体記憶装置20が2サイクル以上同じアドレスで読み出しを行なっている状態、つまりANDゲート31がハイレベルの信号を出力している状態を便宜上"RAMの巡回中"と表現する。   The AND gate 31 inputs the output of the comparator 29 and the output of the AND gate 30, and outputs a logical product of these. That is, the AND gate 31 detects that reading is performed at the same address for two cycles or more. When the semiconductor memory device 20 performs reading at the same address for two cycles or more, the AND gate 31 outputs a high level signal (“1”). In the present embodiment, the state in which the semiconductor memory device 20 performs reading at the same address for two cycles or more, that is, the state in which the AND gate 31 outputs a high level signal is referred to as “RAM circulating” for convenience. Express.

セレクタ32は、ANDゲート31がハイレベルの信号を出力している場合には、レジスタ(TMGR)28に保持されている値をインバータ33で反転させた信号を選択し、ANDゲート31がロウレベルの信号を出力している場合には"0"を選択する。レジスタ(TMGR)28は、セレクタ32の出力を保持する。つまり、ANDゲート31がハイレベルの信号を2サイクル以上出力し続けている間、セレクタ32はサイクル毎に"0"と"1"を交互に出力する。   When the AND gate 31 outputs a high level signal, the selector 32 selects a signal obtained by inverting the value held in the register (TMGR) 28 by the inverter 33, and the AND gate 31 is at a low level. If a signal is being output, “0” is selected. The register (TMGR) 28 holds the output of the selector 32. That is, while the AND gate 31 continues to output a high level signal for two cycles or more, the selector 32 alternately outputs “0” and “1” every cycle.

セレクタ34は、ANDゲート31がロウレベルの信号を出力している場合、端子ADINから供給されたアドレス信号(ADIN)を選択する("0X")。また、セレクタ34は、ANDゲート31がハイレベルの信号を出力している場合で、かつセレクタ32の出力がロウレベルである場合、レジスタ(パトロールレジスタ:PATR)25に保持されている値を選択する("10")。また、セレクタ34は、ANDゲート31がハイレベルの信号を出力している場合で、かつセレクタ32の出力がハイレベルである場合、レジスタ25に保持されている値をインクリメントした値を選択する("11")。レジスタ(PATR)25はセレクタ34の出力を保持する。   When the AND gate 31 outputs a low level signal, the selector 34 selects the address signal (ADIN) supplied from the terminal ADIN (“0X”). The selector 34 selects a value held in the register (patrol register: PATR) 25 when the AND gate 31 outputs a high level signal and the output of the selector 32 is at a low level. ("10"). Further, when the AND gate 31 outputs a high level signal and the output of the selector 32 is at a high level, the selector 34 selects a value obtained by incrementing the value held in the register 25 ( “11”). A register (PATR) 25 holds the output of the selector 34.

つまり、セレクタ34は、ANDゲート31がハイレベルの信号を出力し続けている場合、2サイクルに1回カウントアップした値をアドレスとして出力する。これにより、RAMの巡回中に読み出し動作と再書き込み動作を交互に繰り返すことができる。   That is, when the AND gate 31 continues to output a high level signal, the selector 34 outputs a value counted up once every two cycles as an address. Thereby, the read operation and the rewrite operation can be alternately repeated during the circulation of the RAM.

セレクタ35は、ANDゲート31がロウレベルの信号を出力している場合、端子ADINから供給されたアドレス信号(ADIN)を選択する。また、セレクタ34は、ANDゲート31がハイレベルの信号を出力している場合、レジスタ(PATR)25に保持されている値を選択する。セレクタ35の出力は、メモリセル21に対するアドレス(AD)となる。   The selector 35 selects the address signal (ADIN) supplied from the terminal ADIN when the AND gate 31 outputs a low level signal. The selector 34 selects a value held in the register (PATR) 25 when the AND gate 31 outputs a high level signal. The output of the selector 35 is an address (AD) for the memory cell 21.

ORゲート39は、端子WEINから供給されたライトイネーブル信号(WEIN)とセレクタ32の出力とを入力し、論理和を出力する。ここで、セレクタ32の出力はメモリセル21への再書き込み時のライトイネーブル信号となる。よって、ORゲート39はメモリセル21のライトイネーブル(WE)に、メモリセル21への再書き込みを意味するライトイネーブル信号(セレクタ32の出力)、またはメモリセル21への書き込みを意味するライトイネーブル信号(WEIN)を出力する。   The OR gate 39 inputs the write enable signal (WEIN) supplied from the terminal WEIN and the output of the selector 32, and outputs a logical sum. Here, the output of the selector 32 becomes a write enable signal at the time of rewriting to the memory cell 21. Therefore, the OR gate 39 sets the write enable (WE) of the memory cell 21 to the write enable signal (output of the selector 32) that means rewriting to the memory cell 21 or the write enable signal that means writing to the memory cell 21. (WEIN) is output.

メモリセル21は、ライトイネーブル(WE)がハイレベルの時にアドレス(AD)に対応した書き込みデータ(WD)を保持する。また、ライトイネーブル(WE)がロウレベルの時にアドレス(AD)に対応した読み出しデータ(RD)を出力する。すなわち、メモリセル21は、切り替え手段46からの信号に応じて、アドレス生成手段47で生成されたアドレスに応じたデータの読み出し、または当該アドレスに対応づけたレジスタ27に保持されているデータの書き込みを実施する。   The memory cell 21 holds write data (WD) corresponding to the address (AD) when the write enable (WE) is at a high level. Further, when the write enable (WE) is at a low level, read data (RD) corresponding to the address (AD) is output. That is, the memory cell 21 reads data corresponding to the address generated by the address generating means 47 or writes data held in the register 27 associated with the address in response to a signal from the switching means 46. To implement.

ECC回路22は、メモリセル21の読み出しデータ(RD)を入力し、当該データにエラーがある場合は当該データを訂正する。レジスタ(REWR:第1のレジスタ)27は、ECC回路22で訂正されたデータをメモリセル21に書き戻すために、当該訂正されたデータを保持する。   The ECC circuit 22 inputs read data (RD) of the memory cell 21 and corrects the data when there is an error in the data. The register (REWR: first register) 27 holds the corrected data in order to write the data corrected by the ECC circuit 22 back to the memory cell 21.

セレクタ(第2のセレクタ)40は、ANDゲート31の出力に応じて、書き込みデータ(WDIN)またはレジスタ27に保持されているデータを選択し、メモリセル21へ出力する。つまり、セレクタ40は、ANDゲート31の出力がハイレベルである場合にはレジスタ(REWR)27に保持されているデータを、ANDゲート31の出力がロウレベルである場合には端子WDINに供給される書き込みデータ(WDIN)を、メモリセル21にそれぞれ供給する。   The selector (second selector) 40 selects write data (WDIN) or data held in the register 27 according to the output of the AND gate 31 and outputs the selected data to the memory cell 21. That is, the selector 40 supplies the data held in the register (REWR) 27 when the output of the AND gate 31 is at a high level, and supplies the data to the terminal WDIN when the output of the AND gate 31 is at a low level. Write data (WDIN) is supplied to each memory cell 21.

セレクタ36は、ANDゲート31の出力に応じて、ECC回路22で訂正されたデータまたはレジスタ(HLDR:第2のレジスタ)26に保持されているデータを選択し、レジスタ26に出力する。つまり、セレクタ36は、ANDゲート31の出力がロウレベルである場合にはECC回路22で訂正されたデータを選択する。また、セレクタ36は、ANDゲート31の出力がハイレベルである場合にはレジスタ26のデータをホールドする。   The selector 36 selects the data corrected by the ECC circuit 22 or the data held in the register (HLDR: second register) 26 according to the output of the AND gate 31 and outputs the selected data to the register 26. That is, the selector 36 selects the data corrected by the ECC circuit 22 when the output of the AND gate 31 is at a low level. The selector 36 holds the data in the register 26 when the output of the AND gate 31 is at a high level.

セレクタ37は、ANDゲート31の出力に応じて、ECC回路22で訂正されたデータまたはレジスタ26に保持されているデータを選択し、半導体記憶装置20の読み出しデータ(RDOUT)として出力する。つまり、セレクタ37は、ANDゲート31の出力がロウレベルである場合にはECC回路22で訂正されたデータを選択する。また、セレクタ37は、ANDゲート31の出力がハイレベルである場合にはレジスタ26に保持されているデータを選択する。   The selector 37 selects the data corrected by the ECC circuit 22 or the data held in the register 26 according to the output of the AND gate 31 and outputs the selected data as read data (RDOUT) of the semiconductor memory device 20. That is, the selector 37 selects the data corrected by the ECC circuit 22 when the output of the AND gate 31 is at a low level. The selector 37 selects the data held in the register 26 when the output of the AND gate 31 is at a high level.

次に、本実施の形態にかかる半導体記憶装置の動作について、図4に示すタイミングチャートを用いて説明する。図4に示すタイミングチャートでは、端子ADINから供給されたアドレス信号(ADIN)が"2"の時に2サイクル間同一アドレスの読み出しが実施される。また、アドレス信号(ADIN)が"5"以降において同一アドレスが続くが、最初の1サイクルはアドレス"5"への書き込み(つまり、WEINがハイレベルとなる)が実施される。なお、図4のタイミングチャートに示すように、本実施の形態にかかる半導体記憶装置ではアドレス信号(ADIN)が入力された後、1サイクル遅れて各アドレス信号(ADIN)に対応した各レジスタへのデータの保持や読み出しデータ(RDOUT)の出力等が行なわれる。   Next, the operation of the semiconductor memory device according to the present embodiment will be described with reference to the timing chart shown in FIG. In the timing chart shown in FIG. 4, when the address signal (ADIN) supplied from the terminal ADIN is “2”, the same address is read for two cycles. Further, the same address continues after the address signal (ADIN) is “5”, but writing to the address “5” (that is, WEIN becomes high level) is performed in the first cycle. As shown in the timing chart of FIG. 4, in the semiconductor memory device according to the present embodiment, after the address signal (ADIN) is input, the register corresponding to each address signal (ADIN) is delayed by one cycle. Data is held and read data (RDOUT) is output.

まず、半導体記憶装置20にアドレス信号(ADIN)として"0"が供給されると、レジスタ(ADR)23はADR="0"を保持する。このとき、ライトイネーブル信号(WEIN)はロウレベル("0")であるので、レジスタ(WER)24はWER="1"を保持する。また、ANDゲート31の出力はロウレベルであるので、セレクタ32は"0"を出力する。ライトイネーブル信号(WEIN)およびセレクタ32の出力は共にロウレベルであるので、メモリセル21のライトイネーブル(WE)はロウレベルとなる。   First, when “0” is supplied to the semiconductor memory device 20 as the address signal (ADIN), the register (ADR) 23 holds ADR = “0”. At this time, since the write enable signal (WEIN) is at the low level (“0”), the register (WER) 24 holds WER = “1”. Since the output of the AND gate 31 is low level, the selector 32 outputs “0”. Since the write enable signal (WEIN) and the output of the selector 32 are both low level, the write enable (WE) of the memory cell 21 is low level.

また、ANDゲート31の出力はロウレベルであるので、セレクタ35はアドレス信号(ADIN)である"0"を出力する。よって、メモリセル21のアドレス(AD)には、アドレス信号(ADIN)である"0"が供給される。このとき、メモリセル21は、AD="0"に対応した読み出しデータ(RD="D0")をECC回路22に出力する。セレクタ36は、ANDゲート31の出力がロウレベルであるので、ECC回路22の出力を選択する。レジスタ(HLDR)26はECC回路22の出力"D0"を保持する。また、レジスタ(REWR)27もECC回路22の出力"D0"を保持する。セレクタ37は、ANDゲート31の出力がロウレベルであるので、ECC回路22の出力を選択する。よって、半導体記憶装置20の出力(RDOUT)として"D0"が出力される。以降、アドレス信号(ADIN)が"1"、最初の"2"の場合も同様の動作となる。   Since the output of the AND gate 31 is at a low level, the selector 35 outputs “0” which is an address signal (ADIN). Therefore, “0” that is the address signal (ADIN) is supplied to the address (AD) of the memory cell 21. At this time, the memory cell 21 outputs read data (RD = “D0”) corresponding to AD = “0” to the ECC circuit 22. The selector 36 selects the output of the ECC circuit 22 because the output of the AND gate 31 is at a low level. The register (HLDR) 26 holds the output “D0” of the ECC circuit 22. The register (REWR) 27 also holds the output “D0” of the ECC circuit 22. The selector 37 selects the output of the ECC circuit 22 because the output of the AND gate 31 is at a low level. Therefore, “D0” is output as the output (RDOUT) of the semiconductor memory device 20. Thereafter, the same operation is performed when the address signal (ADIN) is “1” and the first “2”.

半導体記憶装置20にアドレス信号(ADIN)として2つ目の"2"が供給されると、比較器29は、供給されたアドレス信号(ADIN)とレジスタ(ADR)23に保持されている値が共に"2"であるので、ANDゲート31にハイレベルの信号を出力する。また、ANDゲート30は、供給されたライトイネーブル信号(WEIN)を反転した信号とレジスタ(WER)24に保持されている値が共にハイレベルであるので、ANDゲート31にハイレベルの信号を出力する。よって、ANDゲート31の出力はハイレベルとなる。   When the second “2” is supplied as the address signal (ADIN) to the semiconductor memory device 20, the comparator 29 receives the supplied address signal (ADIN) and the value held in the register (ADR) 23. Since both are “2”, a high level signal is output to the AND gate 31. The AND gate 30 outputs a high level signal to the AND gate 31 because the inverted signal of the supplied write enable signal (WEIN) and the value held in the register (WER) 24 are both high level. To do. Therefore, the output of the AND gate 31 is at a high level.

セレクタ32は、ANDゲート31の出力がハイレベルであるので、インバータ33の出力を選択する。ここで、レジスタ(TMGR)28の初期値はロウレベル("0")であるので、セレクタ32からはハイレベルの信号が出力される。セレクタ34は、ANDゲート31の出力およびセレクタ32の出力が共にハイレベルであるので、レジスタ(PATR)25に保持されている値"2"に1を加えた"3"を出力する。レジスタ(PATR)25は、セレクタ34の出力値"3"を保持する。一方、セレクタ35は、ANDゲート31の出力がハイレベルであるので、レジスタ(PATR)25に既に保持されている値(つまり、セレクタ34で選択される前の値"2")を選択する。   The selector 32 selects the output of the inverter 33 because the output of the AND gate 31 is at a high level. Here, since the initial value of the register (TMGR) 28 is low level (“0”), a high level signal is output from the selector 32. Since both the output of the AND gate 31 and the output of the selector 32 are at the high level, the selector 34 outputs “3” obtained by adding 1 to the value “2” held in the register (PATR) 25. The register (PATR) 25 holds the output value “3” of the selector 34. On the other hand, since the output of the AND gate 31 is at the high level, the selector 35 selects the value already held in the register (PATR) 25 (that is, the value “2” before being selected by the selector 34).

セレクタ32の出力がハイレベルであるので、ORゲート39はメモリセル21のライトイネーブル(WE)にハイレベルの信号を出力する。メモリセル21のアドレス(AD)には、セレクタ35の出力値である"2"が供給される。セレクタ40は、ANDゲート31の出力がハイレベルであるので、レジスタ(REWR)27の値であるREWR="D2"をメモリセル21の書き込みデータ(WD)として供給する。このとき、メモリセル21のライトイネーブル(WE)がハイレベルであるので、アドレス(AD="2")に対応した書き込みデータ(WD="D2")がメモリセル21に再書き込みされる。   Since the output of the selector 32 is at a high level, the OR gate 39 outputs a high level signal to the write enable (WE) of the memory cell 21. The address (AD) of the memory cell 21 is supplied with “2” that is the output value of the selector 35. Since the output of the AND gate 31 is at a high level, the selector 40 supplies REWR = “D2”, which is the value of the register (REWR) 27, as write data (WD) of the memory cell 21. At this time, since the write enable (WE) of the memory cell 21 is at the high level, the write data (WD = “D2”) corresponding to the address (AD = “2”) is rewritten to the memory cell 21.

セレクタ36は、ANDゲート31の出力がハイレベルであるので、レジスタ(HLDR)26の値をホールドする。一方、セレクタ37はANDゲート31の出力がハイレベルであるので、レジスタ(HLDR)26に保持されているECC回路22でエラー訂正済みのデータ"D2"を選択する。よって、半導体記憶装置20の出力(RDOUT)として"D2"が出力される。   The selector 36 holds the value of the register (HLDR) 26 because the output of the AND gate 31 is at a high level. On the other hand, since the output of the AND gate 31 is at a high level, the selector 37 selects the data “D2” that has been error-corrected by the ECC circuit 22 held in the register (HLDR) 26. Therefore, “D2” is output as the output (RDOUT) of the semiconductor memory device 20.

アドレス信号(ADIN)として"3"、"4"が供給された場合についても、上記で説明したアドレス信号(ADIN)として"0"が供給された場合と同様である。   The case where “3” and “4” are supplied as the address signal (ADIN) is the same as the case where “0” is supplied as the address signal (ADIN) described above.

次に、アドレス"5"への書き込み(つまり、WEIN="1")が実施される場合(符号50で示す)について説明する。アドレス信号(ADIN)としてADIN="5"が供給されると、比較器29は、レジスタ23に保持されているADR="4"と、供給されたアドレス信号ADIN="5"とが異なるのでANDゲート31にロウレベルの信号を出力する。よって、ANDゲート31の出力はロウレベルとなる。このとき、セレクタ32の出力はロウレベルとなる。   Next, a description will be given of a case where writing to the address “5” (ie, WEIN = “1”) is performed (indicated by reference numeral 50). When ADIN = “5” is supplied as the address signal (ADIN), the comparator 29 differs between ADR = “4” held in the register 23 and the supplied address signal ADIN = “5”. A low level signal is output to the AND gate 31. Therefore, the output of the AND gate 31 is at a low level. At this time, the output of the selector 32 is at a low level.

一方、端子WEINからはハイレベルのライトイネーブル信号(WEIN)が供給されるので、ORゲート39は、メモリセル21のライトイネーブル(WE)にハイレベルの信号を出力する。このとき、セレクタ40は、ANDゲート31の出力がロウレベルであるので、端子WDINから供給された書き込みデータ(WDIN="D5")をメモリセル21の書き込みデータ(WD)として出力する。また、ANDゲート31の出力はロウレベルであるので、セレクタ35はアドレス信号(ADIN)である"5"を出力する。よって、メモリセル21のアドレス(AD)には、アドレス信号(ADIN)である"5"が供給される。そして、メモリセル21のライトイネーブル(WE)がハイレベルであるので、アドレス(AD="5")に対応した書き込みデータ(WD="D5")がメモリセル21に書き込まれる。   On the other hand, since a high level write enable signal (WEIN) is supplied from the terminal WEIN, the OR gate 39 outputs a high level signal to the write enable (WE) of the memory cell 21. At this time, since the output of the AND gate 31 is at the low level, the selector 40 outputs the write data (WDIN = “D5”) supplied from the terminal WDIN as the write data (WD) of the memory cell 21. Since the output of the AND gate 31 is at a low level, the selector 35 outputs “5” which is an address signal (ADIN). Therefore, “5” which is the address signal (ADIN) is supplied to the address (AD) of the memory cell 21. Since the write enable (WE) of the memory cell 21 is at a high level, write data (WD = “D5”) corresponding to the address (AD = “5”) is written into the memory cell 21.

なお、この場合はANDゲート31の出力がロウレベルであるので、セレクタ36、37はECC回路22の出力を選択する。しかし、メモリセル21からは読み出しデータ(RD)が出力されないので、半導体記憶装置20のデータ出力(RDOUT)、レジスタ(HLDR)26、およびレジスタ(REWR)27の値は"不定"となる。   In this case, since the output of the AND gate 31 is at a low level, the selectors 36 and 37 select the output of the ECC circuit 22. However, since the read data (RD) is not output from the memory cell 21, the values of the data output (RDOUT), the register (HLDR) 26, and the register (REWR) 27 of the semiconductor memory device 20 are “undefined”.

次に、アドレス信号(ADIN)として4サイクル以上同じアドレス"5"が供給され、かつ読み出しを行なっている場合(符号51〜54で示す)について説明する。
半導体記憶装置20にアドレス信号(ADIN)として1つ目の"5"(符号51で示す)が供給されると、比較器29は、供給されたアドレス信号(ADIN)とレジスタ(ADR)23に保持されている値が共に"5"であるので、ANDゲート31にハイレベルの信号を出力する。一方、ANDゲート30は、供給されたライトイネーブル信号(WEIN)を反転した信号(ハイレベル)とレジスタ(WER)24に保持されている値(ロウレベル)とが異なるので、ANDゲート31にロウレベルの信号を出力する。よって、ANDゲート31の出力はロウレベルとなる。
Next, a case where the same address “5” is supplied as an address signal (ADIN) for four cycles or more and reading is performed (indicated by reference numerals 51 to 54) will be described.
When the first “5” (indicated by reference numeral 51) is supplied as the address signal (ADIN) to the semiconductor memory device 20, the comparator 29 supplies the supplied address signal (ADIN) and the register (ADR) 23. Since the held values are both “5”, a high level signal is output to the AND gate 31. On the other hand, since the AND gate 30 has a signal (high level) obtained by inverting the supplied write enable signal (WEIN) and a value (low level) held in the register (WER) 24, the AND gate 31 has a low level. Output a signal. Therefore, the output of the AND gate 31 is at a low level.

ANDゲート31の出力がロウレベルであるので、セレクタ32は"0"を出力する。ORゲート39は、ライトイネーブル信号(WEIN)およびセレクタ32の出力が共にロウレベルであるので、メモリセル21のライトイネーブル(WE)にロウレベルの信号を出力する。   Since the output of the AND gate 31 is at a low level, the selector 32 outputs “0”. Since the write enable signal (WEIN) and the output of the selector 32 are both at the low level, the OR gate 39 outputs a low level signal to the write enable (WE) of the memory cell 21.

ANDゲート31の出力がロウレベルであるので、セレクタ34はアドレス信号(ADIN)である"5"をレジスタ(PATR)25に保持する。また、ANDゲート31の出力はロウレベルであるので、セレクタ35はアドレス信号(ADIN)である"5"を出力する。よって、メモリセル21のアドレス(AD)には、アドレス信号(ADIN)である"5"が供給される。このとき、メモリセル21は、AD="5"に対応した読み出しデータ(RD="D5")をECC回路22に出力する。セレクタ36は、ANDゲート31の出力がロウレベルであるので、ECC回路22の出力を選択する。レジスタ(HLDR)26はECC回路22の出力"D5"を保持する。また、レジスタ(REWR)27もECC回路22の出力"D5"を保持する。セレクタ37は、ANDゲート31の出力がロウレベルであるので、ECC回路22の出力を選択する。よって、半導体記憶装置20の出力(RDOUT)として"D5"が出力される。   Since the output of the AND gate 31 is at a low level, the selector 34 holds “5” as the address signal (ADIN) in the register (PATR) 25. Since the output of the AND gate 31 is at a low level, the selector 35 outputs “5” which is an address signal (ADIN). Therefore, “5” which is the address signal (ADIN) is supplied to the address (AD) of the memory cell 21. At this time, the memory cell 21 outputs read data (RD = “D5”) corresponding to AD = “5” to the ECC circuit 22. The selector 36 selects the output of the ECC circuit 22 because the output of the AND gate 31 is at a low level. The register (HLDR) 26 holds the output “D5” of the ECC circuit 22. The register (REWR) 27 also holds the output “D5” of the ECC circuit 22. The selector 37 selects the output of the ECC circuit 22 because the output of the AND gate 31 is at a low level. Therefore, “D5” is output as the output (RDOUT) of the semiconductor memory device 20.

次に、半導体記憶装置20にアドレス信号(ADIN)として2つ目の"5"(符号52で示す)が供給されると、比較器29は、供給されたアドレス信号(ADIN)とレジスタ(ADR)23に保持されている値が共に"5"であるので、ANDゲート31にハイレベルの信号を出力する。また、ANDゲート30は、供給されたライトイネーブル信号(WEIN)を反転した信号とレジスタ(WER)24に保持されている値とが共にハイレベルであるので、ANDゲート31にハイレベルの信号を出力する。よって、ANDゲート31の出力はハイレベルとなる。   Next, when the second “5” (indicated by reference numeral 52) is supplied as the address signal (ADIN) to the semiconductor memory device 20, the comparator 29 compares the supplied address signal (ADIN) with the register (ADR). ) Since the values held in 23 are both “5”, a high level signal is output to the AND gate 31. Further, since the AND gate 30 has both a signal obtained by inverting the supplied write enable signal (WEIN) and a value held in the register (WER) 24, the AND gate 31 outputs a high level signal to the AND gate 31. Output. Therefore, the output of the AND gate 31 is at a high level.

セレクタ32は、ANDゲート31の出力がハイレベルであるので、インバータ33の出力を選択する。ここで、レジスタ(TMGR)28に保持されている値がロウレベル("0")であるので、セレクタ32からはハイレベルの信号が出力される。セレクタ34は、ANDゲート31の出力およびセレクタ32の出力が共にハイレベルであるので、レジスタ(PATR)25に保持されている値"5"に1を加えた"6"を出力する。レジスタ(PATR)25は、セレクタ34の出力値"6"を保持する。一方、セレクタ35は、ANDゲート31の出力がハイレベルであるので、レジスタ(PATR)25に既に保持されている値(つまり、セレクタ34で選択される前の値"5")を選択する。   The selector 32 selects the output of the inverter 33 because the output of the AND gate 31 is at a high level. Here, since the value held in the register (TMGR) 28 is low level (“0”), a high level signal is output from the selector 32. Since both the output of the AND gate 31 and the output of the selector 32 are at the high level, the selector 34 outputs “6” obtained by adding 1 to the value “5” held in the register (PATR) 25. The register (PATR) 25 holds the output value “6” of the selector 34. On the other hand, since the output of the AND gate 31 is at a high level, the selector 35 selects the value already held in the register (PATR) 25 (that is, the value “5” before being selected by the selector 34).

セレクタ32の出力がハイレベルであるので、ORゲート39はメモリセル21のライトイネーブル(WE)にハイレベルの信号を出力する。メモリセル21のアドレス(AD)には、セレクタ35の出力値である"5"が供給される。セレクタ40は、ANDゲート31の出力がハイレベルであるので、レジスタ(REWR)27の値であるREWR="D5"をメモリセル21の書き込みデータ(WD)として供給する。このとき、メモリセル21のライトイネーブル(WE)がハイレベルであるので、アドレス(AD="5")に対応した書き込みデータ(WD="D5")がメモリセル21に再書き込みされる。   Since the output of the selector 32 is at a high level, the OR gate 39 outputs a high level signal to the write enable (WE) of the memory cell 21. The address (AD) of the memory cell 21 is supplied with “5” that is the output value of the selector 35. Since the output of the AND gate 31 is at a high level, the selector 40 supplies REWR = “D5”, which is the value of the register (REWR) 27, as write data (WD) of the memory cell 21. At this time, since the write enable (WE) of the memory cell 21 is at the high level, the write data (WD = “D5”) corresponding to the address (AD = “5”) is rewritten to the memory cell 21.

なお、このときメモリセル21は再書き込み動作を実施しているため、メモリセル21から読み出しデータ(RD)は出力されない。よって、レジスタ(REWR)27に保持されるデータは"不定"となる。しかし、この"不定"のデータはメモリセル21への再書き込み用データとして使用されないため、半導体記憶装置20の動作には影響しない。   At this time, since the memory cell 21 is performing a rewrite operation, read data (RD) is not output from the memory cell 21. Therefore, the data held in the register (REWR) 27 becomes “undefined”. However, since this “indefinite” data is not used as rewrite data to the memory cell 21, it does not affect the operation of the semiconductor memory device 20.

セレクタ36は、ANDゲート31の出力がハイレベルであるので、レジスタ(HLDR)26の値をホールドする。一方、セレクタ37はANDゲート31の出力がハイレベルであるので、レジスタ(HLDR)26に保持されているECC回路22でエラー訂正済みのデータ"D5"を選択する。よって、半導体記憶装置20の出力(RDOUT)として"D5"が出力される。   The selector 36 holds the value of the register (HLDR) 26 because the output of the AND gate 31 is at a high level. On the other hand, since the output of the AND gate 31 is at the high level, the selector 37 selects the error-corrected data “D5” by the ECC circuit 22 held in the register (HLDR) 26. Therefore, “D5” is output as the output (RDOUT) of the semiconductor memory device 20.

次に、半導体記憶装置20にアドレス信号(ADIN)として3つ目の"5"(符号53で示す)が供給されると、比較器29は、供給されたアドレス信号(ADIN)とレジスタ(ADR)23に保持されている値が共に"5"であるので、ANDゲート31にハイレベルの信号を出力する。また、ANDゲート30は、供給されたライトイネーブル信号(WEIN)を反転した信号とレジスタ(WER)24に保持されている値とが共にハイレベルであるので、ANDゲート31にハイレベルの信号を出力する。よって、ANDゲート31の出力はハイレベルとなる。   Next, when the third “5” (indicated by reference numeral 53) is supplied as the address signal (ADIN) to the semiconductor memory device 20, the comparator 29 compares the supplied address signal (ADIN) and the register (ADR). ) Since the values held in 23 are both “5”, a high level signal is output to the AND gate 31. Further, since the AND gate 30 has both a signal obtained by inverting the supplied write enable signal (WEIN) and a value held in the register (WER) 24, the AND gate 31 outputs a high level signal to the AND gate 31. Output. Therefore, the output of the AND gate 31 is at a high level.

セレクタ32は、ANDゲート31の出力がハイレベルであるので、インバータ33の出力を選択する。ここで、レジスタ(TMGR)28に保持されている値がハイレベル("1")であるので、セレクタ32からはロウレベルの信号が出力される。セレクタ34は、ANDゲート31の出力がハイレベル、セレクタ32の出力がロウレベルであるので、レジスタ(PATR)25に保持されている値"6"を出力する。レジスタ(PATR)25は、セレクタ34の出力値"6"を保持する。一方、セレクタ35は、ANDゲート31の出力がハイレベルであるので、レジスタ(PATR)25に既に保持されている値"6"を選択する。   The selector 32 selects the output of the inverter 33 because the output of the AND gate 31 is at a high level. Here, since the value held in the register (TMGR) 28 is high level (“1”), a low level signal is output from the selector 32. The selector 34 outputs the value “6” held in the register (PATR) 25 because the output of the AND gate 31 is high and the output of the selector 32 is low. The register (PATR) 25 holds the output value “6” of the selector 34. On the other hand, the selector 35 selects the value “6” already held in the register (PATR) 25 because the output of the AND gate 31 is at a high level.

ORゲート39は、セレクタ32の出力および供給されたライトイネーブル信号(WEIN)が共にロウレベルであるので、メモリセル21のライトイネーブル(WE)にロウレベルの信号を出力する。メモリセル21のアドレス(AD)には、セレクタ35の出力値である"6"が供給される。このとき、メモリセル21は、AD="6"に対応した読み出しデータ(RD="D6")をECC回路22に出力する。レジスタ(REWR)27はECC回路22の出力"D6"を保持する。セレクタ36は、ANDゲート31の出力がハイレベルであるので、レジスタ(HLDR)26の値"D5"をホールドする。セレクタ37はANDゲート31の出力がハイレベルであるので、レジスタ(HLDR)26に保持されているECC回路22でエラー訂正済みのデータ"D5"を選択する。よって、半導体記憶装置20の出力(RDOUT)として"D5"が出力される。   Since the output of the selector 32 and the supplied write enable signal (WEIN) are both at the low level, the OR gate 39 outputs a low level signal to the write enable (WE) of the memory cell 21. The address (AD) of the memory cell 21 is supplied with “6” that is the output value of the selector 35. At this time, the memory cell 21 outputs read data (RD = “D6”) corresponding to AD = “6” to the ECC circuit 22. The register (REWR) 27 holds the output “D6” of the ECC circuit 22. The selector 36 holds the value “D5” of the register (HLDR) 26 because the output of the AND gate 31 is at a high level. Since the output of the AND gate 31 is at a high level, the selector 37 selects the data “D5” that has been error-corrected by the ECC circuit 22 held in the register (HLDR) 26. Therefore, “D5” is output as the output (RDOUT) of the semiconductor memory device 20.

次に、半導体記憶装置20にアドレス信号(ADIN)として4つ目の"5"(符号54で示す)が供給されると、比較器29は、供給されたアドレス信号(ADIN)とレジスタ(ADR)23に保持されている値が共に"5"であるので、ANDゲート31にハイレベルの信号を出力する。また、ANDゲート30は、供給されたライトイネーブル信号(WEIN)を反転した信号とレジスタ(WER)24に保持されている値とが共にハイレベルであるので、ANDゲート31にハイレベルの信号を出力する。よって、ANDゲート31の出力はハイレベルとなる。   Next, when the fourth “5” (indicated by reference numeral 54) is supplied as the address signal (ADIN) to the semiconductor memory device 20, the comparator 29 compares the supplied address signal (ADIN) with the register (ADR). ) Since the values held in 23 are both “5”, a high level signal is output to the AND gate 31. Further, since the AND gate 30 has both a signal obtained by inverting the supplied write enable signal (WEIN) and a value held in the register (WER) 24, the AND gate 31 outputs a high level signal to the AND gate 31. Output. Therefore, the output of the AND gate 31 is at a high level.

セレクタ32は、ANDゲート31の出力がハイレベルであるので、インバータ33の出力を選択する。ここで、レジスタ(TMGR)28に保持されている値がロウレベル("0")であるので、セレクタ32からはハイレベルの信号が出力される。セレクタ34は、ANDゲート31の出力およびセレクタ32の出力が共にハイレベルであるので、レジスタ(PATR)25に保持されている値"6"に1を加えた"7"を出力する。レジスタ(PATR)25は、セレクタ34の出力値"7"を保持する。一方、セレクタ35は、ANDゲート31の出力がハイレベルであるので、レジスタ(PATR)25に既に保持されている値(つまり、セレクタ34で選択される前の値"6")を選択する。   The selector 32 selects the output of the inverter 33 because the output of the AND gate 31 is at a high level. Here, since the value held in the register (TMGR) 28 is low level (“0”), a high level signal is output from the selector 32. Since both the output of the AND gate 31 and the output of the selector 32 are at a high level, the selector 34 outputs “7” obtained by adding 1 to the value “6” held in the register (PATR) 25. The register (PATR) 25 holds the output value “7” of the selector 34. On the other hand, since the output of the AND gate 31 is at a high level, the selector 35 selects the value already held in the register (PATR) 25 (that is, the value “6” before being selected by the selector 34).

セレクタ32の出力がハイレベルであるので、ORゲート39はメモリセル21のライトイネーブル(WE)にハイレベルの信号を出力する。メモリセル21のアドレス(AD)には、セレクタ35の出力値である"6"が供給される。セレクタ40は、ANDゲート31の出力がハイレベルであるので、レジスタ(REWR)27の値であるREWR="D6"をメモリセル21の書き込みデータ(WD)として供給する。このとき、メモリセル21のライトイネーブル(WE)がハイレベルであるので、アドレス(AD="6")に対応した書き込みデータ(WD="D6")がメモリセル21に再書き込みされる。   Since the output of the selector 32 is at a high level, the OR gate 39 outputs a high level signal to the write enable (WE) of the memory cell 21. The address (AD) of the memory cell 21 is supplied with “6” that is the output value of the selector 35. Since the output of the AND gate 31 is at a high level, the selector 40 supplies REWR = “D6”, which is the value of the register (REWR) 27, as write data (WD) of the memory cell 21. At this time, since the write enable (WE) of the memory cell 21 is at the high level, the write data (WD = “D6”) corresponding to the address (AD = “6”) is rewritten to the memory cell 21.

セレクタ36は、ANDゲート31の出力がハイレベルであるので、レジスタ(HLDR)26の値"D5"をホールドする。一方、セレクタ37はANDゲート31の出力がハイレベルであるので、レジスタ(HLDR)26に保持されているECC回路22でエラー訂正済みのデータ"D5"を選択する。よって、半導体記憶装置20の出力(RDOUT)として"D5"が出力される。   The selector 36 holds the value “D5” of the register (HLDR) 26 because the output of the AND gate 31 is at a high level. On the other hand, since the output of the AND gate 31 is at the high level, the selector 37 selects the error-corrected data “D5” by the ECC circuit 22 held in the register (HLDR) 26. Therefore, “D5” is output as the output (RDOUT) of the semiconductor memory device 20.

以降、半導体記憶装置20にアドレス信号(ADIN)として"5"が供給され続ける限り、上記で説明した動作と同様の動作を繰り返す。
以上で説明した本実施の形態にかかる半導体記憶装置の動作をまとめると次のようになる。
Thereafter, as long as “5” is continuously supplied as the address signal (ADIN) to the semiconductor memory device 20, the same operation as described above is repeated.
The operation of the semiconductor memory device according to the present embodiment described above is summarized as follows.

(1)同一アドレスn(nは任意の整数とする)が入力される1サイクル目に対応するタイミング。
ANDゲート31の出力はロウレベル、セレクタ32出力はロウレベルとなる。アドレス生成手段47は、入力アドレス(ADIN)nをアドレスとして出力する。メモリセル21は、アドレスnに対応した読み出しデータ(RD=Dn)を出力する。レジスタ(HLDR)26およびレジスタ(REWR)27はアドレスnに応じたエラー訂正後のデータDnを保持する。また、セレクタ37は、ECC回路22から出力されたアドレスnに対応したエラー訂正後のデータDnを半導体記憶装置の出力(RDOUT)として出力する。
(1) Timing corresponding to the first cycle in which the same address n (n is an arbitrary integer) is input.
The output of the AND gate 31 is low level, and the output of the selector 32 is low level. The address generator 47 outputs the input address (ADIN) n as an address. The memory cell 21 outputs read data (RD = Dn) corresponding to the address n. The register (HLDR) 26 and the register (REWR) 27 hold data Dn after error correction corresponding to the address n. The selector 37 outputs the error-corrected data Dn corresponding to the address n output from the ECC circuit 22 as an output (RDOUT) of the semiconductor memory device.

(2)同一アドレスnが入力される2サイクル目に対応するタイミング。
ANDゲート31の出力はハイレベル、セレクタ32出力はハイレベルとなる。アドレス生成手段47はアドレスをインクリメントし、このアドレスn+1をレジスタ(PATR)25に保持する(このアドレスn+1は、次回のサイクルで用いられる)。このとき、アドレス生成手段47はアドレスnを出力する。メモリセル21はアドレスnに対応づけてレジスタ(REWR)27に保持されているデータDnを書き込む(再書き込み)。レジスタ(HLDR)26は、アドレスnに対応した読み出しデータとしてレジスタ(HLDR)26に保持されているデータDnを出力する。セレクタ37は、レジスタ(HLDR)26に保持されているデータDnを半導体記憶装置の出力(RDOUT)として出力する。
(2) Timing corresponding to the second cycle in which the same address n is input.
The output of the AND gate 31 is high level, and the output of the selector 32 is high level. The address generation means 47 increments the address and holds this address n + 1 in the register (PATR) 25 (this address n + 1 is used in the next cycle). At this time, the address generation means 47 outputs the address n. The memory cell 21 writes the data Dn held in the register (REWR) 27 in association with the address n (rewrite). The register (HLDR) 26 outputs data Dn held in the register (HLDR) 26 as read data corresponding to the address n. The selector 37 outputs the data Dn held in the register (HLDR) 26 as an output (RDOUT) of the semiconductor memory device.

(3)同一アドレスnが入力される3サイクル目に対応するタイミング。
ANDゲート31の出力はハイレベル、セレクタ32出力はロウレベルとなる。アドレス生成手段47はレジスタ(PATR)25に保持されているアドレスn+1をホールドする。このとき、アドレス生成手段47はアドレスn+1を出力する。メモリセル21は、アドレスn+1に対応した読み出しデータ(RD=Dn+1)を出力する。レジスタ(REWR)27はアドレスn+1に対応したエラー訂正後のデータDn+1を保持する。また、セレクタ37は、レジスタ(HLDR)26に保持されているアドレスnに対応したデータDnを半導体記憶装置の出力(RDOUT)として出力する。
(3) Timing corresponding to the third cycle in which the same address n is input.
The output of the AND gate 31 is high level, and the output of the selector 32 is low level. The address generation means 47 holds the address n + 1 held in the register (PATR) 25. At this time, the address generator 47 outputs the address n + 1. The memory cell 21 outputs read data (RD = Dn + 1) corresponding to the address n + 1. The register (REWR) 27 holds data Dn + 1 after error correction corresponding to the address n + 1. The selector 37 outputs data Dn corresponding to the address n held in the register (HLDR) 26 as an output (RDOUT) of the semiconductor memory device.

(4)同一アドレスnが入力される4サイクル目に対応するタイミング。
ANDゲート31の出力はハイレベル、セレクタ32出力はハイレベルとなる。アドレス生成手段47はアドレスをインクリメントし、このアドレスn+2をレジスタ(PATR)25に保持する(このアドレスn+2は、次回のサイクルで用いられる)。このとき、アドレス生成手段47はアドレスn+1を出力する。メモリセル21はアドレスn+1に対応づけてレジスタ(REWR)27に保持されているデータDn+1を書き込む(再書き込み)。レジスタ(HLDR)26は、アドレスnに対応した読み出しデータとしてレジスタ(HLDR)26に保持されているデータDnを出力する。セレクタ37は、レジスタ(HLDR)26に保持されているデータDnを半導体記憶装置の出力(RDOUT)として出力する。
(4) Timing corresponding to the fourth cycle in which the same address n is input.
The output of the AND gate 31 is high level, and the output of the selector 32 is high level. The address generation means 47 increments the address and holds this address n + 2 in the register (PATR) 25 (this address n + 2 is used in the next cycle). At this time, the address generator 47 outputs the address n + 1. The memory cell 21 writes the data Dn + 1 held in the register (REWR) 27 in association with the address n + 1 (rewrite). The register (HLDR) 26 outputs data Dn held in the register (HLDR) 26 as read data corresponding to the address n. The selector 37 outputs the data Dn held in the register (HLDR) 26 as an output (RDOUT) of the semiconductor memory device.

以上で説明したように、本実施の形態にかかる半導体記憶装置20では、4サイクル以上同じアドレスで読み出しを行なっている場合、再書き込みを実施した読み出しアドレスから2サイクルに1回の割合でアドレスをインクリメントし、インクリメント後のアドレスを用いてメモリセル21からデータを読み出し、当該データをECC回路22で訂正後、この訂正後のデータを同一アドレス(インクリメント後のアドレス)を用いて再書き込みしている。このとき、半導体記憶装置20は出力(RDOUT)としてレジスタ(HLDR)26に保持されているデータを出力しているので、入力アドレス(ADIN)に対応したデータを出力していることになる。   As described above, in the semiconductor memory device 20 according to the present embodiment, when reading is performed at the same address for four cycles or more, the address is set at a rate of once every two cycles from the read address at which rewriting is performed. The data is read out from the memory cell 21 using the incremented address, the data is corrected by the ECC circuit 22, and the corrected data is rewritten using the same address (incremented address). . At this time, since the semiconductor memory device 20 outputs the data held in the register (HLDR) 26 as the output (RDOUT), the data corresponding to the input address (ADIN) is output.

このように、本実施の形態にかかる半導体記憶装置20では、メモリセル21からの読み出しとメモリセル21への書き込みを交互に繰り返す巡回機能を実装しているので、半導体記憶装置の信頼性を向上させることができる。よって、本実施の形態にかかる発明により、プログラム処理性能を損なうことなくデータの信頼性を向上させることが可能な半導体記憶装置およびその制御方法を提供することができる。   Thus, in the semiconductor memory device 20 according to the present embodiment, since the cyclic function that alternately repeats reading from the memory cell 21 and writing to the memory cell 21 is implemented, the reliability of the semiconductor memory device is improved. Can be made. Therefore, the invention according to the present embodiment can provide a semiconductor memory device and a control method thereof that can improve data reliability without deteriorating program processing performance.

なお、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。上記の実施の形態では1サイクルに読み出し又は書き込みのどちらかしかできない1ポートRAMについて説明したが、本発明はこれに限定されるものではない。例えば、2ポートRAM(1R1Wとも呼ばれる)や4ポートRAM(2R2Wとも呼ばれる)等の多ポートRAMに本発明を適用してもよい。   Note that the present invention is not limited to the above-described embodiment, and can be changed as appropriate without departing from the spirit of the present invention. In the above embodiment, a 1-port RAM that can only be read or written in one cycle has been described. However, the present invention is not limited to this. For example, the present invention may be applied to a multi-port RAM such as a 2-port RAM (also referred to as 1R1W) or a 4-port RAM (also referred to as 2R2W).

以上、本発明を上記実施形態に即して説明したが、上記実施形態の構成にのみ限定されるものではなく、本願特許請求の範囲の請求項の発明の範囲内で当業者であればなし得る各種変形、修正、組み合わせを含むことは勿論である。   Although the present invention has been described with reference to the above embodiment, the present invention is not limited to the configuration of the above embodiment, and can be made by those skilled in the art within the scope of the invention of the claims of the claims of the present application. It goes without saying that various modifications, corrections, and combinations are included.

1、20 半導体記憶装置
2、21 メモリセル
3、22 ECC回路
4、23 レジスタ(ADR)
5、24 レジスタ(WER)
6、27 レジスタ(REWR)
7、29 比較器
8、30 ANDゲート(第1のANDゲート)
9、31 ANDゲート(第2のANDゲート)
10、13、14、32、34、35、36、37、40 セレクタ
11、33、38 インバータ
12、39 ORゲート
15、45 検出手段
25 レジスタ(PATR)
26 レジスタ(HLDR)
28 レジスタ(TMGR)
46 切り替え手段
47 アドレス生成手段
48 データ保持手段
1, 20 Semiconductor memory device 2, 21 Memory cell 3, 22 ECC circuit 4, 23 Register (ADR)
5, 24 registers (WER)
6, 27 Register (REWR)
7, 29 Comparator 8, 30 AND gate (first AND gate)
9, 31 AND gate (second AND gate)
10, 13, 14, 32, 34, 35, 36, 37, 40 Selector 11, 33, 38 Inverter 12, 39 OR gate 15, 45 Detection means 25 Register (PATR)
26 registers (HLDR)
28 registers (TMGR)
46 switching means 47 address generating means 48 data holding means

Claims (7)

アドレスに応じたデータの読み出しまたは書き込みを実施するメモリセルと、
前記メモリセルに対して2サイクル以上同一アドレスで読み出しを行なっていることを検出する検出手段と、
前記メモリセルから読み出されたデータのエラーを訂正するエラー訂正手段と、
前記エラー訂正後のデータを保持するデータ保持手段と、
2サイクルに1回アドレスをインクリメントするアドレス生成手段と、
前記メモリセルからのデータの読み出しまたは前記メモリセルへのデータの書き込みをサイクル毎に交互に切り替える切り替え手段と、を備え、
前記メモリセルは、前記検出手段の検出結果に応じて、前記データ保持手段に保持されている前記データを前記アドレスに対応づけて書き込み、
前記データ保持手段は、前記アドレスに応じた読み出しデータとして前記データ保持手段に保持されている前記データを出力し、
更に、前記メモリセルは、前記切り替え手段からの信号に応じて、前記アドレス生成手段で生成されたアドレスに応じたデータの読み出し、または当該アドレスに対応づけた前記データ保持手段に保持されている前記データの書き込みを実施する、
半導体記憶装置。
A memory cell that reads or writes data according to an address;
Detecting means for detecting that the memory cell is read at the same address for two cycles or more;
Error correction means for correcting an error in data read from the memory cell;
Data holding means for holding the error-corrected data;
Address generating means for incrementing the address once every two cycles;
Switching means for alternately switching the reading of data from the memory cell or the writing of data to the memory cell every cycle ,
The memory cell writes the data held in the data holding unit in association with the address according to the detection result of the detection unit,
The data holding means outputs the data held in the data holding means as read data corresponding to the address ,
Further, the memory cell reads the data according to the address generated by the address generation unit or holds the data in the data holding unit associated with the address according to a signal from the switching unit. Write data,
Semiconductor memory device.
前記同一アドレスが入力される1サイクル目に対応するタイミングにおいて、前記データ保持手段は前記アドレスに対応した前記エラー訂正後のデータを保持し、
前記同一アドレスが入力される2サイクル目に対応するタイミングにおいて、前記メモリセルは前記アドレスに対応づけて前記データ保持手段に保持されている前記データを書き込み、前記データ保持手段は、前記アドレスに対応した読み出しデータとして前記データ保持手段に保持されている前記データを出力する、
請求項1に記載の半導体記憶装置。
At the timing corresponding to the first cycle in which the same address is input, the data holding means holds the error-corrected data corresponding to the address,
At the timing corresponding to the second cycle in which the same address is input, the memory cell writes the data held in the data holding means in association with the address, and the data holding means corresponds to the address. Output the data held in the data holding means as read data
The semiconductor memory device according to claim 1.
前記データ保持手段は、前記エラー訂正後のデータを保持する第1のデータ保持手段と、前記エラー訂正後のデータを保持すると共に当該データを前記検出手段の検出結果に応じてホールド可能な第2のデータ保持手段と、を備え、
前記同一アドレスn(nは任意の整数とする)が入力される1サイクル目に対応するタイミングにおいて、前記第1および第2のデータ保持手段はアドレスnに対応した前記エラー訂正後のデータを保持し、
前記同一アドレスnが入力される2サイクル目に対応するタイミングにおいて、前記メモリセルは前記アドレスnに対応づけて前記第1のデータ保持手段に保持されている前記データを書き込み、前記第2のデータ保持手段は、前記アドレスnに対応した読み出しデータとして前記第2のデータ保持手段に保持されている前記データを出力し、
前記同一アドレスnが入力される3サイクル目に対応するタイミングにおいて、前記第1のデータ保持手段は前記アドレス生成手段で生成されたアドレスn+1に対応した前記エラー訂正後のデータを保持し、
前記同一アドレスnが入力される4サイクル目に対応するタイミングにおいて、前記メモリセルは前記アドレスn+1に対応づけて前記第1のデータ保持手段に保持されている前記データを書き込み、前記第2のデータ保持手段は、前記アドレスnに対応した読み出しデータとして前記第2のデータ保持手段に保持されている前記データを出力する、
請求項に記載の半導体記憶装置。
The data holding means is a first data holding means for holding the data after error correction, and a second data holding means for holding the data after error correction and holding the data according to the detection result of the detection means. Data holding means, and
At the timing corresponding to the first cycle in which the same address n (n is an arbitrary integer) is input, the first and second data holding means hold the error-corrected data corresponding to the address n And
At a timing corresponding to the second cycle in which the same address n is input, the memory cell writes the data held in the first data holding means in association with the address n, and the second data The holding means outputs the data held in the second data holding means as read data corresponding to the address n,
At the timing corresponding to the third cycle in which the same address n is input, the first data holding means holds the error-corrected data corresponding to the address n + 1 generated by the address generating means,
At a timing corresponding to the fourth cycle in which the same address n is input, the memory cell writes the data held in the first data holding means in association with the address n + 1, and the second data A holding unit that outputs the data held in the second data holding unit as read data corresponding to the address n;
The semiconductor memory device according to claim 1 .
アドレスに応じたデータの読み出しまたは書き込みを実施するメモリセルと、
前記メモリセルに対して2サイクル以上同一アドレスで読み出しを行なっていることを検出する検出手段と、
前記メモリセルから読み出されたデータのエラーを訂正するエラー訂正手段と、
前記エラー訂正後のデータを保持するデータ保持手段と、
半導体記憶装置に供給される書き込みデータと、前記データ保持手段に保持されている前記データと、を選択的に出力する第1のセレクタと、を備え、
前記メモリセルへの書き込みを指示するライトイネーブル信号が前記半導体記憶装置に供給された場合、前記第1のセレクタは前記書き込みデータを前記メモリセルに供給し、
前記検出手段が前記メモリセルに対して2サイクル以上同一アドレスで読み出しを行なっていることを検出した場合、前記第1のセレクタは前記アドレスに応じた読み出しデータとして前記データ保持手段に保持されている前記データを前記メモリセルに供給し、前記メモリセルは前記データ保持手段に保持されている前記データを前記アドレスに対応づけて書き込
半導体記憶装置。
A memory cell that reads or writes data according to an address;
Detecting means for detecting that the memory cell is read at the same address for two cycles or more;
Error correction means for correcting an error in data read from the memory cell;
Data holding means for holding the error-corrected data;
A first selector that selectively outputs write data supplied to the semiconductor memory device and the data held in the data holding means ;
When a write enable signal instructing writing to the memory cell is supplied to the semiconductor memory device, the first selector supplies the write data to the memory cell;
When the detecting means detects that the memory cell is read at the same address for two cycles or more, the first selector is held in the data holding means as read data corresponding to the address. the data was supplied to the memory cell, the memory cell write No write the data held before Symbol data holding means associated to said address,
Semiconductor memory device.
前記半導体記憶装置に供給される書き込みデータと、前記第1のデータ保持手段に保持されている前記データと、を選択的に出力する第2のセレクタを更に備え、
前記メモリセルへの書き込みを指示するライトイネーブル信号が前記半導体記憶装置に供給された場合、前記第2のセレクタは前記書き込みデータを前記メモリセルに供給し、
前記切り替え手段が前記メモリセルへのデータの書き込みを指示する信号を出力した場合、前記第2のセレクタは前記第1のデータ保持手段に保持されている前記データを前記メモリセルに供給する、
請求項に記載の半導体記憶装置。
A second selector for selectively outputting the write data supplied to the semiconductor memory device and the data held in the first data holding means;
When a write enable signal instructing writing to the memory cell is supplied to the semiconductor memory device, the second selector supplies the write data to the memory cell;
When the switching means outputs a signal for instructing data writing to the memory cell, the second selector supplies the data held in the first data holding means to the memory cell.
The semiconductor memory device according to claim 3 .
アドレスに応じたデータの読み出しまたは書き込みを実施するメモリセルと、
前記メモリセルに対して2サイクル以上同一アドレスで読み出しを行なっていることを検出する検出手段と、
前記メモリセルから読み出されたデータのエラーを訂正するエラー訂正手段と、
前記エラー訂正後のデータを保持するデータ保持手段と、を備え、
前記メモリセルは、前記検出手段の検出結果に応じて、前記データ保持手段に保持されている前記データを前記アドレスに対応づけて書き込み、
前記データ保持手段は、前記アドレスに応じた読み出しデータとして前記データ保持手段に保持されている前記データを出力し、
前記検出手段は、
一方の入力に半導体記憶装置に供給される前記アドレスが供給され、他方の入力に第1のレジスタを介して前記アドレスが供給される比較器と、
一方の入力に前記半導体記憶装置に供給されるライトイネーブル信号が反転された信号が供給され、他方の入力に第2のレジスタを介して前記ライトイネーブル信号が反転された信号が供給される第1のANDゲートと、
一方の入力に前記比較器の出力が供給され、他方の入力に前記第1のANDゲートの出力が供給される第2のANDゲートと、を備える
半導体記憶装置。
A memory cell that reads or writes data according to an address;
Detecting means for detecting that the memory cell is read at the same address for two cycles or more;
Error correction means for correcting an error in data read from the memory cell;
Data holding means for holding the data after error correction,
The memory cell writes the data held in the data holding unit in association with the address according to the detection result of the detection unit,
The data holding means outputs the data held in the data holding means as read data corresponding to the address,
The detection means includes
A comparator supplied to one input with the address supplied to the semiconductor memory device and supplied to the other input via a first register;
A signal obtained by inverting the write enable signal supplied to the semiconductor memory device is supplied to one input, and a signal obtained by inverting the write enable signal is supplied to the other input via a second register. AND gate of
A semiconductor memory device comprising: a second AND gate having one input supplied with the output of the comparator and the other input supplied with the output of the first AND gate .
半導体記憶装置の制御方法であって、
前記半導体記憶装置は、
アドレスに応じたデータの読み出しまたは書き込みを実施するメモリセルと、
前記メモリセルに対して2サイクル以上同一アドレスで読み出しを行なっていることを検出する検出手段と、
前記メモリセルから読み出されたデータのエラーを訂正するエラー訂正手段と、
前記エラー訂正後のデータを保持する第1のデータ保持手段と、
前記エラー訂正後のデータを保持すると共に当該データを前記検出手段の検出結果に応じてホールド可能な第2のデータ保持手段と、
2サイクルに1回アドレスをインクリメントするアドレス生成手段と、
前記メモリセルからのデータの読み出しまたは前記メモリセルへのデータの書き込みをサイクル毎に交互に切り替える切り替え手段と、を備え、
前記同一アドレスn(nは任意の整数とする)が入力される1サイクル目に対応するタイミングにおいて、前記第1および第2のデータ保持手段がアドレスnに対応した前記エラー訂正後のデータを保持し、
前記同一アドレスnが入力される2サイクル目に対応するタイミングにおいて、前記メモリセルが前記アドレスnに対応づけて前記第1のデータ保持手段に保持されている前記データを書き込み、前記第2のデータ保持手段が、前記アドレスnに対応した読み出しデータとして前記第2のデータ保持手段に保持されている前記データを出力し、
前記同一アドレスnが入力される3サイクル目に対応するタイミングにおいて、前記第1のデータ保持手段が前記アドレス生成手段で生成されたアドレスn+1に対応した前記エラー訂正後のデータを保持し、
前記同一アドレスnが入力される4サイクル目に対応するタイミングにおいて、前記メモリセルが前記アドレスn+1に対応づけて前記第1のデータ保持手段に保持されている前記データを書き込み、前記第2のデータ保持手段が、前記アドレスnに対応した読み出しデータとして前記第2のデータ保持手段に保持されている前記データを出力する、
半導体記憶装置の制御方法。
A method for controlling a semiconductor memory device, comprising:
The semiconductor memory device
A memory cell that reads or writes data according to an address;
Detecting means for detecting that the memory cell is read at the same address for two cycles or more;
Error correction means for correcting an error in data read from the memory cell;
First data holding means for holding the error-corrected data;
Second data holding means capable of holding the error-corrected data and holding the data according to the detection result of the detection means;
Address generating means for incrementing the address once every two cycles;
Switching means for alternately switching the reading of data from the memory cell or the writing of data to the memory cell every cycle ,
At the timing corresponding to the first cycle when the same address n (n is an arbitrary integer) is input, the first and second data holding means hold the data after error correction corresponding to the address n. And
At the timing corresponding to the second cycle in which the same address n is input, the memory cell writes the data held in the first data holding means in association with the address n, and the second data A holding unit outputs the data held in the second data holding unit as read data corresponding to the address n,
At the timing corresponding to the third cycle in which the same address n is input, the first data holding means holds the error-corrected data corresponding to the address n + 1 generated by the address generating means,
At the timing corresponding to the fourth cycle in which the same address n is input, the memory cell writes the data held in the first data holding means in association with the address n + 1, and the second data Holding means outputs the data held in the second data holding means as read data corresponding to the address n;
A method for controlling a semiconductor memory device.
JP2010278836A 2010-12-15 2010-12-15 Semiconductor memory device and control method thereof Expired - Fee Related JP5344634B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010278836A JP5344634B2 (en) 2010-12-15 2010-12-15 Semiconductor memory device and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010278836A JP5344634B2 (en) 2010-12-15 2010-12-15 Semiconductor memory device and control method thereof

Publications (2)

Publication Number Publication Date
JP2012128902A JP2012128902A (en) 2012-07-05
JP5344634B2 true JP5344634B2 (en) 2013-11-20

Family

ID=46645767

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010278836A Expired - Fee Related JP5344634B2 (en) 2010-12-15 2010-12-15 Semiconductor memory device and control method thereof

Country Status (1)

Country Link
JP (1) JP5344634B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6361499A (en) * 1986-08-29 1988-03-17 Nec Corp Semiconductor memory device and its driving method
JPH04219700A (en) * 1990-12-19 1992-08-10 Nec Field Service Ltd Semiconductor memory
JP4418153B2 (en) * 2002-12-27 2010-02-17 株式会社ルネサステクノロジ Semiconductor device

Also Published As

Publication number Publication date
JP2012128902A (en) 2012-07-05

Similar Documents

Publication Publication Date Title
US10230402B2 (en) Data processing apparatus
JP7137569B2 (en) Error correction code memory
JP4960413B2 (en) Semiconductor memory device
JP5908375B2 (en) Semiconductor memory device
CN100541440C (en) Semiconductor memory device and pseudo SRAM
US8687440B2 (en) Semiconductor memory device
JP2006209900A (en) Memory circuit
US10325669B2 (en) Error information storage circuit and semiconductor apparatus including the same
CN1983424B (en) Error correction device and correction method
US8044695B2 (en) Semiconductor integrated circuit including a master-slave flip-flop
JP4793741B2 (en) Error correction circuit and error correction method
JP5151413B2 (en) Data holding circuit
JP4102313B2 (en) Semiconductor integrated circuit device
JP6004463B2 (en) Storage device and control method thereof
JP5344634B2 (en) Semiconductor memory device and control method thereof
CN115220790A (en) Data processing method, processor and electronic equipment
JP4889343B2 (en) Semiconductor memory device
JP2015001774A (en) Semiconductor integrated circuit and processing method thereof
US12380933B2 (en) Pseudo-static random access memory
JP2014186664A (en) Arithmetic unit and error processing method
JP3123855B2 (en) Patrol control circuit of memory device
CN112540866B (en) Memory device and data access method thereof
CN112289366B (en) Memory storage device and data access method
JPH1153267A (en) Memory data error automatic correcting circuit
JP2010140132A (en) Memory system and memory controller

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130305

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130417

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: 20130716

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130808

R150 Certificate of patent or registration of utility model

Ref document number: 5344634

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees