JP3642698B2 - Weighted round robin circuit - Google Patents

Weighted round robin circuit Download PDF

Info

Publication number
JP3642698B2
JP3642698B2 JP8543199A JP8543199A JP3642698B2 JP 3642698 B2 JP3642698 B2 JP 3642698B2 JP 8543199 A JP8543199 A JP 8543199A JP 8543199 A JP8543199 A JP 8543199A JP 3642698 B2 JP3642698 B2 JP 3642698B2
Authority
JP
Japan
Prior art keywords
cell
wait
count
buffer circuit
flag
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
JP8543199A
Other languages
Japanese (ja)
Other versions
JP2000278272A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP8543199A priority Critical patent/JP3642698B2/en
Publication of JP2000278272A publication Critical patent/JP2000278272A/en
Application granted granted Critical
Publication of JP3642698B2 publication Critical patent/JP3642698B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、ATM(Asynchronous Transfer Mode:非同期転送モード)セルを伝送する装置において、複数のサービスクラスを実現するウエイテッドラウンドロビン(Weighted Round-Robin)回路に関する。
【0002】
【従来の技術】
図7は、信学技法TECHNICAL REPORT OF IEICE SSE96-95(1996-10)「ABR、UBRクラスに対するスケジューリング方式の評価」に示されたウエイテッドラウンドロビンを説明するための図である。図7には、例えばそれぞれ異なるサービスに対応して設けられ、対応したサービスのセルを内部のセルバッファに蓄積するセルバッファ回路1,2と、セルバッファ回路1,2を制御し、ウエイテッドラウンドロビンの規則に従ってセルを出力するセル出力回路3とが示されている。
【0003】
ウエイテッドラウンドロビンの規則では、セルバッファ回路1,2にセルが有るか無いかを、例えばセルバッファ回路1から検索し、セルがあった場合はそのセルバッファ回路1のセルを出力し、セルが無かった場合は次のセルバッファ回路2にセルがあるか無いかを検索し、セルがあった場合はそのセルバッファ回路2のセルを出力するものである。また、この規則では、セルバッファ回路1にセルがあった場合、次のセル時間での検索は、次のセルバッファ回路2から開始し、セルが無かった場合は、その次の、つまり最初に戻ってセルバッファ回路1の検索を行う。なお、1セル時間の間に次のセル出力のためにラウンドロビンを行いセルバッファ回路を選択することになる。更に、この規則では、各セルバッファ回路に対しウエイトを設定し、1セル出力する毎に対応するセルバッファ回路のウエイト値を1つずつ減算し、ウエイトを全て消費したセルバッファ回路は初期化によりウエイト値が回復されるまで選択されないようにする。
【0004】
図7では、セルバッファ回路1のウエイトを2とし、セルバッファ回路2のウエイトを1とした場合を例示している。また、図7には図示されていないが、セルバッファ回路1,2それぞれに対応しカウントダウンを行うカウンタが設けられており、上記ウエイトはカウンタの初期値に反映される。つまり、セルバッファ回路1対応のカウンタの初期値は2、セルバッファ回路2対応のカウンタの初期値は1となる。また、セルバッファ回路1には、A1からA6のセルが蓄積され、セルバッファ回路2にはB1からB3のセルが蓄積されているものとしている。この図7の例を用いて従来のウエイテッドラウンドロビン回路の動作について説明する。
【0005】
セル出力回路3は、最初、セルバッファ回路1からセルが蓄積されているかを検索する。この例の場合、セルが蓄積されているので、セルバッファ回路1はA1を出力する。そして、セルバッファ回路1に対応するカウンタのカウント値を1減算して1にする。次に出力するセルは、ウエイテッドラウンドロビンの規則に従うとセルバッファ回路2に蓄積されているB1になる。このとき、セルバッファ回路2に対応するカウンタのカウント値を1減算して0にする。ウエイテットラウンドロビンの規則では、カウント値が0になったセルバッファ回路からはセルを出力させない。よって、次に出力するセルはセルバッファ回路1に蓄積されているA2となる。このとき、セルバッファ回路1に対応するカウンタの値を1減算して0にする。ウエイテッドラウンドロビンの規則では、全てのセルバッファ回路1,2においてカウント値が0またはセルバッファにセルが蓄積されていない状態になると、全てのカウンタのカウント値を初期値に戻すので、セルバッファ回路1に対応するカウンタのカウント値は初期状態の2となり、セルバッファ回路2に対応するカウンタのカウント値は初期状態の1となる。このようにして初期状態に戻ると、これ以降は上記と同様に動作してセルA3,B2,A4,A5,B3,A6が順次出力される。
【0006】
図7に示した例では、セル出力回路3から出力されているセルに関して、セルバッファ回路1から出力されたセル数とセルバッファ回路2から出力されたセル数の比が2対1になっており、これは、ウエイトの比に等しい。このように、ウエイテッドラウンドロビン回路では、ウエイトに比例してセルを出力することができ、サービス毎にウエイトを変えて使用すれば、サービスに優先度を持たせることができる。
【0007】
図8にウエイテッドラウンドロビン回路のサービス例を示す。図8には、前述したセルバッファ回路1,2それぞれに対応させて接続された端末4,5が示されている。各端末4,5は、対応するセルバッファ回路1,2にセルを送ることになるが、この構成においてウエイト比を図7と同様に2対1にしておけば、端末4,5の各出力セルを1本の伝送路に多重するとき、端末4は端末5よりも倍のセルを出力することができ、より高速のサービスを受けていることになる。
【0008】
ところで、前述したように、従来のウエイテッドラウンドロビン回路では、ウエイトを減算するカウンタを各セルバッファ回路に対応させて設けておく必要がある。従って、セルバッファ回路が増えた場合、これに比例してカウンタも増やす必要がある。セルバッファ回路が数個程度であれば、個別にカウンタを用意すれば良いが、セルバッファ回路を例えばコネクション毎に用意するような場合であってコネクション数が多い場合には、カウンタ数もこれに応じて多く用意する必要がある。このように、多数のカウンタを用意する必要がある場合は、メモリを使用してカウンタを構成することが一般的である。
【0009】
図9は、従来からあるメモリを使用したカウンタの構成を示した図である。図9には、カウント値を記憶するカウントメモリ6と、カウント値を1ずつ減算する減算回路7とが示されている。カウントメモリ6は、N個のセルバッファ回路に対応させて#1から#Nまでカウント値をそれぞれ記憶している。次に、このカウントメモリ6を用いた動作について説明する。
【0010】
例えば、#2の内容をカウントダウンしたいときは、アドレスを#2のアドレスとし、カウントメモリ6から#2の値を読み出し、この値から減算回路7で1減算し、再び#2のアドレスに書き込む。このように構成すれば、カウントメモリ6と減算回路7という規模の小さい構成でN個のカウンタを得ることができる。
【0011】
【発明が解決しようとする課題】
しかしながら、ウエイテッドラウンドロビン回路では、全てのセルバッファ回路についてに対応するカウンタの値が0またはセルが蓄積されていない場合には全カウント値を一斉に初期値に戻す必要があるが、メモリでカウンタを構成するウエイテッドラウンドロビン回路では、カウンタ値を初期値に戻すためには1カウンタ(1アドレス)ずつ初期値を書き込んでいかなければならない。このため、カウンタ数が多くなると各カウンタへの初期値の書込み処理が次のセル時間の開始までに終了しない場合が発生する。例えば、ラウンドロビンを行いセルバッファ回路を選択するために必要な時間をα、カウント値を初期化するために必要な時間をβとすると、ウエイテッドラウンドロビン回路として正常に動作するためには、
α+β<1セル時間
という条件を満たす必要がある。例えば、150Mb/s回線にセルを出力する場合、1セル時間は約2.7μ秒の固定時間となるが、セルバッファ回路数が増えればβが増えることになるので、そのセルバッファ回路数によっては上記条件式を満たすことができなくなってしまう。これにより、多数のセルバッファ回路を搭載するATMセルを伝送する装置には、メモリでカウンタを構成するウエイテッドラウンドロビン回路を使用できないという問題があった。
【0012】
本発明は以上のような問題を解決するためになされたものであり、その目的は、メモリを使用してカウンタを構成した場合でもセルバッファ回路の数に関係なく使用することのできるウエイテッドラウンドロビン回路を提供することにある。
【0013】
【課題を解決するための手段】
以上のような目的を達成するために、本発明に係るウエイテッドラウンドロビン回路は、複数のセルバッファ回路と、前記セルバッファ回路それぞれに対応して設けられたセル有無フラグを送出する複数のセル有無フラグ送出回路と、前記セルバッファ回路それぞれに対応して設けられたウエイト有無フラグを送出する複数のウエイト有無フラグ送出回路と、前記セルバッファ回路それぞれに対応して設けられたカウント初期化フラグを送出する複数のカウント初期化フラグ送出回路と、各セルバッファ回路に対応するウエイト値を記憶するウエイトメモリと、各セルバッファ回路に対応するカウント値を記憶するカウントメモリと、セル出力回路とを有し、セルを受信するとそのセルに対応する前記セルバッファ回路に当該セルが書き込まれ、前記セル有無フラグ送出回路は対応するセルバッファ回路のセルの有無を記憶し、前記セル出力回路は全てのセル有無フラグ、ウエイト有無フラグ及びカウント初期化フラグの状態を入力し、前記セルバッファ回路内にセルがありかつウエイトがあるか、または前記セルバッファ回路内にセルがありかつカウント初期化フラグが有意の前記セルバッファ回路に対し、ラウンドロビンにより1つの前記セルバッファ回路を選択し、該セルバッファ回路からセルを出力し、また各セルバッファ回路全てについて、対応するセル有無フラグが前記セルバッファ回路内にセルが無いことを示しているか、またはウエイトフラグがウエイトが無いことを示している場合、全てのカウント初期化フラグを有意にし、前記セルバッファ回路に対応するカウント初期化フラグが無意の場合、出力するセルに対応する前記カウントメモリ内のカウント値を1減算し、減算した結果カウント値が0になったときは、ウエイトフラグをウエイトが無い状態にし、前記セルバッファ回路に対応するカウント初期化フラグが有意の場合、出力するセルに対応するカウント値を対応する前記ウエイトメモリ内のウエイト値とし、該ウエイト値から1を減算した値を対応するカウントメモリ内のカウント値とし、また対応するウエイトフラグをウエイトがある状態にするものである。
【0014】
他の発明に係るウエイテッドラウンドロビン回路は、複数のセルバッファ回路と、前記セルバッファ回路それぞれに対応して設けられたセル有無フラグを送出する複数のセル有無フラグ送出回路と、前記セルバッファ回路それぞれに対応して設けられたウエイト有無フラグを送出する複数のウエイト有無フラグ送出回路と、前記セルバッファ回路それぞれに対応して設けられたカウント初期化フラグを送出する複数のカウント初期化フラグ送出回路と、各セルバッファ回路に対応するウエイト値を記憶するウエイトメモリと、各セルバッファ回路に対応するカウント値を記憶するカウントメモリと、セル出力回路とを有し、セルを受信するとそのセルに対応する前記セルバッファ回路にセルが書き込まれ、前記セル有無フラグ送出回路は対応する前記セルバッファ回路のセルの有無を記憶し、前記セル出力回路は全てのセル有無フラグ、ウエイト有無フラグ及びカウント初期化フラグの状態を入力し、前記セルバッファ回路内にセルがありかつウエイトがあるか、または前記セルバッファ回路内にセルがありかつカウント初期化フラグが有意の前記セルバッファ回路に対し、ラウンドロビンにより1つの前記セルバッファ回路を選択し、該セルバッファ回路からセルを出力し、また前記各セルバッファ回路全てについて、対応するセル有無フラグが前記セルバッファ回路内にセルが無いことを示しているか、またはウエイトフラグがウエイトが無いことを示している場合、全てのカウント初期化フラグを有意にし、前記セルバッファ回路に対応するカウント初期化フラグが無意の場合、出力するセルに対応する前記カウントメモリ内のカウント値を1加算し、加算した結果カウント値が対応する前記ウエイトメモリのウエイト値と等しくになったときは、ウエイトフラグをウエイトが無い状態にし、前記セルバッファ回路に対応するカウント初期化フラグが有意の場合、出力するセルに対応する前記カウントメモリ内のカウント値を0とし、0に1を加算した値を対応する前記カウントメモリのカウント値とし、また対応するウエイトフラグをウエイトがある状態にするものである。
【0015】
【発明の実施の形態】
以下、図面に基づいて、本発明の好適な実施の形態について説明する。
【0016】
実施の形態1.
図1は、本発明に係るウエイテッドラウンドロビン回路の一実施の形態を示したブロック構成図である。図1には、3つのセルバッファ回路10,20,30と各セルバッファ回路10,20,30に対応させてセル有無フラグ送出回路11,21,31、ウエイト有無フラグ送出回路12,22,32及びカウント初期化フラグ送出回路13,23,33がそれぞれ設けられている。また、各セルバッファ回路10,20,30の優先度を表すウエイトが予め設定されているウエイトメモリ41と、各セルバッファ回路10,20,30のカウント値を保持するカウントメモリ42とが示されている。このカウント値は、各セルバッファ回路10,20,30のウエイトを初期値とし、該当するセルバッファ回路10,20,30からセルが送出される度に減算される。更に、ウエイテッドラウンドロビン制御を行うセル出力回路43が示されている。なお、セル出力回路43が行うウエイテッドラウンドロビン制御の一つに、1セル時間内においてウエイテッドラウンドロビンの規則に従ってラウンドロビンを行うことで次のセル時間におけるセル出力のためにセルバッファ回路10,20,30を選択し、その選択したセルバッファ回路10,20,30からのセルを送出する処理が含まれる。
【0017】
前述したセル有無フラグ送出回路11,21,31は、対応するセルバッファ回路10,20,30にセルが蓄積されているときには無意のセル有無フラグを、蓄積されているセルがないときには有意のセル有無フラグをセル出力回路43へ送出する。ウエイト有無フラグ送出回路12,22,32は、セル出力回路43の制御に従い有意又は無意のウエイト有無フラグを送出する。具体的にいうと、カウントメモリ42の対応するカウント値が減算された結果0になったときに、セル出力回路43の制御に応じて有意のウエイト有無フラグを送出し、カウントメモリ42の対応するカウント値が0でなくなったときにセル出力回路43の制御に応じて無意のウエイト有無フラグを送出する。カウント初期化フラグ送出回路13,23,33は、セル出力回路43の制御に従い有意又は無意のカウント初期化フラグを送出する。具体的にいうと、同じセル時間内において必要に応じてウエイト有無フラグの値が切り替わった後、全てのセルバッファ回路10,20,30においてセルバッファ回路10,20,30それぞれに対応したセル有無フラグ又はウエイト有無フラグのいずれか一方または両方が有意であるときに全てのカウント初期化フラグ送出回路13,23,33は揃って有意のカウント初期化フラグを送出する。つまり、カウント初期化フラグは、全部同時に無意から有意に切り替わる。また、セルバッファ回路10,20,30がセルを送出した際に対応するカウント初期化フラグが有意であれば、無意のカウント初期化フラグに切り替えて送出する。
【0018】
なお、本実施の形態における各回路11〜31,12〜32,13〜33は、フリップフロップ回路で実現するものとし、有意をHigh信号「H」、無意をLow信号「L」で表すことにする。もちろん、フリップフロップ以外の回路で構成してもよいし、有意と無意を表す「H」と「L」を逆にしてもよい。また、本実施の形態では、便宜上、3つのセルバッファ回路10,20,30を有する構成を例にして説明するが、2つでもよいしより多くのセルバッファ回路を設けるようにしてもよい。また、本実施の形態では、図9に示したカウンタをそのまま使用することができる。
【0019】
以上の構成を有する本実施の形態において特徴的なことは、各セルバッファ回路10,20,30に各回路11〜31,12〜32,13〜33を対応させて設け、後述するように各フラグの値の切替制御を行うことでカウントメモリ42のカウント値を全て一斉に初期化しなくてもウエイテッドラウンドロビン制御を正常に行うことができるようにしたことである。これにより、カウントメモリ42にカウント値を保持するようにしても多数のセルバッファ回路を搭載することができるようになる。
【0020】
図2は、本実施の形態におけるウエイテッドラウンドロビン回路の動作を説明するときの初期状態の例を示した図である。図2に示した初期状態においてセルバッファ回路10,20,30に蓄積されているセルを示す。図2によると、セルバッファ回路10にはA1,A2,A3,A4のセルが蓄積され、セルバッファ回路20にはB1のセルが蓄積され、セルバッファ回路30にはC1,C2,C3のセルが蓄積されているものとする。また、セルバッファ回路10,20,30のウエイトは、それぞれ3,2,2としている。また、初期状態およびウエイトを元に戻したとき、ラウンドロビンはセルバッファ回路10から始まり、セルバッファ回路20、次にセルバッファ回路30と昇順に回すものとして説明する。なお、セル入力をせず、対応するセル有無フラグをセルが無い状態(有意)に固定し、ウエイト有無フラグをカウント値が0の状態(有意)に固定し、カウント初期化フラグを無意に固定すれば、そのセルバッファ回路は、ラウンドロビンの対象に含まれないようにすることができる。また、カウントメモリ42のセルバッファ回路10,20,30に対応する各アドレスにCPU等からウエイト値3,2,2を初期値として予め設定しておく。更に、ウエイトメモリ41のセルバッファ回路10,20,30に対応する各アドレスにもそれぞれ3,2,2を予め設定しておく。
【0021】
図3は、実施の形態1におけるウエイテッドラウンドロビン回路の動作に応じて遷移するセル数、カウント値及び各フラグの状態を示した図である。図3におけるセル時刻1〜9は、それぞれ1セル時間に相当する。本実施の形態では、セル時刻1〜8ではどのセルバッファ回路10,20,30にもセルは入力されず、セル時刻9にてセルバッファ回路20にセルが入力されるものとして説明する。
【0022】
図4は、本実施の形態において1セル時間内に行われるセル出力回路43の処理フローを示した図である。セル出力回路43は、前回のウエイテッドラウンドロビンで出力することに決まったセルを1セル時間の最初から出力し、ウエイテッドラウンドロビン終了後、次セル時刻で出力するセルを該当するセルバッファ回路10,20,30から入力する処理を開始するとともに、以下の動作を順次行う。
【0023】
(1)現セル時刻で出力するセルに対応するウエイト有無フラグの設定処理
(2)カウント初期化フラグの設定処理
(3)ウエイテッドラウンドロビン
(4)次回出力するセルに対応するカウントメモリ42からのカウント値の読出処理、または次回出力するセルに対応するウエイトメモリ41からのウエイトの読出処理
(5)(4)で読み出したカウント値の1減算処理
(6)現セル時刻で出力するセルに対応するカウント値のカウントメモリ42への書込処理
上記(1)におけるウエイト有無フラグの設定は、前述したように前セル時刻で行った(5)の処理結果が0以外のときセル有無フラグはセルが有る状態「L」にし、(5)の処理結果が0のときセル有無フラグはセルが無い状態「H」にする。
【0024】
上記(2)におけるカウント初期化フラグの設定では、前述したように全てのセルバッファ回路10,20,30においてセルバッファ回路10,20,30それぞれに対応したセル有無フラグ又はウエイト有無フラグのいずれか一方または両方が有意であるときに全て揃って有意「H」にする。また、セルバッファ回路10,20,30がセルを送出した際に有意であれば無意「L」にする。
【0025】
上記(3)においてウエイテッドラウンドロビンの選択の対象となるのは、セルが蓄積されており(セル有無フラグが無意「L」)、かつウエイト有無フラグがウエイトが有る状態「L」を示しているか、あるいはカウント初期化フラグが有意「H」のセルバッファ回路10,20,30である。以下、図3に基づき詳細な動作を説明する。なお、便宜上、以降の説明では、各回路11〜31,12〜32,13〜33が送出する各フラグに符号をつけることにする。
【0026】
セル時刻1において、セル有無フラグ11、21、31は、それぞれ「L」なので、各セルバッファ回路10,20,30にセルが蓄積されていることを示している。また、ウエイト有無フラグ12、22、32は、それぞれ「L」なので、各セルバッファ回路10,20,30とも消費されていないウエイトが存在することを示している。よって、全てのセルバッファ回路10,20,30ともラウンドロビンの対象となる。セル時刻1は初期状態なので、セル出力回路43はセルバッファ回路10を選択し、次のセル時刻2でセルA1を出力する準備をする。
【0027】
セル時刻2において、セル出力回路43はセルA1を出力する。これによりバッファ回路10内のセル数は3となる。セル出力回路43は、カウントメモリ42の対応するアドレス内のカウント値を3から1を減算した値2とする。また、セル出力回路43は、ウエイテッドラウンドロビンを行って次のセル出力のためにセルバッファ回路を選択する。ここでは、セル時刻1とウエイテッドラウンドロビンの対象となるセルバッファ回路に変更はないため、セルバッファ回路20を選択し、セルB1をセル時刻3で出力する準備をする。セル時刻2においてその他の値に関して変更は無い。
【0028】
セル時刻3において、セル出力回路43はセルB1を出力する。これによりセルバッファ回路20内のセル数は0となる。セル出力回路43はカウントメモリ42の対応するアドレス内のカウント値を2から1を減算した値1とする。また、セルバッファ回路20にセルが無くなったので、セルバッファ回路20はセル有無フラグ21の値を有意「H」とし、セルが無い状態とする。この状態でセル出力回路43はラウンドロビンを行うが、セル有無フラグ21の状態からセルバッファ回路20にセルが無いことを認識できるので、セルバッファ回路20をウエイテッドラウンドロビンの対象から除外する。セル時刻2ではセルバッファ回路20を選択したので、セル時刻3ではセルバッファ回路30を選択してセル時刻4でセルC1を出力する準備をする。
【0029】
セル時刻4において、セル出力回路43はセルC1を出力する。これによりセルバッファ回路30内のセル数は2となる。セル出力回路43はカウントメモリ42の対応するアドレス内のカウント値を2から1を減算した値1とする。その他の値に関して変更は無い。この状態でセル出力回路43はウエイテッドラウンドロビンを行い、セルバッファ回路10を選択しセル時刻5でセルA2を出力する準備をする。
【0030】
セル時刻5において、セル出力回路43はセルA2を出力する。これによりセルバッファ回路10内のセル数は2となる。セル出力回路43はカウントメモリ42の対応するアドレス内のカウント値を2から1を減算した値1とする。その他の値に関して変更は無い。この状態でセル出力回路43はウエイテッドラウンドロビンを行うが、セル有無フラグ21の値がセルが無いことを示しているため、セルバッファ回路30を選択しセル時刻6でセルC2を出力する準備をする。
【0031】
セル時刻6において、セル出力回路43はセルC2を出力する。これによりセルバッファ回路30内のセル数は1となる。セル出力回路43は、カウントメモリ42の対応するアドレス内のカウント値を1から1を減算した値0とする。カウント値が0となったことで、セル出力回路43はウエイト有無フラグ32の値をウエイト無し状態を表す有意「H」とする。その他の値に関して変更は無い。この状態でセル出力回路43はウエイテッドラウンドロビンを行いセルバッファ回路10を選択しセル時刻7でセルA3を出力する準備をする。
【0032】
セル時刻7において、セル出力回路43はセルA3を出力する。これによりセルバッファ回路10内のセル数は1となる。セル出力回路43はカウントメモリ42の対応するアドレス内のカウント値を1から1を減算した値0とする。カウント値が0となったことで、セル出力回路43はウエイト有無フラグ12の値をウエイト無し状態を表す有意「H」とする。この結果、カウント初期化フラグ13,23,33を有意する前述した条件が満たされるので、セル出力回路43は全カウント初期化フラグ13,23,33を有意「H」とする。次に、セル出力回路43は、この状態でウエイテッドラウンドロビンを行うが、カウント初期化フラグ13,23,33が有意な場合、ウエイト有無フラグ12,22,32に関係なく対応したセル有無フラグ11,21,31にセルがあることを示しているセルバッファ回路10,20,30をラウンドロビンの対象とするが、このセル時刻7のようにカウント初期化フラグ13,23,33が全て有意であるときには、本実施の形態ではラウンドロビンの選択も初期化することとし、セルバッファ回路10からラウンドロビンの選択を始める。このとき、セルバッファ回路10にはセルが蓄積されているため、セル出力回路43はセルバッファ回路10を選択し、セル時刻8でセルA4を出力する準備をする。
【0033】
セル時刻8において、セル出力回路43はセルA4を出力する。これによりセルバッファ回路10内のセル数は0となる。セル出力回路43はカウント初期化フラグ13が当該セル時刻8の開始時に有意であったので、ウエイトメモリ41に設定されている対応するアドレス内のウエイト値3をカウント値の初期値として読み出し、その3から1を減算した値2をカウントメモリ42の対応するアドレスにセルバッファ回路10のカウント値として書き込む。また、セルバッファ回路10はセル有無フラグ11をセルが無い状態「H」とする。セル出力回路43はウエイト有無フラグ12をウエイトの有る状態「L」にし、更にカウント初期化フラグ13を無意「L」にする。続けて、セル出力回路43はウエイテッドラウンドロビンを行うが、セル有無フラグ21がセルの無い状態「H」を示しているので、セルバッファ回路20を選択せず、セルバッファ回路30を選択してセルC3を出力する準備を始める。
【0034】
セル時刻9において、セル出力回路43はセルC3を出力する。これによりセルバッファ回路30内のセル数は0となる。セル出力回路43はカウント初期化フラグ33が当該セル時刻9の開始時に有意であったので、ウエイトメモリ41に設定されている対応するアドレス内のウエイト値2をカウント値の初期値として読み出し、その2から1を減算した値1をカウントメモリ42の対応するアドレスにセルバッファ回路30のカウント値として書き込む。また、セルバッファ回路30はセル有無フラグ31をセルが無い状態「H」とし、ウエイト有無フラグ32をウエイトの有る状態「L」にし、更にカウント初期化フラグ33を無意「L」にする。
【0035】
ここで、セル時刻9においてセルバッファ回路20にセルB2が入力されたとすると、セルバッファ回路20内のセル数は1となり、セル有無フラグ21はセルが有る状態「L」となる。これは説明を簡略化にするためであり、もしこの状態でセルが入力されないと、セル出力回路43はセル時刻9でもカウント初期化フラグ13,23,33を有意にすることになる。セル出力回路43はセル時刻9においてもウエイテッドラウンドロビンを行う。この場合、セルバッファ回路20を選択して、入力されたセルB2を出力する準備を行う。
【0036】
以上のように、本実施の形態では動作するが、従来においてもセル時刻7においてウエイトメモリ41の各ウエイト値を読み出し、カウントメモリ42の各カウント値に書き込む動作を行えば、本実施の形態と同様のウエイテットラウンドロビン動作は可能である。しかしながら、セルバッファ回路数が増え、読出処理又は書込処理を行うウエイト値/カウント値の数が増えると1セル時間内で全ての読出/書込処理ができなくなる。本実施の形態では、セル時刻7において全てのカウント初期化フラグ13,23,33を有意にし、セル時刻8,9において説明したように出力するセルに対応するウエイトメモリ41のウエイト値を読み出し、1を減算してカウントメモリ42内の対応するアドレスに書き込んでいるため、1セル時間に1回の読出/書込動作を行えばよい。これにより、セルバッファ回路数が多くなっても対応することができる。
【0037】
実施の形態2.
上記実施の形態1では、セル出力回路43はカウント初期化フラグが有意でない状態でセルを出力する場合、対応するカウントメモリ42のカウント値を1減算し、カウント初期化フラグが有意な状態でセルを出力する場合、対応するカウント値をウエイトメモリ41の対応するアドレスのウエイト値とし、このウエイト値から1を減算した値をカウントメモリ42に書き込み、またカウント値が0になった場合にウエイト有無フラグをウエイトが無い状態「H」にした。
【0038】
本実施の形態におけるセル出力回路43は、カウント初期化フラグが有意でない状態でセルを出力する場合、対応するカウントメモリ42の対応するカウント値を1加算し、カウント初期化フラグが有意な状態でセルを出力する場合、初期値として0をカウント値とし、その0に1を加算した値をカウントメモリ42の対応するアドレスに設定し、またカウント値とウエイトメモリ41内の対応するアドレスのウエイト値とが等しくなったときに当該ウエイト有無フラグをウエイトが無い状態「H」にするようにした。すなわち、カウントメモリ42の各カウント値を、実施の形態1では初期値をウエイト値として減算していたのを、本実施の形態では初期値を0として加算するようにした。なお、本実施の形態のメモリを使用しカウントアップを行うカウンタは、図9において1減算する減算回路を1加算する加算回路に変えることで構成することができる。
【0039】
本実施の形態におけるブロック構成は、図1と同じである。また、実施の形態1の図3及び図4に相当するフラグ値等の遷移及びセル出力回路43の処理フローを図5及び図6に示す。以下、セルバッファ回路10,20,30の初期状態を図2と同じものとして、本実施の形態の動作について説明する。なお、初期状態においてウエイトメモリ41のセルバッファ回路10,20,30に対応する各アドレスには、実施の形態1と同様にCPU等からそれぞれ3,2,2が予め設定されているものとする。ただ、カウントメモリ42のセルバッファ回路10,20,30に対応する各アドレスには、それぞれ0,0,0を初期値として予め設定しておく。その他の前提条件については実施の形態1と同様である。また、実施の形態1と同様にセル時刻1〜8ではどのセルバッファ回路10,20,30にもセルは入力されず、セル時刻9にてセルバッファ回路20にセルが入力されるものとして説明する。
【0040】
セル出力回路43は、前回のウエイテッドラウンドロビンで出力することに決まったセルを1セル時間の最初から出力し、ウエイテッドラウンドロビン終了後、次セル時刻で出力するセルを該当するセルバッファ回路10,20,30から入力する処理を開始するとともに、以下の動作を順次行う。
【0041】
(1)現セル時刻で出力するセルに対応するカウント値とウエイトメモリ41の対応するウエイト値との比較処理と、対応するウエイト有無フラグの設定処理
(2)カウント初期化フラグの設定処理
(3)ウエイテッドラウンドロビン
(4)次回出力するセルに対応するカウントメモリ42からのカウント値の読出処理、またはカウント値として0を使用する処理
(5)(4)で読み出したカウント値の1加算処理
(6)現セル時刻で出力するセルに対応するカウント値のカウントメモリ42への書込処理
上記(1)において直前のセル時刻の(5)の処理結果とウエイトメモリ41の対応するウエイト値が一致していたら、対応するウエイト有無フラグをウエイトが無い状態「H」にし、一致していなかったらウエイトがある状態「L」にする。なお、上記(2)、(3)に関しては実施の形態1と同様である。
【0042】
セル時刻1において、セル有無フラグ11、21、31は、それぞれ「L」なので、各セルバッファ回路10,20,30にセルが蓄積されていることを示している。また、ウエイト有無フラグ12、22、32は、それぞれ「L」なので、各セルバッファ回路10,20,30とも消費されていないウエイトが存在することを示している。よって、全てのセルバッファ回路10,20,30ともラウンドロビンの対象となる。セル時刻1は初期状態なので、セル出力回路43はセルバッファ回路10を選択し、次のセル時刻2でセルA1を出力する準備をする。
【0043】
セル時刻2において、セル出力回路43はセルA1を出力する。これによりバッファ回路10内のセル数は3となる。セル出力回路43は、カウントメモリ42の対応するアドレス内のカウント値を0に1を加算した値1とする。セル出力回路43は、このカウント値とウエイトメモリ41の対応するアドレス内のウエイト値を読み出して一致するかを確認する。この場合、一致しないのでウエイト有無フラグ12の値はウエイトが有る状態である「L」のままとする。この後、セル出力回路43は、ウエイテッドラウンドロビンを行って次のセル出力のためにセルバッファ回路を選択する。ここでは、セル時刻1とウエイテッドラウンドロビンの対象となるセルバッファ回路に変更はないため、セルバッファ回路20を選択し、セルB1をセル時刻3で出力する準備をする。セル時刻2においてその他の値に関して変更は無い。
【0044】
セル時刻3において、セル出力回路43はセルB1を出力する。これによりセルバッファ回路20内のセル数は0となる。セル出力回路43はカウントメモリ42の対応するアドレス内のカウント値を0に1を加算した値1とする。セル出力回路43は、このカウント値とウエイトメモリ41の対応するアドレス内のウエイト値を読み出して一致するかを確認する。この場合、一致しないのでウエイト有無フラグ22の値はウエイトが有る状態である「L」のままとする。また、セルバッファ回路20にセルが無くなったので、セルバッファ回路20はセル有無フラグ21の値を有意「H」とし、セルが無い状態とする。この状態でセル出力回路43はラウンドロビンを行うが、セル有無フラグ21の状態からセルバッファ回路20にセルが無いことを認識できるので、セルバッファ回路20をウエイテッドラウンドロビンの対象から除外する。セル時刻2ではセルバッファ回路20を選択したので、セル時刻3ではセルバッファ回路30を選択してセル時刻4でセルC1を出力する準備をする。
【0045】
セル時刻4において、セル出力回路43はセルC1を出力する。これによりセルバッファ回路30内のセル数は2となる。セル出力回路43はカウントメモリ42の対応するアドレス内のカウント値を0に1を加算した値1とする。セル出力回路43は、このカウント値とウエイトメモリ41の対応するアドレス内のウエイト値を読み出して一致するかを確認する。この場合、一致しないのでウエイト有無フラグ32の値はウエイトが有る状態である「L」のままとする。その他の値に関して変更は無い。この状態でセル出力回路43はウエイテッドラウンドロビンを行い、セルバッファ回路10を選択しセル時刻5でセルA2を出力する準備をする。
【0046】
セル時刻5において、セル出力回路43はセルA2を出力する。これによりセルバッファ回路10内のセル数は2となる。セル出力回路43はカウントメモリ42の対応するアドレス内のカウント値を1に1を加算した値2とする。セル出力回路43は、このカウント値とウエイトメモリ41の対応するアドレス内のウエイト値を読み出して一致するかを確認する。この場合、一致しないのでウエイト有無フラグ12の値はウエイトが有る状態である「L」のままとする。その他の値に関して変更は無い。この状態でセル出力回路43はウエイテッドラウンドロビンを行うが、セル有無フラグ21の値がセルが無いことを示しているため、セルバッファ回路30を選択しセル時刻6でセルC2を出力する準備をする。
【0047】
セル時刻6において、セル出力回路43はセルC2を出力する。これによりセルバッファ回路30内のセル数は1となる。セル出力回路43は、カウントメモリ42の対応するアドレス内のカウント値を1に1を加算した値2とする。セル出力回路43は、このカウント値とウエイトメモリ41の対応するアドレス内のウエイト値を読み出して一致するかを確認する。この場合、一致しているので、セル出力回路43は、ウエイトが無い状態であると認識し、ウエイト有無フラグ32の値をウエイト無し状態を表す有意「H」とする。その他の値に関して変更は無い。この状態でセル出力回路43はウエイテッドラウンドロビンを行いセルバッファ回路10を選択しセル時刻7でセルA3を出力する準備をする。
【0048】
セル時刻7において、セル出力回路43はセルA3を出力する。これによりセルバッファ回路10内のセル数は1となる。セル出力回路43はカウントメモリ42の対応するアドレス内のカウント値を2に1を加算した値3とする。セル出力回路43は、このカウント値とウエイトメモリ41の対応するアドレス内のウエイト値を読み出して一致するかを確認する。この場合、一致するので、セル出力回路43はウエイト有無フラグ12の値をウエイト無し状態を表す有意「H」とする。この結果、カウント初期化フラグ13,23,33を有意する前述した条件が満たされるので、セル出力回路43は全カウント初期化フラグ13,23,33を有意「H」とする。次に、セル出力回路43は、この状態でウエイテッドラウンドロビンを行うが、カウント初期化フラグ13,23,33が有意な場合、ウエイト有無フラグ12,22,32に関係なく対応したセル有無フラグ11,21,31がセルがあることを示しているセルバッファ回路10,20,30をラウンドロビンの対象とするが、このセル時刻7のようにカウント初期化フラグ13,23,33が全て有意であるときには、本実施の形態ではラウンドロビンの選択も初期化することとし、セルバッファ回路10からラウンドロビンの選択を始める。このとき、セルバッファ回路10にはセルが蓄積されているため、セル出力回路43はセルバッファ回路10を選択し、セル時刻8でセルA4を出力する準備をする。
【0049】
セル時刻8において、セル出力回路43はセルA4を出力する。これによりセルバッファ回路10内のセル数は0となる。セル出力回路43はカウント初期化フラグ13が当該セル時刻8の開始時に有意であったので、カウントメモリ42の対応するアドレス内のカウント値を初期化つまり初期値0として、この0に1を加算してカウントメモリ42の対応するアドレスにセルバッファ回路10のカウント値として書き込む。セル出力回路43は、このカウント値とウエイトメモリ41の対応するアドレス内のウエイト値を読み出して一致するかを確認する。この場合、一致しないのでウエイト有無フラグ12の値をウエイトが有る状態「L」にする。また、セルバッファ回路10はセル有無フラグ11をセルが無い状態「H」とする。更にカウント初期化フラグ13を無意「L」にする。続けて、セル出力回路43はウエイテッドラウンドロビンを行うが、セル有無フラグ21がセルの無い状態「H」を示しているので、セルバッファ回路20を選択せず、セルバッファ回路30を選択してセルC3を出力する準備を始める。
【0050】
セル時刻9において、セル出力回路43はセルC3を出力する。これによりセルバッファ回路30内のセル数は0となる。セル出力回路43はカウント初期化フラグ33が当該セル時刻9の開始時に有意であったので、カウントメモリ42の対応するアドレス内のカウント値を初期化つまり初期値0として、この0に1を加算してカウントメモリ42の対応するアドレスにセルバッファ回路10のカウント値として書き込む。セル出力回路43は、このカウント値とウエイトメモリ41の対応するアドレス内のウエイト値を読み出して一致するかを確認する。この場合、一致しないのでウエイト有無フラグ32の値をウエイトが有る状態「L」にする。また、セルバッファ回路30はセル有無フラグ31をセルが無い状態「H」とする。更に、セル出力回路43は、カウント初期化フラグ33を無意「L」にする。
【0051】
ここで、セル時刻9においてセルバッファ回路20にセルB2が入力されたとすると、セルバッファ回路20内のセル数は1となり、セル有無フラグ21はセルが有る状態「L」となる。これは説明を簡略化にするためであり、もしこの状態でセルが入力されないと、セル出力回路43はセル時刻9でもカウント初期化フラグ13,23,33を有意にすることになる。セル出力回路43はセル時刻9においてもウエイテッドラウンドロビンを行う。この場合、セルバッファ回路20を選択して、入力されたセルB2を出力する準備を行う。
【0052】
以上のように、本実施の形態によれば、カウントメモリ42のカウント値の減算、加算という動作上の相違はあるものの、上記実施の形態1と同様の効果を奏することができる。
【0053】
【発明の効果】
本発明によれば、全てのセルバッファ回路において蓄積されたセルが無いかまたはウエイトが無い状態のときに、全てのカウンタを一斉に初期化するのではなくセル出力のために選択されたセルバッファ回路に対応したカウンタのみを初期化すればよいので、メモリを使用してカウンタを構成する場合においても搭載したセルバッファ回路の数に関係なく1セル時間内でウエイテッドラウンドロビン制御を確実に行うことができる。すなわち、多数のセルバッファ回路を搭載する場合でもカウンタとしてメモリを使用することができる。
【図面の簡単な説明】
【図1】 本発明に係るウエイテッドラウンドロビン回路の一実施の形態を示したブロック構成図である。
【図2】 実施の形態1におけるウエイテッドラウンドロビン回路の動作を説明するときの初期状態の例を示した図である。
【図3】 実施の形態1におけるウエイテッドラウンドロビン回路の動作に応じて遷移するセル数、カウント値及び各フラグの状態を示した図である。
【図4】 実施の形態1において1セル時間内に行われる処理フローを示した図である。
【図5】 実施の形態2におけるウエイテッドラウンドロビン回路の動作に応じて遷移するセル数、カウント値及び各フラグの状態を示した図である。
【図6】 実施の形態2において1セル時間内に行われる処理フローを示した図である。
【図7】 従来のウエイテッドラウンドロビン回路を示した構成図である。
【図8】 従来のウエイテッドラウンドロビン回路を適用したサービスの例を示した図である。
【図9】 メモリを使用したカウンタの構成を示した図である。
【符号の説明】
7 減算回路、10,20,30 セルバッファ回路、11,21,31 セル有無フラグ送出回路、12,22,32 ウエイト有無フラグ送出回路、13,23,33 カウント初期化フラグ送出回路、41 ウエイトメモリ、42 カウントメモリ、43 セル出力回路。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a weighted round-robin circuit for realizing a plurality of service classes in an apparatus for transmitting ATM (Asynchronous Transfer Mode) cells.
[0002]
[Prior art]
FIG. 7 is a diagram for explaining the weighted round robin shown in “Technical Report of IEICE SSE96-95 (1996-10)“ Evaluation of Scheduling Method for ABR and UBR Classes ””. In FIG. 7, for example, the cell buffer circuits 1 and 2 that are provided corresponding to different services and store the cells of the corresponding service in the internal cell buffer, the cell buffer circuits 1 and 2 are controlled, and the weighted round A cell output circuit 3 that outputs cells according to Robin's rule is shown.
[0003]
According to the weighted round robin rule, for example, the cell buffer circuit 1 is searched for whether or not there is a cell in the cell buffer circuits 1 and 2. If there is a cell, the cell of the cell buffer circuit 1 is output, and the cell If there is no cell, the next cell buffer circuit 2 is searched for whether or not there is a cell. If there is a cell, the cell of the cell buffer circuit 2 is output. Also, according to this rule, when there is a cell in the cell buffer circuit 1, the search at the next cell time starts from the next cell buffer circuit 2, and when there is no cell, the next, that is, first, Returning, the cell buffer circuit 1 is searched. Note that a round-robin is performed for the next cell output during one cell time, and the cell buffer circuit is selected. Furthermore, according to this rule, a weight is set for each cell buffer circuit, and each time a cell is output, the corresponding cell buffer circuit's wait value is subtracted one by one. It is not selected until the weight value is recovered.
[0004]
FIG. 7 illustrates the case where the weight of the cell buffer circuit 1 is 2 and the weight of the cell buffer circuit 2 is 1. Although not shown in FIG. 7, counters for counting down are provided corresponding to the cell buffer circuits 1 and 2, respectively, and the weight is reflected in the initial value of the counter. That is, the initial value of the counter corresponding to the cell buffer circuit 1 is 2, and the initial value of the counter corresponding to the cell buffer circuit 2 is 1. The cell buffer circuit 1 stores cells A1 to A6, and the cell buffer circuit 2 stores cells B1 to B3. The operation of the conventional weighted round robin circuit will be described using the example of FIG.
[0005]
The cell output circuit 3 first searches the cell buffer circuit 1 to see if cells are stored. In this example, since the cells are accumulated, the cell buffer circuit 1 outputs A1. Then, 1 is subtracted from the count value of the counter corresponding to the cell buffer circuit 1 to be 1. The cell to be output next becomes B1 stored in the cell buffer circuit 2 in accordance with the weighted round robin rule. At this time, the count value of the counter corresponding to the cell buffer circuit 2 is decremented by 1 to 0. According to the weight round robin rule, cells are not output from the cell buffer circuit whose count value is zero. Therefore, the next output cell is A2 stored in the cell buffer circuit 1. At this time, the counter value corresponding to the cell buffer circuit 1 is decremented by 1 to 0. According to the weighted round robin rule, when the count value is 0 in all the cell buffer circuits 1 and 2 or no cells are accumulated in the cell buffer, the count values of all the counters are reset to the initial values. The count value of the counter corresponding to the circuit 1 is 2 in the initial state, and the count value of the counter corresponding to the cell buffer circuit 2 is 1 in the initial state. After returning to the initial state in this way, the operation thereafter is performed in the same manner as described above, and the cells A3, B2, A4, A5, B3, and A6 are sequentially output.
[0006]
In the example shown in FIG. 7, the ratio of the number of cells output from the cell buffer circuit 1 to the number of cells output from the cell buffer circuit 2 is 2: 1 for the cells output from the cell output circuit 3. Which is equal to the weight ratio. Thus, in the weighted round robin circuit, cells can be output in proportion to the weight, and if the weight is changed for each service, the priority can be given to the service.
[0007]
FIG. 8 shows a service example of the weighted round robin circuit. FIG. 8 shows terminals 4 and 5 connected to the cell buffer circuits 1 and 2 described above. Each terminal 4 and 5 sends a cell to the corresponding cell buffer circuit 1 and 2, but in this configuration, if the weight ratio is 2 to 1 as in FIG. When cells are multiplexed on a single transmission line, the terminal 4 can output twice as many cells as the terminal 5 and is receiving a higher speed service.
[0008]
As described above, in the conventional weighted round robin circuit, it is necessary to provide a counter for subtracting the weight in correspondence with each cell buffer circuit. Therefore, if the number of cell buffer circuits increases, the counter needs to be increased in proportion to this. If the number of cell buffer circuits is several, a counter may be prepared individually. However, for example, when the cell buffer circuit is prepared for each connection and the number of connections is large, the number of counters is also increased. It is necessary to prepare as many as possible. Thus, when it is necessary to prepare a large number of counters, it is common to configure the counters using a memory.
[0009]
FIG. 9 is a diagram showing a configuration of a counter using a conventional memory. FIG. 9 shows a count memory 6 for storing the count value and a subtraction circuit 7 for subtracting the count value by one. The count memory 6 stores count values from # 1 to #N in correspondence with N cell buffer circuits. Next, an operation using the count memory 6 will be described.
[0010]
For example, when it is desired to count down the contents of # 2, the address is set to # 2, the value of # 2 is read from the count memory 6, 1 is subtracted from this value by the subtracting circuit 7, and it is written again to the address of # 2. With this configuration, N counters can be obtained with a small-scale configuration of the count memory 6 and the subtraction circuit 7.
[0011]
[Problems to be solved by the invention]
However, in the weighted round robin circuit, it is necessary to reset all count values to the initial value all at once when the values of the counters corresponding to all the cell buffer circuits are 0 or no cells are accumulated. In the weighted round robin circuit constituting the counter, in order to return the counter value to the initial value, the initial value must be written by one counter (one address). For this reason, when the number of counters increases, the initial value writing process to each counter may not be completed by the start of the next cell time. For example, if the time required to perform round robin and select the cell buffer circuit is α, and the time required to initialize the count value is β, in order to operate normally as a weighted round robin circuit,
α + β <1 cell time
It is necessary to satisfy the condition. For example, when a cell is output to a 150 Mb / s line, one cell time is a fixed time of about 2.7 μsec. However, as the number of cell buffer circuits increases, β increases. Cannot satisfy the above conditional expression. As a result, there is a problem that a weighted round robin circuit that constitutes a counter with a memory cannot be used in a device that transmits ATM cells equipped with a large number of cell buffer circuits.
[0012]
The present invention has been made to solve the above-described problems, and its object is to provide a weighted round that can be used regardless of the number of cell buffer circuits even when a counter is configured using a memory. It is to provide a robin circuit.
[0013]
[Means for Solving the Problems]
In order to achieve the above object, a weighted round robin circuit according to the present invention includes a plurality of cell buffer circuits and a plurality of cells that transmit a cell presence / absence flag provided corresponding to each of the cell buffer circuits. Presence / absence flag transmission circuit, a plurality of wait presence / absence flag transmission circuits for transmitting wait presence / absence flags provided corresponding to the cell buffer circuits, and a count initialization flag provided for the cell buffer circuits, respectively. A plurality of count initialization flag transmission circuits to be transmitted, a wait memory for storing a wait value corresponding to each cell buffer circuit, a count memory for storing a count value corresponding to each cell buffer circuit, and a cell output circuit. When a cell is received, the cell is written into the cell buffer circuit corresponding to the cell. The cell presence / absence flag sending circuit stores the presence / absence of cells in the corresponding cell buffer circuit, and the cell output circuit inputs the states of all cell presence / absence flags, wait presence / absence flags, and count initialization flags, and the cell buffer circuit A cell buffer circuit is selected by round-robin for the cell buffer circuit having a cell in the cell buffer and having a wait, or a cell in the cell buffer circuit and the count initialization flag is significant, Cells are output from the cell buffer circuit, and for all the cell buffer circuits, the corresponding cell presence / absence flag indicates that there is no cell in the cell buffer circuit, or the wait flag indicates that there is no wait. In this case, all count initialization flags are made significant, and the count corresponding to the cell buffer circuit is set. If the count initialization flag is insignificant, the count value in the count memory corresponding to the cell to be output is decremented by 1. When the count value becomes 0 as a result of the subtraction, the wait flag is set to a state with no wait. When the count initialization flag corresponding to the cell buffer circuit is significant, the count value corresponding to the output cell is set as the wait value in the corresponding wait memory, and the value obtained by subtracting 1 from the wait value is stored in the corresponding count memory. And the corresponding wait flag is set to a state in which there is a weight.
[0014]
A weighted round robin circuit according to another invention includes a plurality of cell buffer circuits, a plurality of cell presence / absence flag sending circuits for sending cell presence / absence flags provided corresponding to each of the cell buffer circuits, and the cell buffer circuit A plurality of wait presence / absence flag sending circuits for sending wait presence / absence flags provided in correspondence to each of them, and a plurality of count initialization flag sending circuits for sending count initialization flags provided in correspondence with the cell buffer circuits, respectively. And a weight memory for storing a weight value corresponding to each cell buffer circuit, a count memory for storing a count value corresponding to each cell buffer circuit, and a cell output circuit, and corresponding to the cell upon receiving a cell The cell is written to the cell buffer circuit, and the cell presence / absence flag sending circuit is compatible. The cell output circuit stores the presence / absence of cells in the cell buffer circuit, and the cell output circuit inputs the states of all cell presence / absence flags, wait presence / absence flags, and count initialization flags. If there is a cell in the cell buffer circuit and the cell buffer circuit has a significant count initialization flag, one cell buffer circuit is selected by round robin and a cell is output from the cell buffer circuit. In addition, for all the cell buffer circuits, if the corresponding cell presence flag indicates that there is no cell in the cell buffer circuit, or if the wait flag indicates that there is no wait, all count initializations are performed. If the flag is significant and the count initialization flag corresponding to the cell buffer circuit is 1 is added to the count value in the count memory corresponding to the cell to be output, and when the added count value becomes equal to the wait value in the corresponding wait memory, the wait flag is set to a state in which there is no wait. When the count initialization flag corresponding to the cell buffer circuit is significant, the count value in the count memory corresponding to the cell to be output is set to 0, and the value obtained by adding 1 to 0 is set as the count value of the corresponding count memory. In addition, the corresponding weight flag is set to a state where there is a weight.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
[0016]
Embodiment 1 FIG.
FIG. 1 is a block diagram showing an embodiment of a weighted round robin circuit according to the present invention. In FIG. 1, three cell buffer circuits 10, 20, 30, cell presence / absence flag transmission circuits 11, 21, 31, and wait presence / absence flag transmission circuits 12, 22, 32 are associated with the cell buffer circuits 10, 20, 30. And count initialization flag sending circuits 13, 23, and 33 are provided. Also shown are a weight memory 41 in which weights indicating the priorities of the cell buffer circuits 10, 20, and 30 are set in advance, and a count memory 42 that holds the count values of the cell buffer circuits 10, 20, and 30. ing. This count value is subtracted every time a cell is transmitted from the corresponding cell buffer circuit 10, 20, 30 with the weight of each cell buffer circuit 10, 20, 30 as an initial value. Further, a cell output circuit 43 that performs weighted round robin control is shown. Note that one of the weighted round robin controls performed by the cell output circuit 43 is that the cell buffer circuit 10 for cell output in the next cell time by performing round robin in accordance with the weighted round robin rule within one cell time. , 20, and 30 and processing for transmitting cells from the selected cell buffer circuits 10, 20, and 30 is included.
[0017]
The above-described cell presence / absence flag sending circuits 11, 21, and 31 indicate an inadvertent cell presence / absence flag when cells are stored in the corresponding cell buffer circuits 10, 20, and 30, and significant cells when no cells are stored. A presence / absence flag is sent to the cell output circuit 43. The wait presence / absence flag sending circuits 12, 22, and 32 send a significant / unintentional wait presence / absence flag according to the control of the cell output circuit 43. Specifically, when the count value corresponding to the count memory 42 is subtracted to 0, a significant wait presence / absence flag is transmitted according to the control of the cell output circuit 43, and the count memory 42 corresponds. When the count value is no longer 0, an unexpected wait presence / absence flag is sent according to the control of the cell output circuit 43. The count initialization flag sending circuits 13, 23, 33 send a significant or unintentional count initialization flag according to the control of the cell output circuit 43. Specifically, after the value of the wait presence / absence flag is switched as necessary within the same cell time, all the cell buffer circuits 10, 20, and 30 each have a cell presence / absence corresponding to the cell buffer circuit 10, 20, 30. When either one or both of the flag and the weight presence / absence flag are significant, all the count initialization flag transmission circuits 13, 23, and 33 all transmit a significant count initialization flag. That is, the count initialization flags are all switched from involuntary to significant at the same time. Further, if the count initialization flag corresponding to the cell buffer circuit 10, 20, 30 sending the cell is significant, the cell buffer circuit 10, 20, 30 switches to the unexpected count initialization flag and sends it.
[0018]
Each of the circuits 11 to 31, 12 to 32, and 13 to 33 in the present embodiment is realized by a flip-flop circuit, and the significant signal is represented by a high signal “H” and the insignificance is represented by a low signal “L”. To do. Of course, a circuit other than a flip-flop may be used, and “H” and “L” representing significance and insignia may be reversed. In the present embodiment, for the sake of convenience, a configuration having three cell buffer circuits 10, 20, and 30 will be described as an example. However, two or more cell buffer circuits may be provided. In this embodiment, the counter shown in FIG. 9 can be used as it is.
[0019]
What is characteristic in the present embodiment having the above-described configuration is that each of the cell buffer circuits 10, 20, and 30 is provided in correspondence with each of the circuits 11 to 31, 12 to 32, and 13 to 33. By performing the flag value switching control, the weighted round-robin control can be normally performed without all the count values of the count memory 42 being initialized all at once. Thereby, even if the count value is held in the count memory 42, a large number of cell buffer circuits can be mounted.
[0020]
FIG. 2 is a diagram showing an example of an initial state when the operation of the weighted round robin circuit in the present embodiment is described. The cells stored in the cell buffer circuits 10, 20, and 30 in the initial state shown in FIG. Referring to FIG. 2, the cell buffer circuit 10 stores A1, A2, A3, and A4 cells, the cell buffer circuit 20 stores B1 cells, and the cell buffer circuit 30 stores C1, C2, and C3 cells. Is accumulated. The weights of the cell buffer circuits 10, 20, and 30 are 3, 2, and 2, respectively. Further, the description will be made assuming that when the initial state and the weight are restored, the round robin starts from the cell buffer circuit 10 and turns in the ascending order of the cell buffer circuit 20 and then the cell buffer circuit 30. No cell input, the corresponding cell presence / absence flag is fixed to a state where there is no cell (significant), the weight presence / absence flag is fixed to a state where the count value is 0 (significant), and the count initialization flag is fixed arbitrarily. In this case, the cell buffer circuit can be prevented from being included in the round robin target. Further, wait values 3, 2, and 2 are set in advance as initial values from the CPU or the like to the addresses corresponding to the cell buffer circuits 10, 20, and 30 of the count memory 42, respectively. Further, 3, 2, and 2 are set in advance for the addresses corresponding to the cell buffer circuits 10, 20, and 30 of the wait memory 41, respectively.
[0021]
FIG. 3 is a diagram illustrating the number of cells that transition according to the operation of the weighted round robin circuit according to the first embodiment, the count value, and the state of each flag. Cell times 1 to 9 in FIG. 3 each correspond to one cell time. In the present embodiment, it is assumed that no cell is input to any of the cell buffer circuits 10, 20, 30 at cell times 1 to 8 and a cell is input to the cell buffer circuit 20 at cell time 9.
[0022]
FIG. 4 is a diagram showing a processing flow of the cell output circuit 43 performed within one cell time in the present embodiment. The cell output circuit 43 outputs a cell determined to be output in the previous weighted round robin from the beginning of one cell time, and after completion of the weighted round robin, the cell output circuit 43 outputs a cell output at the next cell time. The process of inputting from 10, 20, and 30 is started and the following operations are sequentially performed.
[0023]
(1) Processing for setting a wait presence / absence flag corresponding to a cell output at the current cell time
(2) Count initialization flag setting process
(3) Weighted round robin
(4) Count value reading processing from the count memory 42 corresponding to the cell to be output next time, or weight reading processing from the weight memory 41 corresponding to the cell to be output next time
(5) 1 subtraction processing of the count value read in (4)
(6) Write processing of the count value corresponding to the cell output at the current cell time to the count memory 42
As described above, the wait presence / absence flag in (1) is set to “L” when there is a cell when the processing result in (5) performed at the previous cell time is other than 0, and When the processing result is 0, the cell presence / absence flag is set to “H” where there is no cell.
[0024]
In the setting of the count initialization flag in (2) above, as described above, in all the cell buffer circuits 10, 20, 30, either the cell presence flag or the wait presence flag corresponding to each of the cell buffer circuits 10, 20, 30 is selected. When one or both are significant, all are set to significant “H”. Further, if the cell buffer circuit 10, 20, 30 sends a cell, it is set to “L” if it is significant.
[0025]
In the above (3), the weighted round robin selection target indicates a state “L” in which cells are accumulated (cell presence / absence flag is unintentional “L”) and the weight presence / absence flag is weighted. Or the cell buffer circuits 10, 20, and 30 having a count initialization flag of significant “H”. The detailed operation will be described below with reference to FIG. For convenience, in the following description, each flag sent by each circuit 11 to 31, 12 to 32, and 13 to 33 is given a code.
[0026]
Since the cell presence / absence flags 11, 21, and 31 are “L” at the cell time 1, it indicates that cells are accumulated in the cell buffer circuits 10, 20, and 30, respectively. Since the wait presence / absence flags 12, 22, and 32 are "L", it indicates that there is a wait that is not consumed by each of the cell buffer circuits 10, 20, and 30. Therefore, all cell buffer circuits 10, 20, and 30 are subject to round robin. Since the cell time 1 is in the initial state, the cell output circuit 43 selects the cell buffer circuit 10 and prepares to output the cell A1 at the next cell time 2.
[0027]
At cell time 2, the cell output circuit 43 outputs the cell A1. As a result, the number of cells in the buffer circuit 10 becomes three. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 2 obtained by subtracting 1 from 3. The cell output circuit 43 performs a weighted round robin to select a cell buffer circuit for the next cell output. Here, since there is no change in the cell buffer circuit subject to cell time 1 and weighted round robin, the cell buffer circuit 20 is selected and preparation is made to output cell B1 at cell time 3. There is no change in other values at cell time 2.
[0028]
At cell time 3, the cell output circuit 43 outputs the cell B1. As a result, the number of cells in the cell buffer circuit 20 becomes zero. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 1 obtained by subtracting 1 from 2. In addition, since there are no cells in the cell buffer circuit 20, the cell buffer circuit 20 sets the value of the cell presence / absence flag 21 to a significant “H”, and there is no cell. In this state, the cell output circuit 43 performs round robin, but since the cell buffer circuit 20 can recognize that there is no cell from the state of the cell presence / absence flag 21, the cell buffer circuit 20 is excluded from the weighted round robin. Since the cell buffer circuit 20 is selected at the cell time 2, the cell buffer circuit 30 is selected at the cell time 3 and preparation is made for outputting the cell C 1 at the cell time 4.
[0029]
At cell time 4, the cell output circuit 43 outputs the cell C1. As a result, the number of cells in the cell buffer circuit 30 becomes two. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 1 obtained by subtracting 1 from 2. There is no change regarding other values. In this state, the cell output circuit 43 performs weighted round robin, selects the cell buffer circuit 10, and prepares to output the cell A2 at the cell time 5.
[0030]
At cell time 5, the cell output circuit 43 outputs the cell A2. As a result, the number of cells in the cell buffer circuit 10 becomes two. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 1 obtained by subtracting 1 from 2. There is no change regarding other values. In this state, the cell output circuit 43 performs weighted round robin, but since the value of the cell presence / absence flag 21 indicates that there is no cell, the cell buffer circuit 30 is selected and preparation for outputting the cell C2 at the cell time 6 is performed. do.
[0031]
At cell time 6, the cell output circuit 43 outputs the cell C2. As a result, the number of cells in the cell buffer circuit 30 becomes one. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 0 obtained by subtracting 1 from 1. When the count value becomes 0, the cell output circuit 43 sets the value of the wait presence / absence flag 32 to a significant “H” indicating a no-wait state. There is no change regarding other values. In this state, the cell output circuit 43 performs weighted round robin, selects the cell buffer circuit 10, and prepares to output the cell A3 at the cell time 7.
[0032]
At cell time 7, the cell output circuit 43 outputs the cell A3. As a result, the number of cells in the cell buffer circuit 10 becomes one. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 0 obtained by subtracting 1 from 1. When the count value becomes 0, the cell output circuit 43 sets the value of the wait presence / absence flag 12 to a significant “H” indicating a no-wait state. As a result, the above-described condition that makes the count initialization flags 13, 23, and 33 significant is satisfied, so that the cell output circuit 43 sets all the count initialization flags 13, 23, and 33 to significant “H”. Next, the cell output circuit 43 performs weighted round robin in this state. When the count initialization flags 13, 23, and 33 are significant, the corresponding cell presence / absence flags regardless of the wait presence / absence flags 12, 22, and 32. The cell buffer circuits 10, 20, and 30 indicating that there are cells in 11, 21, and 31 are targets of round robin, but the count initialization flags 13, 23, and 33 are all significant as in this cell time 7. In this embodiment, the round robin selection is also initialized in the present embodiment, and the round robin selection is started from the cell buffer circuit 10. At this time, since cells are stored in the cell buffer circuit 10, the cell output circuit 43 selects the cell buffer circuit 10 and prepares to output the cell A4 at the cell time 8.
[0033]
At cell time 8, the cell output circuit 43 outputs the cell A4. As a result, the number of cells in the cell buffer circuit 10 becomes zero. Since the count initialization flag 13 is significant at the start of the cell time 8, the cell output circuit 43 reads the wait value 3 in the corresponding address set in the wait memory 41 as the initial value of the count value. A value 2 obtained by subtracting 1 from 3 is written as a count value of the cell buffer circuit 10 in a corresponding address of the count memory 42. Further, the cell buffer circuit 10 sets the cell presence / absence flag 11 to “H” in which there is no cell. The cell output circuit 43 sets the wait presence / absence flag 12 to the wait state “L”, and further sets the count initialization flag 13 to “L”. Subsequently, the cell output circuit 43 performs weighted round robin. However, since the cell presence / absence flag 21 indicates the state “H” where there is no cell, the cell buffer circuit 30 is selected without selecting the cell buffer circuit 20. To start preparation for outputting the cell C3.
[0034]
At cell time 9, the cell output circuit 43 outputs the cell C3. As a result, the number of cells in the cell buffer circuit 30 becomes zero. Since the count initialization flag 33 is significant at the start of the cell time 9, the cell output circuit 43 reads the wait value 2 in the corresponding address set in the wait memory 41 as the initial value of the count value. A value 1 obtained by subtracting 1 from 2 is written as a count value of the cell buffer circuit 30 in a corresponding address of the count memory 42. In addition, the cell buffer circuit 30 sets the cell presence / absence flag 31 to “H” in which there is no cell, sets the wait presence / absence flag 32 to “L” with a wait, and further sets the count initialization flag 33 to “L”.
[0035]
Here, if the cell B2 is input to the cell buffer circuit 20 at the cell time 9, the number of cells in the cell buffer circuit 20 is 1, and the cell presence / absence flag 21 is in a state “L” where there is a cell. This is for simplifying the explanation. If no cell is input in this state, the cell output circuit 43 makes the count initialization flags 13, 23, 33 significant even at the cell time 9. The cell output circuit 43 performs weighted round robin even at the cell time 9. In this case, the cell buffer circuit 20 is selected to prepare for outputting the input cell B2.
[0036]
As described above, although this embodiment operates, conventionally, if each wait value of the wait memory 41 is read and written to each count value of the count memory 42 at the cell time 7, the operation of the present embodiment is the same as the present embodiment. A similar weighted round robin operation is possible. However, if the number of cell buffer circuits increases and the number of wait values / count values for performing read processing or write processing increases, all read / write processing cannot be performed within one cell time. In the present embodiment, all the count initialization flags 13, 23, 33 are made significant at the cell time 7, and the weight value of the weight memory 41 corresponding to the cell to be output is read as described at the cell times 8, 9, Since 1 is subtracted and written to the corresponding address in the count memory 42, the read / write operation may be performed once per cell time. As a result, it is possible to cope with an increase in the number of cell buffer circuits.
[0037]
Embodiment 2. FIG.
In the first embodiment, when the cell output circuit 43 outputs a cell with the count initialization flag not significant, the cell output circuit 43 subtracts 1 from the count value of the corresponding count memory 42 and the cell with the count initialization flag significant. Is output, the corresponding count value is set as the wait value of the corresponding address in the wait memory 41, and a value obtained by subtracting 1 from this wait value is written to the count memory 42. When the count value becomes 0, the presence or absence of wait The flag is set to “H” with no weight.
[0038]
When the cell output circuit 43 according to the present embodiment outputs a cell in a state where the count initialization flag is not significant, the cell output circuit 43 adds 1 to the corresponding count value of the corresponding count memory 42, and the count initialization flag is significant. When a cell is output, 0 is set as an initial value as a count value, a value obtained by adding 1 to 0 is set as a corresponding address in the count memory 42, and the count value and the wait value of the corresponding address in the wait memory 41 are set. Is set to “H” when there is no weight. That is, each count value in the count memory 42 is subtracted with the initial value as the weight value in the first embodiment, but is added with the initial value as 0 in the present embodiment. Note that the counter that performs the count-up using the memory of this embodiment can be configured by changing the subtracting circuit that subtracts 1 in FIG.
[0039]
The block configuration in the present embodiment is the same as in FIG. Further, the transition of the flag value and the like corresponding to FIGS. 3 and 4 of the first embodiment and the processing flow of the cell output circuit 43 are shown in FIGS. Hereinafter, the operation of the present embodiment will be described assuming that the initial state of the cell buffer circuits 10, 20, and 30 is the same as that in FIG. In the initial state, the addresses corresponding to the cell buffer circuits 10, 20, and 30 of the wait memory 41 are set in advance to 3, 2, and 2, respectively, from the CPU and the like as in the first embodiment. . However, 0, 0, and 0 are set in advance as initial values for the addresses corresponding to the cell buffer circuits 10, 20, and 30 of the count memory 42, respectively. Other preconditions are the same as those in the first embodiment. Similarly to the first embodiment, it is assumed that no cell is input to any of the cell buffer circuits 10, 20, and 30 at cell times 1 to 8, and a cell is input to the cell buffer circuit 20 at cell time 9. To do.
[0040]
The cell output circuit 43 outputs a cell determined to be output in the previous weighted round robin from the beginning of one cell time, and after completion of the weighted round robin, the cell output circuit 43 outputs a cell output at the next cell time. The process of inputting from 10, 20, and 30 is started and the following operations are sequentially performed.
[0041]
(1) Comparison processing between the count value corresponding to the cell output at the current cell time and the corresponding wait value in the wait memory 41, and the corresponding wait presence / absence flag setting processing
(2) Count initialization flag setting process
(3) Weighted round robin
(4) Processing for reading count value from count memory 42 corresponding to cell to be output next time, or processing using 0 as count value
(5) 1 addition processing of count value read in (4)
(6) Write processing of the count value corresponding to the cell output at the current cell time to the count memory 42
In the above (1), if the processing result of (5) at the immediately preceding cell time and the corresponding wait value in the weight memory 41 match, the corresponding wait presence / absence flag is set to “H” with no wait and does not match. Then, the state where there is a weight is set to “L”. The above (2) and (3) are the same as those in the first embodiment.
[0042]
Since the cell presence / absence flags 11, 21, and 31 are “L” at the cell time 1, it indicates that cells are accumulated in the cell buffer circuits 10, 20, and 30, respectively. Since the wait presence / absence flags 12, 22, and 32 are "L", it indicates that there is a wait that is not consumed by each of the cell buffer circuits 10, 20, and 30. Therefore, all cell buffer circuits 10, 20, and 30 are subject to round robin. Since the cell time 1 is in the initial state, the cell output circuit 43 selects the cell buffer circuit 10 and prepares to output the cell A1 at the next cell time 2.
[0043]
At cell time 2, the cell output circuit 43 outputs the cell A1. As a result, the number of cells in the buffer circuit 10 becomes three. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 1 obtained by adding 1 to 0. The cell output circuit 43 reads the count value and the wait value in the corresponding address of the wait memory 41 to confirm whether they match. In this case, since they do not match, the value of the wait presence / absence flag 12 remains “L” in a state where there is a wait. Thereafter, the cell output circuit 43 performs a weighted round robin and selects a cell buffer circuit for the next cell output. Here, since there is no change in the cell buffer circuit subject to cell time 1 and weighted round robin, the cell buffer circuit 20 is selected and preparation is made to output cell B1 at cell time 3. There is no change in other values at cell time 2.
[0044]
At cell time 3, the cell output circuit 43 outputs the cell B1. As a result, the number of cells in the cell buffer circuit 20 becomes zero. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 1 obtained by adding 1 to 0. The cell output circuit 43 reads the count value and the wait value in the corresponding address of the wait memory 41 to confirm whether they match. In this case, since there is no coincidence, the value of the weight presence / absence flag 22 remains “L”, which is a state where there is a weight. In addition, since there are no cells in the cell buffer circuit 20, the cell buffer circuit 20 sets the value of the cell presence / absence flag 21 to a significant “H”, and there is no cell. In this state, the cell output circuit 43 performs round robin, but since the cell buffer circuit 20 can recognize that there is no cell from the state of the cell presence / absence flag 21, the cell buffer circuit 20 is excluded from the weighted round robin. Since the cell buffer circuit 20 is selected at the cell time 2, the cell buffer circuit 30 is selected at the cell time 3 and preparation is made for outputting the cell C 1 at the cell time 4.
[0045]
At cell time 4, the cell output circuit 43 outputs the cell C1. As a result, the number of cells in the cell buffer circuit 30 becomes two. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 1 obtained by adding 1 to 0. The cell output circuit 43 reads the count value and the wait value in the corresponding address of the wait memory 41 to confirm whether they match. In this case, since there is no coincidence, the value of the wait presence / absence flag 32 remains “L” in a state where there is a wait. There is no change regarding other values. In this state, the cell output circuit 43 performs weighted round robin, selects the cell buffer circuit 10, and prepares to output the cell A2 at the cell time 5.
[0046]
At cell time 5, the cell output circuit 43 outputs the cell A2. As a result, the number of cells in the cell buffer circuit 10 becomes two. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 2 obtained by adding 1 to 1. The cell output circuit 43 reads the count value and the wait value in the corresponding address of the wait memory 41 to confirm whether they match. In this case, since they do not match, the value of the wait presence / absence flag 12 remains “L” in a state where there is a wait. There is no change regarding other values. In this state, the cell output circuit 43 performs weighted round robin. However, since the value of the cell presence / absence flag 21 indicates that there is no cell, preparation is made to select the cell buffer circuit 30 and output the cell C2 at the cell time 6. do.
[0047]
At cell time 6, the cell output circuit 43 outputs the cell C2. As a result, the number of cells in the cell buffer circuit 30 becomes one. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 2 obtained by adding 1 to 1. The cell output circuit 43 reads the count value and the wait value in the corresponding address of the wait memory 41 to confirm whether they match. In this case, since they match, the cell output circuit 43 recognizes that there is no wait state, and sets the value of the wait presence / absence flag 32 to a significant “H” indicating the no-wait state. There is no change regarding other values. In this state, the cell output circuit 43 performs weighted round robin, selects the cell buffer circuit 10, and prepares to output the cell A3 at the cell time 7.
[0048]
At cell time 7, the cell output circuit 43 outputs the cell A3. As a result, the number of cells in the cell buffer circuit 10 becomes one. The cell output circuit 43 sets the count value in the corresponding address of the count memory 42 to a value 3 obtained by adding 1 to 2. The cell output circuit 43 reads the count value and the wait value in the corresponding address of the wait memory 41 to confirm whether they match. In this case, since they match, the cell output circuit 43 sets the value of the wait presence / absence flag 12 to a significant “H” indicating a no-wait state. As a result, the above-described condition for making the count initialization flags 13, 23, and 33 significant is satisfied, so that the cell output circuit 43 sets all the count initialization flags 13, 23, and 33 to significant “H”. Next, the cell output circuit 43 performs weighted round robin in this state. When the count initialization flags 13, 23, and 33 are significant, the corresponding cell presence / absence flags regardless of the wait presence / absence flags 12, 22, and 32. The cell buffer circuits 10, 20, and 30 in which cells 11, 21, and 31 indicate that there are cells are subject to round robin, but the count initialization flags 13, 23, and 33 are all significant as in this cell time 7. In this embodiment, the round robin selection is also initialized in the present embodiment, and the round robin selection is started from the cell buffer circuit 10. At this time, since cells are stored in the cell buffer circuit 10, the cell output circuit 43 selects the cell buffer circuit 10 and prepares to output the cell A4 at the cell time 8.
[0049]
At cell time 8, the cell output circuit 43 outputs the cell A4. As a result, the number of cells in the cell buffer circuit 10 becomes zero. The cell output circuit 43 initializes the count value in the corresponding address of the count memory 42, that is, sets the initial value 0, since the count initialization flag 13 is significant at the start of the cell time 8, and adds 1 to this 0. Then, the count value of the cell buffer circuit 10 is written to the corresponding address of the count memory 42. The cell output circuit 43 reads the count value and the wait value in the corresponding address of the wait memory 41 to confirm whether they match. In this case, since there is no coincidence, the value of the wait presence / absence flag 12 is set to the state “L” where there is a wait. Further, the cell buffer circuit 10 sets the cell presence / absence flag 11 to “H” in which there is no cell. Further, the count initialization flag 13 is set to “L” unexpectedly. Subsequently, the cell output circuit 43 performs weighted round robin. However, since the cell presence / absence flag 21 indicates the state “H” where there is no cell, the cell buffer circuit 30 is selected without selecting the cell buffer circuit 20. To start preparation for outputting the cell C3.
[0050]
At cell time 9, the cell output circuit 43 outputs the cell C3. As a result, the number of cells in the cell buffer circuit 30 becomes zero. The cell output circuit 43 initializes the count value in the corresponding address of the count memory 42, that is, sets the initial value 0 because the count initialization flag 33 is significant at the start of the cell time 9, and adds 1 to this 0. Then, the count value of the cell buffer circuit 10 is written to the corresponding address of the count memory 42. The cell output circuit 43 reads the count value and the wait value in the corresponding address of the wait memory 41 to confirm whether they match. In this case, since there is no coincidence, the value of the wait presence / absence flag 32 is set to a state “L” where there is a wait. Further, the cell buffer circuit 30 sets the cell presence / absence flag 31 to “H” in which there is no cell. Further, the cell output circuit 43 sets the count initialization flag 33 to “L”.
[0051]
Here, if the cell B2 is input to the cell buffer circuit 20 at the cell time 9, the number of cells in the cell buffer circuit 20 is 1, and the cell presence / absence flag 21 is in a state “L” where there is a cell. This is for simplifying the explanation. If no cell is input in this state, the cell output circuit 43 makes the count initialization flags 13, 23, 33 significant even at the cell time 9. The cell output circuit 43 performs weighted round robin even at the cell time 9. In this case, the cell buffer circuit 20 is selected to prepare for outputting the input cell B2.
[0052]
As described above, according to the present embodiment, although there is an operational difference between subtraction and addition of the count value of the count memory 42, the same effect as in the first embodiment can be obtained.
[0053]
【The invention's effect】
According to the present invention, when there is no cell accumulated in all cell buffer circuits or no wait state, the cell buffer selected for cell output is selected instead of simultaneously initializing all counters. Since only the counter corresponding to the circuit needs to be initialized, weighted round robin control is reliably performed within one cell time regardless of the number of cell buffer circuits mounted even when the counter is configured using a memory. be able to. That is, even when a large number of cell buffer circuits are mounted, the memory can be used as a counter.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of a weighted round robin circuit according to the present invention.
FIG. 2 is a diagram showing an example of an initial state when describing the operation of the weighted round robin circuit according to the first embodiment;
FIG. 3 is a diagram illustrating the number of cells that transition according to the operation of the weighted round robin circuit according to the first embodiment, the count value, and the state of each flag.
FIG. 4 is a diagram showing a processing flow performed within one cell time in the first embodiment.
FIG. 5 is a diagram illustrating the number of cells that change according to the operation of the weighted round robin circuit according to the second embodiment, the count value, and the state of each flag.
FIG. 6 is a diagram showing a processing flow performed within one cell time in the second embodiment.
FIG. 7 is a block diagram showing a conventional weighted round robin circuit.
FIG. 8 is a diagram showing an example of a service to which a conventional weighted round robin circuit is applied.
FIG. 9 is a diagram showing a configuration of a counter using a memory.
[Explanation of symbols]
7 Subtraction circuit 10, 20, 30 Cell buffer circuit, 11, 21, 31 Cell presence / absence flag transmission circuit, 12, 22, 32 Wait presence / absence flag transmission circuit, 13, 23, 33 Count initialization flag transmission circuit, 41 Wait memory 42 count memory, 43 cell output circuit.

Claims (2)

複数のセルバッファ回路と、
前記セルバッファ回路それぞれに対応して設けられたセル有無フラグを送出する複数のセル有無フラグ送出回路と、
前記セルバッファ回路それぞれに対応して設けられたウエイト有無フラグを送出する複数のウエイト有無フラグ送出回路と、
前記セルバッファ回路それぞれに対応して設けられたカウント初期化フラグを送出する複数のカウント初期化フラグ送出回路と、
各セルバッファ回路に対応するウエイト値を記憶するウエイトメモリと、
各セルバッファ回路に対応するカウント値を記憶するカウントメモリと、
セル出力回路と、
を有し、
セルを受信するとそのセルに対応する前記セルバッファ回路に当該セルが書き込まれ、前記セル有無フラグ送出回路は対応するセルバッファ回路のセルの有無を記憶し、前記セル出力回路は全てのセル有無フラグ、ウエイト有無フラグ及びカウント初期化フラグの状態を入力し、前記セルバッファ回路内にセルがありかつウエイトがあるか、または前記セルバッファ回路内にセルがありかつカウント初期化フラグが有意の前記セルバッファ回路に対し、ラウンドロビンにより1つの前記セルバッファ回路を選択し、該セルバッファ回路からセルを出力し、また各セルバッファ回路全てについて、対応するセル有無フラグが前記セルバッファ回路内にセルが無いことを示しているか、またはウエイトフラグがウエイトが無いことを示している場合、全てのカウント初期化フラグを有意にし、前記セルバッファ回路に対応するカウント初期化フラグが無意の場合、出力するセルに対応する前記カウントメモリ内のカウント値を1減算し、減算した結果カウント値が0になったときは、ウエイトフラグをウエイトが無い状態にし、前記セルバッファ回路に対応するカウント初期化フラグが有意の場合、出力するセルに対応するカウント値を対応する前記ウエイトメモリ内のウエイト値とし、該ウエイト値から1を減算した値を対応するカウントメモリ内のカウント値とし、また対応するウエイトフラグをウエイトがある状態にすることを特徴とするウエイテッドラウンドロビン回路。
A plurality of cell buffer circuits;
A plurality of cell presence / absence flag sending circuits for sending a cell presence / absence flag provided corresponding to each of the cell buffer circuits;
A plurality of wait presence / absence flag sending circuits for sending a wait presence / absence flag provided corresponding to each of the cell buffer circuits;
A plurality of count initialization flag sending circuits for sending count initialization flags provided corresponding to each of the cell buffer circuits;
A wait memory for storing a wait value corresponding to each cell buffer circuit;
A count memory for storing a count value corresponding to each cell buffer circuit;
A cell output circuit;
Have
When a cell is received, the cell is written into the cell buffer circuit corresponding to the cell, the cell presence / absence flag sending circuit stores the presence / absence of cells in the corresponding cell buffer circuit, and the cell output circuit stores all cell presence / absence flags. The state of the wait presence flag and the count initialization flag is input, and there is a cell in the cell buffer circuit and there is a wait, or there is a cell in the cell buffer circuit and the count initialization flag is significant. For the buffer circuit, one cell buffer circuit is selected by round robin, a cell is output from the cell buffer circuit, and for each cell buffer circuit, a corresponding cell presence flag is displayed in the cell buffer circuit. If there is no weight or the weight flag indicates that there is no weight When all count initialization flags are significant and the count initialization flag corresponding to the cell buffer circuit is insignificant, the count value in the count memory corresponding to the cell to be output is decremented by 1, and the result of subtraction When 0 becomes 0, the wait flag is set to a state in which there is no wait, and if the count initialization flag corresponding to the cell buffer circuit is significant, the count value corresponding to the output cell is set to the wait in the wait memory. A weighted round-robin circuit characterized in that a value obtained by subtracting 1 from the weight value is used as a count value in a corresponding count memory, and a corresponding wait flag is set to a state where there is a weight.
複数のセルバッファ回路と、
前記セルバッファ回路それぞれに対応して設けられたセル有無フラグを送出する複数のセル有無フラグ送出回路と、
前記セルバッファ回路それぞれに対応して設けられたウエイト有無フラグを送出する複数のウエイト有無フラグ送出回路と、
前記セルバッファ回路それぞれに対応して設けられたカウント初期化フラグを送出する複数のカウント初期化フラグ送出回路と、
各セルバッファ回路に対応するウエイト値を記憶するウエイトメモリと、
各セルバッファ回路に対応するカウント値を記憶するカウントメモリと、
セル出力回路と、
を有し、
セルを受信するとそのセルに対応する前記セルバッファ回路にセルが書き込まれ、前記セル有無フラグ送出回路は対応する前記セルバッファ回路のセルの有無を記憶し、前記セル出力回路は全てのセル有無フラグ、ウエイト有無フラグ及びカウント初期化フラグの状態を入力し、前記セルバッファ回路内にセルがありかつウエイトがあるか、または前記セルバッファ回路内にセルがありかつカウント初期化フラグが有意の前記セルバッファ回路に対し、ラウンドロビンにより1つの前記セルバッファ回路を選択し、該セルバッファ回路からセルを出力し、また前記各セルバッファ回路全てについて、対応するセル有無フラグが前記セルバッファ回路内にセルが無いことを示しているか、またはウエイトフラグがウエイトが無いことを示している場合、全てのカウント初期化フラグを有意にし、前記セルバッファ回路に対応するカウント初期化フラグが無意の場合、出力するセルに対応する前記カウントメモリ内のカウント値を1加算し、加算した結果カウント値が対応する前記ウエイトメモリのウエイト値と等しくになったときは、ウエイトフラグをウエイトが無い状態にし、前記セルバッファ回路に対応するカウント初期化フラグが有意の場合、出力するセルに対応する前記カウントメモリ内のカウント値を0とし、0に1を加算した値を対応する前記カウントメモリのカウント値とし、また対応するウエイトフラグをウエイトがある状態にすることを特徴とするウエイテッドラウンドロビン回路。
A plurality of cell buffer circuits;
A plurality of cell presence / absence flag sending circuits for sending a cell presence / absence flag provided corresponding to each of the cell buffer circuits;
A plurality of wait presence / absence flag sending circuits for sending a wait presence / absence flag provided corresponding to each of the cell buffer circuits;
A plurality of count initialization flag sending circuits for sending count initialization flags provided corresponding to each of the cell buffer circuits;
A wait memory for storing a wait value corresponding to each cell buffer circuit;
A count memory for storing a count value corresponding to each cell buffer circuit;
A cell output circuit;
Have
When a cell is received, the cell is written into the cell buffer circuit corresponding to the cell, the cell presence / absence flag sending circuit stores the presence / absence of a cell in the corresponding cell buffer circuit, and the cell output circuit stores all the cell presence / absence flags. The state of the wait presence flag and the count initialization flag is input, and there is a cell in the cell buffer circuit and there is a wait, or there is a cell in the cell buffer circuit and the count initialization flag is significant. For the buffer circuit, one cell buffer circuit is selected by round robin, a cell is output from the cell buffer circuit, and for each of the cell buffer circuits, a corresponding cell presence / absence flag is stored in the cell buffer circuit. Indicates that there is no wait, or the wait flag indicates that there is no wait If all count initialization flags are significant, and the count initialization flag corresponding to the cell buffer circuit is insignificant, the count value in the count memory corresponding to the cell to be output is incremented by 1, and the result of the addition is counted. When the value becomes equal to the wait value of the corresponding wait memory, the wait flag is set to a state in which there is no wait, and if the count initialization flag corresponding to the cell buffer circuit is significant, the corresponding to the cell to be output A weighted round robin circuit characterized in that the count value in the count memory is set to 0, the value obtained by adding 1 to 0 is set to the count value of the corresponding count memory, and the corresponding wait flag is set to a wait state. .
JP8543199A 1999-03-29 1999-03-29 Weighted round robin circuit Expired - Fee Related JP3642698B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8543199A JP3642698B2 (en) 1999-03-29 1999-03-29 Weighted round robin circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8543199A JP3642698B2 (en) 1999-03-29 1999-03-29 Weighted round robin circuit

Publications (2)

Publication Number Publication Date
JP2000278272A JP2000278272A (en) 2000-10-06
JP3642698B2 true JP3642698B2 (en) 2005-04-27

Family

ID=13858667

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8543199A Expired - Fee Related JP3642698B2 (en) 1999-03-29 1999-03-29 Weighted round robin circuit

Country Status (1)

Country Link
JP (1) JP3642698B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6434155B1 (en) * 1999-12-22 2002-08-13 Alcatel Usa Sourcing, L.P. Weighted round robin engine used in scheduling the distribution of ATM cells
WO2007072538A1 (en) * 2005-12-19 2007-06-28 Fujitsu Limited Queue scheduling device, queue scheduling method and information relay device

Also Published As

Publication number Publication date
JP2000278272A (en) 2000-10-06

Similar Documents

Publication Publication Date Title
CA1240022A (en) Self-routing packets with stage address identifying fields
EP0378195B1 (en) Buffer device suitable for asynchronous transfer mode communication
CA2022798C (en) Communication switching element and method for transmitting variable length cells
US4885744A (en) Apparatus for reconstructing and multiplexing frames of various origins made up of a variable number of packets of fixed length
US5485453A (en) Method for handling redundant switching planes in packet switches and a packet switch for carrying out the method
US6307858B1 (en) ATM cell transmission system
JP3475900B2 (en) Arbitration method and arbiter circuit using the same
EP0603916A2 (en) Packet switching system using idle/busy status of output buffers
EP0569173A2 (en) High-speed packet switch
US4821258A (en) Crosspoint circuitry for data packet space division switches
JPS58501065A (en) Processing equipment for packet voice integrated exchange
US5841773A (en) ATM network switch with congestion level signaling for controlling cell buffers
US6728256B1 (en) Shared buffer control device
US6445706B1 (en) Method and device in telecommunications system
EP0621709B1 (en) Message communication system
WO1994018770A1 (en) A method for handling redundant switching planes in packet switches and a switch for carrying out the method
WO1998038760A2 (en) Data communication system utilizing a scalable, non-blocking, high bandwidth central memory controller and method
JP3642698B2 (en) Weighted round robin circuit
US6091728A (en) ATM switch core
SU858582A3 (en) Method and device for discrete signal transmission
EP0982898A1 (en) Switching apparatus comprising at least one switch core access element for the attachment of various protocol adapters
EP0089683B1 (en) Improvements relating to pcm switching units
US4002851A (en) Telecommunication system controlled by stored program instructions
EP0753951A2 (en) ATM switch address generating circuit
JP2869080B2 (en) Buffer control device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050118

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050125

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees