JP2004328103A - Error detector circuit - Google Patents

Error detector circuit Download PDF

Info

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
Application number
JP2003116760A
Other languages
Japanese (ja)
Inventor
Satoshi Hyodo
聡 兵頭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP2003116760A priority Critical patent/JP2004328103A/en
Publication of JP2004328103A publication Critical patent/JP2004328103A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an error detector circuit which quickly detects the error of communication data. <P>SOLUTION: The detector circuit comprises a level change point detector circuit 112 for detecting the rise and fall of a communication signal, a counter 113 for starting the measurement of the time when the detector circuit 112 outputs a rise detection signal UP, a level change point hold circuit 114 for storing the count value of the counter 113 as a change point measured value at the time when the detector circuit 112 outputs a fall detection signal DOWN, a data length hold circuit 115 for storing the count value of the counter 113 as a period measured value up to the time when the detector circuit 112 outputs the rise detection signal UP, and a comparison decision circuit 120 for detecting the error of communication signals according to the result of comparing the change point measured value stored in the level change point hold circuit 114 with a specified criterion based on the period measured value stored in the data length hold circuit 115. <P>COPYRIGHT: (C)2005,JPO&NCIPI

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 claim 1 is an error detection circuit for detecting an error in a communication signal representing data by associating two types of signal patterns having different periods with logical values of 1-bit data, respectively. The pattern is such that the signal level is inverted at a position of a predetermined ratio with respect to the period in the middle of the period, a first inversion detecting unit for detecting that the level of the communication signal is inverted in a predetermined direction, and When the inversion detection unit detects inversion of the level of the communication signal, a measurement unit that starts measuring time, and detects that the level of the communication signal is inverted in a direction opposite to the predetermined direction. A second inversion detection unit, and when the inversion of the level of the communication signal is detected by the second inversion detection unit, stores a time measurement value by the measurement unit at that time as a change point measurement value. When the inversion of the level of the communication signal is detected by the transition point storage unit and the first inversion detection unit, a measurement value of the time measured by the measurement unit up to that time is acquired as a cycle measurement value. A measurement cycle acquisition unit, and a change point measurement value stored by the change point storage unit, and the communication signal of the communication signal according to a comparison result of a predetermined determination value based on the cycle measurement value acquired by the measurement cycle acquisition unit. An error determination unit for detecting an error.
[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 communication device 2 including an error detection unit 1 which is an example of an error detection circuit according to a first embodiment of the present invention. The communication device 2 illustrated in FIG. 1 includes a control unit 3, a data transmission / reception unit 4, and an error detection unit 1, and is connected to another communication device 2 via a communication path 5 so as to be able to transmit and receive data.
[0017]
The control unit 3 controls the operation of the communication device 2, and is configured using, for example, a microcomputer or the like. The control unit 3 executes a predetermined device control program, and communicates through the data transmission / reception unit 4 and the communication path 5. It transmits and receives data to and from another communication device 2. Further, for example, the control unit 3 has a power saving mode for reducing current consumption by lowering the operation frequency of the control unit 3 or stopping power supply to a predetermined circuit block inside the control unit 3. are doing. Then, for example, when receiving an error detection signal ERR indicating that the received data has an error from the error detection unit 1, the control unit 3 shifts from the normal operation state to the power saving mode.
[0018]
The data transmission / reception unit 4 converts the data output from the control unit 3 into a predetermined communication signal, transmits the communication signal to another communication device 2 via the communication channel 5, and transmits the communication channel 5 from the other communication device 2 to the communication channel 5. The control unit 3 converts the communication signal transmitted through the control unit into data that can be processed by the control unit 3 and outputs the data to the control unit 3.
[0019]
FIG. 2 is a diagram illustrating an example of a waveform of a communication signal output from the data transmission / reception unit 4 to the communication path 5. The communication signal 6 shown in FIG. 2 represents “0” by a signal pattern 61 (first signal pattern) having a period T1 of 300 μsec and a duty of 50% (predetermined time ratio), for example, a period T2 of 600 μsec and a duty of 50%. Is represented by a signal pattern 62 (second signal pattern). The periods of the signal patterns 61 and 62 may be different from each other, and the duty is not limited to 50%, but may be, for example, 30% or 60%.
[0020]
The error detection unit 1 acquires the reception signal RIN from the communication path 5 and performs error detection. Then, when detecting an error from the received signal RIN, the error detection unit 1 outputs an error detection signal ERR indicating that the received signal RIN has an error to the control unit 3.
[0021]
FIG. 3 is a block diagram for explaining an example of the configuration of the error detection unit 1. The error detection unit 1 illustrated in FIG. 3 includes a reception circuit 110 and a comparison and determination circuit 120. The receiving circuit 110 includes a delay circuit 111, a level change point detection circuit 112, a counter 113, a level change point holding circuit 114, and a data length holding circuit 115. The comparison determination circuit 120 includes a data midpoint holding circuit 121 and a comparison circuit 122.
[0022]
First, the configuration of the receiving circuit 110 will be described. The delay circuit 111 is a delay circuit that generates a delay signal RIND by delaying the reception signal RIN by a predetermined time as a pre-process of detecting a change point of the signal level by the level change point detection circuit 112. In this case, the delay time of the delay circuit 111 may be, for example, about the hold time required by the logic circuit configuring the level change point detection circuit 112, for example, about 20 nsec.
[0023]
Based on the received signal RIN and the delay signal RIND, the level change point detection circuit 112 indicates that the rising of the received signal RIN has been detected when detecting the start and end of the signal cycle. The rising detection signal UP is output to the counter 113 and the data length holding circuit 115, and when the falling of the reception signal RIN, that is, inversion of the signal level in the middle of the signal cycle is detected, the detection of the falling of the reception signal RIN is detected. The falling edge detection signal DOWN is output to the level change point holding circuit 114. Specifically, the level change point detection circuit 112 detects the rising of the reception signal RIN when the reception signal RIN is at a high level and the delay signal RIND is at a low level, and when the reception signal RIN is at a low level and the delay signal RIND Is high level, the falling of the received signal RIN is detected.
[0024]
Note that the level change point detection circuit 112 may output the detection signal UP so that the counter 113 starts counting when the reception signal RIN is at a high level and the delay signal RIND is at a low level, for example. Further, for example, when the level change point detection circuit 112 detects that the level of the reception signal RIN and the delay signal RIND are different after the counter 113 starts counting, the level change point holding circuit 114 A configuration may be employed in which the falling detection signal DOWN is output to the memory to store the value. When the level change point detection circuit 112 detects that the level of the reception signal RIN is different from the level of the delay signal RIND for the second time after the counter 113 starts counting, the level change point detection circuit 112 May be configured to output the falling detection signal DOWN in order to store the counter value.
[0025]
The level change point detection circuit 112 outputs a rising detection signal UP indicating that the rising of the reception signal RIN has been detected to the counter 113 and the data length holding circuit 115 based on the reception signal RIN and the delay signal RIND. However, the level change point detection circuit 112 does not output the rising detection signal UP to the counter 113 and the data length holding circuit 115, and the counter 113 and the data length holding circuit 115 output the rising edge detection signal UP based on the reception signal RIN and the delay signal RIND, respectively. In addition, a configuration may be adopted in which a circuit unit that detects the rise of the reception signal RIN is provided as the first inversion detection unit.
[0026]
The counter 113 is a counter that measures time by counting, for example, a 3 MHz clock signal. When the counter 113 receives a rising detection signal UP indicating that the rising of the reception signal RIN has been detected from the level change point detection circuit 112, Time measurement starts from 0. The counter 113 outputs the count value to the level change point holding circuit 114 and the data length holding circuit 115.
[0027]
The level change point holding circuit 114 is, for example, a storage unit including a register or the like, and when receiving a falling detection signal DOWN indicating that the falling of the reception signal RIN has been detected from the level change point detection circuit 112, The count value output from the counter 113 is stored as a level change point value m, and the stored level change point value m is output to the comparison circuit 122.
[0028]
The data length holding circuit 115 is a storage unit including, for example, a register, and receives a rising detection signal UP indicating that the rising of the reception signal RIN has been detected from the level change point detection circuit 112. The output count value is stored as the data length n, and the stored data length n is output to the data midpoint holding circuit 121.
[0029]
Next, the configuration of the comparison determination circuit 120 will be described. The data midpoint holding circuit 121 shifts the data length n output from the data length holding circuit 115 to the right by one bit to generate n / 2, which is data indicating a half cycle length of the reception signal RIN, and , And outputs half cycle length data n / 2 (predetermined judgment value) to comparison circuit 122.
[0030]
The comparison circuit 122 compares the half cycle length data n / 2 output from the data middle point holding circuit 121 with the level change point value m output from the level change point holding circuit 114, and compares the half cycle length data n / When the value 2 does not match the level change point value m, an error detection signal ERR indicating that the received signal RIN has an error is output to the control unit 3.
[0031]
When the duty of the signal patterns 61 and 62 is, for example, 30% or 60%, the data middle point holding circuit 121 replaces the half cycle length data n / 2 with, for example, n × 3 / A configuration in which the calculated value of 10 or n × 6/10 is output to the comparison circuit 122 may be employed.
[0032]
Next, the operation of the error detection unit 1 shown in FIG. 3 will be described. FIG. 4 is a timing chart for explaining the operation of the error detector 1 shown in FIG. First, a delay signal RIND is generated by delaying the reception signal RIN by the delay circuit 111. 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 point detection circuit 112 detects the rise of the reception signal RIN. The signal UP is output to the counter 113, and the counter 113 starts counting clock signals from 0 (timing indicated by A in the figure).
[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 point detection circuit 112. The falling detection signal DOWN is output to the level change point holding circuit 114, and the level change point holding circuit 114 stores the count value output from the counter 113 as the level change point value m and stores the stored level change. The point value m is output to the comparison circuit 122 (the timing indicated by B in the figure).
[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 point detection circuit 112 detects the rise of the reception signal RIN. The signal UP is output to the data length holding circuit 115 and the counter 113. Then, the data length holding circuit 115 stores the count value of the counter 113 as the data length n representing the cycle of the received signal RIN, and outputs the stored data length n to the data midpoint holding circuit 121 (FIG. Timing indicated by middle C). Similarly, after receiving the rising detection signal UP, the counter 113 stores the count value by the data length holding circuit 115, and then starts time measurement of the count value from 0 in order to measure the next signal cycle ( Timing shown by C in the figure).
[0035]
Next, the data middle point holding circuit 121 shifts the data length n output from the data length holding circuit 115 to the right by one bit to generate n / 2, which is data indicating a half cycle length of the received signal RIN, and , Half cycle length data n / 2 are output to comparison circuit 122.
[0036]
Next, the comparison circuit 122 compares the half cycle length data n / 2 output from the data middle point holding circuit 121 with the level change point value m output from the level change point holding circuit 114, and When n / 2 does not match the level change point value m, an error detection signal ERR indicating that there is an error in the received signal RIN is output to the control unit 3, for example, the control unit 3 shifts to the power saving mode. .
[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 error detector 1 shown in FIG. 3 in the following points. That is, the error detection unit 1a shown in FIG. Other configurations are almost the same as those of the error detection unit 1 shown in FIG. 3, and therefore, the characteristic points of the present embodiment will be described below.
[0040]
The comparison determination circuit 120a includes an LUT (Look Up Table) 123 and a comparison circuit 124. The LUT 123 is configured using, for example, a ROM (Read Only Memory) or the like. For each of the signal patterns 61 and 62, the time from the beginning of the cycle of the signal pattern to the inversion of the level is determined to be correct. A data table indicating a range in which a determination can be made is stored.
[0041]
FIG. 6 is a diagram for explaining the contents of the data table stored in the LUT 123. The LUT 123 is associated with the cycle T1 of the signal pattern 61 representing “0” and centered on (T1) / 2 indicating the time (second time) from the beginning of the cycle T1 to the level inversion of the signal pattern 61. , Before and after, a range of a predetermined allowable time X, ie, [(T1) / 2] ± X. Further, the LUT 123 associates the period T2 of the signal pattern 62 representing “1” with (T2) / 2 indicating the time (fourth time) from the beginning of the period T2 until the level is inverted from the beginning of the period T2. As the center, a range of a predetermined allowable range time Y before and after the center, that is, [(T2) / 2] ± Y is stored.
[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 LUT 123 is a value obtained by converting the time into the count value of the counter 113.
[0043]
Then, when the data length n output from the data length holding circuit 115 is T1, the LUT 123 sets [(T1) / 2] + X to the upper limit data MAX (predetermined determination value) and sets [(T1) / 2 ] -X is output to the comparison circuit 124 as the lower limit data MIN (predetermined determination value). On the other hand, when the data length n is T2, the LUT 123 outputs [(T2) / 2] + Y as the upper limit data MAX and outputs [(T2) / 2] −Y as the lower limit data MIN to the comparison circuit 124.
[0044]
When the level change point value m output from the level change point holding circuit 114 exceeds the upper limit data MAX output from the LUT 123 or is smaller than the lower limit data MIN, the comparison circuit 124 determines that the reception signal RIN has an error. An error detection signal ERR indicating the presence is output to the control unit 3.
[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 LUT 123. Other configurations are almost the same as those of the error detection unit 1a according to the second embodiment, and therefore, the characteristic points of the present embodiment will be described below.
[0047]
FIG. 7 is a diagram for explaining the contents of the data table stored in the LUT 123 according to the third embodiment. The data table shown in FIG. 7 is represented by a value obtained by converting the time into the count value of the counter 113. Like the LUT 123 according to the second embodiment, the LUT 123 according to the third embodiment associates the signal pattern 61 with the level T1 from the beginning of the cycle T1 in association with the cycle T1 of the signal pattern 61 representing “0”. A signal pattern representing "1" while storing a range of a predetermined allowable time X before and after (T1) / 2 indicating the time until inversion, ie, [(T1) / 2] ± X. In association with the cycle T2 of 62, the signal pattern 62 is centered around (T2) / 2 indicating the time from the beginning of the cycle T2 to the level inversion, and before and after that, a range of a predetermined allowable range time Y, ie, [( T2) / 2] ± Y is stored.
[0048]
Further, the LUT 123 according to the third embodiment has a data length T1−K obtained by dividing a predetermined time range before and after the cycle T1, for example, a range of 150 μsec to 450 μsec for T1 = 300 μsec for each predetermined time interval K. , T1-2K, T1-3K,..., And the data lengths T1 + K, T1 + 2K, T1 + 3K,. (T1-K) / 2, (T1-2K) / 2, (T1-3K) / 2..., And (T1 + K) / 2, (T1 + 2K) / 2 (T1 + 3K) / 2..., Respectively, before and after the predetermined allowable range time X, ie, [(T1-K) / 2] ± X, [(T1-2K) / 2] ± X , [(T1-3 K) / 2] ± X, [(T1 + K) / 2] ± X, [(T1 + 2K) / 2] ± X, [(T1 + 3K) / 2] ± X ... .
[0049]
Further, the LUT 123 according to the third embodiment includes T2-L, T2 obtained by dividing a predetermined time range before and after the period T2, for example, a range of 451 μsec to 750 μsec for T2 = 600 μsec, at predetermined time intervals L. .. And the data lengths T2 + L, T2 + 2L, T2 + 3L,..., Respectively, the signal pattern 62 having the data length of each time section as one cycle is a level from the beginning of the cycle. (T2-L) / 2, (T2-2L) / 2, (T2-3L) / 2... And (T2 + L) / 2, (T2 + 2L) / 2, (T2 + 3L) ) / 2..., Respectively, before and after the predetermined allowable range time Y, that is, [(T2-L) / 2] ± Y, [(T2-2L) / 2] ± Y, [ (T2-3L) / 2 .. Y and [(T2 + L) / 2] ± Y, [(T2 + 2L) / 2] ± Y, [(T2 + 3L) / 2] ± Y.
[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 counter 113. Further, the LUT 123 uses a value obtained by rounding the data length n to a predetermined number of bits as an input value to the data table by, for example, discarding lower-order bits of the data length n output from the data length holding circuit 115. It is good.
[0051]
Then, according to the data length n output from the data length holding circuit 115, the LUT 123 sets [(T1-K) / 2] + X as the upper limit data MAX when the data length n is T1-K, for example. [(T1-K) / 2] -X is output to the comparison circuit 124 as the lower limit data MIN.
[0052]
Next, when the level change point value m output from the level change point holding circuit 114 exceeds the upper limit data MAX output from the LUT 123 or is smaller than the lower limit data MIN, the comparison circuit 124 And outputs an error detection signal ERR indicating that there is an error to the control unit 3.
[0053]
As a result, even if the period of the signal pattern representing one bit is shifted in the received signal RIN, the LUT 123 is a signal for determining that the signal pattern is a correct signal pattern in accordance with the shift of the period. The level change position range can be output to the comparison circuit 124 as the upper limit data MAX and the lower limit data MIN, and the comparison circuit 124 detects that 1-bit data corresponding to the signal pattern whose cycle is shifted is incorrect. It is possible to detect an error in the communication signal based on the range of the duty deviation for determining that there is the error.
[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)

周期が異なる2種類の信号パターンを、1ビットのデータの論理値にそれぞれ対応させてデータを表す通信信号の誤りを検出する誤り検出回路であって、
前記信号パターンは、その周期の途中において該周期に対する所定比率の位置で信号レベルが反転するものであり、
前記通信信号のレベルが所定方向に反転したことを検出する第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記載の誤り検出回路。When the error determination unit determines that the comparison result between the change point measurement value stored by the change point storage unit and a value obtained by multiplying the ratio by the cycle measurement value acquired by the measurement cycle acquisition unit does not match. 2. The error detection circuit according to claim 1, wherein an error of the communication signal is detected. 前記2種類の信号パターンは、その周期が所定の第1の時間であると共に、その周期の初めからの前記比率となる第2の時間で信号レベルが反転する第1の信号パターンと、その周期が前記第1の時間よりも長い所定の第3の時間であると共に、その周期の初めから前記比率となる第4の時間で信号レベルが反転する第2の信号パターンとからなり、
前記第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.
前記判定値記憶部は、さらに、前記第1の信号パターンの周期として許容される複数の時間の範囲にそれぞれ関連付けて、前記第1の信号パターンが正しい場合の前記第2の時間の範囲をそれぞれ記憶し、前記第2の信号パターンの周期として許容される複数の時間の範囲にそれぞれ関連付けて、前記第2の信号パターンが正しい場合の前記第4の時間の範囲をそれぞれ記憶すると共に、その複数記憶している第2の時間の範囲及び第4の時間の範囲のうち前記計測周期取得部により取得された周期計測値に関連付けて記憶している時間の範囲を、前記判定値として前記誤り判定部へ出力することを特徴とする請求項3記載の誤り検出回路。The determination value storage unit further associates each of the plurality of time ranges allowed as the cycle of the first signal pattern with each of the second time ranges when the first signal pattern is correct. And storing the fourth time range when the second signal pattern is correct, in association with a plurality of time ranges allowed as the cycle of the second signal pattern. The time range stored in association with the cycle measurement value acquired by the measurement cycle acquisition unit out of the stored second time range and fourth time range is used as the determination value as the error determination. 4. An error detection circuit according to claim 3, wherein the error detection circuit outputs the error detection signal.
JP2003116760A 2003-04-22 2003-04-22 Error detector circuit Pending JP2004328103A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (12)

* Cited by examiner, † Cited by third party
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