JP2004328103A - Error detector circuit - Google Patents
Error detector circuit Download PDFInfo
- Publication number
- JP2004328103A JP2004328103A JP2003116760A JP2003116760A JP2004328103A JP 2004328103 A JP2004328103 A JP 2004328103A JP 2003116760 A JP2003116760 A JP 2003116760A JP 2003116760 A JP2003116760 A JP 2003116760A JP 2004328103 A JP2004328103 A JP 2004328103A
- Authority
- JP
- Japan
- Prior art keywords
- time
- signal
- cycle
- error
- change point
- 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
Links
Images
Landscapes
- Detection And Prevention Of Errors In Transmission (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、通信信号の誤りを検出する誤り検出回路に関するものである。
【0002】
【従来の技術】
従来、シリアル通信データの誤り検出方法として、例えばD0〜D7の8ビットデータを送信する場合、図8に示すように、データビットの最後にパリティビットを付加して送信し、受信時に、受信したD0〜D7のパリティを算出してデータビットの最後に付加されているパリティビットと比較することにより、受信した通信データの誤りを検出する方法が知られている(例えば、特許文献1参照。)。
【0003】
【特許文献1】
特開平7−170253号公報
【0004】
【発明が解決しようとする課題】
一方、シリアル通信機能を備えた携帯用の機器などで、例えばボタン電池などを電源に用いた装置では、その動作時の消費電流を低減させるために受信した通信データの誤りを検出した場合には、電源をオフして電池の消耗を抑制することが考えられる。
【0005】
しかしながら、上記のような、パリティチェックによる誤り検出方法では、パリティの対象となっている例えば8ビット分のデータビットを受信した後でなければ通信データの誤りを検出することができないという不都合がある。そのため、通信データに誤りが有る場合であっても、所定量のデータ受信を完了するまで通信誤りを検出することが出来ない結果、例えば誤りのあるデータ受信のために電池の消耗を早めてしまうという不都合があった。
【0006】
本発明は上記事情に鑑みてなされたもので、通信データの誤りを迅速に検出することができる誤り検出回路を提供することを目的とする。
【0007】
【課題を解決するための手段】
請求項1に記載の発明は、周期が異なる2種類の信号パターンを、1ビットのデータの論理値にそれぞれ対応させてデータを表す通信信号の誤りを検出する誤り検出回路であって、前記信号パターンは、その周期の途中において該周期に対する所定比率の位置で信号レベルが反転するものであり、前記通信信号のレベルが所定方向に反転したことを検出する第1の反転検出部と、前記第1の反転検出部により前記通信信号のレベルの反転が検出された場合に、時間の計測を開始する計測部と、前記通信信号のレベルが前記所定方向とは逆方向に反転したことを検出する第2の反転検出部と、前記第2の反転検出部により前記通信信号のレベルの反転が検出された場合に、その時の前記計測部による時間の計測値を変化点計測値として記憶する変化点記憶部と、前記第1の反転検出部により前記通信信号のレベルの反転が検出された場合に、その時までに前記計測部により計測されていた時間の計測値を周期計測値として取得する計測周期取得部と、前記変化点記憶部により記憶された変化点計測値と、前記計測周期取得部により取得された周期計測値に基づく所定の判定値との比較結果に応じて前記通信信号の誤りを検出する誤り判定部とを備えたことを特徴としている。
【0008】
請求項1に記載の発明によれば、第1の反転検出部によって、信号パターンの周期の初めが検出された場合に、計測部により時間の計測が開始される。そして、第2の反転検出部により周期の途中で通信信号のレベルが反転したことが検出された場合に、変化点記憶部によりその時の計測部による時間の計測値が変化点計測値として記憶される。また、第1の反転検出部により信号パターンの周期の終わりが検出された場合に、計測周期取得部によって、その時までに計測部により計測されていた時間の計測値が周期計測値として取得される。さらに、誤り判定部によって、変化点記憶部により記憶された変化点計測値と、計測周期取得部により取得された周期計測値に基づく所定の判定値との比較結果に応じて通信信号の誤りが検出される。
【0009】
請求項2に記載の発明は、請求項1記載の誤り検出回路において、前記誤り判定部は、前記変化点記憶部により記憶された変化点計測値と、前記計測周期取得部により取得された周期計測値に前記比率を乗じた値との比較結果が一致しなかった場合に、前記通信信号の誤りを検出することを特徴としている。
【0010】
請求項2に記載の発明によれば、誤り判定部によって、変化点記憶部により記憶された変化点計測値と、計測周期取得部により取得された周期計測値に前記比率を乗じた値との比較結果が一致しなかった場合に、通信信号の誤りが検出される。
【0011】
請求項3に記載の発明は、請求項1記載の誤り検出回路において、前記2種類の信号パターンは、その周期が所定の第1の時間であると共に、その周期の初めからの前記比率となる第2の時間で信号レベルが反転する第1の信号パターンと、その周期が前記第1の時間よりも長い所定の第3の時間であると共に、その周期の初めから前記比率となる第4の時間で信号レベルが反転する第2の信号パターンとからなり、前記第1の時間に関連付けて、前記第1の信号パターンが正しい場合の前記第2の時間の範囲を記憶し、前記第3の時間に関連付けて、前記第2の信号パターンが正しい場合の前記第4の時間の範囲を記憶し、その記憶している第2の時間の範囲及び第4の時間の範囲のうち前記計測周期取得部により取得された周期計測値に関連付けて記憶している時間の範囲を、前記判定値として前記誤り判定部へ出力する判定値記憶部をさらに備え、前記誤り判定部は、前記判定値記憶部から出力された前記判定値と前記変化点記憶部により記憶された変化点計測値とを比較し、その比較の結果、その判定値で示される時間の範囲にその変化点計測値が入っていないことを検出した際に前記通信信号の誤りを検出することを特徴としている。
【0012】
請求項3に記載の発明によれば、判定値記憶部によって、第1の時間に関連付けて、第1の信号パターンが正しい場合の第2の時間の範囲が記憶され、第3の時間に関連付けて、第2の信号パターンが正しい場合の第4の時間の範囲が記憶されている。そして、判定値記憶部により記憶されている第2の時間の範囲及び第4の時間の範囲のうち計測周期取得部により取得された周期計測値に関連付けて記憶されている時間の範囲が、前記判定値として誤り判定部へ出力される。さらに、誤り判定部によって、判定値記憶部から出力された判定値と変化点記憶部により記憶された変化点計測値とが比較され、その比較の結果、その判定値で示される時間の範囲にその変化点計測値が入っていないことが検出された際に通信信号の誤りが検出される。
【0013】
請求項4に記載の発明は、請求項3記載の誤り検出回路において、前記判定値記憶部は、さらに、前記第1の信号パターンの周期として許容される複数の時間の範囲にそれぞれ関連付けて、前記第1の信号パターンが正しい場合の前記第2の時間の範囲をそれぞれ記憶し、前記第2の信号パターンの周期として許容される複数の時間の範囲にそれぞれ関連付けて、前記第2の信号パターンが正しい場合の前記第4の時間の範囲をそれぞれ記憶すると共に、その複数記憶している第2の時間の範囲及び第4の時間の範囲のうち前記計測周期取得部により取得された周期計測値に関連付けて記憶している時間の範囲を、前記判定値として前記誤り判定部へ出力することを特徴としている。
【0014】
請求項4に記載の発明によれば、判定値記憶部によって、第1の信号パターンの周期として許容される複数の時間の範囲にそれぞれ関連付けて、第1の信号パターンが正しい場合の第2の時間の範囲がそれぞれ記憶され、第2の信号パターンの周期として許容される複数の時間の範囲にそれぞれ関連付けて、第2の信号パターンが正しい場合の第4の時間の範囲がそれぞれ記憶されている。そして、判定値記憶部によって、その複数記憶されている第2の時間の範囲及び第4の時間の範囲のうち計測周期取得部により取得された周期計測値に関連付けて記憶されている時間の範囲が、前記判定値として誤り判定部へ出力されると共に、誤り判定部によりその判定値で示される時間の範囲にその変化点計測値が入っていないことが検出された際に通信信号の誤りが検出される。
【0015】
【発明の実施の形態】
以下、本発明に係る実施形態を図面に基づいて説明する。なお、各図において同一の構成については、同一の符号を付し、その説明を省略する。
【0016】
(第1実施形態)
図1は、本発明の第1の実施形態に係る誤り検出回路の一例である誤り検出部1を備えた通信機器2を用いて構成された通信システムを示す概略ブロック図である。図1に示す通信機器2は、制御部3、データ送受信部4、及び誤り検出部1を備え、通信路5を介して他の通信機器2とデータ送受信可能に接続されている。
【0017】
制御部3は、通信機器2の動作を制御するもので、例えばマイクロコンピュータ等を用いて構成され、所定の機器制御プログラムを実行することにより、データ送受信部4と、通信路5とを介して他の通信機器2との間でデータの送受信を行う。また、例えば制御部3は、制御部3の動作周波数を低下させたり、制御部3内部の所定の回路ブロックへの電源供給を停止させたりすることにより、消費電流を低減する省電力モードを有している。そして、制御部3は、例えば誤り検出部1から受信データに誤りがあることを示す誤り検出信号ERRを受け付けた場合に通常の動作状態から省電力モードへ移行する。
【0018】
データ送受信部4は、制御部3から出力されたデータを所定の通信信号に変換して通信路5を介して他の通信機器2へ送信し、また、他の通信機器2から通信路5を介して送られてきた通信信号を制御部3が処理可能なデータに変換して制御部3へ、出力する。
【0019】
図2は、データ送受信部4から通信路5へ出力される通信信号の波形の一例を示す図である。図2に示す通信信号6は、例えば周期T1が300μsec、デューティ50%(所定の時間比率)の信号パターン61(第1の信号パターン)によって「0」を表し、周期T2が600μsec、デューティ50%の信号パターン62(第2の信号パターン)によって「1」を表すようにされている。なお、信号パターン61,62は互いに周期が異なればよく、そのデューティは50%に限られず、例えば30%、あるいは60%などであってもよい。
【0020】
誤り検出部1は、通信路5から受信信号RINを取得して、誤り検出を行う。そして、誤り検出部1は、受信信号RINから誤りを検出した場合に、受信信号RINに誤りがあることを示す誤り検出信号ERRを制御部3へ出力する。
【0021】
図3は、誤り検出部1の構成の一例を説明するためのブロック図である。図3に示す誤り検出部1は、受信回路110と、比較判定回路120とを備える。受信回路110は、遅延回路111、レベル変化点検知回路112、カウンタ113、レベル変化点保持回路114、及びデータ長保持回路115を備える。また、比較判定回路120は、データ中点保持回路121及び比較回路122を備える。
【0022】
まず、受信回路110の構成について説明する。遅延回路111は、レベル変化点検知回路112による信号レベルの変化点検出の前処理として、受信信号RINを所定時間遅延させて遅延信号RINDを生成する遅延回路である。この場合、遅延回路111の遅延時間は、例えばレベル変化点検知回路112を構成する論理回路が必要とするホールドタイム程度の時間、例えば20nsec程度であっても良い。
【0023】
レベル変化点検知回路112は、受信信号RINと遅延信号RINDとに基づいて、受信信号RINの立ち上がり、すなわち信号周期の開始と終了とを検出した場合に受信信号RINの立ち上がりを検出したことを示す立上り検出信号UPをカウンタ113及びデータ長保持回路115へ出力し、受信信号RINの立ち下がり、すなわち信号周期途中での信号レベルの反転を検出した場合に受信信号RINの立下りを検出したことを示す立下り検出信号DOWNをレベル変化点保持回路114へ出力する。具体的には、レベル変化点検知回路112は、受信信号RINがハイレベル、かつ遅延信号RINDがローレベルの場合に受信信号RINの立ち上がりを検出し、受信信号RINがローレベル、かつ遅延信号RINDがハイレベルの場合に受信信号RINの立ち下がりを検出する。
【0024】
なお、レベル変化点検知回路112は、例えば受信信号RINがハイレベル、かつ遅延信号RINDがローレベルの場合にカウンタ113にカウントを開始させるべく検出信号UPを出力する構成としてもよい。また、レベル変化点検知回路112は、例えば、カウンタ113がカウントを開始した後に受信信号RINと遅延信号RINDとのレベルが異なることを検出した場合に、レベル変化点保持回路114にカウンタ113のカウンタ値を記憶させるべく立下り検出信号DOWNをへ出力する構成としてもよい。また、レベル変化点検知回路112は、例えば、カウンタ113がカウントを開始した後2回目に受信信号RINと遅延信号RINDとのレベルが異なることを検出した場合に、データ長保持回路115にカウンタ113のカウンタ値を記憶させるべく立下り検出信号DOWNを出力する構成としてもよい。
【0025】
また、レベル変化点検知回路112は、受信信号RINと遅延信号RINDとに基づいて、受信信号RINの立ち上がりを検出したことを示す立上り検出信号UPをカウンタ113及びデータ長保持回路115へ出力する構成を示したが、レベル変化点検知回路112は立上り検出信号UPをカウンタ113及びデータ長保持回路115へ出力せず、カウンタ113及びデータ長保持回路115がそれぞれ受信信号RINと遅延信号RINDとに基づいて、受信信号RINの立ち上がりを検出する回路部を、第1の反転検出部として備える構成としても良い。
【0026】
カウンタ113は、例えば3MHzのクロック信号をカウントすることによって時間を計測するカウンタであり、レベル変化点検知回路112から受信信号RINの立ち上がりを検出したことを示す立上り検出信号UPを受け付けた場合に、時間の計測を0から開始する。また、カウンタ113は、カウント値をレベル変化点保持回路114とデータ長保持回路115とに出力する。
【0027】
レベル変化点保持回路114は、例えばレジスタ等から構成される記憶部であり、レベル変化点検知回路112から受信信号RINの立下がりを検出したことを示す立下り検出信号DOWNを受け付けた場合に、カウンタ113から出力されたカウント値をレベル変化点値mとして記憶すると共に、記憶したレベル変化点値mを比較回路122へ出力する。
【0028】
データ長保持回路115は、例えばレジスタ等から構成される記憶部であり、レベル変化点検知回路112から受信信号RINの立上がりを検出したことを示す立上り検出信号UPを受け付けた場合に、カウンタ113から出力されたカウント値をデータ長nとして記憶すると共に、記憶したデータ長nをデータ中点保持回路121へ出力する。
【0029】
次に比較判定回路120の構成について説明する。データ中点保持回路121は、例えばデータ長保持回路115から出力されたデータ長nを、1ビット右シフトすることによって、受信信号RINの半周期長を示すデータであるn/2を生成すると共に、半周期長データn/2(所定の判定値)を比較回路122へ出力する。
【0030】
比較回路122は、データ中点保持回路121から出力された半周期長データn/2と、レベル変化点保持回路114から出力されたレベル変化点値mとを比較し、半周期長データn/2とレベル変化点値mとが一致しない場合に、受信信号RINに誤りがあることを示す誤り検出信号ERRを制御部3へ出力する。
【0031】
なお、信号パターン61,62のデューティが、例えば30%、あるいは60%などであった場合には、データ中点保持回路121は、半周期長データn/2の代わりに、例えばn×3/10、あるいはn×6/10の計算値を比較回路122へ出力する構成としてもよい。
【0032】
次に、図3に示す誤り検出部1の動作について説明する。図4は、図3に示す誤り検出部1の動作を説明するためのタイミングチャートである。まず、受信信号RINが、遅延回路111によって遅延されることにより、遅延信号RINDが生成される。次に、受信信号RINが立ち上がると、受信信号RINがハイレベル、かつ遅延信号RINDがローレベルになることにより、レベル変化点検知回路112によって、受信信号RINの立ち上がりを検出したことを示す立上り検出信号UPがカウンタ113へ出力され、カウンタ113によって、0からクロック信号のカウントが開始される(図中Aで示すタイミング)。
【0033】
次に、受信信号RINが立下がると、受信信号RINがローレベル、かつ遅延信号RINDがハイレベルになることにより、レベル変化点検知回路112によって、受信信号RINの立下りを検出したことを示す立下がり検出信号DOWNが、レベル変化点保持回路114へ出力され、レベル変化点保持回路114によって、カウンタ113から出力されたカウント値がレベル変化点値mとして記憶されると共に、記憶されたレベル変化点値mが比較回路122へ出力される(図中Bで示すタイミング)。
【0034】
次に、受信信号RINが立ち上がると、受信信号RINがハイレベル、かつ遅延信号RINDがローレベルになることにより、レベル変化点検知回路112によって、受信信号RINの立ち上がりを検出したことを示す立上り検出信号UPがデータ長保持回路115及びカウンタ113へ出力される。そして、データ長保持回路115によって、カウンタ113のカウント値が受信信号RINの周期を表すデータ長nとして記憶されると共に、記憶されたデータ長nがデータ中点保持回路121へ出力される(図中Cで示すタイミング)。また、同様に立上り検出信号UPを受け付けたカウンタ113は、データ長保持回路115によりカウント値が記憶された後、次の信号周期を計測すべく、そのカウント値を0から時間計測を開始する(図中Cで示すタイミング)。
【0035】
次に、データ中点保持回路121によって、データ長保持回路115から出力されたデータ長nが1ビット右シフトされ、受信信号RINの半周期長を示すデータであるn/2が生成されると共に、半周期長データn/2が比較回路122へ出力される。
【0036】
次に、比較回路122により、データ中点保持回路121から出力された半周期長データn/2と、レベル変化点保持回路114から出力されたレベル変化点値mが比較され、半周期長データn/2とレベル変化点値mとが一致しない場合に、受信信号RINに誤りがあることを示す誤り検出信号ERRが制御部3へ出力され、例えば、制御部3が省電力モードへ移行する。
【0037】
これにより、1ビットを表す1周期の信号パターンのデューティのずれによってデータ誤りを検出することが出来るので、通信フレームの最初の1ビットでデータ誤りを検出することが可能となり、従来の、例えばパリティチェックを行って誤りを検出するものよりも、通信データの誤りを迅速に検出することが出来る。
【0038】
(第2実施形態)
次に、本発明の第2の実施の形態に係る誤り検出回路について説明する。図5は、本発明の第2の実施の形態に係る誤り検出回路の一例である誤り検出部1aの構成を示すブロック図である。
【0039】
図5に示す誤り検出部1aと図3に示す誤り検出部1とでは、下記の点で異なる。すなわち、図5に示す誤り検出部1aでは、比較判定回路120の代わりに比較判定回路120aを備える。その他の構成は図3に示す誤り検出部1とほぼ同様であるので、以下本実施の形態の特徴的な点について説明する。
【0040】
比較判定回路120aは、LUT(Look Up Table)123と比較回路124とを備える。LUT123は、例えばROM(Read Only Memory)等を用いて構成され、信号パターン61,62それぞれについて、これらの信号パターンの周期の初めからレベルが反転するまでの時間が、これらの信号パターンが正しいと判断することが出来る範囲を示したデータテーブルを記憶している。
【0041】
図6は、LUT123が記憶しているデータテーブルの内容を説明するための図である。LUT123は、「0」を表す信号パターン61の周期T1と関連付けて、信号パターン61が周期T1の初めからレベルが反転するまでの時間(第2の時間)を示す(T1)/2を中心として、その前後、所定の許容範囲時間Xの範囲、すなわち[(T1)/2]±Xを記憶している。また、LUT123は、「1」を表す信号パターン62の周期T2と関連付けて、信号パターン62が周期T2の初めからレベルが反転するまでの時間(第4の時間)を示す(T2)/2を中心として、その前後、所定の許容範囲時間Yの範囲、すなわち[(T2)/2]±Yを記憶している。
【0042】
この場合、例えば[(T1)/2]±Xは、範囲の上限である[(T1)/2]+Xと、範囲の下限である[(T1)/2]−Xとして記憶されている。また、[(T2)/2]±Yは、範囲の上限である[(T2)/2]+Yと、範囲の下限である[(T2)/2]−Yとして記憶されている。さらに、LUT123が記憶しているデータは、時間をカウンタ113のカウント値に換算した値にされている。
【0043】
そして、LUT123は、データ長保持回路115から出力されたデータ長nがT1であった場合は[(T1)/2]+Xを上限データMAX(所定の判定値)として、[(T1)/2]−Xを下限データMIN(所定の判定値)として比較回路124へ出力する。一方、LUT123は、データ長nがT2であった場合は[(T2)/2]+Yを上限データMAXとして、[(T2)/2]−Yを下限データMINとして比較回路124へ出力する。
【0044】
比較回路124は、レベル変化点保持回路114から出力されたレベル変化点値mが、LUT123から出力された上限データMAXを越える場合、又は下限データMIN未満である場合に、受信信号RINに誤りがあることを示す誤り検出信号ERRを制御部3へ出力する。
【0045】
これにより、1ビットを表す信号パターンのデューティが、所定の範囲を越えてずれた場合に1ビットのデータが誤りであると判断するので、デューティのずれが所定の範囲内の通信信号を誤りとしないようにすることができ、正しいデータを誤りと判断することを抑制することが出来る。
【0046】
(第3実施形態)
次に、本発明の第3の実施の形態に係る誤り検出回路について説明する。本発明の第3の実施の形態に係る誤り検出回路の一例である誤り検出部1aは、第2の実施形態に係る誤り検出部1aと同様、図5で示される。第3の実施の形態に係る誤り検出部1aは、第2の実施形態に係る誤り検出部1aとは、LUT123が記憶しているデータテーブルの内容が異なる。その他の構成は第2の実施形態に係る誤り検出部1aとほぼ同様であるので、以下本実施の形態の特徴的な点について説明する。
【0047】
図7は、第3の実施の形態に係るLUT123が記憶しているデータテーブルの内容を説明するための図である。図7に示すデータテーブルは、時間をカウンタ113のカウント値に換算した値で示すようにされている。第3の実施の形態に係るLUT123は、第2の実施の形態に係るLUT123と同様に、「0」を表す信号パターン61の周期T1と関連付けて、信号パターン61が周期T1の初めからレベルが反転するまでの時間を示す(T1)/2を中心として、その前後、所定の許容範囲時間Xの範囲、すなわち[(T1)/2]±Xを記憶すると共に、「1」を表す信号パターン62の周期T2と関連付けて、信号パターン62が周期T2の初めからレベルが反転するまでの時間を示す(T2)/2を中心として、その前後、所定の許容範囲時間Yの範囲、すなわち[(T2)/2]±Yを記憶している。
【0048】
さらに、第3の実施の形態に係るLUT123は、周期T1の前後、所定の時間範囲、例えばT1=300μsecに対して150μsec〜450μsecの範囲を所定の時間間隔K毎に区分したデータ長T1−K、T1−2K、T1−3K・・・・、及びデータ長T1+K、T1+2K、T1+3K・・・・、にそれぞれ関連付けて、各時間区分のデータ長を1周期とする信号パターン61が、周期の初めからレベルが反転するまでの時間を示す(T1−K)/2、(T1−2K)/2、(T1−3K)/2・・・、及び(T1+K)/2、(T1+2K)/2、(T1+3K)/2・・・、をそれぞれ中心として、その前後、所定の許容範囲時間Xの範囲、すなわち[(T1−K)/2]±X、[(T1−2K)/2]±X、[(T1−3K)/2]±X・・・、及び[(T1+K)/2]±X、[(T1+2K)/2]±X、[(T1+3K)/2]±X・・・、を記憶している。
【0049】
さらに、第3の実施の形態に係るLUT123は、周期T2の前後、所定の時間範囲、例えばT2=600μsecに対して451μsec〜750μsecの範囲を所定の時間間隔L毎に区分したT2−L、T2−2L、T2−3L・・・・、及びデータ長T2+L、T2+2L、T2+3L・・・・、にそれぞれ関連付けて、各時間区分のデータ長を1周期とする信号パターン62が、周期の初めからレベルが反転するまでの時間を示す(T2−L)/2、(T2−2L)/2、(T2−3L)/2・・・、及び(T2+L)/2、(T2+2L)/2、(T2+3L)/2・・・、をそれぞれ中心として、その前後、所定の許容範囲時間Yの範囲、すなわち[(T2−L)/2]±Y、[(T2−2L)/2]±Y、[(T2−3L)/2]±Y・・・、及び[(T2+L)/2]±Y、[(T2+2L)/2]±Y、[(T2+3L)/2]±Y・・・、を記憶している。
【0050】
なお、K及びLは、例えば1にされており、カウンタ113のカウント値毎に、所定の時間範囲が関連付けられる構成であってもよい。また、LUT123は、例えばデータ長保持回路115から出力されたデータ長nの下位のビットを切り捨てる等により、データ長nを所定のビット数に丸めた値を、データテーブルへの入力値として用いる構成としても良い。
【0051】
そして、LUT123は、データ長保持回路115から出力されたデータ長nに応じて、例えばデータ長nがT1−Kであった場合は[(T1−K)/2]+Xを上限データMAXとして、[(T1−K)/2]−Xを下限データMINとして比較回路124へ出力する。
【0052】
次に、比較回路124は、レベル変化点保持回路114から出力されたレベル変化点値mが、LUT123から出力された上限データMAXを越える場合、又は下限データMIN未満である場合に、受信信号RINに誤りがあることを示す誤り検出信号ERRを制御部3へ出力する。
【0053】
これにより、LUT123は、受信信号RINにおいて、1ビットを表す信号パターンの周期がずれた場合であっても、その周期のずれに応じてその信号パターンが正しい信号パターンであると判定するための信号レベルの変化位置範囲を、上限データMAX、及び下限データMINとして比較回路124へ出力することができ、比較回路124は、その周期がずれた状態の信号パターンに応じた1ビットのデータが誤りであると判断するための、デューティのずれの範囲に基づいて通信信号の誤りを検出することができる。
【0054】
【発明の効果】
請求項1に記載の発明によれば、1ビットを表す信号パターンによってデータ誤りを検出することが出来るので、通信データの誤りを迅速に検出することができる。
【0055】
請求項2に記載の発明によれば、1ビットを表す信号パターンのデューティのずれによって、1ビットのデータの誤りを検出することができる。
【0056】
請求項3に記載の発明によれば、1ビットを表す信号パターンのデューティが、所定の範囲を越えてずれた場合に1ビットのデータが誤りであると判断するので、デューティのずれが所定の範囲内の通信信号を誤りとしないようにすることができる。
【0057】
請求項4に記載の発明によれば、1ビットを表す信号パターンの周期がずれた場合であっても、その周期がずれた状態の信号パターンに応じた1ビットのデータが誤りであると判断するためのデューティのずれの範囲に基づいて通信信号の誤りを検出することができる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係る誤り検出回路の一例である誤り検出部を備えた通信機器を用いて構成された通信システムを示す概略ブロック図である。
【図2】図1に示すデータ送受信部から通信路へ出力される通信信号の波形の一例を示す図である。
【図3】図1に示す誤り検出部の構成の一例を説明するためのブロック図である。
【図4】図3に示す誤り検出部の動作を説明するためのタイミングチャートである。
【図5】図1に示す誤り検出部の構成の一例を説明するためのブロック図である。
【図6】本発明の第2の実施形態に係るLUTが記憶しているデータテーブルの内容を説明するための図である。
【図7】本発明の第3の実施形態に係るLUTが記憶しているデータテーブルの内容を説明するための図である。
【図8】従来例による通信データを説明するための図である。
【符号の説明】
1,1a 誤り検出部
4 データ送受信部
5 通信路
6 通信信号
61 信号パターン(第1の信号パターン)
62 信号パターン(第2の信号パターン)
110 受信回路
111 遅延回路
112 レベル変化点検知回路(第1,第2の反転検出部)
113 カウンタ(計測部)
114 レベル変化点保持回路(変化点記憶部)
115 データ長保持回路(計測周期取得部)
120,120a 比較判定回路(誤り判定部)
121 データ中点保持回路
122,124 比較回路
123 LUT(判定値記憶部)[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an error detection circuit that detects an error in a communication signal.
[0002]
[Prior art]
Conventionally, as an error detection method of serial communication data, for example, when transmitting 8-bit data of D0 to D7, as shown in FIG. There is known a method for detecting an error in received communication data by calculating the parity of D0 to D7 and comparing the calculated parity with a parity bit added to the end of the data bit (for example, see Patent Document 1). .
[0003]
[Patent Document 1]
JP-A-7-170253
[0004]
[Problems to be solved by the invention]
On the other hand, in a portable device or the like having a serial communication function, for example, in a device using a button battery or the like as a power supply, when detecting an error in communication data received to reduce current consumption during operation, It is conceivable that the power is turned off to suppress battery consumption.
[0005]
However, the error detection method using the parity check as described above has a disadvantage that an error in communication data can be detected only after receiving data bits of, for example, 8 bits which are parity targets. . Therefore, even if there is an error in the communication data, a communication error cannot be detected until the reception of a predetermined amount of data is completed. As a result, for example, battery consumption is expedited due to reception of the erroneous data. There was an inconvenience.
[0006]
The present invention has been made in view of the above circumstances, and has as its object to provide an error detection circuit that can quickly detect an error in communication data.
[0007]
[Means for Solving the Problems]
The invention according to
[0008]
According to the first aspect of the invention, when the first inversion detection unit detects the beginning of the cycle of the signal pattern, the measurement unit starts measuring time. When the second inversion detector detects that the level of the communication signal has been inverted in the middle of the cycle, the change point storage unit stores the time measurement value by the measurement unit at that time as a change point measurement value. You. Also, when the end of the cycle of the signal pattern is detected by the first inversion detecting unit, the measurement period obtaining unit obtains the measured value of the time measured by the measuring unit up to that time as the cycle measured value. . Further, the error determination unit determines whether an error in the communication signal occurs in accordance with a comparison result between the change point measurement value stored in the change point storage unit and a predetermined determination value based on the cycle measurement value acquired by the measurement cycle acquisition unit. Is detected.
[0009]
According to a second aspect of the present invention, in the error detection circuit according to the first aspect, the error determination unit includes a change point measurement value stored by the change point storage unit and a cycle acquired by the measurement cycle acquisition unit. When the comparison result with the value obtained by multiplying the measured value by the ratio does not match, an error of the communication signal is detected.
[0010]
According to the second aspect of the present invention, the error determination unit calculates the change point measurement value stored in the change point storage unit and a value obtained by multiplying the cycle measurement value acquired by the measurement cycle acquisition unit by the ratio. If the comparison results do not match, an error in the communication signal is detected.
[0011]
According to a third aspect of the present invention, in the error detection circuit according to the first aspect, the two types of signal patterns have a cycle of a predetermined first time and have the ratio from the beginning of the cycle. A first signal pattern in which the signal level is inverted at the second time, a fourth signal pattern whose cycle is a predetermined third time longer than the first time, and which has the ratio from the beginning of the cycle; A second signal pattern in which the signal level is inverted with time, and the second time range when the first signal pattern is correct is stored in association with the first time; The fourth time range in the case where the second signal pattern is correct is stored in association with time, and the measurement cycle acquisition is performed in the stored second time range and the fourth time range. To the cycle measurement value obtained by the The apparatus further includes a determination value storage unit that outputs the time range stored in association with the error determination unit as the determination value, wherein the error determination unit includes the determination value output from the determination value storage unit. The change point measurement value stored in the change point storage unit is compared, and the communication is performed when it is detected that the change point measurement value does not fall within the time range indicated by the determination value. It is characterized by detecting a signal error.
[0012]
According to the third aspect of the invention, the determination value storage unit stores the second time range when the first signal pattern is correct in association with the first time, and associates the second time range with the third time. Thus, a fourth time range when the second signal pattern is correct is stored. Then, of the second time range and the fourth time range stored by the determination value storage unit, the time range stored in association with the cycle measurement value acquired by the measurement cycle acquisition unit is the aforementioned The judgment value is output to the error judgment unit. Further, the error determination unit compares the determination value output from the determination value storage unit with the change point measurement value stored by the change point storage unit, and as a result of the comparison, the error value falls within a time range indicated by the determination value. When it is detected that the change point measurement value is not included, an error in the communication signal is detected.
[0013]
According to a fourth aspect of the present invention, in the error detection circuit according to the third aspect, the determination value storage unit further associates with each of a plurality of time ranges allowed as a cycle of the first signal pattern, The second signal range is stored when the first signal pattern is correct, and the second signal range is associated with a plurality of time ranges allowed as a cycle of the second signal pattern. Are respectively stored when the fourth time range is correct, and the cycle measurement value acquired by the measurement cycle acquisition unit out of the plurality of second time ranges and fourth time ranges stored therein. The range of time stored in association with is output to the error determination unit as the determination value.
[0014]
According to the fourth aspect of the present invention, the determination value storage unit associates each of the first signal patterns with a plurality of time ranges allowed as the cycle of the first signal pattern, and sets the second time when the first signal pattern is correct. Time ranges are respectively stored, and a fourth time range when the second signal pattern is correct is stored in association with a plurality of time ranges allowed as the cycle of the second signal pattern. . The determination value storage unit stores a time range stored in association with the cycle measurement value acquired by the measurement cycle acquisition unit out of the plurality of second time ranges and the fourth time range. Is output to the error determination unit as the determination value, and when the error determination unit detects that the change point measurement value is not included in the time range indicated by the determination value, an error in the communication signal is detected. Is detected.
[0015]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments according to the present invention will be described with reference to the drawings. In each drawing, the same components are denoted by the same reference numerals, and description thereof will be omitted.
[0016]
(1st Embodiment)
FIG. 1 is a schematic block diagram illustrating a communication system configured using a
[0017]
The
[0018]
The data transmission /
[0019]
FIG. 2 is a diagram illustrating an example of a waveform of a communication signal output from the data transmission /
[0020]
The
[0021]
FIG. 3 is a block diagram for explaining an example of the configuration of the
[0022]
First, the configuration of the receiving
[0023]
Based on the received signal RIN and the delay signal RIND, the level change
[0024]
Note that the level change
[0025]
The level change
[0026]
The
[0027]
The level change
[0028]
The data
[0029]
Next, the configuration of the
[0030]
The
[0031]
When the duty of the
[0032]
Next, the operation of the
[0033]
Next, when the reception signal RIN falls, the reception signal RIN goes low and the delay signal RIND goes high, indicating that the falling of the reception signal RIN has been detected by the level change
[0034]
Next, when the reception signal RIN rises, the reception signal RIN goes high and the delay signal RIND goes low, so that the level change
[0035]
Next, the data middle
[0036]
Next, the
[0037]
As a result, a data error can be detected based on a shift in the duty of a one-period signal pattern representing one bit. Therefore, a data error can be detected in the first bit of a communication frame. An error in the communication data can be detected more quickly than an error detected by performing a check.
[0038]
(2nd Embodiment)
Next, an error detection circuit according to a second embodiment of the present invention will be described. FIG. 5 is a block diagram illustrating a configuration of an error detection unit 1a which is an example of the error detection circuit according to the second embodiment of the present invention.
[0039]
The error detector 1a shown in FIG. 5 differs from the
[0040]
The
[0041]
FIG. 6 is a diagram for explaining the contents of the data table stored in the
[0042]
In this case, for example, [(T1) / 2] ± X is stored as [(T1) / 2] + X which is the upper limit of the range and [(T1) / 2] -X which is the lower limit of the range. [(T2) / 2] ± Y is stored as [(T2) / 2] + Y which is the upper limit of the range and [(T2) / 2] -Y which is the lower limit of the range. Further, the data stored in the
[0043]
Then, when the data length n output from the data
[0044]
When the level change point value m output from the level change
[0045]
Accordingly, when the duty of the signal pattern representing one bit deviates beyond a predetermined range, it is determined that the one-bit data is erroneous. And correct data can be suppressed from being determined as an error.
[0046]
(Third embodiment)
Next, an error detection circuit according to a third embodiment of the present invention will be described. An error detector 1a, which is an example of the error detector according to the third embodiment of the present invention, is shown in FIG. 5, similarly to the error detector 1a according to the second embodiment. The error detector 1a according to the third embodiment differs from the error detector 1a according to the second embodiment in the contents of the data table stored in the
[0047]
FIG. 7 is a diagram for explaining the contents of the data table stored in the
[0048]
Further, the
[0049]
Further, the
[0050]
Note that K and L are set to 1, for example, and a configuration may be such that a predetermined time range is associated with each count value of the
[0051]
Then, according to the data length n output from the data
[0052]
Next, when the level change point value m output from the level change
[0053]
As a result, even if the period of the signal pattern representing one bit is shifted in the received signal RIN, the
[0054]
【The invention's effect】
According to the first aspect of the present invention, since a data error can be detected by a signal pattern representing one bit, an error in communication data can be quickly detected.
[0055]
According to the second aspect of the present invention, it is possible to detect an error in 1-bit data based on a shift in duty of a signal pattern representing 1 bit.
[0056]
According to the third aspect of the present invention, when the duty of the signal pattern representing one bit deviates beyond a predetermined range, it is determined that the one-bit data is erroneous. Communication signals within the range can be prevented from being erroneous.
[0057]
According to the fourth aspect of the present invention, even when the cycle of the signal pattern representing one bit is shifted, it is determined that the one-bit data corresponding to the signal pattern in the shifted state is erroneous. It is possible to detect an error in the communication signal based on the range of the duty deviation for performing the communication.
[Brief description of the drawings]
FIG. 1 is a schematic block diagram illustrating a communication system configured using a communication device including an error detection unit, which is an example of an error detection circuit according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating an example of a waveform of a communication signal output from a data transmission / reception unit illustrated in FIG. 1 to a communication path.
FIG. 3 is a block diagram illustrating an example of a configuration of an error detection unit illustrated in FIG. 1;
FIG. 4 is a timing chart for explaining the operation of the error detector shown in FIG. 3;
FIG. 5 is a block diagram illustrating an example of a configuration of an error detection unit illustrated in FIG. 1;
FIG. 6 is a diagram for explaining the contents of a data table stored in an LUT according to a second embodiment of the present invention.
FIG. 7 is a diagram for explaining contents of a data table stored in an LUT according to a third embodiment of the present invention.
FIG. 8 is a diagram for explaining communication data according to a conventional example.
[Explanation of symbols]
1,1a Error detection unit
4 Data transmission / reception unit
5 Communication channel
6 Communication signal
61 signal pattern (first signal pattern)
62 signal pattern (second signal pattern)
110 receiving circuit
111 delay circuit
112 Level change point detection circuit (first and second inversion detection units)
113 counter (measuring unit)
114 Level change point holding circuit (change point storage unit)
115 Data length holding circuit (measurement cycle acquisition unit)
120, 120a Comparison judgment circuit (error judgment unit)
121 Data midpoint holding circuit
122,124 Comparison circuit
123 LUT (judgment value storage unit)
Claims (4)
前記信号パターンは、その周期の途中において該周期に対する所定比率の位置で信号レベルが反転するものであり、
前記通信信号のレベルが所定方向に反転したことを検出する第1の反転検出部と、
前記第1の反転検出部により前記通信信号のレベルの反転が検出された場合に、時間の計測を開始する計測部と、
前記通信信号のレベルが前記所定方向とは逆方向に反転したことを検出する第2の反転検出部と、
前記第2の反転検出部により前記通信信号のレベルの反転が検出された場合に、その時の前記計測部による時間の計測値を変化点計測値として記憶する変化点記憶部と、
前記第1の反転検出部により前記通信信号のレベルの反転が検出された場合に、その時までに前記計測部により計測されていた時間の計測値を周期計測値として取得する計測周期取得部と、
前記変化点記憶部により記憶された変化点計測値と、前記計測周期取得部により取得された周期計測値に基づく所定の判定値との比較結果に応じて前記通信信号の誤りを検出する誤り判定部とを備えた誤り検出回路。An error detection circuit for detecting an error of a communication signal representing data by associating two types of signal patterns having different periods with logical values of 1-bit data, respectively,
In the signal pattern, the signal level is inverted at a position of a predetermined ratio with respect to the cycle in the middle of the cycle,
A first inversion detection unit that detects that the level of the communication signal has been inverted in a predetermined direction;
A measuring unit that starts measuring time when the first inversion detecting unit detects inversion of the level of the communication signal;
A second inversion detection unit that detects that the level of the communication signal has been inverted in a direction opposite to the predetermined direction;
A change point storage unit that stores a time measurement value by the measurement unit as a change point measurement value when the inversion of the level of the communication signal is detected by the second inversion detection unit;
When the first inversion detection unit detects the inversion of the level of the communication signal, a measurement cycle acquisition unit that acquires a measurement value of the time measured by the measurement unit up to that time as a cycle measurement value,
An error determination unit that detects an error in the communication signal based on a comparison result between a change point measurement value stored by the change point storage unit and a predetermined determination value based on a cycle measurement value acquired by the measurement cycle acquisition unit; Error detection circuit comprising:
前記第1の時間に関連付けて、前記第1の信号パターンが正しい場合の前記第2の時間の範囲を記憶し、前記第3の時間に関連付けて、前記第2の信号パターンが正しい場合の前記第4の時間の範囲を記憶し、その記憶している第2の時間の範囲及び第4の時間の範囲のうち前記計測周期取得部により取得された周期計測値に関連付けて記憶している時間の範囲を、前記判定値として前記誤り判定部へ出力する判定値記憶部をさらに備え、
前記誤り判定部は、前記判定値記憶部から出力された前記判定値と前記変化点記憶部により記憶された変化点計測値とを比較し、その比較の結果、その判定値で示される時間の範囲にその変化点計測値が入っていないことを検出した際に前記通信信号の誤りを検出することを特徴とする請求項1記載の誤り検出回路。The two types of signal patterns include a first signal pattern whose cycle is a predetermined first time, and whose signal level is inverted at a second time corresponding to the ratio from the beginning of the cycle, and a cycle thereof. Is a predetermined third time longer than the first time, and a second signal pattern in which the signal level is inverted at a fourth time that is the ratio from the beginning of the cycle,
The second time range when the first signal pattern is correct is stored in association with the first time, and the second time range is stored when the second signal pattern is correct in association with the third time. The fourth time range is stored, and the time stored in the stored second time range and the fourth time range in association with the cycle measurement value acquired by the measurement cycle acquisition unit. A determination value storage unit that outputs the range as the determination value to the error determination unit,
The error determination unit compares the determination value output from the determination value storage unit with the change point measurement value stored by the change point storage unit, and as a result of the comparison, the time indicated by the determination value The error detection circuit according to claim 1, wherein an error of the communication signal is detected when it is detected that the change point measurement value is not included in the range.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003116760A JP2004328103A (en) | 2003-04-22 | 2003-04-22 | Error detector circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003116760A JP2004328103A (en) | 2003-04-22 | 2003-04-22 | Error detector circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004328103A true JP2004328103A (en) | 2004-11-18 |
Family
ID=33496868
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003116760A Pending JP2004328103A (en) | 2003-04-22 | 2003-04-22 | Error detector circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004328103A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007142914A (en) * | 2005-11-21 | 2007-06-07 | Toyota Motor Corp | Communication apparatus |
JP2007295285A (en) * | 2006-04-25 | 2007-11-08 | Toyota Motor Corp | Two-way communication system |
JP2008103940A (en) * | 2006-10-18 | 2008-05-01 | Toyota Motor Corp | Bidirectional communication system |
JP2012091388A (en) * | 2010-10-27 | 2012-05-17 | Kyocera Mita Corp | Communication device and image forming device with the same |
JP2012514789A (en) * | 2009-01-07 | 2012-06-28 | マイクロン テクノロジー, インク. | Method and system for power consumption management of a pattern recognition processor |
US11151140B2 (en) | 2009-12-15 | 2021-10-19 | Micron Technology, Inc. | Methods and apparatuses for reducing power consumption in a pattern recognition processor |
-
2003
- 2003-04-22 JP JP2003116760A patent/JP2004328103A/en active Pending
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007142914A (en) * | 2005-11-21 | 2007-06-07 | Toyota Motor Corp | Communication apparatus |
US7769091B2 (en) | 2005-11-21 | 2010-08-03 | Toyota Jidosha Kabushiki Kaisha | Communication system |
JP4525569B2 (en) * | 2005-11-21 | 2010-08-18 | トヨタ自動車株式会社 | Communication device |
CN1972180B (en) * | 2005-11-21 | 2010-10-27 | 丰田自动车株式会社 | Communication system |
JP2007295285A (en) * | 2006-04-25 | 2007-11-08 | Toyota Motor Corp | Two-way communication system |
JP4572865B2 (en) * | 2006-04-25 | 2010-11-04 | トヨタ自動車株式会社 | Two-way communication system |
JP2008103940A (en) * | 2006-10-18 | 2008-05-01 | Toyota Motor Corp | Bidirectional communication system |
JP2012514789A (en) * | 2009-01-07 | 2012-06-28 | マイクロン テクノロジー, インク. | Method and system for power consumption management of a pattern recognition processor |
US9389833B2 (en) | 2009-01-07 | 2016-07-12 | Micron Technology, Inc. | Method and system to dynamically power-down a block of a pattern-recognition processor |
US10152113B2 (en) | 2009-01-07 | 2018-12-11 | Micron Technology, Inc. | Dynamic power-down of a block of a pattern-recognition processor |
US11151140B2 (en) | 2009-12-15 | 2021-10-19 | Micron Technology, Inc. | Methods and apparatuses for reducing power consumption in a pattern recognition processor |
JP2012091388A (en) * | 2010-10-27 | 2012-05-17 | Kyocera Mita Corp | Communication device and image forming device with the same |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH06326611A (en) | Method and circuit for sensing validity of data coded using manchester code | |
US20060087352A1 (en) | Frequency lock detector | |
US9020081B2 (en) | Diversity control method and wireless communication apparatus | |
JP2004040330A (en) | Detector circuit for synchronnizationi error | |
JP2004328103A (en) | Error detector circuit | |
US7570664B2 (en) | Synchronization correction circuit for correcting the period of clock signals | |
JP2005165768A (en) | Position indicator and position detector | |
US20020008548A1 (en) | Device for detecting abnormality of clock signal | |
JP2006211510A (en) | Demodulation device | |
KR100247601B1 (en) | Reception of a selective call radio signal by using threshold levels detected in the signal in calculating optimum threshold levels | |
JP2007259233A (en) | Ber monitoring circuit | |
JP2003134098A (en) | Serial receiver | |
JP4753484B2 (en) | Time information detection method, time information detection device, and radio wave correction clock | |
US20060007033A1 (en) | Information transmitting device | |
CN113824545B (en) | Asynchronous communication method, device and related equipment | |
JP5383856B2 (en) | Transmitter circuit | |
JP2002286877A (en) | Method and apparatus of deciding start timing of time frame, time information detector and radio-controlled clock | |
US20080123778A1 (en) | Data receiving apparatus | |
JP2004233179A (en) | Ac signal measuring device | |
JP4420092B2 (en) | Frequency discrimination circuit and sampling frequency converter | |
JP5359913B2 (en) | Radio receiver and radio clock | |
US11341015B2 (en) | UART receiver with adaptive sample timing control using a numerically-controlled oscillator | |
JP7021585B2 (en) | Radio correction clock | |
KR20060120219A (en) | A method and a system for generating an adaptive slicer threshold | |
JP2006237930A (en) | Judging method of manchester code |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051012 |
|
A977 | Report on retrieval |
Effective date: 20070705 Free format text: JAPANESE INTERMEDIATE CODE: A971007 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070710 |
|
A521 | Written amendment |
Effective date: 20070828 Free format text: JAPANESE INTERMEDIATE CODE: A523 |
|
A131 | Notification of reasons for refusal |
Effective date: 20080108 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20080508 |