JP2001043127A - Memory controller - Google Patents

Memory controller

Info

Publication number
JP2001043127A
JP2001043127A JP11211884A JP21188499A JP2001043127A JP 2001043127 A JP2001043127 A JP 2001043127A JP 11211884 A JP11211884 A JP 11211884A JP 21188499 A JP21188499 A JP 21188499A JP 2001043127 A JP2001043127 A JP 2001043127A
Authority
JP
Japan
Prior art keywords
signal
sdram
output
clock
cas
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.)
Granted
Application number
JP11211884A
Other languages
Japanese (ja)
Other versions
JP3489497B2 (en
Inventor
Toshiya Kumano
俊哉 熊野
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.)
Murata Machinery Ltd
Original Assignee
Murata Machinery Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Murata Machinery Ltd filed Critical Murata Machinery Ltd
Priority to JP21188499A priority Critical patent/JP3489497B2/en
Publication of JP2001043127A publication Critical patent/JP2001043127A/en
Application granted granted Critical
Publication of JP3489497B2 publication Critical patent/JP3489497B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Dram (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a memory controller which can access an SDRAM with a control signal similar to that of a DRAM and allows an MPU and an I/O device to securely obtain data read out of the SDRAM. SOLUTION: A /MPURAS signal and a /MPUCAS signal outputted from the MPU 1 are converted into a /RAS signal and a /CAS signal for an SDRAM 2 by a RAS generation part 13 and a CAS generation part 12. Further, a /MPUWE signal is converted into a /WE signal synchronized with the /CAS signal. A clock generation part 11 after outputting the /CAS signal at the time of read access to an SDRAM 2 holds and thins out a clock a specific number of clocks later and supplies the resulting signal as an SDCLK signal to the SDRAM 2. Consequently, data outputted from the SDRAM 2 are held as they are and the MPU 1 and I/O device are able to obtain the data in the same timing with the DRAM.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、SDRAMをアク
セスするためのメモリコントローラに関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory controller for accessing an SDRAM.

【0002】[0002]

【従来の技術】DRAMの市場は、ここ数年、パーソナ
ルコンピュータの発達に牽引され、劇的に変化してき
た。近年は、DRAMに代わり、SDRAM(Sync
hronous DRAM)が主流となってきている。
BACKGROUND OF THE INVENTION The DRAM market has changed dramatically in recent years, driven by the development of personal computers. In recent years, instead of DRAM, SDRAM (Sync
(Hronous DRAM) is becoming mainstream.

【0003】図10は、DRAMをアクセスする際の一
般的なタイミングチャートである。図10において先頭
に‘/’を付した信号は、それぞれ負論理で示してい
る。以下同様である。一般的なDRAMをアクセスする
際には、主にローアドレスストローブ(RAS)信号、
コラムアドレスストローブ(CAS)信号、ライトイネ
ーブル(WE)信号を用いる。これらの信号タイミング
はシステムのクロックと非同期でよく、実際には各信号
の立ち上げ、立ち下げのタイミングが細かく決められて
いる。
FIG. 10 is a general timing chart for accessing a DRAM. In FIG. 10, signals preceded by '/' are each represented by negative logic. The same applies hereinafter. When accessing a general DRAM, mainly a row address strobe (RAS) signal,
A column address strobe (CAS) signal and a write enable (WE) signal are used. The timing of these signals may be asynchronous with the clock of the system. Actually, the rise and fall timing of each signal is determined in detail.

【0004】まず図10(A)に示す読み出し時には、
アドレス線にRASアドレスを出力してRAS信号をア
クティブにし、その後、アドレス線にCASアドレスを
出力してCAS信号をアクティブにする。このとき、W
E信号はインアクティブのままである。その後、所定の
期間tをおいた後に、RASアドレス、CASアドレス
で示されたアドレスからデータが読み出されてデータ線
に出力されるので、これをI/OやMPUなどが取り込
むことになる。RAS信号及びCAS信号をインアクテ
ィブに戻して、1回の読み出し動作が終了する。
First, at the time of reading shown in FIG.
An RAS address is output to the address line to activate the RAS signal, and thereafter, a CAS address is output to the address line to activate the CAS signal. At this time, W
The E signal remains inactive. Thereafter, after a predetermined period t, data is read from the address indicated by the RAS address and the CAS address and output to the data line, and this is taken in by the I / O or MPU. The RAS signal and the CAS signal are returned to inactive, and one read operation ends.

【0005】図10(B)に示す書き込み時も同様であ
り、アドレス線にRASアドレスを出力してRAS信号
をアクティブにする。書き込み時にはCAS信号をアク
ティブにするまでにWE信号をアクティブにするととも
に、書き込むデータをデータ線に出力しておく。データ
線上のデータが安定した後、アドレス線にCASアドレ
スを出力してCAS信号をアクティブにすると、そのタ
イミングでデータ線からデータが取り込まれ、DRAM
のRASアドレス、CASアドレスで示されたアドレス
に書き込まれる。RAS信号及びCAS信号をインアク
ティブに戻して、1回の書き込み動作が終了する。
The same applies to the write operation shown in FIG. 10B, in which the RAS signal is output to the address line to activate the RAS signal. At the time of writing, the WE signal is activated before the CAS signal is activated, and data to be written is output to the data line. After the data on the data line is stabilized, a CAS address is output to the address line to activate the CAS signal.
RAS address and CAS address. The RAS signal and the CAS signal are returned to inactive, and one write operation ends.

【0006】図11は、SDRAMをアクセスする際の
一般的なタイミングチャートである。SDRAMはクロ
ックに同期して動作する。まず図11(A)に示す読み
出し時には、アドレス線にRASアドレスを出力し、R
AS信号をクロックに同期して1クロック分だけアクテ
ィブにする。その後、アドレス線にCASアドレスを出
力し、CAS信号をクロックに同期して1クロック分だ
けアクティブにする。このとき、WE信号はインアクテ
ィブのままである。その後、レイテンシと呼ばれる所定
のクロック数をおいた後に、データ線にデータがおよそ
1クロック分だけ読み出される。これをI/OやMPU
などが取り込むことになる。図11(A)では、レイテ
ンシが1の例を示している。
FIG. 11 is a general timing chart for accessing the SDRAM. The SDRAM operates in synchronization with a clock. First, at the time of reading shown in FIG. 11A, the RAS address is output to the address line,
The AS signal is activated for one clock in synchronization with the clock. Thereafter, the CAS address is output to the address line, and the CAS signal is activated for one clock in synchronization with the clock. At this time, the WE signal remains inactive. Thereafter, after a predetermined number of clocks called a latency, data is read out to the data line by about one clock. I / O and MPU
And so on. FIG. 11A shows an example in which the latency is one.

【0007】図11(B)に示す書き込み時には、アド
レス線にRASアドレスを出力し、RAS信号をクロッ
クに同期して1クロック分だけアクティブにする。その
後、アドレス線にCASアドレスを出力するとともに、
データ線に書き込むデータを出力し、CAS信号とWE
信号をクロックに同期して1クロック分だけアクティブ
にする。これによってデータ線に出力されているデータ
がSDRAMに書き込まれる。
At the time of writing shown in FIG. 11B, the RAS address is output to the address line, and the RAS signal is activated for one clock in synchronization with the clock. After that, while outputting the CAS address to the address line,
Outputs data to be written to the data line, and outputs the CAS signal and WE
The signal is activated for one clock in synchronization with the clock. As a result, the data output to the data line is written to the SDRAM.

【0008】図10と図11を参照して分かるように、
非同期でアクセスするDRAMと、クロックに同期して
アクセスするSDRAMでは、アクセス時のタイミング
およびシーケンスが異なる。また、例えば読み出し時に
はデータが1クロック分の期間しか出力されないので、
DRAMに対応したMPUやI/Oデバイスでは、読み
出したデータを取り込むことができない。このように、
SDRAMはDRAMと同様に扱うことができない。
As can be seen with reference to FIGS. 10 and 11,
Timing and sequence at the time of access differ between a DRAM accessed asynchronously and an SDRAM accessed in synchronization with a clock. Also, for example, at the time of reading, data is output only for a period of one clock.
An MPU or I / O device compatible with a DRAM cannot read the read data. in this way,
SDRAM cannot be treated like DRAM.

【0009】上述のように、近年はDRAMに代わって
SDRAMが主流となってきており、従来のDRAMの
生産を各社とも打ち切り始めている。一部のハイエンド
のマイクロプロセッサでは、このSDRAMに対応する
ようにはじめから構成されている。しかしその他のマイ
クロプロセッサでは、従来のDRAM対応のものが依然
使われており、そのままではSDRAMを使用すること
ができない。そのため、SDRAMへの対応が必須とな
ってきた。
As described above, in recent years, SDRAMs have become the mainstream in place of DRAMs, and all companies have begun to discontinue conventional DRAM production. Some high-end microprocessors are initially configured to support this SDRAM. However, in other microprocessors, conventional microprocessor-compatible ones are still used, and the SDRAM cannot be used as it is. Therefore, support for SDRAM has become essential.

【0010】例えばFAXなどのマイクロプロセッサを
組み込んだ装置においては、上述のようなメモリの変化
に比べて組み込み機器用のワンチップマイコンの対応が
遅く、一部のハイエンドのチップを除けば、SDRAM
とのインタフェースをもつものはほとんどない。そのた
め、従来より用いているDRAMと同様に、SDRAM
を利用できることが望まれていた。
For example, in a device incorporating a microprocessor such as a facsimile, a one-chip microcomputer for embedded devices is slower to respond to changes in memory as described above, and except for some high-end chips, an SDRAM is used.
Few have an interface with. For this reason, SDRAMs are used in the same way as DRAMs conventionally used.
It was hoped that it could be used.

【0011】DRAMと同様にSDRAMをアクセスす
る方法として、例えばSDRAMに与えるクロックを遅
くし、例えばデータが読み出されるときのデータの出力
時間を長くし、MPUやI/Oデバイスにおいてデータ
を取得できるようにすることが考えられる。しかし、S
DRAMに与えるクロックを遅くすることによってアク
セス時間が非常に長くなってしまう。
As a method of accessing the SDRAM in the same manner as the DRAM, for example, a clock given to the SDRAM is delayed, for example, a data output time when data is read is lengthened, and data can be acquired by an MPU or an I / O device. It can be considered. However, S
The access time becomes very long by delaying the clock applied to the DRAM.

【0012】また、DMAにおいてもI/Oデバイスと
の間のデータ転送ではなく、メモリからメモリへのデー
タ転送を行うモードを使用し、例えばSDRAMからの
データの読み出しと、I/Oデバイスへのデータの出力
を別のシーケンスで行うことも可能である。しかし、そ
れぞれを独立したシーケンスで行うことによって全体と
しての転送時間が長くなってしまうという問題がある。
The DMA also uses a mode in which data is transferred from memory to memory, instead of data transfer between I / O devices. For example, data is read from SDRAM and data is transferred to I / O devices. It is also possible to output data in another sequence. However, there is a problem in that the transfer time as a whole becomes long by performing each in an independent sequence.

【0013】[0013]

【発明が解決しようとする課題】本発明は、上述した事
情に鑑みてなされたもので、DRAMと同様の制御信号
によってSDRAMをアクセスすることができ、また、
SDRAMから読み出されたデータをMPUやI/Oデ
バイスが確実に取得できるメモリコントローラを提供す
ることを目的とするものである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and enables access to an SDRAM by a control signal similar to that of a DRAM.
It is an object of the present invention to provide a memory controller that allows an MPU or an I / O device to reliably acquire data read from an SDRAM.

【0014】[0014]

【課題を解決するための手段】本発明は、メモリコント
ローラにおいて、DRAM用のRAS信号をSDRAM
用のRAS信号に変換するRAS生成手段と、DRAM
用のCAS信号をSDRAM用のCAS信号に変換する
CAS生成手段と、DRAM用のRAS信号、CAS信
号及びWE信号に基づいてSDRAMへのクロックを生
成するクロック生成手段を備えたことを特徴とするもの
である。このような構成では、DRAM用のRAS信号
がアクティブになったときクロックに同期してSDRA
M用のRAS信号を生成し、次にDRAM用のCAS信
号がアクティブになったときクロックに同期してSDR
AM用のCAS信号を生成する。そして、DRAM用の
CAS信号のアクティブに応答して所定のクロック数の
後に、WE信号がアクティブでなければSDRAMへの
クロックをホールドして間引くように動作させることが
できる。
SUMMARY OF THE INVENTION The present invention relates to a memory controller, comprising:
Generating means for converting RAS signal into RAS signal for use with DRAM
Generating means for converting a CAS signal for the SDRAM into a CAS signal for the SDRAM, and clock generating means for generating a clock for the SDRAM based on the RAS signal, the CAS signal and the WE signal for the DRAM. Things. In such a configuration, when the RAS signal for the DRAM becomes active, the SDRA
A RAS signal for M is generated, and the next time the CAS signal for DRAM becomes active, the SDR is synchronized with the clock.
A CAS signal for AM is generated. Then, after a predetermined number of clocks in response to the activation of the CAS signal for the DRAM, if the WE signal is not active, the operation can be performed such that the clock to the SDRAM is held and thinned out.

【0015】このような構成により、DRAM用のRA
S信号、CAS信号をSDRAM用の制御信号に変換
し、さらにSDRAMで用いるクロックの制御を行うこ
とができる。これによって、DRAM用の制御信号を用
いて、SDRAMの制御を行うことができる。本発明を
利用すると、MPUから見れば、SDRAMが従来のD
RAMのように扱えるため、SDRAMのためのアクセ
ス機構を持たないワンチップマイコンでも、問題なくS
DRAMを用いることができる。
With such a configuration, the RA for the DRAM
The S signal and the CAS signal can be converted into control signals for the SDRAM, and further, a clock used in the SDRAM can be controlled. Thus, the SDRAM can be controlled using the control signal for the DRAM. According to the present invention, from the viewpoint of the MPU, the SDRAM is a conventional DRAM.
Since it can be handled like a RAM, even a one-chip microcomputer without an access mechanism for SDRAM can
A DRAM can be used.

【0016】また本発明は、SDRAMをアクセスする
ためのメモリコントローラにおいて、クロックに同期し
てRAS信号を生成するRAS生成手段と、クロックに
同期してCAS信号を生成するCAS生成手段と、SD
RAMに対するリードアクセス時に前記CAS生成手段
によりCAS信号が生成されてから所定のクロック数の
後にSDRAMへのクロックをホールドして間引くクロ
ック生成手段を備えたことを特徴とするものである。
According to the present invention, in a memory controller for accessing an SDRAM, a RAS generating means for generating a RAS signal in synchronization with a clock, a CAS generating means for generating a CAS signal in synchronization with a clock,
Clock reading means for holding and decimating the clock to the SDRAM after a predetermined number of clocks after the CAS signal is generated by the CAS generating means at the time of read access to the RAM.

【0017】上述のように、SDRAMでは読み出した
データはおよそ1クロックしか保持されないため、MP
UやI/Oデバイスがデータを取り込めない。しかし上
述のいずれの発明においても、クロック生成手段におい
て、DRAM用のWE信号がアクティブでないとき(す
なわちリードアクセス時)、CAS信号が生成されてア
クティブになるのに応答して、所定のクロック数の後
に、クロックをホールドして間引く。これによって、S
DRAMから読み出されたデータは、クロックがホール
ドされているのでそのまま保持される。そのため、DR
AMに対応したMPUやI/Oデバイスでも、読み出さ
れたデータを問題なく取り込むことができる。また、こ
の場合にはクロックをホールドして間引く分だけアクセ
スタイムは遅くなるが、一般にSDRAMとのアクセス
タイムはI/Oデバイス等に比べると充分に速いので、
DMA時にはI/Oデバイス等の側のアクセス時間程度
で転送を終了させることができる。そのため、DRAM
を使用した場合に比べて、転送速度を低下させずにSD
RAMを用いたアクセスを行うことができる。
As described above, in the SDRAM, the read data is held for only about one clock.
U or I / O device cannot capture data. However, in any of the above-mentioned inventions, when the WE signal for the DRAM is not active (that is, at the time of read access), the clock generating means responds to the generation of the CAS signal and becomes active in response to the generation of the CAS signal. Later, hold the clock and thin out. This gives S
The data read from the DRAM is held as it is because the clock is held. Therefore, DR
Even an MPU or an I / O device compatible with AM can take in the read data without any problem. Also, in this case, the access time is delayed by the amount of holding and decimating the clock, but generally the access time with the SDRAM is sufficiently faster than that of an I / O device or the like.
At the time of DMA, the transfer can be completed in about the access time of the I / O device or the like. Therefore, DRAM
Compared to the case using
Access using the RAM can be performed.

【0018】[0018]

【発明の実施の形態】図1は、本発明のメモリコントロ
ーラの実施の一形態を示すブロック図である。図中、1
はMPU、2はSDRAM、3はアドレスバス、4はデ
ータバス、5,6はレベルシフタ、11はクロック生成
部、12はCAS生成部、13はRAS生成部、14は
AND回路、15はOR回路である。MPU1は、従来
のDRAMをアクセスする制御を行う機能を有してお
り、アドレスバス3,データバス4とともに、コントロ
ールバスに接続されている。ここでは、コントロールバ
ス中のメモリアクセスに必要な制御線として、DRAM
のRAS信号に対応する/MPURAS信号、CAS信
号に対応する/MPUCAS信号、WE信号に対応する
/MPUWE信号のみを示している。
FIG. 1 is a block diagram showing an embodiment of a memory controller according to the present invention. In the figure, 1
Is an MPU, 2 is an SDRAM, 3 is an address bus, 4 is a data bus, 5 and 6 are level shifters, 11 is a clock generator, 12 is a CAS generator, 13 is a RAS generator, 14 is an AND circuit, and 15 is an OR circuit. It is. The MPU 1 has a function of performing control for accessing a conventional DRAM, and is connected to the control bus together with the address bus 3 and the data bus 4. Here, a DRAM is used as a control line necessary for memory access in the control bus.
Only the / MPURAS signal corresponding to the RAS signal, the / MPUCAS signal corresponding to the CAS signal, and the / MPUWE signal corresponding to the WE signal are shown.

【0019】SDRAM2は、SDCLK信号として入
力されるクロックに同期して動作するメモリであり、制
御信号として/RAS信号、/CAS信号、/WE信号
等が入力される。これらの制御信号に従って、アドレス
バス3で送られてくるローアドレス、コラムアドレスで
指定されたアドレスに、データバス上のデータを書き込
んだり、指定されたアドレスからデータを読み出してデ
ータバス4上に出力する。さらに、これらの制御信号を
操作することにより、SDRAM2に備えられている種
々の機能を実行させることができる。
The SDRAM 2 is a memory that operates in synchronization with a clock input as an SDCLK signal, and receives a / RAS signal, a / CAS signal, a / WE signal and the like as control signals. In accordance with these control signals, data on the data bus is written to an address specified by a row address and a column address sent on the address bus 3, and data is read from the specified address and output on the data bus 4. I do. Further, by operating these control signals, various functions provided in the SDRAM 2 can be executed.

【0020】なお、MPU1とSDRAM2のアドレス
バス3,データバス4上の信号レベルが違う場合には、
それぞれレベルシフタ5,6により調整すればよい。も
ちろん、両者が同じ信号レベルであれば、レベルシフタ
5,6を設ける必要はない。また、通常はSDRAM2
を複数設けるため、アドレスバス3の一部をデコードし
てチップセレクト(/CS)信号を生成するが、ここで
は省略している。
If the signal levels on the address bus 3 and the data bus 4 of the MPU 1 and the SDRAM 2 are different,
The adjustment may be made by the level shifters 5 and 6, respectively. Of course, if both are at the same signal level, there is no need to provide the level shifters 5 and 6. Normally, SDRAM2
Are provided, a part of the address bus 3 is decoded to generate a chip select (/ CS) signal, which is omitted here.

【0021】クロック生成部11は、システムクロック
SYSCLKを用いて、SDRAM2に供給するクロッ
クを生成し、SDCLK信号としてSDRAM2に供給
する。このクロック生成部11は、通常はシステムクロ
ックSYSCLKをそのまま出力するが、SDRAM2
からのデータの読み出し時には、クロックをホールドし
て間引く。この例では、CAS生成部12から/MPU
CASの状態を示す信号と、その信号と/MPUWE信
号の論理積をAND回路14で演算した信号とを受け取
る。そして、/MPUWE信号がインアクティブである
場合には、/CAS信号が出力されてから、SDRAM
2の読み出し時の所定のレイテンシだけ遅延した後に、
/MPUCAS信号がアクティブの間、クロックをホー
ルドして間引く。
The clock generator 11 generates a clock to be supplied to the SDRAM 2 using the system clock SYSCLK, and supplies it to the SDRAM 2 as an SDCLK signal. The clock generator 11 normally outputs the system clock SYSCLK as it is.
At the time of reading data from, the clock is held and thinned out. In this example, the CAS generation unit 12 sends the / MPU
A signal indicating the CAS state and a signal obtained by calculating the logical product of the signal and the / MPUWE signal by the AND circuit 14 are received. When the / MPUWE signal is inactive, the / CAS signal is output before the SDRAM
After a delay of a predetermined latency at the time of reading 2,
While the / MPUCAS signal is active, the clock is held and thinned out.

【0022】このクロック生成部11によって、SDR
AM2は、データバス4上にデータを出力したままの状
態でクロックがホールドされる。そのため、データバス
4上に出力されたデータは、クロックをホールドしてい
る間、そのまま保持されることになる。これによって、
MPU1やその他のI/Oデバイスにおけるデータセッ
トアップ/ホールド時間を確保し、データバス4上に出
力されたデータをMPU1やその他のI/Oデバイスが
取得できるようにしている。
The clock generator 11 generates the SDR
In AM2, the clock is held while data is output on the data bus 4. Therefore, the data output on the data bus 4 is held as it is while holding the clock. by this,
A data setup / hold time in the MPU 1 and other I / O devices is secured so that the data output on the data bus 4 can be acquired by the MPU 1 and other I / O devices.

【0023】CAS生成部12は、/MPUCAS信号
を受け取り、システムクロックSYSCLKの反転信号
に従って、SDRAM2の/CAS信号に変換する。具
体的には、/MPUCAS信号がアクティブになった時
点で、1クロック分の/CAS信号を出力する。またC
AS生成部12は、クロック生成部11に対して、/M
PUCAS信号をシステムクロックSYSCLKの反転
信号に同期させた反転信号として出力する。
The CAS generator 12 receives the / MPUCAS signal and converts it into a / CAS signal of the SDRAM 2 according to an inverted signal of the system clock SYSCLK. Specifically, when the / MPUCAS signal becomes active, the / CAS signal for one clock is output. Also C
The AS generation unit 12 sends a / M to the clock generation unit 11.
The PUCAS signal is output as an inverted signal synchronized with the inverted signal of the system clock SYSCLK.

【0024】RAS生成部13は、/MPURAS信号
を受け取り、システムクロックSYSCLKの反転信号
に従って、SDRAM2の/RAS信号に変換する。具
体的には、/MPURAS信号がアクティブになった時
点で、1クロック分の/RAS信号を出力する。
The RAS generator 13 receives the / MPURAS signal and converts it into a / RAS signal of the SDRAM 2 according to an inverted signal of the system clock SYSCLK. Specifically, when the / MPURAS signal becomes active, one clock worth of / RAS signal is output.

【0025】AND回路14は、/MPUCAS信号が
アクティブの間だけ、/MPUWE信号をクロック生成
部11に供給するために設けられている。具体的には、
CAS生成部12から/MPUCAS信号をシステムク
ロックSYSCLKの反転信号に同期させた反転信号が
一方の入力端子に入力されており、/MPUCAS信号
がアクティブ(‘L’)になると‘H’となる。このと
き、もう一方の入力端子に入力されている/MPUWE
信号が、クロック生成部11に対して出力される。
The AND circuit 14 is provided to supply the / MPUWE signal to the clock generator 11 only while the / MPUCAS signal is active. In particular,
An inverted signal obtained by synchronizing the / MPUCAS signal with the inverted signal of the system clock SYSCLK from the CAS generation unit 12 is input to one input terminal. When the / MPUCAS signal becomes active ('L'), it becomes 'H'. At this time, the / MPUWE input to the other input terminal
The signal is output to the clock generation unit 11.

【0026】OR回路15は、MPU1から出力される
/MPUWE信号から、SDRAM2の/WE信号を生
成する。CAS生成部12から出力されるSDRAM2
の/CAS信号がOR回路15の一方の入力端子に入力
される。入力される/CAS信号がアクティブ
(‘L’)となる1クロック分の期間だけ、もう一方の
入力端子に入力されている/MPUWE信号がSDRA
M2に対して出力される。特に、書き込み時に/MPU
WE信号がアクティブになるので、書き込み時には/C
AS信号に同期して、/WE信号が1クロック分だけア
クティブになる。
The OR circuit 15 generates the / WE signal of the SDRAM 2 from the / MPUWE signal output from the MPU 1. SDRAM 2 output from CAS generation unit 12
/ CAS signal is input to one input terminal of the OR circuit 15. The / MPUWE signal input to the other input terminal is applied to the SDRA signal during the period of one clock when the input / CAS signal becomes active ('L').
Output to M2. In particular, when writing / MPU
Since the WE signal becomes active, / C
In synchronization with the AS signal, the / WE signal becomes active for one clock.

【0027】このような構成によって、MPU1からD
RAM用に出力される/MPURAS信号、/MPUC
AS信号、/MPUWE信号は、それぞれがSDRAM
2に対応した信号に変換される。そのため、MPU1か
らDRAMをアクセスする場合と同様にして、SDRA
M2をアクセスすることができる。また、例えばデータ
の読み出し時には、SDRAM2からデータが出力され
ている時間を長くし、MPU1や他のI/Oデバイスが
取り込むことができるように制御することができ、確実
にデータの読み出しを行うことができる。
With such a configuration, MPU 1
/ MPURAS signal output for RAM, / MPUC
AS signal and / MPUWE signal are each SDRAM
The signal is converted into a signal corresponding to 2. Therefore, in the same manner as when accessing the DRAM from the MPU 1, the SDRA
M2 can be accessed. In addition, for example, when reading data, the time during which data is output from the SDRAM 2 can be lengthened, and control can be performed so that the MPU 1 and other I / O devices can take in the data. Can be.

【0028】図2は、本発明のメモリコントローラの実
施の一形態における具体例を示す回路図である。図中、
図1と同様の部分には同じ符号を付してある。21,2
2,25,26,28,29,34,35,36はD−
フリップフロップ、23,24,27,30,33,3
7,42はOR回路、31はRS−フリップフロップ、
32,39,40はAND回路、38はデコーダ、4
1,43はマルチプレクサ、44はアドレス制御部であ
る。
FIG. 2 is a circuit diagram showing a specific example of one embodiment of the memory controller of the present invention. In the figure,
1 are given the same reference numerals. 21 and 2
2,25,26,28,29,34,35,36 are D-
Flip-flops, 23, 24, 27, 30, 33, 3
7, 42 are OR circuits, 31 is an RS flip-flop,
32, 39 and 40 are AND circuits, 38 is a decoder,
Reference numerals 1 and 43 are multiplexers and 44 is an address control unit.

【0029】CAS生成部12は、2つのD−フリップ
フロップ21,22とOR回路23で構成される1ショ
ット回路を有している。OR回路24によって/MPU
RAS信号と/MPUCAS信号の論理和を演算し、/
MPURAS信号がアクティブ(‘L’)である条件の
下で/MPUCAS信号が1ショット回路に入力され
る。/MPUCAS信号がアクティブになった時点で、
システムクロックSYSCLKの反転信号に従って、1
クロック分のアクティブ信号をOR回路15及びマルチ
プレクサ41に出力する。この信号はマルチプレクサ4
1を介してSDRAM2の/CAS信号となる。
The CAS generator 12 has a one-shot circuit composed of two D-flip-flops 21 and 22 and an OR circuit 23. / MPU by OR circuit 24
The logical sum of the RAS signal and the / MPUCAS signal is calculated,
Under the condition that the MPURAS signal is active ('L'), the / MPUCAS signal is input to the one-shot circuit. When the / MPUCAS signal becomes active,
1 according to the inverted signal of the system clock SYSCLK.
The active signal for the clock is output to the OR circuit 15 and the multiplexer 41. This signal is output to multiplexer 4
1 to the / CAS signal of the SDRAM 2.

【0030】また、D−フリップフロップ21の/Q端
子から、OR回路24の出力信号(/MPUCAS信
号)をシステムクロックSYSCLKの反転信号に同期
させた反転信号として出力する。この信号はAND回路
32を介してAND回路14及びクロック生成部11に
入力されている。
The output signal (/ MPUCAS signal) of the OR circuit 24 is output from the / Q terminal of the D-flip-flop 21 as an inverted signal synchronized with the inverted signal of the system clock SYSCLK. This signal is input to the AND circuit 14 and the clock generation unit 11 via the AND circuit 32.

【0031】RAS生成部13は、2つのD−フリップ
フロップ25,26とOR回路27で構成される1ショ
ット回路を有している。/MPURAS信号が1ショッ
ト回路に入力されており、/MPURAS信号がアクテ
ィブになった時点で、システムクロックSYSCLKの
反転信号に従って、1クロック分のアクティブ信号を出
力する。この出力は、マルチプレクサ43を介してSD
RAM2の/RAS信号となる。またこの出力は、AN
D回路39,OR回路33,マルチプレクサ41にも入
力されている。
The RAS generator 13 has a one-shot circuit composed of two D-flip-flops 25 and 26 and an OR circuit 27. When the / MPURAS signal is input to the one-shot circuit and the / MPURAS signal becomes active, an active signal for one clock is output according to the inverted signal of the system clock SYSCLK. This output is output to the SD via the multiplexer 43.
This becomes the / RAS signal of RAM2. This output is
It is also input to the D circuit 39, the OR circuit 33, and the multiplexer 41.

【0032】クロック生成部11は、2つのD−フリッ
プフロップ28,29によって構成される遅延回路を有
している。この遅延回路は、SDRAM2における読み
出し時のレイテンシに対応する遅延量だけ遅延させるも
のであり、ここではレイテンシ=1の場合を示してい
る。遅延量が多い場合には、さらに多くのD−フリップ
フロップを直列に接続すればよい。この遅延回路は、通
常は、AND回路32から出力される、/MPUCAS
信号をシステムクロックSYSCLKの反転信号に同期
させた反転信号に従って起動及び停止する。この遅延回
路が起動されている間は、AND回路14によって/W
E信号が有効になる。そのため、概ね/MPUCAS信
号がアクティブになって遅延量だけ遅延した後から、/
WE信号がOR回路30に出力される。SDRAM2か
ら読み出し時には/WE信号はインアクティブであるの
で、OR回路30の出力は‘H’にホールドされること
になる。これによって、読み出し時においてデータが出
力された時点でシステムクロックSYSCLKをホール
ドし、SDCLKを間引くことによってデータの出力時
間を長くとることができる。
The clock generator 11 has a delay circuit composed of two D flip-flops 28 and 29. This delay circuit delays by a delay amount corresponding to the latency at the time of reading in the SDRAM 2, and here, the case where the latency = 1 is shown. When the delay amount is large, more D-flip-flops may be connected in series. This delay circuit normally outputs / MPUCAS output from the AND circuit 32.
The signal is started and stopped according to an inverted signal obtained by synchronizing the signal with the inverted signal of the system clock SYSCLK. While this delay circuit is activated, the AND circuit 14 outputs / W
The E signal becomes valid. Therefore, approximately after the / MPUCAS signal becomes active and is delayed by the delay amount,
The WE signal is output to the OR circuit 30. Since the / WE signal is inactive when reading from the SDRAM 2, the output of the OR circuit 30 is held at "H". Thus, the system clock SYSCLK is held at the time when data is output during reading, and the data output time can be extended by thinning out SDCLK.

【0033】AND回路39は、RAS生成部13,C
AS生成部12,およびD−フリップフロップ35,3
6とOR回路37で構成される1ショット回路の出力を
受け、いずれかより1ショット信号が出力された場合
に、その信号を/CS信号としてSDRAM2に供給す
る。
The AND circuit 39 includes the RAS generator 13 and C
AS generator 12 and D-flip-flops 35 and 3
6 and the output of the one-shot circuit composed of the OR circuit 37, and when a one-shot signal is output from any one of them, the signal is supplied to the SDRAM 2 as a / CS signal.

【0034】その他の回路は、SDRAM2への書き込
みあるいは読み出し以外の種々の機能を利用するための
回路である。ここまでの基本的な回路部分について、そ
の動作の一例を説明しておく。ここで、まだ説明してい
ない部分において、OR回路37の出力は‘H’である
ものとし、AND回路40からはOR回路15の出力が
SDRAM2の/WE信号として出力されるものとす
る。また、マルチプレクサ41はCAS生成部12のO
R回路23の出力を選択して出力しており、この出力が
SDRAM2の/CAS信号となる。さらにマルチプレ
クサ43はRAS生成部13の出力を選択しているもの
とし、この出力がSDRAM2の/RAS信号となる。
The other circuits are circuits for utilizing various functions other than writing to or reading from the SDRAM 2. An example of the operation of the basic circuit part up to this point will be described. Here, it is assumed that the output of the OR circuit 37 is “H” and the output of the OR circuit 15 is output from the AND circuit 40 as the / WE signal of the SDRAM 2 in a portion which has not been described yet. The multiplexer 41 is connected to the Os of the CAS generator 12.
The output of the R circuit 23 is selected and output, and this output becomes the / CAS signal of the SDRAM 2. Further, it is assumed that the multiplexer 43 has selected the output of the RAS generation unit 13, and this output is the / RAS signal of the SDRAM 2.

【0035】図3は、本発明のメモリコントローラの実
施の一形態における具体例において、SDRAM2に対
してリードアクセスを行う場合のタイミングチャート、
図4は、同じくライトアクセスを行う場合のタイミング
チャートである。MPU1は、図10で説明したよう
に、/MPURAS信号をアクティブにした後、/MP
UCASをアクティブにする。そのとき、/MPUWE
信号がアクティブであればライトアクセス、インアクテ
ィブであればリードアクセスとなる。
FIG. 3 is a timing chart for a read access to the SDRAM 2 in a specific example of one embodiment of the memory controller of the present invention.
FIG. 4 is a timing chart when write access is performed. After activating the / MPURAS signal as described with reference to FIG.
Activate UCAS. At that time, / MPUWE
If the signal is active, it is write access, and if it is inactive, it is read access.

【0036】最初にリードアクセス時について説明す
る。まず、/MPURAS信号がアクティブになる。す
るとRAS生成部13の1ショット回路が、/MPUR
AS信号がアクティブになった最初の1クロック分だけ
アクティブとなった信号を出力する。この信号がマルチ
プレクサ43から出力されてSDRAM2における/R
AS信号となる。また、AND回路39から出力されて
SDRAM2の/CS信号となる。このときアドレスバ
ス3上に出力されているアドレスをRASアドレスとし
て取り込むことになる。
First, the case of read access will be described. First, the / MPURAS signal becomes active. Then, the one-shot circuit of the RAS generation unit 13 is set to / MPUR
A signal that is activated only for the first clock when the AS signal is activated is output. This signal is output from the multiplexer 43 to output / R in SDRAM2.
AS signal. Also, the signal is output from the AND circuit 39 and becomes the / CS signal of the SDRAM 2. At this time, the address output on the address bus 3 is taken in as the RAS address.

【0037】次に/MPUCAS信号がアクティブにな
る。このとき/MPURAS信号はアクティブのままで
あり、OR回路24を介して/MPUCAS信号がCA
S生成部12に入力されている。CAS生成部12の1
ショット回路は、/MPURAS信号がアクティブにな
った最初の1クロック分だけアクティブとなった信号を
出力する。これがマルチプレクサ41から出力され、S
DRAM2における/CAS信号となる。また、CAS
生成部12の1ショット回路から出力された1クロック
分だけアクティブとなった信号がAND回路39から出
力され、SDRAM2における/CS信号となる。この
ときアドレスバス3上に出力されているアドレスをRA
Sアドレスとして取り込むことになる。
Next, the / MPUCAS signal becomes active. At this time, the / MPURAS signal remains active, and the / MPUCAS signal is
It has been input to the S generator 12. 1 of the CAS generation unit 12
The shot circuit outputs a signal that becomes active only for the first clock when the / MPURAS signal becomes active. This is output from the multiplexer 41 and S
This becomes the / CAS signal in the DRAM 2. Also, CAS
The signal that is active for one clock and output from the one-shot circuit of the generation unit 12 is output from the AND circuit 39 and becomes the / CS signal in the SDRAM 2. At this time, the address output on the address bus 3 is
It will be captured as an S address.

【0038】SDRAM2は、/CAS信号として1シ
ョットの信号が入力されると、予めレイテンシとして設
定されているクロック数の後に、1クロック分だけデー
タをデータバス4に出力する。ここではレイテンシを1
としている。
When a one-shot signal is input as the / CAS signal, the SDRAM 2 outputs data to the data bus 4 for one clock after the number of clocks set in advance as a latency. Here the latency is 1
And

【0039】/MPUCAS信号がアクティブになる
と、CAS生成部12内のD−フリップフロップ21の
反転出力から‘H’の信号が出力され、AND回路32
を介してクロック生成部11の遅延回路を起動する。ま
た、この信号がAND回路14にも入力され、/MPU
WE信号が遅延回路に入力される。リードアクセス時に
は/MPUWE信号はインアクティブ(‘H’)であ
り、遅延回路の出力は/CAS信号が出力される1クロ
ック分と、レイテンシの1クロック分だけ遅延して
‘H’となる。そのため、OR回路30の出力は‘H’
にホールドされ、システムクロックSYSCLKは間引
かれてSDCLK信号となる。間引かれたクロックを破
線で示している。
When the / MPUCAS signal becomes active, an “H” signal is output from the inverted output of the D-flip-flop 21 in the CAS generator 12 and the AND circuit 32
To activate the delay circuit of the clock generation unit 11 via the. Further, this signal is also input to the AND circuit 14, and / MPU
The WE signal is input to the delay circuit. At the time of read access, the / MPUWE signal is inactive ('H'), and the output of the delay circuit becomes 'H' with a delay of one clock for outputting the / CAS signal and one clock of latency. Therefore, the output of the OR circuit 30 is “H”.
And the system clock SYSCLK is thinned out to become an SDCLK signal. The thinned clock is indicated by a broken line.

【0040】SDRAM2は、SDCLK信号(クロッ
ク)の立ち下がりが検出できないため、読み出したデー
タをそのまま保持する。そのため、データバス4上にデ
ータが残るため、例えばMPU1や他のI/Oデバイス
が所定のホールド時間をおいた後でもデータを取得する
ことができる。
Since the SDRAM 2 cannot detect the falling edge of the SDCLK signal (clock), it holds the read data as it is. Therefore, since data remains on the data bus 4, the data can be obtained even after the MPU 1 or another I / O device has a predetermined hold time.

【0041】その後、/MPURAS信号、/MPUC
AS信号はインアクティブに戻される。/MPUCAS
信号がインアクティブとなることにより、クロック生成
部11の遅延回路の動作が停止し、OR回路30への出
力が‘L’となって、再びシステムクロックSYSCL
KがSDCLK信号としてSDRAMへ供給されること
になる。SDRAM2においても、データの出力が終了
し、待機状態となる。
Thereafter, the / MPURAS signal, / MPUC
The AS signal is returned to inactive. / MPUCAS
When the signal becomes inactive, the operation of the delay circuit of the clock generation unit 11 stops, the output to the OR circuit 30 becomes “L”, and the system clock SYSCL is returned again.
K will be supplied to the SDRAM as the SDCLK signal. The SDRAM 2 also finishes outputting data and enters a standby state.

【0042】次にライトアクセス時について説明する。
リードアクセス時と同様に、まず/MPURAS信号が
アクティブになる。するとRAS生成部13の1ショッ
ト回路が、/MPURAS信号がアクティブになった最
初の1クロック分だけアクティブとなった信号を出力す
る。この信号がSDRAM2における/RAS信号及び
/CS信号となる。このときアドレスバス3上に出力さ
れているアドレスをRASアドレスとして取り込むこと
になる。
Next, write access will be described.
As in the case of the read access, first, the / MPURAS signal becomes active. Then, the one-shot circuit of the RAS generation unit 13 outputs a signal that has been activated only for the first clock in which the / MPURAS signal has been activated. This signal becomes the / RAS signal and / CS signal in the SDRAM 2. At this time, the address output on the address bus 3 is taken in as the RAS address.

【0043】次に/MPUWE信号がアクティブにな
る。しかし、OR回路15にはCAS生成部12からイ
ンアクティブ(‘H’)の信号が入力されているため、
SDRAM2の/WEはインアクティブ(‘H’)のま
まである。また、この/MPUWE信号がアクティブに
なるまでに、データバス4にはSDRAM2へ書き込む
べきデータが出力されている。DRAMでは、このデー
タが安定するまで、所定の時間をおいた後に、/MPU
CAS信号をアクティブにする。
Next, the / MPUWE signal becomes active. However, since an inactive ('H') signal is input from the CAS generation unit 12 to the OR circuit 15,
/ WE of SDRAM2 remains inactive ('H'). By the time the / MPUWE signal becomes active, data to be written to the SDRAM 2 has been output to the data bus 4. In the DRAM, after a predetermined time has passed until this data is stabilized, / MPU
Activate the CAS signal.

【0044】/MPUCAS信号がアクティブになる
と、OR回路24を介して/MPUCAS信号がCAS
生成部12に入力され、CAS生成部12の1ショット
回路から、/MPURAS信号がアクティブになった最
初の1クロック分だけアクティブとなった信号を出力す
る。これがマルチプレクサ41から出力され、SDRA
M2における/CAS信号となる。またAND回路39
を介して出力され、SDRAM2における/CS信号と
なる。このときアドレスバス3上に出力されているアド
レスをRASアドレスとして取り込むことになる。
When the / MPUCAS signal becomes active, the / MPUCAS signal becomes CAS via the OR circuit 24.
The signal is input to the generation unit 12, and the one-shot circuit of the CAS generation unit 12 outputs a signal that is activated only for the first clock in which the / MPURAS signal is activated. This is output from the multiplexer 41 and the SDRA
It becomes the / CAS signal in M2. AND circuit 39
, And becomes the / CS signal in the SDRAM 2. At this time, the address output on the address bus 3 is taken in as the RAS address.

【0045】また、このCAS生成部12の出力がOR
回路15にも入力され、1クロック分だけ/MPUWE
信号が出力される。/MPUWE信号は既にアクティブ
になっているので、1クロック分のアクティブの信号が
出力される。この信号がAND回路40を介してSDR
AM2の/WE信号として入力される。
The output of the CAS generation unit 12 is OR
It is also input to the circuit 15 and only for one clock / MPUWE
A signal is output. Since the / MPUWE signal is already active, an active signal for one clock is output. This signal is sent through the AND circuit 40 to the SDR
It is input as the / WE signal of AM2.

【0046】なお、/MPUCAS信号がアクティブに
なることにより、上述のようにクロック生成部11の遅
延回路が起動するが、/MPUWE信号がアクティブ
(‘L’)であるので、AND回路14の出力は‘L’
であり、OR回路30への出力は‘L’のままとなる。
そのため、システムクロックSYSCLKは間引かれる
ことなくそのままSDCLK信号としてSDRAM2に
供給される。
When the / MPUCAS signal becomes active, the delay circuit of the clock generator 11 is activated as described above. However, since the / MPUWE signal is active ('L'), the output of the AND circuit 14 is output. Is 'L'
And the output to the OR circuit 30 remains 'L'.
Therefore, the system clock SYSCLK is supplied to the SDRAM 2 as the SDCLK signal without being thinned out.

【0047】SDRAM2には、/CAS信号として1
ショットの信号が入力され、また/WE信号として同じ
タイミングで1ショットの信号が入力される。SDRA
M2はこのタイミングでデータバス4上のデータを取り
込み、ローアドレス及びコラムアドレスで示されたアド
レスにデータを書き込む。
The SDRAM 2 has 1 as the / CAS signal.
A shot signal is input, and a one-shot signal is input at the same timing as the / WE signal. SDRA
M2 takes in the data on the data bus 4 at this timing and writes the data to the address indicated by the row address and the column address.

【0048】その後、/MPURAS信号、/MPUC
AS信号、/MPUWE信号はインアクティブに戻され
る。/MPUCAS信号がインアクティブとなることに
より、クロック生成部11の遅延回路の動作が停止し、
OR回路30への出力が‘L’となって、再びシステム
クロックSYSCLKがSDCLK信号としてSDRA
Mへ供給されることになる。SDRAM2においても、
データの出力が終了し、待機状態となる。
Thereafter, the / MPURAS signal, / MPUC
The AS signal and the / MPUWE signal are returned to inactive. When the / MPUCAS signal becomes inactive, the operation of the delay circuit of the clock generation unit 11 stops,
The output to the OR circuit 30 becomes “L”, and the system clock SYSCLK is again output as the SDCLK signal by the SDRA signal.
M. Also in SDRAM2,
The data output ends, and the system enters a standby state.

【0049】このようにして、MPU1側ではDRAM
と同様にしてアクセス制御を行うだけで、SDRAM2
をアクセスすることが可能である。また、例えばSDR
AM2から読み出したデータも数クロック分の期間だけ
保持されるので、MPU1や他のI/Oデバイスにおい
ても正常に取得することができる。
As described above, the MPU 1 has the DRAM
Just by performing access control in the same manner as
It is possible to access. Also, for example, SDR
The data read from the AM 2 is also held for a period of several clocks, so that the MPU 1 and other I / O devices can normally acquire the data.

【0050】図2に戻り、上述の基本的な部分以外の回
路について説明する。以下に説明する回路部分は、SD
RAM2への書き込みあるいは読み出し以外の種々の機
能を利用するための回路である。図5は、SDRAMの
一例において備えられている機能の一部とその機能を利
用する際の制御信号の信号値の説明図である。図中、
H,Lは信号レベルを、×はHまたはLのいずれでもよ
いことを、Vはその値をSDRAM2が受け取ること
を、それぞれ示している。この図5に示す表のうち、R
ASアドレスとリード、あるいはRASアドレスとライ
トを実行することにより、SDRAM2からのデータの
読み出し及び書き込みを行うことができる。これらの機
能は、上述のクロック生成部11,CAS生成部12,
RAS生成部13等によって実現される。
Returning to FIG. 2, circuits other than the above-described basic parts will be described. The circuit part described below is SD
This is a circuit for utilizing various functions other than writing to or reading from the RAM 2. FIG. 5 is an explanatory diagram of some of the functions provided in an example of the SDRAM and signal values of control signals when using the functions. In the figure,
H and L indicate signal levels, X indicates that the signal level may be either H or L, and V indicates that the SDRAM 2 receives the value. In the table shown in FIG.
By executing the AS address and the read or the RAS address and the write, data can be read and written from the SDRAM 2. These functions are performed by the above-described clock generator 11, CAS generator 12,
This is realized by the RAS generation unit 13 and the like.

【0051】通常、DRAMを扱う際にはリフレッシュ
動作を行う。このDRAMに対するリフレッシュ動作
は、図5中のオートリフレッシュの実行に相当する。D
RAMのリフレッシュ動作は、リードあるいはライトア
クセスのときとは逆に、/MPUCAS信号を先にアク
ティブにし、その後、/MPURAS信号をアクティブ
にする。この順序で/MPURAS信号、/MPUCA
S信号が制御されたことを検出して、SDRAM2にお
けるオートリフレッシュあるいはセルフリフレッシュエ
ントリの制御信号を生成する。
Usually, a refresh operation is performed when a DRAM is handled. This refresh operation for the DRAM corresponds to the execution of the auto refresh in FIG. D
In the RAM refresh operation, the / MPUCAS signal is activated first, and then the / MPURAS signal is activated, contrary to the read or write access. In this order, the / MPURAS signal, / MPUCA
Upon detecting that the S signal has been controlled, a control signal for an auto-refresh or self-refresh entry in the SDRAM 2 is generated.

【0052】そのための回路として、RS−フリップフ
ロップ31、AND回路32、OR回路33,D−フリ
ップフロップ34などを設けている。RS−フリップフ
ロップ31には、/MPUCAS信号がS端子に、/M
PURAS信号がR端子に入力されている。通常のリー
ドあるいはライトアクセス時には、上述のように/MP
URAS信号が先にアクティブになり、その後/MPU
CAS信号がアクティブになるため、RS−フリップフ
ロップ31の出力は‘H’を維持する。しかしリフレッ
シュ時には先に/MPUCAS信号がアクティブになる
ため、RS−フリップフロップ31の出力は‘L’に変
化し、その後/MPURAS信号がアクティブになって
も維持される。このRS−フリップフロップ31の出力
は、AND回路32,OR回路33,マルチプレクサ4
1に入力される。
For this purpose, an RS flip-flop 31, an AND circuit 32, an OR circuit 33, a D flip-flop 34 and the like are provided. In the RS-flip-flop 31, the / MPUCAS signal is supplied to the S terminal and the / M
The PURAS signal is input to the R terminal. During normal read or write access, / MP
The URAS signal becomes active first, and then the / MPU
Since the CAS signal becomes active, the output of the RS-flip-flop 31 maintains 'H'. However, at the time of refresh, the / MPUCAS signal becomes active first, so that the output of the RS-flip-flop 31 changes to “L” and is maintained even after the / MPURAS signal becomes active. The output of the RS-flip-flop 31 is supplied to an AND circuit 32, an OR circuit 33, a multiplexer 4
1 is input.

【0053】OR回路33では、RS−フリップフロッ
プ31の出力が‘L’になると、RAS生成部13から
出力される1クロック分の/RAS信号をD−フリップ
フロップ34のクロックとして送出する。
When the output of the RS-flip-flop 31 becomes 'L', the OR circuit 33 sends out the / RAS signal for one clock output from the RAS generator 13 as the clock of the D-flip-flop 34.

【0054】D−フリップフロップ34では、OR回路
33からの1クロック分の/RAS信号をクロックとし
て得て、CKEI信号をラッチしてSDRAM2のCK
E信号として出力する。このCKEI信号は、オートリ
フレッシュあるいはセルフリフレッシュエントリのいず
れを実行するかを示す信号である。通常は‘H’のまま
であり、オートリフレッシュが実行される。CKEI信
号が‘L’に変化してリフレッシュ動作が行われると、
CKE信号が‘H’から‘L’に変化し、その時点でセ
ルフリフレッシュの動作に移行する。なお、D−フリッ
プフロップ34は、装置の電源投入時に/RESET信
号により初期化される。
In the D-flip-flop 34, the / RAS signal for one clock from the OR circuit 33 is obtained as a clock, the CKEI signal is latched, and the CK of the SDRAM 2 is
Output as E signal. This CKEI signal is a signal indicating whether to execute auto refresh or self refresh entry. Normally, it remains at “H”, and the auto refresh is executed. When the CKEI signal changes to 'L' and the refresh operation is performed,
The CKE signal changes from “H” to “L”, at which point the operation shifts to a self-refresh operation. The D-flip-flop 34 is initialized by a / RESET signal when the power of the device is turned on.

【0055】リフレッシュ動作の際には、/MPUWE
信号はインアクティブのままである。すなわちリードア
クセスのときと同じであるため、そのままではクロック
をホールドして間引いてしまう。これを防止するため、
CAS生成部12からクロック生成部11へ送られる信
号を、AND回路32によってRS−フリップフロップ
31の出力を送出し、リフレッシュ動作のときは‘L’
にしている。これによって、クロック生成部11の遅延
回路は動作せず、クロックをホールドして間引くことは
ない。
At the time of the refresh operation, / MPUWE
The signal remains inactive. That is, since the operation is the same as in the read access, the clock is held and thinned out as it is. To prevent this,
The signal sent from the CAS generation unit 12 to the clock generation unit 11 is output from the RS-flip-flop 31 by the AND circuit 32, and is "L" at the time of the refresh operation.
I have to. As a result, the delay circuit of the clock generation unit 11 does not operate, and the clock is not held and thinned.

【0056】さらに、マルチプレクサ41の選択信号の
1つとしてRS−フリップフロップ31の出力が入力さ
れており、この選択信号が‘L’に変化することによっ
てRAS生成部13からの出力が選択されて/CAS信
号として出力される。すなわち、/CAS信号として/
RAS信号と同じ信号が出力される。また、OR回路2
4によって、/MPUCAS信号がアクティブになって
もCAS生成部12は動作せず、その後に/MPURA
S信号がアクティブになった時点で、CAS生成部12
は1クロック分のアクティブ信号を出力する。これはR
AS生成部13と同等の信号である。さらに、AND回
路39にはRAS生成部13及びCAS生成部12から
同等の1クロック分のアクティブ信号が入力され、同じ
信号が/CS信号としてSDRAM2に出力される。
Further, the output of the RS-flip-flop 31 is input as one of the selection signals of the multiplexer 41, and the output from the RAS generator 13 is selected by changing this selection signal to 'L'. / CAS signal. That is, as the / CAS signal /
The same signal as the RAS signal is output. OR circuit 2
4, the CAS generation unit 12 does not operate even if the / MPUCAS signal becomes active,
When the S signal becomes active, the CAS generator 12
Outputs an active signal for one clock. This is R
This signal is equivalent to that of the AS generation unit 13. Further, an equivalent active signal for one clock is input to the AND circuit 39 from the RAS generator 13 and the CAS generator 12, and the same signal is output to the SDRAM 2 as a / CS signal.

【0057】図6は、本発明のメモリコントローラの実
施の一形態における具体例において、SDRAM2に対
してリフレッシュ動作を行う際の一例を示すタイミング
チャートである。まず/MPUCAS信号がアクティブ
になるが、何も動作しない。その後、/MPURAS信
号がアクティブになると、RAS生成部13は1クロッ
ク分のアクティブ信号を出力して/RAS信号になると
ともに、RS−フリップフロップ31の出力が‘L’に
なる。このRS−フリップフロップ31の出力によっ
て、/RAS信号が/CAS信号として出力される。さ
らに、CKE信号としてCKEI信号で与えられた信号
が出力される。なお、/WE信号はインアクティブのま
まである。
FIG. 6 is a timing chart showing an example when a refresh operation is performed on the SDRAM 2 in a specific example of one embodiment of the memory controller of the present invention. First, the / MPUCAS signal becomes active, but does nothing. Thereafter, when the / MPURAS signal becomes active, the RAS generation unit 13 outputs an active signal for one clock to become the / RAS signal, and the output of the RS-flip-flop 31 becomes 'L'. By the output of the RS-flip-flop 31, the / RAS signal is output as the / CAS signal. Further, a signal given by the CKEI signal is output as the CKE signal. Note that the / WE signal remains inactive.

【0058】このようにして、DRAMでリフレッシュ
を行うときと同様に、/MPUCASをアクティブにし
た後、/MPURASをアクティブにすることによっ
て、SDRAM2におけるリフレッシュを行うことがで
きる。
In this manner, similarly to the case of refreshing in the DRAM, by activating / MPUCAS and then activating / MPURAS, refreshing in the SDRAM 2 can be performed.

【0059】再び図2に戻り、図5に示すオールバンク
プリチャージとモードレジスタセットを行うときの回路
部分について説明する。モードレジスタセットは、例え
ばリード時におけるレイテンシのセットや、バーストモ
ード時のバースト長のセットなどを行う。
Returning to FIG. 2, a circuit portion for performing all-bank precharge and mode register set shown in FIG. 5 will be described. The mode register set performs, for example, setting of a latency at the time of reading, and setting of a burst length at the time of burst mode.

【0060】この2つの機能を実行させる場合には、こ
の例では例えばMPU1から特定のアドレスに対するア
クセスを行うことによって実行する。デコーダ38は、
これらの機能の実行を指示する特定のアドレスをデコー
ドし、特定のアドレスがアドレスバスに出力されたと
き、出力をアクティブ(‘L’)にする。
In order to execute these two functions, in this example, it is executed by, for example, accessing a specific address from the MPU 1. The decoder 38
A specific address instructing the execution of these functions is decoded, and when the specific address is output to the address bus, the output is activated ('L').

【0061】D−フリップフロップ35,36とOR回
路37は1ショット回路を構成しており、デコーダ38
の出力が‘H’から‘L’に変化してから最初の1クロ
ック分だけアクティブになる信号を出力する。この信号
は、AND回路40を介してSDRAM2の/WE信号
として出力される。また、AND回路39を介してSD
RAM2の/CS信号としても出力される。さらに、マ
ルチプレクサ41及びマルチプレクサ43にも入力され
る。
The D-flip-flops 35 and 36 and the OR circuit 37 constitute a one-shot circuit.
The signal which becomes active only for the first clock after the output changes from "H" to "L". This signal is output as the / WE signal of SDRAM 2 via AND circuit 40. In addition, the SD
It is also output as the / CS signal of RAM2. Further, it is also input to the multiplexer 41 and the multiplexer 43.

【0062】D−フリップフロップ35の/Q端子から
は、デコーダ38の出力の反転信号がクロックに従って
出力される。通常はデコーダ38の出力は‘H’である
ので‘L’が出力される。オールバンクプリチャージあ
るいはモードレジスタセットのいずれかを実行するとき
は、デコーダ38の出力が‘L’となるので、このD−
フリップフロップ35の/Q端子の出力は‘H’とな
る。
From the / Q terminal of the D flip-flop 35, an inverted signal of the output of the decoder 38 is output in accordance with the clock. Normally, the output of the decoder 38 is "H", so that "L" is output. When either the all-bank precharge or the mode register set is executed, the output of the decoder 38 becomes "L".
The output of the / Q terminal of the flip-flop 35 becomes 'H'.

【0063】マルチプレクサ43にはRAS生成部13
からの出力信号と、D−フリップフロップ35,36と
OR回路37で構成される1ショット回路からの出力信
号が入力されており、D−フリップフロップ35の/Q
端子の出力でいずれかが選択される。通常はD−フリッ
プフロップ35の/Q端子の出力は‘L’であるのでR
AS生成部13からの出力信号を選択して、SDRAM
2の/RAS信号として出力する。オールバンクプリチ
ャージあるいはモードレジスタセットのいずれかを実行
するときは、D−フリップフロップ35の/Q端子の出
力が‘H’となるので、OR回路37から出力される1
ショット信号がSDRAM2の/RAS信号として出力
される。
The multiplexer 43 includes the RAS generator 13
, And an output signal from a one-shot circuit composed of D-flip-flops 35 and 36 and an OR circuit 37.
Either is selected by the output of the terminal. Normally, the output of the / Q terminal of the D-flip-flop 35 is "L",
An output signal from the AS generation unit 13 is selected and the SDRAM is selected.
2 as the / RAS signal. When executing either the all-bank precharge or the mode register set, the output of the / Q terminal of the D-flip-flop 35 becomes “H”, so that the 1 output from the OR circuit 37 is output.
The shot signal is output as the / RAS signal of SDRAM2.

【0064】OR回路42は、D−フリップフロップ3
5のQ端子の出力を一方の入力とし、アドレスバス3の
A10信号をもう一方の入力として論理和演算を行う。
通常はD−フリップフロップ35のQ端子の出力が
‘H’であるので、このOR回路42の出力も‘H’で
ある。オールバンクプリチャージあるいはモードレジス
タセットのいずれかを実行するときは、D−フリップフ
ロップ35のQ端子の出力が‘L’となるので、アドレ
スバス3のA10信号が有効になる。図5からも分かる
ように、オールバンクプリチャージのときにはアドレス
バス3のA10信号は‘H’、モードレジスタセットの
ときにはアドレスバス3のA10信号は‘L’である。
これに応じた信号がOR回路42から出力される。
The OR circuit 42 includes a D-flip-flop 3
The output of the Q terminal 5 is used as one input, and the A10 signal of the address bus 3 is used as the other input to perform a logical sum operation.
Normally, the output of the Q terminal of the D-flip-flop 35 is “H”, so that the output of the OR circuit 42 is also “H”. When executing either the all-bank precharge or the mode register set, the output of the Q terminal of the D-flip-flop 35 becomes “L”, so that the A10 signal of the address bus 3 becomes valid. As can be seen from FIG. 5, the A10 signal on the address bus 3 is "H" during all-bank precharge, and the "A10" signal on the address bus 3 is "L" when the mode register is set.
A signal corresponding to this is output from the OR circuit 42.

【0065】マルチプレクサ41は、電源電圧と、OR
回路37の出力と、RAS生成部13の出力と、CAS
生成部12の出力の4つの入力信号から、選択信号で示
される1つの信号を選択して出力する。選択信号として
RS−フリップフロップ31の出力と、OR回路42の
出力が入力されている。通常はOR回路42の出力が
‘H’であるので、RS−フリップフロップ31の出力
が‘H’のときCAS生成部12の出力を選択する。こ
れは通常のリード、ライト時に相当する。OR回路42
の出力が‘H’、RS−フリップフロップ31の出力が
‘L’のときRAS生成部13の出力を選択する。これ
はリフレッシュ動作のときに相当する。オールバンクプ
リチャージあるいはモードレジスタセットのいずれかを
実行するときは、基本的にRS−フリップフロップ31
の出力は‘H’である。オールバンクプリチャージのと
きにはOR回路42の出力が‘H’となるので、CAS
生成部12の出力が選択されるが、信号はインアクティ
ブのままとなる。モードレジスタセットのときにはOR
回路42の出力が‘L’となるので、OR回路37から
の出力が選択される。この場合、OR回路37から1シ
ョット信号が出力されるので、この1ショット信号がS
DRAM2に/CAS信号として入力される。
The multiplexer 41 is connected to the power supply voltage and the OR.
The output of the circuit 37, the output of the RAS generator 13,
From the four input signals of the output of the generation unit 12, one signal indicated by the selection signal is selected and output. The output of the RS-flip-flop 31 and the output of the OR circuit 42 are input as selection signals. Normally, since the output of the OR circuit 42 is “H”, the output of the CAS generator 12 is selected when the output of the RS-flip-flop 31 is “H”. This corresponds to normal reading and writing. OR circuit 42
Is "H" and the output of the RS-flip-flop 31 is "L", the output of the RAS generator 13 is selected. This corresponds to a refresh operation. When performing either the all-bank precharge or the mode register set, basically, the RS-flip-flop 31
Is 'H'. Since the output of the OR circuit 42 becomes "H" at the time of all-bank precharge, CAS
The output of generator 12 is selected, but the signal remains inactive. OR when mode register set
Since the output of the circuit 42 becomes “L”, the output from the OR circuit 37 is selected. In this case, a one-shot signal is output from the OR circuit 37.
The signal is input to the DRAM 2 as a / CAS signal.

【0066】このようにして、オールバンクプリチャー
ジのときにはD−フリップフロップ35,36とOR回
路37で構成される1ショット回路から出力される1シ
ョット信号がSDRAM2の/RAS信号、/WE信
号、/CS信号として出力され、/CAS信号は出力さ
れない。これによって、オールバンクプリチャージの機
能が実行される。また、モードレジスタセットのときに
はD−フリップフロップ35,36とOR回路37で構
成される1ショット回路から出力される1ショット信号
がSDRAM2の/RAS信号、/CAS信号、/WE
信号、/CS信号として出力される。これによって、モ
ードレジスタセットの機能が実行され、アドレスバス3
上のデータがSDRAM2中のモードレジスタにセット
される。
As described above, at the time of all-bank precharge, the one-shot signal output from the one-shot circuit constituted by the D-flip-flops 35 and 36 and the OR circuit 37 outputs the / RAS signal, / WE signal, The signal is output as the / CS signal and the / CAS signal is not output. Thereby, the function of all-bank precharge is executed. When the mode register is set, the one-shot signal output from the one-shot circuit composed of the D-flip-flops 35 and 36 and the OR circuit 37 outputs the / RAS signal, / CAS signal and / WE of the SDRAM 2.
The signal is output as a / CS signal. As a result, the function of the mode register set is executed, and the address bus 3
The above data is set in the mode register in SDRAM2.

【0067】以上のようにして、図5に示したようなS
DRAM2に備えられている種々の機能についても、D
RAMのアクセスしかできないMPU1から実行させる
ことができる。
As described above, S as shown in FIG.
Various functions provided in the DRAM 2 are also
It can be executed from the MPU 1 that can only access the RAM.

【0068】なお、アドレス制御部44は、SDRAM
2を複数バンク構成となっている場合に、/RAS信号
出力時にアドレスバス3上のアドレスの一部をBANK
信号として分離し、次の/CAS信号出力時に、同じバ
ンクを指定するようにする。
The address control unit 44 is an SDRAM
2 has a plurality of banks, a part of the address on the address bus 3 is set to BANK when the / RAS signal is output.
The same bank is designated when the next / CAS signal is output.

【0069】図2に示した具体例は、それぞれの信号の
論理値(アクティブ・ローあるいはアクティブ・ハイ)
に応じて組んでいる。それぞれの信号の論理値が異なれ
ば、それに応じて回路を変更する必要がある。また、こ
こでは図5に示した機能を実現する回路として構成を示
したが、不要な機能の削除や、機能の追加による回路の
追加は任意である。さらに各機能を実行させるための信
号の論理値も、使用するSDRAMに合わせて設計すれ
ばよい。さらに、図2では説明に必要な部分のみを示し
ており、他の回路部分を含んでいてもよい。もちろん、
図2に示した回路の一部を公知の他の回路構成に置き換
えることも任意である。
In the specific example shown in FIG. 2, the logical value of each signal (active low or active high)
It is assembled according to. If the logic value of each signal is different, it is necessary to change the circuit accordingly. Although the configuration is shown here as a circuit that realizes the functions shown in FIG. 5, it is optional to delete unnecessary functions or add circuits by adding functions. Furthermore, the logic value of the signal for executing each function may be designed according to the SDRAM to be used. Further, FIG. 2 shows only a portion necessary for description, and may include other circuit portions. of course,
It is optional to replace a part of the circuit shown in FIG. 2 with another known circuit configuration.

【0070】図7は、本発明のメモリコントローラの別
の実施の形態を示すブロック図である。図中、51はD
MAコントローラ、52はSDRAMインタフェース、
53はクロック生成部、61はCAS生成部、62はR
AS生成部、63はCS生成部、64はWE生成部であ
る。この例では、DMAを用いてSDRAM2に対する
アクセスを行う例を示している。DMAを用いてSDR
AM2をアクセスする場合、SDRAM2に対して与え
る各信号は、インタフェース部分で新たに生成すること
ができる。しかし、上述のようにリードアクセス時に
は、例えばSDRAM2からデータが読み出される時間
間隔が非常に短く、従来のDRAMに対応しているI/
OデバイスではSDRAM2から読み出されたデータを
取得できない場合が発生する。そのため、上述と同様の
SDRAM2に対するアクセス制御を行う必要が生じ
る。
FIG. 7 is a block diagram showing another embodiment of the memory controller of the present invention. In the figure, 51 is D
MA controller, 52 is an SDRAM interface,
53 is a clock generator, 61 is a CAS generator, and 62 is R
The AS generation unit, 63 is a CS generation unit, and 64 is a WE generation unit. In this example, an example is shown in which access to the SDRAM 2 is performed using DMA. SDR using DMA
When accessing the AM2, each signal given to the SDRAM2 can be newly generated at the interface portion. However, as described above, at the time of read access, for example, the time interval at which data is read from the SDRAM 2 is very short, and the I / O corresponding to the conventional DRAM is performed.
In some cases, data read from the SDRAM 2 cannot be acquired by the O device. Therefore, it is necessary to perform the same access control to the SDRAM 2 as described above.

【0071】図7に示す例では、DMAコントローラ5
1は、例えば予め設定されたアドレスから、順次、アド
レスを生成してSDRAMインタフェース52に対して
出力する。もちろん、DMA転送のためにMPUに対し
てバス使用権を獲得するなど、各種の制御も行う。
In the example shown in FIG.
1 sequentially generates addresses from a preset address and outputs the generated addresses to the SDRAM interface 52, for example. Of course, various controls are performed, such as acquiring the bus use right to the MPU for the DMA transfer.

【0072】SDRAMインタフェース52は、DMA
コントローラ51から出力されたアドレスを取得し、そ
のアドレスに対してデータバス上のデータをSDRAM
2へ書き込み(ライトアクセス)、あるいはSDRAM
2中のそのアドレスからデータを読み出してデータバス
上に出力させる(リードアクセス)。SDRAMインタ
フェース52は、このようなライトアクセス、リードア
クセス時におけるSDRAM2に対する制御を行う。こ
の例では、SDRAM2において用いられる/CAS信
号、/RAS信号、/CS信号、/WE信号は、それぞ
れ、CAS生成部61、RAS生成部62、CS生成部
63、WE生成部64で生成する。これらの信号は、シ
ステムクロックSYSCLKに同期して生成され、例え
ば図示しないシーケンサや制御部によって各信号の生成
を制御すればよい。
The SDRAM interface 52 has a DMA
An address output from the controller 51 is obtained, and the data on the data bus is transferred to the SDRAM for the address.
2 (write access) or SDRAM
The data is read from the address in 2 and output on the data bus (read access). The SDRAM interface 52 controls the SDRAM 2 during such write access and read access. In this example, the / CAS signal, the / RAS signal, the / CS signal, and the / WE signal used in the SDRAM 2 are generated by the CAS generation unit 61, the RAS generation unit 62, the CS generation unit 63, and the WE generation unit 64, respectively. These signals are generated in synchronization with the system clock SYSCLK, and the generation of each signal may be controlled by, for example, a sequencer or a control unit (not shown).

【0073】クロック生成部53は、システムクロック
SYSCLKに基づいてSDRAM2に対してSDCL
K信号を生成する。具体的には、通常はシステムクロッ
クSYSCLKをそのままSDCLK信号としてSDR
AM2に供給する。また、SDRAM2に対してリード
アクセスを行う場合には、SDRAMインタフェース5
2のCAS生成部61で/CAS信号が生成された後、
所定のクロック数の後にクロックをホールドし、システ
ムクロックSYSCLKを間引いて出力する。なお、こ
の例ではWE生成部64からの出力によって、リードア
クセスかライトアクセスかを判断している。
The clock generation unit 53 supplies the SDRAM 2 with SDCL based on the system clock SYSCLK.
Generate a K signal. Specifically, normally, the system clock SYSCLK is used as it is as the SDCLK signal in the SDR
AM2. When performing read access to the SDRAM 2, the SDRAM interface 5
After the / CAS signal is generated by the second CAS generation unit 61,
After a predetermined number of clocks, the clock is held, and the system clock SYSCLK is thinned out and output. In this example, whether the access is a read access or a write access is determined based on the output from the WE generation unit 64.

【0074】次に、本発明のメモリコントローラの別の
実施の形態における動作を簡単に説明する。図8は、本
発明のメモリコントローラの別の実施の形態においてS
DRAM2に対してリードアクセスを行う場合のタイミ
ングチャートである。ここではSDRAM2から読み出
したデータを他のI/Oデバイスが取得する場合の例を
示している。DMAコントローラ51は、I/Oデバイ
スに対してDACK信号をアクティブにするとともに、
/IOW信号をアクティブにし、また、SDRAMイン
タフェースに対して読み出すべきアドレスを渡す。
Next, the operation of another embodiment of the memory controller of the present invention will be briefly described. FIG. 8 shows another embodiment of the memory controller of the present invention.
5 is a timing chart when performing a read access to a DRAM 2; Here, an example is shown in which data read from the SDRAM 2 is acquired by another I / O device. The DMA controller 51 activates the DACK signal for the I / O device,
Activates the / IOW signal and passes the address to be read to the SDRAM interface.

【0075】SDRAMインタフェース52では、CS
生成部63が/CS信号をアクティブにするとともに、
一連のSDRAM2へのリードアクセス時の信号シーケ
ンスを開始する。まずローアドレスを出力した後に、R
AS生成部62は1クロック分の/RAS信号を生成し
て出力する。その後、コラムアドレスを出力した後にC
AS生成部61は/CAS信号を生成して出力する。こ
れによって、SDRAM2は、所定のクロック数(レイ
テンシ)の後に、アドレスで指定されたデータをデータ
バスに出力する。
In the SDRAM interface 52, CS
The generator 63 activates the / CS signal,
A series of signal sequences at the time of read access to the SDRAM 2 is started. First, after outputting the row address, R
The AS generation unit 62 generates and outputs the / RAS signal for one clock. Then, after outputting the column address, C
The AS generator 61 generates and outputs a / CAS signal. Thus, the SDRAM 2 outputs the data specified by the address to the data bus after a predetermined number of clocks (latency).

【0076】一方、SDRAM2がデータを出力するタ
イミングでクロック生成部53はクロックをホールド
し、システムクロックSYSCLKを間引いたSDCL
K信号をSDRAM2に供給する。I/Oデバイスは、
所定のデータセットアップ時間(図8ではTw(R))
が必要となる。そのため、クロック生成部53では、こ
の所定のデータセットアップ時間Tw(R)を満足する
よう、クロックをホールドして間引く。これによってS
DRAM2は、読み出したデータをそのまま出力し続け
る。
On the other hand, at the timing when the SDRAM 2 outputs data, the clock generation unit 53 holds the clock, and the SDCL 2 which thins out the system clock SYSCLK.
The K signal is supplied to the SDRAM 2. I / O devices are
Predetermined data setup time (Tw (R) in FIG. 8)
Is required. Therefore, the clock generator 53 holds and thins out the clock so as to satisfy the predetermined data setup time Tw (R). This gives S
The DRAM 2 keeps outputting the read data as it is.

【0077】その間にDMAコントローラ51はI/O
デバイスに対して/IOW信号をインアクティブに戻
し、I/Oデバイスはこのタイミングでデータバス上に
出力されているデータを取り込む。このようにして、S
DRAM2から読み出されたデータは、確実にI/Oデ
バイスに取り込まれる。
In the meantime, the DMA controller 51
The / IOW signal is returned to inactive for the device, and the I / O device takes in the data output on the data bus at this timing. Thus, S
The data read from the DRAM 2 is reliably taken into the I / O device.

【0078】その後、クロック生成部53はクロックの
ホールドを停止するとともに、SDRAMインタフェー
ス52のCS生成部63は/CS信号をインアクティブ
にし、また、DMAコントローラ51はDACK信号を
インアクティブにして、1回のリードアクセスを終了す
る。
Thereafter, the clock generation unit 53 stops holding the clock, the CS generation unit 63 of the SDRAM interface 52 makes the / CS signal inactive, and the DMA controller 51 makes the DACK signal inactive, and The read access of the times is ended.

【0079】図9は、本発明のメモリコントローラの別
の実施の形態においてSDRAM2に対してライトアク
セスを行う場合のタイミングチャートである。ここでは
I/Oデバイスから出力されるデータをSDRAM2に
書き込む場合の例を示している。DMAコントローラ5
1は、I/Oデバイスに対してDACK信号をアクティ
ブにするとともに、/IOR信号をアクティブにし、ま
た、SDRAMインタフェースに対して書き込むべきア
ドレスを渡す。
FIG. 9 is a timing chart when a write access is made to SDRAM 2 in another embodiment of the memory controller of the present invention. Here, an example in which data output from the I / O device is written to the SDRAM 2 is shown. DMA controller 5
1 activates the DACK signal to the I / O device, activates the / IOR signal, and passes the address to be written to the SDRAM interface.

【0080】SDRAMインタフェース52では、CS
生成部63が/CS信号をアクティブにするとともに、
一連のSDRAM2へのライトアクセス時の信号シーケ
ンスを開始する。まずローアドレスを出力した後に、R
AS生成部62は1クロック分の/RAS信号を生成し
て出力する。そして、コラムアドレスを出力した後にC
AS生成部61は/CAS信号を生成し、またWE生成
部64が/WE信号を生成して出力する。これによっ
て、SDRAM2は、データバス上のデータを、指定さ
れたアドレスに書き込む。
In the SDRAM interface 52, CS
The generator 63 activates the / CS signal,
A series of signal sequences at the time of write access to the SDRAM 2 is started. First, after outputting the row address, R
The AS generation unit 62 generates and outputs the / RAS signal for one clock. Then, after outputting the column address, C
The AS generator 61 generates a / CAS signal, and the WE generator 64 generates and outputs a / WE signal. Thus, the SDRAM 2 writes the data on the data bus to the specified address.

【0081】しかしI/Oデバイスでは、/IOR信号
を受け取ってから所定時間が経過してからデータの出力
を開始し、さらに所定の時間Tw(W)が経過してデー
タが安定してから、データが受け取られることを想定し
ている。そのため、確実にSDRAM2にデータを書き
込むためには、このタイミングを遵守する必要がある。
図9に示す例では、I/Oデバイスからデータが出力さ
れるタイミングから所定の時間Tw(W)だけ経過した
後に、CAS生成部61及びWE生成部64から/CA
S信号及び/WE信号を出力させている。これによっ
て、I/Oデバイスから出力されるデータを確実にSD
RAM2に書き込むことができる。
However, the I / O device starts outputting data after a predetermined time has elapsed after receiving the / IOR signal, and after the predetermined time Tw (W) has elapsed and the data has stabilized, It is assumed that data will be received. Therefore, in order to reliably write data to the SDRAM 2, it is necessary to observe this timing.
In the example shown in FIG. 9, after a lapse of a predetermined time Tw (W) from the timing at which data is output from the I / O device, the CAS generation unit 61 and the WE generation unit 64 transmit / CA
The S signal and the / WE signal are output. As a result, the data output from the I / O device can be reliably transferred to the SD
It can be written to RAM2.

【0082】その後、SDRAMインタフェース52の
CS生成部63は/CS信号をインアクティブにし、ま
た、DMAコントローラ51は/IOR信号及びDAC
K信号をインアクティブにして、1回のライトアクセス
を終了する。
Thereafter, the CS generator 63 of the SDRAM interface 52 makes the / CS signal inactive, and the DMA controller 51 sends the / IOR signal and the DAC
The K signal is made inactive, and one write access ends.

【0083】このようにして、DMAを用いて、I/O
デバイスとSDRAM間でデータ転送を行う場合につい
ても、SDRAM2から読み出したデータを確実にI/
Oデバイスが受け取ることができる。また、I/Oデバ
イスが出力したデータについても、確実にSDRAM2
に書き込むことができる。
As described above, the I / O is performed using the DMA.
Also in the case of performing data transfer between the device and the SDRAM, the data read from the SDRAM 2 is surely transferred to the I / D memory.
O device can receive. Also, the data output from the I / O device is surely stored in the SDRAM2.
Can be written to.

【0084】図8,図9では、1回のみのリードアクセ
スあるいはライトアクセスのためのタイミングチャート
を示したが、例えばSDRAM2のバーストモードを用
いてアクセスする場合についても、同様の制御によって
確実にデータ転送を行うことが可能である。
FIGS. 8 and 9 show timing charts for only one read access or write access. However, for example, in the case of accessing using the burst mode of SDRAM 2, the same control is surely performed. It is possible to perform a transfer.

【0085】[0085]

【発明の効果】以上の説明から明らかなように、本発明
によれば、MPUなどからDRAM用の制御信号を用い
てSDRAMの制御を行うことができ、SDRAMのた
めのアクセス機構を持たないワンチップマイコンなどで
も、問題なくSDRAMを用いることができる。また、
DRAMに対応したMPUやI/Oデバイスにおいて
も、SDRAMから読み出されたデータを確実に取得
し、また、SDRAMに対してデータを確実に書き込む
ことができるという効果がある。
As is apparent from the above description, according to the present invention, an SDRAM can be controlled by using a control signal for a DRAM from an MPU or the like, and an SDRAM having no access mechanism for the SDRAM is provided. Even a chip microcomputer can use an SDRAM without any problem. Also,
Even in an MPU or an I / O device compatible with the DRAM, there is an effect that the data read from the SDRAM can be reliably obtained and the data can be reliably written to the SDRAM.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明のメモリコントローラの実施の一形態を
示すブロック図である。
FIG. 1 is a block diagram showing one embodiment of a memory controller of the present invention.

【図2】本発明のメモリコントローラの実施の一形態に
おける具体例を示す回路図である。
FIG. 2 is a circuit diagram showing a specific example of an embodiment of the memory controller of the present invention.

【図3】本発明のメモリコントローラの実施の一形態に
おける具体例において、SDRAM2に対してリードア
クセスを行う場合のタイミングチャートである。
FIG. 3 is a timing chart when a read access is made to the SDRAM 2 in a specific example of the memory controller according to the embodiment of the present invention;

【図4】本発明のメモリコントローラの実施の一形態に
おける具体例において、SDRAM2に対してライトア
クセスを行う場合のタイミングチャートである。
FIG. 4 is a timing chart when a write access is made to the SDRAM 2 in a specific example of the memory controller according to the embodiment of the present invention;

【図5】SDRAMの一例において備えられている機能
の一部とその機能を利用する際の制御信号の信号値の説
明図である。
FIG. 5 is an explanatory diagram of a part of functions provided in an example of an SDRAM and signal values of control signals when using the functions.

【図6】本発明のメモリコントローラの実施の一形態に
おける具体例において、SDRAM2に対してリフレッ
シュ動作を行う際の一例を示すタイミングチャートであ
る。
FIG. 6 is a timing chart showing an example when a refresh operation is performed on the SDRAM 2 in a specific example of the memory controller according to the embodiment of the present invention;

【図7】本発明のメモリコントローラの別の実施の形態
を示すブロック図である。
FIG. 7 is a block diagram showing another embodiment of the memory controller of the present invention.

【図8】本発明のメモリコントローラの別の実施の形態
においてSDRAM2に対してリードアクセスを行う場
合のタイミングチャートである。
FIG. 8 is a timing chart when a read access is made to the SDRAM 2 in another embodiment of the memory controller of the present invention.

【図9】本発明のメモリコントローラの別の実施の形態
においてSDRAM2に対してライトアクセスを行う場
合のタイミングチャートである。
FIG. 9 is a timing chart when performing a write access to the SDRAM 2 in another embodiment of the memory controller of the present invention.

【図10】DRAMをアクセスする際の一般的なタイミ
ングチャートである。
FIG. 10 is a general timing chart when accessing a DRAM.

【図11】SDRAMをアクセスする際の一般的なタイ
ミングチャートである。
FIG. 11 is a general timing chart when accessing an SDRAM.

【符号の説明】[Explanation of symbols]

1…MPU、2…SDRAM、3…アドレスバス、4…
データバス、5,6…レベルシフタ、11…クロック生
成部、12…CAS生成部、13…RAS生成部、14
…AND回路、15…OR回路、21,22,25,2
6,28,29,34,35,36…D−フリップフロ
ップ、23,24,27,30,33,37,42…O
R回路、31…RS−フリップフロップ、32,39,
40…AND回路、38…デコーダ、41,43…マル
チプレクサ、44…アドレス制御部、51…DMAコン
トローラ、52…SDRAMインタフェース、53…ク
ロック生成部、61…CAS生成部、62…RAS生成
部、63…CS生成部、64…WE生成部。
1. MPU, 2. SDRAM, 3. Address bus, 4.
Data bus, 5, 6 level shifter, 11 clock generator, 12 CAS generator, 13 RAS generator, 14
... AND circuit, 15 ... OR circuit, 21, 22, 25, 2
6, 28, 29, 34, 35, 36... D flip-flops, 23, 24, 27, 30, 33, 37, 42.
R circuit, 31 ... RS flip-flop, 32, 39,
40 AND circuit, 38 decoder, 41, 43 multiplexer, 44 address controller, 51 DMA controller, 52 SDRAM interface, 53 clock generator, 61 CAS generator, 62 RAS generator, 63 ... CS generator, 64 ... WE generator.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 DRAM用のRAS信号をSDRAM用
のRAS信号に変換するRAS生成手段と、DRAM用
のCAS信号をSDRAM用のCAS信号に変換するC
AS生成手段と、DRAM用のRAS信号、CAS信号
及びWE信号に基づいてSDRAMへのクロックを生成
するクロック生成手段を備えたことを特徴とするメモリ
コントローラ。
An RAS generating means for converting a RAS signal for a DRAM to an RAS signal for an SDRAM, and a C for converting a CAS signal for a DRAM to a CAS signal for an SDRAM.
A memory controller comprising: an AS generation unit; and a clock generation unit that generates a clock for an SDRAM based on a RAS signal, a CAS signal, and a WE signal for a DRAM.
【請求項2】 前記クロック生成手段は、DRAM用の
WE信号がアクティブでないとき、DRAM用のCAS
信号のアクティブに応答して所定のクロック数の後に、
クロックをホールドして間引くことを特徴とする請求項
1に記載のメモリコントローラ。
2. The method according to claim 1, wherein the clock generating means is configured to control the CAS for the DRAM when the WE signal for the DRAM is not active.
After a predetermined number of clocks in response to the activation of the signal,
2. The memory controller according to claim 1, wherein the clock is held and thinned out.
【請求項3】 SDRAMをアクセスするためのメモリ
コントローラにおいて、クロックに同期してRAS信号
を生成するRAS生成手段と、クロックに同期してCA
S信号を生成するCAS生成手段と、SDRAMに対す
るリードアクセス時に前記CAS生成手段によりCAS
信号が生成されてから所定のクロック数の後にSDRA
Mへのクロックをホールドして間引くクロック生成手段
を備えたことを特徴とするメモリコントローラ。
3. A memory controller for accessing an SDRAM, comprising: RAS generating means for generating a RAS signal in synchronization with a clock;
A CAS generating means for generating an S signal; and a CAS generating means for performing a read access to the SDRAM.
After a predetermined number of clocks from the signal generation, the SDRA
A memory controller comprising clock generation means for holding and decimating a clock to M.
JP21188499A 1999-07-27 1999-07-27 Memory controller Expired - Fee Related JP3489497B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21188499A JP3489497B2 (en) 1999-07-27 1999-07-27 Memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21188499A JP3489497B2 (en) 1999-07-27 1999-07-27 Memory controller

Publications (2)

Publication Number Publication Date
JP2001043127A true JP2001043127A (en) 2001-02-16
JP3489497B2 JP3489497B2 (en) 2004-01-19

Family

ID=16613233

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21188499A Expired - Fee Related JP3489497B2 (en) 1999-07-27 1999-07-27 Memory controller

Country Status (1)

Country Link
JP (1) JP3489497B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100440976B1 (en) * 2002-08-29 2004-07-21 삼성전자주식회사 Method and apparatus for synchronous dynamic random access memory using controling signal of extended data output dynamic random access memory
JP2005078592A (en) * 2003-09-03 2005-03-24 Brother Ind Ltd Memory controller and image forming device
WO2005045679A1 (en) * 2003-11-07 2005-05-19 Rohm Co., Ltd Controller of synchronous memory and electronic device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100440976B1 (en) * 2002-08-29 2004-07-21 삼성전자주식회사 Method and apparatus for synchronous dynamic random access memory using controling signal of extended data output dynamic random access memory
JP2005078592A (en) * 2003-09-03 2005-03-24 Brother Ind Ltd Memory controller and image forming device
WO2005045679A1 (en) * 2003-11-07 2005-05-19 Rohm Co., Ltd Controller of synchronous memory and electronic device
CN100371911C (en) * 2003-11-07 2008-02-27 罗姆股份有限公司 Controller of synchronous memory and electronic device

Also Published As

Publication number Publication date
JP3489497B2 (en) 2004-01-19

Similar Documents

Publication Publication Date Title
US10127969B2 (en) Memory device command receiving and decoding methods
US6073223A (en) Memory controller and method for intermittently activating and idling a clock signal for a synchronous memory
US7421558B2 (en) System controlling interface timing in memory module and related method
US20100302874A1 (en) Semiconductor memory device, information processing system including the same, and controller
US7272054B2 (en) Time domain bridging circuitry for use in determining output enable timing
TW550596B (en) Synchronous semiconductor memory device for controlling cell operations by using frequency information of a clock signal
KR100368778B1 (en) Synchronous semiconductor storage device
JPH10233091A (en) Semiconductor storage device and data processor
JP2002304885A (en) Semiconductor integrated circuit
KR100894252B1 (en) Semiconductor memory device and method for controlling operation of the same
JPH09180438A (en) Memory control device
US20100149891A1 (en) Semiconductor memory device including reset control circuit
JP3705276B2 (en) Refresh control and internal voltage generation in semiconductor memory devices
JP3489497B2 (en) Memory controller
JP3317912B2 (en) Semiconductor storage device
JP2987809B2 (en) CAS signal generator for synchronous DRAM
JPH1145567A (en) Semiconductor storage device
US11614888B2 (en) Memory system and electronic system including the same
EP1156421B1 (en) CPU system with high-speed peripheral LSI circuit
JP2001014213A (en) Microcomputer and system using the same
US20080181023A1 (en) Semiconductor memory device
JP2000222879A (en) Semiconductor memory
JPH08227374A (en) Memory system
JPH01119840A (en) Control circuit for dynamic ram
JP2978834B2 (en) Storage device

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20101107

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20111107

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20121107

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees