JP2002108700A - Sdram interface circuit and sdram control method and image processor equipped with the same sdram interface circuit - Google Patents

Sdram interface circuit and sdram control method and image processor equipped with the same sdram interface circuit

Info

Publication number
JP2002108700A
JP2002108700A JP2000304606A JP2000304606A JP2002108700A JP 2002108700 A JP2002108700 A JP 2002108700A JP 2000304606 A JP2000304606 A JP 2000304606A JP 2000304606 A JP2000304606 A JP 2000304606A JP 2002108700 A JP2002108700 A JP 2002108700A
Authority
JP
Japan
Prior art keywords
sdram
read
address
command
write
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000304606A
Other languages
Japanese (ja)
Inventor
Hiroyuki Noguchi
裕之 野口
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.)
Panasonic System Solutions Japan Co Ltd
Original Assignee
Matsushita Graphic Communication Systems Inc
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 Matsushita Graphic Communication Systems Inc filed Critical Matsushita Graphic Communication Systems Inc
Priority to JP2000304606A priority Critical patent/JP2002108700A/en
Publication of JP2002108700A publication Critical patent/JP2002108700A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Input (AREA)
  • Memory System (AREA)
  • Dram (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an SDRAM interface circuit capable of reducing the load of a controller such as a DPS and a CPU, and simplifying the constitution of a program or a circuit. SOLUTION: In an SDRAM interface circuit 200 in which a DSP 100 is connected to an SDRAM 300, a reception data buffer 700 successively preserves reading addresses inputted from the DSP 100 in plural buffers, and a command control block 800 judges the continuity of the reading addresses preserved in the plural buffers, and at the time of judging that the continuity is not present any more in the reading addresses, generates and outputs a read command with the first reading address as a start address. The SDRAM 300 outputs read data corresponding to the read command. The reception data buffer 700 successively preserves the read data in the plural buffers, and outputs the preserved read data to the DSP 100 as necessary.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、SDRAMインタ
ーフェイス回路およびSDRAM制御方法ならびにSD
RAMインターフェイス回路を備えた画像処理装置に関
する。
The present invention relates to an SDRAM interface circuit, an SDRAM control method, and an SDRAM.
The present invention relates to an image processing device having a RAM interface circuit.

【0002】[0002]

【従来の技術】近年、非同期DRAMに代わる高速DR
AMとして、シンクロナスDRAM(以下、SDRAM
という)が開発されている。SDRAMは、従来のDR
AMの特徴に加えて、外部クロックに同期した入出力回
路構成、コマンド形式のアクセス、バースト転送による
連続アクセス、多バンク構成などの特徴を有する。この
ようなSDRAMを画像バッファ等に利用すれば、例え
ばCPU、DPSのような処理回路とSDRAMとのク
ロックの共通化によりアクセス時のロスを少なくでき
る。また、バースト転送を利用することでDPSやCP
Uをノーウエイトで動作させることができる。
2. Description of the Related Art In recent years, high-speed DR replacing asynchronous DRAM
As AM, synchronous DRAM (hereinafter, SDRAM)
Has been developed. SDRAM is a conventional DR
In addition to the features of AM, it has features such as an input / output circuit configuration synchronized with an external clock, access in command format, continuous access by burst transfer, and a multi-bank configuration. If such an SDRAM is used for an image buffer or the like, a loss during access can be reduced by using a common clock for the SDRAM and a processing circuit such as a CPU or DPS. Also, by using burst transfer, DPS and CP can be used.
U can be operated with no weight.

【0003】上述のSDRAMに対し、DSP等からデ
ータをリードおよびライトするために、DSP等とSD
RAMとの間にSDRAMインターフェイス回路を置い
ている。従来のSDRAMインターフェイス回路は、D
SP等からの制御信号を受け取り、SDRAM用の信号
に変換し、SDRAMを制御する。
In order to read and write data from a DSP or the like to the above-mentioned SDRAM, the DSP or the like
An SDRAM interface circuit is placed between the RAM and the RAM. The conventional SDRAM interface circuit has a D
The control signal from the SP or the like is received, converted into a signal for SDRAM, and the SDRAM is controlled.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、従来の
SDRAMインターフェイス回路は、DSP等からの制
御信号を受け取りSDRAM用の信号に変換するような
受動的な回路で構成しているので、DSP等がSDRA
Mを管理している。このため、DSP等が実行するプロ
グラムにSDRAM制御のための手順を持たせ、DSP
等にSDRAM制御のための動作を実行させる必要があ
る。
However, the conventional SDRAM interface circuit is constituted by a passive circuit which receives a control signal from a DSP or the like and converts it into a signal for SDRAM.
M is managed. For this reason, the program executed by the DSP or the like is provided with a procedure for controlling the SDRAM.
For example, it is necessary to execute an operation for controlling the SDRAM.

【0005】例えば、SDRAMは単位時間毎にリフレ
ッシュを行う必要がある。このリフレッシュはSDRA
Mに対してリフレッシュコマンドを入力することにより
行われる。従って、SDRAMがDSP等の管理下にあ
る場合、DSP等が時間を測り、特定の周期でSDRA
Mインターフェイス回路にリフレッシュを命令する制御
信号を入力する。SDRAMインターフェイス回路は、
この制御信号をリフレッシュコマンドに変換し、SDR
AMへ入力する。
For example, an SDRAM needs to be refreshed every unit time. This refresh is SDRA
This is performed by inputting a refresh command to M. Therefore, when the SDRAM is under the control of a DSP or the like, the DSP or the like measures the time, and
A control signal for instructing refresh is input to the M interface circuit. The SDRAM interface circuit is
This control signal is converted into a refresh command, and SDR
Input to AM.

【0006】また、SDRAMへデータをリード/ライ
トする場合、SDRAMに対するクロックイネーブル
(CKE)信号をアクティブにした状態で、バンクアク
ティブ(ACT)コマンドによりバンクをアクティブに
した後、リード(RD)/ライト(WT)コマンドをS
DRAMへ入力しアドレスを指定し、データをリード/
ライトする。
When data is read / written from / to an SDRAM, a bank is activated by a bank active (ACT) command in a state where a clock enable (CKE) signal for the SDRAM is activated, and then a read (RD) / write is performed. (WT) command to S
Input to DRAM, specify address, read data /
Write.

【0007】このリード/ライト動作を行うために、D
SP等は何らかの制御信号を出力して、SDRAMイン
ターフェイス回路にSDRAMへCKE信号をアクティ
ブにする。次いで、アドレスデータをSDRAMインタ
ーフェイス回路に入力する。SDRAMインターフェイ
ス回路は、アドレスデータからバンクおよびアドレスを
決定し、バンクアクティブコマンドおよびリード/ライ
トコマンドをSDRAMへ入力する。
In order to perform this read / write operation, D
The SP or the like outputs some control signal to activate the CKE signal to the SDRAM to the SDRAM interface circuit. Next, the address data is input to the SDRAM interface circuit. The SDRAM interface circuit determines a bank and an address from address data, and inputs a bank active command and a read / write command to the SDRAM.

【0008】また、データのリード/ライトは、上記リ
フレッシュの合間に行う必要があるので、DSP等はS
DRAMの状態を監視し、最適なタイミングにコマンド
をSDRAMへ入力する必要がある。もしコマンドの入
力が不適切なタイミングで行われたならば、ライトした
はずのデータを壊してしまったり、データのリードを上
手く行えないことがある。
Since data read / write must be performed between the refreshes, the DSP or the like needs
It is necessary to monitor the state of the DRAM and input a command to the SDRAM at an optimal timing. If the command is input at an inappropriate timing, the data that should have been written may be destroyed, or the data may not be read properly.

【0009】このようにSDRAMインターフェイス回
路があるものの、SDRAMの制御がDSP等の下にあ
る場合、DSP等の負荷が大きく、また、DSP等が実
行するプログラムや回路の構成が複雑になり、プログラ
マが複雑なSDRAM制御に頭を悩ませている。
Although the SDRAM interface circuit is provided as described above, when the control of the SDRAM is under the DSP or the like, the load of the DSP or the like is large, and the programs and circuits executed by the DSP or the like are complicated, and the programmer is complicated. Are suffering from complicated SDRAM control.

【0010】本発明は、かかる点に鑑みてなされたもの
であり、DSP、CPU等の制御装置の負荷を軽減し、
プログラムや回路の構成を簡略化することができるSD
RAMインターフェイス回路およびSDRAM制御方法
ならびにSDRAMインターフェイス回路を備えた画像
処理装置を提供することを目的とする。
[0010] The present invention has been made in view of the above points, and reduces the load on a control device such as a DSP and a CPU.
SD that can simplify the configuration of programs and circuits
It is an object to provide a RAM interface circuit, an SDRAM control method, and an image processing apparatus including the SDRAM interface circuit.

【0011】[0011]

【課題を解決するための手段】この課題を解決するため
に、DSP、CPU等の制御装置とSDRAMとを接続
するSDRAMインターフェイス回路において、制御装
置からのアクセス要求(リードアクセス、ライトアクセ
スなど)を保留し、そのアドレスの連続性を調べ、それ
以上のアドレスの連続性がなければそれまで保留したア
クセス要求に従ってアドレスを生成、出力し、SDRA
Mを制御することとした。
In order to solve this problem, an SDRAM interface circuit for connecting a control device such as a DSP or CPU to an SDRAM receives an access request (read access, write access, etc.) from the control device. Hold, check the continuity of the address, and if there is no more continuity of the address, generate and output the address according to the access request held until then,
M was controlled.

【0012】これにより、SDRAMインターフェイス
回路が制御装置に代わってSDRAMを制御するので、
DSP等の負荷を軽減し、プログラマや回路設計者は複
雑なSDRAM制御から逃れることができる。
As a result, the SDRAM interface circuit controls the SDRAM in place of the control device.
By reducing the load on the DSP and the like, programmers and circuit designers can escape from complicated SDRAM control.

【0013】[0013]

【発明の実施の形態】第1に、本発明は、上記目的を達
成するために、制御装置とSDRAMとを接続するSD
RAMインターフェイス回路であって、前記制御装置か
ら入力された読み出しアドレスを保存する複数のアドレ
スバッファ手段と、前記複数のアドレスバッファ手段に
保存した読み出しアドレスの連続性を判定する判定手段
と、前記判定手段が前記読み出しアドレスにそれ以上連
続性がないと判定した場合にそこまでに前記複数のアド
レスバッファ手段に保存した最初の読み出しアドレスを
開始アドレスとするリードコマンドを生成、出力するコ
マンド生成手段と、前記リードコマンドに応じて前記S
DRAMから入力されたリードデータを保存する複数の
データバッファ手段と、前記複数のデータバッファ手段
に保存したリードデータを前記制御装置へ出力するリー
ドデータ出力手段と、を具備することを特徴とするSD
RAMインターフェイス回路を提供する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First, in order to achieve the above object, the present invention provides an SD card for connecting a control device to an SDRAM.
A RAM interface circuit, comprising: a plurality of address buffer means for storing a read address input from the control device; a determining means for determining continuity of the read address stored in the plurality of address buffer means; When it is determined that there is no more continuity in the read address, a command generating means for generating and outputting a read command with the first read address stored in the plurality of address buffer means as a start address so far, In response to the read command,
An SD comprising: a plurality of data buffer means for storing read data input from a DRAM; and a read data output means for outputting the read data stored in the plurality of data buffer means to the control device.
A RAM interface circuit is provided.

【0014】本発明は、かかる構成により、制御装置か
ら特別なコマンドがなくても、アドレスの連続性を自ら
判定し、適切なタイミングでリードコマンドを生成、出
力し、SDRAMから入力されたリードデータを制御装
置へ適宜出力するので、制御装置は、SDRAMへのリ
ードコマンド生成等を行う必要がない。
According to the present invention, with this configuration, even if there is no special command from the control device, the continuity of the address is determined by itself, a read command is generated and output at an appropriate timing, and the read data input from the SDRAM is output. Is appropriately output to the control device, so that the control device need not generate a read command to the SDRAM.

【0015】また、本発明において、制御装置からのリ
ードアクセスをカウントするリードカウンタ手段をさら
に具備し、コマンド生成手段は前記リードカウンタ手段
によるカウント値およびSDRAMのバースト長から前
記カウント値に最適なバースト長を求め、変更するコマ
ンドを生成、出力しても良い。
Further, in the present invention, there is further provided a read counter means for counting a read access from the control device, and the command generation means is configured to determine the optimum burst value for the count value based on the count value of the read counter means and the burst length of the SDRAM. A command for determining the length and changing the length may be generated and output.

【0016】この構成により、制御装置から特別なコマ
ンドがなくても、最適なバースト長を求め、SDRAM
のバースト長を変更するので、制御装置は、SDRAM
へのモードセットコマンドの生成等を行う必要がない。
With this configuration, even if there is no special command from the control device, the optimum burst length can be obtained and the SDRAM can be obtained.
The controller changes the burst length of the SDRAM.
It is not necessary to generate a mode set command to the CAM.

【0017】また、本発明において、制御装置からのリ
ードアクセスをカウントするリードカウンタ手段と、前
記リードカウンタ手段によるカウント値を超えるリード
データがSDRAMから入力された場合当該リードデー
タを複数のデータバッファ手段に保存することなく破棄
する入力制御手段と、をさらに具備しても良い。
Further, in the present invention, a read counter means for counting read accesses from a control device, and when read data exceeding the count value of the read counter means is input from the SDRAM, the read data is transferred to a plurality of data buffer means. And input control means for discarding without saving the information.

【0018】この構成により、制御装置から特別なコマ
ンドがなくても、制御装置が必要とするデータ数とバー
スト長とのずれを調整し、必要なリードデータのみを制
御装置へ出力するので、制御装置は、不必要なリードデ
ータの切り捨て等を行う必要がない。
With this configuration, even if there is no special command from the control device, the deviation between the number of data required by the control device and the burst length is adjusted, and only the necessary read data is output to the control device. The device does not need to perform unnecessary truncation of read data.

【0019】第2に、本発明は、上記目的を達成するた
めに、制御装置とSDRAMとを接続するSDRAMイ
ンターフェイ回路であって、前記制御装置から入力され
たライトデータおよびその書き込みアドレスを保存する
複数のバッファ手段と、前記複数のバッファ手段に保存
した書き込みアドレスの連続性を判定する判定手段と、
前記判定手段が前記書き込みアドレスにそれ以上連続性
がないと判定した場合にそこまでに前記複数のバッファ
手段に保存した最初の書き込みアドレスを開始アドレス
とするライトコマンドを生成、出力するコマンド生成手
段と、前記ライトコマンド出力後所定のタイミングで前
記複数のバッファ手段に保存したライトデータを順次出
力するライトデータ出力手段と、を具備することを特徴
とするSDRAMインターフェイス回路を提供する。
Secondly, the present invention provides an SDRAM interface circuit for connecting a control device to an SDRAM, wherein the write data and the write address inputted from the control device are stored. A plurality of buffer means, and determination means for determining the continuity of the write address stored in the plurality of buffer means,
A command generating unit that generates and outputs a write command having a first write address stored in the plurality of buffer units as a start address up to which the determining unit determines that the write address has no further continuity; And a write data output means for sequentially outputting the write data stored in the plurality of buffer means at a predetermined timing after the output of the write command.

【0020】本発明は、かかる構成により、制御装置か
ら特別なコマンドがなくても、アドレスの連続性を自ら
判定し、適切なタイミングでライトコマンドを生成、出
力し、SDRAMへライトデータを適宜出力するので、
制御装置は、SDRAMへのライトコマンド生成等を行
う必要がない。
According to the present invention, with this configuration, even if there is no special command from the control device, the continuity of the address is determined by itself, a write command is generated and output at an appropriate timing, and the write data is appropriately output to the SDRAM. So
The control device does not need to generate a write command to the SDRAM.

【0021】また、本発明において、制御装置からのラ
イトアクセスをカウントするライトカウンタ手段をさら
に具備し、コマンド生成手段は前記ライトカウンタ手段
によるカウント値およびSDRAMのバースト長から前
記カウント値に最適なバースト長を求め、変更するコマ
ンドを生成、出力しても良い。
The present invention may further comprise a write counter means for counting write accesses from the control device, and the command generation means may determine an optimum burst for the count value from the count value of the write counter means and the burst length of the SDRAM. A command for determining the length and changing the length may be generated and output.

【0022】この構成により、制御装置から特別なコマ
ンドがなくてても、最適なバースト長を求め、SDRA
Mのバースト長を変更するので、制御装置は、SDRA
Mへのモードセットコマンドの生成等を行う必要がな
い。
With this configuration, even if there is no special command from the control device, the optimum burst length is obtained and the SDRA
The controller changes the burst length of M.
There is no need to generate a mode set command for M.

【0023】また、本発明において、制御装置からのラ
イトアクセスをカウントするライトカウンタ手段と、前
記ライトカウンタ手段によるカウント値を超えるライト
データを保存するバッファ手段からのライトデータの出
力をマスクする出力制御手段と、をさらに具備しても良
い。
Further, in the present invention, write counter means for counting write accesses from a control device, and output control for masking output of write data from a buffer means for storing write data exceeding a count value of the write counter means. Means may be further provided.

【0024】この構成により、制御装置から特別なコマ
ンドがなくても、制御装置がライトするデータ数とバー
スト長とのずれを調整し、意図しないライトデータがS
DRAMへ出力されないようにしているので、制御装置
は、かかる事態を考慮することなくライトデータを出力
できる。
With this configuration, even if there is no special command from the control device, the deviation between the number of data to be written by the control device and the burst length is adjusted, and unintended write data is transmitted to the S.
Since the data is not output to the DRAM, the control device can output the write data without considering such a situation.

【0025】また、上記第1、第2の発明において、リ
フレッシュタイミングの間隔を自ら測定し、コマンド生
成手段へリフレッシュのタイミングを通知するリフレッ
シュサイクルカウント手段をさらに具備し、コマンド生
成手段は前記通知があったならばリフレッシュコマンド
を生成、出力してSDRAMにリフレッシュを実行させ
ても良い。
In the first and second aspects of the present invention, the apparatus further comprises a refresh cycle counting means for measuring an interval of the refresh timing by itself and notifying the command generating means of the refresh timing. If so, a refresh command may be generated and output to cause the SDRAM to execute the refresh.

【0026】この構成により、制御装置から特別なコマ
ンドがなくても、適切なリフレッシュタイミングでSD
RAMへリフレッシュコマンドを生成、出力するので、
制御装置は、リフレッシュを考慮することなくSDRA
Mへアクセス要求を行っても問題がない。
With this configuration, even if there is no special command from the control device, the SD memory card can be read at appropriate refresh timing.
Since a refresh command is generated and output to the RAM,
The control unit can use the SDRA
There is no problem even if an access request is made to M.

【0027】また、上記第1、第2の発明において、S
DRAMのモードレジスタの設定内容を保持する設定保
持手段をさらに具備し、コマンド生成手段はその設定内
容に従ってモードセットコマンドを生成および出力して
前記モードレジスタを設定しても良い。
In the first and second aspects of the present invention, S
The information processing apparatus may further include setting holding means for holding setting contents of the mode register of the DRAM, and the command generating means may generate and output a mode set command according to the setting contents to set the mode register.

【0028】この構成により、制御装置から特別なコマ
ンドがなくても、起動時にSDRAMへモードセットコ
マンドを生成、出力するので、制御装置は、起動時にS
DRAMのモードセットのための制御を行う必要がな
い。また、制御装置から設定内容をセットすることによ
りSDRAMのコマンドレジスタを適宜設定および変更
し得る。
With this configuration, even if there is no special command from the control device, the mode set command is generated and output to the SDRAM at the time of startup.
There is no need to perform control for setting the mode of the DRAM. Also, by setting the setting contents from the control device, the command register of the SDRAM can be appropriately set and changed.

【0029】また、上記第1、第2の発明において、制
御装置からの入力アドレスに基づいてSDRAMでのア
ドレッシングシーケンスでアドレスの繰り上がり無視が
生じるか否か判定し、アドレスの繰り上がり無視が生じ
る場合前記コマンド生成手段に対してコマンドの再生成
を指示するコマンド再生成判定手段をさらに具備しても
良い。
In the first and second aspects of the present invention, it is determined whether or not address carry-over is ignored in an addressing sequence in an SDRAM based on an input address from a control device, and address carry-over is ignored. In this case, the apparatus may further include a command regeneration determination unit that instructs the command generation unit to regenerate a command.

【0030】この構成により、SDRAMでアドレスの
繰り上がり無視が生じて制御装置が意図しないアドレス
に対してデータをリード/ライトするという不都合を、
制御装置から特別なコマンドなしに解消するので、制御
装置はSDRAMにアクセス要求を行う際にアドレスの
繰り上がり無視を考慮する必要がない。
With this configuration, the inconvenience that the carry-over of the address is ignored in the SDRAM and the control device reads / writes data at an unintended address is avoided.
Since the processing is canceled without a special command from the control device, the control device does not need to consider ignoring the carry-up of the address when making an access request to the SDRAM.

【0031】第3に、本発明は、上記目的を達成するた
めに、制御装置からの信号に基づいてSDRAMを制御
するSDRAM制御方法であって、前記制御装置から入
力された読み出しアドレスを保存し、前記保存した読み
出しアドレスの連続性を判定し、前記判定手段が前記読
み出しアドレスにそれ以上連続性がないと判定した場合
にそこまでに保存した最初の読み出しアドレスを開始ア
ドレスとするリードコマンドを生成および出力し、前記
リードコマンドに応じて前記SDRAMから入力された
リードデータを前記制御装置へ出力することを特徴とす
るSDRAM制御方法を提供する。
Third, the present invention provides an SDRAM control method for controlling an SDRAM based on a signal from a control device, wherein the read address input from the control device is stored. Judging the continuity of the stored read address, and generating a read command with the first read address stored up to the start address when the judging means judges that the read address is no longer continuous. And outputting the read data input from the SDRAM to the control device in response to the read command.

【0032】本発明は、かかる方法により、制御装置か
ら特別なコマンドがなくとも、アドレスの連続性を判定
し、適切なタイミングでリードコマンドを生成、出力
し、SDRAMから入力されたリードデータを制御装置
へ適宜出力するので、制御装置は、SDRAMへのリー
ドコマンド生成等を行う必要がない。
According to the present invention, even if there is no special command from the control device, the present invention determines the continuity of the address, generates and outputs a read command at an appropriate timing, and controls the read data input from the SDRAM. Since the data is appropriately output to the device, the control device does not need to generate a read command to the SDRAM or the like.

【0033】また、本発明において、制御装置からのリ
ードアクセスをカウントし、そのカウント値およびSD
RAMのバースト長から前記カウント値に最適なバース
ト長を求め、変更するコマンドを生成、出力しても良
い。
In the present invention, the number of read accesses from the control device is counted, and the counted value and SD
The optimum burst length for the count value may be obtained from the burst length of the RAM, and a command for changing the burst length may be generated and output.

【0034】この方法により、制御装置から特別なコマ
ンドがなくてとも、最適なバースト長を求め、SDRA
Mのバースト長を変更するので、制御装置は、SDRA
Mへのモードセットコマンドの生成等を行う必要がな
い。
According to this method, even if there is no special command from the control device, the optimum burst length is obtained, and the SDRA
The controller changes the burst length of M.
There is no need to generate a mode set command for M.

【0035】また、本発明において、制御装置からのリ
ードアクセスをカウントし、そのカウント値を超えるリ
ードデータがSDRAMから入力された場合当該リード
データを複数のデータバッファ手段に保存することなく
破棄しても良い。
In the present invention, read accesses from the control device are counted, and when read data exceeding the count value is input from the SDRAM, the read data is discarded without being stored in a plurality of data buffer means. Is also good.

【0036】この方法により、制御装置から特別なコマ
ンドがなくても、制御装置が必要とするデータ数とバー
スト長とのずれを調整し、必要なリードデータのみを制
御装置へ出力するので、制御装置は、不必要なリードデ
ータの切り捨て等を行う必要がない。
According to this method, even if there is no special command from the control device, the deviation between the number of data required by the control device and the burst length is adjusted, and only the necessary read data is output to the control device. The device does not need to perform unnecessary truncation of read data.

【0037】第4に、本発明は、上記目的を達成するた
めに、制御装置からの信号に基づいてSDRAMを制御
するSDRAM制御方法であって、前記制御装置から入
力されたライトデータおよびその書き込みアドレスを保
存し、前記保存した書き込みアドレスの連続性を判定
し、前記書き込みアドレスにそれ以上連続性がないと判
定した場合にそこまでに保存した最初の書き込みアドレ
スを開始アドレスとするライトコマンドを生成し、出力
し、前記ライトコマンド出力後所定のタイミングで前記
保存したライトデータを順次出力することを特徴とする
SDRAM制御方法を提供する。
Fourth, the present invention provides an SDRAM control method for controlling an SDRAM based on a signal from a control device, in order to achieve the above object. The address is stored, the continuity of the stored write address is determined, and if it is determined that the write address has no further continuity, a write command having the first write address stored up to that start address is generated. And outputting the stored write data in sequence at a predetermined timing after the output of the write command.

【0038】本発明は、かかる方法により、制御装置か
ら特別なコマンドがなくとも、アドレスの連続性を自ら
判定し、適切なタイミングでライトコマンドを生成、出
力し、SDRAMへライトデータを適宜出力するので、
制御装置は、SDRAMへのライトコマンド生成等を行
う必要がない。
According to the present invention, according to the method, even if there is no special command from the control device, the continuity of the address is determined by itself, a write command is generated and output at an appropriate timing, and the write data is appropriately output to the SDRAM. So
The control device does not need to generate a write command to the SDRAM.

【0039】また、本発明において、制御装置からのラ
イトアクセスをカウントし、そのカウント値およびSD
RAMのバースト長から前記カウント値に最適なバース
ト長を求め、変更するコマンドを生成、出力しても良
い。
In the present invention, the number of write accesses from the control device is counted, and the count value and SD
The optimum burst length for the count value may be obtained from the burst length of the RAM, and a command for changing the burst length may be generated and output.

【0040】この方法により、制御装置から特別なコマ
ンドがなくてとも、最適なバースト長を求め、SDRA
Mのバースト長を変更するので、制御装置は、SDRA
Mへのモードセットコマンドの生成等を行う必要がな
い。
According to this method, even if there is no special command from the control device, the optimum burst length is obtained, and the SDRA
The controller changes the burst length of M.
There is no need to generate a mode set command for M.

【0041】また、本発明において、制御装置からのラ
イトアクセスをカウントし、そのカウント値を超えるラ
イトデータの出力をマスクしても良い。
In the present invention, the number of write accesses from the control device may be counted, and the output of write data exceeding the count value may be masked.

【0042】この方法により、制御装置から特別なコマ
ンドがなくても、制御装置がライトするデータ数とバー
スト長とのずれを調整し、意図しないライトデータがS
DRAMへ出力されないようにしているので、制御装置
は、かかる事態を考慮することなくライトデータを出力
できる。
According to this method, even if there is no special command from the control device, the deviation between the number of data to be written by the control device and the burst length is adjusted, and unintended write data is transmitted to the S.
Since the data is not output to the DRAM, the control device can output the write data without considering such a situation.

【0043】また、上記第3、第4の発明において、リ
フレッシュタイミングの間隔を自ら測定し、リフレッシ
ュのタイミングにリフレッシュコマンドを生成、出力し
てSDRAMにリフレッシュを実行させても良い。
In the third and fourth aspects, the refresh timing interval may be measured by itself, and a refresh command may be generated and output at the refresh timing to cause the SDRAM to execute the refresh.

【0044】この方法により、制御装置から特別なコマ
ンドがなくても、適切なリフレッシュタイミングでSD
RAMへリフレッシュコマンドを生成、出力するので、
制御装置は、リフレッシュを考慮することなくSDRA
Mへアクセス要求を行っても問題がない。
According to this method, even if there is no special command from the control device, SD can be performed at an appropriate refresh timing.
Since a refresh command is generated and output to the RAM,
The control unit can use the SDRA
There is no problem even if an access request is made to M.

【0045】また、上記第3、第4の発明において、S
DRAMのモードレジスタの設定内容を保持し、その設
定内容に従ってモードセットコマンドを生成および出力
して前記モードレジスタを設定しても良い。
In the third and fourth aspects of the present invention, S
The setting contents of the mode register of the DRAM may be held, and a mode set command may be generated and output according to the setting contents to set the mode register.

【0046】この方法により、制御装置から特別なコマ
ンドがなくても、起動時にSDRAMへモードセットコ
マンドを生成、出力するので、制御装置は、起動時にS
DRAMのモードセットのための制御を行う必要がな
い。また、制御装置から設定内容をセットすることによ
りSDRAMのコマンドレジスタ適宜設定および変更し
得る。
According to this method, even if there is no special command from the control device, the mode set command is generated and output to the SDRAM at the time of startup.
There is no need to perform control for setting the mode of the DRAM. Further, by setting the setting contents from the control device, the command register of the SDRAM can be set and changed as appropriate.

【0047】また、上記第3、第4の発明において、制
御装置からの入力アドレスに基づいてSDRAMでのア
ドレッシングシーケンスでアドレスの繰り上がり無視が
生じるか否か判定し、アドレスの繰り上がり無視が生じ
る場合コマンドを再生成および出力しても良い。
In the third and fourth aspects of the present invention, it is determined whether or not address carry-over is ignored in an addressing sequence in an SDRAM based on an input address from a control device, and address carry-over is ignored. In such a case, the command may be regenerated and output.

【0048】この方法により、SDRAMでアドレスの
繰り上がり無視が生じて制御装置が意図しないアドレス
に対してデータをリード/ライトするという不都合を、
制御装置から特別なコマンドなしに解消するので、制御
装置はSDRAMにアクセス要求を行う際にアドレスの
繰り上がり無視を考慮する必要がない。
According to this method, the inconvenience that the carry-over of the address is ignored in the SDRAM and the control device reads / writes data at an unintended address is avoided.
Since the processing is canceled without a special command from the control device, the control device does not need to consider ignoring the carry-up of the address when making an access request to the SDRAM.

【0049】さらに、第5に、本発明は、上記目的を達
成するために、原稿画像を走査して読み取られた画像デ
ータと、前記画像データに対応する走査位置とを順次入
力し、走査位置に基づいて前記画像データをSDRAM
に格納する画像処理装置であって、重複して走査する重
なり走査領域内の、前記画像データと前記SDRAMに
格納された格納データとから前記走査位置の位置ずれを
検出し、前記位置ずれを補正する補正値を出力する位置
ずれ検出手段と、前記補正値に基づいて前記走査位置を
補正する補正手段と、補正された走査位置に基づいて前
記画像データを前記SDRAMに格納する写像手段と、
を具備し、前記位置ずれ補正手段および/または前記写
像手段と前記SDRAMとを接続する上記第1、第2の
発明のSDRAMインターフェイス回路を備えているこ
とを特徴とする画像処理装置を提供する。
Fifthly, in order to achieve the above object, according to the present invention, image data read by scanning an original image and a scanning position corresponding to the image data are sequentially inputted, and SDRAM based on the image data
An image processing apparatus that detects a positional shift of the scanning position from the image data and the stored data stored in the SDRAM in an overlapped scanning area that performs overlapping scanning, and corrects the positional shift. A displacement detection unit that outputs a correction value to be corrected, a correction unit that corrects the scanning position based on the correction value, and a mapping unit that stores the image data in the SDRAM based on the corrected scanning position.
And an SDRAM interface circuit according to the first and second aspects of the present invention for connecting the SDRAM with the misalignment correcting means and / or the mapping means.

【0050】本発明は、かかる構成により、SDRAM
インターフェイス回路が上記第1、第2の発明について
述べたように、位置ずれ補正手段および/または写像手
段からの特別なコマンドがなくてもSDRAMの仕様に
適合したコマンドを生成、出力してSDRAMを制御し
て、画像データをSDRAMに対してリード/ライトす
るので、位置ずれ補正手段および/または写像手段は、
SDRAMへのリードコマンド、ライトコマンド、リフ
レッシュコマンドなどの生成等を行う必要がない。
The present invention provides an SDRAM having such a configuration.
As described in the first and second aspects of the present invention, the interface circuit generates and outputs a command conforming to the SDRAM specifications without a special command from the displacement correcting means and / or the mapping means, and outputs the SDRAM. Under the control, the image data is read / written to / from the SDRAM.
There is no need to generate a read command, a write command, a refresh command, etc. for the SDRAM.

【0051】以下、本発明の実施形態について、図面を
参照して詳細に説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

【0052】(実施の形態1)図1は、本発明の実施の
形態1に係るSDRAMインターフェイス回路とDSP
およびSDRAMとの関係を示すブロック図である。
(Embodiment 1) FIG. 1 shows an SDRAM interface circuit and a DSP according to Embodiment 1 of the present invention.
FIG. 3 is a block diagram showing a relationship between the SDRAM and the SDRAM.

【0053】DSP100は、一般的なSRAMとの接
続のための出力構成を備えている。すなわち、アドレス
信号、ライト信号、リード信号、データ信号およびステ
ータス信号を出力または入力するためのピンを持ってい
る。
The DSP 100 has an output configuration for connection to a general SRAM. That is, it has pins for outputting or inputting address signals, write signals, read signals, data signals, and status signals.

【0054】このDSP100とSDRAMインターフ
ェイス回路200とは、信号線(以下、DSP側信号線
という)101で接続されている。このDSP側信号線
101には、アドレス線102、データバス103、ラ
イト信号線(WT)104、リード信号線(RD)10
5、ステータス信号線(STU)106およびクロック
信号線(CLK)107が含まれる。
The DSP 100 and the SDRAM interface circuit 200 are connected by a signal line (hereinafter, referred to as a DSP-side signal line) 101. The DSP-side signal line 101 includes an address line 102, a data bus 103, a write signal line (WT) 104, and a read signal line (RD) 10.
5, a status signal line (STU) 106 and a clock signal line (CLK) 107 are included.

【0055】一方、SDRAMインターフェイス回路2
00とSDRAM300とは、信号線(以下、SDRA
M側信号線という)201で接続されている。このSD
RAM側信号線201には、アドレス線202、データ
バス203、チップセレクト信号線(NCS)204、
ライト信号線(NWT)205、ローアドレスストロー
ブ信号線(NRAS)206、カラムアドレスストロー
ブ信号線(NCAS)207、アウトプットディセーブ
ル/ライトマスク信号線(UDQM、LDQM)20
8、209、およびクロック信号線(CLK)210等
が含まれる。
On the other hand, the SDRAM interface circuit 2
00 and the SDRAM 300 are connected to a signal line (hereinafter, SDRA).
(Referred to as an M-side signal line) 201. This SD
The RAM side signal line 201 includes an address line 202, a data bus 203, a chip select signal line (NCS) 204,
Write signal line (NWT) 205, row address strobe signal line (NRAS) 206, column address strobe signal line (NCAS) 207, output disable / write mask signal line (UDQM, LDQM) 20
8, 209 and a clock signal line (CLK) 210.

【0056】ここで、アウトプットディセーブル/ライ
トマスク信号線(UDQM、LDQM)208、209
は、リードサイクルでは出力制御信号として働き、ライ
トサイクルでは入力データをマスクするのに使用され
る。例えば、クロック信号(CLK)の立ち上がりエッ
ジでDQMがhighのとき、リードサイクルでは次の
CLKエッジで出力されるデータがディセーブルされ、
ライトサイクルではそのサイクルの入力データがマスク
される。この例では、UDQM、LDQMによってバイ
トデータ制御が可能になっている。
Here, output disable / write mask signal lines (UDQM, LDQM) 208, 209
Is used as an output control signal in a read cycle, and is used to mask input data in a write cycle. For example, when DQM is high at the rising edge of the clock signal (CLK), data output at the next CLK edge is disabled in the read cycle,
In the write cycle, input data of the cycle is masked. In this example, byte data control is enabled by UDQM and LDQM.

【0057】図2および図3は、DSP側信号線101
およびSDRAM側信号線201でのタイミングチャー
トをそれぞれ示す図である。DSP100側では、一般
的なSRAMと同様である。すなわち、例えば、ライト
時には、DSP100は、ライト信号をアクティブ(こ
の例ではLowレベル)にするとともに、アドレス信号
およびデータ信号を送出する。また、リード時には、リ
ード信号をアクティブにするとともに、アドレス信号を
送出し、データ信号を受信する。
FIGS. 2 and 3 show the signal line 101 on the DSP side.
FIG. 4 is a diagram showing a timing chart for the SDRAM side signal line 201, respectively. On the DSP 100 side, it is the same as a general SRAM. That is, for example, at the time of writing, the DSP 100 activates the write signal (Low level in this example) and sends out the address signal and the data signal. At the time of reading, the read signal is activated, an address signal is transmitted, and a data signal is received.

【0058】一方、SDRAM300側では、DSP1
00から入力されるクロック信号と同期してデータのリ
ード・ライトが行われる。例えば、SDRAM300
は、チップセレクタ信号(NCS)をアクティブにした
とき、クロック信号の立ち上がりエッジでSDRAM3
00はコマンドを取り込むようになっている。
On the other hand, on the SDRAM 300 side, the DSP 1
Data read / write is performed in synchronization with a clock signal input from 00. For example, SDRAM 300
When the chip selector signal (NCS) is activated, the SDRAM 3 is activated at the rising edge of the clock signal.
00 is designed to take in a command.

【0059】ライトサイクル時には、バンクアクティブ
コマンドから所定時間経過後にライトコマンドを入力す
ると、クロック信号の立ち上がりエッジに同期してデー
タが連続的に入力される。より具体的には、図3に示す
ように、NCS=Low、NRAS=Low、NCAS
=High、NWT=Highにセットすると、これら
のセット内容がクロック信号の立ち上がりエッジAで取
り込まれ、これによりバンクアクティブコマンドが選択
され、BSで選ばれたバンクがアクティブになる。それ
から数クロック後、NCS=Low、NRAS=Hig
h、NCAS=Low、NWT=Lowにセットする
と、これらのセット内容が次のクロック信号の立ち上が
りエッジBで取り込まれ、これによりライトコマンドが
選択され、カラムアクセスが開始し、データが入力され
る。
In a write cycle, when a write command is input after a lapse of a predetermined time from a bank active command, data is continuously input in synchronization with a rising edge of a clock signal. More specifically, as shown in FIG. 3, NCS = Low, NRAS = Low, NCAS
= High and NWT = High, the contents of these settings are fetched at the rising edge A of the clock signal, whereby the bank active command is selected and the bank selected by BS becomes active. A few clocks later, NCS = Low, NRAS = High
When h, NCAS = Low, and NWT = Low, the contents of these settings are captured at the next rising edge B of the clock signal, thereby selecting a write command, starting column access, and inputting data.

【0060】一方、リードサイクルでは、アイドル中の
バンクに対してバンクアクティブコマンドを実行するこ
とでバンクをアクティブ状態にし、所定時間経過後にリ
ードコマンドを入力するとクロック信号の立ち上がりエ
ッジに同期してSDRAM300からデータが連続して
出力される。より具体的には、図3に示すように、ま
ず、NCS=Low、NRAS=Low、NCAS=H
igh、NWT=Highにセットすると、これらのセ
ット内容がクロック信号の立ち上がりエッジCでSDR
AM300に取り込まれ、これによりバンクアクティブ
コマンドが選択され、BSで選ばれたバンクがアクティ
ブになる。数クロック後に、NCS=Low、NRAS
=High、NCAS=Low、NWT=Highにセ
ットすると、これらのセット内容が次のクロック信号の
立ち上がりエッジDで取り込まれ、これによりライトコ
マンドが選択され、カラムアクセスが開始し、SDRA
M300よりデータが出力される。
On the other hand, in the read cycle, the bank is activated by executing a bank active command for an idle bank, and when a read command is input after a lapse of a predetermined time, the SDRAM 300 is synchronized with the rising edge of the clock signal. Data is output continuously. More specifically, as shown in FIG. 3, first, NCS = Low, NRAS = Low, NCAS = H
When high and NWT are set to High, the contents of these settings are SDR at the rising edge C of the clock signal.
The bank active command is selected by the AM 300, whereby the bank selected by the BS is activated. After a few clocks, NCS = Low, NRAS
= High, NCAS = Low, and NWT = High, these settings are fetched at the rising edge D of the next clock signal, thereby selecting a write command, starting column access, and performing SDRA.
Data is output from M300.

【0061】このように、DSP側の信号とSDRAM
側の信号との間には差異があるので、SDRAMインタ
ーフェイス回路200がDSP100からの信号を解釈
し、コマンドを生成してSDRAM300に入力した
り、適切なタイミングでデータをSDRAM300へ入
力したり、DSP100へ出力するなどの制御を行う必
要がある。
As described above, the signal on the DSP side and the SDRAM
The SDRAM interface circuit 200 interprets the signal from the DSP 100, generates a command and inputs the command to the SDRAM 300, inputs data to the SDRAM 300 at an appropriate timing, It is necessary to perform control such as outputting to

【0062】図4は、上記実施の形態1に係るSDRA
Mインターフェイス回路の内部構成を示すブロック図で
ある。SDRAMインターフェイス回路200は、送信
データバッファ500、受信データバッファ700、コ
マンド制御ブロック800および入出力セレクタ900
で構成されている。
FIG. 4 shows SDRA according to the first embodiment.
FIG. 3 is a block diagram illustrating an internal configuration of an M interface circuit. The SDRAM interface circuit 200 includes a transmission data buffer 500, a reception data buffer 700, a command control block 800, and an input / output selector 900.
It is composed of

【0063】図5は、上記実施の形態1に係るSDRA
Mインターフェイス回路の送信データバッファの内部構
成を示すブロック図である。送信データバッファ500
は、送信時、すなわちライト動作時にDSP100から
のライトすべきデータ(以下、ライトデータという)お
よびライトすべきアドレス(以下、書き込みアドレスと
いう)を一時的に記憶する回路である。送信データバッ
ファ500は、8つのバッファ1〜8を持つバッファブ
ロック501、ライトカウンタ502、ライトセレクタ
503、アドレスセレクタ504およびアウトプットカ
ウンタ505により主に構成されている。
FIG. 5 is a diagram showing the SDRA according to the first embodiment.
FIG. 3 is a block diagram illustrating an internal configuration of a transmission data buffer of the M interface circuit. Transmission data buffer 500
Is a circuit for temporarily storing data to be written (hereinafter referred to as write data) and an address to be written (hereinafter referred to as a write address) from the DSP 100 during transmission, that is, during a write operation. The transmission data buffer 500 mainly includes a buffer block 501 having eight buffers 1 to 8, a write counter 502, a write selector 503, an address selector 504, and an output counter 505.

【0064】ライトカウンタ502は、DSP100か
らライト信号を1つ受け取ったときに1インクリメント
する。そして、カウント値に対応するバッファ1〜8へ
データおよび書き込みアドレスを入力する。これによ
り、バッファ1〜8には、DSP100から出力される
ライトデータおよび書き込みアドレスが順次保存され
る。
The write counter 502 increments by one when it receives one write signal from the DSP 100. Then, data and a write address are input to buffers 1 to 8 corresponding to the count value. As a result, the write data and the write address output from the DSP 100 are sequentially stored in the buffers 1 to 8.

【0065】また、ライトセレクタ503は、バッファ
1〜8の中から1つを選択して、それが保存するライト
データおよび書き込みアドレスをSDRAM300へ出
力する回路である。本実施の形態1では、バッファブロ
ック501のバッファ1〜8に保存したライトデータを
任意の数だけ選択的に出力する必要がある。また、図4
に示す入出力セレクタ900は、ライト動作時には、送
信データバッファ500からデータおよび書き込みアド
レスが入力されるとともに、リード時にはSDRAM3
00からデータおよび書き込みアドレスが入力されるの
で、データの衝突を防止する必要がある。そこで、この
ライトセレクタ503にアウトプットカウンタ505を
接続し、コマンド制御ブロック800から出力されるア
ウトプットイネーブル信号を使用して送信データバッフ
ァ500からの出力を制御している。
The write selector 503 is a circuit for selecting one of the buffers 1 to 8 and outputting the write data and write address stored therein to the SDRAM 300. In the first embodiment, it is necessary to selectively output an arbitrary number of write data stored in the buffers 1 to 8 of the buffer block 501. FIG.
The input / output selector 900 shown in FIG. 4 receives data and a write address from the transmission data buffer 500 during a write operation, and inputs and outputs
Since data and a write address are input from 00, it is necessary to prevent data collision. Therefore, an output counter 505 is connected to the write selector 503, and the output from the transmission data buffer 500 is controlled using an output enable signal output from the command control block 800.

【0066】より具体的には、ライト動作時に送信デー
タバッファ500からデータを出力するときにアウトプ
ットイネーブル信号をアクティブにする。また、送信デ
ータバッファ500から出力するデータ量に応じてアウ
トプットイネーブル信号のアクティブにする量(時間)
を長くする。アウトプットカウンタ505は、クロック
と同期してアウトプットイネーブル信号がアクティブに
なっている量を測る。具体的には、アウトプットカウン
タ505は、アウトプットイネーブル信号の立ち下がり
(Lowのときアクティブとする)を検知し1つカウン
トし、その後1クロック毎にアウトプットイネーブル信
号がアクティブであればカウンタ値を1インクリメント
する。これにより、ライトセレクタ503は、バッファ
1〜8からアウトプットカウンタ505のカウント値に
対応するバッファを選択し、それが保存するライトデー
タおよび書き込みアドレスを出力する。この結果、バッ
ファ1〜8に保存したデータおよび書き込みアドレスを
任意の数だけ、任意のタイミングでかつバッファ1から
順番に出力することができる。
More specifically, the output enable signal is activated when outputting data from the transmission data buffer 500 during a write operation. The amount (time) of activating the output enable signal in accordance with the amount of data output from the transmission data buffer 500
Lengthen. The output counter 505 measures the amount of active output enable signal in synchronization with the clock. More specifically, the output counter 505 detects the falling edge of the output enable signal (active when the output enable signal is low), counts one, and thereafter counts the counter value every one clock if the output enable signal is active. Is incremented by one. As a result, the write selector 503 selects a buffer corresponding to the count value of the output counter 505 from the buffers 1 to 8, and outputs the write data and the write address stored therein. As a result, an arbitrary number of data and write addresses stored in the buffers 1 to 8 can be sequentially output from the buffer 1 at an arbitrary timing.

【0067】ライトセレクタ503から出力された書き
込みアドレスは、アドレスセレクタ504に入力され
る。アドレスセレクタ504は、DSP100とSDR
AM300のアドレス信号線の数の違いを整合してい
る。図6は、上記実施の形態1の送信データバッファの
アドレスセレクタの内部構成を示すブロック図である。
The write address output from the write selector 503 is input to the address selector 504. The address selector 504 uses the DSP 100 and the SDR
The difference in the number of address signal lines of the AM 300 is matched. FIG. 6 is a block diagram showing the internal configuration of the address selector of the transmission data buffer according to the first embodiment.

【0068】この例では、DSP100からのアドレス
信号線は、MA[0]〜MA[23]の24本であり、
24ビットのアドレスで論理アドレス空間を表してい
る。一方、SDRAM300を構成するチップのピン構
成は、チップセレクト(CS)1本,バンクセレクタ
(BS0,BS1)、アドレス入力(A0〜A11)1
2本である。また、ローアドレス入力にはアドレスA0
〜A11の12本が常に用いられ、カラムアドレス入力
にはチップの仕様によってA0〜A7の8本、A0〜A
8の9本またはA0〜A9の10本のいずれかが用いら
れる。従って、DSP100からの入力アドレスのう
ち、最下位から8〜10ビットがカラムアドレスに、そ
の上12ビットがローアドレスに割り当てられる。カラ
ムアドレスとローアドレスの順番は逆であっても構わな
い。
In this example, the address signal lines from the DSP 100 are 24 MA [0] to MA [23].
A logical address space is represented by a 24-bit address. On the other hand, the pin configuration of the chip configuring the SDRAM 300 includes one chip select (CS), bank selectors (BS0 and BS1), and address inputs (A0 to A11) 1.
There are two. Also, the address A0 is input to the row address input.
To A11 are always used, and eight of A0 to A7, A0 to A7 are used for column address input depending on chip specifications.
Either 9 of 8 or 10 of A0 to A9 are used. Accordingly, of the input address from the DSP 100, the lowest 8 to 10 bits are allocated to the column address, and the upper 12 bits are allocated to the row address. The order of the column address and the row address may be reversed.

【0069】また、この例のSDRAM300は4バン
ク構成であるので、2本のバンクセレクトBS0、BS
1を用いて、BANK1〜4のどのバンクに対するアク
セスであるかを表している。従って、入力アドレスのロ
ーアドレスの上2ビットがバンクセレクトに割り当てら
れる。
Since SDRAM 300 of this example has a four-bank configuration, two bank select signals BS0 and BS0 are provided.
1 is used to indicate which bank of BANKs 1 to 4 is accessed. Therefore, the upper two bits of the row address of the input address are assigned to the bank select.

【0070】さらに、SDRAM300を複数のチップ
で構成する場合、どのチップに対するアクセスであるか
指定する必要があり、各チップのチップセレクト(C
S)を用いる。従って、チップが1つの場合は0ビッ
ト、チップが2つの場合は1ビット、チップが4つの場
合は2ビット、が入力アドレスの最上位に割り当てられ
る。図6に示すアドレスセレクタ504は、このような
入力アドレスからの出力アドレス生成を行うように構成
された回路である。
Further, when the SDRAM 300 is composed of a plurality of chips, it is necessary to specify which chip is to be accessed, and the chip select (C
S) is used. Therefore, 0 bits for one chip, 1 bit for two chips, and 2 bits for four chips are assigned to the highest order of the input address. The address selector 504 shown in FIG. 6 is a circuit configured to generate an output address from such an input address.

【0071】具体的には、アドレスセレクタ504で
は、24本のアドレス線のうち、上位ビットから順番
に、CSセレクタ601に2本、BSセレクタ602に
2本、ローアドレスセレクタ603に12本、およびカ
ラムアドレス604に8本を夫々分配する場合があり、
これを例に説明をする。この例では、SDRAM300
が総容量256MBitであって、1チップあたり64
MBitの記憶容量のSDRAMチップを4つ組み合わ
せたときのものである。
Specifically, in the address selector 504, two of the 24 address lines are sequentially assigned to the CS selector 601, two to the BS selector 602, twelve to the row address selector 603, and There are cases where eight lines are respectively distributed to column addresses 604,
This will be described as an example. In this example, the SDRAM 300
Has a total capacity of 256 MBit and 64 chips per chip.
This is when four SDRAM chips having a storage capacity of MBit are combined.

【0072】CSセレクタ601では、入力アドレスの
上位2桁からCS信号を生成し、SDRAM300のピ
ン<NCS>へ入力する。CS信号は、メモリが複数の
SDRAMチップで構成されているときに、データを書
き込むべきチップを指定するのに用いられる。
The CS selector 601 generates a CS signal from the upper two digits of the input address and inputs the CS signal to the pin <NCS> of the SDRAM 300. The CS signal is used to specify a chip to which data is to be written when the memory is composed of a plurality of SDRAM chips.

【0073】BSセレクタ602では、次の2桁からB
S信号を生成し、SDRAM300のピン<BS>へ入
力する。BS信号は、SDRAM300がバンク構成に
なっている場合、データを書き込むべきバンクを指定す
るのに用いられる。
In the BS selector 602, B is calculated from the next two digits.
An S signal is generated and input to pin <BS> of SDRAM 300. When the SDRAM 300 has a bank configuration, the BS signal is used to specify a bank to which data is to be written.

【0074】ローアドレスセレクタ603では、次の1
2桁からローアドレスを生成している。同様に、カラム
アドレスセレクタ604では、次の8桁からカラムアド
レスを生成している。ローアドレスセレクタ603およ
びカラムアドレスセレクタ604の出力先には、ロー/
カラムセレクタ605が設けられている。SDRAM3
00のアドレス入力は、ローアドレスおよびカラムアド
レスで共用されているので、ローアドレスを入力するか
カラムアドレスを入力するか選択する必要がある。そこ
で、ロー/カラムセレクタ605は、後述のコマンド制
御ブロック800から出力されるRASおよびCASに
従って、ローアドレスおよびカラムアドレスを選択的に
SDRAM300へ出力する。ここで説明したアドレス
セレクタ504の回路は一例に過ぎず、SDRAM30
0の仕様によって適宜変更されることは言うまでもな
い。
In the row address selector 603, the following 1
A row address is generated from two digits. Similarly, the column address selector 604 generates a column address from the next eight digits. The output destination of the row address selector 603 and the column address selector 604 is
A column selector 605 is provided. SDRAM3
Since the address input of 00 is shared by the row address and the column address, it is necessary to select whether to input a row address or a column address. Therefore, the row / column selector 605 selectively outputs a row address and a column address to the SDRAM 300 according to RAS and CAS output from a command control block 800 described later. The circuit of the address selector 504 described here is only an example, and the SDRAM 30
Needless to say, it is appropriately changed according to the specification of 0.

【0075】上述の送信データバッファ500におい
て、バッファブロック501が有するバッファの数は、
SDRAM300の最大バースト長に相当する。この例
では、SDRAM300の最大バースト長は「8」であ
るので、8つのバッファ1〜8が設けられている。これ
は、後述するようにライトサイクルでは、バースト長分
のライトデータがCLKに同期してSDRAM300へ
連続して出力されるので、最大バースト長分のライトデ
ータおよび書き込みアドレスをバッファブロック501
に保存する必要があるからである。
In the transmission data buffer 500 described above, the number of buffers in the buffer block 501 is
This corresponds to the maximum burst length of the SDRAM 300. In this example, since the maximum burst length of the SDRAM 300 is “8”, eight buffers 1 to 8 are provided. This is because, in a write cycle, write data of a burst length is continuously output to the SDRAM 300 in synchronization with CLK in a write cycle, so that the write data and write address of the maximum burst length are stored in the buffer block 501.
Because it is necessary to save it.

【0076】次に、受信データバッファ700について
説明する。図7は、上記実施の形態1に係るSDRAM
インターフェイス回路の受信データバッファの内部構成
を示すブロック図である。
Next, the reception data buffer 700 will be described. FIG. 7 is an SDRAM according to the first embodiment.
FIG. 3 is a block diagram illustrating an internal configuration of a reception data buffer of the interface circuit.

【0077】受信データバッファ700は、受信時、す
なわちリード動作時に、DSP100からリードすべき
アドレス(以下、読み出しアドレスという)を一時的に
記憶するとともに、SDRAM300から読み出したデ
ータ(以下、リードデータという)を読み出しアドレス
と対にして一時的に記憶する回路である。
The reception data buffer 700 temporarily stores an address to be read from the DSP 100 (hereinafter, referred to as a read address) at the time of reception, that is, a read operation, and data read from the SDRAM 300 (hereinafter, referred to as read data). Is a circuit for temporarily storing a pair with a read address.

【0078】受信データバッファ700は、8つのバッ
ファ1〜8を持つバッファブロック701、リードカウ
ンタ702、リード要求セレクタ703、リードアウト
セレクタ704、およびアドレスセレクタ705により
主に構成されている。ここでバッファの数は、送信デー
タバッファ500と同様に、SDRAM300の最大バ
ースト長に相当する。
The reception data buffer 700 mainly includes a buffer block 701 having eight buffers 1 to 8, a read counter 702, a read request selector 703, a readout selector 704, and an address selector 705. Here, the number of buffers corresponds to the maximum burst length of SDRAM 300 as in transmission data buffer 500.

【0079】バッファブロック701の入力側に設けた
リードカウンタ702は、DSP100からリード信号
を1つ受け取ったときにカウント値を1インクリメント
する。そしてカウント値に対応するバッファ1〜8へ読
み出しアドレスを保存する。これにより、バッファ1〜
8に読み出しアドレスが順次保存される。
The read counter 702 provided on the input side of the buffer block 701 increments the count value by one when it receives one read signal from the DSP 100. Then, the read address is stored in the buffers 1 to 8 corresponding to the count value. Thereby, buffers 1 to
The read addresses are sequentially stored in 8.

【0080】バッファブロック701の出力側に設けた
リード要求セレクタ703は、バッファ1〜8の中から
1つを選択し、それが保存する読み出しアドレスをSD
RAM300へ出力する回路である。
The read request selector 703 provided on the output side of the buffer block 701 selects one of the buffers 1 to 8 and sets the read address stored therein to SD.
This is a circuit for outputting to the RAM 300.

【0081】上述の送信データバッファ500と同様
に、このリード要求セレクタ703の出力を制御するた
めに、インプットカウンタ706が接続されている。イ
ンプットカウンタ706は、コマンド制御ブロック80
0から出力されるインプットイネーブル信号がアクティ
ブになっている量を測り、カウント値を出力する。リー
ド要求セレクタ703は、バッファ1〜8からインプッ
トカウンタ706のカウント値に対応するバッファを選
択し、それが保存する読み出しアドレスを出力する。バ
ッファ1〜8のいずれか一つに保存した書き込みアドレ
スを、任意のタイミングで出力することができる。
As with the transmission data buffer 500 described above, an input counter 706 is connected to control the output of the read request selector 703. The input counter 706 controls the command control block 80
It measures the amount by which the input enable signal output from 0 is active and outputs a count value. The read request selector 703 selects a buffer corresponding to the count value of the input counter 706 from the buffers 1 to 8, and outputs a read address stored in the buffer. The write address stored in any one of the buffers 1 to 8 can be output at an arbitrary timing.

【0082】リード要求セレクタ703から出力された
読み出しアドレスは、アドレスセレクタ705に入力さ
れ、SDRAM300が受信・認識できる情報に変換す
る。アドレスセレクタ705は、図6に示すアドレスセ
レクタ504と同様に構成されている。
The read address output from the read request selector 703 is input to the address selector 705 and is converted into information that can be received and recognized by the SDRAM 300. The address selector 705 has the same configuration as the address selector 504 shown in FIG.

【0083】一方、SDRAM300から送信されたリ
ードデータは、バッファブロック701のバッファ1〜
8に順番に保存される。より具体的には、リードデータ
はすべてのバッファ1〜8に並列に入力される。一方、
バッファ1〜8には、インプットカウンタ706からイ
ンプットイネーブル信号が夫々別個に入力されるように
なっている。バッファ1〜8は、インプットイネーブル
信号がアクティブ(この例ではLow)である場合にの
みデータのインプットを許可する。コマンド制御ブロッ
ク800は、バッファ1〜8のいずれか一つについての
み、インプットイネーブル信号をアクティブにする。こ
れにより、SDRAM300からのリードデータを任意
のバッファに保存することができる。
On the other hand, read data transmitted from SDRAM 300 is stored in buffers 1 to 3 of buffer block 701.
8 in turn. More specifically, the read data is input to all the buffers 1 to 8 in parallel. on the other hand,
Input enable signals from the input counter 706 are separately input to the buffers 1 to 8. The buffers 1 to 8 permit data input only when the input enable signal is active (Low in this example). The command control block 800 activates the input enable signal for only one of the buffers 1 to 8. Thus, the read data from SDRAM 300 can be stored in an arbitrary buffer.

【0084】バッファブロック701の出力側には、リ
ードアウトセレクタ704が設けられている。このリー
ドアウトセレクタ704は、リードカウンタ702の出
力に応じてバッファ1〜8のいずれか一つを選択し、こ
れが保存するリードデータをDSP100へ出力する。
On the output side of the buffer block 701, a readout selector 704 is provided. The readout selector 704 selects one of the buffers 1 to 8 according to the output of the read counter 702 and outputs the read data stored therein to the DSP 100.

【0085】DSP100のリードサイクルの動作につ
いて、さらに詳細に説明すると、DSP100は、まず
有効データで読み出していないデータがないことを、ス
テイタスで確認し、リード信号をアクティブにすると同
時にリードアドレスを送信する(以下、この動作をリー
ドアクセスという)。SDRAMインターフェイス回路
200は、上述のように読み出しアドレスを保存し、コ
マンドを生成してSDRAM300へ出力し、SDRA
M300が返したリードデータを保存する。DSP10
0は、再びステイタスを確認し、有効データであること
を認識し、リードアクセスを行う。このリードアクセス
に応じて、SDRAMインターフェイス回路200が保
存していたリードデータを出力する。このように、DS
P100は、1回目のリードアクセスをリードリクエス
トとし、2回目のリードアクセスで始めてリードデータ
を読み出すことができる。このとき、DSP100の動
作速度は、SDRAM300の動作速度よりもはるかに
遅いので、1回目から2回目までの間にSDRAM側の
動作は完了している。
The operation of the read cycle of the DSP 100 will be described in further detail. First, the DSP 100 confirms by status that there is no data that has not been read as valid data, activates the read signal, and transmits a read address at the same time. (Hereinafter, this operation is called read access). The SDRAM interface circuit 200 stores the read address as described above, generates a command and outputs the command to the SDRAM 300,
The read data returned by M300 is stored. DSP10
In the case of 0, the status is confirmed again, the data is recognized as valid data, and read access is performed. In response to the read access, the read data stored in the SDRAM interface circuit 200 is output. Thus, DS
P100 can read the read data starting with the second read access, with the first read access as the read request. At this time, since the operation speed of the DSP 100 is much lower than the operation speed of the SDRAM 300, the operation on the SDRAM side is completed between the first and second times.

【0086】なお、DSP100やCPUは上述のよう
なリードアクセスを実行するが、後述するイメージスキ
ャナのJPEG−IC回路などはリードアクセスを行わ
ないので、SDRAMインターフェイス回路200の内
部で、リード信号およびリードアドレスを生成する必要
がある。
Note that the DSP 100 and the CPU execute the above read access, but the JPEG-IC circuit of the image scanner described later does not perform the read access. You need to generate an address.

【0087】次に、コマンド制御ブロック800につい
て図8を参照して説明する。図8は、上記実施の形態1
に係るコマンド制御ブロックの内部構成を示すブロック
図である。
Next, the command control block 800 will be described with reference to FIG. FIG. 8 shows the first embodiment.
FIG. 2 is a block diagram showing an internal configuration of a command control block according to FIG.

【0088】コマンド制御ブロック800は、アクセス
カウンタ801、コマンドレジスタ802、比較ブロッ
ク803、リフレッシュサイクル(RC)カウントブロ
ック804およびコマンド生成ブロック805で構成さ
れている。
The command control block 800 includes an access counter 801, a command register 802, a comparison block 803, a refresh cycle (RC) count block 804, and a command generation block 805.

【0089】SDRAM300はアドレスが連続するデ
ータのリード/ライドを連続して行うことが一つの特徴
である。しかし、DSP100は、SDRAM300の
仕様を考慮することなくリード/ライトを行うので、D
SP100に代わってSDRAMインターフェイス回路
200がリード/ライトの連続性を調べる必要がある。
One characteristic of the SDRAM 300 is that it continuously reads / writes data having continuous addresses. However, since the DSP 100 performs read / write without considering the specifications of the SDRAM 300, the DSP 100
The SDRAM interface circuit 200 needs to check the read / write continuity instead of the SP 100.

【0090】また、SDRAM300は単位時間毎にリ
フレッシュを行う必要があるが、DSP100はリフレ
ッシュを考慮して動作していない。そこで、SDRAM
インターフェイス回路200が時間を測り、所定の周期
SDRAM300へリフレッシュを命令しなければなら
ない。また、リフレッシュ時にはリード/ライトができ
ないのでリード/ライト実行のタイミングを図る必要が
ある。
The SDRAM 300 needs to be refreshed every unit time, but the DSP 100 does not operate in consideration of the refresh. So, SDRAM
The interface circuit 200 must measure the time and instruct the SDRAM 300 to refresh for a predetermined period. Since read / write cannot be performed at the time of refresh, it is necessary to determine read / write execution timing.

【0091】アクセスカウンタ801は、リード信号お
よびライト信号の両方のアクセス数をカウントし、その
値を有効データ数として出力する。比較ブロック803
は、リード時およびライト時にDSP100から入力さ
れた書き込みアドレスおよび読み出しアドレスを一時的
に保存し、次に入力されたアドレスと比較し、その結果
アドレスが非連続であるならばコマンド発生パルスを出
力するようになっている。また、前回アクセスがあった
信号がライト信号かリード信号か記憶し、リード信号か
らライト信号へ、またはライト信号からリード信号へ切
り替わったならばコマンド発生パルスを出力するように
なっている。言い換えれば、比較ブロック803は、D
SP100が、アドレスが連続するデータをリード/ラ
イトしていることを検出するように構成されている。
Access counter 801 counts the number of accesses of both the read signal and the write signal, and outputs the value as the number of valid data. Comparison block 803
Temporarily stores a write address and a read address input from the DSP 100 at the time of reading and writing, compares them with the next input address, and outputs a command generation pulse if the address is non-consecutive as a result. It has become. Further, it stores whether the signal accessed last time is a write signal or a read signal, and outputs a command generation pulse when switching from a read signal to a write signal or from a write signal to a read signal. In other words, the comparison block 803 determines D
The SP 100 is configured to detect that data with consecutive addresses is being read / written.

【0092】RCカウントブロック804は、クロック
の周波数によってDSP100が間隔を設定し、リフレ
ッシュの間隔を測っている。そして、RCカウントブロ
ック804は、リフレッシュのタイミングが来たなら
ば、リフレッシュスタートパルスを出力する。また、リ
フレッシュのタイミングを含む所定の期間(以下、リフ
レッシュサイクルという)を、アクセスカウンタ80
1、コマンドレジスタ802、比較ブロック803へ通
知するリフレッシュサイクル信号を出力する。例えば、
リフレッシュサイクル信号は、リフレッシュサイクルに
開始するとアクティブになり、リフレッシュサイクルが
終了するとノンアクティブになる。
In the RC count block 804, the DSP 100 sets the interval according to the clock frequency and measures the refresh interval. Then, the RC count block 804 outputs a refresh start pulse when a refresh timing comes. In addition, a predetermined period including a refresh timing (hereinafter, referred to as a refresh cycle) is defined as an access counter 80.
1. A refresh cycle signal to be notified to the command register 802 and the comparison block 803 is output. For example,
The refresh cycle signal becomes active when the refresh cycle starts, and becomes inactive when the refresh cycle ends.

【0093】コマンドレジスタ802は、SDRAM3
00のモードレジスタを設定する回路である。コマンド
レジスタ802は、デフォルトのモードセットデータを
保持し、起動時に、このデフォルトのモードセットデー
タを出力する。また、コマンドレジスタ802は、DS
P100から特にモード設定の要求があった場合には、
この要求に従ってモードセットデータを生成し、出力す
る。
The command register 802 stores the SDRAM3
This is a circuit for setting a mode register of 00. The command register 802 holds the default mode set data, and outputs the default mode set data at startup. Also, the command register 802 stores the DS
When a mode setting is requested from P100,
The mode set data is generated and output according to this request.

【0094】コマンド生成ブロック805は、アクセス
カウンタ801、比較ブロック803、RCカウントブ
ロック804およびコマンドレジスタ802の出力に応
じて、SDRAM300を制御するコマンドを生成し、
SDRAM300へ出力する回路である。また、コマン
ド生成ブロック805は、図4に示すように、SDRA
M300と外部制御線806を介して接続されていると
ともに、内部制御線807を介して、送信データバッフ
ァ500、受信データバッファ700および入出力セレ
クタ900と接続されている。このコマンド生成ブロッ
ク805の動作については後述する。
The command generation block 805 generates a command for controlling the SDRAM 300 according to the output of the access counter 801, the comparison block 803, the RC count block 804, and the command register 802.
This is a circuit for outputting to the SDRAM 300. In addition, the command generation block 805, as shown in FIG.
It is connected to M300 via an external control line 806 and to the transmission data buffer 500, the reception data buffer 700 and the input / output selector 900 via an internal control line 807. The operation of the command generation block 805 will be described later.

【0095】次に、入出力セレクタ900について図9
を参照して説明する。図9は、上記実施の形態1に係る
SDRAMインターフェイス回路のセレクタを示すブロ
ック図である。
Next, the input / output selector 900 shown in FIG.
This will be described with reference to FIG. FIG. 9 is a block diagram showing a selector of the SDRAM interface circuit according to the first embodiment.

【0096】入出力セレクタ900は、送信データバッ
ファ500、受信データバッファ700、コマンド制御
ブロック800、およびRCカウントブロック804か
ら出力される信号の中からSDRAM300にアクセス
する信号を適宜選択する回路である。この入出力セレク
タ900の選択は、コマンド生成ブロック805からの
サイクル情報に従って行われる。
The input / output selector 900 is a circuit for appropriately selecting a signal for accessing the SDRAM 300 from signals output from the transmission data buffer 500, the reception data buffer 700, the command control block 800, and the RC count block 804. The selection of the input / output selector 900 is performed according to the cycle information from the command generation block 805.

【0097】上述の構成からなる本実施の形態1に係る
SDRAMインターフェイス回路200での、リフレッ
シュ、モードセット、リードおよびライトの各動作につ
いて説明する。
A description will be given of refresh, mode set, read and write operations in SDRAM interface circuit 200 according to the first embodiment having the above-described configuration.

【0098】<リフレッシュ>上述のように、RCカウ
ントブロック804は、クロックの周波数によってDS
P100が間隔を設定し、リフレッシュの間隔を測り、
リフレッシュのタイミングが来たらコマンド生成ブロッ
ク805へリフレッシュスタートパルスを出力する。こ
れに応じて、コマンド生成ブロック805は、リフレッ
シュコマンドをSDRAM300に出力する。このよう
に、SDRAMインターフェイス回路200は、DSP
100からの特別なコマンドが無くとも、自律的にリフ
レッシュをSDRAM300に実行させることができ
る。
<Refresh> As described above, the RC count block 804 sets the DS according to the frequency of the clock.
P100 sets the interval, measures the refresh interval,
When the refresh timing comes, a refresh start pulse is output to the command generation block 805. In response, command generation block 805 outputs a refresh command to SDRAM 300. Thus, the SDRAM interface circuit 200 includes the DSP
Even if there is no special command from 100, the SDRAM 300 can autonomously execute the refresh.

【0099】さらに、RCカウントブロック804は、
リフレッシュサイクル信号により、リフレッシュのタイ
ミングよりも前に、比較ブロック803などにリフレッ
シュの開始を通知しているので、比較ブロック803が
リフレッシュよりも前にリード/ライトを完了させるこ
とが可能である。この結果、リフレッシュを最優先で行
うことができる。
Further, the RC count block 804
Since the start of the refresh is notified to the comparison block 803 and the like before the timing of the refresh by the refresh cycle signal, the comparison block 803 can complete the read / write before the refresh. As a result, the refresh can be performed with the highest priority.

【0100】<モードセット>SDRAMインターフェ
イス回路200によれば、起動時に、コマンドレジスタ
802は、保持しているデフォルトのモードセットデー
タをコマンド生成ブロック805に出力する。また、コ
マンドレジスタ802が保持するモードセットデータ
を、DSP100から設定することができる。この場合
にも、コマンドレジスタ802は、設定されたモードセ
ットデータをコマンド生成ブロック805に出力する。
コマンド生成ブロック805は、入力されたモードセッ
トデータに従ってモードセットコマンドを生成し、SD
RAM300へ入力する。これにより、SDRAM30
0のモードセレクタに設定が行われる。ここで、SDR
AM300のモードセレクタの設定内容は、例えば、バ
ースト長、アドレスモード、CASレイテンシィなどで
ある。
<Mode Set> According to the SDRAM interface circuit 200, at the time of startup, the command register 802 outputs the held default mode set data to the command generation block 805. The mode set data held by the command register 802 can be set from the DSP 100. Also in this case, the command register 802 outputs the set mode set data to the command generation block 805.
The command generation block 805 generates a mode set command according to the input mode set data,
Input to RAM 300. Thereby, the SDRAM 30
The setting is made to the mode selector of 0. Where SDR
The setting contents of the mode selector of the AM 300 are, for example, burst length, address mode, CAS latency, and the like.

【0101】より具体的に説明すると、SDRAMイン
ターフェイス回路200は、まずSDRAM300に対
してオールバンクプリチャージコマンドを送信してすべ
てのバンクをアイドル状態にする。これにより、SDR
AM300のモードセットが可能になる。次いで、モー
ドセットコマンドを送出し、2クロックサイクル後オー
トリフレッシュコマンドを8回送出し、SDRAM30
0をアイドル状態とする。
More specifically, the SDRAM interface circuit 200 first transmits an all-bank precharge command to the SDRAM 300 to make all the banks idle. With this, SDR
The mode setting of the AM 300 is enabled. Next, a mode set command is transmitted, and an auto-refresh command is transmitted eight times after two clock cycles.
0 is an idle state.

【0102】このように、SDRAMインターフェイス
回路200によれば、起動時にDSP100から特別な
コマンドが無くても、コマンドレジスタ802が保持す
るデフォルトのモードセットデータに従ってSDRAM
300のモードセットを行うことができる。また必要に
応じてDSP100からもモードセットを直接行うこと
が可能である。
As described above, according to the SDRAM interface circuit 200, even if there is no special command from the DSP 100 at the time of start-up, the SDRAM interface circuit 200 follows the default mode set data held by the command register 802.
300 mode sets can be performed. Also, the mode set can be performed directly from the DSP 100 as needed.

【0103】<リード>リード動作時、DSP100
は、図2に示すように、リード信号をアクティブにする
とともに読み出しアドレスを出力してリードアクセスを
行う。DSP100は必要なアドレスの分だけリードア
クセスを繰り返す。
<Read> During the read operation, the DSP 100
Performs a read access by activating a read signal and outputting a read address, as shown in FIG. The DSP 100 repeats read access for the required address.

【0104】SDRAMインターフェイス回路200で
は、DSP100からの読み出しアドレスを、受信デー
タバッファ700のバッファブロック701のバッファ
1〜8に順次保存する。
In the SDRAM interface circuit 200, the read addresses from the DSP 100 are sequentially stored in the buffers 1 to 8 of the buffer block 701 of the reception data buffer 700.

【0105】同時に、コマンド制御ブロック800で
は、アクセスカウンタ801がリード信号のアクセスを
カウントする。また、コマンド制御ブロック800で
は、DSP100がいくつのリードデータを要求してい
るか認識している。すなわち、比較ブロック803は、
リードアクセス毎に読み出しアドレスを保持し、これを
次回のリードアクセスの際に受信した読み出しアドレス
とを比較し、両者が連続しているか否か判定している。
もし両者が連続していればリードデータに連続性がある
と判断し、続けてリードアクセスを受信する。しかし、
もし両者が連続していなければ、リードデータにこれ以
上連続性がないと判断し、コマンド生成ブロック805
にコマンド発生パルスを出力する。また、比較ブロック
803は、リード/ライトの種別をアクセス毎に保持
し、次回のアクセスの際にリードからライトに切り替わ
ったときもコマンド生成ブロック805にコマンド発生
パルスを出力する。
At the same time, in the command control block 800, the access counter 801 counts read signal accesses. The command control block 800 recognizes how many read data the DSP 100 requests. That is, the comparison block 803 is
The read address is held for each read access, and the read address is compared with the read address received in the next read access to determine whether or not both are continuous.
If both are continuous, it is determined that the read data has continuity, and a read access is subsequently received. But,
If both are not continuous, it is determined that the read data has no further continuity, and the command generation block 805 is determined.
Output a command generation pulse. Further, the comparison block 803 holds the type of read / write for each access, and outputs a command generation pulse to the command generation block 805 also when switching from read to write at the next access.

【0106】コマンド生成ブロック805は、コマンド
発生パルスが入力されたとき、最初のリードアクセスで
指定された読み出しアドレス(バッファ1に保存した読
み出しアドレス)を開始アドレスとして、図3に示すよ
うなリードサイクルを実行する。これに応じて、SDR
AM300からモードレジスタに設定されたバースト分
のリードデータが返って来る。リードデータは、バッフ
ァ1〜8に読み出しアドレスに対応させて順次保存され
る。
When a command generation pulse is input, the command generation block 805 uses the read address specified by the first read access (the read address stored in the buffer 1) as a start address and executes a read cycle as shown in FIG. Execute In response, SDR
The read data corresponding to the burst set in the mode register is returned from the AM 300. The read data is sequentially stored in the buffers 1 to 8 corresponding to the read address.

【0107】しかし、実際には、DSP100が必要と
するリードデータのワード数とSDRAM300が出力
するリードデータのワード数にずれがあるので調整する
必要がある。
However, in practice, there is a difference between the number of words of the read data required by the DSP 100 and the number of words of the read data output by the SDRAM 300.

【0108】第1に、コマンド生成ブロック805は、
コマンド発生パルスが入力された時点の有効データ数
と、SDRAM300のモードセレクタに設定されたバ
ースト長とを比較し、最適なバースト長であるか否か判
定する。設定されたバースト長は、コマンドレジスタ8
02からバースト情報として得られる。もし設定さえれ
たバースト長が有効データ数に最適なバースト長でない
ならば、上記<モードセット>の動作に準じてモードセ
ットコマンドを生成し、SDRAM300へ出力する。
これにより、SDRAM300のバースト長を最適なバ
ースト長に変更する。
First, the command generation block 805 includes:
The number of valid data at the time when the command generation pulse is input is compared with the burst length set in the mode selector of SDRAM 300, and it is determined whether or not the burst length is optimal. The set burst length is stored in command register 8
02 is obtained as burst information. If the set burst length is not the optimum burst length for the number of valid data, a mode set command is generated in accordance with the operation of <mode set> and output to SDRAM 300.
As a result, the burst length of the SDRAM 300 is changed to the optimum burst length.

【0109】ここで最適なバースト長とは、有効データ
数以上であって有効データ数に最も近いバースト長をい
う。通常、バースト長は、1、2、4、8のように1お
よび2の倍数になっているので、例えば有効データ数が
3ワードであれば最適なバースト長は4である。
Here, the optimum burst length is a burst length that is equal to or larger than the number of valid data and is closest to the number of valid data. Normally, the burst length is a multiple of 1 and 2, such as 1, 2, 4, and 8. Therefore, for example, if the number of valid data is 3 words, the optimal burst length is 4.

【0110】第2に、有効データ数とSDRAM300
のバースト長(リードデータのワード数)とが一致しな
いことがある。このような場合、SDRAMインターフ
ェイス回路200は、余分なリードデータを切り捨てる
必要がある。この制御は、上述の受信データバッファ7
00について説明したインプットイネーブル信号を用い
て行う。SDRAM300からバースト長のリードデー
タを受信する。リードデータをバッファブロック701
にバッファ1から順次保存していくが、有効データ数を
越える分については、すべてのバッファ1〜8に対して
インプットイネーブル信号をノンアクティブとすること
でリードデータの保存を制限する。
Second, the number of valid data and the SDRAM 300
May not match the burst length (the number of words of read data). In such a case, the SDRAM interface circuit 200 needs to cut off excess read data. This control is based on the reception data buffer 7 described above.
This is performed by using the input enable signal described with reference to FIG. The read data having the burst length is received from the SDRAM 300. Read data into buffer block 701
The buffer 1 is sequentially stored from the buffer 1, and when the number of valid data exceeds the number of valid data, the input enable signal is made inactive for all the buffers 1 to 8, so that the storage of the read data is restricted.

【0111】その後、DSP100からの2回目のリー
ドアクセスに応じて、受信データバッファ700は、バ
ッファブロック701に保存したリードデータをリード
させる。
After that, in response to the second read access from the DSP 100, the reception data buffer 700 reads the read data stored in the buffer block 701.

【0112】より具体的に説明すると、DSP100が
要求するワード数が3、SDRAM300のバースト長
が4である場合、SDRAM300から4ワードのリー
ドデータが出力されるが、3ワード分だけ受信データバ
ッファ700に保存する。その後、DSP100は受信
データバッファ700から3ワードのリードデータをデ
ィレイなしでリードすることができる。
More specifically, when the number of words requested by the DSP 100 is three and the burst length of the SDRAM 300 is four, four words of read data are output from the SDRAM 300, but only three words of the receive data buffer 700 are output. To save. Thereafter, the DSP 100 can read three words of read data from the reception data buffer 700 without delay.

【0113】このように、本実施の形態1に係るSDR
AMインターフェイス回路200によれば、DSP10
0側からの特別なコマンドなしに、SDRAM300の
バースト長を適宜変更したり、SDRAM300からの
リードデータの超過分を切り捨てることができる。
Thus, the SDR according to the first embodiment
According to the AM interface circuit 200, the DSP 10
Without a special command from the 0 side, the burst length of the SDRAM 300 can be appropriately changed, and the excess of read data from the SDRAM 300 can be cut off.

【0114】以上の説明では、SDRAMインターフェ
イス回路200は、リードアクセスの連続性が無くなっ
た時点でSDRAM300に対してリードサイクルを実
行しているが、RCカウントブロック804からのリフ
レッシュサイクル信号に従ってリフレッシュサイクルが
開始した時点でSDRAM300に対してリードサイク
ルを実行する。これにより、SDRAM300にリード
よりもリフレッシュを優先して実行させることができ
る。
In the above description, SDRAM interface circuit 200 executes a read cycle for SDRAM 300 when read access continuity is lost, but the refresh cycle is performed in accordance with the refresh cycle signal from RC count block 804. At the start, a read cycle is performed on SDRAM 300. This allows the SDRAM 300 to execute the refresh with priority over the read.

【0115】<ライト>ライト動作時、DSP100
は、図2に示すように、ライト信号をアクティブにする
とともにライトデータおよび書き込みアドレスを出力し
てライトアクセスを行う。DSP100はライトデータ
のワード数だけライトアクセスを繰り返す。
<Write> During the write operation, the DSP 100
As shown in FIG. 2, write access is performed by activating a write signal and outputting write data and a write address. The DSP 100 repeats the write access by the number of words of the write data.

【0116】SDRAMインターフェイス回路200で
は、DSP100からのライトデータおよび書き込みア
ドレスを、送信データバッファ500のバッファブロッ
ク501のバッファ1〜8に順次保存する。
In the SDRAM interface circuit 200, the write data and the write address from the DSP 100 are sequentially stored in the buffers 1 to 8 of the buffer block 501 of the transmission data buffer 500.

【0117】同時に、コマンド制御ブロック800で
は、DSP100が書き込むライトデータのワード数を
認識している。すなわち、アクセスカウンタ801がラ
イトアクセスをカウントし、その値を有効データ数とし
て出力する。また、比較ブロック803は、ライトアク
セス毎に書き込みアドレスを保持し、次回のライトアク
セスの際に受信した書き込みアドレスと比較し、両者が
連続していれば、ライトアクセスを続けて受信する。し
かし、もし両者が連続していなければ、ライトデータに
これ以上連続性がないと判断し、コマンド生成ブロック
805にコマンド発生パルスを出力する。
At the same time, the command control block 800 recognizes the number of words of write data to be written by the DSP 100. That is, the access counter 801 counts the number of write accesses, and outputs the value as the number of valid data. The comparison block 803 holds the write address for each write access, compares the write address with the write address received at the next write access, and if both are continuous, receives the write access continuously. However, if both are not continuous, it is determined that the write data has no further continuity, and a command generation pulse is output to the command generation block 805.

【0118】また、比較ブロック803は、リード/ラ
イトの種別をアクセス毎に保持し、次回のアクセスの際
にライトからリードに切り替わったときもライトデータ
に連続性がないと判断し、コマンド生成ブロック805
にコマンド発生パルスを出力する。
The comparison block 803 holds the type of read / write for each access, determines that there is no continuity in the write data even when switching from write to read at the next access, and issues a command generation block. 805
Output a command generation pulse.

【0119】コマンド生成ブロック805は、コマンド
発生パルスが入力されたとき、最初のライトアクセスで
指定された書き込みアドレス(バッファ1に保存した書
き込みアドレス)を開始アドレスとして、図3に示すよ
うなライトサイクルを実行する。
When a command generation pulse is input, the command generation block 805 uses the write address specified in the first write access (the write address stored in the buffer 1) as a start address and executes a write cycle as shown in FIG. Execute

【0120】リードと同様にバースト長の適合性チェッ
クを行うとともに、および、ライトデータのマスクを行
う。すなわち、コマンド生成ブロック805は、コマン
ド発生パルスの入力時点の有効データ数と、SDRAM
300に設定されたバースト長とを比較し、最適なバー
スト長であるか否か判断する。その判定基準はリードと
同様である。
As in the read operation, the burst length is checked for conformity, and the write data is masked. That is, the command generation block 805 determines the number of valid data at the time of input of the command generation pulse and the SDRAM
A comparison is made with the burst length set to 300 to determine whether or not the burst length is optimal. The criterion is the same as that of the lead.

【0121】バースト長が最適でない場合、最適なバー
スト長に変更するために、上記<モードセット>の動作
に準じてモードセットコマンドを生成し、SDRAM3
00へ出力する。その後、コマンド生成ブロック805
はライトサイクルを実行する。一方、バースト長が適当
であれば、モードセットを行うことなく、ライトサイク
ルを実行する
If the burst length is not optimal, a mode set command is generated in accordance with the operation of <mode set> to change the burst length to the optimal burst length.
Output to 00. Then, the command generation block 805
Performs a write cycle. On the other hand, if the burst length is appropriate, the write cycle is executed without performing the mode set.

【0122】ライトサイクルでは、ライトデータの有効
データ数と、バースト長とに違いがあるのでその整合を
取る必要がある。すなわち、ライトサイクルにおいて、
図5に示す送信データバッファ500は、バッファ1〜
8に保存されたライトデータをバースト分だけSDRA
M300へ順次出力する。しかしながら、DSP100
がライトを要求したライトデータだけを出力する必要が
あるので、送信データバッファ500は、有効データ数
を越えるバッファからのデータ出力にマスクをかけてい
る。
In the write cycle, there is a difference between the number of valid data of the write data and the burst length. That is, in the write cycle,
The transmission data buffer 500 shown in FIG.
8 write data stored in SDRA by burst
Output to M300 sequentially. However, DSP100
Needs to output only the write data requested to be written, the transmission data buffer 500 masks data output from buffers exceeding the number of valid data.

【0123】より具体的に説明すると、バースト長が8
であり、かつ有効データ数が7である場合、送信データ
バッファ500のバッファ1〜7にライトデータが保存
されている。よって、送信データバッファ500は、1
ワード目から7ワード目のライトデータを順次出力する
が、8ワード目、言い換えればバッファ8に保存されて
いるデータは無効であるので、このデータの出力をマス
クする。
More specifically, when the burst length is 8
When the number of valid data is 7, the write data is stored in the buffers 1 to 7 of the transmission data buffer 500. Therefore, the transmission data buffer 500
The write data of the 7th word to the 7th word are sequentially output. Since the 8th word, in other words, the data stored in the buffer 8 is invalid, the output of this data is masked.

【0124】データ出力のマスクは、上述のアウトプッ
トイネーブル信号を用いて行う。すなわち、バーストモ
ードでライトを行う場合、図3に示すようにバースト長
分のライトデータを連続してSDRAM300へ出力す
るが、マスクすべきライトデータを出力するタイミング
で、バッファ1〜8のすべてに対するアウトプットイネ
ーブル信号をノンアクティブとする。これにより、この
タイミングでのSDRAM300へのデータ出力をマス
クすることができる。
The masking of the data output is performed by using the above-mentioned output enable signal. That is, when writing in the burst mode, write data of a burst length is continuously output to the SDRAM 300 as shown in FIG. 3, but at the timing when write data to be masked is output, all of the buffers 1 to 8 are written. The output enable signal is made non-active. Thus, data output to SDRAM 300 at this timing can be masked.

【0125】このように、SDRAMインターフェイス
回路200によれば、DSP100側から特別なコマン
ドを受信することなく、ライト時に、ライトデータの書
き込みアドレスの連続性を認識し、連続するライトデー
タの有効データ数に最適のバースト長でSDRAM30
0にライトを行うことができる。
As described above, according to the SDRAM interface circuit 200, the continuity of the write address of the write data is recognized at the time of writing without receiving a special command from the DSP 100, and the number of valid data of the continuous write data is determined. SDRAM 30 with optimal burst length
Writing to 0 can be performed.

【0126】また、リードと同様に、RCカウントブロ
ック804からのリフレッシュサイクル信号に従ってリ
フレッシュサイクルが開始した時点でSDRAM300
に対してライトサイクルを実行する。これにより、SD
RAM300にライトよりもリフレッシュを優先して実
行させることができる。
Similarly to the read operation, when the refresh cycle starts in accordance with the refresh cycle signal from RC count block 804, SDRAM 300
Execute a write cycle. Thereby, SD
It is possible to cause the RAM 300 to execute the refresh with priority over the write.

【0127】<コマンド生成>以上説明した<リフレッ
シュ>、<モードセット>、<リード>、<ライト>で
コマンドを生成するコマンド生成ブロック805の動作
についてさらに詳細に説明する。図10は、上記実施の
形態1に係るコマンド生成ブロックの動作を示すフロー
図である。
<Command Generation> The operation of the command generation block 805 for generating commands in <refresh>, <mode set>, <read>, and <write> described above will be described in further detail. FIG. 10 is a flowchart showing the operation of the command generation block according to the first embodiment.

【0128】コマンド生成ブロック805は、リセット
解除を行った後(ステップ(以下、STと記す)100
1)、DSP100からのSDRAM300へのアクセ
ス要求を待つ(ST1002)。次に、リフレッシュが
実行されるか否か(リフレッシュサイクル中か否か)判
定する(ST1003)。この判定は上述のようにRC
カウントブロック804からのリフレッシュサイクル信
号に基づいて行う。リフレッシュが実行されないなら
ば、リード/ライトの連続性を判定する(ST100
4)。連続性があるならばアクセス要求を保留し、ST
1002に戻り次のアクセス要求を待つ。一方、リード
/ライトの連続性がないならば、そこまでに保留したア
クセス要求に応じてコマンドを生成する(ST100
5)。ここで、アクセス要求の保留とは、例えば、上述
のように、ライト時にライトデータおよび書き込みアド
レスを送信データバッファ500に保存すること、およ
び、リード時に読み込みアドレスを受信データバッファ
700に保存することをいう。
The command generation block 805 releases the reset (step (hereinafter referred to as ST) 100
1) Wait for an access request to the SDRAM 300 from the DSP 100 (ST1002). Next, it is determined whether or not refresh is to be performed (whether or not a refresh cycle is being performed) (ST1003). This determination is made using RC as described above.
This is performed based on the refresh cycle signal from the count block 804. If the refresh is not executed, the read / write continuity is determined (ST100).
4). If there is continuity, suspend the access request and ST
It returns to 1002 and waits for the next access request. On the other hand, if there is no read / write continuity, a command is generated in accordance with the access request suspended up to that point (ST100).
5). Here, the suspension of the access request means, for example, that the write data and the write address are stored in the transmission data buffer 500 at the time of writing, and that the read address is stored in the reception data buffer 700 at the time of reading, as described above. Say.

