JP3614956B2 - Memory control system - Google Patents
Memory control system Download PDFInfo
- Publication number
- JP3614956B2 JP3614956B2 JP33186295A JP33186295A JP3614956B2 JP 3614956 B2 JP3614956 B2 JP 3614956B2 JP 33186295 A JP33186295 A JP 33186295A JP 33186295 A JP33186295 A JP 33186295A JP 3614956 B2 JP3614956 B2 JP 3614956B2
- Authority
- JP
- Japan
- Prior art keywords
- memory
- address
- access
- dram
- page
- 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
Links
- 230000015654 memory Effects 0.000 title claims description 344
- 238000006243 chemical reaction Methods 0.000 claims description 26
- 101100247319 Drosophila melanogaster Ras64B gene Proteins 0.000 description 24
- 101150019218 RAS2 gene Proteins 0.000 description 24
- 101150076031 RAS1 gene Proteins 0.000 description 23
- 101150045048 Ras85D gene Proteins 0.000 description 23
- 238000001514 detection method Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 15
- 238000000034 method Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 9
- 238000007689 inspection Methods 0.000 description 7
- 238000012360 testing method Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 5
- 230000000873 masking effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 238000013519 translation Methods 0.000 description 4
- 101100086437 Drosophila melanogaster Rap1 gene Proteins 0.000 description 3
- 101100247326 Mucor circinelloides f. lusitanicus RAS3 gene Proteins 0.000 description 3
- -1 RAS4 Proteins 0.000 description 3
- UFULAYFCSOUIOV-UHFFFAOYSA-N cysteamine Chemical compound NCCS UFULAYFCSOUIOV-UHFFFAOYSA-N 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Dram (AREA)
Description
【0001】
【発明の属する技術分野】
この発明はメモリ制御システムに関し、特にパーソナルコンピュータのメインメモリとして使用されるDRAMバンクを効率良くアクセスするための改良がなされたメモリ制御システムに関する。
【0002】
【従来の技術】
近年、携行が容易でバッテリにより動作可能なノートブックタイプまたはラップトップタイプのポータブルパーソナルコンピュータが種々開発されている。この種のパーソナルコンピュータにおいては動作速度の高速化が望まれており、最近では、大規模なキャッシュを内蔵する高性能マイクロプロセッサがCPUとして使用され始めている。
【0003】
キャッシュ内蔵のマイクロプロセッサをCPUとして使用した場合には、メインメモリのアクセス回数を減らすことができ、ある程度はシステム動作性能の向上を図ることができる。
【0004】
しかしながら、CPUがキャッシュを内蔵していてもメインメモリに対するアクセスが無くなるわけではなく、キャッシュミスが発生したときには、CPUがメインメモリに対してメモリリード/ライトサイクルを実行することが必要とされる。このため、実際には、システム性能を向上させるためには、CPUによるメモリリード/メモリライトサイクルの実行速度を早めることが必要不可欠となる。
【0005】
パーソナルコンピュータのメインメモリとしては、通常、ダイナミックRAM(DRAM)が使用されている。DRAMは、スタテッィクRAM(SRAM)に比べて低コストである反面、アクセス速度が遅いという特徴を持つ。この問題を解決するため、最近ではDRAMチップ自体の改良などの半導体技術レベルでの改善に加え、ページモードアクセスやインタリーブ制御などの採用によるメモリアーキテクチャレベルでの改善も進められている。
【0006】
これらページモードアクセスやインタリーブ制御を行うために、メモリ制御システムには、通常、ページヒット判定を行うためのロジックが組み込まれている。ページヒット判定というのは、DRAMのページモードアクセス方式において、CPUが発生するメモリアクセスのアドレスが、直前に行われたアクセスと同一DRAMバンクの同一ページで得るかどうかを判定することである。同一ページであれば、RAS(ロウアドレスストローブ)の出し直しを必要としない高速アクセスが可能となる。
【0007】
従来のメモリ制御システムでは、まず、CPUアドレスからDRAM論理アドレスへの変換が行われ、次いで、アクセスすべきDRAMバンクの選択が行われて、その選択されたDRAMバンクが直前にアクセスされたDRAMバンクと同一であるか否かがRASデコーダによって調べられる。同一バンクであれば、選択されたDRAMバンクへのロウアドレスと直前のアクセスのロウアドレスとがページヒット判定回路によって比較されて、ページヒット判定が行われる。
【0008】
【発明が解決しようとする課題】
このように、従来では、ページヒット判定が行われる前に、アドレス変換、RASデコードといった処理が必要となり、結果として、ページヒット判定に時間がかかるという問題がある。このため、ページヒットした場合であっても、ウエイトサイクルが必要となり、十分な高速アクセスを実現することができなかった。
【0009】
この発明はこのような点に鑑みてなされたもので、ページヒット判定を高速に実行できるようにし、メモリアクセス速度の高速化を実現することができるメモリ制御システムを提供することを目的とする。
【0010】
【課題を解決するための手段】
この発明によるメモリ制御システムは、複数のRAS信号がそれぞれ割り当てられ、互いに独立してアクセス可能な複数のDRAMバンクと、CPUのメモリアドレス空間に非連続に配置されている前記複数のDRAMバンクそれぞれに対応するメモリアエリアがDRAM論理アドレス空間上で連続して配置されるように、前記複数のDRAMバンクのページサイズ以上の変換単位で、前記CPUからのメモリアドレスをDRAM論理アドレスに変換するアドレス変換手段と、前回のメモリアクセス時におけるCPUからのメモリアドレスを保持し、そのメモリアドレスと今回のメモリアクセス時におけるCPUからのメモリアドレスとを比較し、一致した時に今回のメモリアクセスが前回のメモリアクセスと同一バンク且つ同一ページであることを示すページヒット信号を出力するページヒット判定手段と、前記アドレス変換手段から出力されるDRAM論理アドレスをデコードして、どのDRAMバンクのRAS信号を出力するかを決定するRASデコーダであって、前記ぺージヒット信号が出力された時、DRAMページモードアクセスのためのRAS信号出力制御を行うRASデコーダと、前記CPUによってアドレッシング可能なメモリアドレス空間を構成する複数のメモリアドレスエリアそれぞれについて、リードアクセスを許可すべきメモリデバイスの種類を指定する情報とライトアクセスを許可すべきメモリデバイスの種類を指定する情報とを含むメモリ属性情報が定義されたメモリ属性テーブルとを具備し、前記ページヒット判定手段は、前記CPUによって設定される、ページヒット判定のために使用すべき前記メモリアドレス内のビット位置を前記DRAMバンク毎に指定する制御情報を保持する手段と、前記RASデコーダのデコード結果と前記制御情報とに基づいて、前記ページヒット判定のために使用すべき前記メモリアドレス内のビット位置を変更する手段とを含み、且つ前回のメモリアクセス時におけるCPUからのメモリアドレスと一緒にそのメモリアドレスに対応するメモリアドレスエリアの前記メモリ属性情報がライトアクセスとリードアクセスとで異なるメモリデバイスを指定しているか否かを示す情報とそのときのメモリアクセスがライトアクセスとリードアクセスのいずれであるかを示すサイクル種別情報を保持し、ライトアクセスとリードアクセスとでアクセス対象のメモリデバイスが異なるときは、保持されているメモリアドレスと今回のメモリアクセス時におけるCPUからのメモリアドレスとが一致し、且つ保持されている前記サイクル種別情報と今回のメモリアクセスのサイクル種別との一致を条件に、前記ページヒット信号を出力することを特徴とする。
【0011】
このメモリ制御システムにおいては、ページヒット判定手段により、DRAM論理アドレスではなく、CPUアドレスを用いて、今回のメモリアクセスが前回のメモリアクセスと同一バンク且つ同一ページであるか否かを判定するページヒット判定が行われる。ページヒット判定にCPUアドレスを利用することができるのは、CPUアドレスからDRAM論理アドレスへのアドレス変換の単位がDRAMバンクのページサイズ以上の値に設定されているからである。これにより、DRAM論理アドレスが前回と今回のアクセスとで同一ページを指定しているにもかかわらず、CPUアドレスが異なるページを指定することがなくなる。よって、アドレス変換動作とページヒット判定動作とを並行して行うことが可能となり、ページヒット判定を高速に行うことができ、メモリアクセス速度の高速化を実現することができる。
【0012】
また、前記ページヒット判定手段は、前回のメモリアクセス時におけるCPUからのメモリアドレスと一緒にそのメモリアドレスに対応するメモリアドレスエリアの前記メモリ属性情報がライトアクセスとリードアクセスとで異なるメモリデバイスを指定しているか否かを示す情報とそのときのメモリアクセスがライトアクセスとリードアクセスのいずれであるかを示すサイクル種別情報を保持し、ライトアクセスとリードアクセスとでアクセス対象のメモリデバイスが異なるときは、保持されているメモリアドレスと今回のメモリアクセス時におけるCPUからのメモリアドレスとが一致し、且つ保持されている前記サイクル種別情報と今回のメモリアクセスのサイクル種別との一致を条件に、前記ページヒット信号を出力するように構成することが好ましい。
【0013】
これにより、ライトアクセスとリードアクセスとでアクセス対象のメモリデバイスが異なるときであっても、メモリ属性を高速に決定できるようになり、高速なページヒット判定を生かした高速メモリアクセスが可能になる。
【0014】
さらに、メモリ属性情報として、ライトプロテクトがなされているか否かを示すライトプロテクト情報とキャッシュメモリを使用したキャッシング操作が有効か否かを示すキャッシュ情報とをページヒット判定手段にメモリアドレスと一緒に保持しておくことにより、次に実行すべきサイクルを効率よく決定することができる。
【0015】
【発明の実施の形態】
以下、図面を参照してこの発明の実施形態を説明する。図1には、この発明の一実施形態に係るメモリ制御システムが適用されたコンピュータシステムが示されている。
【0016】
このコンピュータシステムはノートブックタイプまたはラップトップタイプのポータブルパーソナルコンピュータを実現するためのものであり、システムボード10上には、図示のように、CPU11、システムコントローラ12、システムメモリ13、BIOS ROM14、リアルタイムクロック(RTC)15、割り込みコントローラ(PIC)16、キーボードコントローラ(KBC)17、ディスプレイコントローラ18などが実装されている。
【0017】
また、システムボード10上には、CPUローカルバス(プロセッサバスと称する場合もある)31、ISA/EISA/PCIなどの仕様を持つシステムバス32、およびメモリアドレスバス33などが配設されている。
【0018】
さらに、このシステムには、増設メモリを接続するための2つの拡張用メモリコネクタ21,22が設けられている。図1においては、拡張メモリコネクタ21,22にそれぞれ増設メモリ41,42が接続されている状態が示されている。
【0019】
増設メモリ41,42は、システムメモリサイズを拡張するためにユーザによって必要に応じて装着されるオプションメモリであり、例えばDRAMカードや、DIMMまたはSIMMメモリモジュールなどから構成されている。これら増設メモリは、通常、1以上のDRAMバンクから構成されている。
【0020】
CPU11は、大規模なキャッシュメモリを内蔵したマイクロプロセッサであり、CPUローカルバス31を介してシステムコントローラ12に接続されている。CPUローカルバス31は、CPU11を構成するマイクロプロセッサの入出力ピンに直接繋がる信号群である。ここには、32ビットデータバス、32ビットアドレスバス、および各種ステータス信号線などが含まれている。
【0021】
システムコントローラ12は、CPUローカルバス31とシステムバス32との間に接続されており、CPU11からの要求に応じてシステム内の全てのメモリおよびI/Oデバイスを制御する。このシステムコントローラ12は、ゲートアレイによって構成された1個のLSIによって実現されており、その中にはシステムメモリ13および増設メモリ41,42のDRAMを制御するためのメモリ制御ロジロックが組み込まれている。
【0022】
システムメモリ13は、このシステムのメインメモリとして使用されるものであり、通常、1以上のDRAMバンクから構成されている。このシステムメモリ13には、オペレーティングシステム、実行対象のアプリケーションプログラム、および各種処理データなどが格納される。
【0023】
システムメモリ13は、所定のコネクタを介してまたは直接にシステムボード10上に実装されている。システムメモリ13は32ビットのメモリデバイスであり、そのデータポートはCPUローカルバス31の32ビットデータバスに接続され、また、アドレス入力ポートはメモリアドレスバス33に接続されている。メモリアドレスバス33はDRAM専用のアドレスバスであり、このメモリアドレスバス33上にはDRAMの物理アドレス(ロウアドレス/カラムアドレス)がシステムコントローラ12から出力される。
【0024】
同様に、増設メモリ41,42もそれぞれ32ビットのメモリデバイスであり、対応するコネクタ21,22を介してそのデータポートがCPUローカルバス31の32ビットデータバスに接続され、アドレス入力ポートがメモリアドレスバス33に接続されている。
【0025】
また、システムメモリ13には2本のロウアドレスストローブ信号線(RAS線:RAS0、RAS1)が接続されている。同様に、拡張メモリコネクタ21には別の2本のロウアドレスストローブ信号線(RAS線:RAS2、RAS3)が接続され、拡張メモリコネクタ22にも、別の2本のロウアドレスストローブ信号線(RAS線:RAS4、RAS5)が接続されている。
【0026】
さらに、システムメモリ13および増設メモリ41,42には、カラムアドレスストローブ信号線(CAS線)、および他の各種制御信号線(ライトイネーブル信号線WE、アウトプットイネーブル信号線OEなど)がそれぞれ共通接続されている。
【0027】
システムメモリ13および増設メモリ41,42内の全てのDRAMバンクは、CPU11のDRAM用メモリアドレス空間に配置される。このシステムにおいては、各RAS線のデコード条件の簡単化、およびインタリーブアーキテクチャを最大限有効利用するために、それらDRAMバンクはメモリサイズの大きなもの程若いアドレスの方に配置される。
【0028】
システムメモリ13および増設メモリ41,42のリード/ライトアクセス制御においては、RAS線(RAS0〜RAS5)の1つがアクティブ状態に設定され、そのアクティブ状態のRAS線に接続されたDRAMバンクがアクセス対象のDRAMバンクとして選択される。このようなRAS線の付勢制御は、システムコントローラ12のメモリ制御ロジックによって実行される。
【0029】
図2には、メモリ制御ロジックの構成が示されている。
【0030】
メモリ制御ロジック120は、DRAMのページモードアクセスおよびページインタリーブをサポートするハードウェアロジックであり、アドレス変換回路121、RASデコーダ122、ロウアドレス/カラムアドレスマルチプレクサ123、CAS発生回路124、タイミング制御回路125、およびページヒット判定回路126を有している。
【0031】
アドレス変換回路121は、CPUアドレス(A31:02)をDRAM論理アドレス(MA31:02)に変換する。この変換は、CPU11のメモリアドレス空間に分散配置されている複数のDRAMメモリエリアをDRAMアクセス専用の論理アドレス空間に連続的に割り付けるために行われる。このアドレス変換動作の一例を図3に示す。
【0032】
すなわち、図3(A)に示されているように、CPU11のメモリアドレス空間には、通常、システムメモリエリアやPMメモリエリアのようなDRAMエリアの他に、ビデオRAM、BIOS ROM、および各種オプションROMなどを配置するための予約領域(0A0000H〜0C0000H)が確保されている。アドレス変換回路121は、このようなCPUメモリマップに応じて、予約領域の直前および直後のDRAMエリアのアドレスが連続するようにアドレス変換を行う。
【0033】
また、BIOS ROMに格納されたVGA BIOSやシステムBIOSなどをDRAMにコピーして使用する場合には、図3(B)に示されているように、予約領域のVGA BIOSエリアおよびシステムBIOSエリアに割り当てられたCPUアドレスも、DRAM論理アドレスに変換される。さらに、システムマネージメントモード(SMM)を有するCPUの場合には、そのSMMの中でのみ使用されるSMRAMエリアに割り当てられたCPUアドレスもDRAM論理アドレスに変換される。
【0034】
このようなCPUアドレスからDRAM論理アドレスへの変換は、例えば16Kバイト単位で行われる。このため、DRAM論理アドレスの下位ビット部(MA13:02)は、アドレス変換後においても、CPUアドレスの下位ビット部(A13:02)と等しい。
【0035】
アドレス変換回路121によって得られたDRAM論理アドレス(MA31:02)は、システム内のDRAMバンクをアドレッシングするために使用される。
【0036】
RASデコーダ122は、その内部レジスタにセットされたRAS0〜RAS5それぞれのデコード条件に従ってDRAM論理アドレス(MA31:02)をデコードし、RAS0〜RAS5線の中でそのDRAM論理アドレスが満たすデコード条件を持つRAS線を選択してそれをアクティブにする。RAS線をアクティブにするタイミングなどは、タイミング制御回路125からのタイミング制御信号CONT1によって制御される。
【0037】
このRASデコーダ122のデコード動作は、各RAS線のデコード条件とDRAM論理アドレスとの一致/不一致を検出する事のみによって行うことができる。RAS0〜RAS5線それぞれのデコード条件がどのように決定されるかについては、図3以降で詳述する。
【0038】
ロウアドレス/カラムアドレスマルチプレクサ123は、DRAM論理アドレス(MA31:02)を、アクセス対象DRAMバンクをアドレッシングするためのロウアドレス(RA)とカラムアドレス(CA)に分解する。このロウアドレス/カラムアドレスマルチプレクサ123の内部レジスタには、各DRAMバンクのロウアドレス(RA)の開始ビット位置を示す制御パラメタが予めセットされている。ロウアドレス(RA)とカラムアドレス(CA)に分解する動作は、アクセス対象DRAMバンクに対応する制御パラメタに従って行われる。
【0039】
ロウアドレス(RA)およびカラムアドレス(CA)は、メモリバス33上に時分割的に出力される。この出力タイミングは、タイミング制御回路125からのタイミング制御信号CONT2によって制御される。
【0040】
CAS発生回路124は、タイミング制御回路125からのタイミング制御信号CONT3に従って、CAS線の付勢を制御する。
【0041】
タイミング制御回路125は、前述のタイミング制御信号CONT1〜CONT3を発生することによって、RASデコーダ122、ロウアドレス/カラムアドレスマルチプレクサ123、およびCAS発生回路124の動作を制御する。タイミング制御信号の発生動作は、ページヒット判定回路126からのページヒット信号HITなどによって制御される。
【0042】
ページヒット判定回路126は、前回のDRAMアクセス時のCPUアドレスをページヒット判定用CPUアドレスとして保持しており、そのCPUアドレスと次回のDRAMアクセス時のCPUアドレスとを比較することによって、ページヒットの有無を判定する。ここで、ページヒットとは、次回のDRAMアクセスが前回と同一のDRAMバンク内の同一ページをアクセスすることをいう。ページヒットしたことが判定されると、このことがページヒット信号HITによって、タイミング制御回路125に通知される。
【0043】
このように、ページヒットの判定動作は、DRAM論理アドレスではなく、CPUアドレスの値に基づいて行われる。これにより、アドレス変換動作とページヒット判定動作とを並行して行うことが可能となる。ページヒット判定にCPUアドレスを利用することができるのは、CPUアドレスからDRAM論理アドレスへのアドレス変換の単位(16Kバイト)がDRAMバンクのページサイズ(最大4Kバイト程度)よりも大きな値に設定されているからである。これにより、DRAM論理アドレスが前回と今回のアクセスとで同一ページを指定しているにもかかわらず、CPUアドレスが異なるページを指定することがなくなる。
【0044】
ページヒットの判定には、CPUアドレス(A31:02)の中でカラムアドレス以降の全上位アドレスが使用される。従来方式では、DRAMアクセスか否かの判定、DRAMアクセスならばそのバンクを決定するために使用されていたアドレスを含む。
【0045】
カラムアドレスのビット数、つまりページサイズはアクセス対象のDRAMバンク毎に異なる。このため、ページヒット判定回路126の内部レジスタにもページヒット判定に使用すべきビットをRAS線毎に指定する制御パラメタが予めセットされており、アクセス対象DRAMバンクに対応する制御パラメタに従ってページヒットの判定が行われる。
【0046】
このメモリ制御ロジック120によるDRAM制御タイミングは、次の3つの状態に対応したサイクルタイミングに分類される。
【0047】
(1)ページヒット
これは、今回のDRAMアクセスが前回と同一のDRAMバンク内の同一ページをアクセスすることをいう。この場合、DRAMバンクはページモードでアクセス制御される。すなわち、カラムアドレスおよびCAS線の付勢タイミングだけが制御され、RASデコーダ122によるRAS線の切り替えは行われない。また、前回のメモリサイクルが終了してもRAS線はアクティブ状態に維持され続ける。
【0048】
(2)バンクミス
これは、今回のDRAMアクセスが前回と異なるDRAMバンクをアクセスすることをいう。この場合、RASデコーダ122によるRAS線の切り替えが発生し、DRAMバンクは通常のDRAMアクセスサイクルでアクセスされる。また、ページヒット判定回路126に保持されているページヒット判定用CPUアドレスの更新が行われる。
【0049】
(3)ページミス
これは、今回のDRAMアクセスが前回と同一のDRAMバンク内の異なるページをアクセスすることをいう。この場合、RASデコーダ122によって前回と同一のRAS線が再びアクティブ状態に設定し直され、DRAMバンクは通常のDRAMアクセスサイクルでアクセスされる。また、ページヒット判定回路126に保持されているページヒット判定用CPUアドレスの更新が行われる。
【0050】
次に、図4乃至図6を参照して、RASデコーダ122に設定される各RAS線のデコード条件について説明する。
【0051】
図4には、システム内のDRAMメモリマップの一例が示されている。このDRAMメモリマップは、図1に示されているように、システムボード10上にシステムメモリ13として2個の2MバイトDRAMバンクが実装されており、拡張メモリコネクタ21の増設メモリ41が1個の8MバイトDRAMバンクから構成され、また拡張メモリコネクタ22の増設メモリ42が2個の4MバイトDRAMバンクから構成されている場合に対応するものである。
【0052】
この場合、これらDRAMバンクは、メモリサイズの大きいもの順、すなわち、図4のように、8MバイトDRAMバンク、2個の4MバイトDRAMバンク、2個の2MバイトDRAMバンクの順で、合計20MバイトのDRAM論理アドレス空間に配置される。
【0053】
このメモリ配置においては、8MバイトDRAMバンクに対応するRAS2線には0〜8Mバイトのアドレス範囲が割り当てられる。また、最初の4MバイトDRAMバンクに対応するRAS4線には8〜12Mバイトのアドレス範囲、次の4MバイトDRAMバンクに対応するRAS5線には12〜16Mバイトのアドレス範囲が割り当てられる。さらに、最初の2MバイトDRAMバンクに対応するRAS0線には16〜18Mバイトのアドレス範囲、次の2MバイトDRAMバンクに対応するRAS1線には18〜20Mバイトのアドレス範囲が割り当てられる。RAS3線は使用されないので、このRAS3線にはアドレス範囲は割り当てられない。
【0054】
この時、RAS0〜RAS5線それぞれのデコード条件は、図5のように決定される。
【0055】
RAS0〜RAS5線それぞれのデコード条件としては、各RAS線に割り当てられたアドレス範囲に属する全てのDRAM論理アドレス値(MA31:02)にのみ共通に存在するビット列が使用される。
【0056】
すなわち、RAS2線のデコード条件は、DRAM論理アドレス値(MA31:02)の上位9ビット(MA31〜23)=“0000 0000 0”となる。DRAM論理アドレス値(MA31:02)の下位21ビットは、RAS2線に接続された8MバイトDRAMバンクのロウアドレスおよびカラムアドレスとして使用される。
【0057】
また、RAS4線のデコード条件は、DRAM論理アドレス値(MA31:02)の上位10ビット(MA31〜22)=“0000 0000 10”となる。DRAM論理アドレス値(MA31:02)の下位20ビットは、RAS4線に接続された4MバイトDRAMバンクのロウアドレスおよびカラムアドレスとして使用される。
【0058】
RAS5線のデコード条件は、DRAM論理アドレス値(MA31:02)の上位10ビット(MA31〜22)=“0000 0000 11”となる。DRAM論理アドレス値(MA31:02)の下位20ビットは、RAS5線に接続された4MバイトDRAMバンクのロウアドレスおよびカラムアドレスとして使用される。
【0059】
RAS0線のデコード条件は、DRAM論理アドレス値(MA31:02)の上位11ビット(MA31〜21)=“0000 0001 000”となる。DRAM論理アドレス値(MA31:02)の下位19ビットは、RAS0線に接続された2MバイトDRAMバンクのロウアドレスおよびカラムアドレスとして使用される。
【0060】
RAS1線のデコード条件は、DRAM論理アドレス値(MA31:02)の上位11ビット(MA31〜21)=“0000 0001 000”となる。DRAM論理アドレス値(MA31:02)の下位19ビットは、RAS0線に接続された2MバイトDRAMバンクのロウアドレスおよびカラムアドレスとして使用される。
【0061】
このように、各RAS線のデコード条件としては、各RAS線に対応するアドレス範囲に属する共通ビット列が使用される。このため、前述のRASデコーダ122は、DRAM論理アドレス値とデコード条件との一致/不一致をRAS線毎に検出するだけで済み、従来に比し、そのハードウェア構成を大幅に簡単化することが可能となる。
【0062】
次に、ページインタリーブアーキテクチャを採用する場合の各RAS線のデコード条件について説明する。
【0063】
ページインタリーブを行う場合には、図4のようにマッピングされた5つのDRAMバンクは、ページインタリーブ可能なバンクグループに分類される。各バンクグループは、メモリアドレス範囲が隣接し且つ合計メモリサイズが一致するバンクの組み合わせを含む。このようなグループピングは、DRAM論理アドレスの若い方から順番に行われる。
【0064】
すなわち、図4の例では、RAS2の8MバイトDRAMバンクのアドレス範囲(0〜8Mバイト)に後続するアドレス範囲に割り付けられた2個の4MバイトDRAMバンクの合計メモリサイズが8Mバイトとなるので、RAS2、RAS4、RAS5に対応する3つのバンクによって1つのページインタリーブグループが構成される。
【0065】
また、RAS0の2MバイトDRAMバンクのアドレス範囲(16〜8Mバイト)に後続するアドレス範囲にRAS1の2MバイトDRAMバンクが割り付けられているので、RAS0、RAS1に対応する2つのバンクによって別のページインタリーブグループが構成される。
【0066】
この場合、各RAS線のデコード条件は図5から図6のように変更される。
【0067】
すなわち、グループ1のRAS2,RAS4,RAS5それぞれのデコード条件としては、グループ1に割り当てられる合計16Mバイトのアドレス範囲(0〜16Mバイト)に属する全てのDRAM論理アドレス値(MA31:02)に共通に存在するビット列と、RAS2,RAS4,RAS5それぞれに対応するDRAMバンクのカラムアドレス(ページ内アドレス)とロウアドレス(ページアドレス)の間のビット列とが使用される。
【0068】
すなわち、図6のように、RAS2、RAS4、およびRAS5に割り当てられる合計16Mバイトのアドレス範囲においては、DRAM論理アドレス値(MA31:02)の上位8ビット(MA31〜24)=“0000 0000”が共通して存在し、これはグループ2には存在しない。したがって、(MA31〜24)=“0000 0000”は、RAS2、RAS4、およびRAS5の共通のデコード条件として使用される。
【0069】
RAS2については、DRAM論理アドレスにおけるロウアドレスの開始位置が1ビット左シフトされて、RAS2に対応する8MバイトDRAMバンクのロウアドレスとカラムアドレスとの間の1ビット(MA12)=“0”がデコード条件として加えられる。
【0070】
RAS4,RAS5それぞれについては、DRAM論理アドレスにおけるロウアドレスの開始位置が2ビット左シフトされて、それらに対応する4MバイトDRAMバンクそれぞれのロウアドレスとカラムアドレスの間の2ビット(MA13,12)の値がアドレス条件として加えられる。2ビット使用されるのは、RAS4,RAS5それぞれのメモリサイズが、RAS2のメモリサイズの半分だからである。
【0071】
すなわち、RAS4については、そのRAS4に対応する4MバイトDRAMバンクのロウアドレスとカラムアドレスの間の2ビット(MA13,12)=“01”がデコード条件として加えられ、RAS5については、そのRAS5に対応する4MバイトDRAMバンクのロウアドレスとカラムアドレスの間の2ビット(MA13,12)=“11”がアドレス条件として加えられる。
【0072】
このようにRAS2,RAS4,RAS5のデコード条件を決定すると、RAS2の8MバイトDRAMバンクには0〜16Mバイトのアドレス範囲の中の偶数ページ(0,2,4,6,……)が割り当てられ、RAS4の4MバイトDRAMバンクには0〜16Mバイトのアドレス範囲の中の奇数ページの一部(1,5,9,……)が割り当てられ、RAS5の4MバイトDRAMバンクには0〜16Mバイトのアドレス範囲の中の残りの奇数ページ(3,7,11,……)が割り当てられる。
【0073】
したがって、0〜16Mバイトの範囲で連続アクセスが行われる時には、RAS2、RAS4、RAS2、RAS5、RAS2、……という順番で、3つのDRAMバンクがページ単位で交互にアクセスされる。
【0074】
一方、グループ2のRAS0,RAS1それぞれのデコード条件は、次のようになる。
【0075】
すなわち、RAS0,RAS1それぞれのデコード条件としては、グループ2に割り当てられる合計4Mバイトのアドレス範囲(16〜20Mバイト)に属する全てのDRAM論理アドレス値(MA31:02)に共通に存在するビット列と、RAS0,RAS1それぞれに対応するDRAMバンクのカラムアドレスとロウアドレスの間のビット列とが使用される。
【0076】
RAS0、RAS1に割り当てられる合計4Mバイトのアドレス範囲においては、DRAM論理アドレス値(MA31:02)の上位10ビット(MA31〜22)=“0000 0001 00”が共通して存在し、これはグループ1には存在しない。したがって、(MA31〜22)=“0000 0001 00”は、RAS0、RAS1の共通のデコード条件として使用される。
【0077】
また、RAS0については、DRAM論理アドレスにおけるロウアドレスの開始位置が1ビット左シフトされて、RAS0に対応する2MバイトDRAMバンクのロウアドレスとカラムアドレスとの間の1ビット(MA11)=“0”がデコード条件として加えられる。
【0078】
RAS1についても、DRAM論理アドレスにおけるロウアドレスの開始位置が1ビット左シフトされて、それに対応する2MバイトDRAMバンクのロウアドレスとカラムアドレスの間の1ビット(MA11)=“1”がデコード条件として加えられる。
【0079】
このようにRAS0,RAS1のデコード条件を決定すると、RAS0の2MバイトDRAMバンクには16〜20Mバイトの4Mバイトのアドレス範囲の中の偶数ページ(0,2,4,6,……)が割り当てられ、RAS1の2MバイトDRAMバンクには奇数ページ(1,3,5,7,……)が割り当てられる。したがって、16〜20Mバイトの範囲で連続アクセスが行われる時には、RAS0、RAS1、RAS0、RAS1、……という順番で、2つのDRAMバンクがページ単位で交互にアクセスされる。
【0080】
このように、ページインタリーブは、インタリーブグループのアドレス範囲に共通に存在するビット列と、ロウアドレスとカラムアドレスとの間の所定ビット列とに基づいて各RASのデコード条件を決定し、それをRASデコーダ122に設定するだけで実現する事ができる。
【0081】
RASデコーダ122へのデコード条件の設定などのメモリ制御ロジック120に対する初期設定処理は、BIOS ROM14のIRTルーチンによって実行される。
【0082】
図7には、BIOSのIRTルーチンによって実行されるメモリ制御ロジック120に対する初期設定動作の手順が示されている。
【0083】
システムがパワーオンされると、IRTルーチンは、まず、各DRAMバンクのメモリタイプ(カラムアドレスおよびロウアドレスそれぞれのビット幅)を調べ、そのメモリバンクタイプにしたがってメモリサイズを検出する(ステップS11)。カラムアドレスとロウアドレスそれぞれのビット幅は、テスト対象DRAMバンクのある特定のメモリ番地に対するライト・リード・コンペアテストを実行することによって検出できる。
【0084】
このステップS11で行われるメモリサイズ検出処理動作の詳細については、図8以降で後述する。
【0085】
次に、IRTルーチンは、システム内のDRAMバンクのメモリ再配置を行う(ステップS12)。このメモリ再配置では、図4で説明したように、メモリサイズの大きいDRAMバンクから順にメモリアドレス空間の若い方に配置され、その配置に従って各DRAMバンクに割り当てるべきアドレス範囲が決定される。
【0086】
次いで、IRTルーチンは、図5で説明したように、DRAMバンクそれぞれに割り当てられたアドレス範囲毎にその範囲に属するDRAM論理アドレス値にのみ共通に存在するビット列を検出し、その共通ビット列をRAS線それぞれのデコード条件として決定する(ステップS13)。
【0087】
ページインタリーブアーキテクチャを用いない場合には、IRTルーチンは、ステップS13で決定した各RAS線のデコード条件を、そのままRASデコーダ122の内部レジスタにセットする(ステップS17)。次いで、IRTルーチンは、ロウアドレス/カラムアドレスマルチプレクサ123の内部レジスタにロウアドレス開始位置をRAS線毎に指定する制御パラメタをセットし、またページヒット判定回路126の内部レジスタにペ−ジヒット判定に使用するCPUアドレスの位置をRAS線毎に指定する制御パラメタをセットする(ステップS18)。これら制御パラメタの値は、それぞれステップS11で検出されたメモリバンクタイプに従って決定される。
【0088】
一方、ページインタリーブアーキテクチャを採用する場合には、IRTルーチンは、ステップS12でメモリサイズ順に配置したDRAMマップに従って、ページインタリーブ可能なグループを決定する(ステップS15)。次いで、IRTルーチンは、ページインタリーブグループのアドレス範囲に共通に存在するビット列と、ロウアドレスとカラムアドレスとの間の所定ビット列とに基づいて各RASのデコード条件を変更する(ステップS16)。
【0089】
この後、IRTルーチンは、ステップS16で決定した各RAS線のデコード条件を、RASデコーダ122の内部レジスタにセットする(ステップS17)。次いで、IRTルーチンは、ロウアドレス/カラムアドレスマルチプレクサ123の内部レジスタにロウアドレス開始位置をRAS線毎に指定する制御パラメタをセットし、またページヒット判定回路126の内部レジスタにペ−ジヒット判定に使用するCPUアドレスの位置をRAS線毎に指定する制御パラメタをセットする(ステップS18)。ロウアドレス開始位置は、ステップS11で検出されたメモリバンクタイプと、ページインターリーブのためのデコード条件として使用したロウアドレスとカラムアドレス間のビット数とに基づいて決定される。また、ペ−ジヒット判定に使用するCPUアドレスの位置については、ステップS11で検出されたメモリバンクタイプに従って決定される。
【0090】
次に、図8乃至図12を参照して、DRAMバンクのメモリサイズ検出処理の原理を説明する。
【0091】
まず、図8を参照して、1本のRASでアクセス制御可能なDRAMバンクの種類について説明する。DRAMバンクは、図示のように、タイプ1〜タイプ4の4つのバンクに大別される。
【0092】
タイプ1のDRAMバンクは、2Mバイトのメモリサイズを有する。このタイプ1のDRAMバンクは、512K(1K行×512列)×8ビット構成の4MビットDRAMチップを4個含んでおり、ロウアドレスのビット幅は10ビット、カラムアドレスのビット幅は9ビットである。
【0093】
タイプ2のDRAMバンクは、4Mバイトのメモリサイズを有する。このタイプ2のDRAMバンクは、1M(1K行×1K列)×4ビット構成の4MビットDRAMチップを8個含んでおり、ロウアドレスのビット幅は10ビット、カラムアドレスのビット幅は10ビットである。
【0094】
タイプ3のDRAMバンクは、8Mバイトのメモリサイズを有する。このタイプ3のDRAMバンクは、2M(2K行×1K列)×8ビット構成の16MビットDRAMチップを4個含んでおり、ロウアドレスのビット幅は11ビット、カラムアドレスのビット幅は10ビットである。
【0095】
タイプ4のDRAMバンクは、16Mバイトのメモリサイズを有する。このタイプ4のDRAMバンクは、4M(2K行×2K列)×4ビット構成の16MビットDRAMチップを8個含んでおり、ロウアドレスのビット幅は11ビット、カラムアドレスのビット幅は11ビットである。
【0096】
図9、図10、および図11には、それぞれ図1のシステムメモリ13、増設メモリ41、および増設メモリ42のメモリ構成が示されている。
【0097】
システムメモリ13がタイプ1の2個の2MバイトDRAMバンクによって構成されている場合には、図9に示されているように、一方の2MバイトDRAMバンクの4つのDRAMチップはRAS0線およびCAS線に共通接続され、他方の2MバイトDRAMバンクの4つのDRAMチップはRAS1線、およびCAS線に共通接続される。また、これら2つの2MバイトDRAMバンク内の全てのチップは、メモリアドレスバス33、およびデータバス322の双方に並列接続される。
【0098】
これら2つの2MバイトDRAMバンクのどちらがアドレス指定されるかは、RAS0とRAS1のどちらが付勢されるかによって決定される。
【0099】
RAS0線が付勢された場合には、その時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットがロウアドレスとしてそのRAS0線に接続されている4つのチップにそれぞれ取り込まれる。この後、RAS0線に接続されている4つのチップは、CAS線が付勢された時にメモリアドレスバス33上に出力されているアドレス値の下位9ビットをカラムアドレスとして取り込む。これら10ビットのロウアドレスおよび9ビットのカラムアドレスによってRAS0線に接続されている4つのチップそれぞれの同一番地が同時にアドレス指定され、1チップ当たり8ビットの合計32ビット単位でRAS0線に対応するDRAMバンクがリード/ライトアクセスされる。
【0100】
同様に、RAS1線が付勢された場合には、その時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットのロウアドレスがそのRAS1線に接続されている4つのチップにそれぞれ取り込まれる。この後、RAS1線に接続されている4つのチップは、CAS線が付勢された時にメモリアドレスバス33上に出力されているアドレス値の下位9ビットのカラムアドレスを取り込む。これら10ビットのロウアドレスおよび9ビットのカラムアドレスによって、RAS1線に接続されている4つのチップそれぞれの同一記憶位置が同時にアドレス指定され、1チップ当たり8ビットの合計32ビット単位でRAS1線に対応するDRAMバンクがリード/ライトアクセスされる。
【0101】
増設メモリ41がタイプ3の1個の8MバイトDRAMバンクによって構成されている場合には、図10に示されているように、その8MバイトDRAMバンクの4つのDRAMチップはRAS2線およびCAS線に共通接続される。また、8MバイトDRAMバンク内の全てのチップは、メモリアドレスバス33、およびデータバス322の双方に並列接続される。
【0102】
RAS2線が付勢された場合には、その時にメモリアドレスバス33上に出力されているアドレス値の下位11ビットがロウアドレスとしてそのRAS2線に接続されている4つのチップにそれぞれ取り込まれる。この後、RAS2線に接続されている4つのチップは、CAS線が付勢された時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットをカラムアドレスとして取り込む。これら11ビットのロウアドレスと10ビットのカラムアドレスとによって、RAS0線に接続されている4つのチップそれぞれの対応する記憶位置が同時にアドレス指定され、1チップ当たり8ビットの合計32ビット単位で、RAS2線に対応するDRAMバンクがリード/ライトアクセスされる。
【0103】
増設メモリ42がタイプ2の2個の4MバイトDRAMバンクによって構成されている場合には、図11に示されているように、一方の4MバイトDRAMバンクの8つのDRAMチップはRAS4線およびCAS線に共通接続され、他方の4MバイトDRAMバンクの8つのDRAMチップはRAS5線およびCAS線に共通接続される。また、これら4MバイトDRAMバンク内の全てのチップは、メモリアドレスバス33、およびデータバス322の双方に並列接続される。
【0104】
これら2つの4MバイトDRAMバンクのどちらがアドレス指定されるかは、RAS4とRAS5のどちらが付勢されるかによって決定される。
【0105】
RAS4線が付勢された場合には、その時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットがロウアドレスとしてそのRAS4線に接続されている8つのチップにそれぞれ取り込まれる。この後、RAS4線に接続されている8つのチップは、CAS線が付勢された時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットをカラムアドレスとして取り込む。これら10ビットのロウアドレスおよび10ビットのカラムアドレスによって、RAS4線に接続されている8つのチップそれぞれの同一の記憶位置が同時にアドレス指定され、1チップ当たり4ビットの合計32ビット単位でRAS4線に対応するDRAMバンクがリード/ライトアクセスされる。
【0106】
同様に、RAS5線が付勢された場合には、その時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットがロウアドレスとしてそのRAS5線に接続されている8つのチップにそれぞれ取り込まれる。この後、RAS5線に接続されている8つのチップは、CAS線が付勢された時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットをカラムアドレスとして取り込む。これら10ビットのロウアドレスおよび10ビットのカラムアドレスとによって、RAS5線に接続されている8つのチップそれぞれの同一記憶位置が同時にアドレス指定され、1チップ当たり4ビットの合計32ビット単位でRAS5線に対応するDRAMバンクがリード/ライトアクセスされる。
【0107】
このように、DRAMバンクのタイプ毎に、ロウアドレスとして使用されるビット数とカラムアドレスとして使用されるビット数との関係が異なっている。各RAS線に接続されたDRAMバンクのメモリサイズは、ロウアドレスおよびカラムアドレスとして使用されるビット数の違いを利用して検出される。
【0108】
以下、図12のフローチャートを参照して、IRTルーチンのステップS11で実行されるメモリサイズ検出処理の手順を説明する。
【0109】
IRTルーチンは、RAS0、RAS1、RAS2、…の順で、RAS線に接続されたDRAMバンクのメモリサイズ検出処理を行う。IRTルーチンは、まず、検査対象のRAS線の付勢だけが許可されるように、RASデコーダ122に所定のデコード条件をセットする(ステップS21)。この場合、検査対象RAS線のデコード条件としては、メモリサイズ検出のために行われる何回かのメモリアクセスで使用されるメモリアドレス値に共通のビット列が使用される。また、検査対象RAS線を除くの他の全てのRAS線については、メモリサイズ検出のために行われる何回かのメモリアクセスでそれらRAS線が付勢されないように、検査対象RAS線とは異なる所定のビット列がそれぞれのデコード条件として設定される。
【0110】
次いで、IRTルーチンは、タイプ1〜タイプ4のDRAMバンクの中で最もカラムアドレスのビット数が大きいタイプ4のDRAMバンク(カラムアドレスCA=11ビット、ロウアドレスRA=11ビット)が検査対象RAS線に接続されていると想定し、そのDRAMバンクに対してライト・リード・コンペアテストを行う(ステップS22)。この場合、ロウアドレス/カラムアドレスマルチプレクサ123には、タイプ4のDRAMバンクに対応する制御パラメタがセットされる。ライト・リード・コンペアテストでは、ライトアドレス00001000H(Hは16進表示を示す)のライトアクセスと、リードアドレス00000000Hのリードアクセスとが行われ、その時のライトデータとリードデータの一致の有無が調べられる(ステップS23)。
【0111】
もし、検査対象RAS線に実際に接続されているDRAMバンクが想定した通りのタイプ4のDRAMバンクであれば、アドレス00001000Hに正常にデータを書き込むことができるので、ライトデータとリードデータの値は不一致となる。一方、検査対象RAS線に実際に接続されているDRAMバンクがそのカラムアドレス数が10ビット以下のタイプ1、タイプ2、またはタイプ3のバンクであった場合には、ライトデータとリードデータの値は一致する。これは、次の理由による。
【0112】
すなわち、ステップS22ではタイプ4のDRAMバンクに対応する設定が成されているので、アドレス00001000Hのライトアクセス時に出力される11ビットのロウアドレスRA(MA23,……,MA13)=00000000000であり、11ビットのカラムアドレスCA(MA12,……,MA02)=10000000000である。カラムアドレス数が10ビット以下のDRAMバンクにおいては、11ビットのカラムアドレスCAの最上位ビットMA12の値“1”は無視される。このため、タイプ1、タイプ2、またはタイプ3のバンクが接続されている場合には、ライトアドレス00001000Hのライトアクセスによって、その先頭行におけるカラムアドレスCA=0000000000で指定される番地、すなわちアドレス00000000Hにデータが書き込まれる。これにより、リードアドレス00000000Hのリードアクセスで読み出されたリードデータがライトデータと一致する。
【0113】
したがって、ステップS23でライトデータとリードデータの不一致が検出された時は、検査対象RAS線に接続されているDRAMバンクは想定した通りのタイプ4のDRAMバンク(CA=11ビット、RA=11ビット、メモリサイズ=16Mバイト)であると判定され(ステップS24)、一方、ライトデータとリードデータの一致が検出された場合には、検査対象RAS線に接続されているDRAMバンクはカラムアドレスビット数が10ビット以下の他のタイプ(タイプ1、タイプ2、またはタイプ3)のDRAMバンクであると判定される。この場合には、次のようなステップS25以降の処理が行われる。
【0114】
すなわち、IRTルーチンは、今度は、タイプ4の次にカラムアドレスビット数が大きいタイプ3(またはタイプ2)のメモリ構成(カラムアドレスCA=10ビット、ロウアドレスRA=11ビット)が検査対象RAS線に接続されていると想定して、そのDRAMバンクに対してライト・リード・コンペアテストを行う(ステップS25)。このライト・リード・コンペアテストでは、ライトアドレス00000800Hのライトアクセスと、リードアドレス00000000Hのリードアクセスとが行われ、その時のライトデータとリードデータの一致の有無が調べられる(ステップS26)。
【0115】
もし、検査対象RAS線に実際に接続されているDRAMバンクがそのカラムアドレス数が9ビット以下のタイプ1のDRAMバンクであった場合には、前述と同様にカラムアドレスの最上位ビット“1”が無視されるため、そのタイプ1のDRAMバンクのアドレス00000000Hで指定される番地にデータが書き込まれる。この結果、ライトデータとリードデータの値は一致する。したがって、ライトデータとリードデータの一致が検出された場合には、検査対象RAS線に接続されているDRAMバンクがタイプ1のDRAMバンク(CA=9ビット、RA=10ビット、メモリサイズ=2Mバイト)であると判定される(ステップS27)。
【0116】
一方、査対象RAS線に実際に接続されているDRAMバンクが想定した通りの10ビットのカラムアドレスビット数を持つタイプ2またはタイプ3のDRAMバンクであれば、アドレス00010000Hに正常にデータを書き込むことができるので、ライトデータとリードデータの値は不一致となる。したがって、ライトデータとリードデータの不一致が検出された場合には、タイプ2またはタイプ3のどちらのDRAMバンクが接続されているかを検出するために、次のようなステップS28以降の処理が行われる。
【0117】
すなわち、IRTルーチンは、今度は、それらDRAMバンクの中でロウアドレスビット数が大きいタイプ3のDRAMバンク(カラムアドレスCA=10ビット、ロウアドレスRA=11ビット)が接続されていると想定して、そのDRAMバンクに対してライト・リード・コンペアテストを行う(ステップS28)。
【0118】
このライト・リード・コンペアテストでは、ライトアドレス00400000Hのライトアクセスと、リードアドレス00000000Hのリードアクセスとが行われ、その時のライトデータとリードデータの一致の有無が調べられる(ステップS29)。
【0119】
もし、検査対象RAS線に実際に接続されているDRAMバンクが想定した通りのタイプ3のDRAMバンクであれば、アドレス00400000Hに正常にデータを書き込むことができるので、ライトデータとリードデータの値は不一致となる。一方、検査対象RAS線に実際に接続されているDRAMバンクがそのロウアドレス数が10ビットのタイプ2のバンクであった場合には、ライトデータとリードデータの値は一致する。これは、次の理由による。
【0120】
すなわち、ステップS28ではタイプ3のDRAMバンクに対応する設定が成されているので、アドレス00400000Hライトアクセス時に出力される11ビットのロウアドレスはRA(MA22,……,MA12)=10000000000であり、10ビットのカラムアドレスCA(MA11,……,MA02)=0000000000である。ロウアドレス数が10ビットのタイプ2のDRAMバンクにおいては、11ビットのロウアドレスRAの最上位ビットMA22の値“1”は無視される。このため、タイプ2のバンクが接続されている場合には、ライトアドレス00400000Hのライトアクセスによって、その先頭行におけるカラムアドレスCA=0000000000で指定される番地、すなわちアドレス00000000Hにデータが書き込まれる。これにより、リードアドレス00000000Hのリードアクセスで読み出されたリードデータがライトデータと一致する。
【0121】
したがって、ステップS29でライトデータとリードデータの不一致が検出された時は、検査対象RAS線に接続されているDRAMバンクは想定した通りのタイプ3のDRAMバンク(CA=10ビット、RA=11ビット、メモリサイズ=8Mバイト)であると判定され(ステップS30)、一方、ライトデータとリードデータの一致が検出された場合には、検査対象RAS線に接続されているDRAMバンクはロウアドレスビット数が10ビットのタイプ2のDRAMバンク(CA=10ビット、RA=10ビット、メモリサイズ=4Mバイト)であると判定される(ステップS31)。
【0122】
次に、図2で説明したRASデコーダ122、ロウアドレス/カラムアドレスマルチプレクサ123、およびページヒット判定回路126それぞれの具体的な回路構成について説明する。
【0123】
図13には、RASデコーダ122の具体的な回路構成が示されている。RASデコーダ13は、図示のように、RAS0線〜RAS5線にそれぞれ対応する6個のRASデコード回路51〜56を含んでいる。これらRASデコード回路51〜56は、それぞれDRAM論理アドレス(MA31:02)と対応するデコード条件との一致/不一致を調べ、一致した際に対応するRAS線を所定のタイミングで付勢制御する。この場合、実際には30ビットのDRAM論理アドレス(MA31:02)全てのビット値を見る必要はなく、サポートするDRAMバンクの種類、最大DRAM論理アドレス空間などの条件から、MA26,MA25,MA24,MA23,MA22,MA21,飛んで、MA13,MA12,MA11の9ビットだけがデコードに使用される。
【0124】
RASデコード回路51〜56はどれも同じ回路構成であるので、ここでは、RASデコード回路51の回路構成を代表して説明する。
【0125】
RASデコード回路51は、RASセットレジスタ61、RASマスクレジスタ62、9個の一致/不一致検出回路71〜79、9個のマスク回路71〜79、およびAND回路91から構成されている。
【0126】
RASセットレジスタ61は、CPU11によってリード/ライト可能なI/Oレジスタであり、ここにはRAS0線のデコード条件を示すビット列がセットされる。例えば、RAS0線のデコード条件が図5のように決定された場合には、“00100X XX1”がRAS0線のデコード条件としてRASセットレジスタ61にセットされる。ここで、Xはデコード条件に関係しないビット値(Don´t Care)を意味する。
【0127】
RASマスクレジスタ62は、CPU11によってリード/ライト可能なI/Oレジスタであり、ここにはRAS0線のデコード条件とDRAM論理アドレスとの一致/不一致の判定結果をビット毎にマスクするか、しないかを指定するマスクデータ(“0”=マスクする、“1”=マスクしない)がセットされる。ここで、マスクするというのは、デコード条件のビット列の対応する1ビットの判定結果に関係なく、そのビットの判定結果を常に一致したことにすることを意味する。したがって、RASセットレジスタ61に前述のようにデコード条件として“00100X XX1”がセットされた場合には、RASマスクレジスタ62には、マスクデータ“111110 001”がセットされる。これにより、デコード条件の“00100X XX1”の内の“X”のビットをデコード条件から除外することができる。
【0128】
一致/不一致検出回路71〜79は、それぞれDRAM論理アドレスとデコード条件の対応するビット同士の一致/不一致を検出する。これら一致/不一致検出回路71〜79の各々は、排他的論理和ゲートから実現する事ができる。9個のマスク回路71〜79は、それぞれ対応する一致/不一致検出回路71〜79の検出結果出力をマスクする。
【0129】
このように、RASデコーダ122は、1本のRAS線当たり9ビットのデータサイズに相当するデータの一致/不一致を行うためのロジックだけで実現する事ができる。
【0130】
次に、図14を参照して、ロウアドレス/カラムアドレスマルチプレクサ123の具体的な回路構成について説明する。
【0131】
ロウアドレス/カラムアドレスマルチプレクサ123は、図示のように、レジスタファイル201、パターンデコーダ202、ロウアドレスセレクタ203、ロウアドレス開始位置切り替え回路204〜207、およびロウアドレス/カラムアドレスセレクタ208から構成されている。
【0132】
レジスタファイル201は、CPU11によってリード/ライト可能なI/Oレジスタ群であり、ここにはRAS0〜RAS5線それぞれに対応する6つの制御パラメタがセットされる。各制御パラメタは、対応するRAS線に接続されたDRAMバンクのロウアドレス開始位置、つまりDRAM論理アドレスのどのbitをロウアドレスのLSBにするかを指定する。
【0133】
ロウアドレス開始位置として使用される可能性があるのは、サポートするDRAMの種類、およびページインタリーブの条件から、DRAM論理アドレスのMA11,MA12,MA13,MA14の4ビットである。各制御パラメタは、これら4種類のロウアドレス開始位置のいずれか1つを指定する4ビットデータから構成される。制御パラメタ“0001”はMA11を指定し、“0010”はMA12、“0011”はMA13、“0100”はMA14を指定する。
【0134】
レジスタファイル201にセットされている6つの制御パラメタの1つは、パターンデコーダ202に読み出される。どの制御パラメタが読み出されるかは、RASデコータ122のデコード結果出力によって決定される。例えば、RASデコータ122によってRAS0線が付勢される時は、RAS0線に対応する制御パラメタがレジスタファイル201から読み出される。
【0135】
パターンデコーダ202は、レジスタファイル201から読み出された制御パラメタをデコードし、そのデコード結果に従って、セレクタ203に4種類のロウアドレスの1つを選択させるための選択信号を発生する。
【0136】
ロウアドレス開始位置切り替え回路204は、DRAM論理アドレスMA31:02)の中からMA11をロウアドレス開始位置(LSB)とする合計11ビット(MA21,……,MA11)をロウアドレス(RA10:0)として取り出す。同様に、ロウアドレス開始位置切り替え回路205はMA12をLSBとする合計11ビット(MA22,……,MA12)を取り出し、ロウアドレス開始位置切り替え回路206はMA13をLSBとする合計11ビット(MA23,……,MA13)を取り出し、ロウアドレス開始位置切り替え回路207はMA14をLSBとする合計11ビット(MA24,……,MA14)をロウアドレスとして取り出す。
【0137】
これらロウアドレス開始位置切り替え回路204〜207は、例えばバレルシフタなどによって構成されている。
【0138】
ロウアドレスセレクタ203は、パターンデコーダ202からの選択信号に従って、ロウアドレス開始位置切り替え回路204〜207から出力される4種類のロウアドレスの1つを選択して出力する。ロウアドレスセレクタ203によって選択されたロウアドレスは、ロウアドレス/カラムアドレスセレクタ208に供給される。また、このロウアドレス/カラムアドレスセレクタ208には、カラムアドレスも供給される。このカラムアドレスとしては、DRAM論理アドレスの下位11ビット(MA12,……MA02)が常に使用される。
【0139】
ロウアドレス/カラムアドレスセレクタ208は、図2のタイミング制御回路125からの制御信号によって指定されるタイミングで、ロウアドレスとカラムアドレスを選択的にメモリアドレスバス33上に出力する。
【0140】
このロウアドレス/カラムアドレスマルチプレクサ123においては、RASデコーダ122のデコード動作と並行して、ロウアドレス開始位置切り替え回路204〜207それぞれによるロウアドレス切り出し動作が行われる。RASデコーダ122のデコード結果が確定すると、その確定されたデコード結果によって指定される付勢対象のRAS線に対応した1つの制御パラメタがレジスタファイル201から読み出され、それがパターンデコーダ202に送られる。そして、そのパターンデコーダ202によるデコード動作、およびロウアドレスセレクタ203のロウアドレス選択動作が制御パラメタに従って実行され、これによってDRAMアクセスに使用すべきロウアドレスが確定される。
【0141】
なお、ここでは、ロウアドレス開始位置切り替え回路204〜207およびロウアドレスセレクタ203によってロウアドレス(RA10:0)の11ビット全てをRAS線に応じて切り替えるように説明したが、実際は、全部のロウアドレスのビットを切り替える必要はない。
【0142】
すなわち、ロウアドレス開始位置がMA11,MA12,MA13,MA14のいずれの場合においても、MA14〜MA19の6ビットは共通に使用されるので、それらビットについては切り替え対象から除外する事ができる。この場合のCPUアドレスとロウアドレスとの対応関係の一例を図15に示す。
【0143】
図15においては、ロウアドレスの下位3ビット(RA2〜RA0)と上位2ビット(RA10,RA9)のみが切り替えの対象となっている。このようにすれば、CPUアドレスのMA14〜MA19の6ビットをロウアドレスの中位6ビット(RA8〜RA3)としてロウアドレス/カラムアドレスセレクタ208に直接送ることができるので、ロウアドレス開始位置切り替え回路204〜207およびロウアドレスセレクタ203はそれぞれ切り替え対象の5ビット分のハードウェア構成だけで実現できる。
【0144】
このように、図14のロウアドレス/カラムアドレスマルチプレクサ123の回路構成は、必要とする回路数を非常に少なくすることができる。しかし、RASデコーダ122のデコード結果が確定されてからDRAMアクセスに使用すべきロウアドレスが確定されるまでには、3つの回路ブロックの動作(レジスタファイル201から使用する制御パラメタを選択して読み出す動作、パターンデコーダによるデコード動作、およびロウアドレスセレクタ203によるロウアドレス選択動作)を順次行う必要がある。このため、ロウアドレス/カラムアドレスマルチプレクサ123内で比較的大きなディレイが生じるという問題がある。
【0145】
図16には、ロウアドレス/カラムアドレスマルチプレクサ123の第2の回路構成例が示されている。この図16の構成は、ロウアドレス/カラムアドレスマルチプレクサ123内でのディレイを少なくするための改良が次のように成されている。
【0146】
すなわち、この図16のロウアドレス/カラムアドレスマルチプレクサ123においては、図14のパターンデコーダ202およびロウアドレスセレクタ203の代わりに、RAS0〜RAS5線それぞれに対応する6個のパターンデコーダ202−1〜202−6、および6個のロウアドレスセレクタ203−1〜203−6が設けられている。パターンデコーダ202−1〜202−6は、それぞれレジスタファイル201のRAS0制御パラメタ〜RAS5制御パラメタに従ってロウアドレスセレクタ203−1〜203−6のロウアドレス選択動作を制御する。
【0147】
また、それらロウアドレスセレクタ203−1〜203−6の次段には、それらロウアドレスセレクタ203−1〜203−6によって得られた6種類のロウアドレス(RAS0ロウアドレス〜RAS5ロウアドレス)の1つをRASデコーダ122のデコード結果に応じて選択するロウアドレスセレクタ209が設けられている。
【0148】
この回路構成においては、RASデコーダ122のデコード動作と並行して、ロウアドレス開始位置切り替え回路204〜207それぞれによるロウアドレス切り出し動作と、パターンデコーダ202−1〜202−6およびロウアドレスセレクタ203−1〜203−6によるロウアドレス選択動作とが行われる。これにより、RASデコーダ122のデコード結果の確定を待たずに、RAS0〜RAS5線にそれぞれ対応した6種類のロウアドレス(RAS0ロウアドレス〜RAS5ロウアドレス)を生成することができる。
【0149】
RASデコーダ122のデコード結果が確定すると、その確定されたデコード結果によって指定される付勢対象のRAS線に対応したロウアドレスがロウアドレスセレクタ209によって選択される。
【0150】
したがって、RASデコーダ122のデコード結果が確定されてからDRAMアクセスに使用すべきロウアドレスが確定されるまでに必要となる回路動作は、最終段のアドレスセレクタ209によるアドレス選択動作だけとなり、内部ディレイが大幅に低減される。
【0151】
なお、この図16の構成に於いても、図14の場合と同様に、全部のロウアドレスのビットを切り替える必要はない。
【0152】
図17には、図2のページヒット判定回路126の具体的な回路構成が示されている。
【0153】
このページヒット判定回路126には、図示のように、レジスタファイル301、ページヒット判定用CPUアドレスレジスタ302、一致判定回路303、マスク回路304、および一致判定マスク位置レジスタ305が設けられている。
【0154】
レジスタファイル301は、CPU11よってリード/ライト可能なI/Oレジスタであり、ここにはページヒット判定のために使用されるCPUアドレスとの一致条件をマスクするか、しないかを指定するマスクデータ(“0”=マスクする、“1”=マスクしない)がRAS0〜RAS5線それぞれに対応する制御パラメタとしてセットされる。
【0155】
すなわち、ページヒット判定では、CPUアドレス(A31:02)の中で、ページ内アドレスを除外した残りのアドレス、つまり、カラムアドレスに相当する部分を除いた、ロウアドレス(ページアドレス)およびRASデコード用アドレスが対象となる。カラムアドレスに相当する部分はページヒット判定に関与しないので、そのカラムアドレスとして使用されているビットそれぞれについての判定結果はマスクデータによってマスクする必要がある。ここで、マスクするというのは、該当するビットの判定結果を常に一致したことにすることを意味する。
【0156】
実際には、各RAS線に対応するマスクデータは、カラムアドレスの全ビットではなく、A12,A11,A10についてそれぞれマスクするか、しないかを示す3ビットデータから構成されている。これは、一致判定回路303が、DRAMバンクの種類と関係なく常にカラムアドレスとして使用されるA10よりも下位のビットについては一致判定から除外し、A10以降の上位のビットだけを一致判定の対象とするように構成されており、また、A12,A11,A10の3ビットそれぞれは、DRAMバンクの種類によってカラムアドレスの一部として使用されるか否かが異なるからである。
【0157】
例えば、RAS0線にタイプ1のDRAMバンク(カラムアドレスビット数=9ビット)が接続されている場合には、A12,A11,A10の3ビットの中でA10だけがカラムアドレスの一部として使用される。この時は、RAS0線に対応するマスクデータ“110”がレジスタファイル301にセットされる。レジスタファイル301にセットされている6つのマスクデータのうちの1つは、レジスタファイル301から読み出されて一致判定マスク位置レジスタ305にセットされる。どのマスクデータが読み出されるかは、RASデコータ122のデコード結果出力によって決定される。例えば、RASデコータ122によってRAS0線が付勢される時は、RAS0線に対応するマスクデータがレジスタファイル301から読み出される。
【0158】
ページヒット判定用CPUアドレスレジスタ302には、前回のメモリアクセス時のCPUアドレス(A31:02)の内のA26〜A11の17ビットがページヒット判定用CPUアドレスとして保持される。このページヒット判定用CPUアドレスレジスタ302の内容は、ページヒットせず、バンクミスまたはページミスが発生した時に、その時のメモリアクセスで使用されているCPUアドレス(A31:02)に従って更新される。すなわち、バンクミスまたはページミスが発生すると、タイミング制御回路125からレジスタ更新信号が発生される。このレジスタ更新信号に応答して、その時にCPUアドレスバス上に出力されているCPUアドレス(A26〜A11)がページヒット判定用CPUアドレスレジスタ302にラッチされる。これによって、ページヒット判定用CPUアドレスレジスタ302の内容は、バンクミスまたはページミスが発生したメモリサイクル時のCPUアドレスに変更される。
【0159】
一致判定回路303は、今回のメモリアクセス時のCPUアドレス(A26〜A11)とページヒット判定用CPUアドレスレジスタ302に保持されているCPUアドレス(A26〜A11)とをビット毎に比較するコンパレータであり、A26〜A11それぞれの検出結果を示す17ビットデータを出力する。
【0160】
マスク回路304は、A26〜A11それぞれの検出結果の内のA12,A11,A10の検出結果出力を、一致判定マスク位置レジスタ305のマスクデータに従ってマスクし、マスク後の検出結果出力が全て一致を示す時にページヒット信号HITを発生する。
【0161】
一致判定マスク位置レジスタ305には、付勢対象のRAS線に対応するマスクデータがセットされる。この一致判定マスク位置レジスタ305の内容は、ページヒットせず、バンクミスまたはページミスが発生した時に、その時にRASデコーダ122によって付勢されるRAS線に対応するマスクデータに更新される。すなわち、バンクミスまたはページミスが発生すると、タイミング制御回路125からレジスタ更新信号が発生される。このレジスタ更新信号に応答して、その時にRASデコーダ122によって選択されているレジスタファイル301内のマスクデータが一致判定マスク位置レジスタ305にラッチされる。これによって、一致判定マスク位置レジスタ305の内容は、バンクミスまたはページミスが発生したメモリサイクル時に付勢されるRAS線に対応したマスクデータに変更される。
【0162】
この様に構成されたページヒット判定回路126によれば、DRAM論理アドレスではなく、CPUアドレスを用いて、今回のメモリアクセスが前回のメモリアクセスと同一バンク且つ同一ページであるか否かを判定するページヒット判定が行われる。ページヒット判定にCPUアドレスを利用することができるのは、前述したようにアドレス変換回路121によるCPUアドレスからDRAM論理アドレスへのアドレス変換の単位がDRAMバンクのページサイズ以上の値に設定されているからである。よって、アドレス変換動作とページヒット判定動作とを並行して行うことが可能となり、ページヒット判定を高速に行うことができ、メモリアクセス速度の高速化を実現することができる。
【0163】
また、タイミング制御回路125には、CPU11によってリード/ライト可能なタイミング制御レジスタ125が設けられている。このタイミング制御レジスタ125aには、RASデコーダ122のRASデコードタイミングを指定する情報と、ページヒット判定回路126のページヒット判定タイミングを指定する情報とが設定され、その設定情報に従ってRASデコーダ122およびページヒット判定回路126の動作タイミングが決定される。
【0164】
通常、これらRASデコーダ122およびページヒット判定回路126の動作タイミングは、CPU11のアドレスのディレイ、バスのクロック、使用している回路のプロセスなどにより固定的に決定されるので、これら条件が変わる度に設計変更が必要となる。しかし、この実施形態では、RASデコーダ122およびページヒット判定回路126の動作タイミングをソフトウェアによる設定で可変できるようにしているので、タイミングに影響する条件が変わっても設計変更する必要がなくなる。
【0165】
また、タイミング制御回路125は、リフレッシュサイクルが間に入った場合などのようにアドレスが一致してもページヒットと判定してはならない場合のことを考慮して、DRAM制御のステートマシンによって、「ページアクセス可能状態」と「ページアクセス不可能状態」の2つの状態を管理できるように構成されている。現在の状態が「ページアクセス不可能状態」の時、タイミング制御回路125はページヒット信号を無効化する。
【0166】
「ページアクセス可能状態」とは、前回アクセスからのRASを出したままということである。「ページアクセス可能状態」でない状態が「ページアクセス不可能状態」である。システムリセット時は「ページアクセス不可能状態」である。
【0167】
CPU11のアクセスの後は、リードであるかライトであるかに拘わらず、「ページアクセス可能状態」となる。「ページアクセス可能状態」にある時の次のCPU11のDRAMアクセスは、そのアドレスによって、ページヒット、バンクミス、ページミスのどれかになる。ページヒットの時は、高速に処理ができる。「ページアクセス不可能状態」にある時の次のCPU11のDRAMアクセスは、そのアドレスには関係なくバンクミスになる。
【0168】
「ページアクセス不可能状態」になる要因は、ホールドアクノリッジHLDA状態、DRAMシャドーリフレッシュ、RASタイムアウト、システムリセットである。したがって、タイミング制御回路125は、CPU11からのアドレスストローブADS信号、HLDA信号、リフレッシュタイマからのDRAMリフレッシュ信号DRAM、システムリセット信号等に従って、「ページアクセス可能状態」と「ページアクセス不可能状態」の2つのステートを管理する。
【0169】
また、タイミング制御回路125はRASタイムアウト回路を内蔵しており、一定時間(tRAS)以上、RASイネーブル状態が続くと、「ページアクセス可能状態」から「ページアクセス不可能状態」に移行する。
【0170】
現在の状態が「ページアクセス不可能状態」の時は、ページヒット信号を無効化するために、タイミング制御回路125は、ページヒット判定用CPUアドレスレジスタ302に保持されているメモリアドレス値を、DRAMアクセスに使用されることがない値に変更してもよい。
【0171】
さらに、タイミング制御回路125は、CPU11以外の他のバスマスタがDRAMをアクセスする場合もページモードアクセスをサポートするために、次の2つのモードを持ち、それらモードを動的に変更するように構成されている。
【0172】
(モード1)
このモードはCPU11と他のバスマスタが同一ページをアクセスすることはまれであるということを想定したものであり、バスマスタの切り替わりに応答して、「ページアクセス可能状態」から「ページアクセス不可能状態」に遷移して全てのRASをディスエーブルしておくモードである。これにより、新たにRASをイネーブルするときのプリチャージ時間を節約することができる。
【0173】
(モード2)
このモードはCPU11と他のバスマスタが同一ページをアクセスするという使い方を想定したモードである。例えば、バスマスタがライトしたデータをすぐにCPU11がリードするような場合がこれに相当する。このモードでは、バスマスタが切り替わっても「ページアクセス不可能状態」に遷移せずにRASをイネーブルのまま保持するので、同一ページ内への高速アクセスが可能となる。
【0174】
これらモードの一方を固定的に利用してもよいが、モード1で動作中にページヒットしたからしれないアドレスパターンが多い場合にはモード2に移行し、またモード2で動作中にページヒットしないことが多いならばモード1に移行するといった、ページヒット結果を利用したモード切替を行うことが好ましい。
【0175】
また、図17のページヒット判定回路126においては、ページヒット判定用CPUアドレスレジスタ302には、CPUからのメモリアドレスと一緒にそのメモリアドレスに対応するメモリアドレスエリアのメモリ属性情報がライトアクセスとリードアクセスとで異なるメモリデバイスを指定しているか否かを示す情報とそのときのメモリアクセスがライトアクセスとリードアクセスのいずれであるかを示すサイクル種別情報も保持され、ライトアクセスとリードアクセスとでアクセス対象のメモリデバイスが異なるときは、保持されているメモリアドレスと今回のメモリアクセス時におけるCPUからのメモリアドレスとが一致し、且つ保持されているサイクル種別情報と今回のメモリアクセスのサイクル種別との一致が一致判定回路303によるページヒット判定条件に加えられている。
【0176】
すなわち、ライトアクセスとリードアクセスとでアクセス対象のメモリデバイスが異なるときは、メモリアドレスの一致の有無だけでは、実際にはページヒット判定を行うことができない。この場合、結果としてページヒット判定に時間がかかることになり、高速ページヒット判定のメリットを生かすことができなくなる。
【0177】
そこで、前述したように、この実施形態では、ライトアクセスとリードアクセスとでアクセス対象のメモリデバイスが異なるときは、ライトかリードかのサイクル種別情報についてもページヒット判定条件に加えられている。以下、そのための構成について具体的に説明する。
【0178】
まず、図18を参照して、図17のメモリエリア属性テーブル127で管理されているCPU11のメモリアドレス空間とメモリ属性情報との関係を説明する。
【0179】
メモリエリア属性テーブル127によって管理される1つのアドレスエリアのサイズは16Kバイトであり、図18に示されているように、CPUメモリアドレス空間00000000H〜0000FFFFHは000000Hから順番にAREA00〜AREA63と定義される。
【0180】
これらAREA00〜AREA63の内、DRAMを含む複数種のメモリデバイスが配置される可能性があるAREA40〜AREA63に対応する各アトリビュートレジスタには、図19に示すような8ビットの属性情報が設定される。図19に示されているように、8ビットの属性情報のうち、bit7とbit6の2ビットはリード属性情報(READ ATTRIBUTE)、bit5とbit4の2ビットはライト属性情報(WRITE ATTRIBUTE)、bit3はDRAMライトプロテクト情報(WP)、bit2とbit1の2ビットはキャッシング制御情報(CASH)として使用される。
【0181】
リード属性情報(READ ATTRIBUTE)は、リードアクセス対象のメモリデバイスの種類を示すものであり、図20に示されているように、そのbit7とbit6の2ビットの組み合わせによって、DRAM、VLバス上のメモリ、PCIバス上のメモリ、ISAバス上のメモリのいずれかが指定される。ライト属性情報(WRITE ATTRIBUTE)は、ライトアクセス対象のメモリデバイスの種類を示すものであり、図21に示されているように、そのbit5とbit4の2ビットの組み合わせによって、DRAM、VLバス上のメモリ、PCIバス上のメモリ、ISAバス上のメモリのいずれかが指定される。
【0182】
DRAMライトプロテクト情報(WP)は、ライト属性情報によってDRAMがライトアクセス対象のメモリデバイスとして指定されている時、図22に示されているように、bit3の内容によってDRAMに対する書き込み保護を行うか否かを示す。
【0183】
キャッシング制御情報(CASH)は、リード属性情報およびライト属性情報によって共にDRAMが指定されている時に於いて、そのRAMのキャッシング操作の有効/無効を制御するためのものであり、図23に示されているように、そのbit2とbit1の2ビットの組み合わせによって、ライトバックキャシュイネーブル、ライトスルーキャシュイネーブル、キャシュディセーブルのいずれかが指定される。例えば、VGA BIOSや、システムBIOSがコピーされたDRAMエリアについては、キャシュディセーブルの設定が成される。
【0184】
ページヒット判定用CPUアドレスレジスタ302には、CPU11からのメモリアドレスと一緒にそのメモリアドレスに対応するメモリアドレスエリアのメモリ属性情報がメモリエリア属性テーブル127から読み込まれ、ライトアクセスとリードアクセスとで異なるメモリデバイスを指定しているか否かを示す情報とそのときのメモリアクセスがライトアクセスとリードアクセスのいずれであるかを示すサイクル種別情報が合わせて保持される。ライトアクセスとリードアクセスとでアクセス対象のメモリデバイスが異なるときは、保持されているメモリアドレスと今回のメモリアクセス時におけるCPUからのメモリアドレスとが一致し、且つ保持されているサイクル種別情報と今回のメモリアクセスのサイクル種別との一致が一致判定回路303によるページヒット判定条件に加えられている。
【0185】
したがって、メモリ属性を高速に決定できるようになり、高速なページヒット判定を生かした高速メモリアクセスが可能になる。
【0186】
さらに、ページヒット判定用CPUアドレスレジスタ302には、前述の情報に加え、CPUからのメモリアドレスに対応するメモリアドレスエリアのDRAMライトプロテクト情報(WP)とキャッシング制御情報(CASH)をさらに保持しておくことが望ましい。これにより、ページヒット判定がなされると同時に、次に実行すべきサイクルの種別を決定できる。
【0187】
すなわち、ページヒットであると判定されたときは、それと同時に次のようにサイクル種別が決定される。
【0188】
1.ライトページヒット非プロテクト
これは、今回のメモリアクセスサイクルがライトサイクルであり、かつ保持されているライトプロテクト情報が非ライトプロテクトを示している場合に実行されるサイクルであり、DRAMへの書き込みがページモードで実行される。
【0189】
2.ライトページヒットプロテクト
これは、今回のメモリアクセスサイクルがライトサイクルであり、かつ保持されているライトプロテクト情報がライトプロテクトを示している場合に実行されるサイクルであり、CASのアサートはおこなわれず、これによりライトプロテクトが実現される。
【0190】
3.リードページヒットシングル
これは、今回のメモリアクセスサイクルがリードサイクルであり、かつ保持されているキャッシュ制御情報がキャッシュ無効を示している場合に実行されるサイクルであり、DRAMからデータを読み出すリードサイクルがページモードで1回実行される。
【0191】
4.リードページヒットバースト
これは、今回のメモリアクセスサイクルがリードサイクルであり、かつ保持されているキャッシュ制御情報がキャッシュ有効を示している場合に実行されるサイクルであり、DRAMから連続する複数のデータを読み出すバーストリードサイクルがページモードで実行される。
【0192】
ここで、ライトプロテクト情報およびキャッシュ制御情報は、そのページに対して、バンクミスまたはページミスによってRASを出しなおしたときに、ページヒット判定用のCPUアドレスとともに記録しておいたものである。これは、これらライトプロテクト情報およびキャッシュ制御情報のデコード結果を待っていては、ページヒット確定時間に間に合わないためである。
【0193】
従って、リードサイクルのときのライトプロテクト情報、およびライトサイクルのときのキャッシュ制御情報にも意味がある。
【0194】
また、ページヒットしなかった場合には、バンクミスかページミスかが判定され、バンクミスが決定されると、それと同時に次のようにサイクル種別が決定される。
【0195】
1.ライトバンクミス非プロテクト
これは、今回のメモリアクセスサイクルがライトサイクルであり、かつ今回のメモリアドレスに対応するライトプロテクト情報が非ライトプロテクトを示している場合に実行されるサイクルであり、別のDRAMバンクに対するRASがアサートされ、アーリーライトによってデータ書き込みが実行される。
【0196】
2.ライトバンクミスプロテクト
これは、今回のメモリアクセスサイクルがライトサイクルであり、かつ今回のメモリアドレスに対応するライトプロテクト情報がライトプロテクトを示している場合に実行されるサイクルであり、CASのアサートはおこなわれず、これによりライトプロテクトが実現される。
【0197】
3.リードバンクミスシングル
これは、今回のメモリアクセスサイクルがリードサイクルであり、かつ今回のメモリアドレスに対応するキャッシュ制御情報がキャッシュ無効を示している場合に実行されるサイクルであり、別のDRAMバンクに対するRASがアサートされ、そのDRAMバンクからデータを読み出すリードサイクルが1回実行される。
【0198】
4.リードバンクミスバースト
これは、今回のメモリアクセスサイクルがリードサイクルであり、かつ今回のメモリアドレスに対応するキャッシュ制御情報がキャッシュ有効を示している場合に実行されるサイクルであり、別のDRAMバンクに対するRASがアサートされた後、そのDRAMバンクから連続する複数のデータを読み出すバーストリードサイクルが実行される。
【0199】
ここで、ライトプロテクト情報およびキャッシュ制御情報は、今回アクセスされるページに対して、定義されるデコード信号であり、次以降のアクセスのために、ページヒット判定用のCPUアドレスとともに記録される。
【0200】
また、ページミスが決定されると、それと同時に次のようにサイクル種別が決定される。
【0201】
1.ライトページミス非プロテクト
これは、今回のメモリアクセスサイクルがライトサイクルであり、かつ今回のメモリアドレスに対応するライトプロテクト情報が非ライトプロテクトを示している場合に実行されるサイクルであり、同一DRAMバンクに対するRASがアサートし直され、アーリーライトによってデータ書き込みが実行される。
【0202】
2.ライトページミスプロテクト
これは、今回のメモリアクセスサイクルがライトサイクルであり、かつ今回のメモリアドレスに対応するライトプロテクト情報がライトプロテクトを示している場合に実行されるサイクルであり、CASのアサートはおこなわれず、これによりライトプロテクトが実現される。
【0203】
3.リードページミスシングル
これは、今回のメモリアクセスサイクルがリードサイクルであり、かつ今回のメモリアドレスに対応するキャッシュ制御情報がキャッシュ無効を示している場合に実行されるサイクルであり、同一DRAMバンクに対するRASがアサートし直され、そのDRAMバンクからデータを読み出すリードサイクルが1回実行される。
【0204】
4.リードページミスバースト
これは、今回のメモリアクセスサイクルがリードサイクルであり、かつ今回のメモリアドレスに対応するキャッシュ制御情報がキャッシュ有効を示している場合に実行されるサイクルであり、同一DRAMバンクに対するRASがアサートし直された後、そのDRAMバンクから連続する複数のデータを読み出すバーストリードサイクルが実行される。
【0205】
ここで、ライトプロテクト情報およびキャッシュ制御情報は、今回アクセスされるページに対して、定義されるデコード信号であり、次以降のアクセスのために、ページヒット判定用のCPUアドレスとともに記録される。
【0206】
以上説明したように、この実施形態によれば、ページヒット判定回路126により、DRAM論理アドレスではなく、CPUアドレスを用いて、今回のメモリアクセスが前回のメモリアクセスと同一バンク且つ同一ページであるか否かを判定するページヒット判定が行われる。よって、アドレス変換動作とページヒット判定動作とを並行して行うことが可能となり、ページヒット判定を高速に行うことができ、メモリアクセス速度の高速化を実現することができる。
【0207】
また、メモリ属性情報をページヒット判定用のCPUアドレスと一緒に保持しておくことにより、さらに高速のページヒット判定および次のサイクル種別の決定が可能となる。
【0208】
【発明の効果】
以上説明したように、この発明によれば、ページヒット判定を高速に実行できるようになり、メモリアクセス速度の高速化を実現することができる。
【図面の簡単な説明】
【図1】この発明の一実施例に係るコンピュータシステムの構成を示すブロック図。
【図2】同実施例のシステムに設けられているシステムコントローラ内のメモリ制御ロジックを示すブロック図。
【図3】図2のメモリ制御ロジックに含まれるアドレス変換回路によって実行されるCPUメモリアドレス空間からDRAM論理アドレス空間への変換動作の示す図。
【図4】同実施例のシステムに設けられている複数のDRAMバンクがDRAM論理アドレス空間にメモリサイズ順に再配置された状態を表すDRAMメモリマップを示す図。
【図5】同実施例のシステムに設けられている複数のDRAMバンクに接続されるRAS線それぞれのデコード条件を示す図。
【図6】同実施例のシステムでページインタリーブアーキテクチャを実現する場合に採用されるRAS線それぞれのデコード条件を示す図。
【図7】同実施例のシステムのパワーオン時にIRTルーチンによって実行されるメモリ制御ロジックのための初期設定処理の手順を示すフローチャート。
【図8】同実施例のシステムでサポートされるDRAMバンクの種類の一例を示す図。
【図9】同実施例のシステムのシステムボード上に標準実装されたシステムメモリのメモリ構成の一例を示す図。
【図10】同実施例のシステムに設けられた拡張メモリスロットに装着される増設メモリのメモリ構成の一例を示す図。
【図11】同実施例のシステムに設けられた拡張メモリスロットに装着される増設メモリの他のメモリ構成の一例を示す図。
【図12】図7のメモリ制御ロジックの初期設定処理において実行される各DRAMバンクのメモリサイズ検出処理の手順を示すフローチャート。
【図13】図2のメモリ制御ロジックに含まれるRASデコーダの具体的構成の一例を示す回路図。
【図14】図2のメモリ制御ロジックに含まれるロウアドレス/カラムアドレスマルチプレクサの具体的構成の一例を示す回路図。
【図15】図14のロウアドレス/カラムアドレスマルチプレクサのロウアドレス切り替え動作を説明するための図。
【図16】図2のメモリ制御ロジックに含まれるロウアドレス/カラムアドレスマルチプレクサの具体的構成の他の例を示す回路図。
【図17】図2のメモリ制御ロジックに含まれるページヒット判定回路の具体的構成の一例を示す回路図。
【図18】同実施形態のシステムによって管理されるメモリ属性情報とCPUメモリアドレス空間との関係を示す図。
【図19】図18のメモリ属性情報のフォーマットを示す図。
【図20】図18のメモリ属性情報に含まれるリード属性情報の内容を示す図。
【図21】図18のメモリ属性情報に含まれるライト属性情報の内容を示す図。
【図22】図18のメモリ属性情報に含まれるDRAMライトプロテクト情報の内容を示す図。
【図23】図18のメモリ属性情報に含まれるキャッシング制御情報の内容を示す図。
【符号の説明】
11…CPU、12…システムコントローラ、13…システムメモリ、21,22…拡張メモリスロット、31…CPUローカルバス、33…メモリアドレスバス、41,42…増設メモリ、120…メモリ制御ロジック、121…アドレス変換回路、122…RASデコーダ、123…ロウアドレス/カラムアドレスマルチプレクサ、124…CAS発生回路、125…タイミング制御回路、126…ページヒット判定回路、51〜56…RASデコード回路、71〜79…一致検出回路、81〜89…マスク回路、91…AND回路、201,301…レジスタファイル、202…パターンデコーダ、203…ロウアドレスセレクタ、204〜207…ロウアドレス開始位置切り替え回路、208…ロウアドレス/カラムアドレスセレクタ、302…ページヒット判定用CPUアドレスレジスタ、303…一致判定回路、304…マスク回路、305…一致判定マスク位置レジスタ。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a memory control system, and more particularly to an improved memory control system for efficiently accessing a DRAM bank used as a main memory of a personal computer.
[0002]
[Prior art]
In recent years, various notebook-type or laptop-type portable personal computers that can be easily carried and operated by a battery have been developed. In this type of personal computer, it is desired to increase the operation speed, and recently, a high-performance microprocessor incorporating a large-scale cache has begun to be used as a CPU.
[0003]
When a microprocessor with a built-in cache is used as a CPU, the number of accesses to the main memory can be reduced, and the system operation performance can be improved to some extent.
[0004]
However, even if the CPU has a built-in cache, access to the main memory is not lost, and when a cache miss occurs, the CPU needs to execute a memory read / write cycle for the main memory. Therefore, in practice, in order to improve the system performance, it is indispensable to increase the execution speed of the memory read / memory write cycle by the CPU.
[0005]
As a main memory of a personal computer, a dynamic RAM (DRAM) is usually used. DRAM is characterized by low access speed but low cost compared to static RAM (SRAM). In order to solve this problem, in addition to improvements at the semiconductor technology level such as improvement of the DRAM chip itself, improvements at the memory architecture level by adopting page mode access, interleave control, etc. have been promoted recently.
[0006]
In order to perform these page mode access and interleave control, the memory control system normally incorporates logic for performing page hit determination. The page hit determination is to determine whether or not the memory access address generated by the CPU is obtained in the same page of the same DRAM bank as the access performed immediately before in the DRAM page mode access method. If they are the same page, high-speed access that does not require re-out of RAS (row address strobe) is possible.
[0007]
In a conventional memory control system, conversion from a CPU address to a DRAM logical address is performed first, then a DRAM bank to be accessed is selected, and the selected DRAM bank is accessed immediately before. Is checked by the RAS decoder. If they are the same bank, the row hit to the selected DRAM bank is compared with the row address of the previous access by the page hit determination circuit, and page hit determination is performed.
[0008]
[Problems to be solved by the invention]
As described above, conventionally, before page hit determination is performed, processing such as address translation and RAS decoding is required, and as a result, there is a problem that page hit determination takes time. For this reason, even when a page hit occurs, a wait cycle is required, and sufficient high-speed access cannot be realized.
[0009]
The present invention has been made in view of these points, and an object of the present invention is to provide a memory control system which can execute page hit determination at high speed and can realize high memory access speed.
[0010]
[Means for Solving the Problems]
In the memory control system according to the present invention, a plurality of DRAM banks to which a plurality of RAS signals are respectively assigned and accessed independently from each other, and a plurality of DRAM banks arranged discontinuously in the memory address space of the CPU are respectively provided. Address conversion means for converting a memory address from the CPU into a DRAM logical address in a conversion unit equal to or larger than the page size of the plurality of DRAM banks so that corresponding memory areas are continuously arranged in the DRAM logical address space. And the memory address from the CPU at the time of the previous memory access, and the memory address is compared with the memory address from the CPU at the time of the current memory access. Same bank and same page A page hit determining means for outputting a page hit signal indicating that, and a DRAM logical address output from the address converting means to determine which DRAM bank to output a RAS signal, A RAS decoder for performing RAS signal output control for DRAM page mode access when the page hit signal is output; , For each of a plurality of memory address areas constituting a memory address space addressable by the CPU, information for designating the type of memory device to which read access should be permitted and information for designating the type of memory device to which write access should be permitted A memory attribute table in which memory attribute information including The page hit determination means includes means for holding control information that is set by the CPU and that specifies a bit position in the memory address to be used for page hit determination for each DRAM bank; Means for changing a bit position in the memory address to be used for the page hit determination based on a decoding result of the RAS decoder and the control information. Whether the memory attribute information in the memory address area corresponding to the memory address together with the memory address from the CPU at the previous memory access designates a different memory device for write access and read access. Cycle type information indicating whether the memory access at that time is a write access or a read access. If the memory device to be accessed differs between the write access and the read access, the stored memory The page hit signal is output on condition that the address matches the memory address from the CPU at the time of the current memory access, and the cycle type information held matches the cycle type of the current memory access. It is characterized by that.
[0011]
In this memory control system, page hit determination means determines whether or not the current memory access is the same bank and the same page as the previous memory access by using the CPU address instead of the DRAM logical address. A determination is made. The CPU address can be used for page hit determination because the unit of address conversion from the CPU address to the DRAM logical address is set to a value equal to or larger than the page size of the DRAM bank. As a result, even if the DRAM logical address specifies the same page for the previous access and the current access, a page with a different CPU address is not specified. Therefore, the address translation operation and the page hit determination operation can be performed in parallel, the page hit determination can be performed at high speed, and the memory access speed can be increased.
[0012]
The page hit determination means designates a memory device in which the memory attribute information in the memory address area corresponding to the memory address is different between write access and read access together with the memory address from the CPU at the previous memory access. Information indicating whether or not the memory access is being performed and cycle type information indicating whether the memory access at that time is a write access or a read access, and the memory device to be accessed differs between the write access and the read access The page is subject to the condition that the held memory address matches the memory address from the CPU at the time of the current memory access, and the cycle type information being held matches the cycle type of the current memory access. Configured to output hit signal Rukoto is preferable.
[0013]
As a result, even when the memory devices to be accessed are different between the write access and the read access, the memory attribute can be determined at high speed, and high-speed memory access utilizing high-speed page hit determination is possible.
[0014]
Further, as memory attribute information, the write protect information indicating whether or not the write protection is performed and the cache information indicating whether or not the cache operation using the cache memory is valid are held together with the memory address in the page hit determination unit. Thus, the cycle to be executed next can be determined efficiently.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows a computer system to which a memory control system according to an embodiment of the present invention is applied.
[0016]
This computer system is for realizing a notebook type or laptop type portable personal computer. On a
[0017]
On the
[0018]
Furthermore, this system is provided with two
[0019]
The
[0020]
The
[0021]
The
[0022]
The
[0023]
The
[0024]
Similarly, each of the
[0025]
Further, two row address strobe signal lines (RAS lines: RAS0, RAS1) are connected to the
[0026]
Further, a column address strobe signal line (CAS line) and other various control signal lines (write enable signal line WE, output enable signal line OE, etc.) are commonly connected to the
[0027]
All DRAM banks in the
[0028]
In the read / write access control of the
[0029]
FIG. 2 shows the configuration of the memory control logic.
[0030]
Memory control
[0031]
The
[0032]
That is, as shown in FIG. 3A, the memory address space of the
[0033]
When the VGA BIOS, system BIOS, etc. stored in the BIOS ROM are copied to the DRAM and used, as shown in FIG. 3B, the VGA BIOS area and the system BIOS area in the reserved area are used. The assigned CPU address is also converted into a DRAM logical address. Further, in the case of a CPU having a system management mode (SMM), a CPU address assigned to an SMRAM area used only in the SMM is also converted into a DRAM logical address.
[0034]
Such conversion from the CPU address to the DRAM logical address is performed in units of 16 Kbytes, for example. Therefore, the lower bit part (MA13: 02) of the DRAM logical address is equal to the lower bit part (A13: 02) of the CPU address even after the address conversion.
[0035]
The DRAM logical address (MA31: 02) obtained by the
[0036]
The
[0037]
The decoding operation of the
[0038]
The row address / column address multiplexer 123 decomposes the DRAM logical address (MA31: 02) into a row address (RA) and a column address (CA) for addressing a DRAM bank to be accessed. In the internal register of the row address / column address multiplexer 123, a control parameter indicating the start bit position of the row address (RA) of each DRAM bank is set in advance. The operation of decomposing the row address (RA) and the column address (CA) is performed according to the control parameter corresponding to the DRAM bank to be accessed.
[0039]
The row address (RA) and the column address (CA) are output on the
[0040]
The
[0041]
Taimin G The
[0042]
The page hit
[0043]
As described above, the page hit determination operation is performed based on the value of the CPU address, not the DRAM logical address. As a result, the address conversion operation and the page hit determination operation can be performed in parallel. The CPU address can be used for page hit judgment because the unit of address conversion from the CPU address to the DRAM logical address (16 Kbytes) is set to a value larger than the DRAM bank page size (up to about 4 Kbytes). Because. As a result, even if the DRAM logical address designates the same page for the previous access and the current access, the page having a different CPU address is not designated.
[0044]
For the determination of page hit, all upper addresses after the column address in the CPU address (A31: 02) are used. In the conventional method, it is determined whether or not DRAM access, DRAM access Then Contains the address that was used to determine the bank.
[0045]
The number of bits of the column address, that is, the page size is different for each DRAM bank to be accessed. For this reason, a control parameter for designating a bit to be used for page hit determination for each RAS line is set in the internal register of the page hit
[0046]
The DRAM control timing by the
[0047]
(1) Page hit
This means that the current DRAM access accesses the same page in the same DRAM bank as the previous time. In this case, access to the DRAM bank is controlled in the page mode. That is, only the column address and CAS line activation timing are controlled, and the
[0048]
(2) Bank miss
This means that the current DRAM access accesses a different DRAM bank. In this case, the RAS line is switched by the
[0049]
(3) Page miss
This means that the current DRAM access accesses a different page in the same DRAM bank as the previous time. In this case, the RAS line same as the previous RAS line is set again to the active state by the
[0050]
Next, the decoding conditions for each RAS line set in the
[0051]
FIG. 4 shows an example of a DRAM memory map in the system. As shown in FIG. 1, in this DRAM memory map, two 2M byte DRAM banks are mounted on the
[0052]
In this case, these DRAM banks are arranged in the descending order of memory size, that is, as shown in FIG. 4, an 8M byte DRAM bank, two 4M byte DRAM banks, and two 2M byte DRAM banks in total, 20M bytes. In the DRAM logical address space.
[0053]
In this memory arrangement, an address range of 0 to 8 Mbytes is assigned to the RAS2 line corresponding to the 8 Mbyte DRAM bank. An address range of 8 to 12 Mbytes is assigned to the RAS4 line corresponding to the first 4 Mbyte DRAM bank, and an address range of 12 to 16 Mbytes is assigned to the RAS5 line corresponding to the next 4 Mbyte DRAM bank. Further, an address range of 16 to 18 Mbytes is assigned to the RAS0 line corresponding to the first 2 Mbyte DRAM bank, and an address range of 18 to 20 Mbytes is assigned to the RAS1 line corresponding to the next 2 Mbyte DRAM bank. Since the RAS3 line is not used, no address range is assigned to the RAS3 line.
[0054]
At this time, the decoding conditions for each of the RAS0 to RAS5 lines are determined as shown in FIG.
[0055]
As a decoding condition for each of the RAS0 to RAS5 lines, a bit string that exists in common only for all DRAM logical address values (MA31: 02) belonging to the address range assigned to each RAS line is used.
[0056]
That is, the decoding condition of the RAS2 line is the upper 9 bits (MA31 to 23) of the DRAM logical address value (MA31: 02) = “0000 0000 0”. The lower 21 bits of the DRAM logical address value (MA31: 02) are used as a row address and a column address of an 8 Mbyte DRAM bank connected to the RAS2 line.
[0057]
The decoding condition of the RAS4 line is the upper 10 bits (MA31 to 22) of the DRAM logical address value (MA31: 02) = “0000 0000 10”. The lower 20 bits of the DRAM logical address value (MA31: 02) are used as a row address and a column address of a 4 Mbyte DRAM bank connected to the RAS4 line.
[0058]
The decoding condition of the
[0059]
The decoding condition of the RAS0 line is the upper 11 bits (MA31 to 21) of the DRAM logical address value (MA31: 02) = “0000 0001 000”. The lower 19 bits of the DRAM logical address value (MA31: 02) are used as a row address and a column address of a 2 Mbyte DRAM bank connected to the RAS0 line.
[0060]
The decoding condition of the RAS1 line is the upper 11 bits (MA31 to 21) of the DRAM logical address value (MA31: 02) = “0000 0001 000”. The lower 19 bits of the DRAM logical address value (MA31: 02) are used as a row address and a column address of a 2 Mbyte DRAM bank connected to the RAS0 line.
[0061]
As described above, a common bit string belonging to the address range corresponding to each RAS line is used as a decoding condition for each RAS line. For this reason, the
[0062]
Next, decoding conditions for each RAS line when the page interleave architecture is adopted will be described.
[0063]
In the case of page interleaving, the five DRAM banks mapped as shown in FIG. 4 are classified into bank groups capable of page interleaving. Each bank group includes a combination of banks that have adjacent memory address ranges and the same total memory size. Such grouping is performed in order from the youngest DRAM logical address.
[0064]
That is, in the example of FIG. 4, the total memory size of two 4 Mbyte DRAM banks allocated to the address range subsequent to the address range (0 to 8 Mbytes) of
[0065]
Since the
[0066]
In this case, the decoding conditions for each RAS line are changed as shown in FIGS.
[0067]
That is, the decoding conditions of RAS2, RAS4, and RAS5 of
[0068]
That is, as shown in FIG. 6, in the address range of a total of 16 Mbytes allocated to RAS2, RAS4, and RAS5, the upper 8 bits (MA31-24) of the DRAM logical address value (MA31: 02) = “0000 0000” is It exists in common and does not exist in
[0069]
For RAS2, the start position of the row address in the DRAM logical address is shifted left by 1 bit, and 1 bit (MA12) = “0” between the row address and the column address of the 8-Mbyte DRAM bank corresponding to RAS2 is decoded. Added as a requirement.
[0070]
For each of RAS4 and RAS5, the start position of the row address in the DRAM logical address is shifted by 2 bits to the left, and 2 bits (MA13, 12) between the row address and the column address of the corresponding 4M-byte DRAM bank. A value is added as an address condition. Two bits are used because the memory sizes of RAS4 and RAS5 are half of the memory size of RAS2.
[0071]
That is, for RAS4, 2 bits (MA13, 12) = “01” between the row address and the column address of the 4 Mbyte DRAM bank corresponding to RAS4 are added as a decoding condition, and RAS5 corresponds to RAS5. 2 bits (MA13, 12) = “11” between the row address and the column address of the 4 Mbyte DRAM bank to be added are added as an address condition.
[0072]
When the decoding conditions of RAS2, RAS4, and RAS5 are determined in this way, an even page (0, 2, 4, 6,...) In the address range of 0 to 16 Mbytes is allocated to the 8 Mbyte DRAM bank of RAS2. , RAS4 4M byte DRAM bank is assigned a part of odd pages (1, 5, 9,...) In the 0-16M byte address range, and RAS5 4M byte DRAM bank is 0-16M byte. The remaining odd pages (3, 7, 11,...) In the address range are assigned.
[0073]
Therefore, when continuous access is performed in the range of 0 to 16 Mbytes, the three DRAM banks are alternately accessed in page units in the order of RAS2, RAS4, RAS2, RAS5, RAS2,.
[0074]
On the other hand, the decoding conditions of RAS0 and RAS1 of
[0075]
That is, the decoding conditions for RAS0 and RAS1 are as follows: a bit string that is commonly present in all DRAM logical address values (MA31: 02) belonging to the total 4 Mbyte address range (16 to 20 Mbytes) allocated to
[0076]
In the address range of a total of 4 Mbytes assigned to RAS0 and RAS1, the upper 10 bits (MA31 to 22) of the DRAM logical address value (MA31: 02) = “0000 0001 00” exist in common. Does not exist. Therefore, (MA31 to 22) = “0000 0001 00” is used as a common decoding condition for RAS0 and RAS1.
[0077]
As for RAS0, the start position of the row address in the DRAM logical address is shifted 1 bit to the left, and 1 bit (MA11) = “0” between the row address and the column address of the 2 Mbyte DRAM bank corresponding to RAS0. Is added as a decoding condition.
[0078]
Also for RAS1, the start position of the row address in the DRAM logical address is shifted left by 1 bit, and 1 bit (MA11) = “1” between the row address and the column address of the corresponding 2M-byte DRAM bank is set as the decoding condition. Added.
[0079]
When the decoding conditions of RAS0 and RAS1 are determined in this way, even-numbered pages (0, 2, 4, 6,...) In the 16-20
[0080]
As described above, the page interleaving determines the decoding condition of each RAS based on the bit string that is commonly present in the address range of the interleave group and the predetermined bit string between the row address and the column address, and uses the
[0081]
Initial setting processing for the
[0082]
FIG. 7 shows the procedure of the initial setting operation for the
[0083]
When the system is powered on, the IRT routine first checks the memory type of each DRAM bank (the bit width of each column address and row address), and detects the memory size according to the memory bank type (step S11). The bit width of each of the column address and the row address can be detected by executing a write / read compare test for a specific memory address of the DRAM bank to be tested.
[0084]
Details of the memory size detection processing operation performed in step S11 will be described later with reference to FIG.
[0085]
Next, the IRT routine performs memory relocation of the DRAM bank in the system (step S12). In this memory rearrangement, as described with reference to FIG. 4, the memory addresses are arranged in ascending order from the DRAM bank having the largest memory size, and the address range to be assigned to each DRAM bank is determined according to the arrangement.
[0086]
Next, as described with reference to FIG. 5, the IRT routine detects, for each address range assigned to each DRAM bank, a bit string that exists in common only in the DRAM logical address value belonging to that range, and uses the common bit string as the RAS line. Each decoding condition is determined (step S13).
[0087]
When the page interleave architecture is not used, the IRT routine sets the decoding conditions of each RAS line determined in step S13 as they are in the internal register of the RAS decoder 122 (step S17). Next, the IRT routine sets a control parameter for designating the row address start position for each RAS line in the internal register of the row address / column address multiplexer 123, and also uses the internal register of the page hit
[0088]
On the other hand, when the page interleave architecture is adopted, the IRT routine determines a page interleaveable group according to the DRAM map arranged in the memory size order in step S12 (step S15). Next, the IRT routine changes the decoding condition of each RAS based on a bit string that exists in common in the address range of the page interleave group and a predetermined bit string between the row address and the column address (step S16).
[0089]
Thereafter, the IRT routine sets the decoding condition of each RAS line determined in step S16 in the internal register of the RAS decoder 122 (step S17). Next, the IRT routine sets a control parameter for designating the row address start position for each RAS line in the internal register of the row address / column address multiplexer 123, and also uses the internal register of the page hit
[0090]
Next, the principle of the memory size detection process of the DRAM bank will be described with reference to FIGS.
[0091]
First, the types of DRAM banks that can be controlled by one RAS will be described with reference to FIG. As shown in the figure, the DRAM banks are roughly divided into four banks of
[0092]
[0093]
[0094]
[0095]
[0096]
9, FIG. 10, and FIG. 11 show the memory configurations of the
[0097]
When the
[0098]
Which of these two 2M byte DRAM banks is addressed is determined by which of RAS0 and RAS1 is activated.
[0099]
When the RAS0 line is energized, the lower 10 bits of the address value output on the
[0100]
Similarly, when the RAS1 line is energized, the low-order 10-bit row address of the address value output on the
[0101]
When the
[0102]
When the RAS2 line is energized, the lower 11 bits of the address value output on the
[0103]
When the
[0104]
Which of these two 4M byte DRAM banks is addressed is determined by which of RAS4 and RAS5 is activated.
[0105]
When the RAS4 line is energized, the lower 10 bits of the address value output on the
[0106]
Similarly, when the RAS5 line is energized, the lower 10 bits of the address value output on the
[0107]
As described above, the relationship between the number of bits used as a row address and the number of bits used as a column address differs for each type of DRAM bank. The memory size of the DRAM bank connected to each RAS line is detected by utilizing the difference in the number of bits used as the row address and the column address.
[0108]
Hereinafter, the procedure of the memory size detection process executed in step S11 of the IRT routine will be described with reference to the flowchart of FIG.
[0109]
The IRT routine performs memory size detection processing of the DRAM bank connected to the RAS line in the order of RAS0, RAS1, RAS2,. The IRT routine first sets a predetermined decoding condition in the
[0110]
Next, in the IRT routine, the
[0111]
If the DRAM bank actually connected to the RAS line to be inspected is a
[0112]
That is, since the setting corresponding to the
[0113]
Therefore, when a mismatch between the write data and the read data is detected in step S23, the DRAM bank connected to the RAS line to be inspected is the
[0114]
In other words, the IRT routine now has a type 3 (or type 2) memory configuration (column address CA = 10 bits, row address RA = 11 bits) having the number of column address bits next to type 4 and the RAS line to be examined Assuming that the DRAM bank is connected, a write / read compare test is performed on the DRAM bank (step S25). In this write / read compare test, a write access at the write address 008000000H and a read access at the read
[0115]
If the DRAM bank actually connected to the RAS line to be inspected is a
[0116]
On the other hand, if the DRAM bank actually connected to the RAS line to be examined is a
[0117]
That is, the IRT routine assumes that a
[0118]
In this write / read compare test, a write access of the
[0119]
If the DRAM bank actually connected to the RAS line to be inspected is a
[0120]
That is, since the setting corresponding to the
[0121]
Therefore, when a mismatch between the write data and the read data is detected in step S29, the DRAM bank connected to the RAS line to be inspected is the
[0122]
Next, specific circuit configurations of the
[0123]
FIG. 13 shows a specific circuit configuration of the
[0124]
Since the
[0125]
The
[0126]
The RAS set
[0127]
The
[0128]
Match / mismatch detection circuits 71 to 79 detect match / mismatch between the corresponding bits of the DRAM logical address and the decode condition, respectively. Each of these match / mismatch detection circuits 71 to 79 can be realized by an exclusive OR gate. The nine mask circuits 71 to 79 mask the detection result outputs of the corresponding match / mismatch detection circuits 71 to 79, respectively.
[0129]
As described above, the
[0130]
Next, a specific circuit configuration of the row address / column address multiplexer 123 will be described with reference to FIG.
[0131]
As shown in the figure, the row address / column address multiplexer 123 includes a
[0132]
The
[0133]
There is a possibility that four bits of the DRAM logical addresses MA11, MA12, MA13, and MA14 are used as the row address start position depending on the type of DRAM to be supported and the page interleaving condition. Each control parameter is composed of 4-bit data designating one of these four types of row address start positions. The control parameter “0001” specifies MA11, “0010” specifies MA12, “0011” specifies MA13, and “0100” specifies MA14.
[0134]
One of the six control parameters set in the
[0135]
The
[0136]
The row address start
[0137]
These row address start
[0138]
The
[0139]
The row address /
[0140]
In the row address / column address multiplexer 123, row address cutout operations are performed by the row address start
[0141]
Here, the description has been made so that all 11 bits of the row address (RA10: 0) are switched in accordance with the RAS line by the row address start
[0142]
That is, in any case where the row address start position is MA11, MA12, MA13, and MA14, the 6 bits MA14 to MA19 are used in common, and therefore these bits can be excluded from the switching target. An example of the correspondence between the CPU address and the row address in this case is shown in FIG.
[0143]
In FIG. 15, only the lower 3 bits (RA2 to RA0) and the upper 2 bits (RA10, RA9) of the row address are to be switched. In this way, the 6 bits of MA14 to MA19 of the CPU address can be sent directly to the row address /
[0144]
As described above, the circuit configuration of the row address / column address multiplexer 123 of FIG. 14 can greatly reduce the number of circuits required. However, the operation of the three circuit blocks (the operation of selecting and reading out the control parameter to be used from the register file 201) until the row address to be used for DRAM access is determined after the decoding result of the
[0145]
FIG. 16 shows a second circuit configuration example of the row address / column address multiplexer 123. The configuration shown in FIG. 16 is improved as follows in order to reduce the delay in the row address / column address multiplexer 123.
[0146]
That is, in the row address / column address multiplexer 123 of FIG. 16, instead of the
[0147]
Further, in the next stage of the row address selectors 203-1 to 203-6, one of six types of row addresses (RAS0 row address to RAS5 row address) obtained by the row address selectors 203-1 to 203-6 is provided. A row address selector 209 is provided for selecting one according to the decoding result of the
[0148]
In this circuit configuration, in parallel with the decoding operation of the
[0149]
When the decoding result of the
[0150]
Therefore, the circuit operation required from the determination of the decoding result of the
[0151]
In the configuration of FIG. 16, it is not necessary to switch the bits of all the row addresses as in the case of FIG.
[0152]
FIG. 17 shows a specific circuit configuration of the page hit
[0153]
The page hit
[0154]
The register file 301 is an I / O register that can be read / written by the
[0155]
That is, in the page hit determination, for the RAS decoding, the row address (page address) excluding the remaining address excluding the in-page address, that is, the portion corresponding to the column address, from the CPU address (A31: 02). Address is targeted. Since the portion corresponding to the column address is not involved in the page hit determination, the determination result for each bit used as the column address needs to be masked with mask data. Here, masking means that the determination result of the corresponding bit always matches.
[0156]
Actually, the mask data corresponding to each RAS line is composed of 3-bit data indicating whether or not to mask A12, A11, and A10, not all the bits of the column address. This is because the match determination circuit 303 excludes bits lower than A10 that are always used as column addresses regardless of the type of DRAM bank from the match determination, and only the higher bits after A10 are subject to match determination. This is because each of the three bits A12, A11, and A10 is used as a part of the column address depending on the type of DRAM bank.
[0157]
For example, when a
[0158]
The page hit determination
[0159]
The coincidence determination circuit 303 is a comparator that compares the CPU address (A26 to A11) at the time of the current memory access with the CPU address (A26 to A11) held in the page hit determination
[0160]
The
[0161]
In the coincidence determination mask position register 305, mask data corresponding to the RAS line to be energized is set. The contents of the match determination mask position register 305 are updated to mask data corresponding to the RAS line activated by the
[0162]
According to the page hit
[0163]
The
[0164]
Normally, the operation timing of the
[0165]
Further, the
[0166]
“Page accessible state” means that the RAS from the previous access has been issued. A state other than the “page accessible state” is a “page inaccessible state”. When the system is reset, the page is inaccessible.
[0167]
After the
[0168]
The factors causing the “page inaccessible state” are the hold acknowledge HLDA state, DRAM shadow refresh, RAS timeout, and system reset. Therefore, the
[0169]
Further, the
[0170]
When the current state is the “page inaccessible state”, in order to invalidate the page hit signal, the
[0171]
Further, the
[0172]
(Mode 1)
This mode assumes that the
[0173]
(Mode 2)
This mode is a mode that assumes usage in which the
[0174]
One of these modes may be used in a fixed manner. However, if there are many address patterns that cannot be obtained because of a page hit during operation in
[0175]
In the page hit
[0176]
That is, when the memory devices to be accessed are different between the write access and the read access, the page hit determination cannot actually be performed only by whether or not the memory addresses match. In this case, as a result, the page hit determination takes time, and the merit of the high-speed page hit determination cannot be utilized.
[0177]
Therefore, as described above, in this embodiment, when the memory devices to be accessed are different between the write access and the read access, the cycle type information of write or read is also added to the page hit determination condition. Hereinafter, the configuration for that purpose will be specifically described.
[0178]
First, with reference to FIG. 18, the relationship between the memory address space of the
[0179]
The size of one address area managed by the memory area attribute table 127 is 16K bytes. As shown in FIG. 18, the CPU
[0180]
Among these AREA00 to AREA63, 8-bit attribute information as shown in FIG. 19 is set in each attribute register corresponding to AREA40 to AREA63 in which a plurality of types of memory devices including DRAM may be arranged. . As shown in FIG. 19, of the 8-bit attribute information, 2 bits of
[0181]
The read attribute information (READ ATTRIBUTE) indicates the type of memory device to be read-accessed. As shown in FIG. 20, the combination of two bits of
[0182]
The DRAM write protect information (WP) indicates whether or not write protection is performed on the DRAM according to the contents of
[0183]
The caching control information (CASH) is for controlling the validity / invalidity of the caching operation of the RAM when both the read attribute information and the write attribute information specify the DRAM, and is shown in FIG. As shown in the figure, any one of write back cache enable, write through cache enable, and cache disable is specified by the combination of two bits of bit2 and bit1. For example, the cache disable setting is made for the DRAM area where the VGA BIOS and the system BIOS are copied.
[0184]
In the page hit determination
[0185]
Accordingly, the memory attribute can be determined at high speed, and high-speed memory access utilizing high-speed page hit determination becomes possible.
[0186]
Further, the page hit determination
[0187]
That is, when it is determined that a page hit occurs, at the same time, the cycle type is determined as follows.
[0188]
1. Light page hit unprotected
This is a cycle executed when the current memory access cycle is a write cycle and the held write protect information indicates non-write protect, and writing to the DRAM is executed in page mode. .
[0189]
2. Light page hit protection
This is a cycle that is executed when the current memory access cycle is a write cycle, and the held write protect information indicates write protect, and CAS is not asserted. Realized.
[0190]
3. Lead page hit single
This is a cycle that is executed when the current memory access cycle is a read cycle and the cache control information being held indicates that the cache is invalid. The read cycle for reading data from the DRAM is 1 in page mode. Executed once.
[0191]
4). Lead page hit burst
This is a cycle that is executed when the current memory access cycle is a read cycle and the cache control information being held indicates that the cache is valid, and a burst read cycle for reading a plurality of continuous data from the DRAM Is executed in page mode.
[0192]
Here, the write protect information and the cache control information are recorded together with the CPU address for page hit determination when RAS is issued again for the page due to a bank miss or page miss. This is because waiting for the decoding result of the write protect information and the cache control information is not in time for the page hit decision time.
[0193]
Therefore, the write protect information at the read cycle and the cache control information at the write cycle are also meaningful.
[0194]
If no page hit occurs, it is determined whether a bank miss or a page miss occurs. When a bank miss is determined, the cycle type is determined at the same time as follows.
[0195]
1. Write bank miss unprotected
This is a cycle executed when the current memory access cycle is a write cycle and the write protect information corresponding to the current memory address indicates non-write protect, and RAS to another DRAM bank is asserted. Then, data writing is executed by early write.
[0196]
2. Write bank miss protection
This is a cycle executed when the current memory access cycle is a write cycle and the write protect information corresponding to the current memory address indicates write protect, and CAS is not asserted. Write protection is realized.
[0197]
3. Lead bank miss single
This is a cycle executed when the current memory access cycle is a read cycle, and the cache control information corresponding to the current memory address indicates cache invalidity, and RAS for another DRAM bank is asserted. A read cycle for reading data from the DRAM bank is executed once.
[0198]
4). Lead bank miss burst
This is a cycle executed when the current memory access cycle is a read cycle and the cache control information corresponding to the current memory address indicates that the cache is valid, and RAS for another DRAM bank is asserted. Thereafter, a burst read cycle for reading a plurality of continuous data from the DRAM bank is executed.
[0199]
Here, the write protect information and the cache control information are decode signals defined for the page accessed this time, and are recorded together with the CPU address for page hit determination for subsequent access.
[0200]
When a page miss is determined, the cycle type is determined at the same time as follows.
[0201]
1. Write page miss unprotected
This is a cycle executed when the current memory access cycle is a write cycle and the write protect information corresponding to the current memory address indicates non-write protect, and RAS for the same DRAM bank is asserted. The data is written by early write.
[0202]
2. Write page miss protection
This is a cycle executed when the current memory access cycle is a write cycle and the write protect information corresponding to the current memory address indicates write protect, and CAS is not asserted. Write protection is realized.
[0203]
3. Lead page miss single
This is a cycle executed when the current memory access cycle is a read cycle, and the cache control information corresponding to the current memory address indicates cache invalidity, and RAS for the same DRAM bank is reasserted. Then, a read cycle for reading data from the DRAM bank is executed once.
[0204]
4). Lead page misburst
This is a cycle executed when the current memory access cycle is a read cycle and the cache control information corresponding to the current memory address indicates that the cache is valid, and RAS for the same DRAM bank is reasserted. After that, a burst read cycle for reading a plurality of continuous data from the DRAM bank is executed.
[0205]
Here, the write protect information and the cache control information are decode signals defined for the page accessed this time, and are recorded together with the CPU address for page hit determination for subsequent access.
[0206]
As described above, according to this embodiment, the page hit
[0207]
Further, by holding the memory attribute information together with the CPU address for page hit determination, it is possible to determine the page hit more quickly and determine the next cycle type.
[0208]
【The invention's effect】
As described above, according to the present invention, the page hit determination can be executed at high speed, and the memory access speed can be increased.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a computer system according to an embodiment of the present invention.
FIG. 2 is an exemplary block diagram showing memory control logic in a system controller provided in the system according to the embodiment;
3 is a diagram showing a conversion operation from a CPU memory address space to a DRAM logical address space, which is executed by an address conversion circuit included in the memory control logic of FIG. 2;
4 is a diagram showing a DRAM memory map showing a state in which a plurality of DRAM banks provided in the system of the embodiment are rearranged in the DRAM logical address space in order of memory size; FIG.
FIG. 5 is a diagram showing decoding conditions for RAS lines connected to a plurality of DRAM banks provided in the system of the embodiment;
FIG. 6 is a diagram showing decoding conditions for each RAS line employed when the page interleave architecture is realized in the system of the embodiment;
FIG. 7 is an exemplary flowchart illustrating a procedure of an initial setting process for a memory control logic which is executed by an IRT routine when the system of the embodiment is powered on.
FIG. 8 is a diagram showing an example of the types of DRAM banks supported by the system of the embodiment.
FIG. 9 is a diagram showing an example of a memory configuration of a system memory mounted as standard on the system board of the system according to the embodiment;
FIG. 10 is a diagram showing an example of a memory configuration of an additional memory installed in an expansion memory slot provided in the system of the embodiment.
FIG. 11 is a diagram showing an example of another memory configuration of an additional memory installed in an expansion memory slot provided in the system according to the embodiment;
12 is a flowchart showing a procedure of memory size detection processing of each DRAM bank executed in the initial setting processing of the memory control logic of FIG. 7;
13 is a circuit diagram showing an example of a specific configuration of a RAS decoder included in the memory control logic of FIG. 2;
14 is a circuit diagram showing an example of a specific configuration of a row address / column address multiplexer included in the memory control logic of FIG. 2;
15 is a view for explaining row address switching operation of the row address / column address multiplexer of FIG. 14; FIG.
16 is a circuit diagram showing another example of a specific configuration of a row address / column address multiplexer included in the memory control logic of FIG. 2;
17 is a circuit diagram showing an example of a specific configuration of a page hit determination circuit included in the memory control logic of FIG. 2;
FIG. 18 is an exemplary view showing the relationship between memory attribute information managed by the system of the embodiment and a CPU memory address space;
FIG. 19 is a diagram showing a format of memory attribute information in FIG. 18;
20 is a view showing the contents of read attribute information included in the memory attribute information of FIG. 18;
FIG. 21 is a view showing the contents of write attribute information included in the memory attribute information of FIG. 18;
22 is a view showing the contents of DRAM write protect information included in the memory attribute information of FIG. 18;
FIG. 23 is a view showing the contents of caching control information included in the memory attribute information of FIG. 18;
[Explanation of symbols]
DESCRIPTION OF
Claims (4)
CPUのメモリアドレス空間に非連続に配置されている前記複数のDRAMバンクそれぞれに対応するメモリアエリアがDRAM論理アドレス空間上で連続して配置されるように、前記複数のDRAMバンクのページサイズ以上の変換単位で、前記CPUからのメモリアドレスをDRAM論理アドレスに変換するアドレス変換手段と、
前回のメモリアクセス時におけるCPUからのメモリアドレスを保持し、そのメモリアドレスと今回のメモリアクセス時におけるCPUからのメモリアドレスとを比較し、一致した時に今回のメモリアクセスが前回のメモリアクセスと同一バンク且つ同一ページであることを示すページヒット信号を出力するページヒット判定手段と、
前記アドレス変換手段から出力されるDRAM論理アドレスをデコードして、どのDRAMバンクのRAS信号を出力するかを決定するRASデコーダであって、前記ぺージヒット信号が出力された時、DRAMページモードアクセスのためのRAS信号出力制御を行うRASデコーダと、
前記CPUによってアドレッシング可能なメモリアドレス空間を構成する複数のメモリアドレスエリアそれぞれについて、リードアクセスを許可すべきメモリデバイスの種類を指定する情報とライトアクセスを許可すべきメモリデバイスの種類を指定する情報とを含むメモリ属性情報が定義されたメモリ属性テーブルとを具備し、
前記ページヒット判定手段は、前記CPUによって設定される、ページヒット判定のために使用すべき前記メモリアドレス内のビット位置を前記DRAMバンク毎に指定する制御情報を保持する手段と、前記RASデコーダのデコード結果と前記制御情報とに基づいて、前記ページヒット判定のために使用すべき前記メモリアドレス内のビット位置を変更する手段とを含み、且つ前回のメモリアクセス時におけるCPUからのメモリアドレスと一緒にそのメモリアドレスに対応するメモリアドレスエリアの前記メモリ属性情報がライトアクセスとリードアクセスとで異なるメモリデバイスを指定しているか否かを示す情報とそのときのメモリアクセスがライトアクセスとリードアクセスのいずれであるかを示すサイクル種別情報を保持し、ライトアクセスとリードアクセスとでアクセス対象のメモリデバイスが異なるときは、保持されているメモリアドレスと今回のメモリアクセス時におけるCPUからのメモリアドレスとが一致し、且つ保持されている前記サイクル種別情報と今回のメモリアクセスのサイクル種別との一致を条件に、前記ページヒット信号を出力することを特徴とするメモリ制御システム。A plurality of DRAM banks each assigned a plurality of RAS signals and independently accessible;
The memory area corresponding to each of the plurality of DRAM banks that are discontinuously arranged in the memory address space of the CPU is continuously arranged on the DRAM logical address space so as to be equal to or larger than the page size of the plurality of DRAM banks. Address conversion means for converting a memory address from the CPU into a DRAM logical address in conversion units;
The memory address from the CPU at the previous memory access is held, the memory address is compared with the memory address from the CPU at the current memory access, and if they match, the current memory access is the same bank as the previous memory access. And page hit determination means for outputting a page hit signal indicating the same page;
A RAS decoder that decodes a DRAM logical address output from the address conversion means and determines which DRAM bank to output a RAS signal. When the page hit signal is output, a DRAM page mode access and RAS decoder for RAS signal output control for,
For each of a plurality of memory address areas constituting a memory address space addressable by the CPU, information for designating the type of memory device to which read access is permitted and information for designating the type of memory device to which write access is permitted A memory attribute table in which memory attribute information including
The page hit determination means has means for holding control information for setting the bit position within the memory address to be used for page hit determination set by the CPU for each DRAM bank, and the RAS decoder based on the decoded result and the control information, a memory address from the page hit the saw including a means for changing the bit position in the memory address to be used for the determination, and CPU at the previous memory access Together, information indicating whether or not the memory attribute information in the memory address area corresponding to the memory address designates a different memory device for write access and read access, and the memory access at that time is for write access and read access. Cycle type information that indicates which When the memory device to be accessed is different between the memory access and the read access, the held memory address matches the memory address from the CPU at the time of the current memory access, and the held cycle type information A memory control system that outputs the page hit signal on condition that the current memory access cycle type matches .
前記ページヒット判定手段は、The page hit determination means includes
ページヒットであると判定された場合において、今回のメモリアクセスサイクルがライトサイクルであり、且つ保持されているライトプロテクト情報が非ライトプロテクトを示している場合にはライトアクセスがDRAMページモードアクセスによって実行され、ページヒットであると判定された場合において、今回のメモリアクセスサイクルがライトサイクルであり、且つ保持されているライトプロテクト情報がライトプロテクトを示している場合にはカラムアドレスストローブ信号が付勢されないように、ページヒット判定結果と、保持されている前記メモリ属性情報とに基づいて、次に実行すべきサイクルの種別を決定することを特徴とする請求項1記載のメモリ制御システム。If the current memory access cycle is a write cycle and it is determined that the page hit is a write hit, and the held write protect information indicates non-write protect, the write access is executed by DRAM page mode access. If the current memory access cycle is a write cycle and the held write protect information indicates write protect when it is determined that a page hit occurs, the column address strobe signal is not activated. The memory control system according to claim 1, wherein the type of cycle to be executed next is determined based on a page hit determination result and the held memory attribute information.
前記ページヒット判定手段は、The page hit determination means includes
ページヒットであると判定された場合において、今回のメモリアクセスサイクルがリーIf it is determined that this is a page hit, the current memory access cycle is ドサイクルであり、且つ保持されているキャッシュ制御情報がキャッシュ無効を示している場合にはリードサイクルがDRAMページモードアクセスによって1回実行され、ページヒットであると判定された場合において、今回のメモリアクセスサイクルがリードサイクルであり、且つ保持されているキャッシュ制御情報がキャッシュ有効を示している場合には連続する複数のデータを読み出すバーストリードサイクルがDRAMページモードアクセスで実行されるように、ページヒット判定結果と、保持されている前記メモリ属性情報とに基づいて、次に実行すべきサイクルの種別を決定することを特徴とする請求項1記載のメモリ制御システム。If the cache control information that is held is a cache invalid and the cache control information held indicates that the cache is invalid, the read cycle is executed once by DRAM page mode access and it is determined that a page hit occurs. When the access cycle is a read cycle and the cache control information held indicates that the cache is valid, a page hit is performed so that a burst read cycle for reading a plurality of continuous data is executed by DRAM page mode access. 2. The memory control system according to claim 1, wherein a type of a cycle to be executed next is determined based on the determination result and the held memory attribute information.
これらDRAMバンクのページサイズ以上の変換単位で、CPUからのメモリアドレスを、前記複数のDRAMバンクに連続して割り当てられたDRAM論理アドレスに変換するアドレス変換手段と、Address conversion means for converting a memory address from the CPU into a DRAM logical address continuously assigned to the plurality of DRAM banks in a conversion unit equal to or larger than the page size of the DRAM bank;
前回のメモリアクセス時におけるCPUからのメモリアドレスを保持し、そのメモリアドレスと今回のメモリアクセス時におけるCPUからのメモリアドレスとを比較し、一致した時に今回のメモリアクセスが前回のメモリアクセスと同一バンク且つ同一ページであることを示すページヒット信号を出力するページヒット判定手段と、The memory address from the CPU at the previous memory access is held, the memory address is compared with the memory address from the CPU at the current memory access, and if they match, the current memory access is the same bank as the previous memory access. And page hit determination means for outputting a page hit signal indicating the same page;
前記アドレス変換手段から出力されるDRAM論理アドレスをデコードして、どのDRAMバンクのRAS信号を出力するかを決定するRASデコーダであって、前記ぺージヒット信号が出力された時、DRAMページモードアクセスのためのRAS信号出力制御を行うRASデコーダと、A RAS decoder that decodes a DRAM logical address output from the address conversion means and determines which DRAM bank to output a RAS signal. When the page hit signal is output, a DRAM page mode access A RAS decoder for performing RAS signal output control for
前記CPUによってアドレッシング可能なメモリアドレス空間を構成する複数のメモリアドレスエリアそれぞれについて、リードアクセスを許可すべきメモリデバイスの種類を指定する情報とライトアクセスを許可すべきメモリデバイスの種類を指定する情報とを含むメモリ属性情報が定義されたメモリ属性テーブルとを具備し、For each of a plurality of memory address areas constituting a memory address space that can be addressed by the CPU, information for designating the type of memory device to which read access is permitted and information for designating the type of memory device to which write access is permitted A memory attribute table in which memory attribute information including
前記ページヒット判定手段は、The page hit determination means includes
前回のメモリアクセス時におけるCPUからのメモリアドレスと一緒にそのメモリアドレスに対応するメモリアドレスエリアの前記メモリ属性情報がライトアクセスとリードアクセスとで異なるメモリデバイスを指定しているか否かを示す情報とそのときのメモリアクセスがライトアクセスとリードアクセスのいずれであるかを示すサイクル種別情報を保持し、ライトアクセスとリードアクセスとでアクセス対象のメモリデバイスが異なるときは、保持されているメモリアドレスと今回のメモリアクセス時におけるCPUからのメモリアドレスとが一致し、且つ保持されている前記サイクル種別情報と今回のメモリアクセスのサイクル種別との一致を条件に、前記ページヒット信号を出力することを特徴するメモリ制御システム。Information indicating whether or not the memory attribute information in the memory address area corresponding to the memory address specifies different memory devices for write access and read access together with the memory address from the CPU at the previous memory access Cycle type information indicating whether the memory access at that time is write access or read access is held, and if the memory device to be accessed differs between write access and read access, the held memory address and this time The page hit signal is output on condition that the memory address from the CPU at the time of memory access matches and the cycle type information held matches the cycle type of the current memory access. Memory control system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP33186295A JP3614956B2 (en) | 1995-12-20 | 1995-12-20 | Memory control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP33186295A JP3614956B2 (en) | 1995-12-20 | 1995-12-20 | Memory control system |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH09171484A JPH09171484A (en) | 1997-06-30 |
JP3614956B2 true JP3614956B2 (en) | 2005-01-26 |
Family
ID=18248485
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP33186295A Expired - Fee Related JP3614956B2 (en) | 1995-12-20 | 1995-12-20 | Memory control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3614956B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SE512773C2 (en) | 1998-10-28 | 2000-05-08 | Imsys Ab | Method and device for controlling / accessing DRAM memories |
CN113821369A (en) * | 2021-11-23 | 2021-12-21 | 苏州浪潮智能科技有限公司 | Method, device and medium for memory polling |
-
1995
- 1995-12-20 JP JP33186295A patent/JP3614956B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH09171484A (en) | 1997-06-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3590413B2 (en) | Memory controller | |
US5706407A (en) | System for reallocation of memory banks in memory sized order | |
EP3485383B1 (en) | Memory controller with flexible address decoding | |
US5809280A (en) | Adaptive ahead FIFO with LRU replacement | |
US5210843A (en) | Pseudo set-associative memory caching arrangement | |
CA2011518C (en) | Distributed cache dram chip and control method | |
US5329629A (en) | Apparatus and method for reading, writing, and refreshing memory with direct virtual or physical access | |
US5276833A (en) | Data cache management system with test mode using index registers and CAS disable and posted write disable | |
US5509138A (en) | Method for determining speeds of memory modules | |
JP2837804B2 (en) | Fully integrated cache architecture | |
US5070502A (en) | Defect tolerant set associative cache | |
US7236421B1 (en) | Read-modify-write memory using read-or-write banks | |
WO1996012229A1 (en) | Indexing and multiplexing of interleaved cache memory arrays | |
US5497458A (en) | Cache testability circuit for embedded diagnostics | |
JPH0863958A (en) | Random-access-memory-system and random-access-memory | |
US6678790B1 (en) | Microprocessor chip having a memory that is reconfigurable to function as on-chip main memory or an on-chip cache | |
EP0902922A1 (en) | Method and apparatus for caching system management mode information with other information | |
US5544344A (en) | Apparatus for caching smram in an intel processor based computer system employing system management mode | |
JPH08227380A (en) | Data-processing system | |
US20040088603A1 (en) | Method and system for absorbing defects in high performance microprocessor with a large n-way set associative cache | |
US5161219A (en) | Computer system with input/output cache | |
US5367655A (en) | Memory and associated method including an operating mode for simultaneously selecting multiple rows of cells | |
US5434990A (en) | Method for serially or concurrently addressing n individually addressable memories each having an address latch and data latch | |
JP3614956B2 (en) | Memory control system | |
JP3540388B2 (en) | Computer system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040312 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040406 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040519 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040810 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20041004 |
|
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: 20041026 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20041028 |
|
LAPS | Cancellation because of no payment of annual fees |