JP2005216317A - Queue device - Google Patents

Queue device Download PDF

Info

Publication number
JP2005216317A
JP2005216317A JP2005029027A JP2005029027A JP2005216317A JP 2005216317 A JP2005216317 A JP 2005216317A JP 2005029027 A JP2005029027 A JP 2005029027A JP 2005029027 A JP2005029027 A JP 2005029027A JP 2005216317 A JP2005216317 A JP 2005216317A
Authority
JP
Japan
Prior art keywords
data
packet
fifo buffer
buffer
fifo
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.)
Granted
Application number
JP2005029027A
Other languages
Japanese (ja)
Other versions
JP3989493B2 (en
Inventor
Nagatake Shiraki
長武 白木
Yoichi Koyanagi
洋一 小柳
Kenji Horie
健志 堀江
Toshiyuki Shimizu
俊幸 清水
Hiroaki Ishihata
宏明 石畑
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2005029027A priority Critical patent/JP3989493B2/en
Publication of JP2005216317A publication Critical patent/JP2005216317A/en
Application granted granted Critical
Publication of JP3989493B2 publication Critical patent/JP3989493B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a queue device in which a data writing device can get ready to output data to a queue without waiting until the queue makes an "available space" even when the queue comes full. <P>SOLUTION: The queue device includes a FIFO buffer 41 into which a plurality of processes write packets, a memory means 42, a data saving means 43 and a data restoring means 44. The data saving means 43 takes incomplete packet data written during a process A to save them into the memory means 42 out of the FIFO buffer 41, upon switching of an execution right from a process A to another process B while the process A writes a packet into the FIFO buffer 41. The data restoring means 44, upon transferring of the execution right to the process A again, transfers the packet data saved in the memory means 42 to the FIFO buffer before the process A starts executing. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、データの生成側と該データを利用する側との間でのデータの授受に用いられるキュー装置に関する。   The present invention relates to a queue device used for data exchange between a data generation side and a data utilization side.

キューは、データを生成する側(データ生成装置)と該データを入力して利用する側(データ処理装置)との間での処理タイミングの差異を吸収するために利用される。該データには、例えば、メッセージ、パケット、ジョブ、トランザクションなどがある。キューは、一般にFIFO(First In First Out) メモリ(FIFOバッファ)などで実現され、データ生成装置は、生成したデータをキューに入れ、データ処理装置はそのデータをキューから取り出して所定の処理を行う。   The queue is used to absorb a difference in processing timing between a data generation side (data generation device) and a side that inputs and uses the data (data processing device). Examples of the data include a message, a packet, a job, and a transaction. The queue is generally realized by a FIFO (First In First Out) memory (FIFO buffer) or the like. The data generation device puts the generated data into the queue, and the data processing device takes out the data from the queue and performs predetermined processing. .

キューは、複数のデータを格納可能な容量を持っており、このため、データ処理装置は、キューから1つづつデータを取り出しながら、自己の処理能力に応じて逐次データ処理することができる。また、キューを複数のデータ生成装置で共有することにより、1つのデータ処理装置が該複数のデータ生成装置からのデータ処理要求を受け付けることが可能となる。さらに、各データ生成装置は、キューに空きがあるときには、いつでも生成したデータを直ちにキューに入れることによって、すぐに次の処理に移れるので効率的な動作が可能になる。   The queue has a capacity capable of storing a plurality of data. Therefore, the data processing apparatus can sequentially process data according to its own processing capability while extracting data one by one from the queue. Further, by sharing the queue among a plurality of data generation apparatuses, one data processing apparatus can accept data processing requests from the plurality of data generation apparatuses. Furthermore, each data generation device can move to the next process immediately by immediately putting the generated data into the queue whenever there is a vacancy in the queue, so that an efficient operation is possible.

しかしながら、従来のキュー装置は以下のような問題点をかかえていた。
(1)キューのデータ容量には限界があるため、キューが満杯となり空き容量が無くなった場合には、データをキューに投入する側、すなわちデータ生成装置は、該キューに空き領域が生じるまでそのデータの投入を待たねばならない。このため、データ生成装置側にとっては、キューに空きが生じるまで待機していなければならず、その間の待ち時間が処理効率の低下をもたらす。
However, the conventional queue device has the following problems.
(1) Since there is a limit on the data capacity of the queue, when the queue is full and there is no free capacity, the side that inputs data into the queue, that is, the data generation device, until the empty area is generated in the queue. You have to wait for data input. For this reason, the data generation device must wait until the queue becomes empty, and the waiting time during that time causes a reduction in processing efficiency.

(2)また、データ処理装置として、ある一連のデータ列をパケットとして処理するような装置がキューの出力側に接続されている場合、キューにパケットの全データが投入されるまでの間、該データ処理装置はそのパケット処理を終了することができない。すなわち、データ生成装置がパケットの全データをキューに投入するまで、データ処理装置は処理を中断しなければならない。したがって、この場合には、キューにパケットの全データが投入されてからパケットの取り出しを開始しないとパケット処理装置に待ち時間が生じ処理効率が低下することになる。   (2) When a device that processes a series of data strings as a packet is connected to the output side of the queue as a data processing device, until all the data of the packet is input to the queue, The data processing device cannot end the packet processing. That is, the data processing apparatus must interrupt the process until the data generation apparatus puts all the data of the packet into the queue. Therefore, in this case, if the packet extraction is not started after all the packet data has been put into the queue, a waiting time is generated in the packet processing device and the processing efficiency is lowered.

(3)また、パケット処理においては、キューにパケットデータを投入中にそのデータを取り除く必要が生じる場合があるが、パケット処理装置側が既にそのデータをキューから取り出してパケット処理を開始しているときには、その出力済のデータを取り戻すのは不可能であった。すなわち、この場合、そのパケットデータは廃棄されることになる。このような場合は、例えばデータ生成装置が複数のプログラム(プロセス)を並列して実行するプロセッサから成り、各プロセスがそれぞれ個別にパケットを生成して共有キューにその書き込みを行うシステムにおいて発生する。すなわち、あるプロセスがキューにパケットデータを書き込んでいる途中で、実行権が他のプロセスに切り換えられ、この新たにスケジューリングされたプロセスがキューに自己の生成したパケットデータを続けて書き込もうとした場合である。   (3) In packet processing, it may be necessary to remove the data while putting the packet data into the queue. When the packet processing apparatus has already taken out the data from the queue and started packet processing, It was impossible to get back the output data. That is, in this case, the packet data is discarded. In such a case, for example, the data generation apparatus includes a processor that executes a plurality of programs (processes) in parallel, and each process generates a packet individually and writes the packet to a shared queue. In other words, while a process is writing packet data to the queue, the execution right is switched to another process, and this newly scheduled process tries to continuously write its own packet data to the queue. is there.

本発明は、キューが満杯になった場合でも、データ生成装置側が該キューに空きが生じるまで待たされることなく、キューへのデータ投入操作を行えるようにすることを目的とする。   An object of the present invention is to make it possible for a data generation apparatus to perform a data input operation to a queue without waiting until a space is generated in the queue even when the queue is full.

上記課題を解決するため、本発明は以下のように構成する。
請求項1に記載の発明は、パケットが格納されるFIFOバッファと、記憶手段と、前記FIFOバッファ内に格納されているパケットデータの個数を計数する計数手段と、前記計数手段の計数値と、パケットデータのパケット数とに基づいて、前記FIFOバッファ内に完結しているパケットが存在するか否かを検出するパケット完結検出手段と、前記パケット完結手段により未完結と判別された前記FIFOバッファ内のデータを、前記記憶手段に退避させるデータ退避手段と、を備えたことを特徴とするキュー装置である。
In order to solve the above problems, the present invention is configured as follows.
The invention according to claim 1 is a FIFO buffer in which packets are stored, a storage means, a counting means for counting the number of packet data stored in the FIFO buffer, a count value of the counting means, Based on the number of packets of packet data, packet completion detection means for detecting whether or not there is a completed packet in the FIFO buffer; and in the FIFO buffer determined to be incomplete by the packet completion means And a data saving means for saving the data in the storage means.

請求項2に記載の発明は、請求項1記載のキュー装置において、前記パケット完結検出手段は、前記計数手段の計数値と、前記FIFOに格納されたパケットデータのパケット内に格納されるパケットサイズ情報とに基づいて、前記FIFOバッファ内に完結したデータが存在するか否かを判別することを特徴とするものである。   According to a second aspect of the present invention, in the queue device according to the first aspect, the packet completion detection means includes a count value of the counting means and a packet size stored in a packet of packet data stored in the FIFO. Based on the information, it is determined whether or not complete data exists in the FIFO buffer.

請求項3に記載の発明は、請求項1又は2記載のキュー装置において、前記FIFOバッファは、複数のプロセスによってパケットデータが書き込まれるものであり、前記パケット完結手段は、プロセスAが前記FIFOバッファにパケットを書き込んでいる途中で別のプロセスBに実行権が切り替えられた際、前記FIFOバッファに書込未完結のデータが存在するか否かを判別し、前記データ退避手段は、前記データパケット完結手段により前記FIFOバッファに書込未完結のデータが存在すると判別された場合に、前記FIFOバッファ内の書込未完結データを前記記憶装置に退避させることを特徴とするものである。   According to a third aspect of the present invention, in the queue device according to the first or second aspect, the FIFO buffer is one in which packet data is written by a plurality of processes, and the packet completion unit is configured such that the process A is the FIFO buffer. When the execution right is switched to another process B in the middle of writing a packet to the data buffer, it is determined whether or not incomplete data exists in the FIFO buffer, and the data saving means When it is determined by the completion means that there is incompletely written data in the FIFO buffer, the incompletely written data in the FIFO buffer is saved in the storage device.

請求項4に記載の発明は、請求項3記載のキュー装置において、前記プロセスAに再び実行権が移行した際、前記プロセスAの実行開始前に前記記憶手段に退避させておいたパケットデータを前記FIFOバッファに転送させるデータリストア手段を更に備えることを特徴とするものである。   According to a fourth aspect of the present invention, in the queue device according to the third aspect, when the execution right is transferred again to the process A, the packet data saved in the storage means before the execution of the process A is stored. The data storage device further comprises a data restoration means for transferring to the FIFO buffer.

請求項5に記載の発明は、複数のプロセスによってパケットが書き込まれるFIFOバッファと、記憶手段と、プロセスAが前記FIFOバッファにパケットを書き込んでいる途中で別のプロセスBに実行権が切り換えられた際、前記プロセスAが書き込んだ未完結のパケットデータを前記FIFOバッファから取り出し前記記憶手段に退避させるデータ退避手段と、再び前記プロセスAに実行権が移行した際、該プロセスAの実行開始前に前記記憶手段に退避させておいたパケットデータを前記FIFOバッファに転送させるデータリストア手段と、を備えたことを特徴とするものである。   In the invention according to claim 5, the execution right is switched to another process B while the process A is writing the packet to the FIFO buffer, the storage means, and the FIFO buffer into which the packet is written by a plurality of processes. At this time, when the execution right of the process A is transferred again to the data saving means for taking out incomplete packet data written by the process A from the FIFO buffer and saving it to the storage means, before the execution of the process A is started. Data restoration means for transferring the packet data saved in the storage means to the FIFO buffer.

以下に、本発明又はそれと関連する発明(以下、関連発明と言う)の原理について説明する。
図1は、第1の関連発明の原理を説明する図である。
The principle of the present invention or related invention (hereinafter referred to as related invention) will be described below.
FIG. 1 is a diagram for explaining the principle of the first related invention.

この発明は、FIFOバッファ1と、該FIFOバッファに書き込まれるデータが退避される退避バッファ2と、該退避バッファにデータが退避されているか否かを示すフラグ3を備える。また、さらに第1の検出手段4とデータ退避手段5を備える。   The present invention includes a FIFO buffer 1, a save buffer 2 in which data written to the FIFO buffer is saved, and a flag 3 indicating whether or not data is saved in the save buffer. Further, a first detection unit 4 and a data saving unit 5 are provided.

第1の検出手段4は、上記FIFOバッファ1の残り容量が予め定められた第1の閾値より少なくなったことを検出する。
データ退避手段5は、該第1の検出手段4により上記FIFOバッファ1の残り容量が上記第1の閾値よりも少なくなったことが検出されると、その後のFIFOバッファ1に対する書き込みデータを前記退避バッファ2に退避させると共に前記フラグ3をセットさせ、該フラグがセットされている状態の間、上記FIFOバッファ1に対する書き込みデータを前記退避バッファの方に書き込む。
The first detection means 4 detects that the remaining capacity of the FIFO buffer 1 has become smaller than a predetermined first threshold value.
When the first detection unit 4 detects that the remaining capacity of the FIFO buffer 1 is less than the first threshold value, the data saving unit 5 saves the subsequent write data to the FIFO buffer 1. While saving to the buffer 2, the flag 3 is set, and while the flag is set, write data to the FIFO buffer 1 is written to the save buffer.

第2の関連発明は、上述した第1の関連発明が有する各構成要素に加え、さらに以下の手段を有する。
第2の検出手段6は、前記フラグ3がセットされている状態のときに、前記FIFOバッファ1の残り容量が予め定められた第2の閾値よりも多くなったことを検出する。
The second related invention has the following means in addition to the components of the first related invention described above.
The second detection means 6 detects that the remaining capacity of the FIFO buffer 1 is greater than a predetermined second threshold value when the flag 3 is set.

データリストア手段7は、該第2の検出手段6よりFIFOバッファ1の残り容量が上記第2の閾値よりも多くなったことが検出された際、前記退避バッファ2に退避されていたデータを上記FIFOバッファ1に転送し、前記退避バッファ2に退避されているデータが無くなったときに前記フラグ3をリセットする。   When the second restoring means 6 detects that the remaining capacity of the FIFO buffer 1 is larger than the second threshold value, the data restoring means 7 stores the data saved in the saving buffer 2 as described above. When the data transferred to the FIFO buffer 1 and saved in the save buffer 2 is lost, the flag 3 is reset.

第3の関連発明は、上記第1の関連発明が有する各構成要素に加え、下記の第3の検出手段8を備える。
第3の検出手段8は、前記退避バッファ2の残り容量が予め定められた第3の閾値よりも少なくなったことを検出し、該検出時に例えば、割り込み信号などの特定の信号を発生する。
The third related invention includes the following third detection means 8 in addition to the constituent elements of the first related invention.
The third detection means 8 detects that the remaining capacity of the save buffer 2 has become smaller than a predetermined third threshold value, and generates a specific signal such as an interrupt signal at the time of the detection.

図2は、第4乃至第7の関連発明の原理を説明する図である。
第4の関連発明は、パケットが格納されるFIFOバッファ11と、該FIFOバッファ11に格納されるパケットの個数を計数する計数手段12とを備える。
FIG. 2 is a diagram for explaining the principle of the fourth to seventh related inventions.
The fourth related invention includes a FIFO buffer 11 in which packets are stored, and a counting means 12 that counts the number of packets stored in the FIFO buffer 11.

第5の関連発明は、上記第4の関連発明が有する各構成要素に加え、前記FIFOバッファ11に書き込まれるパケットのデータが退避される退避バッファ13と、該退避バッファ13にパケットデータが退避されているか否かを示すフラグ14と、前記FIFOバッファ11の残り容量が予め定められた第1の閾値よりも少なくなったことを検出する第1の検出手段15と、該第1の検出手段15により前記FIFOバッファ11の残り容量が前記第1の閾値よりも少なくなったことが検出されると、その後のFIFOバッファ11に対する書き込みデータを前記退避バッファ13に退避させると共に、前記フラグ14をセットさせ、該フラグがセットされている状態の間、上記FIFOバッファ11に対する書き込みパケットデータを前記退避バッファの方に書き込むパケットデータ退避手段16と、を更に備える。   In the fifth related invention, in addition to the constituent elements of the fourth related invention, a save buffer 13 for saving packet data to be written to the FIFO buffer 11, and packet data is saved in the save buffer 13. A first flag indicating whether or not the remaining capacity of the FIFO buffer 11 is less than a predetermined first threshold, and the first detector 15 When it is detected that the remaining capacity of the FIFO buffer 11 is smaller than the first threshold value, the subsequent write data to the FIFO buffer 11 is saved in the save buffer 13 and the flag 14 is set. While the flag is set, write packet data to the FIFO buffer 11 Further comprising a packet data saving unit 16 for writing toward the saving buffer, a.

前記FIFOバッファ11に格納される各パケットデータには、例えば、該パケットデータが当該パケットの最後のデータであるか否かを示す情報が設定されたビットが付加されるようにしてもよい。   For example, a bit in which information indicating whether or not the packet data is the last data of the packet may be added to each packet data stored in the FIFO buffer 11.

第6の関連発明は、上記第5の関連発明が有する各構成要素に加え、前記フラグ14がセットされている状態のときに、前記計数手段12の計数値が予め定められた第2の閾値よりも少なくなったことを検出する第2の検出手段17と、該第2の検出手段17により前記FIFOバッファ11に格納されているパケット数が上記第2の閾値よりも少なくなったことが検出された際、前記退避バッファ13に退避されていたデータを上記FIFOバッファ11に転送し、前記退避バッファ13に退避されているデータが無くなったときに前記フラグ14をリセットするデータリストア手段18と、をさらに備える。   According to a sixth related invention, in addition to the constituent elements of the fifth related invention, the count value of the counting means 12 is a predetermined second threshold value when the flag 14 is set. A second detecting means 17 for detecting that the number of packets is less than the second threshold, and detecting that the number of packets stored in the FIFO buffer 11 is less than the second threshold by the second detecting means 17. A data restoring means 18 for transferring the data saved in the save buffer 13 to the FIFO buffer 11 and resetting the flag 14 when there is no data saved in the save buffer 13; Is further provided.

第7の関連発明は、上記第4の関連発明が有する各構成要素に加え、前記計数手段12の計数値を参照して、前記FIFOバッファ11内に完結しているパケットデータが存在するか否かを検出するパケット完結検出手段19を、さらに備える。   In the seventh related invention, in addition to the constituent elements of the fourth related invention, referring to the count value of the counting means 12, whether or not there is complete packet data in the FIFO buffer 11 Further, a packet completion detecting means 19 for detecting the above is further provided.

図3は、第8乃至第10の関連発明の原理を説明する図である。
第8の関連発明は、請求項1に記載の発明とも一部共通するものであり、パケットサイズを示す情報が設定されているデータを先頭に有するパケットが格納されるFIFOバッファ21と、前記FIFOバッファ21内に格納されているパケットデータの個数を計数する計数手段22と、該計数手段22の計数値と、前記FIFOバッファ21に格納されているパケットの上記パケットサイズ情報が設定されているデータとを入力して、前記FIFOバッファ21内に完結しているパケットが存在するか否かを検出するパケット完結検出手段23と、を備える。
FIG. 3 is a diagram for explaining the principle of the eighth to tenth related inventions.
The eighth related invention is partly in common with the invention described in claim 1, and includes a FIFO buffer 21 in which a packet having data set with information indicating a packet size is stored, and the FIFO Counting means 22 for counting the number of packet data stored in the buffer 21; data in which the count value of the counting means 22 and the packet size information of the packet stored in the FIFO buffer 21 are set And packet completion detecting means 23 for detecting whether or not there is a completed packet in the FIFO buffer 21.

第9の関連発明は、上記第8の関連発明が有する各構成要素に加え、前記FIFOバッファ21に書き込まれるパケットのデータが退避される退避バッファ23と、該退避バッファ23にパケットデータが退避されているか否かを示すフラグ24と、前記FIFOバッファ21の残り容量が予め定められた第1の閾値よりも少なくなったことを検出する第1の検出手段25と、該第1の検出手段25により前記FIFOバッファ21の残り容量が前記第1の閾値よりも少なくなったことが検出されると、その後のFIFOバッファ21に対する書き込みデータを前記退避バッファ23に退避させると共に、前記フラグ24をセットさせ、該フラグ24がセットされている状態の間、上記FIFOバッファ21に対する書き込みデータを前記退避バッファの方に書き込むパケットデータ退避手段26と、をさらに備える。   In the ninth related invention, in addition to the constituent elements of the eighth related invention, a save buffer 23 for saving packet data to be written to the FIFO buffer 21, and packet data is saved in the save buffer 23. A first flag 24 indicating whether or not the remaining capacity of the FIFO buffer 21 is less than a predetermined first threshold, and the first detector 25. When it is detected that the remaining capacity of the FIFO buffer 21 is smaller than the first threshold value, the subsequent write data to the FIFO buffer 21 is saved in the save buffer 23 and the flag 24 is set. While the flag 24 is set, the write data to the FIFO buffer 21 is deleted. Further comprising a packet data saving unit 26 for writing towards the buffer, the.

第10の関連発明は、上記第9の関連発明が有する各構成要素に加え、前記フラグ24がセットされている状態のときに、前記計数手段22の計数値が予め定められた第2の閾値よりも少なくなったことを検出する第2の検出手段27と、該第2の検出手段27によりFIFOバッファ21の残り容量が上記第2の閾値よりも少なくなったことが検出された際、前記退避バッファ23に退避されていたデータを上記FIFOバッファ21に転送し、前記退避バッファ23に退避されているデータが無くなったときに前記フラグ24をリセットするデータリストア手段28と、をさらに備える。   In a tenth related invention, in addition to the constituent elements of the ninth related invention, a second threshold value in which the count value of the counting means 22 is predetermined when the flag 24 is set. The second detection means 27 for detecting that the capacity is less than the second threshold, and when the second detection means 27 detects that the remaining capacity of the FIFO buffer 21 is less than the second threshold value, Data restoration means 28 is further provided for transferring the data saved in the save buffer 23 to the FIFO buffer 21 and resetting the flag 24 when there is no more data saved in the save buffer 23.

次に、図4は請求項5に記載の発明を説明する原理図である。
この発明は、複数のプロセスによってパケットが書き込まれるFIFOバッファ41と、記憶手段42と、プロセスAが上記FIFOバッファ41にパケットを書き込んでいる途中で別のプロセスBに実行権が切り換えられた際、上記プロセスAが書き込んだ未完結のパケットデータを上記FIFOバッファ41から取り出し上記記憶手段42に退避させるデータ退避手段43と、再び前記プロセスAに実行権が移行した際、該プロセスAの実行開始前に前記記憶手段42に退避させておいたパケットデータを前記FIFOバッファに転送させるデータリストア手段44と、を備える。
Next, FIG. 4 is a principle diagram for explaining the invention according to claim 5.
In the present invention, when the execution right is switched to another process B while the process A is writing a packet to the FIFO buffer 41, the FIFO buffer 41 into which packets are written by a plurality of processes, the storage means 42, and the process A. The data saving means 43 for taking out incomplete packet data written by the process A from the FIFO buffer 41 and saving it to the storage means 42; and when the execution right is transferred to the process A again, before the execution of the process A is started. And a data restore means 44 for transferring the packet data saved in the storage means 42 to the FIFO buffer.

次に、上述した発明の作用について説明する。
第1の関連発明においては、第1の検出手段4がFIFOバッファ1の残り容量が予め定められた第1の閾値よりも少なくなったことを検出する。データ退避手段5は、該検出後にFIFOバッファ1に対するデータの書き込み要求があると、該データを退避バッファ2の方に書き込み、フラグ3をセットする。そして、該フラグ3がセットされている状態の間、データ退避手段5はFIFOバッファ1に対する書き込みデータを退避バッファ2の方に書き込む。
Next, the operation of the above-described invention will be described.
In the first related invention, the first detecting means 4 detects that the remaining capacity of the FIFO buffer 1 has become smaller than a predetermined first threshold value. When there is a data write request to the FIFO buffer 1 after the detection, the data saving unit 5 writes the data to the saving buffer 2 and sets the flag 3. While the flag 3 is set, the data saving unit 5 writes the write data for the FIFO buffer 1 into the saving buffer 2.

これにより、FIFOバッファ1に対してデータを書き込むデータ生成装置は、FIFOバッファ1が満杯になっても、FIFOバッファ1に空きが生ずるまで待たされることなくデータの出力が可能になり、処理効率が向上する。   As a result, the data generation device that writes data to the FIFO buffer 1 can output data without waiting until the FIFO buffer 1 becomes full even when the FIFO buffer 1 is full, and the processing efficiency is improved. improves.

また、第2の関連発明においては、第2の検出手段6がフラグ3がセットされている状態においてFIFOバッファ1の残り容量が予め定められた所定の閾値よりも多くなったことを検出する。データリストア手段7は、この検出を受けて、退避バッファ2に退避されていたデータをFIFOバッファ1に転送する。そして、退避バッファ2に退避データが無くなるとフラグ3をリセットする。   In the second related invention, the second detection means 6 detects that the remaining capacity of the FIFO buffer 1 exceeds a predetermined threshold value in a state where the flag 3 is set. In response to this detection, the data restore means 7 transfers the data saved in the save buffer 2 to the FIFO buffer 1. Then, the flag 3 is reset when there is no save data in the save buffer 2.

これにより、退避バッファ2に退避されていたデータは正しい順序でFIFOバッファ1に書き込まれる。そして、フラグ3がリセットされると、FIFO1に空きがある間再びFIFOバッファ1の方にデータが書き込まれる。   As a result, the data saved in the save buffer 2 is written into the FIFO buffer 1 in the correct order. When the flag 3 is reset, data is written again in the FIFO buffer 1 while the FIFO 1 is empty.

第3の関連発明においては、第3の検出手段8が退避バッファの残り容量が予め定められた第3の閾値よりも少なくなった状態を検出し、その旨を示す特定の信号を外部に出力する。   In the third related invention, the third detecting means 8 detects a state where the remaining capacity of the save buffer is smaller than a predetermined third threshold value, and outputs a specific signal indicating the fact to the outside. To do.

これにより、例えば、プロセッサ等に割り込みをかけ、退避バッファ2のサイズを拡張することが可能になる。
第4の関連発明においては、計数手段12によりFIFOバッファ11に格納されるパケットの個数が計数される、したがって、この計数手段12の計数値を参照することにより、FIFOバッファ11にパケットが格納されているか否かを判断することが可能になり、パケット処理装置20は、FIFOバッファ11内においてパケットが完結してからパケットのデータを連続して取り出すことが可能になり、パケット処理を効率良く行うことができる。
Thereby, for example, it becomes possible to interrupt the processor or the like and expand the size of the save buffer 2.
In the fourth related invention, the number of packets stored in the FIFO buffer 11 is counted by the counting means 12. Therefore, the packets are stored in the FIFO buffer 11 by referring to the count value of the counting means 12. The packet processing apparatus 20 can continuously extract the packet data after the packet is completed in the FIFO buffer 11, and performs packet processing efficiently. be able to.

第5の関連発明においては、退避バッファ13、フラグ14、第1の検出手段15、及びパケットデータ退避手段16により、上述した請求項2記載の発明と同様な動作が、FIFOバッファ11に対するパケットデータの書き込みに対して行われる。したがって、パケット生成装置10はFIFOバッファ11が満杯になっても、FIFOバッファ11に空きが生ずるまで待たされることなく、パケットデータの出力が可能となり、処理効率が向上する。   In the fifth related invention, the save buffer 13, the flag 14, the first detection means 15, and the packet data save means 16 perform the same operation as that of the above-described invention according to claim 2 to the packet data for the FIFO buffer 11. This is done for writing. Therefore, the packet generation device 10 can output packet data without waiting until the FIFO buffer 11 becomes full even when the FIFO buffer 11 is full, and the processing efficiency is improved.

第6の関連発明においては、第2の検出手段17がフラグ14がセットされている状態のときに計数手段12の計数値すなわちFIFOバッファ11内の格納パケット数が予め定められた第2の閾値よりも少なくなったことを検出する。データリストア手段18は、この検出を受けて退避バッファ13に退避されていたパケットデータをFIFOバッファ11に転送する。そして、退避バッファ13に退避パケットデータが無くなると、フラグ14をリセットする。   In the sixth related invention, when the second detection means 17 is in a state in which the flag 14 is set, the count value of the counting means 12, that is, the number of stored packets in the FIFO buffer 11 is predetermined. Detect less than. In response to this detection, the data restorer 18 transfers the packet data saved in the save buffer 13 to the FIFO buffer 11. Then, when there is no save packet data in the save buffer 13, the flag 14 is reset.

したがって、退避バッファ13に退避されていたパケットが、その一部のデータが退避されていたパケットも含め、正しい順序並びに正しい形式でFIFOバッファ11にリストアされる。   Therefore, the packet saved in the save buffer 13 is restored to the FIFO buffer 11 in the correct order and in the correct format, including the packet in which a part of the data is saved.

第7の関連発明においては、パケット完結検出手段19が計数手段12の計数値を参照して、FIFOバッファ11内に完結しているパケットデータが存在するか否か検出する。したがって、この検出を利用して、未完結のパケットのデータがFIFOバッファ11から出力されてしまう事態を抑止できる。   In the seventh related invention, the packet completion detection means 19 refers to the count value of the counting means 12 and detects whether or not complete packet data exists in the FIFO buffer 11. Therefore, this detection can be used to prevent a situation in which uncompleted packet data is output from the FIFO buffer 11.

なお、FIFOバッファ11からパケットデータと共に出力される特定のビットの値を参照するようにすれば、パケット処理装置はFIFOバッファ11から読み出したデータがパケットの最後のデータであるか否かを容易に検出できる。   If the value of a specific bit output together with the packet data from the FIFO buffer 11 is referred to, the packet processing device can easily determine whether or not the data read from the FIFO buffer 11 is the last data of the packet. It can be detected.

請求項5に記載の発明と一部共通する第8の関連発明においては、計数手段22によりFIFOバッファ21に格納されているパケットデータの個数が計数される。パケット完結検出手段23は、該計数値とFIFOバッファ21の先頭に格納されているパケットのそのサイズ情報が設定されているデータを入力して、両者を比較することによりFIFOバッファ21内に完結しているパケットが存在するか否か検出する。   In an eighth related invention that is partly in common with the invention described in claim 5, the number of packet data stored in the FIFO buffer 21 is counted by the counting means 22. The packet completion detecting means 23 inputs the count value and data in which the size information of the packet stored at the head of the FIFO buffer 21 is set, and compares them to complete the data in the FIFO buffer 21. Detect whether there is a packet that exists.

したがって、このパケット完結手段23の検出情報を利用して、FIFOバッファ21内の未完結のパケットデータがパケット処理装置40に出力されてしまう状態を回避させることができる。   Therefore, it is possible to avoid a state in which uncompleted packet data in the FIFO buffer 21 is output to the packet processing device 40 using the detection information of the packet completion means 23.

第9の関連発明においては、前述した第5の関連発明と同様な動作が、退避バッファ23、第1の検出手段25、及びパケットデータ退避手段26により行われる。
したがって、パケット生成装置30は、FIFOバッファ21に空きが生じていない間でも、生成したパケットを出力できるので、処理効率が向上する。
In the ninth related invention, operations similar to those of the fifth related invention described above are performed by the save buffer 23, the first detection means 25, and the packet data save means 26.
Therefore, the packet generation device 30 can output the generated packet even when there is no empty space in the FIFO buffer 21, so that the processing efficiency is improved.

第10の関連発明においては、前述した第6の関連発明と同様な動作が、第2の検出手段27とデータリストア手段28により行われる。
したがって、退避バッファ23に退避されていたパケットが、その一部のデータが退避されていたパケットも含め、正しい順序並びに正しい形式でFIFOバッファ11にリストアされる。
In the tenth related invention, the same operation as in the sixth related invention is performed by the second detecting means 27 and the data restoring means 28.
Therefore, the packet saved in the save buffer 23 is restored to the FIFO buffer 11 in the correct order and in the correct format, including the packet in which a part of the data is saved.

請求項5に記載の発明においては、プロセスAがFIFOバッファ41にパケットを書き込んでいる途中で別のプロセスBに実行権が切り換えられた際、データ退避手段43が上記プロセスAが書き込んだ未完結のパケットデータを上記FIFOバッファ41から取り出し記憶手段42に退避させる。そして、再び前記プロセスAに実行権が移行した際、データリストア手段44が該プロセスAの実行開始前に前記記憶手段に退避させておいたパケットデータを前記FIFOバッファ41に転送させリストアさせる。   In the fifth aspect of the present invention, when the execution right is switched to another process B while the process A is writing a packet to the FIFO buffer 41, the data saving means 43 is incomplete that the process A has written. Packet data is taken out from the FIFO buffer 41 and saved in the storage means 42. When the execution right is transferred again to the process A, the data restoration unit 44 transfers the packet data saved in the storage unit before the execution of the process A to the FIFO buffer 41 to be restored.

したがって、プロセスAがFIFOバッファ41にパケットのデータを書き込んでいる途中であっても、新たに起動されたプロセスBはFIFOバッファ41にパケットを書き込むことが可能になる。そして、再びプロセスBが再起動された際には、プロセスBはFIFOバッファ41に残りのパケットデータを書き込むことにより、FIFOバッファ41に正しくパケットを書き込むことが可能になる。   Therefore, even when the process A is in the middle of writing the packet data to the FIFO buffer 41, the newly activated process B can write the packet to the FIFO buffer 41. When the process B is restarted again, the process B writes the remaining packet data in the FIFO buffer 41, so that the packet can be correctly written in the FIFO buffer 41.

請求項1乃至4に記載の発明によれば、FIFOバッファに格納されているパケットデータの個数が計数手段により計数され、パケット完結検出手段は、上記計数値とFIFOバッファに格納されているパケットデータのパケット数とに基づいて、FIFOバッファ内に完結しているパケットが存在するか否か検出し、未完結と判別されたFIFOバッファ内のデータをデータ退避手段が記憶手段に退避させる。したがって、パケット完結検出手段の検出情報を利用して、FIFOバッファ内の未完結のパケットデータがパケット処理装置に出力されてしまう状態を回避させることができる。   According to the first to fourth aspects of the present invention, the number of packet data stored in the FIFO buffer is counted by the counting means, and the packet completion detecting means is configured to receive the count value and the packet data stored in the FIFO buffer. Based on the number of packets, it is detected whether or not there is a completed packet in the FIFO buffer, and the data saving means saves the data in the FIFO buffer determined to be incomplete in the storage means. Therefore, it is possible to avoid a state in which uncompleted packet data in the FIFO buffer is output to the packet processing device using the detection information of the packet completion detection means.

請求項5に記載の発明によれば、プロセスAがFIFOバッファにパケットのデータを書き込んでいる途中であっても、新たに起動されたプロセスBはFIFOバッファにパケットを書き込むことが可能になる。そして、再びプロセスBが再起動された際には、プロセスBはFIFOバッファに残りのパケットデータを書き込むことにより、FIFOバッファに正しくパケットを書き込むことが可能になる。したがって、FIFOバッファ内に既に格納済の未完結のパケットのデータの退避及びその復帰が可能である。   According to the invention described in claim 5, even when the process A is in the middle of writing the packet data to the FIFO buffer, the newly started process B can write the packet to the FIFO buffer. When the process B is restarted again, the process B writes the remaining packet data in the FIFO buffer, so that the packet can be correctly written in the FIFO buffer. Therefore, it is possible to save and restore data of incomplete packets already stored in the FIFO buffer.

図5は、本発明の一実施例のキュー装置の全体構成を示すブロック図である。
FIFOバッファ110は、nビット単位でのデータの一括入出力が可能なFirst-In, First-Out 方式のメモリであり、例えば1チップで構成される。そして、FIFOバッファ110の残り容量が予め定められた第1の閾値以下になったことを示すフルフラグ信号full(以下、full信号と記述する)並びにFIFOバッファ110が現在、全くデータを格納していない状態であることを示すエンプティ・フラグ信号empty (以下、empty信号と記述する)の出力端子と、該FIFOバッファ110へのデータ書き込み時にイネーブルとする書き込みイネーブル信号W1並びに該FIFOバッファ110からデータを読み出すときにイネーブルとする読み出しイネーブル信号R1の入力端子を備えている。
FIG. 5 is a block diagram showing the overall configuration of the queue device according to the embodiment of the present invention.
The FIFO buffer 110 is a first-in, first-out type memory capable of batch input / output of data in units of n bits, and is configured by one chip, for example. Then, a full flag signal full (hereinafter referred to as a full signal) indicating that the remaining capacity of the FIFO buffer 110 has become equal to or less than a predetermined first threshold, and the FIFO buffer 110 currently does not store any data. An empty flag signal empty (hereinafter referred to as an empty signal) indicating a state, a write enable signal W1 that is enabled when data is written to the FIFO buffer 110, and data are read from the FIFO buffer 110 An input terminal for a read enable signal R1 that is sometimes enabled is provided.

また、さらにnビットのデータ入力線D1とnビットのデータ出力線Q1を備えている。また、FIFOバッファ110は、バッファ内の残り容量が予め定められた第2の閾値よりも大きくなった場合には、Almost-Empty信号を出力する。   Further, an n-bit data input line D1 and an n-bit data output line Q1 are provided. The FIFO buffer 110 outputs an Almost-Empty signal when the remaining capacity in the buffer becomes larger than a predetermined second threshold value.

該FIFOバッファ110は、例えばSRAM(Static Random Access Memory)のアレイから構成され、該アレイに対してデータの入・出力が行われる。また、該SRAMに対する次の入力データの書き込みアドレスを指す入力ポインタと該SRAMから次に読み出すデータのアドレスを指す出力ポインタを内蔵している。これらのポインタは、例えばリングカウンタから成る。またさらに、上記2つのポインタが指すアドレス値の差を常に監視・比較しているコンパレータも内蔵しており、該コンパレータにより上記full信号や上記empty信号並びにAlmost-Empty信号を生成・出力する。   The FIFO buffer 110 is composed of, for example, an SRAM (Static Random Access Memory) array, and data is input to and output from the array. Further, an input pointer indicating a write address of the next input data to the SRAM and an output pointer indicating the address of data read next from the SRAM are incorporated. These pointers are composed of, for example, a ring counter. Further, a comparator that constantly monitors and compares the difference between the address values pointed to by the two pointers is built in, and the full signal, the empty signal, and the almost-empty signal are generated and output by the comparator.

尚、該FIFOバッファ110をSRAMではなく、シフトレジスタにより構成するようにしてもよい。
退避バッファ120は、例えばDRAM(Dynamic Random Access Memory) 等から成り、例えば上記FIFOバッファ110よりも大きな記憶容量を有する。この退避バッファ120も、nビット幅のデータ入力線D2並びにデータ出力線Q2を備え、さらに、上記FIFOバッファ110が有する書き込みイネーブル信号W1と同等の機能を有するライトイネーブル信号W2と、例えば、データ読み出し用のアウトプット・イネーブル信号OEを有する。この退避バッファ120には、FIFOバッファ110の残り容量が上記第1の閾値よりも少なくなったとき、すなわち、FIFOバッファ110からfull信号が出力されたとき、オーバーフロー制御部130の制御によってFIFOバッファ110に対して書き込み要求がなされたデータが退避・格納される。
Note that the FIFO buffer 110 may be configured by a shift register instead of the SRAM.
The save buffer 120 is composed of, for example, a DRAM (Dynamic Random Access Memory) or the like, and has a larger storage capacity than the FIFO buffer 110, for example. The save buffer 120 also includes a data input line D2 and a data output line Q2 each having an n-bit width, and a write enable signal W2 having a function equivalent to the write enable signal W1 included in the FIFO buffer 110. Output enable signal OE. In the save buffer 120, when the remaining capacity of the FIFO buffer 110 becomes smaller than the first threshold, that is, when a full signal is output from the FIFO buffer 110, the FIFO buffer 110 is controlled by the overflow control unit 130. Data for which a write request has been made is saved and stored.

オーバーフロー制御部130は、FIFOバッファ110に対するデータの投入要求をデータ書き込み要求信号write のイネーブル入力により受け付け、FIFOバッファ110から入力される上記full信号の状態に応じて、上記投入要求データをFIFOバッファ110または退避バッファ120のいずれかに格納する。   The overflow control unit 130 accepts a data input request to the FIFO buffer 110 by an enable input of the data write request signal “write”, and sends the input request data to the FIFO buffer 110 according to the state of the full signal input from the FIFO buffer 110. Alternatively, it is stored in one of the save buffers 120.

このオーバーフロー制御部130は、書き込み先決定装置131、フラグ132、書き込みポインタ133、及び退避バッファフル検出装置134を備えている。
書き込み先決定装置131は、上記データ書き込み要求信号write がイネーブルになって加わると、FIFOバッファ110から入力されるfull信号がアクティブとなっているか否か調べ、アクティブでない間は上記信号write と共に、外部装置から入力されるデータD1を、書き込みイネーブル信号W1を制御してFIFOバッファ110に書き込む。
The overflow control unit 130 includes a write destination determination device 131, a flag 132, a write pointer 133, and a save buffer full detection device 134.
When the data write request signal “write” is enabled and added, the write destination determination device 131 checks whether or not the full signal input from the FIFO buffer 110 is active. Data D1 input from the apparatus is written into the FIFO buffer 110 by controlling the write enable signal W1.

FIFOバッファ110に対するデータの投入の方が、FIFOバッファ110からのデータ取り出しよりも高速に行われる場合には、FIFOバッファ110はやがて充満状態となり、FIFOバッファ110はfull信号を“アクティブ”とする。書き込み先決定装置131は、full信号が“アクティブ”になった状態のときにデータ書き込み要求信号write がイネーブルになって加わると、書き込みポインタ133に上記信号write がイネーブルになった後に送られてきたFIFOバッファ110に対する書き込みデータの退避バッファ120上の格納先アドレスをセットする。   When the data input to the FIFO buffer 110 is performed at a higher speed than the data extraction from the FIFO buffer 110, the FIFO buffer 110 eventually becomes full, and the FIFO buffer 110 sets the full signal to “active”. If the data write request signal “write” is enabled and added while the full signal is “active”, the write destination determination device 131 is sent to the write pointer 133 after the signal “write” is enabled. The storage destination address on the save buffer 120 for the write data to the FIFO buffer 110 is set.

書き込みポインタ133にセットされたアドレス値は、退避バッファ120にアドレス信号として送られ入力される。そして、書き込み先決定装置131が、ライトイネーブル信号W2をイネーブルにすることにより、FIFOバッファ110に対する書き込み要求データD1が退避データD2として書き込みポインタ133にセットされたポインタ値の指す退避バッファ120上のアドレスに書き込まれ、一時的に退避される。書き込み先決定装置131は、このようにして退避バッファ120にデータを書き込んだ後、フラグ132をセットする。   The address value set in the write pointer 133 is sent to the save buffer 120 as an address signal and input. Then, when the write destination determining device 131 enables the write enable signal W2, the write request data D1 for the FIFO buffer 110 is the address on the save buffer 120 pointed to by the pointer value set in the write pointer 133 as the save data D2. Is temporarily saved. The write destination determination device 131 sets the flag 132 after writing data to the save buffer 120 in this way.

書き込み先決定装置131は、一度、フラグ132がセットされると、外部装置からのFIFOバッファ110に対する書き込みデータを、退避バッファ120の方へ転送し書き込む。この間、FIFOバッファ110から出力されるAlmost-Empty信号を監視し、該信号が“アクティブ”になる、すなわち、FIFOバッファ110に上記第2の閾値以上の“空き”が生ずると、退避バッファ120に退避させていたデータを、不図示のデータリスト装置を介してFIFOバッファ110に転送・復帰させる。   Once the flag 132 is set, the write destination determination device 131 transfers the write data from the external device to the FIFO buffer 110 to the save buffer 120 for writing. During this time, the Almost-Empty signal output from the FIFO buffer 110 is monitored, and when the signal becomes “active”, that is, when “free” above the second threshold value occurs in the FIFO buffer 110, the save buffer 120. The saved data is transferred / returned to the FIFO buffer 110 via a data list device (not shown).

一方、Almost-Empty信号が“アクティブ”になる前に、退避バッファ120の残り容量が予め定められた第3の閾値よりも少なくなる場合がある。退避バッファフル検出装置134は、退避バッファ120がこのような状態になったことを、書き込みポインタ133から入力されるポインタ値すなわち退避バッファ120の次のデータの格納先アドレスにより検出する。そして、該検出時に、バッファフル検出信号buffer-full を外部出力する。この信号は、例えばプロセッサなどのデータ生成装置に対する割り込み信号として用いられる。   On the other hand, before the Almost-Empty signal becomes “active”, the remaining capacity of the save buffer 120 may become smaller than a predetermined third threshold value. The save buffer full detection device 134 detects that the save buffer 120 is in such a state based on the pointer value input from the write pointer 133, that is, the storage destination address of the next data in the save buffer 120. At the time of detection, the buffer full detection signal buffer-full is output to the outside. This signal is used as an interrupt signal for a data generation device such as a processor.

次に、図6はFIFOバッファ110を、コマンドなどを表現する1個以上のデータ列である“パケット”を格納するキューとして使用する場合の一実施例を示す模式図である。   Next, FIG. 6 is a schematic diagram showing an embodiment in which the FIFO buffer 110 is used as a queue for storing “packets”, which are one or more data strings expressing commands and the like.

カウンタ140は、FIFOバッファ110に格納されているパケット数を計数し、その計数値value を該FIFOバッファ110からパケットを取り出して処理するパケット処理装置へ出力する。   The counter 140 counts the number of packets stored in the FIFO buffer 110 and outputs the count value value to a packet processing device that takes out the packets from the FIFO buffer 110 and processes them.

このカウンタ140のインクリメント(+1)は、プロセッサなどのFIFOバッファ110にパケットを投入するパケット生成装置によって行われ、デクリメント(−1)は該FIFOバッファ110からパケットを取り出すパケット処理装置により行われる。すなわち、FIFOバッファ110へのデータ入力側のパケットの投入の終了においてカウンタ140をインクリメントし、データ出力側のパケットの取り出しの終了においてカウンタ140をデクリメントすることによって、FIFOバッファ110に格納されているパケットの数を検出することができる。   The increment (+1) of the counter 140 is performed by a packet generation device that inputs a packet to the FIFO buffer 110 such as a processor, and the decrement (−1) is performed by a packet processing device that extracts the packet from the FIFO buffer 110. That is, the packet stored in the FIFO buffer 110 is incremented by incrementing the counter 140 at the end of input of the data input side packet to the FIFO buffer 110 and decrementing the counter 140 at the end of extraction of the data output side packet. Can be detected.

このように、パケット数を計数するカウンタ140を付加することにより、パケット処理装置はFIFOバッファ110内においてパケットが完結してから、該パケットのデータを連続して取り出して効率良く処理することが可能になる。   In this way, by adding the counter 140 that counts the number of packets, the packet processing device can extract the data of the packets continuously after the packets are completed in the FIFO buffer 110 and process them efficiently. become.

続いて、図7に示す実施例は上述した図6に示す構成において、FIFOバッファ110Aに格納するパケットの各データに該データがパケットの最後のデータであるか否かを示す1ビットの情報(end bit)を付加するようにしたものである。このような構成とすることにより、FIFOバッファ110Aの出力側では、上記end bit の出力端子を監視することにより、FIFOバッファ110Aからデータを取り出す過程でパケットの終了を容易に検出することができる。   Next, in the embodiment shown in FIG. 7, in the configuration shown in FIG. 6 described above, 1-bit information indicating whether or not the data is the last data of the packet is included in each data of the packet stored in the FIFO buffer 110A ( end bit) is added. With such a configuration, the end of the packet can be easily detected on the output side of the FIFO buffer 110A by monitoring the end bit output terminal in the process of extracting data from the FIFO buffer 110A.

図8は本発明の実施例のキュー装置1000を適用したプロセッサ要素の全体的な回路構成を示すブロック図である。
プロセッサ100は、例えばRISC(Reduced Instruction Set Computer)型またはCISC(Complex Instruction Set Computer) 型のマイクロプロセッサから成り、コマンドなどから成るパケットを生成する。
FIG. 8 is a block diagram showing an overall circuit configuration of a processor element to which the queue device 1000 according to the embodiment of the present invention is applied.
The processor 100 is formed of, for example, a RISC (Reduced Instruction Set Computer) type or CISC (Complex Instruction Set Computer) type microprocessor, and generates a packet including a command or the like.

このプロセッサ100には、バス200を介してメモリ300が接続されている。このメモリ300は、例えばDRAM等から成り、その内部には退避バッファ1020の領域が確保される。この退避バッファ1020は、上記退避バッファ120と同等の機能を有するもので、上記プロセッサ100により生成されるパケットの一時的な退避領域として利用される。   A memory 300 is connected to the processor 100 via a bus 200. The memory 300 is composed of, for example, a DRAM and the like, and an area for the save buffer 1020 is secured therein. The save buffer 1020 has the same function as the save buffer 120, and is used as a temporary save area for packets generated by the processor 100.

本実施例のキュー装置1000の上記退避領域1020を除く部分は、バスインタフェース400を介してバス200に接続されている。
次に、上記退避領域1020以外のキュー装置1000の構成を説明する。
A portion of the queue device 1000 of the present embodiment excluding the save area 1020 is connected to the bus 200 via the bus interface 400.
Next, the configuration of the queue device 1000 other than the save area 1020 will be described.

2つのFIFOバッファ(FIFO1、FIFO2)から成るFIFOバッファ1010は、プロセッサ100がバスインタフェース400を介して書き込むパケットを格納するキューとして機能するFIFOメモリである。プロセッサ100は、FIFO1または2のいずれにデータを書き込むかは、バスインタフェース400を介してオーバーフロー制御部1030に出力する書き込み要求信号W11またはW12を制御することにより指示する。   A FIFO buffer 1010 composed of two FIFO buffers (FIFO 1 and FIFO 2) is a FIFO memory that functions as a queue for storing packets to be written by the processor 100 via the bus interface 400. The processor 100 instructs which of the FIFOs 1 and 2 is to write data by controlling a write request signal W11 or W12 output to the overflow control unit 1030 via the bus interface 400.

これらの各FIFOバッファ1,2にそれぞれ対応するカウンタC1,C2を有するカウンタ1040が設けられている。
カウンタC1,C2は、それぞれ、FIFO1,2に格納されているパケット数を計数する。
A counter 1040 having counters C1 and C2 respectively corresponding to the FIFO buffers 1 and 2 is provided.
Counters C1 and C2 count the number of packets stored in FIFOs 1 and 2, respectively.

オーバーフロー制御部1030は、これらFIFO1,2並びにカウンタC1,C2と上記バスインタフェース400との間に介在して設けられている。
オーバーフロー制御部1030は、2つのフラグF1,F2を有するフラグ1032、パケットデータラッチ回路1036(以下、単にラッチ回路1036と表現する)、退避バッファ1020用の書き込みポインタ1033,該退避バッファ1020のサイズに応じて決定される該書き込みポインタ1033の限界値(最終格納アドレス)が設定されるlimit レジスタ1037、上記ポインタ1033とlimit レジスタ1037とを比較するコンパレータ1038、さらには前記フラグF1,F2及び前記カウンタC1,C2の値を基に、プロセッサ100に対してデータリストアを要求する割り込みをかけるインタラプト発生部1039を備えている。
The overflow control unit 1030 is provided between the FIFOs 1 and 2 and the counters C1 and C2 and the bus interface 400.
The overflow control unit 1030 has a flag 1032 having two flags F1 and F2, a packet data latch circuit 1036 (hereinafter simply referred to as a latch circuit 1036), a write pointer 1033 for the save buffer 1020, and the size of the save buffer 1020. A limit register 1037 in which a limit value (final storage address) of the write pointer 1033 determined in response is set, a comparator 1038 for comparing the pointer 1033 and the limit register 1037, and the flags F1 and F2 and the counter C1 , C2 is provided with an interrupt generation unit 1039 for issuing an interrupt requesting data restoration to the processor 100.

フラグF1は、対応するFIFO1から入力されるfull1信号が“アクティブ”になったとき、すなわちFIFO1が充満状態になったときに“セット”される。そして、退避バッファ1020に退避されていた全てのデータがFIFOバッファ1に投入された時点で“クリア”(リセット)される。   The flag F1 is “set” when the full1 signal input from the corresponding FIFO1 becomes “active”, that is, when the FIFO1 becomes full. Then, when all the data saved in the save buffer 1020 is input to the FIFO buffer 1, it is “cleared” (reset).

フラグF2は、FIFO2に対して、上記フラグF1と同様の動作をする。書き込み先ポインタ1033には、最初、退避バッファ1020の先頭アドレスか設定される。そして、FIFOバッファ1010に対する書き込みデータが格納される毎にインクリメントされる。この書き込み先ポインタ1033の値は、バスインタフェース400及びバス200を介してメモリ300にアドレス信号(address)として供給される。   The flag F2 performs the same operation as the flag F1 with respect to the FIFO2. The write destination pointer 1033 is initially set to the head address of the save buffer 1020. It is incremented every time write data to the FIFO buffer 1010 is stored. The value of the write destination pointer 1033 is supplied as an address signal (address) to the memory 300 via the bus interface 400 and the bus 200.

コンパレータ1038は、上記書き込み先ポインタ1033の値がlimit レジスタ1037の値を越えた時に、割り込み信号(Interrupt 1)をバスインタフェース400及びバス200を介してプロセッサ100に加える。この割り込みは、退避バッファ1020に“空き”が無くなったことをプロセッサ100に通知するものである。   The comparator 1038 adds an interrupt signal (Interrupt 1) to the processor 100 via the bus interface 400 and the bus 200 when the value of the write destination pointer 1033 exceeds the value of the limit register 1037. This interrupt notifies the processor 100 that there is no “empty” in the save buffer 1020.

ラッチ回路1036は、バスインタフェース400を介して入力されるプロセッサ100がバス200上に出力したFIFOバッファ1010に対する書き込みデータ(data) を一時的に保持する。また、プロセッサ100は、パケットの最後のデータを書き込む時には、バス200上のエンド・ビット(end bit)の信号線を有効(“1”)にする。このend bit の値もバスインタフェース400を介してラッチ回路1036にラッチされる。   The latch circuit 1036 temporarily holds write data (data) to the FIFO buffer 1010 output from the processor 100 input via the bus interface 400 onto the bus 200. Further, when writing the last data of the packet, the processor 100 enables (“1”) the end bit signal line on the bus 200. The value of the end bit is also latched by the latch circuit 1036 via the bus interface 400.

オーバーフロー制御部1030内の不図示のカウンタ制御部は、このラッチ回路1036にラッチされたend bit が“1”に設定されていることを検出することにより、ラッチ回路1036にパケットの最後のデータがラッチされたことを検出する。そしてFIFO1またはFIFO2にパケットの最後のデータを書き込んだ後に、カウンタC1またはC2をインクリメント(+1)する。   The counter control unit (not shown) in the overflow control unit 1030 detects that the end bit latched in the latch circuit 1036 is set to “1”, whereby the last data of the packet is stored in the latch circuit 1036. Detect that it was latched. Then, after writing the last data of the packet in FIFO1 or FIFO2, the counter C1 or C2 is incremented (+1).

インタラプト発生部1039は、フラグF1またはF2がセットされているときに、そのセットされているフラグF1またはF2に対応するカウンタC1またはC2の値が“0”または所定の閾値以下になると割り込み信号(Interrupt 2)を発生し、バスインタフェース400及びバス200を介してプロセッサ100に割り込みをかける。この割り込みは、FIFOバッファ1010に対する書き込みデータが、退避バッファ1020に退避されている状態のときに、FIFO1またはFIFO2に格納されているパケットが“皆無”になったときに発生する。   When the flag F1 or F2 is set and the value of the counter C1 or C2 corresponding to the set flag F1 or F2 is “0” or less than a predetermined threshold value, the interrupt generation unit 1039 sets an interrupt signal ( Interrupt 2) is generated to interrupt the processor 100 via the bus interface 400 and the bus 200. This interruption occurs when the data stored in the FIFO 1 or the FIFO 2 becomes “none” while the write data to the FIFO buffer 1010 is saved in the save buffer 1020.

図9(a) ,(b) は、上記インタラプト発生部1039の回路構成例を示す図である。
同図(a) に示すインタラプト発生部1039は、フラグF1がセットされており、かつカウンタC1の値(FIFO1の格納パケット数)value 1 が“0”のとき、またはフラグF2がセットされており、かつカウンタC2の値(FIFO2の格納パケット数)value 2が“0”のとき、共通の割り込み信号Interrupt2を発生する。
FIGS. 9A and 9B are diagrams showing a circuit configuration example of the interrupt generating unit 1039. FIG.
In the interrupt generation unit 1039 shown in FIG. 5A, the flag F1 is set and the value of the counter C1 (the number of packets stored in the FIFO1) value 1 is “0” or the flag F2 is set. When the value of the counter C2 (number of FIFO2 stored packets) value2 is "0", a common interrupt signal Interrupt2 is generated.

コンパレータ1102は、カウンタC1の値value 1が“0”のとき“H”信号をアンドゲート1104の一方の入力端子に出力する。アンドゲート1104は他方の入力端子にフラグF1の値(“1”(セット状態)のときに“H”、“0”(クリア状態)のときに“L”)を入力する。そして、フラグF1がセットされており、かつカウンタC1の値value 1が“0”のときに“H”信号をオアゲート1110に出力する。また、上記フラグF1とカウンタC1の出力に対する回路と同様な回路が、コンパレータ1106とアンドゲート1108によりフラグF2の出力とカウンタC2の出力に対しても設けられている。アンドゲート1108は、フラグF2がセットされており、かつカウンタC2の値value 2が“0”のときに“H”信号をオアゲート1110に出力する。   The comparator 1102 outputs an “H” signal to one input terminal of the AND gate 1104 when the value value 1 of the counter C1 is “0”. The AND gate 1104 inputs the value of the flag F1 (“H” when “1” (set state), “L” when “0” (clear state)) to the other input terminal. When the flag F1 is set and the value value 1 of the counter C1 is “0”, an “H” signal is output to the OR gate 1110. A circuit similar to the circuit for the output of the flag F1 and the counter C1 is also provided for the output of the flag F2 and the output of the counter C2 by the comparator 1106 and the AND gate 1108. The AND gate 1108 outputs an “H” signal to the OR gate 1110 when the flag F2 is set and the value 2 of the counter C2 is “0”.

オアゲート1110は、アンドゲート1104またはアンドゲート1108のいずれか一方が“H”となったときに、割り込み信号Interrupt 2をバスインタフェース400に出力する。   The OR gate 1110 outputs the interrupt signal Interrupt 2 to the bus interface 400 when either the AND gate 1104 or the AND gate 1108 becomes “H”.

この場合、プロセッサ100は、オーバーフロー制御部1030並びにバスインタフェース400を介してカウンタC1,C2の値を読み出して、値が“0”となっているカウンタCi(i=1,2,)を検出することにより、FIFO1またはFIFO2のいずれが格納パケット数が“0”になったか判断する。   In this case, the processor 100 reads the values of the counters C1 and C2 via the overflow control unit 1030 and the bus interface 400, and detects the counter Ci (i = 1, 2,) whose value is “0”. Thus, it is determined which of the FIFO1 and the FIFO2 has the number of stored packets has become “0”.

一方、図9(b) に示す回路は、上述した同図(a) に示す回路からオアゲート1110を省略したものであり、上記アンドゲート1104と上記アンドゲート1108の出力が、それぞれ独立の割り込み信号Interrupt 2A,2Bとなって、バスインタフェース400に出力される。この場合、プロセッサ100は、FIFO1またはFIFO2のいずれの方が格納パケット数が“0”になったかを認識できる。   On the other hand, the circuit shown in FIG. 9B is obtained by omitting the OR gate 1110 from the circuit shown in FIG. 9A, and outputs of the AND gate 1104 and the AND gate 1108 are independent interrupt signals. Interrupt 2A and 2B are output to the bus interface 400. In this case, the processor 100 can recognize which one of the FIFO1 and the FIFO2 has the number of stored packets “0”.

アービタ1050は、カウンタC1,C2の値value 1,2を監視しており、該カウンタ値value 1または2の値が“0”より大きくなると、2つのFIFO1,2のうち適当な方を選択し、該選択したFIFO1または2からそれに加えるイネーブル信号r1またはr2を“イネーブル”にしてパケットデータを順次読み出す。これらの読み出されたパケットデータはマルチプレクサ1060に入力される。アービタ1050は、該マルチプレクサ1060に入力選択信号selectを加え、上記FIFO1またはFIFO2から読み出されたパケットデータdataをパケット処理装置500に入力させる。   The arbiter 1050 monitors the values value 1 and 2 of the counters C1 and C2, and when the value of the counter value value 1 or 2 becomes larger than “0”, the appropriate one of the two FIFOs 1 and 2 is selected. Then, the enable signal r1 or r2 applied to the selected FIFO1 or 2 is set to “enable” to sequentially read out the packet data. These read packet data are input to the multiplexer 1060. The arbiter 1050 adds the input selection signal select to the multiplexer 1060 and causes the packet processing device 500 to input the packet data data read from the FIFO1 or FIFO2.

マルチプレクサ1060は、FIFO1及びFIFO2からアービタ1050によって取り出されたパケットデータが入力されるデータセレクタであり、アービタ1050から加わる入力選択信号selectに応じて、FIFO1またはFIFO2のいずれか一方から出力されるパケットデータdataをパケット処理装置500に出力する。   The multiplexer 1060 is a data selector to which the packet data extracted from the FIFO 1 and the FIFO 2 by the arbiter 1050 is input, and the packet data output from either the FIFO 1 or the FIFO 2 in accordance with the input selection signal select applied from the arbiter 1050. Data is output to the packet processing device 500.

マルチプレクサ1070は、FIFO1及びFIFO2からそれぞれempty信号1,2を入力し、アービタ1050から上記マルチプレクサ1060と同様に入力選択信号selectを入力する。そして、該選択信号selectに応じて、上記2つのempty信号1または2のいずれか一方をパケット処理装置500に選択出力する。   The multiplexer 1070 receives the empty signals 1 and 2 from the FIFO 1 and FIFO 2, respectively, and receives the input selection signal select from the arbiter 1050 in the same manner as the multiplexer 1060. In response to the selection signal select, either one of the two empty signals 1 or 2 is selectively output to the packet processing device 500.

パケット処理装置500は、パケット処理の開始に際して前記アービタ1050にパケットの読み出し要求信号readを送り、アービタ1050にFIFOバッファ1010に格納されているパケットの取り出しを依頼する。アービタ1050は、この信号readを受け取るとカウンタC1,C2を参照し、マルチプレクサ1060を介してFIFO1またはFIFO2に格納されているパケットデータをパケット処理装置500に入力させる。パケット処理装置500は、マルチプレクサ1060を介してパケットの最後のデータを受け取ると、パケットの取り出し終了を示すdone信号をアービタ1050に出力する。アービタ1050は、このdone信号を受信すると、上記パケットが取り出されたFIFOi(i=1,2)に対応するカウンタCiをデクリメント(−1)する。パケット処理装置500には前述したようにマルチプレクサ1070を介してempty信号が入力されるので、該empty信号が非アクティブとなっている間はFIFOバッファ1010にパケットが格納されていることを知ることができる。   The packet processing device 500 sends a packet read request signal read to the arbiter 1050 at the start of packet processing, and requests the arbiter 1050 to take out the packet stored in the FIFO buffer 1010. Upon receiving this signal read, the arbiter 1050 refers to the counters C1 and C2, and inputs the packet data stored in the FIFO1 or FIFO2 to the packet processing device 500 via the multiplexer 1060. When the packet processing apparatus 500 receives the last data of the packet via the multiplexer 1060, the packet processing apparatus 500 outputs a done signal indicating the end of the packet extraction to the arbiter 1050. When receiving the done signal, the arbiter 1050 decrements (-1) the counter Ci corresponding to the FIFOi (i = 1, 2) from which the packet is extracted. Since the empty signal is input to the packet processing device 500 through the multiplexer 1070 as described above, it can be known that the packet is stored in the FIFO buffer 1010 while the empty signal is inactive. it can.

図10は、FIFOバッファ1010(FIFO1,FIFO2)に格納されるパケットの形式を示す図である。
パケットの先頭(第1ワード)には、コマンドの種類を示す情報が設定される。これに続く第2ワード目以降には、該コマンドに付随するパラメータが必要な個数だけ設定される。
FIG. 10 is a diagram illustrating a format of a packet stored in the FIFO buffer 1010 (FIFO1, FIFO2).
Information indicating the type of command is set at the head (first word) of the packet. From the second word onward, the necessary number of parameters associated with the command are set.

また、図11は、退避バッファ1020に退避されるパケットの形式を示す図である。このパケットには、パケットデータdataに加え、さらに投入すべきFIFOバッファを示すキュー番号(例えばFIFO1の場合には“1”、FIFO2の場合には“2”)と対応するパケットデータが当該パケットの最後のデータであるか否かを示す情報であるend-bit が付加される。該end-bit は、例えば“1”のときに有効である。プロセッサ100が退避バッファ1020に退避されているパケットデータを該当するFIFOi(i=1,2)に戻す場合には、これらの付加情報を参照する。   FIG. 11 is a diagram showing a format of a packet saved in the save buffer 1020. In this packet, in addition to the packet data data, packet data corresponding to a queue number (for example, “1” in the case of FIFO1, “2” in the case of FIFO2) indicating the FIFO buffer to be input is included in the packet. An end-bit which is information indicating whether or not it is the last data is added. The end-bit is effective when it is “1”, for example. When the processor 100 returns the packet data saved in the save buffer 1020 to the corresponding FIFOi (i = 1, 2), the additional information is referred to.

次に、上記構成のプロセッサ要素の動作を説明する。
プロセッサ100は、パケットを生成すると、該パケットをバス200のデータバス幅に合わせて分割し、end bit データに該当値を設定して逐次バス200に出力する。そして、オーバーフロー制御部1030に対し、FIFO1またはFIFO2に対するパケットデータdataの書き込み要求信号W11またはW12をイネーブルにしてバス200上のコマンドバスに出力する。
Next, the operation of the processor element configured as described above will be described.
When the processor 100 generates a packet, the processor 100 divides the packet according to the data bus width of the bus 200, sets a corresponding value in the end bit data, and sequentially outputs it to the bus 200. Then, the write request signal W11 or W12 of the packet data data for FIFO1 or FIFO2 is enabled and output to the command bus on the bus 200 to the overflow control unit 1030.

バスインタフェース400は、上記書き込み要求信号Wi(i=1,2)のイネーブル出力を検出すると、この信号Wiをオーバーフロー制御部1030に出力し、その内部のラッチ回路1036にバス200上に出力されているパケットデータdata並びにend bit をラッチさせる。   When the bus interface 400 detects the enable output of the write request signal Wi (i = 1, 2), it outputs this signal Wi to the overflow control unit 1030 and is output to the internal latch circuit 1036 on the bus 200. Packet data data and end bit are latched.

このようにして、ラッチ回路1036にラッチされたパケットデータは、オーバーフロー制御部1030によって書き込み要求がなされたFIFOiに順次書き込まれる。そして、プロセッサ100がパケットの最後のデータと共に“1”に設定したend bit データをバス200上に出力すると、オーバーフロー制御部1030は、該当するFIFOiにそのパケットの最後のデータを書き込み、その後、対応するカウンタCiをインクリメント(+1)する。   In this way, the packet data latched in the latch circuit 1036 is sequentially written into the FIFOi requested to be written by the overflow control unit 1030. When the processor 100 outputs the end bit data set to “1” together with the last data of the packet onto the bus 200, the overflow control unit 1030 writes the last data of the packet into the corresponding FIFOi, and then responds. Counter Ci to be incremented (+1).

以上のようにして、プロセッサ100によってFIFOバッファ1010(FIFO1またはFIFO2)に対してパケットが書き込まれ、各FIFO1,2に書き込まれるパケット数がオーバーフロー制御部1030によってカウンタC1,2により計数される。   As described above, the processor 100 writes packets into the FIFO buffer 1010 (FIFO1 or FIFO2), and the overflow control unit 1030 counts the number of packets written in the FIFOs 1 and 2 with the counters C1 and C2.

アービタ1050は、カウンタC1,C2の値を常時、監視しており、該カウンタC1又はC2の値が“0”より大きくなると、マルチプレクサ1060を制御して2つのFIFO1,2の内、適当な方をパケットを取り出すキューとして選択する。また、該制御に伴って、マルチプレクサ1070からパケット処理装置500に対して非アクティブのempty信号が加わる。非アクティブのempty信号は、FIFOバッファ1010すなわちFIFO1またはFIFO2の少なくともいずれか一方にパケットが格納されていることを示している。   The arbiter 1050 constantly monitors the values of the counters C1 and C2. When the value of the counter C1 or C2 becomes larger than “0”, the arbiter 1050 controls the multiplexer 1060 to select the appropriate one of the two FIFOs 1 and 2. Is selected as the queue from which packets are taken out. In addition, an inactive empty signal is applied from the multiplexer 1070 to the packet processing device 500 in accordance with the control. The inactive empty signal indicates that a packet is stored in the FIFO buffer 1010, that is, at least one of FIFO1 and FIFO2.

パケット処理装置500は、マルチプレクサ1070から非アクティブのempty信号が加わると、アービタ1050に対して出力される信号readをアクティブにして、パケットの受信要求を行う。アービタ1050は、この要求を受けて、FIFO1またはFIFO2のいずれか適切な方にリードイネーブル信号r1またはr2を“イネーブル”にして出力し、該イネーブル出力を行ったFIFOi(i=1,2)からパケットデータを順次読み出す。アービタ1050は、例えば、カウンタC1,2の値が共に“0”より大きな値であった場合、カウンタ値すなわち格納パケット数が多いFIFOiの方を優先的に選択する。そして、マルチプレクサ1060を制御して、該選択したFIFOiから読み出されたパケットデータをパケット処理装置500に順次入力させる。   When an inactive empty signal is added from the multiplexer 1070, the packet processing device 500 activates the signal read output to the arbiter 1050 and makes a packet reception request. In response to this request, the arbiter 1050 “enables” the read enable signal r1 or r2 to the appropriate one of the FIFO1 and the FIFO2, and outputs it from the FIFOi (i = 1, 2) that performed the enable output. Read the packet data sequentially. For example, when both the values of the counters C1 and C2 are larger than “0”, the arbiter 1050 preferentially selects the FIFO value having a larger counter value, that is, the number of stored packets. Then, the multiplexer 1060 is controlled to sequentially input packet data read from the selected FIFOi to the packet processing device 500.

パケット処理装置500は、該FIFOiから読み出されてくるパケットデータを順次取り込んでパケット処理を開始する。そして、パケットの最後のデータを取り込むと、アービタ1050に対してdone信号を送信する。アービタ1050は、これを受けて上記FIFOiに対応するカウンタCiの値をデクリメント(−1)する。すなわち、FIFOiの格納パケット数は“1”減少したので、これに合わせてカウンタCiの値を更新する。パケット処理装置500は、例えば、各種コマンドの全体長を記憶しており、その記憶情報により各パケットの取り出し終了を検出する。   The packet processing device 500 sequentially takes in the packet data read from the FIFOi and starts packet processing. When the last data of the packet is captured, a done signal is transmitted to the arbiter 1050. In response to this, the arbiter 1050 decrements (-1) the value of the counter Ci corresponding to the FIFOi. That is, since the number of FIFOi stored packets has decreased by “1”, the value of the counter Ci is updated accordingly. For example, the packet processing device 500 stores the total length of various commands, and detects the end of the extraction of each packet based on the stored information.

プロセッサ100がFIFO1またはFIFO2にパケットを書き込む速度の方が、パケット処理装置500がFIFO1またはFIFO2からパケットを取り出して処理する速度よりも速い場合には、FIFO1またはFIFO2が充満状態になる場合があり得る。   If the speed at which the processor 100 writes a packet to the FIFO 1 or the FIFO 2 is faster than the speed at which the packet processing device 500 fetches the packet from the FIFO 1 or the FIFO 2 and processes the packet, the FIFO 1 or the FIFO 2 may become full. .

このような場合、オーバーフロー制御部1030は、プロセッサ100から現在、充満状態にあるFIFOiに対するパケットデータの書き込み要求を受け取ると、該書き込み要求のあったパケットデータを図11に示す形式で退避バッファ1020のポインタ1033の指すアドレスに書き込む。そして、対応するフラグFiをセットする。このように、いったんフラグFiがセットされると、オーバーフロー制御部1030はその後プロセッサ100からFIFOiに対して書き込み要求がなされるパケットを、ポインタ1033を更新しながら退避バッファ1020の方に書き込む。   In such a case, when the overflow control unit 1030 receives a packet data write request for the FIFOi that is currently full from the processor 100, the overflow control unit 1030 stores the packet data for which the write request has been made in the save buffer 1020 in the format shown in FIG. Write to the address pointed to by the pointer 1033. Then, the corresponding flag Fi is set. As described above, once the flag Fi is set, the overflow control unit 1030 writes a packet for which a write request is made from the processor 100 to the FIFOi thereafter in the save buffer 1020 while updating the pointer 1033.

このように退避バッファ1020にパケットの書き込みが行われている間に、充満状態にあったFIFOiからパケット処理装置500によってパケットが順次、取り出されていく。そして、やがて、該FIFOiの格納パケット数は“0”となる。すなわち、該FIFOiに対応するカウンタCiの値は“0”になる。これにより、オーバーフロー制御1030においてインタラプト発生部1039からプロセッサ100に対して割り込み信号Interrupt 2が加わる。   While packets are being written to the save buffer 1020 in this way, packets are sequentially extracted by the packet processing device 500 from the FIFOi that has been full. Eventually, the number of packets stored in the FIFOi becomes “0”. That is, the value of the counter Ci corresponding to the FIFOi is “0”. As a result, the interrupt signal Interrupt 2 is applied from the interrupt generation unit 1039 to the processor 100 in the overflow control 1030.

プロセッサ100は、この割り込みにより当該割り込み処理ルーチンを実行し、退避バッファ1020からFIFOiに投入すべきパケットデータを読み出し、該パケットデータを該FIFOiに書き込む。そして、この結果退避バッファ1020内にFIFOiに投入すべきパケットデータが残らなくなれば、対応するフラグFiをクリア(リセット)する。このフラグFiのクリアにより、オーバーフロー制御1030は、再びFIFOiが充満状態になるまで、プロセッサ100から書き込み要求がなされるパケットデータをFIFOiに書き込む。   In response to this interrupt, the processor 100 executes the interrupt processing routine, reads the packet data to be input to the FIFOi from the save buffer 1020, and writes the packet data to the FIFOi. As a result, when there is no packet data to be input to FIFOi in the save buffer 1020, the corresponding flag Fi is cleared (reset). By clearing the flag Fi, the overflow control 1030 writes packet data for which a write request is made from the processor 100 to the FIFOi until the FIFOi becomes full again.

一方、上記退避バッファ1020からFIFOiへのデータのリストアにおいて、まだ、退避バッファ1020の中にFIFOiへの投入パケットデータが残っている場合には、フラグFiはクリアしない。したがって、この場合には、オーバーフロー制御1030は引き続いて、プロセッサ100のFIFOiに対する投入データを、退避バッファ1020の方に書き込む。すなわち、この場合には、退避バッファ1020の方にFIFOiに先に投入すべきパケットデータが残っているからである。   On the other hand, in the restoration of data from the save buffer 1020 to the FIFOi, if the input packet data to the FIFOi still remains in the save buffer 1020, the flag Fi is not cleared. Therefore, in this case, the overflow control 1030 continues to write the input data for the FIFOi of the processor 100 into the save buffer 1020. That is, in this case, packet data to be input first into FIFOi remains in the save buffer 1020.

ところで、あるパケットにおいてFIFOiにデータを投入している途中で、FIFOiが充満状態となり、それ以降のデータが退避バッファ1020の方に格納される場合もありえる。この場合においては、カウンタCiはインクリメント(+1)されないので、FIFOiには該パケットは格納されていないものとみなされる。そして、退避バッファ1020に退避されていた残りの全てのデータがFIFOiに転送された時点でカウンタCiがインクリメント(+1)される。したがって、パケット処理装置500は、常にFIFOi内でパケットが完結した時点でFIFOiからパケットを効率良く取り出すことができる。   By the way, there is a case where the FIFOi becomes full while data is being input into the FIFOi in a certain packet, and the subsequent data is stored in the save buffer 1020. In this case, since the counter Ci is not incremented (+1), it is considered that the packet is not stored in the FIFOi. Then, when all the remaining data saved in the save buffer 1020 is transferred to the FIFOi, the counter Ci is incremented (+1). Therefore, the packet processing device 500 can efficiently extract a packet from the FIFOi at all times when the packet is completed in the FIFOi.

一方、退避バッファ1020がオーバーフローする状態もありえる。この場合には、コンパレータ1038により割り込み信号Interrupt 1がプロセッサ100に加えられる。プロセッサ100は、この割り込みが加わると、例えばメモリ300上の退避バッファ1020のサイズを拡張する処理などを行う。そして、これに伴ってlimit レジスタ1037の値を更新する。   On the other hand, there may be a state where the save buffer 1020 overflows. In this case, the interrupt signal Interrupt 1 is applied to the processor 100 by the comparator 1038. When this interrupt is applied, the processor 100 performs a process of expanding the size of the save buffer 1020 on the memory 300, for example. Along with this, the value of the limit register 1037 is updated.

上述した実施例では、退避バッファ1020から該当するFIFOiへのデータのリストアを、プロセッサ100のソフトウェア処理により実行している。
次に述べる実施例は、上記データリストア処理を完全にハードウェアで実現するキュー装置を実装したプロセッサ要素の例である。
In the above-described embodiment, data restoration from the save buffer 1020 to the corresponding FIFOi is executed by software processing of the processor 100.
The embodiment described below is an example of a processor element in which a queue device that implements the data restoration processing is completely implemented by hardware.

この実施例では、図12に模式的に示すように、退避バッファ1020に対して書き込みポインタWP(図8のポインタ1033に対応)の他に、退避バッファ1020から読み出すべき先頭のパケットデータの格納アドレスを指す読み出しポインタRPを用意する。これにより、退避バッファ1020をリングバッファとして取り扱うことが可能になる。そして、FIFOバッファ1010が空になったことを検出したら、退避バッファ1020に退避されていたデータを上記読み出しポインタRPで示されるアドレスから読み出し、FIFOバッファ1010に転送する。そして、このデータ転送により、退避バッファ1020が“空”になったならば、退避バッファ1020に退避データがあることを示すフラグ1032をリセット(クリア)する。これらの一連の処理をハードウェアにより実現する。   In this embodiment, as schematically shown in FIG. 12, in addition to the write pointer WP (corresponding to the pointer 1033 in FIG. 8) for the save buffer 1020, the storage address of the first packet data to be read from the save buffer 1020 A read pointer RP pointing to is prepared. As a result, the save buffer 1020 can be handled as a ring buffer. When it is detected that the FIFO buffer 1010 is empty, the data saved in the save buffer 1020 is read from the address indicated by the read pointer RP and transferred to the FIFO buffer 1010. If the save buffer 1020 becomes “empty” by this data transfer, the flag 1032 indicating that there is save data in the save buffer 1020 is reset (cleared). A series of these processes is realized by hardware.

図13は上記データリストア処理をハードウェアにより実現するキュー装置2000を実装したプロセッサ要素の全体構成を示すブロック図である。
同図において、前述した図8に示す実施例内のブロックと同一のブロックには同一の符号を付与しており詳しい説明は省略する。
FIG. 13 is a block diagram showing an overall configuration of a processor element in which the queue device 2000 that implements the data restoration processing is implemented by hardware.
In the figure, the same reference numerals are assigned to the same blocks as those in the embodiment shown in FIG. 8 described above, and detailed description thereof is omitted.

本実施例においては、FIFOバッファ1010は1個のみ備えられ、これに対応して該FIFOバッファ1010内の格納パケット数を計数するカウンタ1040が設けられている。   In this embodiment, only one FIFO buffer 1010 is provided, and a counter 1040 for counting the number of stored packets in the FIFO buffer 1010 is provided correspondingly.

本実施例のオーバーフロー制御部2030は、前記図8に示す実施例と同様に、ラッチ回路1036、退避バッファ1020にFIFOバッファ1010に書き込まれるべきパケットデータが退避されていることを示すフラグ1032を備えている。そして、これらの回路以外に、上述した退避バッファ1020用に設けられた書き込みポインタWPと読み出しポインタRP、ポインタ比較器2031、シーケンサ2032、2つのマルチプレクサ2033,2034を備えている。   The overflow control unit 2030 of this embodiment includes a flag 1032 indicating that packet data to be written to the FIFO buffer 1010 is saved in the latch circuit 1036 and the save buffer 1020, as in the embodiment shown in FIG. ing. In addition to these circuits, a write pointer WP and a read pointer RP, a pointer comparator 2031, a sequencer 2032, and two multiplexers 2033 and 2034 provided for the save buffer 1020 are provided.

ポインタ比較器2031は、上記2つのポインタWP,RPの値を入力・比較し、退避バッファ1020が現在、“空”になっているか又は“充満状態”にあるかを検出する。そして、退避バッファ1020が“空”になっていればempty3信号を、“充満状態”になっていればfull3信号をシーケンサ2032に出力する。退避バッファ1020は、上述したようにリングバッファの構成となっているので、“空”の状態のときには上記両ポインタの値は一致し、充満状態のときには上記両ポインタはリングバッファ上における隣接するアドレスを指すことになる。   The pointer comparator 2031 inputs and compares the values of the two pointers WP and RP, and detects whether the save buffer 1020 is currently “empty” or “full”. If the save buffer 1020 is “empty”, the empty 3 signal is output to the sequencer 2032. If the save buffer 1020 is “full”, the full 3 signal is output to the sequencer 2032. Since the save buffer 1020 has a ring buffer configuration as described above, the values of the two pointers match when in the “empty” state, and the pointers are adjacent addresses on the ring buffer when full. Will point to.

シーケンサ2032は、オーバーフロー制御部2030を全体を制御し、プロセッサ100からのFIFOバッファ1010に対するパケットデータdataとそれに付加されるend bit データの書き込み要求信号Wをバスインタフェース400を介して受信する。そして、ラッチ回路1036に該パケットデータdataとend bit データをラッチさせる。   The sequencer 2032 controls the overflow control unit 2030 as a whole, and receives the packet data data from the processor 100 to the FIFO buffer 1010 and an end bit data write request signal W added thereto via the bus interface 400. Then, the latch circuit 1036 latches the packet data data and end bit data.

マルチプレクサ2033は、シーケンサ2032から加えられる入力選択信号select1に従って上記ポインタWPまたはRPのいずれか一方をアドレス信号としてバスインタフェース400に出力する。このアドレス信号は、バス200を介してメモリ200に送られる。すなわち、シーケンサ2032は、FIFOバッファ1010への投入データを退避バッファ1020に退避させる場合には、書き込みポインタWPの値が選択出力されるように、退避バッファ1020に退避されているデータをFIFOバッファ1010にリストアさせる場合には読み出しポインタRPの値が選択出力されるようにマルチプレクサ2033を制御する。   The multiplexer 2033 outputs either the pointer WP or RP to the bus interface 400 as an address signal in accordance with the input selection signal select 1 added from the sequencer 2032. This address signal is sent to the memory 200 via the bus 200. That is, when the sequencer 2032 saves the input data to the FIFO buffer 1010 in the save buffer 1020, the data saved in the save buffer 1020 is output to the FIFO buffer 1010 so that the value of the write pointer WP is selectively output. When the data is restored, the multiplexer 2033 is controlled so that the value of the read pointer RP is selectively output.

マルチプレクサ2034は、シーケンサ2032から加えられる入力選択信号select2に従って、ラッチ回路1036にラッチされたプロセッサ100の書き込みデータまたは退避バッファ1020から読み出されたリストア用のデータのいずれか一方を、FIFOバッファ1010に選択出力する。すなわち、シーケンサ2032は、プロセッサ100から書き込み要求がなされたパケットデータdataをFIFOバッファ1010に直接書き込む場合にはラッチ回路1036にラッチされているパケットデータdataが選択出力されるように、退避バッファ1020から読み出されたリストア用のパケットデータdataをFIFOバッファ1010に書き込む場合にはバスインタフェース400から入力される上記リストア用のパケットデータdataが選択出力さるようにマルチプレクサ2034を制御する。また、シーケンサ2032は、上記マルチプレクサ2034からの出力パケットデータdataをFIFOバッファ1010に書き込むときには、ライトイネーブル信号write 2をイネーブルにしてFIFOバッファ1010に加える。   The multiplexer 2034 stores either the write data of the processor 100 latched in the latch circuit 1036 or the restore data read from the save buffer 1020 in the FIFO buffer 1010 in accordance with the input selection signal select2 applied from the sequencer 2032. Select output. That is, when the sequencer 2032 directly writes the packet data data requested to be written by the processor 100 to the FIFO buffer 1010, the sequencer 2032 selects the packet data data latched in the latch circuit 1036 from the save buffer 1020. When the read packet data data for restoration is written in the FIFO buffer 1010, the multiplexer 2034 is controlled so that the restoration packet data data input from the bus interface 400 is selectively output. Further, when the output packet data data from the multiplexer 2034 is written in the FIFO buffer 1010, the sequencer 2032 enables the write enable signal write 2 and adds it to the FIFO buffer 1010.

シーケンサ2032は、ラッチ回路1036にパケットの最後のデータdataがラッチされると、該データdataと共にもラッチ回路1036にラッチされたend-bit の値によりラッチ回路1036にパケットの最後のデータdataがラッチされたことを認識する。そして、該最後のデータdataをFIFOバッファ1010に書き込んだ後にカウンタ1040をインクリメント(+1)する。   When the last data data of the packet is latched in the latch circuit 1036, the sequencer 2032 latches the last data data of the packet in the latch circuit 1036 according to the end-bit value latched in the latch circuit 1036 together with the data data. Recognize that Then, after writing the last data data to the FIFO buffer 1010, the counter 1040 is incremented (+1).

本実施例においては、FIFOバッファ1010は1個しか実装されていないので、退避バッファ1020に格納されるパケットデータの形式は図14に示すように、前述した実施例とは異なり、end-bit のみが付加された形式となる。シーケンサ2032は退避バッファ1020からFIFOバッファ1010へリストアするパケットデータdataを読み出した際、該end-bit の情報によりパケットの最後のデータdataの読み出しを検出する。そして、該最後のデータdataをFIFOバッファ1010にリストアした後に、カウンタ1040をインクリメント(+1)する。また、パケット処理装置500は、FIFOバッファ1010からパケットの最後のデータを読み出す毎に、該カウンタ1040をデクリメント(−1)する。   In this embodiment, since only one FIFO buffer 1010 is mounted, the format of the packet data stored in the save buffer 1020 is different from the above-described embodiment as shown in FIG. Will be added. When the sequencer 2032 reads the packet data data to be restored from the save buffer 1020 to the FIFO buffer 1010, the sequencer 2032 detects reading of the last data data of the packet based on the end-bit information. Then, after the last data data is restored to the FIFO buffer 1010, the counter 1040 is incremented (+1). The packet processing device 500 decrements (-1) the counter 1040 each time the last data of the packet is read from the FIFO buffer 1010.

以上のような構成の実施例におけるキュー装置2000の動作を、図15のフローチャートを参照しながら説明する。
オーバーフロー制御部2030のシーケンサ2032は、下記の(A)〜(D)の判断を行う。
The operation of the queue device 2000 in the embodiment having the above configuration will be described with reference to the flowchart of FIG.
The sequencer 2032 of the overflow control unit 2030 makes the following determinations (A) to (D).

(A)プロセッサ100からキューすなわちFIFOバッファ1010へのパケットデータdataの書き込み要求があると、退避バッファ1020に“空き”があるか否か調べる。これは、ポインタ比較器2031から入力されるfull3信号がアクティブになっているか否かによって判断する。非アクティブであれば、退避バッファ1020には“空き”がある。   (A) When there is a write request for packet data data from the processor 100 to the queue, that is, the FIFO buffer 1010, it is checked whether or not the save buffer 1020 has “free”. This is determined by whether or not the full3 signal input from the pointer comparator 2031 is active. If inactive, the save buffer 1020 has “free”.

(B)オーバーフローフラグ1032にセットされているflag情報を参照して該オーバーフローフラグ1032がセットされているか否か判別することにより、現在、オーバーフローデータが退避バッファ1020に退避されているか調べる。そして、退避データがあれば次にFIFOバッファ1010からのfull2信号の状態を調べ、現在、FIFOバッファ1010に“空き”があるか調べる。   (B) It is checked whether the overflow data is currently saved in the save buffer 1020 by referring to the flag information set in the overflow flag 1032 to determine whether the overflow flag 1032 is set. If there is saved data, the state of the full2 signal from the FIFO buffer 1010 is next checked to check whether the FIFO buffer 1010 currently has “free”.

(C)上記判断(A)において、現在、退避バッファ1020に“空き”があると判断すると、次に、オーバーフローフラグ1032がセットされているか又はFIFOバッファ1010が充満状態(フル状態)にあるか調べる。上述したように、オーバーフローフラグ1032がセットされていることは現在、退避バッファ1020に退避データが存在することを意味する。   (C) If it is determined in the above determination (A) that the save buffer 1020 is currently “empty”, then whether the overflow flag 1032 is set or whether the FIFO buffer 1010 is full (full state). Investigate. As described above, the overflow flag 1032 being set means that save data currently exists in the save buffer 1020.

(D)上記判断(A)において、現在、退避バッファ1020に“空き”があると判断すると、オーバーフローフラグ1032がオフとなっており、かつFIFOバッファ1010に“空き”があるか否か調べる。   (D) If it is determined in the determination (A) that the save buffer 1020 currently has “free”, it is checked whether the overflow flag 1032 is off and the FIFO buffer 1010 has “free”.

シーケンサ2032は、上記(A)〜(D)の判断を行い、その判断結果に応じてプロセッサ100からキューに対する書き込み要求のあったパケットデータをFIFOバッファ1010または退避バッファ1020のいずれかに書き込む。また、退避バッファ1020に退避されていたパケットデータをFIFOバッファ1010にリストアする。   The sequencer 2032 makes the above determinations (A) to (D), and writes the packet data requested to be written to the queue from the processor 100 in either the FIFO buffer 1010 or the save buffer 1020 according to the determination result. Further, the packet data saved in the save buffer 1020 is restored to the FIFO buffer 1010.

すなわち、システムの動作開始時には、上記(D)の判断においてオーバーフローフラグ1032がリセットされており、かつFIFOバッファ1010に“空き”があることが認識され、プロセッサ100からのキューに対する書き込み要求データは、FIFOバッファ1010に順次書き込まれる(ステップS11)。そして、FIFOバッファ1010に書き込んだパケットデータに付加されているend-bit が“オン”となっている場合、すなわち、FIFOバッファ1010にパケットの最後のデータを書き込んだ際にはカウンタ1040をインクリメント(+1)する(ステップS12)。これにより、カウンタ1040にはFIFOバッファ1010に格納されているパケット数がセットされる。その後も、マイクロプロセッサ100のキューへの書き込みデータは、上記ステップS11〜S12の処理によりFIFOバッファ1010に書き込まれていく。   That is, at the start of the operation of the system, it is recognized that the overflow flag 1032 is reset in the determination of (D) and that the FIFO buffer 1010 has “free”, and the write request data for the queue from the processor 100 is The data is sequentially written into the FIFO buffer 1010 (step S11). When the end-bit added to the packet data written to the FIFO buffer 1010 is “ON”, that is, when the last data of the packet is written to the FIFO buffer 1010, the counter 1040 is incremented ( +1) (step S12). As a result, the number of packets stored in the FIFO buffer 1010 is set in the counter 1040. Even after that, the write data to the queue of the microprocessor 100 is written to the FIFO buffer 1010 by the processing of steps S11 to S12.

そして、やがてFIFOバッファ1010が充満状態になると、FIFOバッファ1010から出力されるfull2信号が“アクティブ”になる。これにより、シーケンサ2032は、上記判断(C)において、FIFOバッファ1010が充満状態(フル)になったことを検出し、これ以降のマイクロプロセッサ100からのキューに対する書き込みデータdataは退避バッファ1020に書き込む。このとき、図14に示すように書き込みデータdataに対して“end-bit ”を付加する(ステップS21)。そして、該データdataの書き込み後、書き込みポインタWPをインクリメント(+1)し(ステップS22)。オーバーフローフラグ1032を“オン”にセットする(ステップS23)。シーケンサ2032は、このように、オーバーフローフラグが“オン”になると、マイクロプロセッサ100からキューへのパケットデータdataの書き込み要求がある毎に、上記ステップS21〜S23の処理を行い、退避バッファ1020に該パケットデータdataを書き込む。   Then, when the FIFO buffer 1010 becomes full, the full2 signal output from the FIFO buffer 1010 becomes “active”. As a result, the sequencer 2032 detects that the FIFO buffer 1010 is full (full) in the determination (C), and writes write data data to the queue from the microprocessor 100 thereafter to the save buffer 1020. . At this time, as shown in FIG. 14, "end-bit" is added to the write data data (step S21). Then, after the data data is written, the write pointer WP is incremented (+1) (step S22). The overflow flag 1032 is set to “ON” (step S23). As described above, when the overflow flag is turned “ON”, the sequencer 2032 performs the processing of steps S21 to S23 each time there is a request for writing the packet data data from the microprocessor 100 to the queue, and stores it in the save buffer 1020. Write packet data data.

その後、パケット処理装置500によりFIFOバッファ1010からパケットの取り出しが行われ、FIFOバッファ1010に“空き”が生じると、FIFOバッファ1010から出力されるfull2信号は非アクティブとなる。これにより、シーケンサ2032は、上記判断(B)においてFIFOバッファ1010に“空き”が生じたことを検出する。また、オーバーフローフラグ1032がセットされていることにより、退避バッファ1020にオーバーフローデータ(退避データ)が格納されていることを知る。   Thereafter, when the packet processing device 500 extracts a packet from the FIFO buffer 1010 and “free” is generated in the FIFO buffer 1010, the full2 signal output from the FIFO buffer 1010 becomes inactive. Thereby, the sequencer 2032 detects that “free” has occurred in the FIFO buffer 1010 in the determination (B). Further, when the overflow flag 1032 is set, it is known that overflow data (saved data) is stored in the save buffer 1020.

これにより、シーケンサ2032は退避バッファ1020の読み出しポインタRPの指すアドレスからパケットデータdataを読み出し、該データdataをFIFOバッファ1010に書き込む(ステップS31)。続いて、読み出しポインタRPをインクリメント(+1)する(ステップS32)。そして、FIFOバッファ1010に書き込んだパケットデータdataに付加されていたend-bit が“オン”にセットされていたならば、カウンタ1040をインクリメント(+1)する。すなわち、FIFOバッファ1010に1パケットをリストアするごとにカウンタ1040をインクリメント(+1)する(ステップS33)。この後、ポインタ比較器2031から入力されるempty3信号の状態を調べ、退避バッファ1020が“空”になったか否か調べ、退避バッファ1020に退避されていたデータdataが皆無になったならば、オーバーフローフラグ1032をクリア(リセット)する(ステップS34)。   As a result, the sequencer 2032 reads the packet data data from the address pointed to by the read pointer RP of the save buffer 1020 and writes the data data to the FIFO buffer 1010 (step S31). Subsequently, the read pointer RP is incremented (+1) (step S32). If the end-bit added to the packet data data written to the FIFO buffer 1010 is set to “on”, the counter 1040 is incremented (+1). That is, the counter 1040 is incremented (+1) every time one packet is restored in the FIFO buffer 1010 (step S33). Thereafter, the state of the empty3 signal input from the pointer comparator 2031 is checked to check whether or not the save buffer 1020 has become “empty”. The overflow flag 1032 is cleared (reset) (step S34).

シーケンサ2032は、例えばマイクロプロセッサ100からキューへのパケットデータdataの書き込み要求が無い間、上記ステップS31〜S34の処理を随時行う。これにより、マイクロプロセッサ100がバス200を使用していない間を利用して、退避バッファ1020からFIFOバッファ1010へのデータのリストアを、マイクロプロセッサ100の動作を妨げることなく行うことができる。   The sequencer 2032 performs the processes of steps S31 to S34 as needed while there is no request for writing packet data data from the microprocessor 100 to the queue, for example. As a result, it is possible to restore data from the save buffer 1020 to the FIFO buffer 1010 without interfering with the operation of the microprocessor 100 while the microprocessor 100 is not using the bus 200.

次に、図16は本発明のさらに別の実施例であるキュー装置3000を実装したプロセッサ要素の全体構成を示すブロック図である。同図において、前述した図8に示すプロセッサ要素内のブロックと同一のブロックには同一の符号を付与してあり、これらについては詳しい説明は省略する。   Next, FIG. 16 is a block diagram showing an overall configuration of a processor element in which a queue device 3000 according to still another embodiment of the present invention is mounted. In the figure, the same reference numerals are given to the same blocks as the blocks in the processor element shown in FIG. 8, and a detailed description thereof will be omitted.

本実施例のFIFOバッファ3010は、2つのFIFOメモリ1,2(以下、単にFIFO1,2と記述する)から成っており、各FIFO1,2はリングバッファ構成となっている。図17にその詳しい構成を示す。   The FIFO buffer 3010 of this embodiment is composed of two FIFO memories 1 and 2 (hereinafter simply referred to as FIFOs 1 and 2), and each FIFO 1 and 2 has a ring buffer configuration. FIG. 17 shows the detailed configuration.

FIFOi(i=1,2,)は、FIFOバッファ3110と、該バッファ3110への次のデータの書き込みアドレスを指す書き込みポインタwpiと、次のデータの読み出しアドレスを指す読み出しポインタrpiから成っている。そして、これらの2つのポインタwpi,rpiを操作することにより、エンドレスなバッファとして機能する。   The FIFOi (i = 1, 2,) includes a FIFO buffer 3110, a write pointer wpi indicating the next data write address to the buffer 3110, and a read pointer rpi indicating the next data read address. Then, by operating these two pointers wpi and rpi, it functions as an endless buffer.

FIFOバッファ3110に書き込まれるパケットの形式を図18に示す。同図に示すように、パケットの先頭(第1ワード目)にはパケットの全体長を示すサイズ情報が設定されている。   The format of a packet written to the FIFO buffer 3110 is shown in FIG. As shown in the figure, size information indicating the entire length of the packet is set at the head (first word) of the packet.

各FIFO1,2にそれぞれ対応してパケット完結検出部3060が設けられている。該パケット完結検出部3060は、対応するFIFO1,2に完結したパケットが格納されているか否かを検出するもので、1個以上の完結されたパケットがFIFO1,2に格納されていれば外部出力のpacket complete 1,2信号を“アクティブ”にする。このpacket complete 1,2信号は、アービタ3050に入力されており、アービタ3050はこのpacket complete 1,2信号により前記マルチプレクサ1060並びにマルチプレクサ1070を制御する。すなわち、このpacket complete 1,2信号は、アービタ3050に対して前記カウンタC1,C2の代替として機能する。そして、アービタ3050は、FIFO1,2からパケットデータdataを読み出す毎に上記ポインタrp1,2を更新する。また、上記書き込みポインタwp1,2の操作は、オーバーフロー制御部3030内の不図示のシーケンサによって行われる。   A packet completion detection unit 3060 is provided corresponding to each of the FIFOs 1 and 2. The packet completion detection unit 3060 detects whether or not a completed packet is stored in the corresponding FIFO 1 or 2. If one or more completed packets are stored in the FIFO 1 or 2, an external output is performed. Set the packet complete 1 and 2 signals to “active”. The packet complete 1 and 2 signals are input to the arbiter 3050, and the arbiter 3050 controls the multiplexer 1060 and the multiplexer 1070 by the packet complete 1 and 2 signals. That is, the packet complete 1 and 2 signals function as an alternative to the counters C1 and C2 for the arbiter 3050. The arbiter 3050 updates the pointers rp1 and rp2 each time the packet data data is read from the FIFO1 and FIFO2. The write pointers wp1 and 2 are operated by a sequencer (not shown) in the overflow control unit 3030.

次に、パケット完結検出部3060の内部の回路構成を図17を参照しながら説明する。
パケットデコーダ3061は、FIFO1,2内に格納されているパケットの先頭ワードのデータをデコードして、該パケットの全体サイズを示すパケット長(packet size)をコンパレータ3063に出力する。
Next, an internal circuit configuration of the packet completion detection unit 3060 will be described with reference to FIG.
The packet decoder 3061 decodes the data of the first word of the packet stored in the FIFOs 1 and 2, and outputs a packet length indicating the entire size of the packet to the comparator 3063.

演算器3062は、FIFO1,2から上記2つのポインタrp,wpの値を入力し、両ポインタ値からFIFO1,2に格納されているパケットデータの個数(ワード数)を示すデータ長(data length)を求め、これを上記コンパレータ3063に出力する。   The arithmetic unit 3062 receives the values of the two pointers rp and wp from the FIFOs 1 and 2, and the data length indicating the number of packet data (number of words) stored in the FIFOs 1 and 2 from both pointer values. Is output to the comparator 3063.

コンパレータ3063は、パケットデコーダ3061から入力されるパケット長と演算器3062から入力されるデータ長とを比較する。そして、該データ長がパケット長以上であれば、FIFO1,2内においてパケットが完結していることを示すべくアービタ3050に加えるpacket complete 信号1,2を“アクティブ”にする。   The comparator 3063 compares the packet length input from the packet decoder 3061 with the data length input from the calculator 3062. If the data length is equal to or longer than the packet length, the packet complete signals 1 and 2 applied to the arbiter 3050 are set to “active” to indicate that the packet is completed in the FIFOs 1 and 2.

ポインタ比較器3064は、前述した図13に示すポインタ比較器2031と同様な動作を行うものでFIFO1,2から上記2つのポインタrp(rp1,2),wp(wp1,2)を入力し、これら両ポインタ値を比較して、FIFO1,2が“充満状態(full) ”にあることを示すfullフラグ1,2信号と、該FIFO1,2が“空”になっていることを示すemptyフラグ1,2信号を生成し、これらをオーバーフロー制御部3030に出力する。   The pointer comparator 3064 performs the same operation as the above-described pointer comparator 2031 shown in FIG. 13 and inputs the above two pointers rp (rp1,2) and wp (wp1,2) from the FIFOs 1,2. The two pointer values are compared, and a full flag 1 and 2 signal indicating that the FIFOs 1 and 2 are in “full state” and an empty flag 1 indicating that the FIFOs 1 and 2 are “empty”. , 2 signals are generated and output to the overflow control unit 3030.

本実施例におけるオーバーフロー制御部3030内におけるインタラプト発生部3039の構成を図19に示す。
同図に示すように、インタラプト発生部3039は前述したインタラプト発生部1039からコンパレータ1102,1106を削除した構成となっており、アンドゲート1104,1108には、それぞれ前記パケット完結検出部3060から出力されるemptyフラグ1,2信号が入力される。そして、前記インタラプト発生部1039と同様に、フラグFi(i=1,2)がセットされているときにFIFOiが“空”になったら、割り込み信号Interrupt 2を“アクティブ”にしてプロセッサ100に割り込みをかける。
The configuration of the interrupt generation unit 3039 in the overflow control unit 3030 in this embodiment is shown in FIG.
As shown in the figure, the interrupt generation unit 3039 has a configuration in which the comparators 1102 and 1106 are deleted from the interrupt generation unit 1039 described above. Empty flag 1 and 2 signals are input. Similarly to the interrupt generation unit 1039, when the FIFO Fi becomes “empty” when the flag Fi (i = 1, 2) is set, the interrupt signal Interrupt 2 is set to “active” to interrupt the processor 100. multiply.

上述した実施例においては、パケット処理装置500は、FIFOバッファ1010内でパケットが完結した時点で、該パケットを取り出す。換言すれば、FIFOバッファ1010内でパケットが未完結な場合、そのパケットデータdataのFIFOバッファ1010からの出力を抑制できる。これにより、プロセッサ100のソフトウェア処理により、FIFOバッファ1010にいったん入力された未完結なパケットの一部のデータdataをFIFOバッファ1010から取り出し一時的にメモリ300上に設け不図示の退避領域に退避させておき、その後、この退避領域に退避させていたパケットデータdataを再びFIFOバッファ1010に復帰させることによりこのパケットをその他のパケットと同様にFIFOバッファ1010内で完結させることが可能である。   In the embodiment described above, the packet processing device 500 takes out the packet when the packet is completed in the FIFO buffer 1010. In other words, when a packet is incomplete in the FIFO buffer 1010, output of the packet data data from the FIFO buffer 1010 can be suppressed. As a result, a part of data data of an incomplete packet once input to the FIFO buffer 1010 is extracted from the FIFO buffer 1010 and temporarily provided in the memory 300 and saved in a save area (not shown) by software processing of the processor 100. It is possible to complete the packet in the FIFO buffer 1010 like other packets by returning the packet data data saved in the save area to the FIFO buffer 1010 again.

このような機能は、プロセッサ100がマルチプログラム処理をサポートしている場合に有効である。この場合、複数のプロセス(ここで、プロセスとは1つのプログラムの走行単位とする)が、1つのFIFOバッファ(FIFO1またはFIFO2)をキューとして共有する際、あるプロセスが該FIFOバッファにパケットを書き込んでいる途中で、別のプロセスに実行権がスイッチされこの別のプロセスがFIFOバッファにパケットを書き込む場合があり得る。このような場合、上記機能を利用することにより、両プロセスがFIFOバッファに正しくパケットを書き込むことが可能になる。   Such a function is effective when the processor 100 supports multi-program processing. In this case, when a plurality of processes (here, a process is a running unit of one program) shares one FIFO buffer (FIFO1 or FIFO2) as a queue, a process writes a packet to the FIFO buffer. On the way, the execution right may be switched to another process, and this another process may write a packet to the FIFO buffer. In such a case, by using the above function, both processes can correctly write a packet to the FIFO buffer.

図20及び図21は、上記機能を実現するプロセッサ100並びにキュー装置1000,2000もしくは3000の動作を説明するフローチャートである。図20のフローチャートは、プロセッサ100がプロセスAの実行中に該プロセスAの実行を中断し、他のプロセスBの実行に移行する場合の動作を説明するフローチャートである。   20 and 21 are flowcharts for explaining the operation of the processor 100 and the queue devices 1000, 2000, or 3000 for realizing the above functions. The flowchart in FIG. 20 is a flowchart for explaining the operation when the processor 100 interrupts the execution of the process A during the execution of the process A and shifts to the execution of another process B.

この場合、プロセッサ100はオーバーフロー制御部1030(2030もしくは3030)を介しFIFOバッファ1010の書き込みポインタの値を読み出す(ステップS101)。   In this case, the processor 100 reads the value of the write pointer in the FIFO buffer 1010 via the overflow control unit 1030 (2030 or 3030) (step S101).

次に、該書き込みポインタの指すアドレスのデータdataをオーバーフロー制御部1030(2030もしくは3030)を介しFIFOバッファ1010から読み出し(ステップS102)、該データがプロセスAが書き込み途中のデータdataであるか否か判別する(ステップS103)。そして、プロセスAが書き込み途中のデータdataであれば(S103,YES)、このデータdataをメモリ300上の退避領域に退避する。そして、このデータの退避に伴ってFIFOバッファ1010の書き込みポインタを修正する(ステップS104)。   Next, the data data at the address pointed to by the write pointer is read from the FIFO buffer 1010 via the overflow control unit 1030 (2030 or 3030) (step S102), and whether or not the data is the data data being written by the process A. It discriminate | determines (step S103). If the process A is data data being written (S103, YES), the data data is saved in a save area on the memory 300. Then, the write pointer of the FIFO buffer 1010 is corrected along with the saving of this data (step S104).

上記ステップS101〜S104の処理を、プロセスAが書き込み途中の全てのデータdataをFIFOバッファ1010からメモリ300の上記退避領域に退避するまで繰り返し、FIFOバッファ1010内にプロセスAが書き込み途中のパケットのデータdataが無くなると(S103,NO)、処理を終了する。   The processes in steps S101 to S104 are repeated until all the data data being written by the process A is saved from the FIFO buffer 1010 to the save area of the memory 300, and the data of the packet being written by the process A in the FIFO buffer 1010 When there is no data (S103, NO), the process is terminated.

以上の処理によって、プロセスAがその実行中にFIFOバッファ1010に書き込んでいた未完結のパケットがメモリ300の特定領域に退避される。
次に、図21はプロセッサ100がプロセスBの実行を終了して再びプロセスAの実行を再開する前に行う動作を説明するフローチャートである。
Through the above processing, an incomplete packet written in the FIFO buffer 1010 during the execution of the process A is saved in a specific area of the memory 300.
Next, FIG. 21 is a flowchart for explaining operations performed before the processor 100 finishes the execution of the process B and resumes the execution of the process A again.

プロセッサ100は、上記メモリ300上の上記退避領域を調べ、該退避領域にプロセスAの退避データdataが存在するか否か調べる(ステップS201)。
そして、該退避データdataが存在すれば(S201,YES)、これをオーバーフロー制御部1030(2030または3030)を介してFIFOバッファ1010に転送する。そして、該転送したデータ長に応じてFIFOバッファ1010の書き込みポインタを更新する(S202)。
The processor 100 checks the save area on the memory 300 and checks whether the save data data of the process A exists in the save area (step S201).
If the saved data data exists (S201, YES), it is transferred to the FIFO buffer 1010 via the overflow control unit 1030 (2030 or 3030). Then, the write pointer of the FIFO buffer 1010 is updated according to the transferred data length (S202).

以上の処理により、FIFOバッファ1010にはプロセスBが書き込んだパケットに続いて、プロセスAが中断させられる前に書き込んでいた未完結のパケットのデータdataが格納される。そして、これにより、プロセスAは実行再開後、残りのパケットデータdataを該格納済のパケットデータdataに続いて書き込み、FIFOバッファ1010に完結したパケットを書き込むことが可能になる。   Through the above processing, the data buffer of the incomplete packet written before the process A is interrupted is stored in the FIFO buffer 1010 after the packet written by the process B. Thus, after the process A is resumed, the process A can write the remaining packet data data following the stored packet data data and write the completed packet in the FIFO buffer 1010.

前記図20のステップS103におけるプロセスAが書き込み途中のデータがFIFOバッファ1010内に存在するか否かの判別は、例えば、以下のような方法により行う。
(1)前記図14に示すように、FIFOバッファ1010に格納する各パケットデータにend bit を付加する構成を採用する場合、FIFOバッファ1010に最後に書き込まれたパケットデータに付加されているend bit の値を調べる。そして、該end bit に“0”(パケットの末尾データではないことを示す情報)が設定されていた場合には、プロセスAが書き込み途中のデータがFIFOバッファ1010内に在ると判断する。そして、この場合には、図22に示すようにend bit が“1”(パケットの末尾データであることを示す情報)に設定されている前パケットの末尾データの直前に格納されているパケットデータ(data) をメモリ300上に設けられた退避領域に退避させる。
Whether or not the data being written by the process A in step S103 of FIG. 20 exists in the FIFO buffer 1010 is determined by the following method, for example.
(1) As shown in FIG. 14, when adopting a configuration in which an end bit is added to each packet data stored in the FIFO buffer 1010, the end bit added to the packet data last written in the FIFO buffer 1010 Check the value of. If the end bit is set to “0” (information indicating that it is not the end data of the packet), it is determined that the data being written by the process A is in the FIFO buffer 1010. In this case, as shown in FIG. 22, the packet data stored immediately before the end data of the previous packet in which the end bit is set to “1” (information indicating the end data of the packet). (Data) is saved in a save area provided on the memory 300.

(2)バスインタフェース400にFIFOバッファ1010に書き込まれるパケットのデータ数を計数するカウンタを設ける。このカウンタは、FIFOバッファ1010内に対するパケットの書き込み動作が開始される毎に計数を開始し、FIFOバッファ1010にパケットの最後のデータの書き込みを終了した時点で“0”にリセットされ計数を終了する。したがって、プロセスAからプロセスBへの切り換えが発生した場合、上記カウンタの値を調べることにより、プロセスAがパケットの書き込み途中であったか否かを判断できる。すなわち、上記カウンタの値が“0”であればパケットの書き込みは終了している。これに対し、該カウンタの値が“0”でない場合は、プロセスAが書き込み途中のデータが該カウンタ値に等しい個数だけ有ることが分かる。したがって、FIFOバッファ1010の末尾(一番最後に書かれたデータ)から、そのカウンタ値に等しい個数のデータをメモリ300上の退避領域に退避させる。   (2) The bus interface 400 is provided with a counter that counts the number of data of packets written to the FIFO buffer 1010. This counter starts counting every time a packet writing operation to the FIFO buffer 1010 is started, and is reset to “0” when the last data writing of the packet to the FIFO buffer 1010 is completed, and the counting ends. . Therefore, when switching from the process A to the process B occurs, it is possible to determine whether or not the process A was in the middle of packet writing by examining the value of the counter. That is, if the value of the counter is “0”, the packet writing is finished. On the other hand, when the value of the counter is not “0”, it can be seen that there are as many pieces of data as process A is in the middle of writing. Therefore, the number of data equal to the counter value is saved in the save area on the memory 300 from the end of the FIFO buffer 1010 (data written last).

(3)前記図8または図16に示すアービタ1050または3050に対して、図23に示すように、入力信号pause と出力信号stopを付加する。入力信号pause はアービタ1050または3050に対して「停止」を指示する信号であり、出力信号stopはアービタ1050または3050がFIFOバッファ1010からのデータ出力を停止させている状態(停止状態)を示す信号である。   (3) An input signal pause and an output signal stop are added to the arbiter 1050 or 3050 shown in FIG. 8 or 16, as shown in FIG. The input signal pause is a signal for instructing the arbiter 1050 or 3050 to “stop”, and the output signal stop is a signal indicating that the arbiter 1050 or 3050 has stopped outputting data from the FIFO buffer 1010 (stop state). It is.

アービタ1050または3050は、pause 信号により「停止」が指示されると( 図24(a) )、FIFOバッファ1010からパケットAの出力途中のデータが最後まで出力されるまで、すなわち、パケット処理装置500からアクティブのdone信号が出力されるまでFIFOバッファ1010からデータを出力させる(図24(b) ,(c) )。そして、パケットAのデータが最後まで出力されると、FIFOバッファ1010からのデータ出力を停止させ、上記「停止状態」を示すstop信号をアクティブにする。したがって、stop信号がアクティブになっている状態においては、FIFOバッファ1010の先頭データは必ずパケットの先頭のデータとなっている。   When the arbiter 1050 or 3050 is instructed to “stop” by the pause signal (FIG. 24A), the data in the middle of the output of the packet A is output from the FIFO buffer 1010 to the end, that is, the packet processing device 500. The data is output from the FIFO buffer 1010 until an active done signal is output from (FIGS. 24B and 24C). When the data of the packet A is output to the end, the data output from the FIFO buffer 1010 is stopped, and the stop signal indicating the “stop state” is activated. Therefore, when the stop signal is active, the head data of the FIFO buffer 1010 is always the head data of the packet.

マイクロプロセッサ100は、プロセスAからプロセスBへ実行プロセスを切り換える際、例えば、バスインタフェース400を介してアービタ1050または3050にアクティブのpause 信号を加える。そして、stop信号がアクティブに変化するのをバスインタフェース400を介して検出すると、FIFOバッファ1010の先頭からデータを順次読み出して、FIFOバッファ1010内の内容を解析することにより、不完全なパケットすなわちプロセスAが書き込み途中の未完結なパケットのデータがFIFOバッファ1010内にあるか否かを検出できる。   When the microprocessor 100 switches the execution process from the process A to the process B, for example, the microprocessor 100 adds an active pause signal to the arbiter 1050 or 3050 via the bus interface 400. When the stop signal is detected to change actively through the bus interface 400, data is sequentially read from the head of the FIFO buffer 1010, and the contents in the FIFO buffer 1010 are analyzed, thereby obtaining an incomplete packet, that is, a process. A can detect whether data of an incomplete packet being written is in the FIFO buffer 1010.

本発明の原理を説明する図(その1)である。It is FIG. (1) explaining the principle of this invention. 本発明の原理を説明する図(その2)である。It is FIG. (2) explaining the principle of this invention. 本発明の原理を説明する図(その3)である。It is FIG. (3) explaining the principle of this invention. 本発明の原理を説明する図(その4)である。It is FIG. (4) explaining the principle of this invention. 本発明の一実施例のキュー装置の全体構成を示すブロック図である。1 is a block diagram illustrating an overall configuration of a queue device according to an embodiment of the present invention. FIFOバッファを、パケットを格納するキューとして使用する場合の一実施例を示す模式図である。It is a schematic diagram which shows one Example in the case of using a FIFO buffer as a queue which stores a packet. 上述した図6に示す構成のFIFOバッファに格納するパケットの各データに該データがパケットの最後のデータであるか否かを示す1ビットの情報(end bit)を付加するようにした実施例を示す図である。Embodiment in which 1-bit information (end bit) indicating whether or not the data is the last data of the packet is added to each data of the packet stored in the FIFO buffer having the configuration shown in FIG. FIG. 本発明の実施例のキュー装置を適用したプロセッサ要素の全体的な回路構成を示すブロック図てある。It is a block diagram which shows the whole circuit structure of the processor element to which the cue apparatus of the Example of this invention is applied. (a) ,(b) は、上記図8に示すインタラプト発生部1039の回路構成例を示す図である。(a), (b) is a figure which shows the circuit structural example of the interrupt generation part 1039 shown in the said FIG. 上記図8に示すFIFOバッファ(FIFO1,FIFO2)に格納されるパケットの形式を示す図である。It is a figure which shows the format of the packet stored in the FIFO buffer (FIFO1, FIFO2) shown in the said FIG. 上記図8に示す退避バッファ1020に退避されるパケットの形式を示す図である。It is a figure which shows the format of the packet evacuated by the evacuation buffer 1020 shown in the said FIG. 退避バッファからFIFOバッファへのデータリストア処理を完全にハードウェアで実現するキュー装置を実装したプロセッサ要素で用いられる退避バッファの構成例を示す図である。It is a figure which shows the structural example of the save buffer used with the processor element which mounted the queue apparatus which implement | achieves the data restore process from a save buffer to a FIFO buffer completely with hardware. 上記データリストア処理をハードウェアにより実現するキュー装置を実装したプロセッサ要素の全体構成を示すブロック図である。It is a block diagram which shows the whole structure of the processor element which mounted the queue apparatus which implement | achieves the said data restoration process with hardware. 上記図13に示すキュー装置内の退避バッファ1020に格納されるパケットデータの形式を示す図である。It is a figure which shows the format of the packet data stored in the save buffer 1020 in the queue apparatus shown in FIG. 上記図13に示すキュー装置の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the queue apparatus shown in the said FIG. 本発明のさらに別の実施例であるキュー装置を実装したプロセッサ要素の全体構成を示すブロック図である。It is a block diagram which shows the whole structure of the processor element which mounted the queue apparatus which is another Example of this invention. 上記図16に示すFIFOバッファの構成を説明する図である。It is a figure explaining the structure of the FIFO buffer shown in the said FIG. 上記図17に示すFIFOバッファに書き込まれるパケットの形式を示す図である。It is a figure which shows the format of the packet written in the FIFO buffer shown in the said FIG. 上記図16に示すオーバーフロー制御部内におけるインタラプト発生部の構成を示す図である。It is a figure which shows the structure of the interrupt generation part in the overflow control part shown in the said FIG. プロセッサがプロセスAの実行中に該プロセスAの実行を中断し、同一のFIFOバッファをキューとして共有する他のプロセスBの実行に移行する場合の動作を説明するフローチャートである。10 is a flowchart for explaining an operation in a case where the processor interrupts execution of the process A during execution of the process A and shifts to execution of another process B sharing the same FIFO buffer as a queue. プロセッサが前記プロセスBの実行を終了して再び前記プロセスAの実行を再開する前に行う動作を説明するフローチャートである。12 is a flowchart for explaining an operation performed before a processor finishes the execution of the process B and resumes the execution of the process A again. 上記図20で述べたFIFOバッファに格納する各パケットデータにend bitを付加する動作を採用する例を示す図である。FIG. 21 is a diagram illustrating an example in which the operation of adding an end bit to each packet data stored in the FIFO buffer described in FIG. 20 is adopted. 前記図8または図16に示すアービタに対して、入力信号pause と出力信号stopを付加する構成を説明する図である。FIG. 17 is a diagram illustrating a configuration in which an input signal pause and an output signal stop are added to the arbiter shown in FIG. 8 or FIG. 16. (a) ,(b) は、上記図23に示す構成のアービタの動作を説明する図である。(a), (b) is a figure explaining operation | movement of the arbiter of the structure shown in the said FIG.

符号の説明Explanation of symbols

1,11,21,41 FIFOバッファ
2,13,23 退避バッファ
3,14,24 フラグ
4,15,25 第1の検出手段
5,43 データ退避手段
6,17,27 第2の検出手段
7,18,28,44 データリストア手段
8 第3の検出手段
12 計数手段
16,26 パケットデータ退避手段
19,23 パケット完結検出手段
42 記憶手段
1,11,21,41 FIFO buffer 2,13,23 save buffer 3,14,24 flag 4,15,25 first detection means 5,43 data save means 6,17,27 second detection means 7, 18, 28, 44 Data restoration means 8 Third detection means 12 Counting means 16, 26 Packet data saving means 19, 23 Packet completion detection means 42 Storage means

Claims (5)

パケットが格納されるFIFOバッファと、
記憶手段と、
前記FIFOバッファ内に格納されているパケットデータの個数を計数する計数手段と、
前記計数手段の計数値と、パケットデータのパケット数とに基づいて、前記FIFOバッファ内に完結しているパケットが存在するか否かを検出するパケット完結検出手段と、
前記パケット完結手段により未完結と判別された前記FIFOバッファ内のデータを、前記記憶手段に退避させるデータ退避手段と、
を備えたことを特徴とするキュー装置。
A FIFO buffer in which packets are stored;
Storage means;
Counting means for counting the number of packet data stored in the FIFO buffer;
Packet completion detection means for detecting whether or not there is a completed packet in the FIFO buffer based on the count value of the counting means and the number of packets of packet data;
Data evacuation means for evacuating the data in the FIFO buffer determined to be incomplete by the packet completion means to the storage means;
A queue device comprising:
前記パケット完結検出手段は、前記計数手段の計数値と、前記FIFOに格納されたパケットデータのパケット内に格納されるパケットサイズ情報とに基づいて、前記FIFOバッファ内に完結したデータが存在するか否かを判別することを特徴とする請求項1記載のキュー装置。   The packet completion detection means determines whether complete data exists in the FIFO buffer based on the count value of the counting means and the packet size information stored in the packet data packet stored in the FIFO. The queue device according to claim 1, wherein it is determined whether or not. 前記FIFOバッファは、複数のプロセスによってパケットデータが書き込まれるものであり、
前記パケット完結手段は、プロセスAが前記FIFOバッファにパケットを書き込んでいる途中で別のプロセスBに実行権が切り替えられた際、前記FIFOバッファに書込未完結のデータが存在するか否かを判別し、
前記データ退避手段は、前記データパケット完結手段により前記FIFOバッファに書込未完結のデータが存在すると判別された場合に、前記FIFOバッファ内の書込未完結データを前記記憶装置に退避させることを特徴とする請求項1又は2記載のキュー装置。
The FIFO buffer is one in which packet data is written by a plurality of processes.
The packet completion means determines whether or not there is incompletely written data in the FIFO buffer when the execution right is switched to another process B while the process A is writing the packet to the FIFO buffer. Discriminate,
The data saving means saves the incomplete write data in the FIFO buffer to the storage device when the data packet completion means determines that there is incomplete write data in the FIFO buffer. The cue device according to claim 1 or 2, characterized in that:
前記プロセスAに再び実行権が移行した際、前記プロセスAの実行開始前に前記記憶手段に退避させておいたパケットデータを前記FIFOバッファに転送させるデータリストア手段を更に備えることを特徴とする請求項3記載のキュー装置。   And a data restoring means for transferring packet data saved in the storage means before the execution of the process A to the FIFO buffer when the execution right is transferred to the process A again. Item 4. The cue device according to item 3. 複数のプロセスによってパケットが書き込まれるFIFOバッファと、
記憶手段と、
プロセスAが前記FIFOバッファにパケットを書き込んでいる途中で別のプロセスBに実行権が切り換えられた際、前記プロセスAが書き込んだ未完結のパケットデータを前記FIFOバッファから取り出し前記記憶手段に退避させるデータ退避手段と、
再び前記プロセスAに実行権が移行した際、該プロセスAの実行開始前に前記記憶手段に退避させておいたパケットデータを前記FIFOバッファに転送させるデータリストア手段と、
を備えたことを特徴とするキュー装置。
A FIFO buffer into which packets are written by multiple processes;
Storage means;
When the execution right is switched to another process B while the process A is writing a packet to the FIFO buffer, the incomplete packet data written by the process A is taken out of the FIFO buffer and saved in the storage means. Data evacuation means;
Data restoration means for transferring the packet data saved in the storage means before the execution of the process A to the FIFO buffer when the execution right is transferred to the process A again;
A queue device comprising:
JP2005029027A 2005-02-04 2005-02-04 Queue device Expired - Lifetime JP3989493B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005029027A JP3989493B2 (en) 2005-02-04 2005-02-04 Queue device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005029027A JP3989493B2 (en) 2005-02-04 2005-02-04 Queue device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP16848294A Division JP3810449B2 (en) 1994-07-20 1994-07-20 Queue device

Publications (2)

Publication Number Publication Date
JP2005216317A true JP2005216317A (en) 2005-08-11
JP3989493B2 JP3989493B2 (en) 2007-10-10

Family

ID=34909650

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005029027A Expired - Lifetime JP3989493B2 (en) 2005-02-04 2005-02-04 Queue device

Country Status (1)

Country Link
JP (1) JP3989493B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010122613A1 (en) * 2009-04-24 2010-10-28 パナソニック株式会社 Fifo buffer device
JP2010244583A (en) * 2010-08-02 2010-10-28 Fujitsu Ltd Storage system
WO2017013931A1 (en) * 2015-07-21 2017-01-26 ソニー株式会社 First-in first-out control circuit, storage device, and method for controlling first-in first-out control circuit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010122613A1 (en) * 2009-04-24 2010-10-28 パナソニック株式会社 Fifo buffer device
JP2010244583A (en) * 2010-08-02 2010-10-28 Fujitsu Ltd Storage system
WO2017013931A1 (en) * 2015-07-21 2017-01-26 ソニー株式会社 First-in first-out control circuit, storage device, and method for controlling first-in first-out control circuit

Also Published As

Publication number Publication date
JP3989493B2 (en) 2007-10-10

Similar Documents

Publication Publication Date Title
JP3810449B2 (en) Queue device
US20070091102A1 (en) GPU Pipeline Multiple Level Synchronization Controller Processor and Method
US20070220361A1 (en) Method and apparatus for guaranteeing memory bandwidth for trace data
JP5089226B2 (en) Hardware support exception for software miss handling of I / O address translation cache miss
JP2006338538A (en) Stream processor
JP2005050208A (en) Memory managing system in multi-task system and task controller
JP3989493B2 (en) Queue device
WO2011099048A1 (en) Transmission control device, memory control device, and plc provided with the transmission control device
US20100318707A1 (en) External device access apparatus, control method thereof, and system lsi
JP5155655B2 (en) Microprocessor output port and control of instructions provided from it
US20090187903A1 (en) Virtual multiprocessor system
WO2004046926A1 (en) Method, device and processor system for notifying event
KR102158877B1 (en) System and method for processing task in graphics processor unit
US9256495B2 (en) Processing unit and error processing method
JP2007299126A (en) Controller and program for controller
JP2007200106A (en) Data processor, control method, and program
JP4631442B2 (en) Processor
US20070198754A1 (en) Data transfer buffer control for performance
JP5455152B2 (en) Image processing device
US20160283233A1 (en) Computer systems and methods for context switching
JP2012103952A (en) Memory dump method
JP5093986B2 (en) Interprocessor communication method and interprocessor communication apparatus
CN113168328B (en) Processor and pipeline processing method
JP7087921B2 (en) Processing framework linkage device, processing framework linkage method and processing framework linkage program
US20220156074A1 (en) Electronic device and multiplexing method of spatial

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060523

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060720

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070123

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070316

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070410

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070611

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070717

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070717

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100727

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100727

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110727

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110727

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120727

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120727

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130727

Year of fee payment: 6

EXPY Cancellation because of completion of term