JP2007164511A - Communication apparatus and received data notification method - Google Patents

Communication apparatus and received data notification method Download PDF

Info

Publication number
JP2007164511A
JP2007164511A JP2005360518A JP2005360518A JP2007164511A JP 2007164511 A JP2007164511 A JP 2007164511A JP 2005360518 A JP2005360518 A JP 2005360518A JP 2005360518 A JP2005360518 A JP 2005360518A JP 2007164511 A JP2007164511 A JP 2007164511A
Authority
JP
Japan
Prior art keywords
data
memory
interrupt
received
reception memory
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
JP2005360518A
Other languages
Japanese (ja)
Inventor
Kenji Ikedo
健二 池戸
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.)
Shinko Electric Industries Co Ltd
Original Assignee
Shinko Electric Industries Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shinko Electric Industries Co Ltd filed Critical Shinko Electric Industries Co Ltd
Priority to JP2005360518A priority Critical patent/JP2007164511A/en
Publication of JP2007164511A publication Critical patent/JP2007164511A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a communication apparatus and a received data notification method by which a time needed for an interruption processing in the processing of the received data. <P>SOLUTION: The communication apparatus includes: a detection means for detecting a use capacity of a reception memory; and an interruption manager for comparing a pre-set threshold for the use capacity of the reception memory with the use capacity for the reception memory to notify that the data are received by an interruption signal when the threshold of the use capacity of the reception memory is larger; and a data write means for writing the received data to the reception memory on the basis of the interruption signal. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、データ通信のための方法および装置に関し、具体的には、通信ネットワークを介してデータを受信する通信装置および受信データ通知方法に関する。   The present invention relates to a method and apparatus for data communication, and more particularly to a communication apparatus and a received data notification method for receiving data via a communication network.

通信ネットワークを介して通信を行う通信装置の受信処理において、連続したデータの受信が継続した場合、CPUの処理能力の限界に達し、受信データを処理できなくなる。特に、高性能のCPUが搭載されたPCと処理能力が低いCPUが搭載された組み込み機器などとが通信を行う場合、組み込み機器側で受信データの処理が間に合わなくなる。   In the reception process of the communication device that performs communication via the communication network, if continuous data reception continues, the CPU processing capacity is reached and the received data cannot be processed. In particular, when a PC equipped with a high-performance CPU and an embedded device equipped with a CPU with low processing capability communicate with each other, the processing of received data is not in time on the embedded device side.

このような場合、処理が間に合わなくなったデータは破棄される。その後、組み込み機器は、ネットワークプロトコルにしたがって、再送要求を実行する。   In such a case, data that cannot be processed in time is discarded. Thereafter, the embedded device executes a retransmission request according to the network protocol.

受信処理の負荷を軽減するため、ネットワークデバイスから受信用メモリ領域へDMAを利用してデータを転送する方法がある(例えば、特許文献1参照)。   In order to reduce the load of reception processing, there is a method of transferring data from a network device to a reception memory area using DMA (for example, see Patent Document 1).

このデータを転送する方法は、図1に示すシステム構成を備える。図1における13は、DMA制御部であり、図2に示すような構成である。   This method of transferring data has the system configuration shown in FIG. Reference numeral 13 in FIG. 1 denotes a DMA control unit, which is configured as shown in FIG.

このシステムにおける処理について説明する。   Processing in this system will be described.

受信データがDMA転送されるホストシステム上のホストメモリの受信用メモリ領域を事前に登録し、ネットワークデバイスがデータを受信すると、登録が有効である受信用メモリ領域に対し受信データのDMA転送を開始し、DMA転送が終了すると、ネットワークデバイスがDMA転送の終了をホストシステムへ割り込みを用いて通知し、通知された割り込みをもとに、ホストシステムが、その割り込みに応じた処理を実行する。   Register the reception memory area of the host memory on the host system where the received data is DMA transferred in advance, and when the network device receives the data, start the DMA transfer of the received data to the reception memory area for which registration is valid When the DMA transfer ends, the network device notifies the host system of the end of the DMA transfer using an interrupt, and the host system executes processing corresponding to the interrupt based on the notified interrupt.

このシステムによれば、受信したデータを、DMA転送方式を用いてホストシステム上のメモリへ転送する際の割り込みの発生回数を抑制できる。
特開2005−222281号公報
According to this system, it is possible to suppress the number of occurrences of interrupts when the received data is transferred to the memory on the host system using the DMA transfer method.
JP-A-2005-222281

しかし、上述した背景技術には、以下に示すような問題がある。   However, the background art described above has the following problems.

上述したシステムでは、ホストメモリバッファマネージャが、ホストメモリに空きがありネットワークからの受信データがある場合に、DMA転送を実行する。   In the system described above, the host memory buffer manager executes DMA transfer when the host memory is free and there is data received from the network.

したがって、例えば、ホストシステムにおいて、受信データに対する処理が間に合わない状況になっていても、DMA転送が行われ、DMA転送が終了すると、ネットワークデバイスがDMA転送の完了をホストシステムへ割り込みを用いて通知する。   Thus, for example, even if the host system is not in time for processing received data, when the DMA transfer is performed and the DMA transfer ends, the network device notifies the host system of the completion of the DMA transfer using an interrupt. To do.

ここで、割り込み処理が行われた場合の処理について、図3を参照して説明する。   Here, the processing when the interrupt processing is performed will be described with reference to FIG.

CPUでは、通常の処理が行われている。割り込みが入った場合、CPUは割り込み処理を行い、割り込み処理が終了した後、通常の処理を再開する。   In the CPU, normal processing is performed. When an interrupt occurs, the CPU performs interrupt processing, and resumes normal processing after the interrupt processing is completed.

割り込みが行われた場合、CPUは通常の処理における処理状態の保存を行う(ステップS302)。   When the interruption is performed, the CPU saves the processing state in the normal processing (step S302).

次に、CPUは割り込み処理の実行準備を行う(ステップS304)。   Next, the CPU prepares for execution of interrupt processing (step S304).

次に、CPUは割り込み処理を行う(ステップS306)。   Next, the CPU performs an interrupt process (step S306).

次に、CPUは割り込みの終了処理を行う(ステップS308)。   Next, the CPU performs interrupt termination processing (step S308).

次に、保存された処理状態への復帰を行う(ステップS310)。   Next, the process is restored to the stored processing state (step S310).

DMA転送の完了の割り込みが行われることにより、以上のような処理が行われる。このため、さらに処理を遅らせる原因となる。   The processing as described above is performed by interrupting the completion of the DMA transfer. For this reason, it becomes a cause which delays a process further.

また、DMA転送方式による転送が完了する毎に割り込みが発生するため、受信用メモリに空きがある間は割り込み処理に割かれる時間が増大する問題がある。   Further, since an interrupt is generated every time transfer by the DMA transfer method is completed, there is a problem that the time required for interrupt processing increases while the reception memory is empty.

また、この技術は、DMA転送方式を使用することが前提であるので、DMA転送を行う装置が搭載されていないシステムには適用できない。   Further, since this technique is premised on the use of the DMA transfer method, it cannot be applied to a system that is not equipped with a device that performs DMA transfer.

そこで、本発明は、上述した問題点のうち少なくとも1つを解決するためになされたものであり、その目的は、受信データの処理における割り込み処理にかかる時間を低減することができる通信装置および受信データ通知方法を提供することを目的とする。   Accordingly, the present invention has been made to solve at least one of the above-described problems, and an object of the present invention is to provide a communication device and a reception device that can reduce the time required for interrupt processing in received data processing. The object is to provide a data notification method.

上記課題を解決するため、本発明にかかる通信装置は、受信用メモリの使用容量を検出する検出手段と、予め設定された受信用メモリの使用容量の閾値と前記受信用メモリの使用容量とを比較し、前記受信用メモリの使用容量の閾値の方が大きい場合に、割り込み信号により、データが受信されたことを通知する割り込みマネージャと、前記割り込み信号に基づいて、受信されたデータを前記受信用メモリに書き込むデータ書き込み手段とを備えることを特徴の1つとする。   In order to solve the above-described problem, a communication device according to the present invention includes a detecting unit that detects a used capacity of a receiving memory, a threshold value for the used capacity of the receiving memory, and a used capacity of the receiving memory. In comparison, when the threshold of the used capacity of the reception memory is larger, an interrupt manager for notifying that data has been received by an interrupt signal, and receiving the received data based on the interrupt signal One of the features is that it comprises a data writing means for writing to the main memory.

このように構成することにより、受信用メモリの使用容量の閾値の方が、受信用メモリの使用容量より大きい場合、すなわち、CPUの処理に余裕がある場合に、割り込みにより受信データの迅速な処理ができる。   With this configuration, when the threshold of the used capacity of the receiving memory is larger than the used capacity of the receiving memory, that is, when there is room in the processing of the CPU, the received data can be processed quickly by interruption. Can do.

