JP2005044386A - Semiconductor storage device and microcomputer - Google Patents

Semiconductor storage device and microcomputer Download PDF

Info

Publication number
JP2005044386A
JP2005044386A JP2003199585A JP2003199585A JP2005044386A JP 2005044386 A JP2005044386 A JP 2005044386A JP 2003199585 A JP2003199585 A JP 2003199585A JP 2003199585 A JP2003199585 A JP 2003199585A JP 2005044386 A JP2005044386 A JP 2005044386A
Authority
JP
Japan
Prior art keywords
data
bit width
circuit
mat
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003199585A
Other languages
Japanese (ja)
Inventor
Yoshio Iioka
義雄 飯岡
Yoshi Kitagawa
嘉 北川
Akira Ota
陽 太田
Tetsuya Saeki
哲也 佐伯
Hisanori Ito
久範 伊東
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.)
Renesas Technology Corp
Hitachi Solutions Technology Ltd
Original Assignee
Renesas Technology Corp
Hitachi ULSI Systems Co 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 Renesas Technology Corp, Hitachi ULSI Systems Co Ltd filed Critical Renesas Technology Corp
Priority to JP2003199585A priority Critical patent/JP2005044386A/en
Publication of JP2005044386A publication Critical patent/JP2005044386A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To minimize an increase of a chip area caused by the addition of an ECC (Error Check and Correct) function. <P>SOLUTION: When a semiconductor storage device includes; a memory mat section (10) in which a plurality of memory mats which are accessed in the largest bit width unit in the valid bit width modifiable according to designation from outside have been arranged and; an indirect peripheral circuit (20) shared with the plurality of memory mats, the indirect peripheral circuit is structured by including an ECC function block circuit (21) for error correction based on a hamming code and a data size alignment circuit (23) which performs data size alignment process according to the valid bit width specified from the outside. A bit configuration of a test mat is reduced by enabling an access to a memory mat with the largest bit width unit in a valid bit width modifiable according to a designation from the outside by setting a data size alignment circuit in a direct peripheral circuit. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、半導体記憶装置例えばSRAM(スタティック・ランダム・アクセス・メモリ)におけるエラー訂正技術に関し、例えばSRAMを含むマイクロコンピュータに適用して有効な技術に関する。
【0002】
【従来の技術】
半導体記憶装置においては、α線によるソフトエラー対策が重要とされる。α線によるソフトエラーとは、宇宙線に含まれるα線(He原子核)やLSIパッケージのレジン等に含まれる放射性原子から放出されたα線がメモリセルに入射することにより、データを破壊する現象である。
【0003】
半導体記憶装置の一例であるSRAMにおいては、メモリセルの記憶素子としてフリップフロップ回路を用いているので、DRAM(ダイナミック・ランダム・アクセス・メモリ)等に比べるとα線によるソフトエラーに対して強い構造となっている。しかしながら、SRAMの大容量化、高速化のためにメモリセル面積が縮小され、システムの低消費電力化のために動作電圧が低減されるにつれて、α線によるソフトエラー耐性が低下しつつあり、SRAMにおいてもα線によるソフトエラー耐性を向上させるための対策が必要となる場合がある。特に、自動車に搭載される制御用マイクロコンピュータにおいてα線によるソフトエラーは、排除しなければならない項目とされる。
【0004】
信頼性の高い産業用計算機は故障が発生しないように工夫されるとともに、仮に故障が発生したとしてもその故障が軽度の場合は処理を続行すると共に重度故障に至る前に予防保全を行う機能を持つ必要がある。このような要求に応えるため、例えばメモリシングルビットエラーでは従来ではECC訂正機構により読み出したデータの訂正を行うと共に訂正したデータをメモリに書き込み、再度同じメモリアドレスでシングルビットエラーが発生した場合は素子故障と判断する診断手段を備えていることが知られている(例えば特許文献1参照)。さらに、ECC訂正したデータを書き込むための付加機構等の特別な機構を持たない汎用の計算機において、メモリの素子故障を診断することを可能とする技術が知られている。
【0005】
【特許文献1】
特開2000−207291号公報(第2段落、図6)
【0006】
【発明が解決しようとする課題】
ECC機能をSRAMに適用するには、メモリエラーを訂正するためのデータ(ハミングコード)を格納する検査用メモリマット、ハミングコード生成とメモリエラーを検出、訂正するECC機能ブロックが必要になる。これらを従来のSRAMに適用することについて本願発明者が検討したところ、SRAMモジュールの面積が大幅に増大することが見いだされた。例えば16kバイト(4kバイト×4マット)の容量を有するSRAMの場合、その1マットの構成は、1kワード×32ビットとされる。さらにこのSRAMは、32ビットの入出力をバイト(8ビット)、ワード(16ビット)、ロングワード(32ビット)とデータサイズを可変にするデータサイズアライメント機能を有する。そのため、このSRAMにECC機能を適用するには、データサイズの最小単位であるバイト(8ビット)単位でECC用の検査マットが必要となる。入出力8ビットに対して必要なECC用検査ビットは、単一ビットエラー訂正で4ビットとなり、1マットに対しては16ビット必要とされる。さらにモジュール全体では16ビット×4マット分で64ビット必要とされる。このため、SRAMモジュールの面積は、ECC機能を有さない場合の1.5倍に増大する。
【0007】
本発明の目的は、ECC機能追加に伴うチップ面積の増加を最小限に抑えるための技術を提供することにある。
【0008】
また、本発明の別の目的は、高速性を劣化させずにエラー検出及び訂正を可能とするための技術を提供することにある。
【0009】
本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。
【0010】
【課題を解決するための手段】
本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。
【0011】
すなわち、外部からの指定に応じて変更可能な有効ビット幅における最大のビット幅単位でアクセスされるメモリマットが複数配置されたメモリマット部と、上記複数のメモリマットによって共有される間接周辺回路とを含んで半導体記憶装置を構成する。このとき、上記間接周辺回路は、ハミングコードに基づくエラー訂正のためのECC機能ブロック回路と、上記ECC機能ブロック回路と外部入出力端子との間に介在され、外部から指定された有効ビット幅に応じたデータサイズアライメント処理を行うデータサイズアライメント回路とを含んで構成する。
【0012】
上記の手段によれば、データサイズアライメント回路を間接周辺回路に設けることにより、外部からの指定に応じて変更可能な有効ビット幅における最大のビット幅単位でメモリマットをアクセスすることができ、その場合において、検査マットの1マット当たりのビット構成は、バイトアクセス対応のビット幅単位でメモリマットをアクセスす場合に比べて低減することができ、このことが、メモリマット部の面積の低減を達成する。
【0013】
また、データ入出力に関する有効ビット幅を外部からの指定に応じて、バイトアクセス対応のビット幅、上記バイトアクセスよりも広いワードアクセス対応のビット幅、上記ワードアクセスよりも広いロングワード対応のビット幅の3段階に変更可能な半導体記憶装置において、上記ロングワード対応のビット幅単位でアクセスされるメモリマットが複数配置されたメモリマット部と、上記複数のメモリマットによって共有される間接周辺回路とを設ける。このとき、上記間接周辺回路は、ハミングコードに基づくエラー訂正のためのECC機能ブロック回路と、上記ECC機能ブロック回路と外部入出力端子との間に介在され、外部から指定された有効ビット幅に応じたデータサイズアライメント処理を行うデータサイズアライメント回路とを含んで構成することができる。
【0014】
上記の手段によれば、ロングワード対応のビット幅単位でメモリマットをアクセスすることができ、その場合において、検査マットの1マット当たりのビット構成は、バイトアクセス対応のビット幅単位でメモリマットをアクセスす場合に比べて低減することができ、このことが、メモリマット部の面積の低減を達成する。
【0015】
上記データサイズアライメント回路は、外部からワードアクセス又はバイトアクセスが指定された場合に、アクセスされない残りのビットについては上記メモリマットの記憶データを割り当てるように構成できる。
【0016】
書き込みサイクルの前半で上記メモリマットからのデータ読み出し動作が行われ、上記書き込みサイクルの後半で上記メモリマットへのデータ書き込み動作が行われるとき、上記データサイズアライメント回路は、外部からワードアクセスあるいバイトアクセスが指定された場合に、アクセスされない残りのビットについては書き込みサイクルの前半で上記メモリマットから読み出されたデータを割り当てるように構成できる。このとき、書き込みサイクルの前半で上記メモリマットからのデータ読み出し動作が行われ、上記書き込みサイクルの後半で上記メモリマットへのデータ書き込み動作が行われることにより、メモリマットや検査マットからのデータ読み出しと、メモリマットや検査マットへのデータ書き込みを別々のサイクルで行う場合に比べて処理に要する時間を短縮することができる。
【0017】
【発明の実施の形態】
図2には本発明に係る半導体記憶装置が搭載されるマイクロコンピュータが示される。
【0018】
図2に示されるように、マイクロコンピュータ221は、特に制限されないが、外部バスを介して各種信号のやり取りを可能とする外部インタフェース(I/F)228、演算処理のためのCPU(中央処理装置)224、数学関数の浮動小数点計算を実行するための浮動小数点ユニット(FPU)223、CPU224で実行されるマイクロプログラムが格納されたROM226、CPU224での演算処理のための作業領域などとして使用されるSRAM227を含み、公知の半導体集積回路製造技術によって、単結晶シリコン基板などの一つの半導体基板に形成される。上記外部インタフェース228、CPU224、浮動小数点ユニット223、ROM226、SRAM227は、互いに信号のやり取りが可能となるように内部バス222によって結合されている。内部バス222は、アドレス信号を伝達するためのアドレスバス、データを伝達するためのデータバス、及びコントロール信号を伝達するためのコントロールバスを含む。ここで、上記SRAM227が本発明において中央処理装置によってアクセス可能な半導体記憶装置の一例とされる。
【0019】
図1には上記マイクロコンピュータに含まれるSRAM227の構成例が示される。
【0020】
図1に示されるように、このSRAM227は、特に制限されないが、16kバイト(4kバイト×4マット)の記憶容量を有し、メモリマット部10と間接周辺回路20とを含んで成る。
【0021】
メモリマット部10は、特に制限されないが、4個のRAM部11,12,13,14を含む。4個のRAM部11,12,13,14は互いに同一構成とされる。RAM部11は、列選択回路112、行選択回路111、メモリマット113、検査マット114、入出力回路115,116を含んで成る。
【0022】
メモリマット113は、32ビット(bit)単位でデータの読み書きが可能とされ、複数のワード線とそれに交差するように配置された複数のビット線と、上記ワード線とビット線との交差箇所に配置されたスタティック型メモリセルとを含む。上記行選択回路113は、入力されたロウアドレス信号に基づいて上記複数のワード線から対応するワード線を選択レベルに駆動する。列選択回路112は、入力されたカラムアドレス信号に基づいて上記複数のビット線のうちから対応するビット線を選択的にコモン線に結合させる。これにより、入出力回路115を介してメモリセルからのデータ読み出しや当該メモリセルへのデータ書き込みが可能とされる。検査マット114は、6ビット単位でECC検査のためのハミングコードの読み書きが可能とされ、複数のワード線とそれに交差するように配置された複数のビット線と、上記ワード線とビット線との交差箇所に配置されたスタティック型メモリセルとを含む。メモリマット113及び検査マット114によって、行選択回路111や列選択回路112が共有される。ここで、行選択回路111、列選択回路112、入出力回路115,116は、メモリマット113や検査マットに対する直接周辺回路と称される。
【0023】
間接周辺回路20は、特に制限されないが、ECC機能ブロック回路21、データラッチ回路22、データサイズアライメント回路23、入出力制御回路24、及びI/Oバス25を含む。ECC機能ブロック回路21は、ハミングコードによるECC訂正機能を有し、特に制限されないが、メモリマット113へのデータ書き込み時に32ビット構成の入力データから検査マット114用の6ビット構成のハミングコードを生成するライトECCコントロール機能と、メモリマット113からのデータ読み出し時にメモリマット113からの32ビット構成の出力データに基づいて6ビット構成のハミングコードを生成し、それと、検査マット114に格納されているハミングコードとの比較を行い、その比較結果に基づいてメモリマット113からの32ビット構成の出力データのエラー訂正を行うリードECCコントロール機能とを含む。データラッチ回路22には、データサイズアライメント回路23から出力されたデータや、メモリマット113から読み出され、上記リードECCコントロール機能によって必要に応じてエラー訂正されたデータが一時的に保持される。データサイズアライメント回路23は、上記メモリマットへ書き込まれるデータや上記メモリマットから読み出されたデータのサイズアライメント処理を行う。このデータサイズアライメントの内容はCPU224のアーキテクチャによって決定される。入出力制御回路24は、内部バス222との間で各種データの入出力を制御する。
【0024】
図3には、上記SRAM227のレイアウト構成が示される。
【0025】
メモリマット部10は2分割され、その間に間接周辺回路20がレイアウトされる。
【0026】
次に、ECC機能ブロック回路21で生成されるハミングコードについて説明する。
【0027】
誤り訂正符号を形成する方法として、パリティ検査を利用したハミングの方法がある。ここで、kビットの情報符号のそれぞれにmビットの検査符号(冗長ビット)を付加し、全体の符号長がnビットとなる符号列を考える。nビットの符号列の中に1ビット以下の誤りがあると仮定すると、検査符号で表される情報数は、誤りが発生する場合の数以上であり、次式が成立する。
≧n+1…(1)
【0028】
ここで、n=m+kを代入して整理すると、情報ビット数kと検査ビット数m(=n−k)との間には、次式の関係が成立する。
−m≧k+1…(2)
【0029】
全体の符号長がnビットで、そのうちの情報ビットがkビットである符号のこは(n,k)符号と称される。式(2)が成立する場合のnとkとの組み合わせ(ハミングコード)例が図4に示される。例えば情報ビットが8ビットの符号系列であれば(k=8)、4ビットの検査ビット(m=4)が必要とされる。同様に、情報ビットが32ビットの符号列であれば、6ビットの検査ビット(m=6)が必要とされる。既述のように図1に示されるメモリマット113は、32ビット単位でデータの読み書きが可能とされる。この場合、情報ビット数(k)が26ビットを越え、且つ、57ビット以下であるため、検査ビット数(m)としては6ビットあれば十分とされる。このことから、図1に示される構成では、検査マット114及びそれに対応する入出力回路116は6ビット単位でのアクセスが可能とされる。
【0030】
図5には、SRAM227における主要な外部端子と、その外部端子についての簡単な機能の一覧が示される。
【0031】
SRAM227は、特に制限されないが、システムクロック信号を取り込むためのCK端子、バスサイクルの区切りを示すバスレディ信号を取り込むためのBUSRDY端子、ハードウェア/ソフトウェアスタンバイ制御信号を取り込むためのSTBY端子、リード/ライト制御信号を取り込むためのMRWN端子、データサイズアライメント信号を取り込むためのDSIZE[1:0]端子、ロウアドレス信号やカラムアドレス信号を取り込むためのIAB[11:0]端子、データ入出力のためのIDB[31:0]端子、マット選択信号を取り込むためのMSRAM[3:0]N端子、ECCマット選択信号を取り込むためのMSECC[3:0]N端子、ECCテストモード信号を取り込むためのECCN端子を含み、上記各端子はバス222に結合される。BUSRDY端子の“H”(ハイ)レベルは、バスサイクルの切れ間を示し、BUSRDY端子の“L”(ロー)レベルはバスサイクル中であることを示す。STBY端子が“H”レベルとされることで、スタンバイ状態が指示され、STBY端子が“L”レベルとされることで本SRAM227は動作状態とされる。MRWN端子が“H”レベルとされることでリードサイクルが指定され、MRWN端子が“L”レベルとされることでライトサイクルが指定される。DSIZE[1:0]端子が“L”“L”とされることでロングワードアクセスが指定され、DSIZE[1:0]端子が“L”“H”とされることでワードアクセスが指定され、DSIZE[1:0]端子が“H”“H”とされることでバイトアクセスが指定される。IAB[11:0]端子のうち、IAB[1:0]はデータアクセスサイズシフトの有無を示し、IAB[3:2]はカラムアドレスを示し、IAB[11:4]はロウアドレスを示す。ECCN端子が“H”とされることでECCディスエーブルが指定され、ECCN端子が“L”とされることでECCイネーブルが指定される。
【0032】
図6には、上記データサイズアライメント回路23で行われるデータサイズアライメント処理の具体例が示される。尚、図6において、「*」はドントケアを示し、論理値“1”はハイ(H)レベルを示し、論理値“0”はロー(L)レベルを示す。
【0033】
DSIZE[1:0]端子が論理値“0”“0”とされることでロングワードアクセス(32ビットアクセス)が指定された場合、リード時においては、データラッチ回路22からの32ビット構成のデータは、そのままのビット構成で入出力制御回路24を介してIDB[31:0]端子を介してバス222に出力される。また、ライト時においては、IDB[31:0]端子を介してバス222から取り込まれた32ビット構成のデータは、そのままのビット構成でデータラッチ回路22に伝達される。
【0034】
DSIZE[1:0]端子が論理値“0”“1”とされることでワードアクセス(16ビットアクセス)が指定され、且つ、IAB[1:0]端子が論理値“0”“*”によりデータシフトが指示された場合、リード時においては、データラッチ回路22から出力された上位16ビットが有効とされるデータは、データサイズアライメント回路23において上位16ビットがシフトされることで下位16ビットが有効とされるデータに変更されてからIDB[31:0]端子を介してバス222に出力される。また、ライト時においては、IDB[31:0]端子を介してバス222から取り込まれた下位16ビットが有効とされるデータは、データサイズアライメント回路23において下位16ビットがシフトされることで上位16ビットが有効とされるデータに変更されてからデータラッチ回路22に伝達される。
【0035】
DSIZE[1:0]端子が論理値“0”“1”とされることでワードアクセスが指定され、且つ、IAB[1:0]端子が論理値“1”“*”によりデータシフトが指示されない場合、リード時においては、データラッチ回路22から出力された上位16ビットが有効とされるデータは、そのままの状態でIDB[31:0]端子を介してバス222に出力される。また、ライト時においては、IDB[31:0]端子を介してバス222から取り込まれた下位16ビットが有効とされるデータは、ビットシフトは行われないでデータラッチ回路22に伝達される。
【0036】
DSIZE[1:0]端子が論理値“1”“1”とされることでバイトアクセスが指示され、且つ、IAB[1:0]端子が論理値“0”“0”によりデータシフトが指示された場合、リード時においては、RAM部11〜14から出力された上位16ビット(2バイト分)が有効とされるデータは、データサイズアライメント回路23においてビットシフトされることで下位16バイト(2バイト分)が有効とされるデータに変更されてからIDB[31:0]端子を介してバス222に出力される。CPU224ではバス222における下位2バイト分のデータのうちの何れかを有効なデータとして取り扱う。また、ライト時においては、IDB[31:0]端子を介してバス222から取り込まれた8ビット目から15ビット目が有効とされるバイトデータは、データサイズアライメント回路23においてビットシフトされることで上位8ビットが有効とされるデータに変更されてからRAM部11〜14に伝達される。
【0037】
DSIZE[1:0]端子が論理値“1”“1”とされることでバイトアクセスが指示され、且つ、IAB[1:0]端子が論理値“0”“1”によりデータシフトが指示された場合、リード時においては、RAM部11〜14から出力された上位16ビット(2バイト分)が有効とされるデータは、データサイズアライメント回路23においてビットシフトされることで下位16バイト(2バイト分)が有効とされるデータに変更されてからIDB[31:0]端子を介してバス222に出力される。CPU224ではバス222における下位2バイト分のデータのうちの何れかを有効なデータとして取り扱う。また、ライト時においては、IDB[31:0]端子を介してバス222から取り込まれた下位8ビットが有効とされるバイトデータは、データサイズアライメント回路23においてビットシフトされることで16ビット目から23ビット目が有効とされるデータに変更されてからRAM部11〜14に伝達される。
【0038】
DSIZE[1:0]端子が論理値“1”“1”とされることでバイトアクセスが指示され、且つ、IAB[1:0]端子が論理値“1”“0”によりデータシフトが指示されない場合、リード時においては、データラッチ回路22から出力された下位16ビット(2バイト分)が有効とされるデータは、データサイズアライメント回路23においてそのままの形式でIDB[31:0]端子を介してバス222に出力される。CPU224ではバス222における下位2バイト分のデータのうちの何れかを有効なデータとして取り扱う。また、ライト時においては、IDB[31:0]端子を介してバス222から取り込まれた8ビット目から15ビット目が有効とされるバイトデータは、データサイズアライメント回路23においてビットシフトされることなくRAM部11〜14に伝達される。
【0039】
DSIZE[1:0]端子が論理値“1”“1”とされることでバイトアクセスが指示され、且つ、IAB[1:0]端子が論理値“1”“1”によりデータシフトが指示されない場合、リード時においては、データラッチ回路22から出力された下位16ビット(2バイト分)が有効とされるデータは、データサイズアライメント回路23においてそのままの形式でIDB[31:0]端子を介してバス222に出力される。CPU224ではバス222における下位2バイト分のデータのうちの何れかを有効なデータとして取り扱う。また、ライト時においては、IDB[31:0]端子を介してバス222から取り込まれた下位8ビットが有効とされるバイトデータは、データサイズアライメント回路23においてビットシフトされることなくRAM部11〜14に伝達される。
【0040】
上記のライト動作において、データラッチ回路22における32ビット構成のデータのうち、有効なデータが存在しないビットについては、データサイズアライメント回路23では、ライトサイクルの前半においてメモリマット112から読み出された32ビット構成のデータのうち、有効なデータが存在しないビットについては、適宜ビット分のデータが上記データラッチ回路22の記憶データにおける下位16ビットに割り当てられることにより、見かけ上、全ビット(32ビット)有効なデータが合成され、それが、ECC機能ブロック回路21に伝達される。
【0041】
次に、上記のように構成されたSRAM227の動作について説明する。
【0042】
図7には、上記SRAM227におけるライト動作時のECC動作の流れが示される。また、図9には、上記SRAM227のライト動作時における主要部の動作タイミングが示される。尚、図9において、()内は内部信号を示し、ハッチングはドントケアを示している。STBY端子は“H”レベルに固定される。
【0043】
ライト動作時においては、データサイズアライメントがバイト、ワード、ロングワードにかかわらずに、ライトサイクルの前半でメモリマット113からのリード動作が行われる(ステップS11)。そしてECC機能ブロック回路21においては、上記リード動作によって得られたデータに基づいてハミングコードが生成され、このハミングコードと、検査マット114から読み出されたハミングコードとの比較が行われ、上記メモリマット113からリードされたデータにエラーが含まれるか否かの判別が行われる(ステップS12)。この判別において、「エラーが含まれない」と判断された場合には、そのリードデータがデータラッチ回路22にラッチされる(ステップS13)。また、上記ステップS12のエラー判別において、「1ビットエラーが含まれる」と判断された場合には、ECCにおける公知のエラー訂正技術によって上記1ビットエラーが訂正された後に(ステップS17)、そのデータがデータラッチ回路22にラッチされる(ステップS13)。
【0044】
一方、書き込みのためのデータがバス222から入出力制御回路24を介してデータサイズアライメント回路23へ伝達され(ステップS14)、図6に示されるように、CPU224からの指示に従って所望のビットへデータがシフトされる(ステップS15)。そして、外部からワードアクセス又はバイトアクセスが指定された場合において、アクセスされない残りのビット(有効とされないビット)には、上記データラッチ回路22に格納されているデータにおける対応ビットのデータが合成されることにより(ステップS16)、見かけ上、32ビットの書き込みデータとして、ECC機能ブロック回路21に伝達され、ここで、入力データ32ビットについてのハミングコードが生成される(ステップS17)。そして、上記32ビットの書き込みデータはメモリマット113における指定アドレスへ書き込まれ、対応するハミングコードは検査マット114に書き込まれる(ステップS18)。このステップS18の書き込みは、ライトサイクルにおける後半サイクルで行われる。つまり、ライトサイクルにおいては、前半サイクルでメモリマット113や検査マット114からのデータ読み出しが行われ、後半サイクルでメモリマット113や検査マット114への書き込みが行われる。例えば図9に示されるタイミングにおいて、CK端子を介して外部から入力されたクロック信号に同期する内部2相クロック信号φ1,φ2がSRAM227の内部で生成されるものとすると、クロック信号φ1に同期してメモリマット113や検査マット114からのデータ読み出しが行われ、クロック信号φ2に同期してメモリマット113や検査マット114への書き込みが行われることにより、メモリマット113や検査マット114からのデータ読み出しと、メモリマット113や検査マット114からのデータ読み出しを別々のサイクルで行う場合に比べて処理に要する時間を短縮することができる。
【0045】
尚、CPU224によってロングワードアクセスが指定されている場合には、バス222を介して取り込まれた32ビット構成のライトデータからハミングコードを生成すれば良いので、ライトサイクルの前半サイクルでメモリマット113から読み出されたデータを用いた合成処理(ステップS16)は行われない。
【0046】
図8には、上記SRAM227におけるリード動作時のECC動作の流れが示される。また、図10には、上記SRAM227のリード動作時における主要部の動作タイミングが示される。尚、図10において、()内は内部信号を示し、ハッチングはドントケアを示している。STBY端子は“H”レベルに固定される。
【0047】
リード動作においては、図10に示されるクロック信号φ1に同期して、選択されたメモリマット113及び検査マット114から、それぞれ32ビット構成のデータ及びそれに対応するハミングコードが読み出される(S21)。そして、ECC機能ブロック回路21において、上記メモリマット113から読み出された32ビット構成のデータに基づいてハミングコードが生成され、生成されたハミングコードと、上記検査マット114から読み出されたハミングコードとの比較が行われることで、エラーを生じているか否かの判別が行われる(ステップS22)。この判別において、「エラーを生じていない」と判断された場合には、そのデータがデータラッチ回路22にラッチされる(ステップS23)。また、上記ステップS22の判別において、「1ビットエラーを生じている」と判断された場合には、エラーの訂正が行われた後に(ステップS26)、そのデータがデータラッチ回路22にラッチされる(ステップS23)。そして、ラッチされたデータは、データサイズアライメント回路23に伝達され、CPU224からの指定に応じて、図6に示されるようにデータサイズアライメント処理が行われ(S24)、その後、入出力制御回路24を介してバス222へ出力される(ステップS25)。
【0048】
図11には、図1に示されるSRAM227の比較対象とされるSRAM237が示される。SRAM237は、16kバイト(4kバイト×4マット)の記憶容量を有し、その1マットの構成は1kワード×32ビットとされる。さらにこのSRAM237では、32ビットの入出力をバイト(8ビット)、ワード(16ビット)、ロングワード(32ビット)にデータサイズを変更するためのデータサイズアライメント回路341〜344が直接周辺回路の一部として設けられている。一つのRAM部11において、8ビット単位でデータのリードライトを可能とするメモリマット(×8)301〜304が設けられ、それに対応して入出力回路321〜324が設けられる。さらに、上記メモリマット301〜314に対応して、ハミングコード用の検査マット311〜314及びそれに対応する入出力回路331〜334が設けられる。データサイズの最小単位が8ビットとされるため、図4に示されるように、情報ビット数(k)が11の場合に相当し、その場合の検査ビット数(m)は4ビット必要とされるため、上記検査マット311〜314及びそれに対応する入出力回路331〜334は、4ビット単位(×4ビット)でハミングコードの入出力を可能とする。従って、検査マットは、1マット当たり16ビット必要であり、モジュール全体では16ビット×4マット分で64ビット必要となる。このため、SRAM237の面積は、ECC機能を有さない場合に比べて1.5倍に増大する。
【0049】
これに対して、図1に示される構成を有するSRAM227は、データサイズアライメント回路が間接周辺回路20に設けられ、メモリマット113へのアクセスを常に32ビット単位で行うようにしている。それによって、メモリマット113に対応する検査マットは、1マット当たり6ビット構成で済む(図4参照)。このように1マット当たりの検査マットのサイズを低減することができるため、メモリマット部10の面積の低減を図ることができる。
【0050】
上記の例によれば、以下の作用効果を得ることができる。
【0051】
(1)データサイズアライメント回路が間接周辺回路20に設けられ、メモリマット113へのアクセスを常に32ビット単位で行うようにしていることから、メモリマット113に対応する検査マットは、1マット当たり6ビット構成で済む。このように1マット当たりの検査マットのサイズを低減することができるため、メモリマット部10の面積の低減を図ることができ、このことは、例えばSRAM227がマイクロコンピュータ221などの半導体集積回路にオンチップされる場合に有利とされる。
【0052】
(2)データサイズアライメント回路23は、外部からワードアクセス又はバイトアクセスが指定された場合に、アクセスされない残りのビットについてはメモリマット113の記憶データを割り当てることにより、メモリマット113の32ビット単位でのアクセスや、検査マット114の6ビット単位でのアクセスに対応させることができる。
【0053】
(3)ライトサイクルにおいては、前半サイクルでメモリマット113や検査マット114からのデータ読み出しが行われ、後半サイクルでメモリマット113や検査マット114への書き込みが行われる。具体的には、図9に示されるタイミングにおいて、CK端子を介して外部から入力されたクロック信号に同期する内部2相クロック信号φ1,φ2がSRAM227の内部で生成されるものとすると、クロック信号φ1に同期してメモリマット113や検査マット114からのデータ読み出しが行われ、クロック信号φ2に同期してメモリマット113や検査マット114への書き込みが行われる。それにより、メモリマット113や検査マット114からのデータ読み出しと、メモリマット113や検査マット114へのデータ書き込みを別々のサイクルで行う場合に比べて処理に要する時間を短縮することができる。換言すれば、書き込みサイクルの前半でメモリマットからのデータ読み出しを行い、書き込みサイクルの後半でメモリマットへのデータ書き込みを行うことにより、ECC機能を有するにもかかわらず、高速性を劣化させずにエラー検出及び訂正を行うことができる。
【0054】
以上本発明者によってなされた発明を具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。
【0055】
例えば、ECC機能ブロック回路21において、データの1ビットエラーを訂正した後に(ステップS17,S26)、そのデータを再びメモリマット113へ書き込み、それを読み出してECC機能ブロック回路21において再びエラーチェック(ステップS12,S22)及びエラー訂正(ステップS17,S26)を行うようにすれば、2ビットエラーの訂正が可能とされる。従って、エラー訂正したデータをメモりマット113に再書き込みすることによってデータの信頼性の向上を図ることができる。
【0056】
以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるSRAMに適用した場合について説明したが、本発明はそれに限定されるものではなく、ダイナミック・ランダム・アクセス・メモリ(DRAM)にも適用することができる。また、半導体メモリ単体で製品化される場合にも本発明を適用することができる。
【0057】
本発明は、少なくともメモリマットを備えることを条件に適用することができる。
【0058】
【発明の効果】
本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。
【0059】
すなわち、データサイズアライメント回路を直接周辺回路に設け、外部からの指定に応じて変更可能な有効ビット幅における最大のビット幅単位でメモリマットをアクセス可能とすることで、検査マットのビット構成の低減化を図ることができ、それによって、ECC機能追加に伴うチップ面積の増加を最小限に抑えることができる。また、書き込みサイクルの前半でメモリマットからのデータ読み出しを行い、書き込みサイクルの後半でメモリマットへのデータ書き込みを行うことにより、高速性を劣化させずにECC機能を搭載できる。
【図面の簡単な説明】
【図1】本発明にかかる半導体記憶装置の一例であるSRAMの全体的な構成例ブロック図である。
【図2】上記SRAMが搭載されるマイクロコンピュータの全体的な構成例ブロック図である。
【図3】上記SRAMにおける主要回路ブロックのレイアウト説明図である。
【図4】ECC機能におけるハミングコードの説明図である。
【図5】図1に示されるSRAMにおける主要な外部端子と、その外部端子についての機能についての説明図である。
【図6】図1に示されるデータサイズアライメント回路で行われるデータサイズアライメント処理の説明図である。
【図7】上記SRAMのライト動作時におけるECC動作のフローチャートである。
【図8】上記SRAMのリード動作時におけるECC動作のフローチャートである。
【図9】上記SRAMにおけるライト動作のタイミング図である。
【図10】上記SRAMにおけるリード動作のタイミング図である。
【図11】上記SRAMの比較対象とされるSRAMの構成例ブロック図である。
【符号の説明】
10 メモリマット部
11,12,13,14 RAM部
20 間接周辺回路
21 ECC機能ブロック
22 データラッチ回路
23 データサイズアライメント回路
24 入出力制御回路
111 行選択回路
112 列選択回路
113 メモリマット
114 検査マット
115,116 入出力回路
221 マイクロコンピュータ
222 バス
223 FPU
224 CPU
226 ROM
227 SRAM
228 外部インタフェース
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an error correction technique in a semiconductor memory device such as an SRAM (Static Random Access Memory), and more particularly to a technique effective when applied to a microcomputer including an SRAM.
[0002]
[Prior art]
In a semiconductor memory device, countermeasures against soft errors due to α rays are important. Soft error caused by alpha rays is a phenomenon that destroys data by alpha rays (He nuclei) contained in cosmic rays and alpha rays emitted from radioactive atoms contained in LSI package resin etc. entering the memory cell. It is.
[0003]
An SRAM, which is an example of a semiconductor memory device, uses a flip-flop circuit as a memory cell memory element, and therefore has a structure that is more resistant to soft errors caused by alpha rays than a DRAM (dynamic random access memory) or the like. It has become. However, the resistance to soft errors due to α rays is decreasing as the memory cell area is reduced to increase the capacity and speed of the SRAM, and the operating voltage is reduced to reduce the power consumption of the system. In some cases, it may be necessary to take measures to improve resistance to soft errors due to α rays. In particular, soft errors due to α rays in control microcomputers mounted on automobiles are items that must be eliminated.
[0004]
A highly reliable industrial computer is devised so as not to cause a failure, and even if a failure occurs, if the failure is mild, the process is continued and preventive maintenance is performed before a serious failure occurs. It is necessary to have. In order to meet such a request, for example, in the case of a memory single bit error, conventionally, the data read by the ECC correction mechanism is corrected and the corrected data is written to the memory, and when a single bit error occurs again at the same memory address, the element It is known that a diagnosis means for determining a failure is provided (for example, see Patent Document 1). Furthermore, a technique is known that makes it possible to diagnose a memory element failure in a general-purpose computer that does not have a special mechanism such as an additional mechanism for writing ECC-corrected data.
[0005]
[Patent Document 1]
Japanese Unexamined Patent Publication No. 2000-207291 (second paragraph, FIG. 6)
[0006]
[Problems to be solved by the invention]
In order to apply the ECC function to the SRAM, an inspection memory mat for storing data (hamming code) for correcting a memory error, an ECC function block for detecting and correcting a hamming code generation and a memory error are required. The inventor of the present invention has examined the application of these to conventional SRAMs, and found that the area of the SRAM module is greatly increased. For example, in the case of an SRAM having a capacity of 16 kbytes (4 kbytes × 4 mats), the configuration of one mat is 1k words × 32 bits. Furthermore, this SRAM has a data size alignment function for changing the data size such as 32-bit input / output as bytes (8 bits), words (16 bits), and long words (32 bits). Therefore, in order to apply the ECC function to this SRAM, an ECC inspection mat is required in units of bytes (8 bits), which is the minimum unit of data size. The ECC check bits required for 8 input / output bits are 4 bits by single bit error correction, and 16 bits are required for 1 mat. Further, the entire module requires 64 bits in a size of 16 bits × 4 mats. For this reason, the area of the SRAM module increases to 1.5 times that when the ECC function is not provided.
[0007]
An object of the present invention is to provide a technique for minimizing an increase in chip area accompanying the addition of an ECC function.
[0008]
Another object of the present invention is to provide a technique for enabling error detection and correction without degrading high speed.
[0009]
The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.
[0010]
[Means for Solving the Problems]
The following is a brief description of an outline of typical inventions disclosed in the present application.
[0011]
That is, a memory mat portion in which a plurality of memory mats accessed in units of the maximum bit width in an effective bit width that can be changed according to designation from the outside are arranged, and an indirect peripheral circuit shared by the plurality of memory mats A semiconductor memory device is configured. At this time, the indirect peripheral circuit is interposed between the ECC function block circuit for error correction based on the Hamming code, the ECC function block circuit and the external input / output terminal, and has an effective bit width designated from the outside. And a data size alignment circuit for performing a corresponding data size alignment process.
[0012]
According to the above means, by providing the data size alignment circuit in the indirect peripheral circuit, the memory mat can be accessed in units of the maximum bit width in the effective bit width that can be changed according to designation from the outside. In some cases, the bit configuration per mat of the inspection mat can be reduced as compared with the case where the memory mat is accessed in a bit width unit corresponding to byte access, which achieves a reduction in the area of the memory mat portion. To do.
[0013]
In addition, according to external designation of the effective bit width for data input / output, the bit width corresponding to byte access, the bit width corresponding to word access wider than the byte access, the bit width corresponding to long word wider than the word access In the semiconductor memory device that can be changed in three stages, a memory mat portion in which a plurality of memory mats accessed in bit width units corresponding to the long word are arranged, and an indirect peripheral circuit shared by the plurality of memory mats are provided. Provide. At this time, the indirect peripheral circuit is interposed between the ECC function block circuit for error correction based on the Hamming code, the ECC function block circuit and the external input / output terminal, and has an effective bit width designated from the outside. And a data size alignment circuit that performs a corresponding data size alignment process.
[0014]
According to the above means, a memory mat can be accessed in a bit width unit corresponding to a long word, and in this case, the bit configuration per mat of the inspection mat is determined by a bit width unit corresponding to byte access. This can be reduced as compared with the case of accessing, and this achieves a reduction in the area of the memory mat portion.
[0015]
The data size alignment circuit can be configured to allocate storage data of the memory mat to the remaining bits that are not accessed when word access or byte access is designated from the outside.
[0016]
When a data read operation from the memory mat is performed in the first half of the write cycle and a data write operation to the memory mat is performed in the second half of the write cycle, the data size alignment circuit performs word access or byte from the outside. When access is designated, the data read from the memory mat in the first half of the write cycle can be assigned to the remaining bits that are not accessed. At this time, the data read operation from the memory mat is performed in the first half of the write cycle, and the data read operation to the memory mat is performed in the second half of the write cycle. The time required for processing can be reduced as compared with the case where data writing to the memory mat or the inspection mat is performed in separate cycles.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 2 shows a microcomputer in which the semiconductor memory device according to the present invention is mounted.
[0018]
As shown in FIG. 2, the microcomputer 221 is not particularly limited, but an external interface (I / F) 228 capable of exchanging various signals via an external bus, a CPU (central processing unit) for arithmetic processing 224, a floating point unit (FPU) 223 for executing floating point calculations of mathematical functions, a ROM 226 storing a microprogram executed by the CPU 224, a work area for arithmetic processing by the CPU 224, etc. The SRAM 227 is formed on one semiconductor substrate such as a single crystal silicon substrate by a known semiconductor integrated circuit manufacturing technique. The external interface 228, the CPU 224, the floating point unit 223, the ROM 226, and the SRAM 227 are coupled by an internal bus 222 so that signals can be exchanged with each other. The internal bus 222 includes an address bus for transmitting address signals, a data bus for transmitting data, and a control bus for transmitting control signals. The SRAM 227 is an example of a semiconductor memory device that can be accessed by the central processing unit in the present invention.
[0019]
FIG. 1 shows a configuration example of the SRAM 227 included in the microcomputer.
[0020]
As shown in FIG. 1, the SRAM 227 is not particularly limited, but has a storage capacity of 16 kbytes (4 kbytes × 4 mats), and includes a memory mat section 10 and an indirect peripheral circuit 20.
[0021]
The memory mat unit 10 includes four RAM units 11, 12, 13, and 14 although not particularly limited. The four RAM units 11, 12, 13, and 14 have the same configuration. The RAM unit 11 includes a column selection circuit 112, a row selection circuit 111, a memory mat 113, an inspection mat 114, and input / output circuits 115 and 116.
[0022]
The memory mat 113 can read and write data in units of 32 bits (bits). The memory mat 113 has a plurality of word lines, a plurality of bit lines arranged so as to intersect with the word lines, and the intersections of the word lines and the bit lines. And a static memory cell arranged. The row selection circuit 113 drives a corresponding word line from the plurality of word lines to a selection level based on the input row address signal. The column selection circuit 112 selectively couples a corresponding bit line to the common line among the plurality of bit lines based on the input column address signal. As a result, data can be read from or written to the memory cell via the input / output circuit 115. The inspection mat 114 can read and write a Hamming code for ECC inspection in units of 6 bits, and includes a plurality of word lines, a plurality of bit lines arranged so as to cross the word lines, and the word lines and the bit lines. And static memory cells arranged at the intersections. The row selection circuit 111 and the column selection circuit 112 are shared by the memory mat 113 and the inspection mat 114. Here, the row selection circuit 111, the column selection circuit 112, and the input / output circuits 115 and 116 are referred to as direct peripheral circuits for the memory mat 113 and the inspection mat.
[0023]
The indirect peripheral circuit 20 includes, but is not limited to, an ECC function block circuit 21, a data latch circuit 22, a data size alignment circuit 23, an input / output control circuit 24, and an I / O bus 25. The ECC function block circuit 21 has an ECC correction function using a Hamming code and is not particularly limited, but generates a 6-bit Hamming code for the check mat 114 from 32-bit input data when writing data to the memory mat 113. A 6-bit hamming code is generated based on the write ECC control function to be performed and the 32-bit output data from the memory mat 113 when data is read from the memory mat 113, and the hamming stored in the test mat 114 A read ECC control function that performs comparison with a code and performs error correction of output data having a 32-bit configuration from the memory mat 113 based on the comparison result. The data latch circuit 22 temporarily holds data output from the data size alignment circuit 23 and data read from the memory mat 113 and error-corrected as necessary by the read ECC control function. The data size alignment circuit 23 performs size alignment processing of data written to the memory mat and data read from the memory mat. The content of this data size alignment is determined by the architecture of the CPU 224. The input / output control circuit 24 controls input / output of various data to / from the internal bus 222.
[0024]
FIG. 3 shows the layout configuration of the SRAM 227.
[0025]
The memory mat portion 10 is divided into two, and the indirect peripheral circuit 20 is laid out therebetween.
[0026]
Next, the Hamming code generated by the ECC function block circuit 21 will be described.
[0027]
As a method for forming an error correction code, there is a Hamming method using a parity check. Here, consider a code string in which an m-bit check code (redundant bit) is added to each k-bit information code and the entire code length is n bits. Assuming that there is an error of 1 bit or less in the n-bit code string, the number of pieces of information represented by the check code is equal to or greater than the number when an error occurs, and the following equation is established.
2 m ≧ n + 1 (1)
[0028]
Here, when n = m + k is substituted and arranged, the relationship of the following equation is established between the number of information bits k and the number of check bits m (= n−k).
2 m −m ≧ k + 1 (2)
[0029]
A code having an overall code length of n bits, of which information bits are k bits, is referred to as an (n, k) code. FIG. 4 shows an example of a combination (hamming code) of n and k when Expression (2) is established. For example, if the information bit is an 8-bit code sequence (k = 8), 4 check bits (m = 4) are required. Similarly, if the information bit is a 32-bit code string, 6 check bits (m = 6) are required. As described above, the memory mat 113 shown in FIG. 1 can read and write data in units of 32 bits. In this case, since the number of information bits (k) exceeds 26 bits and is 57 bits or less, 6 bits is sufficient as the number of inspection bits (m). Therefore, in the configuration shown in FIG. 1, the test mat 114 and the input / output circuit 116 corresponding thereto can be accessed in units of 6 bits.
[0030]
FIG. 5 shows a list of main external terminals in the SRAM 227 and simple functions for the external terminals.
[0031]
The SRAM 227 is not particularly limited, but includes a CK terminal for capturing a system clock signal, a BUSRDY terminal for capturing a bus ready signal indicating a bus cycle delimiter, an STBY terminal for capturing a hardware / software standby control signal, and read / write. MRWN terminal for capturing control signals, DSIZE [1: 0] terminal for capturing data size alignment signals, IAB [11: 0] terminals for capturing row address signals and column address signals, and data input / output IDB [31: 0] terminal, MSRAM [3: 0] N terminal for capturing a mat selection signal, MSECC [3: 0] N terminal for capturing an ECC mat selection signal, ECCN for capturing an ECC test mode signal Each terminal includes It is coupled to the scan 222. The “H” (high) level of the BUSRDY terminal indicates an interval between bus cycles, and the “L” (low) level of the BUSRDY terminal indicates that the bus cycle is in progress. When the STBY terminal is set to “H” level, a standby state is instructed, and when the STBY terminal is set to “L” level, the SRAM 227 is set to an operating state. A read cycle is designated by setting the MRWN terminal to “H” level, and a write cycle is designated by setting the MRWN terminal to “L” level. Longword access is specified by setting the DSIZE [1: 0] terminal to “L” and “L”, and word access is specified by setting the DSIZE [1: 0] terminal to “L” and “H”. , DSIZE [1: 0] terminals are set to “H” and “H” to designate byte access. Of the IAB [11: 0] terminals, IAB [1: 0] indicates the presence / absence of data access size shift, IAB [3: 2] indicates a column address, and IAB [11: 4] indicates a row address. When the ECCN terminal is set to “H”, ECC disable is specified, and when the ECCN terminal is set to “L”, ECC enable is specified.
[0032]
FIG. 6 shows a specific example of the data size alignment processing performed by the data size alignment circuit 23. In FIG. 6, “*” indicates don't care, logical value “1” indicates a high (H) level, and logical value “0” indicates a low (L) level.
[0033]
When long word access (32-bit access) is specified by setting the DSIZE [1: 0] terminals to logical values “0” and “0”, a 32-bit configuration from the data latch circuit 22 is provided at the time of reading. The data is output to the bus 222 through the IDB [31: 0] terminal via the input / output control circuit 24 in the bit configuration as it is. At the time of writing, the 32-bit data taken from the bus 222 via the IDB [31: 0] terminals is transmitted to the data latch circuit 22 with the bit configuration as it is.
[0034]
The word size (16-bit access) is specified by setting the DSIZE [1: 0] terminal to the logical value “0” or “1”, and the IAB [1: 0] terminal has the logical value “0” or “*”. When the data shift is instructed by the data size, at the time of reading, the data in which the upper 16 bits output from the data latch circuit 22 are valid is shifted to the lower 16 by the upper 16 bits being shifted in the data size alignment circuit 23. After the bits are changed to valid data, they are output to the bus 222 via the IDB [31: 0] terminals. At the time of writing, data in which the lower 16 bits fetched from the bus 222 via the IDB [31: 0] terminal are valid are shifted by the lower 16 bits being shifted in the data size alignment circuit 23. The 16 bits are changed to valid data and then transmitted to the data latch circuit 22.
[0035]
Word access is specified by setting the DSIZE [1: 0] terminal to the logical value “0” “1”, and the data shift is instructed by the logical value “1” “*” at the IAB [1: 0] terminal. Otherwise, at the time of reading, the data in which the upper 16 bits output from the data latch circuit 22 are valid is output to the bus 222 via the IDB [31: 0] terminal as it is. At the time of writing, data in which the lower 16 bits fetched from the bus 222 via the IDB [31: 0] terminals are valid are transmitted to the data latch circuit 22 without being bit-shifted.
[0036]
Byte access is instructed when the DSIZE [1: 0] terminal is set to the logical value “1” or “1”, and data shift is instructed by the IAB [1: 0] terminal to the logical value “0” or “0”. In this case, at the time of reading, the data in which the upper 16 bits (2 bytes) output from the RAM units 11 to 14 are valid is bit-shifted by the data size alignment circuit 23, so that the lower 16 bytes ( 2 bytes) is changed to valid data and then output to the bus 222 via the IDB [31: 0] terminals. The CPU 224 handles any of the lower two bytes of data on the bus 222 as valid data. Further, at the time of writing, byte data in which the 8th to 15th bits taken in from the bus 222 via the IDB [31: 0] terminals are valid are bit-shifted in the data size alignment circuit 23. Then, after the upper 8 bits are changed to valid data, they are transmitted to the RAM units 11-14.
[0037]
Byte access is instructed when the DSIZE [1: 0] terminal is set to the logical value “1” or “1”, and data shift is instructed by the IAB [1: 0] terminal to the logical value “0” or “1”. In this case, at the time of reading, the data in which the upper 16 bits (2 bytes) output from the RAM units 11 to 14 are valid is bit-shifted by the data size alignment circuit 23, so that the lower 16 bytes ( 2 bytes) is changed to valid data and then output to the bus 222 via the IDB [31: 0] terminals. The CPU 224 handles any of the lower two bytes of data on the bus 222 as valid data. At the time of writing, byte data in which the lower 8 bits fetched from the bus 222 via the IDB [31: 0] terminals are made valid are bit-shifted by the data size alignment circuit 23 so that the 16th bit is obtained. The 23rd bit is changed to valid data and then transmitted to the RAM units 11-14.
[0038]
Byte access is instructed when the DSIZE [1: 0] terminal is set to the logical value “1” “1”, and data shift is instructed by the logical value “1” “0” at the IAB [1: 0] terminal Otherwise, at the time of reading, the data in which the lower 16 bits (2 bytes) output from the data latch circuit 22 are valid are used as they are in the data size alignment circuit 23 in the IDB [31: 0] terminals. To the bus 222. The CPU 224 handles any of the lower two bytes of data on the bus 222 as valid data. Further, at the time of writing, byte data in which the 8th to 15th bits taken in from the bus 222 via the IDB [31: 0] terminals are valid are bit-shifted in the data size alignment circuit 23. Without being transmitted to the RAM units 11-14.
[0039]
Byte access is instructed when the DSIZE [1: 0] terminal is set to a logical value “1” or “1”, and data shift is instructed by the IAB [1: 0] terminal to a logical value “1” or “1”. Otherwise, at the time of reading, the data in which the lower 16 bits (2 bytes) output from the data latch circuit 22 are valid are used as they are in the data size alignment circuit 23 in the IDB [31: 0] terminals. To the bus 222. The CPU 224 handles any of the lower two bytes of data on the bus 222 as valid data. At the time of writing, byte data in which the lower 8 bits fetched from the bus 222 via the IDB [31: 0] terminal are valid are not bit-shifted by the data size alignment circuit 23 and are stored in the RAM unit 11. ~ 14.
[0040]
In the above write operation, of the 32-bit data in the data latch circuit 22, bits for which no valid data exists are read out from the memory mat 112 by the data size alignment circuit 23 in the first half of the write cycle. Of the bit-structured data, for bits for which there is no valid data, all the bits (32 bits) are apparently assigned by appropriately assigning the data for the bits to the lower 16 bits in the data stored in the data latch circuit 22. Valid data is synthesized and transmitted to the ECC function block circuit 21.
[0041]
Next, the operation of the SRAM 227 configured as described above will be described.
[0042]
FIG. 7 shows the flow of the ECC operation during the write operation in the SRAM 227. FIG. 9 shows the operation timing of the main part during the write operation of the SRAM 227. In FIG. 9, () indicates an internal signal, and hatching indicates don't care. The STBY terminal is fixed at the “H” level.
[0043]
During the write operation, a read operation from the memory mat 113 is performed in the first half of the write cycle regardless of whether the data size alignment is byte, word, or long word (step S11). In the ECC function block circuit 21, a hamming code is generated based on the data obtained by the read operation, the hamming code is compared with the hamming code read from the inspection mat 114, and the memory It is determined whether or not an error is included in the data read from the mat 113 (step S12). In this determination, if it is determined that “no error is included”, the read data is latched in the data latch circuit 22 (step S13). If it is determined in the error determination in step S12 that “a 1-bit error is included”, the data is corrected after the 1-bit error is corrected by a known error correction technique in ECC (step S17). Is latched by the data latch circuit 22 (step S13).
[0044]
On the other hand, data for writing is transmitted from the bus 222 to the data size alignment circuit 23 via the input / output control circuit 24 (step S14), and data is transferred to a desired bit according to an instruction from the CPU 224 as shown in FIG. Are shifted (step S15). When word access or byte access is designated from the outside, the data of the corresponding bit in the data stored in the data latch circuit 22 is synthesized with the remaining bits that are not accessed (bits that are not valid). As a result (step S16), it is apparently transmitted as 32-bit write data to the ECC function block circuit 21, where a hamming code for the input data of 32 bits is generated (step S17). Then, the 32-bit write data is written to the designated address in the memory mat 113, and the corresponding hamming code is written in the inspection mat 114 (step S18). The writing in step S18 is performed in the latter half of the write cycle. That is, in the write cycle, data is read from the memory mat 113 and the inspection mat 114 in the first half cycle, and writing to the memory mat 113 and the inspection mat 114 is performed in the second half cycle. For example, assuming that the internal two-phase clock signals φ1 and φ2 that are synchronized with the clock signal input from the outside via the CK terminal are generated in the SRAM 227 at the timing shown in FIG. 9, the synchronous signal is synchronized with the clock signal φ1. The data is read from the memory mat 113 and the inspection mat 114, and is written to the memory mat 113 and the inspection mat 114 in synchronization with the clock signal φ2, thereby reading the data from the memory mat 113 and the inspection mat 114. Compared with the case where data reading from the memory mat 113 and the inspection mat 114 is performed in separate cycles, the time required for processing can be shortened.
[0045]
If long word access is specified by the CPU 224, a hamming code may be generated from 32-bit write data fetched via the bus 222. Therefore, the memory mat 113 can be used in the first half cycle of the write cycle. The synthesis process (step S16) using the read data is not performed.
[0046]
FIG. 8 shows a flow of the ECC operation during the read operation in the SRAM 227. FIG. 10 shows the operation timing of the main part during the read operation of the SRAM 227. In FIG. 10, () indicates an internal signal, and hatching indicates don't care. The STBY terminal is fixed at the “H” level.
[0047]
In the read operation, in synchronization with the clock signal φ1 shown in FIG. 10, 32-bit data and a corresponding hamming code are read from the selected memory mat 113 and test mat 114 (S21). The ECC function block circuit 21 generates a hamming code based on the 32-bit data read from the memory mat 113, and the generated hamming code and the hamming code read from the test mat 114. Is compared to determine whether or not an error has occurred (step S22). In this determination, if it is determined that “no error has occurred”, the data is latched in the data latch circuit 22 (step S23). If it is determined in step S22 that “a 1-bit error has occurred”, the error is corrected (step S26), and then the data is latched in the data latch circuit 22. (Step S23). The latched data is transmitted to the data size alignment circuit 23, and data size alignment processing is performed as shown in FIG. 6 according to the designation from the CPU 224 (S24). To the bus 222 (step S25).
[0048]
FIG. 11 shows an SRAM 237 to be compared with the SRAM 227 shown in FIG. The SRAM 237 has a storage capacity of 16 kbytes (4 kbytes × 4 mats), and the configuration of one mat is 1 k words × 32 bits. Furthermore, in this SRAM 237, data size alignment circuits 341 to 344 for changing the data size into 32-bit input / output bytes (8 bits), words (16 bits), and long words (32 bits) are directly connected to peripheral circuits. It is provided as a part. In one RAM unit 11, memory mats (× 8) 301 to 304 capable of reading and writing data in units of 8 bits are provided, and input / output circuits 321 to 324 are provided correspondingly. Corresponding to the memory mats 301 to 314, humming code inspection mats 311 to 314 and corresponding input / output circuits 331 to 334 are provided. Since the minimum unit of the data size is 8 bits, as shown in FIG. 4, this corresponds to the case where the number of information bits (k) is 11, and the number of check bits (m) in that case is 4 bits. Therefore, the inspection mats 311 to 314 and the input / output circuits 331 to 334 corresponding to the inspection mats 311 to 314 can input and output a Hamming code in units of 4 bits (× 4 bits). Therefore, the inspection mat requires 16 bits per mat, and the entire module requires 64 bits for 16 bits × 4 mats. For this reason, the area of the SRAM 237 increases by a factor of 1.5 compared to the case where the ECC function is not provided.
[0049]
On the other hand, in the SRAM 227 having the configuration shown in FIG. 1, the data size alignment circuit is provided in the indirect peripheral circuit 20, and the memory mat 113 is always accessed in units of 32 bits. As a result, the inspection mat corresponding to the memory mat 113 can be composed of 6 bits per mat (see FIG. 4). Thus, since the size of the inspection mat per mat can be reduced, the area of the memory mat portion 10 can be reduced.
[0050]
According to the above example, the following effects can be obtained.
[0051]
(1) Since the data size alignment circuit is provided in the indirect peripheral circuit 20 and access to the memory mat 113 is always performed in units of 32 bits, there are 6 inspection mats corresponding to the memory mat 113 per mat. A bit configuration is sufficient. Since the size of the inspection mat per mat can be reduced in this way, the area of the memory mat portion 10 can be reduced. For example, the SRAM 227 is turned on in a semiconductor integrated circuit such as the microcomputer 221. It is advantageous when chipped.
[0052]
(2) When word access or byte access is designated from the outside, the data size alignment circuit 23 assigns the data stored in the memory mat 113 to the remaining bits that are not accessed, so that the memory mat 113 has a 32-bit unit. Access to the inspection mat 114 in 6-bit units.
[0053]
(3) In the write cycle, data is read from the memory mat 113 and the inspection mat 114 in the first half cycle, and writing to the memory mat 113 and the inspection mat 114 is performed in the second half cycle. Specifically, when the internal two-phase clock signals φ1 and φ2 synchronized with the clock signal input from the outside via the CK terminal are generated in the SRAM 227 at the timing shown in FIG. Data is read from the memory mat 113 and the inspection mat 114 in synchronization with φ1, and writing to the memory mat 113 and the inspection mat 114 is performed in synchronization with the clock signal φ2. Thereby, the time required for processing can be shortened as compared with the case where data reading from the memory mat 113 or the inspection mat 114 and data writing to the memory mat 113 or the inspection mat 114 are performed in different cycles. In other words, data is read from the memory mat in the first half of the write cycle, and data is written to the memory mat in the second half of the write cycle, so that high-speed performance is not deteriorated despite having the ECC function. Error detection and correction can be performed.
[0054]
Although the invention made by the present inventor has been specifically described above, the present invention is not limited thereto, and it goes without saying that various changes can be made without departing from the scope of the invention.
[0055]
For example, after correcting a 1-bit error in the data in the ECC function block circuit 21 (steps S17 and S26), the data is written to the memory mat 113 again, read out, and checked again in the ECC function block circuit 21 (step If S12, S22) and error correction (steps S17, S26) are performed, a 2-bit error can be corrected. Therefore, the data reliability can be improved by rewriting the error-corrected data in the memory mat 113.
[0056]
In the above description, the case where the invention made mainly by the present inventor is applied to the SRAM, which is the field of use as the background, has been described. However, the present invention is not limited to this, and a dynamic random access memory is used. (DRAM) can also be applied. The present invention can also be applied to a case where a semiconductor memory is manufactured as a single product.
[0057]
The present invention can be applied on condition that at least a memory mat is provided.
[0058]
【The invention's effect】
The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.
[0059]
In other words, the bit configuration of the inspection mat is reduced by providing a data size alignment circuit directly in the peripheral circuit and making the memory mat accessible in units of the maximum bit width in the effective bit width that can be changed according to external designation. As a result, an increase in chip area accompanying the addition of the ECC function can be minimized. Further, by reading data from the memory mat in the first half of the write cycle and writing data to the memory mat in the second half of the write cycle, the ECC function can be mounted without degrading high speed.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an example of the overall configuration of an SRAM, which is an example of a semiconductor memory device according to the present invention.
FIG. 2 is a block diagram showing an example of the overall configuration of a microcomputer on which the SRAM is mounted.
FIG. 3 is a layout explanatory diagram of main circuit blocks in the SRAM;
FIG. 4 is an explanatory diagram of a Hamming code in the ECC function.
FIG. 5 is an explanatory diagram of main external terminals and functions of the external terminals in the SRAM shown in FIG. 1;
6 is an explanatory diagram of data size alignment processing performed by the data size alignment circuit shown in FIG. 1; FIG.
FIG. 7 is a flowchart of an ECC operation during a write operation of the SRAM.
FIG. 8 is a flowchart of an ECC operation during a read operation of the SRAM.
FIG. 9 is a timing diagram of a write operation in the SRAM.
FIG. 10 is a timing diagram of a read operation in the SRAM.
FIG. 11 is a block diagram illustrating a configuration example of an SRAM to be compared with the SRAM.
[Explanation of symbols]
10 Memory mat
11, 12, 13, 14 RAM section
20 Indirect peripheral circuits
21 ECC function block
22 Data latch circuit
23 Data size alignment circuit
24 I / O control circuit
111 row selection circuit
112 column selection circuit
113 Memory mat
114 Inspection mat
115,116 I / O circuit
221 Microcomputer
222 Bus
223 FPU
224 CPU
226 ROM
227 SRAM
228 External interface

Claims (5)

データ入出力に関する有効ビット幅を外部からの指定に応じて変更可能な半導体記憶装置であって、
外部からの指定に応じて変更可能な有効ビット幅における最大のビット幅単位でアクセスされるメモリマットが複数配置されたメモリマット部と、
上記複数のメモリマットによって共有される間接周辺回路と、を含み、
上記間接周辺回路は、ハミングコードに基づくエラー訂正のためのECC機能ブロック回路と、
上記ECC機能ブロック回路と外部入出力端子との間に介在され、外部から指定された有効ビット幅に応じたデータサイズアライメント処理を行うデータサイズアライメント回路と、を含んで成ることを特徴とする半導体記憶装置。
A semiconductor memory device capable of changing an effective bit width related to data input / output according to an external designation,
A memory mat portion in which a plurality of memory mats that are accessed in units of the maximum bit width in an effective bit width that can be changed according to designation from the outside are arranged;
An indirect peripheral circuit shared by the plurality of memory mats,
The indirect peripheral circuit includes an ECC function block circuit for error correction based on a Hamming code;
A data size alignment circuit which is interposed between the ECC function block circuit and the external input / output terminal and performs data size alignment processing in accordance with an effective bit width designated from the outside. Storage device.
データ入出力に関する有効ビット幅を外部からの指定に応じて、バイトアクセス対応のビット幅、上記バイトアクセスよりも広いワードアクセス対応のビット幅、上記ワードアクセスよりも広いロングワード対応のビット幅の3段階に変更可能な半導体記憶装置であって、
上記ロングワード対応のビット幅単位でアクセスされるメモリマットが複数配置されたメモリマット部と、
上記複数のメモリマットによって共有される間接周辺回路と、を含み、
上記間接周辺回路は、ハミングコードに基づくエラー訂正のためのECC機能ブロック回路と、
上記ECC機能ブロック回路と外部入出力端子との間に介在され、外部から指定された有効ビット幅に応じたデータサイズアライメント処理を行うデータサイズアライメント回路と、を含んで成ることを特徴とする半導体記憶装置。
The effective bit width related to data input / output is 3 according to the designation from the outside, the bit width corresponding to byte access, the bit width corresponding to word access wider than the byte access, and the bit width corresponding to long word wider than the word access. A semiconductor memory device that can be changed in stages,
A memory mat portion in which a plurality of memory mats accessed in bit width units corresponding to the long word are arranged;
An indirect peripheral circuit shared by the plurality of memory mats,
The indirect peripheral circuit includes an ECC function block circuit for error correction based on a Hamming code;
A data size alignment circuit which is interposed between the ECC function block circuit and the external input / output terminal and performs data size alignment processing in accordance with an effective bit width designated from the outside. Storage device.
上記データサイズアライメント回路は、外部からワードアクセス又はバイトアクセスが指定された場合に、アクセスされない残りのビットについては上記メモリマットの記憶データを割り当てる請求項2記載の半導体記憶装置。3. The semiconductor memory device according to claim 2, wherein said data size alignment circuit allocates storage data of said memory mat for the remaining bits that are not accessed when word access or byte access is designated from the outside. 書き込みサイクルの前半で上記メモリマットからのデータ読み出し動作が行われ、上記書き込みサイクルの後半で上記メモリマットへのデータ書き込み動作が行われるとき、上記データサイズアライメント回路は、外部からワードアクセスあるいバイトアクセスが指定された場合に、アクセスされない残りのビットについては書き込みサイクルの前半で上記メモリマットから読み出されたデータを割り当てる請求項2記載の半導体記憶装置。When a data read operation from the memory mat is performed in the first half of the write cycle and a data write operation to the memory mat is performed in the second half of the write cycle, the data size alignment circuit performs word access or byte from the outside. 3. The semiconductor memory device according to claim 2, wherein, when access is designated, the data read from the memory mat is assigned to the remaining bits not accessed in the first half of the write cycle. 請求項1乃至4の何れか1項記載の半導体記憶装置と、上記半導体記憶装置をアクセス可能な中央処理装置と、を含んで一つの半導体基板に形成されたマイクロコンピュータ。A microcomputer formed on a single semiconductor substrate, comprising: the semiconductor memory device according to claim 1; and a central processing unit capable of accessing the semiconductor memory device.
JP2003199585A 2003-07-22 2003-07-22 Semiconductor storage device and microcomputer Pending JP2005044386A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003199585A JP2005044386A (en) 2003-07-22 2003-07-22 Semiconductor storage device and microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003199585A JP2005044386A (en) 2003-07-22 2003-07-22 Semiconductor storage device and microcomputer

Publications (1)

Publication Number Publication Date
JP2005044386A true JP2005044386A (en) 2005-02-17

Family

ID=34260298

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003199585A Pending JP2005044386A (en) 2003-07-22 2003-07-22 Semiconductor storage device and microcomputer

Country Status (1)

Country Link
JP (1) JP2005044386A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007140750A (en) * 2005-11-16 2007-06-07 Renesas Technology Corp Orthogonal transform circuit
KR100894464B1 (en) * 2006-08-07 2009-04-22 후지쯔 마이크로일렉트로닉스 가부시키가이샤 Semiconductor memory device capable of changing ecc code length
JP2011039585A (en) * 2009-08-06 2011-02-24 Sony Corp Nonvolatile random access memory and nonvolatile memory system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007140750A (en) * 2005-11-16 2007-06-07 Renesas Technology Corp Orthogonal transform circuit
KR100894464B1 (en) * 2006-08-07 2009-04-22 후지쯔 마이크로일렉트로닉스 가부시키가이샤 Semiconductor memory device capable of changing ecc code length
US8001450B2 (en) 2006-08-07 2011-08-16 Fujitsu Semiconductor Limited Semiconductor memory device capable of changing ECC code length
JP2011039585A (en) * 2009-08-06 2011-02-24 Sony Corp Nonvolatile random access memory and nonvolatile memory system

Similar Documents

Publication Publication Date Title
US4005405A (en) Error detection and correction in data processing systems
JP4243245B2 (en) Transparent ECC memory system
US7353438B2 (en) Transparent error correcting memory
US8112678B1 (en) Error correction for programmable logic integrated circuits
US5978953A (en) error detection and correction
JP4071940B2 (en) Shared error correction for memory design
US8291303B2 (en) Memory device with error correction system for detection and correction errors in read out data
US7426683B2 (en) Semiconductor memory device equipped with error correction circuit
US7761779B2 (en) Access control apparatus, access control system, processor, access control method, memory access control apparatus, memory access control system, and memory access control method
US20080082892A1 (en) Integrated circuit device including a circuit to generate error correction code for correcting error bit for each of memory circuits
EP0668561B1 (en) A flexible ECC/parity bit architecture
JPH05241975A (en) Data processing system having error/detecting correcting mechanism
CA2172812C (en) Method for combining a plurality of independently operating circuits within a single package
JP2005044386A (en) Semiconductor storage device and microcomputer
JP2004500623A (en) Method and circuit device for storing data words in a RAM module
JPS58222497A (en) Microprogram controller
JPH10207786A (en) Memory system
SU913383A1 (en) Device for detecting and correcting errors in electronic computer units
JPS615500A (en) Memory integrated circuit
SU951406A1 (en) Memory device with self-check capability
JPH10340586A (en) Semiconductor memory device and data processor
JPH11161559A (en) Storage device with parity check function
JPS62245453A (en) Substituting method for alternative memory
JPH0240746A (en) Memory error processing system
JP2002149501A (en) Data storage controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060721

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081209

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090407