CN1375773A - Buffer control device and management method thereof - Google Patents
Buffer control device and management method thereof Download PDFInfo
- Publication number
- CN1375773A CN1375773A CN 02118604 CN02118604A CN1375773A CN 1375773 A CN1375773 A CN 1375773A CN 02118604 CN02118604 CN 02118604 CN 02118604 A CN02118604 A CN 02118604A CN 1375773 A CN1375773 A CN 1375773A
- Authority
- CN
- China
- Prior art keywords
- buffer
- tandem
- control device
- aforementioned
- buffer register
- 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.)
- Granted
Links
- 239000000872 buffer Substances 0.000 title claims abstract description 274
- 238000007726 management method Methods 0.000 title claims abstract description 22
- 230000003139 buffering effect Effects 0.000 claims description 25
- 238000005192 partition Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 230000005540 biological transmission Effects 0.000 description 4
- 238000000034 method Methods 0.000 description 4
- 230000003068 static effect Effects 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
Images
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
技术领域technical field
本发明系有关于一种缓冲控制装置(Buffer controller)及其管理方法,进一步地说明,本发明系一种利用新颖的链结结构(Linked Structure)来管理缓冲暂存器(Buffers)的配置与释回的缓冲控制装置及其缓冲暂存器管理方法。The present invention is related to a buffer control device (Buffer controller) and its management method. It is further explained that the present invention is a kind of configuration and management of buffer temporary registers (Buffers) using a novel link structure (Linked Structure). A released buffer control device and a buffer register management method thereof.
背景技术Background technique
请参阅图1所示,为缓冲记忆体与控制器连接方块图。通常,控制器与装置连接间设有一缓冲记忆体30,以作为资料存取时的缓冲与管理,缓冲记忆体30可为一同步动态随机存取记忆体(Synchronous Dynamic Random AccessMemory;SDMM)、一静态随机存取记忆体(Static Random Access Memory;SMM)或是一动态随机存取记忆体(Dynamic Random Access Memory;DMM);其控制器10与缓冲记忆体30间尚连接有一缓冲控制装置20,系做为协助控制器10和缓冲记忆体30间资料存取的管理,以提升资料处理的效率。Please refer to Figure 1, which is a block diagram of the connection between the buffer memory and the controller. Usually, a
请参阅图1所示,为习知利用链结串列方式(Linked List)的缓冲器管理示意图。当开始初始化时,由一指标器40指向缓冲记忆体30内第一个未使用缓冲暂存器30.0001,而未使用缓冲暂存器30.0001至30.2048形成链结串列结构,即缓冲暂存器30.0001利用其连结节点30.0002,而缓冲暂存器30.0002的连结节点则指向30.0003,如此;接续指向缓冲暂存器30.2048为止,而最后缓冲暂存器30.2048的连结节点则指向无效(Null),代表此串列的结束。请配合参阅图3,显示图2的缓冲器管理所实施缓冲控制装置的硬体示意图。缓冲控制装置20内设有一指标器40,用以记录第一个未使用缓冲暂存器的位址30.0001。当一开始时,指标器40指向缓冲暂存器30.0001,若缓冲暂存器30.0001至30.0003被连续存入资料时,则该指标器40便需要读取缓冲暂存器30.0003的连结节点以改变其内容值而指向30.0004;之后,若缓冲暂存器30.0001至30.0003使用完毕,则缓冲控制装置20应将该用毕的缓冲暂存器30.0001至30.0003逐一释回(free)链结至串列的最前端,意即将缓冲暂存器30.0003的连结节点必须改变记录而指向原指标器40中所记录的未使用缓冲暂存器30.0004,再将于标器40指向释回的缓冲暂存器30.0003,接着逐一释回缓冲暂存器30.0002至30.0001,方可完成链结。由此可见,虽是单纯释回缓冲暂存器,却牵涉到复杂的硬体运作,且需回报给缓冲控制装置20知道释回缓冲暂存器的第一位址(First address)、第二位址(second address)以及区隔段长度(segment Counter)等资讯供指标器40定位使用,但这些资讯皆需要占据记忆体空间,若大量的传输资料,会造成SRAM的负载(Loading)增加。再者,缓冲控制装置20仅设一指标器40,使配置动作与释回动作皆从串列的最前端进行会抢用该指标器40,而影响缓冲控制装置20对缓冲暂存器的管理效率。Please refer to FIG. 1 , which is a schematic diagram of a conventional buffer management using a Linked List. When starting initialization, a
若以交换控制器为例,通常缓冲记忆体系以缓冲暂存器为单位来分派记忆体,而各缓冲暂存器的大小可以依照不同应用而定。该缓冲暂存器一般容量系以128bytes为主;以乙太网路封包而言,其传输最大封包长度可至1522bytes,而最小长度也要64bytes,故在一个区隔段内可能要配置到12个缓冲暂存器来做为封包传输及接收的储存器,并利用其静态随机存取记忆体的高速传输特性做为中央处理器与动态随机存取记忆体间的沟通桥梁,以加速传输率,但是若交换控制器连续接收最大乙太网路封包时,即需要使用快取记忆体来做有效缓和串列链结的负荷,可是由于快取记忆体数量有限,在这种情况下串列链结的负载仍然很重,且缓冲暂存器归还的速度很慢,故需要寻求另一更有效的管理方法来因应目前日趋追求快速的网路社会。Taking the switching controller as an example, the buffer memory system usually allocates memory in units of buffer registers, and the size of each buffer register can be determined according to different applications. The general capacity of the buffer register is mainly 128bytes; for Ethernet packets, the maximum packet length can reach 1522bytes, and the minimum length is 64bytes, so it may be configured to 12 bytes in a segment. A buffer register is used as a storage for packet transmission and reception, and the high-speed transmission characteristics of its static random access memory are used as a communication bridge between the central processing unit and dynamic random access memory to speed up the transmission rate. , but if the switch controller receives the largest Ethernet packets continuously, it needs to use the cache memory to effectively alleviate the load of the serial link, but due to the limited amount of cache memory, in this case the serial link The load of the link is still heavy, and the return speed of the buffer register is very slow, so another more effective management method needs to be found to cope with the current Internet society that is increasingly pursuing speed.
发明内容 Contents of the invention
本发明的主要目的系提供一种缓冲控制装置,以新颖的链结结构管理缓冲暂存器的配置与释回,以改善缓冲记忆体存取效率并简化硬体架构的设计。The main purpose of the present invention is to provide a buffer control device, which manages the allocation and release of buffer registers with a novel link structure, so as to improve buffer memory access efficiency and simplify the design of hardware architecture.
有鉴于习知缓冲器管理技术在释回用毕的区隔段仅依照已使用的链结串列逐一释回缓冲暂存器而牵涉到复杂的硬体运作,执行效率也低且SDRAM的负载甚重等缺点,本发明的一种实施例遂于缓冲控制装置中设置一头指标器与一尾指标器,分别指向一未使用串列(free lise)的第一个缓冲暂存器位址与最后一个缓冲暂存器位址,且缓冲控制装置包含一快取记忆体,用以存放使用区隔段的第一位址,该缓冲控制装置配置(allocate)一区隔段系先从快取记忆体优先配置,再逐一链结由头指标器指向的位址取出串列的缓冲暂存器形成串列结构的区隔段,并将头指标器指向该取出串列的下一个缓冲暂存器位址:该缓冲控制装置于释回动作(release)较佳地回报链结区隔段的第一位址、第二位址、最后位址(Last address)以及区隔段长度的资讯,先将第一位址存入快取记忆体,而将尾指标器指向的缓冲暂存器指向第二位址,再将最后位址直接存入尾指标器,使串列结构的区隔段可一起串于未使用串列的最末端。In view of the fact that the conventional buffer management technology only releases the buffer registers one by one according to the used link sequence when releasing the used segment, it involves complex hardware operations, and the execution efficiency is also low and the SDRAM load Shortcomings such as very heavy, a kind of embodiment of the present invention then arranges a head pointer and a tail pointer in the buffer control device, pointing to the first buffer register address and the last of an unused serial (free lise) respectively A buffer register address, and the buffer control device includes a cache memory for storing the first address of the used partition segment, and the buffer control device configures (allocate) a partition segment first from the cache memory First configure the body first, and then link the buffer registers of the fetching sequence pointed to by the head pointer one by one to form a segment of the serial structure, and point the head pointer to the next buffer register bit of the fetching sequence Address: The buffer control device preferably returns the information of the first address, the second address, the last address (Last address) and the length of the segment of the link segment in the release action (release). The first address is stored in the cache memory, and the buffer register pointed to by the tail pointer points to the second address, and then the last address is directly stored in the tail pointer, so that the segments of the serial structure can be used together String at the end of the unused string.
在本发明的另一种较佳实施例中,一种新颖的链结结构应用于缓冲控制装置的配置动作,以使在释回用毕的区隔段可很快取得第二位址的资讯,而不必记录于该区隔段中回报给缓冲控制装置,该新颖的链结结构系将第一个缓冲暂存器直接指向最后一个缓冲暂存器,接着才指回第二个缓冲暂存器后,再依序指到最后一个缓冲暂存器,因此,释回动作可迅速籍由最后一个缓冲暂存器的连结结点而取得第二位址,而将第二位址存入尾指标器所指向的缓冲暂存器的连结结点,再将最后位址存入尾指标器,使具有前述链结结构的区隔段可一起串于未使用串列的末端,无须逐一释回节点,不但节省记忆体空间去记录第二位址,亦保有原硬体设计架构使得缓冲记忆体能有效率的使用。In another preferred embodiment of the present invention, a novel linking structure is applied to the configuration of the buffer control device, so that the information of the second address can be quickly obtained when the used segment is released. , without having to record in the segment and report back to the buffer control device, the novel link structure is to point the first buffer directly to the last buffer, and then point back to the second buffer After the register, it points to the last buffer register in sequence. Therefore, the release action can quickly obtain the second address through the connection node of the last buffer register, and store the second address in the end The link node of the buffer temporary register pointed to by the pointer, and then store the last address in the tail pointer, so that the segments with the aforementioned link structure can be strung together at the end of the unused sequence without releasing them one by one Node, not only saves memory space to record the second address, but also maintains the original hardware design structure so that the buffer memory can be used efficiently.
本发明提供一种新颖的链结串列结构应用于缓冲控制装置,以使缓冲控制装置在处理封包存取的记忆体配置与释回动作上能够更为快速,且可有效节省记忆体空间,使得缓冲记忆体能更有效率的使用与管理。The present invention provides a novel link serial structure applied to the buffer control device, so that the buffer control device can process the memory configuration and release action of packet access more quickly, and can effectively save memory space. This enables the buffer memory to be used and managed more efficiently.
附图说明Description of drawings
图1为习知缓冲记忆体与控制器连接方块图;Fig. 1 is the connection block diagram of conventional buffer memory and controller;
图2为习知利用链结串列方式(Linked List)的缓冲器管理示意图;FIG. 2 is a schematic diagram of conventional buffer management using a Linked List;
图3为根据图2的缓冲器管理所实施的习知缓冲控制装置的硬体示意图;FIG. 3 is a hardware schematic diagram of a conventional buffer control device implemented according to the buffer management of FIG. 2;
图4为本发明缓冲控制装置所实施的硬体示意图;Fig. 4 is a schematic diagram of the hardware implemented by the buffer control device of the present invention;
图5为本发明缓冲控制装置释回被使用的串列的示意图;Fig. 5 is a schematic diagram of the buffer control device of the present invention releasing the used string;
图6为本发明的被使用的链结结构的示意图。FIG. 6 is a schematic diagram of the link structure used in the present invention.
图式标号单说明:Explanation of the schematic label list:
10 控制器;20 缓冲控制装置,30 缓冲记忆体;31 连结节点;40 指标器;50 头指标器;51 尾指标器;52 快取记忆体。10 controller; 20 buffer control device, 30 buffer memory; 31 link node; 40 pointer; 50 head pointer; 51 tail pointer; 52 cache memory.
具体实施方式Detailed ways
请参阅图4所示,为本发明缓冲控制装置所实施的硬体示意图。缓冲记忆体30包含一未使用串列(free list),系由缓冲暂存器链结串列形成,每一缓冲暂存器皆有其对应的连结节点31,此连结节点31内具有一栏位作为链结的连结指标(pointer)。在本发明的第一实施例中,交换控制器由一缓冲控制装置管理一缓冲记忆体以暂存封包的传送资料,该缓冲控制装置20内设有一头指标器50与一尾指标器51,于一开始初始化时,分别将其指向该未使用串列的第一个缓冲暂存器位址30.0001与最后一个缓冲暂存器位址30.2048。缓冲控制装置20较佳地包含一快取记忆体52,用以指向可供使用的缓冲暂存器。该未使用串列由缓种暂存器30.0001利用其连结节点指向30.0002,而缓冲暂存器30.0002的连结节点则指向30.0003,如此接续指向缓冲暂存器30.2048为止,而最后缓冲暂存器30.2048的连结节点则指向无效(Null),代表此未使用串列的结束。Please refer to FIG. 4 , which is a schematic diagram of the hardware implemented by the buffer control device of the present invention. The
于本发明的第二实施例中,假设交换控制器的缓冲控制装置内嵌的快取记忆体52具有三个快取单元,其具体实施方式可以为内嵌式SRAM单元、正反器或者暂存器等等。当交换控制器开始初始化时,会将缓冲暂存器位址30.0001、30.0002、30.0003填入快取记忆体52之中,且头指标器50指向缓冲暂存器位址30.0004。当要求配置暂存空间时,则优先至快取记忆体52要求配置可以储存的记忆体位址。如同先前的规划,每个要到的缓冲暂存器大小皆为128bytes,可以发现,当进来的封包皆为小封包时(最小为64bytes),皆只需要要求快取记忆体52配置一个缓冲暂存器即可,而且用完之后,该缓冲暂存器位址会被归还至此快取记忆体52之中,因此几乎很少需要用到头指标器50的运作,此代表SRAM的存取动作次数被有效地减少。In the second embodiment of the present invention, it is assumed that the
应注意到,实际实施时,由于每个缓冲暂存器大小皆规划为128bytes,因此并无须真的记录缓冲暂存器的实体位址(physical address),而仅需记录其所对应的缓冲暂存器号码(Buffer_ID)即可,藉由增设一实体位址转换器模组,即可便利地将缓冲暂存器号码转换为对应的实体位址,此可有效加快存取速度,并减少相关硬体设计的闸数(gate counts)。It should be noted that in actual implementation, since the size of each buffer register is planned to be 128 bytes, it is not necessary to actually record the physical address of the buffer register, but only need to record its corresponding buffer register The buffer number (Buffer_ID) is enough. By adding a physical address converter module, the buffer register number can be easily converted into the corresponding physical address, which can effectively speed up the access speed and reduce the correlation Gate counts for hardware design.
此外,应注意到本发明的缓冲控制装置,系可运用于所有有关缓冲暂存器管理的情形,此处的实施例系以交换控制器说明。In addition, it should be noted that the buffer control device of the present invention can be applied to all situations related to buffer register management, and the embodiment here is described by a switch controller.
上述实施例中,若当交换控制器一开始初始化之后被要求配置一区隔段(segment)时,例示地表示所需区隔段长度为10,会由该快取记忆体52优先释出缓冲暂存器位址30.0001、30.0002、30.0003,并将其适当地编串(stitch);接着的七个缓冲暂存器则先由头指标器50先要到缓冲暂存器位址30.0004,将其编串(stitch)到缓冲暂存器位址30.0003,并根据缓冲暂存器位址30.0004的相应连结节点(link node),将头指标器50更新而指向30.0005;再接着,根据头指标器50要到缓冲暂存器位址30.0005,并更新头指标器50而指向30.0006,如此逐一配置之后,头指标器5 0最后指向30.00ll,其中该区隔段具有链结串列(Linked list)的结构,而同一个封包所使用的缓冲暂存器亦适当地编串,以便在区隔段使用完毕后(封包成功送出后)能将这些缓冲暂存器一起归还。之后,于此实施例中,若区隔段30.0001至30.0010使用完毕,则需回报该区隔段的第一位址30.0001、第二位址30.0002、最后位址30.0010以及区隔段长度等资讯,缓冲控制装置20将第一位址30.0001存入快取记忆体52的暂存器,再将串列的区隔段一起串于未使用串列的最末端,即将第二位址30.0002存入尾指标器51指向的缓冲暂存器的连结节点,再将最后位址30.0010直接存入尾指标器51。因此,交换控制器的缓冲控制装置执行配置动作与释回动作可以分别从未使用串列的最前端与最末端同时进行,藉以提升缓冲控制装置20对缓冲暂存器的管理效率。In the above-mentioned embodiment, if when the switching controller is required to configure a segment (segment) after initial initialization, the example shows that the length of the required segment segment is 10, and the
请继续参考图4,由于快取记忆体52的快取单元数量有限,较佳地,各快取单元包含一遮罩位元(Full bit),以记录相应快取单元是否指向可应用的缓冲暂存器。可藉由将所有遮罩位元经由一及闸运算以产生一Cache_full信号,而藉由将所有遮罩位元经由一反或闸运算以产生一Cache_empty信号。Cache_full信号指示快取记忆体52是否已储存满,而Cache_empty信号指示快取记忆体52内的可用缓冲暂存器位址是否已配置完。因此,当缓冲控制装置20配置一区隔段时,缓冲控制装置20经由检查Cache_emPty可以发现是否有可用缓冲暂存器位址可供配置,若有,则优先自快取记忆体52配置缓冲暂存器;若检查Cache_empty信号发现快取记忆体52已配置完,则再由头指标器50继续配置缓冲暂存器;在配置缓冲暂存器的过程中,同时逐一将其链结成一所欲的被使用的串列(used link list)结构的区隔段。Please continue to refer to FIG. 4, since the number of cache units of the
而释回用毕的区隔段时,缓冲控制装置20经由检查Cache_full信号以决定快取记忆体52是否已储存额满,若尚有空间,则可以优先释回至快取记忆体52,其可依照所定义的被使用的串列结构而有弹性变化,并将剩馀的欲释回的被使用的串列的区隔段一起串于未使用串列的最末端,举例而言,可将该剩馀的欲释回的被使用的串列的区隔段的第一个位址存入尾指标器51指向的缓冲暂存器的连结节点,再将最后一个位址直接存入尾指标器51。And when releasing the partition segment that has been used up, the
在本发明的实施例中,上述回报的所有资讯较佳地可由该封包所用的第一个缓冲暂存器取得,且尚须记录很多重要资讯,包括此串列中总缓冲暂存器数目(total buffer count)、埠罩幕中(port mask)、优先等级(priority)等资讯;所以当回传的资讯增加时,例如:最后位址资讯,可能会造成第一个缓冲暂存器容量不敷使用或硬体设计的改变。因此,本发明进一步揭示一种新颖的链结结构应用于缓冲控制装置。In the embodiment of the present invention, all the information reported above can preferably be obtained from the first buffer register used by the packet, and a lot of important information must be recorded, including the total number of buffer registers in this series ( total buffer count), port mask (port mask), priority (priority) and other information; so when the returned information increases, for example: the last address information, the capacity of the first buffer register may be insufficient changes in application usage or hardware design. Therefore, the present invention further discloses a novel link structure applied to the buffer control device.
根据前述本发明的第二实施例,于图5中,交换控制器内嵌的快取记忆体52具有三个快取单元,一开始初始化时,会将缓冲暂存器位址30.0001、30.0002、30.0003(或相应的Buffer_ID)填入快取记忆体52之中;缓冲控制装置20内设有一头指标器50与一尾指标器51,分别指向该未使用串列的缓冲暂存器位址30.0004与最后一个缓冲暂存器30.2048,其缓冲暂存器管理方法包含:According to the aforementioned second embodiment of the present invention, in FIG. 5, the
若当交换控制器一开始初始化之后被要求配置一块长度为10的区隔段(segment)时,较佳地会由该快取记忆体52优先释出缓冲暂存器位址30.0001、30.0002、30.0003,并将其适当地编串,而且为了形成前述的特殊串列,会于交换控制器内暂时保有第一个与第二个释出的缓冲暂存器位址30.0001、30.0002;接着的七个缓冲暂存器则先由头指标器50先要到缓冲暂存器位址30.0004,将其编串到缓冲暂存器位址30.0003,并根据缓冲暂存器位址30.0004的相应连结节点(link node),将头指标器50更新而指向30.0005:再接着,根据头指标器50要到缓冲暂存器30.0005,并更新头指标器50而指向30.0005,如此逐一配置之后,最后所配置的缓冲暂存器位址为30.0010,进一步地,将先前保有的第二个释出的缓冲暂存器位址30.0002填入最后所配置的缓冲暂存器的相应连结节点之中;以及,将所配置的最后位址,根据先前保有的第一个释出的缓冲暂存器位址30.0001,于其对应的连结节点填入该最后位址30.0010;于是释出的串列,如图6所示,其第一个释出的缓冲暂存器编串指向最后一个缓冲暂存器;而且,最后一个释出的缓冲暂存器编串指向第二个缓冲暂存器,其余者则于释出的过程中依序编串连结,使得所有释出的区隔段具有前述本发明的特殊链结串列(Linked list)的结构,以便在区隔段使用完毕后(封包成功送出后)能将这些缓冲暂存器更有效率地归还。If the switch controller is required to configure a segment (segment) with a length of 10 after initial initialization, preferably the
当释回一具有前述本发明的特殊链结串列的区隔段时,较佳地缓冲控制装置20会获得包含第一个缓冲暂存器的第一位址、第二个缓冲暂存器的第二位址、最后缓冲暂存器的最后位址以及区隔段长度等资讯;请参考图5,缓冲控制装置20只要先检视前述Cache_full讯号,只要仍有空间存放,直接将第一个缓冲暂存器的第一位址存入快取记忆体52中,接着,将该第二位址以存入尾指标器51,并将该最后位址存入尾指标器51,于是可以快速将用毕的缓冲器释回右侧的未使用串列(freelist),而无须逐一地释回;当然,若不幸地,当检视前述Cache_full讯号时,发现快取记忆体52已经存满,则为了将第一个缓冲暂存器串回右侧的未使用串列(free list),必须多做一次编串动作,亦即将该第二位址填入第一个缓冲暂存器的对应连结节点之中,之后则仿照前述动作,将整个串列编串回右侧的未使用串列(free list)即可;其中,最后一个缓冲暂存器的连结节点的内容可忽略掉不管(don’t care),因下一次使用最后缓冲暂存器会覆盖其连结节点的内容;而且缓冲控制装置20可以备置一个计数器,计数目前剩下的可用缓冲控制器的数目,故当封包流量过大而将所有未使用串列耗尽时,亦不会将已经暂存的资料覆盖掉。When releasing a partition with the aforementioned special link sequence of the present invention, preferably the
应注意到,前述释回动作可以有许多可能的变化,举例来说,可以仅向缓冲控制装置20回报第一个缓冲暂存器的第一位址、最后缓冲暂存器的最后位址以及区隔段长度等资讯,而无须回报第二位址,其可将第一位址存入快取记忆体52,并从最后缓冲暂存器的连结节点获得第二位址以存入尾指标器51指向的缓冲暂存器的连结节点,再将最后位址存入尾指标器51,其中,最后缓冲暂存器的连结节点的内容可忽略掉不管,因下一次使用最后缓冲暂存器会覆盖其连结节点的内容。It should be noted that the aforesaid release action can have many possible changes. For example, the first address of the first buffer register, the last address of the last buffer register, and segment segment length and other information without reporting the second address, it can store the first address in the
请参考图5,显示直接由头指标器50配置五个缓冲暂存器。假设原先头指标器50指向缓冲暂存器30.0001,倘若缓冲控制装置20检查Chche_empty信号发现快取记忆体52已配置完,则直接由头指标器50释出第一位址30.0001,再逐一由头指标器50指向的位址取出串列的缓冲暂存器,最后头指标器50最后指向30.0006,类似地,缓冲控制装置20的编串动作系将第一个缓冲暂存器的连结节点直接指向该取出串列的最后一个缓冲暂存器位址30.0005,以及将最后一个缓冲暂存器的连结节点指回该取出串列的第二个缓冲暂存器位址30.0002。Please refer to FIG. 5 , which shows that five buffer registers are directly configured by the
倘若释回空间之时,缓冲控制装置20检查Cache_full信号发现快取记忆体52已储存额满,则缓冲暂存器管理方法的释回动作包含:将第一位址存入尾指标器51指向的缓冲暂存器的连结节点,并将第二位址存入第一缓冲暂存器的连结节点,再将最后位址存入尾指标器51,以使释回的区隔段以正常的串列结构编串于未使用串列的最末端。If when the space is released, the
本发明的此一较佳实施例不但节省记忆体空间去记录第二位址,亦可保有原硬体设计架构使得缓冲记忆体能有效率的使用。This preferred embodiment of the present invention not only saves memory space to record the second address, but also maintains the original hardware design structure so that the buffer memory can be used efficiently.
在本发明再一实施例中,利用本发明链结结构的区隔段可在释回动作时可以无须回报第二位址与最后位址,而仅回报用毕区隔段的第一位址,而缓冲控制装置20可由第一位址的第一缓冲暂存器的连结依序取得最后位址与第二位址,则缓冲控制装置20的释回动作包含:暂存第一位址的第一缓冲暂存器的连结节点获得的最后位址,再将第一位址存入快取记忆体;从最后位址的最后缓冲暂存器的连结节点获得第二位址以存入尾指标器51指向的缓冲暂存器的连结节点,再将最后位址存入尾指标器51。In yet another embodiment of the present invention, when the segment using the link structure of the present invention does not need to report the second address and the last address when releasing the action, only the first address of the used segment is reported. , and the
请参考图6,显示本发明链结结构的示意图。本发明链结结构系由第一缓冲器连结节点指向一循环链结的串列,该循环链结的串列系由第二缓冲器连结节点依序指向到最后缓冲器连结节点,再由最后缓冲器连结节点指回第二缓冲器连结节点,而第一缓冲器连结节点则指向最后缓冲器连结节点。本发明链结结构应用于前述封包交换控制器以储存封包的资料,使缓冲控制装置20在配合快取记忆体以存放使用区隔段的第一位址时,可从最后缓冲暂存器得知第二缓冲暂存器位址,而将串列的缓冲暂存器串回未使用串列的最末端。Please refer to FIG. 6 , which shows a schematic diagram of the link structure of the present invention. The link structure of the present invention points to a chain of circular links from the first buffer link node, and the series of circular links points to the last buffer link node sequentially from the second buffer link node, and then from the last The buffer link node points back to the second buffer link node, and the first buffer link node points to the last buffer link node. The link structure of the present invention is applied to the aforementioned packet switching controller to store packet data, so that when the
应注意到,先前的实施例较佳地系设置头、尾两个指标器,在硬体运作上可以避免动作与释回动作会抢用同一指标器的缺点;而应用前述本发明的被使用串列的链结结构,可以快速取得第一与最后一个位址;因此,若将硬体设计为只有一个头指标器,释回被使用串列的链结结构之时,则可将其同时编串回未使用串列的最前端,但是效能则会稍差。It should be noted that the previous embodiment is preferably provided with two indicators, the head and the tail, which can avoid the shortcoming of using the same indicator for the action and the release action in terms of hardware operation; The serial link structure can quickly obtain the first and last addresses; therefore, if the hardware is designed to have only one head pointer, when releasing the used serial link structure, it can be simultaneously Compile strings back to the front of unused strings, but performance will be slightly worse.
本发明的被使用的链结结构,举例来说,系将第一个缓冲暂存器30.0001的连结节点直接指向最后一个缓冲暂存器30.0010,接着最后一个缓冲暂存器30.0010的连结节点指回第二个缓冲暂存器30.0002后,再由该第二个缓冲暂存器30.0002依序指到最后一个缓冲暂存器30.0010,以使缓冲控制装置释回具有该链结串列结构的区隔段时,很快地由最后一个缓冲暂存器30.0010的连结节点而获得第二位址30.0002,可将第二个缓冲暂存器到最后一个缓冲暂存器一起串回于未使用串列,不必逐一释回。The link structure used in the present invention, for example, directs the link node of the first buffer register 30.0001 to the last buffer register 30.0010, and then the link node of the last buffer register 30.0010 points back After the second buffer register 30.0002, the second buffer register 30.0002 points to the last buffer register 30.0010 in sequence, so that the buffer control device releases the partition with the chained serial structure During the period, the second address 30.0002 is quickly obtained from the connection node of the last buffer register 30.0010, and the second buffer register and the last buffer register can be serially returned to the unused string, It is not necessary to release them one by one.
在详细说明本发明的较佳实施例的后,熟悉该项技术人士可清楚的了解,并在不脱离权利要求范围与精神下可进行各种变化与改变,而且本发明亦不受限于说明书的实施例的实施方式。虽然本发明将参阅较佳实施例的附图予以充份描述,但在此描述之前应了解熟悉本行的人士可修改在本文中所描述的发明,同时获致本发明的功效。因此,须了解以上的描述对熟悉本行技艺的人士而言为一广泛的揭示,且其内容不在于限制本发明。After describing the preferred embodiments of the present invention in detail, those skilled in the art can clearly understand that various changes and changes can be made without departing from the scope and spirit of the claims, and the present invention is not limited to the description The implementation of the example. While the present invention will be fully described with reference to the accompanying drawings of preferred embodiments, it should be understood that those skilled in the art may modify the invention described herein while still obtaining the benefits of the present invention. Therefore, it should be understood that the above description is a broad disclosure for those skilled in the art, and its content is not intended to limit the present invention.
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 02118604 CN1222883C (en) | 2002-04-25 | 2002-04-25 | Buffer control device and management method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 02118604 CN1222883C (en) | 2002-04-25 | 2002-04-25 | Buffer control device and management method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1375773A true CN1375773A (en) | 2002-10-23 |
CN1222883C CN1222883C (en) | 2005-10-12 |
Family
ID=4744641
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 02118604 Expired - Lifetime CN1222883C (en) | 2002-04-25 | 2002-04-25 | Buffer control device and management method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1222883C (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101662416B (en) * | 2008-08-25 | 2011-08-31 | 凌阳科技股份有限公司 | Processing method of multiple network packets |
US9301086B2 (en) | 2014-04-14 | 2016-03-29 | Microchip Technology Incorporated | Data transmission system and method for bluetooth interface |
US20210132945A1 (en) * | 2019-11-04 | 2021-05-06 | Apple Inc. | Chained Buffers In Neural Network Processor |
CN113345495A (en) * | 2020-03-02 | 2021-09-03 | 慧荣科技股份有限公司 | Server and related control method |
-
2002
- 2002-04-25 CN CN 02118604 patent/CN1222883C/en not_active Expired - Lifetime
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101662416B (en) * | 2008-08-25 | 2011-08-31 | 凌阳科技股份有限公司 | Processing method of multiple network packets |
US9301086B2 (en) | 2014-04-14 | 2016-03-29 | Microchip Technology Incorporated | Data transmission system and method for bluetooth interface |
US20210132945A1 (en) * | 2019-11-04 | 2021-05-06 | Apple Inc. | Chained Buffers In Neural Network Processor |
US11513799B2 (en) * | 2019-11-04 | 2022-11-29 | Apple Inc. | Chained buffers in neural network processor |
CN113345495A (en) * | 2020-03-02 | 2021-09-03 | 慧荣科技股份有限公司 | Server and related control method |
Also Published As
Publication number | Publication date |
---|---|
CN1222883C (en) | 2005-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8935507B2 (en) | System and method for storing multiple copies of data in a high speed memory system | |
US20090187681A1 (en) | Buffer controller and management method thereof | |
US7603496B2 (en) | Buffering data during data transfer through a plurality of channels | |
CN115168248B (en) | Cache memory supporting SIMT architecture and corresponding processor | |
US11023410B2 (en) | Instructions for performing multi-line memory accesses | |
US7668186B1 (en) | Token ecosystem for buffer management | |
CN108139882B (en) | Systems and methods for implementing hierarchical distributed linked lists for network devices | |
CN102437929A (en) | Method and device for de-queuing data in queue manager | |
US20060031565A1 (en) | High speed packet-buffering system | |
GB2451549A (en) | Buffering data packet segments in a data buffer addressed using pointers stored in a pointer memory | |
CN100557581C (en) | A Data Flow Oriented Cache Management Method | |
US7035988B1 (en) | Hardware implementation of an N-way dynamic linked list | |
CN100407171C (en) | Microprocessor and method for setting cache line fill bus access priority | |
CN1052562A (en) | Main memory board with single-bit set and reset | |
CN1375773A (en) | Buffer control device and management method thereof | |
JPH07121437A (en) | Computer system | |
KR102757653B1 (en) | Extended memory interface | |
CN100336038C (en) | Computer system embedding sequential buffers therein for improving the performance of a digital signal processing data access operation and a method thereof | |
US10664396B2 (en) | Systems, methods and apparatus for fabric delta merge operations to enhance NVMeoF stream writes | |
CN117055811A (en) | Bus access command processing method, device, chip and storage medium | |
US7870342B2 (en) | Line cache controller with lookahead | |
CN115934004A (en) | Queue management circuit, method, storage device and electronic equipment in the form of linked list | |
CN100508497C (en) | Network processor-based flow-related control information cache memory | |
CN115905038A (en) | Cache data reading method, device, computer equipment and storage medium | |
CN108139767B (en) | System and method for implementing distributed linked lists for network devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CX01 | Expiry of patent term | ||
CX01 | Expiry of patent term |
Granted publication date: 20051012 |