JP3563340B2 - Memory controller - Google Patents

Memory controller Download PDF

Info

Publication number
JP3563340B2
JP3563340B2 JP2000330155A JP2000330155A JP3563340B2 JP 3563340 B2 JP3563340 B2 JP 3563340B2 JP 2000330155 A JP2000330155 A JP 2000330155A JP 2000330155 A JP2000330155 A JP 2000330155A JP 3563340 B2 JP3563340 B2 JP 3563340B2
Authority
JP
Japan
Prior art keywords
memory
wait
signal
synchronous
dma
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
JP2000330155A
Other languages
Japanese (ja)
Other versions
JP2002132711A (en
Inventor
稔 吉永
Original Assignee
Necマイクロシステム株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Necマイクロシステム株式会社 filed Critical Necマイクロシステム株式会社
Priority to JP2000330155A priority Critical patent/JP3563340B2/en
Publication of JP2002132711A publication Critical patent/JP2002132711A/en
Application granted granted Critical
Publication of JP3563340B2 publication Critical patent/JP3563340B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明はメモリコントローラに係わり、特に外部メモリに非同期系メモリおよび同期系メモリがそれぞれ接続される場合のシングルアドレスDMA転送を最小ウェイト数でメモリアクセスサイクルを発生するメモリコントローラに関する。
【0002】
【従来の技術】
近年、半導体素子の微細化技術の進展に伴い、その半導体素子で構成するLSIも大規模化しており、特に半導体メモリの分野ではその傾向が顕著である。
【0003】
例えば、1チップに256メガビットの容量を有する半導体メモリとしてダイナミック型ランダムアクセスメモリ(DRAM)やシンクロナス・ダイナミック・ランダムアクセス・メモリ(SDRAM)も実用化されている。
【0004】
これらの半導体メモリを外部メモリとして接続するシングルチップ・マイクロコンピュータの動作速度の向上も著しく、接続される外部メモリは容量増加とともに動作速度の向上も期待が大きくなる所以である。
【0005】
外部メモリを接続する場合、シングルチップ・マイクロコンピュータの中央演算処理部(以下、CPUと称す)を介さずに、メモリとI/O装置間でデータ転送を行うダイレクトメモリアクセス(以下、DMAと称す)が行われている。
【0006】
シングルアドレスDMA転送は、外部メモリからI/Oデバイスにデータを転送するとき、メモリにリードストローブ信号を供給する一方、I/Oデバイスにはライトストローブ信号を供給することにより、データバス上にはメモリから読み出したリードデータが出力されてくる。このデータバス上に読み出されてきたデータをI/Oデバイスに書き込んでいる。
【0007】
一方、I/Oデバイスから外部メモリにデータを転送するとき、メモリにリードストローブ信号を供給する一方、I/Oデバイスにはライトストローブ信号を供給することにより、データバス上にI/Oデバイスから読み出したリードデータを外部メモリに書き込む。
【0008】
この種の従来のウェイト制御の一例が特開平4−241056号公報に記載されている。同公報記載のウェイト信号制御部は、CPUとDMAコントローラとの接続端子2A、ウェイト信号出力端子2B、ウェイト設定レジスタ21、デバイスデコーダ22、ウェイト信号発生部23とを備える。
【0009】
ウェイト設定レジスタ21は、I/Oデバイスのアクセススピードに対応したウェイト数を予めCPUから設定される。
【0010】
デバイスデコーダ22は、現在のDMA動作中のI/Oデバイスを検出してそのデバイスに対応したウェイト数をレジスタ21より導出する。
【0011】
この導出されたウェイト数はウェイト信号発生部23へ入力され、このウェイト数に応じたウェイト信号が発生される。
【0012】
このウェイト制御部は、予めプログラムにより各デバイスのDMA時に挿入すべきウェイト数を設定しておくので、アクセススピードに関係なく各デバイスに適切なウェイト数が設定でき、DMAレートを悪化させないというものである。
【0013】
この種のシングルアドレスDMA転送を制御するメモリコントローラに対し本発明では後述するように、特に高速アクセスが可能なCPUなどからのアクセスについては最小ウエイト数でアクセスすることでデータの転送レートを確保し、また高速なメモリから低速なメモリへのシングルアドレスDMA転送については、低速なメモリのデータアクセス時間に合わせたウエイト数を、高速メモリの動作サイクルに挿入したい場合の構成を開示するものである。
【0014】
一般的に、SDRAMへのアクセスは、そのSDRAMの特性を生かすため、CPUからのアクセスはノーウエイトの高速アクセスを行うのが通常である。
【0015】
したがって、通常、メモリコントローラはデータウエイト機能を持たないのであるが、シングルチップ・マイクロコンピュータの応用分野においては、SDRAMから低速なデバイスへのシングルアドレスDMA転送においても、転送先である低速デバイスへ最高速な転送が行えることが要求されている。
【0016】
【発明が解決しようとする課題】
上述したように従来の一般的なシングルチップ・マイクロコンピュータに搭載されているメモリコントローラでは、DMA転送に特化したウエイトのコントロールが行われていなかった。その欠点を改善する一例として前述した特開平4−241056号公報の例があるが、いずれもSDRAMアクセスに関しては、データウエイトを行うことも考慮されていなかった。すなわち、通常であれば例えば1クロック期間のみ出力されるデータを、2〜数クロック期間まで出力するようにデータ出力期間延ばすことで、I/Oデバイスへの書込誤動作を避けるためのデータウエイトを行っていないのである。
【0017】
そのため、DMA転送対象の一方がSDRAMであった場合、転送先の低速デバイスのスペックを満足することが出来ず、シングルアドレスモードDMA転送は実現できない場合が多かった。
【0018】
つまり、一般的なマイクロコンピュータにおいてはSDRAMアクセス時にデータウエイトを行うことが考慮されていないため、SDRAMへのアクセスは常時1CLKピッチで行われている。すなわち、データ出力期間はリード/ライト共1CLK分しか出力されていない。
【0019】
そのため、例えばバス動作周波数が100MHzの製品でSDRAMのデータ出力遅延値が5nsであった場合、I/Oデバイスへのライトストローブ信号の有効期間にデータが準備できないことになり転送ができない。
【0020】
つまり、1CLKピッチの場合、I/Oデバイスへのライトストローブ信号は半クロックでトグルさせることになるからである。
【0021】
また、I/Oデバイスへの書き込みをSDRAMへ供給されているクロックの立ち上がり同期で行うシステムを想定した場合でも、SDRAMのデータ出力遅延が5nsであったとすると、I/Oデバイス書き込みのデータセットアップ時間は5ns以内でなければならず、低速I/Oデバイスでこの5nsのセットアップ時間を実現することは難しく、結局、SDRAM対I/Oのシングルアドレス転送は出来ないということになる。
【0022】
本発明の目的は、上述した従来の欠点に鑑みなされたものであり、CPUアクセスにおける転送レートを落とすことなく、転送対象の低速なメモリのスペックに合わせたシングルアドレスモードDMA転送を実現することにある。
【0023】
【課題を解決するための手段】
本発明のメモリコントローラの特徴は、CPUと同期系メモリとの間のデータ転送を行うときには前記同期系メモリにアクセスするときのウェイトに基づく第1の動作サイクルを発生し、前記CPUと非同期系メモリとの間のデータ転送を行うときには前記非同期系メモリにアクセスするときのウェイトに基づく第2の動作サイクルを発生し、前記同期系メモリと前記非同期系メモリとの間のシングルアドレスDMA転送を行うときには前記シングルアドレスDMA転送時のウェイトに基づく第3の動作サイクルを発生し前記同期系メモリに供給するメモリアクセス制御信号生成回路を備えることにある。
【0024】
本発明のメモリコントローラの他の特徴は、DMA転送対象となる、低速動作用の非同期系メモリを含め周辺デバイスが接続されるI/Oデバイスと高速動作用の同期系メモリとに対応するメモリコントローラウエイト制御手段として、前記同期系および前記非同期系の外部メモリにアクセスするときのウェイト数があらかじめCPUから設定されるウェイト設定レジスタ手段と、前記外部メモリのうち高速動作用のメモリから低速動作用のメモリへのシングルアドレスDMA転送時のウェイト数があらかじめ前記CPUから設定されるDMA転送用ウェイト設定レジスタと、シングルアドレスDMA転送要求およびメモリアクセス要求により前記ウェイト設定レジスタおよび前記DMA転送用ウェイト設定レジスタのいずれか一方の有するウェイト数を選択的に出力するウェイト選択手段と、前記ウェイト選択手段で選択されたウェイト数を挿入したメモリアクセスサイクルを生成して出力するメモリアクセス制御信号発生手段することにある。
【0025】
また、 前記メモリアクセス制御信号発生手段は、前記高速動作用の同期系メモリをアクセスするアドレス信号とクロックイネーブル信号とを含むあらかじめ定めた所定の制御信号出力手段と前記低速動作用の非同期系メモリをアクセスするアドレス信号とライトストローブ信号とリード信号とを含むあらかじめ定めた所定の制御信号出力手段との他に、前記非同期系メモリ用制御信号生成手段と前記I/Oデバイスと前記同期系メモリ用制御信号生成手段と前記同期系メモリとを共通接続する双方向のデータバス手段をさらに備えて構成することができる。
【0026】
さらに、DMA転送対象の前記同期系メモリがシンクロナス・ダイナミック・ランダムアクセス・メモリ(SDRAM)である場合に、前記SDRAMに対する前記クロックイネーブル信号を非活性レベルにして、前記I/Oデバイスの転送速度に合わせた前記SDRAMアクセスを実行することもできる。
【0027】
さらにまた、前記メモリアクセス制御信号生成手段は、前記同期系メモリおよび前記I/Oデバイスにアクセスして双方向のDMA転送を実行する場合に、複数のウェイト設定レジスタ手段から選択されたウエイト数によりメモリアクセスサイクルを発生してDMA転送制御をすることもできる。
【0028】
また、前記シングルアドレスDMA転送時は、前記DMA転送用ウエイト設定レジスタのウエイト数を前記DMA転送要求に基づき選択してシングルアドレスDMA転送サイクルを発生させることもできる。
【0029】
さらに、前記シングルアドレスDMA転送時に、DMA転送対象の前記同期系メモリおよび前記I/Oデバイスのうち動作速度の遅い方に合わせたメモリアクセスを実行することもできる。
【0030】
さらにまた、前記非同期系メモリ用信号生成手段は、DMAシングルアドレス転送用のライトストローブ信号を生成し、このライトストローブ信号により前記同期系メモリのリードサイクル中にシングルアドレスDMA転送を行うこともできる。
【0031】
本発明のメモリコントローラのさらに他の特徴は、DMA転送対象となる、低速動作用の非同期系メモリを含め周辺デバイスが接続されるI/Oデバイスと高速動作用の同期系メモリとに対するメモリコントローラウエイト制御手段として、前記同期系および前記I/Oデバイスにアクセスするときのウェイト数があらかじめCPUから設定されるウェイト設定レジスタ手段と、シングルアドレスDMA転送要求およびメモリアクセス要求により前記ウェイト設定レジスタのウェイト数を選択的に出力するウェイト選択手段と、前記ウェイト数を挿入したメモリアクセスサイクルを生成して出力するメモリアクセス制御信号発生手段とを備えて構成することにある。
【0032】
また、前記メモリアクセス制御信号発生手段は、非同期系メモリ用信号生成手段および同期系メモリ用信号生成手段から構成され、前記非同期系メモリ用信号生成手段が、前記I/Oデバイスをアクセスするアドレス信号およびライトストローブ信号を含むあらかじめ定めた所定の制御信号供給手段を有し、前記非同期系メモリのアクセス時には、CPUからのアドレスアクセスまたは前記ライトストローブ信号によるアクセスのいずれかを実行することができる。
【0033】
さらに、前記同期系メモリは、前記ウェイト設定レジスタ手段を介さず直接CPUからノーウェイトでアクセスすることもできる。
【0034】
さらにまた、前記同期系メモリと前記非同期系メモリを含め周辺デバイスからなるI/Oデバイスとの間におけるDMA転送時は、前記ウェイト設定レジスタ手段のウェイト数に基づきシングルアドレスDMA転送サイクルを発生させることもできる。
【0035】
本発明のメモリコントローラの他の特徴は、DMA転送対象となる、低速動作用の非同期系メモリを含め周辺デバイスからなるI/Oデバイスと高速動作用の同期系メモリとに対するメモリコントローラウエイト制御手段として、所定のウェイト数を挿入したメモリアクセスサイクルを生成して出力するメモリアクセス制御信号発生手段を備え、前記メモリアクセス制御信号発生手段は、非同期系メモリ用信号生成手段および同期系メモリ用信号生成手段から構成され、前記非同期系メモリ用信号生成手段が、前記非同期系メモリをアクセスするアドレス信号およびライトストローブ信号を含むあらかじめ定めた所定の制御信号の供給手段を有するとともに、前記同期系メモリ用信号生成手段が前記I/Oデバイスからウェイト信号を与えられ、かつ同期系メモリをアクセスするアドレス信号およびクロックイネーブル信号を含むあらかじめ定める制御信号出力手段とを有し、前記ウェイト信号に応じて活性、非活性が制御される前記クロックイネーブル信号に基づくウェイトが挿入されたシングルアドレスDMA転送のメモリサイクルを発生することにある。
【0038】
【発明の実施の形態】
まず、本発明の概要を述べると、図1に示すように本発明によるメモリコントローラは、高速アクセスが可能なCPU(図示せず)などからのアクセスについては最小ウエイト数でアクセスすることでデータの転送レートを確保する。また、高速なメモリから低速なメモリへのシングルアドレスDMA転送では、低速なメモリのデータアクセス時間に合わせたウエイト数を、高速メモリの動作サイクルに挿入してデータの転送レートを確保する技術を開示するものである。
【0039】
次に、本発明によるメモリコントローラの第1の実施形態のブロック図を示した図1を参照すると、メモリコントローラは、ウェイト設定レジスタ11,DMA転送用ウェイト設定レジスタ12,セレクタ13,メモリアクセス制御信号生成回路14,非同期系メモリ用信号生成回路15,SDRAM用信号生成回路16,I/Oデバイス(低速動作用の非同期系メモリ、I/O)17およびSDRAM(高速動作用の同期系メモリ)18を備える。
【0040】
すなわち、DMA転送対象となる、低速動作用の非同期系メモリ等が接続されるI/Oデバイス17と高速動作用の同期系メモリSDRAM18とに対するメモリコントローラウエイト制御手段として、外部メモリのI/Oデバイス17,SDRAM18にアクセスするときのウェイト数があらかじめCPUから設定されるウェイト設定レジスタ11と、I/Oデバイス17,SDRAM18のうち高速動作用のSDRAM18から低速動作用のI/Oデバイス17へのシングルアドレスDMA転送時のウェイト数が、あらかじめCPUから設定されるDMA転送用ウェイト設定レジスタ12とを有する。
【0041】
また、シングルアドレスDMA転送要求DMA_ERQおよびメモリアクセス要求M_REQによりウェイト設定レジスタ11およびDMA転送用ウェイト設定レジスタ12のいずれか一方の有するウェイト数を選択的に出力するセレクタ(ウェイト選択手段)13も有する。
【0042】
さらに、セレクタ13で選択されたウェイト数を挿入したメモリアクセスサイクルを生成して出力するメモリアクセス制御信号発生回路(メモリアクセス制御信号発生手段)14も有して構成される。
【0043】
CPUアクセス用のウエイト設定レジスタ11とDMA転送用ウエイト設定レジスタ12とはプログラマブルなレジスタである。
【0044】
セレクタ13は、2つの入力信号、すなわちメモリアクセス要求信号M_REQおよびDMA転送要求DMA_REQにより、上述した2つのウエイト設定レジスタ11,12のうち、どちらの設定値を採用するかを選択する。
【0045】
メモリアクセス制御信号生成回路14は、セレクタ13により選択されたウエイト数を挿入したメモリアクセスサイクルを発生させる。
【0046】
また、この例では、メモリアクセス制御信号生成回路14の内部に、非同期系メモリ(SRAM、I/O等)のアクセス信号を生成する非同期系メモリ用信号生成回路15を備える。
【0047】
また、非同期系メモリ用信号生成回路15は、DMAシングル転送用のライトストローブ信号DMA_WEをI/Oデバイスに出力する出力手段も備えており、SDRAMのリードサイクル中にこのライトストローブ信号DMA_WEを活性化させることにより、シングルアドレスDMA転送を行うことが出来る。
【0048】
その他の信号としてアドレスADR、チップセレクト信号CS、リード信号RDおよびライト信号WRをI/Oデバイス側に供給する。
【0049】
さらに、メモリアクセス制御信号生成回路14の内部にSDRAMアクセス信号を生成するSDRAM用信号生成回路16も備えている。
【0050】
SDRAM用信号生成回路16は、SDRAM18に対し、ADR、CLK、RAS、CAS、WE、CKEおよびDQMのクロックおよび制御信号を出力する。
【0051】
ここで、信号CLKはSDRAM18の動作クロックであり、アドレスADRはSDRAM18に対するアドレス、信号RASはSDRAM18に対するロウアドレスストローブ信号である。
【0052】
信号CASはSDRAM18に対するカラムアドレスストローブ信号であり、信号WEはSDRAM18に対するライトイネーブル信号であり、信号CKEはSDRAM18に対するクロックイネーブルである。
【0053】
信号DQMはSDRAM18に対するデータマスク信号であり、信号DMA_WEはI/Oデバイス17に対するライトストローブ信号である。
【0054】
また、非同期系メモリ用信号生成回路15とI/OデバイスとSDRAM用信号生成回路16とI/Oデバイスとの間を共通接続する双方向のデータバスDを設けてある。
【0055】
以下、本実施の形態の動作を図1およびその動作説明用のタイミングチャートであって、SDRAMからI/OデバイスへのシングルアドレスDMA転送のタイミングを示す図2を参照しながら動作を説明する。
【0056】
まず図2において、SDRAM18へのアクセスは、CASレーテンシが2、バースト長は4、バンク/ページはヒットした状態でアクセスはスタートしたものとする。また、DMA転送用ウエイト設定レジスタ12にはウエイト数1が設定されているものとする。
【0057】
ここでいうレーテンシとは、メモリセルのデータの読み出し指示を行ってからデータが読み出されて外部へ出力されるまでの時間を示すものである。したがって、CAS信号を有効化してから実際にデータが出力されるまでのレーテンシをCASレーテンシとしている。
【0058】
例えば、ロウアドレスを指定し、RAS信号を有効化し、与えられたロウアドレスに対応するワード線を活性化する。カラムアドレスを指定し、CAS信号を有効化して、与えられたカラムアドレスに対応するディジット線を選択することにより、所望のメモリセルが選択される。
【0059】
また、バースト長とは、リードサイクルまたはライトサイクルで出力または入力されるワード数である。
【0060】
T1ステートにSDRAM18には、アドレスADRはADmが与えられ、CAS信号がT1ステート期間だけロウレベルでアクティブにされ、RAS信号はハイレベルが与えられ、データマスク信号DQMはロウレベル、I/Oデバイス17にはライトストローブ信号DMA_WEがハイレベルでそれぞれ与えられている状態である。
【0061】
まず、メモリコントローラは、DMA転送要求DMA_REQを受け付けると、T1ステートでSDRAM18にリードコマンドを発行する。
【0062】
ここで、DMA転送用ウエイト設定レジスタ12にはウエイト数1が設定されているので、本発明に従って、SDRAM18から出力されるデータにウエイトをかけるためT2ステートでクロックイネーブル信号CKEをディセーブルにする。
【0063】
このディセーブルにより、通常はT3ステートのみに出力されるデータDが、1CLK分延長され、低速デバイスの書き込み時間をT4ステートまで確保する。
【0064】
また、非同期系メモリ用信号生成回路15は、SDRAM18から出力されているデータDを取り込むために、DMA_WEをT3ステートからT4ステートにかけてロウアクティブにし、データを取り込む。
【0065】
T5ステートからT10ステートまでは上述した動作の繰り返しである。
【0066】
従来のメモリコントローラの場合は、転送先のI/Oデバイスが低速で1CLKピッチでのシングルアドレス転送が実現出来なかった場合、DMA転送をデュアルアドレス転送で行わざるを得なかった。
【0067】
例えば、I/Oデバイスのライトに2CLK必要であった場合、SDRAMからの4ワードの転送に15CLK必要であった。しかし、本発明の構成を用いれば、4ワードの転送がT1ステートからT10ステートまでの10CLKで実現でき、1回の転送を2/3に短縮できる。
【0068】
また、CPUからSDRAM18へのアクセスは従来通り高速で行えるので、対CPUの転送レートを落とすことも無い。
【0069】
次に第2の実施形態を説明する。
【0070】
第2の実施形態では、その基本的構成は上述した第1の実施形態と同様であるが、ウエイト設定レジスタ11の構成についてさらに工夫している。
【0071】
その構成のブロック図を示した図3を参照すると、第1の実施形態との相違点は、DMA転送用ウェイト設定レジスタ12が削除され、CPUからのウェイト設定が行われるウェイト設定レジスタ11のみが有効である。
【0072】
非同期系メモリ用信号生成回路15からI/Oデバイス17に対し、アドレスADR、チップセレクト信号CS、リード信号RD、ライト信号WR、ライトストローブ信号DMA_WE、データバスDは実施形態1と同様に与えられている。
【0073】
また、SDRAM用信号生成回路16およびSDRAM18間の信号も第1の実施形態と同様である。
【0074】
つまり、I/Oデバイス17はCPUからアドレスアクセスも出来る構成になっていて、さらに、ライトストローブ信号DMA_WEによるアクセスもできることが特徴である。
【0075】
CPUからI/Oデバイスに対するアドレスアクセスを行う場合にはウエイト設定レジスタ11のウエイト数を採用し、そのウエイト数にしたっがて非同期系メモリ用信号生成回路15はメモリサイクルを発生させる。
【0076】
また、CPUからSDRAM18に対するアドレスサイクルについては高速アクセスできるのでノーウエイトでアクセスし、ウエイト設定用レジスタを設けていない。
【0077】
一方、SDRAM18およびI/Oデバイス間のシングルアドレスDMA転送時は、I/Oデバイス17のスペックに対応したウエイト数が設定されたウエイト設定レジスタ11があるので、このレジスタの設定値を採用しシングルアドレスDMA転送サイクルを発生させる。
【0078】
上述したように、本実施の形態では、DMA転送用のウエイト設定レジスタ12を設けることなく、I/Oデバイスとして接続された非同期系の低速メモリ、I/Oのスペックを満たすDMA転送を行うことが出来るので、第1の実施形態よりもさらに回路規模を押さえることができる。
【0079】
次に第3の実施の形態を説明する。
【0080】
上述した第1および第2の実施形態では、シングルアドレスDMA転送におけるウエイト挿入をウェイト設定レジスタ11およびDMA転送用ウェイト設定レジスタ12、またはウェイト設定レジスタ11において行っている。
【0081】
しかし、図4に示す第3の実施形態のブロック図を参照すると、上述した第1の実施形態との相違点は、ウェイト設定レジスタ11およびDMA転送用ウェイト設定レジスタ12のいずれのウエイト設定用レジスタも設けていないことがことが相違する。
【0082】
一方、第2の実施形態との相違点は、ウェイト設定レジスタ11も削除されていることである。さらに第1および第2の実施形態との共通する相違点は、I/Oデバイス17からSDRA用信号生成回路16にウェイト信号WAITを与えることによって、メモリコントローラにウエイトをかけていることである。
【0083】
まず、I/OデバイスにはCLK信号とCKE信号を入力させる。I/OデバイスはCKE信号のアクティブ中はWAIT信号を常にアクティブにする論理にしておく。
【0084】
SDRAM用信号生成回路6はDMA転送要求とWAIT信号とCAS信号の反転信号のANDで1回目のCKE信号をディセーブルレベルにする。
【0085】
CKE信号がディセーブルレベルになった時点で、I/Oデバイスはウエイトしたいクロック数をカウントし、WAIT信号をディセーブルレベルにする。
【0086】
WAIT信号がディセーブルレベルになるので、SDRAM用信号生成回路6はCKE信号をアクティブにする。
【0087】
CKE信号のアクティブを受けて、I/Oデバイスは再びWAIT信号をアクティブにする。
【0088】
SDRAM用信号生成回路6は、DMA転送要求とWAIT信号のANDでCKEをディセーブルにする。
【0089】
DMA転送要求が出続けている間、以上の繰り返しである。
【0090】
この実施の形態を用いた場合のシングルアドレスDMA転送のタイミングチャートを示した図5を参照すると、この実施の形態でも、T1ステートにSDRAM18には、アドレスADRはADmが与えられ、CAS信号がT1ステート期間だけロウレベルにアクティブにされる。
【0091】
RAS信号はハイレベルが与えられ、ライトイネーブル信号WEはハイレベル、クロックイネーブル信号CKEはハイレベル、データマスク信号DQMはロウレベルが与えられる。
【0092】
I/Oデバイス17にはライトストローブ信号DMA_WEがハイレベル、I/Oデバイス17からSDRAM用信号生成回路16にウェイト信号WAITがハイレベルに立ち上がる状態でそれぞれ与えられている。
【0093】
まず、メモリコントローラは、DMA転送要求DMA_REQを受け付けると、T1ステートでSDRAM18にリードコマンドを発行する。ここで、ウエイト信号WAITがT1ステートおよびT2ステート間の1クロック期間ハイレベルのアクティブになるので、そのWAIT信号のアクティブに応答してSDRAM用信号生成回路16ではクロックイネーブル信号CKEをT2ステートでロウレベルのディセーブルにする。
【0094】
したがって、SDRAM18から出力されるデータにウエイトをかけることができる。
【0095】
上述したように、クロックイネーブル信号CKEをディセーブルにすることにより、通常はT3ステートのみに出力されるデータDが、1CLK分延長され、低速デバイスの書き込み時間をT4ステートまで確保する。
【0096】
また、非同期系メモリ用信号生成回路15は、SDRAM18から出力されているデータDを取り込むために、DMA_WEをT3ステートからT4ステートにかけてロウアクティブにし、データを取り込むことができる。T5ステートからT10ステートまでは上記動作の繰り返しである。
【0097】
上述したように、この実施の形態においても、ウェイト信号WAITでメモリコントローラにウェイトかけることによって、第1および第2の実施形態と同様な効果、すなわち、4ワードの転送がT1ステートからT10ステートまでの10CLKで実現でき、1回の転送を2/3に短縮できる。
【0098】
また、CPUからSDRAM18へのアクセスは従来通り高速で行えるので、対CPUの転送レートを落とすことも無い。また、ウェイト設定レジスタ11およびDMA転送用ウェイト設定レジスタ12のいずれのウエイト設定用レジスタも設けていないのでレジスタが削減出来、回路規模削減が可能である。
【0099】
次に第4の実施形態を説明する。
【0100】
本発明の第4の実施形態の構成をブロック図で示した図6を参照すると、第1の実施形態との相違点は、メモリアクセス制御信号生成回路14からSDRAM用信号生成回路16が削除され、非同期系メモリ用信号生成回路15のみであり、前述した実施形態では同期系の外部メモリとしてSDRAM18を接続した例であったが、ここでは非同期系のSRAM19を備えていることである。
【0101】
また、SDRAM用信号生成回路16が削除されたことにより、非同期系メモリ用信号生成回路15からSRAM19へ供給する信号も、データD以外は同期クロックCLK、アドレス信号ADR、チップセレクト信号CS、リード信号RDおよびライトストローブ信号DMA_WEのみとなる。
【0102】
この第4の実施の形態は、SRAM19からI/Oへの転送タイミング例であり、転送対象がSDRAMでなくとも、DMA転送用ウエイト設定レジスタを設けることが有効であることを示している。
【0103】
この第4の実施形態の動作説明用のタイミングチャートであって、シングルアドレスDMA転送のタイミングを示した図7を参照すると、SRAM対I/Oの転送について示したものであり、DMA転送用ウエイト設定レジスタのデータウェイト数に例えば1が設定されている場合である。
【0104】
SRAM19には、T1ステートおよびT3ステート期間はアドレスADRはADmが与えられ、チップセレクト信号CSがT1ステートからT12ステートまでの期間ロウレベルアクティブで与えられている。
【0105】
リード信号RDはT1期間でロウレベルとなり、T4ステートでハイレベルが与えられている。
【0106】
I/Oデバイス17にはライトストローブ信号DMA_WEがT1およびT3ステート間でロウレベル、T3およびT4ステート間でハイレベルが与えられている。
【0107】
この実施例の場合、転送クロック数は12クロックになることがわかる。もしデータウエイト数に0が設定されていれば8クロックで転送可能である。
【0108】
まず、メモリコントローラは、DMA転送要求DMA_REQを受け付けると、T1ステートでSRAM19にリードコマンドを発行する。ここで、DMA転送用ウエイト設定レジスタ12にはウエイト数1が設定されているので、このウェイトにより、通常はT1ステートからT2ステートのみに出力されるデータDが、1CLK分延長され、低速デバイスの書き込み時間をT3ステートまで確保する。その他の信号ADR,CS,RDもそれぞれ1CLK分延長される。
【0109】
非同期系メモリ用信号生成回路15は、SRAM19から出力されているデータDを取り込むために、DMA_WEをT1ステートからT3ステートにかけてロウアクティブにし、データを取り込む。
【0110】
したがって、SRAM19から出力されるデータにウエイトをかけることができる。
【0111】
上述したように、DMA転送用ウエイト設定レジスタ12にウエイト数を設定することにより、通常はT1およびT2ステート間に出力されるデータDが、1CLK分延長され、低速デバイスの書き込み時間をT3ステート期間の終了まで確保される。T3ステートからT12ステートまでは上述した動作の繰り返しである。
【0112】
本実施の形態では、転送対象がI/Oデバイス17およびSRAM19であるが、高速なメモリと低速なI/Oデバイスという意味では、図6に示す実施形態のようなSRAM19とI/Oデバイス17においても本発明により、CPUアクセスは高速でアクセスし、シングルアドレスDMA転送はI/Oデバイス17のスペックに合わせた転送ができる。
【0113】
また、上述した第1、第2および第3の実施の形態のいづれのウエイト挿入手法を用いてもよい。
【0114】
上述したように、この実施の形態においては、DMA転送用ウエイト設定レジスタ12にウエイト数を設定することにより、第1、第2および第3の実施形態と同様な効果、すなわち、ウェイト数が1の時4ワードの転送がT1ステートからT12ステートまでの12CLKで実現でき、1回の転送を4/5に短縮できる。
【0115】
また、CPUからSRAM19へのアクセスは従来通り高速で行えるので、対CPUの転送レートを落とすことも無い。また、同期系メモリ用信号生成回路を設けていないのでその分回路規模削減が可能である。
【0116】
【発明の効果】
上述したように、本発明のメモリコントローラは、高速アクセスが可能なCPUから外部メモリをアクセスするときに、CPUの動作速度に応じた最小ウエイト数でアクセスしてデータの転送レートを確保する高速データ転送手段と、CPUを介さずに動作速度の速い外部メモリから動作速度の遅い外部メモリへデータ転送を行うシングルアドレスDMA転送では、動作速度の遅い外部メモリのデータアクセス時間に応じたウエイト数を、動作速度の速い外部メモリの動作サイクルに挿入してデータの転送レートを確保する低速データ転送手段とを併せて備えるので、従来例の場合、転送先のI/Oデバイスが低速で1CLKピッチでのシングルアドレス転送が実現出来なかった場合、デュアルアドレス転送を行うしかなく、例えば、I/Oデバイスのライトに2CLK必要であった場合、SDRAMからの4ワードの転送に15CLK必要であった。
【0117】
しかし本発明によれば、4ワードの転送が10CLKで実現でき、1回の転送を2/3に短縮できる。また、CPUからのSDRAMアクセスは従来通り高速で行えるので対CPUの転送レートを落とすことも無い。
【図面の簡単な説明】
【図1】本発明の第1の実施形態のブロック図である。
【図2】本発明の第1の実施形態の動作説明用タイミングチャートである。
【図3】本発明の第2の実施形態のブロック図である。
【図4】本発明の第3の実施形態のブロック図である。
【図5】本発明の第3の実施形態の動作説明用タイミングチャートである。
【図6】本発明の第4の実施形態のブロック図である。
【図7】本発明の第4の実施形態の動作説明用タイミングチャートである。
【図8】従来のウェイト制御回路の一例を示すブロック図である。
【符号の説明】
11 ウェイト設定レジスタ
12 DMA転送用ウェイト設定レジスタ
13 セレクタ
14 メモリアクセス制御信号生成回路
15 非同期系メモリ用信号生成回路
16 SDRAM用信号生成回路
17 I/Oデバイス
18 SDRAM
19 SRAM
ADR アドレス
CAS カラムアドレスストローブ信号
CKE クロックイネーブル信号
CLK 動作クロック
D データバス
DMA_REQ シングルアドレスDMA転送要求
DMA_WE ライトストローブ信号
DQM データマスク信号
M_REQ メモリアクセス要求
RAS ロウアドレスストローブ信号
WE ライトイネーブル信号
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a memory controller, and more particularly to a memory controller that generates a memory access cycle with a minimum number of waits for a single address DMA transfer when an asynchronous memory and a synchronous memory are respectively connected to an external memory.
[0002]
[Prior art]
2. Description of the Related Art In recent years, with the advancement of the miniaturization technology of semiconductor devices, LSIs composed of the semiconductor devices have been increasing in scale, and this tendency is particularly remarkable in the field of semiconductor memories.
[0003]
For example, a dynamic random access memory (DRAM) and a synchronous dynamic random access memory (SDRAM) have been put into practical use as semiconductor memories having a capacity of 256 megabits per chip.
[0004]
The operating speed of a single-chip microcomputer connecting these semiconductor memories as an external memory has been remarkably improved, which is why the connected external memory is expected to increase in operating speed as well as in capacity.
[0005]
When an external memory is connected, direct memory access (hereinafter, referred to as DMA) for transferring data between the memory and the I / O device without going through a central processing unit (hereinafter, referred to as CPU) of a single-chip microcomputer. ) Has been done.
[0006]
In the single address DMA transfer, when data is transferred from an external memory to an I / O device, a read strobe signal is supplied to the memory, and a write strobe signal is supplied to the I / O device. Read data read from the memory is output. The data read on the data bus is written to the I / O device.
[0007]
On the other hand, when data is transferred from the I / O device to the external memory, a read strobe signal is supplied to the memory, and a write strobe signal is supplied to the I / O device. Write the read data to the external memory.
[0008]
An example of this type of conventional weight control is described in Japanese Patent Application Laid-Open No. Hei 4-251056. The weight signal control unit described in the publication includes a connection terminal 2A between the CPU and the DMA controller, a weight signal output terminal 2B, a weight setting register 21, a device decoder 22, and a weight signal generation unit 23.
[0009]
In the wait setting register 21, the number of waits corresponding to the access speed of the I / O device is set in advance by the CPU.
[0010]
The device decoder 22 detects an I / O device in the current DMA operation, and derives the number of waits corresponding to the device from the register 21.
[0011]
The derived weight number is input to weight signal generating section 23, and a weight signal corresponding to the weight number is generated.
[0012]
This weight control unit sets the number of waits to be inserted in the DMA of each device by a program in advance, so that an appropriate number of waits can be set for each device regardless of the access speed, and the DMA rate is not deteriorated. is there.
[0013]
As will be described later in the present invention, a memory controller that controls this kind of single address DMA transfer secures a data transfer rate by accessing with a minimum number of waits especially from a CPU that can access at high speed. Also, with respect to single address DMA transfer from a high-speed memory to a low-speed memory, a configuration in which the number of waits corresponding to the data access time of the low-speed memory is to be inserted into the operation cycle of the high-speed memory is disclosed.
[0014]
In general, access to the SDRAM takes advantage of the characteristics of the SDRAM, so that access from the CPU is usually performed with no-wait high-speed access.
[0015]
Therefore, normally, the memory controller does not have a data wait function. However, in the application field of a single-chip microcomputer, even in a single address DMA transfer from an SDRAM to a low-speed device, the memory controller does not transfer to a low-speed device as a transfer destination. It is required that high-speed transfer can be performed.
[0016]
[Problems to be solved by the invention]
As described above, in the memory controller mounted on the conventional general single-chip microcomputer, the wait control specialized for the DMA transfer is not performed. As an example of improving the drawback, there is an example of the above-mentioned Japanese Patent Application Laid-Open No. 4-251056, but in any case, data wait is not considered for SDRAM access. In other words, data that is normally output only for one clock period is extended to output two to several clock periods, so that a data wait for avoiding a malfunction in writing to the I / O device is reduced. I have not gone.
[0017]
Therefore, when one of the DMA transfer targets is the SDRAM, the specifications of the low-speed device at the transfer destination cannot be satisfied, and in many cases, the single address mode DMA transfer cannot be realized.
[0018]
That is, in a general microcomputer, the data wait is not considered at the time of accessing the SDRAM. Therefore, the access to the SDRAM is always performed at a 1CLK pitch. That is, during the data output period, only 1 CLK is output for both read / write.
[0019]
Therefore, for example, when the data output delay value of the SDRAM is 5 ns in a product having a bus operating frequency of 100 MHz, data cannot be prepared during the valid period of the write strobe signal to the I / O device, and the data cannot be transferred.
[0020]
That is, in the case of the 1 CLK pitch, the write strobe signal to the I / O device is toggled at a half clock.
[0021]
Further, even when a system in which writing to the I / O device is performed in synchronization with the rising edge of the clock supplied to the SDRAM, if the data output delay of the SDRAM is 5 ns, the data setup time for writing to the I / O device is reduced. Must be within 5 ns, and it is difficult to realize the setup time of 5 ns with a low-speed I / O device. As a result, a single address transfer between the SDRAM and the I / O cannot be performed.
[0022]
SUMMARY OF THE INVENTION An object of the present invention is to provide a single address mode DMA transfer adapted to the specifications of a low-speed memory to be transferred without reducing the transfer rate in CPU access. is there.
[0023]
[Means for Solving the Problems]
A feature of the memory controller of the present invention is that when performing data transfer between a CPU and a synchronous memory, a first operation cycle based on a wait when accessing the synchronous memory is generated, and the CPU and the asynchronous memory are generated. When performing a data transfer between the synchronous memory and the asynchronous memory, a second operation cycle is generated based on the wait when accessing the asynchronous memory. When performing a single address DMA transfer between the synchronous memory and the asynchronous memory, A memory access control signal generating circuit for generating a third operation cycle based on a wait at the time of the single address DMA transfer and supplying the same to the synchronous memory is provided.
[0024]
Another feature of the memory controller according to the present invention is that a memory controller corresponding to an I / O device to which a peripheral device is connected, including an asynchronous memory for low-speed operation, and a synchronous memory for high-speed operation, which are DMA transfer targets. Weight setting means for setting the number of waits when accessing the synchronous and asynchronous external memories from the CPU in advance; and A DMA transfer wait setting register in which the number of waits at the time of single address DMA transfer to a memory is set in advance by the CPU, and a wait address register and a DMA transfer wait setting register in response to a single address DMA transfer request and a memory access request. Have either one A weight selection means for selectively outputting the Eito number is to the memory access control signal generating means generates and outputs a memory access cycle of inserting the number of weights selected by the weight selection unit.
[0025]
Further, the memory access control signal generating means includes a predetermined control signal output means including an address signal for accessing the synchronous memory for high-speed operation and a clock enable signal, and the asynchronous memory for low-speed operation. In addition to predetermined control signal output means including an address signal to be accessed, a write strobe signal, and a read signal, the asynchronous memory control signal generation means, the I / O device, and the synchronous memory control It may further comprise a bidirectional data bus means for commonly connecting the signal generation means and the synchronous memory.
[0026]
Further, when the synchronous memory to be DMA-transferred is a synchronous dynamic random access memory (SDRAM), the clock enable signal for the SDRAM is set to an inactive level, and the transfer speed of the I / O device is changed. The SDRAM access can be executed in accordance with the above.
[0027]
Furthermore, the memory access control signal generating means, when accessing the synchronous memory and the I / O device and performing bidirectional DMA transfer, uses the number of waits selected from the plurality of wait setting register means. A DMA access control can be performed by generating a memory access cycle.
[0028]
Further, at the time of the single address DMA transfer, a single address DMA transfer cycle can be generated by selecting the number of waits in the DMA transfer wait setting register based on the DMA transfer request.
[0029]
Further, at the time of the single address DMA transfer, it is possible to execute a memory access according to a slower operation speed of the synchronous memory and the I / O device to be DMA-transferred.
[0030]
Furthermore, the asynchronous memory signal generating means may generate a write strobe signal for DMA single address transfer, and perform a single address DMA transfer during a read cycle of the synchronous memory by using the write strobe signal.
[0031]
Still another feature of the memory controller of the present invention is that a memory controller waits for an I / O device to which a peripheral device is connected, including an asynchronous memory for low-speed operation, and a synchronous memory for high-speed operation, which are DMA transfer targets. Weight setting register means for setting the number of waits for accessing the synchronous system and the I / O device from the CPU in advance; and number of waits for the weight setting register in response to a single address DMA transfer request and a memory access request. And a memory access control signal generating means for generating and outputting a memory access cycle in which the number of waits is inserted.
[0032]
The memory access control signal generating means comprises an asynchronous memory signal generating means and a synchronous memory signal generating means, wherein the asynchronous memory signal generating means accesses an address signal for accessing the I / O device. And a predetermined control signal supply unit including a write strobe signal. When the asynchronous memory is accessed, either an address access from the CPU or an access by the write strobe signal can be executed.
[0033]
Further, the synchronous memory can be directly accessed by the CPU without any wait without the intervention of the wait setting register.
[0034]
Furthermore, during DMA transfer between the synchronous memory and the I / O device including peripheral devices including the asynchronous memory, a single address DMA transfer cycle is generated based on the number of waits of the wait setting register means. You can also.
[0035]
Another feature of the memory controller of the present invention is that the memory controller wait control means for an I / O device including peripheral devices including a low-speed operation asynchronous memory and a high-speed operation synchronous memory to be DMA-transferred. Memory access control signal generating means for generating and outputting a memory access cycle into which a predetermined number of waits are inserted, wherein the memory access control signal generating means comprises a signal generating means for an asynchronous memory and a signal generating means for a synchronous memory. Wherein the asynchronous memory signal generation means includes a predetermined control signal supply means including an address signal for accessing the asynchronous memory and a write strobe signal, and the synchronous memory signal generation means. Means for receiving a wait signal from the I / O device And a predetermined control signal output means including an address signal for accessing the synchronous memory and a clock enable signal, and a wait based on the clock enable signal whose activation and deactivation is controlled according to the wait signal is inserted. In the memory cycle of the transferred single address DMA transfer.
[0038]
BEST MODE FOR CARRYING OUT THE INVENTION
First, an outline of the present invention will be described. As shown in FIG. 1, a memory controller according to the present invention accesses data from a CPU (not shown) capable of high-speed access by using a minimum number of waits. Secure transfer rate. In addition, in single address DMA transfer from a high-speed memory to a low-speed memory, a technique is disclosed in which the number of waits corresponding to the data access time of the low-speed memory is inserted into the operation cycle of the high-speed memory to secure the data transfer rate. Is what you do.
[0039]
Next, referring to FIG. 1 showing a block diagram of a first embodiment of the memory controller according to the present invention, the memory controller comprises a wait setting register 11, a DMA transfer wait setting register 12, a selector 13, a memory access control signal. Generator 14, signal generator 15 for asynchronous memory, signal generator 16 for SDRAM, I / O device (synchronous memory for low-speed operation, I / O) 17 and SDRAM (synchronous memory for high-speed operation) 18 Is provided.
[0040]
That is, an I / O device of an external memory is used as a memory controller wait control unit for the I / O device 17 to which a low-speed operation asynchronous memory or the like to be DMA-transferred is connected and the high-speed operation synchronous memory SDRAM 18. 17, a wait setting register 11 in which the number of waits for accessing the SDRAM 18 is set in advance by the CPU, and a single signal from the SDRAM 18 for high-speed operation to the I / O device 17 for low-speed operation among the I / O devices 17 and SDRAM 18. The number of waits at the time of the address DMA transfer has a DMA transfer wait setting register 12 which is set in advance by the CPU.
[0041]
Further, there is also provided a selector (weight selection means) 13 for selectively outputting the number of waits of one of the wait setting register 11 and the DMA transfer wait setting register 12 according to the single address DMA transfer request DMA_ERQ and the memory access request M_REQ.
[0042]
Further, it is provided with a memory access control signal generating circuit (memory access control signal generating means) 14 for generating and outputting a memory access cycle in which the number of waits selected by the selector 13 is inserted.
[0043]
The wait setting register 11 for CPU access and the wait setting register 12 for DMA transfer are programmable registers.
[0044]
The selector 13 selects which of the two wait setting registers 11 and 12 to use, based on the two input signals, that is, the memory access request signal M_REQ and the DMA transfer request DMA_REQ.
[0045]
The memory access control signal generation circuit 14 generates a memory access cycle in which the number of waits selected by the selector 13 is inserted.
[0046]
In this example, the memory access control signal generation circuit 14 includes an asynchronous memory signal generation circuit 15 for generating an access signal for an asynchronous memory (SRAM, I / O, etc.).
[0047]
The asynchronous memory signal generating circuit 15 also has an output unit for outputting a write strobe signal DMA_WE for DMA single transfer to an I / O device, and activates the write strobe signal DMA_WE during a read cycle of the SDRAM. By doing so, single address DMA transfer can be performed.
[0048]
As other signals, an address ADR, a chip select signal CS, a read signal RD, and a write signal WR are supplied to the I / O device side.
[0049]
Further, an SDRAM signal generation circuit 16 for generating an SDRAM access signal is provided inside the memory access control signal generation circuit 14.
[0050]
The SDRAM signal generation circuit 16 outputs ADR, CLK, RAS, CAS, WE, CKE, and DQM clocks and control signals to the SDRAM 18.
[0051]
Here, the signal CLK is an operation clock of the SDRAM 18, the address ADR is an address for the SDRAM 18, and the signal RAS is a row address strobe signal for the SDRAM 18.
[0052]
Signal CAS is a column address strobe signal for SDRAM 18, signal WE is a write enable signal for SDRAM 18, and signal CKE is a clock enable for SDRAM 18.
[0053]
Signal DQM is a data mask signal for SDRAM 18 and signal DMA_WE is a write strobe signal for I / O device 17.
[0054]
Further, a bidirectional data bus D for commonly connecting the asynchronous memory signal generation circuit 15 and the I / O device and the SDRAM signal generation circuit 16 and the I / O device is provided.
[0055]
Hereinafter, the operation of the present embodiment will be described with reference to FIG. 1 and a timing chart for explaining the operation, with reference to FIG. 2 showing the timing of a single address DMA transfer from the SDRAM to the I / O device.
[0056]
First, in FIG. 2, it is assumed that the access to the SDRAM 18 starts with the CAS latency being 2, the burst length being 4, and the bank / page being hit. It is also assumed that the wait number 1 is set in the DMA transfer weight setting register 12.
[0057]
The latency here indicates the time from when a data read instruction of a memory cell is issued to when data is read and output to the outside. Therefore, the latency from when the CAS signal is validated to when data is actually output is defined as CAS latency.
[0058]
For example, a row address is specified, the RAS signal is validated, and a word line corresponding to the given row address is activated. A desired memory cell is selected by designating a column address, enabling the CAS signal, and selecting a digit line corresponding to the given column address.
[0059]
The burst length is the number of words output or input in a read cycle or a write cycle.
[0060]
In the T1 state, to the SDRAM 18, the address ADR is supplied with ADm, the CAS signal is activated at a low level only during the T1 state, the RAS signal is supplied at a high level, the data mask signal DQM is at a low level, and the I / O device 17 Is a state in which the write strobe signal DMA_WE is given at a high level.
[0061]
First, upon receiving the DMA transfer request DMA_REQ, the memory controller issues a read command to the SDRAM 18 in the T1 state.
[0062]
Here, since the number of waits 1 is set in the DMA transfer wait setting register 12, the clock enable signal CKE is disabled in the T2 state in order to apply a wait to the data output from the SDRAM 18 according to the present invention.
[0063]
Due to this disabling, the data D normally output only in the T3 state is extended by 1 CLK, and the write time of the low-speed device is secured to the T4 state.
[0064]
In addition, the asynchronous memory signal generation circuit 15 makes DMA_WE low active from the T3 state to the T4 state in order to capture the data D output from the SDRAM 18, and captures the data.
[0065]
From the T5 state to the T10 state, the above operation is repeated.
[0066]
In the case of the conventional memory controller, when the transfer destination I / O device cannot realize single address transfer at a 1CLK pitch at a low speed, DMA transfer must be performed by dual address transfer.
[0067]
For example, when 2 CLK is required for writing to an I / O device, 15 CLK is required for transferring 4 words from the SDRAM. However, using the configuration of the present invention, 4-word transfer can be realized with 10 CLKs from the T1 state to the T10 state, and one transfer can be reduced to 2/3.
[0068]
Further, since the access to the SDRAM 18 from the CPU can be performed at a high speed as before, the transfer rate with respect to the CPU does not decrease.
[0069]
Next, a second embodiment will be described.
[0070]
In the second embodiment, the basic configuration is the same as that of the above-described first embodiment, but the configuration of the weight setting register 11 is further devised.
[0071]
Referring to FIG. 3 which shows a block diagram of the configuration, the difference from the first embodiment is that the wait setting register 12 for DMA transfer is deleted and only the wait setting register 11 for performing the wait setting from the CPU is provided. It is valid.
[0072]
An address ADR, a chip select signal CS, a read signal RD, a write signal WR, a write strobe signal DMA_WE, and a data bus D are provided from the asynchronous memory signal generation circuit 15 to the I / O device 17 in the same manner as in the first embodiment. ing.
[0073]
The signals between the SDRAM signal generation circuit 16 and the SDRAM 18 are the same as in the first embodiment.
[0074]
In other words, the I / O device 17 is configured to be capable of address access from the CPU, and is further characterized in that it can be accessed by the write strobe signal DMA_WE.
[0075]
When performing an address access to the I / O device from the CPU, the number of waits in the wait setting register 11 is employed, and the asynchronous memory signal generation circuit 15 generates a memory cycle according to the number of waits.
[0076]
In addition, since the CPU can access the SDRAM 18 at high speed with respect to the address cycle, the access is performed with no wait, and no wait setting register is provided.
[0077]
On the other hand, during single address DMA transfer between the SDRAM 18 and the I / O device, there is a wait setting register 11 in which the number of waits corresponding to the specifications of the I / O device 17 is set. Generate an address DMA transfer cycle.
[0078]
As described above, in the present embodiment, the DMA transfer satisfying the specifications of the I / O and the asynchronous low-speed memory connected as the I / O device is performed without providing the wait setting register 12 for the DMA transfer. Therefore, the circuit scale can be further reduced as compared with the first embodiment.
[0079]
Next, a third embodiment will be described.
[0080]
In the first and second embodiments described above, the wait insertion in the single address DMA transfer is performed in the wait setting register 11, the DMA transfer wait setting register 12, or the wait setting register 11.
[0081]
However, referring to the block diagram of the third embodiment shown in FIG. 4, the difference from the first embodiment is that any one of the wait setting registers 11 and 12 The difference is that neither is provided.
[0082]
On the other hand, the difference from the second embodiment is that the weight setting register 11 is also deleted. Further, a common difference from the first and second embodiments is that the memory controller is given a wait by giving a wait signal WAIT from the I / O device 17 to the SDRA signal generation circuit 16.
[0083]
First, a CLK signal and a CKE signal are input to the I / O device. The logic of the I / O device is such that the WAIT signal is always active while the CKE signal is active.
[0084]
The SDRAM signal generation circuit 6 sets the first CKE signal to the disable level by ANDing the DMA transfer request, the WAIT signal, and the inverted signal of the CAS signal.
[0085]
When the CKE signal goes to the disable level, the I / O device counts the number of clocks to be waited and sets the WAIT signal to the disable level.
[0086]
Since the WAIT signal is at the disable level, the SDRAM signal generation circuit 6 activates the CKE signal.
[0087]
In response to the activation of the CKE signal, the I / O device activates the WAIT signal again.
[0088]
The SDRAM signal generation circuit 6 disables CKE by ANDing the DMA transfer request and the WAIT signal.
[0089]
The above is repeated while the DMA transfer request continues to be issued.
[0090]
Referring to FIG. 5 showing a timing chart of the single address DMA transfer in the case of using this embodiment, also in this embodiment, in the T1 state, the address ADR is supplied to the SDRAM 18 with ADm, and the CAS signal becomes T1. It is activated to low level only during the state period.
[0091]
The RAS signal is given a high level, the write enable signal WE is given a high level, the clock enable signal CKE is given a high level, and the data mask signal DQM is given a low level.
[0092]
The write strobe signal DMA_WE is supplied to the I / O device 17 at a high level, and the wait signal WAIT is supplied from the I / O device 17 to the SDRAM signal generation circuit 16 at a high level.
[0093]
First, upon receiving the DMA transfer request DMA_REQ, the memory controller issues a read command to the SDRAM 18 in the T1 state. Since the wait signal WAIT is active at the high level for one clock period between the T1 state and the T2 state, the SDRAM signal generation circuit 16 changes the clock enable signal CKE to the low level in the T2 state in response to the activation of the WAIT signal. Disable
[0094]
Therefore, data output from SDRAM 18 can be weighted.
[0095]
As described above, by disabling the clock enable signal CKE, the data D which is normally output only in the T3 state is extended by 1 CLK, and the write time of the low-speed device is secured up to the T4 state.
[0096]
In addition, the asynchronous memory signal generation circuit 15 can make DMA_WE low active from the T3 state to the T4 state to take in the data D output from the SDRAM 18, and can take in the data. The above operation is repeated from the T5 state to the T10 state.
[0097]
As described above, also in this embodiment, by weighting the memory controller with the wait signal WAIT, the same effect as in the first and second embodiments, that is, the transfer of four words from the T1 state to the T10 state is achieved. And one transfer can be reduced to 2/3.
[0098]
Further, since the access to the SDRAM 18 from the CPU can be performed at a high speed as before, the transfer rate with respect to the CPU does not decrease. Further, since neither the wait setting register 11 nor the DMA transfer wait setting register 12 is provided, the number of registers can be reduced and the circuit scale can be reduced.
[0099]
Next, a fourth embodiment will be described.
[0100]
Referring to FIG. 6 showing a block diagram of the configuration of the fourth embodiment of the present invention, the difference from the first embodiment is that the SDRAM signal generation circuit 16 is deleted from the memory access control signal generation circuit 14. In the above-described embodiment, the SDRAM 18 is connected as the synchronous external memory, but the asynchronous SRAM 19 is provided here.
[0101]
Since the SDRAM signal generation circuit 16 has been deleted, the signals supplied from the asynchronous memory signal generation circuit 15 to the SRAM 19 also include the synchronous clock CLK, the address signal ADR, the chip select signal CS, and the read signal except for the data D. Only the RD and the write strobe signal DMA_WE are provided.
[0102]
The fourth embodiment is an example of transfer timing from the SRAM 19 to the I / O, and shows that it is effective to provide a DMA transfer wait setting register even if the transfer target is not the SDRAM.
[0103]
Referring to FIG. 7, which is a timing chart for explaining the operation of the fourth embodiment and showing the timing of the single address DMA transfer, it shows the transfer between the SRAM and the I / O. This is a case where, for example, 1 is set as the number of data weights in the setting register.
[0104]
In the SRAM 19, during the T1 state and the T3 state, the address ADR is supplied with ADm, and the chip select signal CS is supplied at low level during the period from the T1 state to the T12 state.
[0105]
The read signal RD is at a low level during the T1 period, and is at a high level in the T4 state.
[0106]
The write strobe signal DMA_WE is supplied to the I / O device 17 at a low level between the T1 and T3 states and at a high level between the T3 and T4 states.
[0107]
In this embodiment, the number of transfer clocks is 12 clocks. If the number of data waits is set to 0, transfer can be performed in eight clocks.
[0108]
First, upon receiving the DMA transfer request DMA_REQ, the memory controller issues a read command to the SRAM 19 in the T1 state. Here, since the number of waits 1 is set in the DMA transfer wait setting register 12, the data D normally output only from the T1 state to the T2 state is extended by one CLK by this wait, and the speed of the low-speed device is reduced. The write time is secured up to the T3 state. The other signals ADR, CS, and RD are each extended by 1 CLK.
[0109]
The asynchronous memory signal generation circuit 15 makes DMA_WE low active from the T1 state to the T3 state in order to take in the data D output from the SRAM 19, and takes in the data.
[0110]
Therefore, the data output from the SRAM 19 can be weighted.
[0111]
As described above, by setting the number of waits in the DMA transfer wait setting register 12, the data D normally output between the T1 and T2 states is extended by 1 CLK, and the write time of the low-speed device is reduced to the T3 state period. Until the end of From the T3 state to the T12 state, the above operation is repeated.
[0112]
In this embodiment, the transfer target is the I / O device 17 and the SRAM 19, but in terms of a high-speed memory and a low-speed I / O device, the SRAM 19 and the I / O device 17 as in the embodiment shown in FIG. According to the present invention, the CPU access can be performed at high speed, and the single address DMA transfer can be performed according to the specifications of the I / O device 17.
[0113]
Further, any of the weight insertion methods of the first, second and third embodiments described above may be used.
[0114]
As described above, in this embodiment, by setting the number of waits in the DMA transfer wait setting register 12, the same effect as in the first, second, and third embodiments, that is, the number of waits is 1 In this case, the transfer of four words can be realized by 12 CLKs from the T1 state to the T12 state, and one transfer can be reduced to 4/5.
[0115]
In addition, since the access to the SRAM 19 from the CPU can be performed at a high speed as before, the transfer rate of the CPU 19 is not reduced. Further, since the signal generator for the synchronous memory is not provided, the circuit scale can be reduced accordingly.
[0116]
【The invention's effect】
As described above, the memory controller according to the present invention provides a high-speed data access that secures a data transfer rate by accessing the external memory from a CPU capable of high-speed access with a minimum number of waits corresponding to the operation speed of the CPU. In a single address DMA transfer in which data is transferred from a high-speed external memory to a low-speed external memory without using a transfer unit and a CPU, the number of waits according to the data access time of the low-speed external memory is determined by: A low-speed data transfer means for securing a data transfer rate by being inserted into an operation cycle of an external memory having a high operation speed is also provided. Therefore, in the case of the conventional example, the transfer destination I / O device has a low speed at 1 CLK pitch. If single address transfer cannot be realized, the only option is to perform dual address transfer. If vice were light required 2CLK of was necessary 15CLK to 4 word transfers from SDRAM.
[0117]
However, according to the present invention, four-word transfer can be realized with 10 CLK, and one transfer can be reduced to 2/3. Further, since the SDRAM access from the CPU can be performed at a high speed as before, the transfer rate of the CPU is not reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram of a first embodiment of the present invention.
FIG. 2 is a timing chart for explaining the operation of the first embodiment of the present invention.
FIG. 3 is a block diagram of a second embodiment of the present invention.
FIG. 4 is a block diagram of a third embodiment of the present invention.
FIG. 5 is a timing chart for explaining the operation of the third embodiment of the present invention.
FIG. 6 is a block diagram of a fourth embodiment of the present invention.
FIG. 7 is a timing chart for explaining the operation of the fourth embodiment of the present invention.
FIG. 8 is a block diagram illustrating an example of a conventional weight control circuit.
[Explanation of symbols]
11 Wait setting register
12 DMA transfer wait setting register
13 Selector
14 Memory access control signal generation circuit
15 Signal generation circuit for asynchronous memory
16 SDRAM signal generation circuit
17 I / O devices
18 SDRAM
19 SRAM
ADR address
CAS column address strobe signal
CKE clock enable signal
CLK Operation clock
D Data bus
DMA_REQ Single address DMA transfer request
DMA_WE write strobe signal
DQM data mask signal
M_REQ Memory access request
RAS row address strobe signal
WE write enable signal

Claims (9)

CPUと同期系メモリとの間のデータ転送を行うときには前記同期系メモリにアクセスするときのウェイトに基づく第1の動作サイクルを発生し、前記CPUと非同期系メモリとの間のデータ転送を行うときには前記非同期系メモリにアクセスするときのウェイトに基づく第2の動作サイクルを発生し、前記同期系メモリと前記非同期系メモリとの間のシングルアドレスDMA転送を行うときには前記シングルアドレスDMA転送時のウェイトに基づく第3の動作サイクルを発生し前記同期系メモリに供給するメモリアクセス制御信号生成回路を備えることを特徴とするメモリコントローラ。When performing data transfer between the CPU and the synchronous memory, a first operation cycle is generated based on a wait when accessing the synchronous memory, and when performing data transfer between the CPU and the asynchronous memory, A second operation cycle based on a wait when accessing the asynchronous memory is generated, and when a single address DMA transfer is performed between the synchronous memory and the asynchronous memory, the wait during the single address DMA transfer is performed. A memory access control signal generation circuit for generating a third operation cycle based on the control signal and supplying the generated signal to the synchronous memory. 前記シングルアドレスDMA転送において、前記シングルアドレスDMA転送時のウェイトによって生成されるクロックイネーブル信号に基づいたウェイトが前記同期系メモリの前記第3の動作サイクルに挿入されることを特徴とする請求項1に記載のメモリコントローラ。2. The single address DMA transfer, wherein a wait based on a clock enable signal generated by a wait at the time of the single address DMA transfer is inserted into the third operation cycle of the synchronous memory. A memory controller according to claim 1. 前記同期メモリは、シンクロナス・ダイナミック・ランダムアクセス・メモリ(SDRAM)であることを特徴とする請求項1又は2に記載のメモリコントローラ。3. The memory controller according to claim 1, wherein the synchronous memory is a synchronous dynamic random access memory (SDRAM). 前記メモリアクセス制御信号生成回路は、前記同期系メモリのリードサイクル中に、前記同期系メモリから読み出したデータを前記非同期系メモリに書き込む、前記同期系メモリから前記非同期系メモリへの前記シングルアドレスDMA転送を行うことを特徴とする請求項1乃至3に記載のメモリコントローラ。The memory access control signal generation circuit writes data read from the synchronous memory to the asynchronous memory during a read cycle of the synchronous memory, and the single address DMA from the synchronous memory to the asynchronous memory. The memory controller according to claim 1, wherein the transfer is performed. 前記メモリアクセス制御信号生成回路は、前記同期系メモリに対する前記第1又は第3の動作サイクルを出力する同期系メモリ用信号生成回路と、前記非同期系メモリに対する前記第2又は第3の動作サイクルを出力する非同期系メモリ用信号生成回路と、前記同期系メモリ用信号生成回路と前記非同期系メモリ用信号生成回路と前記同期系メモリと前記非同期系メモリとを共通接続する双方向のデータバス手段と、を備えることを特徴とする請求項1乃至4に記載のメモリコントローラ。The memory access control signal generation circuit includes a synchronous memory signal generation circuit that outputs the first or third operation cycle for the synchronous memory, and a second or third operation cycle for the asynchronous memory. An asynchronous memory signal generating circuit to output; a synchronous memory signal generating circuit; a bidirectional data bus means for commonly connecting the synchronous memory and the asynchronous memory; The memory controller according to any one of claims 1 to 4, further comprising: 前記同期系メモリにアクセスするときのウェイト及び前記非同期系メモリにアクセスするときのウェイトの少なくとも一方を前記CPUが設定するCPU用ウェイト設定レジスタと、前記シングルアドレスDMA転送時のウェイトを前記CPUが設定するDMA用ウェイト設定レジスタと、データ転送要求により前記CPU用及び前記DMA用ウェイト設定レジスタのいずれか一方の有する値を前記メモリアクセス制御信号生成回路へ選択的に出力するウェイト選択手段と、を備えることを特徴とする請求項1乃至5に記載のメモリコントローラ。A CPU weight setting register in which the CPU sets at least one of a wait when accessing the synchronous memory and a wait when accessing the asynchronous memory, and the CPU sets a wait during the single address DMA transfer DMA wait setting register, and wait selecting means for selectively outputting a value of one of the CPU and DMA wait setting registers to the memory access control signal generation circuit in response to a data transfer request. The memory controller according to claim 1, wherein: 前記DMA用ウェイト設定レジスタが複数あり、前記複数のDMAウェイト設定レジスタから前記データ転送要求により選択することができることを特徴とする請求項6に記載のメモリコントローラ。7. The memory controller according to claim 6, wherein there are a plurality of said DMA wait setting registers, and said plurality of DMA wait setting registers can be selected from said plurality of DMA wait setting registers by said data transfer request. 前記非同期系メモリにアクセスするときのウェイト又は前記シングルアドレスDMA転送時のウェイトを前記CPUが設定する共有ウェイト設定レジスタと、前記共用ウェイト設定レジスタに設定されたウェイトを前記メモリアクセス制御信号生成回路へ選択的に出力するウェイト選択手段とを備え、前記CPUと同期系メモリとの間のデータ転送においては、データ転送要求により、前記第1の動作サイクルはノーウェイトで、前記CPUと非同期系メモリとの間のデータ転送又は前記シングルアドレスDMA転送においては、前記データ転送要求により、前記共有ウェイト設定レジスタのウェイトが挿入された第2又は第3の動作サイクルで制御されることを特徴とする請求項1乃至5に記載のメモリコントローラ。The CPU sets the wait when accessing the asynchronous memory or the wait during the single address DMA transfer, and the wait set in the shared wait setting register to the memory access control signal generation circuit. Wait selection means for selectively outputting the data, wherein in the data transfer between the CPU and the synchronous memory, the first operation cycle has no wait in response to a data transfer request; Wherein the data transfer request or the single address DMA transfer is controlled by the data transfer request in a second or third operation cycle in which the wait of the shared wait setting register is inserted. 6. The memory controller according to any one of 1 to 5. 前記シングルアドレスDMA転送時のウェイトは、前記非同期系メモリからのウェイト信号によって与えられ、前記クロックイネーブル信号は前記ウェイト信号に応答して生成されることを特徴とする請求項2乃至5に記載のメモリコントローラ。6. The wait according to claim 2, wherein the wait at the time of the single address DMA transfer is given by a wait signal from the asynchronous memory, and the clock enable signal is generated in response to the wait signal. Memory controller.
JP2000330155A 2000-10-30 2000-10-30 Memory controller Expired - Fee Related JP3563340B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000330155A JP3563340B2 (en) 2000-10-30 2000-10-30 Memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000330155A JP3563340B2 (en) 2000-10-30 2000-10-30 Memory controller

