JP2004040708A - Data filtering apparatus - Google Patents

Data filtering apparatus Download PDF

Info

Publication number
JP2004040708A
JP2004040708A JP2002198617A JP2002198617A JP2004040708A JP 2004040708 A JP2004040708 A JP 2004040708A JP 2002198617 A JP2002198617 A JP 2002198617A JP 2002198617 A JP2002198617 A JP 2002198617A JP 2004040708 A JP2004040708 A JP 2004040708A
Authority
JP
Japan
Prior art keywords
data
frame
circuit
memory
filtering
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
JP2002198617A
Other languages
Japanese (ja)
Inventor
Mitsuo Tokiwa
常盤 光男
Fujihiko Urabe
浦辺 富士彦
Minoru Hashimoto
橋本 稔
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.)
AVAL DATA CORP
Original Assignee
AVAL DATA CORP
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 AVAL DATA CORP filed Critical AVAL DATA CORP
Priority to JP2002198617A priority Critical patent/JP2004040708A/en
Publication of JP2004040708A publication Critical patent/JP2004040708A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data filtering apparatus in which high-speed flexible data filtering is performed in a simple configuration. <P>SOLUTION: As a data pattern generating circuit, a counter circuit 33 successively generates pattern data CNT[5:0] corresponding to a position in a data frame synchronously with frame data MRD[7:0] and inputs the pattern data to an address input terminal of a memory 36 together with the frame data MRD[7:0]. As a result, the frame data MRD[7:0] and the pattern data CNT[5:0] are stored in a designated address. Data having a value indicating whether or not the value of the frame data MRD[7:0] fulfills selection conditions are outputted from the memory 36. Based upon the data value, a judging circuit 40 judges whether or not the inputted data frame is to be outputted. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、データフィルタリング装置に係り、より詳しくは、入力したデータフレームを選択的に出力するデータフィルタリング装置に関する。
【0002】
【従来の技術】
近年における通信システムでは、データフレームと称されるデータのブロックを基本単位としてデータ通信が行われている。こうしたデータフレームは、通信規約(以下、単に「プロトコル」)に従って構成されており、複雑な構造を有している。このため、通信ネットワークに接続される通信機器においては、通信ネットワーク中を伝送される様々なデータフレームの内から、必要なデータフレームを選別するデータフィルタリング機能が必須の機能となっている。
【0003】
以上のようなデータフィルタリング機能は、例えば、通信端末用のパーソナルコンピュータのMAC(Media Access Control)コントローラ、ルータ等のような中継装置、及びファイアウォール等のようなセキュリティ向上のための装置には必ず実装されている。また、通信ネットワークの障害や性能(パフォーマンス)を調査する目的で使用されるプロトコルアナライザや、RMON(Remote Network Monitoring)プローブと呼ばれる機器では、そのときどきにおける様々な条件に従ってデータフレームを選択することが必要となるため、様々なデータフィルタリングを行うことができる汎用的なデータフィルタリング機能が実装されている。
【0004】
こうしたデータフィルタリング機能を実現するにあたり、従来から様々な技術が提案される。こうした従来からの提案技術には、大きく分けて、ソフトウエア方式とハードウエア方式とがあった。
【0005】
ソフトウエア方式においては、データフィルタリングのアルゴリズムをプログラムで実行することにより、様々な態様のデータフィルタリング機能を実現する方法が一般的に使用されている。一方、ハードウエア方式においては、ASIC(Application Specific Integrated Circuit)の手法を用いた専用のLSI(Large Scale Integrated Circuit)を使用して、データフィルタリング機能を実現する方法が一般的に使用されている。かかるハードウエア方式では、近年では、各メモリセルに対して排他論理和(Exclusive OR)を1対1で用意しているCAM(Content Address Memory)と呼ばれる特殊なメモリを使用することが一般的となっている。
【0006】
【発明が解決しようとする課題】
上述したような、従来のソフトウエア方式によるデータフィルタリング機能の実現では、データフィルタリングのアルゴリズムをプログラムで実行するので、そのアルゴリズムの変更や修正が容易であり、汎用性及び柔軟性の高いデータフィルタリング装置を提供することができる。しかしながら、プログラムの実行によるデータフィルタリングでは、そのデータフィルタリング処理にある程度の時間を必要とするため、高速で伝送されるデータフレームには不向きである。
【0007】
このため、10Mbps→100Mbps→1Gbps→10Gbpsというように進化しつつある近年のローカルエリアネットワーク(Local Area Network)の伝送規格における伝送速度の高速化を鑑みると、ソフトウエア方式によるデータフィルタリングでは、伝送速度の高速化に適切に対応することが困難である。また、比較的低速な伝送速度で伝送されるデータフレームであっても、データフィルタリングの条件が複雑化した場合には、データフィルタリング処理に長い時間を要することになるので、データフレームの伝送時間に対してデータフィルタリング処理が間に合わないといった事態が生じ得る。
【0008】
一方、従来のハードウエア方式によってデータフィルタリング機能を実現しようとする場合には、データフィルタリングのアルゴリズムをハードウエア回路で実行する。このため、上述したソフトウエア方式と比べてデータフィルタリング処理速度が格段に速く、データフレームの伝送にデータフィルタリング処理が間に合わないということはない。しかしながら、実装できるデータフィルタリングのアルゴリズムの数には限りがあり、また、変更や修正に対して柔軟に対応することが困難である。
【0009】
また、従来のハードウエア方式において上述したCAMを使用する場合には、データフィルタリングのアルゴリズムの変更や修正に対する柔軟性は向上するが、CAMは汎用のメモリではなく、入手性がよいとはいい難い。また、比較的複雑な条件でデータフィルタリングを行う場合にも、大規模な回路構成となってしまう。
【0010】
本発明は、上記のような事情を鑑みてなされたものであり、簡易な構成で、高速かつ柔軟なデータフィルタリングをすることができるデータフィルタリング装置を提供することを目的とする。
【0011】
【課題を解決するための手段】
本発明のデータフィルタリング装置は、入力したデータフレームを選択的に出力するデータフィルタリング装置であって、前記データフレームにおける位置に応じたパターンデータを、前記特定位置のデータの入力に同期して順次発生するデータパターン発生回路と;前記データフレームのデータ及び前記データパターン発生手段が発生したパターンデータをアドレス入力端子から入力し、前記データフレームにおける位置それぞれにおけるデータ値及び前記データフレームにおける位置それぞれに応じたパターンデータ値で定まるアドレスに格納された、前記データフレームにおける位置それぞれのデータ値が前記データフレームの選択出力条件を満たすか否かを示すデータを出力する書き換え可能なメモリと;前記メモリから出力されたデータ値に基づいて、前記入力したデータフレームを出力するか否かを判定する判定回路と;を備えるデータフィルタリング装置である。
【0012】
このデータフィルタリング装置は、送信元アドレスや受信先アドレスといったデータフレームに含まれる特定情報のデータ値に応じて選択的にデータフレームを透過するデータフィルタリングを行う。かかるデータフィルタリング処理にあたり、このデータフィルタリング装置では、データパターン発生回路がデータフレームにおける位置に応じたパターンデータを、前記特定位置のデータの入力に同期して順次発生する。こうしてデータパターン発生回路により発生されたパターンデータは、メモリのアドレス入力端子の一部に入力する。また、データフレームのデータがメモリのアドレス入力端子の他の一部に入力する。
【0013】
データフレームのデータ及びデータフレームにおける位置に応じたパターンデータがアドレス入力端子に入力すると、その位置のデータの値及びその位置に応じたパターンデータの値に応じたアドレスに格納されている、受信したその特定位置のデータの値が選択条件を満たすか否かを示すデータ値となっているデータが、メモリから出力される。こうしてメモリから出力されたデータ値に基づいて、判定回路が入力したデータフレームを出力するか否かを判定する。
【0014】
したがって、本発明のデータフィルタリング装置では、メモリの格納データを必要に応じて書き換えることにより、様々なデータフィルタリングのアルゴリズムに対して柔軟に対応して、デーフィルタリング処理を行うことができる。したがって、本発明のデータフィルタリング装置によれば、汎用のメモリを使用した簡易な構成で、高速かつ柔軟にデータフィルタリングをすることができ、かつ、数多くのフィルタリング条件を設定できる汎用的なデータフィルタリング装置を実現することができる。
【0015】
本発明のデータフィルタリング装置では、前記データパターン発生回路として、例えばカウンタ回路を備える構成とすることができる。かかる場合には、データフレームにおける位置それぞれに応じて、それぞれ異なるパターンデータを容易に発生することができる。
【0016】
また、本発明のデータフィルタリング装置では、前記データパターン発生回路が、前記データフレームにおける位置ごとに応じて複数種類のパターンデータを時間順次に発生する構成とすることができる。かかる場合には、データフレームにおける位置ごとに応じてデータパターン発生回路が発生する複数種類のパターンデータの種類ごとに、互いに異なる複数のデータフレームの選択出力条件を満たすか否かを判断することができる。すなわち、データフレームの入力に同期して、時分割型で、複数のデータフィルタリング処理を行うことができる。
【0017】
また、本発明のデータフィルタリング装置では、前記メモリが複数ビットのデータを並列的に出力し、前記メモリには、前記複数ビットそれぞれに応じて互いに異なる前記データフレームの選択出力条件を満たすか否かを示すデータが格納される構成とすることができる。かかる場合には、データフレームの入力に同期して、並列処理型で、複数のデータフィルタリング処理を行うことができる。
【0018】
また、本発明のデータフィルタリング装置では、第1のビット幅で順次入力する前記データフレームのデータを、第2のビット幅のデータ列に変換し、前記メモリへ向けて出力するデータ幅変換回路を更に備える構成とすることができる。例えば、伝送路がシリアル伝送路であるときには、第1のビット幅を「1」となるが、メモリへのフレームデータの入力幅すなわち第2のビット幅を複数ビット幅とする場合には、データ幅変換回路としてシリアルパラレル変換器を使用することができる。かかる場合には、高速な伝送速度で伝送されるデータフレームであっても、第2のビット幅を大きくとることにより、メモリのアクセス時間を満たす回路を容易に構成することができるようになる。なお、第2のビット幅を大きくとることにより、1つのメモリではアドレス入力端子の数が足りなくなる場合には、複数のメモリを並列に配置して、これら複数のメモリのアドレス入力端子に第2のビット幅のデータを並行して入力させるようにすることができる。この場合には、これら複数のメモリそれぞれから出力される、同一のフィルタリング条件に関連するビットデータ値の組合論理値(例えば、論理積値)を判定回路で算出することとすればよい。
【0019】
また、本発明のデータフィルタリング装置では、前記メモリに所定のデータを書き込むデータ書込装置を更に備える構成とすることができる。かかる場合には、必要に応じて、データ書込装置によってメモリのデータを書き換えることにより、データフィルタリングのアルゴリズムを簡単に変更又は修正することができる。したがって、データフィルタリング処理の汎用性及び柔軟性を向上することができる。
【0020】
【発明の実施の形態】
以下、本発明の一実施形態を、図1〜図10を参照して説明する。
【0021】
図1には、本発明の一実施形態に係るデータフィルタリング装置100の概略的な構成がブロック図にて示されている。このデータフィルタリング装置100は、第1のイーサネット(登録商標)LAN1において伝送されているデータフレームを受信し、予め定められた条件に合致するデータフレームのみを選択的に第2のイーサネットLAN2へ向けて送信する装置である。
【0022】
ここで、データフレームの内容は、図2に示されるように、6バイト(48ビット)の受信(宛先)アドレス、6バイト(48ビット)の送信(発信元)アドレス、2バイト(16ビット)のタイプ表示、任意長(最大1500バイト)のデータ、及び4バイト(32ビット)のFCS(フレーム・チェック・シーケンス)から構成されている。そして、場合によっては、最大448バイトの拡張部が付加される。
【0023】
なお、以下の説明において、複数ビットのデータやアドレスについては、含まれるビット番号が連続的であり、そのビット番号の範囲を明示する必要がある場合には、ビット番号X〜ビット番号Y(X<Y)であることを示すために、符号の後に[Y:X]の表記を付すものとする。また、データ信号及びアドレス信号の各ビットでは、信号のレベルが「H(高レベル)」で論理「1」であり、「L(低レベル)」で論理「0」であるものとする。また、その他の制御信号では、信号のレベルが「H(高レベル)」で有意であり、「L(低レベル)」で非有意であるものとする。
【0024】
図1に示されるように、このデータフィルタリング装置100は、受信用物理層回路10R、受信用MACコントローラ12R、フィルタリングアルゴリズムを実行するフィルタリング回路14、フレームバッファ16、基本タイミング発生回路18、及びデータフィルタリング装置100を統括制御する処理装置20を備えている。ここで、処理装置20には、CRTディスプレイ装置や液晶ディスプレイ装置等の表示装置22、及び、キーボードやマウス等の入力装置24が接続されている。また、データフィルタリング装置100は、送信用物理層回路10D及び送信用MACコントローラ12Dを備えている。
【0025】
前記受信用物理層回路10Rは、レシーバ回路を備え、第1のイーサネットLAN1の伝送媒体(同軸ケーブル等)を伝送されるデータ信号NRDを受信してビット同期をとり、ビットシリアル形式の受信物理層データPRDを生成して出力する。なお、受信用物理層回路10Rとしては、市販のイーサネット用ドライバ/レシーバを使用することができる。
【0026】
前記受信用MACコントローラ12Rは、受信物理層データPRDを入力してフレーム同期をとり、フレームデータバイトを受信MACデータMRD[7:0]として出力する。すなわち、受信用MACコントローラ12Rは、ビットシリアルの形式で入力した受信物理層データPRDを、フレームの先頭と最後を示すフラグパターン部を除去した後に、バイトシリアルの形式でフレームデータバイトを受信MACデータMRD[7:0]として出力する。ここで、フレーム同期がとられると、受信用MACコントローラ12Rは、フレームを受信した旨を、フレーム受信信号FDRを有意(「H」)とすることによって基本タイミング発生回路18に通知する。そして、基本タイミング発生回路18から供給されるMACデータ読出信号FRDに同期して、受信MACデータMRD[7:0]として順次出力させる。ここで、本実施形態のMACコントローラ12では、MACデータ読出信号FRDに応じて、図2に示されるようなフォーマットのフレームデータを受信順に(すなわち、受信アドレスの上位8ビット分から順次)出力する。
【0027】
前記フィルタリング回路14は、受信MACデータMRD[7:0]を入力し、入力した受信MACデータMRD[7:0]が所定のフィルタリング条件、例えば所定の受信先アドレスを含むか否かをデータフレームごとに検出する。そして、フィルタリング条件を満たすデータフレームについては、第2のイーサネットLAN2へ向けて送信すべき旨をフレームデータ送信指令信号FMSによって通知するとともに、フィルタリング条件を満たさないデータフレームについては、フレームデータを廃棄すべき旨をフレームデータ廃棄指令信号FMRによって通知する。なお、フィルタリング回路14の構成については後述する。
【0028】
前記フレームバッファ回路16は、ファストイン・ファストアウト(FIFIO)型のデータバッファであり、8ビット幅の受信MACデータMRD[7:0]を入力し、一時的に格納する。そして、フレームバッファ回路16は、フィルタリング回路14からのフレームデータ送信指令信号FMS又はフレームデータ廃棄指令信号FMRに応じて、一時的に格納したフレームデータを出力可能状態としたり、廃棄したりする。このフレームバッファ回路16では、フレームデータ送信指令信号FMSを受信してフレームデータの出力可能状態となると、データレディ信号DTRを基本タイミング発生回路18へ向けて出力する。ここで、フレームバッファ回路16へのデータ書き込みは、基本タイミング発生回路18が発生するフレームバッファ書込信号FBIに応じて行われる。また、フレームバッファ回路16からデータ読み出しは、基本タイミング発生回路18が発生するフレームバッファ読出信号FBOに応じて行われる。
【0029】
前記送信用MACコントローラ12Dは、フレームバッファ回路16から出力された8ビット幅の送信フレームデータSMD[7:0]を順次受信する。この送信用MACコントローラ12Dは、基本タイミング発生回路18から供給される送信フレームデータ期間信号FDPにより、フレームデータの開始と終了とを認識するとともに、基本タイミング発生回路18から供給される送信フレームデータ書込信号FDWに応じて、バイトシリアルの形式でフレームバッファ16から出力された送信フレームデータSMD[7:0]を読み込む。そして、フレームデータの先頭と最後を示すフラグパターン部を付加した後に、ビットシリアルの形式で送信物理層データPRDを出力する。
【0030】
前記送信用物理層回路10Dは、ドライバ回路を備え、ビットシリアル形式の送信物理層データPSDを第2のイーサネットLAN2の伝送媒体(同軸ケーブル等)上を伝送されるべき信号に適合した信号に変換して、第2のイーサネットLAN2の伝送媒体へ向けて出力する。なお、送信用物理層回路10Dとしては、市販のイーサネット用ドライバ/レシーバを使用することができる。
【0031】
前記基本タイミング発生回路18は、受信MACコントローラ12Rからのフレーム受信信号FDRに応じて、上述したMACデータ読出信号FRD及びフレームバッファ書込信号FBIを発生する。また、基本タイミング発生回路18は、フレームバッファ回路16からのデータ出力可能信号DTRに応じて、上述したフレームバッファ読出信号FBO、送信フレームデータ期間信号FDP及び送信フレームデータ書込信号FDWを発生する。さらに、基本タイミング発生回路18は、フィルタリング回路14の動作用タイミング信号であるビット同期クロックCLK0及びフィルタリング演算期間信号FLPを発生するようになっている。なお、基本タイミング発生回路18は、状態マシンとして構成することができる。
【0032】
前記処理回路20は、マイクロプロセッサ及びその周辺回路から構成され、データフィルタリング装置100全体を統括制御する。また、処理回路20は、入力装置24から入力されたデータフィルタリング条件に応じたデータを、フィルタリング回路14の後述するメモリ36に書き込む。かかるデータ書き込みにあたって、処理回路20は、14ビット幅のメモリアドレスFLA(FLA[13:0])、8ビット幅のメモリデータFLD(FLD[7:0])、メモリ書込信号FLW、及びメモリ書込モード信号FLSをフィルタリング回路14に供給する。また、処理回路20は、入力装置24から入力されたフィルタリング実行指示に従って、基本タイミング発生回路18へ向けてフィルタリング実行指示信号FLTを出力する。
【0033】
また、処理回路20は、フレームバッファ回路14から出力された送信フレームデータSMDを入力し、表示装置22に表示するようになっている。
【0034】
前記フィルタリング回路14は、図3に示されるように、(a)メモリ36と、(b)メモリ36のアドレス入力端子AD[13:0]に入力する信号を選択するセレクタ回路34及びセレクタ回路35と、(c)出力可端子OEが「H」のときに処理回路20からのメモリデータFLD(FLD[7:0])をメモリ36のデータ端子DT[7:0]へ向けて出力する3ステ−ト出力回路37とを備えている。また、フィルタリング回路14は、(d)基本タイミング発生回路18から受信したビット同期クロックCLK0を分周して、ビット同期クロックCLK0の8倍の周期を有するバイト同期クロックを生成する分周回路31と、(e)基本タイミング発生回路18から受信したフィルタリング演算期間信号FLPが有意(「H」)のときのみに分周回路31から出力されたバイト同期クロックをクロックCLK1として出力する論理積回路32と、(f)フィルタリング演算期間信号FLPが非有意(「L」)のときにリセットされ、フィルタリング演算期間信号FLPが有意(「H」)のときに入力したバイト同期クロックの数をカウントしてカウント数を出力端子から6ビット幅データで出力するカウンタ回路33とを備えている。さらに、フィルタリング回路14は、(g)メモリ36から出力されたデータFDT[7:0]を入力し、フィルタリング条件を満たすか否かを判定する判定回路40を備えている。
【0035】
前記メモリ36の書き込み信号端子WEには、処理回路20から出力されたメモリ書込信号FLWが入力している。また、前記3ステ−ト出力回路37の出力可端子OE処理回路20から出力されたメモリ書込モード信号FLSが入力している。
【0036】
前記セレクタ回路34では、セレクタ回路34の出力選択端子Sが「L」のときに選択される入力端子A[5:0]にカウンタ回路33から出力されたカウント数データが入力している。また、セレクタ回路34の出力選択端子Sが「H」のときに選択される入力端子B[5:0]に処理回路20から出力されたメモリアドレスFLA[13:8]が入力している。そして、処理回路20から出力されたメモリ書込モード信号FLSが非有意(「L」)のときには、セレクタ回路34からはカウント数データが出力されて、メモリ36のアドレス入力端子AD[13:8]に入力する。一方、メモリ書込モード信号FLSが有意(「H」)のときには、セレクタ回路34からはメモリアドレスFLA[13:8]が出力されて、メモリ36のアドレス入力端子AD[13:8]に入力する。
【0037】
前記セレクタ回路35では、セレクタ回路35の出力選択端子Sが「L」のときに選択される入力端子A[7:0]に受信用MACコントローラ12Rから出力された受信MACデータMRD[7:0]が入力するとともに、セレクタ回路35の出力選択端子Sが「H」のときに選択される入力端子B[7:0]に処理回路20から出力されたメモリアドレスFLA[7:0]が入力している。そして、処理回路20から出力されたメモリ書込モード信号FLSが非有意(「L」)のときには、セレクタ回路34からは受信MACデータMRD[7:0]が出力されて、メモリ36のアドレス入力端子AD[7:0]に入力する。一方、メモリ書込モード信号FLSが有意(「H」)のときには、セレクタ回路34からはメモリアドレスFLA[7:0]が出力されて、メモリ36のアドレス入力端子AD[7:0]に入力する。
【0038】
前記判定回路40は、図4に示されるように、(i)データFDT7〜FDT0それぞれに応じて設けられた個別判定回路41〜41と、(ii)個別判定回路41〜41から出力された個別判定結果FLR7〜FLR0の論理和を算出して総合判定結果を演算する論理和回路46とを備えている。また、判定回路40は、(iii)フィルタリング演算期間の終了と前後して、順次一時的に有意(「H」)となる第1演算終了信号FPL1及び第2演算終了信号FPL2を生成するフィルタリング演算終了信号生成回路49と、(iv)第1フレーム終了信号FPL1に同期して、論理和回路46から出力されたフィルタリング条件を満たすか否かの総合判定結果をサンプルして保持するサンプリング回路47とを備えている。また、判定回路40は、(v)サンプリング回路47の正転出力端子Qから出力された正転出力と第2フレーム終了信号FPL2との論理積を演算して上述のフレームデータ送信指令信号FMSを生成する論理積回路48Sと、(vi)サンプリング回路47の反転出力端子Qから出力された反転出力と第2フレーム終了信号FPL2との論理積を演算して上述のフレームデータ廃棄指令信号FMSを生成する論理積回路48Rとを備えている。
【0039】
なお、本実施形態では、サンプリング回路47として、立ち上がりエッジトリガ方式のD型フリップフロップ素子を使用している。
【0040】
前記個別判定回路41(j=0〜7)それぞれは、(a)上述したバイト同期クロックCLK1に同期してデータ入力端子Dに入力したデータをサンプルして保持するサンプリング回路43と、(b)サンプリング回路43の正転出力端子Qから出力された正転出力とメモリデータFDTjとの論理積を算出して、サンプリング回路43のデータ入力端子Dへ向けて出力する論理積回路42とを備えている。
【0041】
なお、本実施形態では、サンプリング回路43として、立ち下がりエッジトリガ方式のD型フリップフロップ素子を使用している。また、サンプリング回路43のプリセット端子Sにはフィルタリング演算期間信号FLPが入力されており、フィルタリング演算期間信号FLPが非有意(「L」)のときに、フィルタリング演算期間信号FLPが有意(「H」)の期間における動作に備えて、プリセット端子Sの出力値が「H(論理的な「1」)」に初期化されるようになっている。
【0042】
次に、以上のように構成されたデータフィルタリング装置100の動作について説明する。なお、以下の説明では、第1のイーサネットLAN1におけるデータフレームの内、所定の1つの受信先アドレスRAを有するデータフレームを選択的に第2のイーサネットLAN2へ向けて送信する場合について説明する。ここで、フィルタリング条件となる受信先アドレスRAは6バイトの値は、(RA,RA,RA,RA,RA,RA)であるものとする。なお、受信先アドレスRAの各バイトRA〜RAの添字0〜5は、第1のイーサネットLAN1からの入力における受信順に対応しているものとする。また、以下の説明においては、複数ビットのアドレス値あるいはデータ値を表す場合には4ビット単位で16進表示を用いるものとし、例えば1バイト分の値を「XX」と記すものとする。
【0043】
前提として、データフィルタリング装置100は、初期状態にあり、データフィルタリング動作を開始していないものとする。すなわち、処理回路20は、フィルタリング実行指示信号FLT、メモリ書込モード信号FLS、及びメモリ書込信号FLWを非有意(「L」)としているものとする。また、基本タイミング発生回路18は、ビット同期クロックCK0を発生しているが、フィルタリング演算期間信号FLP、MACデータ読出信号FRD、フレームバッファ書込信号FBI、フレームバッファ読出信号FBO、送信フレームデータ期間信号FDP及び送信フレームデータ書込信号FDWを非有意(「L」)としているものとする。
【0044】
なお、上述のようにフィルタリング条件が1つのみなので、メモリデータビットFDT0のみを使用してフィルタリング演算をするものとする。
【0045】
この状態で、入力装置24からフィルタリング条件として受信先アドレスRAが指定されると、処理回路20は、フィルタリング回路14内のメモリ36へフィルタリング条件を反映したデータを書き込む。かかるデータの書き込みでは、まず、処理回路20は、図5に示されるように、メモリ書込モード信号FLSを有意(「H」)とする。引き続き、処理回路20は、メモリアドレスFLA[13:0]を「0000」から「3FFF」へ順次変化させながら、メモリデータFLD[7:0]を「00」として、メモリ書込信号FLWを一時的に有意(「H」)とすることにより、データ「00」をメモリ36に書き込む。これにより、メモリ36の全アドレスのデータ値が「00」に設定される。
【0046】
次に、処理回路20は、図6に示されるように、メモリアドレスFLA[13:0]を「0k00+RA(k=1〜6)」に順次設定しながら、メモリデータFLD[7:0]を「FF」として、モリ書込信号FLWを一時的に有意とすることにより、データ「01」をメモリ36に書き込む。引き続き、処理回路20は、メモリアドレスFLA[13:0]を「0700」から「3FFF」順次変化させながら、メモリデータFLD[7:0]を「01」として、メモリ書込信号FLWを一時的に有意とすることにより、データ「01」をメモリ36に書き込む。こうして、メモリ36へのフィルタリング条件を反映したデータを書き込みが終了すると、処理回路20は、メモリ書込モード信号FLSを「L」とする。
【0047】
こうしてメモリ36へのフィルタリング条件を反映したデータが書き込まれた後、入力装置24からフィルタリング開始が指定されると、処理回路20は、フィルタリング実行指示信号FLTを有意(「H」)とする。この結果、第1のイーサネットLAN1におけるデータフレームの内、所定の1つの受信先アドレスRAを有するデータフレームを選択的に第2のイーサネットLAN2へ向けて送信するデータフィルタリング動作が開始される。すなわち、ハードウエア回路によるフィルタリング処理期間が開始される。
【0048】
こうしたフィルタリング処理期間において、第1のイーサネットLAN上でデータフレーム転送が行われ、イーサネットの伝送媒体上にデータフレーム信号が発生すると、受信用物理層回路10Rは、そのデータフレーム信号を入力データ信号NRDとして受信する。受信用物理層回路10Rは、物理層プロトコルに従ってビット同期をとり、受信したデータフレームの各ビットのデータ値(「0」又は「1」)を検出する。そして、受信用物理層回路10は、当該検出結果を受信物理層データPRDとして、受信用MACコントローラ12Rへ向けて出力する。
【0049】
受信物理層データPRDを入力した受信用MACコントローラ12Rは、MAC層プロトコルに従って、フレーム同期をとるとともに符号解読し、フレーム再構成を行う。そして、受信用MACコントローラ12Rは、再構成したフレームデータを内蔵のデータバッファに格納する。
【0050】
上記のようにフレームデータの内蔵バッファへの格納を終了すると、図7に示されるように、受信用MACコントローラ12Rは、フレーム受信信号FDRを有意(「H」)として、基本タイミング発生回路18へ、フレームデータの出力準備が整ったことを通知する。基本タイミング発生回路18は、フレーム受信信号FDRが有意となったことを検出すると、フィルタリング演算期間信号FLPを有意(すなわち、「H」)とする。また、基本タイミング発生回路18は、フレーム受信信号FDRを受信すると、MACデータ読出信号FRDを一時的に有意(「H」)として、受信用MACコントローラ12Rに対してフレームデータの出力を許可する。このMACデータ読出信号FRDを受信した受信用MACコントローラ12Rは、フレームデータの最初の1バイトMD{0}を受信MACデータ[7:0]として出力する。
【0051】
かかる最初の1バイトMD{0}を出力中に、基本タイミング発生回路18は、フレームバッファ書込信号FBIを一時的に有意(「H」)とする。この結果、フレームバッファ回路16に最初の1バイトMD{0}が格納される。
【0052】
以後、受信用MACコントローラ12Rの内蔵バッファ内における1フレーム分の残りのフレームデータバイトMD{1}〜MD{N−1}が順次読み出され、フレーム受信信号FDRが非有意(「L」)となるまで、基本タイミング発生回路18は、MACデータ読出信号FRD及びフレームバッファ書込信号FBIを出力する。こうして、受信された1フレーム分のフレームデータバイトMD{0}〜MD{N−1}がフレームバッファ回路16に格納される。
【0053】
一方、受信用MACコントローラ12Rから出力されたフレームデータバイトMD{0}〜MD{N−1}は、フィルタリング回路14にも入力する。そして、フィルタリング回路14では、フィルタリング演算期間信号FLPが有意(「H」)となっている期間、すなわちフィルタリング演算期間におけるフレームデータバイトMD{0}〜MD{3F}が、図8及び図9に示されるように、セレクタ回路35を介してメモリ36のアドレス端子A[7:0]にバイトシリアルの態様で順次入力する。なお、図8は、フレームデータバイトMD{1}が値RAと異なることにより、フィルタリング条件を満たさない場合におけるフィルタリング回路14の動作を示すタイミングチャートである。また、図9は、フレームデータバイトMD{j(j=0〜5)}が値RAであり、フィルタリング条件を満たす場合におけるフィルタリング回路14の動作を示すタイミングチャートである。
【0054】
こうしたフレームデータバイトMD{0}〜MD{3F}の順次入力と同期して、図8及び図9に示されるように、バイト同期クロックCK1により6ビットのカウンタ回路33がカウントアップを行う。このカウントアップは、カウンタ回路33が、フィルタリング演算期間信号FLPが非有意(「L」)の期間にプリセットされることから、カウントチ値が「3F」から開始する。そして、バイト同期クロックCK1が立ち上がる度に1だけインクリメントされる。この結果、フレームデータバイトMD{m(m=0〜3F)}と同期して、カウント値mがカウンタ回路33から出力され、セレクタ回路34を介してメモリ36のアドレス端子A[13:8]に順次入力する。
【0055】
こうしてメモリ36のアドレス端子A[13:0]に「m00+MD{m}」が順次入力する。そして、メモリ36のアドレス「m00+MD{m}」に格納されている8ビットデータがメモリデータFDT[7:0]として出力されて、各ビットFDTj(j=0〜7)の値に基づいて、個別判定回路41それぞれによって、その個別判定回路41が判定すべきフィルタリング条件を満たしているか否かが判定される。なお、上述したように、今回のフィルタリング演算ではメモリデータビットFLD0のみを使用するものとしているので、メモリデータビットFLD0のみに着目して、以下の説明を行う。
【0056】
まず、1番目のフレームデータバイトMD{0}を受信すると、この1番目のフレームデータバイトMD{0}が値RAであるときには、アドレス「0000+RA」に格納されているデータ「01」が、メモリ36から出力される。一方、1番目のフレームデータバイトMD{0}が値RAではないときには、アドレス「0000+MD{0}」に格納されているデータ「00」が、メモリ36から出力される。こうして出力されたメモリデータFDT0の値が、個別判定回路41において、論理積回路42を介した後、サンプリング回路43においてサンプルされて保持される。この結果、個別判定回路41のサンプリング回路43には、フレームバイトMD{0}がフィルタリング条件を満たすか否かの判定結果が保持され、出力される。
【0057】
ここで、判定結果が肯定的な場合には、サンプリング回路43の出力端子Qから、「H」レベルの個別判定結果信号FLR0が出力される。また、判定結果が否定的な場合には、サンプリング回路43の出力端子Qから、「L」レベルの個別判定結果信号FLR0が出力される。なお、図8及び図9には、この段階で肯定的な判定結果がなされた場合の例が示されている。
【0058】
引き続き、2番目のフレームデータバイトMD{1}を受信すると、この1番目のフレームデータバイトMD{1}が値RAであるときには、アドレス「0100+RA」に格納されているデータ「01」が、メモリ36から出力される。一方、2番目のフレームデータバイトMD{1}が値RAではないときには、アドレス「0100+MD{1}」に格納されているデータ「00」が、メモリ36から出力される。そして出力されたメモリデータFDT0の値と、1番目のフレームデータバイトMD{0}のときにサンプリング回路43において保持結果との論理積が、論理積回路42によって算出され、サンプリング回路43においてサンプルされて保持される。この結果、サンプリング回路43には、フレームバイトMD{0}及びフレームデータバイトMD{1}の双方がフィルタリング条件を満たすか否かの判定結果が保持され、出力される。
【0059】
ここで、判定結果が肯定的な場合には、サンプリング回路43の出力端子Qから、「H」レベルの個別判定結果信号FLR0が出力される。また、判定結果が否定的な場合には、サンプリング回路43の出力端子Qから、「L」レベルの個別判定結果信号FLR0が出力される。なお、図8には、この段階で否定的な判定結果がなされた場合の例が示されている。また、図9には、この段階でも肯定的な判定結果がなされた場合の例が示されている。
【0060】
以後、新たにフレームデータバイトMD{n(n=03〜3F)}を受信するたびに、出力されたメモリデータFDT0の値と、それまでにサンプリング回路43においてサンプリングされ、保持されていた結果の論理積が、論理積回路42によって算出され、サンプリング回路43においてサンプルされて保持される。こうしてサンプリング回路43には、フレームバイトMD{0}〜{3F}の全てが、フィルタリング条件を満たすか否かの判定結果が保持される。
【0061】
ここで、判定結果が肯定的な場合には、サンプリング回路43の出力端子Qから、「H」レベルの個別判定結果信号FLR0が出力される。また、判定結果が否定的な場合には、サンプリング回路43の出力端子Qから、「L」レベルの個別判定結果信号FLR0が出力される。なお、図8には、フレームデータバイトMD{1}の段階で否定的な判定がなされた結果、その後継続的に否定的な判定結果がなされた場合の例が示されている。また、図9には、全てのフレームデータバイトMD{1}〜{3F}で肯定的な判定が行われた例が示されている。
【0062】
以上のようにして、受信したフレームデータについて、所定のバイト数分(本実施形態では、64バイト分)のフィルタリング演算が終了すると、基本タイミング発生回路18が、フィルタリング演算期間信号FLPを非有意(「L」)とする。このフィルタリング演算期間信号FLPの立ち下がり時点を跨ぐように、フィルタリング演算終了信号生成回路49は、第1演算終了信号FPL1を一時的に有意(「H」)とする。この第1演算終了信号FPL1の立ち上がり時点において、論理和回路46から出力され総合判定結果信号FLRの値がサンプリング回路47でサンプルされ、サンプルされた値が保持されて、出力される。
【0063】
この後、フィルタリング演算終了信号生成回路49は、第2演算終了信号FPL2が一時的に有意(「H」)とする。この第2演算終了信号FPL2に同期して、フィルタリング条件を満たしていた場合には、フレームデータ送信指令がフレームデータ送信指令信号FMSによってフレームバッファ回路16へ向けて出力される。また、フィルタリング条件を満たしていなかった場合には、フレームデータ廃棄指令がフレームデータ廃棄信号FMRによってフレームバッファ回路16へ向けて出力される。なお、図8には、フィルタリング条件を満たしておらず、フレームデータ廃棄指令信号FMRが出力された例が示されている。また、図9には、フィルタリング条件を満たし、フレームデータ送信指令信号FMSが出力された例が示されている。
【0064】
こうしてフィルタリング回路14からフィルタリング条件に関する判定結果としてフレームデータ廃棄指令がフレームバッファ回路16に通知されると、フレームバッファ回路16では、この判定結果に対応するデータフレームが廃棄される。一方、フィルタリング回路14からフィルタリング条件に関する判定結果としてフレームデータ送信指令信号FMSがフレームバッファ回路16に通知されると、フレームバッファ回路16では、この判定結果に対応するデータフレームの送信の準備がなされる。
【0065】
そして、送信すべきデータフレームの準備が整うと、図10に示されるように、フレームバッファ回路16は、最初のフレームデータバイトSD{0}を、送信フレームデータSMD[7:0]として出力するとともに、送信すべきデータが存在することを、データレディ信号DTRを有意(「H」)とすることにより、基本タイミング発生回路18へ通知する。基本タイミング発生回路18は、データレディ信号DTRが有意となったことを検出すると、送信フレームデータ期間信号FDPを有意(「H」)として、送信用MACコントローラ12Dに通知する。
【0066】
次に、基本タイミング発生回路18は、送信フレームデータ書込信号FDWを一時的に有意(「H」)として、送信用MACコントローラ12Dの内部バッファに最初のフレームデータバイトSD{0}を書き込む。引き続き、基本タイミング発生回路18は、フレームバッファ読出信号FBOを一時的に有意(「H」)として、2番目のフレームデータバイトSD{1}を、送信フレームデータSMD[7:0]として出力させる。
【0067】
以後、基本タイミング発生回路18が、送信フレームデータ書込信号FDW及びフレームバッファ読出信号FBOを順次一時的に有意とし、フレームデータバイトを送信用MACコントローラ12Dの内部バッファに書き込む。こうして、全てのフレームデータが送信用MACコントローラ12Dの内部バッファに書き込まれ、フレームバッファ回路16内の当該データフレームのデータが空になると、フレームバッファ回路16は、データレディ信号DTRを非有意(「L」)とする。基本タイミング発生回路18は、データレディ信号DTRが非有意となったことを検出すると、送信フレームデータ期間信号FDPを非有意(「L」)として、送信用MACコントローラ12Dに送信データフレームのデータの終了を通知する。
【0068】
このデータ終了の通知を受けた受信用MACコントローラ12Dは、フレームバッファ回路16から受信したデータを含むデータフレームを構成した後、ビットシリアル形式の送信物理層信号PSDを出力する。この送信物理層信号PSDは、送信用物理層回路10Dによって、第2のイーサネットLAN2の伝送媒体(同軸ケーブル等)上を伝送されるべき信号に適合した信号に変換されて、第2のイーサネットLAN2の伝送媒体へ向けて出力される。
【0069】
以上説明したように、本実施形態では、送信元アドレスや受信先アドレスといったデータフレームに含まれる特定情報のデータ値に応じて選択的にデータフレームを透過するデータフィルタリングを行う。かかるデータフィルタリング処理にあたり、本実施形態のデータフィルタリング装置100では、データパターン発生回路としてのカウンタ回路33がデータフレームにおける位置に応じたパターンデータを、特定位置のデータの入力に同期して順次発生し、データフレームのデータとともに、メモリ36のアドレス入力端子に入力させる。この結果、フレームデータMRD[7:0]及びパターンデータCNT[5:0]が指定するアドレスに格納されているデータであって、フレームデータMRD[7:0]の値が選択条件を満たすか否かを示す値を有するデータが、メモリ36から出力される。そして、そのデータ値に基づいて、判定回路40が入力したデータフレームを出力するか否かを判定する。
【0070】
したがって、本実施形態のデータフィルタリング装置100では、メモリ36の格納データを適切に設定することにより、所望のデータフィルタリングのアルゴリズムに対応して、ハードウエア処理によりデータフィルタリング処理を行う。したがって、本発明のデータフィルタリング装置によれば、汎用のメモリを使用した簡易な構成で、高速かつ柔軟にデータフィルタリングをすることができる。
【0071】
なお、上記の実施形態では、フィルタリング条件を所定の1つの受信先アドレスを有するという1つ条件としたが、所定の8種以下の受信先アドレスのいずれかを有するという複数の条件を設定することができる。かかる場合には、メモリデータビットの内の複数のビットごとに、フィルタリング条件を1づつ割り当てるように、データをメモリ36に格納させるようにすればよい。この結果、フィルタリング条件が割り当てられたメモリデータビットに対応する個別判定回路が、複数のフィルタリング条件それぞれを判定し、いずれかのフィルタリング条件が満たされた場合に、その旨を総合判定結果としてえることができる。
【0072】
また、フィルタリング条件は受信先アドレスに限定されず、送信元アドレスやタイプ等であってもよいし、受信先アドレス、送信元アドレス、タイプ等を組み合わせたものであってもよい。
【0073】
また、上記の実施形態では、フィルタリング条件を満たすか否かを、データフレームにおける最初の64バイトについてチェックすることとしたが、任意のバイト数についてフィルタリング条件を満たすか否かをチェックすることとすることができる。かかる場合には、上記の実施形態の構成から、カウンタ回路34における出力カウントビット数やメモリ36の容量(アドレス入力端子の数)等を調整すればよい。さらに、メモリ36の出力データのビットごとに互いに異なるデータフレームの位置について、フィルタリング条件を満たすか否かをチェックすることとすることもできる。
【0074】
また、上記の実施形態では、メモリのアドレス入力端子に入力するフレームデータのビット数を8としたが、16や32等の他のビット数とすることもできる。かかる場合には、メモリ36の容量(アドレス入力端子の数)等を調整すればよい。なお、メモリのアドレス入力端子に入力するフレームデータのビット数に整合する市販のMACコントローラを受信用MACコントローラ12Rとして使用することができる。
【0075】
また、送信用MACコントローラ12Dに入力させる送信データフレームのデータビット数も8に限らず、16や32等の他のビット数とすることもできる。かかる場合にも、このビット数に整合する市販のMACコントローラを送信用MACコントローラ12Dとして使用することができる。
【0076】
また、メモリのアドレス入力端子に入力するフレームデータのビット数を、例えば32というように大きく設定する場合には、メモリ36を1つのメモリ素子で構成するのではなく、メモリ36の部分を複数のメモリ素子を含む構成とし、これら複数のメモリ素子のアドレス入力端子にフレームデータを分散させて並行して入力させるようにすることができる。そして、これら複数のメモリ素子それぞれから出力される、同一のフィルタリング条件に関連するビットデータ値の組合論理値(例えば、論理積値)を判定回路40で算出することとすることとすればよい。
【0077】
また、上記の実施形態では、メモリデータのビット数を8とし、同時にチェックできるフィルタリング条件の数を最大で8としたが、メモリデータのビット数を任意のビット数として、任意の個数のフィルタリング条件を同時にチェックすることとすることができる。かかる場合には、メモリ36におけるデータビット数を調整すればよい。
【0078】
また、上記の実施形態では、総合判定結果を個別判定結果の論理和によって算出したが、所望のフィルタリング条件に応じ、個別判定結果に関する任意の論理演算結果を総合判定結果として算出することができる。
【0079】
また、上記の実施形態では、メモリのアドレス入力端子にフレームデータバイトごとに1種類のパターンデータを発生することとしたが、複数種類のパターンデータを発生することとしてもよい。例えば、図11に示されるように、メモリ36として、上記の実施形態におけるアドレス入力端子A0〜A13に加えて、アドレス入力端子A14,A15を有するメモリを採用し、フィルタリング演算処理期間において、アドレス入力端子A14,A15に、ビットクロックCK0の2倍の周期を有するクロック信号CK2で2ビットカウンタ回路33Aをカウントアップした結果を入力させるようにしてもよい。かかる場合、図11に示されるように、分周回路31A、論理積回路32A、セレクタ回路34Aが付加される回路構成となる。また、1つのフレームデータバイトごとに4種類のパターンデータが入力することになることから、メモリデータビットごとに4種類のパターンデータの変化に対応した4つのタイミングそれぞれでサンプリングを行う4つの個別判定回路を用意することになる。この場合には、データフレームの入力に同期して、時分割型で、複数のデータフィルタリング処理を行うことができる。
【0080】
また、上記の実施形態では、第1のイーサネットLAN1において伝送されているデータフレームを受信し、予め定められた条件に合致するデータフレームのみを選択的に第2のイーサネットLAN2へ向けて送信する装置について説明したが、本発明は、ルータ等のような中継装置、ファイアウォール等のようなセキュリティ向上のための装置、プロトコルアナライザ、RMONプローブと呼ばれるネットワーク監視機器にも適用することができる。
【0081】
【発明の効果】
以上、詳細に説明したように、本発明のデータフィルタリング装置によれば、汎用のメモリを使用した簡易な構成で、高速かつ柔軟にデータフィルタリングをすることができる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係るフィルタリング装置の概略的な構成を示す図である。
【図2】データフレームの構成を示す図である。
【図3】図1のフィルタリング回路の構成を示す図である。
【図4】図3の判定回路の構成を示す図である。
【図5】図3のメモリへのデータ書き込み動作を説明するためのタイミングチャート(その1)である。
【図6】図3のメモリへのデータ書き込み動作を説明するためのタイミングチャート(その2)である。
【図7】受信MACデータの受信用MACコントローラからの読み出し動作とフレームバッファ回路への書き込み動作を説明するためのタイミングチャートである。
【図8】フィルタリング条件を満たさない場合のフィルタリング演算動作を説明するためのタイミングチャートである。
【図9】フィルタリング条件を満たす場合のフィルタリング演算動作を説明するためのタイミングチャートである。
【図10】送信データフレームデータのフレームバッファ回路からの読み出し動作と送信用MACコントローラへの書き込み動作を説明するためのタイミングチャートである。
【図11】変形例を説明するための図である。
【符号の説明】
100…データフィルタリング装置、12R…受信用MACコントローラ(データ幅変換回路)、20…処理回路(データ書込装置)、33,33A…カウンタ回路(データパターン発生回路)、36…メモリ、40…判定回路。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data filtering device, and more particularly, to a data filtering device that selectively outputs an input data frame.
[0002]
[Prior art]
In recent communication systems, data communication is performed using data blocks called data frames as basic units. Such a data frame is configured according to a communication protocol (hereinafter, simply referred to as “protocol”) and has a complicated structure. For this reason, in a communication device connected to a communication network, a data filtering function for selecting a necessary data frame from various data frames transmitted in the communication network is an essential function.
[0003]
The data filtering function as described above is always implemented in, for example, a media access control (MAC) controller of a personal computer for a communication terminal, a relay device such as a router, and a device for improving security such as a firewall. Have been. In a protocol analyzer used for investigating a failure or performance of a communication network or a device called an RMON (Remote Network Monitoring) probe, it is necessary to select a data frame according to various conditions at that time. Therefore, a general-purpose data filtering function capable of performing various data filtering is implemented.
[0004]
In order to realize such a data filtering function, various technologies have been conventionally proposed. Such conventional proposal technologies are roughly classified into a software system and a hardware system.
[0005]
In the software system, a method of realizing various types of data filtering functions by executing a data filtering algorithm by a program is generally used. On the other hand, in the hardware system, a method of realizing a data filtering function using a dedicated LSI (Large Scale Integrated Circuit) using an ASIC (Application Specific Integrated Circuit) technique is generally used. In recent years, such a hardware system generally uses a special memory called a CAM (Content Address Memory) that prepares an exclusive OR (Exclusive OR) for each memory cell on a one-to-one basis. Has become.
[0006]
[Problems to be solved by the invention]
As described above, in the realization of the data filtering function by the conventional software method, since the data filtering algorithm is executed by a program, it is easy to change or modify the algorithm, and the data filtering device has high versatility and flexibility. Can be provided. However, data filtering by executing a program requires a certain amount of time for the data filtering process, and is not suitable for data frames transmitted at high speed.
[0007]
For this reason, in view of the increase in transmission speed in recent local area network (Local Area Network) transmission standards, which are evolving in the order of 10 Mbps → 100 Mbps → 1 Gbps → 10 Gbps, the data filtering by the software method requires the transmission speed. It is difficult to appropriately cope with the speeding up of the system. In addition, even if the data frame is transmitted at a relatively low transmission rate, if the data filtering conditions are complicated, the data filtering process requires a long time. On the other hand, a situation may occur in which the data filtering process cannot be performed in time.
[0008]
On the other hand, when realizing a data filtering function by a conventional hardware method, a data filtering algorithm is executed by a hardware circuit. For this reason, the data filtering processing speed is remarkably faster than the above-mentioned software method, and there is no possibility that the data filtering processing cannot keep up with the transmission of the data frame. However, the number of data filtering algorithms that can be implemented is limited, and it is difficult to flexibly respond to changes and modifications.
[0009]
In addition, when the above-described CAM is used in the conventional hardware system, flexibility in changing or modifying the data filtering algorithm is improved, but the CAM is not a general-purpose memory and is not easily available. . Also, when data filtering is performed under relatively complicated conditions, a large-scale circuit configuration is required.
[0010]
The present invention has been made in view of the above circumstances, and has as its object to provide a data filtering device capable of performing high-speed and flexible data filtering with a simple configuration.
[0011]
[Means for Solving the Problems]
The data filtering device according to the present invention is a data filtering device for selectively outputting an input data frame, wherein pattern data corresponding to a position in the data frame is sequentially generated in synchronization with input of the data at the specific position. A data pattern generating circuit for inputting the data of the data frame and the pattern data generated by the data pattern generating means from an address input terminal, and corresponding to the data value at each position in the data frame and the position in the data frame. A rewritable memory that outputs data indicating whether a data value at each position in the data frame satisfies a selection output condition of the data frame, stored at an address determined by a pattern data value; Was Based on over data value, the decision circuit and determines whether to output the data frame the input; a data filtering apparatus comprising a.
[0012]
This data filtering device performs data filtering selectively transmitting a data frame according to a data value of specific information included in the data frame such as a source address and a destination address. In this data filtering process, in this data filtering device, the data pattern generating circuit sequentially generates pattern data corresponding to the position in the data frame in synchronization with the input of the data at the specific position. The pattern data generated by the data pattern generation circuit is input to a part of the address input terminal of the memory. The data of the data frame is input to another part of the address input terminal of the memory.
[0013]
When the data of the data frame and the pattern data corresponding to the position in the data frame are input to the address input terminal, the received data stored in the address corresponding to the value of the data at the position and the value of the pattern data corresponding to the position are received. Data having a data value indicating whether the value of the data at the specific position satisfies the selection condition is output from the memory. Thus, based on the data value output from the memory, the determination circuit determines whether to output the input data frame.
[0014]
Therefore, the data filtering device of the present invention can perform data filtering processing flexibly corresponding to various data filtering algorithms by rewriting data stored in the memory as needed. Therefore, according to the data filtering device of the present invention, a general-purpose data filtering device capable of performing high-speed and flexible data filtering with a simple configuration using a general-purpose memory and setting many filtering conditions Can be realized.
[0015]
In the data filtering device of the present invention, the data pattern generating circuit may be provided with, for example, a counter circuit. In such a case, different pattern data can be easily generated according to each position in the data frame.
[0016]
Further, in the data filtering device of the present invention, the data pattern generation circuit may be configured to generate a plurality of types of pattern data in time sequence according to positions in the data frame. In such a case, for each of the plurality of types of pattern data generated by the data pattern generation circuit in accordance with each position in the data frame, it may be determined whether or not the selection output conditions of a plurality of different data frames are satisfied. it can. That is, a plurality of data filtering processes can be performed in a time-division manner in synchronization with the input of the data frame.
[0017]
Further, in the data filtering device of the present invention, the memory outputs a plurality of bits of data in parallel, and the memory determines whether or not the memory satisfies a different output selection condition of the data frame according to each of the plurality of bits. May be stored. In such a case, a plurality of data filtering processes can be performed in a parallel processing type in synchronization with the input of the data frame.
[0018]
Further, in the data filtering device of the present invention, a data width conversion circuit for converting the data of the data frame sequentially input with a first bit width into a data string of a second bit width and outputting the data stream to the memory is provided. Further, a configuration may be provided. For example, when the transmission path is a serial transmission path, the first bit width is “1”. However, when the input width of frame data to the memory, that is, the second bit width is a plurality of bit widths, the data width is “1”. A serial-parallel converter can be used as the width conversion circuit. In such a case, even if the data frame is transmitted at a high transmission rate, a circuit that satisfies the access time of the memory can be easily configured by increasing the second bit width. If the number of address input terminals becomes insufficient in one memory by increasing the second bit width, a plurality of memories are arranged in parallel, and the second input is provided to the address input terminals of the plurality of memories. Can be input in parallel. In this case, a combinational logical value (for example, a logical product value) of bit data values output from each of the plurality of memories and related to the same filtering condition may be calculated by the determination circuit.
[0019]
Further, the data filtering device of the present invention may further include a data writing device that writes predetermined data into the memory. In such a case, the data filtering algorithm can be easily changed or modified by rewriting the data in the memory by the data writing device as needed. Therefore, the versatility and flexibility of the data filtering process can be improved.
[0020]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to FIGS.
[0021]
FIG. 1 is a block diagram showing a schematic configuration of a data filtering device 100 according to an embodiment of the present invention. The data filtering device 100 receives a data frame transmitted on the first Ethernet (registered trademark) LAN 1 and selectively directs only a data frame that meets a predetermined condition to the second Ethernet LAN 2. The transmitting device.
[0022]
Here, as shown in FIG. 2, the contents of the data frame include a reception (destination) address of 6 bytes (48 bits), a transmission (source) address of 6 bytes (48 bits), and 2 bytes (16 bits). , An arbitrary length (up to 1500 bytes) of data, and 4 bytes (32 bits) of FCS (frame check sequence). In some cases, an extension of a maximum of 448 bytes is added.
[0023]
In the following description, bit numbers included in a plurality of bits of data and addresses are continuous, and if it is necessary to specify the range of the bit numbers, the bit numbers X to Y (X In order to show that <Y), the notation [Y: X] is added after the code. In each bit of the data signal and the address signal, the signal level is “H (high level)” and is logic “1”, and “L (low level)” is logic “0”. In other control signals, the signal level is “H (high level)” and significant, and “L (low level)” is insignificant.
[0024]
As shown in FIG. 1, the data filtering apparatus 100 includes a receiving physical layer circuit 10R, a receiving MAC controller 12R, a filtering circuit 14 for executing a filtering algorithm, a frame buffer 16, a basic timing generation circuit 18, a data filtering A processing device 20 for controlling the device 100 is provided. Here, a display device 22 such as a CRT display device or a liquid crystal display device, and an input device 24 such as a keyboard and a mouse are connected to the processing device 20. Further, the data filtering device 100 includes a transmission physical layer circuit 10D and a transmission MAC controller 12D.
[0025]
The receiving physical layer circuit 10R includes a receiver circuit, receives a data signal NRD transmitted through a transmission medium (a coaxial cable or the like) of the first Ethernet LAN 1, performs bit synchronization, and performs a bit-serial receiving physical layer. Generates and outputs data PRD. A commercially available Ethernet driver / receiver can be used as the receiving physical layer circuit 10R.
[0026]
The reception MAC controller 12R receives the reception physical layer data PRD, synchronizes the frames, and outputs the frame data bytes as reception MAC data MRD [7: 0]. That is, the reception MAC controller 12R removes the flag pattern portion indicating the beginning and end of the frame from the reception physical layer data PRD input in the bit serial format, and then converts the frame data bytes in the byte serial format into the reception MAC data. Output as MRD [7: 0]. Here, when the frame synchronization is established, the reception MAC controller 12R notifies the basic timing generation circuit 18 that the frame has been received by setting the frame reception signal FDR to significant ("H"). Then, in synchronization with the MAC data read signal FRD supplied from the basic timing generation circuit 18, the received MAC data MRD [7: 0] is sequentially output. Here, the MAC controller 12 of the present embodiment outputs frame data in a format as shown in FIG. 2 in the order of reception (that is, sequentially from the upper 8 bits of the reception address) in response to the MAC data read signal FRD.
[0027]
The filtering circuit 14 receives the reception MAC data MRD [7: 0] and determines whether the input reception MAC data MRD [7: 0] includes a predetermined filtering condition, for example, a predetermined destination address. Detect every time. Then, for a data frame that satisfies the filtering condition, the fact that it should be transmitted to the second Ethernet LAN 2 is notified by a frame data transmission command signal FMS, and for a data frame that does not satisfy the filtering condition, the frame data is discarded. This is notified by a frame data discard command signal FMR. The configuration of the filtering circuit 14 will be described later.
[0028]
The frame buffer circuit 16 is a fast-in / fast-out (FIFIO) type data buffer, and receives and temporarily stores 8-bit wide reception MAC data MRD [7: 0]. In response to the frame data transmission command signal FMS or the frame data discard command signal FMR from the filtering circuit 14, the frame buffer circuit 16 makes the temporarily stored frame data available for output or discards it. When the frame buffer circuit 16 receives the frame data transmission command signal FMS and is ready to output frame data, it outputs a data ready signal DTR to the basic timing generation circuit 18. Here, data writing to the frame buffer circuit 16 is performed according to a frame buffer write signal FBI generated by the basic timing generation circuit 18. Data is read from the frame buffer circuit 16 in accordance with a frame buffer read signal FBO generated by the basic timing generation circuit 18.
[0029]
The transmission MAC controller 12D sequentially receives the transmission frame data SMD [7: 0] having an 8-bit width output from the frame buffer circuit 16. The transmission MAC controller 12D recognizes the start and end of the frame data based on the transmission frame data period signal FDP supplied from the basic timing generation circuit 18, and transmits the transmission frame data document supplied from the basic timing generation circuit 18. The transmission frame data SMD [7: 0] output from the frame buffer 16 is read in a byte serial format in accordance with the input signal FDW. Then, after adding a flag pattern portion indicating the beginning and end of the frame data, the transmission physical layer data PRD is output in a bit serial format.
[0030]
The transmission physical layer circuit 10D includes a driver circuit, and converts bit serial transmission physical layer data PSD into a signal suitable for a signal to be transmitted on a transmission medium (a coaxial cable or the like) of the second Ethernet LAN2. Then, the data is output to the transmission medium of the second Ethernet LAN 2. Note that a commercially available Ethernet driver / receiver can be used as the transmission physical layer circuit 10D.
[0031]
The basic timing generation circuit 18 generates the above-described MAC data read signal FRD and frame buffer write signal FBI according to the frame reception signal FDR from the reception MAC controller 12R. Further, the basic timing generation circuit 18 generates the above-described frame buffer read signal FBO, transmission frame data period signal FDP, and transmission frame data write signal FDW according to the data output enable signal DTR from the frame buffer circuit 16. Further, the basic timing generation circuit 18 generates a bit synchronization clock CLK0, which is a timing signal for operating the filtering circuit 14, and a filtering operation period signal FLP. Note that the basic timing generation circuit 18 can be configured as a state machine.
[0032]
The processing circuit 20 includes a microprocessor and its peripheral circuits, and controls the entire data filtering device 100. Further, the processing circuit 20 writes data according to the data filtering condition input from the input device 24 into a memory 36 of the filtering circuit 14 described later. In writing the data, the processing circuit 20 includes a memory address FLA (FLA [13: 0]) having a 14-bit width, memory data FLD (FLD [7: 0]) having a 8-bit width, a memory write signal FLW, and a memory write signal FLW. The write mode signal FLS is supplied to the filtering circuit 14. Further, the processing circuit 20 outputs a filtering execution instruction signal FLT to the basic timing generation circuit 18 in accordance with the filtering execution instruction input from the input device 24.
[0033]
Further, the processing circuit 20 receives the transmission frame data SMD output from the frame buffer circuit 14 and displays it on the display device 22.
[0034]
As shown in FIG. 3, the filtering circuit 14 includes (a) a memory 36 and (b) a selector circuit 34 and a selector circuit 35 for selecting a signal to be input to an address input terminal AD [13: 0] of the memory 36. And (c) outputting the memory data FLD (FLD [7: 0]) from the processing circuit 20 to the data terminal DT [7: 0] of the memory 36 when the output enable terminal OE is at “H”. And a state output circuit 37. Further, the filtering circuit 14 (d) divides the bit synchronization clock CLK0 received from the basic timing generation circuit 18 and generates a byte synchronization clock having a cycle eight times as long as the bit synchronization clock CLK0. (E) an AND circuit 32 that outputs the byte synchronization clock output from the frequency divider 31 as the clock CLK1 only when the filtering operation period signal FLP received from the basic timing generator 18 is significant (“H”). (F) reset when the filtering operation period signal FLP is insignificant ("L") and count the number of byte synchronization clocks input when the filtering operation period signal FLP is significant ("H"). A counter circuit 33 for outputting the number from the output terminal as 6-bit width data. Further, the filtering circuit 14 includes (g) a determination circuit 40 that receives the data FDT [7: 0] output from the memory 36 and determines whether the filtering condition is satisfied.
[0035]
The memory write signal FLW output from the processing circuit 20 is input to the write signal terminal WE of the memory 36. The memory write mode signal FLS output from the output enable terminal OE processing circuit 20 of the three-state output circuit 37 is input.
[0036]
In the selector circuit 34, the count number data output from the counter circuit 33 is input to the input terminal A [5: 0] selected when the output selection terminal S of the selector circuit 34 is “L”. The memory address FLA [13: 8] output from the processing circuit 20 is input to the input terminal B [5: 0] selected when the output selection terminal S of the selector circuit 34 is “H”. When the memory write mode signal FLS output from the processing circuit 20 is insignificant (“L”), the count number data is output from the selector circuit 34 and the address input terminals AD [13: 8] of the memory 36 are output. ]. On the other hand, when memory write mode signal FLS is significant (“H”), memory address FLA [13: 8] is output from selector circuit 34 and input to address input terminal AD [13: 8] of memory 36. I do.
[0037]
In the selector circuit 35, the reception MAC data MRD [7: 0] output from the reception MAC controller 12R to the input terminal A [7: 0] selected when the output selection terminal S of the selector circuit 35 is “L”. ] And the memory address FLA [7: 0] output from the processing circuit 20 is input to the input terminal B [7: 0] selected when the output selection terminal S of the selector circuit 35 is “H”. are doing. When the memory write mode signal FLS output from the processing circuit 20 is insignificant (“L”), the received MAC data MRD [7: 0] is output from the selector circuit 34 and the address input to the memory 36 is performed. Input to terminal AD [7: 0]. On the other hand, when the memory write mode signal FLS is significant (“H”), the memory address FLA [7: 0] is output from the selector circuit 34 and input to the address input terminal AD [7: 0] of the memory 36. I do.
[0038]
As shown in FIG. 4, the determination circuit 40 includes (i) an individual determination circuit 41 provided for each of the data FDT7 to FDT0. 7 ~ 41 0 And (ii) the individual determination circuit 41 7 ~ 41 0 And a logical sum circuit 46 for calculating the logical sum of the individual determination results FLR7 to FLR0 output from and calculating the overall determination result. Further, the determination circuit 40 performs (iii) a filtering operation for generating a first operation end signal FPL1 and a second operation end signal FPL2 that are temporarily and temporarily significant (“H”) before and after the end of the filtering operation period. An end signal generation circuit 49; and (iv) a sampling circuit 47 that samples and holds a comprehensive determination result as to whether or not the filtering condition output from the OR circuit 46 is satisfied in synchronization with the first frame end signal FPL1. It has. The determination circuit 40 calculates (v) the logical product of the normal rotation output output from the normal rotation output terminal Q of the sampling circuit 47 and the second frame end signal FPL2 to generate the frame data transmission command signal FMS. A logical product circuit 48S to be generated, and (vi) an inverted output terminal Q of the sampling circuit 47. * And an AND circuit 48R that calculates the logical product of the inverted output output from the second and the second frame end signal FPL2 to generate the above-mentioned frame data discard command signal FMS.
[0039]
In this embodiment, a D-type flip-flop element of a rising edge trigger type is used as the sampling circuit 47.
[0040]
The individual determination circuit 41 j (J = 0 to 7) are respectively: (a) a sampling circuit 43 that samples and holds data input to the data input terminal D in synchronization with the above-described byte synchronization clock CLK1; An AND circuit 42 that calculates the logical product of the non-inverted output output from the inverted output terminal Q and the memory data FDTj and outputs the result to the data input terminal D of the sampling circuit 43.
[0041]
In this embodiment, a D-type flip-flop element of the falling edge trigger type is used as the sampling circuit 43. Further, the filtering operation period signal FLP is input to the preset terminal S of the sampling circuit 43. When the filtering operation period signal FLP is insignificant ("L"), the filtering operation period signal FLP is significant ("H"). ), The output value of the preset terminal S is initialized to "H (logical" 1 ")".
[0042]
Next, the operation of the data filtering device 100 configured as described above will be described. In the following description, a case will be described in which, of the data frames in the first Ethernet LAN 1, a data frame having a predetermined one destination address RA is selectively transmitted to the second Ethernet LAN2. Here, the 6-byte value of the destination address RA as the filtering condition is (RA 0 , RA 1 , RA 2 , RA 3 , RA 4 , RA 5 ). Each byte RA of the destination address RA 0 ~ RA 5 Suffixes 0 to 5 correspond to the order of reception at the input from the first Ethernet LAN 1. Further, in the following description, when a plurality of bits of an address value or a data value is expressed, hexadecimal notation is used in units of 4 bits. H ".
[0043]
It is assumed that the data filtering device 100 is in the initial state and has not started the data filtering operation. That is, it is assumed that the processing circuit 20 makes the filtering execution instruction signal FLT, the memory write mode signal FLS, and the memory write signal FLW insignificant (“L”). Although the basic timing generation circuit 18 generates the bit synchronization clock CK0, the filtering operation period signal FLP, the MAC data read signal FRD, the frame buffer write signal FBI, the frame buffer read signal FBO, the transmission frame data period signal It is assumed that the FDP and the transmission frame data write signal FDW are insignificant (“L”).
[0044]
Since there is only one filtering condition as described above, the filtering operation is performed using only the memory data bit FDT0.
[0045]
In this state, when the destination address RA is specified as a filtering condition from the input device 24, the processing circuit 20 writes data reflecting the filtering condition to the memory 36 in the filtering circuit 14. In writing such data, first, the processing circuit 20 sets the memory write mode signal FLS to significant ("H"), as shown in FIG. Subsequently, the processing circuit 20 sets the memory address FLA [13: 0] to “0000”. H "To" 3FFF H While sequentially changing the memory data FLD [7: 0] to “00”. H , The memory write signal FLW is temporarily made significant (“H”), so that the data “00” H Is written to the memory 36. As a result, the data values of all addresses in the memory 36 become “00”. H Is set to
[0046]
Next, the processing circuit 20 sets the memory address FLA [13: 0] to “0k00” as shown in FIG. H + RA k (K = 1 to 6) ”, the memory data FLD [7: 0] is changed to“ FF ”. H By temporarily making the memory write signal FLW significant, the data "01" H Is written to the memory 36. Subsequently, the processing circuit 20 sets the memory address FLA [13: 0] to “0700 H "To" 3FFF H While sequentially changing the memory data FLD [7: 0] to “01”. H By temporarily making the memory write signal FLW significant, H Is written to the memory 36. When the data reflecting the filtering condition in the memory 36 is thus written, the processing circuit 20 sets the memory write mode signal FLS to “L”.
[0047]
After the data reflecting the filtering condition is written in the memory 36, when the start of filtering is designated from the input device 24, the processing circuit 20 sets the filtering execution instruction signal FLT to significant ("H"). As a result, a data filtering operation for selectively transmitting, to the second Ethernet LAN 2, a data frame having one predetermined destination address RA from among the data frames in the first Ethernet LAN 1 is started. That is, the filtering process period by the hardware circuit is started.
[0048]
During such a filtering processing period, when a data frame transfer is performed on the first Ethernet LAN and a data frame signal is generated on the Ethernet transmission medium, the receiving physical layer circuit 10R converts the data frame signal into the input data signal NRD. As received. The receiving physical layer circuit 10R performs bit synchronization according to the physical layer protocol, and detects the data value (“0” or “1”) of each bit of the received data frame. Then, the reception physical layer circuit 10 outputs the detection result as reception physical layer data PRD to the reception MAC controller 12R.
[0049]
The receiving MAC controller 12R, which has received the receiving physical layer data PRD, performs frame synchronization and decoding according to the MAC layer protocol and performs frame reconstruction according to the MAC layer protocol. Then, the receiving MAC controller 12R stores the reconstructed frame data in the built-in data buffer.
[0050]
When the storing of the frame data in the built-in buffer is completed as described above, the receiving MAC controller 12R sets the frame reception signal FDR to significant (“H”) and sends the frame reception signal to the basic timing generation circuit 18 as shown in FIG. , That the frame data is ready to be output. When detecting that the frame reception signal FDR has become significant, the basic timing generation circuit 18 makes the filtering operation period signal FLP significant (that is, “H”). When receiving the frame reception signal FDR, the basic timing generation circuit 18 temporarily sets the MAC data read signal FRD to significant (“H”), and permits the reception MAC controller 12R to output the frame data. Receiving the MAC data read signal FRD, the receiving MAC controller 12R outputs the first byte MD {0} of the frame data as the received MAC data [7: 0].
[0051]
While the first 1-byte MD {0} is being output, the basic timing generation circuit 18 temporarily sets the frame buffer write signal FBI to significant (“H”). As a result, the first 1-byte MD {0} is stored in the frame buffer circuit 16.
[0052]
Thereafter, the remaining frame data bytes MD {1} to MD {N-1} of one frame in the built-in buffer of the reception MAC controller 12R are sequentially read, and the frame reception signal FDR is insignificant (“L”). Until the basic timing generation circuit 18 outputs the MAC data read signal FRD and the frame buffer write signal FBI. Thus, the received frame data bytes MD {0} to MD {N−1} for one frame are stored in the frame buffer circuit 16.
[0053]
On the other hand, the frame data bytes MD {0} to MD {N−1} output from the receiving MAC controller 12R are also input to the filtering circuit 14. Then, in the filtering circuit 14, the frame data bytes MD {0} to MD # 3F in a period in which the filtering operation period signal FLP is significant ("H"), that is, in the filtering operation period. H 8 are sequentially input to the address terminals A [7: 0] of the memory 36 via the selector circuit 35 in a byte serial manner, as shown in FIGS. FIG. 8 shows that the frame data byte MD {1} has the value RA. 1 6 is a timing chart showing an operation of the filtering circuit 14 when the filtering condition is not satisfied because the filtering condition is not satisfied. FIG. 9 shows that the frame data byte MD {j (j = 0 to 5)} has the value RA. j 9 is a timing chart showing the operation of the filtering circuit 14 when the filtering condition is satisfied.
[0054]
These frame data bytes MD {0} to MD # 3F H As shown in FIGS. 8 and 9, the 6-bit counter circuit 33 counts up by the byte synchronization clock CK1 in synchronization with the sequential input of #. This count-up is performed because the counter circuit 33 is preset in a period in which the filtering operation period signal FLP is insignificant (“L”), so that the count value is “3F”. H ". Then, it is incremented by 1 each time the byte synchronization clock CK1 rises. As a result, the frame data byte MD @ m (m = 0-3F) H The count value m is output from the counter circuit 33 in synchronism with}, and is sequentially input to the address terminals A [13: 8] of the memory 36 via the selector circuit 34.
[0055]
Thus, "m00" is applied to the address terminal A [13: 0] of the memory 36. H + MD {m} ”are sequentially input. Then, the address “m00” of the memory 36 H + MD {m} ”is output as the memory data FDT [7: 0], and the individual determination circuit 41 based on the value of each bit FDTj (j = 0 to 7). j Each of the individual judgment circuits 41 j It is determined whether or not satisfies the filtering condition to be determined. As described above, since only the memory data bit FLD0 is used in the current filtering operation, the following description will be made focusing on only the memory data bit FLD0.
[0056]
First, when the first frame data byte MD {0} is received, the first frame data byte MD {0} has the value RA. 0 , The address “0000” H + RA 0 "01 H Is output from the memory 36. On the other hand, the first frame data byte MD {0} has the value RA 0 If not, the address "0000 H + MD {0} " H Is output from the memory 36. The value of the memory data FDT0 output in this way is j In the above, after passing through the AND circuit 42, it is sampled and held in the sampling circuit 43. As a result, the individual determination circuit 41 j The determination result of whether or not the frame byte MD {0} satisfies the filtering condition is held and output to the sampling circuit 43 of.
[0057]
Here, when the determination result is affirmative, an “H” level individual determination result signal FLR0 is output from the output terminal Q of the sampling circuit 43. If the determination result is negative, an “L” level individual determination result signal FLR0 is output from the output terminal Q of the sampling circuit 43. FIGS. 8 and 9 show an example in which a positive determination result is made at this stage.
[0058]
Subsequently, when the second frame data byte MD {1} is received, the first frame data byte MD {1} has the value RA. 1 , The address “0100 H + RA 1 "01 H Is output from the memory 36. On the other hand, the second frame data byte MD {1} has the value RA 1 If not, the address "0100 H + MD {1} ”stored in the data“ 00 ” H Is output from the memory 36. The logical product of the output value of the memory data FDT0 and the holding result in the sampling circuit 43 at the time of the first frame data byte MD {0} is calculated by the logical product circuit 42 and sampled in the sampling circuit 43. Is held. As a result, the sampling circuit 43 holds and outputs a determination result as to whether or not both the frame byte MD {0} and the frame data byte MD {1} satisfy the filtering condition.
[0059]
Here, when the determination result is affirmative, an “H” level individual determination result signal FLR0 is output from the output terminal Q of the sampling circuit 43. If the determination result is negative, an “L” level individual determination result signal FLR0 is output from the output terminal Q of the sampling circuit 43. FIG. 8 shows an example in which a negative determination result is made at this stage. FIG. 9 shows an example in which a positive determination result is made at this stage as well.
[0060]
Thereafter, a new frame data byte MD # n (n = 03) H ~ 3F H Each time} is received, the logical product of the value of the output memory data FDT0 and the result sampled and held by the sampling circuit 43 up to that time is calculated by the logical product circuit 42. Sampled and retained. Thus, the sampling circuit 43 includes the frame bytes MD {0} to {3F H The determination result as to whether or not all of} satisfy the filtering condition is held.
[0061]
Here, when the determination result is affirmative, an “H” level individual determination result signal FLR0 is output from the output terminal Q of the sampling circuit 43. If the determination result is negative, an “L” level individual determination result signal FLR0 is output from the output terminal Q of the sampling circuit 43. FIG. 8 shows an example in which a negative determination is made at the stage of the frame data byte MD {1}, and then a negative determination is made continuously thereafter. FIG. 9 shows all the frame data bytes MD # 1 to # 3F H 例 shows an example in which a positive determination is made.
[0062]
As described above, when the filtering operation for a predetermined number of bytes (64 bytes in the present embodiment) is completed for the received frame data, the basic timing generation circuit 18 sets the filtering operation period signal FLP to insignificant ( "L"). The filtering operation end signal generation circuit 49 temporarily makes the first operation end signal FPL1 significant ("H") so as to straddle the falling point of the filtering operation period signal FLP. At the time when the first operation end signal FPL1 rises, the value of the comprehensive judgment result signal FLR output from the OR circuit 46 is sampled by the sampling circuit 47, and the sampled value is held and output.
[0063]
Thereafter, the filtering operation end signal generation circuit 49 temporarily sets the second operation end signal FPL2 to significant ("H"). When the filtering condition is satisfied in synchronization with the second operation end signal FPL2, a frame data transmission command is output to the frame buffer circuit 16 by the frame data transmission command signal FMS. If the filtering condition is not satisfied, a frame data discard command is output to the frame buffer circuit 16 by the frame data discard signal FMR. FIG. 8 shows an example in which the filtering condition is not satisfied and the frame data discard command signal FMR is output. FIG. 9 shows an example in which the filtering condition is satisfied and the frame data transmission command signal FMS is output.
[0064]
When the frame data discard command is notified from the filtering circuit 14 to the frame buffer circuit 16 as a result of the determination regarding the filtering condition, the frame buffer circuit 16 discards the data frame corresponding to the result of the determination. On the other hand, when the frame data transmission command signal FMS is notified from the filtering circuit 14 to the frame buffer circuit 16 as a determination result regarding the filtering condition, the frame buffer circuit 16 prepares for transmission of a data frame corresponding to the determination result. .
[0065]
Then, when the data frame to be transmitted is ready, as shown in FIG. 10, the frame buffer circuit 16 outputs the first frame data byte SD {0} as the transmission frame data SMD [7: 0]. At the same time, the presence of data to be transmitted is notified to the basic timing generation circuit 18 by making the data ready signal DTR significant (“H”). When detecting that the data ready signal DTR has become significant, the basic timing generation circuit 18 notifies the transmission MAC controller 12D that the transmission frame data period signal FDP is significant (“H”).
[0066]
Next, the basic timing generation circuit 18 makes the transmission frame data write signal FDW temporarily significant ("H") and writes the first frame data byte SD {0} into the internal buffer of the transmission MAC controller 12D. Subsequently, the basic timing generation circuit 18 makes the frame buffer read signal FBO temporarily significant (“H”), and outputs the second frame data byte SD {1} as transmission frame data SMD [7: 0]. .
[0067]
Thereafter, the basic timing generation circuit 18 sequentially makes the transmission frame data write signal FDW and the frame buffer read signal FBO temporarily significant, and writes the frame data bytes into the internal buffer of the transmission MAC controller 12D. Thus, when all the frame data is written into the internal buffer of the transmission MAC controller 12D and the data of the data frame in the frame buffer circuit 16 becomes empty, the frame buffer circuit 16 changes the data ready signal DTR to insignificant (" L "). When detecting that the data ready signal DTR has become insignificant, the basic timing generation circuit 18 sets the transmission frame data period signal FDP to be insignificant (“L”) and sends the data of the transmission data frame to the transmission MAC controller 12D. Notify the end.
[0068]
Receiving the data end notification, the receiving MAC controller 12D forms a data frame including the data received from the frame buffer circuit 16, and then outputs a bit-serial transmission physical layer signal PSD. The transmission physical layer signal PSD is converted by the transmission physical layer circuit 10D into a signal suitable for a signal to be transmitted on a transmission medium (a coaxial cable or the like) of the second Ethernet LAN2, and is converted into a signal suitable for the second Ethernet LAN2. Is output to the transmission medium.
[0069]
As described above, in the present embodiment, data filtering that selectively transmits a data frame is performed according to the data value of specific information included in the data frame, such as a source address and a destination address. In such data filtering processing, in the data filtering device 100 of the present embodiment, the counter circuit 33 as a data pattern generating circuit sequentially generates pattern data corresponding to a position in a data frame in synchronization with input of data at a specific position. , Together with the data of the data frame, to the address input terminal of the memory 36. As a result, whether the value of the frame data MRD [7: 0] and the pattern data CNT [5: 0] is data stored at the specified address and the value of the frame data MRD [7: 0] satisfies the selection condition is satisfied. Data having a value indicating whether or not the data is output from the memory 36. Then, based on the data value, the determination circuit 40 determines whether to output the input data frame.
[0070]
Therefore, in the data filtering device 100 of the present embodiment, by appropriately setting the data stored in the memory 36, the data filtering processing is performed by hardware processing in accordance with a desired data filtering algorithm. Therefore, according to the data filtering device of the present invention, it is possible to perform high-speed and flexible data filtering with a simple configuration using a general-purpose memory.
[0071]
In the above-described embodiment, the filtering condition is one condition having one predetermined destination address. However, a plurality of conditions having one of eight or less predetermined destination addresses may be set. Can be. In such a case, the data may be stored in the memory 36 so that one filtering condition is assigned to each of a plurality of bits of the memory data bits. As a result, the individual determination circuit corresponding to the memory data bit to which the filtering condition is assigned determines each of the plurality of filtering conditions, and when any one of the filtering conditions is satisfied, the fact is obtained as a comprehensive determination result. Can be.
[0072]
Further, the filtering condition is not limited to the destination address, and may be a source address, a type, or the like, or may be a combination of the destination address, the source address, the type, and the like.
[0073]
In the above embodiment, whether or not the filtering condition is satisfied is checked for the first 64 bytes in the data frame. However, whether or not the filtering condition is satisfied for an arbitrary number of bytes is checked. be able to. In such a case, the number of output count bits in the counter circuit 34, the capacity of the memory 36 (the number of address input terminals), and the like may be adjusted from the configuration of the above embodiment. Furthermore, it is also possible to check whether or not the filtering condition is satisfied at the positions of the data frames different from each other for each bit of the output data of the memory 36.
[0074]
Further, in the above embodiment, the number of bits of the frame data input to the address input terminal of the memory is set to 8, but may be set to another bit number such as 16 or 32. In such a case, the capacity (the number of address input terminals) of the memory 36 may be adjusted. Note that a commercially available MAC controller that matches the number of bits of the frame data input to the address input terminal of the memory can be used as the receiving MAC controller 12R.
[0075]
Also, the number of data bits of the transmission data frame to be input to the transmission MAC controller 12D is not limited to eight, but may be another bit number such as 16 or 32. Even in such a case, a commercially available MAC controller that matches this number of bits can be used as the transmission MAC controller 12D.
[0076]
When the number of bits of the frame data input to the address input terminal of the memory is set to be large, for example, 32, the memory 36 is not constituted by one memory element, but the memory 36 is divided into a plurality of parts. A configuration including a memory element can be employed, and frame data can be distributed and input in parallel to address input terminals of the plurality of memory elements. Then, a combinational logic value (for example, a logical product value) of the bit data values output from each of the plurality of memory elements and related to the same filtering condition may be calculated by the determination circuit 40.
[0077]
In the above embodiment, the number of bits of the memory data is set to 8 and the number of filtering conditions that can be checked simultaneously is set to a maximum of 8. However, the number of bits of the memory data is set to an arbitrary number of bits, and Can be checked at the same time. In such a case, the number of data bits in the memory 36 may be adjusted.
[0078]
Further, in the above embodiment, the total judgment result is calculated by the logical sum of the individual judgment results. However, any logical operation result regarding the individual judgment result can be calculated as the total judgment result according to a desired filtering condition.
[0079]
In the above embodiment, one type of pattern data is generated for each frame data byte at the address input terminal of the memory. However, a plurality of types of pattern data may be generated. For example, as shown in FIG. 11, as the memory 36, a memory having address input terminals A14 and A15 in addition to the address input terminals A0 to A13 in the above-described embodiment is employed. The results obtained by counting up the 2-bit counter circuit 33A with the clock signal CK2 having a cycle twice as long as the bit clock CK0 may be input to the terminals A14 and A15. In such a case, as shown in FIG. 11, the circuit configuration is such that a frequency dividing circuit 31A, an AND circuit 32A, and a selector circuit 34A are added. In addition, since four types of pattern data are input for each frame data byte, four individual determinations are made at each of four timings corresponding to changes of the four types of pattern data for each memory data bit. A circuit will be prepared. In this case, a plurality of data filtering processes can be performed in a time division manner in synchronization with the input of the data frame.
[0080]
Further, in the above-described embodiment, an apparatus that receives a data frame transmitted on the first Ethernet LAN 1 and selectively transmits only a data frame that meets a predetermined condition toward the second Ethernet LAN 2 However, the present invention can be applied to a relay device such as a router, a device for improving security such as a firewall, a protocol analyzer, and a network monitoring device called an RMON probe.
[0081]
【The invention's effect】
As described above in detail, according to the data filtering device of the present invention, it is possible to perform high-speed and flexible data filtering with a simple configuration using a general-purpose memory.
[Brief description of the drawings]
FIG. 1 is a diagram showing a schematic configuration of a filtering device according to an embodiment of the present invention.
FIG. 2 is a diagram showing a configuration of a data frame.
FIG. 3 is a diagram illustrating a configuration of a filtering circuit of FIG. 1;
FIG. 4 is a diagram illustrating a configuration of a determination circuit in FIG. 3;
5 is a timing chart (part 1) for explaining a data write operation to the memory of FIG. 3;
FIG. 6 is a timing chart (2) for explaining an operation of writing data to the memory in FIG. 3;
FIG. 7 is a timing chart for describing an operation of reading received MAC data from a receiving MAC controller and an operation of writing received frame data to a frame buffer circuit.
FIG. 8 is a timing chart for explaining a filtering operation when a filtering condition is not satisfied.
FIG. 9 is a timing chart for explaining a filtering operation when a filtering condition is satisfied.
FIG. 10 is a timing chart for explaining an operation of reading transmission data frame data from a frame buffer circuit and an operation of writing transmission data to a transmission MAC controller;
FIG. 11 is a diagram for explaining a modified example.
[Explanation of symbols]
100 data filtering device, 12R reception MAC controller (data width conversion circuit), 20 processing circuit (data writing device), 33, 33A counter circuit (data pattern generation circuit), 36 memory, 40 judgment circuit.

Claims (5)

入力したデータフレームを選択的に出力するデータフィルタリング装置であって、
前記データフレームにおける位置に応じたパターンデータを、前記特定位置のデータの入力に同期して順次発生するデータパターン発生回路と;
前記データフレームのデータ及び前記データパターン発生手段が発生したパターンデータをアドレス入力端子から入力し、前記データフレームにおける位置それぞれにおけるデータ値及び前記データフレームにおける位置それぞれに応じたパターンデータ値で定まるアドレスに格納された、前記データフレームにおける位置それぞれのデータ値が前記データフレームの選択出力条件を満たすか否かを示すデータを出力する書き換え可能なメモリと;
前記メモリから出力されたデータ値に基づいて、前記入力したデータフレームを出力するか否かを判定する判定回路と;を備えるデータフィルタリング装置。
A data filtering device that selectively outputs an input data frame,
A data pattern generation circuit for sequentially generating pattern data corresponding to a position in the data frame in synchronization with input of the data at the specific position;
The data of the data frame and the pattern data generated by the data pattern generating means are input from an address input terminal to an address determined by a data value at each position in the data frame and a pattern data value corresponding to each position in the data frame. A rewritable memory that outputs stored data indicating whether a data value of each position in the data frame satisfies a selection output condition of the data frame;
A determination circuit for determining whether to output the input data frame based on a data value output from the memory.
前記データパターン発生回路は、前記データフレームにおける位置ごとに応じて複数種類のパターンデータを時間順次に発生する、ことを特徴とする請求項1に記載のデータフィルタリング装置。2. The data filtering device according to claim 1, wherein the data pattern generation circuit generates a plurality of types of pattern data in time sequence according to positions in the data frame. 前記メモリは複数ビットのデータを並列的に出力し、
前記メモリには、前記複数ビットそれぞれに応じて互いに異なる前記データフレームの選択出力条件を満たすか否かを示すデータが格納される、ことを特徴とする請求項1又は2に記載のデータフィルタリング装置。
The memory outputs a plurality of bits of data in parallel,
3. The data filtering device according to claim 1, wherein the memory stores data indicating whether selection output conditions of the data frame different from each other are satisfied according to each of the plurality of bits. 4. .
第1のビット幅で順次入力する前記データフレームのデータを、第2のビット幅のデータ列に変換し、前記メモリへ向けて出力するデータ幅変換回路を更に備える、ことを特徴とする請求項1〜3のいずれか一項に記載のデータフィルタリング装置。The data width conversion circuit for converting data of the data frame sequentially input at a first bit width into a data string of a second bit width and outputting the data stream to the memory. The data filtering device according to any one of claims 1 to 3. 前記メモリに所定のデータを書き込むデータ書込装置を更に備える、こと特徴とする請求項1〜4のいずれか一項に記載のデータフィルタリング装置。The data filtering device according to any one of claims 1 to 4, further comprising a data writing device that writes predetermined data into the memory.
JP2002198617A 2002-07-08 2002-07-08 Data filtering apparatus Pending JP2004040708A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002198617A JP2004040708A (en) 2002-07-08 2002-07-08 Data filtering apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002198617A JP2004040708A (en) 2002-07-08 2002-07-08 Data filtering apparatus

Publications (1)

Publication Number Publication Date
JP2004040708A true JP2004040708A (en) 2004-02-05

Family

ID=31706023

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002198617A Pending JP2004040708A (en) 2002-07-08 2002-07-08 Data filtering apparatus

Country Status (1)

Country Link
JP (1) JP2004040708A (en)

Similar Documents

Publication Publication Date Title
JP3353930B2 (en) Method for determining acceptance or rejection of ethernet packets and ethernet media access controller
KR100970300B1 (en) Method and device for accessing data of a message memory of a communication component
JPH10190695A (en) Fast framing device and method for framing byte sequence of data fast
KR100977897B1 (en) Method for storing messages in a message memory and corresponding message memory
EP2006777A1 (en) Bus inverting code generating apparatus and method of generating bus inverting code using the same
JP3165050B2 (en) Packet error detection method
US20060188046A1 (en) Prediction of an optimal sampling point for clock resynchronization in a source synchronous data channel
JP4229810B2 (en) Communication test equipment
CN103107862A (en) Logic device and management data input/output (MDIO) data transmission method thereof
JP2002057729A (en) Method for deciding data transfer rate, data transmission method and data transfer unit
CN105227288B (en) GMII data transmission method for uplink and device
JP2004040708A (en) Data filtering apparatus
JP4417381B2 (en) Clock retraining method for receivers
WO2012082572A2 (en) Providing a feedback loop in a low latency serial interconnect architecture
JP3516998B2 (en) Address information reading device
US7401134B2 (en) Packet processing architecture
JP2001308832A (en) Device for converting speed
CN112104537B (en) Communication controller
EP1683031B1 (en) Method and apparatus for maintaining data density for derived clocking
CN201042016Y (en) Multi-rate and multi-protocol bit stream processor
WO2022056884A1 (en) Line coding method and device
JP4423728B2 (en) Data transmission apparatus and method
JP2819955B2 (en) In-device error monitoring circuit
JP5258039B2 (en) Interface circuit and clock / data supply method
JPH06216881A (en) Parity error monitor circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040316

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060120

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060127

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070112