JP2003500709A - Packet classification state machine - Google Patents

Packet classification state machine

Info

Publication number
JP2003500709A
JP2003500709A JP2000619158A JP2000619158A JP2003500709A JP 2003500709 A JP2003500709 A JP 2003500709A JP 2000619158 A JP2000619158 A JP 2000619158A JP 2000619158 A JP2000619158 A JP 2000619158A JP 2003500709 A JP2003500709 A JP 2003500709A
Authority
JP
Japan
Prior art keywords
state
data
state machine
address
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000619158A
Other languages
Japanese (ja)
Inventor
フィリックス ジェー ウエルフィルド
Original Assignee
ソリダム システムズ コーポレーション
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
Priority claimed from US09/313,183 external-priority patent/US6424934B2/en
Priority claimed from US09/313,182 external-priority patent/US6349405B1/en
Application filed by ソリダム システムズ コーポレーション filed Critical ソリダム システムズ コーポレーション
Publication of JP2003500709A publication Critical patent/JP2003500709A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4498Finite state machines

Abstract

(57)【要約】 状態マシンのオペレーションを中断することなくパケット分類状態マシン内における分類データを再プログラミングする方法が開示されている。分類ツリー内の分類ツリーの開始ノードからの複数の新しいノードに関係付けされたデータがストアされ、その結果、現存するデータ構造内の続くノードが正確に示される。このデータがストアされた後は、あらかじめ決定済みのロケーションに新しい第1のノード・アドレスがストアされる。それにより、その後に続く状態マシンの実行が、新しいノードにおいて開始する。好ましくは、新しい第1のノード・アドレスが、ストア・オペレーションの間に第1のノード・アドレスの読み出しが可能とならないように、原子性のオペレーションを用いてストアされる。この方法は、現存するデータの上書きを伴わないことから、複数の状態マシンによる同一分類データ・メモリの同時的な使用を可能にする。 SUMMARY A method is disclosed for reprogramming classification data in a packet classification state machine without interrupting operation of the state machine. Data associated with a plurality of new nodes from the start node of the classification tree in the classification tree is stored, so that subsequent nodes in the existing data structure are pinpointed. After this data is stored, a new first node address is stored at a predetermined location. Thereby, the execution of the subsequent state machine starts at the new node. Preferably, the new first node address is stored using an atomic operation such that reading of the first node address during a store operation is not enabled. This method allows the simultaneous use of the same classified data memory by multiple state machines since it does not involve overwriting existing data.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】 (技術分野) 本発明は、プログラマブル状態マシンに関し、より詳細を述べれば、高速通信
において使用するためのプログラマブル・パケット分類状態マシンに関する。
TECHNICAL FIELD The present invention relates to programmable state machines, and more particularly to programmable packet classification state machines for use in high speed communications.

【0002】 (発明の背景) 過去においては、プログラマブル状態マシンは手順向きプログラミングを伴っ
て提供されていた。これは、望まれるシーケンスに従ってある条件の下に、1つ
の状態から別の状態に移行することを可能にする。状態マシンが、プロセッシン
グ・ステップのシーケンスを有効にコントロールすることから、状態マシンに関
して真の意味で非手順向きプログラミング方法のコンセプトは、それと両立しな
いように思われる。このため、状態マシンをプログラムするための多くの「非手
順向き」方法が提案されてきた。それにも拘わらず、分析を行うと、これらは手
順向き、もしくはどちらかと言えば手順向きであることがわかった。これらの方
法においては、ブランチおよびループのコンセプトが共通しており、オペレーシ
ョンのフローチャートが明白であることも少なくない。
BACKGROUND OF THE INVENTION In the past, programmable state machines have been provided with procedural oriented programming. This allows transitioning from one state to another under certain conditions according to the desired sequence. Since the state machine effectively controls the sequence of processing steps, the concept of a truly non-procedural programming method for state machines seems to be incompatible with it. For this reason, many "non-procedural" methods for programming state machines have been proposed. Nevertheless, the analysis revealed that they were procedural, or rather procedural. In these methods, the concept of branch and loop is common, and the operation flowchart is often clear.

【0003】 これまでのところ、状態マシンの手順向きという特性から、状態マシンをプロ
グラミングする非手順向き方法は、ほとんど利点がないと考えられてきた。状態
マシンをプログラミングする「非手順向き」方法のいくつかは、プログラミング
・コードの再利用およびコードのモジュール方式に焦点が当てられている。つま
り、各状態内における手順向きエレメントが容認されているだけでなく、ある意
味でそれが本質的であると見られている。しかしながら異なる状態は、一般に容
易に再利用されるか、あるいは全体として分類記述に整理される。
To date, nonprocedurally oriented methods of programming state machines have been considered to have little benefit due to the procedurally oriented nature of state machines. Some of the "non-procedural" methods of programming state machines focus on programming code reuse and code modularity. That is, not only is the procedural element within each state accepted, but in some sense it is considered essential. However, the different states are generally easily reused or organized into classification descriptions as a whole.

【0004】 状態マシンのプログラミング時においては、プログラマブル状態マシンを履行
するための真に非手順向き方法のコンセプトを考慮することが重要になる。その
後、状態マシンの記述が非手順向きであることから、状態フローを考慮すること
なく状態マシン・プログラミングに対して変更が加えられる。さらに、状態マシ
ンの履行は、コンパイラによって実行され、状態マシンの設計者もしくは、より
重要なことであるが、エンド・ユーザによる重要な設計を必要としない。
When programming a state machine, it is important to consider the concept of a truly non-procedural oriented method for implementing a programmable state machine. Then, because the state machine description is non-procedural, changes are made to the state machine programming without considering the state flow. Furthermore, the implementation of the state machine is performed by the compiler, and, more importantly, the state machine designer, does not require significant design by the end user.

【0005】 手順向きプログラミングを有する状態マシンの再プログラミングは、簡単なタ
スクであると考えられる。状態マシンの実行を休止し、新しいプログラミングを
プログラム・メモリにロードした後、状態マシンを再スタートする。状態マシン
を休止するプロセスは、データ・フローの停止を必然的に伴うことが少なくない
が、これは望ましくない。ファイヤウォールもしくはその他のセキュリティ・ア
プリケーションにおける使用については、プログラミング内の変更が、しばしば
セキュリティ手順における変更の結果として生じる。そのため、可能な限り迅速
に変更がロードされることが重要になる。当然のことながら、当業者にとっては
明白であろうが、再プログラミングの間にシステムをシャットダウンすることは
、しばしば実際的でなく、そのためシステムの再プログラミングが特定の時間に
限って行なわれることも少なくない。これは、利便性に欠ける。
Reprogramming a state machine with procedural programming is considered a simple task. Pauses the state machine from execution, loads the new programming into program memory, and then restarts the state machine. The process of quiescing a state machine often entails stopping data flow, which is undesirable. For use in firewalls or other security applications, changes in programming often result from changes in security procedures. Therefore, it is important that changes are loaded as quickly as possible. Of course, as would be apparent to one of ordinary skill in the art, shutting down the system during reprogramming is often impractical, and thus system reprogramming is rarely performed at specific times. Absent. This lacks convenience.

【0006】 複数の状態マシンが共通のプログラム・メモリを共有しているときには、プロ
グラマブル状態マシンに関する現在の再プログラミング・テクニックに伴って別
の問題が生じる。いずれかの状態マシンに関してプログラミングのアップグレー
ドを行う場合に、すべての状態マシンが休止される。これは重要な問題であるが
、再プログラミング・オペレーションの間において、その状態マシンを除いたほ
かのすべての状態マシンの動作を確保する複製のプログラム・メモリを用いるこ
とによってその回避が可能である。この問題を回避するもう1つの方法は、各状
態マシンに、それ専用の状態マシン・メモリを備えることである。
Another problem arises with current reprogramming techniques for programmable state machines when multiple state machines share a common program memory. When doing a programming upgrade on any state machine, all state machines are quiesced. This is an important problem, but it can be avoided by using a duplicate program memory that ensures the operation of all but the state machine during the reprogramming operation. Another way to avoid this problem is to provide each state machine with its own dedicated state machine memory.

【0007】 高速状態マシン設計におけるリサーチの現在の分野は、ディジタル通信の分野
である。一般に、ディジタル通信ネットワークにおいて、データは、パケット、
セル、フレーム、バッファ等にグループ化される。パケット、セル等は、データ
および分類情報を含む。パケット、セル等の分類は、データ通信におけるルーテ
ィングならびに適正な応答にとって重要である。このタイプのデータの分類に対
する1つのアプローチにおいては、状態マシンが使用される。
The current field of research in fast state machine design is that of digital communications. Generally, in a digital communication network, data is a packet,
Grouped into cells, frames, buffers, etc. Packets, cells, etc. contain data and classification information. Classification of packets, cells, etc. is important for routing and proper response in data communication. In one approach to classifying this type of data, a state machine is used.

【0008】 ギガビット・イーサネット(登録商標)の場合、アドレッシングおよびルーテ ィング情報をはじめプロトコル関連情報を決定するために、状態マシンが非常な 高速で動作してデータを処理することが不可欠になる。不都合なことに、こうい った速い速度においては、メモリ・アクセスが、状態マシンもしくはそのほかの タイプのリアルタイム・データ・プロセッサの履行時の無視できないボトルネッ クとなる。これに推されて研究者は、分類パフォーマンスを向上させる革新的な ソリューションを探っている。わかりきったソリューションは、分類状態マシン を完全なハードウエアとして履行することである。非プログラマブル・ハードウ エア状態マシンは、卓越したパフォーマンスを有し、したがってこの種の高いデ ータ・レートと良好な適合性を有することが知られている;しかしながら、通信 プロトコルの履行は、本質的にその特性においてまったく柔軟である。今日の一 般のプロトコルは、数ヶ月で陳腐化する。したがって、ギガビット・イーサネッ トに使用する状態マシンは、プログラマブルであった方が好ましい。過去におい ては、プログラマビリティに適応するために、10メガビットおよび100メガ ビットのイーサネット・データ・ネットワークに関するソリューションが、1つ の状態当たり多数のメモリ・アクセス・インストラクションを必要とした。これ は、従来技術の状態マシンの動作速度を実質的に制限することになる。[0008]   Addressing and routing for Gigabit Ethernet State machine to determine the protocol-related information, including the routing information. It is essential to operate at high speed to process data. Unfortunately, this is At very high speeds, memory access can be a state machine or other Type real-time data processor implementation of non-negligible bottleneck It becomes ku. Inspired by this, researchers are pioneers in improving classification performance. Seeking a solution. The obvious solution is the classification state machine Is implemented as complete hardware. Non-programmable hardware Air condition machines have excellent performance and are therefore of the highest design. Data rate is known to have good compatibility; however, communication The implementation of the protocol is inherently quite flexible in its nature. Today's one Common protocols are obsolete within a few months. Therefore, Gigabit Ethernet It is preferable that the state machine used for programming be programmable. In the past For 10 megabits and 100 megabytes to accommodate programmability One solution for Bit's Ethernet data networks Required a large number of memory access instructions per state. this Would substantially limit the speed of operation of prior art state machines.

【0009】 データ分類のためのプログラマブル状態マシンは、完全にソフトウエアにおい
て履行することができる。当然のことながら、ソフトウエア状態マシンは、ハー
ドウエアの等価物に比べるとはるかに遅いことも少なくない。ソフトウエア状態
マシンにおいては、各オペレーションがソフトウエア・インストラクションによ
って実行され、状態変化はブランチ・オペレーションに帰着する。当業者であれ
ば明らかであろうが、パケット分類に関して高速状態マシンのソフトウエアにお
ける履行には、1秒当たり多数の−多くは10億を超える−インストラクション
を必要とし、高価な並列プロセッサを必要とするか、あるいは現時点では未知の
テクノロジーを必要とすることになる。実際、パフォーマンスに対する厳しい制
限は、メモリ・デバイスの速度である。たとえば、7ナノ秒のメモリ・デバイス
が使用される場合を考えると、ギガビット・イーサネット・ストリームの各ビッ
トについて、1つのメモリ・デバイス当たりに可能となるメモリ・アクセスは、
1回にも満たない。つまり、データの各バイト−すなわち8ビット−が単一の状
態において処理されるとすれば、各状態の間に許されるメモリ・アクセス・オペ
レーションは、1回だけになる。この種のシステムを純粋なソフトウエア・ソリ
ューションとして履行することは、実際的ではなく、また好ましくもない。
The programmable state machine for data classification can be implemented entirely in software. Of course, software state machines are often much slower than their hardware equivalents. In the software state machine, each operation is executed by a software instruction and the state change results in a branch operation. As will be apparent to those skilled in the art, implementations in software of fast state machines with respect to packet classification require a large number-often more than a billion-instructions per second-and expensive parallel processors. Or will require technology that is unknown at this time. In fact, the hard limit on performance is the speed of the memory device. For example, if a 7 nanosecond memory device is used, then for each bit of the Gigabit Ethernet stream, the memory access possible per memory device is:
Less than once. That is, if each byte of data-or 8 bits-is processed in a single state, only one memory access operation is allowed during each state. Implementing this type of system as a pure software solution is neither practical nor desirable.

【0010】 現在の技術の集積メモリ・デバイスは、タイミングおよびその他のファクタを
考慮した場合、1メモリ・アクセス当たり7ナノ秒台のパフォーマンスを達成し
ている。それゆえ、イーサネット・データ・ストリーム内の各8ビットについて
、メモリ・アクセスが1回に限り求められるとすれば、ギガビット・イーサネッ
ト・パケットの分類を履行するに充分な高速状態マシンの純粋なハードウエア履
行は可能である。その種の状態マシンの従来技術における履行は、ブランチ・ア
ルゴリズムを使用してあらかじめ決定済みのビット数の時間フレーム内における
状態遷移を可能にしている。ブランチ・アルゴリズムのためのアドレス・データ
は、プログラム・メモリ内にストアされている。ここで、あらかじめ決定済みの
ビット数を8とすれば、各状態遷移は、8ナノ秒内に生じる。このパフォーマン
スを達成する1つの方法は、各可能性のある状態ごとに256のエントリを有す
るデータのテーブルをストアする方法である。このテーブルのアドレスはそこで
データ・ストリームからの8ビットと結合し、次の状態アドレスを決定する。こ
れを、分類を示す値もしくは分類の失敗を示す値に到達するまで継続する。
Current state of the art integrated memory devices have achieved performance on the order of 7 nanoseconds per memory access, when considering timing and other factors. Therefore, for each 8-bit in the Ethernet data stream, if only one memory access is required, pure hardware of a fast state machine sufficient to implement the classification of Gigabit Ethernet packets. Fulfillment is possible. Prior art implementations of such state machines allow state transitions within a time frame of a predetermined number of bits using a branch algorithm. Address data for the branch algorithm is stored in program memory. Here, assuming that the predetermined number of bits is 8, each state transition occurs within 8 nanoseconds. One way to achieve this performance is to store a table of data with 256 entries for each possible state. The address of this table is then combined with the 8 bits from the data stream to determine the next state address. This is continued until the value indicating the classification or the value indicating the classification failure is reached.

【0011】 不都合なことに、上述したようなシステムを履行するために必要なメモリの量
は、極端に多い。たとえば、一度に8ビットを使用することは、1つのテーブル
当たり最大で256のエントリを、一度に16ビットの使用であれば、65,5
36のエントリが必要になる。ただし正確なテーブルの数は、端末サイトの数に
依存する。高いストレージ容量を有する集積化メモリが使用できないことから、
集積化メモリ内に多数のエッジを有する従来技術のプログラマブル・パケット分
類状態マシンの履行は、現在のところ実現可能でない。
Unfortunately, the amount of memory required to implement a system as described above is extremely large. For example, using 8 bits at a time would mean a maximum of 256 entries per table, and 65,5 if using 16 bits at a time.
36 entries are required. However, the exact number of tables depends on the number of terminal sites. Since integrated memory with high storage capacity cannot be used,
Implementation of prior art programmable packet classification state machines with multiple edges in integrated memory is not currently feasible.

【0012】 非手順向き方法に従って状態マシンの再プログラミングが実行される高速デー
タ通信のパケット分類に使用するためのプログラマブル・ハードウエア状態マシ
ンが、有利であろうということがわかってきた。
It has been found that a programmable hardware state machine for use in packet classification of high speed data communication in which reprogramming of the state machine is performed according to a non-procedural approach has been found to be advantageous.

【0013】 また、同一のプログラム・メモリを使用する複数の状態マシンの動作の間にお
ける、状態マシンのプログラミングの容易な修正を可能にする、状態マシンプロ
グラミング方法を提供することにも利点がある。
It would also be advantageous to provide a state machine programming method that allows for easy modification of state machine programming during the operation of multiple state machines that use the same program memory.

【0014】 (発明の目的) 従来技術の有する上記の、またそのほかの制限を克服するために、本発明は、
複数の状態マシンを同時にサポートするための状態マシン・アーキテクチャを提
供することを1つの目的とする。
OBJECTS OF THE INVENTION To overcome the above and other limitations of the prior art, the present invention provides
One object is to provide a state machine architecture for simultaneously supporting multiple state machines.

【0015】 さらに本発明は、状態マシンのオペレーションの分裂を必要とすることなく、
状態マシンのプログラム・メモリを再プログラミングする方法を提供することを
もう1つの目的とする。
Furthermore, the present invention requires no disruption of the operation of the state machine,
It is another object to provide a method for reprogramming the state machine program memory.

【0016】 (発明の開示) 本発明によれば、第1の状態アドレスのストレージ・ロケーションを含む複数
のストレージ・ロケーションを包含する状態マシン・メモリをプログラムする方
法が提供され、当該方法は、 新しい状態のそれぞれに対応するデータであって、1つの新しい第1の状態を
含めて、新しい状態のそれぞれに先行するすべての状態に対応するデータを含む
データを提供するステップ; データをプログラム・メモリ内にストアするステップであって、新しい状態の
それぞれに関係するデータが、当該新しい状態に関する状態アドレスにストアさ
れ、かつデータは、占有されていないストレージ・ロケーション内にストアされ
るものとするステップ; 新しい第1の状態に関係するデータを、新しい第1の状態アドレスにストアす
るステップであって、データは、カレント状態マシンのプログラミングによって
占有されていないストレージ・ロケーション内にストアされるものとするステッ
プ;および、 新しい状態のそれぞれに対応するデータがストアされた後、第1の状態アドレ
ス・ロケーション内のデータを新しい第1の状態アドレスに置き換えるステップ
; を包含する。
SUMMARY OF THE INVENTION In accordance with the present invention, there is provided a method of programming a state machine memory that includes a plurality of storage locations including a storage location of a first state address, the method comprising: Providing data corresponding to each of the states including data corresponding to all states preceding each of the new states including one new first state; the data in program memory Storing the data associated with each new state at a state address for the new state and storing the data in an unoccupied storage location; Data related to the first state is moved to the new first state address. A step in which the data is stored in a storage location that is not occupied by programming of the current state machine; and after the data corresponding to each new state is stored, Replacing the data in the one state address location with a new first state address.

【0017】 本発明の別の実施態様においては、状態マシンのプログラミングが状態マシン
の実行間に行なわれ、しかも状態マシンのプログラミングが状態マシンの実行の
中断を伴うことなく行なわれる。これを達成するためには、第1の状態アドレス
・ロケーションを任意時に読み出し可能とし、適正なデータの結果を返す。これ
を達成する方法においては、第1の状態アドレス・ロケーション内にデータを原
子的にストアする。別の方法は、一方をアクティブ・レジスタ、他方を非アクテ
ィブ・レジスタとして第1の状態アドレス用に2つのレジスタを用意し、非アク
ティブ・レジスタのアクティブ化を原子的に行う。
In another embodiment of the present invention, the programming of the state machine is performed during the execution of the state machine, and the programming of the state machine is performed without interrupting the execution of the state machine. To accomplish this, the first state address location can be read at any time and returns a valid data result. A method of achieving this is to atomically store the data in the first state address location. Another method provides two registers for the first state address, one active register and the other inactive register, and atomically activates the inactive register.

【0018】 一実施態様においては、状態マシン・メモリが複数の状態マシンによる同時的
な使用に供される。この実施態様によれば、複数の状態マシンのそれぞれのプロ
グラミングを同一のプログラミングまたは一部の状態マシンのプログラミングを
異なるプログラミングとする選択肢がある。これには、複数の状態マシンのうち
の1つの状態マシンのプログラミングが、複数の状態マシンの実行間に、複数の
状態マシンのうちの、ほかのいずれの状態マシンの実行も中断することなく行な
われるオプション;複数の状態マシンのうちの1つの状態マシンのプログラミン
グが、複数の状態マシンの実行間に、複数の状態マシンのうちの、いずれの状態
マシンの実行も中断することなく行なわれるオプション;および/または複数の
状態マシンのうちの別の状態マシンに関係するデータが変更されずに残される、
複数の状態マシンのうちの1つの状態マシンをプログラミングするオプションが
ある。
In one embodiment, the state machine memory is provided for simultaneous use by multiple state machines. According to this embodiment, there is the option of programming each of the state machines to be the same programming or to program some state machines differently. This involves programming of one of the state machines without interrupting the execution of any of the other state machines between executions of the state machines. An option for programming a state machine of the plurality of state machines without interrupting execution of any state machine of the plurality of state machines during execution of the plurality of state machines; And / or data related to another state machine of the plurality of state machines is left unchanged.
There is an option to program one of the state machines.

【0019】 本発明によれば、複数のロケーションおよび第1の状態アドレスのストレージ
・ロケーションを包含する状態マシン・メモリをプログラムする方法も提供され
、当該方法は、 コンピュータ上にカレント状態マシン・メモリのイメージを提供するステップ
; 状態マシンのプログラミングを変更するステップ; カレント状態マシン内における修正された状態を決定するステップ; 1つの新しい第1の状態を含めて、前記修正された状態に先行する状態を決定
するステップ; カレント状態マシン・メモリ内の占有されていないメモリ・ロケーションを決
定するステップ; カレント状態マシン・メモリ内の占有されていないメモリ・ロケーション内に
記憶し、再プログラミング・データを形成するために、修正された状態および前
記修正された状態に先行する状態をコンパイルするステップ; 再プログラミング・データを、カレント状態マシン・メモリの占有されていな
いメモリ・ロケーション内にストアするステップ; 再プログラミング・データがストアされた後、前記第1の状態アドレス・ロケ
ーション内のデータを新しい第1の状態アドレスに置き換えるステップ;および
、 カレント状態マシンのイメージを更新するステップ; を包含する。
According to the present invention, there is also provided a method of programming a state machine memory that includes a plurality of locations and a storage location of a first state address, the method comprising: Providing an image; modifying the programming of the state machine; determining a modified state in the current state machine; including states that precede the modified state, including one new first state. Determining an unoccupied memory location in current state machine memory; storing in an unoccupied memory location in current state machine memory to form reprogramming data To the modified condition and Compiling a state preceding the modified state; storing reprogramming data in an unoccupied memory location of the current state machine memory; and after said reprogramming data is stored, said first Replacing the data in the one state address location with a new first state address; and updating the image of the current state machine.

【0020】 この方法の実施態様は、さらに: 占有されていないメモリの量を決定するステップ; 再プログラミング・データが占有されていないメモリ内に収まるか否かを決定
するステップ;および、 再プログラミング・データが占有されていないメモリ内に収まらないとき、修
正された状態の一部およびそれに先行する状態をコンパイルして新しい再プログ
ラミング・データを形成し、前記再プログラミング・データをこの新しい再プロ
グラミング・データに置き換えるステップ; を包含する。
Embodiments of the method further include: determining an amount of unoccupied memory; determining whether reprogramming data fits in unoccupied memory; and reprogramming. When the data does not fit in unoccupied memory, the portion of the modified state and the states preceding it are compiled to form new reprogramming data, and the reprogramming data is converted to the new reprogramming data. Replacing with.

【0021】 好ましくは、プログラム・メモリは、状態マシンによって読み出しだけが行な
われる。これは、プログラム・メモリの外側のメモリ内にカレント状態アドレス
をストアすることによって達成される。その種の実施態様においては、再プログ
ラミングを行うリプログラマのみがプログラム・メモリにデータを書き込む。こ
れは、複数の状態マシンが同一のメモリから動作しているとき、それぞれの状態
マシンに対して状態マシンのデータの完全性が保証されることから有用である。
Preferably, the program memory is only read by the state machine. This is accomplished by storing the current state address in memory outside program memory. In such an embodiment, only the reprogramming reprogrammer writes the data to program memory. This is useful because when multiple state machines are operating from the same memory, the state machine's data integrity is guaranteed for each state machine.

【0022】 本発明の別の側面によれば、複数の状態マシンによる同時的な使用のための再
プログラミング可能状態マシンのメモリが提供され、それにおいて再プログラミ
ング可能状態マシンのメモリは: 各状態マシン内の状態に関係するデータをストアするためのプログラム・メモ
リであって、各状態に関するデータは、状態アドレスにストアされるものとする
プログラム・メモリ; 複数の初期状態アドレス・メモリ・ロケーションであって、それぞれは、複数
の状態マシンのうちの1つの状態マシンの第1の状態アドレスをストアするため
の初期状態アドレス・メモリ・ロケーションである、複数の初期状態アドレス・
メモリ・ロケーション; プログラム・メモリ内にデータをストアするための手段であって、それぞれの
新しい状態に関係するデータが当該新しい状態に関する状態アドレスにストアさ
れ、新しい第1の状態に関係するデータが新しい第1の状態アドレスにストアさ
れ、かつデータは、複数の状態マシンのいずれによっても占有されていないスト
レージ・ロケーション内にストアされるものとする手段;および、 それぞれの新しい状態に対応するデータがストアされた後、第1の状態アドレ
ス・ロケーション内のデータを新しい第1の状態アドレスに置き換えるための手
段; を包含する。
According to another aspect of the invention, there is provided a memory of a reprogrammable state machine for simultaneous use by multiple state machines, wherein the memory of the reprogrammable state machine is: A program memory for storing data relating to states within a program memory, wherein data for each state is to be stored at a state address; a plurality of initial state address memory locations; , Each of which is an initial state address memory location for storing a first state address of one of the state machines.
Memory location; a means for storing data in program memory, wherein the data associated with each new state is stored at a state address for the new state, and the data associated with the new first state is new. Means for storing the data at a first state address and storing the data in a storage location not occupied by any of a plurality of state machines; and storing the data corresponding to each new state. Means for replacing the data in the first state address location with the new first state address after being deleted.

【0023】 好ましくは、複数の初期状態アドレス・メモリ・ロケーションを複数のレジス
タとし、複数の状態マシンに含まれる各状態マシンに1つのレジスタを割り当て
る。
Preferably, the plurality of initial state address memory locations are a plurality of registers, and one register is assigned to each state machine included in the plurality of state machines.

【0024】 本発明によれば、データ・ストリームからのデータを分類するためのパケット
分類状態マシンが提供される。この状態マシンは: a)状態マシン内の状態に関係する情報をストアするためのプログラマブル・
メモリであって、その状態は、第1のグループの状態および第2のグループの状
態を含み、第1のグループの状態は、それぞれテーブル・アドレスにおけるデー
タのテーブルによって表され、かつテーブル・アドレスからのオフセットにおい
てアドレス可能な第1の複数のテーブル要素を含み、テーブル要素のそれぞれは
、状態マシン内の次の状態を示すものとし、かつ 第2のグループの状態は、それぞれ、1つのテーブル要素を含み、第1のグル
ープの状態のうちの1つの状態を表すデータのテーブルより少ないメモリを占有
するデータのテーブルによって表されものとするプログラマブル・メモリ;およ
び、 b)テーブル・アドレスからのオフセットにおける現在の状態のテーブル要素
の内容に基づいて次の状態を決定するためのプロセッサであって、オフセットは
、データ・ストリーム内のビットに依存してインストラクション・サイクルのテ
ーブル・アドレス・ロード部分の間に決定されるものとし、さらに決定に従って
状態マシンを次の状態に切り替えるためのプロセッサ; を包含する。
According to the present invention, a packet classification state machine for classifying data from a data stream is provided. This state machine is: a) A programmable program for storing information related to states in the state machine.
A memory, the state of which includes a first group of states and a second group of states, each of the first group of states being represented by a table of data at a table address, and from the table address. A first plurality of table elements addressable at offsets, each of the table elements indicating the next state in the state machine, and the second group of states each including one table element. Programmable memory comprising, and represented by a table of data occupying less memory than a table of data representing one of the states of the first group; and b) current at offset from table address. For determining the next state based on the contents of the state table element The offset shall be determined during the table address load part of the instruction cycle depending on the bits in the data stream, and in order to switch the state machine to the next state accordingly. The processor of.

【0025】 本発明のさらに別の実施態様によれば、データ・ストリームからのデータを分
類するためのパケット分類状態マシンが提供される。この状態マシンは: a)状態マシン内の状態に関係する情報をストアするためのプログラマブル・
メモリであって、その状態が、3つのグループの状態、すなわち: それぞれが、テーブル・アドレスからのオフセットにおいてアドレス可能な2 個のテーブル要素を含むデータのテーブルによって表される第1のグループの
状態であって、テーブル要素は、状態マシン内の次の状態を示し、nは、オフセ
ットを決定するためのデータ・ストリーム内のビット数とする第1のグループの
状態; それぞれが、第1のグループの状態のテーブル要素のサイズより小さいサイズ
を有する2個のテーブル要素を含むデータのテーブルによって表される第2の
グループの状態であって、テーブル要素は、テーブル・アドレスからのオフセッ
トにおいてアドレス可能であり、テーブル要素は、状態マシン内の次の状態を示
し、nは、オフセットを決定するためのデータ・ストリーム内のビット数とする
第2のグループの状態;および、 それぞれが単一の可能性のある次の状態を示すデータによって表される第3の
グループの状態;を含むものとするプログラマブル・メモリ;および、 c)第1のグループのテーブル・アドレスに関して、カレント状態アドレスお
よびデータ・ストリームからの複数のビットをともにストアしてアドレスを形成
し、第2のグループのテーブル・アドレスに関して、カレント状態アドレスおよ
びデータ・ストリームからの複数のビットをともにストアしてアドレスを形成し
、かつ第3のグループのテーブル・アドレスに関して、カレント状態アドレスを
ストアするプロセッサであって;プログラマブル・メモリ内のそのアドレスから
オペレーションを検索し、それにおいて当該オペレーションは、次の状態アドレ
スに関係するデータを含むジャンプ・オペレーションを包含し;オペレーション
内の情報の1つに基づいて次の状態を決定し;かつ、状態マシンを次の状態に切
り替えるプロセッサ; を包含し、それにおいては、プログラマブル・メモリから情報を検索するただ
1つのオペレーションが、連続する状態遷移の間に実行される。
[0025]   According to yet another embodiment of the invention, the data from the data stream is separated.
A packet classification state machine for similar purposes is provided. This state machine is:   a) Programmable to store state related information in the state machine
A memory whose states are in three groups:   2 addressable at each offset from the table address n Of the first group represented by a table of data containing
State, the table element indicates the next state in the state machine, n is the offset
The number of bits in the data stream to determine
Status;   Each is smaller than the size of the table element in the state of the first group
Having 2nA second table represented by a table of data containing a number of table elements
In the group state, the table element is offset from the table address.
Addressable in the state machine and the table element indicates the next state in the state machine.
Where n is the number of bits in the data stream to determine the offset
Status of the second group; and   A third, each represented by data showing a single possible next state
Programmable memory, which includes the state of the group; and   c) Regarding the table address of the first group, the current state address and
And multiple bits from the data stream are stored together to form an address
The table address of the second group, the current state address and
And multiple bits from the data stream are stored together to form an address.
, And the table address of the third group, the current state address
A processor for storing; from its address in programmable memory
Retrieves the operation, where it is the next state address.
Includes jump operations containing data related to
Determines the next state based on one of the information in; and switches the state machine to the next state.
Processor to replace;   , In which it only retrieves information from programmable memory
An operation is executed during successive state transitions.

【0026】 本発明のさらに別の側面によれば、データ・ストリームからのデータを分類す
るためのパケット分類の方法が提供される。この方法は: a)状態マシン内の状態に関係する情報を包含する分類データを提供するステ
ップであって、当該状態は、第1のグループの状態および第2のグループの状態
を含み、第1のグループの状態は、それぞれ、テーブル・アドレスにおいて、そ
のテーブル・アドレスからのオフセットにおいてアドレス可能な第1の複数のテ
ーブル要素を含むデータのテーブルにより表され、それにおいてテーブル要素の
それぞれは、状態マシン内の次の状態を示すものとし、かつ第2のグループの状
態は、それぞれ、1つのテーブル要素を含み、第1のグループの状態のうちの1
つの状態を表すデータのテーブルより少ないメモリを占有するデータのテーブル
によって表されものとするステップ; b)カレント状態のテーブル・アドレスを準備するステップ; c)テーブル要素を選択するステップであって、テーブル要素は、テーブル・
アドレス、テーブルの内容、およびデータ・ストリーム内の複数のビットに基づ
くオフセットに依存して選択されるものとするステップ; d)現在の状態の、選択したテーブル要素の内容に基づいて状態マシンの次の
状態を決定するステップ;および、 e)決定に従って状態マシンを次の状態に切り替えるステップ; を包含する。
According to yet another aspect of the invention, there is provided a method of packet classification for classifying data from a data stream. The method comprises: a) providing classification data containing information relating to states in a state machine, the states including a first group of states and a second group of states, and Each of the states of the group of is represented by a table of data that includes a first plurality of table elements addressable at a table address at an offset from the table address, where each of the table elements is a state machine. The second group of states, and each of the states of the second group includes one table element and is one of the states of the first group.
Shall be represented by a table of data occupying less memory than a table of data representing one state; b) preparing a table address of the current state; c) selecting a table element, the table The element is a table
Shall be selected depending on the address, the contents of the table, and the offset based on multiple bits in the data stream; d) the next state machine based on the contents of the selected table element in the current state. And e) switching the state machine to the next state according to the determination.

【0027】 (発明の詳細な説明) 本件明細書において使用される、データ・パケットという用語は、バッファ、
フレーム、セル、パケット、そのほかデータ通信において使用される類似概念を
包含するものとする。基本的にデータ・パケットは、あらかじめ決定された分類
に従って分類可能なデータのグルーピングである。分類は、一般に、通信標準を
監督する標準化組織によって体系化されている。
DETAILED DESCRIPTION OF THE INVENTION As used herein, the term data packet refers to a buffer,
It includes frames, cells, packets, and similar concepts used in data communications. A data packet is basically a grouping of data that can be classified according to a predetermined classification. The taxonomy is generally codified by a standards body that oversees communication standards.

【0028】 図面に示されている状態図において、矩形によって表されている状態は、端末
状態である。端末状態以外は三角形を用いて表されている。
In the state diagram shown in the drawings, the state represented by the rectangle is the terminal state. Other than the terminal state, it is represented by using a triangle.

【0029】 図1aを参照すると、1データ・サイクル当たり単一のデータ・アクセス・オ
ペレーションをサポートする状態マシンに関する簡略化した状態図が示されてい
る。それぞれの状態は、状態アドレスにおけるルックアップ・テーブルの形式で
ある。状態は、それぞれが別の状態に向かうラインとして示された4つの状態遷
移を有するブロックとして表されている。場合によっては、いくつかの状態遷移
が同じ次の状態を導く。あらかじめ決定済みの数のビット(図1aの簡略化した
状態図においては2)がアドレスの最下位ビットにロードされ、新しく形成され
たアドレスからデータが読み出される。データが別の状態アドレスからなる場合
には、データ・ストリームから次のあらかじめ決定済みの数のビットがアドレス
の最下位ビットにロードされる。それに該当しないときは、フィルタリングある
いはパケット分類等のアクションが実行される。
Referring to FIG. 1 a, there is shown a simplified state diagram for a state machine supporting a single data access operation per data cycle. Each state is in the form of a look-up table at the state address. States are represented as blocks with four state transitions, each shown as a line to another state. In some cases, some state transitions lead to the same next state. A predetermined number of bits (2 in the simplified state diagram of Figure 1a) are loaded into the least significant bits of the address and data is read from the newly formed address. If the data consists of another state address, the next predetermined number of bits from the data stream are loaded into the least significant bit of the address. If not, an action such as filtering or packet classification is executed.

【0030】 一般に、その種の状態マシンを再プログラムするために、状態マシンの動作を
中断する必要があり、その結果、望ましくない「ダウンタイム」が招かれる。新
しいプログラミングは、状態マシンのメモリ内にストアされ、その後、状態マシ
ンの実行が継続される。不都合なことには、フィルタリングまたは分類が無効な
場合にデータ・フローが停止しない。上記を考慮すると、単一状態マシンのプロ
セッシング・ケイパビリティの割り込みが否定的な意味合いを持つことは明らか
である。したがって、状態マシンのオペレーションを中断することなく状態マシ
ンを再プログラミングする方法が望まれている。
In order to reprogram such a state machine, it is generally necessary to interrupt the operation of the state machine, resulting in undesirable “downtime”. The new programming is stored in the state machine's memory, after which the state machine continues to run. Unfortunately, the data flow does not stop if filtering or classification is disabled. Given the above, it is clear that interrupting the processing capabilities of a single state machine has negative implications. Therefore, a method of reprogramming a state machine without interrupting the operation of the state machine is desired.

【0031】 たとえば、この種のプログラマブル状態マシンがハードウエアにおいて履行さ
れる場合、ブロック1のアドレスが固定される。通常、このアドレスはゼロにな
る。当然のことながら、別の固定アドレスも可能である。単一のブロックに、た
とえば「1」を書き込むことが、しばしば、いくつかのロケーションのそれぞれ
にデータをストアすることを必要とし、それによって単一クロック・サイクルを
超える数のクロック・サイクルが必要となることから、ブロックが部分的に再プ
ログラムされるとき、再プログラミングの間時間がある。ブロックが部分的にプ
ログラムされている間に、状態マシンがそのブロックに到達すると不確定な結果
が導かれることがある。これは望ましいことではない。
For example, if a programmable state machine of this kind is implemented in hardware, the address of block 1 will be fixed. Normally this address will be zero. Of course, other fixed addresses are possible. Writing a "1" to a single block, for example, often requires storing data at each of several locations, thereby requiring more than a single clock cycle. Thus, there is time between reprogramming when the block is partially reprogrammed. While the block is partially programmed, indeterminate results may be reached when the state machine reaches the block. This is not desirable.

【0032】 図1bを参照すると、単一メモリ内にストアされる3つの状態マシンが示され
ている。それぞれは、完全に分離されたブロックであり、そのため、それぞれは
互いに独立している。状態マシンの1つを再プログラムするためには、その1つ
に単独で割り込みを行うだけでよい。残念ながら、いくつかの状態マシンが完全
に独立であるときには、それらのプログラミングを単一メモリ内にストアするこ
とからの恩典がほとんど得られない。これに対して、複数の状態マシンが単一の
メモリを共有し、かついくつかのプログラミングを共有している場合には、複数
の状態マシンの1つの再プログラミングが、その単一のメモリを共有するすべて
の状態マシンに関係する「ダウンタイム」を招くことになる。
Referring to FIG. 1b, three state machines stored in a single memory are shown. Each is a completely separate block, so that they are independent of each other. To reprogram one of the state machines, it is only necessary to interrupt that one by itself. Unfortunately, when some state machines are completely independent, there is little benefit from storing their programming in a single memory. On the other hand, if multiple state machines share a single memory and share some programming, one reprogramming of multiple state machines shares that single memory. It will incur "downtime" associated with every state machine that does.

【0033】 図1cを参照すると、図1bに類似の状態図が示されているが、これにおいては
3つの状態マシンが同一のプログラム・メモリを共有し、類似のブロックが、た
とえば6、6b、および6cが同一のブロック6としてストアされる。図1cか
ら明らかなように、それぞれの状態マシンは、異なるプログラミングを実行する
。現在のところ、3つの状態マシンすべての実行を中断することなく、図1cに
示した状態マシンのメモリの再プログラムを行うことは困難である。
Referring to FIG. 1c, a state diagram similar to that of FIG. 1b is shown, in which three state machines share the same program memory and similar blocks, eg 6,6b, And 6c are stored as the same block 6. As is apparent from FIG. 1c, each state machine performs different programming. Currently, it is difficult to reprogram the state machine memory shown in FIG. 1c without interrupting the execution of all three state machines.

【0034】 図2を参照すると、本発明に従った方法の簡略化したフローチャートが示され
ている。この状態マシンは、分類ファンクションを実行する。好ましくは、この
分類ファンクションを非循環型分類ファンクションとするが、それを必須としな
い。この状態マシンは、それぞれの状態遷移に関してテーブル・ルックアップを
基礎とし、各状態遷移に関連する情報が、状態アドレスにおけるデータのテーブ
ルとしてストアされている。動作においては、第1の状態アドレスが、第1の状
態アドレスのストレージ・ロケーションから読み出される。第1の状態アドレス
は、状態マシンのオペレーションの開始時において読み出されるアドレスである
。この第1の状態アドレスは、第1のテーブルを示す。
Referring to FIG. 2, a simplified flowchart of the method according to the present invention is shown. This state machine performs a classification function. Preferably, this classification function is an acyclic classification function, but it is not required. The state machine is based on a table lookup for each state transition and the information associated with each state transition is stored as a table of data at state addresses. In operation, the first state address is read from the storage location of the first state address. The first state address is the address read at the start of operation of the state machine. This first state address indicates the first table.

【0035】 状態マシンのプログラマは、状態マシンのデータを有するストレージ・ロケー
ションと状態マシンのデータを有していないそれとを識別するためのプロセッサ
を有する。一般にこれは、カレント状態マシンの情報がストアされているロケー
ションに関連する情報を維持することによってなされる。プログラマには、カレ
ント状態マシンのプログラミングに対する修正が提供される。たとえば、状態マ
シンの第2の状態に関連するデータのテーブルが修正される。プログラマは、あ
らゆる新しい情報を、カレント状態マシンによって使用されていないストレージ
・ロケーションのメモリに書き込む。この使用されていないストレージ・ロケー
ションは、カレント状態マシンのプログラミング・データを含まない。
The state machine programmer has a processor to distinguish between storage locations having state machine data and those not having state machine data. Generally, this is done by maintaining information related to the location where the current state machine information is stored. The programmer is provided with a modification to the programming of the current state machine. For example, a table of data associated with the second state of the state machine is modified. The programmer writes any new information to the memory at a storage location that is not used by the current state machine. This unused storage location does not contain programming data for the current state machine.

【0036】 当業者であれば明らかであろうが、新しく書き込まれた状態を、状態マシン内
の現存する状態にリンクさせるためには、いくつかの状態の修正が必要となり、
1ないしは複数の状態マシンが動作している間にそれを実行することは容易では
ない。この問題を解決するための1つのアプローチは、再プログラミングが完了
するまで状態マシンのオペレーションを停止することである。状態マシンのオペ
レーションの停止は、データの処理を停止することから望ましくない。本発明に
よれば、すべての修正された状態に先行するそれぞれの状態もまた、カレント状
態マシンのプログラミングによって使用されていないプログラム・メモリに書き
込まれる。新しく書き込まれた状態は、状態マシンのオペレーションの先頭から
、その状態マシンのプログラミングにおける、それ以上の修正が行なわれなくな
るポイントまでの状態マシンのプログラミングのスタートを形成する。データの
書き込みが行なわれると、新しく書き込まれたデータの第1の状態が、その状態
マシンの第1の状態になる。したがって、第1の状態アドレス・ロケーションに
ストアされる情報を修正することによって、続く状態マシンの実行の間に、新し
く書き込まれた状態データが使用される−つまり、修正された状態マシンが実行
される。好ましくは、このオペレーションが原子性の態様で実行されるものとす
る。非原子性の第1の状態アドレス書き込みオペレーションの間に第1の状態ア
ドレス・ロケーションの読み出しが行なわれないことの保証は可能である;しか
しながら、この結果、わずかながら状態マシンに関するダウンタイムが招かれ、
したがって望ましいとは言えない。ここで用いている「修正された状態」という
表現は、修正はもとより新しく生成された状態も指す。上記の説明から、これに
より状態マシンの実行の休止を招くことなく、あるいは第1の状態アドレスのス
トアに原子性オペレーション以外が使用されるときには休止を最小にして、状態
マシンのオペレーションの間における状態マシン・メモリの再プログラミングが
可能になることが明らかになろう。第1の状態アドレスが更新されると、その後
に続く状態マシンの実行が、修正された状態マシンのプログラミングを使用する
。しかしながら、第1の状態アドレスが更新されるまでは、状態マシンの修正さ
れていないプログラミングが実行される。
As will be appreciated by those skilled in the art, linking a newly written state to an existing state in the state machine requires some state modifications,
It is not easy to do it while one or more state machines are running. One approach to solving this problem is to stop the operation of the state machine until the reprogramming is complete. Stopping the operation of the state machine is undesirable because it stops processing data. According to the present invention, each state that precedes all modified states is also written to program memory that is not used by the programming of the current state machine. The newly written state forms the start of state machine programming from the beginning of the state machine's operation to the point in the state machine's programming where no further modifications are made. When data is written, the first state of newly written data becomes the first state of the state machine. Thus, by modifying the information stored in the first state address location, the newly written state data is used during subsequent executions of the state machine-that is, the modified state machine is executed. It Preferably, this operation shall be performed in an atomic manner. It is possible to ensure that the first state address location read is not performed during the non-atomic first state address write operation; however, this results in a small amount of downtime for the state machine. ,
Therefore, it is not desirable. As used herein, the expression "modified state" refers to the newly created state as well as the modified state. From the above discussion, this does not lead to a pause in the execution of the state machine, or to minimize pauses when a non-atomic operation is used to store the first state address so that the state machine is in between states during operation. It will be apparent that machine memory can be reprogrammed. Once the first state address is updated, subsequent state machine executions use the modified state machine programming. However, unmodified programming of the state machine is performed until the first state address is updated.

【0037】 当然のことながら、第1のアドレスが更新されると、修正された状態−つまり
、すでに書き直された状態データに関する状態−に関連付けされていたストレー
ジ・ロケーションが、別の異なる状態マシンによるそれらの状態の使用がない限
り、使用されていないストレージ・ロケーションとなる。結果として得られる、
カレント状態マシンのプログラミングによって使用されていないストレージ・ロ
ケーションは、その後、状態マシン・メモリの再プログラミングをさらに処理す
る上で使用するために「回復」される。
Of course, when the first address is updated, the storage location associated with the modified state—that is, the state for the state data that has already been rewritten—is due to another different state machine. An unused storage location unless those states are used. The resulting,
Storage locations that are not used by the programming of the current state machine are then "recovered" for use in further processing the reprogramming of the state machine memory.

【0038】 一般に、第1の状態アドレスは、第1のハードウエア・レジスタ内にストアさ
れて、そのアドレスに対する高速のアクセスを可能にする。ハードウエア・レジ
スタが使用されるとき、通常、第1の状態アドレスを書き込むための原子性オペ
レーションが使用される。たとえば、単一クロック・サイクル内にストアされる
ビット数を、レジスタ内のビット数に等しくする。代替的には、疑似原子性オペ
レーションが使用されることもある。たとえば、書き込みオペレーションにおい
て、使用可能なサイクル当たり多数のビットを書き込み、全アドレスが使用可能
になったとき、これらのビットが、すべて同時にレジスタ内にクロックされる。
さらに代替的には、数クロック・サイクルを用いて第2の別のレジスタに書き込
みを行い、そして、フラグ・ビットを更新して、第1のハードウエア・レジスタ
に代えて新しく書き込みが行なわれたレジスタを第1の状態アドレスとして読み
出させることもある。古い第1の状態アドレスを伴う第1のハードウエア・レジ
スタから、新しい第1の状態アドレスを伴うハードウエア・レジスタに原子的に
移行させるそのほかの方法については、当業者であれば、以上の開示から明らか
なものであろう。
Generally, the first state address is stored in the first hardware register to allow fast access to that address. When hardware registers are used, atomic operations are typically used to write the first state address. For example, the number of bits stored in a single clock cycle is equal to the number of bits in a register. Alternatively, pseudo-atomic operations may be used. For example, in a write operation, many bits are written per available cycle, and when all addresses are available, these bits are all clocked into the register at the same time.
Still alternatively, a few clock cycles are used to write to the second separate register, and the flag bit is updated to replace the first hardware register with a new write. The register may be read as the first state address. Those skilled in the art will be aware of other methods of atomically migrating from a first hardware register with an old first state address to a hardware register with a new first state address. Will be clear from.

【0039】 それとは別に、第1の状態アドレスをプログラム・メモリ内の固定アドレス、
つまり原子性もしくは疑似原子性の態様において、そのアドレスからロードする
ことが可能であり、かつそのアドレスにストアすることが可能な固定アドレスに
ストアする。好ましくは、この第1の状態アドレスを、単一クロック・サイクル
においてアクセス可能とする。
Alternatively, the first state address is a fixed address in program memory,
That is, in an atomic or pseudo-atomic manner, store at a fixed address that can be loaded from that address and stored at that address. Preferably, this first state address is accessible in a single clock cycle.

【0040】 図3を参照すると、本発明に従った、実行間に状態マシンの再プログラミング
を行う方法が示されている。図示した方法は、複数の状態マシンによる同時の使
用に供される状態マシンのプログラム・メモリに関する。
Referring to FIG. 3, a method of reprogramming a state machine between runs is shown in accordance with the present invention. The illustrated method relates to a state machine program memory for simultaneous use by multiple state machines.

【0041】 各状態マシンは、分類ファンクションを実行する。好ましくは、この分類ファ
ンクションを非循環型分類ファンクションとするが、必ずしもその必要はない。
この状態マシンは、図2を参照して説明した状態マシンと同様に、それぞれの状
態遷移に関してテーブル・ルックアップを基礎とし、各状態遷移に関連する情報
が、状態アドレスにおけるデータのテーブルとしてストアされている。動作にお
いては、第1の状態アドレスが、第1の状態アドレスのストレージ・ロケーショ
ンから読み出される。第1の状態アドレスは、各状態マシンのオペレーションの
開始時において読み出されるアドレスである。状態マシンが個別にプログラム可
能であるとき、各状態マシンは、それぞれに関連付けされた第1の状態アドレス
を有する。
Each state machine performs a classification function. Preferably, this classification function is an acyclic classification function, but this is not necessary.
This state machine, like the state machine described with reference to FIG. 2, is based on a table lookup for each state transition and the information associated with each state transition is stored as a table of data at state addresses. ing. In operation, the first state address is read from the storage location of the first state address. The first state address is the address read at the start of operation of each state machine. When the state machines are individually programmable, each state machine has a first state address associated with it.

【0042】 この状態マシンのプログラマは、状態マシンのデータを有するストレージ・ロ
ケーションとそれ以外を識別するためのプロセッサを有する。一般にこれは、カ
レント状態マシンの情報がストアされているロケーションに関連する情報を維持
することによってなされる。プログラマには、カレント状態マシンのプログラミ
ングに対する修正が提供される。一例を示せば、第1の状態マシンの第2の状態
に関連するデータのテーブルが修正される。プログラマは、あらゆる新しい情報
を、カレント状態マシンのプログラミングによって使用されていないストレージ
・ロケーションのメモリに書き込む。使用されていないストレージ・ロケーショ
ンには、カレント状態マシンに関連する状態マシンプログラミング・データは含
まれていない。本発明によれば、すべての修正された状態に先行するそれぞれの
状態もまた、カレント状態マシンのプログラミングによって使用されていないプ
ログラム・メモリに書き込まれる。新しく書き込まれた状態は、それぞれ状態マ
シンのオペレーションの先頭から、それぞれの状態マシンのプログラミングにお
いて、それ以上の修正が行なわれなくなるポイントまでの、それぞれの状態マシ
ンのプログラミングのスタートを形成する。データの書き込みが行なわれると、
新しく書き込まれたデータの第1の状態が、それらの状態マシンの第1の状態に
なる。したがって、それぞれの第1の状態アドレス・ロケーションにストアされ
る情報を修正することによって、続くそれぞれの状態マシンの実行の間に、新し
く書き込まれた状態データが使用される,すなわち、修正されたそれぞれの状態
マシンが実行される。
The state machine programmer has a processor to identify the storage locations containing the state machine data and what else. Generally, this is done by maintaining information related to the location where the current state machine information is stored. The programmer is provided with a modification to the programming of the current state machine. In one example, the table of data associated with the second state of the first state machine is modified. The programmer writes any new information to the memory at storage locations not used by the programming of the current state machine. The unused storage locations do not contain state machine programming data associated with the current state machine. According to the present invention, each state that precedes all modified states is also written to program memory that is not used by the programming of the current state machine. The newly written states form the start of programming of each state machine from the beginning of each state machine's operation to the point at which no further modification is made in programming of each state machine. When data is written,
The first state of the newly written data becomes the first state of those state machines. Thus, by modifying the information stored in each first state address location, the newly written state data is used during the execution of each subsequent state machine, ie, each modified state data. State machine is executed.

【0043】 前述したように、第1の状態アドレスの修正は、原子性もしくは疑似原子性の
態様において生じることが重要である。それに代わる方法においては、第1の状
態アドレスの書き込みの間は状態マシンのオペレーションを休止する。そうでな
ければ、第1の状態アドレスの書き込みの間に第1の状態アドレスへのアクセス
が可能になり、状態マシンの実行を開始するためのアドレスのロードが無意味に
なる可能性がある。
As mentioned above, it is important that the modification of the first state address occurs in an atomic or pseudo-atomic manner. In the alternative, the state machine is suspended during the writing of the first state address. Otherwise, the first state address may be accessible during the writing of the first state address and the loading of the address to begin execution of the state machine may be pointless.

【0044】 上記の説明から、任意数の状態マシンの実行の間における状態マシンのメモリ
の再プログラミングが可能なことは明らかであろう。第1の状態アドレスの1つ
が更新されると、関連付けされた状態マシンのその後に続く実行に、修正された
状態マシンのプログラミングが伴う。第1の状態アドレスが更新されるまでは、
修正されていない状態マシンのプログラミングが実行される。このようにして本
発明は、各状態マシンが異なるプログラミングを実行しているとき、他の状態マ
シンのオペレーションを中断することなく、1つの状態マシンの再プログラミン
グを可能にする。
From the above description, it will be apparent that the state machine memory can be reprogrammed during execution of any number of state machines. When one of the first state addresses is updated, subsequent execution of the associated state machine involves programming the modified state machine. Until the first state address is updated,
Programming of the unmodified state machine is performed. In this way, the present invention allows reprogramming of one state machine when each state machine is performing a different programming without interrupting the operation of the other state machine.

【0045】 新しい第1の状態アドレスがストアされると、メモリの回復が可能になる。メ
モリの回復がオプションで即座に実行される場合であっても、現在実行中の状態
マシンが再スタートするまでは、再プログラミングを実行するべきではない。こ
れにより、その前から実行中の状態マシンの状態が、その実行の間に上書きされ
ることが防止される。次に、メモリ回復の方法について概略を説明する。
Once the new first state address is stored, memory recovery is possible. Even if memory recovery is optionally performed immediately, reprogramming should not be performed until the currently running state machine is restarted. This prevents the state of the previously running state machine from being overwritten during that run. Next, an outline of a memory recovery method will be described.

【0046】 各状態に関連付けされたデータでもって、その状態を参照する状態の数を示す
カウンタが備わる。第1の状態アドレス・レジスタが変更されるとき、その変更
に先行して第1の状態アドレス・レジスタの内容によってポイントされるアドレ
スにおけるデータに関連付けされたカウンタが、その状態データに対する参照が
1つ少なくなることから、デクリメントされる。カウンタがゼロになると、その
状態に関連付けされたメモリ・ロケーションが回復され、回復されたメモリ・ロ
ケーション内のデータから参照されていたデータに関連付けされたカウンタがデ
クリメントされる。このメモリ回復オペレーションは、ゼロ値を有するカウンタ
がなくなるまで再帰的に進められる。
With the data associated with each state, a counter is provided that indicates the number of states that reference that state. When the first state address register is modified, the counter associated with the data at the address pointed to by the contents of the first state address register prior to the modification has one reference to that state data. It is decremented because it decreases. When the counter reaches zero, the memory location associated with the state is recovered and the counter associated with the data referenced by the data in the recovered memory location is decremented. This memory recovery operation proceeds recursively until there are no counters with a zero value.

【0047】 代替実施態様においては、タイマが備えられ、タイマが終了したとき、状態マ
シンの実行を休止するタイミング信号が提供される。これは、特定の時限までに
プログラムをストアする必要がある場合だけでなく、随時先行してストアできる
場合におけるプログラマブル・メモリのプログラミングに役立つ。プログラムが
入力され、上記の方法に従って再プログラミングが実行される。再プログラミン
グが指定時限までに完了しなかった場合には、分類オペレーションからプログラ
ミングの完了までの間、状態マシンが休止される。
In an alternative embodiment, a timer is provided and a timing signal is provided to pause execution of the state machine when the timer expires. This is useful for programming the programmable memory not only when the program needs to be stored by a certain time period but also when it can be stored in advance at any time. The program is entered and reprogramming is performed according to the method described above. If the reprogramming is not completed by the specified time, the state machine is paused between the sort operation and the completion of programming.

【0048】 本発明の別の実施態様によれば、状態マシンにデータを供給する前に、それを
バッファするためのバッファを使用し、かつタイマを履行して再プログラミング
・タスクに割り当てるプロセッシング時間を決定することができる。たとえば、
新しいプログラミングが導入されたとき、状態マシンまたはプロセッシング・パ
ワーの10%を再プログラミングに割り当てると望ましいとされることが考えら
れる。当然のことながら、状態マシンがプロセッシング・パワーの90%より少
ない要求の場合には、再プログラミング・オペレーションにおいて、利用可能な
プロセッシング時間を消費させることもできる。限定を意図したものではない本
発明の応用例を図4、5、および6を参照して説明する。図4は、状態1〜11
を有するカレント状態マシンの状態図である。状態6、10、および11を修正
することが望ましいとされるとき、従来技術のデバイスおいては、状態マシンの
実行の休止を必要とした。説明を容易にするため、ここでは11の状態を用いて
状態図を表しているが、実際の状態の数は、状態マシンのメモリ・サイズおよび
実行されるオペレーションによってのみ限定されることになる。図4の状態マシ
ンのイメージに対して変更が行なわれ、その結果として、修正された状態6n、
12、13、および14を有する、図5の状態図によって表される状態マシンが
得られる。当業者であれば認識されようが、多くの新しい状態の追加ないしは修
正が可能であり、その数は、状態マシン・メモリのメモリ・サイズによってのみ
制限される。図4に示した状態マシンに関するメモリの内容を、修正された状態
1n、2n、および6nとともに図6に示す。新しい、および/または修正され
た状態、すなわち1n、2n、および6nに関連するデータは、現在実行中の状
態マシンのプログラミングによって使用されていないメモリのストレージ・ロケ
ーションに書き込まれる。図6においては、図4の状態マシンおよび図5の状態
マシンの両方に関する状態マシンのプログラミングが状態図に明示されている。
第1の状態図は状態1から、第2の状態図は状態1nからそれぞれ始まる。状態
3、4、5、7、8、および9は、両方の状態図に共通である。実際に状態1n
は、状態1に類似であるが、状態2nが異なることから、それも異なる。同様に
状態2nは、状態2に類似であるが、状態6nが異なることから、それも異なる
。図4の状態マシンと図5の状態マシンを明確に区別するためには、状態マシン
の開始アドレスを決定しなければならない。すべての新しい、および/または修
正された状態のデータがメモリ内にストアされると、状態マシンの開始アドレス
が、新しい第1の状態アドレス、すなわち状態1nの状態アドレスに更新される
。オペレーションは、原子的に、もしくは疑似原始的に実行される。次に状態マ
シンが実行を開始するときには、新しくストアされたデータが使用される。選択
された開始アドレスに応じていずれの状態マシンのプログラミングも使用できる
ように、充分な状態マシン・メモリが提供される。したがって、3つの状態マシ
ンがまったく等しいプログラミングを使用する場合であっても、3つの独立した
第1の状態アドレス・ロケーションを与えておけば、1つのプログラミングを修
正し、残りをそのままに残すことが可能である。状態マシンのプログラミングを
修正する間、状態遷移が維持され、「ダウンタイム」が回避されることは重要で
ある。開始アドレスが状態1nのそれである場合には、図5の状態マシン図がカ
レント状態マシン図となり、修正された状態1n、2n、および6nを有する。
いずれの状態マシンによってもアクセスされない状態−この場合は単一の状態マ
シンによってアクセスされない状態−に関連付けされたメモリ・ロケーションは
、このとき「解放された」ストレージ・ロケーション、つまりカレント状態マシ
ンのプログラミングによって使用されないストレージ・ロケーションとなる。
According to another embodiment of the present invention, before supplying data to the state machine, a buffer is used to buffer it, and a timer is implemented to allocate processing time to the reprogramming task. You can decide. For example,
When new programming is introduced, it may be desirable to allocate 10% of the state machine or processing power to reprogramming. Of course, if the state machine requires less than 90% of the processing power, the reprogramming operation can also consume the available processing time. Non-limiting applications of the present invention are described with reference to FIGS. FIG. 4 shows states 1 to 11.
FIG. 6 is a state diagram of a current state machine having When it was desired to modify states 6, 10, and 11, in prior art devices, it was necessary to pause the execution of the state machine. For ease of description, 11 states are used to represent the state diagram, but the actual number of states will be limited only by the memory size of the state machine and the operations performed. Changes were made to the image of the state machine of FIG. 4, resulting in a modified state 6n,
The state machine represented by the state diagram of FIG. 5 with 12, 13, and 14 is obtained. As will be appreciated by those skilled in the art, many new states can be added or modified, the number of which is limited only by the memory size of the state machine memory. The memory contents for the state machine shown in FIG. 4 are shown in FIG. 6 with the modified states 1n, 2n, and 6n. The data associated with the new and / or modified state, 1n, 2n, and 6n, is written to a storage location in memory that is not used by the programming of the currently executing state machine. In FIG. 6, the state machine programming for both the state machine of FIG. 4 and the state machine of FIG. 5 is explicitly shown in the state diagram.
The first state diagram starts from state 1 and the second state diagram starts from state 1n. States 3, 4, 5, 7, 8 and 9 are common to both state diagrams. Actual state 1n
Is similar to state 1 but also different because state 2n is different. Similarly, state 2n is similar to state 2 but also different because state 6n is different. In order to clearly distinguish the state machine of FIG. 4 from the state machine of FIG. 5, the starting address of the state machine must be determined. When all new and / or modified state data has been stored in memory, the starting address of the state machine is updated to the new first state address, that of state 1n. Operations are performed atomically or pseudo-primitively. The next time the state machine begins execution, the newly stored data will be used. Sufficient state machine memory is provided so that programming of either state machine can be used depending on the selected start address. Therefore, even if the three state machines use exactly the same programming, it is possible to modify one programming and leave the rest untouched by giving three independent first state address locations. It is possible. While modifying the state machine programming, it is important that state transitions be maintained and "downtime" avoided. If the starting address is that of state 1n, then the state machine diagram of FIG. 5 becomes the current state machine diagram and has modified states 1n, 2n, and 6n.
A memory location associated with a state that is not accessed by any state machine--in this case, a state that is not accessed by a single state machine--is now a "free" storage location, or by programming the current state machine. It is a storage location that is not used.

【0049】 当業者であれば明らかであろうが、すべてのメモリ・ロケーションは占有され
ており、ここで用いている「占有されていない」という用語は、カレント状態マ
シンのプログラム・データによって占有されていないメモリ・ロケーションを指
している。
As will be appreciated by those skilled in the art, all memory locations are occupied and the term “unoccupied” as used herein is occupied by the program data of the current state machine. Not pointing to a memory location.

【0050】 当然のことながら、2ないしはそれ以上のメモリ・バンクが使用されるときに
は、バンク間の切り替えによって、オンライン・バンク内においてプログラミン
グの実行が生じている間に、オフライン・バンクの再プログラミングが可能にな
る。実際、ある種の状況においては、2つのメモリ・バンクがプログラム・メモ
リとなり、各バンク内の開始アドレスがカレント・バンクによって識別される。
つまり、カレント・バンクを識別するための識別子が開始アドレスのストレージ
・ロケーションを形成することになる。2つのバンクを使用する場合、開始アド
レスのストレージ・ロケーションは、1ビットのデータを収容できればよく、こ
れは必然的に原子性の態様で書き込まれる。
Of course, when two or more memory banks are used, the switching between banks allows the offline banks to be reprogrammed while the execution of the programming is occurring in the online banks. It will be possible. In fact, in some situations, two memory banks become program memory and the starting address within each bank is identified by the current bank.
That is, the identifier for identifying the current bank forms the storage location of the start address. When using two banks, the starting address storage location need only accommodate one bit of data, which is necessarily written in an atomic manner.

【0051】 ここでは開始アドレスが1つのロケーション内にストアされるものとして説明
したが、第1の状態のプログラミングに2つのロケーションを割り当て、インジ
ケータ・ビットに基づいて2つのロケーションの間の選択を行うことも可能であ
る。その場合においては、インジケータ・ビットが開始アドレス−アドレス「0
」またはアドレス「1」−を形成し、データをフリップフロップ内またはその他
の従来的な態様でストアすることができる。
Although the starting address is described herein as being stored in one location, the programming of the first state is assigned two locations and a selection between the two locations is made based on the indicator bits. It is also possible. In that case, the indicator bit is the start address-address "0".
, Or address "1"-, and data can be stored in flip-flops or in other conventional ways.

【0052】 また、状態マシンの実行の開始時におけるカレント状態アドレスのロードを行
うステップについて、開始アドレス・ロケーションからのアドレスのロードに言
及したが、フリップフロップを使用してカレント・メモリ・バンクを示す場合に
は、第1の状態のプログラミングのアドレスは、適切なバンクの選択を除けば、
通常、固定される。したがって、固定アドレスを用いてカレント状態アドレスが
ロードされるが、プログラミング・データが検索されるメモリ・ロケーションは
、開始アドレスに関係するデータの内容に依存する。この場合、カレント状態ア
ドレス・レジスタの内容は、カレント状態アドレスを決定するために必要なアド
レス・データより少なくなり、開始アドレス・ロケーションは、それが使用可能
な固定開始アドレスのいずれを使用するべきかを決定するためものである限り、
カレント状態アドレスの一部を形成することになる。
Also, for the step of loading the current state address at the start of execution of the state machine, we have mentioned loading the address from the starting address location, but using flip-flops to indicate the current memory bank. In case the first state programming address is, except for the selection of the appropriate bank,
Usually fixed. Therefore, although the fixed address is used to load the current state address, the memory location where the programming data is retrieved depends on the content of the data relative to the starting address. In this case, the contents of the current state address register will be less than the address data needed to determine the current state address, and the starting address location should use which of the fixed starting addresses it has available. As long as it is to determine
It will form part of the current state address.

【0053】 図7を参照すると、現在実行中の状態マシンのいずれによっても使用されてい
ないメモリを回復する方法に関する簡略化されたフローチャートが示されている
。新しい状態データがプログラム・メモリ内にストアされるとき、現存する状態
データは、変更されずに残される。各修正された状態マシンの第1の状態アドレ
スが更新され、それぞれの状態マシンに関する新しい第1の状態アドレスを反映
すると、置換された状態マシンのデータが識別され、使用されていない状態マシ
ン・メモリとして示される。
Referring to FIG. 7, there is shown a simplified flowchart of a method of recovering memory not used by any of the currently executing state machines. When new state data is stored in program memory, the existing state data is left unchanged. When the first state address of each modified state machine is updated to reflect the new first state address for the respective state machine, the replaced state machine data is identified and unused state machine memory. Indicated as.

【0054】 使用されていないメモリ・ロケーションを識別するために、各状態に関する状
態データとともに値がストアされ、それがその状態データに対する参照の数を示
す。以前の第1の状態アドレスが参照していた状態データがアクセスされ、それ
に含まれる値がデクリメントされる。値が「1」もしくはそれを超えている場合
には、その状態データに対する参照がまだ存在し、それが使用されていないメモ
リとして示されることはない。値がゼロであれば、そのロケーションの状態マシ
ンのデータに対する参照がなくなったことになり、「使用されていない」として
示される。続いて、そのデータから参照されるすべての状態マシン・データがア
クセスされ、それに関連付けされている値がデクリメントされる。この方法を、
関連付けされた値が「1」もしくはそれを超えている状態マシン・データのみが
残されるまで、再帰的に実行する。当然のことながら、望ましい場合には、この
方法を反復的に履行することも可能である。
To identify unused memory locations, a value is stored with the state data for each state, which indicates the number of references to that state data. The state data referenced by the previous first state address is accessed and the value contained therein is decremented. If the value is "1" or greater, then there is still a reference to that state data and it is not indicated as unused memory. A zero value means that there are no more references to the state machine's data at that location, which is indicated as "not used". Subsequently, all state machine data referenced from that data is accessed and the value associated with it is decremented. This method
Run recursively until only state machine data with associated values of "1" or above is left. Of course, it is possible to implement the method iteratively if desired.

【0055】 この種の方法の使用は、メモリの回復を単純化し、そのプログラミングおよび
再プログラミングに必要なすべての情報を含んだ状態マシンのプログラミングを
可能にする。したがって、これには利点があると言うことができる。
The use of this kind of method simplifies the recovery of the memory and allows the programming of the state machine containing all the information necessary for its programming and reprogramming. Therefore, it can be said that this has advantages.

【0056】 ここでは状態が、先行する別の状態または後続の別の状態として記述されてい
るが、これは、非循環型状態マシンにもっとも適する表現である。循環型状態マ
シンについては、「〜から到達可能な」という表現の方が、別の状態に続く状態
をより正確に表している。たとえば、状態Aが状態Bから到達可能であるという
ことは、非循環型状態マシンの場合には状態Aが状態Bに続くことに等しい。状
態Aが状態Bから到達可能となる循環型状態マシンを図8に示す。これにおいて
も、本発明に従ったインクリメンタル・プログラミングが有効である。単一ノー
ドを修正するためには、修正されるノードから到達可能なすべてのノードが更新
される。更新されるノードに到達可能でないグラフの部分があれば、グラフのそ
の部分は修正を必要としない。
Although a state is described herein as another state that precedes it or another state that follows it, this is the most suitable representation for an acyclic state machine. For a circular state machine, the expression "reachable from" is a more accurate representation of a state that follows another state. For example, that state A is reachable from state B is equivalent to state A following state B in the case of an acyclic state machine. A circular state machine in which state A is reachable from state B is shown in FIG. Even in this case, the incremental programming according to the present invention is effective. To modify a single node, all nodes reachable from the node being modified are updated. If any part of the graph is unreachable for the node to be updated, that part of the graph does not require modification.

【0057】 図9aを参照すると、従来技術に従った典型的な分類状態マシンの簡略化され
た状態図が示されている。状態間の遷移は、円として示された状態を接続するラ
インにより示される一連のオペレーションによって表されている。この状態図は
、非循環型状態マシンに関するものであり、各状態には多数の可能性のうちの1
つが続く。この種の状態マシンは、ソフトウエアおよびハードウエアのいずれに
おいても容易に履行することができる。しかしながら、状態マシンの動作速度が
高くなるに従って、必要なパフォーマンスを確保するために、各状態遷移に関す
るオペレーションを同時に実行しなければならなくなる。これまでこのボトルネ
ックは、専用の非プログラマブル・ハードウエア状態マシン設計を必要とした。
図9bに、図9aの状態マシンに関して縮約された状態図を示す。これを参照す
ると、分類の端末状態Aが単一の状態901aに統合されている。同様にそのほ
かの状態についても統合がなされている。この図から明らかなように、状態遷移
を表すエッジの数がいくぶん少なくなっている、つまり20から16になってい
る。状態R等の一部の状態は、「受け入れ」または「拒否」の端末状態となる。
状態マシンの再スタートは、これらの状態に続いて起こる。再スタートは、一般
にその後に続くパケットの開始の前に生じる。通常、本発明に含まれない部分に
、各パケットの開始を識別するための手段が存在する。
Referring to FIG. 9 a, there is shown a simplified state diagram of a typical classification state machine according to the prior art. Transitions between states are represented by a series of operations indicated by lines connecting the states shown as circles. This state diagram pertains to an acyclic state machine, where each state has one of many possibilities.
One continues. A state machine of this kind can be easily implemented in both software and hardware. However, as the operating speed of the state machine increases, the operations for each state transition must be executed simultaneously in order to ensure the required performance. To date, this bottleneck has required a dedicated non-programmable hardware state machine design.
FIG. 9b shows a condensed state diagram for the state machine of FIG. 9a. Referring to this, the terminal state A of the classification is integrated into a single state 901a. Similarly, other states are being integrated. As is clear from this figure, the number of edges representing the state transitions is somewhat smaller, that is, 20 to 16. Some states such as the state R are “accept” or “reject” terminal states.
A restart of the state machine follows these states. Restart generally occurs before the start of the packet that follows. Usually, there is a means for identifying the start of each packet, which is not included in the present invention.

【0058】 図10aを参照すると、パケット分類に関する非常に簡略化したプロトコルの
概要図が示されている。この簡略化したプロトコルを使用すれば、イーサネット
もしくはその他の通信プロトコルについての詳細な知識がなくても本発明の理解
が容易になる。4つのビット・パターンが示されているが、それぞれは異なる分
類を表している。それぞれのビット・パターンは類似している。3ビットからな
る最初のセットは、「1」とする必要があり、それ以外の場合にはデータ・スト
リームが分類されずに残される。その後に8ビットが続いているが、それらの存
在自体には意味があるが、分類にとっては重要でない。その後に続く3ビットも
「1」とする必要があり、さらにその後に分類と「無関係な」8ビットが続く。
最後の2ビットは、4つの分類の間を識別するために使用される。図10bに、
プログラマブル状態マシンを履行する分類ツリーを示す。通常のパケット分類ツ
リーは、それぞれが多数のビットを有する複数の分類プロトコルに関係するデー
タを包含する;したがって図10bに示した分類ツリーは、本発明の説明を容易
にするために簡略化したものである。通常の分類ツリーは、非常に大きなデータ
構造となり、そのため多くの場合は、大きすぎて単一の集積化メモリ・デバイス
内にストアすることができない。
Referring to FIG. 10 a, a very simplified protocol schematic diagram for packet classification is shown. This simplified protocol facilitates understanding of the invention without detailed knowledge of Ethernet or other communication protocols. Four bit patterns are shown, each representing a different classification. Each bit pattern is similar. The first set of 3 bits must be "1", otherwise the data stream is left unclassified. It is followed by 8 bits, whose existence is meaningful, but not important for classification. The subsequent 3 bits must also be "1", followed by 8 bits "unrelated" to the classification.
The last 2 bits are used to distinguish between the 4 classifications. In Figure 10b,
3 illustrates a classification tree implementing a programmable state machine. A typical packet classification tree contains data related to multiple classification protocols, each having a large number of bits; therefore, the classification tree shown in Figure 10b is a simplification to facilitate the description of the invention. Is. A typical classification tree results in a very large data structure that is often too large to be stored in a single integrated memory device.

【0059】 ギガビット・イーサネットの場合は、単一のビットの到来が1ナノ秒内となる
。1つの状態当たり3ビットに作用するギガビット・イーサネットのパケット分
類状態マシンについては、最初の3ビットが3ナノ秒内に到来する。それが状態
マシンに提供された後は、次の3ビットが到来するまでに3ナノ秒の遅れがある
。この3ナノ秒の間に、状態遷移に関するすべてのオペレーションが完了される
。当然のことながら、状態遷移の準備にそれより多くの時間を必要とする場合に
は、より多くのビットをグループ化する。このように、通信の速度に応じて、一
度に2ビットを使用する分類のための状態マシンが、一度に8ビットもしくは1
6ビットを使用するものと同様に可能になる。プログラマブル・デバイス内の埋
め込みメモリを使用することにより高速メモリ・アクセス・オペレーションが可
能となり、したがって8ビット・オペレーション−つまり1つの状態当たり8ナ
ノ秒−の場合は、各状態遷移について、同一のプログラマブル・メモリからの最
大で2つの連続したメモリ・アクセス・オペレーションが可能になり、より高い
可能性としては、単一のメモリ・アクセス・オペレーションが可能になる。
For Gigabit Ethernet, the arrival of a single bit is within 1 nanosecond. For a Gigabit Ethernet packet classification state machine that operates on 3 bits per state, the first 3 bits arrive in 3 nanoseconds. After it has been provided to the state machine, there is a 3 nanosecond delay before the arrival of the next 3 bits. During this 3 nanosecond, all the operations related to the state transition are completed. Of course, if more time is needed to prepare for a state transition, then group more bits. Thus, depending on the speed of communication, the state machine for classification, which uses 2 bits at a time, may be 8 bits or 1 at a time.
It is possible as well as using 6 bits. The use of embedded memory within a programmable device allows for fast memory access operations, and thus for 8-bit operations-or 8 nanoseconds per state-the same programmable programmable for each state transition. Up to two consecutive memory access operations from memory are possible and, more likely, a single memory access operation.

【0060】 この種の状態は、多数のアドレスを有するルックアップ・テーブルの形式もし
くはアドレス変換の別の形式を用いて容易に履行することができる。8つのデー
タ・ビットの受け取りに応答するルックアップ・テーブルの履行の場合、ルック
アップ・テーブルに関する次のメモリ・アドレスを決定するために、単一のメモ
リ・アクセスのみが要求される。一例を示すと、カレント・テーブル・アドレス
がレジスタの上位ビットにロードされる。データ・ストリームからの8ビットは
、当該レジスタの下位ビットにロードされ、0〜255のオフセットとして作用
する。ロードされた後は、そのレジスタによって示されるロケーションのデータ
が、当該レジスタの上位ビットにロードされる。続いて「受け入れ」または「拒
否」に関してそのチェックが行なわれ、データ・ストリームからの次の8ビット
が下位ビットにロードされて新しいアドレスが形成される。端末状態に到達する
まで、これが繰り返される。
A state of this kind can easily be implemented using the form of a look-up table with a large number of addresses or another form of address translation. For lookup table implementations responsive to receipt of eight data bits, only a single memory access is required to determine the next memory address for the lookup table. In one example, the current table address is loaded into the upper bits of the register. The 8 bits from the data stream are loaded into the lower bits of the register and act as an offset of 0-255. After being loaded, the data at the location pointed to by that register is loaded into the upper bits of that register. The check is then done for "accept" or "reject" and the next 8 bits from the data stream are loaded into the low order bits to form a new address. This is repeated until the terminal state is reached.

【0061】 上述したように、多数のビットについてはルックアップ・テーブルのストレー
ジが非常に大きくなり、外部メモリデバイスの使用が避けられなくなることから
コストが増加するとともにパフォーマンスが低下する。したがって、プログラマ
ブル状態マシン内において並列処理が許されるビット数には、実用上の限界が存
在する。また、必要な速度をサポートすることができるメモリ回路が、現在のと
ころ集積化メモリ回路に限られていることから、分類データとして使用可能なメ
モリの量に制限が課せられる。この制限があることから、メモリの最適化が、大
きな利点を提供することとなる。
As described above, for a large number of bits, the look-up table storage becomes very large, and the use of an external memory device is inevitable, resulting in an increase in cost and a decrease in performance. Therefore, there is a practical limit to the number of bits that can be processed in parallel in the programmable state machine. Also, memory circuits that can support the required speed are currently limited to integrated memory circuits, which limits the amount of memory that can be used as classification data. Given this limitation, memory optimization offers significant advantages.

【0062】 パケット分類状態マシンにとっては、結果としてもたらされる状態がオペレー
ションや、パケットのクラスを決定する上で重要になる。そのため、パケット分
類状態マシンは、ツリー構造に従う。ツリーの各ノードが図2bに示すように1
ビットに関係付けされている場合には、ツリーが非常に大きくなり、それぞれが
2つの子ノードと1つの親ノードを有する多くのノードを有することになる。各
ノードが8ビットに関係付けされていた場合には、ツリーのレベルがはるかに少
なくなるが、実際には同様のエッジ数を有する。図10cおよび10dは、それ
ぞれ、各ノードに2ビットおよび3ビットが関係付けされている場合を示す。当
業者であれば明らかであろうが、多くのノードは重要でなく、したがってこの目
的に関して言えば、パケット分類に有用なこれらのノードの最適化が、プログラ
マブル状態マシンの重要な側面となる。
To the packet classification state machine, the resulting state is important in determining the operation and class of the packet. Therefore, the packet classification state machine follows a tree structure. Each node in the tree is 1 as shown in Figure 2b.
If associated with bits, the tree would be very large, with many nodes each having two child nodes and one parent node. If each node was associated with 8 bits, the tree would have much less levels, but would in fact have a similar number of edges. Figures 10c and 10d show the case where 2 bits and 3 bits are associated with each node, respectively. As will be apparent to those skilled in the art, many nodes are unimportant, and for this purpose the optimization of those nodes useful for packet classification is an important aspect of programmable state machines.

【0063】 分類データの最適化の好ましい方法は、その中に同一の情報を有する縮約され
た分類ツリー・データを提供するために、新しいメモリ最適化テクニックを使用
する。図10b、10c、および10dを参照すると、同じ分類ツリーを変形し
た表現が示されている。これから明らかなように、ほかより多くのあるいはそれ
より少ない情報を必要とする多数のノードが存在する。これは、本発明に従って
、メモリ・ストレージ要件を最適化するために使用される。たとえば、可能性の
ある次のノードを1つだけ有する各ノード−そのノードからの各エッジが、同一
のディスティネーション・ノードに至るノード−を単一エッジとしてストアすれ
ば、図10bに示したエッジの数が、50から34に抑えられる。これは、全体
的なストレージ要件を考えると、大きな縮約となる。当然のことながら、1つの
ノード当たりに使用するエッジ数が異なれば、得られる節約の効果も異なってく
る。たとえば、同じ最適化テクニックによって、図10cに示したツリーにおけ
るエッジ数は48から27に、図10dに示したツリーにおけるエッジ数は64
から36に抑えられる。
The preferred method of optimizing the classification data uses a new memory optimization technique to provide contracted classification tree data with the same information in it. 10b, 10c, and 10d, a modified representation of the same classification tree is shown. As can be seen, there are many nodes that need more or less information than others. This is used in accordance with the present invention to optimize memory storage requirements. For example, if each node with only one possible next node-each edge from that node leading to the same destination node-is stored as a single edge, the edge shown in FIG. Is reduced from 50 to 34. This is a big reduction considering the overall storage requirements. Of course, different savings in the number of edges used per node will yield different savings. For example, using the same optimization technique, the number of edges in the tree shown in FIG. 10c is 48 to 27, and the number of edges in the tree shown in FIG. 10d is 64.
To 36.

【0064】 好ましい方法は、それぞれが異なる量のストレージを必要とするいくつかのカ
テゴリへのノードのグループ化も行う−つまり、全幅ノード;半幅ノード;全幅
の無関係なノード;半幅の無関係なノード等である。異なるノードに異なるメモ
リを占有させることによって、メモリ要件が著しく抑えられる。さらに、グルー
プの1つとしてのデータの表現は、容易に識別することができる。4つのグルー
プが存在する場合、2ビットを用いて充分にエレメントを特定のグループに分類
することができる。前述したように、外部メモリが使用された場合にパフォーマ
ンスが低下することからメモリの最適化を行うことは好ましい。当然のことなが
ら、このほかの形式のメモリ使用の最適化についても本発明との関連から適用す
ることができる。
The preferred method also groups the nodes into several categories, each of which requires different amounts of storage—ie full-width nodes; half-width nodes; full-width irrelevant nodes; half-width irrelevant nodes, etc. Is. By having different nodes occupy different memories, the memory requirements are significantly reduced. Moreover, the representation of the data as one of the groups can be easily identified. If there are 4 groups, then 2 bits are sufficient to sort the elements into a particular group. As described above, it is preferable to optimize the memory, because the performance is degraded when the external memory is used. Of course, other forms of memory usage optimization can be applied in the context of the present invention.

【0065】 本発明に従ったツリー横行方法を履行するためには、ノードから延びる各エッ
ジ−各アドレス−が、全幅エッジであるか、あるいは半幅エッジであるかによら
ず、またそれがワードにそろえられているか否かによらず、個別にアドレス可能
であることが好ましい。たとえば、全幅ノードは、ワードにそろえられており、
方向ノードに関して2のワードを必要とする。
To implement the tree traversal method according to the present invention, whether each edge extending from a node--each address--is a full-width edge or a half-width edge, and it is a word. It is preferred that they be individually addressable, whether aligned or not. For example, full-width nodes are word aligned,
It requires 2 n words for a 2 n directional node.

【0066】 半幅ノードは、ワードにそろえられるか、半幅ワードにそろえられる。これに
より、全幅ノードおよび半幅ノードに関してデータ・ストリームからのビットの
一貫性のある連結が可能になり、それにおいて半幅ノードの場合には、1ビット
によりワードの右側半分とワードの左側半分の間の選択−つまり、半ワードそろ
えとワードそろえの間の選択が行なわれる。当然のことながら、全幅ノードにつ
いては、追加のビットが必要ない。図12においては、半幅ノードが、ワード内
の右側もしくは左側にそろえられる2の半ワードとして示されている。代替的
には、半幅ノードはワードにそろえられ−2つ1組のエッジ・ペアに関して−2 方向ノードに関して2n―1のワードが要求される。
[0066]   Half-width nodes can be word aligned or half-width words aligned. to this
Of the bits from the data stream for full-width and half-width nodes
Allows consistent concatenation, where 1 bit for half-width nodes
Selects between the right half of the word and the left half of the word-that is, the half word
A selection between word and word alignment is made. Naturally, the full width node
However, no additional bits are needed. In FIG. 12, the half-width node is within the word
2 to the right or left ofnIs shown as a half word. Alternative
, The half-width nodes are word-aligned-2 for each pair of edges. n 2 for direction nodesn-1Is required.

【0067】 ギガビット・イーサネットに求められる速度をサポートするためには、すべて
のビット操作を単一段階で処理することが好ましい。これを達成するため、各エ
ッジはエッジが延びる先のノードのグループを識別する情報を含む。この追加の
情報は、前述の2ビットを含み、半幅ノードの場合には、さらにワードの右側半
分または左側半分を示す1ビットを含む。なお、ここでは、半ワードをそのサイ
ズによらずバイトと呼ぶことにする。半幅ノードがバイトにそろえられ、各状態
遷移に関してワードが読み出されることから、カレント・ノード用に適切なバイ
トを選択すると有利である。次に、それを行うための適切な方法を、図12を参
照して説明する。
To support the speed required for Gigabit Ethernet, it is preferable to process all bit operations in a single step. To accomplish this, each edge includes information identifying the group of nodes to which the edge extends. This additional information includes the two bits mentioned above and, in the case of half-width nodes, also one bit indicating the right or left half of the word. Note that here, a half word is called a byte regardless of its size. It is advantageous to select the appropriate byte for the current node since the half-width nodes are aligned with the bytes and the word is read for each state transition. A suitable method for doing that will now be described with reference to FIG.

【0068】 実質的に最適化されたメモリ使用を伴い、高速パケット分類をサポートできる
パケット分類の実施態様においては、次に示す分類ツリーのエッジの内容が使用
される:すなわち、「受け入れ」、「拒否」、および「ジャンプ」である。当然
のことながら、それ以外のオペレーションも可能である。オペレーションによっ
ては、多かれ少なかれビットが必要になり、したがって別のノードのグループを
必要とすることもある。
In a packet classification implementation that can support fast packet classification with substantially optimized memory usage, the following edge contents of the classification tree are used: “accept”, “accept”. "Reject" and "Jump". Of course, other operations are possible. Some operations may require more or less bits and thus another group of nodes.

【0069】 「受け入れ」は、パケットが分類されること−分類ツリーのリーフに到達する
こと−および分類されるパケットに関する適切なアクションが望まれていること
、を示す。いくつかの形式の適切なアクションの中には、分類タグをシステムま
たはユーザに渡すこと、パケットをあらかじめ決定済みのルーチンに渡すこと、
パケットを既知のアプリケーション用のアプリケーション・スタック上にプッシ
ュすること等が含まれる。パケット処理については、イーサネット通信の分野に
おいてよく知られている。
“Accept” indicates that the packet is classified—reaching the leaf of the classification tree—and that appropriate action on the classified packet is desired. Some of the appropriate actions of some form are passing the classification tag to the system or user, passing the packet to a predetermined routine,
Pushing packets onto the application stack for known applications, etc. Packet processing is well known in the field of Ethernet communication.

【0070】 「拒否」は、そのパケットが分類されるパケット・タイプでないことを示す。
そのため「適切な」アクションが行なわれることはないが、多くの状況において
は、望ましいとされるデフォルトのアクションがある。たとえば「拒否」タグを
システムまたはユーザに渡して、分類が成功しなかったことを示すことが挙げら
れる。
“Reject” indicates that the packet is not a classified packet type.
Therefore, no "proper" action is taken, but in many situations there is a default action that is desirable. For example, passing a "deny" tag to the system or user to indicate that the classification was not successful.

【0071】 「ジャンプ」は、カレント状態レジスタの内容に影響を及ぼす。事実上、この
オペレーションは、カレント・ノードの変更、したがってカレント状態の変更を
もたらす。「ジャンプ」オペレーションは、「ジャンプ」オペレーションを伴う
ワードに含まれているアドレスを状態レジスタにロードする。これは、状態の変
化−すなわち、分類ツリー内の別のノードへの変更をもたらす。その結果、メモ
リ・アクセスが実行されてエッジ情報が検索され、さらにレジスタからレジスタ
への転送が行なわれて新しい内容が状態レジスタにロードされる。本発明の履行
のために特別に設計されたパケット分類状態マシンを使用すれば、これらのアク
ションが現存する時間制約の中で容易に実行される。コマンドを完了するために
必要なコマンドおよびデータをデータと同じワード内に含めることによって、こ
のパフォーマンスが可能になる。
A “jump” affects the contents of the current state register. In effect, this operation results in a change of the current node and hence of the current state. The "jump" operation loads the address contained in the word with the "jump" operation into the status register. This results in a change of state-i.e. A change to another node in the classification tree. As a result, a memory access is performed to retrieve edge information, and a register-to-register transfer is performed to load the new contents into the status register. Using a packet classification state machine specifically designed for the implementation of the invention, these actions are easily performed within the existing time constraints. This performance is possible by including the command and data needed to complete the command in the same word as the data.

【0072】 図11は、メモリのワードの内容を示したテーブルである。全幅ノード内の各
ワードは、2w+2ビットを構成し、それにおいてwは、分類ツリー内−つまり
状態マシン内−のアドレスを表す上で充分な数のビットとする。このテーブルか
ら明らかなように、「受け入れ」コマンドを除けば、ほかのすべてのコマンドは
半ワード内に収まる。代替的には、wを超える数のビットにより一部のメモリ・
アドレスを表し、一部の「ジャンプ」オペレーションを全幅にする。これは、状
態マシンの最適化にとって重要である。図示のように、この幅は下位のビットを
含む必要がなく、それは分類されるデータ・ストリームから挿入される。
FIG. 11 is a table showing the contents of words in the memory. Each word in the full-width node comprises 2w + 2 bits, where w is a sufficient number of bits to represent the address in the classification tree—in the state machine. As is clear from this table, all other commands, except the "accept" command, fit within half a word. Alternatively, some memory
Represents an address and makes some "jump" operations full width. This is important for state machine optimization. As shown, this width need not include the low order bits, it is inserted from the data stream to be sorted.

【0073】 ここで、半幅ノードデータが隣接してストアされる場合−つまり、同一テーブ
ル内の2つのテーブル要素が単一ワードを形成する場合−は、データ・ストリー
ムからの最下位ビットがワードの右側または左側半分を示し、したがってそのビ
ットがロードされるまで、望ましい半ワードをロードするために必要なビット・
シフトまたは多重化のセットアップが開始できないことに触れておく必要がある
。それに代えて、与えられたノードに関係するすべてのエッジが右側もしくは左
側のバイトにストアされる場合には、半幅ノードのアドレスの最下位ビット、つ
まりデータ・ストリームから挿入されるものではない最下位ビットがワードの右
側または左側半分−それぞれ上位または下位−を示す。状態マシンのオペレーシ
ョンを容易にするためには、与えられたノードに関係するすべてのエッジを右側
または左側のバイトにストアし、最下位ビットに代えてノード・データ内のビッ
トを使用して右側または左側を識別することにより、データの読み出しの前にデ
ータ・パスのセットアップを開始することが可能になり、したがって全体的なパ
フォーマンスが向上することがわかった。
Here, if the half-width node data is stored contiguously—that is, if two table elements in the same table form a single word—the least significant bit from the data stream is the word. The bit needed to load the desired halfword until the right or left half is shown, thus loading that bit.
It should be noted that the shift or multiplexing setup cannot start. Alternatively, if all edges associated with a given node are stored in the right or left byte, the least significant bit of the half-width node address, that is, the least significant bit not inserted from the data stream. Bits indicate the right or left half of the word-upper or lower, respectively. To facilitate the operation of the state machine, all edges associated with a given node are stored in the right or left byte, and the bits in the node data are used in place of the least significant bit in the right or left byte. It has been found that identifying the left side allows the data path setup to begin prior to reading the data, thus improving overall performance.

【0074】 好ましくは、ノードが半幅であるか全幅であるか、あるいは無関係であるかの
表示が、その後に続いて生じる状態における使用のために登録され、ストアされ
る。メモリ内には、直接非循環型状態マシンのノード情報がストアされる。好ま
しくは、プロトコル記述が提供され、コンフィグレーションの間に、選択された
これらのプロトコルが分類ツリー内にコンパイルされ、最適化され、かつ状態マ
シン・デバイスのプログラム・メモリ内にストアされる。状態マシンのノードは
、次に示すフォーマットの2つを有し、結果的にそれは、4とおりの可能性のあ
るフォーマットを導く:すなわち全幅/半幅、および無関係/2方向、である
。これらのノード・フォーマットのそれぞれは、そのノードから延びるエッジの
情報をストアするためのフォーマットに関係付けされている。無関係ノードは、
続く状態ノードに向かう1つのエッジを有する。2方向ノードは、2個のエ
ッジを有する。全幅ノードは、各エッジに完全なワードが割り当てられるように
履行され、半幅ノードは、単一ワード内の2つのエッジのそれぞれに関係付けさ
れた情報をストアする。基本的に、半ワードもしくはそれより小さい情報を必要
とするエッジ情報もあれば、より多くを必要とするエッジ情報もある。あるノー
ドからの1つのエッジが、履行のために半ワードを超える情報を必要とする場合
には、そのノードからのすべてのエッジが全幅になる。それ以外の場合には、エ
ッジが半幅に最適化される。また、あるエッジからのすべてのエッジが等しい場
合には、ストレージが単一エッジに縮小される。当然のことながら、本発明の範
囲内において、これら以外のメモリ・ストレージの最適化を有するノード・タイ
プも可能である。
Preferably, an indication of whether the node is half-width, full-width, or irrelevant is registered and stored for subsequent use in subsequent states. The node information of the acyclic state machine is directly stored in the memory. Preferably, a protocol description is provided and during configuration these selected protocols are compiled into a classification tree, optimized and stored in the program memory of the state machine device. The state machine node has two of the following formats, which eventually lead to four possible formats: full width / half width and irrelevant / 2 n directions. Each of these node formats is associated with a format for storing information for edges extending from that node. Irrelevant nodes
It has one edge towards the following state node. A 2 n direction node has 2 n edges. Full-width nodes are implemented such that each edge is assigned a complete word, and half-width nodes store the information associated with each of the two edges in a single word. Basically, some edge information requires half a word or less, and some edge information requires more. If an edge from a node requires more than half a word of information for fulfillment, then all edges from that node are full width. Otherwise, the edge is optimized for half width. Also, if all edges from an edge are equal, the storage is reduced to a single edge. Of course, other node types with memory storage optimizations are possible within the scope of the invention.

【0075】 図12aを参照すると、本発明に従ったパケット分類データ・メモリのメモリ
・マップが示されている。メモリは、4つの領域に分割される。これらの領域は
、4とおりのフォーマットのノードをサポートする−すなわち、全幅ならびに半
幅の無関係ノード、および全幅ならびに半幅の2方向ノードである。各「ジャ
ンプ」インストラクションは、次のノードのタイプ−すなわち無関係/2方向
および全幅/半幅−を識別するための追加の2ビットを有する。半幅ノードの場
合には、追加の1ビットが用いられて、ワードにそろえるか右側にそろえる(半
ワードにそろえる)かが示される。
Referring to FIG. 12a, a memory map of a packet classification data memory according to the present invention is shown. The memory is divided into four areas. These regions support nodes in four formats-full width and half width irrelevant nodes, and full width and half width 2 n directional nodes. Each "jump" instruction has an additional 2 bits to identify the type of next node-i.e. Irrelevant / 2n directions and full width / half width. In the case of a half-width node, an additional 1 bit is used to indicate whether it is word aligned or right aligned (half word aligned).

【0076】 次に本発明に従った状態マシンのデータ表現の最適化について、図10b、1
0c、および10dの分類ツリー図を参照して説明する。結果として得られるメ
モリの内容は、それぞれ図12b、12c、および12dのようになる。分類ツ
リーのデータ構造が非常に小さいことから、この結果からメモリの節約効果を理
解することは難しい。たとえば、図4dを参照すると、2方向ツリーが2方向
ツリーより格段に多くのメモリを必要とするように見える。しかしながら、分析
を行うと、メモリ・スペースの多くが使用されていないことが明らかになる。大
きなツリーほどスペースをより効率的に使用する傾向にある。また、図10dの
ツリーにおいては全体的なノードの数が大きく減じられているが、対応するメモ
リ要件が類似であることに注意する必要がある。メモリの最適化を伴わない場合
には、図20bのツリーが50のエッジのためのストレージを必要とし、図10
dのツリーが64のエッジのためのストレージを必要とすることになる。したが
って、より多くのエッジを1ノード当たりに有するツリーの場合にも、類似のメ
モリ・ストレージ要件を維持すると好都合である。
Next, regarding optimization of the data representation of the state machine according to the invention, see FIGS.
Description will be given with reference to the classification tree diagrams of 0c and 10d. The resulting memory contents are as in Figures 12b, 12c, and 12d, respectively. Since the data structure of the classification tree is very small, it is difficult to understand the memory saving effect from this result. For example, referring to FIG. 4d, 2 3 directions tree appear to require significantly more memory than two directions tree. However, an analysis reveals that much of the memory space is unused. Larger trees tend to use space more efficiently. Also note that although the overall number of nodes is greatly reduced in the tree of FIG. 10d, the corresponding memory requirements are similar. Without memory optimization, the tree of FIG. 20b requires storage for 50 edges, and FIG.
The tree of d will require storage for 64 edges. Therefore, it is advantageous to maintain similar memory storage requirements even for trees that have more edges per node.

【0077】 図12b、12c、および12dのテーブルのそれぞれにおいては、半幅の無
関係ノードが太いラインの上側に、半幅の2方向ノードがそのラインの下側に
なっている。最初のノードが2方向ノードであることから、それぞれのテーブ
ルにおいて、太いラインの下側の左側(ワードそろえ)にある最初のアドレスに
それが示される。また、「受け入れ」オペレーションが全幅であるときは、メモ
リの全幅ノード・セクションが存在することになる。ここには4つのクラスしか
存在しないことから、半幅の「受け入れ」インストラクションがサポートされて
いる。
In each of the tables of FIGS. 12b, 12c, and 12d, the half-width irrelevant nodes are above the thick line and the half-width 2 n directional nodes are below the line. Since the first node is a 2 n directional node, it is shown at the first address on the left side (word justification) below the thick line in each table. Also, when the "accept" operation is full width, there will be a full width node section of memory. Since there are only four classes here, half-width "accept" instructions are supported.

【0078】 図12bを参照すると、この状態マシンは、アドレス00100xにおいて開
始している。xとして示した最下位ビットは、データ・ストリームから結合され
る。この結果、インストラクション−ここでは「拒否」または「ジャンプ」がも
たらされる。このインストラクションが検索されて実行される。
Referring to FIG. 12b, this state machine starts at address 00100x. The least significant bit, shown as x, is combined from the data stream. This results in an instruction-here "reject" or "jump". This instruction is retrieved and executed.

【0079】 本発明に従った分類状態マシンの簡略化したブロック図を図13に示す。この
状態マシンは、データ・ストリームからのデータの分類、特にデータ・パケット
の分類に有用である。図示のようにこの状態マシンは、単体の集積回路1100
内に集積化されている。集積回路1100は、プログラマブル・メモリ1110
、プロセッサ1130、およびプログラマブル・メモリ・アービタ1140を有
している。
A simplified block diagram of the classification state machine according to the present invention is shown in FIG. This state machine is useful for classifying data from a data stream, especially for classifying data packets. As shown, this state machine is a single integrated circuit 1100.
It is integrated within. Integrated circuit 1100 includes programmable memory 1110.
, Processor 1130, and programmable memory arbiter 1140.

【0080】 プログラマブル・メモリ1110には、高速スタティック・ランダム・アクセ
ス・メモリ(RAM)の形式とすることが好ましく、スタティックRAMは、高
速オペレーションのサポートを可能にするパフォーマンス速度を達成することが
できる。当然のことながら、低速オペレーション、たとえば10メガビット・イ
ーサネットのパケット分類状態マシンに必要な速度に関しては、周知のDRAM
回路を使用して、密度の増加とコストの削減を図ることができる。RAM 11
10は、ストリーム・データの分類に関係する情報−つまり分類ツリー・データ
−をストアするために備わる。言い換えれば、RAM 1110は、状態マシン
内の状態に関連するデータをストアするために備わるということになる。
The programmable memory 1110 is preferably in the form of high speed static random access memory (RAM), which can achieve performance speeds that enable support for high speed operations. Of course, with respect to slow operation, for example, the speed required for a 10 megabit Ethernet packet classification state machine, the well-known DRAM
The circuit can be used to increase density and reduce cost. RAM 11
10 is provided for storing information related to classification of stream data-classification tree data. In other words, RAM 1110 will be provided to store data related to the state in the state machine.

【0081】 たとえば、RAM 1110内には、各状態マシンのノードに関係付けされた
データがストアされる。データはテーブル内にストアされ、各テーブルは、テー
ブル・アドレスおよびテーブル・フォーマットを有する。プロセッサ1130は
、RAM 1110に対して、1状態遷移当たり1回のアクセスが可能である。
また、RAM 1110内の分類データへのアクセスにおいては、プロセッサ1
130が最高位の優先度を有する。これは、ほかのいかなるRAMアクセス・オ
ペレーションによっても状態マシンのパフォーマンスが影響されないことを保証
する。プログラマブル・メモリ・アービタ1140は、RAM 1110に対す
るアクセスをコントロールする。プログラマブル・メモリ・アービタ1140は
、RAM 1110の再プログラミングが状態マシンのパフォーマンスに影響を
与えないことを保証する。実際上、低速においてはアービタ1140がプロセッ
サに、それぞれの状態遷移ごとのRAM 1110に対する単一のアクセスを保
証する。より高速のデータ・レートの場合には、アービタが分類オペレーション
の進行中においてプロセッサ1130以外によるRAMアクセスを禁止する。こ
れは、基本的にプログラマブル・メモリ1110の再プログラミングを、状態マ
シンがディセーブルされて再プログラミングが可能になっているとき、あるいは
到来データが分類済みのパケットの一部であり、分類を必要とするパケットが存
在しないときに限定する。状態マシンは、一般にセキュリティ関連事項に起因し
てプログラマブル・メモリの内容に変更を必要とするセキュリティ・アプリケー
ション内において使用されるとき、再プログラミングを可能にするためにディセ
ーブルされる。
For example, in RAM 1110, data associated with each state machine node is stored. The data is stored in tables, each table having a table address and a table format. The processor 1130 can access the RAM 1110 once per state transition.
Further, in accessing the classification data in the RAM 1110, the processor 1
130 has the highest priority. This ensures that the state machine performance is not affected by any other RAM access operation. The programmable memory arbiter 1140 controls access to the RAM 1110. The programmable memory arbiter 1140 ensures that reprogramming the RAM 1110 does not impact the performance of the state machine. In effect, at low speeds, the arbiter 1140 guarantees the processor a single access to the RAM 1110 for each state transition. For higher data rates, the arbiter prohibits RAM access by anything other than the processor 1130 while the sort operation is in progress. This basically requires reprogramming of the programmable memory 1110 when the state machine is disabled and reprogramming is enabled, or when the incoming data is part of a classified packet and needs to be classified. Only when there is no packet to do. State machines are generally disabled to allow reprogramming when used within security applications that require changes to the contents of programmable memory due to security concerns.

