JP2011193242A - Communication controller and communication control method - Google Patents
Communication controller and communication control method Download PDFInfo
- Publication number
- JP2011193242A JP2011193242A JP2010057854A JP2010057854A JP2011193242A JP 2011193242 A JP2011193242 A JP 2011193242A JP 2010057854 A JP2010057854 A JP 2010057854A JP 2010057854 A JP2010057854 A JP 2010057854A JP 2011193242 A JP2011193242 A JP 2011193242A
- Authority
- JP
- Japan
- Prior art keywords
- descriptor
- reception data
- data area
- write
- received
- 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.)
- Withdrawn
Links
Images
Landscapes
- Information Transfer Systems (AREA)
- Computer And Data Communications (AREA)
- Communication Control (AREA)
Abstract
【課題】通信時のCPUの負担を軽減すること。
【解決手段】主メモリ部3は、複数受信データ領域を複数ディスクリプタに対応付けるディスクリプタチェイン12を記録している。通信制御部10は、ネットワークを介して受信された書き込み受信データがパケットバッファ7に蓄積された場合で、書き込み受信データ領域に対応するディスクリプタが記録可能を示しているときにその書き込み受信データ領域にその書き込み受信データを記録し、そのディスクリプタが記録不可能を示しているときに割り込み信号を出力する。CPU2は、その割り込み信号が出力されたときに、読み出し受信データ領域から受信データを読み出し、その読み出し受信データ領域に対応するディスクリプタが記録可能を示すように、そのディスクリプタチェインを更新する。このとき、その割り込み信号は、1パケットごとに出力されないで、CPUの負担を軽減することができる。
【選択図】図1To reduce a load on a CPU during communication.
A main memory section records a descriptor chain that associates a plurality of received data areas with a plurality of descriptors. When the received write data received via the network is accumulated in the packet buffer 7, the communication control unit 10 stores the descriptor corresponding to the write received data area in the write received data area. The write reception data is recorded, and an interrupt signal is output when the descriptor indicates that recording is impossible. When the interrupt signal is output, the CPU 2 reads the received data from the read received data area and updates the descriptor chain so that the descriptor corresponding to the read received data area can be recorded. At this time, the interrupt signal is not output for each packet, and the burden on the CPU can be reduced.
[Selection] Figure 1
Description
本発明は、通信制御装置および通信制御方法に関し、特に、イーサーネット(登録商標)に例示される通信において受信データを受信するときに利用される通信制御装置および通信制御方法に関する。 The present invention relates to a communication control device and a communication control method, and more particularly to a communication control device and a communication control method used when receiving reception data in communication exemplified by Ethernet (registered trademark).
家庭用ルーターの普及により、家庭でも複数台のパーソナルコンピュータをLAN(Local Area Network)でつなぎ、プリンタやディスクシステムを共有するようになってきている。例えば、パーソナルコンピュータからプリンタに印刷する場合は、モノクロの印刷からカラー印刷に変わってきているため送信するデータ量が増加していると共に、画像データのような大容量のデータをイーサーネット(登録商標)経由でディスクシステムに残しておくことができる。この流れの中で、イーサーネット(登録商標)などの通信装置は、大きなデータを複数のパケットに分けて送信するが、送信対象のデータが大容量化したことで送信するパケット数が増えてしまっている。以上のように、複数のパーソナルコンピュータから大容量のデータ通信をするために通信効率の向上が必要となっている。 With the popularization of home routers, printers and disk systems are being shared by connecting a plurality of personal computers via a LAN (Local Area Network) at home. For example, when printing from a personal computer to a printer, the amount of data to be transmitted has increased because monochrome printing has changed to color printing, and a large amount of data such as image data has been transferred to Ethernet (registered trademark). ) Can be left in the disk system via. In this flow, communication devices such as Ethernet (registered trademark) transmit large data in a plurality of packets, but the number of packets to be transmitted increases due to the large capacity of the transmission target data. ing. As described above, in order to perform large-capacity data communication from a plurality of personal computers, it is necessary to improve communication efficiency.
特開2003−85129号公報には、データ受信の終了を容易に検知してデータ転送することが可能なデータ通信コントローラが開示されている。そのデータ通信コントローラは、受信データを一時保持する受信FIFO(First−In First−Out)メモリと、該受信FIFOメモリに保持されたデータがすべて転送されると該受信FIFOメモリから出力されるデータエンプティ信号により、受信終了信号を生成する受信終了信号生成手段とを備えたことを特徴としている。 Japanese Patent Laying-Open No. 2003-85129 discloses a data communication controller that can easily detect the end of data reception and transfer data. The data communication controller includes a receive FIFO (First-In First-Out) memory that temporarily holds received data, and a data empty that is output from the receive FIFO memory when all the data held in the receive FIFO memory is transferred. A reception end signal generating means for generating a reception end signal by a signal is provided.
特開2001−147875号公報には、ネットワークを通じてパケット単位で伝送される通信データを受信した旨を示す割り込み信号の発生回数を低減させて、処理装置への負荷を軽減したデータ通信システムが開示されている。そのデータ通信システムは、ネットワークを通じて通信データの受信及び送信を行うMAC(Media Access Control)と、一時的に通信データを保持するパケットバッファと、通信データを格納する主メモリ部、送受信手段MACから転送された通信データを主メモリ部に格納する制御を司るDMA(Direct Memory Access)コントローラと、主メモリ部とのメモリインターフェイス部と、データ通信システムの制御を司るCPU(Central Processing Unit)とを備えている。そのネットワークを通じて受信された通信データは、MACのパケットバッファに一旦格納される。このとき、その通信データは、連続して受信された通信データと、その後に受信された通信データの2つのブロックに分かれて受信される。その通信データは、次いで、メモリインターフェイス部5を介して、MAC31から主メモリ部3に転送される。それぞれの通信データの先頭部分には、その通信データに関する情報等を示すディスクリプタが付加されている。そのディスクリプタ内には、後続する通信データが転送可能状態となったかどうかを示すステータスフラグが設けられている。その後続する通信データは、そのステータスフラグが転送可能を示していれば、割り込み信号が発生されずに、引き続き、主メモリ部へ転送される。このため、そのデータ通信システムは、連続して受信した複数パケットの通信データを一体的な1つの通信データとして扱うことができ、1回の割り込み信号によりデータ転送を制御することができる。
Japanese Patent Application Laid-Open No. 2001-147875 discloses a data communication system that reduces the number of occurrences of an interrupt signal indicating that communication data transmitted in units of packets through a network has been received, thereby reducing the load on the processing device. ing. The data communication system includes a MAC (Media Access Control) that receives and transmits communication data through a network, a packet buffer that temporarily holds communication data, a main memory unit that stores communication data, and a transfer from a transmission / reception unit MAC A DMA (Direct Memory Access) controller that controls the storage of the received communication data in the main memory unit, a memory interface unit with the main memory unit, and a CPU (Central Processing Unit) that controls the data communication system Yes. Communication data received through the network is temporarily stored in a MAC packet buffer. At this time, the communication data is received by being divided into two blocks of communication data continuously received and communication data received thereafter. The communication data is then transferred from the MAC 31 to the main memory unit 3 via the
特開2001−147875号公報の技術では、CPUは、送信元と送信先が一対一のときに、1回の割り込みで連続パケット処理をおこなうことができる。しかし、複数台のパーソナルコンピュータと1台のプリンタの場合のように、複数の送信元からのデータを受信する場合に、MACは、複数の送信元のデータが混在したデータを受信しなければならなくなり、複数の送信元のデータが混在する場合に、後続するデータが存在しないと判断されることとなり、1パケット毎に割り込みを出すことになる。すなわち、特開2001−147875号公報の技術では、送信元と送信先が多対一の場合に、複数の送信元のデータが混在するため連続パケット処理できず割り込み回数が増えてしまいCPUの処理負担が増えるという問題がある。 In the technique disclosed in Japanese Patent Laid-Open No. 2001-147875, the CPU can perform continuous packet processing with one interrupt when the transmission source and the transmission destination are one-to-one. However, when receiving data from a plurality of transmission sources, as in the case of a plurality of personal computers and one printer, the MAC must receive data in which data from a plurality of transmission sources are mixed. When a plurality of transmission source data are mixed, it is determined that there is no subsequent data, and an interrupt is issued for each packet. That is, in the technique of Japanese Patent Laid-Open No. 2001-147875, when the transmission source and the transmission destination are many-to-one, the data of a plurality of transmission sources are mixed, so that continuous packet processing cannot be performed and the number of interrupts increases, and the CPU processing There is a problem that the burden increases.
特開2001−147875号公報の技術では、さらに、CPUが主メモリ部の受信データを読み込むことで、主メモリ部の受信データ格納場所は、新しい受信データを格納可能になる。(以下、再利用と記載される。)受信データ格納場所を再利用するためには、CPUがMACとDMAコントローラとを一度停止させ、CPUがDMAコントローラへ設定する受信データの格納アドレスを再設定し、DMAコントローラとMACを再初期化する必要がある。このため、CPUの負担が増加していた。それは、DMAコントローラがディスクリプタを構築して受信データを格納していくシステムであるため、格納開始信号を出すMACは、CPUの受信データ読み込み終了を知る手段がなく、いつ受信データ格納場所を再利用できるようになるのか知ることができない。そのため、CPUは、MACとDMAコントローラとの動作を止めないと受信データ格納場所の再利用ができない。 In the technique disclosed in Japanese Patent Laid-Open No. 2001-147875, the CPU reads the received data in the main memory unit, so that the received data storage location in the main memory unit can store new received data. (Hereinafter referred to as reuse.) In order to reuse the received data storage location, the CPU temporarily stops the MAC and DMA controller, and the CPU resets the received data storage address set in the DMA controller. Then, it is necessary to reinitialize the DMA controller and MAC. For this reason, the burden on the CPU has increased. Since it is a system in which the DMA controller constructs descriptors and stores received data, the MAC that issues the storage start signal has no means of knowing the end of reading the received data by the CPU, and when the received data storage location is reused I can't know if I can do it. Therefore, the CPU cannot reuse the received data storage location unless the operation of the MAC and the DMA controller is stopped.
CPUがMACを止める場合の例を、1台のプリンタと複数のパーソナルコンピュータとを接続する場合を例にとり説明する。このとき、パーソナルコンピュータが印刷するデータをプリンタに送信し、プリンタは、パーソナルコンピュータからの送信データを受信することになる。プリンタからは、データ送信要求をださないため、データを送るタイミングを制御できるのは、データ送信側のパーソナルコンピュータとなり、MACが動作しているときには、パーソナルコンピュータからのデータを受信してしまう。このため、MACは、パケットバッファに受信データを格納する。データ格納場所の準備ができないとき、DMAコントローラは、パケットバッファの受信データを主メモリ部に転送しないため、MACがデータを受信し続けるとパケットバッファに受信データを格納しきれなくなりオーバーフローエラーの状態となる。以上のようにオーバーフローエラーを発生させないためにもプリンタ側が受信できないときには、MACを停止し、パーソナルコンピュータからの送信データを受信しないように制御しなければならない。 An example in which the CPU stops the MAC will be described by taking an example in which one printer and a plurality of personal computers are connected. At this time, the data to be printed by the personal computer is transmitted to the printer, and the printer receives the transmission data from the personal computer. Since the printer does not issue a data transmission request, the data transmission timing can be controlled by the personal computer on the data transmission side. When the MAC is operating, data is received from the personal computer. For this reason, the MAC stores received data in the packet buffer. When the data storage location cannot be prepared, the DMA controller does not transfer the received data in the packet buffer to the main memory unit. Therefore, if the MAC continues to receive data, the received data cannot be stored in the packet buffer, and an overflow error occurs. Become. As described above, when the printer cannot receive data in order to prevent an overflow error from occurring, the MAC must be stopped and control must be performed so that transmission data from the personal computer is not received.
本発明の課題は、通信時のCPUの負担を軽減する通信制御装置および通信制御方法を提供することにある。 The subject of this invention is providing the communication control apparatus and the communication control method which reduce the burden of CPU at the time of communication.
以下に、発明を実施するための形態・実施例で使用される符号を括弧付きで用いて、課題を解決するための手段を記載する。この符号は、特許請求の範囲の記載と発明を実施するための形態・実施例の記載との対応を明らかにするために付加されたものであり、特許請求の範囲に記載されている発明の技術的範囲の解釈に用いてはならない。 In the following, means for solving the problems will be described using the reference numerals used in the modes and examples for carrying out the invention in parentheses. This symbol is added to clarify the correspondence between the description of the claims and the description of the modes and embodiments for carrying out the invention. Do not use to interpret the technical scope.
本発明による通信制御装置は、主メモリ部(3)と通信制御部(10)とCPU(2)とを備えている。主メモリ部(3)は、複数受信データ領域(20〜24)を備え、複数受信データ領域(20〜24)を複数ディスクリプタ(13〜18)に対応付けるディスクリプタチェイン(12)を記録する。通信制御部(10)は、ネットワークを介して受信された書き込み受信データがパケットバッファ(7)に蓄積されたときに、ディスクリプタチェイン(12)を参照して、複数ディスクリプタ(13〜18)のうちの書き込み受信データ領域に対応するディスクリプタが記録可能を示しているときにその書き込み受信データ領域にその書き込み受信データを記録し、そのディスクリプタが記録不可能を示しているときに割り込み信号を出力する。CPU(2)は、その割り込み信号が出力されたときに、複数受信データ領域(20〜24)のうちの読み出し受信データ領域から受信データを読み出し、複数ディスクリプタ(13〜18)のうちのその読み出し受信データ領域に対応するディスクリプタが記録可能を示しているように、そのディスクリプタチェインを更新する。 The communication control apparatus according to the present invention includes a main memory unit (3), a communication control unit (10), and a CPU (2). The main memory unit (3) includes a plurality of reception data areas (20 to 24), and records a descriptor chain (12) that associates the plurality of reception data areas (20 to 24) with a plurality of descriptors (13 to 18). The communication control unit (10) refers to the descriptor chain (12) when the received write data received via the network is accumulated in the packet buffer (7), and includes the plurality of descriptors (13 to 18). When the descriptor corresponding to the write reception data area indicates that recording is possible, the write reception data is recorded in the write reception data area, and when the descriptor indicates that recording is impossible, an interrupt signal is output. When the interrupt signal is output, the CPU (2) reads the received data from the read received data area of the plurality of received data areas (20 to 24), and reads the read of the plurality of descriptors (13 to 18). The descriptor chain is updated so that the descriptor corresponding to the received data area indicates that recording is possible.
本発明による通信制御方法は、
ネットワークを介して受信された書き込み受信データがパケットバッファ(7)に蓄積されたときに、主メモリ部(3)が備えている複数受信データ領域(20〜24)を複数ディスクリプタ(13〜18)に対応付けるディスクリプタチェイン(12)を参照して、複数受信データ領域(20〜24)のうちの書き込み受信データ領域に対応するディスクリプタが記録可能を示しているときにその書き込み受信データ領域にその書き込み受信データを記録し、その書き込み受信データ領域に対応するディスクリプタが記録不可能を示しているときに割り込み信号を出力するステップと、
その割り込み信号が出力されたときに、複数受信データ領域(20〜24)のうちの読み出し受信データ領域からCPU(2)に受信データを読み出し、その読み出し受信データ領域に対応するディスクリプタが記録可能を示しているように、そのディスクリプタチェインを更新するステップとを備えている。
The communication control method according to the present invention includes:
When the write reception data received via the network is accumulated in the packet buffer (7), the plurality of reception data areas (20 to 24) included in the main memory unit (3) are set to a plurality of descriptors (13 to 18). Referring to the descriptor chain (12) associated with the write reception data area when the descriptor corresponding to the write reception data area of the plurality of reception data areas (20 to 24) indicates that recording is possible. A step of recording data and outputting an interrupt signal when a descriptor corresponding to the write reception data area indicates that recording is impossible;
When the interrupt signal is output, the received data is read from the read received data area of the plurality of received data areas (20 to 24) to the CPU (2), and the descriptor corresponding to the read received data area can be recorded. As shown, it comprises the step of updating the descriptor chain.
本発明による通信制御装置および通信制御方法は、主メモリ部のうちの書き込み可能である受信データ領域の情報量が1パケットの情報量より大きいときに、割り込み信号が1パケットごとにCPUに出力されないで、通信時のCPUの負担を軽減することができる。 In the communication control apparatus and the communication control method according to the present invention, when the information amount of the writable received data area in the main memory unit is larger than the information amount of one packet, the interrupt signal is not output to the CPU for each packet. Thus, the burden on the CPU during communication can be reduced.
図面を参照して、本発明による通信制御装置の実施の形態を記載する。その通信制御装置は、図1と図2に示されているように、通信制御部10とCPU2と主メモリ部3とメモリインターフェイス部5とを備えている。メモリインターフェイス部5は、内部バス6を介して、通信制御部10に双方向に情報伝達可能に接続され、CPU2に双方向に情報伝達可能に接続されている。CPU2は、割り込み信号線11を介して、通信制御部10に情報伝達可能に接続されている。
An embodiment of a communication control device according to the present invention will be described with reference to the drawings. As shown in FIGS. 1 and 2, the communication control apparatus includes a
主メモリ部3は、メモリインターフェイス部5により書き込み、読み出し可能なデータを記録する。メモリインターフェイス部5は、通信制御部10に制御されて、通信制御部10から出力されるデータを主メモリ部3に記録する。メモリインターフェイス部5は、さらに、CPU2に制御されて、主メモリ部3に記録されているデータを読み出し、そのデータをCPU2に出力する。通信制御部10は、ネットワークに接続され、そのネットワークを介して他の通信機器から受信データを受信し、または、そのネットワークを介して他の通信機器に通信データを送信する。CPU2は、割り込み信号線11を介して通信制御部10から割り込み信号を受信したときに、メモリインターフェイス部5を介して、主メモリ部3に記録されている受信データを読み出し、その受信データをデータ処理する。
The main memory unit 3 records data that can be written and read by the
通信制御部10は、MAC1とDMAコントローラ4とFIFO制御9とを備えている。FIFO制御9は、パケットバッファ7とバッファ制御8とを備えている。バッファ制御8は、再開フラグ34を記録している。再開フラグ34は、通信制御部10が一時停止状態から再開するときに割り込みを出すか出さないかの判定に使用される。MAC1は、ネットワークに接続され、パケットバッファ7とバッファ制御8に接続されている。MAC1は、そのネットワークを介して他の通信機器から通信データを受信し、その通信データをパケットバッファ7に記録する。MAC1は、そのネットワークを介して他の通信機器に通信データを送信する。DMAコントローラ4は、パケットバッファ7とバッファ制御8に接続され、データの入出力を制御する。DMAコントローラ4は、さらに、内部バス6に接続され、メモリインターフェイス部5とデータの授受を行う。
The
図3は、主メモリ部3を示している。主メモリ部3は、ディスクリプタチェイン領域12とMAC受信データ領域19とを備えている。ディスクリプタチェイン領域12には、ディスクリプタチェインが記録される。そのディスクリプタチェインは、複数のディスクリプタ13〜18から形成されている。MAC受信データ領域19は、複数の受信データ領域20〜24を備えている。複数の受信データ領域20〜24には、通信制御部10により他の通信機器から受信された受信データが記録される。
FIG. 3 shows the main memory unit 3. The main memory unit 3 includes a
図4は、複数のディスクリプタ13〜18のうちの1つのディスクリプタ13を示している。ディスクリプタ13は、Tビット25とUビット26とポインタ27とを有している。ポインタ27は、受信データポインタまたはリンクポインタのうちのいずれかに使われる。その受信データポインタは、複数の受信データ領域20〜24のうちのいずれかの領域のアドレスを示している。そのリンクポインタは、ディスクリプタチェイン領域12のうちのディスクリプタ13が記録されている領域のアドレスを示している。Tビット25は、0または1のいずれかを示している。Tビット25は、0を示すときにポインタ27が受信データポインタを示すことを示し、1を示すときにポインタ27がリンクポインタを示すことを示している。Uビット26は、0または1のいずれかを示している。Uビット26は、0を示すときに、ポインタ27が示す領域に受信データが記録されていないことを示し、CPU2がその受信データを読み込みすることができないことを示している。Uビット26は、1を示すときに、ポインタ27が示す領域に受信データが記録されていることを示し、CPU2がその受信データを読み込みすることができることを示している。
FIG. 4 shows one
複数のディスクリプタ13〜18のうちのディスクリプタ13と異なる他のディスクリプタ14〜18は、それぞれ、ディスクリプタ13と同様にして、Tビット25とUビット26とポインタ27とを有している。
図5は、CPU2の動作を示している。CPU2は、本発明による通信制御装置が起動されると、まず、主メモリ部3にMAC受信データ領域19を確保し、メモリインターフェイス部5を介して主メモリ部3のディスクリプタチェイン領域12にディスクリプタチェインを用意する(ステップS101)。CPU2は、次に、通信制御部10のDMAコントローラ4とMAC1とを初期化して通信制御部10を起動する(ステップS102)。CPU2は、通信制御部10を監視し、通信制御部10が主メモリ部3に受信データを格納し終わるまで、すなわち、割り込み信号線11を介して、通信制御部10から割り込み信号が出力されるまで待機する(ステップS103)。
FIG. 5 shows the operation of the
CPU2は、通信制御部10から割り込み信号が出力されたときに(ステップS103、YES)、ディスクリプタ13を読み込み、ディスクリプタ13のUビット26が1であるかどうかを判別し、すなわち、CPU2が受信データを読み込むことができるかどうかを確認する(ステップS104)。CPU2は、Uビット26が1であるときに、主メモリ部3のうちのディスクリプタ13のポインタ27が示す領域に格納された受信データを読み込む(ステップS105)。CPU2は、同様にして、ディスクリプタ14とディスクリプタ15とディスクリプタ16とディスクリプタ17により示される受信データの読み込みを行う。CPU2は、受信データ領域20と受信データ領域21と受信データ領域22と受信データ領域23と受信データ領域24に記録された受信データを読み込み終わると、ディスクリプタ13とディスクリプタ14とディスクリプタ15とディスクリプタ16とディスクリプタ17とディスクリプタ18のUビット26を0にクリアする(ステップS106)。
When the interrupt signal is output from the communication control unit 10 (step S103, YES), the
CPU2は、ステップS106を実行した後に、再度、通信制御部10を監視し、割り込み信号線11を介して、通信制御部10から割り込み信号が出力されるまで待機する(ステップS103)。CPU2は、通信制御部10から割り込み信号が出力されるたびに(ステップS103、YES)、ステップS104〜ステップS106の動作を繰り返して実行する。
After executing step S106, the
図7は、通信制御部10の動作を示している。通信制御部10は、CPU2によりステップS102が実行されることにより、起動される。通信制御部10が起動すると、DMAコントローラ4は、まず、メモリインターフェイス部5を介して主メモリ部3からディスクリプタ13を読み出す(ステップS201)。
FIG. 7 shows the operation of the
DMAコントローラ4は、その読み込まれたディスクリプタのTビット25が0を示し(ステップS202、NO)、かつ、その読み込まれたディスクリプタのUビット26が0を示しているときに(ステップS203、NO)、再開フラグ34を0でクリアする(ステップS204)。再開フラグ34をクリアした後に、MAC1は、受信データがパケットバッファ7に蓄積されるまで待機する(ステップS205)。
When the
バッファ制御8は、受信データがパケットバッファ7に蓄積されると(ステップS205、YES)、DMAコントローラ4に受信データを読み込むように指示する。DMAコントローラ4は、その指示に応答して、その読み込まれたディスクリプタのポインタ27が示すMAC受信データ領域19の受信データ領域20にパケットバッファ7の受信データを格納する(ステップS206)。バッファ制御8は、DMAコントローラ4が1パケット分の受信データを主メモリ部3にまだ格納していないときに(ステップS207、NO)、再度、DMAコントローラ4に受信データを読み込むように指示する(ステップS205)。DMAコントローラ4は、1パケット分の受信データの格納を終了すると(ステップS207、YES)、その読み込まれたディスクリプタのUビット26に1を書き込む(ステップS208)。
When the received data is accumulated in the packet buffer 7 (YES in step S205), the
DMAコントローラ4は、ステップS201で読み込まれたディスクリプタのTビット25が1であるときに(ステップS202、YES)、その読み込まれたディスクリプタのUビット26に1を書き込む(ステップS208)。
When the
DMAコントローラ4は、ステップS201で読み込まれたディスクリプタのTビット25が0であり(ステップS202、NO)、かつ、その読み込まれたディスクリプタのUビット26が1を示しているときに(ステップS203、YES)、再開フラグ34が1かどうかを確認する(ステップS209)。
When the
DMAコントローラ4は、再開フラグ34が0であるときに(ステップS209、NO)、割り込み信号線11を介して割り込み信号をCPU2へ出力する(ステップS210)。DMAコントローラ4は、割り込み信号をCPU2へ出力した後に、再開フラグ34を1に設定する(ステップS211)。DMAコントローラ4は、再開フラグ34が1であるときに(ステップS209、YES)、または、再開フラグ34に1が設定された後に、受信データがパケットバッファ7に蓄積されるまで待機する(ステップS212)。
When the
バッファ制御8は、ステップS208が実行された後に、または、再開フラグ34に1が設定された後に受信データがパケットバッファ7に蓄積されたときに(ステップS212、YES)、受信データを転送するようにDMAコントローラ4に指示する。DMAコントローラ4は、その指示に応答して、ステップS201で前回に読み込まれたディスクリプタの次のディスクリプタを読み込む(ステップS201)。そのディスクリプタは、その前回に読み込まれたディスクリプタのTビット25が1であるときに、その前回に読み込まれたディスクリプタのポインタ27が示すリンクポインタが示すディスクリプタである。
The
図6は、図5のステップS101を示し、すなわち、主メモリ部3のディスクリプタチェイン領域12にディスクリプタチェインを用意する動作を示している。DMAコントローラ4は、まず、ディスクリプタ13のUビット26を0に設定し、ディスクリプタ13のTビット25を0に設定し、ディスクリプタ13のポインタ27にMAC受信データ領域19の受信データ領域20の格納アドレスを示す受信データポインタを設定する(ステップS301)。DMAコントローラ4は、ディスクリプタ14のUビット26を0に設定し、ディスクリプタ14のTビット25を0に設定し、ディスクリプタ14のポインタ27にMAC受信データ領域19の受信データ領域21の格納アドレスを示す受信データポインタを設定する(ステップS302)。DMAコントローラ4は、ディスクリプタ15のUビット26を0に設定し、ディスクリプタ15のTビット25を0に設定し、ディスクリプタ15のポインタ27にMAC受信データ領域19の受信データ領域22の格納アドレスを示す受信データポインタを設定する(ステップS303)。DMAコントローラ4は、ディスクリプタ16のUビット26を0に設定し、ディスクリプタ16のTビット25を0に設定し、ディスクリプタ16のポインタ27にMAC受信データ領域19の受信データ領域23の格納アドレスを示す受信データポインタを設定する(ステップS304)。DMAコントローラ4は、ディスクリプタ17のUビット26を0に設定し、ディスクリプタ17のTビット25を0に設定し、ディスクリプタ17のポインタ27にMAC受信データ領域19の受信データ領域24の格納アドレスを示す受信データポインタを設定する(ステップS305)。DMAコントローラ4は、ディスクリプタ18のUビット26を0に設定し、ディスクリプタ18のTビット25を1に設定し、ディスクリプタ18のポインタ27に次のディスクリプタ13のアドレスを示すリンクポインタを設定する(ステップS306)。
FIG. 6 shows step S101 of FIG. 5, that is, an operation of preparing a descriptor chain in the
このような動作によれば、ディスクリプタ18がディスクリプタ13の配置アドレスになっているので、ディスクリプタチェインは、複数のディスクリプタ13〜18がリング状に構成される。
According to such an operation, since the
このような動作によれば、本発明による通信制御装置は、複数のパーソナルコンピュータから送信データを受信した場合でも、所定の情報量の受信データが蓄積された後に、通信制御部10からCPU2へ割り込み信号が1回出力される。このため、CPU2は、1パケットごとでないタイミングで受信データを読み出すことができ、CPU2の負担が軽減される。また、通信制御部10は、受信データを受信して一時停止状態を解除すると、ディスクリプタを再リードしてディスクリプタのUビットの状態でCPU2が受信データの読み込みを完了したかを確認することができるので、CPU2は、DMAコントローラ4とMAC1を再初期化する必要がなくなり、CPU2の負担がさらに軽減される。
According to such an operation, the communication control device according to the present invention interrupts the
本発明による通信制御装置は、ディスクリプタ13〜18のUビット26の有無を通信制御部10が検出し、そのUビット26を検出するとCPU2へ割り込み信号を出力し、メモリインターフェイス部5を介して受信データを主メモリ部3に格納する処理を一時停止状態に遷移させる。本発明による通信制御装置は、受信データを受信するとその一時停止状態を解除し、そのディスクリプタを再リードして、そのディスクリプタのUビットが設定されていたら再度その一時停止状態にし、CPUがそのディスクリプタのUビットをクリアすることでその一時停止状態を解除し、再度その一時停止状態に入るときに割り込みを出力する。すなわち、通信制御部10は、ディスクリプタを読み込んだときにUビットの状態でCPUへ割り込みを出力できる。このため、CPUは、1度の割り込みで受信データの読み込みが一括でできるので、本発明による通信制御装置は、CPUの負担を低減することができる。
In the communication control apparatus according to the present invention, the
本発明による通信制御装置は、さらに、ディスクリプタを読み込んだときのUビットの状態で受信動作を再開することができる。すなわち、本発明による通信制御装置は、受信データ格納場所を再利用するためにCPUがMACとDMAコントローラを操作する必要はなく、ディスクリプタの設定だけで済む。このため、本発明による通信制御装置は、CPUの負担を低減することができる。 The communication control device according to the present invention can further resume the reception operation in the state of the U bit when the descriptor is read. That is, the communication control apparatus according to the present invention does not require the CPU to operate the MAC and DMA controller in order to reuse the received data storage location, and only sets the descriptor. For this reason, the communication control apparatus according to the present invention can reduce the burden on the CPU.
ディスクリプタには、TビットとUビットと受信データポインタまたはリンクポインタを有し、リンクポインタに一番目のディスクリプタの配置アドレスを指定することでディスクリプタチェインをリング状態にできる。このため、本発明による通信制御装置は、さらに、受信データ格納領域を再利用可能にでき、大容量RAMが不要となる。 The descriptor has a T bit, a U bit, and a received data pointer or a link pointer, and the descriptor chain can be set in a ring state by designating the arrangement address of the first descriptor in the link pointer. For this reason, the communication control apparatus according to the present invention can further re-use the received data storage area, eliminating the need for a large-capacity RAM.
図8は、ステップS101またはステップS106と異なる他の動作により設定されたCPU生成ディスクリプタを示している。そのCPU生成ディスクリプタチェイン28は、既述の実施の形態におけるディスクリプタチェイン12と比較して、ディスクリプタ17が他のディスクリプタ29に置換されている。ディスクリプタ29は、Tビット25が0に設定され、Uビット26が1に設定されている。このとき、通信制御部10は、ディスクリプタ29を読み込み、Uビット26が1になっていることを確認して割り込みを出力し、再開フラグを設定して一時停止状態になり、受信データを待つ。
FIG. 8 shows a CPU-generated descriptor set by another operation different from step S101 or step S106. In the CPU-generated
すなわち、CPU2は、既述の実施の形態におけるディスクリプタチェイン12の設定と異なる他の設定をすることができ、たとえば、所望の頻度に基づいてその設定を設計することができる。このとき、本発明による通信制御装置は、受信データを一括して読み込みたいディスクリプタのUビットを設定することで、CPU2が受信データの読み込み処理をしたいタイミングで1回の割り込みを出力することができる。
That is, the
1 :MAC
2 :CPU
3 :主メモリ部
4 :DMAコントローラ
5 :メモリインターフェイス部
6 :内部バス
7 :パケットバッファ
8 :バッファ制御
9 :FIFO制御
10:通信制御部
11:割り込み信号線
12:ディスクリプタチェイン領域
13〜18:ディスクリプタ
19:MAC受信データ領域
20〜24:受信データ領域
25:Tビット
26:Uビット
27:ポインタ
34:再開フラグ
1: MAC
2: CPU
3: Main memory unit 4: DMA controller 5: Memory interface unit 6: Internal bus 7: Packet buffer 8: Buffer control 9: FIFO control 10: Communication control unit 11: Interrupt signal line 12: Descriptor chain area 13-18: Descriptor 19: MAC reception data area 20-24: Reception data area 25: T bit 26: U bit 27: Pointer 34: Resume flag
Claims (10)
ネットワークを介して受信された書き込み受信データがパケットバッファに蓄積されたときに、前記ディスクリプタチェインを参照して、前記複数ディスクリプタのうちの書き込み受信データ領域に対応するディスクリプタが記録可能を示すときに前記書き込み受信データ領域に前記書き込み受信データを記録し、前記ディスクリプタが記録不可能を示すときに割り込み信号を出力する通信制御部と、
前記割り込み信号が出力されたときに、前記複数受信データ領域のうちの読み出し受信データ領域から受信データを読み出し、前記複数ディスクリプタのうちの前記読み出し受信データ領域に対応するディスクリプタが記録可能を示すように、前記ディスクリプタチェインを更新するCPU
とを具備する通信制御装置。 A main memory unit that includes a plurality of reception data areas, and that records a descriptor chain that associates the plurality of reception data areas with a plurality of descriptors;
When write reception data received via the network is accumulated in a packet buffer, referring to the descriptor chain, when the descriptor corresponding to the write reception data area of the plurality of descriptors indicates recordable A communication control unit that records the write reception data in a write reception data area and outputs an interrupt signal when the descriptor indicates that recording is impossible;
When the interrupt signal is output, the received data is read from the read received data area of the plurality of received data areas, and the descriptor corresponding to the read received data area of the plurality of descriptors is recordable. , CPU for updating the descriptor chain
A communication control device comprising:
前記通信制御部は、前記書き込み受信データ領域に前記書き込み受信データが記録されたときに、前記複数ディスクリプタのうちの前記書き込み受信データ領域に対応するディスクリプタが記録不可能を示すように、前記ディスクリプタチェインを更新する
通信制御装置。 In claim 1,
The communication control unit is configured so that, when the write reception data is recorded in the write reception data area, the descriptor chain corresponding to the write reception data area of the plurality of descriptors indicates that recording cannot be performed. Update communication control device.
前記通信制御部は、前記ディスクリプタが記録不可能を示すときに再開フラグをクリアし、前記割り込み信号が出力されたときに前記再開フラグを設定し、
前記割り込み信号は、前記再開フラグがクリアされているときに、出力される
通信制御装置。 In claim 2,
The communication control unit clears a restart flag when the descriptor indicates that recording is impossible, sets the restart flag when the interrupt signal is output,
The interrupt signal is output when the restart flag is cleared.
前記複数ディスクリプタは、それぞれ、再利用可能または再利用不可能のいずれかに対応し、
前記複数ディスクリプタのうちの再利用不可能に対応する再利用不可能ディスクリプタは、前記複数ディスクリプタのうちの前記再利用不可能ディスクリプタと異なる他のディスクリプタを示し、
前記通信制御部は、前記書き込み受信データ領域に前記書き込み受信データが記録された後に、前記ネットワークを介して受信された他の書き込み受信データが前記パケットバッファに蓄積された場合で、前記複数受信データ領域のうちの書き込み受信データ領域の次の受信データ領域に対応する次のディスクリプタが再利用可能を示すときに、前記次の受信データ領域に前記他の書き込み受信データを記録し、前記次のディスクリプタが再利用不可能を示すときに、前記次のディスクリプタが示すディスクリプタに対応する受信データ領域に前記他の書き込み受信データを記録する
通信制御装置。 In any one of Claims 1-3,
Each of the plurality of descriptors corresponds to either reusable or non-reusable,
The non-reusable descriptor corresponding to the non-reusable of the plurality of descriptors indicates another descriptor different from the non-reusable descriptor of the plurality of descriptors,
The communication control unit, when the write reception data is recorded in the write reception data area, and another write reception data received via the network is accumulated in the packet buffer. When the next descriptor corresponding to the next received data area of the write received data area in the area indicates reusability, the other received received data is recorded in the next received data area, and the next descriptor is recorded. A communication control device that records the other received write data in a receive data area corresponding to a descriptor indicated by the next descriptor when indicates that reuse is not possible.
前記CPUは、受信データを読み出す頻度に基づいて前記複数ディスクリプタから選択された1つのディスクリプタが記録不可能を示すように、前記ディスクリプタチェインを更新する
通信制御装置。 In claim 4,
The CPU updates the descriptor chain so that one descriptor selected from the plurality of descriptors indicates that recording is impossible based on the frequency of reading received data.
前記割り込み信号が出力されたときに、前記複数受信データ領域のうちの読み出し受信データ領域からCPUに受信データを読み出し、前記読み出し受信データ領域に対応するディスクリプタが記録可能を示すように、前記ディスクリプタチェインを更新するステップ
とを具備する通信制御方法。 When the write reception data received via the network is accumulated in the packet buffer, the write of the plurality of reception data areas is referred to by referring to the descriptor chain that associates the plurality of reception data areas of the main memory unit with the plurality of descriptors. The write reception data is recorded in the write reception data area when the descriptor corresponding to the reception data area indicates recordable, and an interrupt signal is output when the descriptor corresponding to the write reception data area indicates unrecordable. Steps,
When the interrupt signal is output, the descriptor chain is configured to read the received data from the read received data area of the plurality of received data areas to the CPU and indicate that the descriptor corresponding to the read received data area can be recorded. A communication control method comprising the steps of:
前記書き込み受信データ領域に前記書き込み受信データが記録されたときに、複数ディスクリプタのうちの前記書き込み受信データ領域に対応するディスクリプタが記録不可能を示すように、前記ディスクリプタチェインを更新するステップ
をさらに具備する通信制御方法。 In claim 6,
Updating the descriptor chain such that when the write reception data is recorded in the write reception data area, the descriptor corresponding to the write reception data area of the plurality of descriptors indicates that recording is not possible. Communication control method.
前記ディスクリプタが記録不可能を示すときに、再開フラグをクリアするステップと、
前記割り込み信号が出力されたときに、前記再開フラグを設定するステップとを更に具備し、
前記割り込み信号は、前記再開フラグがクリアされているときに、出力される
通信制御方法。 In claim 7,
Clearing a resume flag when the descriptor indicates unrecordable;
Further comprising setting the restart flag when the interrupt signal is output;
The communication control method, wherein the interrupt signal is output when the restart flag is cleared.
前記複数ディスクリプタは、それぞれ、再利用可能または再利用不可能のいずれかに対応し、
前記複数ディスクリプタのうちの再利用不可能に対応する再利用不可能ディスクリプタは、前記複数ディスクリプタのうちの前記再利用不可能ディスクリプタと異なる他のディスクリプタを示し、
さらに、
前記書き込み受信データ領域に前記書き込み受信データが記録された後に、前記ネットワークを介して受信された他の書き込み受信データが前記パケットバッファに蓄積された場合で、前記複数受信データ領域のうちの書き込み受信データ領域の次の受信データ領域に対応する次のディスクリプタが再利用可能を示すときに、前記次の受信データ領域に前記他の書き込み受信データを記録し、前記次のディスクリプタが再利用不可能を示すときに、前記次のディスクリプタが示すディスクリプタに対応する受信データ領域に前記他の書き込み受信データを記録するステップ
を具備する通信制御方法。 In any one of Claims 6-8,
Each of the plurality of descriptors corresponds to either reusable or non-reusable,
The non-reusable descriptor corresponding to the non-reusable of the plurality of descriptors indicates another descriptor different from the non-reusable descriptor of the plurality of descriptors,
further,
After the write reception data is recorded in the write reception data area, when other write reception data received via the network is accumulated in the packet buffer, the write reception of the plurality of reception data areas When the next descriptor corresponding to the next received data area of the data area indicates that the next descriptor can be reused, the other received received data is recorded in the next received data area, and the next descriptor cannot be reused. A communication control method comprising: recording the other received write data in a received data area corresponding to the descriptor indicated by the next descriptor.
受信データを読み出す頻度に基づいて前記複数ディスクリプタから選択された1つのディスクリプタが記録不可能を示すように、前記ディスクリプタチェインを更新するステップ
をさらに具備する通信制御方法。 In claim 9,
A communication control method, further comprising: updating the descriptor chain so that one descriptor selected from the plurality of descriptors indicates that recording is not possible based on a frequency of reading received data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010057854A JP2011193242A (en) | 2010-03-15 | 2010-03-15 | Communication controller and communication control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010057854A JP2011193242A (en) | 2010-03-15 | 2010-03-15 | Communication controller and communication control method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011193242A true JP2011193242A (en) | 2011-09-29 |
Family
ID=44797714
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010057854A Withdrawn JP2011193242A (en) | 2010-03-15 | 2010-03-15 | Communication controller and communication control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011193242A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015207288A (en) * | 2014-04-17 | 2015-11-19 | ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング | Interface unit |
-
2010
- 2010-03-15 JP JP2010057854A patent/JP2011193242A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015207288A (en) * | 2014-04-17 | 2015-11-19 | ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング | Interface unit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0674276B1 (en) | A computer system | |
JP2014010759A (en) | Bridge device, method therefor, storage apparatus and program | |
US20060242340A1 (en) | Image sensing device | |
JP5209535B2 (en) | USB host controller and control method of USB host controller | |
JP2011193242A (en) | Communication controller and communication control method | |
KR100348545B1 (en) | Communication dma device | |
JP2012156645A (en) | Information processor, communication apparatus, and control method therefor | |
JP2018106222A (en) | Information processing apparatus and communication control method | |
JP2008146541A (en) | DMA transfer system, DMA controller, and DMA transfer method | |
JP4369486B2 (en) | Data transfer device, semiconductor integrated circuit, and processing status notification method | |
JP2006215891A (en) | Data transfer control device and electronic device | |
JP3838606B2 (en) | Sequence processing device | |
JP2010049314A (en) | Task scheduling device and task scheduling method | |
JP2003063118A (en) | Recorder, interface controller and interface controlling method | |
JP5587530B2 (en) | Engine / processor linkage system and linkage method | |
JP2008109471A (en) | Lan system, transmitter, receiver, lan system control method, program and multiple frames | |
JP6799265B2 (en) | Arithmetic processing unit, information processing unit, control method of arithmetic processing unit | |
JP2002176464A (en) | Network interface device | |
JP3991886B2 (en) | Computer system, computer and program | |
JP2002051100A (en) | Relay device and control method thereof | |
JP6114767B2 (en) | Bridge device and method, storage device, and program | |
JP4371786B2 (en) | USB device controller and printer | |
JP2004147243A (en) | Packet communication system | |
JP5989818B2 (en) | Bridge device and method, storage device, and program | |
CN119861946A (en) | Message receiving and transmitting method and device of single ISSU |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20130604 |