JP2005284841A - Data communication device and data communication method - Google Patents
Data communication device and data communication method Download PDFInfo
- Publication number
- JP2005284841A JP2005284841A JP2004099405A JP2004099405A JP2005284841A JP 2005284841 A JP2005284841 A JP 2005284841A JP 2004099405 A JP2004099405 A JP 2004099405A JP 2004099405 A JP2004099405 A JP 2004099405A JP 2005284841 A JP2005284841 A JP 2005284841A
- Authority
- JP
- Japan
- Prior art keywords
- data
- memory
- cpu
- dual port
- data communication
- 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
- Information Transfer Systems (AREA)
Abstract
Description
本発明は、複数の回路間において、データの通信を行うデータ通信装置およびデータ通信方法に関するものであり、特に、デュアルポートメモリを使用して、複数のCPU間でデータ通信するデータ通信装置およびデータ通信方法に関するものである。 The present invention relates to a data communication device and a data communication method for performing data communication between a plurality of circuits, and in particular, to a data communication device and a data for performing data communication between a plurality of CPUs using a dual port memory. It relates to a communication method.
図8は、従来のCPU間データ通信装置の構成を示すブロック図である(特許文献1参照)。 FIG. 8 is a block diagram showing a configuration of a conventional inter-CPU data communication device (see Patent Document 1).
このCPU間データ通信装置においては、例えば、CPU11を送信側としてデータ通信を行う場合、CPU11がデュアルポートメモリ15にデータを書き込むために、デュアルポートメモリ15内の既読データアドレスを指し示すリードポインタ23と、デュアルポートメモリ15内の未読データアドレスを指し示すライトポインタ21と、をCPU11が読み込み、データ書き込みの可否およびデータの書き込める範囲をCPU11において算出する必要がある。一方、受信側のCPU13がデュアルポートメモリ15からデータを読み出すためには、リードポインタ23およびライトポインタ21をCPU13で読み込み、データの読み込める範囲をCPU13において算出する必要がある。
しかしながら、従来のCPU間データ通信装置は、デュアルポートメモリへの書き込みと読み込みとを行う場合、それぞれのCPUがリードポインタとライトポインタとを読み取り、書き込み可能範囲もしくは読み込み可能範囲を算出する必要があるため、CPUの処理負荷を増大させる原因となっている。 However, in the conventional inter-CPU data communication apparatus, when writing to and reading from the dual port memory, each CPU needs to read the read pointer and the write pointer to calculate the writable range or the readable range. This increases the processing load on the CPU.
本発明は、かかる点に鑑みてなされたものであり、データ送受信時に、それぞれのCPUが、リードポインタとライトポインタとを読み取り、書き込み可能範囲もしくは読み込み可能範囲を算出することなく、デュアルポートメモリへの書き込みおよび読み込みを行うことができ、CPUの処理負荷を軽減することができるデータ通信装置およびデータ通信方法を提供することを目的とする。 The present invention has been made in view of this point, and at the time of data transmission / reception, each CPU reads the read pointer and the write pointer and calculates the writable range or the readable range to the dual port memory. An object of the present invention is to provide a data communication apparatus and a data communication method capable of writing and reading data and reducing the processing load on the CPU.
本発明のデータ通信装置は、複数のCPUと、前記複数のCPU間でデータが送受信される際に、このデータの一時保存および中継を行うデュアルポートメモリと、前記複数のCPUの外部に設置され、前記送受信されるデータのサイズと前記デュアルポートメモリの使用状況とに基づいて、前記デュアルポートメモリにおいてデータが保存される領域のメモリアドレスと、この領域に対し各CPUがデータの書き込み若しくは読み出しを行うタイミングと、を管理する管理手段と、を具備する構成を採る。 The data communication device according to the present invention is installed outside a plurality of CPUs, a dual port memory that temporarily stores and relays data when the data is transmitted and received between the plurality of CPUs. Based on the size of the transmitted / received data and the usage status of the dual port memory, the memory address of the area where the data is stored in the dual port memory, and each CPU writes or reads data to this area. And a management means for managing the timing to perform.
本発明のデータ通信装置は、互いにデータ送受信を行う複数のCPUと、前記複数のCPU間のデータ送受信に使用されるデュアルポートメモリと、前記デュアルポートメモリの使用状況を保持する記憶装置と、前記記憶装置から前記デュアルポートメモリの使用状況を読み込み、前記複数のCPU間で送受信されるデータのサイズと前記デュアルポートメモリの使用状況とに基づいて、各CPUに対し、前記デュアルポートメモリにおいて前記データの書き込み可能なメモリ領域のメモリアドレスと前記データの送受信を開始させるための割込み信号とを発生させる管理装置と、を具備する構成を採る。 A data communication device according to the present invention includes a plurality of CPUs that perform data transmission / reception with each other, a dual port memory that is used for data transmission / reception between the plurality of CPUs, a storage device that holds a usage status of the dual port memory, The usage status of the dual port memory is read from a storage device, and the data in the dual port memory is sent to each CPU based on the size of data transmitted and received between the plurality of CPUs and the usage status of the dual port memory. And a management device for generating an interrupt signal for starting transmission / reception of the data.
本発明のデータ通信装置は、上記の構成において、前記管理装置は、データ送信時は、前記記憶装置から前記デュアルポートメモリの使用状況を読み込み、前記データのサイズと前記デュアルポートメモリの使用状況とに基づいて、前記デュアルポートメモリにおける使用可能なメモリ領域を算出し、算出されたメモリ領域に対応するメモリアドレスを発生させ、このメモリアドレスを送信側のCPUに割込みによって通知すると共に前記算出されたメモリ領域の属性を書き込み中に更新する一方、データ受信時は、前記送信側のCPUによって書き込みが完了したメモリ領域のメモリアドレスを受信側のCPUに割込みによって通知すると共に前記書き込みが完了したメモリ領域の属性を読み込み中に更新する構成を採る。 In the data communication device according to the present invention, in the configuration described above, the management device reads the usage status of the dual port memory from the storage device during data transmission, and determines the size of the data and the usage status of the dual port memory. Based on the above, a usable memory area in the dual port memory is calculated, a memory address corresponding to the calculated memory area is generated, the memory address is notified to the CPU on the transmitting side by an interrupt, and the calculated While the attribute of the memory area is updated during writing, at the time of data reception, the memory address of the memory area that has been written by the sending CPU is notified to the receiving CPU by an interrupt, and the writing is completed. It takes a configuration to update the attributes of while reading.
これらの構成によれば、データ送受信時に、それぞれのCPUが、リードポインタとライトポインタとを読み取り、書き込み可能範囲もしくは読み込み可能範囲を算出することなく、デュアルポートメモリへの書き込みおよび読み込みを行うことができ、CPUの処理負荷を軽減することができる。 According to these configurations, at the time of data transmission / reception, each CPU can read and write to the dual port memory without reading the read pointer and the write pointer and calculating the writable range or the readable range. The processing load on the CPU can be reduced.
本発明のデータ通信装置は、上記の構成において、前記管理装置は、前記データの書き込み可能なメモリ領域を確保できない場合、送信側のCPUからのデータ書き込み要求を保留し、受信側のCPUがデータ受信を完了した後に、前記メモリ領域を確保可能か否か再度判断し、確保可能な場合、確保されたメモリ領域のメモリアドレスを前記送信側のCPUに割込みによって通知し、確保不可能な場合、前記送信側のCPUからのデータ書き込み要求を再度保留する構成を採る。 In the data communication device according to the present invention, in the configuration described above, when the management device cannot secure a memory area in which the data can be written, the management device suspends the data write request from the transmission side CPU, and the reception side CPU stores the data After completing the reception, it is determined again whether or not the memory area can be secured.If the memory area can be secured, the memory address of the secured memory area is notified to the CPU on the transmission side by an interrupt. The data write request from the sending CPU is again held.
この構成によれば、送信側CPUが要求したデータサイズのメモリ領域を即座に確保できない場合でも、メモリ領域が確保できた時点で送信側CPUに送信データの書き込みを行わせることができる。 According to this configuration, even when the memory area having the data size requested by the transmission side CPU cannot be secured immediately, the transmission side CPU can be made to write the transmission data when the memory area can be secured.
本発明のデータ通信装置は、上記の構成において、前記管理装置は、前記データの書き込み可能なメモリ領域を確保できないと判定された時点で一定時間の計時を開始するタイマを具備し、前記一定時間が経過するまでに、前記データの書き込み可能なメモリ領域を確保できない場合、この旨を送信側のCPUに通知する構成を採る。 In the above configuration, the data communication device according to the present invention includes a timer that starts counting a predetermined time when it is determined that the management device cannot secure a memory area in which the data can be written, and the predetermined time If a memory area in which the data can be written cannot be secured before the time elapses, a notification is sent to the CPU on the transmission side.
この構成によれば、送信側CPUが要求したデータサイズのメモリ領域を確保できない場合、送信側CPUが長時間に渡ってデータ送信を待たされることを防ぐことができる。 According to this configuration, when the memory area having the data size requested by the transmission side CPU cannot be secured, the transmission side CPU can be prevented from waiting for data transmission for a long time.
本発明の通信端末装置は、上記いずれかに記載のデータ通信装置を具備する構成を採る。 The communication terminal device of the present invention employs a configuration including any of the data communication devices described above.
この構成によれば、上記と同様の作用効果を有する通信端末装置を提供することができる。 According to this configuration, it is possible to provide a communication terminal device having the same operational effects as described above.
本発明のデータ通信方法は、複数のCPUと、前記複数のCPU間でデータが送受信される際に、このデータの一時保存および中継を行うデュアルポートメモリと、を具備するデータ通信装置において使用されるデータ通信方法であって、前記デュアルポートメモリにおいてデータが保存される領域のメモリアドレスと、この領域に対し各CPUがデータの書き込み若しくは読み出しを行うタイミングとを、前記複数のCPUの外部に設置された管理装置によって、前記送受信されるデータのサイズと前記デュアルポートメモリの使用状況とに基づいて管理するようにした。 The data communication method of the present invention is used in a data communication apparatus including a plurality of CPUs and a dual port memory that temporarily stores and relays data when the data is transmitted and received between the plurality of CPUs. A data communication method, wherein a memory address of an area in which data is stored in the dual port memory and a timing at which each CPU writes or reads data in this area are provided outside the plurality of CPUs. The managed device is managed based on the size of the transmitted / received data and the usage status of the dual port memory.
この方法によれば、データ送受信時に、それぞれのCPUが、リードポインタとライトポインタとを読み取り、書き込み可能範囲もしくは読み込み可能範囲を算出することなく、デュアルポートメモリへの書き込みおよび読み込みを行うことができ、CPUの処理負荷を軽減することができる。 According to this method, at the time of data transmission / reception, each CPU can read and write to the dual port memory without reading the read pointer and the write pointer and calculating the writable range or readable range. CPU processing load can be reduced.
以上説明したように、本発明によれば、データ送受信時に、それぞれのCPUが、リードポインタとライトポインタとを読み取り、書き込み可能範囲もしくは読み込み可能範囲を算出することなく、デュアルポートメモリへの書き込みおよび読み込みを行うことができ、CPUの処理負荷を軽減することができる。 As described above, according to the present invention, at the time of data transmission / reception, each CPU reads the read pointer and the write pointer, and writes to the dual port memory without calculating the writable range or the readable range. Reading can be performed, and the processing load on the CPU can be reduced.
以下、本発明の実施の形態について、添付図面を参照して詳細に説明する。なお、ここでは、2つのCPU間でデータ送受信を行う場合を例にとって説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Here, a case where data transmission / reception is performed between two CPUs will be described as an example.
(実施の形態1)
図1は、本発明の実施の形態1に係るデータ通信装置の主要な構成を示すブロック図である。
(Embodiment 1)
FIG. 1 is a block diagram showing the main configuration of the data communication apparatus according to Embodiment 1 of the present invention.
本実施の形態に係るデータ通信装置は、記憶装置101、割込み/メモリ管理装置102、デュアルポートメモリ103、CPU111、割込み信号線112、割込み信号線113、ローカルバス114、CPU121、割込み信号線122、割込み信号線123、およびローカルバス124を有する。
The data communication device according to the present embodiment includes a
本実施の形態に係るデータ通信装置の各部は以下の動作を行う。 Each unit of the data communication apparatus according to the present embodiment performs the following operation.
CPU111およびCPU121は、複数のCPU間でデータの送受信を行う。デュアルポートメモリ103は、データの送受信に用いられる。記憶装置101は、デュアルポートメモリ103のメモリ使用状況を保持する。割込み/メモリ管理装置102は、記憶装置101からデュアルポートメモリ103のメモリ使用状況の読み込みおよび更新を行い、CPU111あるいはCPU121に対しメモリアドレスを発生させ、CPU111およびCPU121にデータ送受信動作を開始させるための割込み信号を発生させる。割込み信号線112、割込み信号線113、割込み信号線122、および割込み信号線123は、割込み信号を伝達する。ローカルバス114は、CPU111と割込み/メモリ管理装置102と記憶装置101との間でデータを送受信するためのものである。ローカルバス124は、CPU121と割込み/メモリ管理装置102と記憶装置101との間でデータを送受信するためのものである。
The
次いで、上記構成を有するデータ通信装置全体の動作について説明する。 Next, the operation of the entire data communication apparatus having the above configuration will be described.
図2は、データ通信装置の各部の一連の動作を示すシーケンス図である。なお、ここでは、CPU111からCPU121へデータを送信する場合を例にとって説明する。
FIG. 2 is a sequence diagram showing a series of operations of each part of the data communication apparatus. Here, a case where data is transmitted from the
送信側のCPU111は、データをデュアルポートメモリ103に書き込むため、割込み/メモリ管理装置102に対し、書き込みたいデータサイズを含むデータ送信要求を送信する(ST1110)。割込み/メモリ管理装置102は、記憶装置101に保存されているデュアルポートメモリ103のメモリ使用状況を読み込むため、記憶装置101に対しメモリ使用状況要求を送信する(ST1120)。記憶装置101は、保存されているデュアルポートメモリ103のメモリ使用状況を割込み/メモリ管理装置102に応答する(ST1130)。割込み/メモリ管理装置102は、読み取ったデュアルポートメモリ103のメモリ使用状況と、ST1110のデータ送信要求に含まれている書き込みデータサイズとを比較し、要求されているデータサイズと同等のメモリ領域が確保可能か否かを判定する(ST1135)。メモリ領域が確保可能である場合、割込み/メモリ管理装置102は、確保されたメモリ領域が送信側CPU111によって書き込み使用中であることを示すため、記憶装置101に対しメモリ使用状況更新要求を行ない(ST1140)、このメモリ領域の属性を書き込み使用中を示す情報によって更新する。また、割込み/メモリ管理装置102は、記憶装置101からメモリ使用状況更新応答が行われ次第(ST1150)、送信側のCPU111に対し、割込みによりデータ送信応答を送信する(ST1160)。なお、このデータ送信応答は、デュアルポートメモリ103の使用可能なメモリ領域の開始アドレス(この領域の先頭アドレス)を含んでいる。ST1160のデータ送信応答を受信した送信側CPU111は、デュアルポートメモリ103の使用可能なメモリ領域の開始アドレスからデータ送信を開始し、データの書き込みを開始する(ST1170)。そして、送信側のCPU111は、データの書き込みが終了次第、割込み/メモリ管理装置102に対しデータ送信完了通知を送信する(ST1180)。
次に、ST1180においてデータ送信完了を通知された割込み/メモリ管理装置102は、デュアルポートメモリ103内の使用可能なメモリ領域(ST1160のデータ送信応答によって開始アドレスが送信されたメモリ領域)が受信側CPU121によって読み込み使用中であることを示すため、記憶装置101に対しメモリ使用状況更新要求を行ない(ST1190)、このメモリ領域の属性を読み込み使用中を示す情報によって更新する。また、割込み/メモリ管理装置102は、記憶装置101からメモリ使用状況更新応答が行われ次第(ST1200)、受信側のCPU121に対し、割込みによりデータ受信要求を送信する(ST1210)。なお、このデータ受信要求は、送信側のCPU111が送信データを書き込んだデュアルポートメモリ103のメモリ領域の開始アドレスおよび終了アドレス(もしくは書き込んだデータサイズ)を含んでいる。ST1210のデータ受信要求を受信した受信側CPU121は、デュアルポートメモリ103内のメモリ領域の、指示された開始アドレスから終了アドレスまで、または指示された開始アドレスからデータサイズ分だけ、データ受信を開始し、データの読み込みを開始する(ST1220)。そして、データの読み込みが終了次第、受信側CPU121は、割込み/メモリ管理装置102に対し、データ受信完了通知を送信する(ST1230)。なお、このデータ受信完了通知は、デュアルポートメモリ103内の、データの読み込みが完了したメモリ領域の開始アドレスを含んでいる。
Next, the interrupt /
ST1230においてデータ受信完了を通知された割込み/メモリ管理装置102は、何れのCPUもデュアルポートメモリ103を使用中ではないことを示すため、記憶装置101に対しメモリ使用状況更新要求を行ない(ST1240)、読み込みが完了したデュアルポートメモリ103のメモリ領域(ST1230のデータ受信完了通知に開始アドレスが含まれていたメモリ領域)の属性を更新する。記憶装置101から割込み/メモリ管理装置102に対し、メモリ使用状況更新応答が行われることによって、送信側のCPU111から受信側のCPU121へのデータ送信が完了する(ST1250)。
The interrupt /
なお、CPU121からCPU111へデータを送信する場合も、上記と同様のシーケンスによって行うことが可能である。
Note that data can be transmitted from the
図3は、記憶装置101内部のメモリ使用状況保持テーブルの内容の一例を示す図である。このデータテーブルは、デュアルポートメモリ103のメモリ使用状況を保持するものである。
FIG. 3 is a diagram illustrating an example of the contents of the memory usage status holding table in the
このデータテーブルは、開始アドレスA1と終了アドレスA2と領域属性P1とで構成される。CPU111が書き込み使用中の場合には、領域属性P1は「CPU111W」と記述され、CPU121が書き込み使用中の場合は「CPU121W」と記述される。また、CPU111が読み込み使用中の場合は、領域属性P1は「CPU111R」と記述され、CPU121が読み込み使用中の場合は「CPU121R」と記述される。一方、何れのCPUもデュアルポートメモリ103を使用していない場合には、領域属性P1には、使用していないことを示すフラグが記述される。なお、このデータテーブルでは、終了アドレスA2の代わりに、書き込む(または、書き込まれた)データの領域サイズを用いることも可能である。
This data table includes a start address A1, an end address A2, and a region attribute P1. The area attribute P1 is described as “CPU111W” when the
このように、本実施の形態によれば、記憶装置101および割り込み/メモリ管理装置102を設け、記憶装置101には、デュアルポートメモリ103のメモリ使用状況を保持させ、一方、割り込み/メモリ管理装置102には、記憶装置101に保持されている内容(書き込みデータサイズ)に基づいて、デュアルポートメモリ103において利用可能なメモリ領域(書き込み可能範囲、読み込み可能範囲)のメモリアドレスを算出させ、これをCPU111およびCPU121に通知させる。各CPUは、割り込み/メモリ管理装置102から通知されたメモリアドレスに従って、デュアルポートメモリ103へのデータの書き込みまたは読み込みを行う。
Thus, according to the present embodiment, the
すなわち、本実施の形態の特徴は、データの送受信を行うCPUとは別に、デュアルポートメモリのメモリ領域を一元管理する管理装置を設け、各CPUは、この管理装置からの通知に従ってデータの書き込みまたは読み込みを行うことである。 That is, the feature of this embodiment is that a management device that centrally manages the memory area of the dual port memory is provided separately from the CPU that transmits and receives data, and each CPU writes or receives data according to the notification from the management device. To read.
この構成を採ることにより、データ送受信時に各CPUが、デュアルポートメモリへの書き込みと読み込みを行うリードポインタとライトポインタとを読み取り、書き込み可能範囲または読み込み可能範囲を算出する必要がなくなる。よって、CPUの処理負荷を軽減させることができる。 By adopting this configuration, it is not necessary for each CPU to read a read pointer and a write pointer for writing to and reading from the dual port memory and calculate a writable range or a readable range at the time of data transmission / reception. Therefore, the processing load on the CPU can be reduced.
(実施の形態2)
本発明の実施の形態2に係るデータ通信装置は、実施の形態1に係るデータ通信装置と同様の基本的構成を有している。よって、その説明を省略する。
(Embodiment 2)
The data communication apparatus according to the second embodiment of the present invention has the same basic configuration as the data communication apparatus according to the first embodiment. Therefore, the description is omitted.
図4は、本実施の形態に係るデータ通信装置の各部の一連の動作を示すシーケンス図である。ここでも、CPU111からCPU121へデータを送信する場合を例にとって説明する。なお、本実施の形態に係る一連の動作は、実施の形態1の図2に示した一連の動作と同一のステップを一部有しており、同一のステップには同一の符号を付す。
FIG. 4 is a sequence diagram showing a series of operations of each part of the data communication apparatus according to the present embodiment. Here, a case where data is transmitted from the
ST1110〜ST1135の処理は、実施の形態1と同一である。本実施の形態の特徴は、ST1135の判定において、CPU111から要求されたデータサイズと同等のメモリ領域をデュアルポートメモリ103内に確保できないと判定された場合の後続処理を規定したことである。
The processing of ST1110 to ST1135 is the same as that of the first embodiment. A feature of the present embodiment is that a subsequent process is defined when it is determined in ST1135 that a memory area equivalent to the data size requested from the
かかる場合、割込み/メモリ管理装置102は、ST1110のデータ送信要求に対する応答を保留して、このデータ送信要求に含まれるデータサイズ等の情報を内部メモリに一時保存する。そして、受信側のCPU121からデータ受信完了通知を受信するまで待ち処理を行う(ST2010)。
In such a case, the interrupt /
その後、受信側CPU121からデータ受信完了通知を受信した場合(ST2020)、割込み/メモリ管理装置102は、該当するメモリ領域の属性を何れのCPUも使用中ではないことを示す情報で更新するために、メモリ使用状況更新要求を送信し(ST2030)、これに対するメモリ使用状況更新応答を受信(ST2040)することによって、メモリ使用状況の更新が完了したことを認識する。割込み/メモリ管理装置102は、メモリ使用状況の更新認識後に、内部メモリに一時保存しておいた情報に含まれるデータサイズと同等の使用可能メモリ領域がデュアルポートメモリ103内に確保可能かを再度判定する(ST2050)。
Thereafter, when a data reception completion notification is received from the receiving CPU 121 (ST2020), the interrupt /
ST2050においてメモリ領域が確保可能と判定された場合には、実施の形態1で既に示したように、割込み/メモリ管理装置102は、記憶装置101に対しメモリ使用状況更新要求を行ない(ST1140)、このメモリ領域の属性を書き込み使用中に更新する。また、メモリ使用状況更新応答が行われ次第(ST1150)、割込み/メモリ管理装置102は、データ送信応答を送信する(ST1160)。このデータ送信応答を受信した送信側CPU111は、データの書き込みを開始する(ST1170)。そして、送信側のCPU111は、データの書き込みが終了次第、割込み/メモリ管理装置102に対しデータ送信完了通知を送信する(ST1180)。その後の手順についても、実施の形態1と同様である。
If it is determined in ST2050 that a memory area can be secured, as already described in the first embodiment, the interrupt /
なお、ST2050において、再度、メモリ領域が確保可能でなかった場合には、ST2010〜ST2050の処理を繰り返す。 If the memory area cannot be secured again in ST2050, the processes of ST2010 to ST2050 are repeated.
このように、本実施の形態によれば、CPUのデータ送信要求に対し、デュアルポートメモリ内にデータ書き込みに必要なサイズのメモリ領域を即座に確保できない場合は、このメモリ領域が確保できるまでCPUにデータ送信を待たせ、メモリ領域が確保できた時点で、このCPUに送信データの送信(書き込み)を行わせる。 As described above, according to the present embodiment, in response to a data transmission request from the CPU, if a memory area of a size necessary for data writing cannot be immediately secured in the dual port memory, the CPU until the memory area can be secured. The CPU waits for data transmission, and when the memory area is secured, the CPU transmits (writes) transmission data.
(実施の形態3)
図5は、本発明の実施の形態3に係るデータ通信装置の主要な構成を示すブロック図である。なお、このデータ通信装置は、実施の形態1に示したデータ通信装置と同様の基本的構成を有しており、同一の構成要素には同一の符号を付し、その説明を省略する。
(Embodiment 3)
FIG. 5 is a block diagram showing the main configuration of the data communication apparatus according to Embodiment 3 of the present invention. This data communication apparatus has the same basic configuration as that of the data communication apparatus shown in the first embodiment, and the same components are denoted by the same reference numerals and description thereof is omitted.
本実施の形態の特徴は、タイマ301をさらに有し、送信側のCPUによってデータ書き込みが要求され、要求された書き込みデータサイズと同等のメモリ領域を確保できない場合に、一定時間(タイマ満了時間)を計時し、タイマ満了を割込み/メモリ管理装置102に通知することである。
A feature of the present embodiment is that it further includes a
図6は、本実施の形態に係るデータ通信装置の各部の一連の動作を示すシーケンス図である。ここでも、CPU111からCPU121へデータを送信する場合を例にとって説明する。なお、ST1110〜ST1135の処理は、実施の形態1の図2で既に示したステップと同一のものであり、その説明を省略する。
FIG. 6 is a sequence diagram showing a series of operations of each unit of the data communication apparatus according to the present embodiment. Here, a case where data is transmitted from the
ST1135の判定において、メモリ領域をデュアルポートメモリ103内に確保できないと判定された場合、割込み/メモリ管理装置102は、ST1110のデータ送信要求に対する応答を保留して、このデータ送信要求に含まれるデータサイズ等の情報を内部メモリに一時保存すると共に、タイマ301にタイマ開始要求を送信する(ST3010)。なお、このタイマ開始要求には、計時開始の指示およびタイマ満了時間情報の双方が含まれている。タイマ301は、指示されたタイマ満了時間を計時し、この時間経過後、タイマ満了を割込み/メモリ管理装置102に通知する。
If it is determined in ST1135 that the memory area cannot be secured in the
タイマ301は、タイマ満了までにCPU111から要求されているデータサイズと同等のメモリ領域を確保できなかった場合、タイマ満了通知を割込み/メモリ管理装置102に送信する(ST3020)。タイマ満了通知を受信した割込み/メモリ管理装置102は、送信側のCPU111に対し、データ送信拒否応答を送信する(ST3030)。
If the
図7は、タイマが満了するまでにメモリ領域を確保できた場合、すなわち、タイマ満了までに割込み/メモリ管理装置102が受信側CPU121からデータ受信完了通知を受信した場合の一連の処理を示すシーケンス図である。なお、ST1110〜ST3010の処理は、既に説明した通りである。
FIG. 7 is a sequence showing a series of processes when the memory area can be secured before the timer expires, that is, when the interrupt /
CPU121からデータ受信完了通知を受信した場合(ST3100)、割込み/メモリ管理装置102は、メモリ使用状況更新要求を送信し(ST3110)、これに対するメモリ使用状況更新応答を受信(ST3120)することによって、メモリ使用状況の更新が完了したことを認識し、この時点でメモリ領域が確保可能かを再度判定する(ST3130)。メモリ領域が確保可能な場合には、割込み/メモリ管理装置102は、タイマ301に対しタイマ停止要求を送信し(ST3140)、タイマを停止させる。
When the data reception completion notification is received from the CPU 121 (ST3100), the interrupt /
その後、割込み/メモリ管理装置102は、実施の形態1で既に示したように、記憶装置101に対しメモリ使用状況更新要求を行ない(ST1140)、このメモリ領域の属性を書き込み使用中に更新する。また、メモリ使用状況更新応答が行われ次第(ST1150)、割込み/メモリ管理装置102は、データ送信応答を送信する(ST1160)。このデータ送信応答を受信した送信側CPU111は、データの書き込みを開始する(ST1170)。そして、送信側のCPU111は、データの書き込みが終了次第、割込み/メモリ管理装置102に対しデータ送信完了通知を送信する(ST1180)。その後の手順についても、実施の形態1と同様である。
Thereafter, as already described in the first embodiment, the interrupt /
なお、ST3130において、再度、メモリ領域が確保可能でなかった場合には、ST3100のように、CPU121からデータ受信完了通知を再度受信するまで待ち処理を行い、その後、ST3110〜ST3130の処理を繰り返す。
In ST3130, if the memory area cannot be secured again, as in ST3100, a waiting process is performed until a data reception completion notification is received again from
このように、本実施の形態によれば、送信側のCPUが要求した書き込みデータサイズと同等のメモリ領域を確保することができない場合、この送信側CPUが長時間に渡ってデータ送信を待たされることを防ぐことができる。 As described above, according to the present embodiment, when a memory area equivalent to the write data size requested by the transmission-side CPU cannot be secured, the transmission-side CPU waits for data transmission for a long time. Can be prevented.
なお、上記のタイマ満了時間は、送信側のCPU111が、送信データに応じた適切な時間を設定するようにしても良い。
Note that the above-described timer expiration time may be set by the transmission-
また、割込み/メモリ管理装置102は、ST3030においてデータ送信拒否応答を送信する際に、その時点でのデュアルポートメモリ103の使用可能なメモリ領域のサイズを通知するようにしても良い。
Further, when transmitting the data transmission rejection response in ST3030, the interrupt /
本発明に係るデータ通信装置は、上記の実施の形態1〜3に限定されず、種々変更して実施することが可能である。 The data communication apparatus according to the present invention is not limited to the first to third embodiments, and can be implemented with various modifications.
本発明に係るデータ通信装置は、移動体通信システムにおける通信端末装置および基地局装置に搭載することも可能であり、これにより上記と同様の作用効果を有する通信端末装置および基地局装置を提供することができる。 The data communication apparatus according to the present invention can be mounted on a communication terminal apparatus and a base station apparatus in a mobile communication system, thereby providing a communication terminal apparatus and a base station apparatus having the same effects as described above. be able to.
なお、ここでは、2つのCPU間でデータが送受信される場合を例にとって説明したが、CPUの数は2つに限定されず、本発明に係るデータ通信装置は、複数のCPU間でデータを送受信する場合にも適用することができる。また、データ送受信の相手は、CPUに限定されず、他の回路であっても良い。 Here, the case where data is transmitted and received between two CPUs has been described as an example. However, the number of CPUs is not limited to two, and the data communication apparatus according to the present invention transmits data between a plurality of CPUs. The present invention can also be applied to transmission / reception. Further, the partner of data transmission / reception is not limited to the CPU, but may be another circuit.
また、ここでは、本発明をハードウェアで構成する場合を例にとって説明したが、本発明はソフトウェアで実現することも可能である。 Further, here, a case has been described as an example where the present invention is configured with hardware, but the present invention can also be implemented with software.
本発明に係るデータ通信装置およびデータ通信方法は、デュアルポートメモリを使用して、複数のCPU間でデータを送受信するシステム等の用途に適用できる。 The data communication apparatus and the data communication method according to the present invention can be applied to uses such as a system for transmitting and receiving data between a plurality of CPUs using a dual port memory.
101 記憶装置
102 割込み/メモリ管理装置
103 デュアルポートメモリ
111、121 CPU
301 タイマ
301 timer
Claims (7)
前記複数のCPU間でデータが送受信される際に、このデータの一時保存および中継を行うデュアルポートメモリと、
前記複数のCPUの外部に設置され、前記送受信されるデータのサイズと前記デュアルポートメモリの使用状況とに基づいて、前記デュアルポートメモリにおいてデータが保存される領域のメモリアドレスと、この領域に対し各CPUがデータの書き込み若しくは読み出しを行うタイミングと、を管理する管理手段と、
を具備することを特徴とするデータ通信装置。 Multiple CPUs;
A dual port memory that temporarily stores and relays data when data is transmitted and received between the plurality of CPUs;
Based on the size of the data to be transmitted / received and the usage status of the dual port memory installed outside the plurality of CPUs, the memory address of the area where data is stored in the dual port memory, and the area Management means for managing the timing at which each CPU writes or reads data;
A data communication apparatus comprising:
前記複数のCPU間のデータ送受信に使用されるデュアルポートメモリと、
前記デュアルポートメモリの使用状況を保持する記憶装置と、
前記記憶装置から前記デュアルポートメモリの使用状況を読み込み、前記複数のCPU間で送受信されるデータのサイズと前記デュアルポートメモリの使用状況とに基づいて、各CPUに対し、前記デュアルポートメモリにおいて前記データの書き込み可能なメモリ領域のメモリアドレスと前記データの送受信を開始させるための割込み信号とを発生させる管理装置と、
を具備することを特徴とするデータ通信装置。 A plurality of CPUs that transmit and receive data to and from each other;
A dual port memory used for data transmission / reception between the plurality of CPUs;
A storage device for holding the usage status of the dual port memory;
The usage status of the dual port memory is read from the storage device, and based on the size of data transmitted / received between the plurality of CPUs and the usage status of the dual port memory, the CPU in the dual port memory A management device for generating a memory address of a writable memory area and an interrupt signal for starting transmission and reception of the data;
A data communication apparatus comprising:
データ送信時は、前記記憶装置から前記デュアルポートメモリの使用状況を読み込み、前記データのサイズと前記デュアルポートメモリの使用状況とに基づいて、前記デュアルポートメモリにおける使用可能なメモリ領域を算出し、算出されたメモリ領域に対応するメモリアドレスを発生させ、このメモリアドレスを送信側のCPUに割込みによって通知すると共に前記算出されたメモリ領域の属性を書き込み中に更新する一方、
データ受信時は、前記送信側のCPUによって書き込みが完了したメモリ領域のメモリアドレスを受信側のCPUに割込みによって通知すると共に前記書き込みが完了したメモリ領域の属性を読み込み中に更新する、
ことを特徴とする請求項2記載のデータ通信装置。 The management device
At the time of data transmission, the usage status of the dual port memory is read from the storage device, and based on the size of the data and the usage status of the dual port memory, a usable memory area in the dual port memory is calculated, While generating a memory address corresponding to the calculated memory area, and notifying this memory address to the CPU on the transmission side by an interrupt and updating the attribute of the calculated memory area while writing,
During data reception, the memory address of the memory area that has been written by the sending CPU is notified to the receiving CPU by an interrupt, and the attribute of the memory area that has been written is updated during reading.
The data communication apparatus according to claim 2.
前記データの書き込み可能なメモリ領域を確保できない場合、送信側のCPUからのデータ書き込み要求を保留し、受信側のCPUがデータ受信を完了した後に、前記メモリ領域を確保可能か否か再度判断し、
確保可能な場合、確保されたメモリ領域のメモリアドレスを前記送信側のCPUに割込みによって通知し、
確保不可能な場合、前記送信側のCPUからのデータ書き込み要求を再度保留する、
ことを特徴とする請求項2または請求項3記載のデータ通信装置。 The management device
If the memory area where the data can be written cannot be secured, the data write request from the sending CPU is suspended, and after the receiving CPU completes the data reception, it is determined again whether the memory area can be secured. ,
If it can be secured, the memory address of the secured memory area is notified to the CPU on the transmission side by an interrupt,
If it cannot be secured, the data write request from the CPU on the transmitting side is again suspended.
4. The data communication apparatus according to claim 2, wherein the data communication apparatus is a data communication apparatus.
前記データの書き込み可能なメモリ領域を確保できないと判定された時点で一定時間の計時を開始するタイマを具備し、
前記一定時間が経過するまでに、前記データの書き込み可能なメモリ領域を確保できない場合、この旨を送信側のCPUに通知する、
ことを特徴とする請求項1または請求項2記載のデータ通信装置。 The management device
A timer that starts counting a predetermined time when it is determined that a memory area in which the data can be written cannot be secured;
If a memory area where the data can be written cannot be secured before the predetermined time elapses, this fact is notified to the CPU on the transmission side.
3. The data communication apparatus according to claim 1, wherein the data communication apparatus is a data communication apparatus.
前記デュアルポートメモリにおいてデータが保存される領域のメモリアドレスと、この領域に対し各CPUがデータの書き込み若しくは読み出しを行うタイミングとを、前記複数のCPUの外部に設置された管理装置によって、前記送受信されるデータのサイズと前記デュアルポートメモリの使用状況とに基づいて管理する、
ことを特徴とするデータ通信方法。 A data communication method used in a data communication device comprising a plurality of CPUs and a dual port memory that temporarily stores and relays data when data is transmitted and received between the plurality of CPUs,
The transmission / reception of a memory address of an area where data is stored in the dual-port memory and a timing at which each CPU writes or reads data in this area is performed by the management device installed outside the plurality of CPUs. Managing based on the size of the data to be processed and the usage status of the dual port memory,
A data communication method characterized by the above.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004099405A JP2005284841A (en) | 2004-03-30 | 2004-03-30 | Data communication device and data communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004099405A JP2005284841A (en) | 2004-03-30 | 2004-03-30 | Data communication device and data communication method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005284841A true JP2005284841A (en) | 2005-10-13 |
Family
ID=35183137
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004099405A Pending JP2005284841A (en) | 2004-03-30 | 2004-03-30 | Data communication device and data communication method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005284841A (en) |
-
2004
- 2004-03-30 JP JP2004099405A patent/JP2005284841A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8554968B1 (en) | Interrupt technique for a nonvolatile memory controller | |
US8156376B2 (en) | Method, device and system for storing data in cache in case of power failure | |
CN110297722B (en) | Thread task communication method and related product | |
CN113535425A (en) | Data sending method and device, electronic equipment and storage medium | |
JP2005352839A (en) | Data communication device | |
CN108139955A (en) | For providing the system and method for the Wrong control independently of operating system in computing device | |
KR20210013681A (en) | Autonomous job queueing system for hardware accelerators | |
CN110740145A (en) | Message consumption method, device, storage medium and electronic equipment | |
JP2017062711A (en) | Communication method, communication program and information processing device | |
JP2007264697A (en) | Processing system, projector, program and information storage medium | |
JP2005284841A (en) | Data communication device and data communication method | |
JP2005085079A (en) | Data transfer controller | |
CN114064324A (en) | Inter-process communication method, device, equipment and computer readable storage medium | |
JP4947722B2 (en) | Interface control circuit and information processing apparatus | |
JP2010118020A (en) | Request order control system, request order control method, and request order control program | |
JPWO2003014947A1 (en) | HOST DEVICE, ELECTRONIC DEVICE, AND TRANSMISSION SYSTEM CONTROL METHOD | |
JP5334173B2 (en) | Data transfer system and retry control method | |
JP2008152580A (en) | Communication device and communication method | |
US20240098144A1 (en) | Communication apparatus, information processing method, and information processing apparatus | |
JP2011034569A (en) | Projector and firmware update method | |
JP2005301714A (en) | Multi-cpu system, its data transfer method, and its program | |
JP2007034893A (en) | Data processing module and its message transmission preparation method | |
US20130212338A1 (en) | Multicore processor | |
JP2005327015A (en) | Data duplication method and program | |
JP2009194719A (en) | Data communication device and method for determining transmission candidate message |