Publications (2)

Publication Number Publication Date
JP2002132711A JP2002132711A (en) 2002-05-10
JP3563340B2 true JP3563340B2 (en) 2004-09-08

Family

ID=18806725

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000330155A Expired - Fee Related JP3563340B2 (en) 2000-10-30 2000-10-30 Memory controller

Country Status (1)

Country Link
JP (1) JP3563340B2 (en)

Also Published As

Publication number Publication date
JP2002132711A (en) 2002-05-10

Similar Documents

Publication Publication Date Title
US5893136A (en) Memory controller for independently supporting Synchronous and Asynchronous DRAM memories
US5909701A (en) Interface for high speed memory
US6981100B2 (en) Synchronous DRAM with selectable internal prefetch size
US20090276548A1 (en) Dynamically setting burst type of a double data rate memory device
US6477598B1 (en) Memory controller arbitrating RAS, CAS and bank precharge signals
JP2005517242A (en) Address space, bus system, memory controller and device system
US20120079180A1 (en) DRAM Controller and a method for command controlling
JP2002063069A (en) Memory controller, data processing system, and semiconductor device
JP4199658B2 (en) Memory device performing addressing with different burst order in read and write operations
JP2001283587A (en) Dynamic random access memory device of enhanced-bus turnaround integrated circuit
US7227812B2 (en) Write address synchronization useful for a DDR prefetch SDRAM
US5253214A (en) High-performance memory controller with application-programmable optimization
EP1012687B1 (en) Method and apparatus for controlling data transfer between a synchronous dram-type memory and a system bus
US20020136079A1 (en) Semiconductor memory device and information processing system
JP4266436B2 (en) Semiconductor memory device
JP3957421B2 (en) Semiconductor memory device
US7003638B2 (en) Memory bus interface for use in a peripheral device
US20090319708A1 (en) Electronic system and related method with time-sharing bus
JP3563340B2 (en) Memory controller
US7103707B2 (en) Access control unit and method for use with synchronous dynamic random access memory device
JP2000067576A (en) Semiconductor storage device
US20030204651A1 (en) Circuit for controlling sequential access to SDRAM
JP4012393B2 (en) Storage device, internal control method and system for storage device, and control method for storage means in system
JP2004127305A (en) Memory controller
JP2002197864A (en) Multi-port memory and its control method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20031219

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040120

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20040122

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040317

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040602

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20080611

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090611

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100611

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100611

Year of fee payment: 6

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20100611

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20100611

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110611

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120611

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120611

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130611

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130611

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140611

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees