JP3540388B2 - Computer system - Google Patents

Computer system Download PDF

Info

Publication number
JP3540388B2
JP3540388B2 JP23812194A JP23812194A JP3540388B2 JP 3540388 B2 JP3540388 B2 JP 3540388B2 JP 23812194 A JP23812194 A JP 23812194A JP 23812194 A JP23812194 A JP 23812194A JP 3540388 B2 JP3540388 B2 JP 3540388B2
Authority
JP
Japan
Prior art keywords
address
memory
dram
cpu
ras
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP23812194A
Other languages
Japanese (ja)
Other versions
JPH08101792A (en
Inventor
伸隆 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP23812194A priority Critical patent/JP3540388B2/en
Priority to US08/364,720 priority patent/US5706407A/en
Publication of JPH08101792A publication Critical patent/JPH08101792A/en
Priority to US08/893,926 priority patent/US6016548A/en
Application granted granted Critical
Publication of JP3540388B2 publication Critical patent/JP3540388B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【産業上の利用分野】
この発明は、例えばパーソナルコンピュータ等のコンピュータシステムに関し、特に複数のDRAMバンクを効率良くアクセスするための改良がなされたメモリ制御ロジックを含むコンピュータシステムに関する。
【0002】
【従来の技術】
近年、携行が容易でバッテリにより動作可能なノートブックタイプまたはラップトップタイプのポータブルパーソナルコンピュータが種々開発されている。この種のパーソナルコンピュータにおいては動作速度の高速化が望まれており、最近では、大規模なキャッシュを内蔵する高性能マイクロプロセッサがCPUとして使用され始めている。
【0003】
キャッシュ内蔵のマイクロプロセッサをCPUとして使用した場合には、メインメモリのアクセス回数を減らすことができ、ある程度はシステム動作性能の向上を図ることができる。
【0004】
しかしながら、CPUがキャッシュを内蔵していてもメインメモリに対するアクセスが無くなるわけではなく、キャッシュミスが発生したときには、CPUがメインメモリに対してメモリリード/ライトサイクルを実行することが必要とされる。このため、実際には、システム性能を向上させるためには、CPUによるメモリリード/メモリライトサイクルの実行速度を早めることが必要不可欠となる。
【0005】
パーソナルコンピュータのメインメモリとしては、通常、ダイナミックRAM(DRAM)メモリが使用されている。DRAMは、スタテッィクRAM(SRAM)に比べて低コストである反面、アクセス速度が遅いという特徴を持つ。この問題を解決するため、最近ではDRAMチップ自体の改良などの半導体技術レベルでの改善に加え、インタリーブ制御などの採用によるメモリアーキテクチャレベルでの改善も進められている。
【0006】
しかし、パーソナルコンピュータにおけるメモリアーキテクチャの構築に際しては、システムボード上に標準実装された内部メモリの制御だけでなく、ユーザによって必要に応じて装着される種々の増設メモリの制御も考慮しなければならない。
【0007】
このため、パーソナルコンピュータに設けられる従来のメモリ制御ロジックにおいては、非常に複雑なハードウェア構成が必要とされた。特にメモリアドレス制御を行うハードウェアロジックの複雑化は、メモリアクセス速度を低下させる直接的な原因となっている。
【0008】
以下、従来のメモリ制御ロジックを用いたDRAMアドレス制御の原理について説明する。
【0009】
通常、パーソナルコンピュータには、DRAMカードなどの増設メモリを装着するための複数の拡張用メモリコネクタが設けられている。DRAMカードなどの増設メモリは、1以上のDRAMバンクから構成されている。内部メモリと増設メモリ内の全てのDRAMバンクは、互いに異なるロウアドレスストローブ信号線(RAS線)に接続される。メモリアクセス制御においては、それらRAS線の1つが付勢され、そのRAS線に接続されているDRAMバンクがアクセス対象バンクとして選択される。
【0010】
RAS線の付勢制御は、メモリ制御ロジック内のアドレスデコータによって行われる。アドレスデコーダは、複数のRAS線の中で、CPUからのメモリアドレス値が満たすデコード条件を持つRAS線を付勢する。各RAS線のデコード条件は、次のように決定される。
【0011】
すなわち、内部メモリおよび増設メモリ内の全てのDRAMバンクは、それらの物理的な装着位置の順序、つまりシステムボード、拡張メモリコネクタ1、拡張メモリコネクタ2…の順で、CPUのメモリアドレス空間の若い方から順に配置される。このメモリ配置に従い、それらDRAMバンクに割り当てるべきアドレス範囲がそれぞれ規定され、そのアドレス範囲にしたがって各RAS線のデコード条件が決定される。
【0012】
この場合、どのようなメモリサイズを持つDRAMバンクがどのRAS線に接続されてもかまわないように、各RAS線のデコード条件としては、対応するDRAMバンクに割り当てられたアドレス範囲の上限を示す先頭アドレスと下限を示す最終アドレスの双方が利用される。
【0013】
このため、アドレスデコーダは、CPUからのメモリアドレスがどのRAS線のデコード条件を満たすかを検出するために、RAS線毎に2個のコンパレータを備える必要があった。一方のコンパレータはCPUからのメモリアドレス値と該当するRAS線に割り当てられたアドレス範囲の先頭アドレス値との大小を比較し、他方のコンパレータはCPUからのメモリアドレス値とそのRAS線に割り当てられたアドレス範囲の最終アドレス値との大小を比較する。メモリアドレスの値が先頭アドレス値以上で、最終アドレス値よりも小さいならば、該当するRAS線が付勢される。
【0014】
このように、従来のメモリ制御ロジックにおいてはアドレスデコーダに多くのコンパレータを設ける必要があり、そのためにアドレスデコーダ内部で比較的大きなディレイが生じる欠点があった。このディレイは、RAS線が付勢されるまでに要する時間を長くし、メモリアクセス速度の低下を引き起こす要因となる。
【0015】
また、このようなRAS線付勢に係るディレイは、インタリーブアーキテクチャを利用したメモリアクセス性能を制限する要因にもなる。
【0016】
すなわち、インタリーブは、例えばページ毎に付勢するRAS線を切り替える事によって、異なるDRAMバンクを順次アクセスする技術である。同一DRAMバンクを続けてアクセスする場合には、前回のメモリサイクル完了後、そのDRAMバンクのメモリセルの再充電が完了するまでの時間(プリチャージディレイ)だけ、次のメモリサイクルの実行を待つ必要がある。インタリーブを採用すれば、あるDRAMバンクの再充電期間中に別のDRAMバンクをアクセスでき、同一バンクを連続してアクセスする時に必要なプリチャージディレイによる時間ロスを無くすことができる。
【0017】
ところが、前述のRAS線付勢に係るディレイは、RAS線の切り替え速度そのものを遅くするので、インタリーブの高速アクセス性能を十分に発揮させることができなくなる。また、実際には、インタリーブを実現するためにはアドレスデコーダの他に例えばページ単位でRAS線切り替えのための専用のハードウェアロジックを追加しなければならず、それによるディレイによってインタリーブの高速アクセス性能はさらに低下されることになる。
【0018】
また、インタリーブを有効利用するためには、インタリーブ可能なバンクの組み合わせを作るためのグルーピングを容易にするために、比較的メモリサイズが等しいメモリバンク同士に隣接したアドレス範囲が割り当てられている事が望ましい。このようにすれば、インタリーブの組み合わせから外れるDRAMバンクを少なくでき、より多くのDRAMバンクをインタリーブ制御する事ができるからである。
【0019】
しかし、前述したように、従来では、システム内のDRAMバンクのメモリ配置は、それらDRAMバンクの物理的な装着位置のみによって決定されるので、メモリサイズの大小関係とは全く無関係にDRAMバンクがアドレス空間に配置されてしまう。これは、インタリーブ可能なDRAMバンクの組み合わせを制限し、インタリーブの組み合わせから外れるDRAMバンク数を増加させる原因となる。
【0020】
【発明が解決しようとする課題】
従来では、システム内のDRAMバンクのメモリアドレス空間への配置はそれらのメモサイズの大小関係とは無関係に、物理的な装着位置のみ決定された。このため、アドレスデコーダのハードウェア構成が複雑化され、アドレスデコーダ内のディレイが大きくなる欠点があった。
【0021】
また、前述のようなDRAMバンクのメモリ配置はインタリーブ可能なDRAMバンクグループの組み合わせを制限する要因となり、インタリーブによる高速アクセス性能を十分に有効利用することができなくなる欠点があった。
【0022】
この発明はこのような点に鑑みてなされたもので、システム内のDRAMバンクをそれらのメモリサイズに応じてメモリアドレス空間に最適配置することによってアドレスデコーダのデコード条件の簡単化、およびインタリーブアーキテクチャの有効利用を図り、メモリアクセス速度の高速化を実現することができるコンピュータシステムを提供することを目的とする。
【0023】
【課題を解決するための手段および作用】
この発明のコンピュータシステムは、複数のアクセス制御信号がそれぞれ割り当てられ、互いに独立してアクセス可能な複数のメモリバンクと、前記複数のアクセス制御信号にそれぞれ対応する複数のデコード条件が設定され、それらデコード条件とCPUからのメモリアドレスとの一致の有無を検出し、一致したデコード条件に対応するアクセス制御信号線を付勢してメモリバンクを選択するアドレスデコーダと、前記複数のメモリバンクそれぞれのメモリサイズを検出する手段と、メモリサイズの大きいバンクほどCPUのメモリアドレス空間の若い方に配置されるように前記複数のメモリバンクをメモリサイズ順に前記メモリアドレス空間に再配置し、このメモリ配置に従って前記複数のメモリバンクそれぞれに割り当てるべきメモリアドレス範囲を決定するメモリ再配置手段と、前記複数のメモリバンクのメモリ配置に従って、ページインタリーブ可能な2以上のメモリバンクの組み合わせを決定する手段と、前記組み合わせに属するメモリバンクがページ単位で交互にアクセスされるように、前記組み合わせに属するメモリバンクそれぞれに対応するアクセス制御信号線のデコード条件を、前記組み合わせに属するメモリバンク全体のアドレス範囲に属する全てのメモリアドレス値それぞれを示す2値データに共通に存在するビット列と、各メモリバンクのページ内アドレスとページ指定アドレスとの間の所定ビット列とに従って決定して、前記アドレスデコーダに設定する手段とを具備することを特徴とする。
【0024】
このコンピュータシステムにおいては、複数のメモリバンクそれぞれのメモリサイズが検出され、それらメモリバンクの物理的な装着位置とは関係なく、メモリサイズの大小関係に従ってそれらメモリバンクのメモリアドレス空間への配置順が決定される。この場合、複数のメモリバンクはそのメモリサイズの大きいもの順に、CPUのメモリアドレス空間の若い方から配置される。
【0025】
このようなメモリ配置下においては、複数のメモリバンクそれぞれに割り当てられるアドレス範囲は、2値データで表現されるメモリアドレス値によって区分されるアドレス境界と上手く合致する。このため、どのアドレス範囲に属する全てのメモリアドレス値にも、そのアドレス範囲においてのみ共通の値を持つビット列が必ず存在する。そして、さらに、複数のメモリバンクのメモリ配置に従って、ページインタリーブ可能な2以上のメモリバンクの組み合わせが決定され、その組み合わせに属するメモリバンクがページ単位で交互にアクセスされるように、前記組み合わせに属するメモリバンクそれぞれに対応するアクセス制御信号線のデコード条件が、前記組み合わせに属するメモリバンク全体のアドレス範囲に属する全てのメモリアドレス値それぞれを示す2値データに共通に存在するビット列と、各メモリバンクのページ内アドレスとページ指定アドレスとの間の所定ビット列とに従って決定され、アドレスデコーダに設定される。
【0026】
したがって、各アドレス範囲の先頭アドレス値と最終アドレス値の双方をデコード条件として使用する必要がなくなり、各アクセス制御信号のデコード条件を簡単化できる。これによって、アドレスデコーダはCPUからのメモリアドレス値とデコード条件との一致/不一致をアクセス制御信号毎に検出するだけで済む。よって、従来に比し、アドレスデコーダのハードウェア構成を大幅に簡単化できるので、アドレスデコーダ内のディレイが小さくなり、メモリアクセス速度の高速化を実現できる。さらに、上記デコード条件の設定により、CPUからのメモリアドレス値とデコード条件との一致/不一致をアクセス制御信号毎に検出するというアドレスデコーダの構成を用いて、ページ毎に異なるバンクをアクセスするページインタリーブアーキテクチャが実現される。
【0030】
【実施例】
以下、図面を参照してこの発明の実施例を説明する。図1には、この発明の一実施例に係わるコンピュータシステムが示されている。
【0031】
このシステムはノートブックタイプまたはラップトップタイプのポータブルパーソナルコンピュータを実現するためのものであり、システムボード10上には、図示のように、CPU11、システムコントローラ12、システムメモリ13、BIOS ROM14、リアルタイムクロック(RTC)15、割り込みコントローラ(PIC)16、キーボードコントローラ(KBC)17、ディスプレイコントローラ18などが実装されている。
【0032】
また、システムボード10上には、CPUローカルバス(プロセッサバスと称する場合もある)31、ISA/EISA/PCIなどの仕様を持つシステムバス32、およびメモリアドレスバス33などが配設されている。
【0033】
さらに、このシステムには、増設メモリを接続するための2つの拡張用メモリコネクタ21,22が設けられている。図1においては、拡張メモリコネクタ21,22にそれぞれ増設メモリ41,42が接続されている状態が示されている。
【0034】
増設メモリ41,42は、システムメモリサイズを拡張するためにユーザによって必要に応じて装着されるオプションメモリであり、例えばDRAMカードや、SIMMメモリモジュールなどから構成されている。これら増設メモリは、通常、1以上のDRAMバンクから構成されている。
【0035】
CPU11は、大規模なキャッシュメモリを内蔵したマイクロプロセッサであり、例えば米インテル社のIntel486CPUなどが使用される。CPU11は、CPUローカルバス31を介してシステムコントローラ12に接続されている。CPUローカルバス31は、CPU11を構成するマイクロプロセッサの入出力ピンに直接繋がる信号群である。ここには、32ビットデータバス、32ビットアドレスバス、および各種ステータス信号線などが含まれている。
【0036】
システムコントローラ12は、CPUローカルバス31とシステムバス32との間に接続されており、CPU11からの要求に応じてシステム内の全てのメモリおよびI/Oデバイスを制御する。このシステムコントローラ12は、ゲートアレイによって構成された1個のLSIによって実現されており、その中にはシステムメモリ13および増設メモリ41,42のDRAMを制御するためのメモリ制御ロジロックが組み込まれている。
【0037】
システムメモリ13は、このシステムのメインメモリとして使用されるものであり、通常、1以上のDRAMバンクから構成されている。このシステムメモリ13には、オペレーティングシステム、実行対象のアプリケーションプログラム、および各種処理データなどが格納される。
【0038】
システムメモリ13は、所定のコネクタを介してまたは直接にシステムボード10上に実装されている。システムメモリ13は32ビットのメモリデバイスであり、そのデータポートはCPUローカルバス31の32ビットデータバスに接続され、また、アドレス入力ポートはメモリアドレスバス33に接続されている。メモリアドレスバス33はDRAM専用のアドレスバスであり、このメモリアドレスバス33上にはDRAMの物理アドレス(ロウアドレス/カラムアドレス)がシステムコントローラ12から出力される。
【0039】
同様に、増設メモリ41,42もそれぞれ32ビットのメモリデバイスであり、対応するコネクタ21,22を介してそのデータポートがCPUローカルバス31の32ビットデータバスに接続され、アドレス入力ポートがメモリアドレスバス33に接続されている。
【0040】
また、システムメモリ13には2本のロウアドレスストローブ信号線(RAS線:RAS0、RAS1)が接続されている。同様に、拡張メモリコネクタ21には別の2本のロウアドレスストローブ信号線(RAS線:RAS2、RAS3)が接続され、拡張メモリコネクタ22にも、別の2本のロウアドレスストローブ信号線(RAS線:RAS4、RAS5)が接続されている。
【0041】
さらに、システムメモリ13および増設メモリ41,42には、カラムアドレスストローブ信号線(CAS線)、および他の各種制御信号線(ライトイネーブル信号線WE、アウトプットイネーブル信号線OEなど)がそれぞれ共通接続されている。
【0042】
システムメモリ13および増設メモリ41,42内の全てのDRAMバンクは、CPU11のDRAM用メモリアドレス空間に配置される。このシステムにおいては、各RAS線のデコード条件の簡単化、およびインタリーブアーキチャを最大限有効利用するために、それらDRAMバンクはメモリサイズの大きなもの程若いアドレスの方に配置される。
【0043】
システムメモリ13および増設メモリ41,42のリード/ライトアクセス制御においては、RAS線(RAS0〜RAS5)の1つがアクティブ状態に設定され、そのアクティブ状態のRAS線に接続されたDRAMバンクがアクセス対象のDRAMバンクとして選択される。このようなRAS線の付勢制御は、システムコントローラ12のメモリ制御ロジックによって実行される。
【0044】
図2には、メモリ制御ロジックの構成が示されている。
【0045】
メモリ制御ロジック120は、DRAMのページモードアクセスおよびページインタリーブをサポートするハードウェアロジックであり、アドレス変換回路121、RASデコーダ122、ロウアドレス/カラムアドレスマルチプレクサ123、CAS発生回路124、タイミング制御回路125、およびページヒット判定回路126を有している。
【0046】
アドレス変換回路121は、CPUアドレス(A31:02)をDRAM論理アドレス(MA31:02)に変換する。この変換は、CPU11のメモリアドレス空間に分散配置されている複数のDRAMメモリエリアをDRAMアクセス専用の論理アドレス空間に連続的に割り付けるために行われる。このアドレス変換動作の一例を図3に示す。
【0047】
すなわち、図3(A)に示されているように、CPU11のメモリアドレス空間には、通常、システムメモリエリアやPMメモリエリアのようなDRAMエリアの他に、ビデオRAM、BIOS ROM、および各種オプションROMなどを配置するための予約領域(0A0000H〜0C0000H)が確保されている。アドレス変換回路121は、このようなCPUメモリマップに応じて、予約領域の直前および直後のDRAMエリアのアドレスが連続するようにアドレス変換を行う。
【0048】
また、BIOS ROMに格納されたVGA BIOSやシステムBIOSなどをDRAMにコピーして使用する場合には、図3(B)に示されているように、予約領域のVGA BIOSエリアおよびシステムBIOSエリアに割り当てられたCPUアドレスも、DRAM論理アドレスに変換される。さらに、システムマネージメントモード(SMM)を有するCPUの場合には、そのSMMの中でのみ使用されるSMRAMエリアに割り当てられたCPUアドレスもDRAM論理アドレスに変換される。
【0049】
このようなCPUアドレスからDRAM論理アドレスへの変換は、例えば16Kバイト単位で行われる。このため、DRAM論理アドレスの下位ビット部(MA13:02)は、アドレス変換後においても、CPUアドレスの下位ビット部(A13:02)と等しい。
【0050】
アドレス変換回路121によって得られたDRAM論理アドレス(MA31:02)は、システム内のDRAMバンクをアドレッシングするために使用される。
【0051】
RASデコーダ122は、その内部レジスタにセットされたRAS0〜RAS5それぞれのデコード条件に従ってDRAM論理アドレス(MA31:02)をデコードし、RAS0〜RAS5線の中でそのDRAM論理アドレスが満たすデコード条件を持つRAS線を選択してそれをアクティブにする。RAS線をアクティブにするタイミングなどは、タイミング制御回路125からのタイミング制御信号CONT1によって制御される。
【0052】
このRASデコーダ122のデコード動作は、各RAS線のデコード条件とDRAM論理アドレスとの一致/不一致を検出する事のみによって行うことができる。RAS0〜RAS5線それぞれのデコード条件がどのように決定されるかについては、図3以降で詳述する。
【0053】
ロウアドレス/カラムアドレスマルチプレクサ123は、DRAM論理アドレス(MA31:02)を、アクセス対象DRAMバンクをアドレッシングするためのロウアドレス(RA)とカラムアドレス(CA)に分解する。このロウアドレス/カラムアドレスマルチプレクサ123の内部レジスタには、各DRAMバンクのロウアドレス(RA)の開始ビット位置を示す制御パラメタが予めセットされている。ロウアドレス(RA)とカラムアドレス(CA)に分解する動作は、アクセス対象DRAMバンクに対応する制御パラメタに従って行われる。
【0054】
ロウアドレス(RA)およびカラムアドレス(CA)は、メモリバス33上に時分割的に出力される。この出力タイミングは、タイミング制御回路125からのタイミング制御信号CONT2によって制御される。
【0055】
CAS発生回路124は、タイミング制御回路125からのタイミング制御信号CONT3に従って、CAS線の付勢を制御する。
【0056】
タイミンク制御回路125は、前述のタイミング制御信号CONT1〜CONT3を発生することによって、RASデコーダ122、ロウアドレス/カラムアドレスマルチプレクサ123、およびCAS発生回路124の動作を制御する。タイミング制御信号の発生動作は、ページヒット判定回路126からのページヒット信号HITなどによって制御される。
【0057】
ページヒット判定回路126は、前回のDRAMアクセス時のCPUアドレスをページヒート判定用CPUアドレスとして保持しており、そのCPUアドレスと次回のDRAMアクセス時のCPUアドレスとを比較することによって、ページヒットの有無を判定する。ここで、ページヒットとは、次回のDRAMアクセスが前回と同一のDRAMバンク内の同一ページをアクセスすることをいう。ページヒットしたことが判定されると、このことがページヒット信号HITによって、タイミング制御回路125に通知される。
【0058】
このように、ページヒットの判定動作は、DRAM論理アドレスではなく、CPUアドレスの値に基づいて行われる。これにより、アドレス変換動作とページヒット判定動作とを並行して行うことが可能となる。ページヒット判定にCPUアドレスを利用することができるのは、CPUアドレスからDRAM論理アドレスへのアドレス変換の単位(16Kバイト)がDRAMバンクのページサイズ(最大4Kバイト程度)よりも大きな値に設定されているからである。
【0059】
ページヒットの判定には、CPUアドレス(A31:02)の中でカラムアドレスよりも上位のビット列が使用される。カラムアドレスのビット数、つまりページサイズはアクセス対象のDRAMバンク毎に異なる。このため、ページヒット判定回路126の内部レジスタにもページヒット判定に使用すべきビットをRAS線毎に指定する制御パラメタが予めセットされており、アクセス対象DRAMバンクに対応する制御パラメタに従ってページヒットの判定が行われる。
【0060】
このメモリ制御ロジック120によるDRAM制御タイミングは、次の3つの状態に対応したサイクルタイミングに分類される。
【0061】
(1)ページヒット
これは、次回のDRAMアクセスが前回と同一のDRAMバンク内の同一ページをアクセスすることをいう。この場合、DRAMバンクはページモードでアクセス制御される。すなわち、カラムアドレスおよびCAS線の付勢タイミングだけが制御され、RASデコーダ122によるRAS線の切り替えは行われない。また、前回のメモリサイクルが終了してもRAS線はアクティブ状態に維持され続ける。
【0062】
(2)バンクミス
これは、次回のDRAMアクセスが前回と異なるDRAMバンクをアクセスすることをいう。この場合、RASデコーダ122によるRAS線の切り替えが発生し、DRAMバンクは通常のDRAMアクセスサイクルでアクセスされる。また、ページヒット判定回路126に保持されているページヒット判定用CPUアドレスの更新が行われる。
【0063】
(3)ページミス
これは、次回のDRAMアクセスが前回と同一のDRAMバンク内の異なるページをアクセスすることをいう。この場合、RASデコーダ122によって前回と同一のRAS線が再びアクティブ状態に設定し直され、DRAMバンクは通常のDRAMアクセスサイクルでアクセスされる。また、ページヒット判定回路126に保持されているページヒット判定用CPUアドレスの更新が行われる。
【0064】
次に、図4乃至図6を参照して、RASデコーダ122に設定される各RAS線のデコード条件について説明する。
【0065】
図4には、システム内のDRAMメモリマップの一例が示されている。このDRAMメモリマップは、図1に示されているように、システムボード10上にシステムメモリ13として2個の2MバイトDRAMバンクが実装されており、拡張メモリコネクタ21の増設メモリ41が1個の8MバイトDRAMバンクから構成され、また拡張メモリコネクタ22の増設メモリ42が2個の4MバイトDRAMバンクから構成されている場合に対応するものである。
【0066】
この場合、これらDRAMバンクは、メモリサイズの大きいもの順、すなわち、図4のように、8MバイトDRAMバンク、2個の4MバイトDRAMバンク、2個の2MバイトDRAMバンクの順で、合計20MバイトのDRAM論理アドレス空間に配置される。
【0067】
このメモリ配置においては、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線にはアドレス範囲は割り当てられない。
【0068】
この時、RAS0〜RAS5線それぞれのデコード条件は、図5のように決定される。
【0069】
RAS0〜RAS5線それぞれのデコード条件としては、各RAS線に割り当てられたアドレス範囲に属する全てのDRAM論理アドレス値(MA31:02)にのみ共通に存在するビット列が使用される。
【0070】
すなわち、RAS2線のデコード条件は、DRAM論理アドレス値(MA31:02)の上位9ビット(MA31〜23)=“0000 0000 0”となる。DRAM論理アドレス値(MA31:02)の下位21ビットは、RAS2線に接続された8MバイトDRAMバンクのロウアドレスおよびカラムアドレスとして使用される。
【0071】
また、RAS4線のデコード条件は、DRAM論理アドレス値(MA31:02)の上位10ビット(MA31〜22)=“0000 0000 10”となる。DRAM論理アドレス値(MA31:02)の下位20ビットは、RAS4線に接続された4MバイトDRAMバンクのロウアドレスおよびカラムアドレスとして使用される。
【0072】
RAS5線のデコード条件は、DRAM論理アドレス値(MA31:02)の上位10ビット(MA31〜22)=“0000 0000 11”となる。DRAM論理アドレス値(MA31:02)の下位20ビットは、RAS5線に接続された4MバイトDRAMバンクのロウアドレスおよびカラムアドレスとして使用される。
【0073】
RAS0線のデコード条件は、DRAM論理アドレス値(MA31:02)の上位11ビット(MA31〜21)=“0000 0001 000”となる。DRAM論理アドレス値(MA31:02)の下位19ビットは、RAS0線に接続された2MバイトDRAMバンクのロウアドレスおよびカラムアドレスとして使用される。
【0074】
RAS1線のデコード条件は、DRAM論理アドレス値(MA31:02)の上位11ビット(MA31〜21)=“0000 0001 000”となる。DRAM論理アドレス値(MA31:02)の下位19ビットは、RAS0線に接続された2MバイトDRAMバンクのロウアドレスおよびカラムアドレスとして使用される。
【0075】
このように、各RAS線のデコード条件としては、各RAS線に対応するアドレス範囲に属する共通ビット列が使用される。このため、前述のRASデコーダ122は、DRAM論理アドレス値とデコード条件との一致/不一致をRAS線毎に検出するだけで済み、従来に比し、そのハードウェア構成を大幅に簡単化することが可能となる。
【0076】
次に、ページインタリーブアーキテクチャを採用する場合の各RAS線のデコード条件について説明する。
【0077】
ページインタリーブを行う場合には、図4のようにマッピングされた5つのDRAMバンクは、ページインタリーブ可能なバンクグループに分類される。各バンクグループは、メモリアドレス範囲が隣接し且つ合計メモリサイズが一致するバンクの組み合わせを含む。このようなグループピングは、DRAM論理アドレスの若い方から順番に行われる。
【0078】
すなわち、図4の例では、RAS2の8MバイトDRAMバンクのアドレス範囲(0〜8Mバイト)に後続するアドレス範囲に割り付けられた2個の4MバイトDRAMバンクの合計メモリサイズが8Mバイトとなるので、RAS2、RAS4、RAS5に対応する3つのバンクによって1つのページインタリーブグループが構成される。
【0079】
また、RAS0の2MバイトDRAMバンクのアドレス範囲(16〜8Mバイト)に後続するアドレス範囲にRAS1の2MバイトDRAMバンクが割り付けられているので、RAS0、RAS1に対応する2つのバンクによって別のページインタリーブグループが構成される。
【0080】
この場合、各RAS線のデコード条件は図5から図6のように変更される。
【0081】
すなわち、グループ1のRAS2,RAS4,RAS5それぞれのデコード条件としては、グループ1に割り当てられる合計16Mバイトのアドレス範囲(0〜16Mバイト)に属する全てのDRAM論理アドレス値(MA31:02)に共通に存在するビット列と、RAS2,RAS4,RAS5それぞれに対応するDRAMバンクのカラムアドレス(ページ内アドレス)とロウアドレス(ページアドレス)の間のビット列とが使用される。
【0082】
すなわち、図6のように、RAS2、RAS4、およびRAS5に割り当てられる合計16Mバイトのアドレス範囲においては、DRAM論理アドレス値(MA31:02)の上位8ビット(MA31〜24)=“0000 0000”が共通して存在し、これはグループ2には存在しない。したがって、(MA31〜24)=“0000 0000”は、RAS2、RAS4、およびRAS5の共通のデコード条件として使用される。
【0083】
RAS2については、DRAM論理アドレスにおけるロウアドレスの開始位置が1ビット左シフトされて、RAS2に対応する8MバイトDRAMバンクのロウアドレスとカラムアドレスとの間の1ビット(MA12)=“0”がデコード条件として加えられる。
【0084】
RAS4,RAS5それぞれについては、DRAM論理アドレスにおけるロウアドレスの開始位置が2ビット左シフトされて、それらに対応する4MバイトDRAMバンクそれぞれのロウアドレスとカラムアドレスの間の2ビット(MA13,12)の値がアドレス条件として加えられる。2ビット使用されるのは、RAS4,RAS5それぞれのメモリサイズが、RAS2のメモリサイズの半分だからである。
【0085】
すなわち、RAS4については、そのRAS4に対応する4MバイトDRAMバンクのロウアドレスとカラムアドレスの間の2ビット(MA13,12)=“01”がデコード条件として加えられ、RAS5については、そのRAS5に対応する4MバイトDRAMバンクのロウアドレスとカラムアドレスの間の2ビット(MA13,12)=“11”がアドレス条件として加えられる。
【0086】
このように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,……)が割り当てられる。
【0087】
したがって、0〜16Mバイトの範囲で連続アクセスが行われる時には、RAS2、RAS4、RAS2、RAS5、RAS2、……という順番で、3つのDRAMバンクがページ単位で交互にアクセスされる。
【0088】
一方、グループ2のRAS0,RAS1それぞれのデコード条件は、次のようになる。
【0089】
すなわち、RAS0,RAS1それぞれのデコード条件としては、グループ2に割り当てられる合計4Mバイトのアドレス範囲(16〜20Mバイト)に属する全てのDRAM論理アドレス値(MA31:02)に共通に存在するビット列と、RAS0,RAS1それぞれに対応するDRAMバンクのカラムアドレスとロウアドレスの間のビット列とが使用される。
【0090】
RAS0、RAS1に割り当てられる合計4Mバイトのアドレス範囲においては、DRAM論理アドレス値(MA31:02)の上位10ビット(MA31〜22)=“0000 0001 00”が共通して存在し、これはグループ1には存在しない。したがって、(MA31〜22)=“0000 0001 00”は、RAS0、RAS1の共通のデコード条件として使用される。
【0091】
また、RAS0については、DRAM論理アドレスにおけるロウアドレスの開始位置が1ビット左シフトされて、RAS0に対応する2MバイトDRAMバンクのロウアドレスとカラムアドレスとの間の1ビット(MA11)=“0”がデコード条件として加えられる。
【0092】
RAS1についても、DRAM論理アドレスにおけるロウアドレスの開始位置が1ビット左シフトされて、それに対応する2MバイトDRAMバンクのロウアドレスとカラムアドレスの間の1ビット(MA11)=“1”がデコード条件として加えられる。
【0093】
このように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バンクがページ単位で交互にアクセスされる。
【0094】
このように、ページインタリーブは、インタリーブグループのアドレス範囲に共通に存在するビット列と、ロウアドレスとカラムアドレスとの間の所定ビット列とに基づいて各RASのデコード条件を決定し、それをRASデコーダ122に設定するだけで実現する事ができる。
【0095】
RASデコーダ122へのデコード条件の設定などのメモリ制御ロジック120に対する初期設定処理は、BIOS ROM14のIRTルーチンによって実行される。
【0096】
図7には、IRTルーチンによって実行されるメモリ制御ロジック120に対する初期設定動作の手順が示されている。
【0097】
システムがパワーオンされると、IRTルーチンは、まず、各DRAMバンクのメモリタイプ(カラムアドレスおよびロウアドレスそれぞれのビット幅)を調べ、そのメモリバンクタイプにしたがってメモリサイズを検出する(ステップS11)。カラムアドレスとロウアドレスそれぞれのビット幅は、テスト対象DRAMバンクのある特定のメモリ番地に対するライト・リード・コンペアテストを実行することによって検出できる。
【0098】
このステップS11で行われるメモリサイズ検出処理動作の詳細については、図8以降で後述する。
【0099】
次に、IRTルーチンは、システム内のDRAMバンクのメモリ再配置を行う(ステップS12)。このメモリ再配置では、図4で説明したように、メモリサイズの大きいDRAMバンクから順にメモリアドレス空間の若い方に配置され、その配置に従って各DRAMバンクに割り当てるべきアドレス範囲が決定される。
【0100】
次いで、IRTルーチンは、図5で説明したように、DRAMバンクそれぞれに割り当てられたアドレス範囲毎にその範囲に属するDRAM論理アドレス値にのみ共通に存在するビット列を検出し、その共通ビット列をRAS線それぞれのデコード条件として決定する(ステップS13)。
【0101】
ページインタリーブアーキテクチャを用いない場合には、IRTルーチンは、ステップS13で決定した各RAS線のデコード条件を、そのままRASデコーダ122の内部レジスタにセットする(ステップS17)。次いで、IRTルーチンは、ロウアドレス/カラムアドレスマルチプレクサ123の内部レジスタにロウアドレス開始位置をRAS線毎に指定する制御パラメタをセットし、またページヒット判定回路126の内部レジスタにペ−ジヒット判定に使用するCPUアドレスの位置をRAS線毎に指定する制御パラメタをセットする(ステップS18)。これら制御パラメタの値は、それぞれステップS11で検出されたメモリバンクタイプに従って決定される。
【0102】
一方、ページインタリーブアーキテクチャを採用する場合には、IRTルーチンは、ステップS12でメモリサイズ順に配置したDRAMマップに従って、ページインタリーブ可能なグループを決定する(ステップS15)。次いで、IRTルーチンは、ページインタリーブグループのアドレス範囲に共通に存在するビット列と、ロウアドレスとカラムアドレスとの間の所定ビット列とに基づいて各RASのデコード条件を変更する(ステップS16)。
【0103】
この後、IRTルーチンは、ステップS16で決定した各RAS線のデコード条件を、RASデコーダ122の内部レジスタにセットする(ステップS17)。次いで、IRTルーチンは、ロウアドレス/カラムアドレスマルチプレクサ123の内部レジスタにロウアドレス開始位置をRAS線毎に指定する制御パラメタをセットし、またページヒット判定回路126の内部レジスタにペ−ジヒット判定に使用するCPUアドレスの位置をRAS線毎に指定する制御パラメタをセットする(ステップS18)。ロウアドレス開始位置は、ステップS11で検出されたメモリバンクタイプと、ページインターリーブのためのデコード条件として使用したロウアドレスとカラムアドレス間のビット数とに基づいて決定される。また、ペ−ジヒット判定に使用するCPUアドレスの位置については、ステップS11で検出されたメモリバンクタイプに従って決定される。
【0104】
次に、図8乃至図12を参照して、DRAMバンクのメモリサイズ検出処理の原理を説明する。
【0105】
まず、図8を参照して、1本のRASでアクセス制御可能なDRAMバンクの種類について説明する。DRAMバンクは、図示のように、タイプ1〜タイプ4の4つのバンクに大別される。
【0106】
タイプ1のDRAMバンクは、2Mバイトのメモリサイズを有する。このタイプ1のDRAMバンクは、512K(1K行×512列)×8ビット構成の4MビットDRAMチップを4個含んでおり、ロウアドレスのビット幅は10ビット、カラムアドレスのビット幅は9ビットである。
【0107】
タイプ2のDRAMバンクは、4Mバイトのメモリサイズを有する。このタイプ2のDRAMバンクは、1M(1K行×1K列)×4ビット構成の4MビットDRAMチップを8個含んでおり、ロウアドレスのビット幅は10ビット、カラムアドレスのビット幅は10ビットである。
【0108】
タイプ3のDRAMバンクは、8Mバイトのメモリサイズを有する。このタイプ3のDRAMバンクは、2M(2K行×1K列)×8ビット構成の16MビットDRAMチップを4個含んでおり、ロウアドレスのビット幅は11ビット、カラムアドレスのビット幅は10ビットである。
【0109】
タイプ4のDRAMバンクは、16Mバイトのメモリサイズを有する。このタイプ4のDRAMバンクは、4M(2K行×2K列)×4ビット構成の16MビットDRAMチップを8個含んでおり、ロウアドレスのビット幅は11ビット、カラムアドレスのビット幅は11ビットである。
【0110】
図9、図10、および図11には、それぞれ図1のシステムメモリ13、増設メモリ41、および増設メモリ42のメモリ構成が示されている。
【0111】
システムメモリ13がタイプ1の2個の2MバイトDRAMバンクによって構成されている場合には、図9に示されているように、一方の2MバイトDRAMバンクの4つのDRAMチップはRAS0線およびCAS線に共通接続され、他方の2MバイトDRAMバンクの4つのDRAMチップはRAS1線、およびCAS線に共通接続される。また、これら2つの2MバイトDRAMバンク内の全てのチップは、メモリアドレスバス33、およびデータバス322の双方に並列接続される。
【0112】
これら2つの2MバイトDRAMバンクのどちらがアドレス指定されるかは、RAS0とRAS1のどちらが付勢されるかによって決定される。
【0113】
RAS0線が付勢された場合には、その時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットがロウアドレスとしてそのRAS0線に接続されている4つのチップにそれぞれ取り込まれる。この後、RAS0線に接続されている4つのチップは、CAS線が付勢された時にメモリアドレスバス33上に出力されているアドレス値の下位9ビットをカラムアドレスとして取り込む。これら10ビットのロウアドレスおよび9ビットのカラムアドレスによってRAS0線に接続されている4つのチップそれぞれの同一番地が同時にアドレス指定され、1チップ当たり8ビットの合計32ビット単位でRAS0線に対応するDRAMバンクがリード/ライトアクセスされる。
【0114】
同様に、RAS1線が付勢された場合には、その時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットのロウアドレスがそのRAS1線に接続されている4つのチップにそれぞれ取り込まれる。この後、RAS1線に接続されている4つのチップは、CAS線が付勢された時にメモリアドレスバス33上に出力されているアドレス値の下位9ビットのカラムアドレスを取り込む。これら10ビットのロウアドレスおよび9ビットのカラムアドレスによって、RAS1線に接続されている4つのチップそれぞれの同一記憶位置が同時にアドレス指定され、1チップ当たり8ビットの合計32ビット単位でRAS1線に対応するDRAMバンクがリード/ライトアクセスされる。
【0115】
増設メモリ41がタイプ3の1個の8MバイトDRAMバンクによって構成されている場合には、図10に示されているように、その8MバイトDRAMバンクの4つのDRAMチップはRAS2線およびCAS線に共通接続される。また、8MバイトDRAMバンク内の全てのチップは、メモリアドレスバス33、およびデータバス322の双方に並列接続される。
【0116】
RAS2線が付勢された場合には、その時にメモリアドレスバス33上に出力されているアドレス値の下位11ビットがロウアドレスとしてそのRAS2線に接続されている4つのチップにそれぞれ取り込まれる。この後、RAS2線に接続されている4つのチップは、CAS線が付勢された時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットをカラムアドレスとして取り込む。これら11ビットのロウアドレスと10ビットのカラムアドレスとによって、RAS0線に接続されている4つのチップそれぞれの対応する記憶位置が同時にアドレス指定され、1チップ当たり8ビットの合計32ビット単位で、RAS2線に対応するDRAMバンクがリード/ライトアクセスされる。
【0117】
増設メモリ42がタイプ2の2個の4MバイトDRAMバンクによって構成されている場合には、図11に示されているように、一方の4MバイトDRAMバンクの8つのDRAMチップはRAS4線およびCAS線に共通接続され、他方の4MバイトDRAMバンクの8つのDRAMチップはRAS5線およびCAS線に共通接続される。また、これら4MバイトDRAMバンク内の全てのチップは、メモリアドレスバス33、およびデータバス322の双方に並列接続される。
【0118】
これら2つの4MバイトDRAMバンクのどちらがアドレス指定されるかは、RAS4とRAS5のどちらが付勢されるかによって決定される。
【0119】
RAS4線が付勢された場合には、その時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットがロウアドレスとしてそのRAS4線に接続されている8つのチップにそれぞれ取り込まれる。この後、RAS4線に接続されている8つのチップは、CAS線が付勢された時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットをカラムアドレスとして取り込む。これら10ビットのロウアドレスおよび10ビットのカラムアドレスによって、RAS4線に接続されている8つのチップそれぞれの同一の記憶位置が同時にアドレス指定され、1チップ当たり4ビットの合計32ビット単位でRAS4線に対応するDRAMバンクがリード/ライトアクセスされる。
【0120】
同様に、RAS5線が付勢された場合には、その時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットがロウアドレスとしてそのRAS5線に接続されている8つのチップにそれぞれ取り込まれる。この後、RAS5線に接続されている8つのチップは、CAS線が付勢された時にメモリアドレスバス33上に出力されているアドレス値の下位10ビットをカラムアドレスとして取り込む。これら10ビットのロウアドレスおよび10ビットのカラムアドレスとによって、RAS5線に接続されている8つのチップそれぞれの同一記憶位置が同時にアドレス指定され、1チップ当たり4ビットの合計32ビット単位でRAS5線に対応するDRAMバンクがリード/ライトアクセスされる。
【0121】
このように、DRAMバンクのタイプ毎に、ロウアドレスとして使用されるビット数とカラムアドレスとして使用されるビット数との関係が異なっている。各RAS線に接続されたDRAMバンクのメモリサイズは、ロウアドレスおよびカラムアドレスとして使用されるビット数の違いを利用して検出される。
【0122】
以下、図12のフローチャートを参照して、IRTルーチンのステップS11で実行されるメモリサイズ検出処理の手順を説明する。
【0123】
IRTルーチンは、RAS0、RAS1、RAS2、…の順で、RAS線に接続されたDRAMバンクのメモリサイズ検出処理を行う。IRTルーチンは、まず、検査対象のRAS線の付勢だけが許可されるように、RASデコーダ122に所定のデコード条件をセットする(ステップS21)。この場合、検査対象RAS線のデコード条件としては、メモリサイズ検出のために行われる何回かのメモリアクセスで使用されるメモリアドレス値に共通のビット列が使用される。また、検査対象RAS線を除くの他の全てのRAS線については、メモリサイズ検出のために行われる何回かのメモリアクセスでそれらRAS線が付勢されないように、検査対象RAS線とは異なる所定のビット列がそれぞれのデコード条件として設定される。
【0124】
次いで、IRTルーチンは、タイプ1〜タイプ4のDRAMバンクの中で最もカラムアドレスのビット数が大きいタイプ4のDRAMバンク(カラムアドレスCA=11ビット、ロウアドレスRA=11ビット)が検査対象RAS線に接続されていると想定し、そのDRAMバンクに対してライト・リード・コンペアテストを行う(ステップS22)。この場合、ロウアドレス/カラムアドレスマルチプレクサ123には、タイプ4のDRAMバンクに対応する制御パラメタがセットされる。ライト・リード・コンペアテストでは、ライトアドレス00001000H(Hは16進表示を示す)のライトアクセスと、リードアドレス00000000Hのリードアクセスとが行われ、その時のライトデータとリードデータの一致の有無が調べられる(ステップS23)。
【0125】
もし、検査対象RAS線に実際に接続されているDRAMバンクが想定した通りのタイプ4のDRAMバンクであれば、アドレス00001000Hに正常にデータを書き込むことができるので、ライトデータとリードデータの値は不一致となる。一方、検査対象RAS線に実際に接続されているDRAMバンクがそのカラムアドレス数が10ビット以下のタイプ1、タイプ2、またはタイプ3のバンクであった場合には、ライトデータとリードデータの値は一致する。これは、次の理由による。
【0126】
すなわち、ステップ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のリードアクセスで読み出されたリードデータがライトデータと一致する。
【0127】
したがって、ステップS23でライトデータとリードデータの不一致が検出された時は、検査対象RAS線に接続されているDRAMバンクは想定した通りのタイプ4のDRAMバンク(CA=11ビット、RA=11ビット、メモリサイズ=16Mバイト)であると判定され(ステップS24)、一方、ライトデータとリードデータの一致が検出された場合には、検査対象RAS線に接続されているDRAMバンクはカラムアドレスビット数が10ビット以下の他のタイプ(タイプ1、タイプ2、またはタイプ3)のDRAMバンクであると判定される。この場合には、次のようなステップS25以降の処理が行われる。
【0128】
すなわち、IRTルーチンは、今度は、タイプ4の次にカラムアドレスビット数が大きいタイプ3(またはタイプ2)のメモリ構成(カラムアドレスCA=10ビット、ロウアドレスRA=11ビット)が検査対象RAS線に接続されていると想定して、そのDRAMバンクに対してライト・リード・コンペアテストを行う(ステップS25)。このライト・リード・コンペアテストでは、ライトアドレス00000800Hのライトアクセスと、リードアドレス00000000Hのリードアクセスとが行われ、その時のライトデータとリードデータの一致の有無が調べられる(ステップS26)。
【0129】
もし、検査対象RAS線に実際に接続されているDRAMバンクがそのカラムアドレス数が9ビット以下のタイプ1のDRAMバンクであった場合には、前述と同様にカラムアドレスの最上位ビット“1”が無視されるため、そのタイプ1のDRAMバンクのアドレス00000000Hで指定される番地にデータが書き込まれる。この結果、ライトデータとリードデータの値は一致する。したがって、ライトデータとリードデータの一致が検出された場合には、検査対象RAS線に接続されているDRAMバンクがタイプ1のDRAMバンク(CA=9ビット、RA=10ビット、メモリサイズ=2Mバイト)であると判定される(ステップS27)。
【0130】
一方、査対象RAS線に実際に接続されているDRAMバンクが想定した通りの10ビットのカラムアドレスビット数を持つタイプ2またはタイプ3のDRAMバンクであれば、アドレス00010000Hに正常にデータを書き込むことができるので、ライトデータとリードデータの値は不一致となる。したがって、ライトデータとリードデータの不一致が検出された場合には、タイプ2またはタイプ3のどちらのDRAMバンクが接続されているかを検出するために、次のようなステップS28以降の処理が行われる。
【0131】
すなわち、IRTルーチンは、今度は、それらDRAMバンクの中でロウアドレスビット数が大きいタイプ3のDRAMバンク(カラムアドレスCA=10ビット、ロウアドレスRA=11ビット)が接続されていると想定して、そのDRAMバンクに対してライト・リード・コンペアテストを行う(ステップS28)。
【0132】
このライト・リード・コンペアテストでは、ライトアドレス00400000Hのライトアクセスと、リードアドレス00000000Hのリードアクセスとが行われ、その時のライトデータとリードデータの一致の有無が調べられる(ステップS29)。
【0133】
もし、検査対象RAS線に実際に接続されているDRAMバンクが想定した通りのタイプ3のDRAMバンクであれば、アドレス00400000Hに正常にデータを書き込むことができるので、ライトデータとリードデータの値は不一致となる。一方、検査対象RAS線に実際に接続されているDRAMバンクがそのロウアドレス数が10ビットのタイプ2のバンクであった場合には、ライトデータとリードデータの値は一致する。これは、次の理由による。
【0134】
すなわち、ステップ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のリードアクセスで読み出されたリードデータがライトデータと一致する。
【0135】
したがって、ステップS29でライトデータとリードデータの不一致が検出された時は、検査対象RAS線に接続されているDRAMバンクは想定した通りのタイプ3のDRAMバンク(CA=10ビット、RA=11ビット、メモリサイズ=8Mバイト)であると判定され(ステップS30)、一方、ライトデータとリードデータの一致が検出された場合には、検査対象RAS線に接続されているDRAMバンクはロウアドレスビット数が10ビットのタイプ2のDRAMバンク(CA=10ビット、RA=10ビット、メモリサイズ=4Mバイト)であると判定される(ステップS31)。
【0136】
次に、図2で説明したRASデコーダ122、ロウアドレス/カラムアドレスマルチプレクサ123、およびページヒット判定回路126それぞれの具体的な回路構成について説明する。
【0137】
図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ビットだけがデコードに使用される。
【0138】
RASデコード回路51〜56はどれも同じ回路構成であるので、ここでは、RASデコード回路51の回路構成を代表して説明する。
【0139】
RASデコード回路51は、RASセットレジスタ61、RASマスクレジスタ62、9個の一致/不一致検出回路71〜79、9個のマスク回路71〜79、およびAND回路91から構成されている。
【0140】
RASセットレジスタ61は、CPU11によってリード/ライト可能なI/Oレジスタであり、ここにはRAS0線のデコード条件を示すビット列がセットされる。例えば、RAS0線のデコード条件が図5のように決定された場合には、“00100X XX1”がRAS0線のデコード条件としてRASセットレジスタ61にセットされる。ここで、Xはデコード条件に関係しない不定のビット値(Don´t Care)を意味する。
【0141】
RASマスクレジスタ62は、CPU11によってリード/ライト可能なI/Oレジスタであり、ここにはRAS0線のデコード条件とDRAM論理アドレスとの一致/不一致の判定結果をビット毎にマスクするか、しないかを指定するマスクデータ(“0”=マスクする、“1”=マスクしない)がセットされる。ここで、マスクするというのは、デコード条件のビット列の対応する1ビットの判定結果に関係なく、そのビットの判定結果を常に一致したことにすることを意味する。したがって、RASセットレジスタ61に前述のようにデコード条件として“00100X XX1”がセットされた場合には、RASマスクレジスタ62には、マスクデータ“111110 001”がセットされる。これにより、デコード条件の“00100X XX1”の内の“X”のビットをデコード条件から除外することができる。
【0142】
一致/不一致検出回路71〜79は、それぞれDRAM論理アドレスとデコード条件の対応するビット同士の一致/不一致を検出する。これら一致/不一致検出回路71〜79の各々は、排他的論理和ゲートから実現する事ができる。9個のマスク回路71〜79は、それぞれ対応する一致/不一致検出回路71〜79の検出結果出力をマスクする。
【0143】
このように、RASデコーダ122は、1本のRAS線当たり9ビットのデータサイズに相当するデータの一致/不一致を行うためのロジックだけで実現する事ができる。
【0144】
次に、図14を参照して、ロウアドレス/カラムアドレスマルチプレクサ123の具体的な回路構成について説明する。
【0145】
ロウアドレス/カラムアドレスマルチプレクサ123は、図示のように、レジスタファイル201、パターンデコーダ202、ロウアドレスセレクタ203、ロウアドレス開始位置切り替え回路204〜207、およびロウアドレス/カラムアドレスセレクタ208から構成されている。
【0146】
レジスタファイル201は、CPU11によってリード/ライト可能なI/Oレジスタ群であり、ここにはRAS0〜RAS5線それぞれに対応する6つの制御パラメタがセットされる。各制御パラメタは、対応するRAS線に接続されたDRAMバンクのロウアドレス開始位置、つまりDRAM論理アドレスのどのbitをロウアドレスのLSBにするかを指定する。
【0147】
ロウアドレス開始位置として使用される可能性があるのは、サポートするDRAMの種類、およびページインタリーブの条件から、DRAM論理アドレスのMA11,MA12,MA13,MA14の4ビットである。各制御パラメタは、これら4種類のロウアドレス開始位置のいずれか1つを指定する4ビットデータから構成される。制御パラメタ“0001”はMA11を指定し、“0010”はMA12、“0011”はMA13、“0100”はMA14を指定する。
【0148】
レジスタファイル201にセットされている6つの制御パラメタの1つは、パターンデコーダ202に読み出される。どの制御パラメタが読み出されるかは、RASデコータ122のデコード結果出力によって決定される。例えば、RASデコータ122によってRAS0線が付勢される時は、RAS0線に対応する制御パラメタがレジスタファイル201から読み出される。
【0149】
パターンデコーダ202は、レジスタファイル201から読み出された制御パラメタをデコードし、そのデコード結果に従って、セレクタ203に4種類のロウアドレスの1つを選択させるための選択信号を発生する。
【0150】
ロウアドレス開始位置切り替え回路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)をロウアドレスとして取り出す。
【0151】
これらロウアドレス開始位置切り替え回路204〜207は、例えばバレルシフタなどによって構成されている。
【0152】
ロウアドレスセレクタ203は、パターンデコーダ202からの選択信号に従って、ロウアドレス開始位置切り替え回路204〜207から出力される4種類のロウアドレスの1つを選択して出力する。ロウアドレスセレクタ203によって選択されたロウアドレスは、ロウアドレス/カラムアドレスセレクタ208に供給される。また、このロウアドレス/カラムアドレスセレクタ208には、カラムアドレスも供給される。このカラムアドレスとしては、DRAM論理アドレスの下位11ビット(MA12,……MA02)が常に使用される。
【0153】
ロウアドレス/カラムアドレスセレクタ208は、図2のタイミング制御回路125からの制御信号によって指定されるタイミングで、ロウアドレスとカラムアドレスを選択的にメモリアドレスバス33上に出力する。
【0154】
このロウアドレス/カラムアドレスマルチプレクサ123においては、RASデコーダ122のデコード動作と並行して、ロウアドレス開始位置切り替え回路204〜207それぞれによるロウアドレス切り出し動作が行われる。RASデコーダ122のデコード結果が確定すると、その確定されたデコード結果によって指定される付勢対象のRAS線に対応した1つの制御パラメタがレジスタファイル201から読み出され、それがパターンデコーダ202に送られる。そして、そのパターンデコーダ202によるデコード動作、およびロウアドレスセレクタ203のロウアドレス選択動作が制御パラメタに従って実行され、これによってDRAMアクセスに使用すべきロウアドレスが確定される。
【0155】
なお、ここでは、ロウアドレス開始位置切り替え回路204〜207およびロウアドレスセレクタ203によってロウアドレス(RA10:0)の11ビット全てをRAS線に応じて切り替えるように説明したが、実際は、全部のロウアドレスのビットを切り替える必要はない。
【0156】
すなわち、ロウアドレス開始位置がMA11,MA12,MA13,MA14のいずれの場合においても、MA14〜MA19の6ビットは共通に使用されるので、それらビットについては切り替え対象から除外する事ができる。この場合のCPUアドレスとロウアドレスとの対応関係の一例を図15に示す。
【0157】
図15においては、ロウアドレスの下位3ビット(RA2〜RA0)と上位2ビット(RA10,RA9)のみが切り替えの対象となっている。このようにすれば、CPUアドレスのMA14〜MA19の6ビットをロウアドレスの中位6ビット(RA8〜RA3)としてロウアドレス/カラムアドレスセレクタ208に直接送ることができるので、ロウアドレス開始位置切り替え回路204〜207およびロウアドレスセレクタ203はそれぞれ切り替え対象の5ビット分のハードウェア構成だけで実現できる。
【0158】
このように、図14のロウアドレス/カラムアドレスマルチプレクサ123の回路構成は、必要とする回路数を非常に少なくすることができる。しかし、RASデコーダ122のデコード結果が確定されてからDRAMアクセスに使用すべきロウアドレスが確定されるまでには、3つの回路ブロックの動作(レジスタファイル201から使用する制御パラメタを選択して読み出す動作、パターンデコーダによるデコード動作、およびロウアドレスセレクタ203によるロウアドレス選択動作)を順次行う必要がある。このため、ロウアドレス/カラムアドレスマルチプレクサ123内で比較的大きなディレイが生じるという問題がある。
【0159】
図16には、ロウアドレス/カラムアドレスマルチプレクサ123の第2の回路構成例が示されている。この図16の構成は、ロウアドレス/カラムアドレスマルチプレクサ123内でのディレイを少なくするための改良が次のように成されている。
【0160】
すなわち、この図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のロウアドレス選択動作を制御する。
【0161】
また、それらロウアドレスセレクタ203−1〜203−6の次段には、それらロウアドレスセレクタ203−1〜203−6によって得られた6種類のロウアドレス(RAS0ロウアドレス〜RAS5ロウアドレス)の1つをRASデコーダ122のデコード結果に応じて選択するロウアドレスセレクタ209が設けられている。
【0162】
この回路構成においては、RASデコーダ122のデコード動作と並行して、ロウアドレス開始位置切り替え回路204〜207それぞれによるロウアドレス切り出し動作と、パターンデコーダ202−1〜202−6およびロウアドレスセレクタ203−1〜203−6によるロウアドレス選択動作とが行われる。これにより、RASデコーダ122のデコード結果の確定を待たずに、RAS0〜RAS5線にそれぞれ対応した6種類のロウアドレス(RAS0ロウアドレス〜RAS5ロウアドレス)を生成することができる。
【0163】
RASデコーダ122のデコード結果が確定すると、その確定されたデコード結果によって指定される付勢対象のRAS線に対応したロウアドレスがロウアドレスセレクタ209によって選択される。
【0164】
したがって、RASデコーダ122のデコード結果が確定されてからDRAMアクセスに使用すべきロウアドレスが確定されるまでに必要となる回路動作は、最終段のアドレスセレクタ209によるアドレス選択動作だけとなり、内部ディレイが大幅に低減される。
【0165】
なお、この図16の構成に於いても、図14の場合と同様に、全部のロウアドレスのビットを切り替える必要はない。
【0166】
図17には、図2のページヒット判定回路126の具体的な回路構成が示されている。
【0167】
このページヒット判定回路126には、図示のように、レジスタファイル301、ページヒット判定用CPUアドレスレジスタ302、一致判定回路303、マスク回路304、および一致判定マスク位置レジスタ305が設けられている。
【0168】
レジスタファイル301は、CPU11よってリード/ライト可能なI/Oレジスタであり、ここにはページヒット判定のために使用されるCPUアドレスとの一致条件をマスクするか、しないかを指定するマスクデータ(“0”=マスクする、“1”=マスクしない)がRAS0〜RAS5線それぞれに対応する制御パラメタとしてセットされる。
【0169】
すなわち、ページヒット判定では、CPUアドレス(A31:02)の中で、ページ内アドレスを除外した残りのアドレス、つまり、カラムアドレスに相当する部分を除いた、ロウアドレス(ページアドレス)およびRASデコード用アドレスが対象となる。カラムアドレスに相当する部分はページヒット判定に関与しないので、そのカラムアドレスとして使用されているビットそれぞれについての判定結果はマスクデータによってマスクする必要がある。ここで、マスクするというのは、該当するビットの判定結果を常に一致したことにすることを意味する。
【0170】
実際には、各RAS線に対応するマスクデータは、カラムアドレスの全ビットではなく、A12,A11,A10についてそれぞれマスクするか、しないかを示す3ビットデータから構成されている。これは、一致判定回路303が、DRAMバンクの種類と関係なく常にカラムアドレスとして使用されるA10よりも下位のビットについては一致判定から除外し、A10以降の上位のビットだけを一致判定の対象とするように構成されており、また、A12,A11,A10の3ビットそれぞれは、DRAMバンクの種類によってカラムアドレスの一部として使用されるか否かが異なるからである。
【0171】
例えば、RAS0線にタイプ1のDRAMバンク(カラムアドレスビット数=9ビット)が接続されている場合には、A12,A11,A10の3ビットの中でA10だけがカラムアドレスの一部として使用される。この時は、RAS0線に対応するマスクデータ“110”がレジスタファイル301にセットされる。
【0172】
レジスタファイル301にセットされている6つのマスクデータのうちの1つは、レジスタファイル301から読み出されて一致判定マスク位置レジスタ305にセットされる。どのマスクデータが読み出されるかは、RASデコータ122のデコード結果出力によって決定される。例えば、RASデコータ122によってRAS0線が付勢される時は、RAS0線に対応するマスクデータがレジスタファイル301から読み出される。
【0173】
ページヒット判定用CPUアドレスレジスタ302には、前回のメモリアクセス時のCPUアドレス(A31:02)の内のA26〜A11の17ビットがページヒット判定用CPUアドレスとして保持される。このページヒット判定用CPUアドレスレジスタ302の内容は、ページヒットせず、バンクミスまたはページミスが発生した時に、その時のメモリアクセスで使用されているCPUアドレス(A31:02)に従って更新される。すなわち、バンクミスまたはページミスが発生すると、タイミング制御回路125からレジスタ更新信号が発生される。このレジスタ更新信号に応答して、その時にCPUアドレスバス上に出力されているCPUアドレス(A26〜A11)がページヒット判定用CPUアドレスレジスタ302にラッチされる。これによって、ページヒット判定用CPUアドレスレジスタ302の内容は、バンクミスまたはページミスが発生したメモリサイクル時のCPUアドレスに変更される。
【0174】
一致判定回路303は、今回のメモリアクセス時のCPUアドレス(A26〜A11)とページヒット判定用CPUアドレスレジスタ302に保持されているCPUアドレス(A26〜A11)との一致/不一致をビット毎に検出し、A26〜A11それぞれの検出結果を示す17ビットデータを出力する。
【0175】
マスク回路304は、A26〜A11それぞれの検出結果の内のA12,A11,A10の検出結果出力を、一致判定マスク位置レジスタ305のマスクデータに従ってマスクし、マスク後の検出結果出力が全て一致を示す時にページヒット信号HITを発生する。
【0176】
一致判定マスク位置レジスタ305には、付勢対象のRAS線に対応するマスクデータがセットされる。この一致判定マスク位置レジスタ305の内容は、ページヒットせず、バンクミスまたはページミスが発生した時に、その時にRASデコーダ122によって付勢されるRAS線に対応するマスクデータに更新される。すなわち、バンクミスまたはページミスが発生すると、タイミング制御回路125からレジスタ更新信号が発生される。このレジスタ更新信号に応答して、その時にRASデコーダ122によって選択されているレジスタファイル301内のマスクデータが一致判定マスク位置レジスタ305にラッチされる。これによって、一致判定マスク位置レジスタ305の内容は、バンクミスまたはページミスが発生したメモリサイクル時に付勢されるRAS線に対応したマスクデータに変更される。
【0177】
以上のように、この実施例のシステムにおいては、複数のDRAMバンクそれぞれのメモリサイズがリード・ライト・コンペアテストによって検出され、それらDRAMバンクの物理的な装着位置とは関係なく、メモリサイズの大小関係に従ってそれらDRAMバンクのメモリアドレス空間への配置順が決定される。したがって、どのようなタイプの増設メモリがどのような順番で装着されたとしても、最適なメモリ配置に自動的に再設定し直され、システム内のDRAMバンクは常にそのメモリサイズの大きいもの順にDRAM論理アドレス空間の若い方から配置される。
【0178】
このようなメモリ配置下においては、RASデコーダ122はCPUからのメモリアドレス値とデコード条件との一致/不一致をRAS毎に検出するだけで済む。よって、従来に比し、RASデコーダ122のハードウェア構成を大幅に簡単化できるので、RASデコーダ内のディレイが小さくなり、メモリアクセス速度の高速化を実現できる。また、この構成においては、2つの異なるRAS線のデコード条件を同一値に設定すれば2つのRAS線を同時に付勢できめので、アクセスデータ幅を2倍に切り替えるといった応用も可能となる。
【0179】
なお、ページ内アドレスの一部をデコード条件として使用すれば、ワードインタリーブを実現することもできる。
【0180】
【発明の効果】
以上説明したように、この発明によれば、システム内のDRAMバンクをそれらのメモリサイズに応じてメモリアドレス空間に最適配置することによってRASデコーダのデコード条件の簡単化を図ることが可能となる。このため、RASデコーダは、CPUからのメモリアドレス値とデコード条件との一致/不一致をRAS線毎に検出するだけの構成で済み、従来に比し、そのハードウェア構成を大幅に簡単化できる。
【0181】
また、このようなRASデコーダの構成を採用すると、そのRASデコーダに設定するデコード条件を替えるだけで容易にページインタリーブアーキテクチャを実現することが可能となる。
【0182】
よって、RASデコーダの簡単化、およびインタリーブアーキテクチャの有効利用を図ることができ、メモリアクセス速度の高速化を実現できる。
【図面の簡単な説明】
【図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のメモリ制御ロジックに含まれるページヒット判定回路の具体的構成の一例を示す回路図。
【符号の説明】
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]
[Industrial applications]
The present invention relates to a computer system such as a personal computer, and more particularly to a computer system including an improved memory control logic for efficiently accessing a plurality of DRAM banks.
[0002]
[Prior art]
In recent years, various notebook-type or laptop-type portable personal computers which are easy to carry and can be 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 having a large-scale cache is being used as a CPU.
[0003]
When a microprocessor with a built-in cache is used as the 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, it is essential to increase the execution speed of the memory read / memory write cycle by the CPU in order to improve the system performance.
[0005]
Generally, a dynamic RAM (DRAM) memory is used as a main memory of a personal computer. The DRAM has a feature that the access speed is slow, while the cost is lower than that of the static RAM (SRAM). In order to solve this problem, recently, 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 interleave control and the like have been advanced.
[0006]
However, when constructing a memory architecture in a personal computer, it is necessary to consider not only the control of the internal memory mounted on the system board as standard, but also the control of various additional memories mounted as needed by the user.
[0007]
For this reason, the conventional memory control logic provided in the personal computer requires a very complicated hardware configuration. In particular, the complexity of the hardware logic for performing the memory address control is a direct cause of reducing the memory access speed.
[0008]
Hereinafter, the principle of DRAM address control using the conventional memory control logic will be described.
[0009]
Usually, a personal computer is provided with a plurality of extension memory connectors for mounting an additional memory such as a DRAM card. An additional memory such as a DRAM card is composed of one or more DRAM banks. All DRAM banks in the internal memory and the additional memory are connected to different row address strobe signal lines (RAS lines). In memory access control, one of the RAS lines is energized, and a DRAM bank connected to the RAS line is selected as an access target bank.
[0010]
The activation control of the RAS line is performed by an address decoder in the memory control logic. The address decoder activates a RAS line having a decoding condition that is satisfied by a memory address value from the CPU among a plurality of RAS lines. The decoding condition of each RAS line is determined as follows.
[0011]
That is, all the DRAM banks in the internal memory and the additional memory are arranged in the order of their physical mounting positions, that is, in the order of the system board, the extended memory connector 1, the extended memory connector 2,. It is arranged in order from the side. According to this memory arrangement, address ranges to be assigned to the DRAM banks are defined, and decoding conditions for each RAS line are determined according to the address ranges.
[0012]
In this case, the decoding condition of each RAS line is set as a head indicating the upper limit of the address range assigned to the corresponding DRAM bank so that the DRAM bank having any memory size may be connected to which RAS line. Both the address and the last address indicating the lower limit are used.
[0013]
Therefore, the address decoder needs to include two comparators for each RAS line in order to detect which RAS line the memory address from the CPU satisfies the decoding condition. One comparator compares the magnitude of the memory address value from the CPU with the top address value of the address range assigned to the corresponding RAS line, and the other comparator assigns the memory address value from the CPU to the RAS line. Compares with the last address value of the address range. If the memory address value is greater than or equal to the first address value and less than the last address value, the corresponding RAS line is activated.
[0014]
As described above, in the conventional memory control logic, it is necessary to provide many comparators in the address decoder, which has a disadvantage that a relatively large delay occurs inside the address decoder. This delay increases the time required for the RAS line to be energized, causing a reduction in memory access speed.
[0015]
In addition, such a delay related to the activation of the RAS line also becomes a factor limiting the memory access performance using the interleave architecture.
[0016]
That is, the interleaving is a technique of sequentially accessing different DRAM banks by switching the RAS line to be activated for each page, for example. When accessing the same DRAM bank continuously, it is necessary to wait for the time (precharge delay) after the completion of the previous memory cycle until the recharging of the memory cells of the DRAM bank is completed (precharge delay), and wait for the execution of the next memory cycle. There is. If interleaving is adopted, another DRAM bank can be accessed during a recharging period of a certain DRAM bank, and a time loss due to a precharge delay required when accessing the same bank continuously can be eliminated.
[0017]
However, the above-mentioned delay related to the RAS line activation slows down the switching speed of the RAS line itself, so that the high-speed interleaving access performance cannot be sufficiently exhibited. Actually, in order to realize interleaving, it is necessary to add, for example, a dedicated hardware logic for switching the RAS line in units of a page in addition to the address decoder. Will be further reduced.
[0018]
Also, in order to make effective use of interleaving, adjacent address ranges may be assigned to memory banks having relatively equal memory sizes in order to facilitate grouping for creating a combination of banks that can be interleaved. desirable. By doing so, it is possible to reduce the number of DRAM banks out of the combination of interleaving and to control the interleaving of more DRAM banks.
[0019]
However, as described above, conventionally, the memory arrangement of the DRAM banks in the system is determined only by the physical mounting positions of the DRAM banks. It will be placed in space. This limits the combinations of DRAM banks that can be interleaved, and causes an increase in the number of DRAM banks that fall outside the interleaving combinations.
[0020]
[Problems to be solved by the invention]
Conventionally, the arrangement of the DRAM banks in the memory address space in the system is determined only by the physical mounting position irrespective of the size of the memo size. For this reason, the hardware configuration of the address decoder is complicated, and the delay in the address decoder is increased.
[0021]
Further, the memory arrangement of the DRAM banks as described above is a factor that restricts combinations of DRAM bank groups that can be interleaved, and there is a disadvantage that high-speed access performance by interleaving cannot be sufficiently and effectively used.
[0022]
The present invention has been made in view of such a point, and simplifies decoding conditions of an address decoder by arranging DRAM banks in a system optimally in a memory address space according to their memory sizes, and realizes an interleave architecture. It is an object of the present invention to provide a computer system capable of effectively utilizing and realizing a high memory access speed.
[0023]
Means and action for solving the problem
In the computer system of the present invention, a plurality of access control signals are respectively assigned, a plurality of memory banks which can be accessed independently of each other, a plurality of decoding conditions respectively corresponding to the plurality of access control signals are set, An address decoder for detecting presence / absence of a condition and a memory address from a CPU, and energizing an access control signal line corresponding to the matched decode condition to select a memory bank; and a memory size of each of the plurality of memory banks. Means for relocating the plurality of memory banks in the memory address space in the order of the memory size so that the larger the memory size of the bank, the smaller the memory address space of the CPU. Memory to be assigned to each memory bank Memory relocation means for determining the address range,Means for determining a combination of two or more memory banks that can be page-interleaved according to the memory arrangement of the plurality of memory banks; and a memory belonging to the combination so that the memory banks belonging to the combination are alternately accessed in page units. The decoding condition of the access control signal line corresponding to each bank is defined by a bit string commonly present in binary data indicating all memory address values belonging to the address range of the entire memory bank belonging to the combination, and a page of each memory bank. Means for determining in accordance with a predetermined bit string between the internal address and the page designation address and setting the address in the address decoderAnd characterized in that:
[0024]
In this computer system, the memory size of each of the plurality of memory banks is detected, and the arrangement order of the memory banks in the memory address space is determined according to the size relationship of the memory sizes regardless of the physical mounting positions of the memory banks. It is determined. In this case, the plurality of memory banks are arranged in descending order of the memory address space of the CPU in descending order of the memory size.
[0025]
Under such a memory arrangement, the address range assigned to each of the plurality of memory banks matches well with the address boundary divided by the memory address value represented by the binary data. Therefore, all memory address values belonging to any address range always have a bit string having a common value only in that address range.Further, a combination of two or more memory banks that can be page-interleaved is determined according to the memory arrangement of the plurality of memory banks, and belonging to the combination so that the memory banks belonging to the combination are alternately accessed in page units. The decoding condition of the access control signal line corresponding to each memory bank is such that a bit string commonly present in binary data indicating all memory address values belonging to the address range of the entire memory bank belonging to the combination, It is determined according to a predetermined bit string between the intra-page address and the page designation address, and is set in the address decoder.
[0026]
Therefore, it is not necessary to use both the first address value and the last address value of each address range as decoding conditions, and the decoding conditions for each access control signal can be simplified. Thus, the address decoder only needs to detect a match / mismatch between the memory address value from the CPU and the decode condition for each access control signal. Therefore, the hardware configuration of the address decoder can be greatly simplified as compared with the related art, so that the delay in the address decoder is reduced and the memory access speed can be increased.Further, by setting the decoding condition, a page interleave for accessing a different bank for each page is performed by using an address decoder configuration in which a match / mismatch between the memory address value from the CPU and the decoding condition is detected for each access control signal. Architecture is realized.
[0030]
【Example】
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows a computer system according to an embodiment of the present invention.
[0031]
This system is for realizing a notebook-type or laptop-type portable personal computer. On a system board 10, as shown, a CPU 11, a system controller 12, a system memory 13, a BIOS ROM 14, a real-time clock (RTC) 15, an interrupt controller (PIC) 16, a keyboard controller (KBC) 17, a display controller 18, and the like.
[0032]
On the system board 10, a CPU local bus (sometimes referred to as a processor bus) 31, a system bus 32 having specifications such as ISA / EISA / PCI, and a memory address bus 33 are provided.
[0033]
Further, this system is provided with two expansion memory connectors 21 and 22 for connecting an additional memory. FIG. 1 shows a state in which additional memories 41 and 42 are connected to the extended memory connectors 21 and 22, respectively.
[0034]
The additional memories 41 and 42 are optional memories that are mounted as needed by the user in order to expand the system memory size, and include, for example, a DRAM card and a SIMM memory module. These additional memories are usually composed of one or more DRAM banks.
[0035]
The CPU 11 is a microprocessor including a large-scale cache memory, and for example, an Intel 486 CPU manufactured by Intel Corporation of the United States is used. The CPU 11 is connected to the system controller 12 via a CPU local bus 31. The CPU local bus 31 is a group of signals directly connected to input / output pins of a microprocessor constituting the CPU 11. This includes a 32-bit data bus, a 32-bit address bus, various status signal lines, and the like.
[0036]
The system controller 12 is connected between the CPU local bus 31 and the system bus 32, and controls all memories and I / O devices in the system in response to a request from the CPU 11. The system controller 12 is realized by one LSI constituted by a gate array, in which a memory control logic lock for controlling the DRAM of the system memory 13 and the additional memories 41 and 42 is incorporated. .
[0037]
The system memory 13 is used as a main memory of the system, and usually includes one or more DRAM banks. The system memory 13 stores an operating system, an application program to be executed, various types of processing data, and the like.
[0038]
The system memory 13 is mounted on the system board 10 via a predetermined connector or directly. The system memory 13 is a 32-bit memory device, and its data port is connected to a 32-bit data bus of the CPU local bus 31, and an address input port is connected to a memory address bus 33. The memory address bus 33 is an address bus dedicated to the DRAM, and a physical address (row address / column address) of the DRAM is output from the system controller 12 to the memory address bus 33.
[0039]
Similarly, the extension memories 41 and 42 are also 32-bit memory devices, the data ports of which are connected to the 32-bit data bus of the CPU local bus 31 via the corresponding connectors 21 and 22, and the address input port is the memory address. It is connected to the bus 33.
[0040]
Further, two row address strobe signal lines (RAS lines: RAS0, RAS1) are connected to the system memory 13. Similarly, another two row address strobe signal lines (RAS lines: RAS2 and RAS3) are connected to the extended memory connector 21, and another two row address strobe signal lines (RAS) are also connected to the extended memory connector 22. (RAS: RAS4, RAS5) are connected.
[0041]
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 system memory 13 and the additional memories 41 and 42, respectively. Have been.
[0042]
All the DRAM banks in the system memory 13 and the additional memories 41 and 42 are arranged in the DRAM memory address space of the CPU 11. In this system, in order to simplify the decoding conditions of each RAS line and to make the most of the interleave architecture, the DRAM banks are arranged at lower addresses as the memory size increases.
[0043]
In the read / write access control of the system memory 13 and the additional memories 41 and 42, one of the RAS lines (RAS0 to RAS5) is set to the active state, and the DRAM bank connected to the active RAS line is to be accessed. Selected as DRAM bank. Such activation control of the RAS line is executed by the memory control logic of the system controller 12.
[0044]
FIG. 2 shows the configuration of the memory control logic.
[0045]
Memory controllogicReference numeral 120 denotes hardware logic that supports page mode access and page interleaving of the DRAM, and includes an address conversion circuit 121, a RAS decoder 122, a row address / column address multiplexer 123, a CAS generation circuit 124, a timing control circuit 125, and a page hit. It has a judgment circuit 126.
[0046]
The address conversion circuit 121 converts the CPU address (A31: 02) into a DRAM logical address (MA31: 02). This conversion is performed to continuously allocate a plurality of DRAM memory areas distributed in the memory address space of the CPU 11 to a logical address space dedicated to DRAM access. FIG. 3 shows an example of this address conversion operation.
[0047]
That is, as shown in FIG. 3A, the memory address space of the CPU 11 usually includes a video RAM, a BIOS ROM, and various options in addition to a DRAM area such as a system memory area and a PM memory area. A reserved area (0A0000H to 0C0000H) for arranging a ROM or the like is secured. The address conversion circuit 121 performs the address conversion according to such a CPU memory map so that the addresses of the DRAM area immediately before and immediately after the reserved area are continuous.
[0048]
Further, when a VGA BIOS or a system BIOS stored in the BIOS ROM is copied to the DRAM and used, as shown in FIG. 3B, the VGA BIOS area and the system BIOS area of the reserved area are used. The assigned CPU address is also converted to a DRAM logical address. Further, in the case of a CPU having a system management mode (SMM), the CPU address assigned to the SMRAM area used only in the SMM is also converted to a DRAM logical address.
[0049]
Such conversion from the CPU address to the DRAM logical address is performed, for example, in units of 16 Kbytes. For this reason, 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.
[0050]
The DRAM logical address (MA31: 02) obtained by the address conversion circuit 121 is used for addressing a DRAM bank in the system.
[0051]
The RAS decoder 122 decodes the DRAM logical address (MA31: 02) according to the respective decode conditions of RAS0 to RAS5 set in its internal register, and RAS having a decode condition satisfying the DRAM logical address among the RAS0 to RAS5 lines. Select a line and make it active. The timing at which the RAS line is activated is controlled by a timing control signal CONT1 from the timing control circuit 125.
[0052]
The decoding operation of the RAS decoder 122 can be performed only by detecting the match / mismatch between the decode condition of each RAS line and the DRAM logical address. How the decoding conditions for each of the RAS0 to RAS5 lines are determined will be described in detail with reference to FIG.
[0053]
The row address / column address multiplexer 123 divides the DRAM logical address (MA31: 02) into a row address (RA) and a column address (CA) for addressing the DRAM bank to be accessed. In an internal register of the row address / column address multiplexer 123, a control parameter indicating a start bit position of a row address (RA) of each DRAM bank is set in advance. The operation of decomposing into a row address (RA) and a column address (CA) is performed according to a control parameter corresponding to a DRAM bank to be accessed.
[0054]
The row address (RA) and the column address (CA) are output on the memory bus 33 in a time-division manner. This output timing is controlled by a timing control signal CONT2 from the timing control circuit 125.
[0055]
The CAS generation circuit 124 controls the energization of the CAS line according to the timing control signal CONT3 from the timing control circuit 125.
[0056]
The timing control circuit 125 controls the operations of the RAS decoder 122, the row address / column address multiplexer 123, and the CAS generation circuit 124 by generating the above-described timing control signals CONT1 to CONT3. The operation of generating the timing control signal is controlled by a page hit signal HIT from the page hit determination circuit 126 or the like.
[0057]
The page hit determination circuit 126 holds the CPU address at the time of the previous DRAM access as a CPU address for page heat determination, and compares the CPU address with the CPU address at the next DRAM access to determine the page hit. Determine the presence or absence. Here, a page hit means that the next DRAM access accesses the same page in the same DRAM bank as the previous DRAM access. When it is determined that a page hit has occurred, this is notified to the timing control circuit 125 by a page hit signal HIT.
[0058]
As described above, the page hit determination operation is performed based on the value of the CPU address instead of the DRAM logical address. Thus, the address conversion operation and the page hit determination operation can be performed in parallel. The CPU address can be used for the page hit determination because the unit (16 Kbytes) of the address conversion from the CPU address to the DRAM logical address is set to a value larger than the page size (up to about 4 Kbytes) of the DRAM bank. Because it is.
[0059]
To determine a page hit, a bit string higher than the column address in the CPU address (A31: 02) is used. The number of bits of the column address, that is, the page size differs for each DRAM bank to be accessed. For this reason, a control parameter for designating a bit to be used for the page hit determination for each RAS line is also set in the internal register of the page hit determination circuit 126 in advance, and the page hit is determined according to the control parameter corresponding to the DRAM bank to be accessed. A determination is made.
[0060]
The DRAM control timing by the memory control logic 120 is classified into cycle timings corresponding to the following three states.
[0061]
(1) Page hit
This means that the next DRAM access accesses the same page in the same DRAM bank as the previous DRAM access. In this case, the access of the DRAM bank is controlled in the page mode. That is, only the column address and the activation timing of the CAS line are controlled, and the RAS decoder 122 does not switch the RAS line. Also, the RAS line is kept in the active state even after the previous memory cycle is completed.
[0062]
(2) Bank mistake
This means that the next DRAM access accesses a different DRAM bank from the previous one. In this case, RAS decoder 122 switches the RAS line, and the DRAM bank is accessed in a normal DRAM access cycle. Also, the page hit determination CPU address stored in the page hit determination circuit 126 is updated.
[0063]
(3) Page mistake
This means that the next DRAM access accesses a different page in the same DRAM bank as the previous DRAM access. In this case, RAS decoder 122 resets the same RAS line to the active state again, and the DRAM bank is accessed in a normal DRAM access cycle. Also, the page hit determination CPU address stored in the page hit determination circuit 126 is updated.
[0064]
Next, the decoding conditions of each RAS line set in the RAS decoder 122 will be described with reference to FIGS.
[0065]
FIG. 4 shows an example of a DRAM memory map in the system. In this DRAM memory map, as shown in FIG. 1, two 2-Mbyte DRAM banks are mounted on the system board 10 as the system memory 13 and the additional memory 41 of the This corresponds to the case where the expansion memory 42 of the extended memory connector 22 is composed of two 4 Mbyte DRAM banks.
[0066]
In this case, these DRAM banks are arranged in the order of the memory size, that is, as shown in FIG. 4, an 8 Mbyte DRAM bank, two 4 Mbyte DRAM banks, and two 2 Mbyte DRAM banks in total in order of 20 Mbytes. Are arranged in a DRAM logical address space.
[0067]
In this memory arrangement, an address range of 0 to 8 Mbytes is assigned to the RAS2 line corresponding to an 8 Mbyte DRAM bank. The RAS4 line corresponding to the first 4 Mbyte DRAM bank is assigned an address range of 8 to 12 Mbytes, and the RAS5 line corresponding to the next 4 Mbyte DRAM bank is assigned an address range of 12 to 16 Mbytes. Further, an address range of 16-18 Mbytes is allocated to the RAS0 line corresponding to the first 2 Mbyte DRAM bank, and an address range of 18-20 Mbytes is allocated 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 this RAS3 line.
[0068]
At this time, the decoding conditions for the RAS0 to RAS5 lines are determined as shown in FIG.
[0069]
As a decoding condition for each of the RAS0 to RAS5 lines, a bit string that is commonly present only in all DRAM logical address values (MA31: 02) belonging to the address range assigned to each RAS line is used.
[0070]
That is, the decoding condition of the RAS2 line is such that the upper 9 bits (MA31 to 23) of the DRAM logical address value (MA31: 02) = "000000000". 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.
[0071]
The decoding condition of the RAS4 line is that 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.
[0072]
The decoding condition of the RAS5 line is that the upper 10 bits (MA31 to 22) of the DRAM logical address value (MA31: 02) = “0000 0000 11”. 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 RAS5 line.
[0073]
The decoding condition of the RAS0 line is that the upper 11 bits (MA31 to 21) of the DRAM logical address value (MA31: 02) = "00000001000". 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.
[0074]
The decoding condition of the RAS1 line is that the upper 11 bits (MA31 to 21) of the DRAM logical address value (MA31: 02) = "00000001000". 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.
[0075]
As described above, a common bit string belonging to an address range corresponding to each RAS line is used as a decoding condition for each RAS line. Therefore, the above-mentioned RAS decoder 122 only needs to detect the match / mismatch between the DRAM logical address value and the decode condition for each RAS line, and can greatly simplify the hardware configuration as compared with the related art. It becomes possible.
[0076]
Next, the decoding conditions of each RAS line when the page interleave architecture is adopted will be described.
[0077]
When performing 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 having adjacent memory address ranges and matching total memory sizes. Such grouping is performed in ascending order of DRAM logical address.
[0078]
That is, in the example of FIG. 4, the total memory size of the two 4 Mbyte DRAM banks allocated to the address range (0 to 8 Mbytes) following the address range of the 8 Mbyte DRAM bank of RAS2 is 8 Mbytes. One page interleave group is configured by three banks corresponding to RAS2, RAS4, and RAS5.
[0079]
Further, since the 2 Mbyte DRAM bank of RAS1 is allocated to the address range following the address range (16 to 8 Mbytes) of the 2 Mbyte DRAM bank of RAS0, another page interleave is performed by the two banks corresponding to RAS0 and RAS1. A group is formed.
[0080]
In this case, the decoding condition of each RAS line is changed as shown in FIGS.
[0081]
That is, the decoding conditions of RAS2, RAS4, and RAS5 of group 1 are common to all DRAM logical address values (MA31: 02) belonging to a total address range of 16 Mbytes (0 to 16 Mbytes) assigned to group 1. An existing bit string and a bit string between a column address (in-page address) and a row address (page address) of a DRAM bank corresponding to each of RAS2, RAS4, and RAS5 are used.
[0082]
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 to 24) of the DRAM logical address value (MA31: 02) = “0000 0000”. Commonly present, which is not present in Group 2. Therefore, (MA31 to 24) = "0000 0000" is used as a common decoding condition for RAS2, RAS4, and RAS5.
[0083]
As for RAS2, the start position of the row address in the DRAM logical address is shifted left by one bit, and one 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 condition.
[0084]
For each of RAS4 and RAS5, the starting position of the row address in the DRAM logical address is shifted left by 2 bits, and the 2 bits (MA13, 12) between the row address and the column address of the corresponding 4 Mbyte DRAM bank are shifted. The value is added as an address condition. Two bits are used because the memory size of each of RAS4 and RAS5 is half the memory size of RAS2.
[0085]
That is, for RAS4, 2 bits (MA13, 12) = "01" between the row address and the column address of the 4M byte DRAM bank corresponding to RAS4 are added as decoding conditions, and for RAS5, RAS5 corresponds to RAS5. 2 bits (MA13, 12) = "11" between the row address and the column address of the 4M byte DRAM bank to be added are added as address conditions.
[0086]
When the decoding conditions for RAS2, RAS4, and RAS5 are determined in this manner, even-numbered pages (0, 2, 4, 6,...) Within the address range of 0 to 16 Mbytes are allocated to the 8 Mbyte DRAM bank of RAS2. , RAS4, a part of an odd page (1, 5, 9,...) Within an address range of 0 to 16 Mbytes is allocated to the 4 Mbyte DRAM bank, and a 4 Mbyte DRAM bank of RAS5 has 0 to 16 Mbytes. , The remaining odd pages (3, 7, 11,...) In the address range are assigned.
[0087]
Therefore, when continuous access is performed in the range of 0 to 16 Mbytes, three DRAM banks are alternately accessed in page units in the order of RAS2, RAS4, RAS2, RAS5, RAS2,.
[0088]
On the other hand, the decoding conditions of RAS0 and RAS1 of group 2 are as follows.
[0089]
That is, the decoding conditions for RAS0 and RAS1 include a bit string that is common to all DRAM logical address values (MA31: 02) belonging to a total address range of 4 Mbytes (16 to 20 Mbytes) allocated to group 2; A bit string between a column address and a row address of a DRAM bank corresponding to each of RAS0 and RAS1 is used.
[0090]
In the address range of a total of 4 Mbytes allocated to RAS0 and RAS1, the upper 10 bits (MA31 to 22) = “0000 0001 00” of the DRAM logical address value (MA31: 02) are present in common, which is group 1 Does not exist. Therefore, (MA31-22) = "00000001 00" is used as a common decoding condition for RAS0 and RAS1.
[0091]
Regarding RAS0, the start position of the row address in the DRAM logical address is shifted left by one bit, and one bit (MA11) between the row address and the column address of the 2 Mbyte DRAM bank corresponding to RAS0 = "0". Is added as a decoding condition.
[0092]
As for RAS1, the start position of the row address in the DRAM logical address is shifted one bit to the left, and one bit (MA11) = "1" between the row address and the column address of the corresponding 2-Mbyte DRAM bank is set as the decoding condition. Added.
[0093]
When the decoding conditions for RAS0 and RAS1 are determined in this manner, even-numbered pages (0, 2, 4, 6,...) In a 4 Mbyte address range of 16 to 20 Mbytes are allocated to the 2 Mbyte DRAM bank of RAS0. Odd pages (1, 3, 5, 7,...) Are allocated to the 2-Mbyte DRAM bank of RAS1. Therefore, when continuous access is performed in the range of 16 to 20 Mbytes, two DRAM banks are alternately accessed in page units in the order of RAS0, RAS1, RAS0, RAS1,....
[0094]
As described above, the page interleaving determines the decoding condition of each RAS based on the bit string commonly existing in the address range of the interleave group and the predetermined bit string between the row address and the column address, and determines the decoding condition for each RAS. Can be realized simply by setting
[0095]
Initial setting processing for the memory control logic 120 such as setting of decoding conditions for the RAS decoder 122 is executed by the IRT routine of the BIOS ROM 14.
[0096]
FIG. 7 shows a procedure of an initialization operation for the memory control logic 120 executed by the IRT routine.
[0097]
When the system is powered on, the IRT routine first checks the memory type (bit width of each of the column address and the row address) of each DRAM bank, 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.
[0098]
Details of the memory size detection processing operation performed in step S11 will be described later with reference to FIG.
[0099]
Next, the IRT routine performs memory relocation of the DRAM banks in the system (step S12). In this memory rearrangement, as described with reference to FIG. 4, the memory banks are arranged in ascending order of the memory address space from the DRAM bank having the largest memory size, and the address range to be allocated to each DRAM bank is determined according to the arrangement.
[0100]
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 only in the DRAM logical address value belonging to that range, and converts the common bit string to the RAS line. Each decoding condition is determined (step S13).
[0101]
When the page interleave architecture is not used, the IRT routine sets the decoding condition of each RAS line determined in step S13 as it is 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 uses the internal register of the page hit determination circuit 126 for page hit determination. A control parameter for designating the position of the CPU address to be executed for each RAS line is set (step S18). The values of these control parameters are determined according to the memory bank type detected in step S11.
[0102]
On the other hand, when the page interleave architecture is adopted, the IRT routine determines a group that can be page-interleaved according to the DRAM map arranged in the order of the memory size in step S12 (step S15). Next, the IRT routine changes the decoding condition of each RAS based on the bit string commonly existing in the address range of the page interleave group and the predetermined bit string between the row address and the column address (step S16).
[0103]
Thereafter, the IRT routine sets the decoding condition of each RAS line determined in step S16 in an 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 uses the internal register of the page hit determination circuit 126 for page hit determination. A control parameter for designating the position of the CPU address to be executed for each RAS line is set (step S18). The row address start position is determined based on the memory bank type detected in step S11 and the number of bits between the row address and the column address used as a decoding condition for page interleaving. The position of the CPU address used for page hit determination is determined according to the memory bank type detected in step S11.
[0104]
Next, the principle of the process of detecting the memory size of the DRAM bank will be described with reference to FIGS.
[0105]
First, with reference to FIG. 8, the types of DRAM banks that can be controlled by one RAS will be described. The DRAM banks are roughly divided into four banks of type 1 to type 4 as shown in the figure.
[0106]
Type 1 DRAM banks have a memory size of 2 Mbytes. This type 1 DRAM bank includes four 4M bit DRAM chips of 512K (1K rows × 512 columns) × 8 bits, and the bit width of the row address is 10 bits and the bit width of the column address is 9 bits. is there.
[0107]
Type 2 DRAM banks have a memory size of 4 Mbytes. This type 2 DRAM bank includes eight 4M bit DRAM chips each having a 1M (1K row × 1K column) × 4 bit configuration. The bit width of a row address is 10 bits and the bit width of a column address is 10 bits. is there.
[0108]
Type 3 DRAM banks have a memory size of 8 Mbytes. This type 3 DRAM bank includes four 16M bit DRAM chips of 2M (2K rows × 1K columns) × 8 bits configuration, and the bit width of the row address is 11 bits and the bit width of the column address is 10 bits. is there.
[0109]
Type 4 DRAM banks have a memory size of 16 Mbytes. This type 4 DRAM bank includes eight 16M bit DRAM chips of 4M (2K rows × 2K columns) × 4 bits, and the bit width of the row address is 11 bits and the bit width of the column address is 11 bits. is there.
[0110]
FIGS. 9, 10, and 11 show the memory configurations of the system memory 13, the extension memory 41, and the extension memory 42 of FIG. 1, respectively.
[0111]
When the system memory 13 is constituted by two 2 Mbyte DRAM banks of type 1, as shown in FIG. 9, four DRAM chips of one 2 Mbyte DRAM bank have RAS0 line and CAS line. , And the other four DRAM chips of the 2 Mbyte DRAM bank are commonly connected to the RAS1 line and the CAS line. All the chips in these two 2 Mbyte DRAM banks are connected in parallel to both the memory address bus 33 and the data bus 322.
[0112]
Which of these two 2 Mbyte DRAM banks is addressed is determined by which of RAS0 and RAS1 is activated.
[0113]
When the RAS0 line is activated, the lower 10 bits of the address value output on the memory address bus 33 at that time are taken in as the row address by the four chips connected to the RAS0 line. Thereafter, the four chips connected to the RAS0 line take in the lower 9 bits of the address value output on the memory address bus 33 as the column address when the CAS line is activated. The same address of each of the four chips connected to the RAS0 line is simultaneously addressed by the 10-bit row address and the 9-bit column address, and a DRAM corresponding to the RAS0 line in a total of 32 bits of 8 bits per chip. The bank is read / write accessed.
[0114]
Similarly, when the RAS1 line is activated, the low-order 10-bit row address of the address value output on the memory address bus 33 at that time is taken into each of the four chips connected to the RAS1 line. It is. Thereafter, the four chips connected to the RAS1 line take in the lower 9-bit column address of the address value output on the memory address bus 33 when the CAS line is activated. With these 10-bit row address and 9-bit column address, the same storage location of each of the four chips connected to the RAS1 line is simultaneously addressed, and 8 bits per chip correspond to the RAS1 line in a total of 32 bits. The read / write access is made to the DRAM bank to be executed.
[0115]
When the additional memory 41 is configured by one type 3 8M byte DRAM bank, as shown in FIG. 10, the four DRAM chips of the 8M byte DRAM bank are connected to the RAS2 line and the CAS line. Commonly connected. All chips in the 8 Mbyte DRAM bank are connected in parallel to both the memory address bus 33 and the data bus 322.
[0116]
When the RAS2 line is activated, the lower 11 bits of the address value output on the memory address bus 33 at that time are taken into four chips connected to the RAS2 line as a row address. Thereafter, the four chips connected to the RAS2 line take in the lower 10 bits of the address value output on the memory address bus 33 as the column address when the CAS line is activated. With the 11-bit row address and the 10-bit column address, the corresponding storage locations of each of the four chips connected to the RAS0 line are simultaneously addressed, and RAS2 in 8 bits per chip in a total of 32 bits. The DRAM bank corresponding to the line is read / write accessed.
[0117]
When the additional memory 42 is constituted by two 4 Mbyte DRAM banks of type 2, as shown in FIG. 11, eight DRAM chips of one 4 Mbyte DRAM bank have RAS4 line and CAS line. , And the other eight DRAM chips of the 4 Mbyte DRAM bank are commonly connected to the RAS5 line and the CAS line. All chips in the 4 Mbyte DRAM bank are connected in parallel to both the memory address bus 33 and the data bus 322.
[0118]
Which of these two 4 Mbyte DRAM banks is addressed is determined by which of RAS4 and RAS5 is activated.
[0119]
When the RAS4 line is activated, the lower 10 bits of the address value output on the memory address bus 33 at that time are taken in as the row address by the eight chips connected to the RAS4 line. Thereafter, the eight chips connected to the RAS4 line take in the lower 10 bits of the address value output on the memory address bus 33 as the column address when the CAS line is activated. With the 10-bit row address and the 10-bit column address, the same storage location of each of the eight chips connected to the RAS4 line is simultaneously addressed. The corresponding DRAM bank is read / write accessed.
[0120]
Similarly, when the RAS5 line is activated, the lower 10 bits of the address value output on the memory address bus 33 at that time are taken into the eight chips connected to the RAS5 line as row addresses. It is. Thereafter, the eight chips connected to the RAS5 line take in the lower 10 bits of the address value output on the memory address bus 33 as the column address when the CAS line is activated. With these 10-bit row address and 10-bit column address, the same storage location of each of the eight chips connected to the RAS5 line is simultaneously addressed. The corresponding DRAM bank is read / write accessed.
[0121]
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 using the difference in the number of bits used as a row address and a column address.
[0122]
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.
[0123]
The IRT routine performs a memory size detection process of the DRAM bank connected to the RAS line in the order of RAS0, RAS1, RAS2,. First, the IRT routine sets a predetermined decoding condition in the RAS decoder 122 so that only the energization of the RAS line to be inspected is permitted (step S21). In this case, as a decoding condition of the RAS line to be inspected, a bit string common to memory address values used in several times of memory accesses performed for detecting a memory size is used. All the other RAS lines except for the RAS line to be inspected are different from the RAS line to be inspected so that the RAS lines are not energized in several memory accesses performed for detecting the memory size. A predetermined bit string is set as each decoding condition.
[0124]
Next, in the IRT routine, the type 4 DRAM bank (column address CA = 11 bits, row address RA = 11 bits) having the largest column address bit number among the type 1 to type 4 DRAM banks is used as the RAS line to be inspected. And a write / read compare test is performed on the DRAM bank (step S22). In this case, a control parameter corresponding to the type 4 DRAM bank is set in the row address / column address multiplexer 123. In the write / read compare test, a write access of a write address 00001000H (H indicates hexadecimal notation) and a read access of a read address 00000000H are performed, and it is checked whether or not the write data and the read data match at that time. (Step S23).
[0125]
If the DRAM bank actually connected to the RAS line to be inspected is a type 4 DRAM bank as expected, data can be normally written to the address 00001000H, so that the values of the write data and the read data are Will not match. On the other hand, if the DRAM bank actually connected to the RAS line to be inspected is a bank of type 1, type 2, or type 3 whose column address number is 10 bits or less, the value of write data and read data Matches. This is for the following reason.
[0126]
That is, since the setting corresponding to the type 4 DRAM bank is made in step S22, the 11-bit row address RA (MA23,..., MA13) output at the time of the write access of the address 00001000H is 0000000000000, The bit column address CA (MA12,..., MA02) = 1000000000000. In a DRAM bank in which the number of column addresses is 10 bits or less, the value "1" of the most significant bit MA12 of the 11-bit column address CA is ignored. Therefore, when a bank of type 1, type 2, or type 3 is connected, the write access of the write address 00001000H causes the address designated by the column address CA = 00000000H in the first row, that is, the address 00000000H. Data is written. As a result, the read data read by the read access of the read address 00000000H matches the write data.
[0127]
Therefore, when the 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 a type 4 DRAM bank as expected (CA = 11 bits, RA = 11 bits). , Memory size = 16 Mbytes) (step S 24). On the other hand, if a match between the write data and the read data is detected, the DRAM bank connected to the RAS line to be tested has the number of column address bits. Is a DRAM bank of another type (Type 1, Type 2, or Type 3) of 10 bits or less. In this case, the following processing from step S25 is performed.
[0128]
That is, this time, the IRT routine uses the memory configuration (column address CA = 10 bits, row address RA = 11 bits) of the type 3 (or type 2) memory having the next largest number of column address bits after type 4 And a write / read compare test is performed on the DRAM bank (step S25). In the write / read compare test, a write access of the write address 00000800H and a read access of the read address 00000000H are performed, and it is checked whether or not the write data and the read data at that time coincide with each other (step S26).
[0129]
If the DRAM bank actually connected to the RAS line to be inspected is a type 1 DRAM bank having a column address of 9 bits or less, the most significant bit "1" of the column address as described above. Is ignored, data is written to the address specified by the address 00000000H of the type 1 DRAM bank. As a result, the values of the write data and the read data match. Therefore, when a match between the write data and the read data is detected, the DRAM bank connected to the RAS line to be inspected is a type 1 DRAM bank (CA = 9 bits, RA = 10 bits, memory size = 2 Mbytes) ) Is determined (step S27).
[0130]
On the other hand, if the DRAM bank actually connected to the RAS line to be inspected is a type 2 or type 3 DRAM bank having the expected 10-bit column address bit number, data can be normally written to the address 00010000H. Therefore, the values of the write data and the read data do not match. Therefore, when the mismatch between the write data and the read data is detected, the following processing from step S28 is performed to detect which type 2 or type 3 DRAM bank is connected. .
[0131]
That is, the IRT routine assumes that type 3 DRAM banks (column address CA = 10 bits, row address RA = 11 bits) having a larger number of row address bits are connected. Then, a write / read compare test is performed on the DRAM bank (step S28).
[0132]
In this write / read compare test, a write access of the write address 00400000H and a read access of the read address 00000000H are performed, and it is checked whether or not the write data and the read data match at that time (step S29).
[0133]
If the DRAM bank actually connected to the inspection target RAS line is a type 3 DRAM bank as expected, data can be normally written to the address 00400000H, so that the values of the write data and the read data are Will not match. On the other hand, when the DRAM bank actually connected to the RAS line to be inspected is a type 2 bank whose row address is 10 bits, the values of the write data and the read data match. This is for the following reason.
[0134]
That is, since the setting corresponding to the type 3 DRAM bank is made in step S28, the 11-bit row address output at the time of the write access of the address 00400000H is RA (MA22,..., MA12) = 1000000000000, and The bit column address CA (MA11,..., MA02) = 000000000. In a type 2 DRAM bank having 10-bit row addresses, the value “1” of the most significant bit MA22 of the 11-bit row address RA is ignored. Therefore, when a type 2 bank is connected, data is written to the address specified by the column address CA = 00000000000 in the first row, that is, the address 00000000H by the write access of the write address 00400000H. As a result, the read data read by the read access of the read address 00000000H matches the write data.
[0135]
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 a type 3 DRAM bank as expected (CA = 10 bits, RA = 11 bits). , Memory size = 8 Mbytes) (step S30). On the other hand, if a match between the write data and the read data is detected, the DRAM bank connected to the RAS line to be inspected has the number of row address bits. Is a 10-bit type 2 DRAM bank (CA = 10 bits, RA = 10 bits, memory size = 4 Mbytes) (step S31).
[0136]
Next, specific circuit configurations of the RAS decoder 122, the row address / column address multiplexer 123, and the page hit determination circuit 126 described with reference to FIG. 2 will be described.
[0137]
FIG. 13 shows a specific circuit configuration of the RAS decoder 122. As shown, the RAS decoder 13 includes six RAS decode circuits 51 to 56 corresponding to the RAS0 to RAS5 lines, respectively. Each of the RAS decode circuits 51 to 56 checks whether or not the DRAM logical address (MA31: 02) matches the corresponding decode condition, and when they match, controls the energization of the corresponding RAS line at a predetermined timing. In this case, actually, it is not necessary to see all the bit values of the 30-bit DRAM logical address (MA31: 02), and the conditions of MA26, MA25, MA24, MA24, MA24, MA23, MA22, MA21, skipping, only 9 bits of MA13, MA12, MA11 are used for decoding.
[0138]
Since the RAS decode circuits 51 to 56 have the same circuit configuration, the circuit configuration of the RAS decode circuit 51 will be described as a representative here.
[0139]
The RAS decode circuit 51 includes a RAS set register 61, a RAS mask register 62, nine match / mismatch detection circuits 71 to 79, nine mask circuits 71 to 79, and an AND circuit 91.
[0140]
The RAS set register 61 is an I / O register that is readable / writable by the CPU 11, and sets a bit string indicating the decoding condition of the RAS0 line. For example, when the decoding condition of the RAS0 line is determined as shown in FIG. 5, “00100XXX1” is set in the RAS set register 61 as the decoding condition of the RAS0 line. Here, X means an indefinite bit value (Don't Care) not related to the decoding condition.
[0141]
The RAS mask register 62 is an I / O register that can be read / written by the CPU 11, and determines whether the result of determining whether the decoding condition of the RAS0 line matches the DRAM logical address is masked bit by bit or not. Is set ("0" = mask, "1" = no mask). Here, masking means that the determination result of that bit always matches, regardless of the determination result of the corresponding one bit of the bit string of the decoding condition. Therefore, when “00100XXX1” is set as the decoding condition in the RAS set register 61 as described above, the mask data “111110 001” is set in the RAS mask register 62. Thereby, the bit of “X” in the decoding condition “00100XXX1” can be excluded from the decoding condition.
[0142]
The match / mismatch detection circuits 71 to 79 detect match / mismatch between bits corresponding to the DRAM logical address and the decoding condition, respectively. Each of the 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.
[0143]
As described above, the RAS decoder 122 can be realized only with logic for matching / mismatching data corresponding to a data size of 9 bits per RAS line.
[0144]
Next, a specific circuit configuration of the row address / column address multiplexer 123 will be described with reference to FIG.
[0145]
As shown, the row address / column address multiplexer 123 includes a register file 201, a pattern decoder 202, a row address selector 203, row address start position switching circuits 204 to 207, and a row address / column address selector 208. .
[0146]
The register file 201 is a group of I / O registers that can be read / written by the CPU 11, and sets six control parameters corresponding to each of the RAS0 to RAS5 lines. Each control parameter specifies the row address start position of the DRAM bank connected to the corresponding RAS line, that is, which bit of the DRAM logical address is to be the LSB of the row address.
[0147]
The four bits of the DRAM logical address MA11, MA12, MA13, and MA14 may be used as the row address start position, depending on the type of DRAM to be supported and page interleaving conditions. Each control parameter is composed of 4-bit data specifying 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.
[0148]
One of the six control parameters set in the register file 201 is read by the pattern decoder 202. Which control parameter is read is determined by the decoding result output of the RAS decoder 122. For example, when the RAS decoder 122 activates the RAS line, the control parameters corresponding to the RAS line are read from the register file 201.
[0149]
The pattern decoder 202 decodes the control parameters read from the register file 201, and generates a selection signal for causing the selector 203 to select one of four types of row addresses according to the decoding result.
[0150]
The row address start position switching circuit 204 sets a total of 11 bits (MA21,..., MA11) having the MA11 as the row address start position (LSB) from the DRAM logical addresses MA31: 02 as the row address (RA10: 0). Take out. Similarly, the row address start position switching circuit 205 extracts a total of 11 bits (MA22,..., MA12) having MA12 as the LSB, and the row address start position switching circuit 206 has a total of 11 bits (MA23,. , MA13), and the row address start position switching circuit 207 fetches a total of 11 bits (MA24,..., MA14) with MA14 as the LSB as a row address.
[0151]
These row address start position switching circuits 204 to 207 are constituted by, for example, barrel shifters.
[0152]
The row address selector 203 selects and outputs one of four types of row addresses output from the row address start position switching circuits 204 to 207 according to a selection signal from the pattern decoder 202. The row address selected by the row address selector 203 is supplied to a row address / column address selector 208. The row address / column address selector 208 is also supplied with a column address. The lower 11 bits (MA12,..., MA02) of the DRAM logical address are always used as the column address.
[0153]
The row address / column address selector 208 selectively outputs a row address and a column address onto the memory address bus 33 at a timing designated by a control signal from the timing control circuit 125 in FIG.
[0154]
In the row address / column address multiplexer 123, a row address cutout operation by each of the row address start position switching circuits 204 to 207 is performed in parallel with the decoding operation of the RAS decoder 122. When the decoding result of the RAS decoder 122 is determined, one control parameter corresponding to the RAS line to be energized specified by the determined decoding result is read from the register file 201 and sent to the pattern decoder 202. . Then, the decoding operation by the pattern decoder 202 and the row address selecting operation of the row address selector 203 are executed according to the control parameters, whereby the row address to be used for DRAM access is determined.
[0155]
Here, it has been described that all the 11 bits of the row address (RA10: 0) are switched by the row address start position switching circuits 204 to 207 and the row address selector 203 in accordance with the RAS line. There is no need to switch bits.
[0156]
That is, in any case where the row address start position is MA11, MA12, MA13, and MA14, the six bits of MA14 to MA19 are used in common, and these bits can be excluded from the switching target. FIG. 15 shows an example of the correspondence between the CPU address and the row address in this case.
[0157]
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. By doing so, the 6 bits of the CPU address MA14 to MA19 can be sent directly to the row address / column address selector 208 as the middle 6 bits (RA8 to RA3) of the row address, so that the row address start position switching circuit Each of 204 to 207 and the row address selector 203 can be realized only by a hardware configuration for 5 bits to be switched.
[0158]
As described above, the circuit configuration of the row address / column address multiplexer 123 in FIG. 14 can greatly reduce the required number of circuits. However, from the time when the decoding result of the RAS decoder 122 is determined to the time when the row address to be used for DRAM access is determined, the operation of the three circuit blocks (the operation of selecting and reading the control parameters to be used from the register file 201). , The decoding operation by the pattern decoder and the row address selecting operation by the row address selector 203). Therefore, there is a problem that a relatively large delay occurs in the row address / column address multiplexer 123.
[0159]
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 to reduce the delay in the row address / column address multiplexer 123.
[0160]
That is, in the row address / column address multiplexer 123 of FIG. 16, instead of the pattern decoder 202 and the row address selector 203 of FIG. 14, six pattern decoders 202-1 to 202- corresponding to the RAS0 to RAS5 lines, respectively. 6, and six row address selectors 203-1 to 203-6 are provided. The pattern decoders 202-1 to 202-6 control the row address selection operations of the row address selectors 203-1 to 203-6 according to the RAS0 control parameters to the RAS5 control parameters of the register file 201, respectively.
[0161]
The row of the row address selectors 203-1 to 203-6 has one of the six types of row addresses (RAS0 row address to RAS5 row address) obtained by the row address selectors 203-1 to 203-6. There is provided a row address selector 209 for selecting one according to the decoding result of the RAS decoder 122.
[0162]
In this circuit configuration, in parallel with the decoding operation of the RAS decoder 122, the row address cutout operation by each of the row address start position switching circuits 204 to 207, the pattern decoders 202-1 to 202-6 and the row address selector 203-1 203-6 to the row address selection operation. Thus, six types of row addresses (RAS0 row address to RAS5 row address) corresponding to the RAS0 to RAS5 lines can be generated without waiting for the determination of the decoding result of the RAS decoder 122.
[0163]
When the decoding result of the RAS decoder 122 is determined, the row address corresponding to the RAS line to be energized specified by the determined decoding result is selected by the row address selector 209.
[0164]
Therefore, the circuit operation required from the determination of the decoding result of the RAS decoder 122 to the determination of the row address to be used for DRAM access is only the address selection operation by the final-stage address selector 209, and the internal delay is reduced. It is greatly reduced.
[0165]
In the configuration of FIG. 16, it is not necessary to switch all the bits of the row address, as in the case of FIG.
[0166]
FIG. 17 shows a specific circuit configuration of the page hit determination circuit 126 of FIG.
[0167]
As shown, the page hit determination circuit 126 includes a register file 301, a page hit determination CPU address register 302, a match determination circuit 303, a mask circuit 304, and a match determination mask position register 305.
[0168]
The register file 301 is an I / O register readable / writable by the CPU 11, and includes mask data (for specifying whether or not to match a condition for matching with a CPU address used for a page hit determination). “0” = mask, “1” = no mask) are set as control parameters corresponding to each of the RAS0-RAS5 lines.
[0169]
That is, in the page hit determination, the row address (page address) and the RAS decoding address other than the remaining addresses excluding the intra-page address in the CPU address (A31: 02), that is, the portion corresponding to the column address are removed. Address is targeted. Since the portion corresponding to the column address is not involved in the page hit determination, the determination result of 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 is always matched.
[0170]
Actually, the mask data corresponding to each RAS line is not composed of all the bits of the column address, but is composed of 3-bit data indicating whether or not to mask each of A12, A11, and A10. This is because the match determination circuit 303 excludes bits lower than A10, which is always used as a column address, from the match determination regardless of the type of the DRAM bank, and determines only bits higher than A10 as targets of the match determination. This is because whether or not each of the three bits A12, A11, and A10 is used as a part of the column address differs depending on the type of the DRAM bank.
[0171]
For example, when a type 1 DRAM bank (the number of column address bits = 9 bits) is connected to the RAS0 line, of the three bits A12, A11, and A10, only A10 is used as a part of the column address. You. At this time, mask data “110” corresponding to the RAS0 line is set in the register file 301.
[0172]
One of the six mask data set in the register file 301 is read from the register file 301 and set in the coincidence determination mask position register 305. Which mask data is read is determined by the decoding result output of the RAS decoder 122. For example, when the RAS decoder 122 activates the RAS line, the mask data corresponding to the RAS line is read from the register file 301.
[0173]
The page hit determination CPU address register 302 holds 17 bits A26 to A11 of the CPU address (A31: 02) at the time of the previous memory access as the page hit determination CPU address. The contents of the page hit determination CPU address register 302 are updated according to the CPU address (A31: 02) used for the memory access at the time when a bank miss or a page miss occurs without a page hit. That is, when a bank miss or a page miss occurs, the timing control circuit 125 generates a register update signal. In response to this register update signal, the CPU address (A26 to A11) output on the CPU address bus at that time is latched by the page hit determination CPU address register 302. As a result, the contents of the page hit determination CPU address register 302 are changed to the CPU address at the time of the memory cycle in which the bank miss or the page miss has occurred.
[0174]
The match determination circuit 303 detects, for each bit, a match / mismatch between the CPU address (A26 to A11) at the time of the current memory access and the CPU address (A26 to A11) held in the page hit determination CPU address register 302. Then, 17-bit data indicating the detection results of A26 to A11 is output.
[0175]
The mask circuit 304 masks the detection result outputs of A12, A11, and A10 among the detection results of A26 to A11 in accordance with the mask data of the coincidence determination mask position register 305, and the detection result outputs after masking indicate all coincidence. Sometimes a page hit signal HIT is generated.
[0176]
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 RAS decoder 122 when a bank miss or a page miss occurs without a page hit. That is, when a bank miss or a page miss occurs, the timing control circuit 125 generates a register update signal. In response to the register update signal, the mask data in the register file 301 selected by the RAS decoder 122 at that time is latched by the coincidence determination mask position register 305. As a result, the contents of the match determination mask position register 305 are changed to mask data corresponding to the RAS line activated at the time of the memory cycle in which the bank miss or page miss has occurred.
[0177]
As described above, in the system of this embodiment, the memory size of each of the plurality of DRAM banks is detected by the read / write compare test, and the size of the memory size is determined regardless of the physical mounting position of the DRAM banks. The arrangement order of the DRAM banks in the memory address space is determined according to the relationship. Therefore, no matter what type of additional memory is installed in any order, the optimal memory arrangement is automatically reset again, and the DRAM banks in the system are always arranged in the order of their memory size. Allocated from the youngest in the logical address space.
[0178]
Under such a memory arrangement, the RAS decoder 122 only needs to detect a match / mismatch between the memory address value from the CPU and the decoding condition for each RAS. Therefore, the hardware configuration of the RAS decoder 122 can be greatly simplified as compared with the related art, so that the delay in the RAS decoder is reduced and the memory access speed can be increased. Further, in this configuration, if the decoding conditions of the two different RAS lines are set to the same value, the two RAS lines can be simultaneously activated, so that application such as switching the access data width to twice is also possible.
[0179]
If a part of the address in the page is used as a decoding condition, word interleaving can be realized.
[0180]
【The invention's effect】
As described above, according to the present invention, decoding conditions of the RAS decoder can be simplified by optimally arranging DRAM banks in a system in a memory address space according to their memory sizes. Therefore, the RAS decoder only needs to detect the coincidence / mismatch between the memory address value from the CPU and the decoding condition for each RAS line, and the hardware configuration can be greatly simplified as compared with the related art.
[0181]
When such a configuration of the RAS decoder is employed, the page interleave architecture can be easily realized only by changing the decoding conditions set in the RAS decoder.
[0182]
Therefore, simplification of the RAS decoder and effective use of the interleave architecture can be achieved, and higher memory access speed can be realized.
[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 a block diagram showing a memory control logic in a system controller provided in the system of the embodiment.
FIG. 3 is a diagram showing a conversion operation from a CPU memory address space to a DRAM logical address space performed by an address conversion circuit included in the memory control logic of FIG. 2;
FIG. 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 a DRAM logical address space in order of memory size.
FIG. 5 is an exemplary view showing decoding conditions of RAS lines connected to a plurality of DRAM banks provided in the system of the embodiment.
FIG. 6 is an exemplary view showing decoding conditions of each RAS line employed when implementing the page interleave architecture in the system of the embodiment.
FIG. 7 is an exemplary flowchart showing the procedure of an initialization process for memory control logic executed by an IRT routine when the system of the embodiment is turned on.
FIG. 8 is a view showing an example of the types of DRAM banks supported by the system of the embodiment.
FIG. 9 is an exemplary view showing an example of a memory configuration of a system memory mounted as standard on a system board of the system of the embodiment.
FIG. 10 is an exemplary view showing an example of a memory configuration of an additional memory installed in an extended memory slot provided in the system of the embodiment.
FIG. 11 is an exemplary view showing an example of another memory configuration of the additional memory mounted on the extended memory slot provided in the system of the embodiment.
FIG. 12 is a flowchart showing a procedure of a memory size detection process of each DRAM bank executed in the initialization process of the memory control logic of FIG. 7;
FIG. 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;
FIG. 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;
FIG. 15 is a diagram for explaining a 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 the row address / column address multiplexer included in the memory control logic of FIG. 2;
FIG. 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;
[Explanation of symbols]
11: CPU, 12: System controller, 13: System memory, 21, 22: Extended memory slot, 31: CPU local bus, 33: Memory address bus, 41, 42: Additional memory, 120: Memory control logic, 121: Address Conversion circuit, 122 RAS decoder, 123 row / column address multiplexer, 124 CAS generation circuit, 125 timing control circuit, 126 page hit determination circuit, 51 to 56 RAS decode circuit, 71 to 79 match detection Circuits, 81 to 89: mask circuit, 91: AND circuit, 201, 301: register file, 202: pattern decoder, 203: row address selector, 204 to 207: row address start position switching circuit, 208: row address / column address SEREC , 302 ... page hit determination CPU address register, 303 ... match determining circuit, 304 ... masking circuit, 305 ... matching determination mask location register.

Claims (8)

複数のアクセス制御信号がそれぞれ割り当てられ、互いに独立してアクセス可能な複数のメモリバンクと、
前記複数のアクセス制御信号にそれぞれ対応する複数のデコード条件が設定され、それらデコード条件とCPUからのメモリアドレスとの一致の有無を検出し、一致したデコード条件に対応するアクセス制御信号線を付勢してメモリバンクを選択するアドレスデコーダと、
前記複数のメモリバンクそれぞれのメモリサイズを検出する手段と、
メモリサイズの大きいバンクほどCPUのメモリアドレス空間の若い方に配置されるように前記複数のメモリバンクをメモリサイズ順に前記メモリアドレス空間に再配置し、このメモリ配置に従って前記複数のメモリバンクそれぞれに割り当てるべきメモリアドレス範囲を決定するメモリ再配置手段と、
前記複数のメモリバンクのメモリ配置に従って、ページインタリーブ可能な2以上のメモリバンクの組み合わせを決定する手段と、
前記組み合わせに属するメモリバンクがページ単位で交互にアクセスされるように、前記組み合わせに属するメモリバンクそれぞれに対応するアクセス制御信号線のデコード条件を、前記組み合わせに属するメモリバンク全体のアドレス範囲に属する全てのメモリアドレス値それぞれを示す2値データに共通に存在するビット列と、各メモリバンクのページ内アドレスとページ指定アドレスとの間の所定ビット列とに従って決定して、前記アドレスデコーダに設定する手段とを具備することを特徴とするコンピュータシステム。
A plurality of memory banks to which a plurality of access control signals are respectively assigned and which can be accessed independently of each other;
A plurality of decoding conditions respectively corresponding to the plurality of access control signals are set, the presence or absence of a match between the decoding conditions and a memory address from the CPU is detected, and an access control signal line corresponding to the matched decoding condition is activated. An address decoder for selecting a memory bank
Means for detecting a memory size of each of the plurality of memory banks;
The plurality of memory banks are rearranged in the memory address space in the order of the memory size such that the larger the memory size is, the lower the memory address space of the CPU is. Memory relocation means for determining a memory address range to be
Means for determining a combination of two or more memory banks that can be page-interleaved according to the memory arrangement of the plurality of memory banks;
The decoding conditions of the access control signal lines corresponding to the memory banks belonging to the combination are changed so that the memory banks belonging to the combination belong to the entire address range of the entire memory banks so that the memory banks belonging to the combination are alternately accessed in page units. Means for determining in accordance with a bit string commonly existing in binary data indicating each memory address value and a predetermined bit string between an in-page address and a page designation address of each memory bank, and setting the address in the address decoder. A computer system, comprising:
前記アドレスデコーダは、
前記複数のアクセス制御信号線それぞれに対応する複数のデコード条件を示す複数のビット列が設定されるレジスタ群と、
前記複数のアクセス制御信号線に対応してそれぞれ設けられた複数のデコード回路とを有し、
各デコード回路は、それに対応するアクセス制御信号線のデコード条件を示すビット列と前記CPUからのメモリアドレスとの一致の有無を検出し、一致した際にアクセス制御信号線を付勢することを特徴とする請求項1記載のコンピュータシステム。
The address decoder,
A register group in which a plurality of bit strings indicating a plurality of decoding conditions respectively corresponding to the plurality of access control signal lines are set;
A plurality of decoding circuits respectively provided corresponding to the plurality of access control signal lines,
Each decoding circuit detects whether a bit string indicating a decoding condition of an access control signal line corresponding to the decoding circuit matches a memory address from the CPU, and activates the access control signal line when they match. The computer system of claim 1, wherein
前記各メモリバンクは複数のDRAMチップから構成されたDRAMバンクであり、Each of the memory banks is a DRAM bank composed of a plurality of DRAM chips,
前記各アクセス制御信号線は、前記DRAMバンクのDRAMチップに共通接続されるロウアドレスストローブ信号線であることを特徴とする請求項1記載のコンピュータシステム。2. The computer system according to claim 1, wherein each of the access control signal lines is a row address strobe signal line commonly connected to a DRAM chip of the DRAM bank.
前記メモリサイズ検出手段は、The memory size detection means,
DRAMバンク毎にそのカラムアドレスサイズおよびロウアドレスサイズの少なくとも一方を検出し、その検出したアドレスサイズに基づいて各DRAMバンクのメモリサイズを決定するアドレスサイズ検出手段を含むことを特徴とする請求項3記載のコンピュータシステム。4. An address size detecting means for detecting at least one of a column address size and a row address size for each DRAM bank, and determining a memory size of each DRAM bank based on the detected address size. Computer system as described.
前記CPUからのメモリアドレスをアクセス対象のDRAMバンクに対応するロウアドレスおよびカラムアドレスに分解して出力するアドレス出力手段をさらに具備し、Address output means for decomposing a memory address from the CPU into a row address and a column address corresponding to a DRAM bank to be accessed and outputting the same;
このアドレス出力手段は、This address output means,
前記メモリアドレスからロウアドレスを切り出すための切り出し開始位置を前記RAS信号線毎に指定する複数のパラメタ値がセットされるレジスタ群と、A register group in which a plurality of parameter values for specifying a cutout start position for cutting out a row address from the memory address for each of the RAS signal lines;
前記アドレスデコーダによって付勢されたロウアドレスストローブ信号線に応じて前記レジスタ群から1つのパラメタ値を選択し、その選択されたパラメタ値に従って前記メモリアドレスからロウアドレスを切り出す手段とを含むことを特徴とする請求項3記載のコンピュータシステム。Means for selecting one parameter value from the register group in accordance with a row address strobe signal line activated by the address decoder, and cutting out a row address from the memory address in accordance with the selected parameter value. The computer system according to claim 3, wherein
前記CPUからのメモリアドレスをアクセス対象のDRAMバンクに対応するロウアドレスおよびカラムアドレスに分解して出力するアドレス出力手段をさらAddress output means for decomposing a memory address from the CPU into a row address and a column address corresponding to a DRAM bank to be accessed and outputting the same; に具備し、Prepared for
このアドレス出力手段は、This address output means,
前記メモリアドレスからロウアドレスを切り出すための切り出し開始位置を前記RAS信号線毎に指定する複数のパラメタ値がセットされるレジスタ群と、A register group in which a plurality of parameter values for specifying a cutout start position for cutting out a row address from the memory address for each of the RAS signal lines;
このレジスタ群にセットされた複数のパラメタ値に応じて、前記メモリアドレスからロウアドレスをそれぞれ切り出す複数のロウアドレス切り出し手段と、A plurality of row address extracting means for extracting a row address from the memory address according to a plurality of parameter values set in the register group;
これら複数のロウアドレス切り出し手段の後段に接続され、前記アドレスデコーダによって付勢されたロウアドレスストローブ信号線に応じて前記複数のロウアドレス切り出し手段の出力の1つを選択する手段とを含むことを特徴とする請求項3記載のコンピュータシステム。Means for selecting one of the outputs of the plurality of row address extraction means in accordance with a row address strobe signal line energized by the address decoder, which is connected to a stage subsequent to the plurality of row address extraction means. The computer system according to claim 3, wherein:
前記CPUのメモリアドレス空間には前記複数のDRAMバンク以外のメモリを配置するための予約領域が確保されており、A reserved area for allocating a memory other than the plurality of DRAM banks is reserved in a memory address space of the CPU,
前記アドレスデコーダの前段に設けられ、前記予約領域の直前および直後のDRAMバンク間でそれらに割り当てられるメモリアドレスが連続されるように、前記CPUのメモリマップに応じて、前記CPUからのメモリアドレスをDRAMバンク専用のDRAM論理アドレスに変換するアドレス変換手段をさらに具備し、A memory address from the CPU is provided in accordance with a memory map of the CPU so that memory addresses allocated to the DRAM bank immediately before and immediately after the reserved area are provided in a preceding stage of the address decoder. Address conversion means for converting to a DRAM logical address dedicated to the DRAM bank;
前記アドレスデコーダは、前記アドレス変換手段によって変換されたDRAM論理アドレスと前記各デコード条件との一致の有無を検出することを特徴とする請求項3記載のコンピュータシステム。4. The computer system according to claim 3, wherein the address decoder detects whether or not the DRAM logical address converted by the address conversion unit matches each of the decoding conditions.
前回のメモリアクセス時におけるCPUからのメモリアドレスを保持し、そのメモリアドレスと次回のメモリアクセス時におけるCPUからのメモリアドレスとを比較し、その比較結果に応じてページヒットの有無を判定するページヒット判定手段をさらに具備することを特徴とする請求項3記載のコンピュータシステム。A page hit that holds the memory address from the CPU at the time of the previous memory access, compares the memory address with the memory address from the CPU at the next memory access, and determines whether there is a page hit according to the comparison result. 4. The computer system according to claim 3, further comprising a determination unit.
JP23812194A 1993-12-28 1994-09-30 Computer system Expired - Fee Related JP3540388B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP23812194A JP3540388B2 (en) 1994-09-30 1994-09-30 Computer system
US08/364,720 US5706407A (en) 1993-12-28 1994-12-27 System for reallocation of memory banks in memory sized order
US08/893,926 US6016548A (en) 1993-12-28 1997-07-15 Apparatus for controlling duty ratio of power saving of CPU

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23812194A JP3540388B2 (en) 1994-09-30 1994-09-30 Computer system

Publications (2)

Publication Number Publication Date
JPH08101792A JPH08101792A (en) 1996-04-16
JP3540388B2 true JP3540388B2 (en) 2004-07-07

Family

ID=17025497

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23812194A Expired - Fee Related JP3540388B2 (en) 1993-12-28 1994-09-30 Computer system

Country Status (1)

Country Link
JP (1) JP3540388B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010001622A1 (en) * 2008-07-03 2010-01-07 株式会社バッファロー Memory module and auxiliary module for memory

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7426625B2 (en) 2004-03-31 2008-09-16 International Business Machines Corporation Data processing system and computer program product for support of system memory addresses with holes
CN103827838A (en) * 2011-09-28 2014-05-28 松下电器产业株式会社 Memory control system and power control method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010001622A1 (en) * 2008-07-03 2010-01-07 株式会社バッファロー Memory module and auxiliary module for memory
CN102077180A (en) * 2008-07-03 2011-05-25 巴比禄股份有限公司 Memory module and auxiliary module for memory
CN102077180B (en) * 2008-07-03 2013-07-31 巴法络股份有限公司 Memory module and auxiliary module for memory

Also Published As

Publication number Publication date
JPH08101792A (en) 1996-04-16

Similar Documents

Publication Publication Date Title
US5706407A (en) System for reallocation of memory banks in memory sized order
JP3590413B2 (en) Memory controller
US5737750A (en) Partitioned single array cache memory having first and second storage regions for storing non-branch and branch instructions
US5752260A (en) High-speed, multiple-port, interleaved cache with arbitration of multiple access addresses
US10403333B2 (en) Memory controller with flexible address decoding
US5555528A (en) Dynamic random access memory persistent page implemented as processor register sets
EP1891642B1 (en) Partial page scheme for memory technologies
CA2116985C (en) Memory system
US6049855A (en) Segmented memory system employing different interleaving scheme for each different memory segment
US5848258A (en) Memory bank addressing scheme
US7350016B2 (en) High speed DRAM cache architecture
US7136985B2 (en) Method and system for fast data access using a memory array
US5329489A (en) DRAM having exclusively enabled column buffer blocks
US6678790B1 (en) Microprocessor chip having a memory that is reconfigurable to function as on-chip main memory or an on-chip cache
JPH08227380A (en) Data-processing system
US20040024952A1 (en) Techniques to map cache data to memory arrays
EP0549218A1 (en) A memory apparatus and method for use in a data processing system
US5761714A (en) Single-cycle multi-accessible interleaved cache
US6553478B1 (en) Computer memory access
JP3540388B2 (en) Computer system
US6888777B2 (en) Address decode
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
US6941421B2 (en) Zero delay data cache effective address generation
EP0310446A2 (en) Cache memory management method

Legal Events

Date Code Title Description
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: 20040323

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040325

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

Free format text: PAYMENT UNTIL: 20080402

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090402

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100402

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees