JP2011101113A - Mac circuit - Google Patents
Mac circuit Download PDFInfo
- Publication number
- JP2011101113A JP2011101113A JP2009253272A JP2009253272A JP2011101113A JP 2011101113 A JP2011101113 A JP 2011101113A JP 2009253272 A JP2009253272 A JP 2009253272A JP 2009253272 A JP2009253272 A JP 2009253272A JP 2011101113 A JP2011101113 A JP 2011101113A
- Authority
- JP
- Japan
- Prior art keywords
- control unit
- self
- diagnosis
- buffer memory
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Small-Scale Networks (AREA)
- Maintenance And Management Of Digital Transmission (AREA)
Abstract
Description
本発明は、データを送信するためのMAC(MEDIA ACCESS CONTROL)フレームの生成や受信したデータの誤り検出等を行うMAC回路に関する。 The present invention relates to a MAC circuit that generates a MAC (MEDIA ACCESS CONTROL) frame for transmitting data, detects an error in received data, and the like.
イーサネット(登録商標)のMAC回路は、OSI(Open Systems Interconnection)参照モデルのレイヤ2(データリンク層)において、データを送信するためのMACフレームの生成、及び受信したデータの誤り確認を行っている。これらの規格は、IEEE802.3により規定されている。 A MAC circuit of Ethernet (registered trademark) generates a MAC frame for transmitting data and checks an error of received data in Layer 2 (data link layer) of an OSI (Open Systems Interconnection) reference model. . These standards are defined by IEEE 802.3.
図4は、一般的なMAC回路の構成を示す機能ブロック図である。まず、図4を用いてMAC回路の構成について説明する。MAC回路は、図4に示すように、TX_WRC1、送信バッファメモリ2、TX_RDC3、FCS回路4、ループバック回路5、RX_WRC6、FCS回路7、受信バッファメモリ8、及びRX_RDC9により構成される。なお、MAC回路は、CPUの動作タイミングとPHYへの送受信タイミングが異なるため、一般的に緩衝用のバッファメモリ(送信バッファメモリ2、受信バッファメモリ8)を備えている。PHYは、例えばICチップにより構成され、レイヤ1(物理層)における信号処理を行う。
FIG. 4 is a functional block diagram showing a configuration of a general MAC circuit. First, the configuration of the MAC circuit will be described with reference to FIG. As shown in FIG. 4, the MAC circuit includes TX_WRC1,
最初に、CPUからのデータ送信について説明する。図5は、一般的なMAC回路のデータ送信時の動作を示す図であり、データの流れを太線の矢印で示している。まず、CPUは、送信データ1aをMAC回路に転送する。次に、TX_WRC1は、送信側の書き込み制御を行うものであり、CPUにより転送された送信データを送信バッファメモリ2に書き込む。
First, data transmission from the CPU will be described. FIG. 5 is a diagram showing an operation at the time of data transmission of a general MAC circuit, and a data flow is indicated by a thick line arrow. First, the CPU transfers the
書き込みが完了すると、送信側の読み出し制御を行うTX_RDC3は、送信バッファメモリ2に書き込まれた送信データを読み出す。その際に、FCS(Frame Check Sequence)回路4は、FCS計算を行い、FCSデータを付加したMACフレームを作成する。作成したMACフレームのデータ4aは、TX_RDC3によりPHYにデータ送信される。
When the writing is completed, the TX_RDC 3 that performs reading control on the transmission side reads the transmission data written in the
次に、PHYからのデータ受信について説明する。図6は、一般的なMAC回路のデータ受信時の動作を示す図であり、データの流れを太線の矢印で示している。PHYからの受信データ5bは、ループバック回路5を通り、受信側の書き込み制御を行うRX_WRC6に転送される。ここで、ループバック回路5は、CPUからの切替指令5aに基づいて、PHYからのデータ5bを受信するか、あるいは送信側からのデータ5cを受信するかの選択を行うものであり、この場合においてはPHYからのデータ5bを受信する旨の選択を行っている。
Next, data reception from the PHY will be described. FIG. 6 is a diagram showing the operation of a general MAC circuit when receiving data, and the flow of data is indicated by thick arrows. The
RX_WRC6は、PHYから転送されたデータを受信バッファメモリ8に書き込む。その際にFCS回路7は、FCS計算を行ってFCSエラーが無いことを確認している。その後、受信側の読み出し制御を行うRX_RDC9は、受信バッファメモリ8に書き込まれたデータを読み出し、CPUに対して読み出したデータ9aをデータ転送する。
The RX_WRC 6 writes the data transferred from the PHY into the
次に、上述したMAC回路における従来の自己診断方法について説明する。図7は、従来のMAC回路の自己診断時の動作を示す図であり、データの流れを太線の矢印で示している。まず、CPUは、初期時に自己診断を行うためにループバック指令5aをループバック回路5に対して出力するとともに、データをMAC回路に転送する。ループバック回路5は、入力されたループバック指令5aに基づいて、送信側からのデータ(すなわちTX_RDC3により出力されたデータ)を受信する旨の選択を行う。
Next, a conventional self-diagnosis method in the above-described MAC circuit will be described. FIG. 7 is a diagram showing an operation at the time of self-diagnosis of a conventional MAC circuit, and a data flow is indicated by a thick arrow. First, the CPU outputs a
一方、TX_WRC1は、CPUにより転送されたデータを送信バッファメモリ2に書き込む。TX_RDC3は、送信バッファメモリ2にある程度データが蓄積されると、送信バッファメモリ2からデータを読み出すとともに、FCS回路4にFCSデータを付加させ、生成したデータを送信する。
On the other hand, TX_WRC1 writes the data transferred by the CPU to the
送信されたデータは、PHY転送されるとともに、ループバック回路5を通って受信側回路(すなわちRX_WRC6)に転送される。RX_WRC6は、受信したデータを受信バッファメモリ8に書き込む。その際に、FCS回路7は、FCSのエラーチェックを行う。その後、RX_RDC9は、受信バッファメモリ8に書き込まれたデータを読出し、CPUに転送する。CPUは、自分が送信したデータと受信したデータとが一致することを確認し、データが一致した場合に回路は正常に動作していると判断する。CPUは、データ確認後にループバック指令5aを解除する。これにより、ループバック回路5は、PHYからのデータ5bを受信する旨の選択を行い、PHY側からデータを受信できるように回路を切り替えている。
The transmitted data is PHY-transferred and also transferred to the receiving side circuit (that is, RX_WRC6) through the
特許文献1には、リモート環境からのポートのトラフィックの解析を可能とし、ネットワークの診断を容易にすることができるイーサネット(登録商標)スイッチが記載されている。このイーサネット(登録商標)スイッチは、複数のポートと、その複数のポートのうちの所定のポートから受信したフレームを指定された別のポートに転送するスイッチングコントローラと、制御手段と、記憶手段とを備えている。制御手段は、ネットワークを介して受信したキャプチャ開始リクエストに従い、スイッチングコントローラに対してキャプチャするフレームの条件を設定する機能を備えている。また、スイッチングコントローラは、設定された条件に合致するフレームを記憶手段にキャプチャデータとしてコピーする機能を備えている。
また、制御手段は、ネットワークを介して受信したキャプチャ取得リクエストに従い、記憶手段に格納されたキャプチャデータを読み出すと共に、ネットワーク経由でキャプチャ取得リクエスト要求を発行した相手に転送する機能を備えるとよい。 The control means may have a function of reading the capture data stored in the storage means in accordance with the capture acquisition request received via the network and transferring it to the other party that issued the capture acquisition request via the network.
さらに、制御手段は、ネットワークを介して受信したリクエストに従い、記憶手段に格納されたキャプチャデータを削除する機能と、記憶手段に格納されているキャプチャデータの一覧をネットワーク経由で転送する機能と、記憶手段に格納されたキャプチャデータのファイル名を変更する機能とをリネームする機能のうち、少なくとも1つの機能を備えると良い。 Further, the control means is configured to delete the capture data stored in the storage means according to the request received via the network, to transfer the list of capture data stored in the storage means via the network, It is preferable to provide at least one of the functions for renaming the capture data file name stored in the means.
しかしながら、図4乃至図7を用いて説明した従来のMAC回路は、初期時に自己診断を1回行うのみであるため、回路の運用中にオンラインで回路診断を行うことができないという問題点を有する。すなわち、従来のMAC回路は、自己診断をオンライン時に行うとすると診断中において他ノードからの受信データを破棄してしまうおそれがあるため、オンライン状態において定期診断を行うことが困難であり、健全性を維持するうえで問題となる。 However, the conventional MAC circuit described with reference to FIGS. 4 to 7 has a problem that the circuit diagnosis cannot be performed online during circuit operation because the self-diagnosis is performed only once at the initial stage. . In other words, if the conventional MAC circuit performs self-diagnosis at the time of online, it is difficult to perform periodic diagnosis in the online state because there is a possibility that received data from other nodes may be discarded during the diagnosis. It becomes a problem in maintaining.
特許文献1に記載のイーサネット(登録商標)スイッチは、リモート環境からのポートのトラフィックの解析を可能とするものであるが、自己診断を行うものではなく、オンライン中における定期的な自己診断機能と他ノードからのデータ受信機能とを併存させる解決策とはならない。
The Ethernet (registered trademark) switch described in
本発明は上述した従来技術の問題点を解決するもので、オンライン時に他のノードからの受信データをいかなる場合にも破棄することなく、定期的な自己診断を行って健全性を保ち続けるMAC回路を提供することを課題とする。 The present invention solves the above-mentioned problems of the prior art, and a MAC circuit that maintains periodicity by performing periodic self-diagnosis without discarding received data from other nodes in any case when online. It is an issue to provide.
本発明に係るMAC回路は、上記課題を解決するために、物理層と中央処理装置との間に介在して通信媒体のアクセスを制御するMAC回路であって、前記中央処理装置により送信された送信データを一時的に記憶するための送信バッファメモリと、前記中央処理装置により送信された送信データを前記送信バッファメモリに書き込む第1書き込み制御部と、前記送信バッファメモリに書き込まれた送信データを読み出すとともに、読み出した送信データに基づいてFCS値を含むMACフレームを生成して前記物理層に送信するMACフレーム生成部と、前記物理層から受信した受信データを一時的に記憶するための受信バッファメモリと、前記物理層から受信した受信データに基づいてFCSエラーの有無を確認するとともに、前記受信データに計算したFCS値を付加して前記受信バッファメモリに書き込む第2書き込み制御部と、前記受信バッファメモリに書き込まれた受信データを読み出すとともに、読み出した受信データを前記中央処理装置に出力する読み出し制御部と、前記物理層から受信した受信データを利用して自己診断を行う第1タイミングを決定する自己診断制御部と、前記自己診断制御部により決定された第1タイミングに応じて前記MACフレーム生成部によるMACフレームの送信を遮断する遮断部と、前記自己診断制御部により決定された第1タイミングに応じて前記読み出し制御部により出力された受信データを前記MACフレーム生成部に転送する第1転送部とを備え、前記MACフレーム生成部は、前記自己診断制御部により決定された第1タイミングに応じて、前記送信バッファメモリに代えて前記読み出し制御部により出力された受信データを前記第1転送部を介して読み出すとともに、読み出した受信データに基づいてFCS値を計算し、前記自己診断制御部は、前記第2書き込み制御部により計算されたFCS値と前記MACフレーム生成部により計算されたFCS値とを比較することにより自己の回路内における異常の有無を診断することを特徴とする。 In order to solve the above problems, a MAC circuit according to the present invention is a MAC circuit that is interposed between a physical layer and a central processing unit and controls access to a communication medium, and is transmitted by the central processing unit. A transmission buffer memory for temporarily storing transmission data; a first write control unit for writing transmission data transmitted by the central processing unit into the transmission buffer memory; and transmission data written in the transmission buffer memory. A MAC frame generation unit that reads and generates a MAC frame including an FCS value based on the read transmission data and transmits the MAC frame to the physical layer, and a reception buffer for temporarily storing reception data received from the physical layer The presence of an FCS error is confirmed based on memory and received data received from the physical layer, and the reception A second write control unit that adds the calculated FCS value to the data and writes the received data to the reception buffer memory, and reads the received data written to the reception buffer memory, and outputs the read received data to the central processing unit A read control unit; a self-diagnosis control unit that determines a first timing for performing self-diagnosis using received data received from the physical layer; and the MAC according to the first timing determined by the self-diagnosis control unit A blocking unit that blocks transmission of the MAC frame by the frame generation unit; and a reception unit that transfers the reception data output by the read control unit to the MAC frame generation unit according to a first timing determined by the self-diagnosis control unit. 1 transfer unit, and the MAC frame generation unit is a first determined by the self-diagnosis control unit According to the timing, the reception data output by the read control unit instead of the transmission buffer memory is read through the first transfer unit, and the FCS value is calculated based on the read reception data, and the self-diagnosis is performed. The control unit diagnoses whether there is an abnormality in its own circuit by comparing the FCS value calculated by the second write control unit and the FCS value calculated by the MAC frame generation unit. .
本発明によれば、オンライン時に他のノードからの受信データをいかなる場合にも破棄することなく、定期的な自己診断を行って健全性を保ち続けるMAC回路を提供することができる。 According to the present invention, it is possible to provide a MAC circuit that performs periodic self-diagnosis and maintains soundness without discarding received data from other nodes in any case when online.
以下、本発明のMAC回路の実施の形態について図面を参照して詳細に説明する。 Hereinafter, embodiments of the MAC circuit of the present invention will be described in detail with reference to the drawings.
図1は、本発明の実施例1のMAC回路の構成を示す図である。図1を参照して、MAC回路の構成を説明する。本実施例のMAC回路は、物理層と中央処理装置(CPU)との間に介在して通信媒体のアクセスを制御する回路であり、図1に示すように、TX_WRC1、送信バッファメモリ2、TX_RDC3、FCS回路4、ループバック回路5、RX_WRC6、FCS回路7、受信バッファメモリ8、RX_RDC9、カウンタ10,11、CHECK回路12、バッファコントロール13、SEL14、カウンタ15、バッファコントロール16、SEL17、及びSEL18により構成される。
1 is a diagram illustrating a configuration of a MAC circuit according to a first embodiment of the present invention. The configuration of the MAC circuit will be described with reference to FIG. The MAC circuit of this embodiment is a circuit that controls access to a communication medium interposed between a physical layer and a central processing unit (CPU). As shown in FIG. 1, TX_WRC1,
すなわち、図4乃至図7で説明した従来のMAC回路と異なる点は、カウンタ10,11、CHECK回路12、バッファコントロール13、SEL14、カウンタ15、バッファコントロール16、SEL17、及びSEL18を備えている点である。
That is, the difference from the conventional MAC circuit described with reference to FIGS. 4 to 7 is that it includes
TX_WRC1は、本発明の第1書き込み制御部に対応し、CPU(中央処理装置)により送信された送信データを送信バッファメモリ2に書き込む。ここで、送信バッファメモリ2は、CPUにより送信された送信データを一時的に記憶するためのメモリである。
TX_WRC1 corresponds to the first write control unit of the present invention, and writes the transmission data transmitted by the CPU (central processing unit) to the
カウンタ15は、本発明の第3カウンタに対応し、TX_WRC1がCPUにより送信された送信データを受信した回数をカウントするとともに、カウント数が所定の回数に達した場合に第3設定カウント信号を生成する。 The counter 15 corresponds to the third counter of the present invention, counts the number of times TX_WRC1 has received transmission data transmitted by the CPU, and generates a third set count signal when the count reaches a predetermined number To do.
バッファコントロール16は、送信バッファメモリ2の空き容量を監視し、メモリがあふれそうになった場合に、その旨をCPUに知らせるものである。CPUは、バッファコントロール16の警告に応じて送信データ量の制限等の対処を行う。
The buffer control 16 monitors the free capacity of the
SEL17は、後述するCHECK回路12の指令にしたがい、送信バッファメモリ2の出力と後述するRX_RDC9の出力とのいずれかを選択してTX_RDC3に出力する。
The
TX_RDC3とFCS回路4とは、本発明のMACフレーム生成部に対応し、送信バッファメモリ2に書き込まれた送信データをTX_RDC3が読み出すとともに、読み出した送信データに基づいてFCS回路4がFCS計算を行い、TX_RDC3がFCS値を含むMACフレームを生成して物理層のPHYに送信する。
The
ループバック回路5は、CPUの指令に応じてSEL18の出力であるMACフレームと物理層のPHYから受信した受信データとのいずれかを選択し、RX_WRC6に出力する。
The
RX_WRC6とFCS回路7とは、本発明の第2書き込み制御部に対応し、物理層から受信した受信データに基づいてFCSエラーの有無をFCS回路7が確認するとともに、受信データに計算したFCS値を付加してRX_WRC6が受信バッファメモリ8に書き込む。ここで、受信バッファメモリ8は、物理層から受信した受信データを一時的に記憶するためのメモリである。なお、上述した送信バッファメモリ2や受信バッファメモリ8は、本実施例においてFIFO型のバッファメモリを使用しているものとする。
The
カウンタ10は、本発明の第1カウンタに対応し、第2書き込み制御部(RX_WRC6)が物理層から受信データを受信した回数をカウントするとともに、カウント数が所定の回数(例えば100回)に達した場合に第1設定カウント信号を生成する。
The
カウンタ11は、本発明の第2カウンタに対応し、カウンタ10により第1設定カウント信号が生成された場合に、自己診断中における第2書き込み制御部(RX_WRC6)が物理層から受信データを受信した回数をカウントするとともに、カウント数が所定の回数(例えば10回)に達した場合に第2設定カウント信号を生成する。
The
バッファコントロール13は、本発明のバッファ制御部に対応し、受信バッファメモリ8の空き容量を監視し、受信バッファメモリ8における記憶量が所定値を超えた場合にメモリ容量警告信号を生成する。
The
SEL14は、後述するCHECK回路12の指令にしたがい、受信バッファメモリ8の出力とTX_RDC3の出力とのいずれかを選択してRX_RDC9に出力する。
The
RX_RDC9は、本発明の読み出し制御部に対応し、受信バッファメモリ8に書き込まれた受信データをSEL14を介して読み出すとともに、読み出した受信データをCPUに出力する。
The
CHECK回路12は、本発明の自己診断制御部に対応し、物理層から受信した受信データを利用して自己診断を行う第1タイミングを決定する。具体的には、CHECK回路12は、カウンタ10により生成された第1設定カウント信号に基づいて第1タイミングを決定する。
The
SEL18は、本発明の遮断部に対応し、CHECK回路12により決定された第1タイミングに応じてTX_RDC3によるMACフレームの送信を遮断する。
The
また、上述したSEL17は、本発明の第1転送部に対応し、CHECK回路12により決定された第1タイミングに応じて、RX_RDC9により出力された受信データをTX_RDC3に転送する。
The
次に、上述のように構成された本実施の形態の作用を説明する。図2は、本実施例のMAC回路の受信データを利用して自己診断を行う際の動作を示す図である。この場合における本実施例のMAC回路は、回路中におけるRX_WRC6、RX_RDC9、TX_RDC3といった部分を主に自己診断し、正常な動作が行われているか否かを判断する。 Next, the operation of the present embodiment configured as described above will be described. FIG. 2 is a diagram illustrating an operation when performing self-diagnosis using received data of the MAC circuit of the present embodiment. In this case, the MAC circuit according to the present embodiment mainly performs self-diagnosis on portions such as RX_WRC6, RX_RDC9, and TX_RDC3 in the circuit to determine whether normal operation is performed.
まず、カウンタ10は、RX_WRC6が物理層のPHYから受信データ5bを受信した回数をカウントする。なお、カウンタ10は、ループバック回路5を介して送信回路からのループバックデータ5cをRX_WRC6が受信したときにもカウントアップする設定でもよい。
First, the
カウンタ10は、カウント数が所定の回数(例えば100回)に達した場合に第1設定カウント信号を生成し、CHECK回路12に出力する。CHECK回路12は、カウンタ10により生成された第1設定カウント信号に基づいて第1タイミングを決定する。すなわち、本実施例のMAC回路は、CHECK回路12により決定された第1タイミングに合わせて受信データを利用した自己診断を1回(あるいは複数回)行う。
The
カウンタ10により第1設定カウント信号が生成されると、CHECK回路12は、CPUに対してTX_RDC3による送信バッファメモリ2からの送信データの読み出しを中止させる旨の指令信号を出力する。CPUは、当該指令信号を受けた場合にTX_RDC3に指令を与えることにより、TX_RDC3による送信バッファメモリ2からの送信データの読み出しを中止させるとともに、RX_RDC9からの受信データの読み出しを開始させる。
When the first setting count signal is generated by the
また、SEL17は、CHECK回路12により決定された第1タイミングに応じてRX_RDC9により出力された受信データ13bをTX_RDC3に転送する。
Further, the
すなわち、MACフレーム生成部たるTX_RDC3及びFCS回路4は、CHECK回路12により決定された第1タイミングに応じて、送信バッファメモリ2に代えてRX_RDC9により出力された受信データ13bをSEL17を介して読み出すとともに、読み出した受信データに基づいてFCS回路4がFCS値を計算する。
That is, the
なお、SEL18は、CHECK回路12により決定された第1タイミングに応じてTX_RDC3によるMACフレームの送信を遮断する。
Note that the
RX_WRC6は、受信バッファメモリ8に受信データを書き込むとともに、FCS回路7でFCS値を計算させ、PHYから送られてきた受信データに付加されているFCS値と照合を行い、FCSエラーの有無を確認する。FCSエラーが発生した場合には、RX_WRC6は、受信バッファメモリ8に対して受信データの書き込みを行うが、PHYから送信されてくる次データで上書きすることにより、当該FCSエラーを含む受信データを破棄する。RX_WRC6は、受信バッファメモリ8に対して受信データを書き込む際に、受信データのみならず、FCS回路7で計算したFCS値も書き込む。
The
RX_RDC9は、受信バッファメモリ8から受信データ及びFCS値を読み出すとともに、読み出した受信データを出力する。出力された受信データは、CPUに転送されるとともに、上述したようにSEL17を介してTX_RDC3にも転送される。また、RX_RDC9は、読み出したFCS値13cをCHECK回路12に転送する。すなわち、第2書き込み制御部のFCS回路7により計算されたFCS値は、RX_RDC9によりCHECK回路12に転送されることになる。
The
一方、MACフレーム生成部のFCS回路4は、TX_RDC3に転送された受信データに基づいてFCS値を再計算し、計算結果たるFCS値をCHECK回路12に転送する。
On the other hand, the
CHECK回路12は、第2書き込み制御部(FCS回路7)により計算されたFCS値とMACフレーム生成部(FCS回路4)により計算されたFCS値とを比較することにより、当該MAC回路内における異常の有無を診断する。具体的には、CHECK回路12は、両FCS値が一致した場合には、RX_WRC6、RX_RDC9、及びTX_RDC3が正常に動作していると判断する。一方、FCS値が一致しない場合には、CHECK回路12は、エラー信号をCPUに対して通知する。
The
なお、RX_WRC6が受け取った受信データにFCSエラーがあった場合には、RX_WRC6は、上述したように、その受信データを一旦受信バッファメモリ8に書き込むものの、その後に受け取った受信データを受信バッファメモリ8に上書きすることにより、当該FCSエラーのあった受信データが破棄される。
If there is an FCS error in the received data received by the
このように、受信バッファメモリ8でデータが上書きされ、FCSエラーのある受信データが破棄される場合には、本発明のMAC回路は、受信データを利用した自己診断ができないことになる。また、自己診断中に送信されてくる全受信データにFCSエラーが発生した場合には、受信側回路が止まってしまうおそれもある。
As described above, when data is overwritten in the
そこで、カウンタ11は、カウンタ10により第1設定カウント信号が生成された場合に、自己診断中における第2書き込み制御部(RX_WRC6)が物理層から受信データを受信した回数をカウントするとともに、カウント数が所定の回数(例えば10回)に達した場合に第2設定カウント信号を生成する。このようにして、カウンタ11は、自己診断中の受信データ数をカウントし、規定値内で自己診断が完了できなかった場合は、自己診断モードを中止するための第2設定カウント信号を生成してCHECK回路12に出力する。
Therefore, the
CHECK回路12は、カウンタ11により生成された第2設定カウント信号に基づいて自己診断を中止する。
The
ここで、自己診断の終了方法について説明する。CHECK回路12は、自己診断を完了した場合でも中止した場合でも、以下に示す終了方法により自己診断を終了する。
Here, a method for terminating the self-diagnosis will be described. The
まずCHECK回路12は、TX_RDC3が送信バッファメモリ2から読出しを行わないようにするための信号を解除する。本実施例においては、CHECK回路12は、CPUに対してTX_RDC3による送信バッファメモリ2からの送信データの読み出しを再開させる旨の指令信号を出力する。CPUは、当該指令信号を受けた場合にTX_RDC3に指令を与えることにより、TX_RDC3によるRX_RDC9からの受信データの読み出しを中止させるとともに、送信バッファメモリ2からの送信データの読み出しを再開させる。
First, the
また、CHECK回路12は、SEL18による遮断を解除するとともに、SEL17がRX_RDC9からの受信データの転送を中止して送信バッファメモリ2からTX_RDC3に対して送信データの転送が行われるように回路を切り替える。その後、MAC回路は、データの送受信を通常通りに行う。
Further, the
なお、本実施例のMAC回路は、自己診断中に受信バッファメモリ8あるいは送信バッファメモリ2があふれそうになった場合には自己診断を中止する。具体的には、バッファコントロール13は、受信バッファメモリ8の空き容量を監視し、受信バッファメモリ8における記憶量が所定値を超えた場合にメモリ容量警告信号を生成する。CPUは、バッファコントロール13により生成されたメモリ容量警告信号に応じてCHECK回路12に自己診断を中止する旨の指令信号を出力する。
Note that the MAC circuit of this embodiment stops the self-diagnosis when the
同様に、バッファコントロール16は、送信バッファメモリ2の空き容量を監視し、送信バッファメモリ2における記憶量が所定値を超えた場合に警告信号を生成する。CPUは、バッファコントロール16により生成された警告信号に応じてCHECK回路12に自己診断を中止する旨の指令信号を出力する。
Similarly, the buffer control 16 monitors the free capacity of the
上述のとおり、本発明の実施例1の形態に係るMAC回路によれば、オンライン時に他のノードからの受信データをいかなる場合にも破棄することなく、定期的な自己診断を行って健全性を保ち続けることができる。すなわち、本実施例のMAC回路は、受信データを利用して自己診断を行うとともに、RX_RDC9が受信データをCPUと(SEL17を介して)TX_RDC3との双方に出力しているので、通常の受信データの受信に並行して自己診断も行うことができ、PHYからの受信をとめることなく自己診断を行うことができるメリットがある。
As described above, according to the MAC circuit according to the first embodiment of the present invention, it is possible to perform periodic self-diagnosis without discarding received data from other nodes in any case at the time of online operation, thereby improving the soundness. You can keep keeping. That is, the MAC circuit of the present embodiment performs self-diagnosis using the received data, and the
また、CHECK回路12は、カウンタ10によりカウントされた受信データ数に基づいて自己診断を行うタイミングを決めているので、MAC回路の使用頻度に応じたタイミングで自己診断を行うことができ、より適切にMAC回路の健全性を保つことができる。
In addition, since the
さらに、カウンタ11を備えることにより、本実施例のMAC回路は、受信データにFCSエラーが生じている場合には適切に自己診断を中止することができる。
Furthermore, by providing the
また、自己診断中に受信バッファメモリ8があふれそうになった場合にはバッファコントロール13の警告により、CHECK回路12は、自己診断処理を中断し通常の送受信モードに戻るため、受信処理が中断されることはない。
If the
なお、カウンタ11のエラーカウントが規定値を超えた場合に、CHECK回路12は、CPUに対してループバック回路5を切り替える要求を出す構成でもよい。要求を受けたCPUは、ループバック回路5を切り替えて、CPUが自ら送信したデータをループバックさせる。
Note that when the error count of the
すなわち、ループバック回路5は、本発明のループバック部に対応し、カウンタ11により生成された第2設定カウント信号に応じて、物理層からRX_WRC6に対する受信データの受信を遮断するとともに、TX_RDC3により生成されたMACフレームをRX_WRC6に転送する。
That is, the
CPUは、自分が送信したデータとループバックで戻ってきたデータとが一致するか否かを確認し、データが一致した場合にはループバック回路5を切り替えて元に戻す。一致しない場合には、CPUは、例えば5フレームの送受信を繰り返し、それでもデータが一致しない場合には、MAC回路内に故障部分があると判断し、ループバック回路5を元に戻す。
The CPU checks whether or not the data transmitted by itself matches the data returned by the loopback, and when the data matches, switches the
ループバックさせている最中においては、MAC回路は、PHYから受信データを受信することができないが、FCSエラーについて外部からの受信データに原因があるのかMAC回路内に原因があるのかを判断することができる。 While the loopback is in progress, the MAC circuit cannot receive the received data from the PHY, but determines whether there is a cause in the received data from the outside or in the MAC circuit for the FCS error. be able to.
図3は、本実施例のMAC回路の送信データを利用して自己診断を行う際の動作を示す図である。なお、本実施例のMAC回路の構成は、実施例1と同様であり、重複した説明を省略する。ただし、本実施例のCHECK回路12は、CPUにより送信された送信データを利用して自己診断を行う第2タイミングを決定する。
FIG. 3 is a diagram illustrating an operation when performing self-diagnosis using transmission data of the MAC circuit of the present embodiment. The configuration of the MAC circuit of the present embodiment is the same as that of the first embodiment, and a duplicate description is omitted. However, the
次に、上述のように構成された本実施の形態の作用を説明する。本実施例におけるMAC回路は、CPUからの送信データを利用することにより、回路中におけるTX_WRC1、TX_RDC3、RX_RDC9といった部分を主に自己診断し、正常な動作が行われているか否かを判断する。 Next, the operation of the present embodiment configured as described above will be described. The MAC circuit in the present embodiment mainly uses the transmission data from the CPU to perform self-diagnosis mainly on portions of TX_WRC1, TX_RDC3, and RX_RDC9 in the circuit to determine whether normal operation is being performed.
まず、カウンタ15は、TX_WRC1がCPUにより送信された送信データを受信した回数をカウントするとともに、カウント数が所定の回数に達した場合に第3設定カウント信号を生成し、CHECK回路12に出力する。
First, the counter 15 counts the number of times TX_WRC1 has received the transmission data transmitted by the CPU, and generates a third setting count signal when the count number reaches a predetermined number, and outputs it to the
CHECK回路12は、カウンタ15により生成された第3設定カウント信号に基づいて第2タイミングを決定する。すなわち、本実施例のMAC回路は、CHECK回路12により決定された第2タイミングに合わせて送信データを利用した自己診断を1回(あるいは複数回)行う。
The
カウンタ15により第3設定カウント信号が生成されると、CHECK回路12は、CPUによる新規データの送信が中止されるようにCPUに対して指令信号を出力する。送信バッファメモリ2に書き込まれた送信データが全て送信されると、CHECK回路12は、CPUに対してRX_RDC9による受信バッファメモリ8からの受信データの読み出しを中止させる旨の指令信号を出力する。CPUは、当該指令信号を受けた場合にRX_RDC9に指令を与えることにより、RX_RDC9による受信バッファメモリ8からの送信データの読み出しを中止させるとともに、TX_RDC4からの送信データの読み出しを開始させる。
When the third setting count signal is generated by the counter 15, the
また、SEL14は、本発明の第2転送部に対応し、CHECK回路12により決定された第2タイミングに応じてMACフレーム生成部(TX_RDC3)により出力されたMACフレームをRX_RDC9に転送する。
The
すなわち、RX_RDC9は、CHECK回路12により決定された第2タイミングに応じて、受信バッファメモリ8に代えてTX_RDC3により出力されたMACフレームをSEL14を介して読み出すとともに、読み出したMACフレームをCPUに出力する。
That is, the
なお、SEL18は、CHECK回路12により決定された第2タイミングに応じてTX_RDC3によるMACフレームの送信を遮断する。
Note that the
自己診断は、以下の手順により行われる。まずCPUは、テスト用送信データをMAC回路に対して送信する。TX_WRC1は、送信バッファメモリ2にテスト用送信データを書き込む。
The self-diagnosis is performed according to the following procedure. First, the CPU transmits test transmission data to the MAC circuit. TX_WRC1 writes test transmission data in the
次に、TX_RDC3は、送信バッファメモリ2に書き込まれたテスト用送信データを読み出すとともに、読み出したテスト用送信データに基づいたMACフレームを生成し、SEL14を介してRX_RDC9に転送する。
Next, the
RX_RDC9は、読み出したMACフレームをCPUに出力する。CPUは、送信したテスト用送信データと受信したMACフレームとを比較し、データが一致するか否かを判断する。データが一致した場合には、CPUは、TX_WRC1、TX_RDC3、RX_RDC9といった部分が正常に動作していると判断する。一方、データが不一致の場合には、CPUは、TX_WRC1、TX_RDC3、RX_RDC9のいずれかの回路部分が故障していると判断する。
The
自己診断を完了すると、CHECK回路12は、SEL14がTX_RDC3からのMACフレームの転送を中止して受信バッファメモリ8からRX_RDC9に対して受信データの転送が行われるように回路を切り替える。また、CHECK回路12は、CPUによる新規データの送信が再開されるようにCPUに対して指令信号を出力する。さらに、CHECK回路12は、SEL18による遮断を解除する。
When the self-diagnosis is completed, the
また、CHECK回路12は、RX_RDC9が受信バッファメモリ8から読出しを行わないようにするための信号を解除する。本実施例においては、CHECK回路12は、CPUに対してRX_RDC9による受信バッファメモリ8からの受信データの読み出しを再開させる旨の指令信号を出力する。CPUは、当該指令信号を受けた場合にRX_RDC9に指令を与えることにより、RX_RDC9によるTX_RDC3からのMACフレームの読み出しを中止させるとともに、受信バッファメモリ8からの受信データの読み出しを再開させる。その後、MAC回路は、データの送受信を通常通りに行う。
Further, the
なお、本実施例のMAC回路は、自己診断中に受信バッファメモリ8あるいは送信バッファメモリ2があふれそうになった場合には自己診断を中止する。具体的には、バッファコントロール13は、受信バッファメモリ8の空き容量を監視し、受信バッファメモリ8における記憶量が所定値を超えた場合にメモリ容量警告信号を生成する。
Note that the MAC circuit of this embodiment stops the self-diagnosis when the
SEL14は、バッファコントロール13により生成されたメモリ容量警告信号に応じてMACフレームの転送を中止する。ただし、本実施例においては、バッファコントロール13が直接的にSEL14に対して指令を行うわけではなく、CPU及びCHECK回路12を介した動作となる。
The
すなわち、SEL14は、バッファコントロール13によりメモリ容量警告信号が生成されると、CHECK回路12から指令を受け、TX_RDC3からのMACフレームの転送を中止して受信バッファメモリ8からRX_RDC9に対して受信データの転送が行われるように回路を切り替える。
That is, when the memory capacity warning signal is generated by the
また、RX_RDC9は、バッファコントロール13により生成されたメモリ容量警告信号に応じて、読み出し先を再度受信バッファメモリ8に戻す。具体的には、メモリ容量警告信号を受信したCPUが、RX_RDC9に指令を与えることにより、RX_RDC9によるTX_RDC3からのMACフレームの読み出しを中止させるとともに、受信バッファメモリ8からの受信データの読み出しを再開させる。
Further, the
本実施例におけるMAC回路は、上述したように、自己診断中においては受信バッファメモリ8に書き込まれた受信データがRX_RDC9により読み出されないので、実施例1のように自己診断中にリアルタイムで受信データがCPUに出力されることはなく、自己診断中に受信した受信データは受信バッファメモリ8に記憶され、自己診断終了後にまとめて受信バッファメモリ8から受信データをCPUに送るものである。したがって、受信バッファメモリ8に空き容量が無くなると、受信バッファメモリ8は、新たに受信データを受信するたびに古いデータに上書きしてしまい、CPUに出力することなく受信データを破棄してしまうことになる。バッファコントロール13は、上述した問題が発生する前に受信バッファメモリ8の空き容量に応じて自己診断を中止し、受信データの破棄を回避するものである。
As described above, the MAC circuit in the present embodiment does not read the received data written in the
上述のとおり、本発明の実施例2の形態に係るMAC回路によれば、実施例1と同様の効果を得ることができるのみならず、送信データを利用して自己診断を行うことで、TX_WRC1等の実施例1で確認できなかった回路部分について自己診断を行うことができる。また、CHECK回路12は、カウンタ15によりカウントされた送信データ数に基づいて自己診断を行うタイミングを決めているので、MAC回路の使用頻度に応じたタイミングで自己診断を行うことができ、より適切にMAC回路の健全性を保つことができる。
As described above, according to the MAC circuit according to the second embodiment of the present invention, not only can the same effect as the first embodiment be obtained, but also TX_WRC1 can be obtained by performing self-diagnosis using transmission data. Self-diagnosis can be performed for circuit portions that could not be confirmed in the first embodiment. In addition, since the
また、自己診断中に受信バッファメモリ8があふれそうになった場合にはバッファコントロール13の警告により、CHECK回路12は、自己診断処理を中断し通常の送受信モードに戻るため、受信データが破棄されることなく適切に受信処理を行うことができる。
If the
本発明に係るMAC回路は、データを送信するためのMACフレームの生成や受信したデータの誤り検出等を行って通信媒体のアクセスを制御するMAC回路に利用可能である。 The MAC circuit according to the present invention can be used for a MAC circuit that controls access to a communication medium by generating a MAC frame for transmitting data, detecting an error in received data, and the like.
1 TX_WRC
2 送信バッファメモリ
3 TX_RDC
4 FCS回路
5 ループバック回路
5a ループバック指令
5b 受信データ
5c ループバックデータ
6 RX_WRC
7 FCS回路
8 受信バッファメモリ
9 RX_RDC
9a 受信データ
10,11 カウンタ
12 CHECK回路
13 バッファコントロール
13b 受信データ
13c FCS値
14 SEL
15 カウンタ
16 バッファコントロール
17,18 SEL
1 TX_WRC
2
4
7
9a
15 Counter 16
Claims (7)
前記中央処理装置により送信された送信データを一時的に記憶するための送信バッファメモリと、
前記中央処理装置により送信された送信データを前記送信バッファメモリに書き込む第1書き込み制御部と、
前記送信バッファメモリに書き込まれた送信データを読み出すとともに、読み出した送信データに基づいてFCS値を含むMACフレームを生成して前記物理層に送信するMACフレーム生成部と、
前記物理層から受信した受信データを一時的に記憶するための受信バッファメモリと、
前記物理層から受信した受信データに基づいてFCSエラーの有無を確認するとともに、前記受信データに計算したFCS値を付加して前記受信バッファメモリに書き込む第2書き込み制御部と、
前記受信バッファメモリに書き込まれた受信データを読み出すとともに、読み出した受信データを前記中央処理装置に出力する読み出し制御部と、
前記物理層から受信した受信データを利用して自己診断を行う第1タイミングを決定する自己診断制御部と、
前記自己診断制御部により決定された第1タイミングに応じて前記MACフレーム生成部によるMACフレームの送信を遮断する遮断部と、
前記自己診断制御部により決定された第1タイミングに応じて前記読み出し制御部により出力された受信データを前記MACフレーム生成部に転送する第1転送部とを備え、
前記MACフレーム生成部は、前記自己診断制御部により決定された第1タイミングに応じて、前記送信バッファメモリに代えて前記読み出し制御部により出力された受信データを前記第1転送部を介して読み出すとともに、読み出した受信データに基づいてFCS値を計算し、
前記自己診断制御部は、前記第2書き込み制御部により計算されたFCS値と前記MACフレーム生成部により計算されたFCS値とを比較することにより当該MAC回路内における異常の有無を診断することを特徴とするMAC回路。 A MAC circuit for controlling access to a communication medium interposed between a physical layer and a central processing unit,
A transmission buffer memory for temporarily storing transmission data transmitted by the central processing unit;
A first write control unit for writing the transmission data transmitted by the central processing unit into the transmission buffer memory;
A MAC frame generation unit that reads transmission data written in the transmission buffer memory, generates a MAC frame including an FCS value based on the read transmission data, and transmits the MAC frame to the physical layer;
A reception buffer memory for temporarily storing reception data received from the physical layer;
A second write control unit for confirming the presence or absence of an FCS error based on the received data received from the physical layer, and adding the calculated FCS value to the received data and writing to the receive buffer memory;
A read controller that reads the received data written in the reception buffer memory and outputs the read received data to the central processing unit;
A self-diagnosis control unit for determining a first timing for performing self-diagnosis using received data received from the physical layer;
A blocking unit that blocks transmission of the MAC frame by the MAC frame generation unit according to the first timing determined by the self-diagnosis control unit;
A first transfer unit that transfers the received data output by the read control unit to the MAC frame generation unit according to a first timing determined by the self-diagnosis control unit;
The MAC frame generation unit reads the reception data output by the read control unit instead of the transmission buffer memory via the first transfer unit according to the first timing determined by the self-diagnosis control unit. At the same time, the FCS value is calculated based on the read received data,
The self-diagnosis control unit diagnoses whether there is an abnormality in the MAC circuit by comparing the FCS value calculated by the second write control unit with the FCS value calculated by the MAC frame generation unit. Feature MAC circuit.
前記自己診断制御部は、前記第1カウンタにより生成された第1設定カウント信号に基づいて前記第1タイミングを決定することを特徴とする請求項1記載のMAC回路。 A first counter that counts the number of times the second write control unit receives received data from the physical layer and generates a first set count signal when the count reaches a predetermined number;
2. The MAC circuit according to claim 1, wherein the self-diagnosis control unit determines the first timing based on a first setting count signal generated by the first counter.
前記自己診断制御部は、前記第2カウンタにより生成された第2設定カウント信号に基づいて自己診断を中止することを特徴とする請求項2記載のMAC回路。 When the first setting count signal is generated by the first counter, the second write control unit during self-diagnosis counts the number of times received data is received from the physical layer, and the count number is set to a predetermined number. A second counter for generating a second set count signal when reached
3. The MAC circuit according to claim 2, wherein the self-diagnosis control unit stops the self-diagnosis based on a second setting count signal generated by the second counter.
前記遮断部は、前記自己診断制御部により決定された第2タイミングに応じて前記MACフレーム生成部によるMACフレームの送信を遮断し、
前記自己診断制御部により決定された第2タイミングに応じて前記MACフレーム生成部により出力されたMACフレームを前記読み出し制御部に転送する第2転送部を備え、
前記読み出し制御部は、前記自己診断制御部により決定された第2タイミングに応じて、前記受信バッファメモリに代えて前記MACフレーム生成部により出力されたMACフレームを前記第2転送部を介して読み出すとともに、読み出したMACフレームを前記中央処理装置に出力することを特徴とする請求項1乃至請求項4のいずれか1項記載のMAC回路。 The self-diagnosis control unit determines a second timing for performing self-diagnosis using transmission data transmitted by the central processing unit,
The blocking unit blocks transmission of the MAC frame by the MAC frame generation unit according to the second timing determined by the self-diagnosis control unit,
A second transfer unit that transfers the MAC frame output by the MAC frame generation unit to the read control unit according to the second timing determined by the self-diagnosis control unit;
The read control unit reads the MAC frame output from the MAC frame generation unit instead of the reception buffer memory via the second transfer unit according to the second timing determined by the self-diagnosis control unit. 5. The MAC circuit according to claim 1, wherein the read MAC frame is output to the central processing unit.
前記自己診断制御部は、前記第3カウンタにより生成された第3設定カウント信号に基づいて前記第2タイミングを決定することを特徴とする請求項5記載のMAC回路。 A third counter that counts the number of times the first write control unit has received the transmission data transmitted by the central processing unit and generates a third set count signal when the count reaches a predetermined number; ,
The MAC circuit according to claim 5, wherein the self-diagnosis control unit determines the second timing based on a third setting count signal generated by the third counter.
前記第2転送部は、前記バッファ制御部により生成されたメモリ容量警告信号に応じて転送を中止し、
前記読み出し制御部は、前記バッファ制御部により生成されたメモリ容量警告信号に応じて、読み出し先を再度受信バッファメモリに戻すことを特徴とする請求項5又は請求項6記載のMAC回路。 A buffer control unit that monitors a free capacity of the reception buffer memory and generates a memory capacity warning signal when a storage amount in the reception buffer memory exceeds a predetermined value;
The second transfer unit stops transfer according to the memory capacity warning signal generated by the buffer control unit,
7. The MAC circuit according to claim 5, wherein the read control unit returns the read destination to the reception buffer memory again according to the memory capacity warning signal generated by the buffer control unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009253272A JP2011101113A (en) | 2009-11-04 | 2009-11-04 | Mac circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009253272A JP2011101113A (en) | 2009-11-04 | 2009-11-04 | Mac circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011101113A true JP2011101113A (en) | 2011-05-19 |
Family
ID=44191953
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009253272A Pending JP2011101113A (en) | 2009-11-04 | 2009-11-04 | Mac circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011101113A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016009931A (en) * | 2014-06-23 | 2016-01-18 | 日本電信電話株式会社 | Station side optical line termination device, subscriber side optical line termination device, signal generation method, and signal reception method |
JP2016009930A (en) * | 2014-06-23 | 2016-01-18 | 日本電信電話株式会社 | Station side optical line terminator and signal generation method |
-
2009
- 2009-11-04 JP JP2009253272A patent/JP2011101113A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016009931A (en) * | 2014-06-23 | 2016-01-18 | 日本電信電話株式会社 | Station side optical line termination device, subscriber side optical line termination device, signal generation method, and signal reception method |
JP2016009930A (en) * | 2014-06-23 | 2016-01-18 | 日本電信電話株式会社 | Station side optical line terminator and signal generation method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4437984B2 (en) | Network relay device and control method thereof | |
JP4874185B2 (en) | Multi-fault handling system and shared link terminator used therefor | |
US20060126517A1 (en) | Loop detection method and device | |
KR19990067626A (en) | Packet transmitter and receiver | |
JP2007067528A (en) | Network relaying apparatus, fault diagnostic apparatus, and program | |
WO2011131081A1 (en) | Method and apparatus for implementing redundancy serial bus | |
JP2008301003A (en) | Relay apparatus, network, and frame relaying method used for them | |
JP5125430B2 (en) | Information processing apparatus and information processing method | |
US9294342B2 (en) | Network node apparatus system, apparatus, and method | |
JP2010160660A (en) | Network interface, computer system, operation method therefor, and program | |
JP2011101113A (en) | Mac circuit | |
JP3861226B2 (en) | Concentrator and its reset management method | |
TW201512832A (en) | Snapshot message | |
JP2008236266A (en) | Transmission device, frame for maintenance processing method and transmission program | |
US7542418B2 (en) | Method and apparatus for detecting and removing orphaned primitives in a fibre channel network | |
WO2009089710A1 (en) | Method and apparatus for port configuration | |
WO2021044652A1 (en) | Master device, arithmetic processing device, programmable logic controller, network, and method | |
JP6136754B2 (en) | Communication control apparatus and image forming apparatus | |
JP2001203705A (en) | Device and method for controlling flow and storage medium recording flow control program | |
JP3916455B2 (en) | Digital interface device and bus control method between information processing devices using the same | |
JP4086839B2 (en) | Network communication system and failure detection notification method | |
JP5579637B2 (en) | COMMUNICATION SYSTEM, COMMUNICATION DEVICE, AND CONNECTION STATE DETECTION METHOD | |
JP2000354040A (en) | Device and method for controlling system switching | |
JP2002032269A (en) | Communication error restoring method and its device | |
JP2002057712A (en) | Memory leakage recovery method for packet memory and buffer processing unit |