JP4387488B2 - Overflow protection circuit and image transmission apparatus using the same - Google Patents
Overflow protection circuit and image transmission apparatus using the same Download PDFInfo
- Publication number
- JP4387488B2 JP4387488B2 JP10258399A JP10258399A JP4387488B2 JP 4387488 B2 JP4387488 B2 JP 4387488B2 JP 10258399 A JP10258399 A JP 10258399A JP 10258399 A JP10258399 A JP 10258399A JP 4387488 B2 JP4387488 B2 JP 4387488B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- cpu
- wip
- value
- register
- 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 - Lifetime
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明はオーバフロー保護回路及びこれを用いた画像伝送装置に関し、特にデータの書込みと読出しとが非同期に行われる先入れ先出しメモリについてのオーバフローを防止するオーバフロー保護回路及びこれを用いた画像伝送装置に関する。
【0002】
【従来の技術】
一般に、テレビ会議システムにおける画像伝送装置は、図6に示されているように、自局及び他局にそれぞれ設けられる。他局側画像伝送装置Bにおいては、カメラから入力された画像データがAD変換器51でディジタルデータに変換され、前処理部52を経た後、符号化部53で符号化されて送信バッファメモリ54に書込まれる。この書込まれたデータはマルチプレクサ(MUX)55を介して自局側画像伝送装置Aに送られる。自局側画像伝送装置Aでは、デマルチプレクサ(DMUX)40を介して受信バッファメモリ41にデータが書込まれる。そして、復号化部42で復号され、後処理部43を経た後、DA変換部44でアナログデータに変換され、モニタに出力される。
【0003】
また、自局側画像伝送装置Aにおいても、カメラから入力された画像データがAD変換器35でディジタルデータに変換され、前処理部36を経た後、符号化部37で符号化されて送信バッファメモリ38に書込まれる。この書込まれたデータはマルチプレクサ(MUX)39を介して他局側画像伝送装置Bに送られる。他局側画像伝送装置Bでは、デマルチプレクサ(DMUX)46を介して受信バッファメモリ47にデータが書込まれる。そして、復号化部48で復号され、後処理部49を経た後、DA変換部50でアナログデータに変換され、モニタに出力される。
【0004】
以上の映像や音声の符号化データの授受の他、対局を制御するための制御情報等が授受される。画像伝送装置Bでは、リモコン(リモートコントローラ)から入力された制御情報がリモートコントローラレシーバ56に入力され、マルチプレクサ55によって画像データに重畳されて伝送装置Aに伝送される。伝送装置Aでは、デマルチプレクサ40から制御情報が出力され、符号化部37を制御する。
【0005】
一方、画像伝送装置Aでは低速データが低速データ制御部45に入力され、その出力がマルチプレクサ39によって画像データに重畳されて伝送装置Bに伝送される。伝送装置Bでは、デマルチプレクサ46から低速データが出力され、低速データ処理部57を経て出力される。
【0006】
ここで、低速データ制御部45は周知のRS232Cインタフェース等のデータポートであり、この低速データは映像を取込むカメラの制御信号やデータ転送等に使用される。すなわち、自局側伝送装置Aから他局側伝送装置Bに制御信号を伝送し、この制御信号により他局伝送装置Bを制御するのである。
【0007】
低速データ制御部45は、図7に示されているようにシリアルデータをパラレルデータに変換するS/P変換部1と、デュアルポートメモリで構成されるデータFIFO3と、転送データcを書込むための書込み制御回路2と、転送データhを読出し、図6中のMUX39へ出力するCPU4と、CPU4の出力するアドレスをデコードするアドレスデコーダ5とを含んで構成されている。
【0008】
かかる構成において、S/P変換部1は入力されるシリアルデータaについて、パラレルデータcへの変換を行う。変換後のパラレルデータcは、書込み制御回路2からのライトイネーブルd及び書込みアドレスeによってデータFIFO3に書込まれる。
【0009】
また、CPU4から出力される読出しアドレスg,j及びkがアドレスデコーダ5においてデコードされ、デコード後のアドレスiが読出しアドレスgと共ににデータFIFO3に入力される。これにより、データFIFO3に書込まれているデータが、読出しデータhとして読出される。この読出しデータhは、一旦CPU4に入力され、任意の出力ポート40から送出される。
【0010】
しかしながら、この構成では、書込みアドレスeの値が読出しアドレスgの値に追い越され、データFIFO3がオーバフローを起こすという欠点がある。
【0011】
ところで、オーバフローを防止する技術が特開平9−198258号公報に記載されている。同公報においては、図8に示されているように、スタック上限値設定レジスタ101に記憶されているスタック上限値と、アドレス線104上のアドレスとをアドレスマッチング回路102で監視し、両者が一致したときCPU103に割込みをかけるのである。つまり、同公報では、オーバフローを検出するとCPU103に対して割込みをかけるのであり、割込みを受けたCPUは、障害発生時のタスク名などの障害情報をセーブ後、上位ソフトウエアに障害発生通知を行っている。
【0012】
【発明が解決しようとする課題】
上述した公報においては、オーバフローを検出するとCPUに対して割込みを入れ、割込みを受けたCPUは上位ソフトウエアに障害発生通知を行って、上位ソフトウエアからの命令待ち状態になる。この場合、オーバフローを検出するとCPUが停止してしまう。つまり、同公報に記載されている従来回路は、検出後のCPU動作にかかわらずオーバフローの検出を確実に行うための回路であり、オーバフローを未然に防ぐことはできないという欠点がある。
【0013】
本発明は上述した従来技術の欠点を解決するためになされたものであり、その目的はオーバフローを未然に防ぐことのできる回路を提供することである。
【0014】
本発明によるオーバフロー保護回路は、データの書込みと読出しとが非同期に行われる先入れ先出しメモリについてのオーバフローを防止するオーバフロー保護回路であって、シリアルデータをパラレルデータに変換するS/P変換部と、デュアルポートメモリで構成されるデータFIFOと、
前記S/P変換部からの出力データを前記データFIFOに書込むための書き込みアドレスを前記データFIFOに出力する書込み制御回路と、前記データFIFOに書き込まれたデータを読み出すCPUと、前記書込みアドレスと同等な前記書込み制御回路から出力されたライトポインタ(WP)を格納するWPレジスタと、前記CPUが1回の読み出し処理で読み出すデータ量を表す読み出しアドレスの上限値を示すライトインタラプトポインタ(WIP)を格納するWIPレジスタと、前記CPUが1回の読み出し処理で読み出すデータ量分を表すポイント幅を示すステップポインタ(SP)を格納するSPレジスタと、WPの値とWIPの値とを比較し両ポイントが一致したとき前記CPUに第一の割込み信号を出力する比較器と、前記CPUに第二の割込み信号を出力するアラームカウンタにより構成され、前記第一の割込み信号が入力された前記CPUは、前記データFIFOからデータを読み出すと同時に前記WIPレジスタに格納されたWIPの値を前記CPUが1回の読み出し処理で読み出すデータ量分を追加したアドレスの上限値に更新し、前記WPレジスタに格納されたWPの値が更新されたWIPの値と一致したとき再び前記比較器が前記CPUに前記第一の割込み信号を出力し、前記アラームカウンタは、前記WIPレジスタに新たなWIPの値が設定されたとき及び前記第一の割込み信号が発生したときにリセットされ、WPの値が1インクリメントする毎に前記アラームカウンタのカウントが1インクリメントされ、前記カウントが前記SPレジスタに格納されたSPの値と一致したとき該カウントを停止して第二の割込み信号を出力することを特徴とする。
【0015】
更に本発明によるオーバフロー保護回路は、第二の割込み信号が入力された前記CPUは、前記データFIFOからデータを読み出すと同時に前記WIPレジスタに格納されたWIPの値を前記CPUが1回の読み出し処理で読み出すデータ量分を追加したアドレスの上限値に更新することを特徴とする。
【0016】
要するに本発明では、タスクスタックオーバフローを検出するだけでなく、従来回路では制御できないFIFOメモリのオーバフローを検出することができる。データ転送の手段としてFIFOメモリを用い、その読出し制御をCPUで行う場合、CPUの処理状況によってはFIFOメモリがオーバフローする可能性がある。本回路ではFIFOメモリのライト/リード状態をCPUへ通知し、またFIFOメモリに対する読出しが一定期間行われない場合にはCPUに対してアラームを出力する。つまりCPUが、デュアルポートメモリ等で構成されリングバッファとして使用するデータFIFOから周期的に読出す処理が間に合わなくなった時にアラームを出すので、オーバフローを未然に防ぐことができるのである。
【0017】
【発明の実施の形態】
次に、本発明の実施の一形態について図面を参照して説明する。なお、以下の説明において参照する各図においては、他の図と同等部分には同一符号が付されている。
【0018】
図1は本発明による画像伝送装置に用いられるオーバフロー保護回路の実施の一形態を示すブロック図である。図1において、低速データ制御部45は、シリアルデータをパラレルデータに変換するS/P変換部1と、デュアルポートメモリで構成されるデータFIFO3と、転送データcを書込むための書込み制御回路2と、転送データhを読出し、図6中のマルチプレクサ39へ出力するCPU4と、CPU4の出力するアドレスをデコードするアドレスデコーダ5と、書込みアドレスeと同等なライトポインタ(WP)sを格納するWPレジスタ7と、ライトインタラプトポインタ(WIP)tを格納するWIPレジスタ9と、ステップポインタ(SP)uを格納するSPレジスタ11と、CPU4のメモリマップ上の任意のデータのみ出力するバッファ6,8と、WPfとWIPtとを比較する比較器10と、比較器10の比較結果を反転するインバータ13と、CPU4に対して読出し要求及びWIP設定要求となる割込みwを出力するアラームカウンタ12とから構成されている。なお、WPレジスタ7,WIPレジスタ9,SPレジスタ11及びアラームカウンタ12は、CPU4から送出されるクロックlに同期して動作するものとする。
【0019】
S/P変換部1は、図2に示されているように、入力されるシリアルデータaを、そのシリアルデータaに同期したクロックbで取込むフリップフロップ(以下、FFと略す)14と、74LS164等で構成されるシリアルパラレル変換デバイス15と、変換後のパラレルデータをカウンタ18の周期で書込みパラレルデータcとして出力するレジスタ16とを含んで構成されている。
【0020】
一方、書込み制御回路2は、同図に示されているように、クロックbに同期して書込みアドレスを発生するカウンタ17,18と、カウンタ18の出力をクロックbで取込みデータFIFO3の書込みアドレスeを出力するFF19と、カウンタ17の最上位ビットをクロックbで取込みデータFIFO3のライトイネーブルd及びアラームカウンタイネーブルxを出力するFF21とを含んで構成されている。なお、カウンタ17のキャリー出力はインバータ20で論理反転され、レジスタ16のイネーブルyとなる。また、カウンタ18の出力は、ライトポインタfとして出力される。
【0021】
アラームカウンタ12は、図3に示されているように、WPfとWIPtとの比較結果vを微分するFF22,23、インバータ24及びNANDゲート25と、WIPtがCPU4より設定される場合にアドレスデコーダ5より出力されるWIPイネーブルqと比較結果vの微分結果とのどちらかによってカウンタ27へリセット信号を出力するANDゲート26と、図2中の書込み制御回路2が出力するアラームカウンタイネーブルxを微分するFF30,31、インバータ32及びNANDゲート33と、SP設定値uとカウンタ27のカウントアップのためのイネーブルを出力するANDゲート34と、カウンタ27の出力結果とSP設定値uの値とが等しいときにCPU4へ読出し要求及びWIP設定要求となる割込みwを出力するNANDゲート28及びインバータ29とを含んで構成されている。なお、FF22,23,30及び31並びにカウンタ27は、CPU4から送出されるクロックlに同期して動作するものとする。
【0022】
かかる構成において、RS232Cポート等から入力されたシリアルの転送データaは、図2中のFF14へ入力されシリアルパラレル変換デバイス15によりパラレルデータに変換される。ここでデータ幅を16ビットとした場合、カウンタ17のキャリーの反転をイネーブルとしてFF16でデータを取込み、カウンタ18の周期のデータに変換される。カウンタ18はデータFIFO3の持つアドレス領域のビット幅を出力する段数で構成される。
【0023】
データの周期はカウンタ18の周期であるのでカウンタ17のMSBをライトイネーブルeとすることが可能であり、FF21の数量(段数)により書込みタイミングが決定される。カウンタ18の出力はWPレジスタ7へ入力される。CPU4は自分の読出し可能な処理時間で読出しを行う。
【0024】
また、カウンタ18の出力は比較器10にも入力される。比較器10は現在、データFIFO3の書込みアドレスであるWPfとWIPtとを比較する。この比較の結果、WPの値とWIPの値とが一致したとき、CPU4へ読出しを許可する割込みvを出力する。CPU4はこの割込みvが入力されないと読出しを行わないので、読出し動作が書込み動作を追い越すことはないのである。
【0025】
さらにまた、WPレジスタ7によりCPU4へ書込みアドレスsを通知しているので、データFIFO3のどの程度の容量まで書込みをしているかを把握することが可能である。CPU4は割込みvが入力されるとWIPの値を更新する。データFIFO3の読出し制御はこのWIPの更新により行われる。
【0026】
ここで、図4を参照し、WPfとWIPtとのメモリ容量上の動作について説明する。データFIFO3の容量は、例えば8Kバイトとする。図4(A)に示されているように、CPU4はWPをリードする。ここでは、読出し幅を20バイトとする。CPU4はWIPの値をWP+20と設定し、リセットされる。
【0027】
データのクロックでライトポインタWPがインクリメントされ、比較器10はWPfとWIPtとの比較を行い、図4(B)に示されているようにWPの値とWIPの値とが一致(WP=WIP)すると割込みvを発生する。この状態が図4(C)に示されている。この割込み発生と同時にCPUはリセットされる。
【0028】
CPU4は割込みvが入力されると前回設定したWIPの値+20を新規WIPとして更新する。この状態が図4(D)に示されている。同図の斜線で示されている部分がCPUの読出し領域となる。
【0029】
ここで新規WIPの設定が瞬時に行われない場合、アラームカウンタ12が動作する。この動作について図5を参照して説明する。同図において、カウンタ27は比較結果がWP=WIPの時若しくはWIPが設定された時にリセットされる。カウンタ27は、図1中のアラームカウンタイネーブルxが入力されるとき、すなわちデータFIFO3にデータが書込まれるとカウントアップされ、ライトポインタWPがインクリメントされる。
【0030】
カウンタ27はSPuの値とカウンタ27の出力とが等しくなると、カウントを停止し、CPU4に対して読出し要求とWIP設定要求となる割込みwを出力する。
【0031】
図5を参照して割込みwの出力動作について説明する。図5(A)に示されているように、CPU4はWIPの設定とSPの設定とを行う。図5(B)に示されているように、WPの値とWIPの値とが一致すると、カウンタ27がリセットされデータFIFO3にデータが書込まれるとカウントアップする。カウンタ27はWIPが設定されるまでリセットがかからず、SPの設定値(ここでは「20」)までカウントアップする。
【0032】
ここでCPU4がWIPを設定するよりも早くWPが次にWIPのとりうる値に到達した場合、すなわち図5(C)に示されているように、WIP=WIP+20をWPが越えてしまう場合、カウンタ27の出力が「20」となっているので、CPU4に対して読出し要求とWIP設定要求となる割込みwを出力する。この割込みwによって、データFIFO3がオーバフロー気味の動作であることを通知する。この通知に応答して読出しワーニング(警告)割込みを発生し、前回設定したWIPの値+20を新規WIPとして更新する。この状態が図5(D)に示されている。同図中の斜線で示されている部分がCPUの読出し領域となる。
【0033】
読出しワーニング割込みが発生された場合には、ライトポインタWP+αを新たなWIPとして設定する。この状態が図5(E)に示されている。
【0034】
図1に戻り、本回路においては、データFIFO3の書込み制御において、書込みアドレスeと同等なライトポインタ(WP)f,ライトインタラプトポインタ(WIP)t,アラームカウンタ12及びステップポインタ(SP)uが用意されている。そして、WPfの値とWIPtの値とが一致したときにCPU4に対して読出しを許可する割込みvを出力する。WIPtの値はCPU4が1回の読出し処理で読出すデータ量を表す読出しアドレスの上限値であり、その値の更新はCPU4が行う。WPfの値とWIPtの値とが一致するまでCPU4は読出しを開始しないので書込みアドレスeが読出しアドレスgに追い越され読出しデータhが誤ることはあり得ない。
【0035】
また、WIPtはCPU4に読出しを許可する割込みvが入力されると、その値が更新される。新たに設定されたWIPtの値とWPfの値とが一致すると再びCPU4に対して割込みvが出力される。
【0036】
ところで、CPU4が他のデータ処理に時間を取られ、WIPtの設定より前に次に設定すべき値をWPfが過ぎると、データFIFO3はリングバッファで構成されるため書込みデータcの上書きが発生することが考えられる。そこで、アラームカウンタ12とステップポインタ(SP)uとを用意しておくのである。このSPレジスタ11には、CPU4が1回の読出し処理で読出すデータ量の幅が格納される。
【0037】
アラームカウンタ12は、WIPレジスタ9設定時と割込みv(WP=WIPが一致したときの割込み)が発生したときにリセットされる。WPfが1インクリメントするとアラームカウンタ12も同様に1インクリメントされ、SPレジスタ11に格納された値までカウントするとカウントを停止し、CPU4に対して読出し要求とWIP設定要求となる割込みwを立上げる。
【0038】
データ転送を行うためにデータFIFOを設け、データFIFOの読出し制御をCPUで行う回路において、CPUでは書込みアドレスを常に監視し、書込みアドレスを追い越さないように読出しアドレスを発生する。本発明回路ではCPUが読出しアドレスを発生させる以外のデータ処理に負担がかかり、周期的に読出す処理が間に合わなくなったときにアラームを発生する。
【0039】
例として8Kバイトの容量を持つデータFIFO3において20バイト書込みが終了すると読出しを開始させる制御を行う。書込み制御回路2よりアドレスeが出力され、WIPの値に「20」が設定される。CPU4はある周期でWPfを読みに行く。ここでWPの値は「20」であり、WPの値とWIPの値とが一致するので、CPU4に対して割込みが出力される。その後、WPfの値が「40」になる前に、WIPの値に「40」を設定できない場合、アラームカウンタ12が動作する。
【0040】
CPU4は20バイトごとに読出すのでSPレジスタ11には値「20」が格納されている。アラームカウンタ12は、WPの値とWIPの値とが一致したときの割込みが発生したときにリセットされ、SPレジスタ11に格納された値である「20」までカウントを開始する。カウントの最中にWIPが設定されるとアラームカウンタはリセットされるが、次にWIPtとして設定されるべき値である「40」を過ぎたとき、CPU4に対して読出し要求とWIP設定要求となる割込みwを立上げる。このような読出し許可割込みと保護機能となる読出し及びWIP設定要求割込みwをCPU4に出力することでCPUの負荷が重い場合でもオーバフローする前にアラームを出力することができる。
【0041】
【発明の効果】
以上説明したように本発明は、CPUが通常処理を行えない場合等、読出しが一定期間行われない場合に読出しアラームとなる割込みを与えることにより、CPUを用いた画像伝送装置においてメモリのオーバフローを未然に防ぐことができるという効果がある。
【図面の簡単な説明】
【図1】本発明の実施の一形態による画像伝送装置の低速データ制御部の構成を示すブロック図である。
【図2】図1中のS/P変換部及び書込み制御回路の内部構成例を示すブロック図である。
【図3】図1中のアラームカウンタの内部構成例を示すブロック図である。
【図4】通常動作時における低速データ制御部のデータFIFO内の状態を示す図である。
【図5】アラーム発生動作時における低速データ制御部のデータFIFO内の状態を示す図である。
【図6】一般的な画像伝送装置の構成を示すブロック図である。
【図7】従来の低速データ制御部の構成例を示す図である。
【図8】オーバフローに応答して割込みをかける従来技術の構成を示すブロック図である。
【符号の説明】
1 S/P変換部
2 書込み制御回路
3 データFIFO
4 CPU
5 アドレスデコーダ
6,8 バッファ
7 WPレジスタ
9 WIPレジスタ
10 比較器
11 SPレジスタ
12 アラームカウンタ
13 インバータ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an overflow protection circuit and an image transmission apparatus using the overflow protection circuit, and more particularly to an overflow protection circuit for preventing overflow of a first-in first-out memory in which data writing and reading are performed asynchronously and an image transmission apparatus using the same.
[0002]
[Prior art]
In general, as shown in FIG. 6, the image transmission apparatus in the video conference system is provided in each of its own station and other stations. In the other-station image transmission apparatus B, image data input from the camera is converted into digital data by the
[0003]
Also in the local-side image transmission apparatus A, image data input from the camera is converted into digital data by the
[0004]
In addition to the above-described exchange of video and audio encoded data, control information for controlling the game is exchanged. In the image transmission apparatus B, control information input from a remote controller (remote controller) is input to the
[0005]
On the other hand, in the image transmission apparatus A, the low-speed data is input to the low-speed
[0006]
Here, the low-speed
[0007]
As shown in FIG. 7, the low-speed
[0008]
In such a configuration, the S /
[0009]
The read addresses g, j and k output from the CPU 4 are decoded by the address decoder 5 and the decoded address i is input to the
[0010]
However, this configuration has a drawback that the value of the write address e is overtaken by the value of the read address g and the
[0011]
By the way, a technique for preventing overflow is described in Japanese Patent Laid-Open No. 9-198258. In this publication, as shown in FIG. 8, the stack upper limit value stored in the stack upper limit
[0012]
[Problems to be solved by the invention]
In the above-mentioned publication, when an overflow is detected, an interrupt is issued to the CPU, and the CPU that has received the interrupt notifies the upper software of the occurrence of a failure and waits for an instruction from the upper software. In this case, the CPU stops when an overflow is detected. That is, the conventional circuit described in this publication is a circuit for reliably detecting overflow regardless of the CPU operation after detection, and has a drawback that it is impossible to prevent overflow.
[0013]
The present invention has been made to solve the above-described drawbacks of the prior art, and an object of the present invention is to provide a circuit capable of preventing overflow.
[0014]
An overflow protection circuit according to the present invention is an overflow protection circuit for preventing overflow of a first-in first-out memory in which data writing and reading are performed asynchronously, an S / P conversion unit that converts serial data into parallel data, and a dual A data FIFO composed of port memories;
A write control circuit for outputting to the data FIFO a write address for writing output data from the S / P converter to the data FIFO, a CPU for reading the data written in the data FIFO, and the write address A WP register for storing the write pointer (WP) output from the equivalent write control circuit, and a write interrupt pointer (WIP) indicating the upper limit value of the read address indicating the amount of data read by the CPU in one read process The WIP register to be stored, the SP register for storing a step pointer (SP) indicating the point width indicating the amount of data read by the CPU in one reading process, the WP value and the WIP value are compared, and both points A comparator that outputs a first interrupt signal to the CPU when The CPU includes an alarm counter that outputs a second interrupt signal to the CPU, and the CPU to which the first interrupt signal is input reads the data from the data FIFO and simultaneously stores the WIP value stored in the WIP register. Is updated to the upper limit value of the address to which the amount of data to be read by the CPU in one reading process is added, and when the WP value stored in the WP register matches the updated WIP value, the comparator again Outputs the first interrupt signal to the CPU, and the alarm counter is reset when a new WIP value is set in the WIP register and when the first interrupt signal is generated. Each time the value is incremented by 1, the count of the alarm counter is incremented by 1, and the count is the SP register. Outputting a second interrupt signal to stop the count when the count value matches the value of the stored SP characterized in.
[0015]
Further, according to the overflow protection circuit of the present invention, the CPU to which the second interrupt signal is input reads the data from the data FIFO and simultaneously reads the WIP value stored in the WIP register by the CPU once. The amount of data read out in (1) is updated to the upper limit value of the added address.
[0016]
In short, the present invention can detect not only task stack overflow but also FIFO memory overflow that cannot be controlled by a conventional circuit. When a FIFO memory is used as a data transfer means and the reading control is performed by the CPU, the FIFO memory may overflow depending on the processing status of the CPU. This circuit notifies the CPU of the write / read state of the FIFO memory, and outputs an alarm to the CPU when reading from the FIFO memory is not performed for a certain period. In other words, since the CPU issues an alarm when the process of periodically reading from the data FIFO which is configured by a dual port memory or the like and used as a ring buffer is not in time, overflow can be prevented in advance.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Next, an embodiment of the present invention will be described with reference to the drawings. In the drawings referred to in the following description, the same reference numerals are given to the same parts as in the other drawings.
[0018]
FIG. 1 is a block diagram showing an embodiment of an overflow protection circuit used in an image transmission apparatus according to the present invention. In FIG. 1 , a low-speed
[0019]
As shown in FIG. 2, the S /
[0020]
On the other hand, as shown in the figure, the
[0021]
As shown in FIG. 3, the
[0022]
In such a configuration, serial transfer data a input from the RS232C port or the like is input to the
[0023]
Since the data cycle is the cycle of the counter 18, the MSB of the
[0024]
The output of the counter 18 is also input to the
[0025]
Furthermore, since the write address s is notified to the CPU 4 by the WP register 7, it is possible to grasp to what extent the
[0026]
Here, with reference to FIG. 4, the operation of WPf and WIPt on the memory capacity will be described. The capacity of the
[0027]
The write pointer WP is incremented by the data clock, and the
[0028]
When the interrupt v is input, the CPU 4 updates the previously set WIP value +20 as a new WIP. This state is shown in FIG. The hatched portion in the figure is the CPU read area.
[0029]
Here, when the new WIP is not set instantaneously, the
[0030]
When the value of SPu becomes equal to the output of the
[0031]
The output operation of the interrupt w will be described with reference to FIG. As shown in FIG. 5A, the CPU 4 performs WIP setting and SP setting. As shown in FIG. 5B, when the value of WP matches the value of WIP, the
[0032]
Here, when the WP reaches a value that can be taken by the WIP earlier than the CPU 4 sets the WIP, that is, when the WP exceeds WIP = WIP + 20 as shown in FIG. 5C, Since the output of the
[0033]
When a read warning interrupt is generated, the write pointer WP + α is set as a new WIP. This state is shown in FIG.
[0034]
Returning to FIG. 1, in this circuit, write pointer (WP) f, write interrupt pointer (WIP) t,
[0035]
WIPt is updated when an interrupt v permitting reading is input to the CPU 4. When the newly set value of WIPt matches the value of WPf, an interrupt v is output to the CPU 4 again.
[0036]
By the way, if the CPU 4 takes time for other data processing and the WPf passes the value to be set next before the setting of WIPt, the
[0037]
The
[0038]
In a circuit in which a data FIFO is provided to perform data transfer and the CPU performs read control of the data FIFO, the CPU constantly monitors the write address and generates a read address so as not to overtake the write address. In the circuit according to the present invention, a load is imposed on data processing other than that in which the CPU generates a read address, and an alarm is generated when the periodic read processing is not in time.
[0039]
As an example, in the
[0040]
Since the CPU 4 reads every 20 bytes, the value “20” is stored in the
[0041]
【The invention's effect】
As described above, according to the present invention, it is possible to prevent memory overflow in an image transmission apparatus using a CPU by providing an interrupt that causes a read alarm when the read is not performed for a certain period of time, such as when the CPU cannot perform normal processing. There is an effect that it can be prevented beforehand.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a low-speed data control unit of an image transmission apparatus according to an embodiment of the present invention.
2 is a block diagram showing an example of the internal configuration of an S / P converter and a write control circuit in FIG.
FIG. 3 is a block diagram showing an example of the internal configuration of an alarm counter in FIG. 1;
FIG. 4 is a diagram illustrating a state in a data FIFO of a low-speed data control unit during normal operation.
FIG. 5 is a diagram showing a state in a data FIFO of a low-speed data control unit during an alarm generation operation.
FIG. 6 is a block diagram illustrating a configuration of a general image transmission apparatus.
FIG. 7 is a diagram illustrating a configuration example of a conventional low-speed data control unit.
FIG. 8 is a block diagram showing a configuration of a prior art that issues an interrupt in response to an overflow.
[Explanation of symbols]
1 S /
4 CPU
5
Claims (2)
前記CPUが1回の読み出し処理で読み出すデータ量を表す読み出しアドレスの上限値を示すライトインタラプトポインタ(WIP)を格納するWIPレジスタと、前記CPUが1回の読み出し処理で読み出すデータ量分を表すポイント幅を示すステップポインタ(SP)を格納するSPレジスタと、WPの値とWIPの値とを比較し両ポイントが一致したとき前記CPUに第一の割込み信号を出力する比較器と、前記CPUに第二の割込み信号を出力するアラームカウンタにより構成され、
前記第一の割込み信号が入力された前記CPUは、前記データFIFOからデータを読み出すと同時に前記WIPレジスタに格納されたWIPの値を前記CPUが1回の読み出し処理で読み出すデータ量分を追加したアドレスの上限値に更新し、前記WPレジスタに格納されたWPの値が更新されたWIPの値と一致したとき再び前記比較器が前記CPUに前記第一の割込み信号を出力し、
前記アラームカウンタは、前記WIPレジスタに新たなWIPの値が設定されたとき及び前記第一の割込み信号が発生したときにリセットされ、WPの値が1インクリメントする毎に前記アラームカウンタのカウントが1インクリメントされ、前記カウントが前記SPレジスタに格納されたSPの値と一致したとき該カウントを停止して第二の割込み信号を出力することを特徴とするオーバフロー保護回路。An overflow protection circuit for preventing overflow of a first-in first-out memory in which data writing and reading are performed asynchronously, an S / P converter for converting serial data into parallel data, and a data FIFO comprising a dual port memory A write control circuit for outputting to the data FIFO a write address for writing output data from the S / P converter to the data FIFO, a CPU for reading the data written in the data FIFO, and the write A WP register for storing a write pointer (WP) output from the write control circuit equivalent to an address;
A WIP register that stores a write interrupt pointer (WIP) that indicates an upper limit value of a read address that represents the amount of data that the CPU reads in a single read process, and a point that represents the amount of data that the CPU reads in a single read process and SP register for storing the step pointer (SP) for the width, a comparator for outputting a first interrupt signal to the CPU when both points by comparing the values of the WP and WIP matches, the CPU Consists of an alarm counter that outputs a second interrupt signal ,
The CPU, to which the first interrupt signal is input, adds the amount of data that the CPU reads the WIP value stored in the WIP register at the same time as reading the data from the data FIFO. The upper limit value of the address is updated, and when the WP value stored in the WP register matches the updated WIP value, the comparator outputs the first interrupt signal to the CPU again .
The alarm counter is reset when a new WIP value is set in the WIP register and when the first interrupt signal is generated. Each time the WP value is incremented by 1, the alarm counter is incremented by 1. An overflow protection circuit which is incremented and stops counting and outputs a second interrupt signal when the count matches the value of SP stored in the SP register .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10258399A JP4387488B2 (en) | 1999-04-09 | 1999-04-09 | Overflow protection circuit and image transmission apparatus using the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10258399A JP4387488B2 (en) | 1999-04-09 | 1999-04-09 | Overflow protection circuit and image transmission apparatus using the same |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2000293981A JP2000293981A (en) | 2000-10-20 |
JP4387488B2 true JP4387488B2 (en) | 2009-12-16 |
Family
ID=14331263
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP10258399A Expired - Lifetime JP4387488B2 (en) | 1999-04-09 | 1999-04-09 | Overflow protection circuit and image transmission apparatus using the same |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4387488B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108076303A (en) * | 2016-11-11 | 2018-05-25 | 中兴通讯股份有限公司 | A kind of video image display method and device |
-
1999
- 1999-04-09 JP JP10258399A patent/JP4387488B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2000293981A (en) | 2000-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5469449A (en) | FIFO buffer system having an error detection and resetting unit | |
JP4387488B2 (en) | Overflow protection circuit and image transmission apparatus using the same | |
JP5729902B2 (en) | Parallel serial communication method | |
JP2001255860A (en) | Video data transfer device and video data transferring method | |
KR100194634B1 (en) | Error detection and automatic recovery of read-write pointers on a first-in first-out | |
JPS6359042A (en) | Communication interface equipment | |
US8165225B2 (en) | Image data transfer circuit | |
JP3667556B2 (en) | DMA transfer control device and DMA transfer control method | |
US20050262314A1 (en) | System and method for circular buffer | |
JP3402581B2 (en) | Data restoration device | |
JP2002252852A (en) | Code feeder and semiconductor integrated circuit | |
JP2511697B2 (en) | Data receiver | |
JP3011157B2 (en) | Image reading method and apparatus | |
JP2001197117A (en) | Buffer for storing variable length data | |
JP3633450B2 (en) | Signal processing device | |
JP2944549B2 (en) | Cell processing circuit | |
JP2630077B2 (en) | Clock synchronous serial interface | |
JP2021090089A (en) | Image processing system | |
JPS6379439A (en) | Serial communication equipment | |
JP3856016B2 (en) | Signal processing device | |
KR100242309B1 (en) | Apparatus for receiving mpeg data | |
JP2000013404A (en) | Tdm/atm converting device | |
JP2009282591A (en) | Data transfer device and data transfer method | |
JP2000259526A (en) | Serial interface circuit | |
JPH01106136A (en) | Hardware queue |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20050406 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060317 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20070130 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20080618 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081111 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090109 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20090515 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090630 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090826 |
|
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: 20090915 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20091001 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121009 Year of fee payment: 3 |