【0082】 プロセッサ1130は、1状態遷移当たり1回を上限としてプログラマブル・
メモリ1110から情報を取り出す。好ましくは、分類の間、それぞれの状態遷
移ごとに、プログラマブル・メモリに対する単一のアクセスが発生する。当然の
ことながら、データが分類された後は、次のパケットが開始するまで、状態マシ
ンのオペレーションに休止が生じる。この休止の間に、RAMアービタ1140
がRAM 1110のプログラミングを許可する。したがって、非常に高速の場
合であっても状態マシンが完全にプログラマブルになる。
The processor 1130 is programmable by an upper limit of once per state transition.
Information is retrieved from the memory 1110. Preferably, during classification, a single access to the programmable memory occurs for each state transition. Of course, after the data has been sorted, there will be a pause in the operation of the state machine until the start of the next packet. During this pause, the RAM arbiter 1140
Allows programming of RAM 1110. Therefore, the state machine is fully programmable, even at very high speeds.

【0083】 プロセッサは、RAM 1110からデータを取り出し、そのデータを使用し
て次の状態を決定するためのオペレーションを実行し、続いて、そこで決定した
次の状態に状態マシンを切り替える。
The processor retrieves the data from RAM 1110 and uses that data to perform operations to determine the next state, which in turn switches the state machine to the next state determined there.

【0084】 ここでは、分類を表示するための少数のビットで「受け入れ」オペレーション
が提供されているが、いくつかある方法のいずれかを用いてこれを増加させるこ
とができる。第1の方法においては、分類に対するインデクスとなる値で「受け
入れ」オペレーションを履行し、それによって、長い分類コードを可能にする。
それに代えて、分類結果に関する追加のwビットを提供する全幅ノードを使用し
て「受け入れ」オペレーションを履行する。当然のことながら、これら2つの方
法を組み合わせることも可能である。
Although an “accept” operation is provided here with a small number of bits to indicate the classification, it can be increased using any of several methods. In the first method, an "accept" operation is performed with a value that is an index to the classification, thereby allowing a long classification code.
Instead, it implements the "accept" operation using a full width node that provides an additional w bit for the classification result. Of course, it is also possible to combine these two methods.

【0085】 好ましくは、アービタ1140が、プログラマブル・メモリ1110に対する
トランスペアレントなアクセスをプロセッサ1130に提供する。これは、プロ
セッサ1130からのメモリ・アクセスが可能性のあるオペレーションであると
き、プログラマブル・メモリ1110の再プログラミングに関するメモリ・アク
セス・オペレーションをブロックすることによって達成される。プロセッサ11
30に最高位の優先度が割り当てられていることから、プログラマブル・メモリ
1110に対するアクセスを試みているとき、それがブロックされないことは重
要である。それに代えて、ポート間を仲裁するそのほかの方法を使用することも
できる。
Arbiter 1140 preferably provides processor 1130 with transparent access to programmable memory 1110. This is accomplished by blocking the memory access operation for reprogramming the programmable memory 1110 when the memory access from the processor 1130 is a potential operation. Processor 11
Since 30 is assigned the highest priority, it is important that it not be blocked when attempting to access programmable memory 1110. Alternatively, other methods of arbitrating between ports can be used.

【0086】 当然のことながら、プロセッサによるプログラマブル・メモリ1110のアク
セスが1回の状態遷移について1回を超えて行なわれることがないことから、1
回の状態遷移について複数のRAMアクセスが可能な場合には、プロセッサにプ
ログラマブル・メモリ1110に対する1回のアクセスを割り当て、同一の状態
遷移においての残りのメモリ・アクセスの間にプログラマブル・メモリの再プロ
グラミングを実行することもできる。
As a matter of course, since the processor does not access the programmable memory 1110 more than once for each state transition,
If multiple RAM accesses are possible for one state transition, the processor is assigned one access to the programmable memory 1110 and the programmable memory is reprogrammed during the remaining memory accesses in the same state transition. Can also be executed.

【0087】 新しいパケット・データが検出されると、プロセッサに、分類オペレーション
を開始するための開始アドレスが提供される。この開始アドレスは、プログラマ
ブルであり、次に説明するように、プログラマブル・メモリの再プログラミング
の方法に従って使用される。
When new packet data is detected, the processor is provided with a starting address for initiating a sort operation. This starting address is programmable and is used in accordance with the method of reprogramming a programmable memory, as described next.

【0088】 本発明に従った使用のためのクロック・ソースは、アプリケーションに基づき
、またこの分野における現在の知識に基づいて選択される。クロック・ソースの
選択ならびに履行およびネットワークにより提供されるクロック・ソースに対し
てクロックを同期させる方法のそれは、通信ハードウエア設計の分野において周
知である。
The clock source for use in accordance with the present invention is selected based on the application and current knowledge in the field. It is well known in the field of communication hardware design to select and implement clock sources and methods of synchronizing clocks to clock sources provided by the network.

【0089】 高速ホストCPUもしくは埋め込みCPUに依存して、リアルタイムもしくは
近リアルタイムで各フレームを調べる従来的なギガビット・イーサネットのため
のソリューションとは異なり、本発明はギガビット・レートへのスケーリングが
容易である。ポート当たりの速度が10倍のCPUは経済的ではない。さらに、
要求されるプロセッシング速度は、分類評価基準の複雑性に伴って変化する。本
発明に従えば、これらの制限がない。
Unlike conventional solutions for Gigabit Ethernet, which rely on a high-speed host CPU or embedded CPU to examine each frame in real time or near real time, the present invention is easy to scale to Gigabit rates. . A CPU with 10 times the speed per port is not economical. further,
The required processing speed varies with the complexity of the classification criteria. According to the invention, there are no such restrictions.

【0090】 別の実施態様においては、10メガビット・イーサネットのパケット分類状態
マシンを履行するとき、複数のプロセッサが同一のプログラマブル・メモリ11
10を使用する。これを図14に示す。結果として得られるシステムは、複数の
プロセッサ1130および単一のプログラマブル・メモリ1110を有する。各
状態マシンは、異なる分類ツリー構造に従って、同時的にデータの分類を行う。
それに代えて、いくつかのプロセッサが同一の分類ツリー構造に従うこともある
。また、各プロセッサに関連付けされている分類データは、独立にプログラムす
ることができる。
In another embodiment, when implementing a packet classification state machine for a 10 Megabit Ethernet, multiple processors have the same programmable memory 11
Use 10. This is shown in FIG. The resulting system has multiple processors 1130 and a single programmable memory 1110. Each state machine simultaneously classifies data according to different classification tree structures.
Alternatively, several processors may follow the same classification tree structure. Also, the classification data associated with each processor can be independently programmed.

【0091】 プログラマブル・メモリ1110の再プログラミングは、変更に関係する新し
いテーブル・データを、1ないしは複数の状態マシンの分類ツリー構造内におい
て、ツリー内の現存するノードからツリーのルートに向かって追加していくこと
により達成することができる。その後、ルート・アドレスを開始アドレスとして
、その状態マシンを実行するプロセッサに供給する。プログラマブル・メモリ1
110内にストアされたテーブルが、いずれのプロセッサによっても使用されな
くなったとき、その後に続く再プログラミングの間に、それらのメモリ・ロケー
ションを再使用する。このようにして現存するプログラミング・オペレーション
もしくは現存する分類オペレーションに影響を及ぼすことなく、状態マシンのオ
ペレーションの間のプログラミングが可能になる。
Reprogramming of the programmable memory 1110 adds new table data related to the change from the existing node in the tree to the root of the tree within the classification tree structure of one or more state machines. It can be achieved by going down. It then supplies the root address as the starting address to the processor executing that state machine. Programmable memory 1
When the tables stored in 110 are no longer used by any processor, they will reuse their memory locations during subsequent reprogramming. In this way programming is possible during the operation of the state machine without affecting existing programming operations or existing classification operations.

【0092】 上記の理由から、分類データ・テーブルの生成および最適化プロセスを可能な
限り自動化することが重要である。自動化された後は、パケット分類の明細が、
手順という意味において重要でなくなり、パターン・マッチングのプロセスとな
る。本質的に、ツリー構造は、パケット分類プログラム・コンパイラの問題とし
て残される。当然のことながら、2つのクラス−すなわち「受け入れ」および「
拒否」−を伴うパケット分類と考えられるフィルタリングにも同様のシステムを
適用することができる。
For the above reasons, it is important to automate the generation and optimization process of the classification data table as much as possible. After being automated, the packet classification details are
It becomes less important in the sense of procedure and becomes the process of pattern matching. In essence, the tree structure remains a problem for packet classifier compilers. Not surprisingly, there are two classes-ie "acceptance" and "acceptance".
A similar system can be applied to filtering considered packet classification with "deny"-.

【0093】 本発明に従ったメモリの最適化テクニックを適用することにより、かなりのメ
モリの最適化がもたらされる。これは、本発明に従った集積化プログラマブル・
パケット分類状態マシンの履行を可能にする。妥当なパフォーマンスおよびコス
トを達成するためには、テーブルを、表現グループから1つの最小表現に圧縮す
ることによって、生成されたテーブル・データを最適化することが有用である。
当然のことながら、望ましい場合には、別の表現が使用される。また、個々のア
プリケーションに応じて、より高い最適化もしくはより低い最適化が使用される
ことになる。
Applying the memory optimization technique according to the invention leads to a considerable memory optimization. This is an integrated programmable
Enables implementation of packet classification state machine. In order to achieve reasonable performance and cost, it is useful to optimize the generated table data by compressing the table from a group of expressions into one minimal expression.
Of course, other expressions are used if desired. Also, higher or lower optimizations will be used depending on the particular application.

【0094】 好ましくは、コンパイラ・ソフトウエアがプログラマブル・メモリ内にデータ
のイメージを維持し、使用中のメモリおよび、いずれの状態マシンの分類データ
の一部でもなくなったメモリ・ロケーションを決定する。この方法においては、
メモリの内容が陳腐化したとき、そのメモリの再使用を可能にすることによって
、メモリのオーバーフローの頻度が抑えられる。このことは単純に考えられるが
、本発明がインクリメンタル・プログラミングをサポートし、プログラム・メモ
リが複数のプロセッサをサポートし得るからであり、メモリ割り当てを自動的に
追跡する上で非常に役立つ。
Preferably, the compiler software maintains an image of the data in programmable memory to determine the memory in use and memory locations that are no longer part of the classification data for any state machine. In this way,
By allowing the memory to be reused when the contents of the memory become obsolete, the frequency of memory overflow is reduced. This is simply possible, but because the present invention supports incremental programming and the program memory can support multiple processors, it is very useful in automatically tracking memory allocations.

【0095】 好ましい実施態様においては、1回の状態遷移において、プログラマブル・メ
モリに対するプロセッサによる単一のアクセスを使用しているが、プログラマブ
ル・メモリに対する不必要なアクセスが、たとえばカウンタを用いて置換される
態様においても、本発明を履行することができる。つまり4つの「無関係」状態
が連続する場合には、カウント・コマンドにカウント数「4」および次のアドレ
スがロードされる。カウンタが指定数のカウントを完了するごとに、プログラマ
ブル・メモリ内の次のアドレスからデータが取り出される。1つの「無関係」に
対しては、これにより1つのメモリ・アクセスが排除される。
Although the preferred embodiment uses a single access by the processor to the programmable memory in a single state transition, unnecessary accesses to the programmable memory are replaced, for example using a counter. The present invention can also be implemented in this mode. That is, if four "irrelevant" states are consecutive, the count command is loaded with the count number "4" and the next address. Data is fetched from the next address in the programmable memory each time the counter completes the specified number of counts. For one "irrelevant", this precludes one memory access.

【0096】 当業者にとっては明らかであろうが、プログラマブル・メモリは、状態マシン
のプロセッサにより、読み出しを目的としてアクセスされる。状態マシンのプロ
セッサがプログラマブル・メモリに書き込みを行うことはない。それに対し、プ
ログラマブル・メモリのプログラミングは、書き込みオペレーションのみを必要
とする。したがって、書き込みアクセスと読み出しアクセスが分離された−つま
りデュアル・ポートの−メモリが、本発明に適している。さらに別の実施態様に
おいては、真のデュアル・ポート・メモリが使用されて、メモリの仲裁が必要な
くなるか、あるいはメモリ回路内に備えられる。代替的には、プロセッサがプロ
グラマブル・メモリに対する読み出しアクセスを有している間に、プログラミン
グおよび診断が、プログラマブル・メモリに対する読み出し書き込みアクセスを
使用する。
As will be appreciated by those skilled in the art, programmable memory is accessed by the state machine processor for read purposes. The state machine processor never writes to programmable memory. In contrast, programmable memory programming requires only write operations. Therefore, separate write access and read access—ie dual ported—is suitable for the present invention. In yet another embodiment, true dual port memory is used, eliminating the need for memory arbitration or providing it in memory circuitry. Alternatively, programming and diagnostics use read-write access to the programmable memory while the processor has read access to the programmable memory.

【0097】 好ましくは、ASIC等のカスタムIC内に本発明が履行される。たとえば、
ギガビット・データ・レートに移行するとき、分類プロセスによって拒否される
フレームのより効率的な処理が、MAC内の分類システムを統合することによっ
て達成される。「拒否」の決定が行われた後は、MACがホスト・メモリ内へ到
来するフレームのDMAを停止し、あるいはDMAがまだ開始していなければ、
そのキューからそのフレームをフラッシュする。続いてドライバ・ソフトウエア
をまったく伴うことなく同一の受け取り記述子を使用し、それによりホストのバ
ス上におけるトラフィックを低減する。
Preferably, the present invention is implemented in a custom IC such as an ASIC. For example,
When moving to gigabit data rates, more efficient handling of frames rejected by the classification process is achieved by integrating the classification system within the MAC. After the "deny" decision is made, the MAC stops DMA for frames arriving in host memory, or if DMA has not started yet,
Flush that frame from that queue. It then uses the same receive descriptor without any driver software, thereby reducing traffic on the host's bus.

【0098】 本発明に従った方法をMAC内に統合する利点は、このほかにもいくつか存在
する。それには:ホスト・ブリッジを除去し、MACのインターフェースを介し
てパターン・メモリをロードすることによりホスト・バスの負荷を抑える;結合
関係が自明であることから、個別の分類コンポーネントを使用する場合に必要と
なるような分類結果とリング記述子を関連付けするためのストレージがまったく
不要になる;さらには、受け取りリング記述子が、ドライバの希望する任意の場
所にロケートされることから、キャッシュの恩典が最大化されるといったことが
挙げられる。
There are several other advantages of integrating the method according to the invention in the MAC. To do this: Remove the host bridge and load the pattern memory through the interface of the MAC to reduce the load on the host bus; No storage is needed to associate the ring descriptor with the sort result as needed; in addition, the receive ring descriptor is located anywhere in the driver's wishes, thus benefiting from the cache. It can be maximized.

【0099】 代替的には、FPGA内において履行する場合には、好ましくは設計が、使用
するタイプのFPGA内の履行に最適化される。
Alternatively, when implemented in an FPGA, the design is preferably optimized for implementation in the type of FPGA used.

【0100】 また、「無関係」マスクを使用する「無関係」ビットを履行することも可能で
あり、その結果、個々のビットが「関係あり」ビットとなり、そのほかが「無関
係」ビットになる。これは、「無関係」ビットがテーブル要素のデータのいずれ
かの側に落ちるとき、単純な問題である。テーブル要素のデータ値の中間におけ
るビットに関してこの機能を履行するときは、ビットを適切に、かつ互いに隣接
させてそろえるために、マスク・データに応じてシフト・オペレーションを実行
する。分類状態マシンに求められる速度から、この種のシフト・オペレーション
には、かなりのハードウエアが必要となる可能性がある。このアプローチを使用
するとき、32ビットのパケット分類エンジンの場合であれば、単一の「無関係
」ビットで231の可能性が排除される。
It is also possible to implement "irrelevant" bits using an "irrelevant" mask, so that individual bits are "relevant" bits and the others are "irrelevant" bits. This is a simple problem when the "irrelevant" bits fall on either side of the table element's data. When performing this function for bits in the middle of a table element's data value, a shift operation is performed depending on the mask data in order to align the bits properly and adjacent to each other. Due to the speed required of the classification state machine, this type of shift operation can require significant hardware. Using this approach, a single "don't care" bit eliminates 2 31 possibilities for a 32-bit packet classification engine.

【0101】 本発明の精神ないしは範囲から逸脱することなく、このほかにも多数の本発明
の実施態様が考えられる。
Numerous other embodiments of the invention are possible without departing from the spirit or scope of the invention.

【図面の簡単な説明】[Brief description of drawings]

以下、例として示す本発明の実施態様について添付図面との関連から説明する
Embodiments of the present invention will be described below by way of example with reference to the accompanying drawings.

【図1aおよび1b】 従来技術に従った分類状態マシンに関する簡略化した状態図である。1a and 1b:   FIG. 6 is a simplified state diagram for a classification state machine according to the prior art.

【図1c】 本発明に従った分類状態マシンに関する簡略化した状態図である。[Fig. 1c]   FIG. 6 is a simplified state diagram for a classification state machine according to the present invention.

【図2】 本発明に従った、実行間における状態マシンの再プログラミングの方法を示す
簡略化したフローチャートである。
FIG. 2 is a simplified flowchart illustrating a method of reprogramming a state machine during execution according to the present invention.

【図3】 本発明に従った、実行間における複数の状態マシンの再プログラミングの方法
を示す簡略化したフローチャートである。
FIG. 3 is a simplified flowchart illustrating a method of reprogramming multiple state machines during execution in accordance with the present invention.

【図4】 非常に簡略化した状態マシンの簡略化した状態図である。[Figure 4]   FIG. 7 is a simplified state diagram of a highly simplified state machine.

【図5】 図4に示した非常に簡略化した状態マシンの、修正を伴う簡略化した状態図で
ある。
FIG. 5 is a simplified state diagram with modifications of the highly simplified state machine shown in FIG.

【図6】 図4および図5に示した状態マシンの組み合わせを示した簡略化した状態図で
ある。
FIG. 6 is a simplified state diagram showing a combination of the state machines shown in FIGS. 4 and 5.

【図7】 本発明に従ったメモリ回復の方法を示した簡略化したフローチャートである。[Figure 7]   6 is a simplified flowchart illustrating a method of memory recovery according to the present invention.

【図8】 本発明の方法を説明するための循環状態マシンの、簡略化した状態図である。[Figure 8]   FIG. 3 is a simplified state diagram of a circular state machine for explaining the method of the present invention.

【図9aおよび9b】 従来技術に従った分類状態マシンに関する簡略化した状態図である。9a and 9b.   FIG. 6 is a simplified state diagram for a classification state machine according to the prior art.

【図10a】 4つの分類の1つ、すなわちA、B、C、またはDとしてパケットを分類する
ための簡略化したパケット記述子を示している。
FIG. 10a shows a simplified packet descriptor for classifying a packet as one of four classifications: A, B, C, or D.

【図10b】 図10aに示したパケット分類のための分類ツリーを示す簡略図である。FIG. 10b   FIG. 11 is a simplified diagram showing a classification tree for the packet classification shown in FIG. 10a.

【図10c】 1記号当たり2ビットを使用する、図10bに示した分類ツリーと等価な分類
ツリーを示している。
FIG. 10c shows a classification tree equivalent to the classification tree shown in FIG. 10b, using 2 bits per symbol.

【図10d】 1記号当たり3ビットを使用する、図10bに示した分類ツリーと等価な分類
ツリーを示している。
FIG. 10d shows a classification tree equivalent to the classification tree shown in FIG. 10b, using 3 bits per symbol.

【図11】 本発明に従った状態マシンの一例とする実施態様に関するメモリ使用およびオ
ペコードを示したテーブルである。
FIG. 11 is a table showing memory usage and opcodes for an exemplary implementation of a state machine in accordance with the present invention.

【図12a】 本発明に従った状態マシン・メモリに関する簡略化したメモリ・マップである
FIG. 12a is a simplified memory map for state machine memory according to the present invention.

【図12b】 図10bの分類ツリーに関して履行される分類ツリー用のアドレス・テーブル
である。
12b is an address table for the classification tree implemented for the classification tree of FIG. 10b.

【図12c】 図10cの分類ツリーに関して履行される分類ツリー用のアドレス・テーブル
である。
12c is an address table for a classification tree implemented for the classification tree of FIG. 10c.

【図12d】 図10dの分類ツリーに関して履行される分類ツリー用のアドレス・テーブル
である。
12d is an address table for a classification tree implemented for the classification tree of FIG. 10d.

【図13】 本発明に従った非循環分類状態マシンの集積回路履行を示した簡略化したブロ
ック図である。
FIG. 13 is a simplified block diagram illustrating an integrated circuit implementation of an acyclic classification state machine according to the present invention.

【図14】 単一の同一プログラマブル分類データ・メモリを使用する複数の状態マシンを
履行する、本発明に従ったシステムの簡略化したブロック図である。
FIG. 14 is a simplified block diagram of a system in accordance with the invention that implements multiple state machines using a single identical programmable classification data memory.

───────────────────────────────────────────────────── フロントページの続き (31)優先権主張番号 09/459,460 (32)優先日 平成11年12月13日(1999.12.13) (33)優先権主張国 米国(US) (81)指定国 EP(AT,BE,CH,CY, DE,DK,ES,FI,FR,GB,GR,IE,I T,LU,MC,NL,PT,SE),OA(BF,BJ ,CF,CG,CI,CM,GA,GN,GW,ML, MR,NE,SN,TD,TG),AP(GH,GM,K E,LS,MW,SD,SL,SZ,TZ,UG,ZW ),EA(AM,AZ,BY,KG,KZ,MD,RU, TJ,TM),AE,AG,AL,AM,AT,AU, AZ,BA,BB,BG,BR,BY,CA,CH,C N,CR,CU,CZ,DE,DK,DM,DZ,EE ,ES,FI,GB,GD,GE,GH,GM,HR, HU,ID,IL,IN,IS,JP,KE,KG,K P,KR,KZ,LC,LK,LR,LS,LT,LU ,LV,MA,MD,MG,MK,MN,MW,MX, NO,NZ,PL,PT,RO,RU,SD,SE,S G,SI,SK,SL,TJ,TM,TR,TT,TZ ,UA,UG,US,UZ,VN,YU,ZA,ZW─────────────────────────────────────────────────── ─── Continued front page    (31) Priority claim number 09 / 459,460 (32) Priority date December 13, 1999 (December 13, 1999) (33) Priority claiming countries United States (US) (81) Designated countries EP (AT, BE, CH, CY, DE, DK, ES, FI, FR, GB, GR, IE, I T, LU, MC, NL, PT, SE), OA (BF, BJ , CF, CG, CI, CM, GA, GN, GW, ML, MR, NE, SN, TD, TG), AP (GH, GM, K E, LS, MW, SD, SL, SZ, TZ, UG, ZW ), EA (AM, AZ, BY, KG, KZ, MD, RU, TJ, TM), AE, AG, AL, AM, AT, AU, AZ, BA, BB, BG, BR, BY, CA, CH, C N, CR, CU, CZ, DE, DK, DM, DZ, EE , ES, FI, GB, GD, GE, GH, GM, HR, HU, ID, IL, IN, IS, JP, KE, KG, K P, KR, KZ, LC, LK, LR, LS, LT, LU , LV, MA, MD, MG, MK, MN, MW, MX, NO, NZ, PL, PT, RO, RU, SD, SE, S G, SI, SK, SL, TJ, TM, TR, TT, TZ , UA, UG, US, UZ, VN, YU, ZA, ZW

Claims (55)

【特許請求の範囲】[Claims] 【請求項1】 少なくとも1つの状態マシンの状態および状態マシンの遷移
に関係するプログラミング・データをストアするためのプログラム・メモリ;お
よび、 全体のロケーションに対するデータの原子性書き込みオペレーションと似原子
性書き込みオペレーションのうちの一方をサポートし、かつ、プログラマブル・
メモリ内にストアされた状態マシンのプログラミングの開始アドレスを示すデー
タであって、前記状態マシンの動作の間に再プログラミングが可能な開始アドレ
スを示すデータをストアするための開始アドレス・メモリ・ロケーション; を包含することを特徴とする再プログラミング可能状態マシン。
1. A program memory for storing programming data relating to at least one state machine state and state machine transitions; and atomic and near atomic write operations of data to an entire location. One of which is programmable
A start address memory location for storing data indicating a start address for programming the state machine stored in memory, the start address being capable of being reprogrammed during operation of the state machine; A reprogrammable state machine comprising:
【請求項2】 開始アドレスを示すデータは、状態マシン内における実行の
ための第1の状態に関係するデータのアドレスを示すデータを含む、求項1記載
の再プログラミング可能状態マシン。
2. The reprogrammable state machine of claim 1, wherein the data indicative of the starting address comprises data indicative of an address of data associated with the first state for execution within the state machine.
【請求項3】 プグラム・メモリと分離され、状態マシンの実行間にその中
にストアされた状態マシンに関するカレント状態アドレスを持つカレント状態ア
ドレス・レジスタを有する、請求項2記載の再プログラミング可能状態マシン。
3. The reprogrammable state machine of claim 2 having a current state address register separate from the program memory and having a current state address for the state machine stored therein during execution of the state machine. .
【請求項4】 状態マシン内における実行のための第1の状態に関係するデ
ータは、状態マシンに対して読み出し専用となるメモリ内にストアされる、請求
項2記載の再プログラミング可能状態マシン。
4. The reprogrammable state machine of claim 2, wherein data associated with the first state for execution in the state machine is stored in memory that is read-only to the state machine.
【請求項5】 それぞれの新しい状態に関係するデータが前記新しい状態に
関する状態アドレスにストアされ、新しい第1の状態に関係するデータが新しい
第1の状態アドレスにストアされ、かつデータは、状態マシンによって占有され
ていないストレージ・ロケーション内に、状態マシンの実行間にストアする、プ
ログラム・メモリ内にデータをストアするための手段;および、 それぞれの新しい状態に対応するデータがストアされた後、開始アドレス・メ
モリ・ロケーション内の開始アドレスを示すデータを新しい開始アドレスを示す
データに置き換えるための手段; を有する、請求項2記載の再プログラミング可能状態マシン。
5. Data associated with each new state is stored at a state address for the new state, data associated with a new first state is stored at a new first state address, and the data is a state machine. Means for storing data in program memory, stored during execution of the state machine, in a storage location not occupied by; and after the data corresponding to each new state has been stored 3. The reprogrammable state machine of claim 2, further comprising: means for replacing data indicating a starting address in the address memory location with data indicating a new starting address.
【請求項6】 カレント状態アドレスをストアするためのカレント状態アド
レス・レジスタを有する、請求項5記載の再プログラミング可能状態マシン。
6. The reprogrammable state machine of claim 5 having a current state address register for storing a current state address.
【請求項7】 カレント状態アドレスに、開始アドレス・メモリ・ロケーシ
ョンの内容に基づくアドレスをロードすることによって状態マシンの再実行が開
始する、請求項6記載の再プログラミング可能状態マシン。
7. The reprogrammable state machine of claim 6, wherein re-execution of the state machine is initiated by loading the current state address with an address based on the contents of the starting address memory location.
【請求項8】 新しい開始アドレスを示すデータは、状態マシン内における
実行のための第1の状態に関係するデータのアドレスを包含する、請求項7記載
の再プログラミング可能状態マシン。
8. The reprogrammable state machine of claim 7, wherein the data indicative of the new starting address comprises an address of data associated with the first state for execution within the state machine.
【請求項9】 カレント状態アドレスに、開始アドレス・メモリ・ロケーシ
ョン内に前もってストアされたアドレスをロードすることによって状態マシンの
再実行が開始する、請求項8記載の再プログラミング可能状態マシン。
9. The reprogrammable state machine of claim 8, wherein re-execution of the state machine is initiated by loading the current state address with an address previously stored in a starting address memory location.
【請求項10】 置換される第1の状態アドレスがポイントする状態を決定
するステップ;と、繰り返し実行される次に示すステップ:とを有し、 前記繰り返し実行されるステップは、 前記決定された状態に関連付けされたカウンタをデクリメントするステップ
;および、 前記カウンタがゼロになったとき、その状態に関連付けされたデータが占有
されていないものと決定し、前記決定された状態内のデータによってポイントさ
れる状態を、決定された状態として選択するステップ; を包含する、請求項1記載の動作方法。
10. A step of determining a state pointed to by a first state address to be replaced; and a step of repeatedly executing the following: wherein the step of repeatedly executing the determined Decrementing the counter associated with the state; and, when the counter reaches zero, determines that the data associated with the state is unoccupied and is pointed to by the data in the determined state. The method according to claim 1, further comprising: selecting a state to be determined as the determined state.
【請求項11】 各状態マシン内の状態に関係するデータを状態アドレスに
ストアするためのプログラム・メモリと; 各初期状態アドレス・メモリ・ロケーションが複数の状態マシンのうちから1
つの状態マシンの第1の状態アドレスをストアする、複数の初期状態アドレス・
メモリ・ロケーションと; それぞれの新しい状態に関係するデータを前記新しい状態に関する状態アドレ
スにストアし、新しい第1の状態に関係するデータを新しい第1の状態アドレス
にストアし、複数の状態マシンのいずれかの一部を形成するデータによって占有
されていないストレージ・ロケーション内にストアされるデータをストアする、
プログラム・メモリ内にデータをストアするための手段と; それぞれの新しい状態に対応するデータがストアされた後、原子性もしくは疑
似原子性の態様において、第1の状態アドレス・ロケーション内に、新しい第1
の状態アドレスをストアするための手段と; を包含する、複数の状態マシンによる同時的な使用のための再プログラミング
可能状態マシンのメモリ。
11. A program memory for storing state-related data in each state machine at a state address; each initial state address memory location being one of a plurality of state machines.
Multiple initial state addresses that store the first state address of one state machine
A memory location; data associated with each new state is stored at a state address for the new state, data associated with a new first state is stored at a new first state address, and Stores data that is stored in a storage location that is not occupied by data that forms part of
Means for storing data in program memory; after the data corresponding to each new state has been stored, a new first state address location, in atomic or pseudo-atomic manner, is stored. 1
Means for storing the state address of the reprogrammable state machine for simultaneous use by multiple state machines, including;
【請求項12】 原子性もしくは疑似原子性の態様は、新しい第1の状態ア
ドレスのストアの間に第1の状態アドレス・ロケーションを読み出すためのオペ
レーションを排除する態様のものとして定義される、請求項11記載の再プログ
ラミング可能状態マシン。
12. An atomic or pseudo-atomic aspect is defined as one that eliminates operations for reading a first state address location during a store of a new first state address. Item 11. The reprogrammable state machine of item 11.
【請求項13】 それぞれが複数の状態マシンのそれぞれの状態マシンに関
連付けされ、関連付けされた状態マシンのカレント状態アドレスをストアするた
めの複数のカレント状態アドレス・レジスタを備えた、請求項11記載の再プロ
グラミング可能状態マシン。
13. The method of claim 11, comprising a plurality of current state address registers, each associated with a respective state machine of the plurality of state machines, for storing a current state address of the associated state machine. Reprogrammable state machine.
【請求項14】 複数の状態マシンのうちの1つの状態マシンの再実行が、
前記状態マシンに関連付けされた前記カレント状態アドレス・レジスタに、前記
状態マシンに関連付けされた初期状態アドレス・メモリ・ロケーションの内容に
基づくアドレスをロードすることによって開始する、ことを特徴とする請求項1
3記載の再プログラミング可能状態マシン。
14. Re-execution of one of the state machines comprises:
2. Starting by loading the current state address register associated with the state machine with an address based on the contents of an initial state address memory location associated with the state machine.
A reprogrammable state machine as described in 3.
【請求項15】 複数の状態マシンのうちの1つの状態マシンの再実行が、
前記状態マシンに関連付けされたカレント状態アドレス・レジスタに、初期状態
アドレス・メモリ・ロケーション内に前もってストアされたアドレスをロードす
ることによって開始する、請求項14記載の再プログラミング可能状態マシン。
15. Re-execution of one of the state machines comprises:
15. The reprogrammable state machine of claim 14, starting by loading a current state address register associated with the state machine with an address previously stored in an initial state address memory location.
【請求項16】 1つの新しい第1の状態を含み、それぞれの新しい状態に
到達可能なすべての状態に対応するデータを含む、それぞれの新しい状態に対応
するデータを提供するステップと; 新しい状態に関する状態アドレスにストアされたそれぞれの新しい状態に関係
するデータ、現在実行中の状態マシンを伴う使用に関するデータによって占有さ
れていないストレージ・ロケーション内にストアされるデータ、をプログラム・
メモリ内にストアするステップと; 現在実行中の状態マシンを伴う使用に関するデータによって占有されていない
ストレージ・ロケーション内にストアされる、新しい第1の状態に関係するデー
タを新しい第1の状態アドレスにストアするステップと; それぞれの新しい状態に対応するデータがストアされた後、第1の状態アドレ
ス・ロケーション内のデータを新しい第1の状態アドレスを示すデータに、原子
的もしくは疑似原子的に置き換えるステップと; を包含する、複数のストレージ・ロケーションおよび第1の状態アドレス・ス
トレージ・ロケーションを有する状態マシン・メモリを再プログラミングする方
法。
16. Providing data corresponding to each new state, including one new first state, including data corresponding to all states reachable to each new state; Program the data associated with each new state stored at the state address, the data stored in a storage location not occupied by the data associated with the currently running state machine.
Storing in memory; a new first state related data stored at a new first state address stored in a storage location not occupied by data for use with a currently executing state machine. Storing ;; after the data corresponding to each new state is stored, atomically or pseudo-atomically replacing the data in the first state address location with the data indicating the new first state address. And ;; a method of reprogramming a state machine memory having a plurality of storage locations and a first state address storage location.
【請求項17】 原子的および疑似原子的は、新しい第1の状態アドレスの
ストアの間に第1の状態アドレス・ロケーションを読み出すためのオペレーショ
ンを排除する態様におけるものとして定義される、請求項16記載の方法の再プ
ログラミング可能状態マシン。
17. Atomic and pseudo-atomic are defined as in a manner that precludes operations for reading a first state address location during a store of a new first state address. A reprogrammable state machine of the described method.
【請求項18】 状態マシンは非循環型であり、それにおいて新しい状態は
、前記新しい状態に先行する状態から到達可能である、ことを特徴とする前記請
求項16記載の方法。
18. The method of claim 16 wherein the state machine is acyclic, where the new state is reachable from the states preceding the new state.
【請求項19】 状態マシンの再プログラミングが、状態マシンの実行間に
行なわれる、請求項16記載の方法。
19. The method of claim 16, wherein reprogramming the state machine is performed during execution of the state machine.
【請求項20】 状態マシンの再プログラミングが、状態マシンの実行の中
断を伴うことなく行なわれる、請求項19記載の方法。
20. The method of claim 19, wherein reprogramming the state machine is performed without interrupting execution of the state machine.
【請求項21】 状態マシン・メモリは、複数の状態マシンによる同時的な
使用のためのものであり、それにおいて複数の状態マシンのうちの第1の状態マ
シンのプログラミングは、前記複数の状態マシンのうちの第2の状態マシンのプ
ログラミングと同じである、請求項19記載の方法。
21. The state machine memory is for simultaneous use by multiple state machines, wherein programming of a first state machine of the multiple state machines is performed by the plurality of state machines. 20. The method of claim 19, which is the same as programming the second state machine of the.
【請求項22】 状態マシン・メモリは、複数の状態マシンによる同時的な
使用のためのものであり、それにおいて複数の状態マシンのうちの第1の状態マ
シンのプログラミングは、前記複数の状態マシンのうちの第2の状態マシンのプ
ログラミングと異なる、請求項16記載の方法。
22. The state machine memory is for simultaneous use by a plurality of state machines, wherein programming of a first state machine of the plurality of state machines is performed by the plurality of state machines. 17. The method of claim 16 different from programming the second state machine of the.
【請求項23】 状態マシン・メモリは、複数の状態マシンによる同時的な
使用のためのものであり、それにおいて複数の状態マシンのうちの1つの状態マ
シンのプログラミングは、前記複数の状態マシンの実行間に、前記複数の状態マ
シンのうちの、ほかのいずれの状態マシンの実行の中断も伴うことなく行なわれ
る、請求項16記載の方法。
23. The state machine memory is for simultaneous use by multiple state machines, wherein programming of one of the multiple state machines is performed by the state machine memory. 17. The method of claim 16, wherein the method is performed during execution without interruption of execution of any other state machine of the plurality of state machines.
【請求項24】 状態マシン・メモリは、複数の状態マシンによる同時的な
使用のためのものであり、それにおいて前記複数の状態マシンのうちの1つの状
態マシンのプログラミングは、前記複数の状態マシンの実行間に、前記複数の状
態マシンのうちの、いずれの状態マシンの実行の中断も伴うことなく行なわれる
、請求項16記載の方法。
24. The state machine memory is for simultaneous use by multiple state machines, wherein programming of one of the multiple state machines is performed by the multiple state machines. 17. The method of claim 16, wherein the method is performed without interruption of execution of any of the state machines of the plurality of state machines during execution of.
【請求項25】 状態マシン・メモリは、複数の状態マシンによる同時的な
使用のためのものであり、それにおいて前記複数の状態マシンのうちの1つの状
態マシンのプログラミングの間に、前記複数の状態マシンのうちの別の状態マシ
ンに関係するデータが変更されずに残される、請求項16記載の方法。
25. The state machine memory is for simultaneous use by multiple state machines, wherein the plurality of state machines are programmed during programming of one of the state machines. 17. The method of claim 16, wherein data related to another of the state machines is left unchanged.
【請求項26】 コンピュータ上にカレント状態マシン・メモリのイメージ
を提供するステップと; 状態マシンのプログラミングを変更するステップと; カレント状態マシン内における修正された状態を決定するステップと; 1つの新しい第1の状態を含めて、前記修正された状態に到達し得る状態を決
定するステップと; 実行中の状態マシンに関連付けされたデータによって占有されていないカレン
ト状態マシン・メモリ内のメモリ・ロケーションを決定するステップと; 実行中の状態マシンに関連付けされたデータによって占有されていないカレン
ト状態マシン・メモリ内のメモリ・ロケーションにストアし、再プログラミング
・データを形成するために、修正された状態および前記修正された状態に先行す
る状態をコンパイルするステップと; 再プログラミング・データを、実行中の状態マシンに関連付けされたデータに
よって占有されていないカレント状態マシン・メモリ内のメモリ・ロケーション
にストアするステップと; 再プログラミング・データがストアされた後、第1の状態アドレス・ロケーシ
ョン内のデータを新しい第1の状態アドレスに置き換えるステップと; カレント状態マシンのイメージを更新するステップと; を包含する、複数のロケーションおよび第1の状態アドレス・ストレージ・ロ
ケーションを含む状態マシン・メモリをプログラミングする方法。
26. Providing an image of a current state machine memory on a computer; modifying the state machine programming; determining a modified state in the current state machine; Determining states in which the modified state may be reached, including states of one; determining a memory location in the current state machine memory not occupied by data associated with the running state machine. A modified state and said modification to store at a memory location in the current state machine memory not occupied by data associated with the running state machine to form reprogramming data. The state that compiles the states that precede the Storing the reprogramming data in a memory location in the current state machine memory that is not occupied by data associated with the running state machine; and after the reprogramming data is stored. Replacing data in the first state address location with a new first state address; updating an image of the current state machine; A method of programming a state machine memory that includes locations.
【請求項27】 第1の状態アドレス・ロケーション内のデータを新しい第
1の状態アドレスに置き換えるステップは、原子的もしくは疑似原子的に行なわ
れる、請求項26記載の方法。
27. The method of claim 26, wherein the step of replacing the data in the first state address location with the new first state address is performed atomically or pseudo-atomically.
【請求項28】 原子的および疑似原子的は、新しい第1の状態アドレスの
ストアの間に第1の状態アドレス・ロケーションを読み出すためのオペレーショ
ンを排除する態様におけるものとして定義される、請求項27記載の方法の再プ
ログラミング可能状態マシン。
28. Atomic and pseudo-atomic are defined as in a manner that precludes operations for reading a first state address location during a store of a new first state address. A reprogrammable state machine of the described method.
【請求項29】 実行中の状態マシンに関連付けされたデータによって占有
されていないカレント状態マシン・メモリ内のメモリ・ロケーションを決定する
ステップは: 置換される第1の状態アドレスがポイントする状態を決定するステップと; 繰り返し実行される次のステップと:を有し、 繰り返し実行されるステップは、 決定された状態に関連付けされたカウンタをデクリメントするステップと; 前記カウンタがゼロになったとき、その状態に関連付けされたデータが占有
されていないものと決定するステップと; 前記決定された状態内のデータによってポイントされる状態を決定された状態と
して選択するステップと; を包含する、請求項26記載の方法。
29. The step of determining a memory location in the current state machine memory that is not occupied by data associated with the running state machine comprises: determining the state pointed to by the first state address being replaced. A step of repeatedly executing the following steps: a step of repeatedly executing a step of decrementing a counter associated with a determined state; and a state of the counter when the counter reaches zero. 27. Determining that the data associated with is unoccupied; selecting the state pointed to by the data in the determined state as the determined state. Method.
【請求項30】 a)状態マシン内の状態に関係する情報をストアするため
のプログラマブル・メモリを有し、前記状態は、第1のグループの状態および第
2のグループの状態を含み、前記第1のグループの状態は、それぞれテーブル・
アドレスにおけるデータのテーブルによって表され、かつ前記テーブル・アドレ
スからのオフセットにおいてアドレス可能な第1の複数のテーブル要素を含み、
前記テーブル要素のそれぞれは、前記状態マシン内の次の状態を示すものとし、
かつ 前記第2のグループの状態は、それぞれ、1つのテーブル要素を含み、前記
第1のグループの状態のうちの1つの状態を表すデータのテーブルより少ないメ
モリを占有するデータのテーブルによって表されものとするプログラマブル・メ
モリ;および、 b)前記テーブル・アドレスからのオフセットにおける現在の状態のテーブル
要素の内容に基づいて次の状態を決定するためのプロセッサであって、前記オフ
セットは、データ・ストリーム内のビットに依存してインストラクション・サイ
クルのテーブル・アドレス・ロード部分の間に決定されるものとし、さらに決定
に従って前記状態マシンを次の状態に切り替えるためのプロセッサ; を包含する、データ・ストリームからのデータを分類するためのパケット分類
状態マシン。
30. a) having a programmable memory for storing information related to states in a state machine, the states including a first group of states and a second group of states, The state of the group of 1 is the table
A first plurality of table elements represented by a table of data at addresses and addressable at an offset from said table address;
Each of the table elements shall indicate the next state in the state machine,
And each of the states of the second group is represented by a table of data that includes one table element and occupies less memory than a table of data representing one of the states of the first group. And b) a processor for determining the next state based on the contents of the table element of the current state at the offset from the table address, the offset being in the data stream. A processor for switching the state machine to the next state in accordance with the decision, which is to be determined during the table address load part of the instruction cycle. A packet classification state machine for classifying data.
【請求項31】 テーブル要素は、次の状態のテーブル要素のフォーマット
に関係するデータを包含する、請求項30記載のデータを分類するためのパケッ
ト分類状態マシン。
31. The packet classification state machine for classifying data according to claim 30, wherein the table element contains data related to a format of the table element in the next state.
【請求項32】 第1のグループの状態のうちの1つの状態を表すデータの
テーブルのそれぞれは、同一のメモリ量を占有し、同一の数「n」のテーブル要
素を有する、請求項30記載のパケット分類状態マシン。
32. The table of data representing one of the states of the first group each occupy the same amount of memory and have the same number “n” of table elements. Packet classification state machine.
【請求項33】 第1のグループの状態のうちの1つの状態を表すデータの
テーブルのそれぞれは、プロセッサによってテーブル・アドレスからのオフセッ
トを決定するために使用されるビット数をNとして表すとき、2個のテーブル
要素を有する、請求項32記載のパケット分類状態マシン。
33. Each of the tables of data representing one of the states of the first group, when represented as N, is the number of bits used by the processor to determine an offset from the table address. 33. The packet classification state machine of claim 32, having 2N table elements.
【請求項34】 第2のグループの状態のうちの1つの状態を表すデータの
テーブルのそれぞれは、同一のメモリ量を占有し、単一のテーブル要素だけを包
含する、請求項32記載のパケット分類状態マシン。
34. The packet of claim 32, wherein each of the tables of data representing one of the states of the second group occupies the same amount of memory and contains only a single table element. Classification state machine.
【請求項35】 プロセッサは、テーブル内のテーブル要素のサイズを決定
するための手段、および決定したサイズの要素をロードするための手段を包含す
る、請求項30記載のパケット分類状態マシン。
35. The packet classification state machine of claim 30, wherein the processor includes means for determining a size of a table element in the table and means for loading an element of the determined size.
【請求項36】 テーブル内のテーブル要素のサイズを決定するための手段
は、データ・ワード内のテーブル要素のアライメントを決定するための手段、お
よび前記決定したアライメントを有する前記決定したサイズのテーブル要素の内
容をロードするための手段を包含する、請求項35記載のパケット分類状態マシ
ン。
36. Means for determining the size of a table element in a table, means for determining an alignment of a table element within a data word, and table element of the determined size having the determined alignment. 36. The packet classification state machine of claim 35 including means for loading the contents of
【請求項37】 第2のグループの状態のうちの1つの状態を表すデータの
テーブルのそれぞれは、ただ1つの次の状態を表すデータを包含する、請求項3
0記載のパケット分類状態マシン。
37. Each of the tables of data representing one of the states of the second group includes data representing only one next state.
A packet classification state machine described in 0.
【請求項38】 a)第1のグループの状態および第2のグループの状態を
含み、前記第1のグループの状態は、それぞれ、テーブル・アドレスにおいて、
前記テーブル・アドレスからのオフセットにおいてアドレス可能な第1の複数の
テーブル要素を含むデータのテーブルによって表され、前記テーブル要素のそれ
ぞれは、状態マシン内の次の状態を示すものとし、第2のグループの状態は、そ
れぞれ、1つのテーブル要素を含み、前記第1のグループの状態のうちの1つの
状態を表すデータのテーブルより少ないメモリを占有するデータのテーブルによ
って表されものとする、状態マシン内の状態に関係する情報を包含する分類デー
タを提供するステップと; b)カレント状態のテーブル・アドレスを提供するステップと; c)テーブル要素は、テーブル・アドレス、テーブルの内容、およびデータ・
ストリーム内の複数のビットに基づくオフセットに依存して選択されるものとす
る、テーブル要素を選択するステップと; d)現在の状態の前記選択したテーブル要素の内容に基づいて前記状態マシン
の次の状態を決定するステップと; e)決定に従って状態マシンを次の状態に切り替えるステップと; を包含する、データ・ストリームからのデータを分類するためのパケット分類
の方法。
38. a) including a first group of states and a second group of states, each of the first group of states at a table address:
Represented by a table of data comprising a first plurality of table elements addressable at an offset from said table address, each of said table elements indicating a next state in a state machine, a second group Each of the states in the state machine is represented by a table of data that contains one table element and occupies less memory than a table of data representing one of the states of the first group. B) providing the table address of the current state; and c) the table element is the table address, the contents of the table, and the data.
Selecting a table element, which shall be selected depending on an offset based on a plurality of bits in the stream; and d) next to the state machine based on the contents of the selected table element in the current state. Determining the state; and e) switching the state machine to the next state according to the decision; a method of packet classification for classifying data from a data stream.
【請求項39】 ステップ(c)、(d)および(e)は、反復して実行さ
れ、それにおいて状態マシンを次の状態に切り替える前記ステップ(e)は、次
の状態を表すテーブルのテーブル・アドレスを、次の繰り返しに関するカレント
状態のテーブル・アドレスとして提供するステップを有する、請求項38記載の
データ・ストリームからのデータを分類するためのパケット分類の方法。
39. Steps (c), (d) and (e) are performed iteratively, in which switching the state machine to the next state, wherein step (e) is a table of tables representing the next state. 39. A method of packet classification for classifying data from a data stream according to claim 38, comprising the step of providing the address as a current state table address for the next iteration.
【請求項40】 状態マシンの次の状態を決定するステップは、第1のグル
ープの状態に含まれる状態に関して、テーブル・アドレスおよびデータ・ストリ
ーム内のビットを連結して要素アドレスを形成することによって実行され、前記
要素アドレスにおけるメモリ内のデータは、前記次の状態を示すものとした、請
求項38記載のデータ・ストリームからのデータを分類するためのパケット分類
の方法。
40. The step of determining the next state of the state machine comprises concatenating bits in the table address and the data stream to form an element address for states included in the first group of states. 39. A method of packet classification for classifying data from a data stream according to claim 38, wherein executed data in memory at said element address is indicative of said next state.
【請求項41】 ビットは、データ・ストリーム内において連続するビット
である、請求項38記載のデータ・ストリームからのデータを分類するためのパ
ケット分類の方法。
41. The method of packet classification for classifying data from a data stream of claim 38, wherein the bits are consecutive bits within the data stream.
【請求項42】 状態マシンの次の状態を決定するステップは、第1のグル
ープの状態に含まれる状態に関して、テーブル・アドレスおよびデータ・ストリ
ーム内の連続するビットを連結して要素アドレスを形成することによって実行さ
れ、前記要素アドレスにおけるメモリ内のデータは、次の状態を示すものとした
、請求項41記載のデータ・ストリームからのデータを分類するためのパケット
分類の方法。
42. The step of determining the next state of the state machine concatenates the table address and successive bits in the data stream to form an element address for the states contained in the first group of states. 42. The method of packet classification for classifying data from a data stream of claim 41, wherein the data in memory at said element address is indicative of the following states.
【請求項43】 ステップ(c)および(d)は、状態遷移ごとに実行され
る、請求項38記載のパケット分類の方法。
43. The method of packet classification according to claim 38, wherein steps (c) and (d) are performed for each state transition.
【請求項44】 分類データは、非循環型分類ツリーである、請求項38記
載のパケット分類の方法。
44. The method of packet classification according to claim 38, wherein the classification data is an acyclic classification tree.
【請求項45】 分類データは、ただ1つの可能性のある次の状態を有する
状態を決定し、かつそれらを第2のグループの状態に含まれる状態を表すテーブ
ルとしてストアすることによって最適化される、請求項44記載のパケット分類
の方法。
45. The classification data is optimized by determining the states that have only one possible next state and storing them as a table representing the states contained in the second group of states. 45. The method of packet classification according to claim 44.
【請求項46】 状態に関係する一部の情報は、「無関係な」オペレーショ
ンであり、ここで、以前の状態に関係する一部の情報は、次の状態が「無関係な
」オペレーションを包含することを示し、前記状態は、「無関係な」オペレーシ
ョンを有していない状態よりも少ないテーブル要素を包含する、請求項44記載
のパケット分類の方法。
46. Some information related to a state is an "irrelevant" operation, wherein some information related to a previous state includes an operation for which the next state is "irrelevant". 45. The method of packet classification of claim 44, wherein the state comprises fewer table elements than a state that has no "irrelevant" operations.
【請求項47】 状態に関係する一部の情報は、続いて生じる「無関係な」
オペレーションの数を示すカウンタである、請求項44記載のパケット分類の方
法。
47. Some information relating to a state is subsequently irrelevant.
The method of packet classification according to claim 44, wherein the method is a counter indicating the number of operations.
【請求項48】 第1のグループの状態は、mビットの幅の要素を有するテ
ーブルによって表され、第2のグループの状態は、略m/2ビットの幅の要素を
有するテーブルによって表される、請求項38記載のパケット分類の方法。
48. The states of the first group are represented by a table having elements with a width of m bits and the states of the second group are represented by a table having elements with a width of approximately m / 2 bits. 39. The method of packet classification according to claim 38.
【請求項49】 第1のグループの状態および前記第2のグループの状態の
それぞれは、テーブル要素の選択において依存する前記データ・ストリーム内の
ビット数をnとするとき、2個のテーブル要素を有するテーブルによって表さ
れる、請求項48記載のパケット分類の方法。
49. Each of the first group of states and the second group of states is 2 n table elements, where n is the number of bits in the data stream upon which table elements are selected. 49. The method of packet classification according to claim 48, represented by a table having
【請求項50】 状態マシン内における状態に関係する情報は、メモリ内に
ストアされ、前記情報は、メモリ内のテーブル要素のアライメントに関係する情
報を含む、請求項38記載のパケット分類の方法。
50. The method of packet classification of claim 38, wherein state-related information in the state machine is stored in memory, the information including information related to alignment of table elements in memory.
【請求項51】 テーブル要素のテーブルは、同一のアライメントを伴って
メモリ内にストアされる、請求項50記載のパケット分類の方法。
51. The method of packet classification according to claim 50, wherein the table of table elements is stored in memory with the same alignment.
【請求項52】 状態マシン内における状態に関係する情報は、次の状態に
関係するテーブル要素の幅に関係する情報を含む、請求項38記載のパケット分
類の方法。
52. The method of packet classification of claim 38, wherein the state-related information in the state machine includes information related to the width of table elements related to the next state.
【請求項53】 a)状態マシン内の状態に関係する情報をストアするため
のプログラマブル・メモリであって、前記状態が、3つのグループの状態、すな
わち: それぞれが、テーブル・アドレスからのオフセットにおいてアドレス可能な2 個のテーブル要素を含むデータのテーブルによって表され、前記テーブル要素
は、状態マシン内の次の状態を示し、nは、前記オフセットを決定するためのデ
ータ・ストリーム内のビット数とする第1のグループの状態と; それぞれが、前記第1のグループの状態のテーブル要素のサイズより小さいサ
イズを有する2個のテーブル要素を含むデータのテーブルによって表され、テ
ーブル要素は、テーブル・アドレスからのオフセットにおいてアドレス可能であ
り、前記テーブル要素は、状態マシン内の次の状態を示し、nは、オフセットを
決定するためのデータ・ストリーム内のビット数とする第2のグループの状態と
; それぞれが単一の可能性のある次の状態を示すデータによって表される第3の
グループの状態と;を含むものとし、 c)前記第1のグループのテーブル・アドレスに関して、カレント状態アドレ
スおよびデータ・ストリームからの複数のビットをともにストアしてアドレスを
形成し、第2のグループのテーブル・アドレスに関して、カレント状態アドレス
および前記データ・ストリームからの複数のビットをともにストアしてアドレス
を形成し、かつ第3のグループのテーブル・アドレスに関して、カレント状態ア
ドレスをストアし、プログラマブル・メモリ内のそのアドレスからオペレーショ
ンを検索し、そのオペレーションは、次の状態アドレスに関係するデータを含む
ジャンプ・オペレーションを包含し;オペレーション内の情報の1つに基づいて
次の状態を決定し;そして、状態マシンを次の状態に切り替えるプロセッサ; を包含し、前記プログラマブル・メモリから情報を検索するただ1つのオペレ
ーションが、連続する状態遷移の間に実行される、データ・ストリームからのデ
ータを分類するためのパケット分類状態マシン。
53. a) To store state related information within a state machine
Programmable memory, wherein the states are three groups of states:
Wachi:   2 addressable at each offset from the table address n Represented by a table of data containing a number of table elements, said table element
Indicates the next state in the state machine and n is the data for determining the offset.
The state of the first group as the number of bits in the data stream;   Each is smaller than the size of the table element in the state of the first group.
Having an iz 2nIs represented by a table of data containing
Table elements are addressable at offsets from the table address
Where the table element indicates the next state in the state machine, n is the offset
The state of the second group, which is the number of bits in the data stream to determine
;   A third, each represented by data showing a single possible next state
Group status and;   c) A current state address for the table address of the first group.
Address and store multiple bits from the
Create and current address of the second group of table addresses
And store multiple bits from the data stream together to address
, And with respect to the table addresses of the third group, the current state
Store the dress and operate from that address in programmable memory.
And the operation contains data related to the next state address.
Including a jump operation; based on one of the information in the operation
Determine the next state; and the processor that switches the state machine to the next state;   And the only operator that retrieves information from the programmable memory
Partition from the data stream, which is executed during successive state transitions.
A packet classification state machine for classifying data.
【請求項54】 さらに、次の状態に関係するテーブルのグループを決定す
るための手段; を包含する、請求項53記載のデータ・ストリームからのデータを分類するた
めのパケット分類状態マシン。
54. A packet classification state machine for classifying data from a data stream according to claim 53, further comprising: means for determining a group of tables related to the next state.
【請求項55】 さらに、次の状態に関係するテーブルのアライメントを決
定するための手段; を包含する、請求項53記載のデータ・ストリームからのデータを分類するた
めのパケット分類状態マシン。
55. A packet classification state machine for classifying data from a data stream according to claim 53, further comprising: means for determining alignment of tables related to the next state.
JP2000619158A 1999-05-18 2000-05-17 Packet classification state machine Pending JP2003500709A (en)

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
US09/313,183 1999-05-18
US09/313,182 1999-05-18
US09/313,183 US6424934B2 (en) 1998-05-18 1999-05-18 Packet classification state machine having reduced memory storage requirements
US09/313,182 US6349405B1 (en) 1999-05-18 1999-05-18 Packet classification state machine
US45946099A 1999-12-13 1999-12-13
US09/459,460 1999-12-13
PCT/CA2000/000580 WO2000070821A2 (en) 1999-05-18 2000-05-17 Packet classification state machine

Publications (1)

Publication Number Publication Date
JP2003500709A true JP2003500709A (en) 2003-01-07

Family

ID=27405653

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000619158A Pending JP2003500709A (en) 1999-05-18 2000-05-17 Packet classification state machine

Country Status (5)

Country Link
EP (1) EP1190314A2 (en)
JP (1) JP2003500709A (en)
AU (1) AU4739500A (en)
IL (1) IL146539A0 (en)
WO (1) WO2000070821A2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007312378A (en) * 2006-04-27 2007-11-29 Agere Systems Inc Method and apparatus for performing in-service upgrade of software in network processor
KR101448550B1 (en) 2012-11-21 2014-10-13 서울대학교산학협력단 Apparatus and Method for Traffic Classificaiton

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59188702A (en) * 1983-03-04 1984-10-26 Mazda Motor Corp Programmable controller
US4695977A (en) * 1985-12-23 1987-09-22 American Telephone And Telegraph Company And At&T Bell Laboratories Control of real-time systems utilizing a nonprocedural language
JPS6370350A (en) * 1986-09-11 1988-03-30 インタ−ナショナル・ビジネス・マシ−ンズ・コ−ポレ−ション Data version management
US5280595A (en) * 1990-10-05 1994-01-18 Bull Hn Information Systems Inc. State machine for executing commands within a minimum number of cycles by accomodating unforseen time dependency according to status signals received from different functional sections
US5826030A (en) * 1995-11-30 1998-10-20 Excel Switching Corporation Telecommunication switch having a universal API with a single call processing message including user-definable data and response message each having a generic format

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007312378A (en) * 2006-04-27 2007-11-29 Agere Systems Inc Method and apparatus for performing in-service upgrade of software in network processor
KR101448550B1 (en) 2012-11-21 2014-10-13 서울대학교산학협력단 Apparatus and Method for Traffic Classificaiton

Also Published As

Publication number Publication date
IL146539A0 (en) 2002-07-25
WO2000070821A3 (en) 2001-10-25
EP1190314A2 (en) 2002-03-27
AU4739500A (en) 2000-12-05
WO2000070821A2 (en) 2000-11-23

Similar Documents

Publication Publication Date Title
JP4856580B2 (en) Method and apparatus for performing an in-service upgrade of software in a network processor
US6167047A (en) Packet classification state machine
US7487302B2 (en) Service layer architecture for memory access system and method
USRE44129E1 (en) System and method for instruction-level parallelism in a programmable multiple network processor environment
US6330584B1 (en) Systems and methods for multi-tasking, resource sharing and execution of computer instructions
US6978459B1 (en) System and method for processing overlapping tasks in a programmable network processor environment
USRE43825E1 (en) System and method for data forwarding in a programmable multiple network processor environment
EP1085711A1 (en) Method and apparatus for processing and forwarding data packets
WO2006074047A1 (en) Providing access to data shared by packet processing threads
US6349405B1 (en) Packet classification state machine
US6424934B2 (en) Packet classification state machine having reduced memory storage requirements
JP2003500709A (en) Packet classification state machine
US7350202B2 (en) Method for re-programming a firmware state machine during execution
US7210008B2 (en) Memory controller for padding and stripping data in response to read and write commands
WO2021027069A1 (en) Adaptive memory consistency protocol for distributed virtual machines, design method for same, and terminal
JP2021015384A (en) Information processing circuit, information processing apparatus, information processing method and information processing program
CN105868003B (en) A kind of task context switching optimization method based on TMS320C6747
JP2003533913A (en) State transition machine for packet classification
JPS603229B2 (en) Information processing method
JPS63261430A (en) Method and apparatus for information processing
US7185184B1 (en) Processor system, especially a processor system for communications devices
JPH0812601B2 (en) Data processing device
JP2573391B2 (en) Programmable controller
JP2001236241A (en) System for controlling memory duplex
JPH01295347A (en) Microcomputer device