On-chip network service quality arbitration methods, systems and storage media
By introducing burst detection and anti-starvation counter mechanisms into the on-chip network router, burst data is responded to first and port starvation is prevented, solving the problem of balancing data forwarding performance and complexity in existing technologies, and achieving stable and efficient data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RIVAI TECH (SHENZHEN) CO LTD
- Filing Date
- 2026-06-04
- Publication Date
- 2026-08-04
AI Technical Summary
Existing on-chip network router quality of service arbitration methods struggle to balance data forwarding performance with implementation complexity, and cannot effectively avoid port starvation and data congestion issues.
Employing a burst detection module and a starvation prevention counter mechanism, this system identifies burst data packets and records the number of times a port fails to obtain arbitration privileges, prioritizing the allocation of forwarding privileges to prevent port starvation and ensuring fair scheduling when there are no special needs.
It improves the forwarding stability of the on-chip network, balances the timeliness of data transmission with the fairness of port scheduling, avoids port starvation and data congestion, and improves the stability and efficiency of the network.
Smart Images

Figure CN122340059B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of on-chip network routing technology, and in particular to an on-chip network quality of service arbitration method, system and storage medium. Background Technology
[0002] As the performance of multi-core, multi-chip interconnected general-purpose superscalar processors continues to improve, the scale of on-chip networks, which rely on multi-core communication, is constantly expanding. Upper-layer service types are becoming increasingly complex, covering different needs such as latency sensitivity, bandwidth sensitivity, and jitter sensitivity. Various services have significantly different requirements for the Quality of Service (QoS) of data forwarding, which places higher demands on the forwarding performance and QoS assurance capabilities of on-chip network routers.
[0003] To adapt to diverse business needs, the industry has developed various quality of service (QoS) arbitration schemes to meet the QoS requirements of different services for packet forwarding. Currently, general-purpose on-chip network routers use a buffered forwarding mode, and the mainstream QoS arbitration methods fall into three categories:
[0004] The first is the circuit switching scheme: before data exchange, links are established according to quality of service priority, buffers and link resources are reserved, and links are terminated after forwarding is completed; Second, the packet switching high-priority arbitration scheme: no link needs to be established in advance during the forwarding process. Input data packets on the same output port are arbitrated according to service quality priority, with higher priority packets being forwarded first, and a round-robin mechanism is used for packets with the same priority. Thirdly, a hybrid approach: combining the first two approaches, circuit switching is used for services with high service quality requirements, while packet switching arbitration is used for general services.
[0005] However, all three solutions have their own drawbacks: Circuit switching solutions incur significant overhead in establishing and closing links, are only suitable for ultra-long data transmission, have low throughput for small packets and general services, and are difficult to use for on-chip networks of general-purpose multi-core processors. While the packet switching high-priority priority scheme is suitable for general scenarios and simple to implement, it does not provide sufficient support for jitter-sensitive streaming media and other sudden services. Low-priority services may not be able to obtain forwarding resources for a long time, which can easily lead to starvation problems. While hybrid solutions theoretically complement each other's strengths and weaknesses, their implementation is extremely complex, easily increasing data forwarding latency. They also tend to lead to a significant increase in router size and power consumption, making it impossible to balance performance and cost requirements.
[0006] Therefore, it is necessary to propose a new service quality arbitration scheme to address the above issues. Summary of the Invention
[0007] This invention provides an on-chip network quality of service arbitration method, system, and storage medium, aiming to solve the technical problem that existing methods are difficult to balance data forwarding performance and implementation complexity.
[0008] To address the aforementioned technical problems, in a first aspect, the present invention provides an on-chip network service quality arbitration method, comprising the following steps: S101. Obtain the data packets received by each input port of the on-chip network router, identify whether the data packets carry burst indication information, and mark the input port corresponding to the data packet carrying the burst indication information as a burst state; wherein, each input port records the cumulative number of times it has failed to obtain service quality arbitration rights within multiple arbitration cycles through an anti-starvation counter; S102. During the current arbitration period, determine whether there is an input port marked as a sudden state. If yes, grant the input port marked as a sudden state the service quality arbitration authority during the current arbitration period and execute step S104; otherwise, execute step S103. S103. Determine whether there is an input port where the value of the anti-starvation counter has reached the preset maximum value. If yes, grant the service quality arbitration permission only to that input port and cancel the service quality arbitration permission for all other input ports. If no, grant the service quality arbitration permission for the current arbitration period to all input ports. S104. Send the input port with the service quality arbitration authority to the service quality arbitration for data packet forwarding; S105. Sequentially determine whether each input port has unforwarded data packets and whether the input port has not obtained the service quality arbitration authority in the current arbitration period. If yes, then increment the anti-starvation counter corresponding to the input port; otherwise, keep the value of the anti-starvation counter corresponding to the input port unchanged.
[0009] Furthermore, in step S102, a register with a data width of 1 is used to record whether the input port is marked as the burst state, and the presence of a register with a value of 1 is used to confirm whether there is an input port marked as the burst state, wherein: If the data packet received by the input port is the first data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration period, then write 1 to the register corresponding to the input port; If the data packet received by the input port is the last data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration cycle, then the register corresponding to the input port is cleared to 0.
[0010] Furthermore, in step S105, the condition for the anti-starvation counter corresponding to the input port to accumulate counts also includes: The buffer at the input port used to cache the data packets has not reached the preset cache threshold.
[0011] Furthermore, step S105 also includes: If the input port obtains the service quality arbitration authority within the current arbitration cycle, the anti-starvation counter corresponding to the input port is cleared to 0.
[0012] Furthermore, in step S104, the quality of service arbitration completes the packet forwarding according to a preset priority or polling rule.
[0013] Secondly, the present invention also provides an on-chip network service quality arbitration system, comprising: The burst detection module is used to acquire data packets received by each input port of the on-chip network router, identify whether the data packets carry burst indication information, and mark the input port corresponding to the data packet with the burst indication information as a burst state; wherein, each input port records the cumulative number of times it has failed to obtain service quality arbitration rights within multiple arbitration cycles through an anti-starvation counter; The burst handling module is used to determine whether there is an input port marked as a burst state within the current arbitration cycle. If so, the input port marked as a burst state is granted the service quality arbitration authority within the current arbitration cycle, and the arbitration handling module is executed; otherwise, the anti-starvation handling module is executed. The anti-starvation processing module is used to determine whether there is an input port whose anti-starvation counter value has reached a preset maximum value. If so, it grants the service quality arbitration permission only to that input port and cancels the service quality arbitration permission for all other input ports. If not, it grants the service quality arbitration permission for the current arbitration period to all input ports. The arbitration processing module is used to send the input port with the service quality arbitration authority to the service quality arbitration for data packet forwarding; The anti-starvation detection module is used to sequentially determine whether each of the input ports has unforwarded data packets and whether the input port has not obtained the service quality arbitration authority in the current arbitration period. If so, the anti-starvation counter corresponding to the input port is incremented; otherwise, the value of the anti-starvation counter corresponding to the input port is kept unchanged.
[0014] Furthermore, a register with a data width of 1 is used to record whether the input port is marked as the burst state. The burst processing module determines whether there is an input port marked as the burst state by checking if there is a register with a value of 1. If the data packet received by the input port is the first data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration period, then write 1 to the register corresponding to the input port; If the data packet received by the input port is the last data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration cycle, then the register corresponding to the input port is cleared to 0.
[0015] Furthermore, the anti-starvation detection module is also used for: If the input port obtains the service quality arbitration authority within the current arbitration cycle, the anti-starvation counter corresponding to the input port is cleared to 0.
[0016] Thirdly, the present invention also provides a computer device, comprising: a memory, a processor, and an on-chip network service quality arbitration program stored in the memory and executable on the processor, wherein the processor, when executing the on-chip network service quality arbitration program, implements the steps of the on-chip network service quality arbitration method as described in any of the above embodiments.
[0017] Fourthly, the present invention also provides a storage medium storing an on-chip network quality of service arbitration program, wherein when the on-chip network quality of service arbitration program is executed by a processor, it implements the steps of the on-chip network quality of service arbitration method as described in any of the above embodiments.
[0018] The beneficial effects achieved by this invention lie in proposing an on-chip network service quality arbitration method. This method determines the port status hierarchically, prioritizes responding to sudden data forwarding requests, and uses an anti-starvation counter to monitor port scheduling. Ports that have not been granted permission for a long time are given priority in being allocated forwarding privileges, and arbitration scheduling is carried out uniformly when there are no special port requirements. Compared with existing technologies, this invention balances data transmission timeliness and port scheduling fairness, effectively avoiding port starvation and data congestion problems, and improving the forwarding stability of on-chip networks. Attached Figure Description
[0019] The present invention will now be described in detail with reference to the accompanying drawings. The above and other aspects of the present invention will become clearer and more readily understood through the detailed description following the accompanying drawings. In the drawings: Figure 1 This is a flowchart of the steps of the on-chip network service quality arbitration method provided in the embodiments of the present invention; Figure 2 This is a schematic diagram of the structure of the on-chip network service quality arbitration system provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0020] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0021] The specific embodiments / examples described herein are specific implementations of the present invention, used to illustrate the concept of the invention, and are illustrative and exemplary, and should not be construed as limiting the implementation methods or scope of the present invention. In addition to the embodiments described herein, those skilled in the art can employ other obvious technical solutions based on the content disclosed in the claims and specification of this application. These technical solutions include those that make any obvious substitutions and modifications to the embodiments described herein, all of which are within the protection scope of the present invention.
[0022] Example 1 Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the steps of the on-chip network service quality arbitration method provided in this embodiment of the invention. The on-chip network service quality arbitration method includes the following steps: S101. Obtain the data packets received by each input port of the on-chip network router, identify whether the data packets carry burst indication information, and mark the input port corresponding to the data packet carrying the burst indication information as a burst state; wherein, each input port records the cumulative number of times it has failed to obtain service quality arbitration rights within multiple arbitration cycles through an anti-starvation counter.
[0023] Specifically, the on-chip network consists of routers, input ports, output ports, and data transmission links, and is a communication architecture for data interaction between cores within the chip.
[0024] The input port is the router's data access unit, responsible for receiving data packets transmitted from upstream and performing data caching and preliminary parsing. In this embodiment of the invention, the burst indication information is implemented through a field set in the data packet header. By reading the preset identifier in this field, the data type can be determined, and the port status can be marked synchronously.
[0025] Starvation refers to a situation where some input ports are unable to obtain arbitration rights for an extended period and continuously fail to receive forwarding scheduling opportunities. In this embodiment of the invention, each input port is configured with an independent counter register to form an anti-starvation counter. The register value is dynamically updated with the arbitration cycle and records the cumulative number of cycles in which the port has not received scheduling, providing a basis for subsequent arbitration rights allocation.
[0026] S102. During the current arbitration period, determine whether there is an input port marked as a sudden state. If yes, grant the input port marked as a sudden state the service quality arbitration authority during the current arbitration period and execute step S104; otherwise, execute step S103.
[0027] In step S102, a register with a data width of 1 is used to record whether the input port is marked as the burst state, and the presence of a register with a value of 1 is used to confirm whether there is an input port marked as the burst state, wherein: If the data packet received by the input port is the first data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration period, then write 1 to the register corresponding to the input port; If the data packet received by the input port is the last data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration cycle, then the register corresponding to the input port is cleared to 0.
[0028] In this embodiment of the invention, a single binary register is configured for each input port as a burst state identifier, storing only two state values: 0 and 1. The register is set to 0 by default, indicating that the port has no burst forwarding requirement.
[0029] When a port acquires arbitration rights for the current round and receives the first forwarded data packet of a single service group, it writes a value of 1 to the corresponding register, marking the port as entering a burst state. When the last data packet of the service group is received, the register value is cleared to zero, and the burst mark is removed. During the scheduling phase, the status registers of all ports are traversed. As long as there is a register with a value of 1, it can be determined that there is a burst port waiting to be prioritized, which is used as the basis for determining the allocation of permissions.
[0030] S103. Determine whether there is an input port where the value of the anti-starvation counter has reached the preset maximum value. If yes, grant the service quality arbitration permission only to that input port and cancel the service quality arbitration permission for all other input ports. If no, grant the service quality arbitration permission for the current arbitration period to all input ports.
[0031] Specifically, in this embodiment of the invention, the stored values of the anti-starvation counters for each input port are compared with a preset maximum value. Once the port count reaches the preset maximum value, it is determined that the port is experiencing scheduling starvation. Even if such ports have data packets to be forwarded, they repeatedly miss transmission opportunities, causing data to accumulate and fail to be sent, resulting in packet congestion and prolonged stagnation of port services. This embodiment of the invention uses anti-starvation counters to count the number of unauthorized cycles. When the value reaches a threshold, it is determined to be in a starvation state, and this port is then locked as a priority scheduling target, granted priority arbitration authority for this round, while blocking access to other ports, thus prioritizing its data forwarding.
[0032] If the count values of all ports have not reached the upper limit, it is determined that the scheduling status of each port is balanced, and the arbitration authority of all input ports is uniformly opened, leaving the subsequent scheduling rules to allocate forwarding resources autonomously.
[0033] S104. Send the input port with the service quality arbitration authority to the service quality arbitration for packet forwarding.
[0034] Quality of Service (QoS) arbitration is a free scheduling mechanism for on-chip networks. In step S104, the QoS arbitration completes packet forwarding according to preset priority or round-robin rules.
[0035] Step S104 is the final data forwarding execution stage of this arbitration cycle. After completing the emergency state judgment and the priority permission allocation for the anti-starvation port, all input ports that have obtained the service quality arbitration permission for this round are aggregated and uniformly sent to the built-in service quality arbitration module to complete the data packet forwarding work.
[0036] Specifically, according to the design of steps S101 to S103, in this embodiment of the invention, the permission acquisition scenarios are divided into three types: permission acquisition for ports in a sudden state, permission acquisition for ports under starvation threshold, and unified permission acquisition for all ports. When only the input port in a burst state is granted permission, the arbitration module directly responds to the forwarding request of that port, allowing the burst service data to be output before the anti-starvation process, and prioritizing the transmission of its buffered data packets, thereby preventing the burst service data transmission cycle from being interspersed by other input side data and reducing the performance loss caused by such data jitter. When an input port that is in a starved state gains access, it is after the burst processing. At this time, there are no other input ports that need to be prioritized for burst processing. By completing the transmission of buffered data packets on the input port that is in a starved state separately, the starvation problem of unconditional priority preemption that is easy to occur in traditional service quality arbitration can be avoided, thereby balancing the service quality of various business data. When all input ports have obtained arbitration authority, it indicates that there is no sudden transmission demand or port starvation problem. At this time, the service quality arbitration will activate the preset scheduling mechanism, which will combine fixed priority rules or round-robin rules to fairly and orderly schedule the forwarding requests of multiple input ports, allocate forwarding resources in turn, avoid port conflicts and data out-of-order problems, ensure that multi-port data is smoothly and orderly completed on-chip network routing and forwarding, and maximize the balance between the real-time performance and fairness of network transmission.
[0037] S105. Sequentially determine whether each input port has unforwarded data packets and whether the input port has not obtained the service quality arbitration authority in the current arbitration period. If yes, then increment the anti-starvation counter corresponding to the input port; otherwise, keep the value of the anti-starvation counter corresponding to the input port unchanged.
[0038] In step S105, the conditions for causing the anti-starvation counter corresponding to the input port to accumulate counts further include: The buffer at the input port used to cache the data packets has not reached the preset cache threshold.
[0039] Step S105 also includes: If the input port obtains the service quality arbitration authority within the current arbitration cycle, the anti-starvation counter corresponding to the input port is cleared to 0.
[0040] Specifically, after each arbitration cycle, the anti-starvation counter values for each input port need to be dynamically maintained to accurately record the port scheduling status. After the arbitration cycle ends, all input ports are checked one by one, and the counter update rules are determined based on multiple conditions.
[0041] First, determine whether there are any unprocessed data packets in the input port buffer that have not been forwarded, and whether the port has not obtained service quality arbitration authority in this round. At the same time, check the port buffer occupancy status. Only if the buffer has not reached the preset buffer threshold and there is still data receiving buffer space, perform an auto-increment operation on the anti-starvation counter corresponding to the port to avoid invalid counting statistics caused by port buffer overflow. If an input port successfully obtains arbitration rights and participates in data forwarding in this round, regardless of the number of data forwards, its anti-starvation counter is immediately reset to zero, and the cumulative unscheduled period record is reset. For ports with no data packets to be forwarded, full buffers, or no need for counter updates, the original counter values are kept unchanged. This accurately quantifies the scheduling starvation level of each port, providing accurate data support for the anti-starvation priority scheduling in the next arbitration cycle.
[0042] In this embodiment of the invention, two types of dedicated registers are used to implement burst data identification and port starvation state monitoring, respectively. The hardware architecture is simple and adaptable to the timing requirements of high-speed on-chip network transmission. Among them, a 1-bit wide status register is configured as a burst flag register to mark the burst data transmission status of each input port in real time. During implementation, the writing, clearing and fast reading of the burst status can be completed by simply switching between high and low levels. At the same time, an anti-starvation counter register is independently configured for each input port to accumulate the effective number of times the port has failed to obtain arbitration permission for multiple cycles, so as to accurately quantify the port scheduling starvation state.
[0043] Both types of registers are basic hardware units that are independently configured in the on-chip network during implementation. The read and write logic is simple and the hardware overhead is extremely low. Their status reading and update operations are independent of the core timing path of packet reception, buffering, and forwarding. The status refresh and judgment are only completed during the arbitration scheduling interval. They will not cause delays, blockages or other adverse effects on the original data transmission timing of the on-chip network. The hardware implementation is simple and highly adaptable. Under the premise of ensuring high-speed and stable network transmission, it can efficiently realize the functions of priority scheduling for bursty data and port anti-starvation scheduling.
[0044] The beneficial effects achieved by this invention lie in proposing an on-chip network service quality arbitration method. This method determines the port status hierarchically, prioritizes responding to sudden data forwarding requests, and uses an anti-starvation counter to monitor port scheduling. Ports that have not been granted permission for a long time are given priority in being allocated forwarding privileges, and arbitration scheduling is carried out uniformly when there are no special port requirements. Compared with existing technologies, this invention balances data transmission timeliness and port scheduling fairness, effectively avoiding port starvation and data congestion problems, and improving the forwarding stability of on-chip networks.
[0045] Example 2 This invention also provides an on-chip network service quality arbitration system 200, please refer to... Figure 2 , Figure 2 This is a schematic diagram of the structure of the on-chip network service quality arbitration system provided in an embodiment of the present invention, which includes: The burst detection module 201 is used to acquire data packets received by each input port of the on-chip network router, identify whether the data packets carry burst indication information, and mark the input port corresponding to the data packet carrying the burst indication information as a burst state; wherein, each input port records the cumulative number of times it has failed to obtain service quality arbitration authority within multiple arbitration cycles through an anti-starvation counter; The burst processing module 202 is used to determine whether there is an input port marked as a burst state within the current arbitration cycle. If so, the input port marked as a burst state is granted the service quality arbitration authority within the current arbitration cycle, and the arbitration processing module 204 is executed; otherwise, the anti-starvation processing module 203 is executed. The anti-starvation processing module 203 is used to determine whether there is an input port whose anti-starvation counter value has reached a preset maximum value. If so, it grants the service quality arbitration permission only to that input port and cancels the service quality arbitration permission for all other input ports. If not, it grants the service quality arbitration permission for the current arbitration period to all input ports. Arbitration processing module 204 is used to send the input port with the service quality arbitration authority to the service quality arbitration for data packet forwarding; The anti-starvation detection module 205 is used to sequentially determine whether each of the input ports has unforwarded data packets and whether the input port has not obtained the service quality arbitration authority in the current arbitration period. If so, the anti-starvation counter corresponding to the input port is incremented; otherwise, the value of the anti-starvation counter corresponding to the input port is kept unchanged.
[0046] Furthermore, a register with a data width of 1 is used to record whether the input port is marked as the burst state. The burst processing module 202 determines whether there is an input port marked as the burst state by judging whether there is a register with a value of 1, wherein: If the data packet received by the input port is the first data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration period, then write 1 to the register corresponding to the input port; If the data packet received by the input port is the last data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration cycle, then the register corresponding to the input port is cleared to 0.
[0047] The anti-starvation detection module 205 is also used for: If the input port obtains the service quality arbitration authority within the current arbitration cycle, the anti-starvation counter corresponding to the input port is cleared to 0.
[0048] The on-chip network service quality arbitration system 200 can implement the steps in the on-chip network service quality arbitration method in the above embodiments and achieve the same technical effect. Referring to the description in the above embodiments, it will not be repeated here.
[0049] Example 3 This invention also provides a computer device, please refer to... Figure 3 , Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. The computer device 300 includes: a memory 302, a processor 301, and an on-chip network service quality arbitration program stored in the memory 302 and executable on the processor 301.
[0050] The processor 301 calls the on-chip network service quality arbitration program stored in the memory 302 to execute the steps in the on-chip network service quality arbitration method provided in this embodiment of the invention. Please refer to... Figure 1 Specifically, it includes the following steps: S101. Obtain the data packets received by each input port of the on-chip network router, identify whether the data packets carry burst indication information, and mark the input port corresponding to the data packet carrying the burst indication information as a burst state; wherein, each input port records the cumulative number of times it has failed to obtain service quality arbitration rights within multiple arbitration cycles through an anti-starvation counter.
[0051] S102. During the current arbitration period, determine whether there is an input port marked as a sudden state. If yes, grant the input port marked as a sudden state the service quality arbitration authority during the current arbitration period and execute step S104; otherwise, execute step S103.
[0052] In step S102, a register with a data width of 1 is used to record whether the input port is marked as the burst state, and the presence of a register with a value of 1 is used to confirm whether there is an input port marked as the burst state, wherein: If the data packet received by the input port is the first data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration period, then write 1 to the register corresponding to the input port; If the data packet received by the input port is the last data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration cycle, then the register corresponding to the input port is cleared to 0.
[0053] S103. Determine whether there is an input port where the value of the anti-starvation counter has reached the preset maximum value. If yes, grant the service quality arbitration permission only to that input port and cancel the service quality arbitration permission for all other input ports. If no, grant the service quality arbitration permission for the current arbitration period to all input ports.
[0054] S104. Send the input port with the service quality arbitration authority to the service quality arbitration for packet forwarding.
[0055] In step S104, the quality of service arbitration completes the packet forwarding according to a preset priority or polling rule.
[0056] S105. Sequentially determine whether each input port has unforwarded data packets and whether the input port has not obtained the service quality arbitration authority in the current arbitration period. If yes, then increment the anti-starvation counter corresponding to the input port; otherwise, keep the value of the anti-starvation counter corresponding to the input port unchanged.
[0057] In step S105, the conditions for causing the anti-starvation counter corresponding to the input port to accumulate counts further include: The buffer at the input port used to cache the data packets has not reached the preset cache threshold.
[0058] Step S105 also includes: If the input port obtains the service quality arbitration authority within the current arbitration cycle, the anti-starvation counter corresponding to the input port is cleared to 0.
[0059] The computer device 300 provided in this embodiment of the invention can implement the steps in the on-chip network service quality arbitration method as described in the above embodiments, and can achieve the same technical effect. Referring to the description in the above embodiments, it will not be repeated here.
[0060] Example 4 This invention also provides a storage medium storing an on-chip network service quality arbitration program. When the on-chip network service quality arbitration program is executed by a processor, it implements the various processes and steps in the on-chip network service quality arbitration method provided in this invention and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0061] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by hardware related to an on-chip network service quality arbitration program or instructions. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0062] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0063] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0064] The embodiments of the present invention have been described above with reference to the accompanying drawings. The disclosed embodiments are merely preferred embodiments of the present invention. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many equivalent changes in form under the guidance of the present invention without departing from the spirit and scope of the claims. All such changes are within the protection scope of the present invention.
Claims
1. A method for arbitrating the quality of service (QoS) of an on-chip network, characterized in that, Includes the following steps: S101. Obtain the data packets received by each input port of the on-chip network router, identify whether the data packets carry burst indication information, and mark the input port corresponding to the data packet carrying the burst indication information as a burst state; wherein, each input port records the cumulative number of times it has failed to obtain service quality arbitration rights within multiple arbitration cycles through an anti-starvation counter; S102. During the current arbitration period, determine whether there is an input port marked as a sudden state. If yes, grant the input port marked as a sudden state the service quality arbitration authority during the current arbitration period and execute step S104; otherwise, execute step S103. S103. Determine whether there is an input port where the value of the anti-starvation counter has reached the preset maximum value. If yes, grant the service quality arbitration permission only to that input port and cancel the service quality arbitration permission for all other input ports. If no, grant the service quality arbitration permission for the current arbitration period to all input ports. S104. Send the input port with the service quality arbitration authority to the service quality arbitration for data packet forwarding; S105. Sequentially determine whether each input port has unforwarded data packets and has not obtained the service quality arbitration authority within the current arbitration period. If yes, increment the anti-starvation counter corresponding to the input port. If no, keep the value of the anti-starvation counter corresponding to the input port unchanged.
2. The on-chip network service quality arbitration method according to claim 1, characterized in that, In step S102, a register with a data width of 1 is used to record whether the input port is marked as the burst state, and the presence of a register with a value of 1 is used to confirm whether there is an input port marked as the burst state, wherein: If the data packet received by the input port is the first data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration period, then write 1 to the register corresponding to the input port; If the data packet received by the input port is the last data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration cycle, then the register corresponding to the input port is cleared to 0.
3. The on-chip network service quality arbitration method according to claim 1, characterized in that, In step S105, the conditions for causing the anti-starvation counter corresponding to the input port to accumulate counts further include: The buffer at the input port used to cache the data packets has not reached the preset cache threshold.
4. The on-chip network service quality arbitration method according to claim 1, characterized in that, Step S105 also includes: If the input port obtains the service quality arbitration authority within the current arbitration cycle, the anti-starvation counter corresponding to the input port is cleared to 0.
5. The on-chip network service quality arbitration method according to claim 1, characterized in that, In step S104, the quality of service arbitration completes the packet forwarding according to a preset priority or polling rule.
6. An on-chip network quality of service arbitration system, characterized in that, include: The burst detection module is used to acquire data packets received by each input port of the on-chip network router, identify whether the data packets carry burst indication information, and mark the input port corresponding to the data packet with the burst indication information as a burst state; wherein, each input port records the cumulative number of times it has failed to obtain service quality arbitration rights within multiple arbitration cycles through an anti-starvation counter; The burst handling module is used to determine whether there is an input port marked as a burst state within the current arbitration cycle. If so, the input port marked as a burst state is granted the service quality arbitration authority within the current arbitration cycle, and the arbitration handling module is executed; otherwise, the anti-starvation handling module is executed. The anti-starvation processing module is used to determine whether there is an input port whose anti-starvation counter value has reached a preset maximum value. If so, it grants the service quality arbitration permission only to that input port and cancels the service quality arbitration permission for all other input ports. If not, it grants the service quality arbitration permission for the current arbitration period to all input ports. The arbitration processing module is used to send the input port with the service quality arbitration authority to the service quality arbitration for data packet forwarding; The anti-starvation detection module is used to sequentially determine whether each of the input ports has unforwarded data packets and whether the input port has not obtained the service quality arbitration authority in the current arbitration period. If so, the anti-starvation counter corresponding to the input port is incremented; otherwise, the value of the anti-starvation counter corresponding to the input port is kept unchanged.
7. The on-chip network service quality arbitration system according to claim 6, characterized in that, A register with a data width of 1 is used to record whether the input port is marked as the burst state. The burst processing module determines whether there is an input port marked as the burst state by checking if there is a register with a value of 1. If the data packet received by the input port is the first data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration period, then write 1 to the register corresponding to the input port; If the data packet received by the input port is the last data packet that needs to be forwarded, and the input port has obtained the service quality arbitration authority within the current arbitration cycle, then the register corresponding to the input port is cleared to 0.
8. The on-chip network service quality arbitration system according to claim 6, characterized in that, The anti-starvation detection module is also used for: If the input port obtains the service quality arbitration authority within the current arbitration cycle, the anti-starvation counter corresponding to the input port is cleared to 0.
9. A computer device, characterized in that, include: The system includes a memory, a processor, and an on-chip network quality of service arbitration program stored in the memory and executable on the processor, wherein the processor, when executing the on-chip network quality of service arbitration program, implements the steps of the on-chip network quality of service arbitration method as described in any one of claims 1-5.
10. A storage medium, characterized in that, The storage medium stores an on-chip network service quality arbitration program, which, when executed by the processor, implements the steps of the on-chip network service quality arbitration method as described in any one of claims 1-5.