【0129】一方、ST1003においてリフレッシュ
を実行する場合には、そこまでに保留したアクセス要求
があるか判断する(ST1006)。保留したアクセス
要求があれば、リフレッシュを行う前に、そこまでに保
留したアクセス要求に応じてコマンドを生成し(ST1
007)、次いでリフレッシュを実行する(ST100
8)。そこまでに保留したアクセス要求がなければ、そ
のままリフレッシュを実行する(ST1008)。リフ
レッシュ実行後は、次のアクセス要求を待つため、ST
1002に戻る。
On the other hand, when refreshing is performed in ST1003, it is determined whether there is an access request suspended up to that point (ST1006). If there is a suspended access request, a command is generated according to the suspended access request before refreshing (ST1).
007), and then execute a refresh (ST100)
8). If there is no pending access request up to that point, the refresh is executed as it is (ST1008). After the execution of the refresh, to wait for the next access request, the ST
Return to 1002.

【0130】このように、コマンド生成ブロック805
は、ST1004において、DSP100からのリード
/ライトの連続性、すなわち、DSP100からの読み
込みアドレスおよび書き込みアドレスが連続しているか
否か判定し、連続していればデータをバッファに保留
し、連続しなくなったときにそこまで保留したデータに
従ってコマンドを生成し、SDRAM300にアクセス
する。これにより、DSP100が特別な制御を行うこ
となくとも、コマンド生成ブロック805がSDRAM
300の仕様にあったコマンドを生成し、SDRAM3
00へ出力し、リード/ライトを行うことができる。
Thus, the command generation block 805
Determines in ST1004 whether the read / write continuity from the DSP 100 is continuous, that is, whether the read address and the write address from the DSP 100 are continuous. Then, a command is generated according to the data held so far, and the SDRAM 300 is accessed. This allows the command generation block 805 to use the SDRAM without the DSP 100 performing special control.
Generate a command that meets the specifications of the SDRAM3
00 to read / write.

【0131】また、コマンド生成ブロック805は、S
T1003で他の処理にさきがけて、リフレッシュを実
行するか否か判定しているので、常にリード/ライトに
優先してリフレッシュを行うことができる。また、リフ
レッシュを実行する場合には、ST1006においてそ
れまで保留したアドレス要求があるか否かチェックし、
あればSDRAM300に対してリード/ライトを実行
する。これにより、DSP100のコマンド要求に対し
てリフレッシュを優先しつつできる限り早く応えること
ができる。
Further, the command generation block 805
Since it is determined at T1003 whether to execute the refresh before other processes, the refresh can always be performed prior to the read / write. Also, when performing a refresh, it is checked in ST1006 whether there is an address request held up to that time,
If there is, read / write is executed for SDRAM 300. Thus, it is possible to respond to the command request of the DSP 100 as soon as possible while giving priority to the refresh.

【0132】なお、リフレッシュサイクルの終了時点、
言い換えればリフレッシュサイクル信号がアクティブか
らノンアクティブに切り替わるタイミングで、送信デー
タバッファ500、受信データバッファ700、および
比較ブロック803はソフトリセットを行い、バッファ
やカウンタをクリアして、以降のDSP100からのア
クセス要求に応答する。
At the end of the refresh cycle,
In other words, at the timing when the refresh cycle signal switches from active to non-active, the transmission data buffer 500, the reception data buffer 700, and the comparison block 803 perform a soft reset to clear the buffers and counters, and to perform subsequent access requests from the DSP 100. Respond to

【0133】また、リード/ライトのアクセスが最大バ
ースト長に達したときもアドレスに連続性があってもそ
こまで保留したコマンド要求に対して応答する。
In addition, when the read / write access reaches the maximum burst length, even if the address has continuity, it responds to the command request suspended so far.

【0134】<コマンド再生成>次に、アドレスの再生
成について説明する。SDRAM300は、リード/ラ
イトサイクルにおいて、入力された開始アドレスから始
まり、順にインクリメントしたアドレスに対してリード
/ライトを行うようになっている。このとき、SDRA
M300の仕様により、バースト長によって異なる桁で
CARRYが無視されるようになっている。具体的には、シ
ーケンシャルモードにおいて、バースト長が2ワードの
場合、A0からA1へのCARRYは無視される。またバー
スト長が4ワードの場合、A1からA2へのCARRYは無
視される。また、バースト長が8ワードの場合、A2か
らA3へのCARRYは無視される。このような場合、DS
P100からアクセス要求するアドレスと、SDRAM
300がリード/ライトを行うアドレスとに食い違いが
生じる。
<Regeneration of Command> Next, regeneration of an address will be described. In the read / write cycle, the SDRAM 300 starts reading from the input start address and performs reading / writing on sequentially incremented addresses. At this time, SDRA
Due to the specifications of M300, different digits depend on the burst length
CARRY is now ignored. Specifically, in the sequential mode, when the burst length is 2 words, the CARRY from A0 to A1 is ignored. When the burst length is 4 words, CARRY from A1 to A2 is ignored. When the burst length is 8 words, CARRY from A2 to A3 is ignored. In such a case, DS
Address requested for access from P100 and SDRAM
There is a discrepancy between the address at which 300 reads and writes.

【0135】図11を参照して具体的に説明する。図1
1は、シーケンシャルモードにおけるSDRAMでのア
ドレッシングシーケンスの一例を示す図である。シーケ
ンシャルモードでは、開始アドレスとして5番地を指定
してSDRAM300にリードを要求すると、5番
地(”00101”)からアドレスを1インクリメント
しながらデータ0,1,2・・・・と順番に出力する。
しかしながら、上述のように8バーストの場合A2から
A3ビットへのCARRYは無視されるので、7番地(”0
0111”)の次は8番地(”01000”)ではなく
0番地(”00000”)に戻るようになっている。こ
のような状態を「アドレスの繰り上がり無視」という。
A specific description will be given with reference to FIG. FIG.
FIG. 1 is a diagram showing an example of an addressing sequence in the SDRAM in the sequential mode. In the sequential mode, when a read request is issued to the SDRAM 300 by designating address 5 as a start address, data is sequentially output in the order of data 0, 1, 2,... While incrementing the address from address 5 (“00101”) by one.
However, as described above, in the case of 8 bursts, the CARRY from A2 to A3 bits is ignored, so address 7 ("0")
After “0111”), the address returns to address 0 (“00000”) instead of address 8 (“01000”), and such a state is referred to as “ignore address carry”.

【0136】このアドレスの繰り上がり無視のために、
DSP100では、5番地から12番地まで連続して8ワ
ードのデータをリードすることを要求しても、SDRA
M300からは5〜7番地および0〜4番地のデータが
送り返されてくる。従って、SDRAMインターフェイ
ス回路200は、このようなDSP100とSDRAM
300との間の調整を行う必要がある。
To ignore the carry of this address,
In the DSP 100, even if it is requested to read data of 8 words continuously from the address 5 to the address 12, the DSP 100
Data of addresses 5 to 7 and 0 to 4 are returned from M300. Therefore, the SDRAM interface circuit 200 includes the DSP 100 and the SDRAM
An adjustment between 300 and 300 is required.

【0137】図12は、上記実施の形態1に係るSDR
AMインターフェイス回路におけるコマンド再生成ブロ
ックの内部構成を示すブロック図である。コマンド再生
成ブロック1200のセレクタ1201には、DSP1
00からのアドレス入力のうち下位3ビットのMA
[0]〜MA[2]が入力される。また、図8に示すコ
マンドレジスタ802からバースト情報が入力される。
セレクタ1201は、バースト情報からSDRAM30
0に現在設定されているバースト長を取得し、これに従
って判定部1202への出力を変更する。
FIG. 12 shows an SDR according to the first embodiment.
FIG. 3 is a block diagram illustrating an internal configuration of a command regeneration block in the AM interface circuit. The selector 1201 of the command regeneration block 1200 includes DSP1
Lower 3 bits of the address input from address 00
[0] to MA [2] are input. Further, burst information is input from the command register 802 shown in FIG.
The selector 1201 uses the SDRAM 30 from the burst information.
The burst length currently set to 0 is obtained, and the output to the determination unit 1202 is changed according to this.

【0138】図13は、上記実施の形態1に係るSDR
AMインターフェイス回路のコマンド再生成ブロックの
セレクタの動作を示す図である。バースト長が1である
場合、図13(A)に示すように、セレクタ1201は
MA[0]〜MA[2]に対応するすべての出力をロー
レベル(Low)に固定する。また、バースト長が2で
ある場合セレクタ1201は、アドレス入力MA[0]
についてはそのまま出力し、残りのMA[1],MA
[2]についてはLに固定する。同様に、バースト長が
4である場合、図13(C)に示すようにMA[2]の
みをLに固定し、バースト長が8である場合、図13
(D)に示すように、すべてのアドレス入力MA[0]
〜MA[2]をそのまま出力する。
FIG. 13 shows an SDR according to the first embodiment.
FIG. 4 is a diagram illustrating an operation of a selector of a command regeneration block of the AM interface circuit. When the burst length is 1, as shown in FIG. 13A, the selector 1201 fixes all outputs corresponding to MA [0] to MA [2] to low level (Low). When the burst length is 2, the selector 1201 outputs the address input MA [0].
Is output as it is, and the remaining MA [1], MA
[2] is fixed to L. Similarly, when the burst length is 4, only MA [2] is fixed to L as shown in FIG. 13C, and when the burst length is 8, FIG.
As shown in (D), all address inputs MA [0]
MAMA [2] is output as it is.

【0139】セレクタ1201から信号が入力される
と、判定部1202はすべての信号がLである場合以外
はコマンド再生パルスをコマンド生成ブロック805に
出力する。セレクタ1201からの出力のいずれか一つ
がハイレベル(High)である場合、アドレスの繰り
上がり無視が起こるからである。例えば、バースト長が
1である場合開始アドレスがなんであれアドレスの繰り
上がり無視は起こらないので、セレクタ1201の出力
を”Low”に固定する。これに対して、バースト長が
8であるとき、開始アドレスが0番地(”000”)の
場合、すなわちMA[0]〜MA[2]の出力がすべ
て”Low”である場合にのみアドレスの繰り上がり無
視が起こらないので、セレクタ1201の出力をすべて
判定部1202へ出力し、MA[0]〜MA[2]の出
力の一つでも”High”であれば、開始アドレスは0
番地以外であるので、コマンド再生成が必要であると判
定する。
When a signal is input from the selector 1201, the determination section 1202 outputs a command reproduction pulse to the command generation block 805 unless all signals are L. This is because if any one of the outputs from the selector 1201 is at a high level (High), address carry-over is ignored. For example, when the burst length is 1, the output of the selector 1201 is fixed at "Low" since the carry-over of the address does not occur regardless of the start address. On the other hand, when the burst length is 8, the start address is address 0 (“000”), that is, only when the outputs of MA [0] to MA [2] are all “Low”, Since carry-over is not ignored, all outputs of the selector 1201 are output to the determination unit 1202. If at least one of the outputs of MA [0] to MA [2] is “High”, the start address is 0.
Since the address is other than the address, it is determined that command regeneration is necessary.

【0140】コマンド再生成パルスを受信したコマンド
生成ブロック805は、まず、DSP100からの1番
目の入力アドレスを開始アドレス(以下、指定アドレス
という)として指定し、始めのリード/ライトコマンド
を生成し、SDRAM300へ出力する。しかしアドレ
スの繰り上がり無視が発生した以降では、意図しないア
ドレスにデータが書き込まれたり、意図しないアドレス
のデータが出力されてしまう。そこで、コマンド生成ブ
ロック805は、アウトプットディセーブル/ライトマ
スク信号(DQM)を利用する。コマンド生成ブロック
805は、CLKの立ち上がりエッジでDQMをHig
hとし、ライトサイクルではそのサイクルの入力データ
をマスクさせる一方、リードサイクルでは次のCLKエ
ッジで出力されるデータをディセーブルさせる。
The command generation block 805, which has received the command regeneration pulse, first designates the first input address from the DSP 100 as a start address (hereinafter, designated address), and generates the first read / write command. Output to SDRAM 300. However, after the address carry-over is ignored, data is written to an unintended address or data at an unintended address is output. Therefore, the command generation block 805 uses an output disable / write mask signal (DQM). The command generation block 805 sets DQM to High at the rising edge of CLK.
In the write cycle, the input data of the cycle is masked, and in the read cycle, the data output at the next CLK edge is disabled.

【0141】始めのリード/ライトコマンドの処理が完
了したならば、新たに2番目のリード/ライトコマンド
を生成し、SDRAM300へ出力する。ここでの指定
アドレス(以下、再指定アドレスという)は、DSP1
00が認識する論理アドレス空間において、SDRAM
300でアドレスの繰り上がり無視があったアドレスの
次のアドレスである。このアドレス以降のデータは未だ
リード/ライトされていない。
When the processing of the first read / write command is completed, a second read / write command is newly generated and output to the SDRAM 300. The designated address here (hereinafter referred to as a re-designated address) is DSP1
00 in the logical address space recognized by SDRAM
300 is the address next to the address where the carry-over of the address was ignored. Data after this address has not been read / written yet.

【0142】この再指定アドレスは、指定アドレスから
算出可能である。以下、算出方法について具体的に説明
する。図14は、上記実施の形態1に係るSDRAMイ
ンターフェイス回路における再指定アドレスの算出方法
を説明する図である。
This redesignated address can be calculated from the designated address. Hereinafter, the calculation method will be specifically described. FIG. 14 is a diagram illustrating a method of calculating a redesignated address in the SDRAM interface circuit according to the first embodiment.

【0143】DSP100からの入力アドレスをMA
[23:0]、バースト長を8、指定アドレスをx‘0
0004Aと仮定する。この指定アドレスは、2進数で
表すと、図14(A)に示すようになる。図14(B)
に示すように、SDRAM300は指定アドレスからア
ドレスを1インクリメントしながらデータをリード/ラ
イトしていくと、アドレスx‘00004F(111
1)でアドレスの繰り上がり無視が生じるので、アドレ
スx‘000048(1000)へ戻る。従って、再指
定アドレスはx‘000050(0000)となる。こ
れは指示アドレスがx‘000048(1000)以外
のときはすべて同様である。そこで、指示アドレスのM
A[23:3]に1を加算すれば、再指定アドレスを算
出することが出来る。
The input address from DSP 100 is MA
[23: 0], burst length is 8, designated address is x'0
Assume 0004A. This designated address is represented by a binary number as shown in FIG. FIG. 14 (B)
As shown in the figure, the SDRAM 300 reads / writes data from the designated address while incrementing the address by one, and obtains the address x'00004F (111
Since address carry-over is ignored in 1), the process returns to address x'000004 (1000). Therefore, the re-designated address is x'000050 (0000). This is the same when the designated address is other than x'000004 (1000). Therefore, the designated address M
By adding 1 to A [23: 3], the redesignated address can be calculated.

【0144】このように、本実施の形態1に係るSDR
AMインターフェイス回路200は、DSP100から
特別なコマンドを受ける必要なく、SDRAM300で
のアドレスの繰り上がり無視が生じるか否か判定し、ア
ドレスの繰り上がり無視が生じる場合には、アクセス要
求のコマンドを再生成して必要なリード/ライトを行う
ことができる。この結果、DSP100は、SDRAM
300でのアドレスの繰り上がり無視を考慮する必要が
ない。
Thus, the SDR according to the first embodiment
The AM interface circuit 200 determines whether or not address carry-over is ignored in the SDRAM 300 without receiving a special command from the DSP 100. If the address carry-over is ignored, the AM interface circuit 200 regenerates an access request command. In this way, necessary read / write can be performed. As a result, the DSP 100
There is no need to consider address carry ignoring at 300.

【0145】ここでは、アドレッシングシーケンスがシ
ーケンシャルモードである場合について説明したが、イ
ンターリーブモードである場合も全く同様である。
Here, the case where the addressing sequence is the sequential mode has been described, but the same applies to the case where the addressing sequence is the interleave mode.

【0146】以上説明したように、本実施の形態1に係
るSDRAMインターフェイス回路200によれば、D
SP100からの特別なコマンドがなくても、DSP1
00からのアクセス要求に応じてコマンドを生成、出力
してSDRAM300を制御することができる。この結
果、DSP100は、SDRAM300の制御を行う必
要がないので、負荷を軽減し、高速で動作することがで
きる。また、DSP100を設計するときに、設計者
は、SDRAM300の仕様を考慮する煩雑さから解放
され、開発期間を短縮し、コストを軽減することができ
る。
As described above, according to SDRAM interface circuit 200 of the first embodiment, D
Even if there is no special command from SP100, DSP1
The SDRAM 300 can be controlled by generating and outputting a command in response to an access request from 00. As a result, the DSP 100 does not need to control the SDRAM 300, so that the load can be reduced and the DSP 100 can operate at high speed. Further, when designing the DSP 100, the designer is released from the complexity of considering the specifications of the SDRAM 300, and can shorten the development period and reduce the cost.

【0147】本実施の形態1では、DSP100を例に
挙げて説明したが、これに限定されるものではなく、本
発明は、例えば、CPUとSDRAMとのインターフェ
イスに応用することができる。この場合、DSPと同様
に、SDRAMの制御を行う必要がないので、負荷を軽
減し、高速で動作することができるとともに、ソフトウ
エアを設計するときに、プログラマはSDRAMの仕様
を考慮する煩雑さから解放され、ソフトウエア開発の期
間を短縮し、コストを軽減することができる。
In the first embodiment, the DSP 100 has been described as an example. However, the present invention is not limited to this. For example, the present invention can be applied to an interface between a CPU and an SDRAM. In this case, as in the case of the DSP, there is no need to control the SDRAM, so that the load can be reduced and high-speed operation can be performed. In addition, when designing software, the programmer must consider the specifications of the SDRAM. From software development, shortening the software development period and reducing costs.

【0148】(実施の形態2)次に、上記実施の形態1
に係るSDRAMインターフェイス回路を搭載した電子
機器の一例としてハンディスキャナを例示する。以下説
明するハンディスキャナは、特開平8−107479号
公報に開示されている画像処理装置の構成を採用してい
る。
(Embodiment 2) Next, Embodiment 1 is described.
A handy scanner is illustrated as an example of an electronic device equipped with the SDRAM interface circuit according to the above. The handy scanner described below employs the configuration of an image processing device disclosed in Japanese Patent Application Laid-Open No. 8-107479.

【0149】図15は、本発明の実施の形態2に係るハ
ンディスキャナを示すブロック図である。ハンディスキ
ャナ1500は、原稿読取ユニット1510を備えてい
る。原稿読取ユニット1510は、原稿画像を読み取る
ラインイメージセンサ1511と、ラインイメージセン
サ1511の両端位置に装備されたエンコーダ部151
2、1513とを備えている。
FIG. 15 is a block diagram showing a handy scanner according to Embodiment 2 of the present invention. The handy scanner 1500 includes a document reading unit 1510. The document reading unit 1510 includes a line image sensor 1511 for reading a document image, and encoder units 151 provided at both ends of the line image sensor 1511.
2 and 1513.

【0150】原稿読取ユニット1510には、アナログ
/ディジタルコンバータ(ADC)(図示せず)を介し
てLSI1600に接続されている。LSI1600
は、ラインイメージセンサ1511から入力される画像
データ、および、エンコーダ部1512、1513から
入力される位置データ信号を処理すると共に、後述のS
DRAM300、JPEGIC1520、DSP100
間のインターフェイスコントローラとして機能する。
The original reading unit 1510 is connected to an LSI 1600 via an analog / digital converter (ADC) (not shown). LSI 1600
Processes the image data input from the line image sensor 1511 and the position data signal input from the encoder units 1512 and 1513, and processes S
DRAM 300, JPEGIC 1520, DSP 100
Functions as an interface controller between them.

【0151】SDRAM300は、複数(n個)のSD
RAMチップで構成されている。このSDRAM300
は、DSP100のワークエリアとして使用される。よ
り具体的には、SDRAM300は、イメージデータ、
符号データ格納領域、シェーディング補正値格納領域な
どのメモリエリアを提供する。
The SDRAM 300 has a plurality (n) of SDs.
It is composed of a RAM chip. This SDRAM 300
Is used as a work area of the DSP 100. More specifically, the SDRAM 300 stores image data,
A memory area such as a code data storage area and a shading correction value storage area is provided.

【0152】メモリカードスロット1530は、SDメ
モリカード、フラッシュメモリカードなどのメモリカー
ド1531を着脱自在に接続するためのスロットであ
る。LCD1540は、画像データなどの表示を行う。
また、USBコネクタ1550は、USBケーブルを接
続するためのコネクタであり、USBケーブルを介して
パーソナルコンピュータ等の外部機器との接続を行う。
接続ケーブルはUSBに限定されず、IEEE139
4、シリアルケーブル、パラレルケーブル等を用いるこ
とができる。
A memory card slot 1530 is a slot for detachably connecting a memory card 1531 such as an SD memory card or a flash memory card. LCD 1540 displays image data and the like.
The USB connector 1550 is a connector for connecting a USB cable, and performs connection with an external device such as a personal computer via the USB cable.
The connection cable is not limited to USB, but IEEE 139
4. A serial cable, a parallel cable, or the like can be used.

【0153】DSP100は、ハンディスキャナ150
0の全体を制御する。ROM1560はDSP100が
実行するプログラムを格納する。RAM1570は、D
SP100のワーキングメモリエリア等を提供する。
The DSP 100 is a handy scanner 150
Controls all 0s. The ROM 1560 stores a program executed by the DSP 100. RAM 1570 contains D
Provide a working memory area and the like of the SP 100.

【0154】このような構成により、このハンディスキ
ャナ1500は、ラインイメージセンサ1511から読
み取った画像データを、JPEGIC1520で圧縮
し、SDRAM300に蓄積し、必要に応じてメモリカ
ード1531に格納し、PCなどに渡す。また、読み取
った画像データをLCD1540に表示する。
With such a configuration, the handy scanner 1500 compresses the image data read from the line image sensor 1511 by the JPEGIC 1520, accumulates the image data in the SDRAM 300, stores it in the memory card 1531 as necessary, and stores it in a PC or the like. hand over. Also, the read image data is displayed on LCD 1540.

【0155】図16は、上記実施の形態2に係るハンデ
ィスキャナのLSIの内部構成を示すブロック図であ
る。LSI1600は、シェーディング部1601、画
像メモリ1602、JPEG画像インターフェイス16
03、JPEG符号インターフェイス1604、DSP
インターフェイス1605、制御レジスタ1606、メ
モリカードインターフェイス1607、USBインター
フェイス1608、LCDインターフェイス1609、
画像合成処理ブロック1610、およびSDRAMイン
ターフェイス回路200により構成されている。
FIG. 16 is a block diagram showing the internal configuration of the LSI of the handy scanner according to the second embodiment. The LSI 1600 includes a shading unit 1601, an image memory 1602, a JPEG image interface 16
03, JPEG code interface 1604, DSP
Interface 1605, control register 1606, memory card interface 1607, USB interface 1608, LCD interface 1609,
It comprises an image synthesis processing block 1610 and an SDRAM interface circuit 200.

【0156】原稿読取ユニット1510を、原稿の上を
手動によって走査することにより、ラインイメージセン
サ1511が画像データを生成する。そして、生成され
た画像データは、ADCでディジタル化された後LSI
1600に入力される。
The original is manually scanned by the original reading unit 1510 so that the line image sensor 1511 generates image data. The generated image data is digitized by the ADC and then
1600.

【0157】入力されたディジタル画像データに対し
て、シェーディング部1601で、ラインイメージセン
サ1511のセンサ各画素間の感度ばらつきを補正する
ためにシェーディング補正が施される。補正されたディ
ジタル画像データは、画像メモリ1602上に一時的に
蓄積される。このディジタル画像データは、JPEG画
像インターフェイス1603を介してJPEGIC15
20に送られる。JPEGIC1520は、ディジタル
画像データを圧縮し、LSI1600に送り返す。送り
返された圧縮画像データは、JPEG符号インターフェ
イス1604を介してSDRAMインターフェイス回路
200に入力される。この圧縮画像データは、上記実施
の形態1で説明した<ライト>動作に従ってSDRAM
300にライトされる。この圧縮画像データは、アドレ
スに連続性があるのでそのままSDRAM300へライ
トされる。SDRAM300に格納した圧縮画像データ
は、後述の画像合成処理に先立ってSDRAM300か
ら一旦読み出され、JPEGIC1520によりSDR
AM300上のイメージ格納領域に展開される。
The input digital image data is subjected to shading correction by the shading unit 1601 in order to correct the sensitivity variation between the pixels of the line image sensor 1511. The corrected digital image data is temporarily stored on the image memory 1602. This digital image data is transmitted to a JPEG IC 15 via a JPEG image interface 1603.
20. The JPEGIC 1520 compresses the digital image data and sends it back to the LSI 1600. The returned compressed image data is input to the SDRAM interface circuit 200 via the JPEG code interface 1604. The compressed image data is stored in the SDRAM according to the <write> operation described in the first embodiment.
Written to 300. This compressed image data is written to the SDRAM 300 as it is because the address has continuity. The compressed image data stored in the SDRAM 300 is temporarily read from the SDRAM 300 prior to the image synthesis processing described later, and
The image is developed in the image storage area on the AM 300.

【0158】一方、エンコーダ部1512、1513
は、原稿読取ユニット1510を原稿の上で走査したと
きの車輪(図示せず)の回転を検出し、この検出信号か
ら移動距離を検出し、LSI1600に出力する。この
移動距離は、LSI1600はエンコーダレジスタ16
11にライン毎に保存される。
On the other hand, encoder units 1512 and 1513
Detects the rotation of a wheel (not shown) when the original reading unit 1510 scans over the original, detects the moving distance from this detection signal, and outputs it to the LSI 1600. This moving distance is determined by the LSI 1600 and the encoder register 16.
11 is stored for each line.

【0159】DSP100は、LSI1600にDSP
インターフェイス1605を介してアクセスし、エンコ
ーダレジスタ1611から各車輪の移動距離を読み取
る。DSP100は、この移動距離に基づいて車輪の原
稿上の座標を算出し、さらにこの車輪の座標をラインイ
メージセンサ1511の両端の各読取画素の座標に変換
し、走査位置座標としてLSI1600の画像合成処理
ブロック1610に出力する。
The DSP 100 adds the DSP to the LSI 1600.
Access is made via the interface 1605, and the moving distance of each wheel is read from the encoder register 1611. The DSP 100 calculates the coordinates of the wheels on the document based on the moving distance, further converts the coordinates of the wheels into the coordinates of each read pixel at both ends of the line image sensor 1511, and uses the image combining process of the LSI 1600 as the scanning position coordinates. Output to block 1610.

【0160】次に、本実施の形態2係るハンディスキャ
ナ1500での画像合成処理について説明する。図17
は、上記実施の形態2に係るハンディスキャナにおける
ラインイメージセンサの走査領域の説明図である。図1
7に示すように、原稿1701の読み取り領域幅がライ
ンイメージセンサ1511よりも大きい場合、原稿17
01を読み取るために、操作者は、ハンディスキャナ1
500を原稿1701に接触させ、原稿1701上を往
復運動させながら手動走査する。このとき、図17に示
すように、往方向へハンディスキャナを移動させたとき
の往方向走査領域1702と、復方向へハンディスキャ
ナを移動させたときの復方向走査領域1703とに重な
り走査領域1704が生じる。
Next, an image synthesizing process in the handy scanner 1500 according to the second embodiment will be described. FIG.
FIG. 8 is an explanatory diagram of a scanning area of a line image sensor in the handy scanner according to the second embodiment. FIG.
As shown in FIG. 7, when the width of the reading area of the original 1701 is larger than that of the line image sensor
01, the operator operates the handy scanner 1
The document 500 is brought into contact with the document 1701 and manually scanned while reciprocating on the document 1701. At this time, as shown in FIG. 17, the forward scanning area 1702 when the handy scanner is moved in the forward direction and the backward scanning area 1703 when the handy scanner is moved in the backward direction overlap with the scanning area 1704. Occurs.

【0161】本実施の形態2に係るハンディスキャナ1
500では、往方向走査領域1702および復方向走査
領域1703の画像を1つの画像に合成している。
[0161] The handy scanner 1 according to the second embodiment.
At 500, the images of the forward scan area 1702 and the backward scan area 1703 are combined into one image.

【0162】このために、画像合成処理ブロック161
0において、特開平8−107479号公報に開示され
ているように、位置ずれ検出・補正および写像処理を行
う。画像合成処理ブロック1610は、特開平8−10
7479号公報に記載された画像ずれ検出回路および写
像回路と同等の機能を有する。
For this purpose, the image synthesizing processing block 161
At 0, position deviation detection / correction and mapping processing are performed as disclosed in JP-A-8-107479. The image composition processing block 1610 is described in
It has the same function as the image shift detection circuit and the mapping circuit described in Japanese Patent No. 7479.

【0163】画像合成処理ブロック1610は、画素密
度変換処理により画像データを高密度化し、高密度化画
像データを生成する。さらに、走査位置座標を用いて高
密度画像データの各画素データのSDRAM300上の
イメージ格納領域への格納アドレスを算出する。
The image synthesis processing block 1610 densifies the image data by the pixel density conversion processing to generate high-density image data. Further, the storage address of each pixel data of the high-density image data in the image storage area on the SDRAM 300 is calculated using the scanning position coordinates.

【0164】論理的には、重なり走査領域1704にお
いて、SDRAM300に既に格納された往方向走査領
域1702の画素データが、新しく描き込まれる復方向
走査領域1703の画素データによりオーバーライトさ
れる。しかしながら、原稿読取ユニット1510のメカ
公差や座標計算の丸め誤差などにより、走査位置座標に
は誤差が含まれている。このため、往方向走査領域17
02および復方向走査領域1703の画像を合成すると
合成画像にずれが生じる。
Logically, in the overlap scanning area 1704, the pixel data of the forward scanning area 1702 already stored in the SDRAM 300 is overwritten by the pixel data of the backward scanning area 1703 which is newly drawn. However, scanning position coordinates include errors due to mechanical tolerances of the document reading unit 1510 and rounding errors in coordinate calculation. For this reason, the forward scanning area 17
When the images of 02 and the backward scanning area 1703 are combined, a shift occurs in the combined image.

【0165】この画像のずれを無くすため、画像合成処
理ブロック1610は、往方向走査領域1702の画像
データと復方向走査領域1703の画像データとを用い
て、それらの相関度合いを示す相関値を算出する。さら
に、画像合成処理ブロック1610は、この相関値に基
づいて走査位置座標を補正するための位置補正量を算出
する。さらに、画像合成処理ブロック1610は、この
位置補正量に従って走査位置座標を補正する。
To eliminate this image shift, the image synthesis processing block 1610 uses the image data of the forward scan area 1702 and the image data of the backward scan area 1703 to calculate a correlation value indicating the degree of correlation therebetween. I do. Further, the image synthesis processing block 1610 calculates a position correction amount for correcting the scanning position coordinates based on the correlation value. Further, the image synthesis processing block 1610 corrects the scanning position coordinates according to the position correction amount.

【0166】次いで、画像合成処理ブロック1610
は、補正した走査位置座標に従って、画像データ中の各
画素データの格納アドレスを生成し、この格納アドレス
を指定して、SDRAMインターフェイス回路200に
SDRAM300へのライトを要求する。SDRAMイ
ンターフェイス回路200は、上記実施の形態1で説明
した<ライト>の手順に従って、各画素データを指定さ
れた格納アドレスにライトする。
Next, an image synthesis processing block 1610
Generates a storage address of each pixel data in the image data in accordance with the corrected scanning position coordinates, specifies the storage address, and requests the SDRAM interface circuit 200 to write to the SDRAM 300. The SDRAM interface circuit 200 writes each pixel data to the designated storage address according to the procedure of <Write> described in the first embodiment.

【0167】位置ずれ補正についてさらに詳細に説明す
る。復方向走査を行うとき、すでに往方向走査の画像が
写像されており、SDRAM300上のイメージ格納領
域に格納されている。このイメージ格納領域からリード
した往方向走査のディジタル画像データと、新たに生成
した高密度化画像データとに基づいて、これらの重なり
走査領域1704において相関を検出する。相関は、注
目画素から上下左右に±1画素ずらした9パターンに、
さらに、各パターンで角度を±θずらした計27パター
ンの位置補正画素群を生成する。すでに写像されている
画素データとこれらから写像する画素データの差分の合
計を取り、求めた値が最も小さい画素を相関が高いこと
になるので、最も相関が高い画素に位置補正を行う。
The correction of the displacement will be described in more detail. When the backward scanning is performed, the image of the forward scanning has already been mapped and stored in the image storage area on the SDRAM 300. Based on digital image data of the forward scan read from the image storage area and newly generated high-density image data, a correlation is detected in the overlap scanning area 1704. The correlation is calculated in 9 patterns shifted ± 1 pixel up, down, left and right from the pixel of interest.
Furthermore, a position correction pixel group of a total of 27 patterns in which the angle is shifted by ± θ in each pattern is generated. The sum of the differences between the already mapped pixel data and the pixel data mapped therefrom is calculated, and the pixel having the smallest value has the highest correlation. Therefore, position correction is performed on the pixel with the highest correlation.

【0168】このように、この例では注目画素から±1
の9パターン、すなわち3×3画素を基準としているの
で、画像合成処理ブロック1610は、SDRAMイン
ターフェイス回路に対して、SDRAM300から往方
向走査の画素データを読み出す場合に連続する3画素分
を読み出すことを要求する。
Thus, in this example, ± 1 from the target pixel
Since the three patterns, ie, 3 × 3 pixels, are used as a reference, the image synthesis processing block 1610 instructs the SDRAM interface circuit to read three consecutive pixels when reading the forward scan pixel data from the SDRAM 300. Request.

【0169】図18は、上記実施の形態2に係るハンデ
ィスキャナにおける位置ずれ補正処理での位置補正画素
群を示す図である。画像合成処理ブロック1610は、
位置補正画素群1801の27の画素データをSDRA
M300のイメージ格納領域から読み出すために、例え
ばx軸方向に連続する3つの画素データのリードを3行
分行う必要がある。
FIG. 18 is a diagram showing a position correction pixel group in the position shift correction processing in the handy scanner according to the second embodiment. The image composition processing block 1610 includes:
27 pixel data of the position correction pixel group 1801
In order to read from the image storage area of the M300, it is necessary to read, for example, three rows of pixel data continuous in the x-axis direction for three rows.

【0170】画像合成処理ブロック1610は、上記実
施の形態1でのDSP100に相当し、SDRAM30
0に対してリードアクセスを行う。1行目の3つの連続
する画素データをリードする場合、画像合成処理ブロッ
ク1610は各画素データの格納アドレスをSDRAM
インターフェイス回路200に順次入力する。SDRA
Mインターフェイス回路200は、格納アドレスを受信
データバッファ700にバッファ1から順番に保存す
る。
The image synthesis processing block 1610 corresponds to the DSP 100 in the first embodiment, and the SDRAM 30
Read access to 0 is performed. When reading three consecutive pixel data in the first row, the image synthesis processing block 1610 sets the storage address of each pixel data to the SDRAM
The signals are sequentially input to the interface circuit 200. SDRA
The M interface circuit 200 stores the storage addresses in the reception data buffer 700 sequentially from the buffer 1.

【0171】DSP100は、1行目の画素データのリ
ードアクセスが終了すると2行目の画素データのリード
アクセスを開始する。SDRAMインターフェイス回路
200は、上記実施の形態1で説明したようにここでリ
ードアクセスに連続性がなくなったことをコマンド制御
ブロック800の比較ブロック803で検出する。
When the read access of the pixel data of the first row is completed, the DSP 100 starts the read access of the pixel data of the second row. As described in the first embodiment, the SDRAM interface circuit 200 detects that the read access has lost continuity in the comparison block 803 of the command control block 800 here.

【0172】SDRAMインターフェイス回路200
は、ここまでの有効データ数3とSDRAM300に設
定されているバースト長とを比較し、最適なバースト長
か否か判定し、最適なバースト長でなければSDRAM
300に対してモードセットを行い、SDRAM300
の設定を変更する。この例では最適なバースト長は
「4」である。
SDRAM interface circuit 200
Compares the number of valid data 3 so far with the burst length set in the SDRAM 300 to determine whether or not the burst length is the optimum burst length.
Mode setting for the SDRAM 300
Change the settings of. In this example, the optimal burst length is “4”.

【0173】また、SDRAMインターフェイス回路2
00は、1つ目の画素の格納アドレスを開始アドレスと
するリードコマンドを生成し、SDRAM300へ出力
する。
The SDRAM interface circuit 2
00 generates a read command with the storage address of the first pixel as a start address and outputs it to the SDRAM 300.

【0174】SDRAM300は、SDRAMインター
フェイス回路200からのコマンドに応じて、1つ目の
画素の格納アドレスからバースト長分(4ワード)の画
素データを出力する。SDRAMインターフェイス回路
200は、SDRAM300から4ワードの画素データ
を受け取り、受信データバッファ700にバッファ1〜
順番に保存するが、有効データ数「3」を越える4ワー
ド目の画素データは余分であるので、バッファ4への書
き込みをマスクする。これにより、4ワード目の画素デ
ータを切り捨てる。
The SDRAM 300 outputs pixel data of the burst length (4 words) from the storage address of the first pixel in response to a command from the SDRAM interface circuit 200. The SDRAM interface circuit 200 receives four words of pixel data from the SDRAM 300, and stores
Although the data is stored in order, the pixel data of the fourth word exceeding the valid data number “3” is redundant, so that the writing to the buffer 4 is masked. As a result, the pixel data of the fourth word is discarded.

【0175】画像合成処理ブロック1610が2回目の
リードアクセスを行うと、SDRAMインターフェイス
回路200は、バッファ1〜3に保存した3つの画素デ
ータを画像合成処理ブロック1610へ出力する。この
ような画素データの読み出しを3行分行うことにより、
画像合成処理ブロック1610は、位置補正画素群18
01のすべての画素データをSDRAM300のイメー
ジ格納領域から読み出すことができる。
When the image synthesis processing block 1610 performs the second read access, the SDRAM interface circuit 200 outputs the three pixel data stored in the buffers 1 to 3 to the image synthesis processing block 1610. By reading such pixel data for three rows,
The image synthesis processing block 1610 includes the position correction pixel group 18
01 can be read from the image storage area of the SDRAM 300.

【0176】このように、本実施の形態2に係るハンデ
ィスキャナ1500では、画像合成処理ブロック161
0が位置ずれ補正処理を行うに際し、SDRAM300
の仕様を考慮することなくSDRAM300から画素デ
ータを読み出すことができる。より具体的に言えば、画
像合成処理ブロック1610は、SDRAM300のバ
ースト長の設定内容を認識し、自らが読み出そうとする
画素データの数と比較し、最適なバースト長か否か判定
する必要がない。また、最適なバースト長に変更するた
めに、モードセットを行う必要がない。さらに、SDR
AM300から出力された画素データから余分な画素デ
ータを切り捨てる処理を自ら行う必要がない。もちろん
SDRAM300のためにアドレスを再生成する必要も
ないし、リフレッシュを考慮する必要もない。
As described above, in the handy scanner 1500 according to the second embodiment, the image synthesis processing block 161 is used.
0 performs the position shift correction processing, the SDRAM 300
The pixel data can be read from the SDRAM 300 without considering the specification of. More specifically, the image synthesis processing block 1610 needs to recognize the setting content of the burst length of the SDRAM 300, compare it with the number of pixel data to be read by itself, and determine whether or not the burst length is optimal. There is no. Also, there is no need to perform a mode set in order to change the burst length to the optimal one. In addition, SDR
It is not necessary to perform a process of cutting off unnecessary pixel data from the pixel data output from the AM 300 by itself. Of course, there is no need to regenerate the address for the SDRAM 300, and no need to consider refresh.

【0177】この結果、画像合成処理ブロック1610
の負荷を軽減し、位置ずれ補正処理および写像処理を高
速で行うことができる。また、画像合成処理ブロック1
610に、リフレッシュ、モードセットを行うための回
路を組み込むことや、SDRAM300から出力される
バースト長分の画素データを一旦保存するバッファを設
けたり、余分な画素データを切り捨てる回路を設けるな
どの必要がないので、画像合成処理ブロック1610の
回路構成を大幅に簡略化することができる。さらに、画
像合成処理ブロック1610を設計するにあたり、設計
者は、SDRAM300の仕様にあわせる煩雑な作業か
ら解放される。
As a result, the image composition processing block 1610
, And the displacement correction processing and the mapping processing can be performed at high speed. Also, an image synthesis processing block 1
In 610, it is necessary to incorporate a circuit for performing refresh and mode setting, to provide a buffer for temporarily storing pixel data of a burst length output from the SDRAM 300, and to provide a circuit for cutting off unnecessary pixel data. Since there is no circuit, the circuit configuration of the image synthesis processing block 1610 can be greatly simplified. Further, in designing the image synthesis processing block 1610, the designer is freed from complicated work for matching the specifications of the SDRAM 300.

【0178】画像合成処理ブロック1610は、画像合
成の精度を上げるなどの理由で回路設計の変更が考えら
れるが、その度にSDRAM制御のための回路まで再設
計する必要がなくなるので、開発期間およびコストを削
減することができる。
The image synthesis processing block 1610 may be changed in circuit design for reasons such as increasing the accuracy of image synthesis, but it is not necessary to redesign the circuit for controlling SDRAM each time. Costs can be reduced.

【0179】上記実施の形態2では、画像合成処理ブロ
ック1610とSDRAM300とのインターフェイス
を例示したが、その他に、画像読取装置において様々な
処理装置とSDRAMとのインターフェイスにも本発明
を適用し、同様の効果を得ることができる。また、画像
合成処理をCPUで行わせる場合に、CPUとSDRA
Mとのインターフェイスにも適用することができる。
In the second embodiment, the interface between the image synthesizing processing block 1610 and the SDRAM 300 has been described as an example. In addition, the present invention is also applied to the interface between various processing devices and the SDRAM in the image reading apparatus. The effect of can be obtained. Further, when the CPU performs the image synthesizing process, the CPU and the SDRA
It can be applied to the interface with M.

【0180】[0180]

【発明の効果】以上説明したように、本発明によれば、
制御装置とSDRAMとのインターフェイス回路は制御
装置から特別なコマンドを受けることなく制御装置から
の要求に応じてコマンドを生成、出力してSDRAMを
制御し得るので、制御装置はSDRAMの制御を考慮す
る必要がなく、制御装置の負荷を軽減して動作を高速化
することができるとともに、制御装置の設計やソフトウ
エアのプログラミングの手間を簡略化し、開発期間の短
縮および開発コストの削減を図ることができるという効
果を奏する。
As described above, according to the present invention,
Since the interface circuit between the control device and the SDRAM can control the SDRAM by generating and outputting a command according to a request from the control device without receiving a special command from the control device, the control device considers the control of the SDRAM. This eliminates the need to reduce the load on the control unit and increase the speed of operation, while simplifying the design and software programming of the control unit, shortening the development period and reducing development costs. It has the effect of being able to.

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

【図1】本発明の実施の形態1に係るSDRAMインタ
ーフェイス回路とDSPおよびSDRAMとの関係を示
すブロック図
FIG. 1 is a block diagram showing a relationship between an SDRAM interface circuit and a DSP and an SDRAM according to a first embodiment of the present invention;

【図2】上記実施の形態1におけるDSP側信号線での
タイミングチャートを示す図
FIG. 2 is a diagram showing a timing chart of a DSP-side signal line in the first embodiment.

【図3】上記実施の形態1におけるSDRAM側信号線
でのタイミングチャートを示す図
FIG. 3 is a diagram showing a timing chart for an SDRAM side signal line in the first embodiment.

【図4】上記実施の形態1に係るSDRAMインターフ
ェイス回路の内部構成を示すブロック図
FIG. 4 is a block diagram showing an internal configuration of the SDRAM interface circuit according to the first embodiment;

【図5】上記実施の形態1に係るSDRAMインターフ
ェイス回路の送信データバッファの内部構成を示すブロ
ック図
FIG. 5 is a block diagram showing an internal configuration of a transmission data buffer of the SDRAM interface circuit according to the first embodiment.

【図6】上記実施の形態1の送信データバッファのアド
レスセレクタの内部構成を示すブロック図
FIG. 6 is a block diagram showing an internal configuration of an address selector of a transmission data buffer according to the first embodiment.

【図7】上記実施の形態1に係るSDRAMインターフ
ェイス回路の受信データバッファの内部構成を示すブロ
ック図
FIG. 7 is a block diagram showing an internal configuration of a reception data buffer of the SDRAM interface circuit according to the first embodiment.

【図8】上記実施の形態1に係るコマンド制御ブロック
の内部構成を示すブロック図
FIG. 8 is a block diagram showing an internal configuration of a command control block according to the first embodiment.

【図9】上記実施の形態1に係るSDRAMインターフ
ェイス回路のセレクタを示すブロック図
FIG. 9 is a block diagram showing a selector of the SDRAM interface circuit according to the first embodiment;

【図10】上記実施の形態1に係るコマンド生成ブロッ
クの動作を示すフロー図
FIG. 10 is a flowchart showing the operation of the command generation block according to the first embodiment.

【図11】シーケンシャルモードにおけるSDRAMで
のアドレッシングシーケンスの一例を示す図
FIG. 11 is a diagram showing an example of an addressing sequence in the SDRAM in the sequential mode

【図12】上記実施の形態1に係るSDRAMインター
フェイス回路におけるコマンド再生成ブロックの内部構
成を示すブロック図
FIG. 12 is a block diagram showing an internal configuration of a command regeneration block in the SDRAM interface circuit according to the first embodiment;

【図13】上記実施の形態1に係るSDRAMインター
フェイス回路のコマンド再生成ブロックのセレクタの動
作を示す図
FIG. 13 is a diagram showing the operation of the selector of the command regeneration block of the SDRAM interface circuit according to the first embodiment.

【図14】上記実施の形態1に係るSDRAMインター
フェイス回路における再指定アドレスの算出方法を説明
する図
FIG. 14 is a view for explaining a method of calculating a redesignated address in the SDRAM interface circuit according to the first embodiment;

【図15】本発明の実施の形態2に係るハンディスキャ
ナを示すブロック図
FIG. 15 is a block diagram showing a handy scanner according to Embodiment 2 of the present invention.

【図16】上記実施の形態2に係るハンディスキャナの
LSIの内部構成を示すブロック図
FIG. 16 is a block diagram showing an internal configuration of an LSI of the handy scanner according to the second embodiment.

