JP4421280B2 - Data processing apparatus and data processing method - Google Patents

Data processing apparatus and data processing method Download PDF

Info

Publication number
JP4421280B2
JP4421280B2 JP2003413659A JP2003413659A JP4421280B2 JP 4421280 B2 JP4421280 B2 JP 4421280B2 JP 2003413659 A JP2003413659 A JP 2003413659A JP 2003413659 A JP2003413659 A JP 2003413659A JP 4421280 B2 JP4421280 B2 JP 4421280B2
Authority
JP
Japan
Prior art keywords
data
read
storage
reading
storage means
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.)
Expired - Fee Related
Application number
JP2003413659A
Other languages
Japanese (ja)
Other versions
JP2005175938A (en
Inventor
博 村川
武慶 川
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 JP2003413659A priority Critical patent/JP4421280B2/en
Publication of JP2005175938A publication Critical patent/JP2005175938A/en
Application granted granted Critical
Publication of JP4421280B2 publication Critical patent/JP4421280B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

データ処理装置及びデータ処理方法に係り、特に入力データを所定の法則に従って分類し、その分類結果に基づいて当該データを整形した後に出力するデータ処理装置及びデータ処理方法に関する。   The present invention relates to a data processing apparatus and a data processing method, and more particularly, to a data processing apparatus and a data processing method for classifying input data according to a predetermined rule, and outputting the data after shaping the data based on the classification result.

例えばTCP/IPなどに用いられる可変長のパケットデータを扱う技術分野では、各パケットデータをその行き先毎に分類し、当該行き先毎に発信するのに適した形式に加工する所謂整形処理を施すことが行なわれる。即ち、例えば図1に示すように、高速シリアル形式(例えば図2(a)に示される状態)で到着したパケットデータを複数の送信先毎にスイッチ120で振り分ける処理が行なわれる。このような処理は、通常受信された高速シリアル状態のデータを一旦低速のパラレルデータに変換してから行なわれる。この場合、パケットデータは可変長であるため、パラレル化部110においては単純なシリアル/パラレル変換だけではなく、図2(b)に示される如く、シリアル/パラレル変換で得られたパラレルデータをそのままクロック毎に行き先別に切り分けができるような形式に変換する処理、所謂整形処理を施す。   For example, in the technical field that handles variable-length packet data used for TCP / IP, etc., so-called shaping processing is performed in which each packet data is classified for each destination and processed into a format suitable for transmission for each destination. Is done. That is, for example, as shown in FIG. 1, a process is performed in which the switch 120 distributes packet data that arrives in a high-speed serial format (for example, the state shown in FIG. 2A) for each of a plurality of transmission destinations. Such processing is normally performed after the received high-speed serial data is once converted into low-speed parallel data. In this case, since the packet data has a variable length, the parallelizing unit 110 not only performs simple serial / parallel conversion, but also uses parallel data obtained by serial / parallel conversion as it is as shown in FIG. A so-called shaping process is performed for conversion into a format that can be separated for each destination for each clock.

この整形処理とは、データを送り出すクロック毎に同一の行き先のデータを纏める処理である。即ち、図2(b)の状態を見ると、同じ時刻では必ず同一行き先のデータのみが存在する構成とされている。尚、図2において、大文字の各アルファベットA、B,C、D等は夫々行き先を示し、小文字の各アルファベットa,b,c,d等は夫々行き先A,B,C,Dに対して送出すべきデータを示す。また、図2(b)の上部の各下向きの矢印は夫々基準クロックによって画定される各データ処理サイクルを示している。   This shaping process is a process for collecting data of the same destination for each clock for sending data. That is, in the state of FIG. 2B, only the same destination data is always present at the same time. In FIG. 2, uppercase alphabets A, B, C, D, etc. indicate destinations, and lowercase alphabets a, b, c, d, etc. are sent to destinations A, B, C, D, respectively. Indicates the data to be output. Each downward arrow at the top of FIG. 2B indicates each data processing cycle defined by the reference clock.

この場合、例えば図3に示すように、シリアル/パラレル変換部111でのデータ変換後、一旦RAM等のメモリ114に蓄積してから整形処理を行うことが行なわれる。このメモリ114の前後には書き込み処理部112と読み出し処理部115とが設けられる。この構成において、上記整形処理は、メモリ114に対する書き込み処理部112にて行われる。   In this case, for example, as shown in FIG. 3, after data conversion by the serial / parallel converter 111, the data is once stored in a memory 114 such as a RAM and then shaped. Before and after the memory 114, a write processing unit 112 and a read processing unit 115 are provided. In this configuration, the shaping process is performed by the write processing unit 112 for the memory 114.

この場合、例えば図4(b)の2サイクル目のように、1サイクル中に存在するパケットの行き先が1つであれば、図4(c)に示す如く、メモリ114の1領域(記憶単位)にそのまま格納する。即ちこの場合、図4(b)に示すパラレル化されたデータの2サイクル目には行き先Aを有するデータaのみが含まれるため、これをメモリ114の2番目の記憶領域に格納する。他方図4(b)に示す3サイクル目のように、1サイクル中に存在するパケットの行き先が2つに分かれるようであれば、図4(c)に示す如くメモリの2領域に分割して格納する。即ちこの場合、図4(b)に示すパラレル化されたデータの3サイクル目には行き先Aを有するデータaと行き先Bを有するデータbとが混在しているため、これを分割してメモリ114の3番目と4番目の記憶領域に夫々格納する。   In this case, for example, as shown in FIG. 4B, if there is only one packet destination in one cycle, as shown in FIG. 4B, as shown in FIG. ) As it is. That is, in this case, only the data a having the destination A is included in the second cycle of the parallelized data shown in FIG. 4B, so that it is stored in the second storage area of the memory 114. On the other hand, if the destination of a packet existing in one cycle is divided into two as in the third cycle shown in FIG. 4 (b), it is divided into two areas of the memory as shown in FIG. 4 (c). Store. That is, in this case, the data a having the destination A and the data b having the destination B are mixed in the third cycle of the parallelized data shown in FIG. Are stored in the third and fourth storage areas, respectively.

このよう分割格納することで、メモリ114の読み出し側115ではメモリに格納されたデータをシーケンシャルに読み出すだけでよいため、非常に単純な構成を採ることができる。尚、上記の如くの現象、即ち同一サイクル内に行き先が異なるデータが混在するような現象が生ずる原因は、パケットデータが可変長であることによる。即ち、図2(a)、図4(a)に示す如く、各データパケット、即ち行き先Aを有するデータa,行き先Bを有するデータb,行き先Cを有するデータc等、各パケット毎に任意のパケット長を有する。このため、これを単純にパラレル化した場合、上記整形処理を行わないと図4(b)に示すごとく、処理サイクルによっては同一サイクル内に異なる行き先を有するデータが混在する状態が起こり得る。
特開2003−174475号公報
By dividing and storing in this way, the reading side 115 of the memory 114 only needs to read the data stored in the memory sequentially, so that a very simple configuration can be adopted. Note that the cause of the phenomenon as described above, that is, the phenomenon that data having different destinations coexist in the same cycle is caused by the variable length of the packet data. That is, as shown in FIG. 2A and FIG. 4A, each data packet, that is, data a having destination A, data b having destination B, data c having destination C, etc. It has a packet length. For this reason, when this is simply parallelized, if the above shaping process is not performed, as shown in FIG. 4 (b), depending on the processing cycle, data having different destinations may exist in the same cycle.
JP 2003-174475 A

例えば図4に示す例における行き先C,D,Eを有するデータc,d,eの如く短いパケットが連続して到着した場合、これに対処するために図4(c)に示す如く書き込みの分割格納処理が頻発することになる。その結果書き込み処理が余分な時間を要することとなり、メモリ114への書き込み処理が実データの到着時間よりも長引く事象が起こりえる。即ち、図4に示した例では、結果的に10サイクルにて到着したパケットデータを格納するのに12サイクルを要している。   For example, when short packets such as data c, d, and e having destinations C, D, and E in the example shown in FIG. 4 arrive continuously, division of writing as shown in FIG. Storage processing will occur frequently. As a result, an extra time is required for the writing process, and an event may occur in which the writing process to the memory 114 is longer than the arrival time of the actual data. That is, in the example shown in FIG. 4, it takes 12 cycles to store packet data that arrives in 10 cycles.

通常、このような事態を避ける為、書き込み側では図3に示す如く、書き込みきれなかった余りデータを保持するためのある程度の容量を持ったバッファ113を設けることを行う。しかしながらこのようにバッファ113を設けた場合であっても、短いパケットが連続して到着した場合、このバッファ113が短期間で溢れる可能性がある。このような事態を完全に避けるためには理論上このバッファ113の格納容量を無限大にする必要があるがそれは不可能であるため、有限の格納容量を有するバッファ113を設けた場合、結果的に短パケットの連続到着時には対処しきれずにパケットロスを引き起こす可能性が残ることになる。   Usually, in order to avoid such a situation, as shown in FIG. 3, a buffer 113 having a certain capacity for holding excess data that could not be written is provided on the writing side. However, even when the buffer 113 is provided in this way, if short packets arrive continuously, the buffer 113 may overflow in a short period of time. In order to completely avoid such a situation, it is theoretically necessary to make the storage capacity of the buffer 113 infinite. However, this is impossible, so when the buffer 113 having a finite storage capacity is provided, as a result However, when short packets arrive continuously, there is a possibility of causing packet loss without being able to cope with it.

本発明では上記問題の解決のため、入力データを格納する第1の格納手段と、第1の格納手段に格納された入力データを読み出してこれを所定の法則に従って分類し、各分類毎に順次所定の記憶単位に書き込む第2の格納手段とを設け、前記第1の格納手段は第2の格納手段より大きな記憶容量を有する構成とした。   In the present invention, in order to solve the above problem, the first storage means for storing the input data and the input data stored in the first storage means are read out and classified according to a predetermined rule, and sequentially for each classification. Second storage means for writing in a predetermined storage unit is provided, and the first storage means has a larger storage capacity than the second storage means.

このように本発明では最初に入力データを格納する第1の格納手段の容量を、整形処理部との間に設ける第2の格納手段より大きくした。その結果入力データは一旦比較的大容量の第1の格納手段に格納されることになる。したがってデータ受信の段階でパケットロスが起こる可能性を効果的に低減可能である。   As described above, in the present invention, the capacity of the first storage means for storing input data first is made larger than that of the second storage means provided between the shaping processing unit. As a result, the input data is temporarily stored in the first storage means having a relatively large capacity. Therefore, it is possible to effectively reduce the possibility of packet loss at the data reception stage.

また、第1の格納手段に格納されたデータを順次読み出して所定の分類毎に第2の格納手段の異なる記憶単位に書き込むため、その後の整形処理の効率化が図れる。その結果、一旦第1の格納手段に格納されたデータを第2の格納手段を介して整形する段階で上記の如く短いパケットの頻発等により処理の遅延が発生したとしても、それによるパケットロス発生の可能性を効果的に低減可能となる。   In addition, since the data stored in the first storage means is sequentially read out and written in different storage units of the second storage means for each predetermined classification, the subsequent shaping process can be made more efficient. As a result, even if processing delay occurs due to frequent occurrence of short packets as described above at the stage of shaping the data once stored in the first storage means through the second storage means, packet loss occurs due to it. This possibility can be effectively reduced.

更にまた、度重なる短いパケットの頻発等によってデータ入力に整形処理が追いつかなくなり第2の格納手段のオーバーフローが発生しそうな場合には一旦第1の格納手段からの読み出しを中断し、その間の整形処理の進行に伴い第2の格納手段の記憶容量に余裕が出来た段階で、最後に第2の格納手段に書き込まれたデータが第1の格納手段から読み出された際の読み出し位置に遡って第1の格納手段からの読み出しを再開するようにすることが可能である。その結果更に効果的にパケットロスの発生を防止可能である。   Furthermore, when the shaping process cannot catch up with the data input due to frequent occurrences of short packets and the like, an overflow of the second storage means is likely to occur, the reading from the first storage means is temporarily interrupted, and the shaping process during that time In the stage where the storage capacity of the second storage means has been increased as the process proceeds, the data last written to the second storage means is traced back to the reading position when it was read from the first storage means. It is possible to resume reading from the first storage means. As a result, occurrence of packet loss can be prevented more effectively.

尚、この場合においても前記の如く第1の格納手段の記憶容量が比較的大きいため第1の格納手段がバッファの機能を果たし得る。即ち、上記の如く第1の格納手段からの読み出しを中断するとその間第1の格納手段に新たな空き容量を発生させることが出来ない。そのため第1の格納手段は入力データの書き込みによってその空き容量が一方的に消費され、結果的にその空き容量は次第に減少してゆくこととなる。しかしながら予め第1の格納手段の容量を大きく設定しておくことにより、そのように一方的に空き容量が消費される事態が発生しても、最終的に第1の格納手段の容量の枯渇が生ずるまでの時間を効果的に確保可能となる。   Even in this case, since the storage capacity of the first storage means is relatively large as described above, the first storage means can serve as a buffer. In other words, when reading from the first storage means is interrupted as described above, no new free space can be generated in the first storage means. Therefore, the first storage means consumes its free space unilaterally by writing input data, and as a result, its free space gradually decreases. However, by setting the capacity of the first storage means to be large in advance, even if such a situation occurs that the free capacity is consumed unilaterally, the capacity of the first storage means will eventually be exhausted. It is possible to effectively secure the time until the occurrence.

本発明の実施の形態によれば、パケットデータを一旦バッファに格納し、それを行き先別に整形して出力する機能を有するパケットデータ交換装置において、バッファとして1段目に大容量のメモリを設け、2段目にフリップフロップなどで構成された小容量のバッファを設けた2段構成にすることで、パケットロスの発生を効果的に防止可能とする。   According to the embodiment of the present invention, in a packet data exchange device having a function of temporarily storing packet data in a buffer, shaping it according to destination, and outputting it, a large capacity memory is provided as a buffer in the first stage, By using a two-stage configuration in which a small-capacity buffer composed of a flip-flop or the like is provided at the second stage, packet loss can be effectively prevented.

尚、「パケットロス」という用語の意味は以下の通りである。即ち、例えば図3の構成において、シリアル/パラレル変換部111でパラレル化された受信パケットデータを書き込み部112にて大規模メモリ114に書き込む際、その時点で整形処理の遅れ等により読出し部115によるメモリ114からの読み出し速度が追いつかない場合を想定する。そのような場合メモリ114の次第に空き容量が不足してゆき、その結果書き込むことが出来なくなった受信データパケットは一旦バッファ113に格納される。しかしながら上記の如くのメモリ114の空き容量不足の状態が解消せずに長引いた場合、メモリ114に書き込むことが出来なかった受信パケットデータを一時的に格納するバッファ113自体の空き容量が不足する事態が発生し得る。そのような場合には、例えば既にメモリ114とバッファ113とに格納されたデータを保護するためには、新たに受信されたパケットデータを書き込み部112にて破棄する必要が生じ得る。このような原因で生じる、受信パケットデータが破棄される現象をパケットロスと称する。   The meaning of the term “packet loss” is as follows. That is, for example, in the configuration of FIG. 3, when the received packet data parallelized by the serial / parallel converter 111 is written to the large-scale memory 114 by the writing unit 112, the reading unit 115 causes a delay in shaping processing at that time. Assume that the reading speed from the memory 114 cannot keep up. In such a case, the free data capacity of the memory 114 gradually becomes insufficient, and as a result, the received data packet that cannot be written is temporarily stored in the buffer 113. However, when the above-mentioned state of insufficient free space in the memory 114 is not solved, the buffer 113 itself that temporarily stores received packet data that could not be written to the memory 114 is short of free space. Can occur. In such a case, for example, in order to protect the data already stored in the memory 114 and the buffer 113, it may be necessary to discard the newly received packet data in the writing unit 112. A phenomenon in which received packet data is discarded due to such a cause is referred to as packet loss.

尚、上記説明は一例であり、これ以外にもパケットデータの受信速度と、その後の処理速度との間の不整合に起因して中間に設けられたバッファメモリに空き容量不足が生じ、それにより一部のデータを破棄せざるを得ない状態は様々に想定され得る。それらの事態にてパケットデータが破棄される現象を総じてパケットロスと称することが出来る。   The above description is only an example. In addition to this, there is insufficient free space in the buffer memory provided in the middle due to a mismatch between the reception speed of packet data and the subsequent processing speed. There may be various situations in which some data must be discarded. The phenomenon in which packet data is discarded due to these situations can be collectively referred to as packet loss.

本発明の実施の形態では、上記パケット整形機能を有するパケットデータ交換装置において、予め1段目メモリの過去の読み出し位置を記憶しておき、2段目のバッファがオーバーフローしそうな時に応じてその読み出しを停止した後、この読み出し位置に遡って読み出しを再開することで、パケットロスの発生を未然に防止する。   In the embodiment of the present invention, in the packet data exchange apparatus having the packet shaping function, the past read position of the first-stage memory is stored in advance, and the read-out is performed according to the time when the second-stage buffer is likely to overflow. The packet loss is prevented in advance by stopping reading and restarting reading back to this reading position.

以下、図面と共に本発明の一実施例について説明する。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

図5は本発明の一実施例によるデータ処理装置のブロック図である。図5に示す装置構成は、例えば上述の、高速シリアル状態の受信パケットをパラレル化し(110)、その行き先別に整形し(120)、更に各行き先毎にシリアル化して発信する(130)機能を有するパケットデータ交換装置において、シリアル形式で受信されたパケットデータをパラレル化する手段110として適用され得る。   FIG. 5 is a block diagram of a data processing apparatus according to an embodiment of the present invention. The apparatus configuration shown in FIG. 5 has, for example, the above-described functions of parallelizing received packets in the high-speed serial state (110), shaping them according to their destinations (120), and further serializing and sending each destination (130). In the packet data exchange apparatus, it can be applied as means 110 for parallelizing packet data received in a serial format.

図5に示すデータ処理装置はシリアル/パラレル変換部11、大規模メモリ(RAM)13、同メモリ13に対してパラレル化されたパケットデータを書き込む書き込み部12、同メモリ13からパケットデータを読み出す読出し部15、メモリ13から読出し部15にてデータを読み出す際の、メモリ13における読み出しアドレスを保持記憶する読み出しアドレス保持部14とを有する。   The data processing apparatus shown in FIG. 5 includes a serial / parallel converter 11, a large-scale memory (RAM) 13, a writing unit 12 that writes parallelized packet data to the memory 13, and a read that reads packet data from the memory 13. And a read address holding unit 14 for holding and storing a read address in the memory 13 when data is read from the memory 13 by the reading unit 15.

また、図5に示すデータ処理装置は、更に、読出し部15によりメモリ13から読み出されたパケットデータを、その行き先別に格納するための複数面の記憶領域を有する小バッファ16を有する。この各小バッファ16は、書く記憶領域を担う面を各々独立した記憶装置で構成しても良いし、一つの記憶装置を分割管理する手段を用いてその複数の記憶領域を見かけ上複数の独立した記憶装置、即ち格納面として利用する構成として実現してもよい。   The data processing apparatus shown in FIG. 5 further includes a small buffer 16 having a plurality of storage areas for storing packet data read from the memory 13 by the reading unit 15 for each destination. Each of the small buffers 16 may be configured by an independent storage device for each of the storage areas to be written, or by using a means for dividing and managing one storage device, the plurality of storage areas are apparently a plurality of independent storage devices. You may implement | achieve as a structure utilized as a storage device, ie, a storage surface.

図5に示すデータ処理装置は更に、各小バッファ16の格納面からデータを読み出して上記の如く、各々の行き先毎に順次送出し易くするための整形処理を施す読み出し整形部17を有する。   The data processing apparatus shown in FIG. 5 further includes a read shaping unit 17 that reads data from the storage surface of each small buffer 16 and performs a shaping process for facilitating the sequential transmission for each destination as described above.

図6は上記シリアル/パラレル変換部11にてパラレル化されたパケットデータを書き込み部12にてメモリ13に書き込む様子を説明するための図である。尚、図6(a)に示すデータは上述の図4(b)に示すデータと同様なものである。即ちこの場合、メモリ13に対する書き込み時には、特に図4(c)と共に説明した如くの行き先別の分割格納は行なわず、パラレル化された10サイクル分のデータをそのまま10ワード分の記憶領域に書き込む。したがってメモリ13に書き込まれた状態では、例えば第3、第5、第6の各ワードでは、一ワード中に行き先の異なるデータが混在した状態となっている。   FIG. 6 is a diagram for explaining how the packet data parallelized by the serial / parallel conversion unit 11 is written in the memory 13 by the writing unit 12. The data shown in FIG. 6A is similar to the data shown in FIG. That is, in this case, when writing to the memory 13, the divided storage for each destination as described with reference to FIG. 4C is not performed, and the parallelized data for 10 cycles is directly written in the storage area for 10 words. Therefore, in the state written in the memory 13, for example, in each of the third, fifth, and sixth words, data having different destinations are mixed in one word.

このようにしてメモリ13に書き込むことにより、実質的に書き込み時の処理速度の遅延は発生せず、また図4(c)の場合と異なり、メモリ13の記憶容量を最大限に利用可能となる。したがってメモリ13をバッファとして見た場合、その機能を効果的に活かすことが可能となる。   By writing to the memory 13 in this way, the processing speed is not substantially delayed at the time of writing, and unlike the case of FIG. 4C, the storage capacity of the memory 13 can be used to the maximum. . Therefore, when the memory 13 is viewed as a buffer, the function can be effectively utilized.

このように本発明の実施例ではパケットデータの整形処理(17)をメモリ13の書き込み側ではなく読み出し側で行い、更にパケット整形を行うために小規模のフリップフロップで形成されたバッファ16を設けている。またメモリ13にはパラレル変換後のデータをそのまま書き込み、そのままの形で読み出し(15)を行う。この場合、読み出し側に備えられた小規模バッファ16を構成する各格納面は、各々最大でメモリ13から1回(1サイクル)で読み出したデータを格納できるだけの容量を持つ。   As described above, in the embodiment of the present invention, the packet data shaping process (17) is performed on the reading side rather than the writing side of the memory 13, and the buffer 16 formed of a small-size flip-flop is provided for further packet shaping. ing. Further, the data after the parallel conversion is written in the memory 13 as it is, and is read out as it is (15). In this case, each storage surface constituting the small-scale buffer 16 provided on the reading side has a capacity enough to store data read from the memory 13 once (one cycle) at maximum.

ここで、図7と共に後述する如く、メモリ13の読み出し側においてメモリ13から各ワード毎に読み出したデータが全て同一パケットに属する、即ち同一の行き先を有するものであれば、複数の格納面あるうちの1つのバッファ16の面に全て格納する。他方、ワード毎に読み出したデータが複数パケットに跨るもの、即ち複数の異なる行き先を有するものであれば、これらを各々複数のバッファ16の格納面に分割して格納する処理を行う。そして読み出し整形部17では、このバッファ16に格納されたデータの情報を判断した上で複数のバッファ16の面に格納されたパケットデータを組み合わせる等の処理を施してパケットデータを整形した上で下流側に送信する。   Here, as will be described later with reference to FIG. 7, if all the data read from the memory 13 for each word on the reading side of the memory 13 belong to the same packet, that is, have the same destination, there are a plurality of storage surfaces. All are stored in the surface of one buffer 16. On the other hand, if the data read out for each word spans a plurality of packets, that is, has a plurality of different destinations, the data is divided into the storage surfaces of the plurality of buffers 16 and stored. The read shaping unit 17 determines the information of the data stored in the buffer 16, performs processing such as combining packet data stored in the surfaces of the plurality of buffers 16, shapes the packet data, and then performs downstream processing. To the side.

尚、この場合、読み出し整形部17によるこのような整形処理に比べ、上記の如くメモリ13から読み出したデータを適宜分割して各バッファ16に格納する処理の方が速い事態(処理速度の不整合)が発生し得る。その場合、小規模バッファ16が枯渇する可能性があり、最悪の場合、その時点でメモリ13から既に読み出してしまったデータをバッファ16に書き込むことが出来ず、結果的にデータが消滅することが考えられる。本発明の実施例ではこのような事態に対処するため、読み出しメモリアドレス保持部14にて、メモリ13の読み出し位置を記憶しておく。そして、図8と共に後述するように、バッファ16のオーバフローの恐れがある際には一旦メモリ13からの読み出しを停止し、その間の整形処理の進行に伴ってバッファ16の空き容量、即ち空きバッファ(16)面の数量が所定数量となった後、バッファ16に最後に書き込まれたデータがメモリ13から読み出されたアドレスに遡り、その位置から読み出しを開始する。その結果、仮にバッファ16がオーバフローして既に読み出し済みのデータが消滅した場合であっても、それらが上記読み出しアドレスの遡及によって再度読み出されるため、パケットロスは確実に防止され得る。   In this case, as compared with such shaping processing by the reading shaping unit 17, the situation in which the data read from the memory 13 is appropriately divided and stored in each buffer 16 as described above (processing speed mismatch). ) May occur. In that case, there is a possibility that the small-scale buffer 16 may be depleted. In the worst case, data that has already been read from the memory 13 at that time cannot be written to the buffer 16, and the data may eventually disappear. Conceivable. In the embodiment of the present invention, in order to cope with such a situation, the read position of the memory 13 is stored in the read memory address holding unit 14. Then, as will be described later with reference to FIG. 8, when there is a risk of overflow of the buffer 16, reading from the memory 13 is temporarily stopped, and the free capacity of the buffer 16, that is, the free buffer ( 16) After the number of planes reaches a predetermined number, the data last written in the buffer 16 goes back to the address read from the memory 13 and starts reading from that position. As a result, even if the buffer 16 overflows and data that has already been read disappears, they are read again by retroactively reading the read address, so that packet loss can be reliably prevented.

図7と共に、図5に示す本発明の一実施例によるデータ処理装置における、読み出し部15と、小規模のバッファ16を用いたパケット整形方法について説明する。メモリ13には、図7の左上に示す通り、4並列のパラレルデータが6サイクル分格納されていたと仮定する。尚、データの先頭文字として“C”と記しているものはパケットのヘッダ情報(コントロールワード)を示し、“D”と記しているものはパケットのペイロード情報(データワード)を示す。そしてそれらに添えられた数字が共通のものは、同一パケットのデータであることを示している。また、同図では左端から順により古い格納データを示す。   A packet shaping method using the reading unit 15 and the small buffer 16 in the data processing apparatus according to the embodiment of the present invention shown in FIG. 5 will be described with FIG. Assume that the memory 13 stores four parallel data for six cycles as shown in the upper left of FIG. Note that “C” as the first character of data indicates packet header information (control word), and “D” indicates packet payload information (data word). Those having the same number attached to them indicate data of the same packet. In the same figure, older stored data is shown in order from the left end.

まずメモリ13の読み出し部15でヘッダ1ワードC1とペイロード3ワードD1とを読み出す(ステップS1)。このデータの行き先(添え数字:1)は1つであり、分割不可能であるため、0番目のバッファ16の格納面(B0)へこれをそのまま保持する(ステップS2)。その後バッファ16の読み出し側、つまり読み出し整形部17では、このようにしてバッファ16にデータが格納されたことを認識する。但しデータの出力形式として、パケットの末尾でない限りヘッダ1ワードに加えてペイロードを4ワード単位で出力するものとした場合、読み出し整形部17では、この時点では上記条件に満たないためバッファ16からのデータ出力を行わない。   First, the reading unit 15 of the memory 13 reads the header 1 word C1 and the payload 3 word D1 (step S1). Since the destination of this data (subscript number: 1) is one and cannot be divided, it is held as it is on the storage surface (B0) of the 0th buffer 16 (step S2). Thereafter, the reading side of the buffer 16, that is, the reading shaping unit 17 recognizes that the data is stored in the buffer 16 in this way. However, if the payload is output in units of 4 words in addition to the header 1 word as long as it is not at the end of the packet as the data output format, the read shaping unit 17 does not satisfy the above condition at this point, so the data from the buffer 16 Does not output data.

次に読み出し部15でペイロード4ワードD1を読み出す(ステップS3)。この場合も同じく行き先(添え数字:1)は1つで分割不可能であるため、1番目のバッファ16の面(B1)へこれをそのまま保持する(ステップS4)。この時読み出し整形部17ではバッファB0(0番目格納面)とバッファB1(1番目格納面)のデータを組み合わせることでペイロードとして合計4ワードを取得し、これを上記一単位として出力が可能となると判定し、このようにデータを組み合わせて後段に出力する(ステップS5)。   Next, the payload 4 word D1 is read by the reading unit 15 (step S3). Also in this case, since the destination (subscript number: 1) is one and cannot be divided, it is held as it is on the surface (B1) of the first buffer 16 (step S4). At this time, the read shaping unit 17 obtains a total of 4 words as a payload by combining the data of the buffer B0 (0th storage surface) and the buffer B1 (1st storage surface), and can output this as one unit. Judgment is made and the data are combined and output to the subsequent stage (step S5).

更にメモリ13からデータを読み出した結果(ステップS6)、前回読み出したパケットと同一パケットのデータが1ワードD1と、新たなパケットのヘッダ1ワードC2とペイロード2ワードD2とが読み出されたこととなる。但しこのデータ群は添え数字が1と2との別々のパケットに属するため、パケットの続きの1ワードはバッファの2番面(B2)へ、新たなパケットのヘッダ+ペイロードの合計3ワードはバッファの3番面(B3)へ夫々格納される(ステップS7)。   Further, as a result of reading data from the memory 13 (step S6), the data of the same packet as the previously read packet is read as 1 word D1, and the header 1 word C2 and payload 2 word D2 of the new packet are read out. Become. However, since this data group belongs to separate packets with suffix numbers 1 and 2, the next word of the packet goes to the second side (B2) of the buffer, and the new packet header + payload total 3 words are buffered No. 3 (B3) is stored respectively (step S7).

同様に整形部17ではバッファ1番面(B1)と2番面(B2)のデータを組み合わせると、パケット末尾までデータを出力することができると判断し、このようにして組み合わせたデータを後段に出力する(ステップS8)。以下、このような流れでメモリ13からのデータ読み出し、バッファ16への分割格納を行い、更にバッファ16からの読み出しと整形を行なう。この処理はメモリ13内にデータが存在する限り続けられる(ステップS9乃至S19)。   Similarly, the shaping unit 17 determines that the data can be output up to the end of the packet by combining the data of the first buffer (B1) and the second buffer (B2). Output (step S8). Thereafter, the data is read from the memory 13 and divided and stored in the buffer 16 in such a flow, and the reading from the buffer 16 and the shaping are further performed. This process is continued as long as data exists in the memory 13 (steps S9 to S19).

一方、この整形処理では、図7の例に示す通り、メモリ13からの読み出しが6サイクルであるのに対し、整形および出力処理に7サイクル以上の処理過程を要するような現象が有り得る。従って、このような現象が続いた場合、複数面持っている小規模バッファ16が枯渇する可能性がある。その場合、パケットデータの欠落等の状況を招くことになってしまう。   On the other hand, in this shaping process, as shown in the example of FIG. 7, while reading from the memory 13 is 6 cycles, there may be a phenomenon that the shaping and output process requires a processing process of 7 cycles or more. Therefore, when such a phenomenon continues, there is a possibility that the small-sized buffer 16 having a plurality of faces is exhausted. In this case, a situation such as packet data loss will be caused.

これを防ぐため、メモリ13から読み出したデータを分割保持しようとするバッファ16の面番号(即ちバッファの番号B0,B1、B2,B3,...)と、その時点で整形対象として参照されているバッファ面番号とを比較照合し、その差の値が所定値より小さい場合に小規模バッファの空き面数が枯渇しつつあると判定する構成とする。   In order to prevent this, the surface number of the buffer 16 to which the data read from the memory 13 is to be divided and held (that is, the buffer numbers B0, B1, B2, B3,. The buffer surface number is compared and collated, and when the difference value is smaller than a predetermined value, it is determined that the number of free surfaces in the small-scale buffer is being exhausted.

しかしながらこのような構成によりバッファ16の枯渇を検出した際にメモリ13からの読み出しを中断した場合であっても、メモリ13に用いるRAMの特性上、当該枯渇が検出された時点で既に数サイクル分のデータをメモリ13から読み出してしまっていると考えられる。その場合、それらのデータは上記枯渇によりバッファ16に書き込めず、消滅することとなる。これを防止するために、このように枯渇検出時点で未だバッファ16に書き込まれていない分のデータを収容できるだけの余裕を持たせてバッファ16の面数を用意しておくことも可能である。しかしながら、それでは徒に回路規模を増大させることになる。   However, even when reading from the memory 13 is interrupted when the buffer 16 is detected to be depleted by such a configuration, due to the characteristics of the RAM used for the memory 13, several cycles have already been reached when the depletion is detected. It is considered that the data has been read from the memory 13. In that case, those data cannot be written into the buffer 16 due to the above depletion, and disappear. In order to prevent this, it is possible to prepare the number of surfaces of the buffer 16 with a margin sufficient to accommodate the data that has not yet been written to the buffer 16 at the time of detection of depletion. However, this naturally increases the circuit scale.

そこで、常時、バッファ16に分割格納したデータを読み出した時のメモリ13の読み出しポインタの位置をアドレス保持部14にて保持しておく。そして、バッファ16の枯渇が予測された時にはその時点で既に読み出されたが未だバッファ16に格納されていないデータを一旦廃棄する。そして、その後整形処理の進行に伴って当該枯渇が解消された時にはメモリ13の読み出しポインタを前記保持した位置に戻し、そこから読み出しを再開する構成とする。   Therefore, the address holding unit 14 always holds the position of the read pointer of the memory 13 when the data divided and stored in the buffer 16 is read. When it is predicted that the buffer 16 is depleted, data that has already been read but is not yet stored in the buffer 16 is temporarily discarded. Then, when the depletion is resolved as the shaping process proceeds, the read pointer of the memory 13 is returned to the held position and reading is resumed from there.

このような構成につき、具体的な動作例と共に図8のタイムチャートを参照して以下に説明する。   Such a configuration will be described below with reference to a time chart of FIG. 8 together with a specific operation example.

図8(a)はメモリ13の現在読み出しているアドレスの変化を示し、(b)はメモリ読み出しイネーブル信号波形を示し、(c)はメモリ13から読み出されたデータを示し、(d)は同じくメモリ13から読み出されたデータを示す値を1サイクル分シフトしたものを示し、(e)はバッファ16に既に書き込まれたデータがメモリ13から読み出された際のメモリ13内のアドレスを示し、(f)はメモリ13から読み出されたデータが書き込まれているバッファ16の面番号を示し、(g)は読み出し整形部17がデータを読み出して整形するために参照しているバッファ16の面番号を示す。また、図8(h)はバッファ16の各面にデータが格納される様子を示す。   8A shows a change in the address currently read from the memory 13, FIG. 8B shows a memory read enable signal waveform, FIG. 8C shows data read from the memory 13, and FIG. Similarly, a value indicating the data read from the memory 13 is shifted by one cycle, and (e) shows the address in the memory 13 when the data already written in the buffer 16 is read from the memory 13. (F) shows the surface number of the buffer 16 in which the data read from the memory 13 is written, and (g) shows the buffer 16 referred to by the read shaping unit 17 for reading and shaping the data. Indicates the face number. FIG. 8H shows how data is stored in each surface of the buffer 16.

図示の如く、メモリ13のアドレス“B“により時刻t0で読み出し開始されたデータ“b”につき、2サイクル後の時刻t1にてバッファ16に対する分割対象データとして読み出しが完了し、バッファ9とバッファ10とに亘って書き込まれる(図8(h))。その結果、次のデータ格納先となるバッファ16の面番号が“11”に変化している(図8(f))。なお、ここでは一例としてバッファ16の総面数は16としている。   As shown in the figure, the data “b” started to be read at time t0 by the address “B” of the memory 13 is read as data to be divided into the buffer 16 at time t1 after two cycles, and the buffers 9 and 10 are read. (FIG. 8 (h)). As a result, the surface number of the buffer 16 serving as the next data storage destination is changed to “11” (FIG. 8F). Here, as an example, the total number of surfaces of the buffer 16 is 16.

この時、整形対象として参照されているバッファ16の面番号が“0”であり(図8(g))、空き面数が少ないと判断される。即ち、この場合総バッファ面数16(0乃至15)のうち、書き込み面が「11」であり、読み出し面が「0」(リングバッファと考えれば「16」と等価)であるため、その差は16−11=5である。そしてこの場合、一例として上記差の値が5以下となった場合にバッファ空き面数が不足と判定するものとする。その結果、この場合差が5となったため、バッファ空き面数不足と判定する。その結果メモリ読み出しイネーブル信号(図8(b))は無効化され、メモリ13からのデータ読み出しは停止される。   At this time, the surface number of the buffer 16 referred to as the shaping target is “0” (FIG. 8G), and it is determined that the number of free surfaces is small. That is, in this case, out of the total number of buffer surfaces 16 (0 to 15), the writing surface is “11” and the reading surface is “0” (equivalent to “16” when considered as a ring buffer). 16-11 = 5. In this case, as an example, when the difference value is 5 or less, it is determined that the number of empty buffer planes is insufficient. As a result, in this case, since the difference is 5, it is determined that the number of free buffers is insufficient. As a result, the memory read enable signal (FIG. 8B) is invalidated, and data reading from the memory 13 is stopped.

しかしながらこの時点(時刻t1)ではメモリ13のアドレス“C,D,E”からの読み出し動作は完了している(図8(a))。またこれにより読み出されたデータ“c,d,e”(図8(c))はバッファ16には収容しきれないことが予想される。そこでこのデータ“c,d,e”を一旦廃棄する一方、最後の有効読み出しアドレスである“B”をアドレス保持部14にて保持しておく(図8(e))。即ちここではバッファ16に最後に書き込まれたデータ“b”がメモリ13から読み出されたアドレス“B”を上記最後の有効アドレスと判断する。   However, at this time (time t1), the read operation from the address “C, D, E” of the memory 13 is completed (FIG. 8A). In addition, it is expected that the data “c, d, e” (FIG. 8C) read out by this cannot be accommodated in the buffer 16. Therefore, the data “c, d, e” is once discarded, while the last effective read address “B” is held in the address holding unit 14 (FIG. 8E). That is, here, the address “B” read from the memory 13 for the data “b” last written in the buffer 16 is determined as the last effective address.

そして、時刻t2にてバッファ16の上記バッファ空き面数不足検出が解消した後、上記最後の有効アドレスとして保持されていた“B”をインクリメントして得られた次アドレス“C”から読み出しを再開する。その結果バッファ16の空き容量不足によるデータの欠落を防止することが可能である。   Then, after the detection of the shortage of the buffer free space in the buffer 16 is resolved at time t2, the reading is resumed from the next address “C” obtained by incrementing “B” held as the last effective address. To do. As a result, it is possible to prevent data loss due to insufficient free space in the buffer 16.

尚、上記バッファ空き面数不足解消の検出は以下の如くに実施される。即ち、時刻t2にてバッファ16の参照面(図8(g))が0から2(上記と同様の論理にて17と等価)にインクリメントされており、バッファ16の格納面11との差が6に増加している。これは上記閾値である5を超えているため、バッファ空き面数不足は解消と判定できる。   The detection of the lack of the buffer free space number is performed as follows. That is, at time t2, the reference surface of the buffer 16 (FIG. 8G) is incremented from 0 to 2 (equivalent to 17 in the same logic as above), and the difference from the storage surface 11 of the buffer 16 is It has increased to 6. Since this exceeds the threshold value of 5, it can be determined that the shortage of the number of free buffers is resolved.

上記空き面数不足解消判定の結果、時刻t3にて読み出しイネーブル信号(図8(b))は有効化され、上記の如くメモリ13からの読み出しが再開される。その結果メモリ13のアドレス“C,D,E”から再びデータ“c,d,e”が読み出され(図8(c)),これらが順次時刻t4,t5等にてバッファ11,12,13等に格納される。   As a result of the determination that the number of empty planes is insufficient, the read enable signal (FIG. 8B) is validated at time t3, and reading from the memory 13 is resumed as described above. As a result, the data “c, d, e” is read again from the address “C, D, E” in the memory 13 (FIG. 8C), and these are sequentially transferred to the buffers 11, 12,. 13 and so on.

このように、バッファ16の空き容量不足の検出によりメモリ13からのデータ読み出しを停止すると共に、その段階でバッファ16に最後に格納されたデータがメモリ13から読み出された読み出し位置を保持しておき、当該バッファ空き容量不足解消時にはメモリ13の上記保持された読み出し位置から読み出しを再開する。その結果、バッファ16の空き容量不足の際にも確実にデータの欠損を防止可能である。   In this way, the reading of data from the memory 13 is stopped by detecting the lack of free space in the buffer 16, and the data stored last in the buffer 16 at that stage holds the reading position from which the data was read from the memory 13. When the buffer free space shortage is resolved, reading is resumed from the held reading position of the memory 13. As a result, data loss can be reliably prevented even when the free space of the buffer 16 is insufficient.

以下図9乃至図11と共に、図7と共に説明したバッファ16に対する書き込み、読み出し動作の流れ、及び図8と共に説明したメモリ13からの読み出し動作の流れについて説明する。   The flow of the write and read operations to the buffer 16 described with reference to FIG. 7 and the flow of the read operation from the memory 13 described with reference to FIG.

図9は、バッファ16に対する書き込み動作の流れを示す。同図中、ステップS21にて書き込みポインタNの値を0に初期化し、ステップS22にて、メモリ13に読み出すべきデータが存在するか否かを判断する。読み出すべきデータがあればステップS23にてバッファ16に空き容量が存在するか否かを判定する。その結果空き容量が無ければメモリ13から読み出されたデータは廃棄される(ステップS24)。但し、図8と共に上述の如くバッファ16の空き容量不足の判定がなされると、その際最後にバッファ16に書き込まれたデータがメモリ13から読み出された読み出し位置が保持され、その後に当該空き容量不足状態解消時に再度上記読み出し位置に遡って読み出しが再開される。このため、上記ステップS24にて廃棄されたデータも再び読み出されてバッファ16に書き込まれる。その結果実際のデータ欠損は発生しない。   FIG. 9 shows the flow of a write operation to the buffer 16. In the figure, the value of the write pointer N is initialized to 0 in step S21, and it is determined whether or not there is data to be read out in the memory 13 in step S22. If there is data to be read, it is determined in step S23 whether there is free space in the buffer 16 or not. As a result, if there is no free space, the data read from the memory 13 is discarded (step S24). However, when it is determined that the buffer 16 has insufficient free space as described above with reference to FIG. 8, the read position at which the data written in the buffer 16 at the end is read from the memory 13 is held, and then the empty space is stored. Reading is resumed by going back to the reading position again when the capacity shortage state is resolved. For this reason, the data discarded in step S24 is also read again and written into the buffer 16. As a result, no actual data loss occurs.

次にステップS25にて、メモリ13から読み出された1サイクル分のデータのセグメント数が判定される。これは、具体的には当該データが有する行き先が一箇所か2箇所かを判定する。その結果セグメント数が1、即ち行き先が一箇所であればステップS26にて、当該データ全てをバッファ16の一面(番号N)に書き込む。そして書き込みポインタNをインクリメントする(ステップS27)。他方、ステップS25の判定が「2セグメント」或いは「行き先を2箇所有する」であった場合、ステップS28にて当該データを各セグメントごと、或いは行き先別に二つの面(番号:N,N+1)に書き込む。その結果、書き込みポインタはこの場合「2」インクリメントされる(ステップS29)。その後ステップS22に戻り、上記動作を繰り返す。   Next, in step S25, the number of segments of data for one cycle read from the memory 13 is determined. Specifically, it is determined whether the data has one or two destinations. As a result, if the number of segments is 1, that is, the destination is one place, all the data is written to one surface (number N) of the buffer 16 in step S26. Then, the write pointer N is incremented (step S27). On the other hand, if the determination in step S25 is “2 segments” or “has two destinations”, the data is written in two planes (numbers: N, N + 1) for each segment or by destination in step S28. . As a result, the write pointer is incremented by “2” in this case (step S29). Thereafter, the process returns to step S22, and the above operation is repeated.

次にこのようにしてバッファ16に書き込まれたデータが読み出される動作につき、図10と共に説明する。   Next, the operation of reading the data written in the buffer 16 in this way will be described with reference to FIG.

ステップS31にて読み出しポインタNが0にインクリメントされ、ステップS32にてバッファ16のN面に読み出すべきデータがあるか否かが判定される。その結果読み出すべきデータが存在すればステップS33にて、当該バッファ16のN面に保持されたデータがセグメントの最後のデータか否かを判定する。即ち、当該データの行き先と次にバッファの面に保持されたデータの行き先とを見比べ、異なれば当該N面のデータがセグメントの最後のデータであると判定できる。判定の結果がYesの場合、そのままデータを読み出して整形部17に送出し(ステップS35)、読み出しポインタNをインクリメントする(ステップS36)。   In step S31, the read pointer N is incremented to 0, and in step S32, it is determined whether there is data to be read on the N side of the buffer 16. As a result, if there is data to be read, it is determined in step S33 whether the data held on the N-plane of the buffer 16 is the last data of the segment. That is, the destination of the data is compared with the destination of the next data held in the buffer surface, and if the data is different, it can be determined that the data on the N surface is the last data of the segment. If the determination result is Yes, the data is read as it is and sent to the shaping unit 17 (step S35), and the read pointer N is incremented (step S36).

他方、ステップS33の判定結果がNoの場合、ステップS34にて、当該データの量が一定量以上か否かを判定する。その結果一定量に満たない場合、そのまま出力することはせずにステップS37に進む。即ち、図7の例では上記の如くパケットの末尾でない限りヘッダに加えてペイロード4ワードを一単位として出力する設定となっているため、図7のステップS2にてバッファB0に書き込まれた分はペイロードが3ワードでこの条件に満たない。そのため、出力されないのである。   On the other hand, if the determination result in step S33 is No, it is determined in step S34 whether the amount of the data is equal to or greater than a certain amount. If the result is less than a certain amount, the process proceeds to step S37 without outputting the data as it is. That is, in the example of FIG. 7, as long as it is not the end of the packet as described above, it is set to output 4 words of payload as a unit in addition to the header, so the amount written in the buffer B0 in step S2 of FIG. The payload is 3 words and this condition is not met. Therefore, it is not output.

ステップS37では当該バッファ16のN面の保持データと次のN+1面の保持データとを加えて一定量のデータとなるか否かを判定する。その結果がYesの場合、ステップS39にてN+1面のデータを加えて上記一定量として出力する(ステップS39)。即ち、図7の例ではステップS5にてB0面のデータにB1面のデータを一部加えて上記規定のデータ量(ペイロード:4ワード)として出力する。   In step S37, it is determined whether or not a certain amount of data is obtained by adding the data held on the N side of the buffer 16 and the data held on the next N + 1 side. If the result is Yes, the N + 1 plane data is added in step S39 and output as the fixed amount (step S39). In other words, in the example of FIG. 7, in step S5, a part of the data on the B1 side is added to the data on the B0 side, and the data is output as the prescribed data amount (payload: 4 words).

次にステップS40にて、バッファのN+1面に未出力データがあるか否かを判定し、ある場合には当該面番号N+1を読み出しポインタNに代入した上で(ステップS42)ステップS32以降の動作を繰り返す。他方、ステップS40の結果がNoの場合、ステップS41にて次の面番号N+2を読み出しポインタNに代入した上で(ステップS41)ステップS32以降の動作を繰り返す。   Next, in step S40, it is determined whether or not there is unoutput data on the N + 1 surface of the buffer. If there is, the surface number N + 1 is assigned to the read pointer N (step S42) and the operations after step S32. repeat. On the other hand, if the result of step S40 is No, the next face number N + 2 is substituted for the read pointer N in step S41 (step S41), and the operations after step S32 are repeated.

次に図11と共にメモリ13からのデータ読み出し動作について説明する。   Next, a data reading operation from the memory 13 will be described with reference to FIG.

ステップS51にて読み出しポインタを初期化し、メモリ13中に読み出すべきデータがあるか否かにつき判定を行なう(ステップS52)。その結果「有り」の場合、ステップS53にて、現在読み出し停止状態か否かにつき判定する。即ち、上記の如く、バッファ16の空き容量不足が判断された場合読み出し停止状態となるため、この点につき判定している。   In step S51, the read pointer is initialized, and it is determined whether or not there is data to be read in the memory 13 (step S52). If the result is “Yes”, it is determined in step S53 whether or not reading is currently stopped. That is, as described above, since it is determined that reading is stopped when it is determined that the free space of the buffer 16 is insufficient, this point is determined.

次に上記判定の結果がYesの場合、ステップS54にて、バッファ16の空き容量が回復したか否かを判定し、回復していればステップS55にて上記読み出し停止状態を解除し、ステップS57に進む。他方、ステップS53の判定結果がNoの場合、ステップS56にて、当該読み出しポインタNのデータ読み出しを行なった際にそれがバッファ16に書き込まれた結果バッファ16の空き容量不足が発生するか否かを予測判定する。その判定の結果がYesの場合現在の読み出しポインタNが示すメモリ13の領域に格納されたデータの読み出しを行わずに、ステップS59にて当該読み出しポインタNの値を次回の読み出しポインタNの値に代入し、ステップS60にて読み出し停止状態を設定してステップS52以降の動作を繰り返す。   Next, if the result of the determination is Yes, it is determined in step S54 whether or not the free space in the buffer 16 has been recovered. If it has been recovered, the read stop state is canceled in step S55, and step S57 is determined. Proceed to On the other hand, if the determination result in step S53 is No, whether or not there is a shortage of free space in the buffer 16 as a result of the data read from the read pointer N being written in the buffer 16 in step S56. Predictive judgment. If the determination result is Yes, the data stored in the area of the memory 13 indicated by the current read pointer N is not read, and the value of the read pointer N is changed to the value of the next read pointer N in step S59. In step S60, the reading stop state is set, and the operations in and after step S52 are repeated.

他方、ステップS56の判定結果がNoの場合、ステップS57にて現在の読み出しポインタNが示すメモリ13の領域に格納されたデータの読み出しを実施し、ステップS58にて読み出しポインタをインクリメントしてステップS52以降の動作を繰り返す。   On the other hand, if the decision result in the step S56 is No, the data stored in the area of the memory 13 indicated by the current read pointer N is read in a step S57, and the read pointer is incremented in a step S58. The subsequent operations are repeated.

尚、図11と共に説明したメモリ13からのデータ読み出し及び図9と共に説明したバッファ16に対する書き込み動作は図5に示す読み出し部15にて行い、図10と共に説明したバッファ16からの読み出し動作は読み出し整形部17にて行なう。   The data reading from the memory 13 described with reference to FIG. 11 and the writing operation to the buffer 16 described with reference to FIG. 9 are performed by the reading unit 15 shown in FIG. 5, and the reading operation from the buffer 16 described with reference to FIG. Performed in part 17.

このように本発明の実施例によれば、従来はパケットデータのパラレル化後の整形を大容量メモリの前段で行っていたのに対して、同整形動作を大容量メモリ(13)の後段で行い、その代わりに小規模バッファ(16)を多面構成で設けることによりパケットデータの欠落を効果的に防ぎ、正常な通信を確保することが可能となる。   As described above, according to the embodiment of the present invention, the shaping after the parallelization of the packet data is performed in the former stage of the large-capacity memory, whereas the shaping operation is performed in the latter stage of the large-capacity memory (13). Instead, by providing a small buffer (16) with a multi-face configuration, it is possible to effectively prevent packet data from being lost and to ensure normal communication.

本発明は以下の付記に示す構成を含む。
(付記1)
入力データを格納する第1の格納手段と、
第1の格納手段に格納された入力データを読み出してこれを所定の法則に従って分類し、各分類毎に順次所定の記憶単位に書き込む第2の格納手段とよりなり、
前記第1の格納手段は第2の格納手段より大きな記憶容量を有する構成とされてなるデータ処理装置。
(付記2)
第2の格納手段の記憶容量が不足すると判断された際に前記第1の格納手段からの読み出しを停止し、当該不足状態が解消した後、前記停止前に第2の格納手段に最後に書き込まれたデータが第1の格納手段から読み出された読み出し位置に遡って第1の格納手段からの読出しを再開する構成とされてなる付記1に記載のデータ処理装置。
(付記3)
第2の格納手段にデータを書き込む際には、その複数の記憶単位に対して所定の順序で書き込む構成とされ、前記第2の格納手段の記憶容量の不足の判断は、第1の格納手段から読み出されたデータを書き込んでいる記憶単位の番号と、このようにして書き込まれたデータが所定の処理のために読み出される記憶単位の番号との差の大小によって行なうものとされてなる請求項1乃至3の内の何れか一項に記載のデータ処理装置。
(付記4)
入力データを第1の格納手段に格納する段階と、
第1の格納手段に格納された入力データを読み出してこれを所定の法則に従って分類し、各分類毎に順次第2の格納手段の所定の記憶単位に書き込む段階とよりなり、
前記第1の格納手段は第2の格納手段より大きな記憶容量を有する構成とされてなるデータ処理方法。
(付記5)
更に第2の格納手段の記憶容量が不足すると判断された際に前記第1の格納手段からの読み出しを停止し、当該不足状態が解消した後、前記停止前に第2の格納手段に最後に書き込まれたデータが第1の格納手段から読み出された読み出し位置に遡って第1の格納手段からの読出しを再開する各段階よりなる付記4に記載のデータ処理方法。
(付記6)
第2の格納手段にデータを書き込む際には、その複数の記憶単位に対して所定の順序で書き込む構成とされ、前記第2の格納手段の記憶容量の不足の判断は、第1の格納手段から読み出されたデータを書き込んでいる記憶単位の番号と、このようにして書き込まれたデータが所定の処理のために読み出される記憶単位の番号との差の大小によって行なうものとされてなる付記4又は5に記載のデータ処理方法。
The present invention includes configurations shown in the following supplementary notes.
(Appendix 1)
First storage means for storing input data;
The second storage means reads out the input data stored in the first storage means, classifies it according to a predetermined rule, and sequentially writes it into a predetermined storage unit for each classification,
A data processing apparatus, wherein the first storage means has a larger storage capacity than the second storage means.
(Appendix 2)
When it is determined that the storage capacity of the second storage means is insufficient, reading from the first storage means is stopped, and after the shortage state is resolved, the data is finally written to the second storage means before the stop. The data processing apparatus according to appendix 1, wherein the data read from the first storage means is resumed from the read position where the read data is read from the first storage means.
(Appendix 3)
When writing data to the second storage means, the data is written in a predetermined order with respect to the plurality of storage units, and the determination of the lack of storage capacity of the second storage means is performed by the first storage means. The number of storage units into which the data read from the data is written and the number of storage units from which the data written in this way is read out for a predetermined process are determined depending on the difference. Item 4. The data processing device according to any one of Items 1 to 3.
(Appendix 4)
Storing input data in a first storage means;
Reading out the input data stored in the first storage means, classifying it according to a predetermined rule, and sequentially writing it into a predetermined storage unit of the second storage means for each classification,
A data processing method, wherein the first storage means has a larger storage capacity than the second storage means.
(Appendix 5)
Further, when it is determined that the storage capacity of the second storage means is insufficient, reading from the first storage means is stopped, and after the shortage is resolved, the second storage means is finally connected to the second storage means before the stop. The data processing method according to appendix 4, wherein the written data is traced back to the reading position where the data is read from the first storage means, and the reading from the first storage means is resumed.
(Appendix 6)
When writing data to the second storage means, the data is written in a predetermined order with respect to the plurality of storage units, and the determination of the lack of storage capacity of the second storage means is performed by the first storage means. Note that the number of storage units into which the data read from is written and the number of storage units from which the data written in this way is read out for a predetermined process are determined according to the difference in size. 6. The data processing method according to 4 or 5.

従来のパケットデータ交換装置のブロック図である。It is a block diagram of the conventional packet data exchange apparatus. 図1に示す構成における、パケットデータのシリアル・パラレル変換と行き先別への整形動作を説明するためのタイムチャートである。2 is a time chart for explaining serial / parallel conversion of packet data and a shaping operation for each destination in the configuration shown in FIG. 1. 図1に示す構成に含まれる、従来のパケット整形処理部のブロック図である。It is a block diagram of the conventional packet shaping process part contained in the structure shown in FIG. 図3に示す構成による従来のパケット整形方式(メモリの前段で整形を行う際のメモリへの格納手順)を説明するための図である。It is a figure for demonstrating the conventional packet shaping system (The storing procedure to the memory at the time of shaping in the front | former stage of a memory) by the structure shown in FIG. 本発明の一実施例によるデータ処理装置のブロック図である。1 is a block diagram of a data processing apparatus according to an embodiment of the present invention. 図5の構成によるパケット整形(メモリの後段で整形を行う際のメモリへの格納手順)を説明するための図である。FIG. 6 is a diagram for explaining packet shaping (a storing procedure in a memory when shaping is performed at a later stage of the memory) according to the configuration of FIG. 5. 図5の構成によるメモリの後段での分割整形処理の具体的動作例を説明するための図である。FIG. 6 is a diagram for explaining a specific operation example of a division shaping process in the latter stage of the memory having the configuration of FIG. 5. 図5の構成による小規模バッファ枯渇時の処理タイムチャートである。6 is a processing time chart when a small-scale buffer is depleted according to the configuration of FIG. 図5に示すバッファに対する書き込み動作のフローチャートである。6 is a flowchart of a write operation for the buffer shown in FIG. 5. 図5に示すバッファからの読み出し動作のフローチャートである。6 is a flowchart of a read operation from the buffer shown in FIG. 図5に示すメモリからの読み出し動作のフローチャートである。6 is a flowchart of a read operation from the memory shown in FIG.

符号の説明Explanation of symbols

12 書き込み部
13 メモリ
14 読み出しアドレス保持部
15 読出し部
16 バッファ
17 読み出し整形部
12 writing unit 13 memory 14 reading address holding unit 15 reading unit 16 buffer 17 reading shaping unit

Claims (4)

第1の格納手段からデータを読み出して当該読み出したデータを第2の格納手段の複数の記憶単位に分割して保持する読み出し手段と、
前記第2の格納手段の複数の記憶単位に分割して保持されたデータを読み出し、当該複数の記憶単位に分割して保持されたデータのうち、複数の記憶単位に保持された同一の行き先のデータ同士を組み合わせる整形を行う読み出し整形手段とを有し、
前記読み出し手段が前記第1の格納手段から読み出したデータを分割して保持する、前記第2の格納手段の前記複数の記憶単位のうちの一の記憶単位の番号と、前記読み出し整形手段が整形対象とするデータが保持されている、前記第2の格納手段の前記複数の記憶単位のうちの他の記憶単位の番号とを比較し、前記一の記憶単位の番号と前記他の記憶単位の番号との差が所定値より小さい場合に、前記読み出し手段は前記第1の格納手段からのデータの読み出しを停止することを特徴とするデータ処理装置。
Reading means for reading data from the first storage means and dividing the read data into a plurality of storage units of the second storage means;
Reads data held by being divided into a plurality of storage units of the second storage means, and among the data held by being divided into the plurality of storage units, the same destination held in the plurality of storage units Read shaping means that performs shaping that combines data ,
The number of the storage unit of the plurality of storage units of the second storage unit, in which the reading unit divides and holds the data read from the first storage unit, and the read shaping unit shapes the data. The number of the one storage unit is compared with the number of the other storage unit by comparing the number of the other storage unit among the plurality of storage units of the second storage unit that holds the target data. The data processing apparatus according to claim 1, wherein when the difference from the number is smaller than a predetermined value, the reading unit stops reading data from the first storage unit.
前記読み出し手段は、前記第1の格納手段から読み出した1サイクル分の第1のデータが同一の行き先のデータである場合には、当該読み出した1サイクル分の第1のデータを前記第2の格納手段の前記複数の記憶単位のうちの第1一の記憶単位に保持し、前記第1の格納手段から次に読み出した1サイクル分の第2のデータが同一の行き先のデータであり、かつ前記第1のデータと同一の行き先のデータである場合には、当該第2のデータを前記第2の格納手段の複数の記憶単位のうちの前記第1の一の記憶単位とは異なる第2の一の記憶単位に保持し、
前記第1の格納手段から読み出した1サイクル分のデータが複数の異なる行き先のデータである場合には、当該1サイクル分の複数の異なる行き先のデータを、前記第2の格納手段の前記複数の記憶単位のうちの複数の記憶単位に夫々分割して保持することを特徴とする請求項1に記載のデータ処理装置。
When the first data for one cycle read from the first storage means is the same destination data, the reading means stores the read first data for one cycle in the second held in the first primary storage unit of the plurality of storage units storing means, second data next read one cycle from said first storage means is a data of the same destination, When the destination data is the same as the first data, the second data is different from the first storage unit among the plurality of storage units of the second storage means. 2 in one storage unit,
When the data for one cycle read from the first storage means is data of a plurality of different destinations, the plurality of data of different destinations for the one cycle are stored in the plurality of data of the second storage means. the data processing apparatus according to claim 1, characterized in that holding by respectively divided into a plurality of storage units of the storage unit.
第1の格納手段からデータを読み出して当該読み出したデータを第2の格納手段の複数の記憶単位に分割して保持する読み出し段階と、
前記第2の格納手段の複数の記憶単位に分割して保持されたデータを読み出し、当該複数の記憶単位に分割して保持されたデータのうち、複数の記憶単位に保持された、同一の行き先のデータ同士を組み合わせる整形を行う読み出し整形段階とを有し、
前記読み出し段階で前記第1の格納手段から読み出したデータを分割して保持する、前記第2の格納手段の前記複数の記憶単位のうちの一の記憶単位の番号と、前記読み出し整形段階で整形対象とされるデータが保持されている、前記第2の格納手段の前記複数の記憶単位のうちの他の記憶単位の番号とを比較し、前記一の記憶単位の番号と前記他の記憶単位の番号との差が所定値より小さい場合に、前記読み出し段階では前記第1の格納手段からのデータの読み出しを停止することを特徴とするデータ処理方法。
A read step of reading data from the first storage means and dividing the read data into a plurality of storage units of the second storage means;
The same destination stored in the plurality of storage units among the data stored in the plurality of storage units is read out by reading the data stored in the plurality of storage units of the second storage unit And a read shaping stage for shaping the data in combination ,
The number of storage units of the plurality of storage units of the second storage means that divides and holds the data read from the first storage means at the read stage and the shaping at the read shaping stage. The number of the one storage unit and the other storage unit are compared with the number of the other storage unit among the plurality of storage units of the second storage unit in which the target data is held A data processing method characterized by stopping reading of data from the first storage means in the reading step when the difference from the number is smaller than a predetermined value.
前記読み出し段階では、前記第1の格納手段から読み出した1サイクル分の第1のデータが同一の行き先のデータである場合には、当該読み出した1サイクル分の第1のデータを前記第2の格納手段の前記複数の記憶単位のうちの第1一の記憶単位に保持し、前記第1の格納手段から次に読み出した1サイクル分の第2のデータが同一の行き先のデータであり、かつ前記第1のデータと同一の行き先のデータである場合には、当該第2のデータを前記第2の格納手段の複数の記憶単位のうちの前記第1の一の記憶単位とは異なる第2の一の記憶単位に保持し、
前記第1の格納手段から前記所定のサイクルの1サイクルで読み出したデータが複数の異なる行き先のデータである場合には、当該複数の異なる行き先のデータを、前記第2の格納手段の前記複数の記憶単位のうちの複数の記憶単位に夫々分割して保持することを特徴とする請求項3に記載のデータ処理方法。
In the reading step, when the first data for one cycle read from the first storage means is the same destination data, the first data for the one cycle read is stored in the second data. held in the first primary storage unit of the plurality of storage units storing means, second data next read one cycle from said first storage means is a data of the same destination, When the destination data is the same as the first data, the second data is different from the first storage unit among the plurality of storage units of the second storage means. 2 in one storage unit,
When the data read from the first storage means in one cycle of the predetermined cycle is data of a plurality of different destinations, the data of the plurality of different destinations are stored in the plurality of data of the second storage means. the data processing method according to claim 3, characterized in that holding by respectively divided into a plurality of storage units of the storage unit.
JP2003413659A 2003-12-11 2003-12-11 Data processing apparatus and data processing method Expired - Fee Related JP4421280B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003413659A JP4421280B2 (en) 2003-12-11 2003-12-11 Data processing apparatus and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003413659A JP4421280B2 (en) 2003-12-11 2003-12-11 Data processing apparatus and data processing method

Publications (2)

Publication Number Publication Date
JP2005175938A JP2005175938A (en) 2005-06-30
JP4421280B2 true JP4421280B2 (en) 2010-02-24

Family

ID=34733727

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003413659A Expired - Fee Related JP4421280B2 (en) 2003-12-11 2003-12-11 Data processing apparatus and data processing method

Country Status (1)

Country Link
JP (1) JP4421280B2 (en)

Also Published As

Publication number Publication date
JP2005175938A (en) 2005-06-30

Similar Documents

Publication Publication Date Title
US5083269A (en) Buffer device suitable for asynchronous transfer mode communication
US8225026B2 (en) Data packet access control apparatus and method thereof
US7352766B2 (en) High-speed memory having a modular structure
JP3645584B2 (en) Data transfer synchronization device
US7126959B2 (en) High-speed packet memory
CN101261575B (en) Asynchronous FIFO memory accomplishing unequal breadth data transmission
US10133549B1 (en) Systems and methods for implementing a synchronous FIFO with registered outputs
CN112084136A (en) Queue cache management method, system, storage medium, computer device and application
JPH07327038A (en) Data receiver and buffer management method
US8363653B2 (en) Packet forwarding method and device
JP4421280B2 (en) Data processing apparatus and data processing method
US7756131B2 (en) Packet forwarding system capable of transferring packets fast through interfaces by reading out information beforehand for packet forwarding and method thereof
US20100054272A1 (en) Storage device capable of accommodating high-speed network using large-capacity low-speed memory
CN113900975B (en) Synchronous FIFO
US20120203982A1 (en) Fifo buffer and method of controlling fifo buffer
US10853123B2 (en) Memory module
CN102571535A (en) Device and method for delaying data and communication system
JP4569163B2 (en) Data input / output device and data input / output method
US6831920B1 (en) Memory vacancy management apparatus and line interface unit
JP7419944B2 (en) Semiconductor device and synchronization method
JP5379075B2 (en) Data input / output device, data storage method and program
Song Bit-Width Conversion Based on Asynchronous FIFO
KR100344025B1 (en) HDLC router using multi-queue and control method therefor
JPH1051469A (en) Atm switch
JP2012253598A (en) Semiconductor device and communication device using the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061006

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090616

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090817

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090908

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091104

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: 20091124

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091202

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

Free format text: PAYMENT UNTIL: 20121211

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: 20121211

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131211

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees