JP4637154B2 - Traffic control method and apparatus - Google Patents

Traffic control method and apparatus Download PDF

Info

Publication number
JP4637154B2
JP4637154B2 JP2007275598A JP2007275598A JP4637154B2 JP 4637154 B2 JP4637154 B2 JP 4637154B2 JP 2007275598 A JP2007275598 A JP 2007275598A JP 2007275598 A JP2007275598 A JP 2007275598A JP 4637154 B2 JP4637154 B2 JP 4637154B2
Authority
JP
Japan
Prior art keywords
value
input
counter
quotient
input port
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.)
Active
Application number
JP2007275598A
Other languages
Japanese (ja)
Other versions
JP2009105669A (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.)
NTT Electronics Corp
Nippon Telegraph and Telephone Corp
Nippon Telegraph and Telephone West Corp
Nippon Telegraph and Telephone East Corp
Original Assignee
NTT Electronics Corp
Nippon Telegraph and Telephone Corp
Nippon Telegraph and Telephone West Corp
Nippon Telegraph and Telephone East Corp
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 NTT Electronics Corp, Nippon Telegraph and Telephone Corp, Nippon Telegraph and Telephone West Corp, Nippon Telegraph and Telephone East Corp filed Critical NTT Electronics Corp
Priority to JP2007275598A priority Critical patent/JP4637154B2/en
Publication of JP2009105669A publication Critical patent/JP2009105669A/en
Application granted granted Critical
Publication of JP4637154B2 publication Critical patent/JP4637154B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

本発明は、WFQ(Weight Fair Queuing)回路を用いたトラヒックコントロール装置に関する。   The present invention relates to a traffic control device using a WFQ (Weight Fair Queuing) circuit.

データ通信以外に音声電話やTV電話など、多様な通信サービスがインターネットを介して提供されている。このような多様化に伴い、柔軟性と高速性を両立するために、各キュー、スケジューラ、そしてシェーパを、セレクタを用いて接続し、送信要求と要求受理信号のハンドシェークを用いたQoS(Quality of Service)方式が提案されてきた(例えば、特許文献1、特許文献2参照)。さらに、このQoS方式に用いるスケジューリングモジュールが提案されている(例えば、特許文献3参照)。この方式では、各入力に指定された重みをクロックサイクル毎に時分割、あるいは、加算値を変更して各入力の要求フレーム長との比較を行うカウンタに加算し、値が正かつ送信要求がある入力をラウンドロビンで選択して後段への送信要求信号として用いている。
特開2005−311409号公報 特開2005−323230号公報 特開2007−110515号公報
In addition to data communication, various communication services such as voice calls and videophones are provided via the Internet. Along with such diversification, in order to achieve both flexibility and high speed, each queue, scheduler, and shaper are connected using a selector, and QoS (Quality of Quality) using a handshake of a transmission request and a request acceptance signal is used. (Service) method has been proposed (see, for example, Patent Document 1 and Patent Document 2). Furthermore, a scheduling module used for this QoS method has been proposed (see, for example, Patent Document 3). In this method, the weight specified for each input is time-divided every clock cycle, or added to a counter that compares the requested frame length of each input by changing the addition value, and the value is positive and the transmission request is A certain input is selected by round robin and used as a transmission request signal to the subsequent stage.
JP 2005-31409 A JP 2005-323230 A JP 2007-110515 A

しかしながら、上述した従来技術では、送信要求を受けていない場合かつ入力カウンタが正でありかつ、送信受理信号を受け取ったあるいは、delayが0になった場合そのカウンタに蓄積されていた値を総カウンタに戻さなければならないといったように処理が複雑であり、加えて、各入力は最大フレームサイズの負数分のレジスタを持たなければならず、さらには、それらがすべて総カウンタに戻った場合のレジスタを持たなければならない。そのため、回路規模は大きくなってしまう。また、重みの範囲が大きくなった場合(たとえば、1:15→1:255)、方式的に正確なカウンタヘの加算ができなくなる。これは、Ethernet(登録商標)フレームの最小フレーム長は、64Byte(バイト)であり、一度の加算によって、ある入力には1しか加算しないのに、ある入力には255が一度に加算されるために、255が加算された入力からバースト的に3フレーム(255/64=3.98)送出される可能性があることによる。   However, in the above-described prior art, when the transmission request is not received and the input counter is positive and the transmission acceptance signal is received or when delay becomes 0, the value accumulated in the counter is changed to the total counter. In addition, each input must have a negative number of registers for the maximum frame size, and the registers when they all return to the total counter. Must have. Therefore, the circuit scale becomes large. In addition, when the range of the weight becomes large (for example, 1: 15 → 1: 255), it is impossible to add the correct counter to the method. This is because the minimum frame length of an Ethernet (registered trademark) frame is 64 bytes (bytes), and only one is added to a certain input by one addition, but 255 is added to a certain input at a time. Furthermore, there is a possibility that 3 frames (255/64 = 3.98) are transmitted in burst from the input with 255 added.

そこで、本発明は、このような事情を考慮してなされたものであり、その目的は、算術演算を行うことで、各動作ステップ数の削減および、固定化を行い、高速かつ小型のQoS回路、特にキュー制御を行う重み付け公平制御(WFQ:Weight Fair Queuing)回路を提供することにある。   Therefore, the present invention has been made in consideration of such circumstances, and an object of the present invention is to reduce and fix the number of each operation step by performing an arithmetic operation, and to realize a high-speed and small QoS circuit. In particular, a weight fair control (WFQ) circuit that performs queue control is provided.

前記課題を解決するために、本発明は、複数の入力ポートからの入力を後段に出力するトラヒックコントロール装置におけるトラヒックコントロール方法であって、前記トラヒックコントロール装置は、複数の入力ポートそれぞれに対応した商カウンタの値及び余りカウンタの値を記憶する記憶手段を備えており、前記商カウンタのうち最小値である商カウンタを選択し、選択された商カウンタに対応した入力ポートからの送信要求を後段回路に送信する出力過程と、選択された商カウンタ以外の前記商カウンタの値を、前記選択された商カウンタの値を減算した値に更新する更新過程と、前記選択された商カウンタに対応した入力ポートからの入力のフレーム長と、当該入力ポートに対応した余りカウンタの値とを加算した値を、当該入力ポートに対応した所定の重みの値で除算し、除算した結果の商により前記選択された商カウンタの値を更新し、除算した結果の余りにより当該入力ポートに対応した余りカウンタの値を更新する演算過程とを有することを特徴とする。   In order to solve the above-described problems, the present invention provides a traffic control method in a traffic control apparatus that outputs input from a plurality of input ports to a subsequent stage, wherein the traffic control apparatus is a quotient corresponding to each of the plurality of input ports. A storage means for storing a counter value and a remainder counter value; selecting a quotient counter that is a minimum value among the quotient counters; and sending a transmission request from an input port corresponding to the selected quotient counter to a post-stage circuit An update process for updating the value of the quotient counter other than the selected quotient counter to a value obtained by subtracting the value of the selected quotient counter, and an input corresponding to the selected quotient counter The value obtained by adding the frame length of the input from the port and the value of the remainder counter corresponding to the input port. Divide by a predetermined weight value corresponding to the data rate, update the value of the selected quotient counter by the quotient of the result of division, and update the value of the remainder counter corresponding to the input port by the remainder of the result of division And an arithmetic process to perform.

また、本発明は、上述するトラヒックコントロール方法であって、前記演算過程において、前記選択された商カウンタに対応した入力ポートからの入力のフレーム長と、当該入力ポートに対応した余りカウンタの値とを加算する代わりに、当該入力ポートの入力のフレーム長を、所定分、あるいは、重みのとりうる最大値分だけ左ビットシフトし、当該入力ポートに対応した余りカウンタの値と連結する、ことを特徴とする。
また、本発明は、上述するトラヒックコントロール方法であって、前記記憶手段は、各入力ポートに対応し、送信要求が送信された順序に応じて値が変更されるラウンドロビンカウンタをさらに記憶し、前記出力過程において、最小値を有する前記商カウンタが複数ある場合、前記ラウンドロビンカウンタの値により、送信要求を送信する入力ポートを選択する、ことを特徴とする。
Further, the present invention is the traffic control method described above, wherein in the calculation process, the frame length of the input from the input port corresponding to the selected quotient counter, and the value of the remainder counter corresponding to the input port, The input frame length of the input port is shifted to the left by a predetermined amount or a maximum value that can be weighted, and connected to the value of the remainder counter corresponding to the input port. Features.
Further, the present invention is the traffic control method described above, wherein the storage means further stores a round robin counter corresponding to each input port, the value of which is changed according to the order in which the transmission requests are transmitted, In the output process, when there are a plurality of quotient counters having a minimum value, an input port for transmitting a transmission request is selected according to a value of the round robin counter.

また、本発明は、複数の入力ポートからの入力を後段に出力するトラヒックコントロール装置であって、複数の入力ポートそれぞれに対応した商カウンタの値及び余りカウンタの値を記憶する記憶手段と、前記商カウンタのうち最小値である商カウンタを選択し、選択された商カウンタに対応した入力ポートからの送信要求を後段回路に送信する制御手段と、選択された商カウンタ以外の前記商カウンタの値を、前記選択された商カウンタの値を減算した値に更新するとともに、当該選択された商カウンタに対応した入力ポートからの入力のフレーム長と、当該入力ポートに対応した余りカウンタの値とを加算した値を、当該入力ポートに対応した所定の重みの値で除算し、除算した結果の商により前記選択された商カウンタの値を更新し、除算した結果の余りにより当該入力ポートに対応した余りカウンタの値を更新する演算手段と、を備えることを特徴とする。   Further, the present invention is a traffic control device for outputting input from a plurality of input ports to a subsequent stage, and storage means for storing a quotient counter value and a remainder counter value corresponding to each of the plurality of input ports; Control means for selecting a quotient counter that is the minimum value among the quotient counters, and transmitting a transmission request from an input port corresponding to the selected quotient counter to a subsequent circuit, and values of the quotient counters other than the selected quotient counter Is updated to a value obtained by subtracting the value of the selected quotient counter, the frame length of the input from the input port corresponding to the selected quotient counter, and the value of the remainder counter corresponding to the input port The added value is divided by a predetermined weight value corresponding to the input port, and the value of the selected quotient counter is updated with the quotient obtained by the division. The remainder of the result of calculation, characterized in that it comprises calculation means for updating the value of the remainder counter corresponding to the input port, the.

WFQ回路等のトラヒックコントロール装置においては、カウンタから重み値を繰り返し減算する処理、後段回路に送信要求をした入力についてはそのフレーム長をカウンタに加算する処理など、各種の演算処理が必要となるが、本発明によれば、重み値の繰り返し減算を不要にするとともに、フレーム長をカウンタに加算する処理には固定小数点を用いてその演算処理を簡易化すること等、により、WFQ回路に必要な各種の演算処理を高速化し、また、回路規模を小さくすることが可能となる。   In a traffic control device such as a WFQ circuit, various arithmetic processes such as a process of repeatedly subtracting a weight value from a counter and a process of adding the frame length to a counter for an input requested to be transmitted to a subsequent circuit are required. According to the present invention, it is necessary for the WFQ circuit to eliminate the need for iterative subtraction of the weight value and simplify the calculation process using a fixed point for the process of adding the frame length to the counter. Various arithmetic processes can be speeded up and the circuit scale can be reduced.

以下、図面を用いて本発明の一実施形態を説明する。
まず始めに、本発明の一実施形態によるトラヒックコントロール装置としてのWFQ(Weight Fair Queuing)回路の基本動作を、図1に示す概要動作フローに基づいて説明する。
同図において、WFQ回路は、対応して設置されている入力カウンタが0以下かつ前段回路から送信要求を受信している入力ポートを選択し(ステップS11)、後段回路に、この選択した送信要求を出力する(ステップS12)。続いてWFQ回路は、後段回路に送信要求を出力した入カポートに対応して設置されている入力カウンタに、後段回路に送信要求を出力したフレームのフレーム長を加算する(ステップS13)。WFQ回路は、各入力カウンタから、入力ポート毎に予め設定された重み値を所定の周期(例えば、システムクロック毎)で減算する(ステップS14)。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
First, a basic operation of a WFQ (Weight Fair Queuing) circuit as a traffic control device according to an embodiment of the present invention will be described based on a schematic operation flow shown in FIG.
In the figure, the WFQ circuit selects an input port whose corresponding input counter is 0 or less and receives a transmission request from the preceding circuit (step S11), and sends the selected transmission request to the succeeding circuit. Is output (step S12). Subsequently, the WFQ circuit adds the frame length of the frame for which the transmission request is output to the subsequent stage circuit to the input counter installed corresponding to the input port that has output the transmission request to the subsequent stage circuit (step S13). The WFQ circuit subtracts a weight value preset for each input port from each input counter at a predetermined cycle (for example, every system clock) (step S14).

WFQ回路が後段回路から受理信号を受信すると(ステップS15)、前段回路に受理信号を出力する(ステップS16)。WFQ回路は、待ち制御を行うカウンタであるWaitCntに、待ちの上限値であるJudgeWaitの値を設定する(ステップS17)。WaitCntの設定後、WFQ回路は、WaitCntの値が0になるまで、WaitCntの値を所定の周期(例えば、システムクロック毎)で1ずつ減算する(ステップS18、S19)。そして、WaitCntの値が0になったときに、次に後段回路へ送信すべき要求を決定するために、ステップS11に戻り、選択された入力ポートからの送信要求を待つことになる。入力カウンタは後段回路に送信要求を出力した時点で、ステップS13においてフレーム長が加算されている。また、このようにすることで、重み値を制御することにより、後段回路への送信要求の送出タイミングを適切に制御することが可能となる。   When the WFQ circuit receives an acceptance signal from the subsequent circuit (step S15), it outputs the acceptance signal to the preceding circuit (step S16). The WFQ circuit sets a value of JudgeWait, which is an upper limit value of wait, to WaitCnt, which is a counter that performs wait control (step S17). After setting WaitCnt, the WFQ circuit subtracts the value of WaitCnt by 1 at a predetermined cycle (for example, every system clock) until the value of WaitCnt becomes 0 (steps S18 and S19). When the value of WaitCnt becomes 0, the process returns to step S11 to determine a request to be transmitted to the subsequent circuit, and waits for a transmission request from the selected input port. When the input counter outputs a transmission request to the subsequent circuit, the frame length is added in step S13. In addition, by doing this, it is possible to appropriately control the transmission timing of the transmission request to the subsequent circuit by controlling the weight value.

以上のWFQ回路の動作を数式で表現し、それに基づき、本発明の基本原理を説明する。
各入力ポートi(iは入カポートの番号)の入力カウンタをcnt[i]、重み値をweight[i]、送信要求を出力すべきであると選択された入力ポートにおける入力のフレーム長をflenとすると、各入力カウンタcnt[i]の値は、所定の周期で重み値により減算されることから以下の(式1)のようになる。なお、以下の式において、「=」は、右辺演算後の結果を左辺に格納することを意味する。
The above-described operation of the WFQ circuit is expressed by mathematical formulas, and the basic principle of the present invention will be described based thereon.
The input counter of each input port i (i is the input port number) is set to cnt [i], the weight value is weight [i], and the frame length of the input at the input port selected to output the transmission request is flen. Then, since the value of each input counter cnt [i] is subtracted by the weight value at a predetermined cycle, the following (Equation 1) is obtained. In the following expression, “=” means that the result after the right side operation is stored in the left side.

cnt[i]=cnt[i]−weight[i] ただし、CNT[i]>0 …(式1)   cnt [i] = cnt [i] −weight [i] where CNT [i]> 0 (Expression 1)

上記の(式1)の両辺をweight[i]で除算すると、以下の(式2)のようになる。   When both sides of the above (Equation 1) are divided by weight [i], the following (Equation 2) is obtained.

cnt[i]/weight[i]=cnt[i]/weight[i]−1 …(式2)   cnt [i] / weight [i] = cnt [i] / weight [i] -1 (Expression 2)

ここで、cnt[i]/weight[i]をCNT[i]とおくと、(式2)は、以下の(式3)のようになる。   Here, when cnt [i] / weight [i] is set to CNT [i], (Expression 2) becomes as shown in (Expression 3) below.

CNT[i]=CNT[i]−1 …(式3)   CNT [i] = CNT [i] -1 (Formula 3)

この場合、最も最初にcnt[i]が0以下となるのは、明らかに、|CNT[i]|(CNT[i]の絶対値)が最も小さい入力である。このことから、(式1)のように、weight[i]を減算し続け、値が0以下になる入力ポートを選択する場合に比べ、送信要求が入力されている入力ポートiのCNT[i]の大きさを比較するだけで、送信要求の送出を行う入カポートの選択が可能となり、演算処理の高速化を図ることができる。   In this case, it is apparent that the input having the smallest value of | CNT [i] | (absolute value of CNT [i]) is the first that cnt [i] is 0 or less. Therefore, as shown in (Equation 1), weight [i] is continuously subtracted, and CNT [i of input port i to which a transmission request is input is compared with a case where an input port whose value is 0 or less is selected. ], It is possible to select an input port for sending a transmission request, and to speed up the arithmetic processing.

なお、各入力ポートiのcnt[i]は、ある入力ポートiのcnt[i]が0以下となるまで、cnt[i]からweight[i]を減算し続け、cnt[i]の値が更新される。
そこで、すべての入力ポートiのCNT[i]の中の最小値をCNTminとすると、このCNTminを各入力ポートに対応するCNT[i]から減ずることで、ある入力ポートのcnt[i]が0以下となるまで、各入力ポートのcnt[i]からweight[i]を減算し続けるのと同じになる。
すなわち、以下の(式4)の演算を行うことにより、各入力ポートiに対応するCNT[i]を更新することができ、cnt[i]が0以下となるまでweight[i]を減算し続ける場合に比べ、処理が簡単化され、演算処理の高速化を図ることができる。
Note that cnt [i] of each input port i continues to subtract weight [i] from cnt [i] until cnt [i] of an input port i becomes 0 or less, and the value of cnt [i] Updated.
Therefore, if the minimum value among CNT [i] of all input ports i is CNTmin, the cnt [i] of a certain input port is reduced to 0 by subtracting this CNTmin from CNT [i] corresponding to each input port. This is equivalent to continuing to subtract weight [i] from cnt [i] of each input port until:
That is, by performing the following calculation (Equation 4), CNT [i] corresponding to each input port i can be updated, and weight [i] is subtracted until cnt [i] becomes 0 or less. Compared with the case of continuing, the processing is simplified, and the speed of the arithmetic processing can be increased.

CNT[i]=CNT[i]−CNTmin …(式4)   CNT [i] = CNT [i] −CNTmin (Formula 4)

また、後段回路に送信要求送出する時、cnt[i]にフレーム長flenを加算する必要がある。すなわち、以下の(式5)のようになる。   Further, when sending a transmission request to the subsequent circuit, it is necessary to add the frame length flen to cnt [i]. That is, the following (Formula 5) is obtained.

CNT[i]=(cnt[i]+flen)/weight[i]
=CNT[i]+flen/weight[i] …(式5)
CNT [i] = (cnt [i] + flen) / weight [i]
= CNT [i] + flen / weight [i] (Formula 5)

(式5)において、flen/weight[i]の演算を、浮動小数点で行うと、浮動小数点の除算は計算コストが高くなる。従って、固定小数点で行ったほうがハードウェア化、処理の高速化の面から好ましい。しかしながら、固定小数点のため割り切れない場合が存在し、flen/weight[i]の余りR[i]が累積的な誤差を生む。そこで、余りを次の計算時、フレーム長flenに加算するようにすることで、累積誤差を0にできる。具体的には、除算を行う前のCNT[i]の値をCNT’[i]とし、除算を行ったことによる商をQ[i]、余りをR[i]とすると、flen=Q[i]×weight[i]+R[i]であることから、以下の(式6)のようになる。   In (Expression 5), if the operation of flen / weight [i] is performed in floating point, the calculation cost of floating point division increases. Therefore, it is preferable to use a fixed point in terms of hardware and high-speed processing. However, there are cases where it is not divisible because of a fixed point, and the remainder R [i] of flen / weight [i] produces a cumulative error. Therefore, the cumulative error can be reduced to zero by adding the remainder to the frame length flen in the next calculation. Specifically, assuming that the value of CNT [i] before division is CNT ′ [i], the quotient resulting from the division is Q [i], and the remainder is R [i], flen = Q [ Since i] × weight [i] + R [i], the following (formula 6) is obtained.

CNT[i]
=CNT’[i]+flen/weight[i]
=CNT’[i]+(flen−R[i])/weight[i]+R[i]/weight[i]
=CNT’[i]+Q[i]+R[i]/weight[i] …(式6)
CNT [i]
= CNT '[i] + flen / weight [i]
= CNT ′ [i] + (flen−R [i]) / weight [i] + R [i] / weight [i]
= CNT ′ [i] + Q [i] + R [i] / weight [i] (Formula 6)

そして、その次に除算機会を得たときには、同様に以下のようになる。   Then, when the next division opportunity is obtained, it is as follows.

CNT[i]
=CNT’[i]+flen/weight[i]
=CNT”[i]+Q’[i]+R’[i]/weight[i]+flen/weight[i]
=CNT”[i]+Q’[i]+(flen+R’[i]−R[i])/weight[i]+R[i]/weight[i]
=CNT”[i]+Q’[i]+Q[i]+R[i]/weight[i] …(式7)
CNT [i]
= CNT '[i] + flen / weight [i]
= CNT "[i] + Q '[i] + R' [i] / weight [i] + flen / weight [i]
= CNT "[i] + Q '[i] + (flen + R' [i] -R [i]) / weight [i] + R [i] / weight [i]
= CNT "[i] + Q '[i] + Q [i] + R [i] / weight [i] (Formula 7)

ここで、CNT”[i]は除算2回前のCNT[i]の値、Q’、R’はそれぞれ前回除算を行ったときの商と余りである。Rは、0≦R<weight[i]を満たすので、累積誤差はweight[i]に収まる。図5は、除算累積誤差を説明するための図であり、たとえば同図に示すようなフレーム長のフレームが1行目のものから順に入力され、当該フレーム長に対して演算を行う場合、本方式を使用すると、余りを計算に入れ込んだ固定小数点演算累積値の欄に示すように、浮動小数点演算の累積結果との差は小数点以下のみとなるが、余りの足しこみを行わない場合、余りを計算に入れ込まない固定小数点演算累積値の欄に示すように誤差は次々と累積されていく。   Here, CNT ″ [i] is the value of CNT [i] two times before the division, and Q ′ and R ′ are the quotient and remainder when the previous division is performed. R is 0 ≦ R <weight [ i] is satisfied, the accumulated error falls within the weight [i], and Fig. 5 is a diagram for explaining the division accumulated error, for example, a frame having a frame length as shown in FIG. When the calculation is performed for the corresponding frame length and this method is used, the difference from the accumulated result of the floating-point operation is as shown in the fixed-point operation accumulated value column with the remainder included in the calculation. If the remainder is not added, but the remainder is not added, the error is accumulated one after another as shown in the column of the fixed-point arithmetic accumulation value in which the remainder is not included in the calculation.

また、除数の最大値m(weight[i]のとりえる最大値)分だけ、CNT[i]、flenをmビット左シフトして除算を行うことで、加算の必要はなくなり、ビット結合だけで処理することが可能となり、演算時間をさらに短縮できる。   Also, by dividing CNT [i] and flen by m bits to the left by the maximum divisor m (maximum value of weight [i]), there is no need for addition, and only bit combination is required. It is possible to process, and the calculation time can be further shortened.

つまり、上記(式5)と、Q[i]=(flen−R[i])/weight[i]であることから、以下の(式8)のようになる。   That is, since (Equation 5) and Q [i] = (flen−R [i]) / weight [i], the following (Equation 8) is obtained.

CNT[i]=CNT’[i]+flen/weight[i]
=CNT’[i]+Q[i]+R[i]/weight[i] …(式8)
CNT [i] = CNT ′ [i] + flen / weight [i]
= CNT ′ [i] + Q [i] + R [i] / weight [i] (Formula 8)

しかし、実際には、R[i]/weight[i]は小数点以下の値となるため、(式8)は以下の(式9)のようになる。   However, in actuality, R [i] / weight [i] has a value after the decimal point, so (Equation 8) becomes as shown in (Equation 9) below.

CNT[i]=CNT’[i]+Q[i] …(式9)   CNT [i] = CNT ′ [i] + Q [i] (Formula 9)

また、(式8)の両辺を2^m倍(「^」は、べき乗を表す)すると、以下の(式10)のようになる。なお、「<<m」は、mビットだけ左シフトすることを示す。   Further, when both sides of (Expression 8) are multiplied by 2 ^ m ("^" represents a power), the following (Expression 10) is obtained. Note that “<< m” indicates a left shift by m bits.

CNT[i]<<m
=CNT’[i]<<m+(flen<<m)/weight[i] …(式10)
CNT [i] << m
= CNT '[i] << m + (flen << m) / weight [i] (Expression 10)

(式8)を用いて、(式10)を変形すると、以下の(式11)のようになる。なお、R’[i]は前回の入力フレームiが送信要求として選択されたときに行われた除算の余りである。   When (Expression 10) is transformed using (Expression 8), the following (Expression 11) is obtained. R ′ [i] is the remainder of the division performed when the previous input frame i is selected as the transmission request.

CNT[i]<<m
=CNT’[i]<<m+(flen<<m)/weight[i]
=(CNT”[i]<<m+Q’[i]+R’[i]/weight[i])+(flen<<m)/weight[i]
=CNT”[i]<<m+Q’[i]+(flen<<m+R’[i])/weight[i] …(式11)
CNT [i] << m
= CNT '[i] << m + (flen << m) / weight [i]
= (CNT "[i] << m + Q '[i] + R' [i] / weight [i]) + (flen << m) / weight [i]
= CNT "[i] << m + Q '[i] + (flen << m + R' [i]) / weight [i] (Formula 11)

(式11)に、(式9)を代入すると、以下の(式12)になる。   Substituting (Equation 9) into (Equation 11) yields (Equation 12) below.

CNT[i]<<m=CNT’[i]+(flen<<m+R’[i])/weight[i] …(式12)   CNT [i] << m = CNT '[i] + (flen << m + R' [i]) / weight [i] (Formula 12)

1≦weight[i]≦2^mならば、0≦R’[i]<2^mである。また、flen≧1であるので、flen<<m≧2^mである。そのため、flen<<m+R’[i]は、flenとR’[i]のビット結合となる。   If 1 ≦ weight [i] ≦ 2 ^ m, then 0 ≦ R ′ [i] <2 ^ m. Further, since flen ≧ 1, flen << m ≧ 2 ^ m. Therefore, flen << m + R '[i] is a bit combination of flen and R' [i].

以上のように、入力カウンタcnt[i]の値を用いるのではなく、cnt[i]をweight[i]で除したCNT[i]及びその最小値CNTminを用いることで、送信要求の送出を行う入力の選択や、重み値による減算による更新処理を簡単に行うことが可能となり、演算時間の高速化を図ることができる。また、後段回路にフレームを送出したときのフレーム長を加算してCNT[i]の値を更新する演算においても、上述したように、固定小数点を用いた場合の余りによる誤差の累積を適切に処理することで、簡単な処理によりCNT[i]の値を更新することができ、演算処理を高速化することができる。
なお、上記においては、重みのとりうる最大値分ビットシフトを行っているが、適当な、予め決められた所定分、ビットシフトを行うことでもよい。
As described above, instead of using the value of the input counter cnt [i], the transmission request is transmitted by using CNT [i] obtained by dividing cnt [i] by weight [i] and its minimum value CNTmin. Selection of input to be performed and update processing by subtraction by weight value can be easily performed, and the calculation time can be increased. Also, in the calculation of updating the value of CNT [i] by adding the frame length when the frame is sent to the subsequent circuit, as described above, it is possible to appropriately accumulate errors due to the remainder when using a fixed point. By processing, the value of CNT [i] can be updated by simple processing, and the arithmetic processing can be speeded up.
In the above description, the bit shift is performed by the maximum value that can be weighted, but the bit shift may be performed by an appropriate predetermined amount.

図2は、上述の基本原理に基づいて構成した、本発明の一実施形態によるWFQ回路100の構成例である。また、図3は、図2のWFQ回路100の動作フローを示した図である。以下、図2、図3に基づいて、本発明の実施の形態について詳細に説明する。   FIG. 2 is a configuration example of the WFQ circuit 100 according to the embodiment of the present invention, which is configured based on the basic principle described above. FIG. 3 is a diagram showing an operation flow of the WFQ circuit 100 of FIG. Hereinafter, embodiments of the present invention will be described in detail with reference to FIGS.

まず、図2を用いて、本発明の一実施の形態によるWFQ回路100の構成について説明する。図2の構成例では、入力ポートの数が4(i=0〜3)である場合について示しているが、4以上あるいは4以下の場合であってもよい。   First, the configuration of the WFQ circuit 100 according to an embodiment of the present invention will be described with reference to FIG. In the configuration example of FIG. 2, a case where the number of input ports is 4 (i = 0 to 3) is shown, but a case where the number is 4 or more or 4 or less may be used.

入力iフレーム長記憶手段101−i(i=0〜3)は、前段回路から入力ポートiに入力されたフレームのフレーム長であるflen[i]を格納する手段である。入力i重み記憶手段−i(i=0〜3)は、入力ポートiの入力に対する重み値であるweight[i]を格納する手段である。入力i商記憶手段103−i(i=0〜3)は、商カウンタ、すなわち、入力ポートiの入力に対する、上述したCNT[i]の商を格納する手段、入力i余り記憶手段104−i(i=0〜3)は、余りカウンタ、すなわち、CNT[i]の余りを格納する手段である。入力iラウンドロビンカウンタ記憶手段105−i(i=0〜3)は、入カポートiの入力に対応するラウンドロビンカウンタを格納する手段であり、演算回路106(演算手段)は、上述した各種の演算を実行する演算回路、制御回路107(制御手段)は、WFQ回路100の全体を制御する制御回路である。図2に示す制御回路107内の記憶手段に格納されているWaitCntは、待ち制御を行うためのカウンタであり、制御回路107内の記憶手段に格納されているJudgeWaitは、WaitCntの上限値として設定される値である。
なお、以下、入力iフレーム長記憶手段101−0〜3を総称して入力iフレーム長記憶手段101、入力i重み記憶手段−0〜3を総称して入力i重み記憶手段、入力i商記憶手段103−0〜3を総称して入力i商記憶手段103、入力i余り記憶手段104−0〜3を総称して入力i余り記憶手段104、入力iラウンドロビンカウンタ記憶手段105−0〜3を総称して入力iラウンドロビンカウンタ記憶手段105と記載する。入力iフレーム長記憶手段101、入力i重み記憶手段、入力i商記憶手段103、入力i余り記憶手段104、入力iラウンドロビンカウンタ記憶手段105は、例えばレジスタである。
The input i frame length storage means 101-i (i = 0 to 3) is a means for storing flen [i], which is the frame length of the frame input from the preceding circuit to the input port i. The input i weight storage means -i (i = 0 to 3) is means for storing weight [i] which is a weight value for the input of the input port i. The input i quotient storage means 103-i (i = 0 to 3) is a quotient counter, that is, means for storing the quotient of the above-mentioned CNT [i] with respect to the input of the input port i, and input i remainder storage means 104-i. (I = 0 to 3) is a remainder counter, that is, means for storing the remainder of CNT [i]. The input i round robin counter storage means 105-i (i = 0 to 3) is a means for storing a round robin counter corresponding to the input of the input port i, and the arithmetic circuit 106 (arithmetic means) An arithmetic circuit that executes arithmetic operation, the control circuit 107 (control means) is a control circuit that controls the entire WFQ circuit 100. WaitCnt stored in the storage means in the control circuit 107 shown in FIG. 2 is a counter for performing waiting control, and JudgeWaite stored in the storage means in the control circuit 107 is set as the upper limit value of WaitCnt. Is the value to be
Hereinafter, the input i frame length storage means 101-0 to 3 are collectively referred to as input i frame length storage means 101, and the input i weight storage means 0 to 3 are collectively referred to as input i weight storage means and input i quotient storage. The means 103-0-3 are collectively referred to as the input i quotient storage means 103, the input i remainder storage means 104-0-3 are collectively referred to as the input i remainder storage means 104, and the input i round robin counter storage means 105-0-3. Are collectively referred to as input i round robin counter storage means 105. The input i frame length storage unit 101, the input i weight storage unit, the input i quotient storage unit 103, the input i remainder storage unit 104, and the input i round robin counter storage unit 105 are, for example, registers.

次に、図3を用いて、図2に示すWFQ回路の動作について説明する。
制御回路107は、自身の備える記憶手段に記憶するJudgeWaitに、所定の値を設定する(ステップS201)。さらに制御回路107は、各入力i重み記憶手段102に、各入力ポートiの所定の重み値weight[i]を設定し(ステップS202)、各入力i商記憶手段103、各入力i余り記憶手段104を0クリアする(ステップS203)。
Next, the operation of the WFQ circuit shown in FIG. 2 will be described with reference to FIG.
The control circuit 107 sets a predetermined value in JudgeWait stored in the storage unit provided in the control circuit 107 (step S201). Further, the control circuit 107 sets a predetermined weight value weight [i] of each input port i in each input i weight storage means 102 (step S202), and each input i quotient storage means 103, each input i remainder storage means. 104 is cleared to 0 (step S203).

続いて、制御回路107は、いずれかの入力ポートiに前段回路から送信要求があるかを判断する(ステップS204)。どの入力ポートiにも前段回路から送信要求がない場合には(ステップS204:NO)、ステップS204からの処理を再度実行する。
一方、いずれかの入力ポートiに前段回路から送信要求がある場合(ステップS204:YES)、制御回路107は、上述の基本原理で説明した各入力ポートiのCNT[i]を比較し、CNT[i]が最も小さい入力を選択するとともに、その選択したCNT[i]から最小値であるCNTminを求める。具体的には、CNT[i]の値は、入力i商記憶手段103に格納されているため、各入力i商記憶手段103内の設定内容を用いて、CNT[i]の値が最小の入力を選択する。CNT[i]の値が最小の入力ポートiを入力ポートjとし、入力ポートjからの入力を入力jとすると、最小値であるCNTminは、入力j商記憶手段103−jに格納されている値となる(ステップS205)。ただし、最小値比較時に、比較対象の入力に送信要求が来ていない入力に対しては、比較を行わない。
Subsequently, the control circuit 107 determines whether any input port i has a transmission request from the preceding circuit (step S204). If there is no transmission request from the preceding circuit for any input port i (step S204: NO), the processing from step S204 is executed again.
On the other hand, when there is a transmission request from the preceding circuit to any one of the input ports i (step S204: YES), the control circuit 107 compares CNT [i] of each input port i described in the basic principle described above, The input having the smallest [i] is selected, and the minimum value CNTmin is obtained from the selected CNT [i]. Specifically, since the value of CNT [i] is stored in the input i quotient storage means 103, the setting value in each input i quotient storage means 103 is used to minimize the value of CNT [i]. Select an input. Assuming that the input port i having the smallest CNT [i] value is the input port j and the input from the input port j is the input j, the minimum value CNTmin is stored in the input j quotient storage means 103-j. Value (step S205). However, at the time of the minimum value comparison, comparison is not performed for an input for which no transmission request has been made for the input to be compared.

制御回路107が、後段回路に、入力jに対する送信要求を送出すると(ステップS206)、以下のステップS208〜S210の処理を入力数の分だけ繰り返す(ステップS207)。
すなわち、演算回路106は、上述の基本原理の(式4)で説明したCNT[i]=CNT[i]−CNTminを演算する。具体的には、CNTminは、上述したように、入力j商記憶手段103−jに格納されており、各入力iのCNT[i]は、入力i商記憶手段103−i(iはj以外)に格納されているため、これらを用いて、上記の(式4)の減算処理を行う(ステップS208)。
そして、ステップS207による演算結果が負の場合、負になった入力kに対応した商を格納する入力k商記憶手段103−kと、当該入力kに対応した余りを格納する入力k余り記憶手段104−kとに、値として「0」を設定する(ステップS209、S210)。このようにすることにより、CNT[i]が負になることがなくなり、以後の処理を簡単にすることができる。
When the control circuit 107 sends a transmission request for the input j to the subsequent circuit (step S206), the following steps S208 to S210 are repeated by the number of inputs (step S207).
That is, the arithmetic circuit 106 calculates CNT [i] = CNT [i] −CNTmin described in (Equation 4) of the basic principle described above. Specifically, as described above, the CNTmin is stored in the input j quotient storage means 103-j, and the CNT [i] of each input i is the input i quotient storage means 103-i (i is other than j). Therefore, the subtraction process of the above (Equation 4) is performed using these (step S208).
If the calculation result in step S207 is negative, the input k quotient storage means 103-k that stores the quotient corresponding to the negative input k and the input k remainder storage means that stores the remainder corresponding to the input k. A value “0” is set to 104-k (steps S209 and S210). By doing so, CNT [i] does not become negative, and subsequent processing can be simplified.

次に、上述の基本原理で説明したように、(式5)に基づき、送信要求を行った入力jに対するフレーム長の加算に伴うCNT[i]の更新を行う(ステップS211)。すなわち、演算処理の高速化のため、固定小数点を用いた場合は以下のようになる。
演算回路106は、入力jフレーム長記憶手段101−jに格納されている入力jのフレーム長の値(flen)に、入力j余り記憶手段104−j内に格納されている入力jの余りの値を加算し、その加算結果を入力j重み記憶手段−jに格納されている値であるweight[j]で除算する。演算回路106は、除算結果の商を入力j商記憶手段103−jに、余りを入力j余り記憶手段104−jに格納することにより、送信要求を行った入力jのCNT[j]の値を更新する。あるいは、上述した基本原理の(式13)に基づき、フレーム長を左シフトして、入力jの余りとビット結合し、weight[j]で除算するようにしてもよい。
Next, as described in the basic principle described above, based on (Equation 5), CNT [i] is updated as the frame length is added to the input j for which a transmission request is made (step S211). In other words, in order to speed up the arithmetic processing, when a fixed point is used, the operation is as follows.
The arithmetic circuit 106 adds the remainder of the input j stored in the input j remainder storage means 104-j to the frame length value (flen) of the input j stored in the input j frame length storage means 101-j. The values are added, and the addition result is divided by weight [j] which is a value stored in the input j weight storage means -j. The arithmetic circuit 106 stores the quotient of the division result in the input j quotient storage means 103-j and the remainder in the input j remainder storage means 104-j, so that the value of CNT [j] of the input j for which a transmission request is made. Update. Alternatively, based on (Equation 13) of the basic principle described above, the frame length may be left-shifted, bit-combined with the remainder of input j, and divided by weight [j].

一方、上述したステップS206の実行後、制御回路107は、後段回路から受理信号の受信を待つ。後段からの受理信号を受信すると(ステップS213)、制御回路107は、WaitCntに、ステップS201において設定したJudgeWaitの値を設定する(ステップS214)。制御回路107は、選択された入力jに接続される前段回路へ受理信号を送信する(ステップS215)。   On the other hand, after execution of step S206 described above, the control circuit 107 waits for reception of an acceptance signal from the subsequent circuit. When the reception signal from the subsequent stage is received (step S213), the control circuit 107 sets the value of JudgeWait set in step S201 in WaitCnt (step S214). The control circuit 107 transmits an acceptance signal to the pre-stage circuit connected to the selected input j (step S215).

WaitCntは、制御回路107により、所定の周期(例えばシステムクロック毎)で減算される(ステップS216)。
上述したステップS216の実行後、制御回路107は、WaitCntの値が0かを判定し、0になるまで繰り返し減算を行う(ステップS216、S217)。このように、WaitCntの現在を行って0になった場合(ステップS217:YES)、WaitCntの減算を停止する(ステップS218)。
WaitCnt is subtracted by the control circuit 107 at a predetermined cycle (for example, every system clock) (step S216).
After executing step S216 described above, the control circuit 107 determines whether the value of WaitCnt is 0, and repeatedly performs subtraction until it becomes 0 (steps S216 and S217). As described above, when WaitCnt is currently set to 0 (step S217: YES), subtraction of WaitCnt is stopped (step S218).

上述したステップS211の後に、WaitCntの値が0になった場合(ステップS212:YES)、ステップS204に戻り、CNT[i]が最小の入力の選択を行う。   If the value of WaitCnt becomes 0 after step S211 described above (step S212: YES), the process returns to step S204, and the input with the smallest CNT [i] is selected.

なお、ステップS204において、CNT[i]の最小値を求める際に、同じ値が存在したり、同時に0以下になる入力が存在する場合は、WFQの基本動作として、該当する入力をラウンドして選択する必要がある。すなわち順繰りに、tmp=入力0ラウンドロビンカウンタ、入力0ラウンドロビンカウンタ=入力1ラウンドロビンカウンタ、入力1ラウンドロビンカウンタ=入力2ラウンドロビンカウンタ、入力2ラウンドロビンカウンタ=入力3ラウンドロビンカウンタ、入力3ラウンドロビンカウンタ=tmp(入力0ラウンドロビンカウンタの元の値)とし、各入力ポートに対応するラウンドロビンカウンタを1つずつずらす。あるいは、いままでの送信履歴から、最も送信を行っていない入力を選択するようにしてもよい。その際の選択処理は、以下に述べるように、各入力iに対応して設けられている入力iラウンドロビンカウンタ記憶手段105−i内に記憶されている入力iラウンドロビンカウンタを用いて行うのが効果的である。   In step S204, when obtaining the minimum value of CNT [i], if the same value exists or there are inputs that are simultaneously 0 or less, the corresponding input is rounded as the basic operation of WFQ. Must be selected. That is, in order, tmp = input 0 round robin counter, input 0 round robin counter = input 1 round robin counter, input 1 round robin counter = input 2 round robin counter, input 2 round robin counter = input 3 round robin counter, input 3 Round robin counter = tmp (original value of input 0 round robin counter), and the round robin counter corresponding to each input port is shifted one by one. Or you may make it select the input which has not transmitted most from the transmission history until now. The selection process at that time is performed using an input i round robin counter stored in the input i round robin counter storage means 105-i provided corresponding to each input i as described below. Is effective.

すなわち、例えば入力ポート数を4とし、入力2が送信要求ポートとして選択された場合、入力2ラウンドロビンカウンタより大きい値をもつ各入力iラウンドロビンカウンタは1デクリメント(減算)を行い、入力2ラウンドロビンカウンタ=3とする。このようにすることで、最近送信した順に入力iラウンドロビンカウンタは、3,2,1,0という値を持つことになる。
上記においては、CNT[i]を比較して最も小さい入力を選択しているが、入力iラウンドロビンカウンタをさらに用いて比較を行うこともできる。つまり、入力選択時の比較に用いる値をcmp[i]とするならば、CNT[i]の値に同じものがある場合であっても、以下のように容易に選択可能となる。なお、入力数が4の場合を想定しており、よって、入力iラウンドロビンカウンタの2bit(0〜3の値)を用いている。また、「|」はビット結合を表す。
That is, for example, when the number of input ports is 4 and input 2 is selected as a transmission request port, each input i round robin counter having a value larger than the input 2 round robin counter performs 1 decrement (subtraction), and input 2 rounds. Robin counter = 3. By doing so, the input i round robin counter has the values 3, 2, 1, 0 in the order of the latest transmission.
In the above, the smallest input is selected by comparing CNT [i], but the comparison can also be performed by further using an input i round robin counter. That is, if the value used for comparison at the time of input selection is cmp [i], even if there is the same value of CNT [i], it can be easily selected as follows. It is assumed that the number of inputs is 4, and therefore 2 bits (values 0 to 3) of the input i round robin counter are used. “|” Represents bit combination.

cmp[i](18bit)
=CNT[i](16bit)|入力iラウンドロビンカウンタ(2bit) …(式13)
cmp [i] (18 bits)
= CNT [i] (16 bits) | Input i round robin counter (2 bits) (Equation 13)

さらに入力要求がある場合、request[i]=0、入力要求がない場合、request[i]=1とし、以下の式で算出される値(cmp[i])を用いて入力選択時の最小値選択を行う。   Further, when there is an input request, request [i] = 0, and when there is no input request, set request [i] = 1, and use the value (cmp [i]) calculated by the following formula to minimize the input Perform value selection.

cmp[i](19bit)
=request[i](1bit)|CNT[i](16bit)|入力iラウンドロビンカウンタ(2bit) …(式14)
cmp [i] (19 bits)
= Request [i] (1 bit) | CNT [i] (16 bits) | input i round robin counter (2 bits) (Expression 14)

上記のcmp[i]を用いることにより、入力要求があるかどうかの判断を入力選択時に行わなくてもすむようになる。つまり、上式において算出されたcmp[i]のうち最小値をもつcmp[i]を選択し、その選択したcmp[i]の最小値をCMP_MINとすると、CMP_MINのMSB(Most Significant Bit:最上位ビット)が1である場合、request[i]が0であった入力がなかった、すなわち、どの入力にも送信要求はなかったということがわかる。また、送信要求が存在していれば、少なくともCMP_MINのMSBは0になり、選択するポートiを決定するために最小値のcmp[i]を求める際には、MSBが0である、すなわち、入力要求があるポートからのみ選択が行われるため、比較のたびに送信要求があるかどうか判断する必要がなくなる。   By using the above cmp [i], it is unnecessary to determine whether or not there is an input request when selecting an input. In other words, if cmp [i] having the minimum value is selected from the cmp [i] calculated in the above equation, and the minimum value of the selected cmp [i] is CMP_MIN, the MSB (Most Significant Bit: highest) of CMP_MIN When the upper bit (1) is 1, it can be seen that there was no input whose request [i] was 0, that is, there was no transmission request for any input. Also, if there is a transmission request, at least the MSB of CMP_MIN is 0, and when determining the minimum value cmp [i] to determine the port i to be selected, the MSB is 0. Since selection is performed only from a port having an input request, it is not necessary to determine whether or not there is a transmission request at each comparison.

図4は、上述したWFQを用いて、各レジスタ値がどのように変化するかの一例を入力数3のWFQを用いて説明する。なお、シフト量(weight[i]の最大値)m=5であり、時刻0の初期状態において入力はないものとする。また、各入力ポートiの重みは、weight[0]=3、weight[1]=2、weight[3]=1であるとする。   FIG. 4 illustrates an example of how each register value changes using the WFQ described above, using a WFQ with 3 inputs. It is assumed that the shift amount (maximum value of weight [i]) m = 5 and there is no input in the initial state at time 0. Further, the weight of each input port i is assumed to be weight [0] = 3, weight [1] = 2, and weight [3] = 1.

時刻1において、制御回路107は、入力0の送信要求(フレーム長1000)と、入力1の送信要求(フレーム長64)を受信する。これにより、flen[0]=1000、flen[1]=64が格納される。そして、この時刻0において入力があった入力0と入力1のうち、cnt[i]がもっとも小さいのは入力0なので(cnt[0]=1000、cnt[1]=2000)、入力0が選択される。そして、(flen[0]<<m+R[0])/weight[0]=(1000<<5+2)/3=10667 余り1となるため、cnt[0]=10667、R[0]=1のように更新される。
また、他の入力のcnt[i](i=1,2)からは、cnt[0]の値であった1000が減算されるが、入力2は減算により負になるので、cnt[2]は0となる。また、ラウンドロビン値は、最も最近選択されたポートに対応したものが最も大きな値になるので、round[0]が3から3となる。そして、他の各入力のround[i](i=1,2)のうち、3以上の値を持つものをデクリメントする必要があるが、送信したものが最も大きな値である3であったためデクリメントは行わない。
At time 1, the control circuit 107 receives an input 0 transmission request (frame length 1000) and an input 1 transmission request (frame length 64). Thereby, flen [0] = 1000 and flen [1] = 64 are stored. Of the inputs 0 and 1 that were input at time 0, since cnt [i] is the smallest, input 0 (cnt [0] = 1000, cnt [1] = 2000), input 0 is selected. Is done. Then, (flen [0] << m + R [0]) / weight [0] = (1000 << 5 + 2) / 3 = 10667 Since the remainder is 1, cnt [0] = 10667, R [0] = 1 As updated.
Also, 1000, which was the value of cnt [0], is subtracted from cnt [i] (i = 1, 2) of the other inputs, but since input 2 becomes negative by subtraction, cnt [2] Becomes 0. Also, since the round robin value corresponding to the most recently selected port has the largest value, round [0] is changed from 3 to 3. Of the other inputs, round [i] (i = 1, 2), it is necessary to decrement the one having a value of 3 or more. However, since the transmitted one is 3, which is the largest value, it is decremented. Do not do.

次に、時刻2において、入力2の送信要求(フレーム長100)を受信する。現在入力があるcnt[i]、すなわち、入力1と入力2のcnt[i]を比較すると(cnt[1]=1000、cnt[2]=0)、cnt[2]が最も小さいので、cnt[2]が選択され、入力2以外の各入力のcnt[i](i=0,1)から、cnt[2]の値である0が減算される。(flen[2]<<m+R[2])/weight[2]=(100<<5+0)/1=3200 余り0であるので、cnt[2]=3200となり、R[2]には0が加算されるため0のままとなる。選択された入力2のラウンドロビン値round[2]は、2から最も大きな値の3に変化し、他の入力のround[i]で2以上のものは、デクリメントされるため、入力0のround[0]は3から2に変化する。   Next, at time 2, a transmission request (frame length 100) of input 2 is received. When cnt [i] having the current input, that is, cnt [i] of input 1 and input 2 is compared (cnt [1] = 1000, cnt [2] = 0), cnt [2] is the smallest, so cnt [2] is selected, and 0, which is the value of cnt [2], is subtracted from cnt [i] (i = 0, 1) of each input other than input 2. (Flen [2] << m + R [2]) / weight [2] = (100 << 5 + 0) / 1 = 3200 Since the remainder is 0, cnt [2] = 3200, and 0 is set in R [2]. Since it is added, it remains 0. The round robin value round [2] of the selected input 2 changes from 2 to the largest value of 3, and any other input round [i] that is 2 or more is decremented. [0] changes from 3 to 2.

続いて、時刻3において、現在入力があるのは入力1のみであるので、入力1以外の各入力のcnt[i](i=0,2)から、cnt[1]の値である1024が減算される。(flen[1]<<m+R[1])/weight[1]=(100<<5+0)/1=1024 余り0であるので、cnt[1]=1024となり、R[1]には0が加算されるため1のままとなる。選択された入力2のラウンドロビン値round[2]は、1から最も大きな値の3に変化し、他の入力のround[i]で1以上のものは、デクリメントされるため、入力0のround[0]は2から1に、入力2のround[2]は3から2に変化する。
時刻4以降も、同様の処理を繰り返すことによりWFQ処理が行われる。
Subsequently, since only the input 1 is present at time 3, the value 1024 of cnt [1] is obtained from the cnt [i] (i = 0, 2) of each input other than the input 1. Subtracted. (Flen [1] << m + R [1]) / weight [1] = (100 << 5 + 0) / 1 = 1024 Since the remainder is 0, cnt [1] = 1024, and 0 is set in R [1]. Since it is added, it remains at 1. The round-robin value round [2] of the selected input 2 changes from 1 to the largest value of 3, and one or more of the other input round [i] is decremented. [0] changes from 2 to 1, and round [2] of input 2 changes from 3 to 2.
After time 4, the WFQ process is performed by repeating the same process.

以上、本発明の実施の形態について説明したが、トラヒックコントロール装置の各手段は、専用のハードウェア(例えば、ワイヤードロジック等)により実現されるが、メモリおよびCPU(中央処理装置)により構成され、各部の機能を実現するためのプログラムをメモリからロードして実行することによりその機能を実現させるものであってもよい。また、メモリインタフェース回路の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより、メモリインタフェース回路の各部に必要な処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。   As described above, the embodiments of the present invention have been described. Each means of the traffic control device is realized by dedicated hardware (for example, wired logic), but is configured by a memory and a CPU (central processing unit). The function may be realized by loading a program for realizing the function of each unit from the memory and executing the program. Further, by recording a program for realizing the function of the memory interface circuit on a computer-readable recording medium, causing the computer system to read and execute the program recorded on the recording medium, each part of the memory interface circuit You may perform a process required for. Here, the “computer system” includes an OS and hardware such as peripheral devices.

また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory in a computer system serving as a server or a client in that case, and a program that holds a program for a certain period of time are also included. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.

本発明の一実施の形態によるWFQ回路の基本動作フローを示す図である。It is a figure which shows the basic operation | movement flow of the WFQ circuit by one embodiment of this invention. 同実施形態によるWFQ回路の構成例を示すブロック図である。FIG. 3 is a block diagram showing a configuration example of a WFQ circuit according to the same embodiment. 同実施形態によるWFQ回路の動作フローを示す図である。It is a figure which shows the operation | movement flow of the WFQ circuit by the same embodiment. 同実施形態によるWFQ回路の動作を説明するための図である。It is a figure for demonstrating operation | movement of the WFQ circuit by the same embodiment. 除算累積誤差を説明するための図である。It is a figure for demonstrating a division | segmentation accumulation error.

符号の説明Explanation of symbols

100…WFQ回路
101−0…入力0フレーム長記憶手段
101−1…入力1フレーム長記憶手段
101−2…入力2フレーム長記憶手段
101−3…入力3フレーム長記憶手段
102−0…入力0重み記憶手段
102−1…入力1重み記憶手段
102−2…入力2重み記憶手段
102−3…入力3重み記憶手段
103−0…入力0商記憶手段
103−1…入力1商記憶手段
103−2…入力2商記憶手段
103−3…入力3商記憶手段
104−0…入力0余り記憶手段
104−1…入力1余り記憶手段
104−2…入力2余り記憶手段
104−3…入力3余り記憶手段
105−0…入力0ラウンドロビンカウンタ記憶手段
105−1…入力1ラウンドロビンカウンタ記憶手段
105−2…入力2ラウンドロビンカウンタ記憶手段
105−3…入力3ラウンドロビンカウンタ記憶手段
106…演算回路
107…制御回路
DESCRIPTION OF SYMBOLS 100 ... WFQ circuit 101-0 ... Input 0 frame length storage means 101-1 ... Input 1 frame length storage means 101-2 ... Input 2 frame length storage means 101-3 ... Input 3 frame length storage means 102-0 ... Input 0 Weight storage means 102-1 ... Input 1 weight storage means 102-2 ... Input 2 weight storage means 102-3 ... Input 3 weight storage means 103-0 ... Input 0 quotient storage means 103-1 ... Input 1 quotient storage means 103- 2 ... Input 2 quotient storage means 103-3 ... Input 3 quotient storage means 104-0 ... Input 0 remainder storage means 104-1 ... Input 1 remainder storage means 104-2 ... Input 2 remainder storage means 104-3 ... Input 3 remainder Storage means 105-0 ... Input 0 round robin counter storage means 105-1 ... Input 1 round robin counter storage means 105-2 ... Input 2 round robin counter storage Means 105-3: Input 3-round robin counter storage means 106: Arithmetic circuit 107: Control circuit

Claims (4)

複数の入力ポートからの入力を後段に出力するトラヒックコントロール装置におけるトラヒックコントロール方法であって、
前記トラヒックコントロール装置は、複数の入力ポートそれぞれに対応した商カウンタの値及び余りカウンタの値を記憶する記憶手段を備えており、
前記商カウンタのうち最小値である商カウンタを選択し、選択された商カウンタに対応した入力ポートからの送信要求を後段回路に送信する出力過程と、
選択された商カウンタ以外の前記商カウンタの値を、前記選択された商カウンタの値を減算した値に更新する更新過程と、
前記選択された商カウンタに対応した入力ポートからの入力のフレーム長と、当該入力ポートに対応した余りカウンタの値とを加算した値を、当該入力ポートに対応した所定の重みの値で除算し、除算した結果の商により前記選択された商カウンタの値を更新し、除算した結果の余りにより当該入力ポートに対応した余りカウンタの値を更新する演算過程と
を有することを特徴とするトラヒックコントロール方法。
A traffic control method in a traffic control device for outputting inputs from a plurality of input ports to a subsequent stage,
The traffic control device includes storage means for storing a quotient counter value and a remainder counter value corresponding to each of a plurality of input ports,
An output process of selecting a quotient counter that is the minimum value among the quotient counters and transmitting a transmission request from an input port corresponding to the selected quotient counter to a subsequent circuit;
An update process for updating the value of the quotient counter other than the selected quotient counter to a value obtained by subtracting the value of the selected quotient counter;
A value obtained by adding the frame length of the input from the input port corresponding to the selected quotient counter and the value of the remainder counter corresponding to the input port is divided by a predetermined weight value corresponding to the input port. And a calculation process of updating a value of the selected quotient counter by a quotient of a division result and updating a value of a remainder counter corresponding to the input port by a remainder of the division result Method.
前記演算過程において、前記選択された商カウンタに対応した入力ポートからの入力のフレーム長と、当該入力ポートに対応した余りカウンタの値とを加算する代わりに、当該入力ポートの入力のフレーム長を、所定分、あるいは、重みのとりうる最大値分だけ左ビットシフトし、当該入力ポートに対応した余りカウンタの値と連結する、
ことを特徴とする請求項1に記載のトラヒックコントロール方法。
In the calculation process, instead of adding the input frame length from the input port corresponding to the selected quotient counter and the value of the remainder counter corresponding to the input port, the input frame length of the input port is The left bit is shifted by a predetermined amount or a maximum value that can be weighted, and connected to the value of the remainder counter corresponding to the input port.
The traffic control method according to claim 1, wherein:
前記記憶手段は、各入力ポートに対応し、送信要求が送信された順序に応じて値が変更されるラウンドロビンカウンタをさらに記憶し、
前記出力過程において、最小値を有する前記商カウンタが複数ある場合、前記ラウンドロビンカウンタの値により、送信要求を送信する入力ポートを選択する、
ことを特徴とする請求項1または請求項2に記載のトラヒックコントロール方法。
The storage means further stores a round robin counter corresponding to each input port, the value of which is changed according to the order in which the transmission requests are transmitted,
In the output process, when there are a plurality of quotient counters having a minimum value, an input port for transmitting a transmission request is selected according to a value of the round robin counter.
The traffic control method according to claim 1 or 2, characterized in that
複数の入力ポートからの入力を後段に出力するトラヒックコントロール装置であって、
複数の入力ポートそれぞれに対応した商カウンタの値及び余りカウンタの値を記憶する記憶手段と、
前記商カウンタのうち最小値である商カウンタを選択し、選択された商カウンタに対応した入力ポートからの送信要求を後段回路に送信する制御手段と、
選択された商カウンタ以外の前記商カウンタの値を、前記選択された商カウンタの値を減算した値に更新するとともに、当該選択された商カウンタに対応した入力ポートからの入力のフレーム長と、当該入力ポートに対応した余りカウンタの値とを加算した値を、当該入力ポートに対応した所定の重みの値で除算し、除算した結果の商により前記選択された商カウンタの値を更新し、除算した結果の余りにより当該入力ポートに対応した余りカウンタの値を更新する演算手段と、
を備えることを特徴とするトラヒックコントロール装置。
A traffic control device that outputs inputs from a plurality of input ports to a subsequent stage,
Storage means for storing a quotient counter value and a remainder counter value corresponding to each of a plurality of input ports;
Control means for selecting a quotient counter which is the minimum value among the quotient counters and transmitting a transmission request from an input port corresponding to the selected quotient counter to a subsequent circuit;
Updating the value of the quotient counter other than the selected quotient counter to a value obtained by subtracting the value of the selected quotient counter, and the frame length of the input from the input port corresponding to the selected quotient counter; A value obtained by adding the value of the remainder counter corresponding to the input port is divided by a value of a predetermined weight corresponding to the input port, and the value of the selected quotient counter is updated by a quotient obtained by the division; Arithmetic means for updating the value of the remainder counter corresponding to the input port by the remainder of the division result;
A traffic control device comprising:
JP2007275598A 2007-10-23 2007-10-23 Traffic control method and apparatus Active JP4637154B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007275598A JP4637154B2 (en) 2007-10-23 2007-10-23 Traffic control method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007275598A JP4637154B2 (en) 2007-10-23 2007-10-23 Traffic control method and apparatus

Publications (2)

Publication Number Publication Date
JP2009105669A JP2009105669A (en) 2009-05-14
JP4637154B2 true JP4637154B2 (en) 2011-02-23

Family

ID=40706940

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007275598A Active JP4637154B2 (en) 2007-10-23 2007-10-23 Traffic control method and apparatus

Country Status (1)

Country Link
JP (1) JP4637154B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4806716B2 (en) * 2009-06-17 2011-11-02 日本電信電話株式会社 Communication quality control apparatus and communication quality control method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002344501A (en) * 2001-05-22 2002-11-29 Nec Corp Packet scheduling device and method therefor
JP2003198611A (en) * 2001-12-28 2003-07-11 Hitachi Ltd Traffic shaper and bandwidth control equipment
JP2007013412A (en) * 2005-06-29 2007-01-18 Mitsubishi Electric Corp Packet reading controller

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002344501A (en) * 2001-05-22 2002-11-29 Nec Corp Packet scheduling device and method therefor
JP2003198611A (en) * 2001-12-28 2003-07-11 Hitachi Ltd Traffic shaper and bandwidth control equipment
JP2007013412A (en) * 2005-06-29 2007-01-18 Mitsubishi Electric Corp Packet reading controller

Also Published As

Publication number Publication date
JP2009105669A (en) 2009-05-14

Similar Documents

Publication Publication Date Title
US6363112B1 (en) Parallel processing decision feedback equalizer
JP4637154B2 (en) Traffic control method and apparatus
JPH11266140A (en) Programmable circuit for providing digital filter
US20030026347A1 (en) Path metric normalization
WO2011051769A2 (en) Method and system for determining a quotient value
US11029921B2 (en) Performing processing using hardware counters in a computer system
WO2021044227A1 (en) Neural network circuitry having floating point format with asymmetric range
RU2666303C1 (en) Method and device for calculating hash function
WO2019167859A1 (en) Estimating device and estimating method
US6795839B2 (en) Method and device for computing the number of bits set to one in an arbitrary length word
KR20080050226A (en) Modular multiplication device and method for designing modular multiplication device
CN115629879A (en) Load balancing method and device for distributed model training
US20160103710A1 (en) Scheduling device
WO2007083377A1 (en) Parity generation circuit, counter and counting method
WO2021018058A1 (en) System overload control method and device
KR102063557B1 (en) Interpolation filter based on time assignment algorithm
JP2005033408A (en) Method of weighting priority control
JP4601657B2 (en) Traffic shaping apparatus and method
JP4806716B2 (en) Communication quality control apparatus and communication quality control method
JPH09282287A (en) Communication processing system
JP3912958B2 (en) Data-driven processing apparatus and data processing method in data-driven processing apparatus
KR20150015369A (en) Data processing apparatus and method for performing a narrowing-and-rounding arithmetic operation
CN110515681B (en) Method for judging given delay repeatability of stream data in real time
JP5935599B2 (en) Control device, transmission device, and control method
EP1723536B1 (en) Rate computations of particular use in scheduling

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101022

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

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

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

Free format text: PAYMENT UNTIL: 20131203

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4637154

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250