【図17】上記実施の形態2に係るハンディスキャナに
おけるラインイメージセンサの走査領域の説明図
FIG. 17 is an explanatory diagram of a scanning area of a line image sensor in the handy scanner according to the second embodiment.

【図18】上記実施の形態2に係るハンディスキャナに
おける位置ずれ補正処理での位置補正画素群を示す図
FIG. 18 is a diagram showing a position correction pixel group in a position shift correction process in the handy scanner according to the second embodiment.

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

100 DSP 200 SDRAMインターフェイス回路 500 送信データバッファ 501、701 バッファブロック 502 ライトカウンタ 503 ライトセレクタ 504 アドレスセレクタ 505 アウトプットカウンタ 601 CSセレクタ 602 BSセレクタ 603 ローアドレスセレクタ 604 カラムアドレスセレクタ 605 ロー/カラムセレクタ 700 受信データバッファ 702 リードカウンタ 703 リード要求セレクタ 704 リードアウトセレクタ 705 アドレスセレクタ 706 インプットカウンタ 800 コマンド制御ブロック 801 アクセスカウンタ 802 コマンドレジスタ 803 比較ブロック 804 リフレッシュサイクル(RC)カウントブロッ
ク 805 コマンド生成ブロック 900 入出力セレクタ 1200 コマンド再生成ブロック 1500 ハンディスキャナ 1510 原稿読取ユニット 1511 ラインイメージセンサ 1512、1513 エンコーダ部 1610 画像合成処理ブロック
100 DSP 200 SDRAM interface circuit 500 Transmission data buffer 501, 701 Buffer block 502 Write counter 503 Write selector 504 Address selector 505 Output counter 601 CS selector 602 BS selector 603 Row address selector 604 Column address selector 605 Row / column selector 700 Receive data Buffer 702 Read counter 703 Read request selector 704 Readout selector 705 Address selector 706 Input counter 800 Command control block 801 Access counter 802 Command register 803 Comparison block 804 Refresh cycle (RC) count block 805 Command generation block 900 Input / output selector 1 200 Command regeneration block 1500 Handy scanner 1510 Document reading unit 1511 Line image sensor 1512, 1513 Encoder section 1610 Image synthesis processing block

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) G06F 12/00 597 G06F 12/00 597C G06T 1/60 450 G06T 1/60 450G G11C 11/407 G11C 11/34 362S 11/401 371H ──────────────────────────────────────────────────続 き Continued on the front page (51) Int.Cl. 7 Identification symbol FI Theme coat ゛ (Reference) G06F 12/00 597 G06F 12/00 597C G06T 1/60 450 G06T 1/60 450G G11C 11/407 G11C 11 / 34 362S 11/401 371H

Claims (19)

【特許請求の範囲】[Claims] 【請求項1】 制御装置とSDRAMとを接続するSD
RAMインターフェイス回路であって、 前記制御装置から入力された読み出しアドレスを保存す
る複数のアドレスバッファ手段と、前記複数のアドレス
バッファ手段に保存した読み出しアドレスの連続性を判
定する判定手段と、前記判定手段が前記読み出しアドレ
スにそれ以上連続性がないと判定した場合にそこまでに
前記複数のアドレスバッファ手段に保存した最初の読み
出しアドレスを開始アドレスとするリードコマンドを生
成、出力するコマンド生成手段と、前記リードコマンド
に応じて前記SDRAMから入力されたリードデータを
保存する複数のデータバッファ手段と、前記複数のデー
タバッファ手段に保存したリードデータを前記制御装置
へ出力するリードデータ出力手段と、を具備することを
特徴とするSDRAMインターフェイス回路。
An SD for connecting a control device and an SDRAM.
A RAM interface circuit, comprising: a plurality of address buffer means for storing a read address input from the control device; a determining means for determining continuity of the read address stored in the plurality of address buffer means; When it is determined that there is no more continuity in the read address, a command generating means for generating and outputting a read command with the first read address stored in the plurality of address buffer means as a start address so far, A plurality of data buffer means for storing read data input from the SDRAM in response to a read command; and a read data output means for outputting the read data stored in the plurality of data buffer means to the control device. SDRAM interface characterized by the following: Base circuit.
【請求項2】 制御装置からのリードアクセスをカウン
トするリードカウンタ手段をさらに具備し、コマンド生
成手段は前記リードカウンタ手段によるカウント値およ
びSDRAMのバースト長から前記カウント値に最適な
バースト長を求め、変更するコマンドを生成、出力する
ことを特徴とする請求項1記載のSDRAMインターフ
ェイス回路。
2. The apparatus further comprises read counter means for counting read accesses from a control device, wherein the command generation means obtains an optimum burst length for the count value from the count value of the read counter means and the burst length of the SDRAM, 2. The SDRAM interface circuit according to claim 1, wherein a command to be changed is generated and output.
【請求項3】 制御装置からのリードアクセスをカウン
トするリードカウンタ手段と、前記リードカウンタ手段
によるカウント値を超えるリードデータがSDRAMか
ら入力された場合当該リードデータを複数のデータバッ
ファ手段に保存することなく破棄する入力制御手段と、
をさらに具備することを特徴とする請求項1または請求
項2記載のSDRAMインターフェイス回路。
3. A read counter for counting read accesses from a controller, and when read data exceeding a count value of the read counter is input from an SDRAM, the read data is stored in a plurality of data buffers. Input control means for discarding without
The SDRAM interface circuit according to claim 1 or 2, further comprising:
【請求項4】 制御装置とSDRAMとを接続するSD
RAMインターフェイス回路であって、 前記制御装置から入力されたライトデータおよびその書
き込みアドレスを保存する複数のバッファ手段と、前記
複数のバッファ手段に保存した書き込みアドレスの連続
性を判定する判定手段と、前記判定手段が前記書き込み
アドレスにそれ以上連続性がないと判定した場合にそこ
までに前記複数のバッファ手段に保存した最初の書き込
みアドレスを開始アドレスとするライトコマンドを生
成、出力するコマンド生成手段と、前記ライトコマンド
出力後所定のタイミングで前記複数のバッファ手段に保
存したライトデータを順次出力するライトデータ出力手
段と、を具備することを特徴とするSDRAMインター
フェイス回路。
4. An SD for connecting a control device to an SDRAM.
A RAM interface circuit, comprising: a plurality of buffer means for storing write data input from the control device and a write address thereof; a determination means for determining continuity of the write addresses stored in the plurality of buffer means; When the determination means determines that there is no more continuity in the write address, a command generation means that generates and outputs a write command with the first write address stored in the plurality of buffer means as a start address so far, An SDRAM interface circuit, comprising: write data output means for sequentially outputting the write data stored in the plurality of buffer means at a predetermined timing after the output of the write command.
【請求項5】 制御装置からのライトアクセスをカウン
トするライトカウンタ手段をさらに具備し、コマンド生
成手段は前記ライトカウンタ手段によるカウント値およ
びSDRAMのバースト長から前記カウント値に最適な
バースト長を求め、変更するコマンドを生成、出力する
ことを特徴とする請求項4記載のSDRAMインターフ
ェイス回路。
5. A write counter means for counting write accesses from a control device, wherein the command generation means obtains an optimum burst length for the count value from the count value of the write counter means and a burst length of the SDRAM. 5. The SDRAM interface circuit according to claim 4, wherein a command to change is generated and output.
【請求項6】 制御装置からのライトアクセスをカウン
トするライトカウンタ手段と、前記ライトカウンタ手段
によるカウント値を超えるライトデータを保存するバッ
ファ手段からのライトデータの出力をマスクする出力制
御手段と、をさらに具備することを特徴とする請求項4
または請求項5記載のSDRAMインターフェイス回
路。
6. A write counter means for counting write accesses from a control device, and an output control means for masking output of write data from a buffer means for storing write data exceeding a count value of the write counter means. 5. The apparatus according to claim 4, further comprising:
Or the SDRAM interface circuit according to claim 5.
【請求項7】 リフレッシュタイミングの間隔を自ら測
定し、コマンド生成手段へリフレッシュのタイミングを
通知するリフレッシュサイクルカウント手段をさらに具
備し、コマンド生成手段は前記通知があったならばリフ
レッシュコマンドを生成、出力してSDRAMにリフレ
ッシュを実行させることを特徴とする請求項1から請求
項6のいずれかに記載のSDRAMインターフェイス回
路。
7. A refresh cycle counting means for measuring a refresh timing interval by itself and notifying the command generation means of a refresh timing, wherein the command generation means generates and outputs a refresh command when the notification is received. 7. The SDRAM interface circuit according to claim 1, wherein the SDRAM performs a refresh operation by performing a refresh operation.
【請求項8】 SDRAMのモードレジスタの設定内容
を保持する設定保持手段をさらに具備し、コマンド生成
手段はその設定内容に従ってモードセットコマンドを生
成および出力して前記モードレジスタを設定することを
特徴とする請求項1から請求項7のいずれかに記載のS
DRAMインターフェイス回路。
8. An SDRAM further comprising setting holding means for holding the setting contents of a mode register, wherein the command generating means generates and outputs a mode set command according to the setting contents to set the mode register. S according to any one of claims 1 to 7,
DRAM interface circuit.
【請求項9】 制御装置からの入力アドレスに基づいて
SDRAMでのアドレッシングシーケンスでアドレスの
繰り上がり無視が生じるか否か判定し、アドレスの繰り
上がり無視が生じる場合前記コマンド生成手段に対して
コマンドの再生成を指示するコマンド再生成判定手段を
さらに具備することを特徴とする請求項1から請求項8
のいずれかに記載のSDRAMインターフェイス回路。
9. It is determined whether or not address carry-over is ignored in an addressing sequence in an SDRAM based on an input address from a control device. 9. The apparatus according to claim 1, further comprising a command regeneration determination unit for instructing regeneration.
The SDRAM interface circuit according to any one of the above.
【請求項10】 制御装置からの信号に基づいてSDR
AMを制御するSDRAM制御方法であって、 前記制御装置から入力された読み出しアドレスを保存
し、前記保存した読み出しアドレスの連続性を判定し、
前記判定手段が前記読み出しアドレスにそれ以上連続性
がないと判定した場合にそこまでに保存した最初の読み
出しアドレスを開始アドレスとするリードコマンドを生
成および出力し、前記リードコマンドに応じて前記SD
RAMから入力されたリードデータを前記制御装置へ出
力するリードデータ出力することを特徴とするSDRA
M制御方法。
10. An SDR based on a signal from a control device.
An SDRAM control method for controlling an AM, wherein a read address input from the control device is stored, and continuity of the stored read address is determined.
If the determination means determines that the read address is no longer continuous, a read command is generated and output starting from the first read address stored so far, and the SD command is generated in response to the read command.
SDRA for outputting read data inputted from a RAM to said control device.
M control method.
【請求項11】 制御装置からのリードアクセスをカウ
ントし、そのカウント値およびSDRAMのバースト長
から前記カウント値に最適なバースト長を求め、変更す
るコマンドを生成、出力することを特徴とする請求項1
0記載のSDRAM制御方法。
11. A read access from a control device is counted, a burst length optimal for the count value is obtained from the count value and a burst length of the SDRAM, and a command for changing is generated and output. 1
0 SDRAM control method.
【請求項12】 制御装置からのリードアクセスをカウ
ントし、そのカウント値を超えるリードデータがSDR
AMから入力された場合当該リードデータを複数のデー
タバッファ手段に保存することなく破棄することを特徴
とする請求項10または請求項11記載のSDRAM制
御方法。
12. A read access from the control device is counted, and read data exceeding the count value is sent to the SDR.
12. The SDRAM control method according to claim 10, wherein when read from the AM, the read data is discarded without being stored in a plurality of data buffer means.
【請求項13】 制御装置からの信号に基づいてSDR
AMを制御するSDRAM制御方法であって、 前記制御装置から入力されたライトデータおよびその書
き込みアドレスを保存し、前記保存した書き込みアドレ
スの連続性を判定し、前記書き込みアドレスにそれ以上
連続性がないと判定した場合にそこまでに保存した最初
の書き込みアドレスを開始アドレスとするライトコマン
ドを生成し、出力し、前記ライトコマンド出力後所定の
タイミングで前記保存したライトデータを順次出力する
ことを特徴とするSDRAM制御方法。
13. An SDR based on a signal from a control device.
An SDRAM control method for controlling an AM, comprising: storing write data input from the control device and a write address thereof; determining continuity of the stored write address; and determining that the write address has no further continuity. Generating a write command with the first write address stored so far as a start address, outputting the write command, and sequentially outputting the stored write data at a predetermined timing after the output of the write command. SDRAM control method.
【請求項14】 制御装置からのライトアクセスをカウ
ントし、そのカウント値およびSDRAMのバースト長
から前記カウント値に最適なバースト長を求め、変更す
るコマンドを生成、出力することを特徴とする請求項1
3記載のSDRAM制御方法。
14. The method according to claim 1, wherein a write access from the control device is counted, a burst length optimum for the count value is obtained from the count value and a burst length of the SDRAM, and a command for changing the burst length is generated and output. 1
3. The SDRAM control method according to 3.
【請求項15】 制御装置からのライトアクセスをカウ
ントし、そのカウント値を超えるライトデータの出力を
マスクすることを特徴とする請求項13または請求項1
4記載のSDRAM制御方法。
15. The method according to claim 13, wherein write accesses from the control device are counted, and output of write data exceeding the count value is masked.
5. The SDRAM control method according to 4.
【請求項16】 リフレッシュタイミングの間隔を自ら
測定し、リフレッシュのタイミングにリフレッシュコマ
ンドを生成、出力してSDRAMにリフレッシュを実行
させることを特徴とする請求項10から請求項15のい
ずれかに記載のSDRAM制御方法。
16. The method according to claim 10, wherein the refresh timing interval is measured by itself, and a refresh command is generated and output at the refresh timing to cause the SDRAM to execute the refresh. SDRAM control method.
【請求項17】 SDRAMのモードレジスタの設定内
容を保持し、その設定内容に従ってモードセットコマン
ドを生成および出力して前記モードレジスタを設定する
ことを特徴とする請求項10から請求項16のいずれか
に記載のSDRAM制御方法。
17. The mode register according to claim 10, wherein the mode register of the SDRAM is held, and a mode set command is generated and output in accordance with the set content to set the mode register. 3. The SDRAM control method according to 1.
【請求項18】 制御装置からの入力アドレスに基づい
てSDRAMでのアドレッシングシーケンスでアドレス
の繰り上がり無視が生じるか否か判定し、アドレスの繰
り上がり無視が生じる場合コマンドを再生成および出力
することを特徴とする請求項10から請求項17のいず
れかに記載のSDRAM制御方法。
18. A method of determining whether address carry-over is ignored in an addressing sequence in an SDRAM based on an input address from a control device, and regenerating and outputting a command when address carry-over is ignored. 18. The SDRAM control method according to claim 10, wherein:
【請求項19】 原稿画像を走査して読み取られた画像
データと、前記画像データに対応する走査位置とを順次
入力し、走査位置に基づいて前記画像データをSDRA
Mに格納する画像処理装置であって、重複して走査する
重なり走査領域内の、前記画像データと前記SDRAM
に格納された格納データとから前記走査位置の位置ずれ
を検出し、前記位置ずれを補正する補正値を出力する位
置ずれ検出手段と、前記補正値に基づいて前記走査位置
を補正する補正手段と、補正された走査位置に基づいて
前記画像データを前記SDRAMに格納する写像手段
と、を具備し、前記位置ずれ補正手段および/または前
記写像手段と前記SDRAMとを接続する請求項1から
請求項9のいずれかに記載のSDRAMインターフェイ
ス回路を備えていることを特徴とする画像処理装置。
19. An image data read by scanning a document image and a scanning position corresponding to the image data are sequentially input, and the image data is converted to an SDRA based on the scanning position.
An image processing apparatus for storing the image data and the SDRAM in an overlapping scanning area for performing overlapping scanning.
A position shift detecting unit that detects a position shift of the scanning position from the stored data stored therein, and outputs a correction value for correcting the position shift, and a correction unit that corrects the scanning position based on the correction value. And mapping means for storing the image data in the SDRAM based on the corrected scanning position, and connecting the position shift correcting means and / or the mapping means to the SDRAM. An image processing apparatus comprising the SDRAM interface circuit according to any one of claims 9 to 13.
JP2000304606A 2000-10-04 2000-10-04 Sdram interface circuit and sdram control method and image processor equipped with the same sdram interface circuit Pending JP2002108700A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000304606A JP2002108700A (en) 2000-10-04 2000-10-04 Sdram interface circuit and sdram control method and image processor equipped with the same sdram interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000304606A JP2002108700A (en) 2000-10-04 2000-10-04 Sdram interface circuit and sdram control method and image processor equipped with the same sdram interface circuit

Publications (1)

Publication Number Publication Date
JP2002108700A true JP2002108700A (en) 2002-04-12

Family

ID=18785623

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000304606A Pending JP2002108700A (en) 2000-10-04 2000-10-04 Sdram interface circuit and sdram control method and image processor equipped with the same sdram interface circuit

Country Status (1)

Country Link
JP (1) JP2002108700A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006003693A1 (en) * 2004-06-30 2006-01-12 Renesas Technology Corp. Data processor
JP5330409B2 (en) * 2008-11-28 2013-10-30 パナソニック株式会社 MEMORY CONTROL DEVICE, DATA PROCESSOR, AND DATA READING METHOD
KR20200122862A (en) * 2019-04-19 2020-10-28 삼성전기주식회사 Ois device and communication method thereof with improved spi communication efficiency

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006003693A1 (en) * 2004-06-30 2006-01-12 Renesas Technology Corp. Data processor
JP5330409B2 (en) * 2008-11-28 2013-10-30 パナソニック株式会社 MEMORY CONTROL DEVICE, DATA PROCESSOR, AND DATA READING METHOD
KR20200122862A (en) * 2019-04-19 2020-10-28 삼성전기주식회사 Ois device and communication method thereof with improved spi communication efficiency
KR102586073B1 (en) 2019-04-19 2023-10-05 삼성전기주식회사 Ois device and communication method thereof with improved spi communication efficiency

Similar Documents

Publication Publication Date Title
US20040064606A1 (en) Memory system allowing fast operation of processor while using flash memory incapable of random access
JP2970529B2 (en) Image processing device
US20080034132A1 (en) Memory interface for controlling burst memory access, and method for controlling the same
US6272583B1 (en) Microprocessor having built-in DRAM and internal data transfer paths wider and faster than independent external transfer paths
US20040068590A1 (en) Data processor
JP2002108700A (en) Sdram interface circuit and sdram control method and image processor equipped with the same sdram interface circuit
US6292853B1 (en) DMA controller adapted for transferring data in two-dimensional mapped address space
JP2001282704A (en) Device, method and system for processing data
JP3800164B2 (en) Information processing device, information storage device, information processing method, and information processing program
JP7468112B2 (en) INTERFACE CIRCUIT AND METHOD FOR CONTROLLING INTERFACE CIRCUIT - Patent application
US5916311A (en) Bus controller and information processing device providing reduced idle cycle time during synchronization
US20060050992A1 (en) Image processing device and image processing method
JP3457628B2 (en) CPU system and peripheral LSI
US6493775B2 (en) Control for timed access of devices to a system bus
JPH0140432B2 (en)
JP2005141682A (en) High-speed memory access control device
KR100454652B1 (en) Main storage of highly pipelined bus system on multiprocessor system using shared memory
JP2001160001A (en) Semiconductor integrated circuit and method for synchronizing inter-chip storage part
JP3565603B2 (en) Microcontroller system and microcontroller
JPH07105081A (en) Method for controlling access of synchronous dram and device therefor
JP2003177957A (en) Memory control circuit
JP2719589B2 (en) One-chip semiconductor storage device
JP2570271B2 (en) Semiconductor memory controller
JP3389152B2 (en) DRAM control circuit
JPH0797814B2 (en) Memory controller