[go: up one dir, main page]

CN104125164B - Active output buffer controller and method thereof - Google Patents

Active output buffer controller and method thereof Download PDF

Info

Publication number
CN104125164B
CN104125164B CN201410175622.8A CN201410175622A CN104125164B CN 104125164 B CN104125164 B CN 104125164B CN 201410175622 A CN201410175622 A CN 201410175622A CN 104125164 B CN104125164 B CN 104125164B
Authority
CN
China
Prior art keywords
credit value
buffer
packet
output
packet data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201410175622.8A
Other languages
Chinese (zh)
Other versions
CN104125164A (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.)
MediaTek Inc
Original Assignee
MediaTek Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US14/230,005 external-priority patent/US20140321473A1/en
Application filed by MediaTek Inc filed Critical MediaTek Inc
Publication of CN104125164A publication Critical patent/CN104125164A/en
Application granted granted Critical
Publication of CN104125164B publication Critical patent/CN104125164B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提供一种主动输出缓冲控制器及其方法。该主动输出缓冲控制器用于控制网络装置中的主要缓冲器的封包数据输出,该主动输出缓冲控制器包含信用评估电路以及控制逻辑。该信用评估电路基于该网络装置的入口数据接收状态和该网络装置的出口数据传送状态中的至少一个来估计信用值。该控制逻辑比较该信用值与第一预定临界值,以产生比较结果,以及至少依据该比较结果来控制该主要缓冲器的该封包数据输出。本发明所提供的主动输出缓冲控制器及其方法,可避免发生先进先出溢出的状况。

The present invention provides an active output buffer controller and a method thereof. The active output buffer controller is used to control the packet data output of the main buffer in a network device, and the active output buffer controller includes a credit evaluation circuit and a control logic. The credit evaluation circuit estimates a credit value based on at least one of the inlet data receiving state of the network device and the outlet data transmitting state of the network device. The control logic compares the credit value with a first predetermined threshold value to generate a comparison result, and controls the packet data output of the main buffer at least according to the comparison result. The active output buffer controller and the method thereof provided by the present invention can avoid the occurrence of a first-in-first-out overflow.

Description

主动输出缓冲控制器及其方法Active output buffer controller and method thereof

技术领域technical field

本发明是有关于一种主动输出缓冲控制器及其方法,特别是有关于一种主动控制网络装置中的主要缓冲器的封包数据输出的主动输出缓冲控制器及其方法。The present invention relates to an active output buffer controller and its method, in particular to an active output buffer controller and its method for actively controlling the packet data output of a main buffer in a network device.

背景技术Background technique

网络交换机为计算机网络装置,可用于连接不同电子装置。举例来说,网络交换机接收由其所连接的来源电子装置所产生的输入封包,并且只将依据接收封包所产生的输出封包传送至一个或是一个以上由接收封包所指定的目的电子装置。一般来说,网络交换机具有主要缓冲器(即封包缓冲器)以缓冲由入端口所接收到的封包的封包数据,并且通过出端口来将主要缓冲器中所储存的封包转发出去。A network switch is a computer network device that can be used to connect different electronic devices. For example, a network switch receives input packets generated by a source electronic device connected to it, and only transmits output packets generated according to the received packets to one or more destination electronic devices specified by the received packets. Generally, a network switch has a main buffer (ie, a packet buffer) for buffering packet data of packets received by an ingress port, and forwards the packets stored in the main buffer through an egress port.

当准备将主要缓冲器中的封包转发至出端口时,封包数据会经过出口管线(egress pipeline)从主要缓冲器载出至媒体存取控制(media access control,MAC)层装置中的先进先出(first-in first-out,FIFO)缓冲器,然后输出至物理层装置。现有的媒体存取控制层装置需要较大尺寸的先进先出缓冲器以防止数据满溢的状况,造成芯片尺寸以及成本的上升。此外,为了防止先进先出满溢,媒体存取控制层装置会将反压机制(backpressure mechanism)应用在主要缓冲控制器来暂停从主要缓冲器载出封包数据到媒体存取控制层装置的先进先出缓冲器。在当媒体存取控制层装置的先进先出缓冲器达到临界值时启动反压机制。不过启动反压机制到反压程序开始中间会有一段时间差。而且,在反压机制暂停从主要缓冲器输出封包数据后,仍会有部分出口管线中的数据进入媒体存取控制层装置的先进先出缓冲器。因此,即使使用反压机制仍然有可能会发生先进先出缓冲器满溢的状况。When the packet in the main buffer is ready to be forwarded to the egress port, the packet data will be loaded out from the main buffer through the egress pipeline to the FIFO in the media access control (media access control (MAC) layer device) (first-in first-out, FIFO) buffer, and then output to the physical layer device. Existing media access control layer devices require a larger FIFO buffer to prevent data overflow, resulting in an increase in chip size and cost. In addition, in order to prevent FIFO overflow, the MAC layer device will apply a backpressure mechanism to the main buffer controller to suspend the flow of packet data from the main buffer to the MAC layer device. First out buffer. The back pressure mechanism is activated when the FIFO buffer of the MAC layer device reaches a critical value. However, there will be a time gap between starting the back pressure mechanism and starting the back pressure program. Moreover, after the back pressure mechanism suspends outputting packet data from the main buffer, some data in the egress pipeline will still enter the FIFO buffer of the MAC layer device. Therefore, it is still possible to overflow the FIFO buffer even with the back pressure mechanism.

发明内容Contents of the invention

本发明是有关于一种主动输出缓冲控制器及其方法。The invention relates to an active output buffer controller and its method.

根据本发明第一实施方式,提供一种主动输出缓冲控制器,用于控制网络装置中的主要缓冲器的封包数据输出,该主动输出缓冲控制器包含有信用评估电路以及控制逻辑。该信用评估电路基于该网络装置的入口数据接收状态和该网络装置的出口数据传送状态中的至少一个来估计信用值。该控制逻辑比较该信用值与第一预定临界值,以产生比较结果,以及至少依据该比较结果来控制该主要缓冲器的该封包数据输出。According to the first embodiment of the present invention, an active output buffer controller is provided for controlling the packet data output of a main buffer in a network device, the active output buffer controller includes a credit evaluation circuit and a control logic. The credit evaluation circuit estimates a credit value based on at least one of an ingress data reception status of the network device and an egress data transmission status of the network device. The control logic compares the credit value with a first predetermined threshold to generate a comparison result, and controls the packet data output of the main buffer at least according to the comparison result.

根据本发明第二实施方式,提供一种控制主要缓冲器的封包数据输出的方法。该主要缓冲器位于网络装置中,该控制主要缓冲器的封包数据输出的方法包含有:基于该网络装置的入口数据接收状态和该网络装置的出口数据传送状态的至少一个来估计信用值;以及比较该信用值与第一预定临界值,以产生比较结果;以及至少依据该比较结果来控制该主要缓冲器的该封包数据输出。According to a second embodiment of the present invention, a method for controlling packet data output of a primary buffer is provided. The primary buffer is located in a network device, and the method of controlling packet data output of the primary buffer includes: estimating a credit value based on at least one of an ingress data receiving status of the network device and an egress data transmission status of the network device; and comparing the credit value with a first predetermined threshold to generate a comparison result; and controlling the packet data output of the main buffer at least according to the comparison result.

本发明所提出的主动输出缓冲控制器及其方法,可避免发生先进先出溢出(overflow)的状况。The active output buffer controller and method thereof proposed by the present invention can avoid the occurrence of FIFO overflow.

附图说明Description of drawings

图1为根据本发明实施方式的使用主动输出缓冲器控制机制的网络装置的示意图。FIG. 1 is a schematic diagram of a network device using an active output buffer control mechanism according to an embodiment of the present invention.

图2为图1所示的主动输出缓冲控制器的实施方式的示意图。FIG. 2 is a schematic diagram of an embodiment of the active output buffer controller shown in FIG. 1 .

图3为根据本发明实施方式的反压事件所触发的校正操作的示意图。FIG. 3 is a schematic diagram of corrective operations triggered by a backpressure event according to an embodiment of the present invention.

图4为根据本发明实施方式的偏差事件所触发的校正操作的示意图。FIG. 4 is a schematic diagram of a correction operation triggered by a deviation event according to an embodiment of the present invention.

图5为根据本发明实施方式的时间已到事件所触发的校正操作的示意图。FIG. 5 is a schematic diagram of a correction operation triggered by a time-up event according to an embodiment of the present invention.

图6为根据本发明实施方式的控制网络装置中的主要缓冲器的封包数据输出的方法的流程图。FIG. 6 is a flow chart of a method for controlling packet data output of a primary buffer in a network device according to an embodiment of the present invention.

具体实施方式detailed description

在说明书及前述的权利要求当中使用了某些词汇来指称特定的元件。所属领域中普通技术人员应可理解,硬件制造商可能会用不同的名词来称呼同一个元件。本说明书及前述的权利要求并不以名称的差异来作为区分元件的方式,而是以元件在功能上的差异来作为区分的准则。在通篇说明书及前述的权利要求当中所提及的“包含”为一开放式的用语,故应解释成“包含但不限定于”。以外,“耦接”一词在此包含任何直接及间接的电气连接手段。因此,若文中描述第一装置耦接于第二装置,则代表该第一装置可直接电气连接于该第二装置,或通过其它装置或连接手段间接地电气连接至该第二装置。Certain terms are used throughout the specification and preceding claims to refer to particular elements. Those of ordinary skill in the art should understand that hardware manufacturers may use different terms to refer to the same component. The description and the preceding claims do not use the difference in name as a way to distinguish components, but use the difference in function of components as a criterion for distinguishing. "Includes" mentioned throughout the specification and the preceding claims is an open-ended term, so it should be interpreted as "including but not limited to". Otherwise, the term "coupled" includes any direct and indirect means of electrical connection. Therefore, if it is described that a first device is coupled to a second device, it means that the first device may be directly electrically connected to the second device, or indirectly electrically connected to the second device through other devices or connection means.

本发明的技术特征在于通过预测媒体存取控制(media access control,MAC)层装置的先进先出(first-in first-out,FIFO)缓冲器的数据储存状态,来主动地控制网络装置中的主要缓冲器(例如网络交换机/集线器中的封包缓冲器)的封包数据输出。这样一来,便可通过所提出的主动输出缓冲器控制机制来事先预测并且避免发生先进先出溢出(overflow)的状况。较佳地,所提出的主动输出缓冲器控制机制可以和现有的反压机制(back pressure mechanism)结合来为媒体存取控制层装置提供更佳的先进先出溢出防止方法。此外,可以采用校正机制来让所评估出的信用值(即媒体存取控制层装置的先进先出缓冲器的预测数据储存状态)与媒体存取控制层装置的先进先出缓冲器的实际数据储存状态彼此同步。有关于所提出的主动输出缓冲器控制机制的进一步细节将详述如下。The technical feature of the present invention is to actively control the data storage status of the first-in-first-out (FIFO) buffer of the media access control (media access control, MAC) layer device, and actively control the network device. Packet data output from primary buffers such as packet buffers in network switches/hubs. In this way, the FIFO overflow situation can be predicted in advance and avoided by the proposed active output buffer control mechanism. Preferably, the proposed active output buffer control mechanism can be combined with the existing back pressure mechanism to provide a better FIFO overflow prevention method for the MAC layer device. In addition, a calibration mechanism can be used to align the estimated credit value (i.e. the predicted data storage status of the FIFO of the MAC layer device) with the actual data of the FIFO buffer of the MAC layer device Stored states are synchronized with each other. Further details about the proposed active output buffer control mechanism are detailed below.

图1为根据本发明实施方式的使用主动输出缓冲器控制机制的网络装置的示意图。在此实施例中,网络装置100为交换机/集线器,包含有主要缓冲器(例如封包缓冲器)102、主要缓冲控制器104、出口管线(egress pipeline)106、具有先进先出缓冲器107的媒体存取控制层装置108、物理层装置110以及主动输出缓冲控制器112。出口管线106、媒体存取控制层装置108以及物理层装置110用于仅通过出端口来转发封包。主要缓冲器102可以通过入口管线(图未示)来接收入口封包,以及储存在主要缓冲器102中可取得的多个可用储存空间中的每一个入口封包的封包信元(cell)103。在标准模式下,将封包信元当作主要缓冲器102在每一个时钟周期中所输出的基本单元。也就是说,若主要缓冲器102的封包数据输出在经过出端口转发封包时,未暂停动作以避免遭遇先进先出满溢的状况,则主要缓冲控制器104会控制主要缓冲器102在每一时钟周期输出封包信元至出口管线106。出口管线106耦接于主要缓冲器102以及先进先出缓冲器107之间。因此,即便主要缓冲器102停下其经过出端口转发封包的封包数据输出动作,出口管线106仍有可能残留封包信元在其中,而这些封包信元将会被依序地输出至先进先出缓冲器107。物理层装置110耦接于出端口以及媒体存取控制层装置108之间,用于将先进先出缓冲器107中的封包信元输出至出端口。FIG. 1 is a schematic diagram of a network device using an active output buffer control mechanism according to an embodiment of the present invention. In this embodiment, the network device 100 is a switch/hub, including a main buffer (such as a packet buffer) 102, a main buffer controller 104, an egress pipeline 106, a media with a first-in-first-out buffer 107 The access control layer device 108 , the physical layer device 110 and the active output buffer controller 112 . The egress pipeline 106, the MAC layer device 108, and the physical layer device 110 are used to forward packets only through the egress port. The main buffer 102 can receive ingress packets through an ingress pipeline (not shown), and store a packet cell 103 for each ingress packet in a plurality of available storage spaces available in the main buffer 102 . In the standard mode, the packet cell is regarded as the basic unit output by the main buffer 102 in each clock cycle. That is to say, if the packet data output of the main buffer 102 does not suspend the action to avoid encountering the situation of first-in first-out overflow when the packet data is forwarded through the egress port, the main buffer controller 104 will control the main buffer 102 in each The clock cycle outputs the packet cells to the egress pipeline 106 . The outlet pipeline 106 is coupled between the main buffer 102 and the FIFO buffer 107 . Therefore, even if the main buffer 102 stops its packet data output action of forwarding packets through the egress port, the egress pipeline 106 may still have packet cells in it, and these packet cells will be sequentially output to the first-in-first-out Buffer 107. The physical layer device 110 is coupled between the egress port and the MAC layer device 108 for outputting the packet cells in the FIFO buffer 107 to the egress port.

在此实施例中,主动输出缓冲控制器112是外部耦接至主要缓冲控制器104的独立引擎,因此提供外部控制信号S_C至主要缓冲控制器104以通过指示主要缓冲控制器104来主动地控制主要缓冲器102的封包数据输出。然而以上仅供说明用途,并非用于限制本发明。在其他变化设计中,可以将主动输出缓冲控制器112整合至主要缓冲控制器104以构成主要缓冲控制器104的嵌入式功能,并因此提供控制信号来主动地控制主要缓冲器102的封包数据输出。在另一个变化设计中,可以将主动输出缓冲控制器112和不同于主动输出缓冲控制器112的电路组件(例如出口管线106或媒体存取控制层装置108)整合在一起,并因此提供外部控制信号S_C至主要缓冲控制器104,以通过指示主要缓冲控制器104来主动地控制主要缓冲器102的封包数据输出。简而言之,只要是为了达到相同的目的,即主动地控制主要缓冲器的有关于通过出端口来进行封包转发的封包数据输出动作,所提出的主动输出缓冲器控制机制可以实现于网络装置100中的任何地方,且都属于本发明的权利范围。In this embodiment, the active output buffer controller 112 is an independent engine externally coupled to the main buffer controller 104, thus providing an external control signal S_C to the main buffer controller 104 to actively control by instructing the main buffer controller 104 Packet data output from main buffer 102 . However, the above is for illustrative purposes only, and is not intended to limit the present invention. In other variant designs, the active output buffer controller 112 can be integrated into the main buffer controller 104 to form an embedded function of the main buffer controller 104, and thus provide control signals to actively control the packet data output of the main buffer 102 . In another design variation, the active output buffer controller 112 may be integrated with circuit components other than the active output buffer controller 112 (such as the egress pipeline 106 or the MAC layer device 108) and thus provide external control The signal S_C is sent to the main buffer controller 104 to actively control the packet data output of the main buffer 102 by instructing the main buffer controller 104 . In short, the proposed active output buffer control mechanism can be implemented in network devices as long as the purpose is to achieve the same purpose, that is, to actively control the packet data output action of the main buffer related to packet forwarding through the egress port. 100, and all belong to the scope of rights of the present invention.

如图1所示,主动输出缓冲控制器112包含有但不限定于信用评估电路122、控制逻辑124以及校正电路126。信用评估电路122为主动输出缓冲控制器112的核心电路,并且用于预测媒体存取控制层装置108中的先进先出缓冲器107的数据储存状态。举例来说,主动输出缓冲控制器112(例如,信用评估电路122)可以基于网络装置100的入口数据接收状态S1以及网络装置100的出口数据传送状态S2中的至少一个来估计信用值SUM。根据本发明的另一实施方式,主动输出缓冲控制器112(例如,信用评估电路122)可以基于实现规格S3,以及网络装置100的入口数据接收状态S1和网络装置100的出口数据传送状态S2中的至少一个来估计信用值SUM。As shown in FIG. 1 , the active output buffer controller 112 includes but is not limited to a credit evaluation circuit 122 , a control logic 124 and a correction circuit 126 . The credit evaluation circuit 122 is the core circuit of the active output buffer controller 112 and is used for predicting the data storage status of the FIFO buffer 107 in the MAC layer device 108 . For example, the active output buffer controller 112 (eg, the credit evaluation circuit 122 ) can estimate the credit value SUM based on at least one of the ingress data receiving state S1 of the network device 100 and the egress data transmission state S2 of the network device 100 . According to another embodiment of the present invention, the active output buffer controller 112 (for example, the credit evaluation circuit 122) may be based on the implementation specification S3, and the ingress data receiving state S1 of the network device 100 and the egress data transmission state S2 of the network device 100 At least one of the credit value SUM is estimated.

举例来说,但本发明不以此为限。实现规格S3包含有封包信元尺寸、媒体存取控制层装置108的操作频率、以及出端口的分时多任务(time-division multiplexing,TDM)周期中的至少一个。更具体地说,封包信元尺寸表示在时钟周期内从主要缓冲器102输出的每一封包信元中的字符/位的数目。出端口的分时多任务周期决定了两个连续的分时多任务时隙之间的时钟周期数,其中在每一个分时多任务时隙中进行了从主要缓冲器102到出口管线106的封包数据传输。媒体存取控制层装置108的操作频率决定了分时多任务周期内的出口量(egress)。除上述提到的参数之外,实现规格S3也可包含其他参数。For example, but the present invention is not limited thereto. The implementation specification S3 includes at least one of the packet cell size, the operating frequency of the MAC layer device 108 , and the time-division multiplexing (TDM) period of the egress port. More specifically, the packet cell size represents the number of characters/bits in each packet cell output from the main buffer 102 within a clock cycle. The TDM cycle of the egress port determines the number of clock cycles between two consecutive TDM slots in which a transfer from the main buffer 102 to the egress pipeline 106 is performed. Packet data transfer. The operating frequency of the MAC layer device 108 determines the egress in the TDM cycle. In addition to the parameters mentioned above, the implementation specification S3 may also contain other parameters.

举例来说,但不以此为限。入口数据接收状态S1可以包含有入口数据传入率、入口封包转发方法、以及入口管线深度中的至少一个。更具体地说,入口数据传入率表示每一时钟周期中网络装置100可以收到多少入口封包字符/位。入口封包转发方法则定义了如何去控制封包转发。举例来说,可以视实际上应用的考虑来采用存转式(store-and-forward,SF)方式或是直通式(cut-through,CT)方式来转发入口封包。入口管线深度会指定入口管线能够容纳的入口封包信元的最大数量。除上述提到的参数之外,入口数据接收状态S1也可包含其他参数。By way of example, but not limitation. The ingress data receiving state S1 may include at least one of ingress data incoming rate, ingress packet forwarding method, and ingress pipeline depth. More specifically, the ingress data rate indicates how many ingress packet characters/bits the network device 100 can receive in each clock cycle. The ingress packet forwarding method defines how to control packet forwarding. For example, a store-and-forward (SF) method or a cut-through (CT) method may be used to forward the ingress packet depending on practical considerations. The ingress pipeline depth specifies the maximum number of ingress packet cells that the ingress pipeline can hold. In addition to the parameters mentioned above, the entry data receiving state S1 may also contain other parameters.

举例来说,但不以此为限。出口数据传送状态S2可以包含有出口管线深度、媒体存取控制层装置108的先进先出尺寸、物理层装置110的传送率、以及出口封包尺寸变更信息中的至少一个。更具体地说,出口管线深度会指定出口管线106能够容纳的出口封包信元的最大数量。媒体存取控制层装置108的先进先出尺寸指定先进先出缓冲器107所能承受的出口封包信元最大数量。物理层装置110的传送率表示每一个时钟周期多少出口封包字符/位被物理层装置110发送出去。出口封包尺寸变更信息定义了当出口封包数据从主要缓冲器102送到物理层装置110时,加入至出口封包数据的额外信息的尺寸;及/或当出口封包数据从主要缓冲器102送到物理层装置110时,从出口封包数据移除的辅助信息的尺寸。除上述提到的参数之外,出口数据传送状态S2也可包含其他参数。By way of example, but not limitation. The egress data transmission state S2 may include at least one of egress pipeline depth, FIFO size of the MAC layer device 108 , transmission rate of the physical layer device 110 , and egress packet size change information. More specifically, the egress pipeline depth specifies the maximum number of egress packet cells that can be accommodated by the egress pipeline 106 . The FIFO size of the MAC layer device 108 specifies the maximum number of egress packet cells that the FIFO buffer 107 can hold. The transmission rate of the physical layer device 110 indicates how many egress packet characters/bits are sent by the physical layer device 110 per clock cycle. The egress packet size change information defines the size of the additional information added to the egress packet data when the egress packet data is sent from the main buffer 102 to the physical layer device 110; and/or when the egress packet data is sent from the main buffer 102 to the physical layer device 110; Size of auxiliary information removed from egress packet data when layer device 110 is used. In addition to the parameters mentioned above, the egress data transfer state S2 may also contain other parameters.

所估计出的信用值SUM表示媒体存取控制层装置108中的先进先出缓冲器107的预测的数据储存状态。在示范性设计中,信用值SUM可以为先进先出缓冲器107中的预测的封包数目。在另一个示范性设计中,信用值SUM可以为先进先出缓冲器107中的预测的字符、半字符或1/4字符的数目。另外,针对媒体存取控制层装置108所进行的不同操作,信用值SUM可以对应不同的权重。举例来说,媒体存取控制层装置108在多播操作下会复制包装(packer)/封包信元,因此,在当前媒体存取控制层装置108的操作下,调整信用值SUM以反映实际的先进先出缓冲器的使用状况。The estimated credit value SUM represents the predicted data storage status of the FIFO buffer 107 in the MAC layer device 108 . In an exemplary design, the credit value SUM may be the predicted number of packets in the FIFO buffer 107 . In another exemplary design, the credit value SUM may be the number of predicted characters, half characters or 1/4 characters in the FIFO buffer 107 . In addition, for different operations performed by the MAC layer device 108, the credit value SUM may correspond to different weights. For example, the MAC layer device 108 will duplicate the packing (packer)/package cell under the multicast operation, therefore, under the operation of the current MAC layer device 108, adjust the credit value SUM to reflect the actual The usage status of the FIFO buffer.

控制逻辑124用于对信用值SUM和预定临界值TH1进行比较,以产生比较结果CR,以及设定控制信号S_C来至少依据比较结果CR来控制主要缓冲器102的封包数据输出。举例来说,当比较结果CR指示信用值SUM达到预定临界值TH1时,控制逻辑124会判断先进先出缓冲器107中的可用空间已无法满足最小安全幅度,并可能会发生先进先出满溢的状况。因此,控制逻辑124会使得控制信号S_C生效(assert)(例如控制信号S_C=1),来控制主要缓冲控制器104暂停主要缓冲器102的封包数据输出。在主要缓冲器102的封包数据输出被暂停后,先进先出缓冲器107会通过将所储存的封包数据输出至次级电路(即物理层装置110)来慢慢释放出占用的空间,并且相应地更新信用值SUM。当信用值SUM降至较低水平(level)时,控制逻辑124会判断先进先出缓冲器107已经摆脱不需要的内存满溢的威胁。接着,控制逻辑124无效(deassert)控制信号S_C(例如控制信号S_C=0)来控制主要缓冲控制器104重新开始主要缓冲器102的封包数据输出,以允许新的封包信元数据通过出端口来转发出去。The control logic 124 is used for comparing the credit value SUM with a predetermined threshold TH1 to generate a comparison result CR, and setting the control signal S_C to control the packet data output of the main buffer 102 at least according to the comparison result CR. For example, when the comparison result CR indicates that the credit value SUM reaches the predetermined critical value TH1, the control logic 124 will judge that the available space in the FIFO buffer 107 cannot meet the minimum safety margin, and FIFO overflow may occur status. Therefore, the control logic 124 will enable the control signal S_C (assert) (for example, the control signal S_C=1) to control the main buffer controller 104 to suspend the packet data output of the main buffer 102 . After the packet data output of the main buffer 102 is suspended, the first-in-first-out buffer 107 will slowly release the occupied space by outputting the stored packet data to the secondary circuit (i.e., the physical layer device 110), and correspondingly Update the credit value SUM accordingly. When the credit value SUM drops to a lower level, the control logic 124 will determine that the FIFO buffer 107 has escaped the threat of unnecessary memory overflow. Then, the control logic 124 deasserts the control signal S_C (for example, the control signal S_C=0) to control the main buffer controller 104 to restart the packet data output of the main buffer 102, so as to allow new packet cell data to come through the output port. Forward it.

请参考图2,图2为图1所示的主动输出缓冲控制器112的实施方式的示意图。上述入口数据接收状态S1、出口数据传送状态S2以及实现规格S3等参数在此和从最后分时多任务时隙所得出的信用值相结合。应注意的是,基于参数的定义,一个或多个参数可以应用从最后时分多任务时隙所得的信用值的增量(increment),及/或一个或多个参数可以应用从最后时分多任务时隙所得的信用值的减量(decrement)。控制逻辑124会检查最终得到的信用值SUM来设定控制信号S_C。Please refer to FIG. 2 , which is a schematic diagram of an embodiment of the active output buffer controller 112 shown in FIG. 1 . The aforementioned parameters such as the ingress data receiving state S1, the egress data transmission state S2, and the implementation specification S3 are combined with the credit value obtained from the last TDM time slot. It should be noted that, based on the definition of the parameters, one or more parameters can apply the increment (increment) of the credit value obtained from the last TDM time slot, and/or one or more parameters can apply the increment (increment) from the last TDM time slot. The decrement of the credit value obtained by the time slot. The control logic 124 checks the finally obtained credit value SUM to set the control signal S_C.

当信用值SUM并未超过安全幅度时,封包信元数据字符计数会更新信用值SUM,然后将信用值SUM存回到端口记录来作为从最后分时多任务时隙所得到的信用值。然而,当信用值SUM超过安全幅度时(或是若媒体存取控制层装置采用反压机制,且反压事件发生时),封包信元数据字符计数便不会更新信用值SUM,而是直接将信用值SUM存回到端口记录来作为从最后分时多任务时隙所得到的信用值。When the credit value SUM does not exceed the safety range, the packet cell data character count will update the credit value SUM, and then store the credit value SUM back to the port record as the credit value obtained from the last TDM time slot. However, when the credit value SUM exceeds the security range (or if the MAC layer device adopts the back pressure mechanism and a back pressure event occurs), the packet cell data character count will not update the credit value SUM, but directly Store the credit SUM back to the port record as the credit obtained from the last TDM slot.

除此之外,对于封包的结尾(end of a packet,EOP)来说,媒体存取控制层装置108可以将额外的字符附加在封包来将封包与下一封包隔开;以及对于封包的开头(startof a packet,SOP)来说,由于辅助字符仅用于提供媒体存取控制层装置108辅助信息,并不会通过出端口来被转发至目的电子装置,因此媒体存取控制层装置108可以将辅助字符从封包的表头移除。因此,用于当前分时多任务时隙的封包信元数据字符计数可以依据以上的细节来进行适当的调整。In addition, for the end of a packet (end of a packet, EOP), the media access control layer device 108 can attach additional characters to the packet to separate the packet from the next packet; and for the beginning of the packet (start of a packet, SOP), since the auxiliary character is only used to provide the auxiliary information of the media access control layer device 108, and will not be forwarded to the destination electronic device through the output port, the media access control layer device 108 can Remove auxiliary characters from the header of the packet. Therefore, the packet cell data character count for the current TDM slot can be properly adjusted according to the above details.

如上所述,当比较结果CR显示信用值SUM达到预定临界值TH1时,控制逻辑124会生效控制信号S_C来指示主要缓冲控制器104暂停主要缓冲器102的封包数据输出,因此使新进封包无法进入出口管线106并通过出端口而转发。相较于在欲转发的封包的边界暂停主要缓冲器102的封包数据输出,控制逻辑124会控制主要缓冲器102的封包数据输出暂停在欲转发的封包中的封包信元的边界。也就是说,相较于当封包数据输出被暂停时禁止封包部分输出至出口管线106,在当封包数据输出被暂停时,允许主要缓冲器102输出封包中的一个或是多个封包信元至出口管线106。这样一来,出口管线以及先进先出缓冲器便能够被更有效地运用以提供较佳的出口吞吐量。在出口管线以及先进先出缓冲器支持较高的精细度的情况下,当比较结果CR显示信用值SUM达到预定临界值TH1时,控制逻辑124会控制主要缓冲器102的封包数据输出暂停在欲转发的封包中的封包信元的一部分的边界上。此外,当比较结果CR显示信用值SUM未达到第一预定临界值TH1时,控制逻辑124进一步通过检查媒体存取控制层装置108是否使得反压信号S_BP生效来产生检查结果,以及依据检查结果来控制主要缓冲器104的封包数据输出。As mentioned above, when the comparison result CR shows that the credit value SUM reaches the predetermined threshold value TH1, the control logic 124 will activate the control signal S_C to instruct the main buffer controller 104 to suspend the packet data output of the main buffer 102, so that new incoming packets cannot Enters the outlet line 106 and forwards through the outlet port. Rather than suspending the packet data output of the main buffer 102 at the boundary of the packet to be forwarded, the control logic 124 controls the packet data output of the main buffer 102 to suspend at the boundary of the packet cell in the packet to be forwarded. That is, when packet data output is paused, the main buffer 102 is allowed to output one or more packet cells in the packet to Outlet line 106. In this way, the egress pipeline and FIFO buffer can be used more efficiently to provide better egress throughput. In the case that the output pipeline and the FIFO buffer support higher granularity, when the comparison result CR shows that the credit value SUM reaches a predetermined critical value TH1, the control logic 124 will control the packet data output of the main buffer 102 to suspend at the desired level. On the boundary of a part of the packet cell in the forwarded packet. In addition, when the comparison result CR shows that the credit value SUM has not reached the first predetermined threshold TH1, the control logic 124 further generates a check result by checking whether the MAC layer device 108 makes the back pressure signal S_BP effective, and according to the check result, Control the packet data output of the main buffer 104 .

如上所述,信用值SUM通过预测媒体存取控制层装置108中的先进先出缓冲器107的数据储存状态来得到,因此,指示预测媒体存取控制层装置108中的先进先出缓冲器107的预测的数据储存状态的信用值SUM有可能会偏离媒体存取控制层装置108中的先进先出缓冲器107的实际数据储存状态。在最糟的情况下,当先进先出缓冲器107几乎要装满数据时,信用值SUM有可能还远低于预定临界值TH1。为了避免这样的状况,通过媒体存取控制层装置108采用反压机制来监控媒体存取控制层装置108中的先进先出缓冲器107的实际数据储存状态,并且在当先进先出缓冲器107中存储的数据实际数目达到预定临界值THBP时,生效反压信号S_BP。因此当控制逻辑124认为信用值SUM并未达到预定临界值TH1时,控制逻辑124还会进一步确认媒体存取控制层装置108是否使得反压信号S_BP生效(assert)。当信用值SUM显示未达到预定临界值TH1,但反压信号S_BP生效(assert)时,控制信号S_C仍会控制主要缓冲控制器104来暂停主要缓冲器102的封包数据输出。As mentioned above, the credit value SUM is obtained by predicting the data storage state of the first-in-first-out buffer 107 in the MAC layer device 108. The credit value SUM of the predicted data storage status may deviate from the actual data storage status of the FIFO buffer 107 in the MAC layer device 108 . In the worst case, when the FIFO buffer 107 is almost full of data, the credit value SUM may be much lower than the predetermined threshold value TH1. In order to avoid such a situation, the media access control layer device 108 adopts a back pressure mechanism to monitor the actual data storage status of the first-in first-out buffer 107 in the media access control layer device 108, and when the first-in first-out buffer 107 When the actual number of data stored in reaches a predetermined threshold TH BP , the back pressure signal S_BP becomes effective. Therefore, when the control logic 124 considers that the credit value SUM has not reached the predetermined threshold TH1, the control logic 124 further confirms whether the MAC layer device 108 asserts the back pressure signal S_BP. When the credit value SUM shows that the predetermined threshold value TH1 is not reached, but the back pressure signal S_BP is asserted, the control signal S_C still controls the main buffer controller 104 to suspend the packet data output of the main buffer 102 .

较佳地,本发明另提出校正机制来避免/减轻信用值SUM被错估时所造成的问题。具体来说,当特定事件TRG被触发时,校正电路126会基于媒体存取控制层装置108中的先进先出缓冲器107的数据的实际数目来校正信用值SUM。举例来说,校正电路126会通过同步信用值SUM与先进先出缓冲器107的实际的数据量来校正信用值SUM。也就是利用先进先出缓冲器107中的实际数据量来重新调整信用值SUM。以下将提供本发明的校正机制的若干实施例。Preferably, the present invention further proposes a correction mechanism to avoid/relieve problems caused by misestimation of the credit value SUM. Specifically, when the specific event TRG is triggered, the correction circuit 126 corrects the credit value SUM based on the actual number of data in the FIFO buffer 107 in the MAC layer device 108 . For example, the correction circuit 126 corrects the credit value SUM by synchronizing the credit value SUM with the actual data amount of the FIFO buffer 107 . That is, the actual data volume in the FIFO buffer 107 is used to readjust the credit value SUM. Several embodiments of the correction mechanism of the present invention are provided below.

在第一示范性校正设计中,校正电路126校正信用值SUM以响应媒体存取控制层装置108所生效的反压信号S_BP。换句话说,特定事件TRG是媒体存取控制层装置108启动反压机制以避免先进先出缓冲器满溢时所触发的反压事件。请参考图3,图3为根据本发明实施方式的反压事件所触发的校正操作的示意图。特征曲线CV1用于表示媒体存取控制层装置108中的先进先出缓冲器107的实际数据量,而特征曲线CV2用于表示主动输出缓冲控制器112所估测并记录的信用值SUM。由于所提出的主动缓冲器控制机制对于先进先出满溢评估有更严谨的态度(即所提出的主动缓冲器控制机制倾向于低估信用值),因此会导致所估计出的信用值SUM和媒体存取控制层装置108中的先进先出缓冲器107的实际数据量之间不匹配。在此实施例中,信用值SUM以较缓慢的速度来累积,先进先出缓冲器107的实际数据量以较快的速度来累积。如此一来反压事件可能会在信用值SUM达到预定临界值TH1之前就被触发。如图3所示,在时间T1时,先进先出缓冲器107的数据量到达预定临界值THBP。因此,媒体存取控制层装置108会生效反压信号S_BP,以使得校正电路126会被特定事件(即反压事件)TRG所触发。In a first exemplary correction design, the correction circuit 126 corrects the credit value SUM in response to the backpressure signal S_BP asserted by the MAC layer device 108 . In other words, the specific event TRG is a back pressure event triggered when the MAC layer device 108 activates the back pressure mechanism to prevent the FIFO buffer from overflowing. Please refer to FIG. 3 , which is a schematic diagram of a calibration operation triggered by a back pressure event according to an embodiment of the present invention. The characteristic curve CV1 is used to represent the actual data volume of the FIFO buffer 107 in the MAC layer device 108 , and the characteristic curve CV2 is used to represent the credit value SUM estimated and recorded by the active output buffer controller 112 . Since the proposed active buffer control mechanism has a more rigorous attitude towards FIFO overflow evaluation (that is, the proposed active buffer control mechanism tends to underestimate the credit value), it will lead to the estimated credit value SUM and the media There is a mismatch between the actual data volumes of the FIFO buffer 107 in the access control layer device 108 . In this embodiment, the credit value SUM is accumulated at a slower speed, and the actual data amount of the FIFO buffer 107 is accumulated at a faster speed. In this way, the back pressure event may be triggered before the credit value SUM reaches the predetermined threshold value TH1. As shown in FIG. 3 , at time T1, the amount of data in the FIFO buffer 107 reaches a predetermined threshold TH BP . Therefore, the MAC layer device 108 asserts the back pressure signal S_BP, so that the correction circuit 126 is triggered by a specific event (ie, a back pressure event) TRG.

当反压程序作用时,会暂停主要缓冲器102至出端口的封包数据输出。然而,先进先出缓冲器107仍会正常地工作来将封包数据输出至物理层装置110,所以先进先出缓冲器107的数据量会慢慢降低。当先进先出缓冲器107的数据量在时间T2的时候降低至特定值BPOFF时,媒体存取控制层装置108会无效(deassert)反压信号S_BP以关闭反压机制,进而允许主要缓冲器102恢复其封包数据的输出。When the back pressure procedure is activated, the packet data output from the main buffer 102 to the output port will be suspended. However, the FIFO buffer 107 will still work normally to output the packet data to the physical layer device 110, so the data volume of the FIFO buffer 107 will gradually decrease. When the amount of data in the FIFO buffer 107 drops to a specific value BP OFF at time T2, the MAC layer device 108 will deassert the back pressure signal S_BP to turn off the back pressure mechanism, thereby allowing the main buffer 102 resumes output of its packet data.

在被特定事件TRG触发后,校正电路126会在时间T2(即,主要缓冲器102的封包数据输出被恢复的时间点)确定信用值SUM同步于先进先出缓冲器107中的数据量。在此实施例中,校正电路126会在时间T1立即设定信用值SUM为特定值BPOFF,然后保持信用值SUM直到反压机制在时间T2被解除。因此,在时间T2时,利用先进先出缓冲器107中的实际数据量来重新调整信用值SUM。应注意的是图3中的实施例并非用于限定本发明。举例来说,校正电路126可以在时间T1到时间T2之间的任何时间点将信用值SUM设定为特定值BPOFF,然后保持信用值SUM直到反压机制在时间T2被解除。也可达到将信用值SUM同步于先进先出缓冲器107中的实际数据量的目的。After being triggered by a specific event TRG, the correction circuit 126 determines that the credit value SUM is synchronized with the data amount in the FIFO buffer 107 at time T2 (ie, the time point when the packet data output of the main buffer 102 is restored). In this embodiment, the calibration circuit 126 immediately sets the credit value SUM to a specific value BP OFF at time T1, and then maintains the credit value SUM until the back pressure mechanism is released at time T2. Therefore, at time T2, the credit value SUM is readjusted with the actual amount of data in the FIFO buffer 107 . It should be noted that the embodiment in FIG. 3 is not intended to limit the present invention. For example, the correction circuit 126 can set the credit value SUM to a specific value BP OFF at any time point between time T1 and time T2 , and then keep the credit value SUM until the back pressure mechanism is released at time T2 . The purpose of synchronizing the credit value SUM with the actual data amount in the FIFO buffer 107 can also be achieved.

在第二示范性校正设计中,校正电路126进一步监控信用值SUM以及媒体存取控制层装置108中的先进先出缓冲器107的实际数据量之间的差异。举例来说,校正电路126可以采用软件模块(即监控软件)或是硬件模块(例如监视装置)来检查差异是否达到预定临界值TH2。当差异达到预定临界值TH2时,表示应调整信用值SUM以使其步调保持与先进先出缓冲器107中的实际数据量一致,这时会触发特定事件TRG来使能校正电路126。In the second exemplary calibration design, the calibration circuit 126 further monitors the difference between the credit value SUM and the actual data volume of the FIFO buffer 107 in the MAC layer device 108 . For example, the calibration circuit 126 can use a software module (ie monitoring software) or a hardware module (eg monitoring device) to check whether the difference reaches the predetermined threshold TH2. When the difference reaches a predetermined threshold TH2, it means that the credit value SUM should be adjusted to keep its pace consistent with the actual data volume in the FIFO buffer 107 , and a specific event TRG is triggered to enable the correction circuit 126 .

请参考图4,图4为根据本发明实施方式的偏差事件所触发的校正操作的示意图。特征曲线CV1代表媒体存取控制层装置108中的先进先出缓冲器107的数据量,而特征曲线CV2用于表示主动输出缓冲控制器112所估测并记录的信用值SUM。如前所述,由于所提出的主动缓冲器控制机制对于先进先出满溢评估有更严谨的态度,因此所估计出的信用值SUM和媒体存取控制层装置108中的先进先出缓冲器107的实际数据量之间存在不匹配。在此实施例中,信用值SUM以较缓慢的速度来累积,先进先出缓冲器107的实际数据量以较快的速度来累积。信用值SUM和先进先出缓冲器107中的实际数据量之间的差异会逐渐增加。在时间T1时,信用值SUM和先进先出缓冲器107的实际数据量之间的差异D1尚未到达预定临界值TH2,因此毋须校正信用值SUM以使其同步于先进先出缓冲器107的实际数据量。然而,在时间T2时,校正电路126的监控程序/监视装置会侦测到信用值SUM和先进先出缓冲器107的实际数据量之间的差异D2已达到预定临界值TH2,因此特定事件(即一偏差事件)会触发特定事件TRG校正电路126来校正信用值SUM,因此便可利用先进先出缓冲器107的实际数据量重新调整信用值SUM。Please refer to FIG. 4 , which is a schematic diagram of a correction operation triggered by a deviation event according to an embodiment of the present invention. The characteristic curve CV1 represents the data amount of the FIFO buffer 107 in the MAC layer device 108 , and the characteristic curve CV2 is used to represent the credit value SUM estimated and recorded by the active output buffer controller 112 . As mentioned above, since the proposed active buffer control mechanism has a more rigorous attitude towards FIFO overflow evaluation, the estimated credit value SUM and the FIFO buffer in the media access control layer device 108 There is a mismatch between the actual data volume of 107. In this embodiment, the credit value SUM is accumulated at a slower speed, and the actual data amount of the FIFO buffer 107 is accumulated at a faster speed. The difference between the credit value SUM and the actual amount of data in the FIFO buffer 107 will gradually increase. At time T1, the difference D1 between the credit value SUM and the actual data volume of the FIFO buffer 107 has not yet reached the predetermined critical value TH2, so there is no need to correct the credit value SUM so that it is synchronized with the actual data volume of the FIFO buffer 107. The amount of data. However, at time T2, the monitoring program/monitoring device of the correction circuit 126 will detect that the difference D2 between the credit value SUM and the actual data amount of the FIFO buffer 107 has reached a predetermined threshold TH2, so the specific event ( That is, a deviation event) will trigger the specific event TRG correction circuit 126 to correct the credit value SUM, so the actual data amount of the FIFO buffer 107 can be used to readjust the credit value SUM.

在第三示范性校正设计中,当满足预定时序条件时,校正电路126会校正信用值SUM。举例来说,但本发明不以此为限。校正电路126可以周期性地校正信用值SUM。例如,校正电路126可以采用软件模块(即监控软件)或是硬件模块(例如监视装置)来计数时间T的预定周期,并且在时间满足时间T的预定周期时触发时间已到事件。换句话说,当时间满足时间T的预定周期时,表示应立即调整信用值SUM,特定事件TRG会被触发以使能校正电路126。请参考图5,图5为根据本发明实施方式的时间已到事件所触发的校正操作的示意图。特征曲线CV1代表媒体存取控制层装置108中的先进先出缓冲器107的数据量,而特征曲线CV2用于表示主动输出缓冲控制器112所估测并记录的信用值SUM。如前所述,由于所提出的主动缓冲器控制机制对于先进先出满溢评估有更严谨的态度,因此所估计出的信用值SUM和媒体存取控制层装置108中的先进先出缓冲器107的实际数据量之间存在不匹配。在此实施例中,信用值SUM以较缓慢的速度来累积,先进先出缓冲器107的实际数据量以较快的速度来累积。时间T1、时间T2以及时间T3分别满足时间T的预定周期,因此,校正电路126会周期性地触发特定事件TRG(即时间已到事件)来校正信用值SUM。因此便可在时间T1、时间T2以及时间T3分别利用先进先出缓冲器107的实际数据量重新调整信用值SUM。In the third exemplary correction design, the correction circuit 126 corrects the credit value SUM when a predetermined timing condition is met. For example, but the present invention is not limited thereto. The correction circuit 126 may periodically correct the credit value SUM. For example, the calibration circuit 126 may use a software module (ie, monitoring software) or a hardware module (eg, a monitoring device) to count a predetermined period of time T, and trigger a time-out event when the time meets the predetermined period of time T. In other words, when the time meets the predetermined period of time T, it means that the credit value SUM should be adjusted immediately, and the specific event TRG is triggered to enable the correction circuit 126 . Please refer to FIG. 5 , which is a schematic diagram of a correction operation triggered by a time-out event according to an embodiment of the present invention. The characteristic curve CV1 represents the data amount of the FIFO buffer 107 in the MAC layer device 108 , and the characteristic curve CV2 is used to represent the credit value SUM estimated and recorded by the active output buffer controller 112 . As mentioned above, since the proposed active buffer control mechanism has a more rigorous attitude towards FIFO overflow evaluation, the estimated credit value SUM and the FIFO buffer in the media access control layer device 108 There is a mismatch between the actual data volume of 107. In this embodiment, the credit value SUM is accumulated at a slower speed, and the actual data amount of the FIFO buffer 107 is accumulated at a faster speed. The time T1 , time T2 and time T3 respectively satisfy the predetermined period of the time T, therefore, the correction circuit 126 periodically triggers a specific event TRG (ie, time-up event) to correct the credit value SUM. Therefore, the credit value SUM can be readjusted at the time T1 , the time T2 and the time T3 respectively by using the actual data amount of the FIFO buffer 107 .

在以上图4以及图5所示的范例中,信用值SUM以较缓慢的速度来累积,先进先出缓冲器107的实际数据量以较快的速度来累积。然而此仅供说明用途,本发明不以此为限。实际上信用值SUM和先进先出缓冲器107的实际数据量之间的差距无法事先被得知。也就是说,所估计的信用值SUM可能会在某一时间点小于先进先出缓冲器107的实际数据量,又可能在另一时间点大于先进先出缓冲器107的实际数据量。因此,校正电路126对所估计出的信用值SUM的调整可以增加或是减少,完全视所估计出的信用值SUM和先进先出缓冲器107的实际数据量彼此之间的关系来决定。In the above examples shown in FIG. 4 and FIG. 5 , the credit value SUM is accumulated at a slower speed, and the actual data amount of the FIFO buffer 107 is accumulated at a faster speed. However, this is for illustrative purposes only, and the present invention is not limited thereto. In fact, the gap between the credit value SUM and the actual data volume of the FIFO buffer 107 cannot be known in advance. That is to say, the estimated credit value SUM may be smaller than the actual data volume of the FIFO buffer 107 at a certain time point, and may be larger than the actual data volume of the FIFO buffer 107 at another time point. Therefore, the adjustment of the estimated credit value SUM by the correction circuit 126 can be increased or decreased, depending entirely on the relationship between the estimated credit value SUM and the actual data volume of the FIFO buffer 107 .

图6为根据本发明实施方式的控制网络装置中的主要缓冲器的封包数据输出的方法的流程图。倘若大致上可达到相同的结果,并不需要一定遵照图6所示的流程中的步骤顺序来进行,并且图6所示的步骤不一定要连续进行,即其他步骤也可插入其中,此外,图6中的某些步骤也可根据不同实施例或设计需求而省略。本示范性方法可以应用在图1所示的主动输出缓冲控制器112,并且方法简要概述如下:FIG. 6 is a flow chart of a method for controlling packet data output of a primary buffer in a network device according to an embodiment of the present invention. If substantially the same result can be achieved, it is not necessary to follow the order of the steps in the process shown in Figure 6, and the steps shown in Figure 6 do not have to be performed continuously, that is, other steps can also be inserted therein, in addition, Certain steps in FIG. 6 may also be omitted according to different embodiments or design requirements. This exemplary method can be applied to the active output buffer controller 112 shown in FIG. 1, and the method is briefly summarized as follows:

步骤600:开始;Step 600: start;

步骤602:基于网络装置的入口数据接收状态和网络装置的出口数据传送状态中的至少一个来估计信用值。在本发明的某些设计中,信用值的估测值可以参考实现规格。Step 602: Estimate a credit value based on at least one of an ingress data receiving status of the network device and an egress data transmission status of the network device. In some designs of the invention, an estimate of the credit value may refer to an implementation specification.

步骤604:检查信用值是否达到预定临界值。若是,则进入步骤610;否则进入步骤606。Step 604: Check whether the credit value reaches a predetermined threshold. If yes, go to step 610 ; otherwise, go to step 606 .

步骤606:检查反压信号是否生效。若是,则进入步骤610;否则进入步骤608。Step 606: Check whether the back pressure signal is valid. If yes, go to step 610 ; otherwise, go to step 608 .

步骤608:允许主要缓冲器来产生封包数据输出至出口管线。进入步骤612。Step 608: Allow the primary buffer to generate packet data output to the egress pipeline. Go to step 612 .

步骤610:控制主要缓冲器暂停封包数据输出至出口管线。Step 610: Control the main buffer to suspend the output of the packet data to the egress pipeline.

步骤612:检查是否有信用值校正的特定事件。若是,则进入步骤614;否则进入步骤616。Step 612: Check whether there is a specific event of credit value correction. If yes, go to step 614 ; otherwise, go to step 616 .

步骤614:基于媒体存取控制层装置的先进先出缓冲器的实际数据量来校正信用值。举例来说,通过使信用值同步于媒体存取控制层装置的先进先出缓冲器的实际数据量来校正信用值。Step 614: Correct the credit value based on the actual data volume of the FIFO buffer of the MAC layer device. For example, the credit value is corrected by synchronizing the credit value with the actual data volume of the FIFO buffer of the MAC layer device.

步骤616:结束。Step 616: end.

由于本领域技术人员在阅读上述内容之后应可轻易了解每一个步骤的细节,因此为求简洁在此省略进一步的说明。Since those skilled in the art should easily understand the details of each step after reading the above content, further description is omitted here for brevity.

应注意的是,图1中的主动输出缓冲控制器112以及图6中的相关方法仅供说明用途,并非用于限制本发明。也就是说,在不背离本发明的精神的前提下,可以修改图1中的主动输出缓冲控制器112以及图6中的相关方法。举例来说,可以省略媒体存取控制层装置108中的反压机制。这样一来,主动输出缓冲控制器112要改成基于信用值SUM而不需参考反压信号S_BP来设定控制信号S_C。又例如,可以省略主动输出缓冲控制器112中的校正电路126。因此,主动输出缓冲控制器112要改成基于信用值SUM而不含校正操作来设定控制信号S_C。此类变化设计都属于本发明的权利范围。It should be noted that the active output buffer controller 112 in FIG. 1 and the related method in FIG. 6 are for illustration purposes only, and are not intended to limit the present invention. That is, the active output buffer controller 112 in FIG. 1 and the related method in FIG. 6 can be modified without departing from the spirit of the present invention. For example, the back pressure mechanism in the MAC layer device 108 can be omitted. In this way, the active output buffer controller 112 sets the control signal S_C based on the credit value SUM instead of referring to the back pressure signal S_BP. As another example, the correction circuit 126 in the active output buffer controller 112 can be omitted. Therefore, the active output buffer controller 112 is changed to set the control signal S_C based on the credit value SUM without corrective operation. Such changes and designs all belong to the right scope of the present invention.

通过使用所提出的主动输出缓冲控制器,可以通过适当地控制媒体存取控制层装置与主要缓冲器之间的封包数据传送,来得到较高的先进先出使用率。除此之外,由于所提出的主动输出缓冲控制器能够主动地避免媒体存取控制层装置发生先进先出满溢的状况,也可省略反压机制以降低路由(routing)的复杂度,及/或降低媒体存取控制层装置中的先进先出的尺寸以节省成本。By using the proposed active output buffer controller, a higher FIFO utilization can be obtained by properly controlling the packet data transfer between the MAC layer device and the main buffer. In addition, since the proposed active output buffer controller can actively avoid the first-in first-out overflow situation of the media access control layer device, the back pressure mechanism can also be omitted to reduce the complexity of routing (routing), and /or reduce the size of the FIFO in the MAC layer device to save cost.

虽然本发明已以较佳实施方式揭露如上,然而必须了解其并非用以限定本发明。相反,任何本领域技术人员,在不脱离本发明的精神和范围内,当可做些许更动与润饰,因此本发明的保护范围应当以权利要求书所界定的保护范围为准。Although the present invention has been disclosed above with preferred embodiments, it should be understood that it is not intended to limit the present invention. On the contrary, any person skilled in the art can make some changes and modifications without departing from the spirit and scope of the present invention, so the protection scope of the present invention should be defined by the claims.

Claims (22)

1.一种主动输出缓冲控制器,其特征在于,该主动输出缓冲控制器用于控制网络装置中的主要缓冲器的封包数据输出,该主动输出缓冲控制器包含有:1. An active output buffer controller, characterized in that, the active output buffer controller is used to control the packet data output of the main buffer in the network device, and the active output buffer controller includes: 信用评估电路,基于该网络装置的入口数据接收状态和该网络装置的出口数据传送状态中的至少一个来估计信用值;a credit evaluation circuit estimating a credit value based on at least one of an ingress data reception status of the network device and an egress data transmission status of the network device; 控制逻辑,比较该信用值与第一预定临界值,以产生比较结果,以及至少依据该比较结果来控制该主要缓冲器的该封包数据输出;以及a control logic that compares the credit value with a first predetermined threshold to generate a comparison result, and controls the packet data output of the primary buffer at least according to the comparison result; and 校正电路,基于媒体存取控制层装置的先进先出缓冲器的实际数据量来校正该信用值;A correction circuit for correcting the credit value based on the actual amount of data in the first-in-first-out buffer of the media access control layer device; 其中该校正电路校正该信用值以响应该媒体存取控制层装置所生效的反压信号;并且当该媒体存取控制层装置不生效该反压信号时,该校正电路不校正该信用值。Wherein the calibration circuit corrects the credit value in response to the back pressure signal activated by the MAC layer device; and when the MAC layer device does not validate the back pressure signal, the calibration circuit does not correct the credit value. 2.根据权利要求1所述的主动输出缓冲控制器,其特征在于,当估计该信用值时,该信用评估电路进一步参考实现规格。2. The active output buffer controller according to claim 1, wherein when estimating the credit value, the credit evaluation circuit further refers to an implementation specification. 3.根据权利要求2所述的主动输出缓冲控制器,其特征在于,该实现规格包含有封包信元尺寸、媒体存取控制层装置的操作频率、以及出端口的分时多任务周期中的至少一个。3. The active output buffer controller according to claim 2, wherein the implementation specification includes packet cell size, the operating frequency of the media access control layer device, and the TDM cycle of the output port at least one. 4.根据权利要求1所述的主动输出缓冲控制器,其特征在于,该入口数据接收状态包含有入口数据传入率、入口封包转发方法、以及入口管线深度中的至少一个。4 . The active output buffer controller according to claim 1 , wherein the ingress data receiving status includes at least one of ingress data incoming rate, ingress packet forwarding method, and ingress pipeline depth. 5.根据权利要求1所述的主动输出缓冲控制器,其特征在于,该出口数据传送状态包含有出口管线深度、媒体存取控制层装置的先进先出尺寸、物理层装置的传送率、以及出口封包尺寸变更信息中的至少一个。5. The active output buffer controller according to claim 1, wherein the egress data transfer status includes egress pipeline depth, FIFO size of MAC layer devices, transfer rate of physical layer devices, and At least one of the egress packet size change information. 6.根据权利要求1所述的主动输出缓冲控制器,其特征在于,当该比较结果显示该信用值达到该第一预定临界值时,该控制逻辑将该主要缓冲器的该封包数据输出暂停在欲转发的封包中的封包信元的边界。6. The active output buffer controller according to claim 1, wherein when the comparison result shows that the credit value reaches the first predetermined threshold, the control logic suspends the output of the packet data of the main buffer Packet Cell Boundary in the packet to be forwarded. 7.根据权利要求1所述的主动输出缓冲控制器,其特征在于,当该比较结果显示该信用值达到该第一预定临界值时,该控制逻辑将该主要缓冲器的该封包数据输出暂停在欲转发的封包中的封包信元的一部分的边界。7. The active output buffer controller according to claim 1, wherein when the comparison result shows that the credit value reaches the first predetermined critical value, the control logic suspends the output of the packet data of the main buffer The boundary of a portion of a Packet Cell in a packet to be forwarded. 8.根据权利要求1所述的主动输出缓冲控制器,其特征在于,当该比较结果显示该信用值未达到该第一预定临界值时,该控制逻辑进一步通过检查媒体存取控制层装置是否使得反压信号生效来产生检查结果,以及依据该检查结果来控制该主要缓冲器的该封包数据输出。8. The active output buffer controller according to claim 1, wherein when the comparison result shows that the credit value has not reached the first predetermined critical value, the control logic further checks whether the media access control layer device The back pressure signal is enabled to generate a check result, and the packet data output of the main buffer is controlled according to the check result. 9.根据权利要求1所述的主动输出缓冲控制器,其特征在于,该校正电路通过同步该信用值与该媒体存取控制层装置的该先进先出缓冲器的该实际数据量来校正该信用值。9. The active output buffer controller according to claim 1, wherein the correction circuit corrects the credit value. 10.根据权利要求1所述的主动输出缓冲控制器,其特征在于,该校正电路进一步监控该信用值与该媒体存取控制层装置的该先进先出缓冲器的该实际数据量之间的差异;以及当该差异达到第二预定临界值时,该校正电路校正该信用值。10. The active output buffer controller according to claim 1, wherein the correction circuit further monitors the relationship between the credit value and the actual data volume of the FIFO buffer of the MAC layer device difference; and when the difference reaches a second predetermined threshold, the correction circuit corrects the credit value. 11.根据权利要求1所述的主动输出缓冲控制器,其特征在于,当符合预定时序条件时,该校正电路校正该信用值。11. The active output buffer controller according to claim 1, wherein the correction circuit corrects the credit value when a predetermined timing condition is met. 12.一种控制主要缓冲器的封包数据输出的方法,其特征在于,该主要缓冲器位于网络装置中,该控制主要缓冲器的封包数据输出的方法包含有:12. A method for controlling the output of packet data of a main buffer, characterized in that, the main buffer is located in a network device, and the method for controlling the output of packet data of the main buffer comprises: 基于该网络装置的入口数据接收状态和该网络装置的出口数据传送状态中的至少一个来估计信用值;estimating a credit value based on at least one of an ingress data reception status of the network device and an egress data transmission status of the network device; 比较该信用值与第一预定临界值,以产生比较结果;comparing the credit value with a first predetermined threshold to generate a comparison result; 至少依据该比较结果来控制该主要缓冲器的该封包数据输出;以及controlling the packet data output of the primary buffer at least according to the comparison result; and 基于媒体存取控制层装置的先进先出缓冲器的实际数据量来校正该信用值;correcting the credit value based on an actual amount of data in the FIFO buffer of the MAC layer device; 其中响应该媒体存取控制层装置所生效的反压信号校正该信用值;并且当该媒体存取控制层装置不生效该反压信号时,不校正该信用值。Wherein the credit value is corrected in response to the back pressure signal activated by the MAC layer device; and the credit value is not corrected when the back pressure signal is not valid by the MAC layer device. 13.根据权利要求12所述的控制主要缓冲器的封包数据输出的方法,其特征在于,估计该信用值的步骤进一步包含有:13. The method for controlling the packet data output of the main buffer according to claim 12, wherein the step of estimating the credit value further comprises: 当估计该信用值时,参考实现规格。When estimating this credit value, refer to the implementation specification. 14.根据权利要求13所述的控制主要缓冲器的封包数据输出的方法,其特征在于,该实现规格包含有封包信元尺寸、媒体存取控制层装置的操作频率、以及出端口的分时多任务周期中的至少一个。14. The method for controlling the packet data output of the main buffer according to claim 13, wherein the implementation specification includes the packet cell size, the operating frequency of the media access control layer device, and the time-sharing of the output port At least one of the multitasking cycles. 15.根据权利要求12所述的控制主要缓冲器的封包数据输出的方法,其特征在于,该入口数据接收状态包含有入口数据传入率、入口封包转发方法、以及入口管线深度中的至少一个。15. The method for controlling the packet data output of the main buffer according to claim 12, wherein the ingress data receiving status includes at least one of ingress data incoming rate, ingress packet forwarding method, and ingress pipeline depth . 16.根据权利要求12所述的控制主要缓冲器的封包数据输出的方法,其特征在于,该出口数据传送状态包含有出口管线深度、媒体存取控制层装置的先进先出尺寸、物理层装置的传送率、以及出口封包尺寸变更信息中的至少一个。16. The method for controlling the packet data output of the main buffer according to claim 12, wherein the egress data transfer status includes the egress pipeline depth, the first-in-first-out size of the media access control layer device, and the physical layer device At least one of the transmission rate and the egress packet size change information. 17.根据权利要求12所述的控制主要缓冲器的封包数据输出的方法,其特征在于,控制该主要缓冲器的该封包数据输出的步骤包含有:17. The method for controlling the packet data output of the main buffer according to claim 12, wherein the step of controlling the packet data output of the main buffer comprises: 当该比较结果显示该信用值达到该第一预定临界值时,将该主要缓冲器的该封包数据输出暂停在欲转发的封包中的封包信元的边界。When the comparison result shows that the credit value reaches the first predetermined threshold, the packet data output of the main buffer is suspended at the boundary of the packet cell in the packet to be forwarded. 18.根据权利要求12所述的控制主要缓冲器的封包数据输出的方法,其特征在于,控制该主要缓冲器的该封包数据输出的步骤包含有:18. The method for controlling the packet data output of the main buffer according to claim 12, wherein the step of controlling the packet data output of the main buffer comprises: 当该比较结果显示该信用值达到该第一预定临界值时,将该主要缓冲器的该封包数据输出暂停在欲转发的封包中的封包信元的一部分的边界。When the comparison result shows that the credit value reaches the first predetermined threshold, the output of the packet data from the primary buffer is suspended at the boundary of a portion of packet cells in the packet to be forwarded. 19.根据权利要求12所述的控制主要缓冲器的封包数据输出的方法,其特征在于,控制该主要缓冲器的该封包数据输出的步骤包含有:19. The method for controlling the packet data output of the main buffer according to claim 12, wherein the step of controlling the packet data output of the main buffer comprises: 当该比较结果显示该信用值并未达到该第一预定临界值时,通过检查媒体存取控制层装置是否使得反压信号生效来产生检查结果,以及依据该检查结果来控制该主要缓冲器的该封包数据输出。When the comparison result shows that the credit value does not reach the first predetermined threshold, a check result is generated by checking whether the MAC layer device makes a back pressure signal effective, and controlling the main buffer according to the check result The packet data is output. 20.根据权利要求12所述的控制主要缓冲器的封包数据输出的方法,其特征在于,校正该信用值的步骤包含有:20. The method for controlling the packet data output of the main buffer according to claim 12, wherein the step of correcting the credit value comprises: 通过同步该信用值与该媒体存取控制层装置的该先进先出缓冲器的该实际数据量来校正该信用值。The credit value is corrected by synchronizing the credit value with the actual data size of the FIFO buffer of the MAC layer device. 21.根据权利要求12所述的控制主要缓冲器的封包数据输出的方法,其特征在于,校正该信用值的步骤包含有:21. The method for controlling the packet data output of the main buffer according to claim 12, wherein the step of correcting the credit value comprises: 监控该信用值与该媒体存取控制层装置的该先进先出缓冲器的该实际数据量之间的差异;以及monitoring the difference between the credit value and the actual data volume of the FIFO buffer of the MAC layer device; and 当该差异达到第二预定临界值时,校正该信用值。The credit value is corrected when the difference reaches a second predetermined threshold. 22.根据权利要求12所述的控制主要缓冲器的封包数据输出的方法,其特征在于,当符合预定时序条件时,校正该信用值。22. The method for controlling the packet data output of the main buffer as claimed in claim 12, wherein the credit value is corrected when a predetermined timing condition is met.
CN201410175622.8A 2013-04-26 2014-04-28 Active output buffer controller and method thereof Expired - Fee Related CN104125164B (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US201361816252P 2013-04-26 2013-04-26
US61/816,252 2013-04-26
US14/230,005 US20140321473A1 (en) 2013-04-26 2014-03-31 Active output buffer controller for controlling packet data output of main buffer in network device and related method
US14/230,005 2014-03-31

Publications (2)

Publication Number Publication Date
CN104125164A CN104125164A (en) 2014-10-29
CN104125164B true CN104125164B (en) 2017-11-24

Family

ID=51770432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410175622.8A Expired - Fee Related CN104125164B (en) 2013-04-26 2014-04-28 Active output buffer controller and method thereof

Country Status (1)

Country Link
CN (1) CN104125164B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI722574B (en) * 2019-09-18 2021-03-21 新唐科技股份有限公司 Audio and data synchronization device and method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6714516B1 (en) * 1999-04-30 2004-03-30 Alcatel Congestion control mechanism for SSCOP protocol

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7002982B1 (en) * 1998-07-08 2006-02-21 Broadcom Corporation Apparatus and method for storing data
US7020133B2 (en) * 2002-01-03 2006-03-28 Integrated Device Technology Switch queue predictive protocol (SQPP) based packet switching method
US7180862B2 (en) * 2002-07-18 2007-02-20 Intel Corporation Apparatus and method for virtual output queue feedback

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6714516B1 (en) * 1999-04-30 2004-03-30 Alcatel Congestion control mechanism for SSCOP protocol

Also Published As

Publication number Publication date
CN104125164A (en) 2014-10-29

Similar Documents

Publication Publication Date Title
US20140321473A1 (en) Active output buffer controller for controlling packet data output of main buffer in network device and related method
CN103326953B (en) A kind of flow limitation method based on token bucket and device
CN114095287B (en) Method, system and non-transitory storage medium for processing data packet
CN1787487B (en) Method and system for packet flow control in a switched full-duplex Ethernet network
US7817558B2 (en) Flow based flow control in an ethernet switch backplane
CN101427516B (en) Network Latency Control
EP2950489B1 (en) Method and device for generating cnm
EP2235894B1 (en) A simple adaptive jitter buffering algorithm for network nodes
JP4773377B2 (en) COMMUNICATION SYSTEM, COMMUNICATION DEVICE, AND FLOW CONTROL METHOD
EP3547627A1 (en) Flow control method and switching device
US8576850B2 (en) Band control apparatus, band control method, and storage medium
CN104620548A (en) Method and apparatus for transmitting packets in accordance with IEEE 802.1 QBV
US20080192631A1 (en) Method of controlling a data flow, transmitter and data transmission system
US9106369B2 (en) Method and apparatus for controlling the data rate of a data transmission between an emitter and a receiver
US20090147796A1 (en) Input/output buffer controller for optimized memory utilization and prevention of packet under-run errors
CN102025631A (en) Method and exchanger for dynamically adjusting outlet port cache
CN104125164B (en) Active output buffer controller and method thereof
TWI570567B (en) System and method for performing isochronous data buffering
WO2015018003A1 (en) Ltr/obff design scheme for ethernet adapter application
US9774536B2 (en) Link status buffer flow control management
US10812402B2 (en) Shaping of post-scheduling network pipeline jitter
US20100074111A1 (en) Method of data traffic shaping, apparatus and wireless device
KR102328071B1 (en) Method and apparatus of processing traffic in optical transport network
CN118540282B (en) Network traffic control method, device, equipment and storage medium
JP2009135567A (en) Data transfer apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171124

Termination date: 20200428

CF01 Termination of patent right due to non-payment of annual fee