また、本発明にかかる受信データ通知方法は、受信用メモリの使用容量の閾値を設定する閾値設定ステップと、受信用メモリの使用容量を検出する使用容量検出ステップと、前記受信用メモリの使用容量の閾値と前記受信用メモリの使用容量とを比較する比較ステップと、前記受信用メモリの使用容量の閾値の方が大きい場合に、割り込み信号により、データが受信されたことを通知する割り込みステップと、前記割り込み信号に基づいて、受信されたデータを前記受信用メモリに書き込むデータ書き込みステップとを有することを特徴の1つとする。   In addition, the received data notification method according to the present invention includes a threshold setting step for setting a threshold for the used capacity of the receiving memory, a used capacity detecting step for detecting the used capacity of the receiving memory, and a used capacity of the receiving memory. A comparison step for comparing the threshold value of the received memory with the used capacity of the reception memory, and an interrupt step for notifying that data has been received by an interrupt signal when the threshold value of the used capacity of the receiving memory is larger And a data writing step of writing the received data into the reception memory based on the interrupt signal.

このようにすることにより、受信用メモリの使用容量の閾値の方が、受信用メモリの使用容量より大きい場合、すなわち、CPUの処理に余裕がある場合に、割り込みにより受信データの迅速な処理ができる。   In this way, when the threshold of the used capacity of the receiving memory is larger than the used capacity of the receiving memory, that is, when there is a margin in the processing of the CPU, the received data can be processed quickly by interruption. it can.

本発明の実施例によれば、受信データの処理における割り込み処理にかかる時間を低減することができる通信装置および受信データ通知方法を実現できる。   According to the embodiment of the present invention, it is possible to realize a communication device and a received data notification method that can reduce the time required for interrupt processing in received data processing.

次に、本発明を実施するための最良の形態を、以下の実施例に基づき図面を参照しつつ説明する。   Next, the best mode for carrying out the present invention will be described based on the following embodiments with reference to the drawings.

なお、実施例を説明するための全図において、同一機能を有するものは同一符号を用い、繰り返しの説明は省略する。   In all the drawings for explaining the embodiments, the same reference numerals are used for those having the same function, and repeated explanation is omitted.

本発明の実施例にかかる通信装置について、図4を参照して説明する。   A communication apparatus according to an embodiment of the present invention will be described with reference to FIG.

本実施例にかかる通信装置100は、例えば組み込み機器に搭載される。通信装置100は、ネットワークからデータが入力されるネットワークデバイス102と、ネットワークデバイス102から割り込み信号が入力される割り込みコントローラ114と、ネットワークデバイス102と接続された記憶部116と、ネットワークデバイス102から出力されたデータが入力される受信用メモリ110と、割り込みコントローラ114から出力された割り込み信号が入力される検出手段およびデータ書き込み手段としてのCPU112とを備える。CPU112は、受信用メモリ110に対してデータの入出力を行う。また、CPU112は、記憶部116と接続される。   The communication apparatus 100 according to the present embodiment is mounted on, for example, an embedded device. The communication apparatus 100 outputs a network device 102 to which data is input from the network, an interrupt controller 114 to which an interrupt signal is input from the network device 102, a storage unit 116 connected to the network device 102, and the network device 102. A receiving memory 110 to which received data is input, and a CPU 112 as a detecting means and a data writing means to which an interrupt signal output from the interrupt controller 114 is input. The CPU 112 inputs / outputs data to / from the reception memory 110. The CPU 112 is connected to the storage unit 116.

ネットワークデバイス102は、ネットワークからのデータが入力される信号変換器104と、信号変換器104から出力されたデータが入力されるデバイスバッファ108と、信号変換器104から出力された受信通知信号が入力される割り込みマネージャ106とを備える。デバイスバッファ108は、受信用メモリ110にデータを出力する。また、割り込みマネージャ106は、割り込みコントローラ114に割り込み信号を出力し、記憶部116にステータスを示す情報を記憶する。   The network device 102 receives a signal converter 104 to which data from the network is input, a device buffer 108 to which data output from the signal converter 104 is input, and a reception notification signal output from the signal converter 104. The interrupt manager 106 is provided. The device buffer 108 outputs data to the reception memory 110. Further, the interrupt manager 106 outputs an interrupt signal to the interrupt controller 114 and stores information indicating the status in the storage unit 116.

ネットワークから送信されたデータは、信号変換器104に入力され、信号変換が行われる。信号変換器104は、デバイスバッファ108にデータを入力する。また、信号変換器104は、割り込みマネージャ106にデータが受信されたことを示す通知(受信通知)を行う。   Data transmitted from the network is input to the signal converter 104 and signal conversion is performed. The signal converter 104 inputs data to the device buffer 108. The signal converter 104 also notifies the interrupt manager 106 that data has been received (reception notification).

CPU112は、受信データの通知方法を切り替える受信用メモリ110の使用容量の閾値を予め記憶部116に記憶する。例えば、CPU112は、受信用メモリ110の使用容量の閾値として、割り込みによりデータが受信されたことが通知された場合に、他の処理、例えば受信データの処理が間に合わなくなる使用容量を設定する。   The CPU 112 stores a threshold value of the used capacity of the reception memory 110 for switching the reception data notification method in the storage unit 116 in advance. For example, the CPU 112 sets the used capacity as a threshold of the used capacity of the reception memory 110 when other data, such as received data processing, is not in time when notified that data has been received by interruption.

また、CPU112は、受信用メモリ110の使用容量を検出し、該使用容量を記憶部116に記憶する。   Further, the CPU 112 detects the used capacity of the reception memory 110 and stores the used capacity in the storage unit 116.

割り込みマネージャ106は、記憶部116に記憶された受信用メモリ110の使用容量の閾値と、受信用メモリ110の使用容量とを参照し、受信用メモリ110の使用容量と、使用容量の閾値とを比較する。   The interrupt manager 106 refers to the used capacity threshold of the receiving memory 110 and the used capacity of the receiving memory 110 stored in the storage unit 116, and determines the used capacity of the receiving memory 110 and the used capacity threshold. Compare.

割り込みマネージャ106は、受信用メモリ110の使用容量が受信用メモリ110の使用容量の閾値以下である場合には、割り込みコントローラ114に割り込み信号を入力する。割り込みコントローラ114は、入力された割り込み信号にしたがって、CPU112に割り込みを行う。CPUは、割り込みコントローラ114からの割り込みにしたがって、デバイスバッファ108に書き込まれたデータを受信用メモリ110に書き込む。また、CPUは、受信用メモリ110への書き込みを終了すると、受信用メモリ110の使用容量を検出し、該使用容量を記憶部116に書き込む。   The interrupt manager 106 inputs an interrupt signal to the interrupt controller 114 when the used capacity of the receiving memory 110 is equal to or less than the used capacity threshold of the receiving memory 110. The interrupt controller 114 interrupts the CPU 112 according to the input interrupt signal. The CPU writes the data written in the device buffer 108 into the reception memory 110 in accordance with the interrupt from the interrupt controller 114. When the CPU finishes writing to the receiving memory 110, the CPU detects the used capacity of the receiving memory 110 and writes the used capacity to the storage unit 116.

一方、割り込みマネージャ106は、受信用メモリ110の使用容量が受信用メモリ110の使用容量の閾値以上である場合には、記憶部116に受信データが受信されたことを示すステータスを書き込む。   On the other hand, when the usage capacity of the reception memory 110 is equal to or greater than the threshold value of the usage capacity of the reception memory 110, the interrupt manager 106 writes a status indicating that reception data has been received in the storage unit 116.

CPU112は、受信データの処理、例えばネットワークプロトコルの処理などが終了した後、記憶部116に書き込まれたステータスを参照する。CPUは、受信データがあることを示すステータスが記憶部116に書き込まれている場合、ステータスをクリアし、デバイスバッファ108に書き込まれたデータを受信用メモリ110に書き込む。また、CPUは、受信用メモリ110への書き込みを終了すると、受信用メモリ110の使用容量を検出し、該使用容量を記憶部116に書き込む。   The CPU 112 refers to the status written in the storage unit 116 after the processing of the received data, for example, the processing of the network protocol is completed. When the status indicating that there is received data is written in the storage unit 116, the CPU clears the status and writes the data written in the device buffer 108 into the receiving memory 110. When the CPU finishes writing to the receiving memory 110, the CPU detects the used capacity of the receiving memory 110 and writes the used capacity to the storage unit 116.

上述したように、本実施例にかかる通信装置100では、通常時、例えば受信用メモリ110の使用量が一定値(閾値)以下である場合には、割り込みマネージャ106は割り込みコントローラ114に割り込み信号を入力する。割り込みコントローラ114は、CPU112に割り込み信号を入力する。すなわち、通常時には、割り込み信号により受信データがあることが、CPU112に通知される。   As described above, in the communication apparatus 100 according to the present embodiment, the interrupt manager 106 sends an interrupt signal to the interrupt controller 114 at the normal time, for example, when the usage amount of the reception memory 110 is equal to or less than a certain value (threshold). input. The interrupt controller 114 inputs an interrupt signal to the CPU 112. That is, during normal times, the CPU 112 is notified that there is received data by an interrupt signal.

一方、通常時以外の場合、例えば受信用メモリ110の使用量が一定値以上である場合には、割り込みマネージャ106は記憶部116に、ステータスを書き込む。例えば、割り込みマネージャ106は、記憶部116に受信データがあることを示す情報を書き込む。CPU112は、記憶部116に記憶されたステータスを参照し、受信データがあるか否かを判断する。記憶部116は、共有エリアに配置されているため、CPU112および割り込みマネージャ106からのアクセスが可能である。すなわち、通常時以外の場合には、記憶部116にステータスを書き込むことにより受信データがあることを通知する。   On the other hand, in a case other than the normal time, for example, when the usage amount of the reception memory 110 is a certain value or more, the interrupt manager 106 writes the status in the storage unit 116. For example, the interrupt manager 106 writes information indicating that there is received data in the storage unit 116. The CPU 112 refers to the status stored in the storage unit 116 and determines whether there is received data. Since the storage unit 116 is arranged in the shared area, it can be accessed from the CPU 112 and the interrupt manager 106. That is, in a case other than the normal time, the status is written in the storage unit 116 to notify that there is received data.

その後、通常時に戻った場合、例えば受信用メモリ110の使用量が一定値以下となった場合には、割り込みマネージャ106は割り込みコントローラ114に割り込み信号を入力することにより、受信データがあることを通知する。割り込みコントローラ114は、入力された割り込み信号にしたがって、CPU112に割り込みを行う。CPU112は、割り込みコントローラ114からの割り込みにしたがって、デバイスバッファ108に書き込まれたデータを受信用メモリ110に書き込む。   After that, when returning to normal time, for example, when the usage amount of the reception memory 110 becomes a certain value or less, the interrupt manager 106 notifies the presence of received data by inputting an interrupt signal to the interrupt controller 114. To do. The interrupt controller 114 interrupts the CPU 112 according to the input interrupt signal. The CPU 112 writes the data written in the device buffer 108 into the reception memory 110 in accordance with the interrupt from the interrupt controller 114.

受信用メモリ110の使用量が増加しているということは、CPU112の受信データに対する処理、例えばネットワークプロトコルなどに関する処理が間に合っていないことを意味する。このような状況にある場合に、割り込みが行われた場合、該割り込み処理自体が大きな負荷になり、CPU112の処理を遅らせる原因となる。   An increase in the amount of use of the reception memory 110 means that processing on the received data of the CPU 112, for example, processing related to a network protocol or the like is not in time. In such a situation, when an interrupt is performed, the interrupt processing itself becomes a heavy load, causing the CPU 112 to delay processing.

本実施例にかかる通信装置100においては、割り込み処理自体を省くようにする。すなわち、受信用メモリ110の使用量に閾値を設け、メモリ使用量が閾値を超えている場合には割り込みを禁止し、ステータスによる通知に切り替える。このようにすることにより、受信用メモリ110の使用量が一杯になりデータを受信できない状態になることをできる限り回避する。   In the communication apparatus 100 according to the present embodiment, the interrupt process itself is omitted. That is, a threshold is provided for the usage amount of the reception memory 110, and when the memory usage amount exceeds the threshold value, interruption is prohibited and the status notification is switched. By doing so, it is possible to avoid as much as possible that the amount of use of the reception memory 110 becomes full and data cannot be received.

次に、本実施例にかかる通信装置100のCPU112における処理について、図5−図7を参照して説明する。   Next, processing in the CPU 112 of the communication apparatus 100 according to the present embodiment will be described with reference to FIGS.

ここでは、CPU112の処理を初期化処理、書き込み処理および読み出し処理に分けて説明する。   Here, the processing of the CPU 112 will be described separately for initialization processing, writing processing, and reading processing.

最初に、初期化処理について、図5を参照して説明する。   First, the initialization process will be described with reference to FIG.

例えば、通信装置100の電源がオンされた場合、CPU112は、記憶部116に、割り込みによる通知からステータスによる通知への切り替えを行う受信用メモリ110の使用容量の閾値を設定する(ステップS502)。   For example, when the power of the communication apparatus 100 is turned on, the CPU 112 sets, in the storage unit 116, a threshold value for the used capacity of the reception memory 110 that switches from notification by interruption to notification by status (step S502).

次に、書き込み処理について、図6を参照して説明する。   Next, the writing process will be described with reference to FIG.

CPU112は、割り込みコントローラ114から、割り込み信号が入力されたか否か、すなわち割り込みが行われたか否かを判断する(ステップS602)。   The CPU 112 determines whether or not an interrupt signal has been input from the interrupt controller 114, that is, whether or not an interrupt has been performed (step S602).

割り込み信号が入力されない場合、すなわち割り込みが行われない場合(ステップS602:NO)、ステップS602に戻る。   If no interrupt signal is input, that is, if no interrupt is made (step S602: NO), the process returns to step S602.

一方、割り込み信号が入力された場合、すなわち割り込みが行われた場合(ステップS602:YES)、CPU112は、デバイスバッファ108に格納されているデータを受信用メモリ110に格納する(ステップS604)。   On the other hand, when an interrupt signal is input, that is, when an interrupt is performed (step S602: YES), the CPU 112 stores the data stored in the device buffer 108 in the reception memory 110 (step S604).

次に、CPU112は、受信用メモリ110の使用容量を検出し、該使用容量を記憶部116に書き込む(ステップS606)。その後、ステップS602に戻る。   Next, the CPU 112 detects the used capacity of the reception memory 110 and writes the used capacity in the storage unit 116 (step S606). Thereafter, the process returns to step S602.

次に、読み出し処理について、図7を参照して説明する。   Next, the reading process will be described with reference to FIG.

CPU112は、受信用メモリ110に格納されたデータを読み出す(ステップS702)。   The CPU 112 reads data stored in the reception memory 110 (step S702).

次に、CPU112は、受信用メモリ110の使用容量を検出し、該使用容量を記憶部116に書き込む(ステップS704)。   Next, the CPU 112 detects the used capacity of the reception memory 110 and writes the used capacity in the storage unit 116 (step S704).

次に、CPU112は、記憶部116に受信データがあることを示すステータスが書き込まれているか否かを判断する(ステップS706)。ここで、CPU112は、参照したステータスをクリアする。   Next, the CPU 112 determines whether a status indicating that there is received data is written in the storage unit 116 (step S706). Here, the CPU 112 clears the referred status.

受信データがあることを示すステータスが書き込まれている場合(ステップS706:YES)、CPU112は、記憶部116に書き込まれた受信用メモリの使用容量を参照し、受信用メモリ110への格納が可能であるか否かを判断する(ステップS708)。   When a status indicating that there is received data is written (step S706: YES), the CPU 112 refers to the used capacity of the receiving memory written in the storage unit 116 and can store it in the receiving memory 110. It is determined whether or not (step S708).

受信用メモリ110への格納が可能である場合(ステップS708:YES)、CPU112はデバイスバッファ108に格納されたデータを受信用メモリ110に格納する。   When the data can be stored in the reception memory 110 (step S708: YES), the CPU 112 stores the data stored in the device buffer 108 in the reception memory 110.

次に、CPU112は、受信用メモリ110の使用容量を検出し、該使用量を記憶部116に書き込む(ステップS712)。その後、ステップS706に戻る。   Next, the CPU 112 detects the used capacity of the reception memory 110 and writes the used amount in the storage unit 116 (step S712). Thereafter, the process returns to step S706.

一方、受信データがない場合(ステップS706:NO)および受信用メモリ110への格納が可能でない場合(ステップS708:NO)、終了する。   On the other hand, when there is no reception data (step S706: NO) and when the data cannot be stored in the reception memory 110 (step S708: NO), the process ends.

次に、本実施例にかかる通信装置100の割り込みマネージャ106における処理について、図8を参照して説明する。   Next, processing in the interrupt manager 106 of the communication apparatus 100 according to the present embodiment will be described with reference to FIG.

割り込みマネージャ106は、信号変換器104から受信通知が入力されたか否かを判断する(ステップS802)。   The interrupt manager 106 determines whether or not a reception notification is input from the signal converter 104 (step S802).

受信通知が入力されない場合(ステップS802:NO)、ステップS802に戻る。   If no reception notification is input (step S802: NO), the process returns to step S802.

一方、受信通知が入力された場合(ステップS802:YES)、割り込みマネージャ106は、記憶部116に書き込まれた受信用メモリ110の使用容量と、使用容量の閾値とを参照し、受信用メモリの使用容量が使用容量の閾値より小さいか否か、すなわち受信用メモリの使用量<閾値であるか否かを判断する(ステップS804)。   On the other hand, when a reception notification is input (step S802: YES), the interrupt manager 106 refers to the used capacity of the receiving memory 110 written in the storage unit 116 and the threshold of the used capacity, and It is determined whether or not the used capacity is smaller than the used capacity threshold value, that is, whether or not the used amount of the receiving memory <the threshold value is satisfied (step S804).

受信用メモリ110の使用量が閾値より小さい場合、すなわち受信用メモリの使用量<閾値である場合(ステップS804:YES)、割り込みマネージャ106は、割り込みコントローラ114に割り込み信号を入力する(ステップS806)。その後、ステップS802に戻る。その結果、割り込みコントローラ114からCPU112へ割り込みが行われる。   When the usage amount of the reception memory 110 is smaller than the threshold value, that is, when the usage amount of the reception memory is smaller than the threshold value (step S804: YES), the interrupt manager 106 inputs an interrupt signal to the interrupt controller 114 (step S806). . Thereafter, the process returns to step S802. As a result, an interrupt is performed from the interrupt controller 114 to the CPU 112.

一方、受信用メモリの使用量が閾値より大きい場合、すなわち受信用メモリの使用量>閾値である場合(ステップS804:NO)、割り込みマネージャ106は、記憶部116に受信データがあることを示すステータスを書き込む(ステップS808)。その後、ステップS802に戻る。   On the other hand, when the usage amount of the reception memory is larger than the threshold value, that is, when the usage amount of the reception memory> the threshold value (step S804: NO), the interrupt manager 106 indicates that the storage unit 116 has reception data. Is written (step S808). Thereafter, the process returns to step S802.

本発明の実施例によれば、受信データの処理が、新たに受信されるデータに対して間に合わなくなってきた場合に、割り込み処理にかかる時間を省くことができる。このため、受信データの処理に最大限時間をかけることができる。   According to the embodiment of the present invention, it is possible to save time for interrupt processing when processing of received data is not in time for newly received data. For this reason, it is possible to spend the maximum time for processing the received data.

また、受信データの処理に余裕がある場合には、割り込みをおこなうことにより、受信データの処理を迅速に行うことができる。   Further, when there is a margin in processing received data, the received data can be processed quickly by interrupting.

また、本実施例にかかる通信装置は、通信の媒体、例えばシリアル方式、USB(登録商標)、イーサネット(登録商標)などによらず適用できる。   The communication apparatus according to the present embodiment can be applied regardless of a communication medium, for example, a serial method, USB (registered trademark), Ethernet (registered trademark), or the like.

以上、本発明を好ましい実施例について説明したが、本発明は上記の特定の実施例に限定されるものではなく、特許請求の範囲に記載した要旨内において様々な変形・変更が可能である。   Although the present invention has been described with reference to the preferred embodiments, the present invention is not limited to the specific embodiments described above, and various modifications and changes can be made within the scope described in the claims.

本発明にかかる通信装置および受信データ通知方法は、通信機能を備える組み込み機器に適用できる。   The communication device and the received data notification method according to the present invention can be applied to an embedded device having a communication function.

DMA転送データ受信システムの構成を示すブロック図である。It is a block diagram which shows the structure of a DMA transfer data receiving system. DMA転送データ受信システムのネットワークデバイスにおけるDMA制御部の構成を示すブロック図である。It is a block diagram which shows the structure of the DMA control part in the network device of a DMA transfer data receiving system. 割り込み処理を示すフロー図である。It is a flowchart which shows an interruption process. 本発明の一実施例にかかる通信処理を示すブロック図である。It is a block diagram which shows the communication process concerning one Example of this invention. 本発明の一実施例にかかる通信装置の動作を示すフロー図である。It is a flowchart which shows operation | movement of the communication apparatus concerning one Example of this invention. 本発明の一実施例にかかる通信装置の動作を示すフロー図である。It is a flowchart which shows operation | movement of the communication apparatus concerning one Example of this invention. 本発明の一実施例にかかる通信装置の動作を示すフロー図である。It is a flowchart which shows operation | movement of the communication apparatus concerning one Example of this invention. 本発明の一実施例にかかる通信装置の動作を示すフロー図である。It is a flowchart which shows operation | movement of the communication apparatus concerning one Example of this invention.

符号の説明Explanation of symbols

100 通信装置 100 Communication device

Claims (4)

受信用メモリの使用容量を検出する検出手段と、
予め設定された受信用メモリの使用容量の閾値と前記受信用メモリの使用容量とを比較し、前記受信用メモリの使用容量の閾値の方が大きい場合に、割り込み信号により、データが受信されたことを通知する割り込みマネージャと、
前記割り込み信号に基づいて、受信されたデータを前記受信用メモリに書き込むデータ書き込み手段と
を備えることを特徴とする通信装置。
Detection means for detecting the used capacity of the reception memory;
A comparison is made between a threshold value for the use capacity of the reception memory set in advance and the use capacity of the reception memory, and when the threshold value for the use capacity of the reception memory is larger, data is received by an interrupt signal. An interrupt manager to notify
A communication device comprising: data writing means for writing received data into the reception memory based on the interrupt signal.
請求項1に記載の通信装置において、
データが受信されたことを示すステータスを記憶する記憶手段
を備え、
前記割り込みマネージャは、前記受信用メモリの使用容量の閾値より、前記受信用メモリの使用容量の方が大きい場合に、前記記憶手段に、データが受信されたことを示すステータスを書き込み、
前記データ書き込み手段は、前記記憶手段を参照し、データが受信されたことを示すステータスが書き込まれている場合に受信されたデータを前記受信用メモリに書き込むことを特徴とする通信装置。
The communication device according to claim 1,
Storage means for storing a status indicating that data has been received;
The interrupt manager writes a status indicating that data is received to the storage means when the used capacity of the receiving memory is larger than the threshold of the used capacity of the receiving memory,
The data writing means refers to the storage means and writes the received data to the reception memory when a status indicating that data has been received is written.
受信用メモリの使用容量の閾値を設定する閾値設定ステップと、
受信用メモリの使用容量を検出する使用容量検出ステップと、
前記受信用メモリの使用容量の閾値と前記受信用メモリの使用容量とを比較する比較ステップと、
前記受信用メモリの使用容量の閾値の方が大きい場合に、割り込み信号により、データが受信されたことを通知する割り込みステップと、
前記割り込み信号に基づいて、受信されたデータを前記受信用メモリに書き込むデータ書き込みステップと
を有することを特徴とする受信データ通知方法。
A threshold value setting step for setting a threshold value of the used capacity of the reception memory;
A used capacity detection step for detecting the used capacity of the receiving memory;
A comparison step of comparing a threshold value of the used capacity of the receiving memory with a used capacity of the receiving memory;
An interrupt step for notifying that data has been received by an interrupt signal when the threshold of the capacity used for the reception memory is larger;
A data writing step of writing received data to the reception memory based on the interrupt signal.
請求項3に記載の受信データ通知方法において、
前記受信用メモリの使用容量の方が大きい場合に、データが受信されたことを示すステータスを記憶する記憶手段に、データが受信されたことを示すステータスを書き込むステータス書き込みステップと、
前記記憶手段を参照し、データが受信されたことを示すステータスが書き込まれている場合に受信されたデータを前記受信用メモリに書き込むステップと
を有することを特徴とする受信データ通知方法。
The received data notification method according to claim 3,
A status writing step of writing a status indicating that the data has been received into a storage means for storing a status indicating that the data has been received when the use capacity of the reception memory is larger;
A received data notification method comprising: referring to the storage means and writing the received data to the reception memory when a status indicating that the data has been received is written.
JP2005360518A 2005-12-14 2005-12-14 Communication apparatus and received data notification method Pending JP2007164511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005360518A JP2007164511A (en) 2005-12-14 2005-12-14 Communication apparatus and received data notification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005360518A JP2007164511A (en) 2005-12-14 2005-12-14 Communication apparatus and received data notification method

Publications (1)

Publication Number Publication Date
JP2007164511A true JP2007164511A (en) 2007-06-28

Family

ID=38247326

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005360518A Pending JP2007164511A (en) 2005-12-14 2005-12-14 Communication apparatus and received data notification method

Country Status (1)

Country Link
JP (1) JP2007164511A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011180767A (en) * 2010-02-26 2011-09-15 Kyocera Mita Corp Semiconductor device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011180767A (en) * 2010-02-26 2011-09-15 Kyocera Mita Corp Semiconductor device

Similar Documents

Publication Publication Date Title
US8949641B2 (en) Information processing apparatus and method for controlling information processing apparatus restoration order of images that reduces the waiting time when restoration from a hibernation state
JP5791397B2 (en) Device controller, USB device controller, and power control method
US5819111A (en) System for managing transfer of data by delaying flow controlling of data through the interface controller until the run length encoded data transfer is complete
EP1622324A1 (en) Fault tolerant data transfer in multi-node system via internodal crossbar switch
US7376853B2 (en) Network apparatus, method for controlling the same, and program for the same
US8494010B2 (en) Data transfer device, data transmitting device, data receiving device, and data transfer method
JP2010128696A (en) Bus bridge device and bus bridge system using the same
TWI771654B (en) Memory system, memory system control method, and information processing system
JP5545853B2 (en) Communication device
JP2014026373A (en) Information processing device, control method for information processing device, and program
JP2012156645A (en) Information processor, communication apparatus, and control method therefor
JP2007164511A (en) Communication apparatus and received data notification method
JP3703439B2 (en) Data transfer control device and method
JP4708818B2 (en) Network device and control method thereof
JP5783348B2 (en) Control device, control program, and image forming apparatus
JP2008262393A (en) Information processing system and its control method
JP7374622B2 (en) information processing equipment
WO2007097038A1 (en) Buffer control apparatus, crossbar switch and buffer control method
JP2008084043A (en) Interruption processing method
JP2004295701A (en) Serial communication device
JP4862395B2 (en) Information processing apparatus and information processing apparatus control method
JP2008118211A (en) Device and method for transferring data
JP2004362282A (en) Network equipment and network system
JP2006243016A (en) Audio decoding device
JP2017149119A (en) Information processing apparatus and method for controlling information processing apparatus