JP5534912B2 - Data storage device - Google Patents

Data storage device Download PDF

Info

Publication number
JP5534912B2
JP5534912B2 JP2010092255A JP2010092255A JP5534912B2 JP 5534912 B2 JP5534912 B2 JP 5534912B2 JP 2010092255 A JP2010092255 A JP 2010092255A JP 2010092255 A JP2010092255 A JP 2010092255A JP 5534912 B2 JP5534912 B2 JP 5534912B2
Authority
JP
Japan
Prior art keywords
entry
data
data storage
storage area
flag
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010092255A
Other languages
Japanese (ja)
Other versions
JP2011221900A (en
Inventor
裕志 笠原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2010092255A priority Critical patent/JP5534912B2/en
Publication of JP2011221900A publication Critical patent/JP2011221900A/en
Application granted granted Critical
Publication of JP5534912B2 publication Critical patent/JP5534912B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Memory System (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

本発明は、記憶装置に対するデータの保存や読み出しを行う技術に関し、特に、LRU(Least Recently Used)アルゴリズムなどのメモリ管理アルゴリズムに基づいて記憶装置に対するデータの保存や読み出しを行う技術に関する。   The present invention relates to a technique for saving and reading data to and from a storage device, and more particularly to a technique for saving and reading data to and from a storage device based on a memory management algorithm such as an LRU (Least Recently Used) algorithm.

従来から、ハードディスクドライブ(HDD)やキャッシュメモリや仮想メモリなどの記憶装置に対するデータの保存や読み出しを制御する手段として、記憶装置に保存されるデータまたはその記憶領域に優先順位を付与するメモリ管理アルゴリズムが広く使用されている。メモリ管理アルゴリズムを使用すれば、記憶装置に保存されているデータのうち最も優先順位の低いデータを選択し、これを必要に応じて記憶装置から削除する(追い出す)ことにより、記憶装置の限られた記憶領域内にできるだけ有意なデータを保存する領域を確保することができる。この種のメモリ管理アルゴリズムとしては、たとえば、時間的な局所性原理(Locality Principle)に基づくLRUアルゴリズムやLFU(Least Frequently Used)アルゴリズムが広く知られている。LRUアルゴリズムは、最も長い間参照されていないデータを、近い将来参照される可能性が最も低いものとして選択するアルゴリズムであり、LFUアルゴリズムは、最も参照頻度が低いデータを、近い将来参照される可能性が最も低いものとして選択するアルゴリズムである。   Conventionally, a memory management algorithm for giving priority to data stored in a storage device or its storage area as means for controlling storage and reading of data to and from a storage device such as a hard disk drive (HDD), cache memory, or virtual memory Is widely used. By using the memory management algorithm, the data with the lowest priority is selected from the data stored in the storage device, and the data is limited (deleted) from the storage device as necessary. An area for storing as much significant data as possible can be secured in the storage area. As this type of memory management algorithm, for example, an LRU algorithm based on a temporal locality principle or a LFU (Least Frequently Used) algorithm is widely known. The LRU algorithm is an algorithm that selects data that has not been referenced for the longest time as the least likely reference in the near future, and the LFU algorithm can refer to data that is least frequently referenced in the near future. This algorithm is selected as the one with the lowest probability.

LRUアルゴリズムに関する先行技術文献としては、たとえば、特開平9−288617号公報(特許文献1)及び特許第4369524号明細書(特許文献2)が挙げられる。特許文献1に開示されているLRU制御方式は、検索対象データをテーブルから検索する手段と、この検索対象データがテーブル内に存在したときは、検索対象データをテーブルの先頭に位置するように並び替える手段とを有するものである。一方、特許文献2に開示されているLRU制御装置は、複数のエントリをそれぞれ識別するための複数の識別情報(たとえば、エントリごとに一意に付与されたID)からなるLRU情報を記憶する記憶手段と、これら複数のエントリの中のいずれかのエントリが使用された場合に、LRU情報の中から使用されたエントリの識別情報を取り出すとともに最後尾に移動させてLRU情報を更新する手段とを備えている。LRU情報を構成する複数の識別情報は、エントリの最終使用時の古い順に書き込まれる。   Prior art documents relating to the LRU algorithm include, for example, Japanese Patent Laid-Open No. 9-288617 (Patent Document 1) and Japanese Patent No. 4369524 (Patent Document 2). The LRU control method disclosed in Patent Document 1 includes means for searching for search target data from a table, and when the search target data exists in the table, the search target data is arranged so as to be positioned at the head of the table. And means for replacing. On the other hand, the LRU control device disclosed in Patent Document 2 stores LRU information including a plurality of pieces of identification information for identifying a plurality of entries (for example, IDs uniquely assigned to the entries). And means for taking out the identification information of the used entry from the LRU information and moving it to the tail and updating the LRU information when any one of the plurality of entries is used. ing. A plurality of pieces of identification information constituting the LRU information are written in order from the oldest when the entry is last used.

特開平9−288617号公報JP-A-9-288617 特許第4369524号明細書Japanese Patent No. 4369524

メモリ管理アルゴリズムの1つとして並べ替え方式と呼ばれるものがある。並べ替え方式は、エントリの登録や削除や更新ごとに、データ記憶領域においてエントリデータを優先順位に従って並べ替える方式である。特許文献1に開示されているLRU制御方式は、並べ替え方式の一種である。しかしながら、並べ替え方式には、エントリデータを並べ替えている間は、エントリデータを格納するデータ記憶領域にアクセスすることができない期間が発生し、これが処理速度の低下を招くという問題がある。   One memory management algorithm is called a rearrangement method. The rearrangement method is a method in which entry data is rearranged in the data storage area in accordance with priority every time an entry is registered, deleted or updated. The LRU control method disclosed in Patent Document 1 is a kind of rearrangement method. However, the rearrangement method has a problem that a period during which the data storage area for storing the entry data cannot be accessed is generated while the entry data is rearranged, which causes a reduction in processing speed.

特許文献2に開示されているLRU制御装置は、エントリデータを格納するデータ記憶領域とは別の記憶領域にLRU情報を構築し、エントリの登録や削除や更新ごとに、LRU情報内の複数の識別情報を最終使用時が古い順に並べ替えて記憶することでLRU情報を更新する。このため、LRU制御により識別情報が並べ替えられている最中であっても、データ記憶領域にアクセスしてエントリデータを読み出すことができる。しかしながら、LRU制御のために別の記憶領域を確保する必要があるのでメモリ消費量が多くなる。また、LRU制御の対象となるエントリ数が増えると、LRU制御を実現するために必要なビット数が増大するという問題もある。   The LRU control device disclosed in Patent Document 2 constructs LRU information in a storage area different from the data storage area for storing entry data, and a plurality of entries in the LRU information are registered for each entry registration, deletion, or update. The LRU information is updated by rearranging and storing the identification information in the order of last use. Therefore, even when the identification information is being rearranged by the LRU control, the entry data can be read by accessing the data storage area. However, since it is necessary to secure another storage area for LRU control, the amount of memory consumption increases. In addition, when the number of entries subject to LRU control increases, there is a problem that the number of bits necessary to realize LRU control increases.

上記に鑑みて本発明の目的は、メモリ管理アルゴリズムに基づいてエントリデータの並べ替えを行う場合でも少ないメモリ消費量で動作し、処理速度の低下を抑制することができるデータ記憶装置を提供することである。   In view of the above, an object of the present invention is to provide a data storage device that operates with a small amount of memory consumption and can suppress a decrease in processing speed even when rearranging entry data based on a memory management algorithm. It is.

本発明によるデータ記憶装置は、アクセス順位がそれぞれ割り当てられた複数のデータ記憶領域を有し、外部装置からのアクセス順に、各データ記憶領域にエントリデータを保持するエントリ保持回路と、前記外部装置からのアクセス要求に応じて、前記複数のデータ記憶領域に対して前記エントリデータの書き込みを実行するエントリ制御回路と、を備え、前記各データ記憶領域は、当該データ記憶領域に保持されるエントリデータを有効にする有効値及び当該各データ記憶領域に保持されるエントリデータを無効にする無効値のうちのいずれか一方の値を持つ有効フラグを格納する有効フラグ領域と、前記エントリデータの実態データを格納するデータ領域と、を有し、前記エントリ制御回路は、前記エントリデータの書き込みが実行されない間に、前記アクセス順位が最下位のデータ記憶領域から順に、前記アクセス順位が最上位の1つ下位のデータ記憶領域まで、前記有効フラグが前記無効値を持つか否かを判定するメモリ制御部を有し、前記判定の結果が、前記無効値を持たないである場合は、前記メモリ制御部は、前記無効値を持たないと判定された前記データ記憶領域の前記アクセス順位よりも1つ上位の前記データ記憶領域の判定へと進み、前記判定の結果が、前記無効値を持つである場合は、前記メモリ制御部は、前記無効値を持つと判定された前記データ記憶領域の前記アクセス順位よりも上位の前記アクセス順位を有する前記データ記憶領域に保持されているエントリデータを、それぞれ1つ下位の前記データ記憶領域にシフトするとともに、前記アクセス順位において最上位のデータ記憶領域の前記有効フラグ領域に、前記無効値を持つ前記有効フラグを格納して、前記無効値を持つと判定された前記データ記憶領域の前記アクセス順位よりも1つ上位の前記データ記憶領域の判定へと進む、ことを特徴とする。 The data storage device according to the present invention has a plurality of data storage areas to which access orders are respectively assigned, an entry holding circuit for holding entry data in each data storage area in the order of access from the external device, and the external device An entry control circuit for writing the entry data to the plurality of data storage areas in response to the access request, and each data storage area stores the entry data held in the data storage area. A valid flag area for storing a valid flag having one of a valid value to be valid and an invalid value for invalidating entry data held in each data storage area, and actual data of the entry data And the entry control circuit executes the writing of the entry data. The memory control for determining whether the valid flag has the invalid value from the data storage area with the lowest access order to the data storage area with the lowest access order in the lower order. And when the result of the determination does not have the invalid value, the memory control unit is one more than the access order of the data storage area determined not to have the invalid value. Proceeding to the determination of the upper data storage area, and if the determination result has the invalid value, the memory control unit accesses the data storage area determined to have the invalid value. The entry data held in the data storage area having the access order higher than the rank is shifted to the data storage area one level lower and the access The effective flag having the invalid value is stored in the valid flag area of the uppermost data storage area, and one rank higher than the access rank of the data storage area determined to have the invalid value. The process proceeds to the determination of the data storage area.

本発明によれば、有効フラグと実体データとを含むエントリデータがデータ記憶領域に保持される。データ記憶領域に対するエントリデータの書き込みが実行されない間に、有効フラグを使用したシフト操作によりエントリデータの並び替えを効率的に行うことができる。   According to the present invention, entry data including a valid flag and entity data is held in the data storage area. While the entry data is not written to the data storage area, the entry data can be rearranged efficiently by the shift operation using the valid flag.

本発明に係る実施の形態1のデータ処理システムの概略構成を示す機能ブロック図である。It is a functional block diagram which shows schematic structure of the data processing system of Embodiment 1 which concerns on this invention. 実施の形態1のデータ記憶装置のエントリ保持回路内のデータ記憶領域の構成を示す図である。3 is a diagram showing a configuration of a data storage area in an entry holding circuit of the data storage device according to the first embodiment. FIG. 実施の形態1のデータ記憶装置のエントリ制御回路の構成の一例を示す機能ブロック図である。FIG. 3 is a functional block diagram illustrating an example of a configuration of an entry control circuit of the data storage device according to the first embodiment. 実施の形態1のエントリ保持回路の好適な構成を示す図である。FIG. 3 is a diagram illustrating a preferred configuration of an entry holding circuit according to the first embodiment. 実施の形態1に係るエントリ並べ替え処理の手順を概略的に示すフローチャートである。6 is a flowchart schematically showing a procedure of entry rearrangement processing according to the first embodiment. 図5のエントリ並べ替え処理が実行されたときのデータ記憶領域の状態遷移の様子を示す図である。It is a figure which shows the mode of the state transition of a data storage area when the entry rearrangement process of FIG. 5 is performed. 実施の形態1に係るエントリ削除処理の手順を概略的に示すフローチャートである。4 is a flowchart schematically showing a procedure of entry deletion processing according to the first embodiment. 実施の形態1に係るエントリ登録処理の手順の一例を概略的に示すフローチャートである。4 is a flowchart schematically showing an example of a procedure of entry registration processing according to the first embodiment. 実施の形態1に係るエントリ登録処理の手順の他の例を概略的に示すフローチャートである。12 is a flowchart schematically showing another example of the procedure of entry registration processing according to the first embodiment. 本発明に係る実施の形態2のデータ記憶領域の構成を示す図である。It is a figure which shows the structure of the data storage area of Embodiment 2 which concerns on this invention. 実施の形態2に係るエントリ削除処理の手順を概略的に示すフローチャートである。12 is a flowchart schematically showing a procedure of entry deletion processing according to the second embodiment. 実施の形態2に係るエントリ登録処理の手順を概略的に示すフローチャートである。10 is a flowchart schematically showing a procedure of entry registration processing according to the second embodiment. 図12のエントリ検索処理(ステップS326)の手順を示すフローチャートである。13 is a flowchart showing a procedure of entry search processing (step S326) in FIG. 本発明に係る実施の形態3のデータ記憶領域の構成を示す図である。It is a figure which shows the structure of the data storage area of Embodiment 3 which concerns on this invention. 実施の形態3に係る制御処理の一例を概略的に示すフローチャートである。12 is a flowchart schematically showing an example of a control process according to the third embodiment. 本発明に係る実施の形態4に係るエントリ更新処理の手順を概略的に示すフローチャートである。It is a flowchart which shows roughly the procedure of the entry update process which concerns on Embodiment 4 which concerns on this invention. 実施の形態4に係るエントリ更新処理が実行されたときのデータ記憶領域の状態遷移の様子を示す図である。FIG. 20 is a diagram showing a state transition of a data storage area when an entry update process according to Embodiment 4 is executed. 実施の形態1〜4の変形例のデータ記憶領域の構成を示す図である。It is a figure which shows the structure of the data storage area of the modification of Embodiment 1-4.

以下、本発明に係る種々の実施の形態について図面を参照しつつ説明する。   Hereinafter, various embodiments according to the present invention will be described with reference to the drawings.

実施の形態1.
図1は、本発明に係る実施の形態1のデータ処理システム1の概略構成を示す機能ブロック図である。このデータ処理システム1は、データ処理を実行する入出力装置14と、そのデータ処理の際に参照される実体データを含むエントリデータを一時的に記憶するデータ記憶装置11とを備える。入出力装置14としては、たとえば、通信ネットワークにおいて通信データを処理する通信装置(中継装置や集線装置など)が挙げられるが、これらに限定されるものではない。データ処理にメモリを必要とする装置であれば、任意の装置にデータ記憶装置11を適用することが可能である。
Embodiment 1 FIG.
FIG. 1 is a functional block diagram showing a schematic configuration of a data processing system 1 according to the first embodiment of the present invention. The data processing system 1 includes an input / output device 14 that executes data processing and a data storage device 11 that temporarily stores entry data including entity data that is referred to during the data processing. Examples of the input / output device 14 include, but are not limited to, a communication device (such as a relay device or a line concentrator) that processes communication data in a communication network. As long as the device requires a memory for data processing, the data storage device 11 can be applied to any device.

データ記憶装置11は、複数のエントリデータを記憶する複数のデータ記憶領域を有するエントリ保持回路12と、LRUアルゴリズムなどのメモリ管理アルゴリズムに基づいてエントリ保持回路12に対するエントリデータの書き込み及び読み出しを制御するエントリ制御回路13とを含む。エントリ制御回路13は、メモリ管理アルゴリズムに基づいて複数のエントリデータのうち優先順位の最も低いエントリデータを選択し、選択されたエントリデータを無効化することによりエントリ保持回路12内に空き領域を確保する機能を有する。   The data storage device 11 controls the entry holding circuit 12 having a plurality of data storage areas for storing a plurality of entry data, and writing and reading of entry data to and from the entry holding circuit 12 based on a memory management algorithm such as an LRU algorithm. And an entry control circuit 13. The entry control circuit 13 selects the entry data having the lowest priority among the plurality of entry data based on the memory management algorithm, and secures a free area in the entry holding circuit 12 by invalidating the selected entry data. It has the function to do.

図2(A),(B),(C)は、エントリ保持回路12内のn個のデータ記憶領域M,M,M,…,Mn−3,Mn−2,Mn−1(nは正整数)を模式的に示す図である。ここで、nは、エントリ保持回路12に確保可能な最大エントリ数を示す整数値である。図2(A)には6個以上のデータ記憶領域M〜Mn−1が示されているが、少なくとも2個のデータ記憶領域が確保されていればよい。データ記憶領域M〜Mn−1はそれぞれエントリデータを保持するための記憶容量を有する。また、データ記憶領域M,M,…,Mn−1には、エントリデータの優先順位に対応する順位(以下、アクセス順位と呼ぶ。)がそれぞれ割り当てられている。エントリ制御回路13においては、データ記憶領域M,M,…,Mn−1に対してそれぞれのアクセス順位に対応する識別子#(0),#(1),…,#(n−3),#(n−2),#(n−1)が設定されている。エントリ制御回路13は、これら識別子#(0)〜#(n−1)に基づいて、データ記憶領域M〜Mn−1に保持されているエントリデータにアクセスすることができる。 2A, 2B, and 2C show n data storage areas M 0 , M 1 , M 2 ,..., M n−3 , M n−2 , M n in the entry holding circuit 12. It is a figure which shows -1 (n is a positive integer) typically. Here, n is an integer value indicating the maximum number of entries that can be secured in the entry holding circuit 12. Although FIG. 2A shows six or more data storage areas M 0 to M n−1 , it is sufficient that at least two data storage areas are secured. Each of the data storage areas M 0 to M n−1 has a storage capacity for holding entry data. In addition, the data storage areas M 0 , M 1 ,..., M n−1 are assigned ranks (hereinafter referred to as access ranks) corresponding to the priority levels of the entry data. In the entry control circuit 13, the data storage area M 0, M 1, ..., identifier # corresponding to each of the access order with respect to M n-1 (0), # (1), ..., # (n-3 ), # (N-2) and # (n-1) are set. The entry control circuit 13 can access the entry data held in the data storage areas M 0 to M n−1 based on these identifiers # (0) to # (n−1).

図2(A)に示されるように、識別子#(n−1)を有するデータ記憶領域Mn−1のアクセス順位が最上位であり、この最上位のデータ記憶領域Mn−1に優先順位の最も高いエントリデータが格納される。LRUアルゴリズムが採用される場合には、最後に参照された時からの経過時間が短いほどエントリデータの優先順位は高くなる。また、識別子#(0)を有するデータ記憶領域Mのアクセス順位が最下位であり、この最下位のデータ記憶領域Mに優先順位の最も低いエントリデータが格納される。後述するように、エントリ保持回路12にエントリデータが登録されるとき、このエントリデータは、最初に最上位のデータ記憶領域Mn−1に記憶される。その後、エントリデータは、他のエントリデータの登録や更新や削除のたびに、上位のデータ記憶領域M(iは1〜n−1のいずれかの整数)から1つ下位のデータ記憶領域Mi−1にシフトさせられる。 As shown in FIG. 2A, the access order of the data storage area M n−1 having the identifier # (n−1) is the highest order, and the priority order is assigned to the highest data storage area M n−1. The highest entry data is stored. When the LRU algorithm is adopted, the priority of entry data becomes higher as the elapsed time from the last reference is shorter. The access order of the data storage area M 0 having an identifier # a (0) is the lowest, the lowest entry data priority in the data storage area M 0 of the lowest is stored. As will be described later, when entry data is registered in the entry holding circuit 12, this entry data is first stored in the uppermost data storage area M n−1 . Thereafter, each time entry data is registered, updated, or deleted, the entry data is one lower data storage area M from the higher data storage area M i (i is an integer from 1 to n−1). shifted to i-1 .

図2(B)は、識別子#(i)のデータ記憶領域Mの構成の一例を示す概略図である。図2(B)に示されるように、各データ記憶領域Mは、データ処理の際に参照される実体データ(エントリデータ本体)を格納するデータ領域21と、データ記憶領域Mに保持されるエントリデータの有効性を示す制御フラグの一種である有効フラグを格納するフラグ領域22とを有する。有効フラグは、エントリデータを有効にする有効値(たとえば「1」の値)及びエントリデータを無効にする無効値(たとえば「0」の値)のうちのいずれか一方の値を有する。以下、無効値を持つ有効フラグを「無効フラグ」と呼ぶこととする。また、エントリ制御回路13は、フラグ領域22に無効フラグを保持するデータ記憶領域Mをエントリの欠けた空き領域であると判断する。エントリ制御回路13は、データ記憶領域Mのフラグ領域22に無効フラグを書き込むことによりデータ記憶領域Mにおけるエントリを無効化して空き領域をつくることができる。 2 (B) is a schematic diagram showing an example of the configuration of the data storage area M i identifier # (i). As shown in FIG. 2B, each data storage area M i is held in a data area 21 for storing entity data (entry data body) referred to in data processing, and in the data storage area M i. And a flag area 22 for storing a validity flag which is a kind of control flag indicating the validity of the entry data. The valid flag has one of a valid value for validating entry data (for example, a value of “1”) and an invalid value for invalidating entry data (for example, a value of “0”). Hereinafter, a valid flag having an invalid value is referred to as an “invalid flag”. Also, the entry control circuit 13 determines that the missing free space entry data storage area M i for holding the invalid flag in the flag area 22. Entry control circuit 13 can make free space by invalidating entries in the data storage area M i by writing invalid flag in the flag area 22 of the data storage area M i.

本実施の形態では、データ領域21には、単一の実体データが格納されるが、これに限定されるものではない。データ領域21は、構築すべきシステムに応じて、図2(C)に示されるように互いに関連する複数の実体データをそれぞれ格納する領域21A,21B,…に機能的に分割されていてもよい。これにより、エントリ保持回路12を検索テーブルとして利用することができる。たとえば、入出力装置14がLAN(Local Area Network)に接続された集線装置の場合には、データ領域21内の2つの領域21A,21Bにアドレス検索テーブルの実体データを格納することができる。具体的には、データ領域21内の2つの領域21A,21Bに、データ送信元のMAC(Media Access Control)アドレスと通信ポート番号という2つの実体データを格納すれば、エントリ保持回路12を、MACアドレステーブルを保持するアドレス検索回路として利用できる。エントリ制御回路13は、入出力装置14からの問い合わせ要求に応じて、MACアドレスに対応する通信ポート番号をエントリ保持回路12から取得しこれを検索結果として返すことができる。   In the present embodiment, single entity data is stored in the data area 21, but the present invention is not limited to this. Depending on the system to be constructed, the data area 21 may be functionally divided into areas 21A, 21B,... For storing a plurality of entity data related to each other as shown in FIG. . As a result, the entry holding circuit 12 can be used as a search table. For example, when the input / output device 14 is a line concentrator connected to a LAN (Local Area Network), the substance data of the address search table can be stored in the two areas 21A and 21B in the data area 21. More specifically, if two substance data such as a data transmission source MAC (Media Access Control) address and a communication port number are stored in the two areas 21A and 21B in the data area 21, the entry holding circuit 12 is connected to the MAC. It can be used as an address search circuit that holds an address table. In response to the inquiry request from the input / output device 14, the entry control circuit 13 can acquire the communication port number corresponding to the MAC address from the entry holding circuit 12 and return it as a search result.

また、本実施の形態では、フラグ領域22に単一の制御フラグ(有効フラグ)が格納されるが、これに限定されるものではない。図2(C)に示されるように、フラグ領域22が複数の制御フラグを格納する領域22A,22B,…を有していてもよい。後述するように実施の形態2,3では、フラグ領域22に2種類の制御フラグが格納される。   In the present embodiment, a single control flag (valid flag) is stored in the flag area 22, but the present invention is not limited to this. As shown in FIG. 2C, the flag area 22 may have areas 22A, 22B,... For storing a plurality of control flags. As will be described later, in the second and third embodiments, two types of control flags are stored in the flag area 22.

図3は、エントリ制御回路13の構成の一例を示す機能ブロック図であり、図4は、エントリ保持回路12の好適な構成を示す図である。図3に示されるように、エントリ制御回路13は、入出力装置14との間でデータの送受信を行う送受信部131と、エントリ保持回路12内の全てのデータ記憶領域M〜Mn−1から並列に出力されたエントリデータ群31を受信するエントリデータ受信部132と、エントリ更新制御部133とを含む。エントリデータ受信部132は、エントリ保持回路12から受信したエントリデータ群31を送受信部131とエントリ更新制御部133とに供給する。エントリ更新制御部133は、処理サイクルごとに、エントリデータ受信部132から供給されるエントリデータ群31に基づいてエントリ保持回路12の状態を把握し、エントリ保持回路12の動作状態を制御することができる。ここで、1処理サイクルは、1クロックサイクルまたは所定数のクロックサイクルからなる。エントリ更新制御部133は、データ検索部133A、領域検出部133B及びメモリ制御部133Cを含む。 FIG. 3 is a functional block diagram showing an example of the configuration of the entry control circuit 13, and FIG. 4 is a diagram showing a preferred configuration of the entry holding circuit 12. As shown in FIG. 3, the entry control circuit 13 includes a transmission / reception unit 131 that transmits and receives data to and from the input / output device 14, and all data storage areas M 0 to M n−1 in the entry holding circuit 12. The entry data receiving unit 132 that receives the entry data group 31 output in parallel from and the entry update control unit 133 is included. The entry data reception unit 132 supplies the entry data group 31 received from the entry holding circuit 12 to the transmission / reception unit 131 and the entry update control unit 133. The entry update control unit 133 can grasp the state of the entry holding circuit 12 based on the entry data group 31 supplied from the entry data receiving unit 132 and control the operation state of the entry holding circuit 12 for each processing cycle. it can. Here, one processing cycle consists of one clock cycle or a predetermined number of clock cycles. The entry update control unit 133 includes a data search unit 133A, an area detection unit 133B, and a memory control unit 133C.

また、エントリ更新制御部133は、制御データ群32をエントリ保持回路12に供給している。エントリ保持回路12は、処理サイクルごとに、エントリ更新制御部133から供給された制御データ群32に従って動作する。   The entry update control unit 133 supplies the control data group 32 to the entry holding circuit 12. The entry holding circuit 12 operates according to the control data group 32 supplied from the entry update control unit 133 for each processing cycle.

送受信部131は、入出力装置14からアクセス要求RQを受信し解析する機能を有する。送受信部131は、アクセス要求RQの解析結果をエントリ更新制御部133に出力する。エントリ更新制御部133は、その解析結果に応じた処理を実行し、その処理結果RSを送受信部131を介して入出力装置14に返す。アクセス要求RQとしては、たとえば、エントリ登録指示、エントリ削除指示、有効エントリ数の通知指示、データ検索要求及びデータ読み出し指示が挙げられる。これらアクセス要求RQのうち、データ検索要求、データ読み出し指示及び有効エントリ数の通知指示は、データ記憶領域M〜Mn−1におけるエントリの変更を伴わないものである。 The transmission / reception unit 131 has a function of receiving and analyzing the access request RQ from the input / output device 14. The transmission / reception unit 131 outputs the analysis result of the access request RQ to the entry update control unit 133. The entry update control unit 133 executes processing according to the analysis result, and returns the processing result RS to the input / output device 14 via the transmission / reception unit 131. Examples of the access request RQ include an entry registration instruction, an entry deletion instruction, a valid entry number notification instruction, a data search request, and a data read instruction. Among these access requests RQ, the data search request, the data read instruction, and the valid entry count notification instruction are those that do not involve entry changes in the data storage areas M 0 to M n−1 .

データ読み出し指示を含むアクセス要求RQを受信したとき、送受信部131は、エントリデータ受信部132から供給されるエントリデータ群31から全ての実体データを抽出し、これら実体データを入出力装置14に送信する機能を有する。   When receiving the access request RQ including the data read instruction, the transmission / reception unit 131 extracts all the entity data from the entry data group 31 supplied from the entry data reception unit 132 and transmits these entity data to the input / output device 14. It has the function to do.

送受信部131が検索キーデータ付きのデータ検索要求を含むアクセス要求RQを受信したときは、データ検索部133Aは、データ検索要求に応じて、エントリデータ受信部132から供給されるエントリデータ群31のうち有効値を持つ有効フラグを含むエントリデータの中から検索キーデータと一致する実体データを検索し、その検索結果を送受信部131を介して入出力装置14に返す。たとえば、エントリ保持回路12が上記MACアドレステーブルを保持する場合、データ検索部133Aは、MACアドレスを検索キーデータとして使用し、対応する通信ポート番号を検索結果として返すことができる。   When the transmission / reception unit 131 receives an access request RQ including a data search request with search key data, the data search unit 133A selects the entry data group 31 supplied from the entry data reception unit 132 in response to the data search request. Of the entry data including a valid flag having a valid value, entity data matching the search key data is retrieved, and the retrieval result is returned to the input / output device 14 via the transmission / reception unit 131. For example, when the entry holding circuit 12 holds the MAC address table, the data search unit 133A can use the MAC address as search key data and return the corresponding communication port number as a search result.

有効エントリ数の通知指示を含むアクセス要求RQが受信されたときは、データ検索部133Aは、通知指示に応じて、エントリデータ受信部132から供給されるエントリデータ群31のうち有効値を持つ有効フラグを含むエントリデータを計数し、その計数結果、すなわちエントリ保持回路12における有効なエントリの数を送受信部131を介して入出力装置14に通知する。   When an access request RQ including a notification instruction for the number of valid entries is received, the data search unit 133A determines that a valid value having a valid value from the entry data group 31 supplied from the entry data reception unit 132 in response to the notification instruction. The entry data including the flag is counted, and the counting result, that is, the number of valid entries in the entry holding circuit 12 is notified to the input / output device 14 via the transmission / reception unit 131.

エントリ登録指示やエントリ削除指示といったエントリの変更を伴う指示(以下、エントリ操作指示と呼ぶ。)を含むアクセス要求RQを送受信部131が受信されたときは、メモリ制御部133Cがそのエントリ操作指示に応じた処理を実行するエントリ操作機能を有する。   When the transmission / reception unit 131 receives an access request RQ including an entry change instruction (hereinafter referred to as an entry operation instruction) such as an entry registration instruction or an entry deletion instruction, the memory control unit 133C sets the entry operation instruction. It has an entry operation function for executing the corresponding processing.

エントリ登録指示を含むアクセス要求RQが受信されたとき、メモリ制御部133Cは、エントリ登録指示に応じて、最上位のデータ記憶領域Mn−1に無効フラグが保持されているか否かを判定する。領域検出部133Bは、エントリデータ受信部132から供給されるエントリデータ群31に基づいて、データ記憶領域M〜Mn−1の中から無効フラグを有する空き領域M(eは1〜n−1の整数)を検出し、その検出結果をメモリ制御部133Cに与える機能を有する。メモリ制御部133Cは、領域検出部133Bによる検出結果から最上位のデータ記憶領域Mn−1に無効フラグが保持されているか否かを判定することができる。 When the access request RQ including the entry registration instruction is received, the memory control unit 133C determines whether or not the invalid flag is held in the uppermost data storage area M n−1 according to the entry registration instruction. . Based on the entry data group 31 supplied from the entry data reception unit 132, the region detection unit 133B has a free region M e (e is 1 to n) having an invalid flag among the data storage regions M 0 to M n−1. -1), and the detection result is given to the memory control unit 133C. The memory control unit 133C can determine whether or not the invalid flag is held in the uppermost data storage area M n−1 from the detection result by the area detection unit 133B.

データ記憶領域Mn−1が無効フラグを保持する空き領域であると判定した場合、メモリ制御部133Cは、有効値を持つ有効フラグと登録すべき実体データとを含むエントリデータを空き領域Mn−1に書き込む。これによりエントリの登録が完了する。一方、データ記憶領域Mn−1に無効フラグが保持されていない場合、言い換えれば、データ記憶領域Mn−1が有効値を持つ有効フラグを含むエントリデータを保持する場合は、メモリ制御部133Cは、先ず、最下位のデータ記憶領域Mに無効フラグを書き込む。その後、後述するシフト操作の実行によりデータ記憶領域M〜Mn−1のエントリデータはそれぞれ1つ下位のデータ記憶領域M〜Mn−2にシフトされるので、このシフト操作の実行後、メモリ制御部133Cは、有効値を持つ有効フラグと登録すべき実体データとを含むエントリデータを最上位のデータ記憶領域Mn−1に書き込む。これによりエントリの登録が完了する。 When it is determined that the data storage area M n−1 is an empty area holding the invalid flag, the memory control unit 133C sets the entry data including the valid flag having a valid value and the entity data to be registered as the empty area M n. Write to -1 . This completes entry registration. On the other hand, if the invalid flag in the data storage area M n-1 is not held, in other words, if the data storage area M n-1 holds the entry data including the valid flag with valid values, the memory controller 133C , first, it writes the invalid flag in the lowest of the data storage area M 0. Thereafter, the entry data in the data storage areas M 1 to M n−1 are shifted to the data storage areas M 0 to M n−2 which are lower by one by executing a shift operation described later. Then, the memory control unit 133C writes entry data including a valid flag having a valid value and entity data to be registered in the uppermost data storage area M n−1 . This completes entry registration.

エントリ削除指示を含むアクセス要求RQが受信されたときは、データ検索部133Aが、このエントリ削除指示に応じて、エントリデータ受信部132から供給されるエントリデータ群31のうち有効値を持つ有効フラグを含むエントリデータの中から特定データと一致する削除すべき実体データを検索する。データ検索部133Aは、実体データを探し出すことができなかったときは、その検索結果を送受信部131を介して入出力装置14に通知する。一方、実体データが探し出されたときは、メモリ制御部133Cが、その一致する実体データを保持するデータ記憶領域M(dは0〜n−1の整数)に無効フラグを書き込むことでデータ記憶領域Mのエントリを無効化する。そして、メモリ制御部133Cは、その結果を送受信部131を介して入出力装置14に通知する。この空き領域Mには、後述するシフト操作により1つ上位のデータ記憶領域Md+1に保持されているエントリデータがシフトさせられる。 When the access request RQ including the entry deletion instruction is received, the data search unit 133A has a valid flag having a valid value in the entry data group 31 supplied from the entry data reception unit 132 in response to the entry deletion instruction. The entity data to be deleted that matches the specific data is searched from the entry data including “”. When the data search unit 133A cannot find the actual data, the data search unit 133A notifies the input / output device 14 of the search result via the transmission / reception unit 131. On the other hand, when the entity data is found, the memory control unit 133C writes the invalid flag to the data storage area M d (d is an integer from 0 to n−1) that holds the corresponding entity data, and the data invalidating an entry in the storage area M d. Then, the memory control unit 133C notifies the input / output device 14 of the result via the transmission / reception unit 131. Entry data held in the data storage area M d + 1 that is one level higher is shifted to the empty area M d by a shift operation described later.

全てのエントリの削除指示(一斉削除指示)を含むアクセス要求RQが受信されたときは、メモリ制御部133Cは、1処理サイクル内に、データ記憶領域M〜Mn−1の全てに無効フラグを書き込むことで全てのエントリを無効化し、一斉削除が完了した旨を送受信部131を介して入出力装置14に通知する。 When an access request RQ including an instruction to delete all entries (simultaneous deletion instruction) is received, the memory control unit 133C includes an invalid flag in all of the data storage areas M 0 to M n−1 within one processing cycle. To invalidate all entries, and notify the input / output device 14 via the transmission / reception unit 131 that simultaneous deletion has been completed.

また、メモリ制御部133Cは、データ記憶領域M〜Mn−1において有効値を持つ有効フラグを含むエントリデータを並び替えて(再配置して)有効なエントリを連続的に詰めて配置するエントリ並べ替え機能(エントリ再配置機能)を有する。具体的には、データ記憶領域M〜Mn−1に対してエントリデータの書き込みが実行されない処理サイクル期間内に、メモリ制御部133Cは、空き領域Mの順位よりも上位のデータ記憶領域Md+1〜Mn−1に保持されているエントリデータを、1つ下位のデータ記憶領域M〜Mn−2にシフトさせるシフト操作を実行し、最上位のデータ記憶領域Mn−1に無効フラグを書き込む。シフト操作は、1処理サイクルで実行される。たとえば、識別子#(1)のデータ記憶領域Mが空き領域である場合、メモリ制御部133Cは、空き領域Mよりも上位のデータ記憶領域M〜Mn−1に保持されるエントリデータを、それぞれ、1つ下位のデータ記憶領域M〜Mn−2にシフトさせる。あるいは、識別子#(n−2)のデータ記憶領域Mn−2が空き領域である場合は、メモリ制御部133Cは、空き領域Mn−2よりも上位のデータ記憶領域Mn−1に保持されているエントリデータを、1つ下位のデータ記憶領域Mn−2にシフトさせる。 Further, the memory control unit 133C rearranges (rearranges) the entry data including the valid flag having a valid value in the data storage areas M 0 to M n−1 and arranges the valid entries continuously. It has an entry rearrangement function (entry rearrangement function). Specifically, within the processing cycle period in which entry data is not written to the data storage areas M 0 to M n−1 , the memory control unit 133C determines that the data storage area is higher than the rank of the free area M d. A shift operation for shifting the entry data held in M d + 1 to M n−1 to the data storage area M d to M n−2 that is one level lower is executed, and the highest data storage area M n−1 is executed. Write invalid flag. The shift operation is executed in one processing cycle. For example, if the data storage area M 1 Identifier # (1) is a free area, the memory controller 133C, the entry data stored in the upper data storage area M 2 ~M n-1 than the free space M 1 Are respectively shifted to the data storage areas M 1 to M n−2 one level lower. Alternatively, when the data storage area M n−2 of the identifier # (n−2) is an empty area, the memory control unit 133C holds the data storage area M n−1 higher than the empty area M n−2. The entered data is shifted to the data storage area M n−2 which is one level lower.

このようなエントリ並べ替え機能により、データ記憶領域M〜Mn−1において有効値を持つ有効フラグを含むエントリデータを連続的に配置する(並び替える)ことができ、有効値を持つ有効フラグを保持するデータ記憶領域間に空き領域が介在すること(空き領域の断片化)を解消することができる。また、最上位のデータ記憶領域Mn−1を含む上位のデータ記憶領域群をできるだけ空き領域にすることができる。上記のエントリ登録指示に応じて新規エントリを最上位のデータ記憶領域Mn−1に登録する際、最上位のデータ記憶領域Mn−1が空き領域であれば、シフト操作によりデータ記憶領域Mn−1が空き領域になるのを待つことなく、このデータ記憶領域Mn−1に実体データを書き込むことができる。 By such an entry rearranging function, entry data including a valid flag having a valid value can be continuously arranged (reordered) in the data storage areas M 0 to M n−1 . It is possible to eliminate the presence of an empty area between the data storage areas that hold the data (fragmentation of the empty area). Further, the upper data storage area group including the uppermost data storage area M n−1 can be made as free as possible. When a new entry is registered in the highest data storage area M n−1 in response to the entry registration instruction, if the highest data storage area M n−1 is an empty area, the data storage area M is changed by a shift operation. The entity data can be written to the data storage area M n−1 without waiting for n−1 to become a free area.

また、エントリ並べ替え機能により、有効値を持つ有効フラグを含むエントリデータが連続的に配置されるようになるので、データ検索指示や特定エントリの削除指示があったときに検索範囲を限定することができる。したがって、データ検索処理とエントリ削除処理の高速化を実現することができる。   In addition, the entry sorting function allows entry data including valid flags with valid values to be placed continuously, so that the search range is limited when there is a data search instruction or a specific entry deletion instruction. Can do. Therefore, it is possible to realize high speed data search processing and entry deletion processing.

次に、図4を参照しつつ、エントリ保持回路12の好適な構成について説明する。エントリ保持回路12は、n段のレジスタ回路40,…,40n−3,40n−2,40n−1を有するシフトレジスタ回路である。各レジスタ回路40(jは0〜n−1のうちの任意の整数)は、図4に示されるように、たとえばクロック信号に同期して動作するフリップ・フロップなどのレジスタ50と、エントリセレクタ60と、自エントリデータ制御回路70とを有する。レジスタ50,…,50n−1はそれぞれ図2のデータ記憶領域M,…,Mn−2,Mn−1を構成する記憶素子である。 Next, a preferred configuration of the entry holding circuit 12 will be described with reference to FIG. The entry holding circuit 12 is a shift register circuit having n- stage register circuits 40 0 ,..., 40 n−3 , 40 n−2 , and 40 n−1 . Each register circuit 40 j (j is an arbitrary integer from 0 to n−1) includes, for example, a register 50 j such as a flip-flop that operates in synchronization with a clock signal and an entry as shown in FIG. It has a selector 60 j and its own entry data control circuit 70 j . Registers 50 0 ,..., 50 n−1 are storage elements constituting the data storage areas M 0 ,..., M n−2 , M n−1 of FIG.

エントリ制御回路13は、制御データ群32をエントリ保持回路12に供給する。制御データ群32は、エントリセレクタ60,…,60n−2,60n−1にそれぞれ供給される選択制御信号SEL,…,SELn−2,SELn−1と、自エントリデータ制御回路70,…,70n−2,70n−1にそれぞれ供給される制御信号C,…,Cn−2,Cn−1とからなる。各エントリセレクタ60は、選択制御信号SELの値に応じて3個の入力端子のいずれか1つに入力したデータを選択し、このデータをレジスタ50の入力端子に出力する機能を有する。 The entry control circuit 13 supplies the control data group 32 to the entry holding circuit 12. The control data group 32 includes selection control signals SEL 0 ,..., SEL n−2 , SEL n−1 supplied to the entry selectors 60 0 ,..., 60 n−2 , 60 n−1 , and own entry data control. circuit 70 0, ..., 70 n- 2, 70 n-1 to the control signal C 0 is supplied, ..., consisting of C n-2, C n- 1 Tokyo. Each entry selector 60 j has a function of selecting data input to any one of the three input terminals according to the value of the selection control signal SEL j and outputting this data to the input terminal of the register 50 j. .

最上位のレジスタ回路40n−1では、エントリセレクタ60n−1の3個の入力端子には、エントリ制御回路13から供給された登録データ(実体データ)ODと、自エントリデータ制御回路70n−1の出力データADn−1と、レジスタ50n−1のフィードバック出力ODn−1とが入力される。エントリセレクタ60n−1がレジスタ50n−1のフィードバック出力ODn−1を選択したとき、レジスタ50n−1の出力端子と入力端子との間にフィードバックループが形成され、レジスタ50n−1は同一のビット値(エントリデータ)を保持し続ける。エントリセレクタ60n−1が自エントリデータ制御回路70n−1の出力データADn−1を選択したときは、レジスタ50n−1は、クロック信号のパルスエッジに応じて、自エントリデータ制御回路70n−1の出力データADn−1をラッチ(保持)する。そして、エントリセレクタ60n−1がエントリ制御回路13から供給されたデータODを選択したときは、レジスタ50n−1は、クロック信号のパルスエッジに応じてデータODをラッチする。 In the uppermost register circuit 40 n−1 , the registration data (substance data) OD n supplied from the entry control circuit 13 and the own entry data control circuit 70 are connected to the three input terminals of the entry selector 60 n−1. the output data AD n-1 to n-1, the register 50 and the feedback output OD n-1 to n-1 are inputted. When an entry selector 60 n-1 selects the feedback output OD n-1 of the register 50 n-1, a feedback loop is formed between the input terminal and the output terminal of the register 50 n-1, the register 50 n-1 Continues to hold the same bit value (entry data). When the entry selector 60 n-1 selects the output data AD n-1 of its own entry data control circuit 70 n-1 , the register 50 n-1 selects its own entry data control circuit according to the pulse edge of the clock signal. 70 n−1 output data AD n−1 is latched (held). When the entry selector 60 n-1 selects the data OD n supplied from the entry control circuit 13, the register 50 n-1 latches the data OD n according to the pulse edge of the clock signal.

自エントリデータ制御回路70n−1は、制御信号Cn−1に応じて、レジスタ50n−1に保持されているエントリデータの一部または全てを変更するための置換データADn−1を生成する機能を有する。レジスタ50n−1の出力データODn−1はフィードバックして自エントリデータ制御回路70n−1にも入力されている。自エントリデータ制御回路70n−1は、制御信号Cn−1の値に応じて有効値を持つ有効フラグ及び無効フラグのうちのいずれか一方の制御フラグと、フィードバック出力ODn−1に含まれる実体データとを含むエントリデータADn−1を構成し、このエントリデータADn−1をエントリセレクタ60n−1に出力することができる。 The own entry data control circuit 70 n−1 receives replacement data AD n−1 for changing part or all of the entry data held in the register 50 n−1 in accordance with the control signal C n−1. It has a function to generate. The output data OD n-1 of the register 50 n-1 is fed back and input to the own entry data control circuit 70 n-1 . The own entry data control circuit 70 n−1 is included in one of the valid flag and invalid flag having a valid value according to the value of the control signal C n−1 and the feedback output OD n−1 . The entry data AD n-1 including the actual data is configured, and the entry data AD n-1 can be output to the entry selector 60 n-1 .

一方、他のレジスタ回路40(kは0〜n−2のいずれか)では、エントリセレクタ60の3個の入力端子には、前段のレジスタ50k+1の出力データODk+1と、自エントリデータ制御回路70の出力データADと、レジスタ50の出力データODとが入力される。エントリセレクタ60がレジスタ50のフィードバック出力ODを選択したとき、レジスタ50の出力端子と入力端子との間にフィードバックループが形成され、レジスタ50は同一のビット値(エントリデータ)を保持し続ける。エントリセレクタ60が自エントリデータ制御回路70の出力データADを選択したときは、レジスタ50は、クロック信号のパルスエッジに応じて、自エントリデータ制御回路70の出力データADをラッチ(保持)する。そして、エントリセレクタ60が前段のレジスタ50k+1の出力データODk+1を選択したときは、レジスタ50は、クロック信号のパルスエッジに応じてデータODk+1をラッチする。 On the other hand, in the other register circuit 40 k (k is one of 0 to n−2), the three input terminals of the entry selector 60 k are connected to the output data OD k + 1 of the register 50 k + 1 in the previous stage and the own entry data. the output data AD k of the control circuit 70 k, and the output data OD k of the register 50 k is input. When an entry selector 60 k selects the feedback output OD k of the register 50 k, the feedback loop is formed between the input terminal and the output terminal of the register 50 k, the register 50 k is the same bit value (entry data) Keep holding. When the entry selector 60 k selects the output data AD k of its own entry data control circuit 70 k , the register 50 k outputs the output data AD k of its own entry data control circuit 70 k according to the pulse edge of the clock signal. Latch (hold). When the entry selector 60 k selects the output data OD k + 1 of the previous register 50 k + 1 , the register 50 k latches the data OD k + 1 according to the pulse edge of the clock signal.

自エントリデータ制御回路70は、制御信号Cに応じて、レジスタ50に保持されているエントリデータの一部または全部を変更するための置換データADを生成する機能を有する。レジスタ50の出力データODはフィードバックして自エントリデータ制御回路70にも入力されている。自エントリデータ制御回路70は、制御信号Cの値に応じて有効値を持つ有効フラグ及び無効フラグのうちのいずれか一方の制御フラグと、フィードバック出力ODに含まれる実体データとを含むエントリデータADを構成し、このエントリデータADをエントリセレクタ60n−1に出力することができる。 Own entry data control circuit 70 k has a function in response to the control signal C k, and generates a replacement data AD k to change some or all of the entry data held in the register 50 k. Register output data OD k of 50 k is also input to the self entry data control circuit 70 k is fed back. The own entry data control circuit 70 k includes either a valid flag having a valid value according to the value of the control signal C k or an invalid flag, and entity data included in the feedback output OD k. The entry data AD k can be configured, and the entry data AD k can be output to the entry selector 60 n−1 .

レジスタ50〜50n−1は、出力データOD〜ODn−1からなるエントリデータ群31をエントリ制御回路13に並列に出力しているので、エントリ制御回路13は、レジスタ50〜50n−1に保持されている全てのエントリデータを一度に取得することができる。 Since the registers 50 0 to 50 n−1 output the entry data group 31 including the output data OD 0 to OD n−1 to the entry control circuit 13 in parallel, the entry control circuit 13 includes the registers 50 0 to 50 n. All entry data held in n-1 can be acquired at once.

エントリ制御回路13は、制御データ群32を供給することでエントリ保持回路12の動作を制御することができる。エントリ登録指示やエントリ削除指示といったエントリ操作指示に応じた処理を実行しない処理サイクル期間には、メモリ制御部133Cは、全てのエントリセレクタ60〜60n−1にレジスタ50〜50n−1のフィードバック出力OD〜ODn−1を選択させる選択制御信号SEL〜SELn−1を出力する。これによりレジスタ50〜50n−1は同一のエントリデータ群を保持し続ける。 The entry control circuit 13 can control the operation of the entry holding circuit 12 by supplying the control data group 32. The processing cycle that does not execute processing corresponding to the entry operation instruction such entry registration instruction or the entry delete instruction, the memory controller 133C, all entries selector 60 0-60 registers 50 to n-1 0 ~50 n-1 Selection control signals SEL 0 to SEL n−1 for selecting the feedback outputs OD 0 to OD n−1 are output. As a result, the registers 50 0 to 50 n−1 continue to hold the same entry data group.

エントリデータを無効化してエントリ保持回路12からエントリを削除するときは、メモリ制御部133Cは、無効化対象のエントリデータを保持するレジスタ回路40のエントリセレクタ60に自エントリデータ制御回路70の出力データADを選択させる選択制御信号SELを供給し、自エントリデータ制御回路70に無効フラグを含む置換データADを生成させる制御信号Cを供給する。これによりレジスタ50は無効フラグを保持する。 When deleting an entry from the invalidation to entry hold circuit 12 the entry data, the memory controller 133C, the register circuit 40 for holding the entry data invalidation target d entry selector 60 d to the self entry data control circuit 70 d output supplies data AD d selection control signal SEL d to select, it supplies a control signal C d to generate replacement data AD d that contains an invalid flag in the own entry data control circuit 70 d. Thus the register 50 d holds the invalid flag.

エントリ登録指示に応じてエントリデータをエントリ保持回路12に記憶させるときは、メモリ制御部133Cは、最上位のエントリセレクタ60n−1に置換データODを選択させる選択制御信号SELn−1を供給し、エントリセレクタ60n−1に新たなエントリデータを置換データODとして供給する。レジスタ50n−1は、クロック信号のパルスエッジに応じて、エントリセレクタ60n−1を介して入力されたエントリデータODをラッチ(保持)する。これにより、最上位のレジスタ50n−1にエントリデータが登録される。 When storing the entry data in the entry holding circuit 12 in response to the entry registration instruction, the memory control unit 133C generates a selection control signal SEL n−1 that causes the highest entry selector 60 n−1 to select the replacement data OD n. Then, new entry data is supplied as replacement data OD n to the entry selector 60 n−1 . The register 50 n−1 latches (holds) the entry data OD n input via the entry selector 60 n−1 in accordance with the pulse edge of the clock signal. As a result, entry data is registered in the uppermost register 50 n−1 .

データ記憶領域M〜Mn−1内に空き領域Mが存在するとき、エントリ操作指示に応じたエントリデータの書き込みが実行されない処理サイクル期間内に、有効値を持つ有効フラグを含むエントリデータが再配置される。具体的には、メモリ制御部133Cは、空き領域Mを有するレジスタ回路40の順位よりも上位のレジスタ回路40e+1〜40n−1内のレジスタ50e+1〜50n−1の出力データODe+1〜ODn−1を選択させる選択制御信号SEL〜SELn−2をエントリセレクタ60〜60n−2に供給する。さらに、メモリ制御部133Cは、最上位のレジスタ回路40n−1のエントリセレクタ60n−1に自エントリデータ制御回路70n−1の出力データADn−1を選択させる選択制御信号SELn−1を供給し、自エントリデータ制御回路70n−1に無効フラグを含む置換データADn−1を生成させる制御信号Cn−1を供給する。これによりレジスタ50〜50n−2は、それぞれ、前段のレジスタ50e+1〜50n−1の出力データODe+1〜ODn−1をラッチ(保持)するシフト動作を実行する。また、最上位のレジスタ50n−1に無効フラグが保持される。 When the free space M e in the data storage area M 0 ~M the n-1, the entry operation instruction in a processing cycle that does not write an entry data corresponding to the entry data including a valid flag with valid value Are rearranged. Specifically, the memory controller 133C is free space M upper register circuit 40 than order of register circuit 40 e with e e + 1 to 40 registers 50 in n-1 e + 1 ~50 n -1 of the output data OD Selection control signals SEL e to SEL n-2 for selecting e + 1 to OD n-1 are supplied to the entry selectors 60 e to 60 n-2 . Further, the memory controller 133C, the selection control signal to select the output data AD n-1 of the own entry data control circuit 70 n-1 in the entry selector 60 n-1 of the top-level register circuit 40 n-1 SEL n- 1 supplies, supplies a control signal C n-1 to generate replacement data AD n-1 that contains an invalid flag in the own entry data control circuit 70 n-1. Thus the register 50 e ~50 n-2, respectively, to perform a shift operation the output data OD e + 1 ~OD n-1 of the previous register 50 e + 1 ~50 n-1 latches (holds). Further, an invalid flag is held in the highest register 50 n−1 .

次に、図5〜図9を参照しつつ、上記構成を有する実施の形態1のデータ記憶装置11の動作を説明する。   Next, the operation of the data storage device 11 according to the first embodiment having the above configuration will be described with reference to FIGS.

図5は、入出力装置14からのエントリ操作指示がない場合に実行されるエントリ並べ替え処理の手順を概略的に示すフローチャートであり、図6は、エントリ並べ替え処理が実行されたときのデータ記憶領域の状態遷移の様子を示す図である。また、図7は、エントリ削除指示に応じて実行されるエントリ削除処理の手順を概略的に示すフローチャートであり、図8及び図9は、エントリ登録指示に応じて実行されるエントリ登録処理の手順を概略的に示すフローチャートである。なお、データ検索要求、データ読み出し指示及び有効エントリ数の通知指示といったエントリの変更を伴わないアクセス要求RQに対する処理は、エントリ保持回路12がシフトレジスタ回路の構成を有するので、常時実行可能な処理である。これらの処理は、エントリ並べ替え処理、エントリ削除処理及びエントリ登録処理が実行される処理サイクル期間中でも、並行して実行することができる。   FIG. 5 is a flowchart schematically showing a procedure of entry rearrangement processing executed when there is no entry operation instruction from the input / output device 14, and FIG. 6 shows data when the entry rearrangement processing is executed. It is a figure which shows the mode of the state transition of a storage area. FIG. 7 is a flowchart schematically showing the procedure of entry deletion processing executed in response to the entry deletion instruction. FIGS. 8 and 9 show the procedure of entry registration processing executed in response to the entry registration instruction. FIG. Note that the processing for an access request RQ that does not involve entry change, such as a data search request, a data read instruction, and a valid entry count notification instruction, is a process that can be executed at all times because the entry holding circuit 12 has a shift register circuit configuration. is there. These processes can be executed in parallel even during the process cycle period in which the entry rearrangement process, the entry deletion process, and the entry registration process are executed.

最初に、図5を参照しつつ、エントリ操作指示がない場合に実行されるエントリ並べ替え処理について説明する。エントリ更新制御部133のメモリ制御部133Cは、エントリデータ受信部132から供給されるエントリデータ群31に基づいてエントリ保持回路12の動作状態を把握し、適切な処理サイクル期間にエントリ並べ替え処理を開始する。   First, an entry rearrangement process executed when there is no entry operation instruction will be described with reference to FIG. The memory control unit 133C of the entry update control unit 133 grasps the operation state of the entry holding circuit 12 based on the entry data group 31 supplied from the entry data receiving unit 132, and performs the entry rearrangement process in an appropriate processing cycle period. Start.

先ず、メモリ制御部133Cは、変数iを初期化して変数iにゼロ値を設定する(ステップS101)。次に、メモリ制御部133Cは、識別子#(i)を有するレジスタ回路40に保持されているエントリデータ(以下、識別子#(i)のエントリデータと呼ぶ。)が無効であるか否かを判定する(ステップS103)。識別子#(i)のエントリデータが有効であると判定したとき(ステップS103のNO)、メモリ制御部133Cは、変数iがn−2に達したかどうかを判定する(ステップS115)。変数iがn−2に達したとき(ステップS115のYES)、エントリ並べ替え処理は終了する。一方、変数iがn−2に達していないとき(ステップS115のNO)、メモリ制御部133Cは、変数iを1だけインクリメントし(ステップS117)、ステップS103に手順を戻す。 First, the memory control unit 133C initializes the variable i and sets a zero value to the variable i (step S101). Next, the memory control unit 133C determines whether or not the entry data held in the register circuit 40 i having the identifier # (i) (hereinafter referred to as the entry data of the identifier # (i)) is invalid. Determination is made (step S103). When it is determined that the entry data of the identifier # (i) is valid (NO in step S103), the memory control unit 133C determines whether the variable i has reached n-2 (step S115). When the variable i reaches n−2 (YES in step S115), the entry rearrangement process ends. On the other hand, when the variable i has not reached n−2 (NO in step S115), the memory control unit 133C increments the variable i by 1 (step S117), and returns the procedure to step S103.

最下位のエントリデータから上位のエントリデータに向かって順番に無効か否かの判定(ステップS103)を実行した結果、無効フラグを含む無効なエントリデータが存在していたとき(ステップS103のYES)、メモリ制御部133Cは、変数jに変数iの値を設定する(ステップS105)。次いで、メモリ制御部133Cは、識別子#(j)のエントリに識別子#(j+1)のエントリデータをシフトさせる制御を実行する(ステップS107)。具体的には、メモリ制御部133Cは、識別子#(j)を有するレジスタ回路40のエントリセレクタ60に、識別子#(j+1)を有する前段レジスタ回路40j+1の出力データODj+1を選択させる選択制御信号SELを供給する。次いで、変数jを1だけインクリメントする(ステップS109)。その後、メモリ制御部133Cは、変数jが最上位のレジスタ回路40n−1の識別子番号n−1に達したか否かを判定する(ステップS111)。変数jがn−1に達していなければ(ステップS111のNO)、処理手順はステップS107に戻る。このようにステップS111で変数jがn−1に達するとの判定(ステップS111のYES)がなされるまで、上記ステップS107,S109の処理が繰り返し実行される。この結果、レジスタ50〜50n−2は、それぞれ、前段のレジスタ50i+1〜50n−1の出力データODi+1〜ODn−1をラッチ(保持)するシフト動作を実行する。 When invalid entry data including an invalid flag exists as a result of determining whether or not invalid (step S103) in order from the lowest entry data to the higher entry data (YES in step S103) The memory control unit 133C sets the value of the variable i to the variable j (step S105). Next, the memory control unit 133C executes control to shift the entry data of the identifier # (j + 1) to the entry of the identifier # (j) (Step S107). Specifically, the memory control unit 133C selects the entry selector 60 j of the register circuit 40 j having the identifier # (j) to select the output data OD j + 1 of the preceding register circuit 40 j + 1 having the identifier # (j + 1). A control signal SEL j is supplied. Next, the variable j is incremented by 1 (step S109). Thereafter, the memory control unit 133C determines whether or not the variable j has reached the identifier number n-1 of the highest-order register circuit 40 n-1 (step S111). If the variable j has not reached n−1 (NO in step S111), the processing procedure returns to step S107. As described above, the processes of steps S107 and S109 are repeatedly executed until it is determined in step S111 that the variable j reaches n−1 (YES in step S111). Consequently, the register 50 i ~50 n-2, respectively, to perform a shift operation the output data OD i + 1 ~OD n-1 of the previous register 50 i + 1 ~50 n-1 latches (holds).

シフト動作の実行後(ステップS111のYES)、メモリ制御部133Cは、識別子#(n−1)の最上位エントリを無効化する(ステップS113)。具体的には、メモリ制御部133Cは、最上位のレジスタ回路40n−1のエントリセレクタ60n−1に自エントリデータ制御回路70n−1の出力データADn−1を選択させる選択制御信号SELn−1を供給し、自エントリデータ制御回路70n−1に無効フラグを含む置換データADn−1を生成させる制御信号Cn−1を供給する。これによりレジスタ50n−1に無効フラグが保持される。その後、ステップS115で変数iがn−2に達するとの判定(ステップS115のYES)がなされるまで、ステップS117以後の処理が実行される。 After executing the shift operation (YES in step S111), the memory control unit 133C invalidates the highest entry of the identifier # (n-1) (step S113). Specifically, the memory controller 133C, the selection control signal for selecting the output data AD n-1 of the own entry data control circuit 70 n-1 in the entry selector 60 n-1 of the most significant register circuits 40 n-1 supplying SEL n-1, and supplies a control signal C n-1 to generate replacement data AD n-1 that contains an invalid flag in the own entry data control circuit 70 n-1. As a result, the invalid flag is held in the register 50 n-1 . Thereafter, the processing after step S117 is executed until it is determined in step S115 that the variable i reaches n-2 (YES in step S115).

図6(A)〜(C)は、上記エントリ並べ替え処理が実行されたときに、最大エントリ数nが7の場合のデータ記憶領域M〜Mの状態遷移の様子を示す図である。図6(A)に示すように、最初の状態では、識別子#(1),#(2),#(4)のエントリが有効であり、その他のエントリは無効であるとする。 6A to 6C are diagrams showing the state transition of the data storage areas M 0 to M 6 when the maximum entry number n is 7 when the entry rearrangement process is executed. . As shown in FIG. 6A, in the initial state, it is assumed that entries with identifiers # (1), # (2), and # (4) are valid and other entries are invalid.

上記エントリ並べ替え処理の実行により、先ず、識別子#(i=0)のエントリデータが無効であると判定される(ステップS103のYES)。次いで、識別子#(0)のエントリに識別子#(1)のエントリデータをシフトさせ、識別子#(1)のエントリに識別子#(2)のエントリデータをシフトさせ、識別子#(2)のエントリに識別子#(3)のエントリデータをシフトさせ、識別子#(3)のエントリに識別子#(4)のエントリデータをシフトさせ、識別子#(4)のエントリに識別子#(5)のエントリデータをシフトさせ、識別子#(5)のエントリに識別子#(6)のエントリデータをシフトさせるというシフト操作が実行される(ステップS105〜S111)。その後、識別子#(6)のエントリの無効化処理が実行される(ステップS113)。これにより、図6(B)に示されるように識別子#(0),#(1),#(3)のエントリに有効なエントリデータがシフトする。以上のシフト操作及びエントリの無効化処理は、最初の処理サイクル期間内に実行される。   By executing the entry rearrangement process, it is first determined that the entry data with the identifier # (i = 0) is invalid (YES in step S103). Next, the entry data of identifier # (1) is shifted to the entry of identifier # (0), the entry data of identifier # (2) is shifted to the entry of identifier # (1), and the entry of identifier # (2) is entered. The entry data of identifier # (3) is shifted, the entry data of identifier # (4) is shifted to the entry of identifier # (3), and the entry data of identifier # (5) is shifted to the entry of identifier # (4) Then, a shift operation of shifting the entry data of identifier # (6) to the entry of identifier # (5) is executed (steps S105 to S111). Thereafter, an invalidation process for the entry of identifier # (6) is executed (step S113). As a result, as shown in FIG. 6B, valid entry data is shifted to the entries of identifiers # (0), # (1), and # (3). The above shift operation and entry invalidation processing are executed within the first processing cycle period.

次の処理サイクル期間では、識別子#(i=2)のエントリデータが無効であると判定される(ステップS103のYES)。次いで、識別子#(2)のエントリに識別子#(3)のエントリデータをシフトさせ、識別子#(3)のエントリに識別子#(4)のエントリデータをシフトさせ、識別子#(4)のエントリに識別子#(5)のエントリデータをシフトさせ、識別子#(5)のエントリに識別子#(6)のエントリデータをシフトさせるというシフト操作が実行される(ステップS105〜S111)。その後、識別子#(6)のエントリの無効化処理が実行される(ステップS113)。この結果、図6(C)に示されるように識別子#(0),#(1),#(2)のエントリに有効なエントリデータがシフトする。   In the next processing cycle period, it is determined that the entry data of identifier # (i = 2) is invalid (YES in step S103). Next, the entry data of identifier # (3) is shifted to the entry of identifier # (2), the entry data of identifier # (4) is shifted to the entry of identifier # (3), and the entry of identifier # (4) is entered. A shift operation of shifting the entry data of identifier # (5) and shifting the entry data of identifier # (6) to the entry of identifier # (5) is executed (steps S105 to S111). Thereafter, an invalidation process for the entry of identifier # (6) is executed (step S113). As a result, as shown in FIG. 6C, valid entry data is shifted to the entries of identifiers # (0), # (1), and # (2).

次の処理サイクル期間では、識別子#(i=3)のエントリデータが無効であると判定される(ステップS103のYES)。次いで、識別子#(3)のエントリに識別子#(4)のエントリデータをシフトさせ、識別子#(4)のエントリに識別子#(5)のエントリデータをシフトさせ、識別子#(5)のエントリに識別子#(6)のエントリデータをシフトさせるというシフト操作が実行される(ステップS105〜S111)。その後、識別子#(6)のエントリの無効化処理が実行される(ステップS113)。   In the next processing cycle period, it is determined that the entry data of identifier # (i = 3) is invalid (YES in step S103). Next, the entry data of identifier # (4) is shifted to the entry of identifier # (3), the entry data of identifier # (5) is shifted to the entry of identifier # (4), and the entry of identifier # (5) is entered. A shift operation for shifting the entry data of the identifier # (6) is executed (steps S105 to S111). Thereafter, an invalidation process for the entry of identifier # (6) is executed (step S113).

メモリ制御部133Cは、上記エントリ並べ替え処理を、エントリデータの書き込みを実行しない処理サイクル期間に常に実行することで、図6(C)に示すように有効なエントリが詰まって配置された状態を実現することができる。図6(A)〜(C)に示したように、エントリデータの並び替えが完了するまで複数の処理サイクルを要することになるが、図4に示したように、レジスタ50〜50n−1はエントリデータ群31をエントリ制御回路13に供給しているので、並び替え処理を中断することなく、エントリデータ群31を読み出すことができる。 The memory control unit 133C always executes the above-described entry rearrangement processing in a processing cycle period in which entry data writing is not executed, so that a state in which valid entries are packed and arranged as shown in FIG. Can be realized. As shown in FIGS. 6A to 6C, a plurality of processing cycles are required until the rearrangement of the entry data is completed. As shown in FIG. 4, the registers 50 0 to 50 n− 1 supplies the entry data group 31 to the entry control circuit 13, so that the entry data group 31 can be read without interrupting the rearrangement process.

次に、図7を参照しつつ、特定データと一致する実体データを含むエントリデータを無効化するためのエントリ削除処理について説明する。   Next, an entry deletion process for invalidating entry data including entity data that matches the specific data will be described with reference to FIG.

エントリ保持回路12は、シフトレジスタ回路の構成を有し、エントリデータをシフトさせるので、ある処理サイクル期間に識別子#(i)のデータ記憶領域Mに存在していたエントリデータが、その次の処理サイクル期間に同じ識別子#(i)のデータ記憶領域Mに存在している保証はない。そのため、本実施の形態では、特定データを検索キーとした検索を実行して削除対象となるエントリを特定する方法が採用される。入出力装置14からエントリ削除指示を含むアクセス要求RQが受信されると、メモリ制御部133Cは、このエントリ削除指示に応じて、エントリ保持回路12の動作状態を把握し、適切な処理サイクル期間にエントリ削除処理を開始する。 Entry holding circuit 12 has a configuration of a shift register circuit, so shifting the entry data, the entry data that existed in the data storage area M i identifier # (i) in a certain processing cycle period, the following There is no guarantee that data storage area M i with the same identifier # (i) exists in the processing cycle period. For this reason, in the present embodiment, a method is adopted in which a search using specific data as a search key is executed to specify an entry to be deleted. When the access request RQ including the entry deletion instruction is received from the input / output device 14, the memory control unit 133C grasps the operation state of the entry holding circuit 12 according to the entry deletion instruction, and performs an appropriate processing cycle period. Start entry deletion processing.

先ず、メモリ制御部133Cは、変数iを初期化して変数iにゼロ値を設定する(ステップS201)。次に、メモリ制御部133Cは、レジスタ回路40に保持されている識別子#(i)のエントリデータが、特定データと一致する削除すべき実体データを含むか否かを判定する(ステップS203)。エントリデータが削除すべき実体データを含まない場合(ステップS203のNO)、メモリ制御部133Cは、変数iが最上位のエントリを指す識別子番号n−1に達したか否かを判定し(ステップS209)、変数iがn−1に達していなければ(ステップS209のNO)、変数iを1だけインクリメントして(ステップS213)、処理手順をステップS203に戻す。全てのエントリについて削除すべき実体データを含むエントリデータを探し出すことができなかったときは、変数iはn−1に達する(ステップS209のYES)。このとき、メモリ制御部133Cは、送受信部131を介して入出力装置14に削除不能の旨を通知し(ステップS211)、エントリ削除処理を終了する。 First, the memory control unit 133C initializes the variable i and sets a zero value to the variable i (step S201). Next, the memory control unit 133C determines whether or not the entry data of the identifier # (i) held in the register circuit 40 i includes entity data to be deleted that matches the specific data (step S203). . If the entry data does not include the entity data to be deleted (NO in step S203), the memory control unit 133C determines whether or not the variable i has reached the identifier number n-1 indicating the highest entry (step S203). If the variable i has not reached n−1 (NO in step S209), the variable i is incremented by 1 (step S213), and the processing procedure returns to step S203. If entry data including entity data to be deleted cannot be found for all entries, the variable i reaches n−1 (YES in step S209). At this time, the memory control unit 133C notifies the input / output device 14 through the transmission / reception unit 131 that it cannot be deleted (step S211), and ends the entry deletion processing.

一方、識別子#(i)のエントリデータが削除すべき実体データを含むと判定された場合(ステップS203のYES)、メモリ制御部133Cは、識別子#(i)のエントリを無効化する(ステップS205)。具体的には、データ検索部133Aは、削除すべき実体データを保持するデータ記憶領域Mに無効フラグを書き込む。その後、メモリ制御部133Cは、送受信部131を介して入出力装置14に削除完了の旨を通知し(ステップS207)、エントリ削除処理を終了する。 On the other hand, when it is determined that the entry data with identifier # (i) includes entity data to be deleted (YES in step S203), the memory control unit 133C invalidates the entry with identifier # (i) (step S205). ). Specifically, the data search unit 133A writes the invalid flag in the data storage area M i for holding entity data to be deleted. Thereafter, the memory control unit 133C notifies the input / output device 14 of the completion of deletion via the transmission / reception unit 131 (step S207), and ends the entry deletion processing.

なお、上記エントリ削除処理は、エントリ保持回路12において同一の実体データが重複して記憶されていない場合に適用されるものである。そのため、ステップS203において識別子#(i)のエントリデータが削除すべき実体データを含むと判定されれば、識別子#(i+1)のエントリに削除すべき実体データが存在しないことが保証されている。同一の実体データの重複が許可されている場合には、ステップS205の実行後、メモリ制御部133Cは、変数iをインクリメントしてステップS203を実行する手順を採用することができる。   The entry deletion process is applied when the same entity data is not stored redundantly in the entry holding circuit 12. Therefore, if it is determined in step S203 that the entry data with identifier # (i) includes the entity data to be deleted, it is guaranteed that the entity data to be deleted does not exist in the entry with identifier # (i + 1). When duplication of the same entity data is permitted, the memory control unit 133C can adopt a procedure of incrementing the variable i and executing step S203 after executing step S205.

次に、図8を参照しつつ、エントリ保持回路12に実体データを登録するためのエントリ登録処理について説明する。メモリ制御部133Cは、入出力装置14からのエントリ登録指示に応じて、エントリ保持回路12の動作状態を把握し、適切な処理サイクル期間でエントリ登録処理を開始する。   Next, an entry registration process for registering entity data in the entry holding circuit 12 will be described with reference to FIG. The memory control unit 133C grasps the operation state of the entry holding circuit 12 in response to the entry registration instruction from the input / output device 14, and starts entry registration processing in an appropriate processing cycle period.

先ず、メモリ制御部133Cは、変数iを初期化して変数iにゼロ値を設定する(ステップS301)。次に、メモリ制御部133Cは、レジスタ回路40に保持されている識別子#(i)のエントリデータが、登録すべき特定データと一致する実体データを含むか否かを判定する(ステップS303)。エントリデータが当該実体データを含まない場合(ステップS303のNO)、メモリ制御部133Cは、変数iが最上位のエントリを指す識別子番号n−1に達したか否かを判定し(ステップS321)、変数iがn−1に達していなければ(ステップS321のNO)、変数iを1だけインクリメントして(ステップS323)、処理手順をステップS303に戻す。 First, the memory control unit 133C initializes the variable i and sets a zero value to the variable i (step S301). Next, the memory control unit 133C determines whether or not the entry data of the identifier # (i) held in the register circuit 40 i includes entity data that matches the specific data to be registered (step S303). . When the entry data does not include the entity data (NO in step S303), the memory control unit 133C determines whether or not the variable i has reached the identifier number n-1 indicating the highest entry (step S321). If the variable i has not reached n−1 (NO in step S321), the variable i is incremented by 1 (step S323), and the processing procedure returns to step S303.

一方、識別子#(i)のエントリデータが、登録すべき特定データと一致する実体データを含むと判定された場合(ステップS303のYES)、メモリ制御部133Cは、識別子#(i)のエントリを無効化する(ステップS305)。具体的には、データ検索部133Aは、当該実体データを保持するデータ記憶領域Mに無効フラグを書き込む。その後、次の処理サイクル期間に上記エントリ並べ替え処理(図5)が実行されて識別子#(n−1)のエントリが無効化されるまで待機する(ステップS307のNO)。 On the other hand, if it is determined that the entry data of identifier # (i) includes entity data that matches the specific data to be registered (YES in step S303), the memory control unit 133C selects the entry of identifier # (i). Invalidate (step S305). Specifically, the data search unit 133A writes the invalid flag in the data storage area M i to hold the actual data. Thereafter, in the next processing cycle period, the above-described entry rearrangement process (FIG. 5) is executed, and the process waits until the entry of the identifier # (n−1) is invalidated (NO in step S307).

識別子#(n−1)のエントリの無効化が完了したとき(ステップS307のYES)、メモリ制御部133Cは、識別子#(n−1)のエントリ(空きエントリ)への特定データの書き込み制御を行う(ステップS309)。具体的には、メモリ制御部133Cは、最上位のエントリセレクタ60n−1に置換データODを選択させる選択制御信号SELn−1を供給し、エントリセレクタ60n−1に特定データを含む新たなエントリデータを置換データODとして供給する。これによりレジスタ50n−1は、エントリセレクタ60n−1を介して入力されたエントリデータODをラッチ(保持)する。その後、メモリ制御部133Cは、送受信部131を介して入出力装置14に更新完了の旨を通知し(ステップS311)、エントリ登録処理を終了する。 When the invalidation of the entry with the identifier # (n−1) is completed (YES in step S307), the memory control unit 133C performs control of writing specific data to the entry with the identifier # (n−1) (empty entry). This is performed (step S309). Specifically, the memory control unit 133C supplies a selection control signal SEL n-1 that causes the highest-level entry selector 60 n-1 to select the replacement data OD n , and the entry selector 60 n-1 includes specific data. a new entry data supplied as replacement data OD n. As a result, the register 50 n-1 latches (holds) the entry data OD n input via the entry selector 60 n-1 . Thereafter, the memory control unit 133C notifies the input / output device 14 of the update completion via the transmission / reception unit 131 (step S311), and ends the entry registration process.

一方、全てのエントリについて、登録すべき特定データと一致する実体データを含むエントリデータを探し出すことができなかったときは、変数iはn−1に達する(ステップS303のNO及びステップS321のYES)。このとき、メモリ制御部133Cは、エントリデータ受信部132から供給されるエントリデータ群31に基づいて、識別子#(n−1)の最上位のエントリが無効か否かを判定する(ステップS325)。最上位のエントリが無効である場合(ステップS325のYES)、メモリ制御部133Cは、識別子#(n−1)のエントリへの特定データの書き込み制御を行う(ステップS331)。その後、メモリ制御部133Cは、送受信部131を介して入出力装置14に登録完了の旨を通知し(ステップS333)、エントリ登録処理を終了する。   On the other hand, if entry data including entity data that matches the specific data to be registered cannot be found for all entries, the variable i reaches n−1 (NO in step S303 and YES in step S321). . At this time, the memory control unit 133C determines whether or not the highest entry of the identifier # (n−1) is invalid based on the entry data group 31 supplied from the entry data receiving unit 132 (step S325). . When the highest entry is invalid (YES in step S325), the memory control unit 133C performs control of writing specific data to the entry of the identifier # (n-1) (step S331). Thereafter, the memory control unit 133C notifies the input / output device 14 of registration completion via the transmission / reception unit 131 (step S333), and ends the entry registration process.

上記ステップS325において最上位のエントリが無効ではない場合(ステップS325のNO)、メモリ制御部133Cは、識別子#(0)の最下位のエントリを無効化する(ステップS327)。その後、次の処理サイクル期間に上記エントリ並べ替え処理(図5)が実行されて識別子#(n−1)のエントリが無効化されるまで待機する(ステップS329のNO)。識別子#(n−1)のエントリの無効化が完了したとき(ステップS329のYES)、メモリ制御部133Cは、ステップS331,S333を順次実行し、エントリ登録処理を終了する。   When the highest entry is not invalid in step S325 (NO in step S325), the memory control unit 133C invalidates the lowest entry of the identifier # (0) (step S327). Thereafter, in the next processing cycle period, the above-described entry rearrangement process (FIG. 5) is executed, and the process waits until the entry of the identifier # (n−1) is invalidated (NO in step S329). When the invalidation of the entry with the identifier # (n−1) is completed (YES in step S329), the memory control unit 133C sequentially executes steps S331 and S333, and ends the entry registration process.

上記の図8のエントリ登録処理は、エントリ保持回路12に同一の実体データが重複して記憶されることを許可しない場合の処理である。図9は、エントリ保持回路12において同一の実体データが重複することを許可する場合のエントリ登録処理の手順を概略的に示すフローチャートである。図9のフローチャートは、図8のステップS303〜311が存在しない点を除いて図8のフローチャートと同じである。図8のステップS303の判定処理が行われないため、特定データは常に登録される。   The entry registration process in FIG. 8 is a process in the case where it is not permitted to store the same entity data in the entry holding circuit 12 redundantly. FIG. 9 is a flowchart schematically showing the procedure of the entry registration process when the entry holding circuit 12 permits the same entity data to be duplicated. The flowchart in FIG. 9 is the same as the flowchart in FIG. 8 except that steps S303 to S311 in FIG. 8 do not exist. Since the determination process in step S303 in FIG. 8 is not performed, the specific data is always registered.

なお、図2(C)に示したようにデータ領域21が、複数の実体データを格納する複数の領域に機能的に分割されている場合、メモリ制御部133Cは、これら複数の実体データのうちの一部を書き換えることもできる。具体的には、メモリ制御部133Cは、レジスタ回路40のエントリセレクタ60に自エントリデータ制御回路70の出力データADを選択させる選択制御信号SELを供給し、自エントリデータ制御回路70にフィードバック出力ODの中の複数の実体データの一部を別の実体データに置換させる制御信号Cを供給する。ここで、メモリ制御部133Cは、当該別の実体データを制御信号Cに含めて自エントリデータ制御回路70に供給することができる。たとえば、上記したように入出力装置14が集線装置であり、MACアドレスと通信ポート番号との対応関係を登録するアドレス検索回路としてエントリ保持回路12を使用する場合、メモリ制御部133Cは、MACアドレスに対応する通信ポート番号を書き換えることができる。また、メモリ制御部133Cは、必ず、エントリ保持回路12に保持されているエントリデータ群31の内容を確認することができるので、特定の対応関係を有する実体データの組み合わせをエントリ保持回路12に保持させないようにすることができる。たとえば、エントリ保持回路12において、1つのMACアドレスが関連付けられた通信ポート番号が複数個存在しないように制御することができる。 When the data area 21 is functionally divided into a plurality of areas for storing a plurality of entity data as shown in FIG. 2C, the memory control unit 133C may It is possible to rewrite a part of. Specifically, the memory controller 133C supplies a selection control signal SEL i for selecting the output data AD i of the own entry data control circuit 70 i in the entry selector 60 i of the register circuit 40 i, the self entry data control circuit 70 i is supplied with a control signal C i for replacing a part of the plurality of entity data in the feedback output OD i with another entity data. Here, the memory control unit 133C can supply the other entity data to the own entry data control circuit 70 i by including the control data C i in the control signal C i . For example, as described above, when the input / output device 14 is a line concentrator and the entry holding circuit 12 is used as an address search circuit for registering the correspondence between a MAC address and a communication port number, the memory control unit 133C The communication port number corresponding to can be rewritten. Further, since the memory control unit 133C can always check the contents of the entry data group 31 held in the entry holding circuit 12, the entry holding circuit 12 holds a combination of entity data having a specific correspondence relationship. You can avoid it. For example, the entry holding circuit 12 can be controlled so that a plurality of communication port numbers associated with one MAC address do not exist.

以上に説明したように、実施の形態1のデータ記憶装置11では、エントリ制御回路13のメモリ制御部133Cは、データ記憶領域M〜Mn−1に対してエントリデータの書き込みを実行しない処理サイクル期間に、データ記憶領域M〜Mn−1の中の空き領域Mの順位よりも上位のデータ記憶領域Me+1〜Mn−1に保持されているエントリデータを、下位のデータ記憶領域にシフトさせるシフト操作を行い、最上位のデータ記憶領域Mn−1に無効フラグを書き込む。これにより、有効値を持つ有効フラグを含むエントリデータを連続的に配置することができ、最上位のデータ記憶領域Mn−1を含む上位のデータ記憶領域を空き領域にすることができる。よって、上記特許文献2(特許第4369524号明細書)に開示されている技術のようにメモリ管理制御のために別の記憶領域を確保する必要がない。また、メモリ制御部133Cは有効なエントリを連続的に再配置して上位の空き領域を形成するので、データ検索処理、エントリ登録処理(図8及び図9)及びエントリ削除処理(図7)の処理速度を高速化することができる。データ記憶装置11を実装する際には、エントリデータの登録や削除(無効化)といった操作と、エントリデータに対するシフト操作とが競合しないようにシステムを容易に設計することができ、しかも、LRUアルゴリズムなどのメモリ管理アルゴリズムに基づく制御に必要な記憶領域を別に確保せずに済むという利点がある。 As described above, in the data storage device 11 according to the first embodiment, the memory control unit 133C of the entry control circuit 13 does not write entry data to the data storage areas M 0 to M n−1 . cycle period, the entry data stored in the data storage area M 0 ~M n-1 higher than the order of the free space M e in the data storage area M e + 1 ~M n-1 , the lower data storage A shift operation for shifting to an area is performed, and an invalid flag is written in the uppermost data storage area M n−1 . Thereby, entry data including a valid flag having a valid value can be continuously arranged, and an upper data storage area including the highest data storage area M n-1 can be made a free area. Therefore, unlike the technique disclosed in Patent Document 2 (Japanese Patent No. 4369524), it is not necessary to secure another storage area for memory management control. In addition, since the memory control unit 133C continuously rearranges valid entries to form higher free areas, the data search process, entry registration process (FIGS. 8 and 9), and entry deletion process (FIG. 7) The processing speed can be increased. When the data storage device 11 is mounted, the system can be easily designed so that operations such as registration and deletion (invalidation) of entry data do not conflict with a shift operation on entry data, and the LRU algorithm There is an advantage that it is not necessary to separately secure a storage area required for control based on a memory management algorithm.

また、エントリ保持回路12がシフトレジスタ回路の構成を有しているので、エントリ制御回路13は、メモリ制御部133Cによるエントリ保持回路12に対する操作に影響を与えることなく、レジスタ50〜50n−1の並列出力(エントリデータ群31)から所望の実体データを取得する(読み出す)ことができる。また、メモリ制御部133Cは、レジスタ50〜50n−1の並列出力に基づいて、エントリ保持回路12の動作状態及び記憶内容を常時監視しながら最適な制御を行うこともできる。 Further, since the entry holding circuit 12 has a shift register circuit configuration, the entry control circuit 13 does not affect the operation of the memory control unit 133C on the entry holding circuit 12, and the registers 50 0 to 50 n− Desired entity data can be acquired (read) from one parallel output (entry data group 31). Further, the memory control unit 133C can perform optimal control while constantly monitoring the operation state and stored contents of the entry holding circuit 12 based on the parallel outputs of the registers 50 0 to 50 n−1 .

したがって、実施の形態1のデータ記憶装置11は、メモリ管理アルゴリズムに基づく制御を少ないメモリ消費量で効率良く実行することができる。特に、LRUアルゴリズムに基づく完全な制御を少ないメモリ消費量で効率良く実行することが可能である。   Therefore, the data storage device 11 according to the first embodiment can efficiently execute the control based on the memory management algorithm with a small amount of memory consumption. In particular, it is possible to efficiently execute complete control based on the LRU algorithm with low memory consumption.

実施の形態2.
次に、本発明に係る実施の形態2について説明する。実施の形態2のデータ記憶装置の構成は、動作モードが異なる点を除いて、実施の形態1のデータ記憶装置11の構成と同一である。実施の形態1については、エントリ保持回路12におけるデータ記憶領域Mのフラグ領域22が単一の制御フラグ(有効フラグ)を格納する場合の動作を説明した。本実施の形態では、データ記憶領域Mのフラグ領域22は、図10(A),(B)に示されるように2つの領域22A,22Bに機能的に分割されており、一方の領域22Aには上記有効フラグが格納され、他方の領域22Bには静的フラグが格納される。静的フラグは、データ記憶領域Mに保持されるエントリデータの無効化を許可する許可値(たとえば「0」の値)と、エントリデータの無効化を許可しないマスク値(たとえば「1」の値)とのうちのいずれか一方を有するものである。
Embodiment 2. FIG.
Next, a second embodiment according to the present invention will be described. The configuration of the data storage device of the second embodiment is the same as the configuration of the data storage device 11 of the first embodiment except that the operation mode is different. For the first embodiment, the flag area 22 of the data storage area M i in the entry holding circuit 12 has been described the operation in the case of storing a single control flag (valid flag). In this embodiment, the flag area 22 of the data storage area M i, as shown in FIG. 10 (A), 2 two regions 22A, as shown (B), the are functionally divided into 22B, one region 22A Stores the valid flag, and the other area 22B stores a static flag. Static flag grant value for permitting the invalidation of an entry data stored in the data storage area M i (e.g. the value of "0"), the mask value that does not allow the disabling of the entry data (for example, "1" Value).

エントリ更新制御部133のメモリ制御部133Cは、上記実施の形態1に関して説明したエントリ登録処理やエントリ削除処理の際に、マスク値を持つ静的フラグを保持するデータ記憶領域M(mは0〜n−1のいずれかの整数)を検出した場合には、そのデータ記憶領域Mに無効フラグを書き込まない、言い換えれば、データ記憶領域Mにおける登録済みのエントリを無効化しない機能を有する。これにより、データ記憶領域M〜Mn−1のフラグ領域22に要する記憶容量が増加するものの、より柔軟にエントリデータの登録や削除(無効化)などの操作を行うことが可能となる。 The memory control unit 133C of the entry update control unit 133 has a data storage area M m (m is 0) that holds a static flag having a mask value in the entry registration process and the entry deletion process described with respect to the first embodiment. when detecting any integer) of ~n-1, the data storage area M m not write disable flag, in other words, a function that does not invalidate the registered entries in the data storage area M m . As a result, although the storage capacity required for the flag areas 22 of the data storage areas M 0 to M n−1 increases, operations such as entry data registration and deletion (invalidation) can be performed more flexibly.

静的フラグは、新規の実体データの登録の際に設定される。実体データと無効フラグと静的フラグとを含むエントリデータがエントリ保持回路12に登録された後、メモリ制御部133Cは、静的フラグの値に基づいて、登録済みのエントリデータに対する削除操作を行うのか否かを決めることができる。このため、メモリ管理アルゴリズムに基づく制御に関わらず、変更されないエントリデータをエントリ保持回路12に記憶させることができる。   The static flag is set when registering new entity data. After the entry data including the entity data, the invalid flag, and the static flag is registered in the entry holding circuit 12, the memory control unit 133C performs a deletion operation on the registered entry data based on the value of the static flag. You can decide whether or not. Therefore, entry data that is not changed can be stored in the entry holding circuit 12 regardless of the control based on the memory management algorithm.

以下、図11〜図13を参照しつつ、実施の形態2のデータ記憶装置11の動作を説明する。図11は、実施の形態2に係るエントリ削除処理の手順を概略的に示すフローチャートである。図11のフローチャートは、ステップS204,S214を除いて、図7のフローチャートと同じ手順を有する。また、図12は、実施の形態2に係るエントリ登録処理の手順を概略的に示すフローチャートであり、図13は、図12のエントリ検索処理(ステップS326)の手順を示すフローチャートである。図13のフローチャートは接続子C1を介して図12のフローチャートと接続されている。また、図12のフローチャートは、ステップS304,S326,S328,S335を除いて、図8のフローチャートと同じ手順を有する。   Hereinafter, the operation of the data storage device 11 according to the second embodiment will be described with reference to FIGS. FIG. 11 is a flowchart schematically showing a procedure of entry deletion processing according to the second embodiment. The flowchart in FIG. 11 has the same procedure as the flowchart in FIG. 7 except for steps S204 and S214. 12 is a flowchart schematically showing the procedure of entry registration processing according to the second embodiment. FIG. 13 is a flowchart showing the procedure of entry search processing (step S326) in FIG. The flowchart in FIG. 13 is connected to the flowchart in FIG. 12 through a connector C1. The flowchart of FIG. 12 has the same procedure as the flowchart of FIG. 8 except for steps S304, S326, S328, and S335.

最初に、図11を参照しつつ、エントリ削除処理について説明する。入出力装置14からエントリ削除指示を含むアクセス要求RQが受信されると、メモリ制御部133Cは、このエントリ削除指示に応じて、エントリ保持回路12の動作状態を把握し、適切な処理サイクル期間にエントリ削除処理を開始する。   First, the entry deletion process will be described with reference to FIG. When the access request RQ including the entry deletion instruction is received from the input / output device 14, the memory control unit 133C grasps the operation state of the entry holding circuit 12 according to the entry deletion instruction, and performs an appropriate processing cycle period. Start entry deletion processing.

ステップS203で識別子#(i)のエントリデータが削除すべき実体データを含むと判定された場合(ステップS203のYES)、メモリ制御部133Cは、識別子#(i)を有するレジスタ回路40に保持されている静的フラグ(以下、識別子#(i)の静的フラグと呼ぶ。)が有意か否かを判定する(ステップS204)。静的フラグが有意である場合、すなわち、静的フラグがマスク値を有する場合(ステップS204のYES)、メモリ制御部133Cは、識別子#(i)のエントリの無効化(ステップS205)を実行せずに、静的フラグによる更新不能の旨を送受信部131を介して入出力装置14に通知し(ステップS214)、エントリ削除処理を終了する。一方、静的フラグが有意でない場合(ステップS204のNO)、メモリ制御部133Cは、ステップS205,S207を実行した後に、エントリ削除処理を終了する。 When it is determined in step S203 that the entry data with the identifier # (i) includes the entity data to be deleted (YES in step S203), the memory control unit 133C holds the register circuit 40 i having the identifier # (i). It is determined whether the static flag (hereinafter referred to as the static flag of identifier # (i)) is significant (step S204). If the static flag is significant, that is, if the static flag has a mask value (YES in step S204), the memory control unit 133C invalidates the entry of the identifier # (i) (step S205). In addition, the fact that the update by the static flag is impossible is notified to the input / output device 14 via the transmission / reception unit 131 (step S214), and the entry deletion process is terminated. On the other hand, when the static flag is not significant (NO in step S204), the memory control unit 133C ends the entry deletion process after executing steps S205 and S207.

ところで、メモリ制御部133Cは、静的フラグを参照せずにエントリ削除を実行する動作モードをも有する。具体的には、入出力装置14からエントリ強制削除指示を含むアクセス要求RQが受信されたとき、メモリ制御部133Cは、このエントリ強制削除指示に応じて、エントリ保持回路12の動作状態を把握し、適切な処理サイクル期間に、静的フラグを参照するエントリ削除処理(図11)ではなく、図7のエントリ削除処理を実行する。これにより、状況に応じて、有意な静的フラグを含むエントリデータを強制的に無効化して空き領域を確保することができる。   Incidentally, the memory control unit 133C also has an operation mode for executing entry deletion without referring to the static flag. Specifically, when an access request RQ including an entry forced deletion instruction is received from the input / output device 14, the memory control unit 133C grasps the operation state of the entry holding circuit 12 according to the entry forced deletion instruction. In the appropriate processing cycle period, the entry deletion process of FIG. 7 is executed instead of the entry deletion process (FIG. 11) referring to the static flag. As a result, depending on the situation, entry data including a significant static flag can be forcibly invalidated to secure a free space.

次に、図12及び図13を参照しつつ、特定データと一致する実体データを含むエントリデータを登録するためのエントリ登録処理について説明する。入出力装置14からエントリ登録指示を含むアクセス要求RQが受信されると、メモリ制御部133Cは、このエントリ登録指示に応じて、エントリ保持回路12の動作状態を把握し、適切な処理サイクル期間に図12のエントリ登録処理を開始する。   Next, an entry registration process for registering entry data including entity data that matches the specific data will be described with reference to FIGS. When the access request RQ including the entry registration instruction is received from the input / output device 14, the memory control unit 133C grasps the operation state of the entry holding circuit 12 according to the entry registration instruction, and performs an appropriate processing cycle period. The entry registration process of FIG. 12 is started.

ステップS303で識別子#(i)のエントリデータが、登録すべき特定データと一致する実体データを含むと判定された場合(ステップS303のYES)、メモリ制御部133Cは、識別子#(i)を有するレジスタ回路40に保持されている静的フラグが有意か否かを判定する(ステップS304)。静的フラグが有意である場合、すなわち、静的フラグがマスク値を有する場合(ステップS304のYES)、メモリ制御部133Cは、識別子#(i)のエントリの無効化(ステップS305)をせずに、静的フラグによる更新不能の旨を送受信部131を介して入出力装置14に通知し(ステップS335)、エントリ登録処理を終了する。 If it is determined in step S303 that the entry data with the identifier # (i) includes entity data that matches the specific data to be registered (YES in step S303), the memory control unit 133C has the identifier # (i). It is determined whether or not the static flag held in the register circuit 40 i is significant (step S304). If the static flag is significant, that is, if the static flag has a mask value (YES in step S304), the memory control unit 133C does not invalidate the entry of the identifier # (i) (step S305). Then, the input / output device 14 is notified via the transmission / reception unit 131 that the static flag cannot be updated (step S335), and the entry registration process is terminated.

一方、全識別子#(0)〜#(n−1)のエントリデータが、登録すべき特定データと一致する実体データを含まず、識別子#(n−1)のエントリが有効であると判定した場合(ステップS325のNO)、メモリ制御部133Cは、空き領域をつくるためにエントリ検索処理(ステップS326)を実行する。   On the other hand, it is determined that the entry data of all identifiers # (0) to # (n-1) does not include entity data that matches the specific data to be registered, and the entry of identifier # (n-1) is valid. If so (NO in step S325), the memory control unit 133C executes an entry search process (step S326) to create a free area.

図13を参照すると、メモリ制御部133Cは、変数kにゼロ値を設定し(ステップS341)、識別子#(k)の静的フラグが有意か否かを判定する(ステップS342)。識別子#(k)の静的フラグが有意である場合(ステップS342のYES)、メモリ制御部133Cは、変数kが最上位のエントリを指す識別子番号n−1に達したか否かを判定し(ステップS343)、変数kがn−1に達していなければ(ステップS343のNO)、変数kを1だけインクリメントして(ステップS345)、手順をステップS342に戻す。   Referring to FIG. 13, the memory control unit 133C sets a zero value for the variable k (step S341), and determines whether or not the static flag of the identifier # (k) is significant (step S342). When the static flag of the identifier # (k) is significant (YES in step S342), the memory control unit 133C determines whether or not the variable k has reached the identifier number n-1 indicating the highest entry. (Step S343) If the variable k has not reached n−1 (NO in Step S343), the variable k is incremented by 1 (Step S345), and the procedure returns to Step S342.

図13のフローチャートにおいて全識別子#(0)〜#(n−1)の静的フラグが有意である場合は、変数kはn−1に達する(ステップS343のYES)。この場合、メモリ制御部133Cは、登録不能の旨を送受信部131を介して入出力装置14に通知し(ステップS347)、エントリ登録処理を終了する。なお、登録不能の旨の通知(ステップS347)に代えて、別の処理を行うことも可能である。   If the static flags of all identifiers # (0) to # (n−1) are significant in the flowchart of FIG. 13, the variable k reaches n−1 (YES in step S343). In this case, the memory control unit 133C notifies the input / output device 14 that registration is impossible via the transmission / reception unit 131 (step S347), and ends the entry registration process. In place of the notification that registration is impossible (step S347), another process may be performed.

ステップS342で識別子#(k)の静的フラグが有意ではないと判定した場合(ステップS342のNO)、メモリ制御部133Cは、図12のフローチャートに処理を戻す。次いで、メモリ制御部133Cは、識別子#(k)のエントリを無効化する(ステップS328)。その後、次の処理サイクル期間に上記エントリ並べ替え処理(図5)が実行されて識別子#(n−1)のエントリが無効化されるまで待機する(ステップS329のNO)。識別子#(n−1)のエントリの無効化が完了したとき(ステップS329のYES)、メモリ制御部133Cは、ステップS331,S333を順次実行し、エントリ登録処理を終了する。   If it is determined in step S342 that the static flag of identifier # (k) is not significant (NO in step S342), the memory control unit 133C returns the process to the flowchart of FIG. Next, the memory control unit 133C invalidates the entry of the identifier # (k) (Step S328). Thereafter, in the next processing cycle period, the above-described entry rearrangement process (FIG. 5) is executed, and the process waits until the entry of the identifier # (n−1) is invalidated (NO in step S329). When the invalidation of the entry with the identifier # (n−1) is completed (YES in step S329), the memory control unit 133C sequentially executes steps S331 and S333, and ends the entry registration process.

ところで、メモリ制御部133Cは、静的フラグを参照せずにエントリ登録を実行する動作モードを有する。具体的には、入出力装置14からエントリ強制登録指示を含むアクセス要求RQが受信されたとき、メモリ制御部133Cは、このエントリ強制登録指示に応じて、エントリ保持回路12の動作状態を把握し、適切な処理サイクル期間に、静的フラグを参照するエントリ登録処理(図12及び図13)ではなく、図8のエントリ登録処理を実行する。これにより、状況に応じて、静的フラグの値に関わりなくエントリ登録を強制的に行うことができる。   By the way, the memory control unit 133C has an operation mode in which entry registration is executed without referring to the static flag. Specifically, when an access request RQ including an entry forced registration instruction is received from the input / output device 14, the memory control unit 133C recognizes the operation state of the entry holding circuit 12 according to the entry forced registration instruction. Instead of the entry registration process (FIGS. 12 and 13) referring to the static flag, the entry registration process of FIG. Thus, entry registration can be forcibly performed regardless of the value of the static flag depending on the situation.

以上に説明したように実施の形態2によれば、特定のエントリデータが変更されないようにすることができるので、エントリデータの登録や削除(無効化)などの操作の柔軟性を向上させることができる。   As described above, according to the second embodiment, specific entry data can be prevented from being changed, so that the flexibility of operations such as registration and deletion (invalidation) of entry data can be improved. it can.

なお、メモリ制御部133Cは、データ記憶領域M〜Mn−1のうち有意な静的フラグを保持しないデータ記憶領域に無効フラグを書き込むことで、有意ではない静的フラグを含むエントリデータを一斉に削除する操作を簡易に組み込むこともできる。 Note that the memory control unit 133C writes the invalid flag to a data storage area that does not hold a significant static flag among the data storage areas M 0 to M n−1 , thereby entering entry data including a static flag that is not significant. An operation for deleting all at once can be easily incorporated.

実施の形態3.
次に、本発明に係る実施の形態3について説明する。実施の形態3のデータ記憶装置の構成は、動作モードが異なる点を除いて、実施の形態1のデータ記憶装置11の構成と同一である。実施の形態1については、エントリ保持回路12におけるデータ記憶領域Mのフラグ領域22が単一の制御フラグ(有効フラグ)を格納する場合の動作を説明した。本実施の形態では、データ記憶領域Mのフラグ領域22は、図14(A),(B)に示されるように2つの領域22A,22Bに機能的に分割されており、一方の領域22Aには上記有効フラグが格納され、他方の領域22Bには削除フラグが格納される。削除フラグは、データ記憶領域Mに保持されているエントリデータの無効化が予定されていることを示す有効値(たとえば「1」の値)と、データ記憶領域Mに保持されているエントリデータの無効化が予定されていないことを示す無効値(たとえば「0」の値)とのうちのいずれか一方の値を有する。以下、有効値を持つ削除フラグを「有効な削除フラグ」と呼び、無効値を持つ削除フラグを「無効な削除フラグ」と呼ぶこととする。
Embodiment 3 FIG.
Next, a third embodiment according to the present invention will be described. The configuration of the data storage device of the third embodiment is the same as the configuration of the data storage device 11 of the first embodiment except that the operation mode is different. For the first embodiment, the flag area 22 of the data storage area M i in the entry holding circuit 12 has been described the operation in the case of storing a single control flag (valid flag). In this embodiment, the flag area 22 of the data storage area M i, as shown in FIG. 14 (A), 2 two regions 22A, as shown (B), the are functionally divided into 22B, one region 22A Stores the valid flag, and the other area 22B stores a deletion flag. Deletion flag, the data storage area Valid values indicating that the invalidation is scheduled entry data stored in the M i (e.g. the value of "1"), is held in the data storage area M i Entry It has one of an invalid value (for example, a value of “0”) indicating that data invalidation is not scheduled. Hereinafter, a deletion flag having a valid value is referred to as “valid deletion flag”, and a deletion flag having an invalid value is referred to as “invalid deletion flag”.

メモリ制御部133Cは、或る処理サイクル期間Tにデータ記憶領域M〜Mn−1の全部または一部に有効な削除フラグを書き込み、所定の設定期間ΔT経過後の処理サイクル期間Tに、有効な削除フラグを保持する当該データ記憶領域の全てに無効フラグを書き込むことにより有効な削除フラグを含むエントリデータを一括して無効化(削除)する機能を有する。これにより、エントリ保持回路12に空き領域をまとめて確保することができる。ただし、メモリ制御部133Cは、設定期間ΔT内にエントリデータのいずれかを更新したとき、当該更新されたエントリデータを保持するデータ記憶領域には無効な削除フラグを書き込む。設定期間ΔT内に登録されたエントリデータはいずれも無効な削除フラグを含む。よって、設定期間ΔT経過後の処理サイクル期間Tでは、設定期間ΔT内に更新または登録されたエントリデータが無効化(削除)されない。 Memory controller 133C is one whole or a part of the processing cycle period T A in the data storage area M 0 ~M n-1 to write an effective deletion flag, the processing cycle after a predetermined set time period ΔT has elapsed T B In addition, it has a function of invalidating (deleting) all the entry data including the valid deletion flag by writing the invalid flag in all the data storage areas holding the valid deletion flag. As a result, free areas can be secured together in the entry holding circuit 12. However, when any of the entry data is updated within the set period ΔT, the memory control unit 133C writes an invalid deletion flag in the data storage area that holds the updated entry data. Any entry data registered within the set period ΔT includes an invalid deletion flag. Thus, the processing cycle period T B after a lapse of a set period [Delta] T, is not invalidated (deleted) entry data updated or registered within a set period [Delta] T.

また、メモリ制御部133Cは、外部の入出力装置14から削除フラグ付与指示を含むアクセス要求RQが受信されたとき、この削除フラグ付与指示に応じて、データ記憶領域M〜Mn−1の全部または一部に有効な削除フラグを書き込み、所定の設定期間ΔT経過後の処理サイクル期間に、有効な削除フラグを保持する当該データ記憶領域の全てに無効フラグを書き込むことにより有効な削除フラグを含むエントリデータを一括して削除する機能をも有する。この場合も、メモリ制御部133Cは、設定期間ΔT内にエントリデータのいずれかを更新したとき、当該更新されたエントリデータを保持するデータ記憶領域には無効な削除フラグを書き込む。また、設定期間ΔT内に登録されたエントリデータはいずれも無効な削除フラグを含む。 Further, when an access request RQ including a deletion flag assignment instruction is received from the external input / output device 14, the memory control unit 133 </ b > C responds to the deletion flag assignment instruction in the data storage areas M 0 to M n−1 . A valid deletion flag is written by writing a valid deletion flag to all or part of the data storage area and writing an invalid flag to all of the data storage areas holding the valid deletion flag in a processing cycle period after a predetermined set period ΔT has elapsed. It also has a function of deleting all the entry data including it. Also in this case, when any of the entry data is updated within the set period ΔT, the memory control unit 133C writes an invalid deletion flag in the data storage area that holds the updated entry data. In addition, any entry data registered within the set period ΔT includes an invalid deletion flag.

さらに、メモリ制御部133Cは、外部の入出力装置14からの空き領域確保指示に応じて、設定期間ΔTの経過を待つことなく、有効な削除フラグを保持する当該データ記憶領域の全てに無効フラグを書き込むことにより有効な削除フラグを含むエントリデータを一括して無効化(削除)する機能をも有する。   Furthermore, the memory control unit 133 </ b> C responds to the free area reservation instruction from the external input / output device 14 and waits for the elapse of the set period ΔT without invalidating all data storage areas that hold valid deletion flags. It also has a function of invalidating (deleting) entry data including a valid deletion flag in a batch.

上記機能を有することにより、データ記憶装置11は、エントリ保持回路12の空き領域をまとめて確保する制御を行うことができる。たとえば、エントリ保持回路12が有効なエントリで満杯となる前であっても、登録または更新されてから一定期間経過したエントリデータを自動的に抹消し、優先順位の低いエントリデータをエントリ保持回路12内に残さないような制御を行うことができる。   By having the above function, the data storage device 11 can perform control to secure the free areas of the entry holding circuit 12 together. For example, even before the entry holding circuit 12 is full of valid entries, entry data that has passed for a certain period since registration or update is automatically deleted, and entry data having a lower priority is entered. It is possible to control such that it does not remain inside.

次に、図15を参照しつつ、上記削除フラグを使用する実施の形態3のデータ記憶装置11の動作を説明する。図15は、実施の形態3に係るエントリ操作の制御処理の一例を概略的に示すフローチャートである。或る時刻に達したとき、あるいは、外部の入出力装置14から削除フラグ付与指示を含むアクセス要求RQが受信されたとき、これに応じて図15の制御処理が開始される。   Next, the operation of the data storage device 11 according to the third embodiment using the deletion flag will be described with reference to FIG. FIG. 15 is a flowchart schematically showing an example of the entry operation control process according to the third embodiment. When a certain time is reached, or when an access request RQ including a deletion flag assignment instruction is received from the external input / output device 14, the control processing of FIG. 15 is started accordingly.

先ず、メモリ制御部133Cは、変数iを初期化して変数iにゼロ値を設定する(ステップS401)。次に、メモリ制御部133Cは、識別子#(i)のエントリに有効な削除フラグを設定する(ステップS403)。具体的には、メモリ制御部133Cは、識別子#(i)のレジスタ回路40(図4)のエントリセレクタ60に自エントリデータ制御回路70の出力データADを選択させる選択制御信号SELを供給し、自エントリデータ制御回路70に有効な削除フラグを含む置換データADを生成させる制御信号Cを供給する。有効な削除フラグの設定(ステップS403)の後、変数iが識別子番号n−1に達したか否かを判定する(ステップS405)。変数iがn−1に達していなければ(ステップS405のNO)、メモリ制御部133Cは、変数iを1だけインクリメントし(ステップS407)、手順をステップS403に戻す。 First, the memory control unit 133C initializes the variable i and sets the variable i to a zero value (step S401). Next, the memory control unit 133C sets a valid deletion flag in the entry of the identifier # (i) (Step S403). Specifically, the memory control unit 133C causes the entry selector 60 i of the register circuit 40 i (FIG. 4) with the identifier # (i) to select the output data AD i of the own entry data control circuit 70 i. i supplying, supplies a control signal C i to generate replacement data AD i including effective deletion flag in the own entry data control circuit 70 i. After setting a valid deletion flag (step S403), it is determined whether the variable i has reached the identifier number n-1 (step S405). If the variable i has not reached n−1 (NO in step S405), the memory control unit 133C increments the variable i by 1 (step S407), and returns the procedure to step S403.

変数iがn−1に達すると(ステップS405のYES)、メモリ制御部133Cは、設定期間ΔTが経過して設定時刻が到来するまで待機する(ステップS409のNO)。設定時刻が到来すると(ステップS409のYES)、メモリ制御部133Cは、変数iを初期化して変数iにゼロ値を設定する(ステップS411)。次に、メモリ制御部133Cは、識別子#(i)の削除フラグが有効であるか否かを判定する(ステップS413)。削除フラグが有効であれば(ステップS413のYES)、メモリ制御部133Cは、識別子#(i)のエントリを無効化する(ステップS415)。次いで、変数iがn−1に達したか否かを判定する(ステップS417)。一方、削除フラグが有効でなければ(ステップS413のNO)、メモリ制御部133Cは、エントリの無効化(ステップS415)をスキップして、変数iがn−1に達したか否かを判定する(ステップS417)。変数iがn−1に達していなければ(ステップS417のNO)、メモリ制御部133Cは、変数iを1だけインクリメントし(ステップS419)、手順をステップS413に戻す。その後、変数iがn−1に達すると(ステップS417のYES)、処理を終了する。   When the variable i reaches n−1 (YES in step S405), the memory control unit 133C waits until the set time ΔT has elapsed and the set time has come (NO in step S409). When the set time arrives (YES in step S409), the memory control unit 133C initializes the variable i and sets the variable i to a zero value (step S411). Next, the memory control unit 133C determines whether or not the deletion flag of the identifier # (i) is valid (step S413). If the deletion flag is valid (YES in step S413), the memory control unit 133C invalidates the entry of the identifier # (i) (step S415). Next, it is determined whether or not the variable i has reached n−1 (step S417). On the other hand, if the deletion flag is not valid (NO in step S413), the memory control unit 133C skips the invalidation of the entry (step S415) and determines whether or not the variable i has reached n-1. (Step S417). If the variable i has not reached n−1 (NO in step S417), the memory control unit 133C increments the variable i by 1 (step S419), and returns the procedure to step S413. Thereafter, when the variable i reaches n−1 (YES in step S417), the process ends.

以上の処理により、一定期間経過後、登録あるいは更新のなされていないエントリデータの削除を行うことができる。なお、上記ステップS401〜S407の処理は1処理サイクル期間内に完了し、ステップS411〜S417の処理も1処理サイクル期間内に完了する。   By the above processing, entry data that has not been registered or updated can be deleted after a certain period. Note that the processing of steps S401 to S407 is completed within one processing cycle period, and the processing of steps S411 to S417 is also completed within one processing cycle period.

ところで、上記制御処理においては、有効な削除フラグを含むエントリデータの無効化(ステップS415)を実行後、後に無効化すべきエントリに有効な削除フラグを設定する処理を実行する手順を追加してもよい。また、上記ステップS401〜S407の処理と、ステップS411〜S419の処理とは別々の処理として実行されてもよい。さらに、ステップS411〜S419の処理の実行後、ステップS401〜S407の処理が実行されてもよい。   By the way, in the above control process, after executing invalidation of entry data including a valid deletion flag (step S415), a procedure for executing a process for setting a valid deletion flag to an entry to be invalidated later may be added. Good. Moreover, the process of said step S401-S407 and the process of step S411-S419 may be performed as a separate process. Furthermore, the processes in steps S401 to S407 may be performed after the processes in steps S411 to S419.

以上に説明したように、実施の形態3のデータ記憶装置を用いれば、エントリデータに要する記憶容量が増加するものの、一定期間内に登録または更新されなかったエントリデータに対して一括削除を行うことができる。また、LRUアルゴリズムなどのメモリ管理アルゴリズムに基づく制御を継続して実行することができる。   As described above, if the data storage device of the third embodiment is used, the storage capacity required for entry data is increased, but entry data that has not been registered or updated within a certain period of time is deleted collectively. Can do. Further, control based on a memory management algorithm such as an LRU algorithm can be continuously executed.

実施の形態4.
次に、本発明に係る実施の形態4について説明する。実施の形態4のデータ記憶装置は、実施の形態1のデータ記憶装置11と同一の構成を有する。実施の形態4では、エントリ更新制御部133が、上記機能に加えて、エントリ保持回路12内のデータ記憶領域M〜Mn−1に保持されているエントリデータのうち、直近に参照されたエントリデータを最上位のデータ記憶領域Mn−1に保持させる機能を有している。図16は、この機能を実現するためのエントリ更新処理の手順を概略的に示すフローチャートである。
Embodiment 4 FIG.
Next, a fourth embodiment according to the present invention will be described. The data storage device of the fourth embodiment has the same configuration as the data storage device 11 of the first embodiment. In the fourth embodiment, in addition to the above function, the entry update control unit 133 is referred to most recently among the entry data held in the data storage areas M 0 to M n−1 in the entry holding circuit 12. The entry data is held in the uppermost data storage area M n−1 . FIG. 16 is a flowchart schematically showing a procedure of entry update processing for realizing this function.

入出力装置14からデータ参照要求を含むアクセス要求RQが受信されると、データ検索部133Aは、このデータ参照要求に応じて、エントリデータ群31の中からデータ参照要求で指定される実体データを取得し、この実体データを送受信部131を介して入出力装置14に送信する。一方、メモリ制御部133Cは、データ参照要求に応じて、エントリ保持回路12の動作状態を把握し、適切な処理サイクル期間に図16のエントリ更新処理を開始する。   When the access request RQ including the data reference request is received from the input / output device 14, the data search unit 133A receives the entity data specified by the data reference request from the entry data group 31 in response to the data reference request. The actual data is acquired and transmitted to the input / output device 14 via the transmission / reception unit 131. On the other hand, the memory control unit 133C grasps the operation state of the entry holding circuit 12 in response to the data reference request, and starts the entry update process of FIG. 16 in an appropriate processing cycle period.

まず、メモリ制御部133Cは、データ参照要求により参照されたエントリデータ(以下「参照データ」と呼ぶ。)を保持するデータ記憶領域Mのアクセス順位が最上位であるか否かを判定する(ステップS501)。参照データが最上位のデータ記憶領域Mn−1に保持されていると判定したとき(ステップS501のYES)、メモリ制御部133Cは、エントリ更新処理を終了する。一方、参照データが最上位のデータ記憶領域Mn−1に保持されていないと判定したとき(ステップS501のNO)、メモリ制御部133Cは、識別子#(n−1)の最上位のエントリが無効か否かを判定する(ステップS503)。最上位のエントリが無効である場合(ステップS503のYES)、メモリ制御部133Cは、識別子#(n−1)のエントリへの参照データの書き込み制御を実行する(ステップS509)。具体的には、メモリ制御部133Cは、最上位のエントリセレクタ60n−1に置換データODを選択させる選択制御信号SELn−1を供給し、エントリセレクタ60n−1に参照データを置換データODとして供給する。これによりレジスタ50n−1は、エントリセレクタ60n−1を介して入力された参照データODをラッチ(保持)する。 First, the memory control unit 133C determines whether entry data referenced by the data reference request (hereinafter referred to as "reference data".) Access ranking data storage area M p for holding the most significant ( Step S501). When it is determined that the reference data is stored in the highest data storage area M n−1 (YES in step S501), the memory control unit 133C ends the entry update process. On the other hand, when it is determined that the reference data is not held in the highest data storage area M n−1 (NO in step S501), the memory control unit 133C determines that the highest entry of the identifier # (n−1) is It is determined whether or not it is invalid (step S503). If the highest entry is invalid (YES in step S503), the memory control unit 133C executes reference data write control to the entry with the identifier # (n-1) (step S509). Specifically, the memory control unit 133C supplies a selection control signal SEL n−1 that causes the highest-level entry selector 60 n−1 to select the replacement data OD n and replaces the reference data in the entry selector 60 n−1. Supply as data OD n . As a result, the register 50 n-1 latches (holds) the reference data OD n input via the entry selector 60 n-1 .

一方、ステップS503で最上位のエントリが無効ではないと判定したとき(ステップS503のNO)、メモリ制御部133Cは、参照データを保持する識別子#(p)のエントリを無効化する(ステップS505)。その後、次の処理サイクル期間に上記エントリ並べ替え処理(図5)が実行されて識別子#(n−1)の最上位エントリが無効化されるまで待機する(ステップS507のNO)。最上位エントリの無効化が完了したとき(ステップS507のYES)、メモリ制御部133Cは、最上位エントリに対する参照データの書き込み制御を実行し(ステップS509)、エントリ更新処理を終了する。   On the other hand, when it is determined in step S503 that the highest entry is not invalid (NO in step S503), the memory control unit 133C invalidates the entry of the identifier # (p) that holds the reference data (step S505). . Thereafter, in the next processing cycle period, the above-described entry rearrangement process (FIG. 5) is executed, and the process waits until the highest entry of the identifier # (n−1) is invalidated (NO in step S507). When the invalidation of the highest entry is completed (YES in step S507), the memory control unit 133C executes reference data write control for the highest entry (step S509), and ends the entry update process.

図17(A)〜(D)は、最大エントリ数が7の場合のデータ記憶領域M〜Mに対して図16のエントリ更新処理が実行されたときの、データ記憶領域M〜Mの状態遷移の様子を示す図である。図17(A)に示されるように、最初の状態では、全てのデータ記憶領域M〜Mのエントリは有効であり、データ記憶領域M〜MはそれぞれエントリデータD0〜D6を保持している。データ参照要求に応じてエントリデータD3が参照されたとき、図17(B)に示されるように、参照データD3を保持する識別子#(3)のエントリが無効化される(図16のステップS505)。次の処理サイクル期間にシフト操作と最上位エントリの無効化処理とが実行される。これにより、図17(C)に示されるように、識別子#(3),#(4),#(5)のエントリにそれぞれエントリデータD4,D5,D6がシフトする。その後、図17(D)に示されるように、識別子#(6)のデータ記憶領域Mに参照データD3が書き込まれる(図16のステップS509)。 17A to 17D show data storage areas M 0 to M when the entry update process of FIG. 16 is executed for the data storage areas M 0 to M 6 when the maximum number of entries is 7. 6 is a diagram illustrating a state transition state of FIG. As shown in FIG. 17A, in the initial state, the entries of all the data storage areas M 0 to M 6 are valid, and the data storage areas M 0 to M 6 hold the entry data D0 to D6, respectively. doing. When the entry data D3 is referred to in response to the data reference request, as shown in FIG. 17B, the entry of the identifier # (3) holding the reference data D3 is invalidated (step S505 in FIG. 16). ). In the next processing cycle period, a shift operation and invalidation processing of the top entry are executed. As a result, as shown in FIG. 17C, the entry data D4, D5, and D6 are shifted to the entries of the identifiers # (3), # (4), and # (5), respectively. Thereafter, as shown in FIG. 17 (D), reference data D3 in the data storage area M 6 identifier # (6) is written (step S509 in FIG. 16).

以上に説明したように、実施の形態4によれば、直近に参照されたエントリデータを最上位のデータ記憶領域Mn−1に常に保持させることができる。したがって、直近に参照されたエントリデータの優先順位を最も高くするメモリ管理アルゴリズムを実現することができる。 As described above, according to the fourth embodiment, the entry data that is referred to most recently can always be held in the highest data storage area M n−1 . Therefore, it is possible to realize a memory management algorithm that gives the highest priority to the entry data that has been referred to most recently.

実施の形態1〜4の変形例.
以上、図面を参照して本発明に係る種々の実施の形態について述べたが、これらは本発明の例示であり、上記以外の様々な形態を採用することができる。たとえば、図18(A),(B)に示されるように、データ記憶領域Mのフラグ領域22を3つの領域22A,22B,22Cに機能的に分割し、領域22Aには上記有効フラグを格納し、領域22Bに上記静的フラグを格納し、領域22Cに上記削除フラグを格納してもよい。これにより、データ記憶装置11は、有効フラグ、静的フラグ及び削除フラグを用いた処理を実行することができる。具体的には、設定期間ΔT内に未登録あるいは未更新のエントリデータでも、有意な静的フラグを含むエントリデータは一括削除の対象外とすることができる。たとえば、識別子#(i)の静的フラグが有意であるか否かを判定し、静的フラグが有意であれば、図15のステップS403において有効な削除フラグを設定せず、静的フラグが有意でなければ、ステップS403において有効な削除フラグを設定してもよい。
Modified example of the first to fourth embodiments.
Although various embodiments according to the present invention have been described with reference to the drawings, these are examples of the present invention, and various forms other than the above can be adopted. For example, as shown in FIG. 18 (A), (B) , the flag area 22 of the data storage area M i 3 one region 22A, 22B, functionally divided into 22C, the valid flag in the area 22A The static flag may be stored in the area 22B, and the deletion flag may be stored in the area 22C. Thereby, the data storage device 11 can execute processing using the valid flag, the static flag, and the deletion flag. Specifically, even for entry data that has not been registered or updated within the set period ΔT, entry data that includes a significant static flag can be excluded from batch deletion. For example, it is determined whether or not the static flag of identifier # (i) is significant. If the static flag is significant, a valid deletion flag is not set in step S403 of FIG. If not significant, a valid deletion flag may be set in step S403.

また、上記実施の形態1〜3においては、エントリ保持回路12はシフトレジスタ回路の構成を有しているが、これに限定されるものではない。エントリ保持回路12へのアクセス速度が高速であることが要求されないシステムにデータ記憶装置11が適用される場合は、エントリ保持回路12をRAM(ランダム・アクセス・メモリ)で構成してもよい。   In the first to third embodiments, the entry holding circuit 12 has a shift register circuit configuration, but is not limited to this. When the data storage device 11 is applied to a system that does not require a high access speed to the entry holding circuit 12, the entry holding circuit 12 may be constituted by a RAM (Random Access Memory).

また、エントリ制御回路13の全部または一部の機能は、ハードウェアで実現されてもよいし、あるいは、CPU(Central Processing Unit)などのマイクロプロセッサにより実行されるコンピュータプログラムで実現されてもよい。当該機能がコンピュータプログラムで実現される場合、マイクロプロセッサは、コンピュータ読み取り可能な記録媒体からコンピュータプログラムをロードし実行することにより当該機能を実現することが可能である。   All or some of the functions of the entry control circuit 13 may be realized by hardware, or may be realized by a computer program executed by a microprocessor such as a CPU (Central Processing Unit). When the function is realized by a computer program, the microprocessor can realize the function by loading and executing the computer program from a computer-readable recording medium.

1 データ処理システム、 11 データ記憶装置、 12 エントリ保持回路、 13 エントリ制御回路、 131 送受信部、 132 エントリデータ受信部、 133 エントリ更新制御部、 133A データ検索部、 133B 領域検出部、 133C メモリ制御部、 14 入出力装置、 M〜Mn−1 データ記憶領域、 21 データ領域、 40〜40n−1 レジスタ回路、 50〜50n−1 レジスタ、 60〜60n−1 エントリセレクタ、 70〜70n−1 自エントリデータ制御回路。 DESCRIPTION OF SYMBOLS 1 Data processing system, 11 Data storage device, 12 Entry holding circuit, 13 Entry control circuit, 131 Transmission / reception part, 132 Entry data receiving part, 133 Entry update control part, 133A Data search part, 133B Area | region detection part, 133C Memory control part , 14 I / O device, M 0 to M n-1 data storage area, 21 data area, 40 0 to 40 n-1 register circuit, 50 0 to 50 n-1 register, 60 0 to 60 n-1 entry selector, 70 0 to 70 n-1 Own entry data control circuit.

Claims (5)

アクセス順位がそれぞれ割り当てられた複数のデータ記憶領域を有し、外部装置からのアクセス順に、各データ記憶領域にエントリデータを保持するエントリ保持回路と、An entry holding circuit having a plurality of data storage areas each assigned an access order, and holding entry data in each data storage area in the order of access from an external device;
前記外部装置からのアクセス要求に応じて、前記複数のデータ記憶領域に対して前記エントリデータの書き込みを実行するエントリ制御回路と、を備え、An entry control circuit that executes writing of the entry data to the plurality of data storage areas in response to an access request from the external device;
前記各データ記憶領域は、Each of the data storage areas is
当該データ記憶領域に保持されるエントリデータを有効にする有効値及び当該各データ記憶領域に保持されるエントリデータを無効にする無効値のうちのいずれか一方の値を持つ有効フラグを格納する有効フラグ領域と、Valid to store a valid flag having one of a valid value for validating the entry data held in the data storage area and an invalid value for invalidating the entry data held in the data storage area Flag area,
前記エントリデータの実態データを格納するデータ領域と、を有し、A data area for storing the actual data of the entry data,
前記エントリ制御回路は、前記エントリデータの書き込みが実行されない間に、前記アクセス順位が最下位のデータ記憶領域から順に、前記アクセス順位が最上位の1つ下位のデータ記憶領域まで、前記有効フラグが前記無効値を持つか否かを判定するメモリ制御部を有し、The entry control circuit sets the validity flag from the data storage area having the lowest access order to the data storage area having the lowest access order in order from the lowest data storage area while the entry data is not being written. Having a memory control unit for determining whether to have the invalid value;
前記判定の結果が、前記無効値を持たないである場合は、前記メモリ制御部は、前記無効値を持たないと判定された前記データ記憶領域の前記アクセス順位よりも1つ上位の前記データ記憶領域の判定へと進み、If the result of the determination is that it does not have the invalid value, the memory control unit is the data storage that is one higher than the access order of the data storage area that has been determined not to have the invalid value. Proceed to region determination,
前記判定の結果が、前記無効値を持つである場合は、前記メモリ制御部は、前記無効値を持つと判定された前記データ記憶領域の前記アクセス順位よりも上位の前記アクセス順位を有する前記データ記憶領域に保持されているエントリデータを、それぞれ1つ下位の前記データ記憶領域にシフトするとともに、前記アクセス順位において最上位のデータ記憶領域の前記有効フラグ領域に、前記無効値を持つ前記有効フラグを格納して、前記無効値を持つと判定された前記データ記憶領域の前記アクセス順位よりも1つ上位の前記データ記憶領域の判定へと進む、When the determination result is that the invalid value is included, the memory control unit has the access rank higher than the access rank of the data storage area that is determined to have the invalid value. The entry data held in the storage area is shifted to the data storage area one level lower, and the valid flag having the invalid value in the valid flag area of the highest data storage area in the access order And the process proceeds to the determination of the data storage area one level higher than the access order of the data storage area determined to have the invalid value.
ことを特徴とするデータ記憶装置。A data storage device.
請求項1に記載のデータ記憶装置であって、
前記エントリ保持回路は、前記エントリデータの一部又は全部を変更するための置換データを生成し、前記データ記憶領域が保持する前記エントリデータを前記置換データに書き換える自エントリデータ制御部をそれぞれの前記データ記憶領域に対して有する、
ことを特徴とするデータ記憶装置。
The data storage device according to claim 1,
The entry holding circuit generates replacement data for changing part or all of the entry data, and each of the entry holding circuits rewrites the entry data held in the data storage area to the replacement data. For data storage,
A data storage device.
請求項1又は2に記載のデータ記憶装置であって、
前記各データ記憶領域は、
当該各データ記憶領域に保持されているエントリデータの無効化が予定されていることを示す値と当該各データ記憶領域に保持されているエントリデータの無効化が予定されていないことを示す値とのうちのいずれか一方の値を持つ削除フラグを格納する削除フラグ領域をさらに有し、
前記メモリ制御部は、前記複数のデータ記憶領域のいずれかに前記エントリデータの無効化が予定されていることを示す値を持つ削除フラグを書き込み、所定の設定期間経過後、前記エントリデータの無効化が予定されていることを示す値を持つ削除フラグを保持する当該データ記憶領域の全てに前記無効値を持つ有効フラグを書き込む、
ことを特徴とするデータ記憶装置。
The data storage device according to claim 1 or 2 ,
Each of the data storage areas is
A value indicating that the entry data held in each data storage area is scheduled to be invalidated, and a value indicating that the entry data held in each data storage area is not scheduled to be invalidated; A deletion flag area for storing a deletion flag having one of the values of
The memory control unit writes a deletion flag having a value indicating that the entry data is scheduled to be invalidated to any one of the plurality of data storage areas, and the entry data is invalidated after a predetermined set period. A valid flag having the invalid value is written in all of the data storage areas holding a deletion flag having a value indicating that the conversion is scheduled.
A data storage device.
請求項3に記載のデータ記憶装置であって、A data storage device according to claim 3,
前記メモリ制御部は、前記所定の設定期間経過前に前記外部装置から前記各データ記憶領域の空き領域を確保する要求があったときは、前記エントリデータの無効化が予定されていることを示す値を持つ削除フラグを保持する当該データ記憶領域の全てに前記無効値を持つ有効フラグを書き込む、The memory control unit indicates that the entry data is scheduled to be invalidated when there is a request from the external device to secure a free space in each data storage area before the predetermined set period has elapsed. Write a valid flag having the invalid value to all of the data storage areas holding the deletion flag having a value,
ことを特徴とするデータ記憶装置。A data storage device.
請求項1から4のいずれか一項に記載のデータ記憶装置であって、A data storage device according to any one of claims 1 to 4,
前記エントリ制御回路は、前記各データ記憶領域のうち前記有効フラグが有効値をもつ前記データ記憶領域が有する前記データ領域が保持する前記実体データについて検索するデータ検索部をさらに備え、The entry control circuit further includes a data search unit that searches for the entity data held in the data area of the data storage area in which the validity flag has a valid value among the data storage areas,
前記外部装置から新たなアクセス要求があったときに、同一の実体データが重複して記憶することを許可する場合は、前記有効フラグが無効値をもつ前記データ記憶領域が有する前記データ領域に前記新たなアクセス要求に応じたエントリデータの実体データを書き込み、When the same entity data is allowed to be stored redundantly when a new access request is made from the external device, the valid flag has an invalid value in the data storage area of the data storage area. Write the entry data entity data in response to a new access request,
同一の実体データが重複して記憶することを許可しない場合は、前記新たなアクセス要求に応じたエントリデータの実体データについて前記データ検索部で検索を行ない、前記新たなアクセス要求に応じたエントリデータの実体データが前記データ検索部で検索されたときは前記各データ記憶領域に対して書き込みを行なわない、When it is not permitted to store the same entity data in duplicate, the data search unit searches the entity data of the entry data corresponding to the new access request, and the entry data corresponding to the new access request When the actual data is retrieved by the data retrieval unit, the data storage area is not written.
ことを特徴とするデータ記憶装置。A data storage device.
JP2010092255A 2010-04-13 2010-04-13 Data storage device Active JP5534912B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010092255A JP5534912B2 (en) 2010-04-13 2010-04-13 Data storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010092255A JP5534912B2 (en) 2010-04-13 2010-04-13 Data storage device

Publications (2)

Publication Number Publication Date
JP2011221900A JP2011221900A (en) 2011-11-04
JP5534912B2 true JP5534912B2 (en) 2014-07-02

Family

ID=45038790

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010092255A Active JP5534912B2 (en) 2010-04-13 2010-04-13 Data storage device

Country Status (1)

Country Link
JP (1) JP5534912B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5689865B2 (en) 2012-11-29 2015-03-25 株式会社東海理化電機製作所 Control device
CN113156855A (en) * 2021-04-07 2021-07-23 杭州永谐科技有限公司成都分公司 Miniature data acquisition and processing system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09288617A (en) * 1996-04-19 1997-11-04 Nec Corp Lru control system
US6983388B2 (en) * 2000-10-25 2006-01-03 Agere Systems Inc. Method and apparatus for reducing leakage power in a cache memory by using a timer control signal that removes power to associated cache lines
JP2005301387A (en) * 2004-04-07 2005-10-27 Matsushita Electric Ind Co Ltd Cache memory controller and cache memory control method
WO2007097028A1 (en) * 2006-02-27 2007-08-30 Fujitsu Limited Lru control device, lru control method, and lru control program

Also Published As

Publication number Publication date
JP2011221900A (en) 2011-11-04

Similar Documents

Publication Publication Date Title
US9959313B2 (en) Database management system and method capable of dynamically issuing inputs/outputs and executing operations in parallel
KR100617663B1 (en) Method and apparatus for decoupling tag and data accesses in a cache memory
JP4298800B2 (en) Prefetch management in cache memory
JPH06348595A (en) Cache device
JPS63103343A (en) Moveout queue buffer
JPH0561663B2 (en)
JPH05303528A (en) Write-back disk cache device
KR100988334B1 (en) Cache control apparatus, and information processing apparatus
JP5534912B2 (en) Data storage device
US20170221535A1 (en) Non-volatile memory accelerator and method for speeding up data access
CN107818192B (en) Memory transaction level model simulation method and system
JPWO2005050454A1 (en) Cache memory and control method thereof
US8065496B2 (en) Method for updating information used for selecting candidate in LRU control
JP2006099770A (en) Instruction cache using single-ported memories
KR20200126155A (en) Semiconductor memory device performing command merging and operating method thereof
JP7089530B2 (en) Data processing
JPWO2008068797A1 (en) Cash system
JPWO2008155826A1 (en) Cache control device and cache control method
US7376797B2 (en) Cache memory system and method using reference bits
CN112965668B (en) Method for processing request conflict by cache digital circuit
JP2006065402A (en) Access control method, disc control device, and storage device
US11106589B2 (en) Cache control in a parallel processing system
JPH05181721A (en) Method for reusing and retrieving shared buffer
JPH0738165B2 (en) Database management method
JPWO2005050455A1 (en) Cache memory and control method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130409

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140130

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140304

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140325

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140422

R150 Certificate of patent or registration of utility model

Ref document number: 5534912

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250