JP2004280333A - Buffer memory device and free space management method for same - Google Patents

Buffer memory device and free space management method for same Download PDF

Info

Publication number
JP2004280333A
JP2004280333A JP2003069195A JP2003069195A JP2004280333A JP 2004280333 A JP2004280333 A JP 2004280333A JP 2003069195 A JP2003069195 A JP 2003069195A JP 2003069195 A JP2003069195 A JP 2003069195A JP 2004280333 A JP2004280333 A JP 2004280333A
Authority
JP
Japan
Prior art keywords
chain
buffer memory
area
free area
free
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003069195A
Other languages
Japanese (ja)
Inventor
Kanna Okamura
カンナ 岡村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003069195A priority Critical patent/JP2004280333A/en
Publication of JP2004280333A publication Critical patent/JP2004280333A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To manage the free space of a buffer memory through a small memory space and easily determine an overflow of the buffer memory, in a chain system buffer memory device and a free space management method therefor. <P>SOLUTION: In a free space chain memory 1-1 for managing the free space of the buffer memory, when a new free space of an address #X is generated to a free space chain with an address #N stored as the head of a free space, the address #X of the new free space is added before the head #N of the free space chain. The management where the new free space is added to the head of the free space chain keeps a tail pointer of the free space chain continuously at an initial value. At an overflow of the buffer memory, the value of a free space head pointer memory 1-2 becomes "the last free space address #Z+1" to enable easy detection of the overflow. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、バッファメモリ装置及びその空き領域管理方法に関し、特に、IP(Internet Protocol )パケット等のデータフレームを一旦バッファメモリに蓄積して転送制御する際に使用するチェーン方式によるバッファメモリ装置及びその空き領域管理方法に関する。
【0002】
近年、インターネット網に流れる転送データ量は益々増加し、特に、インターネットサービスプロバイダからユーザへ提供されるストリーミングデータや動画像データ等のように、急激にかつ多量に可変長のデータフレームが配信されるサービスに対して、それらのデータフレームをバッファメモリに効率よく格納しないと、バッファメモリが直ぐ満杯状態となってしまう。本発明は、そのような転送データをバッファメモリに蓄積するためのチェーン方式によるバッファメモリ装置及びその空き領域管理方法に関する。
【0003】
【従来の技術】
IPパケット等のデータフレームの転送制御を行う際、インターネットサービスプロバイダ又はユーザから、バースト的に転送データが入力されるため、該転送データをバッファメモリに格納してフレーム単位にデータ転送制御を行う場合に、転送データをバッファメモリに格納し、その格納領域を、格納領域のアドレスポインタをチェーンで繋いで管理する方式が有効である。
【0004】
そこで、転送データを格納するバッファメモリとは別に、該バッファメモリにおけるデータ格納領域のポインタを連結するチェーンを記憶するメモリ領域と、転送データを格納するバッファメモリの空き領域のポインタを管理するためのメモリ領域とを確保して、それらのメモリ領域に記憶されたバッファメモリのデータ格納領域及び空き領域の情報を基に、バッファメモリの読み出し及び書き込みを管理し、効率よくバッファメモリへのデータ格納を行っている。
【0005】
データを格納するバッファメモリの空き領域の管理は、空き領域の先頭ポインタを表すヘッドポインタと、空き領域の後尾のポインタを表すテールポインタとを記憶し、空き領域のポインタをチェーンにより連結し、空き領域が発生する度に、テールポインタの後ろに新しい空き領域のポインタを追加して空き領域のチェーンを構成する。
【0006】
本発明に関連する先行技術として、下記の特許文献1に記載された「メモリ、メモリ管理方法およびメモリ管理回路」等がある。特許文献1に記載のメモリは、管理領域とデータ領域とを具え、該管理領域に、メモリ全体の管理情報として、データ領域へのフレーズの記録件数、データ領域の空き領域残りブロック数、空き領域先頭アドレスおよび空き領域最終アドレスをそれぞれ格納するための全体管理領域と、データ領域に格納されたフレーズ毎の個別の管理情報として、当該フレーズの記録時間、データ先頭アドレスおよびデータ最終アドレスをそれぞれ格納するための個別管理領域とを具え、データ領域の各ブロックには、当該ブロックの次にアクセスすべきブロックのアドレスがチェーンアドレスとして格納されてなることを特徴とするものである。
【0007】
【特許文献1】
特開平8−320822号公報
【0008】
【発明が解決しようとする課題】
転送データを格納するバッファメモリを効率よく使用するため、バッファメモリの読み出し及び書き込みの管理をチェーン方式により行うが、そのためには、転送データを格納するバッファメモリとは別に、データ格納領域管理用のポインタチェーンのメモリ領域、及びバッファメモリの空き領域管理用(空き領域のヘッド/テールポインタの格納用)のメモリ領域を別途確保しなければならず、メモリ容量が増大してしまう。
【0009】
また、転送データを格納するバッファメモリのオーバーフローを管理するために、オーバーフロー監視回路を備える必要があり、回路規模が増大するといった問題があった。本発明は、バッファメモリの空き領域の管理を、少ないメモリ領域で行い、また、バッファメモリのオーバーフローを簡易に管理することができるバッファメモリ装置及びその空き領域管理方法を提供することを目的とする。
【0010】
【課題を解決するための手段】
本発明のバッファメモリ装置は、(1)可変長のデータを空き領域に格納するバッファメモリと、該バッファメモリの空き領域のアドレスを連結する空き領域チェーンを生成する手段と、該空き領域チェーンを記憶する空き領域チェーンメモリと、該空き領域チェーンの先頭アドレスを格納する空き領域ヘッドポインタメモリとを備え、前記バッファメモリにデータを格納するときに、前記空き領域ヘッドポインタメモリに格納された空き領域チェーンの先頭アドレスからデータ長に応じた空き領域をデータ格納用に取り出し、かつ、バッファメモリからデータの読み出しによって空き領域が生じたときに、前記空き領域チェーンの先頭の前部に該空き領域を追加して空き領域チェーンを生成する手段と、を備えたものである。
【0011】
また、本発明のバッファメモリの空き領域管理方法は、(2)可変長のデータを空き領域に格納するバッファメモリの空き領域を示すアドレスを連結する空き領域チェーンを生成するステップと、該空き領域チェーンの先頭アドレスを空き領域ヘッドポインタメモリに格納するステップと、前記バッファメモリにデータを格納するときに、前記空き領域ヘッドポインタメモリに格納された空き領域チェーンの先頭アドレスからデータ長に応じた空き領域をデータ格納用に取り出し、かつ、バッファメモリからデータの読み出しによって空き領域が生じたときに、前記空き領域チェーンの先頭の前部に該空き領域を追加して空き領域チェーンを生成するステップと、を有するものである。
【0012】
また、(3)前記空き領域チェーンを生成する初期のステップにおいて、該領域チェーンを記憶保持する空き領域チェーンメモリの各アドレスのデータ領域に、自アドレスに所定の値を加えた値を格納するステップを有し、前記バッファメモリの空き領域にデータを格納する過程において、前記空き領域ヘッドポインタメモリに、空き領域の最後のアドレス値を越える値が格納されたことの検出により、バッファメモリのオーバーフロー状態を判定するステップを有するものである。
【0013】
【発明の実施の形態】
図1に本発明による空き領域管理のチェーンの初期構成を示す。バッファメモリの空き領域を管理するための空き領域チェーンを記憶保持する空き領域チェーンメモリ1−1を、バッファメモリとは別に備え、該空き領域チェーンメモリ1−1の各アドレス(#1,#2,…,#Z)のデータ領域に、初期化時に図1に示すように、自アドレスの次の空き領域アドレス(自アドレス+1)をデータとして書き込むことにより、初期空き領域チェーンを生成する。
【0014】
なお、ここで、自アドレスの次の空き領域アドレスが、「自アドレス+1」であるとしているが、自アドレスの次の空き領域アドレスは、これに限らず、自アドレスに所定の値を加えた値となる場合であってもよい。
【0015】
図1は、Z個の空き領域が存在する場合の例を示し、第1のアドレス#1のデータ領域に次の第2のアドレス#2を、第2のアドレス#2のデータ領域に次のアドレス#3をそれぞれデータとして書き込み、以下、順に同様に自アドレスの次のアドレスをデータとして書き込み、第Z番目のアドレス#Zのデータ領域に(#Z+1)、即ち空き領域の総数Zに1を加えた値を書き込み、バッファメモリの空き領域の管理用の空き領域チェーンを生成する。また、空き領域のヘッドポインタメモリ1−2に、空き領域チェーンのヘッドポインタの初期値#1を格納する。
【0016】
そして、バッファメモリに可変長の転送データを書き込む際に、空き領域チェーンの先頭から、該転送データのデータ長に応じた空き領域を取り出し、その空き領域に該転送データを格納し、取り出した空き領域の次のアドレスを空き領域チェーンの先頭アドレスとして、空き領域のヘッドポインタメモリ1−2に格納する。
【0017】
また、バッファメモリから転送データの読み出しによって、バッファメモリに空き領域が生じた場合に、この空き領域チェーンメモリ1−1に対して、図2に示すように、新しく生じた空き領域のポインタを、現在の空き領域チェーンのヘッドポインタの前部に追加する。
【0018】
図2の例において、現在、同図(a)に示すように、第Nのアドレス#Nが空き領域の先頭であり、空き領域のヘッドポインタメモリ1−2には、#Nが格納されている。そして、新たにアドレス#Xの空き領域が生じた場合、同図(b)に示すように、空き領域のヘッドポインタメモリ1−2にアドレス#Xを空き領域ヘッドポインタとして格納し、空き領域チェーンの先頭アドレス#Xのデータ領域に、次に続く空き領域のアドレス#Nを書き込む。
【0019】
上述のように、バッファメモリに転送データを書き込む際に、空き領域チェーンの先頭から空き領域を取り出して書き込み、また、バッファメモリから転送データの読み出しによってバッファメモリに新たに生じた空き領域のアドレスを、空き領域チェーンのテールポインタの後部に追加するのではなく、空き領域チェーンのヘッドポインタの前部に追加していくため、空き領域チェーンのテールポインタは常に初期値#Zのままであり、そのデータ領域には「空き領域の最後のアドレス#Z+1」の値が格納されている。
【0020】
次に、バッファメモリのオーバーフローの監視について説明する。バッファメモリに順次転送データが格納されると、空き領域が次第に減少していき、空き領域の残りが1つとなると、図3(a)に示すように、空き領域のヘッドポインタメモリ1−2にはアドレス#Zが格納される。
【0021】
そして、その最後の1つの空き領域#Zのバッファメモリにデータが格納され、最後の空き領域#Zが使用状態になると、図3(b)に示すように、空き領域のヘッドポインタメモリ1−2には、「空き領域の最後のアドレス#Z+1」を示す値が書き込まれ、このとき、バッファメモリはオーバーフロー状態となり、バッファメモリには書き込みを行うことができない状態となる。
【0022】
従って、バッファメモリに書き込みを行う時、空き領域のヘッドポインタメモリ1−2の内容が「空き領域の最後のアドレス#Z+1」となっている場合、バッファメモリがオーバーフロー状態であると見なすことができ、簡単にオーバーフローの監視を行うことが可能となる。
【0023】
図4に本発明によるバッファメモリ管理の実施例を示す。同図に示す実施例において、256Mbyteのデータが蓄積可能なバッファメモリ4−1を使用するものとし、該バッファメモリ4−1の1つのアドレスに8byte(64bit)のデータが格納され、該バッファメモリ4−1は32×1024×1024のアドレスを有するものとする。
【0024】
該バッファメモリ4−1へのデータの書き込み及び読み出しを管理するための格納データのヘッドポインタ及びテールポインタをそれぞれ格納する格納データヘッドポインタメモリ4−2及び格納データテールポインタメモリ4−3とを備える。
【0025】
格納データヘッドポインタメモリ4−2及び格納データテールポインタメモリ4−3は、ポート毎に備えられ、ポート毎に転送データの書き込み及び読み出しを管理する。図4は2つのポート(port0,port1)の転送データの書き込み及び読み出しを管理する例を示している。
【0026】
上記のバッファメモリ4−1に対し、その空き領域を管理する空き領域チェーンメモリ1−1を備え、空き領域チェーンメモリ1−1は、バッファメモリ4−1と同数の32×1024×1024のアドレスを有し、該空き領域チェーンメモリ1−1の各データ領域には、初期値として「自アドレス+1」の値を書き込む。
【0027】
空き領域チェーンメモリ1−1のデータ領域は、少なくとも「最終アドレス+1」の値を格納し得るビット数を有するものを使用する。32×1024×1024のアドレスを有する場合には、データ領域は少なくとも25ビットを有するメモリを使用する。
【0028】
バッファメモリ4−1へのデータ書き込み時、空き領域となっている先頭アドレス0から順次空き領域を使用し、また、バッファメモリ4−1からのデータ読み出しによって、空き状態となった領域を空き領域チェーンの先頭に付加することによって、空き領域の管理を行う。
【0029】
空き領域を全て使用した時点における空き領域ヘッドポインタメモリ1−2の値は、32×1024×1024を示し、この値は固定値であるので、空き領域ヘッドポインタメモリ1−2の値がこの値になったとき、バッファメモリオーバーフロー状態であり、更にバッファメモリ4−1に書き込みを行うことは不可能であると判定することができる。
【0030】
【発明の効果】
以上説明したように、本発明によれば、バッファメモリにデータを格納するときに、空き領域チェーンの先頭アドレスから空き領域をデータ格納用に取り出し、かつ、バッファメモリからデータの読み出しによって生じた空き領域を、空き領域チェーンの先頭の前部に追加して空き領域チェーンを生成することにより、空き領域チェーンのテールポインタは、初期値として設定された固定値のままであるため、空き領域チェーンのテールポインタを記憶するメモリ領域を確保する必要がなく、その分メモリ容量を削減することができる。
【0031】
また、空き領域ヘッドポインタメモリに、空き領域の最後のアドレス値を越える値が格納されたことの検出して、バッファメモリのオーバーフロー状態を判定することにより、簡素な回路によってバッファメモリのオーバーフロー状態を管理することができ、オーバーフロー監視回路の回路規模を削減することができ、パッケージを小型化することができる。
【0032】
更に、空き領域チェーンメモリの初期化時に、各アドレスのデータ領域に、自アドレスに所定の値を加えた値を格納して、空き領域チェーンを生成することにより、空き領域の大きさを考慮することなく空き領域チェーンを生成することができ、空き領域の大きさによる制約を受けることなく、自由度の高い空き領域管理を行うことができる。
【図面の簡単な説明】
【図1】本発明による空き領域管理のチェーンの初期構成を示す図である。
【図2】本発明による空き領域チェーンメモリに新たな空き領域を追加する例を示す図である。
【図3】本発明によるバッファメモリのオーバーフローの状態を示す図である。
【図4】本発明によるバッファメモリ管理の実施例を示す図である。
【符号の説明】
1−1 空き領域チェーンメモリ
1−2 空き領域ヘッドポインタメモリ
4−1 バッファメモリ
4−2 格納データヘッドポインタメモリ
4−3 格納データテールポインタメモリ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a buffer memory device and an empty area management method thereof, and more particularly, to a buffer memory device of a chain system used when data frames such as IP (Internet Protocol) packets are temporarily stored in a buffer memory and transfer control is performed, and a buffer memory device using the same. It relates to a free space management method.
[0002]
2. Description of the Related Art In recent years, the amount of transfer data flowing through the Internet network has been increasing more and more, and especially, variable-length data frames such as streaming data and moving image data provided from an Internet service provider to a user are rapidly and abundantly distributed. If these data frames are not efficiently stored in the buffer memory for the service, the buffer memory becomes full immediately. The present invention relates to a chain type buffer memory device for accumulating such transfer data in a buffer memory, and a method of managing a free area thereof.
[0003]
[Prior art]
When performing transfer control of data frames such as IP packets, since transfer data is input in bursts from an Internet service provider or a user, the transfer data is stored in a buffer memory and data transfer control is performed in frame units. Then, a method of storing transfer data in a buffer memory and managing the storage area by connecting an address pointer of the storage area with a chain is effective.
[0004]
Therefore, separately from the buffer memory for storing transfer data, a memory area for storing a chain connecting pointers of data storage areas in the buffer memory and a pointer for a free area of the buffer memory for storing transfer data are managed. Memory area, and based on the information on the data storage area and free area of the buffer memory stored in those memory areas, read and write of the buffer memory are managed, and data is efficiently stored in the buffer memory. Is going.
[0005]
The management of the free area of the buffer memory for storing data is performed by storing a head pointer indicating the head pointer of the free area and a tail pointer indicating the tail pointer of the free area, and linking the free area pointers by a chain. Each time an area is generated, a pointer to a new empty area is added after the tail pointer to form an empty area chain.
[0006]
As a prior art related to the present invention, there is “a memory, a memory management method and a memory management circuit” described in Patent Document 1 below. The memory described in Patent Literature 1 includes a management area and a data area. In the management area, as management information of the entire memory, the number of recorded phrases in the data area, the number of remaining blocks in the free area of the data area, the free area The overall management area for storing the start address and the free area end address, respectively, and the recording time of the phrase, the data start address, and the data end address are stored as individual management information for each phrase stored in the data area. Each block of the data area stores an address of a block to be accessed next to the block as a chain address.
[0007]
[Patent Document 1]
JP-A-8-320822
[Problems to be solved by the invention]
In order to use the buffer memory for storing the transfer data efficiently, the reading and writing of the buffer memory are managed by a chain method. For this purpose, separately from the buffer memory for storing the transfer data, the management for the data storage area is performed. A memory area for the pointer chain and a memory area for managing the free area of the buffer memory (for storing the head / tail pointer of the free area) must be separately provided, and the memory capacity increases.
[0009]
Further, in order to manage the overflow of the buffer memory for storing the transfer data, it is necessary to provide an overflow monitoring circuit, and there is a problem that the circuit scale increases. SUMMARY OF THE INVENTION It is an object of the present invention to provide a buffer memory device capable of managing a free area of a buffer memory in a small memory area and easily managing an overflow of the buffer memory, and a method of managing the free area. .
[0010]
[Means for Solving the Problems]
The buffer memory device according to the present invention comprises: (1) a buffer memory for storing variable-length data in a free area, a means for generating a free area chain connecting addresses of free areas in the buffer memory, and A free area chain memory for storing the free area chain pointer; and a free area head pointer memory for storing a head address of the free area chain, and when storing data in the buffer memory, the free area stored in the free area head pointer memory. A vacant area corresponding to the data length is extracted from the head address of the chain for data storage, and when a vacant area is generated by reading data from the buffer memory, the vacant area is located at the front of the head of the vacant area chain. Means for additionally generating a free space chain.
[0011]
In the method of managing the free area of a buffer memory according to the present invention, (2) a step of generating a free area chain connecting addresses indicating free areas of the buffer memory for storing variable-length data in the free area; Storing the head address of the chain in a free area head pointer memory; and storing the data in the free area head pointer memory from the free area chain head address stored in the free area head pointer memory according to the data length. Extracting an area for data storage, and, when an empty area is generated by reading data from the buffer memory, adding the empty area to the front of the beginning of the empty area chain to generate an empty area chain; .
[0012]
(3) In the initial step of generating the free area chain, storing a value obtained by adding a predetermined value to the own address in a data area of each address of the free area chain memory that stores the area chain. In the process of storing data in the free area of the buffer memory, the overflow area of the buffer memory is detected by detecting that a value exceeding the last address value of the free area is stored in the free area head pointer memory. Is determined.
[0013]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 shows an initial configuration of a chain for free space management according to the present invention. A free area chain memory 1-1 for storing and holding a free area chain for managing a free area of the buffer memory is provided separately from the buffer memory, and each address (# 1, # 2) of the free area chain memory 1-1 is provided. ,..., #Z), an initial free area chain is generated by writing the next free area address (own address + 1) of the own address as data at the time of initialization, as shown in FIG.
[0014]
Here, it is assumed that the free area address next to the own address is “own address + 1”, but the free area address next to the own address is not limited to this, and a predetermined value is added to the own address. It may be a value.
[0015]
FIG. 1 shows an example in which there are Z free areas, in which the next second address # 2 is stored in the data area of the first address # 1, and the next second address # 2 is stored in the data area of the second address # 2. The address # 3 is written as data, and thereafter, similarly, the next address of the own address is similarly written as data, and (# Z + 1) is added to the data area of the Z-th address #Z, that is, 1 is added to the total number Z of free areas. The added value is written, and a free area chain for managing the free area of the buffer memory is generated. Also, the initial value # 1 of the head pointer of the free area chain is stored in the free area head pointer memory 1-2.
[0016]
When writing variable-length transfer data to the buffer memory, a free area corresponding to the data length of the transfer data is extracted from the beginning of the free area chain, and the transfer data is stored in the free area. The next address of the area is stored in the head pointer memory 1-2 of the empty area as the head address of the empty area chain.
[0017]
When an empty area is generated in the buffer memory by reading the transfer data from the buffer memory, a pointer of the newly generated empty area is assigned to this empty area chain memory 1-1 as shown in FIG. Add to the front of the head pointer in the current free space chain.
[0018]
In the example of FIG. 2, as shown in FIG. 2A, the N-th address #N is the head of the free area, and #N is stored in the head pointer memory 1-2 of the free area. I have. Then, when a free area of the address #X is newly generated, the address #X is stored as a free area head pointer in the free area head pointer memory 1-2 as shown in FIG. The address #N of the next free area is written in the data area of the start address #X.
[0019]
As described above, when writing the transfer data to the buffer memory, the free area is taken out from the head of the free area chain and written, and the address of the newly generated free area in the buffer memory by reading the transfer data from the buffer memory is written. The tail pointer of the free space chain always remains at the initial value #Z because the tail pointer of the free space chain is always added to the front of the head pointer of the free space chain, instead of being added to the tail of the tail pointer of the free space chain. The value of “last address # Z + 1 of free area” is stored in the data area.
[0020]
Next, monitoring of buffer memory overflow will be described. When the transfer data is sequentially stored in the buffer memory, the free area gradually decreases, and when the remaining free area becomes one, as shown in FIG. Stores the address #Z.
[0021]
Then, data is stored in the buffer memory of the last one free area #Z, and when the last free area #Z is in use, as shown in FIG. A value indicating “the last address # Z + 1 of the empty area” is written in 2, and at this time, the buffer memory is in an overflow state, and writing to the buffer memory cannot be performed.
[0022]
Therefore, when writing to the buffer memory, if the contents of the head pointer memory 1-2 of the empty area are "last address # Z + 1 of the empty area", the buffer memory can be regarded as being in the overflow state. Thus, it is possible to easily monitor the overflow.
[0023]
FIG. 4 shows an embodiment of the buffer memory management according to the present invention. In the embodiment shown in the figure, it is assumed that a buffer memory 4-1 capable of storing 256 Mbytes of data is used, and one byte of the buffer memory 4-1 stores 8 bytes (64 bits) of data. 4-1 has an address of 32 × 1024 × 1024.
[0024]
A storage data head pointer memory 4-2 and a storage data tail pointer memory 4-3 for storing a head pointer and a tail pointer of storage data for managing writing and reading of data to and from the buffer memory 4-1 are provided. .
[0025]
The storage data head pointer memory 4-2 and the storage data tail pointer memory 4-3 are provided for each port, and manage writing and reading of transfer data for each port. FIG. 4 illustrates an example of managing writing and reading of transfer data of two ports (port0, port1).
[0026]
The buffer memory 4-1 is provided with a free area chain memory 1-1 for managing the free area, and the free area chain memory 1-1 has the same number of 32 × 1024 × 1024 addresses as the buffer memory 4-1. The value of “own address + 1” is written as an initial value in each data area of the free area chain memory 1-1.
[0027]
The data area of the free area chain memory 1-1 has at least the number of bits capable of storing the value of "last address + 1". If the address has 32 × 1024 × 1024 addresses, the data area uses a memory having at least 25 bits.
[0028]
When writing data to the buffer memory 4-1, the free area is sequentially used from the start address 0, which is a free area, and the area which becomes empty by reading data from the buffer memory 4-1 is used as the free area. The free area is managed by adding it to the head of the chain.
[0029]
The value of the free area head pointer memory 1-2 at the time when all the free areas are used indicates 32 × 1024 × 1024, and since this value is a fixed value, the value of the free area head pointer memory 1-2 is equal to this value. Is reached, it is determined that the buffer memory has overflowed and that writing to the buffer memory 4-1 is impossible.
[0030]
【The invention's effect】
As described above, according to the present invention, when data is stored in the buffer memory, a vacant area is taken out from the head address of the vacant area chain for data storage, and a vacant area generated by reading data from the buffer memory is obtained. By adding an area to the beginning of the free area chain to generate a free area chain, the tail pointer of the free area chain remains at the fixed value set as the initial value, so There is no need to secure a memory area for storing the tail pointer, and the memory capacity can be reduced accordingly.
[0031]
Also, by detecting that a value exceeding the last address value of the free area is stored in the free area head pointer memory and determining the overflow state of the buffer memory, the overflow state of the buffer memory can be determined by a simple circuit. Thus, the size of the overflow monitoring circuit can be reduced, and the size of the package can be reduced.
[0032]
Furthermore, when the free area chain memory is initialized, a value obtained by adding a predetermined value to its own address is stored in the data area of each address, and a free area chain is generated, so that the size of the free area is considered. A free area chain can be generated without any restriction, and free area management with a high degree of freedom can be performed without being restricted by the size of the free area.
[Brief description of the drawings]
FIG. 1 is a diagram showing an initial configuration of a free space management chain according to the present invention.
FIG. 2 is a diagram showing an example of adding a new free area to a free area chain memory according to the present invention.
FIG. 3 is a diagram showing an overflow state of a buffer memory according to the present invention.
FIG. 4 is a diagram showing an embodiment of buffer memory management according to the present invention.
[Explanation of symbols]
1-1 Free area chain memory 1-2 Free area head pointer memory 4-1 Buffer memory 4-2 Storage data head pointer memory 4-3 Storage data tail pointer memory

Claims (3)

可変長のデータを空き領域に格納するバッファメモリと、
該バッファメモリの空き領域のアドレスを連結する空き領域チェーンを生成する手段と、
該空き領域チェーンを記憶する空き領域チェーンメモリと、
該空き領域チェーンの先頭アドレスを格納する空き領域ヘッドポインタメモリとを備え、
前記バッファメモリにデータを格納するときに、前記空き領域ヘッドポインタメモリに格納された空き領域チェーンの先頭アドレスからデータ長に応じた空き領域をデータ格納用に取り出し、かつ、バッファメモリからデータの読み出しによって空き領域が生じたときに、前記空き領域チェーンの先頭の前部に該空き領域を追加して空き領域チェーンを生成する手段と、
を備えたことを特徴とするバッファメモリ装置。
A buffer memory for storing variable-length data in a free area;
Means for generating a free area chain connecting addresses of free areas of the buffer memory;
A free area chain memory for storing the free area chain;
A free area head pointer memory for storing a head address of the free area chain,
When storing data in the buffer memory, a free area corresponding to the data length is taken out from the head address of the free area chain stored in the free area head pointer memory for data storage, and data is read from the buffer memory. Means for generating a free space chain by adding the free space to the front of the head of the free space chain when a free space is generated by
A buffer memory device comprising:
可変長のデータを空き領域に格納するバッファメモリの空き領域を示すアドレスを連結する空き領域チェーンを生成するステップと、
該空き領域チェーンの先頭アドレスを空き領域ヘッドポインタメモリに格納するステップと、
前記バッファメモリにデータを格納するときに、前記空き領域ヘッドポインタメモリに格納された空き領域チェーンの先頭アドレスからデータ長に応じた空き領域をデータ格納用に取り出し、かつ、バッファメモリからデータの読み出しによって空き領域が生じたときに、前記空き領域チェーンの先頭の前部に該空き領域を追加して空き領域チェーンを生成するステップと、
を有することを特徴とするバッファメモリの空き領域管理方法。
Generating a free area chain linking addresses indicating free areas of the buffer memory for storing variable-length data in the free area;
Storing the head address of the free space chain in a free space head pointer memory;
When storing data in the buffer memory, a free area corresponding to the data length is taken out from the head address of the free area chain stored in the free area head pointer memory for data storage, and data is read from the buffer memory. Generating an empty area chain by adding the empty area to the front of the beginning of the empty area chain when an empty area is generated,
A method for managing a free area in a buffer memory, comprising:
前記空き領域チェーンを生成する初期のステップにおいて、該領域チェーンを記憶保持する空き領域チェーンメモリの各アドレスのデータ領域に、自アドレスに所定の値を加えた値を格納するステップを有し、
前記バッファメモリの空き領域にデータを格納する過程において、前記空き領域ヘッドポインタメモリに、空き領域の最後のアドレス値を越える値が格納されたことの検出により、バッファメモリのオーバーフロー状態を判定するステップを有することを特徴とする請求項2に記載のバッファメモリの空き領域管理方法。
In the initial step of generating the free area chain, a step of storing a value obtained by adding a predetermined value to its own address in the data area of each address of the free area chain memory that stores and holds the area chain,
Determining the overflow state of the buffer memory by detecting that a value exceeding the last address value of the free area is stored in the free area head pointer memory in the process of storing data in the free area of the buffer memory; 3. The method according to claim 2, further comprising the steps of:
JP2003069195A 2003-03-14 2003-03-14 Buffer memory device and free space management method for same Pending JP2004280333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003069195A JP2004280333A (en) 2003-03-14 2003-03-14 Buffer memory device and free space management method for same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003069195A JP2004280333A (en) 2003-03-14 2003-03-14 Buffer memory device and free space management method for same

Publications (1)

Publication Number Publication Date
JP2004280333A true JP2004280333A (en) 2004-10-07

Family

ID=33286297

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003069195A Pending JP2004280333A (en) 2003-03-14 2003-03-14 Buffer memory device and free space management method for same

Country Status (1)

Country Link
JP (1) JP2004280333A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009104497A (en) * 2007-10-25 2009-05-14 Nec Access Technica Ltd Memory management system and memory management method
US8938596B2 (en) 2011-09-29 2015-01-20 Fujitsu Limited Storage apparatus, control apparatus, and storage apparatus control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009104497A (en) * 2007-10-25 2009-05-14 Nec Access Technica Ltd Memory management system and memory management method
US8938596B2 (en) 2011-09-29 2015-01-20 Fujitsu Limited Storage apparatus, control apparatus, and storage apparatus control method

Similar Documents

Publication Publication Date Title
KR101407743B1 (en) Method for processing data packets in flow-aware network nodes
US9037810B2 (en) Pre-fetching of data packets
US20070073973A1 (en) Method and apparatus for managing buffers in a data processing system
US8291133B2 (en) Skip based control logic for first in first out buffer
JP7074839B2 (en) Packet processing
US10205673B2 (en) Data caching method and device, and storage medium
US6134629A (en) Determining thresholds and wrap-around conditions in a first-in-first-out memory supporting a variety of read and write transaction sizes
JP2006512657A (en) Memory controller and method of writing to memory
JP4855864B2 (en) Direct memory access controller
US8363653B2 (en) Packet forwarding method and device
US7065628B2 (en) Increasing memory access efficiency for packet applications
JP2004280333A (en) Buffer memory device and free space management method for same
US20110283068A1 (en) Memory access apparatus and method
JP4428779B2 (en) Data multiplexer
US8645597B2 (en) Memory block reclaiming judging apparatus and memory block managing system
CN115277553A (en) Flow table storage method, device, equipment and computer readable storage medium
CN114610231A (en) Control method, system, equipment and medium for large-bit-width data bus segmented storage
US6728861B1 (en) Queuing fibre channel receive frames
US9990307B1 (en) Split packet transmission DMA engine
US8422396B2 (en) Rate monitoring apparatus
JP2723038B2 (en) Method of storing data in storage device
CN112965833B (en) Log processing method and device
US20040004563A1 (en) System and method for data decompression
JP2009206896A (en) Rate monitoring system in packet transfer apparatus
US20070116044A1 (en) Capture buffer, a network analyser, a network analyser card and a method of capturing network data

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20060202

Free format text: JAPANESE INTERMEDIATE CODE: A621

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090216

A131 Notification of reasons for refusal

Effective date: 20090224

Free format text: JAPANESE INTERMEDIATE CODE: A131

A02 Decision of refusal

Effective date: 20090630

Free format text: JAPANESE INTERMEDIATE CODE: A02