JP3700561B2 - Buffer control device - Google Patents
Buffer control device Download PDFInfo
- Publication number
- JP3700561B2 JP3700561B2 JP2000260398A JP2000260398A JP3700561B2 JP 3700561 B2 JP3700561 B2 JP 3700561B2 JP 2000260398 A JP2000260398 A JP 2000260398A JP 2000260398 A JP2000260398 A JP 2000260398A JP 3700561 B2 JP3700561 B2 JP 3700561B2
- Authority
- JP
- Japan
- Prior art keywords
- memory
- buffer
- empty
- control circuit
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Information Transfer Systems (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、マイコンと周辺回路とのデータ転送速度の速度差を吸収するためのバッファ回路に対して、特にダブルバッファ構成の場合に適用して好適なバッファ制御装置に関する。
【0002】
【従来の技術】
フラッシュメモリカード等を用いる機器では、カードとマイコンとの間でデータ転送を行うインターフェース回路が必要になる。一般にバス幅も小さく転送速度の遅いメモリカードに対して、アプリケーションも実行するマイコンは高速な場合が多い。低速なメモリカードとのデータ転送によって機器全体の能力低下を招いてしまわないように、インターフェース回路では転送速度差を吸収するためのバッファが設けられているのが普通である。
【0003】
まず、従来のシングルバッファ構成のインターフェース回路について説明する。図5はシングルバッファ構成のバッファ制御部を示すブロック図である。図5において、システムバス(system bus)1はアドレス、データ、リード・ライト信号、割り込み信号等からなるホストマイコンの外部バスであり、ホストインターフェース(Host I/F)2はシステムバス1のアドレスデコード、リードライトタイミング調整などを行って第1の制御回路であるホストマイコン(図示せず)の書き込みや読み出しに従ってメモリ4にアクセスする論理回路であり、周辺回路インターフェース3はメモリカードなどと送受信するデータをメモリ4に読み書きする第2の制御回路であり、メモリ4は転送速度吸収用のバッファであり、監視部5は第1の制御回路であるホストマイコン側のアクセスと第2の制御回路である周辺回路インターフェース3経由のアクセスをモニタし、メモリ4に一時記憶されているデータ量を監視し、フル(Full)/エンプティ(Empty)信号を出力する論理回路である。
【0004】
以上のような構成でデータ転送を行う場合のバッファの状態遷移を図6に示す。まずホストマイコンは、バッファの初期化をハードウェアに指示し、バッファを空の状態(1)にした後、周辺回路インターフェース3にデータ転送を指示する。これにより周辺回路インターフェース3は状態(2)に示すようにバッファにデータを書き込みはじめ、状態(3)のようにバッファが一杯になった時点で書き込みを中断する。このとき監視部5はメモリの満杯を検知しFull信号を出力し、割り込み信号IRQが発生する。これによりホストマイコンはバッファが満杯であることを確認し、状態(4)のようにホストマイコンがホストインターフェース2を介してデータ読み出しを開始し、状態(5)のようにバッファが空になるまで読み出し続ける。メモリ4が空になると周辺回路インターフェース3は次のデータ書き込みを再開する。
【0005】
以上の動作を繰り返すことで周辺回路からのデータはホストマイコン側に順次転送される。つまり、メモリへの書き込みと読み出しを時間的に区分して、周辺回路がゆっくりと書き込んだ後に、ホストマイコンが素早く連続的に読み出すことで速度差を吸収するものである。ホストマイコン側からデータを順次周辺回路側に送る場合は逆の動作となり、ホストマイコンが素早く連続的に書き込んだ後に、ゆっくりと周辺回路が読み出せばよい。このような状態遷移は外部の制御回路であるホストマイコンと周辺回路がバッファメモリの記憶データ量を検知することで容易に実現できる。周辺回路からホストマイコンへの転送の場合は、メモリ4が空になると周辺回路が書き込み、ホストマイコンは一杯になると読み出しを行う。ホストマイコンから周辺回路への転送の場合は、ホストマイコンはメモリ4が空になると書き込みを行い、一杯になると周辺回路が読み出しを行うという具合である。
【0006】
以上のようなシングルバッファ構成に対して転送効率をさらに向上させる目的でバッファメモリを2重化したダブルバッファ構成のインターフェース回路も存在する。図7にダブルバッファ構造のインターフェース回路のブロック図を示す。図7においてシステムバス1、ホストインターフェース2、周辺回路3は前記シングルバッファ構成の場合と同一であり、メモリ41、42が転送速度吸収用の2面構成のバッファ、監視部51、52は第1の制御回路であるホストマイコン側のアクセスと第2の制御回路である周辺回路のアクセスをモニタし、メモリ41、42にそれぞれ一時記憶されているデータ量を監視する論理回路である。
切換器6、7はホストマイコン側のアクセスと周辺回路側のアクセスをそれぞれメモリ41、42に接続切り換えする切換器である。
【0007】
以上のような構成でデータ転送を行う場合のバッファの切り換えについて説明する。まずホストマイコンは2つのバッファメモリが空の状態を確認した後に、周辺回路3にデータ転送を指示する。周辺回路3は書き込みモードの場合には2つのメモリの記憶量を検知して空のメモリがあれば切換器7を制御して空のメモリに接続して一杯になるまでデータを書き込む。一方、ホストインターフェース2は2つのメモリの記憶量を検知してどちらかのメモリが満杯になればシングルバッファ構成と同様に割り込み信号を生成する。ホストマイコンはこの割り込みをきっかけに切換器6を制御して満杯のメモリに接続するとともに、そのメモリのデータを読み出す。
【0008】
以上の動作を繰り返すことで周辺回路からのデータはホストマイコン側に順次転送される。つまり、ダブルバッファ化により、ホストの読み出し動作と周辺回路3の書き込み動作が同時に行われておりシングルバッファ構成に比べてより転送効率が向上するものである。このような状態遷移はホストマイコンおよび周辺回路が2つのバッファメモリの記憶データ量を検知することで実現されている。
周辺回路からホストマイコンへの転送の場合は、2つメモリのどちらかが空になると周辺回路3が書き込み、ホストマイコンはどちらかが一杯になると読み出しを行う。ホストマイコンから周辺回路への転送の場合は、ホストマイコンはメモリのどちらかが空になると書き込みを行い、どちらかが一杯になると周辺回路3が読み出すという具合である。
【0009】
【発明が解決しようとする課題】
しかしながら前記のダブルバッファ構成においては、メモリの切り替え制御に代表されるようにホストマイコンはシングルバッファ構成と明らかに異なるメモリ制御を行わなければならないという課題を有している。周辺回路においても同様にダブルバッファ構成専用の回路構成が必要である。つまり、バッファメモリへのアクセスを行う外部の制御回路(ホストマイコンも含む)はシングルバッファ用とダブルバッファ用と別々に用意する必要が生じてしまうという課題を有している。
【0010】
シングルバッファ構成とダブルバッファ構成は性能とコストのトレードオフ関係にある。性能を重視してダブルバッファ化すればコストも上がるため、機器の使用目的によってどのような構成とするかを選択すべきである。バッファ以外の回路やソフトウェアも別途用意するのではさらにコスト高の要因となってしまうため、ホストマイコンのソフトウェアも含めた外部制御回路は全く共通のまま、機器の使用目的に合わせてバッファ部分のみを変更するだけで最適なシステム構成を構築できることが望ましい。
【0011】
本発明は前記課題に鑑み、バッファにアクセスする外部制御回路にとってはシングルバッファ構成もダブルバッファ構成も全く区別する必要がないバッファ制御回路を提供することを目的とする。
【0012】
【課題を解決するための手段】
この課題を解決するために本発明のバッファ制御装置は、一方のメモリに既にデータが満たされた状態でかつ他方のメモリが空になった時点で接続先を入れ替えるか、あるいは一方のメモリが既に空の状態で他方のメモリにデータが満たされた時点で接続先を入れ替えるか、あるいは一方のメモリにデータが満たされると同時に、他方のメモリは空になった時点で接続先を入れ替える接続切換手段と、満杯や空などの記憶状態を示す信号のうち、一つのメモリの状態信号を選択する情報選択手段とを備えたものである。
【0013】
【発明の実施の形態】
本発明の第1の発明は、書き込み側の制御回路が、バッファメモリの記憶データ量を検知しながら記憶状態が空であることを示す状態信号に応じてバッファメモリにデータを書き込み、読み出し側の制御回路が、バッファメモリの記憶データ量を検知しながら記憶状態が満杯であることを示す状態信号に応じてバッファメモリからデータ読み出し、それを繰り返してブロックデータを伝送するバッファ制御において、二つのバッファメモリで構成される一時記憶用のダブルバッファメモリのそれぞれが満杯であるか空であるかの記憶状態に対応して、前記書き込み側の制御回路に接続するバッファメモリと前記読み出し側の制御回路に接続するバッファメモリとを入れ替える接続切換手段と、前記書き込み側の制御回路に対して記憶状態が満杯であるか空であるかを通知する状態信号と、前記読み出し側の制御回路に対して記憶状態が満杯であるか空であるかを通知する状態信号とを、前記接続切換手段の切り替え動作に合わせて、一方のバッファメモリの状態信号から他方のバッファメモリの状態信号に互いに切り替える情報選択手段とを備え、前記書き込み側の制御回路および前記読み出し側の制御回路に対して、どちらか一方のバッファメモリの記憶状態が満杯であるか空であるかを示す状態信号を通知し、かつ前記どちらか一方のバッファメモリだけをアクセスできるように接続することにより、前記書き込み側の制御回路および前記読み出し側の制御回路は、バッファメモリの記憶状態が満杯であるか空であるかを示す状態信号に応じて、空になると書き込み側が書き込み、満杯になると読み出し側が読み出すという単一バッファメモリの場合と全く同じ伝送規則によって、ダブルバッファメモリに対しても書き込みあるいは読み出しが可能なものである。
【0014】
また、本発明の第2の発明は、第1の発明に加え、2つのメモリで構成されるダブルバッファメモリであって、前記接続切換手段は一方のメモリに既にデータが満たされた状態でかつ他方のメモリが空になった時点で接続先を入れ替えるか、あるいは一方のメモリが既に空の状態で他方のメモリにデータが満たされた時点で接続先を入れ替えるか、あるいは一方のメモリにデータが満たされると同時に、他方のメモリが空になった時点で接続先を入れ替えるものである。
【0015】
また、本発明の第3の発明は、第1の発明に加え、2つのメモリで構成されるダブルバッファメモリであって、前記接続切換手段は書き込み時においては接続しているメモリが満杯になった時点で他方のメモリに切り換えをおこない、読み出し時においては接続しているメモリが空になった時点で他方のメモリに切り換えを行うものである。
【0016】
また、本発明の第4の発明は、第1の発明に加え、前記情報選択手段は、残留転送量がメモリ容量を越える転送状態では接続されているメモリの状態信号を選択し、残留転送量がメモリ容量以下である転送状態では、読み出しメモリの状態信号を選択可能なものである。
【0017】
また、本発明の第5の発明は、第1の発明に加え、前記接続切換手段にて接続を入れ替えたタイミングで外部制御回路に割り込み要求信号などのイベント信号を発生するものである。
【0019】
以下、本発明の実施の形態について、図面を用いて説明する。
【0020】
(実施の形態1)
図1は本発明の実施の形態1によるバッファ制御装置の構成を示すブロック図である。従来例と構成が同じものには同一符号を付け説明を省略する。
【0021】
図1において、切換検出器8は2つのバッファメモリの記憶状態からバッファメモリの切り換え信号を生成する回路、切換器9、10は2つのバッファメモリの記憶状態信号から一つを選択して外部の制御回路であるホストマイコン側と周辺回路側に受け渡すスイッチ回路である。
【0022】
以上のような構成でのバッファメモリの切り換え制御について、図2のバッファメモリの状態遷移を使って説明する。まずホストマイコンはバッファの初期化をハードウェアに指示し、両方のバッファを空の状態(1)にする。この初期化にてメモリ接続は例えば図2状態(1)に示すように周辺回路側のアクセスがメモリ41に、ホストマイコン側のアクセスがメモリ42に接続される。
【0023】
次にホストマイコンは周辺回路3にデータ転送を指示し、状態(2)に示すように周辺回路3がメモリにデータを書き込みはじめ、状態(3)のようにバッファが一杯になった時点で周辺回路3は書き込みを中断する。このとき、切換検出器8はメモリ42が空の状態の時にメモリ41が満杯になったことを検出してメモリの接続関係を反対にする。つまり、図2状態(3)から状態(4)への遷移に示すように、周辺回路側の接続はメモリ41からメモリ42に切り替わり、その状態信号も切換器10によってメモリ41の満杯状態からメモリ42の空状態に切り替わる。よって周辺回路3はメモリが空であると認識しデータの書き込みを再開し、状態(5)のようにメモリ42にデータを書き込んでいく。
【0024】
一方、状態(3)から状態(4)への遷移においてホストマイコン側に接続されるメモリもメモリ42からメモリ41に切り換わり、メモリの記憶状態を示す信号も切換器9によってメモリ42の空状態からメモリ41の満杯状態に切り換わる。この満杯状態への変化により割り込み信号IRQが発生する。なお、切換信号により直接割り込み信号を生成してもよい。
【0025】
この割り込みをきっかけにホストマイコンはバッファが満杯であることを確認し、これにより状態(5)のようにホストマイコンがホストインターフェース2を介してデータ読み出しを開始する。このように状態(5)では周辺回路からの書き込みとホストマイコンからの読み出しが同時に実行できる。
【0026】
次の状態(6)は周辺回路3からの書き込みの方が先に終了してメモリ42が満杯になった場合を示している。この場合はまだメモリ41が空でないのでメモリ接続の入れ替えは起こらず、周辺回路3は書き込みを中断した状態となり、状態(7)から状態(8)の遷移に示すようにメモリ41が空になった時点でメモリ接続の入れ替えが発生する。この入れ替えにより、前記の入れ替えと同様に周辺回路はメモリが空になったと判断し、ホストマイコンは一杯になったと判断することでデータ転送を続けることになる。
【0027】
以上の動作を繰り返すことで周辺回路からのデータはホストマイコン側に順次転送される。ホストマイコン側からデータを順次周辺回路側に送る場合は逆の動作となるだけである。
【0028】
このような状態遷移は外部の制御回路であるホストマイコンと周辺回路が前記のシングルバッファ構成と全く同じにバッファメモリの記憶データ量を検知しながら、空になると書き込み、一杯になると読み出すというものであり、ダブルバッファとして特別な判断は全くない。
【0029】
以上のように本実施の形態によれば、バッファメモリの接続切り替えを適切な条件で行うと同時に、切り替えに合わせてバッファアクセス制御に必要なメモリ記憶状態を示す信号も切り換えて外部制御回路にインターフェースすることにより、シングルバッファ構成と全く同じ外部制御回路でダブルバッファ構成を実現できる。
【0030】
なお、本実施の形態では、ホストマイコン側と周辺回路側の2つの切換器を同時かつ互いに切り換える方法で説明したが、それぞれが独立に一杯になったらあるいは空になったら接続を切り換えることでも同様の効果が得られる。
【0031】
また本実施の形態では、ホストマイコンなどの外部制御回路のデータ転送終了時の動作について特に触れてはいないが、ホストマイコンや周辺回路の構成によっては、転送が終了した事を認識する必要があることも想定される。例えば、バッファメモリに書き込んだ最後のデータを受け取り先が読み出したことを検出することにより転送終了とし、次の動作に移行するきっかけとする事などが考えられる。外部の制御回路がこのような構成でもシングルバッファ構成の場合は、接続されるメモリが固定されているので、書き込み側で空の状態を検出すれば全てのデータが転送されたことに等しくなる。しかし、ダブルバッファ構成の時は本実施例の構成のままシングルバッファと同じ判断をしてしまうと、バッファメモリの接続が切り替わってしまうので、読み出し側が最後のデータを読み出したかどうかは書き込み側の接続メモリの残量を見ても判断できない。そこで、図3に示すように最終転送時には記憶状態信号を選択するスイッチ回路9、10が反転しないように制御する最終制御部11を設けることで解決される。なお、他の構成は、図1に示したものと同様である。
【0032】
これにより、図4(7)から(8)に示す状態遷移においてメモリの接続先は入れ替えるものの記憶状態信号は図中の点線で示すように読み出し動作側が接続しているメモリの状態信号が選択される。これにより最後に書き込んだデータが読み出されて2つのバッファメモリが全て空になった図4状態(10)を外部制御回路であるホストマイコンも周辺回路も認知することができる。
【0033】
【発明の効果】
以上のように本発明によれば、バッファメモリの接続切り替えを適切な条件で行うと同時に、切り替えに合わせてバッファアクセス制御に必要なメモリ記憶状態を示す信号も切り換えて外部制御回路にインターフェースすることにより、シングルバッファ構成であるかダブルバッファ構成であるかを意識することなく正しいメモリアクセス制御を行うことができ、システム全体の要求仕様に好適なバッファ構成をメモリ部のみの変更で簡単に実現でき、その効果は大きい。
【図面の簡単な説明】
【図1】本発明の実施の形態によるバッファ制御装置の構成を示すブロック図
【図2】同バッファ制御装置のバッファ状態の遷移を示す模式図
【図3】転送終了判断を考慮したバッファ制御装置の構成を示すブロック図
【図4】転送終了判断を行う場合のバッファ状態の遷移を示す模式図
【図5】従来のシングルバッファ構成のバッファ制御装置を示すブロック図
【図6】従来のシングルバッファ構成のバッファ状態の遷移を示す模式図
【図7】従来のダブルバッファ構成のバッファ制御装置を示すブロック図
【符号の説明】
1 システムバス
2 ホストインターフェース
3 周辺回路インターフェース
4、41、42 バッファメモリ
5、51、52 監視部
6、7 切換器
8 切換検出器
9、10 スイッチ回路
11 最終転送制御部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a buffer control device suitable for a buffer circuit for absorbing a data transfer speed difference between a microcomputer and a peripheral circuit, particularly when applied to a double buffer configuration.
[0002]
[Prior art]
An apparatus using a flash memory card or the like requires an interface circuit for transferring data between the card and the microcomputer. In general, microcomputers that execute applications are often faster than memory cards with smaller bus widths and slower transfer speeds. The interface circuit is usually provided with a buffer for absorbing the transfer speed difference so that the performance of the entire device is not reduced by data transfer with a low-speed memory card.
[0003]
First, a conventional interface circuit having a single buffer configuration will be described. FIG. 5 is a block diagram showing a buffer control unit having a single buffer configuration. In FIG. 5, a
[0004]
FIG. 6 shows the state transition of the buffer when data transfer is performed with the above configuration. First, the host microcomputer instructs the hardware to initialize the buffer, sets the buffer to an empty state (1), and then instructs the
[0005]
By repeating the above operation, data from the peripheral circuit is sequentially transferred to the host microcomputer side. In other words, writing to and reading from the memory is divided in terms of time, and after the peripheral circuit writes slowly, the host microcomputer reads it quickly and continuously to absorb the speed difference. When data is sequentially sent from the host microcomputer side to the peripheral circuit side, the operation is reversed, and the peripheral circuit only needs to read the peripheral circuit slowly after the host microcomputer writes it quickly and continuously. Such state transition can be easily realized by detecting the amount of data stored in the buffer memory by the host microcomputer and the peripheral circuit which are external control circuits. In the case of transfer from the peripheral circuit to the host microcomputer, the peripheral circuit writes when the
[0006]
There is also an interface circuit having a double buffer configuration in which buffer memories are duplicated for the purpose of further improving transfer efficiency with respect to the single buffer configuration as described above. FIG. 7 shows a block diagram of an interface circuit having a double buffer structure. In FIG. 7, the
[0007]
A description will be given of buffer switching when data transfer is performed with the above configuration. First, after confirming that the two buffer memories are empty, the host microcomputer instructs the
[0008]
By repeating the above operation, data from the peripheral circuit is sequentially transferred to the host microcomputer side. That is, the double buffering allows the host read operation and the
In the case of transfer from the peripheral circuit to the host microcomputer, the
[0009]
[Problems to be solved by the invention]
However, the double buffer configuration has a problem that the host microcomputer has to perform memory control that is clearly different from the single buffer configuration, as represented by memory switching control. Similarly, the peripheral circuit requires a circuit configuration dedicated to the double buffer configuration. That is, there is a problem that an external control circuit (including a host microcomputer) that accesses the buffer memory needs to be prepared separately for the single buffer and the double buffer.
[0010]
The single buffer configuration and the double buffer configuration are in a trade-off relationship between performance and cost. Since the cost increases if the double buffer is made with emphasis on performance, the configuration should be selected according to the purpose of use of the device. If a circuit and software other than the buffer are prepared separately, it becomes a factor of higher cost, so the external control circuit including the host microcomputer software remains completely the same, and only the buffer part is used according to the purpose of use of the device. It is desirable to be able to construct an optimal system configuration simply by changing.
[0011]
An object of the present invention is to provide a buffer control circuit that does not require any distinction between a single buffer configuration and a double buffer configuration for an external control circuit that accesses a buffer.
[0012]
[Means for Solving the Problems]
In order to solve this problem, the buffer control device of the present invention replaces the connection destination when one memory is already filled with data and the other memory becomes empty, or one of the memories already has Connection switching means for switching the connection destination when the other memory is filled with data in an empty state, or for switching the connection destination when the other memory is empty at the same time that one memory is filled with data And information selection means for selecting one memory state signal from among the signals indicating the storage state such as full or empty.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
The first aspect of the present invention, the control circuit of the write side writes the data into the buffer memory in response to the state signal indicating that the memory state while detecting the stored data amount in the buffer memory is empty, the read side of the control circuit, the read buffer memory or La Defense over data in response to the state signal indicating that the memory state is full while detecting stored data amount in the buffer memory, the buffer control for transmitting block data by repeating it The buffer memory connected to the control circuit on the write side and the read corresponding to the storage state of each of the double buffer memories for temporary storage composed of two buffer memories being full or empty a connection switching means for switching the buffer memory connected to the control circuit side, the storage state is fully to the control circuit of the write side And a status signal for notifying the read-side control circuit whether the storage state is full or empty for the switching operation of the connection switching means. In addition, there is provided information selection means for switching from the status signal of one buffer memory to the status signal of the other buffer memory , and either one of the buffers for the control circuit on the write side and the control circuit on the read side The control circuit on the write side and the read side are connected by notifying a state signal indicating whether the storage state of the memory is full or empty, and connecting only one of the buffer memories. the control circuit of the storage state of the buffer memory in response to the state signal indicating either empty or full, the write side writes emptied write , By exactly the same transmission rules as a single buffer memory of the read side becomes full it reads, but also capable of writing or reading from the double buffer memory.
[0014]
The second invention of the present invention is a double buffer memory comprising two memories in addition to the first invention, wherein the connection switching means is in a state where one memory is already filled with data and When the other memory becomes empty, the connection destination is changed, or when one memory is already empty and the other memory is filled with data, the connection destination is changed, or data is stored in one memory. At the same time, the connection destination is switched when the other memory becomes empty.
[0015]
The third invention of the present invention is a double buffer memory composed of two memories in addition to the first invention, wherein the connection switching means fills up the connected memory at the time of writing. When switching, the other memory is switched, and at the time of reading, switching to the other memory is performed when the connected memory becomes empty.
[0016]
According to a fourth aspect of the present invention, in addition to the first aspect, the information selecting means selects a status signal of the connected memory in a transfer state where the residual transfer amount exceeds the memory capacity, and the residual transfer amount In the transfer state in which is less than the memory capacity, the state signal of the read memory can be selected.
[0017]
According to a fifth aspect of the present invention, in addition to the first aspect, an event signal such as an interrupt request signal is generated in the external control circuit at the timing when the connection is switched by the connection switching means.
[0019]
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0020]
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration of a buffer control apparatus according to
[0021]
In FIG. 1, a switching
[0022]
The switching control of the buffer memory with the above configuration will be described using the state transition of the buffer memory in FIG. First, the host microcomputer instructs the hardware to initialize the buffers, and sets both buffers to an empty state (1). In this initialization, for example, as shown in the state (1) in FIG. 2, the access on the peripheral circuit side is connected to the
[0023]
Next, the host microcomputer instructs the
[0024]
On the other hand, in the transition from the state (3) to the state (4), the memory connected to the host microcomputer side is also switched from the
[0025]
In response to this interrupt, the host microcomputer confirms that the buffer is full, and the host microcomputer starts reading data via the
[0026]
The next state (6) shows a case where the writing from the
[0027]
By repeating the above operation, data from the peripheral circuit is sequentially transferred to the host microcomputer side. When data is sequentially sent from the host microcomputer side to the peripheral circuit side, only the reverse operation is performed.
[0028]
Such a state transition is such that the host microcomputer, which is an external control circuit, and the peripheral circuit detect the amount of data stored in the buffer memory in exactly the same way as in the single buffer configuration, and write when it is empty and read when it is full. There is no special judgment as a double buffer.
[0029]
As described above, according to the present embodiment, the connection of the buffer memory is switched under an appropriate condition, and at the same time, the signal indicating the memory storage state necessary for the buffer access control is switched in accordance with the switching and is interfaced to the external control circuit. By doing so, a double buffer configuration can be realized with the same external control circuit as the single buffer configuration.
[0030]
In the present embodiment, the method of switching the two switches on the host microcomputer side and the peripheral circuit side simultaneously and mutually has been described. However, it is also possible to switch the connection when each becomes independently full or empty. The effect is obtained.
[0031]
In this embodiment, the operation at the end of data transfer of an external control circuit such as a host microcomputer is not particularly mentioned. However, depending on the configuration of the host microcomputer and peripheral circuits, it is necessary to recognize that the transfer has ended. It is also assumed. For example, it can be considered that the end of the transfer is detected by detecting that the recipient has read the last data written in the buffer memory, and that the next operation is started. When the external control circuit has such a configuration but has a single buffer configuration, the memory to be connected is fixed. Therefore, if an empty state is detected on the writing side, all data is transferred. However, in the double buffer configuration, if the same determination as the single buffer is made with the configuration of the present embodiment, the connection of the buffer memory is switched, so whether or not the reading side has read the last data is determined by the connection on the writing side. Cannot be determined by looking at the remaining memory. Accordingly, as shown in FIG. 3, the problem is solved by providing a final control unit 11 that controls the
[0032]
As a result, although the memory connection destination is changed in the state transitions shown in FIGS. 4 (7) to (8), the memory state signal connected to the read operation side is selected as the storage state signal as shown by the dotted line in the figure. The Thereby, the host microcomputer as the external control circuit and the peripheral circuit can recognize the state (10) in FIG. 4 in which the last written data is read and the two buffer memories are all empty.
[0033]
【The invention's effect】
As described above, according to the present invention, buffer memory connection switching is performed under appropriate conditions, and at the same time, a signal indicating a memory storage state necessary for buffer access control is switched to interface with the external control circuit. This makes it possible to perform correct memory access control without being conscious of whether it is a single buffer configuration or a double buffer configuration, and a buffer configuration suitable for the required specifications of the entire system can be easily realized by changing only the memory section. The effect is great.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a buffer control device according to an embodiment of the present invention. FIG. 2 is a schematic diagram showing transition of a buffer state of the buffer control device. FIG. 4 is a schematic diagram showing a transition of a buffer state when a transfer end determination is made. FIG. 5 is a block diagram showing a buffer controller of a conventional single buffer configuration. FIG. 6 is a conventional single buffer. FIG. 7 is a block diagram showing a conventional buffer control device with a double buffer configuration.
DESCRIPTION OF
Claims (5)
二つのバッファメモリで構成される一時記憶用のダブルバッファメモリのそれぞれが満杯であるか空であるかの記憶状態に対応して、前記書き込み側の制御回路に接続するバッファメモリと前記読み出し側の制御回路に接続するバッファメモリとを入れ替える接続切換手段と、
前記書き込み側の制御回路に対して記憶状態が満杯であるか空であるかを通知する状態信号と、前記読み出し側の制御回路に対して記憶状態が満杯であるか空であるかを通知する状態信号とを、前記接続切換手段の切り替え動作に合わせて、一方のバッファメモリの状態信号から他方のバッファメモリの状態信号に互いに切り替える情報選択手段とを備え、
前記書き込み側の制御回路および前記読み出し側の制御回路に対して、どちらか一方のバッファメモリの記憶状態が満杯であるか空であるかを示す状態信号を通知し、かつ前記どちらか一方のバッファメモリだけをアクセスできるように接続することにより、
前記書き込み側の制御回路および前記読み出し側の制御回路は、バッファメモリの記憶状態が満杯であるか空であるかを示す状態信号に応じて、空になると書き込み側が書き込み、満杯になると読み出し側が読み出すという単一バッファメモリの場合と全く同じ伝送規則によって、ダブルバッファメモリに対しても書き込みあるいは読み出しが可能なバッファ制御装置。The control circuit of the write side writes the data into the buffer memory in response to the state signal indicating that the memory state while detecting the stored data amount in the buffer memory is empty, the control circuit of the read side, a buffer memory storage state while detecting the stored amount of data read buffer memory or La Defense over data in response to the state signal indicating that the full, the buffer control for transmitting block data by repeating it,
A buffer memory connected to the control circuit on the writing side and a memory on the reading side corresponding to the storage state of whether each of the double buffer memories for temporary storage composed of two buffer memories is full or empty Connection switching means for replacing the buffer memory connected to the control circuit ;
A status signal for notifying the write-side control circuit whether the storage state is full or empty, and a notification for notifying the read-side control circuit whether the storage state is full or empty. And an information selection means for switching the status signal from the status signal of one buffer memory to the status signal of the other buffer memory in accordance with the switching operation of the connection switching means ,
A status signal indicating whether the storage state of one of the buffer memories is full or empty is notified to the control circuit on the write side and the control circuit on the read side, and the one of the buffers By connecting so that only memory is accessible,
The control circuit on the write side and the control circuit on the read side write according to a state signal indicating whether the storage state of the buffer memory is full or empty, the write side writes when it becomes empty, and the read side reads when it becomes full A buffer controller that can write to or read from a double buffer memory according to the same transmission rule as a single buffer memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000260398A JP3700561B2 (en) | 2000-08-30 | 2000-08-30 | Buffer control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000260398A JP3700561B2 (en) | 2000-08-30 | 2000-08-30 | Buffer control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002073537A JP2002073537A (en) | 2002-03-12 |
JP3700561B2 true JP3700561B2 (en) | 2005-09-28 |
Family
ID=18748415
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000260398A Expired - Fee Related JP3700561B2 (en) | 2000-08-30 | 2000-08-30 | Buffer control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3700561B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112822494A (en) * | 2020-12-30 | 2021-05-18 | 稿定(厦门)科技有限公司 | Double-buffer coding system and control method thereof |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100440405B1 (en) * | 2001-11-19 | 2004-07-14 | 삼성전자주식회사 | Device for controlling output of video data using double buffering |
EP1499961A2 (en) * | 2002-04-30 | 2005-01-26 | Koninklijke Philips Electronics N.V. | Apparatus and method for fetching data from memory |
JP4498038B2 (en) * | 2004-07-06 | 2010-07-07 | 株式会社東芝 | Data acquisition device |
US7420115B2 (en) | 2004-12-28 | 2008-09-02 | Yamaha Corporation | Memory access controller for musical sound generating system |
EP2051170A4 (en) | 2006-07-28 | 2010-04-21 | Nec Corp | Cpu connection circuit, data processing device, operation device, and mobile communication terminal and data transfer method using them |
JP4900299B2 (en) * | 2008-01-30 | 2012-03-21 | オンキヨー株式会社 | Stream playback apparatus, streaming system, and stream playback program |
JP5293233B2 (en) * | 2009-02-03 | 2013-09-18 | 日本電気株式会社 | Data input / output device |
JP5458364B1 (en) * | 2013-03-22 | 2014-04-02 | 株式会社アクセル | Motor control device, motor control method, and game machine |
JP6376876B2 (en) * | 2014-07-24 | 2018-08-22 | キヤノン株式会社 | Information processing apparatus, program, and control method |
-
2000
- 2000-08-30 JP JP2000260398A patent/JP3700561B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112822494A (en) * | 2020-12-30 | 2021-05-18 | 稿定(厦门)科技有限公司 | Double-buffer coding system and control method thereof |
Also Published As
Publication number | Publication date |
---|---|
JP2002073537A (en) | 2002-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100708128B1 (en) | An apparatus and method for controlling nand flash memory | |
US7523235B2 (en) | Serial Advanced Technology Attachment (SATA) switch | |
JP3700561B2 (en) | Buffer control device | |
JP2002009849A (en) | Usb transfer control method and usb controller | |
US20040133708A1 (en) | Virtual endpoint for USB devices | |
JP2002354217A (en) | Method and device for forming image | |
JPH1083372A (en) | Circuit for moving data between remote memories and computer including the circuit | |
WO2006134804A1 (en) | External device access device | |
JP2004206487A (en) | Fifo memory circuit | |
JP2664144B2 (en) | Multiplexing device switching method and device | |
JP4622422B2 (en) | Storage device | |
JP4030951B2 (en) | Data duplication apparatus and method | |
JP2005010966A (en) | Lsi device | |
JP2000295295A (en) | Buffer memory for block data transfer and serial data transmission reception system | |
JPS61233857A (en) | Data transfer equipment | |
JP3531394B2 (en) | Peripherals in half-duplex data transfer systems | |
JP2980163B2 (en) | Data transfer method | |
JP3450392B2 (en) | Interface devices and peripherals | |
JP5166922B2 (en) | Shared bus control device and control method thereof | |
JP2020170448A (en) | Information processing system | |
JPS61201565A (en) | Print control system | |
JPH05233482A (en) | Data transfer system | |
JPH0642227B2 (en) | Data transfer device | |
JPH07306840A (en) | Computer system | |
JPH11120018A (en) | Store buffer control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20041209 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20041214 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050201 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050308 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050411 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20050621 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050704 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090722 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090722 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100722 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110722 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120722 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130722 Year of fee payment: 8 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |