Arbitration method, apparatus, network-on-chip, and arbiter

CN122985707APending Publication Date: 2026-10-27T-HEAD (SHANGHAI) SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510546867.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

[0050]本发明实施例确定当前仲裁轮次中发出请求的通道,并获取上述各通道在当前仲裁轮次的当前仲裁周期的仲裁状态和前一仲裁周期的仲裁决策结果,进而根据上述信息从上述各通道中确定当前仲裁周期中获得授权的通道。其中,前一仲裁周期的仲裁决策结果包括前一仲裁周期中的授权通道的仲裁状态,各通道的仲裁状态根据各通道的权重和授权计数确定,因此本发明实施例能够避免仲裁单元频繁切换仲裁状态,从而有效降低仲裁切换带来的开销,并提升仲裁效率和仲裁灵活性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122985707A_ABST
    Figure CN122985707A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an arbitration method, device, network on chip and arbitrator. Embodiments of the present application determine channels sending requests in a current arbitration round, and acquire arbitration states of the channels in a current arbitration period of the current arbitration round and arbitration decision results of a previous arbitration period, and then determine a channel obtaining authorization in the current arbitration period from the channels according to the information. The arbitration decision results of the previous arbitration period include arbitration states of authorized channels in the previous arbitration period, and the arbitration states of the channels are determined according to weights and authorization counts of the channels, so that embodiments of the present application can avoid frequent switching of arbitration states by an arbitration unit, thereby effectively reducing overheads caused by arbitration switching, and improving arbitration efficiency and arbitration flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of semiconductor technology, and more specifically, to an arbitration method, apparatus, on-chip network, and arbitrator. Background Technology

[0002] To reduce data and transmission latency and ensure fair bandwidth allocation across channels in a Network On Chip (NOC), the NOC's arbitration unit allocates bandwidth through arbitration. However, existing arbitration mechanisms typically follow fixed algorithm logic, resulting in a lack of flexibility and significant overhead for the arbitration unit. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide an arbitration method, apparatus, on-chip network, and arbitrator to avoid frequent switching of arbitration states by the arbitration unit, thereby effectively reducing the overhead caused by arbitration switching and improving arbitration efficiency and flexibility.

[0004] In a first aspect, embodiments of the present invention provide an arbitration method, the method comprising:

[0005] In the current arbitration round, candidate channels are determined, and the candidate channels are those that have made requests in the current arbitration round.

[0006] Obtain the first arbitration status of each candidate channel in the current arbitration cycle of the current arbitration round and the arbitration decision result of the previous arbitration cycle. The first arbitration status is determined based on the weight and authorization count of the candidate channel, and the arbitration decision result includes the second arbitration status of the authorized channel in the previous arbitration cycle.

[0007] The target channel is determined based on the first arbitration status and the arbitration decision result, wherein the target channel is the channel authorized in the current arbitration cycle.

[0008] Optionally, the authorization count is determined in the following manner:

[0009] The maximum cumulative authorization value of the candidate channel is determined based on the weights.

[0010] The initial value of the authorization count is determined to be 0;

[0011] In response to the candidate channel receiving an authorization, determine whether the authorization count has reached the maximum authorization accumulation value;

[0012] In response to the authorization count not reaching the maximum authorization accumulation value, the authorization count is incremented once;

[0013] In response to the authorization count reaching the maximum accumulated authorization value, the authorization count is reset to the initial value.

[0014] Optionally, the first arbitration status includes a first status and a second status;

[0015] The first arbitration status is determined in the following manner:

[0016] In response to the authorization count reaching the maximum authorization accumulation value, the first arbitration status is updated.

[0017] Optionally, the method further includes:

[0018] Obtain the round lag value of the candidate channel;

[0019] The step of determining the target channel based on the first arbitration status and the arbitration decision result includes:

[0020] The target channel is determined based on the round lag value, the first arbitration status, and the arbitration decision result.

[0021] Optionally, determining the target channel based on the round lag value, the first arbitration status, and the arbitration decision result includes:

[0022] In response to the existence of at least one candidate channel having a round lag value that is not 0, the candidate channel with the round lag value that is not 0 is identified as a first type of channel;

[0023] The target channel is determined based on the third arbitration status of each of the first-type channels and the arbitration decision result.

[0024] Optionally, determining the target channel based on the round lag value, the first arbitration status, and the arbitration decision result includes:

[0025] In response to the fact that the round lag value of each of the candidate channels is 0, the target channel is determined based on each of the first arbitration states and the arbitration decision results.

[0026] Optionally, the arbitration decision result may also include the first channel identifier of the authorized channel;

[0027] The step of determining the target channel based on the first arbitration status and the arbitration decision result includes:

[0028] A second type of channel is determined, which is the candidate channel that matches the first arbitration status and the second arbitration status;

[0029] The second channel identifier is determined based on the first channel identifier, and the second channel identifier is the channel identifier of the next channel of the authorized channel;

[0030] Using the second channel identifier as the starting point, the target channel is determined from the second type of channels using a standard polling method.

[0031] Optionally, determining the target channel based on the first arbitration status and the arbitration decision result further includes:

[0032] In response to the authorization count of each of the second type of channels reaching the maximum authorization accumulation value, the second type of channels are removed from the candidate channels, and the remaining candidate channels are obtained as the third type of channels; or

[0033] In response to the absence of the second type of channel, the candidate channel is determined to be the third type of channel; and

[0034] The third channel identifier is determined based on the first channel identifier, and the third channel identifier is the channel identifier of the next channel after the authorized channel;

[0035] Using the third channel identifier as the starting point for polling, the target channel is determined from the third type of channels using a standard polling method.

[0036] Secondly, embodiments of the present invention provide an arbitration device, the device comprising:

[0037] A channel determination unit is used to determine candidate channels in the current arbitration round, wherein the candidate channels are the channels that made requests in the current arbitration round;

[0038] The information acquisition unit is used to acquire the first arbitration status of each candidate channel in the current arbitration cycle of the current arbitration round and the arbitration decision result of the previous arbitration cycle. The first arbitration status is determined according to the weight and authorization count of the candidate channel, and the arbitration decision result includes the second arbitration status of the authorized channel in the previous arbitration cycle.

[0039] An arbitration unit is used to determine a target channel based on the first arbitration status and the arbitration decision result, wherein the target channel is the channel that has been authorized in the current arbitration cycle.

[0040] Thirdly, embodiments of the present invention provide an on-chip network, the on-chip network comprising:

[0041] The authorization counter is configured to record the authorization count for the corresponding channel;

[0042] An arbitrator is configured to determine candidate channels in the current arbitration round, the candidate channels being channels that have issued requests in the current arbitration round; obtain a first arbitration status for each candidate channel in the current arbitration cycle of the current arbitration round and an arbitration decision result from the previous arbitration cycle; the first arbitration status is determined based on the weight and authorization count of the candidate channel; the arbitration decision result includes a second arbitration status of the authorized channel in the previous arbitration cycle; and determine a target channel based on the first arbitration status and the arbitration decision result, the target channel being the channel that has been authorized in the current arbitration cycle.

[0043] Optionally, the on-chip network further includes:

[0044] The lag polling counter is configured to record the lag value of the corresponding channel's polling number;

[0045] The arbitrator is further configured to:

[0046] The target channel is determined based on the round lag value, the first arbitration status, and the arbitration decision result.

[0047] Fourthly, embodiments of the present invention provide an arbitrator for implementing the method as described in any one of the first aspects.

[0048] Fifthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in any one of the first aspects.

[0049] In a sixth aspect, embodiments of the present invention provide a computer program product comprising a computer program / instructions, which, when executed by a processor, implement the method as described in any one of the first aspects.

[0050] This invention identifies the channel that issued the request in the current arbitration round and obtains the arbitration status of each channel in the current arbitration cycle and the arbitration decision result of the previous arbitration cycle. Based on this information, it then determines the channel that will be authorized in the current arbitration cycle. The arbitration decision result of the previous arbitration cycle includes the arbitration status of the authorized channel in the previous arbitration cycle. The arbitration status of each channel is determined according to its weight and authorization count. Therefore, this invention avoids frequent switching of arbitration status by the arbitration unit, effectively reducing the overhead of arbitration switching and improving arbitration efficiency and flexibility. Attached Figure Description

[0051] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which:

[0052] Figure 1 This is a flowchart of the arbitration method according to an embodiment of the present invention;

[0053] Figure 2 This is a flowchart illustrating the process of determining the authorized count in an embodiment of the present invention;

[0054] Figure 3 This is a flowchart of the arbitration method according to an embodiment of the present invention;

[0055] Figure 4 This is a schematic diagram of the arbitration device according to an embodiment of the present invention;

[0056] Figure 5 This is a schematic diagram of an embodiment of the on-chip network of the present invention. Detailed Implementation

[0057] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.

[0058] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.

[0059] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".

[0060] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0061] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0062] In a shared resource environment (such as a shared bus or a situation where multiple master devices access the same slave device), when multiple master devices attempt to access the same slave device simultaneously, an arbitration mechanism is needed to determine which master device can obtain access. The arbitration request channel (hereinafter referred to as the channel) is a dedicated path for transmitting arbitration information. It allows each master device to send a request signal to the arbiter, indicating its desire to use the shared resource. The arbiter, based on a certain algorithm, determines which master device obtains the current access right and notifies that master device to begin transmitting data. This mechanism ensures orderly management of access to shared resources, even under high load conditions, avoiding conflicts and deadlocks.

[0063] Existing technologies can arbitrate channels in various arbitration rounds using multiple methods. Common arbitration mechanisms include Strict Round Robin (SRR) and Weighted Round Robin (WRR). Strict Round Robin is an arbitration mechanism with relatively high overall fairness, where each channel has an equal status in the round and there is no priority difference. However, in practical applications, not all channels will send a request to the arbitration unit in each arbitration round. Therefore, this arbitration mechanism can lead to the arbitration unit considering a channel that has not sent a request as eligible for authorization, even if the channel has not sent a request. This results in a waste of bandwidth resources during an authorization period if a channel that has not sent a request is granted authorization. Furthermore, this arbitration mechanism reduces the update frequency of authorization rounds, which can easily cause data latency and transmission delays.

[0064] To avoid this situation, some arbitration units will arbitrate channels using a weighted round-robin scheduling method. Weighted round-robin, also known as the weighted round-robin scheduling algorithm, is an arbitration mechanism with relatively high local fairness. The arbitration unit determines the maximum number of authorizations each channel can obtain in the current arbitration round based on the weights of the requesting channels. Starting with the first requesting channel, each requesting channel is assigned an authorization channel for each authorization period in the order of its requests. Each time a requesting channel is assigned an authorization channel, its authorization counter is decremented by 1 from the maximum number of authorizations until it reaches 0. Then, the arbitration unit assigns the next requesting channel to the authorization channel until its authorization counter reaches 0. This continues until the authorization counter of the last requesting channel reaches 0. However, this method means that even if a later-ranked channel makes a request, it can only obtain authorization in a later arbitration period. If a later-ranked channel has a larger weight, it can easily cause data and transmission delays due to delayed requests.

[0065] To address the aforementioned issues, embodiments of the present invention propose an arbitration method, apparatus, on-chip network, and arbitrator to avoid frequent switching of arbitration states by the arbitration unit, thereby effectively reducing the overhead caused by arbitration switching and improving arbitration efficiency and flexibility.

[0066] The following describes the method through examples. Figure 1 This is a flowchart of the arbitration method according to an embodiment of the present invention. Figure 1 As shown, the method in this embodiment includes the following steps:

[0067] Step S100: Determine the candidate channel in the current arbitration round.

[0068] The on-chip network (BTC) is equipped with channels for data transmission and inter-device communication, which can be physical channels (including BTC input channels, output channels, etc.) or logical channels. Channels send various requests, such as data transmission requests, control and coordination requests, route probing requests, and low-power requests, to achieve purposes such as data transmission, reserving bandwidth or data receiver buffer resources, probing link status, and requesting link power shutdown. To ensure system responsiveness, reduce conflicts between devices caused by prolonged resource occupation by some devices, and ensure fairness and load balancing in channel arbitration, the BTC also includes an arbitration unit. The arbitration unit can arbitrate each channel according to an arbitration round and / or an arbitration cycle within the arbitration round, ensuring that authorized channels are allowed to access shared resources or perform specific operations. Therefore, in this step, the arbitration unit can identify the channel that sends a request in the current arbitration round as a candidate channel.

[0069] Step S200: Obtain the first arbitration status of each candidate channel in the current arbitration cycle of the current arbitration round and the arbitration decision result of the previous arbitration cycle.

[0070] The underlying resources of a network-on-a-chip (including physical links, cross switches, buffers, etc.) can usually only be used by one channel at a time. Therefore, in order to ensure the fairness of the use of underlying resources by each channel, an arbitration round can include multiple arbitration cycles. The arbitration unit can determine the channel that is authorized in each arbitration cycle so that each channel can use the underlying resources in the corresponding arbitration cycle.

[0071] This embodiment improves upon the Weighted Round Robin (WRR) scheduling algorithm, allowing the arbitration unit to conduct arbitration in each arbitration cycle based on the arbitration status of each candidate channel in the current cycle and the arbitration decision result of the previous arbitration cycle. The weighted round robin scheduling algorithm determines the number of times each channel can obtain authorization in each arbitration round based on the weight of each channel. When making arbitration decisions, the arbitration unit does not consider channels that have not issued requests; therefore, the maximum number of arbitration cycles in each arbitration round can be determined based on the active channel weight corresponding to that arbitration round. For example, if the active channel weight in the current arbitration round is 12, then the maximum number of arbitration cycles in the current arbitration round can be determined to be 12.

[0072] In this embodiment, each channel records its arbitration status via an arbitration status signal, and the arbitration unit also records the arbitration result of the previous arbitration cycle via an arbitration status recording signal. Therefore, in this step, the arbitration unit can obtain the arbitration status of each candidate channel in the current arbitration round (i.e., the first arbitration status) and the arbitration decision result of the previous arbitration cycle.

[0073] In this embodiment, the on-chip network is equipped with an authorization counter for each channel. The authorization counter, also known as a weight counter, is used to record the authorization count for any channel, that is, the number of times the channel has been authorized in the current authorization round, and to determine the arbitration status of the channel based on the channel's weight and authorization count.

[0074] Specifically, the arbitration status of each channel can be either a first state or a second state, where the first state can be represented by 0 and the second state by 1, and the initial arbitration status of each channel is the first state. Therefore, after obtaining the authorization count of the candidate channels, for any candidate channel, if the authorization count of the candidate channel reaches the maximum authorization accumulation value, the arbitration status of the candidate channel can be updated once. Specifically, for any candidate channel, if the arbitration status of the candidate channel is 0, the arbitration status of the candidate channel can be updated to 1; if the arbitration status of the candidate channel is 1, the arbitration status of the candidate channel can be updated to 0.

[0075] In this step, the previous arbitration period can refer not only to the arbitration period preceding the current arbitration round, but also to the arbitration period preceding the previous arbitration round. For example, if the current arbitration period is the first arbitration period of the second arbitration round, then the previous arbitration period is the last arbitration period of the first arbitration round. The arbitration decision result of the previous arbitration period can include the arbitration status of the authorized channel in the previous arbitration period (i.e., the second arbitration status).

[0076] Figure 2 This is a flowchart illustrating the process of determining the authorization count in an embodiment of the present invention. For example... Figure 2 As shown, in this embodiment, the channel authorization count can be determined through the following steps:

[0077] Step S200A: Determine the maximum cumulative authorized value of the candidate channel based on the weight.

[0078] Taking candidate channels as an example, in this step, the weight of each candidate channel, or the product of the weight of each candidate channel and a preset positive integer, can be determined as the maximum cumulative authorization value for each candidate channel. The maximum cumulative authorization value is also the maximum number of times a candidate channel can obtain authorization in the current arbitration round. For example, if the weight W2 of channel C1 is 2, then the maximum cumulative authorization value corresponding to channel C1 can be determined to be 2.

[0079] Step S200B: Determine the initial value of the authorization count to be 0.

[0080] The authorization counter does not record the number of times a candidate channel was authorized in the previous arbitration cycle, so the initial value of the authorization count for each candidate channel in each arbitration round can be set to 0.

[0081] It is easy to understand that in the embodiment, steps S200A and S200B can be executed simultaneously or sequentially, and this embodiment does not impose any restrictions on this.

[0082] In step S200C, in response to a candidate channel receiving an authorization, it is determined whether the authorization count has reached the maximum accumulated authorization value.

[0083] Each time a candidate channel receives an authorization, the authorization counter can check the authorization count. If the authorization count has not reached the maximum accumulated authorization value, step S200D can be executed; otherwise, step S200E can be executed.

[0084] Step S200D: Accumulate the authorization count once.

[0085] For each candidate channel, if the weight count of that channel still does not reach the maximum accumulated authorization value after one accumulation (i.e., the weight count of that candidate channel in the current authorization period is less than the maximum accumulated authorization value - 1), then the authorization counter can be accumulated once for each authorization granted to that candidate channel. Since an authorized channel can only obtain authorization once in each arbitration period, the accumulated value of the authorization counter is 1 in each accumulation.

[0086] Step S200E: Reset the authorization count to its initial value.

[0087] For each candidate channel, if the authorization count of the candidate channel reaches the maximum authorization accumulation value after the weight count of the channel is accumulated once, that is, the weight count of the candidate channel in the current authorization period is equal to the maximum authorization accumulation value - 1, it means that the candidate channel can no longer obtain authorization in the current arbitration round. Therefore, the authorization counter can reset the authorization count of the candidate channel to the initial value, that is, reset it to 0.

[0088] Step S300: Determine the target channel based on the first arbitration status and the arbitration decision result.

[0089] After determining the arbitration status of each candidate channel and the arbitration decision results of the previous arbitration cycle, the arbitration unit can determine the target channel authorized in the current arbitration cycle from among the candidate channels based on the above information.

[0090] To ensure the efficiency and orderliness of the arbitration process, it is necessary to ensure that the arbitration status of the authorized channel in the arbitration decision of the previous arbitration cycle is not frequently updated. Therefore, in one possible implementation, the arbitration unit can determine the candidate channel (i.e., the second type of channel) that matches the arbitration status of the authorized channel in the arbitration decision of the previous arbitration cycle from the candidate channels, and determine the target channel from these second type of channels.

[0091] In this embodiment, the arbitration decision result of the previous arbitration cycle may further include the channel identifier of the authorized channel in the previous arbitration cycle (i.e., the first channel identifier). Therefore, optionally, to ensure the fairness of the arbitration process, the arbitration unit may also determine the channel identifier of the next channel of the authorized channel as the second channel identifier based on the channel identifier of the authorized channel in the previous arbitration cycle, and then use the second channel identifier as the starting point for polling to determine the target channel from the second type of channels using a standard polling method. It is easy to understand that if there is no previous arbitration cycle, the second channel identifier can be defaulted to the channel identifier of the first channel, and the authorization status of the authorized channel in the previous arbitration cycle can be defaulted to the initial value of 0.

[0092] For example, an on-chip network includes five channels: C1, C2, C3, C4, and C5. The weight ratio of each channel is W1:W2:W3:W4:W5 = 2:3:4:5:6, where W1 is the weight corresponding to channel C1, W2 is the weight corresponding to channel C2, W3 is the weight corresponding to channel C3, W4 is the weight corresponding to channel C4, and W5 is the weight corresponding to channel C5. The arbitration unit can determine that the channels making requests in the current arbitration round (i.e., candidate channels) are channels C1, C3, and C5, and obtain the authorization status of each candidate channel in the current arbitration cycle and the arbitration decision result of the previous arbitration cycle. In the first arbitration cycle of the first arbitration round, the arbitration unit can determine that the arbitration decision result of the previous arbitration cycle was that there were no authorized channels in the previous arbitration cycle. Therefore, it can determine that the authorization status is initially set to 0, and it can determine that the arbitration status of each candidate channel in the current arbitration cycle is 0, which matches the authorization status of the previous arbitration cycle. Therefore, the arbitration unit can identify the second channel as the channel identifier of channel C1, and use the channel identifier of channel C1 as the polling starting point. Using the standard polling method, the second type of channel, i.e., channel C1, which is closest to the polling starting point, is identified as the target channel for the first arbitration cycle.

[0093] In the second arbitration cycle of the first arbitration round, the arbitration unit can determine that the arbitration status of each candidate channel in the current arbitration cycle matches the authorization status of the previous arbitration cycle based on the arbitration decision result of the previous arbitration cycle (i.e., the authorized channel is channel C1, and the authorization status is 0). The second channel identifier is then determined to be the channel identifier of channel C2. Furthermore, the arbitration unit can use the channel identifier of channel C2 as the polling starting point and, using a standard polling method, determine the second type of channel closest to the polling starting point, i.e., channel C3, as the target channel. Similarly, the arbitration unit can determine the target channels for the third to sixth arbitration cycles of the first arbitration round as channels C5, C1, C3, and C5, respectively.

[0094] In the fifth arbitration cycle of the first arbitration round, channel C1's authorization count reached the maximum cumulative authorization value of 2. From the fifth arbitration cycle of the first arbitration round onwards, channel C1's arbitration status was updated to 1. Therefore, in the seventh arbitration cycle of the first arbitration round, the arbitration unit can determine that the arbitration status of channels C3 and C5 in the current arbitration cycle matches the authorization status of the previous arbitration cycle based on the arbitration decision result of the previous arbitration cycle (i.e., the authorized channel is channel C5, and the authorization status is 0). The second channel identifier is then determined to be the channel identifier of channel C1. Furthermore, the arbitration unit can use the channel identifier of channel C1 as the polling starting point and, using a standard polling method, determine the second type of channel closest to the polling starting point, i.e., channel C3, as the target channel. Similarly, the arbitration unit can determine the target channels for the eighth to tenth arbitration cycles of the first arbitration round as channels C5, C3, and C5, respectively.

[0095] In the 10th arbitration cycle of the first arbitration round, the authorization count for channel C3 reached the maximum cumulative authorization value of 4. From the 10th arbitration cycle of the first arbitration round onwards, the arbitration status of channel C3 was also updated to 1. Therefore, in the 11th arbitration cycle of the first arbitration round, the arbitration unit can determine that the arbitration status of channel C5 in the current arbitration cycle matches the authorization status of the previous arbitration cycle based on the arbitration decision result of the previous arbitration cycle (i.e., the authorized channel is channel C5, and the authorization status is 0), and determine the second channel identifier as the channel identifier of channel C1. Furthermore, the arbitration unit can use the channel identifier of channel C1 as the polling starting point and, using a standard polling method, determine the second type of channel closest to the polling starting point, i.e., channel C5, as the target channel. Similarly, the arbitration unit can determine channel C5 as the target channel in the 12th arbitration cycle of the first arbitration round.

[0096] In another optional implementation, if the number of authorizations for any second-type channel in any arbitration cycle reaches the maximum cumulative authorization value of that second-type channel minus 1, and that second-type channel has been authorized in that arbitration cycle, the arbitration unit can determine that the second-type channel will no longer participate in arbitration and remove it from the candidate channels. Therefore, if the authorization count of each second-type channel in the current arbitration round reaches the maximum cumulative authorization value, the arbitration unit can remove all second-type channels from the candidate channels and determine the remaining candidate channels, i.e., those candidate channels whose arbitration status does not match the authorized channel's arbitration decision result in the previous arbitration cycle, as third-type channels, and determine the target channel from these third-type channels. Alternatively, if there are no second-type channels among the candidate channels, i.e., the arbitration status of each candidate channel does not match the authorized channel's arbitration decision result in the previous arbitration cycle, the arbitration unit can determine all candidate channels as third-type channels.

[0097] In this embodiment, the arbitration decision result of the previous arbitration cycle may also include the channel identifier of the authorized channel in the previous arbitration cycle. Therefore, optionally, the arbitration unit may also determine the channel identifier of the next channel of the authorized channel as the third channel identifier based on the channel identifier of the authorized channel in the previous arbitration cycle, and then use the third channel identifier as the polling starting point to determine the target channel from the third type of channels in a standard polling manner.

[0098] The specific implementation method for determining the target channel from the third type of channel can be referred to the specific implementation method for determining the target from the second type of channel, and will not be repeated here.

[0099] It is easy to understand that after the arbitration unit first identifies the target channel from the third type of channel in any arbitration cycle, the second arbitration status in the arbitration decision result of the next arbitration cycle is updated to the arbitration status of the third type of channel. Therefore, from the next arbitration cycle onwards, the arbitration unit still identifies the target channel from the candidate channels that match the authorization status of the previous arbitration cycle.

[0100] In the aforementioned optional implementations, before determining any candidate channel as the target channel for each arbitration cycle, the arbitration unit can perform a validity check on the requests sent by that channel. Taking a data transmission request as an example, the arbitration unit can check that the initiator of the data transmission request has data to transmit, i.e., the send buffer is not empty, and check that the target resource is available, i.e., the data receiver is trusted or the flow control signal allows transmission. It also checks whether the protocol allows it, i.e., whether the request timing is met. If the validity check passes, it means that the authorized channel can use the underlying resources for data transmission in the current arbitration round. Therefore, optionally, the arbitration unit can determine any candidate channel as the target channel after determining that the request sent by any candidate channel has passed the validity check.

[0101] In this embodiment, if the activity levels of active channels are relatively similar, meaning that each active channel will issue a request in the same arbitration round, the arbitration status of each active channel is usually consistent. This embodiment prioritizes authorizing the channel whose arbitration status matches the authorization status of the authorized channel in the arbitration decision result of the previous arbitration cycle. This avoids frequent switching of arbitration status by the arbitration unit, thus enabling faster arbitration decisions. This effectively improves the flexibility and efficiency of channel arbitration while reducing the overhead of arbitration switching.

[0102] After determining the target channel, the arbitration unit can allocate bandwidth based on the virtual data volume and bandwidth limit of the target channel using various existing methods. The virtual data volume can be the data volume of a data transmission request or the equivalent resource occupancy corresponding to a non-data transmission request. The equivalent resource occupancy is the fixed unit of resource occupied by the request, which can be set according to actual needs. For example, if the request sent by the channel is a control request, the equivalent resource occupancy of the control request can be set to 1 flit (i.e., 16 bytes); if the request sent by the channel is a resource reservation request, the data volume of the resource reservation request can be determined based on the occupancy time of the resource reservation request, which is occupancy time * link rate.

[0103] The bandwidth limit can be the maximum bandwidth allowed for a channel under the arbitration mechanism. The arbitration unit can dynamically adjust the bandwidth limit of each channel in each arbitration cycle using various existing methods. In this embodiment, where hardware permits, the arbitration unit can allow the bandwidth limit of a channel to reach the total bandwidth of the on-chip network in some arbitration cycles, but the long-term average bandwidth of the channel needs to conform to the weight ratio between the channels. That is, for any channel, the long-term average bandwidth of the channel is the product of the ratio of the channel's weight to the sum of the weights of all channels and the total bandwidth of the on-chip network.

[0104] For example, the total bandwidth of an on-chip network is 2000Mbps. The on-chip network includes five channels: C1, C2, C3, C4, and C5. The weight ratio of each channel is W1:W2:W3:W4:W5 = 2:3:4:5:6, where W1 is the weight corresponding to channel C1, W2 is the weight corresponding to channel C2, W3 is the weight corresponding to channel C3, W4 is the weight corresponding to channel C4, and W5 is the weight corresponding to channel C5. In a certain arbitration cycle, if channel C1 is granted authorization, then the bandwidth limit for channel C1 in that arbitration cycle can be 2000Mbps. However, the long-term average bandwidth of channel C1 is 200Mbps.

[0105] Furthermore, if there is a significant difference in activity levels among the channels—that is, active channels issue requests in most or even all arbitration rounds, while inactive channels do not issue requests in most or even all arbitration rounds—then for any active channel, the long-term average bandwidth of that active channel can be increased to the product of the ratio of the active channel's weight to the sum of the weights of all active channels and the total bandwidth of the on-chip network. Therefore, the arbitration method in this embodiment can effectively reduce the bandwidth consumption of inactive channels, thereby effectively improving the rationality of bandwidth allocation.

[0106] This invention identifies the channel that issued the request in the current arbitration round and obtains the arbitration status of each channel in the current arbitration cycle and the arbitration decision result of the previous arbitration cycle. Based on this information, it then determines the channel that will be authorized in the current arbitration cycle. The arbitration decision result of the previous arbitration cycle includes the arbitration status of the authorized channel in the previous arbitration cycle. The arbitration status of each channel is determined according to its weight and authorization count. Therefore, this invention avoids frequent switching of arbitration status by the arbitration unit, effectively reducing the overhead of arbitration switching and improving arbitration efficiency and flexibility.

[0107] Figure 3 This is a flowchart of the arbitration method according to an embodiment of the present invention. Figure 3 As shown, the method of this embodiment of the invention may include the following steps:

[0108] Step S100': Determine the candidate channel in the current arbitration round.

[0109] In this embodiment, the implementation of step S100' is similar to that of step S100, and will not be described again here.

[0110] Step S200': Obtain the round lag value of the candidate channel.

[0111] The on-chip network in this embodiment also includes a deficit round counter for each channel. For each channel, the deficit round counter records the round lag value for that channel. Therefore, in this step, the arbitration unit can obtain the round lag value of each candidate channel from the deficit round counter of each channel.

[0112] The lag value of the channel rounds is the difference between the current arbitration round number and the arbitration round number when the channel issued the request. In this embodiment, the arbitration status of the channel will be updated when the channel has obtained a sufficient number of authorizations in the current arbitration round. Therefore, the slack polling counter can be updated when the arbitration status of the channel changes.

[0113] In this embodiment, the minimum round lag value for each channel is 0. Therefore, if the arbitration status of any channel changes and the round lag value of that channel is 0, the lag counter for that channel will not update the round lag value, and the lag counters for other channels will be incremented by 1 based on the current round lag value. If the arbitration status of any channel changes and the round lag value of that channel is not 0, the lag counters for other channels will not update the corresponding round lag value, and the lag counters for that channel will be decremented by 1 based on the current round lag value.

[0114] Optionally, this embodiment can set an upper limit on the round lag value of the channel to reduce the overhead of the missing polling counter for inactive channels. The upper limit of the round lag value can be set according to actual needs, and this embodiment does not impose any restrictions on it.

[0115] Step S300': Obtain the first arbitration status of each candidate channel in the current arbitration cycle of the current arbitration round and the arbitration decision result of the previous arbitration cycle.

[0116] In this embodiment, the implementation of step S300' is similar to that of step S200, and will not be described again here. Furthermore, steps S200' and S300' can be executed simultaneously or sequentially; this embodiment does not impose any restrictions on this.

[0117] Step S400': Determine the target channel based on the first arbitration status and the arbitration decision result.

[0118] In this step, the arbitration unit can determine the authorized channel in the current arbitration cycle based on the round lag value of each candidate channel, the first arbitration status, and the arbitration decision result of the previous arbitration cycle.

[0119] In this embodiment, the round lag value of the active channel is usually 0. In order to avoid the active channel occupying bandwidth for a long time and causing the requests of the inactive channel to be delayed, the arbitration unit can determine whether the round lag value of each candidate channel is 0. If the round lag value of any candidate channel is not 0, the arbitration unit can determine the channel as the first type of channel, and determine the target channel from the first type of channel according to the arbitration status of the first type of channel (that is, the third arbitration status) and the arbitration decision result of the previous arbitration cycle.

[0120] Specifically, after determining the first type of channel, the arbitration unit can use the first type of channel whose arbitration status matches the arbitration status of the authorized channel in the arbitration decision results of the previous arbitration cycle as the second type of channel, and determine the second channel identifier based on the channel identifier of the next channel of the authorized channel in the previous arbitration cycle. Then, using the second channel identifier as the starting point for polling, the target channel is determined from each second type of channel in a standard polling manner.

[0121] If there is no first-class channel whose arbitration status matches the arbitration status of the authorized channel in the arbitration decision result of the previous arbitration cycle, or if the authorization count of each first-class channel that matches the arbitration status of the authorized channel in the arbitration decision result of the previous arbitration cycle reaches the corresponding maximum authorization accumulation value, the arbitration unit can determine the first-class channel whose arbitration status does not match the arbitration status of the authorized channel in the arbitration decision result of the previous arbitration cycle, or determine the first-class channel after removing the second-class channel as the third-class channel, and determine the third-class channel identifier according to the channel identifier of the next channel of the authorized channel in the previous arbitration cycle, and then determine the target channel from each third-class channel using the third-class channel identifier as the polling starting point in a standard polling manner.

[0122] Furthermore, if the candidate channels also include candidate channels with a round lag value of 0, or if the round lag value of each candidate channel is 0, the arbitration unit can refer to the implementation method of step S300 to determine the target channel from the candidate channels, which will not be elaborated in this step.

[0123] In the aforementioned optional implementations, the arbitration unit can also perform validity checks on requests sent through any candidate channel before determining it as the target channel for each arbitration cycle. The arbitration unit can then determine any candidate channel as the target channel after confirming that a request sent through any candidate channel has passed the validity check.

[0124] In this way, the arbitration unit can identify inactive channels from the channels that made requests based on the round lag value of each channel and give them priority in participating in arbitration. This effectively avoids active channels occupying bandwidth for a long time, causing requests from inactive channels to be delayed. Therefore, it can effectively improve the fairness of channel arbitration and thus improve the fairness of bandwidth allocation in the on-chip network.

[0125] Figure 4 This is a schematic diagram of the arbitration device according to an embodiment of the present invention. Figure 4 As shown, the arbitration device in this embodiment includes a channel determination unit 401, an information acquisition unit 402, and an arbitration unit 403.

[0126] The channel determination unit 401 is used to determine candidate channels in the current arbitration round, wherein the candidate channels are the channels that issue requests in the current arbitration round; the information acquisition unit 402 is used to acquire the first arbitration status of each candidate channel in the current arbitration cycle of the current arbitration round and the arbitration decision result of the previous arbitration cycle, wherein the first arbitration status is determined according to the weight and authorization count of the candidate channel, and the arbitration decision result includes the second arbitration status of the authorized channel in the previous arbitration cycle; the arbitration unit 403 is used to determine the target channel according to the first arbitration status and the arbitration decision result, wherein the target channel is the channel that has been authorized in the current arbitration cycle.

[0127] Furthermore, the authorized count is determined by an accumulation value determination unit, an initial value determination unit, a judgment unit, a counting unit, and a count reset unit.

[0128] The cumulative value determination unit is used to determine the maximum cumulative authorization value of the candidate channel according to the weight; the initial value determination unit is used to determine the initial value of the authorization count as 0; the judgment unit is used to determine whether the authorization count has reached the maximum cumulative authorization value in response to the candidate channel obtaining an authorization; the counting unit is used to accumulate the authorization count once in response to the authorization count not reaching the maximum cumulative authorization value; and the counting reset unit is used to reset the authorization count to the initial value in response to the authorization count reaching the maximum cumulative authorization value.

[0129] Furthermore, the first arbitration status includes a first status and a second status;

[0130] The first arbitration status is determined by the status update unit.

[0131] The status update unit is used to update the first arbitration status in response to the authorization count reaching the maximum authorization accumulation value.

[0132] Furthermore, the device also includes a hysteresis value acquisition unit.

[0133] The hysteresis value acquisition unit is used to acquire the round hysteresis value of the candidate channel;

[0134] The arbitration unit 403 is further configured to determine the target channel based on the round lag value, the first arbitration status, and the arbitration decision result.

[0135] Furthermore, determining the target channel based on the first arbitration status and the arbitration decision result includes:

[0136] In response to the existence of at least one candidate channel having a round lag value that is not 0, the candidate channel with the round lag value that is not 0 is identified as a first type of channel;

[0137] The target channel is determined based on the third arbitration status of each of the first-type channels and the arbitration decision result.

[0138] Furthermore, the arbitration unit 403 includes:

[0139] The first arbitration unit responds to the fact that the round lag value of each of the candidate channels is 0, and determines the target channel based on each of the first arbitration states and the arbitration decision results.

[0140] Furthermore, the arbitration decision result also includes the first channel identifier of the authorized channel;

[0141] The arbitration unit 403 includes a first channel determination subunit, a first identifier determination subunit, and a second channel determination subunit.

[0142] The first channel determination subunit is used to determine the candidate channel that matches the first arbitration status and the second arbitration status as the second type of channel; the first identifier determination subunit is used to determine the second channel identifier based on the first channel identifier, wherein the second channel identifier is the channel identifier of the next channel of the authorized channel; the second channel determination subunit is used to determine the target channel from the second type of channels in a standard polling manner, starting from the second channel identifier.

[0143] Furthermore, the arbitration unit 403 includes a third channel determination subunit or a fourth channel determination subunit, as well as a second identifier determination subunit and a fifth channel determination subunit.

[0144] The third channel determination subunit is configured to remove the second-type channels from the candidate channels and obtain the remaining candidate channels as the third-type channels in response to the fact that the authorization count of each second-type channel has reached the maximum authorization accumulation value; the fourth channel determination subunit is configured to determine the candidate channels as the third-type channels in response to the fact that there are no second-type channels; the second identifier determination subunit is configured to determine the third channel identifier based on the first channel identifier, wherein the third channel identifier is the channel identifier of the next channel of the authorized channel; and the fifth channel determination subunit is configured to determine the target channel from the third-type channels in a standard polling manner, using the third channel identifier as the polling starting point.

[0145] This invention identifies the channel that issued the request in the current arbitration round and obtains the arbitration status of each channel in the current arbitration cycle and the arbitration decision result of the previous arbitration cycle. Based on this information, it then determines the channel that will be authorized in the current arbitration cycle. The arbitration decision result of the previous arbitration cycle includes the arbitration status of the authorized channel in the previous arbitration cycle. The arbitration status of each channel is determined according to its weight and authorization count. Therefore, this invention avoids frequent switching of arbitration status by the arbitration unit, effectively reducing the overhead of arbitration switching and improving arbitration efficiency and flexibility.

[0146] Figure 5 This is a schematic diagram of an on-chip network according to an embodiment of the present invention. Figure 5As shown, the on-chip network in this embodiment includes an authorization counter 501 and an arbitrator (i.e., an arbitration unit) 502. Each channel of the on-chip network is equipped with an authorization counter; therefore, the number of authorization counters in this embodiment can be determined based on the number of channels in the on-chip network. Figure 5 The following example illustrates the use of an authorization counter 501 and an arbitrator 502. The authorization counter 501 and the arbitrator 502 can establish a communication connection via a bus or various existing communication methods.

[0147] In this embodiment of the invention, the authorization counter 501 is configured to record the authorization count of the corresponding channel. The arbitrator 502 is configured to determine candidate channels in the current arbitration round, wherein the candidate channels are the channels that issued requests in the current arbitration round, and to obtain the first arbitration status of each candidate channel in the current arbitration cycle of the current arbitration round and the arbitration decision result of the previous arbitration cycle, wherein the first arbitration status is determined according to the weight and authorization count of the candidate channel, and the arbitration decision result includes the second arbitration status of the authorized channel in the previous arbitration cycle, and then determines the channel that obtains authorization in the current arbitration cycle, i.e., the target channel, based on the first arbitration status and the arbitration decision result.

[0148] In an optional implementation of this invention, the on-chip network may further include a slack polling counter 503. Similar to the license counter 501, each channel of the on-chip network is provided with a slack polling counter 503. Therefore, the number of slack polling counters in this embodiment can be determined based on the number of channels in the on-chip network. Figure 5 The following explanation uses a deficit polling counter 503 as an example. The deficit polling counter 503 and the arbitrator 502 can also establish a communication connection via a bus or various existing communication methods.

[0149] In an optional implementation of this invention, the slack polling counter 503 is configured to record the round lag value of the corresponding channel. The arbitrator 502 is further configured to determine the target channel based on the round lag value of the candidate channel, the first arbitration status, and the arbitration decision result.

[0150] In this embodiment of the invention, both the authorization counter 501 and the vacancy polling counter 503 can be implemented in software or hardware, and this embodiment does not impose any restrictions on this.

[0151] This invention identifies the channel that issued the request in the current arbitration round and obtains the arbitration status of each channel in the current arbitration cycle and the arbitration decision result of the previous arbitration cycle. Based on this information, it then determines the channel that will be authorized in the current arbitration cycle. The arbitration decision result of the previous arbitration cycle includes the arbitration status of the authorized channel in the previous arbitration cycle. The arbitration status of each channel is determined according to its weight and authorization count. Therefore, this invention avoids frequent switching of arbitration status by the arbitration unit, effectively reducing the overhead of arbitration switching and improving arbitration efficiency and flexibility.

[0152] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. An arbitration method, characterized in that, The method includes: In the current arbitration round, candidate channels are determined, and the candidate channels are those that have made requests in the current arbitration round. Obtain the first arbitration status of each candidate channel in the current arbitration cycle of the current arbitration round and the arbitration decision result of the previous arbitration cycle. The first arbitration status is determined based on the weight and authorization count of the candidate channel, and the arbitration decision result includes the second arbitration status of the authorized channel in the previous arbitration cycle. The target channel is determined based on the first arbitration status and the arbitration decision result, wherein the target channel is the channel authorized in the current arbitration cycle.

2. The method according to claim 1, characterized in that, The authorization count is determined in the following manner: The maximum cumulative authorization value of the candidate channel is determined based on the weights. The initial value of the authorization count is determined to be 0; In response to the candidate channel receiving an authorization, determine whether the authorization count has reached the maximum authorization accumulation value; In response to the authorization count not reaching the maximum authorization accumulation value, the authorization count is incremented once; In response to the authorization count reaching the maximum accumulated authorization value, the authorization count is reset to the initial value.

3. The method according to claim 2, characterized in that, The first arbitration status includes a first status and a second status; The first arbitration status is determined in the following manner: In response to the authorization count reaching the maximum authorization accumulation value, the first arbitration status is updated.

4. The method according to claim 1, characterized in that, The method further includes: Obtain the round lag value of the candidate channel; The step of determining the target channel based on the first arbitration status and the arbitration decision result includes: The target channel is determined based on the round lag value, the first arbitration status, and the arbitration decision result.

5. The method according to claim 4, characterized in that, Determining the target channel based on the round lag value, the first arbitration status, and the arbitration decision result includes: In response to the existence of at least one candidate channel having a round lag value that is not 0, the candidate channel with the round lag value that is not 0 is identified as a first type of channel; The target channel is determined based on the third arbitration status of each of the first-type channels and the arbitration decision result.

6. The method according to claim 4, characterized in that, Determining the target channel based on the round lag value, the first arbitration status, and the arbitration decision result includes: In response to the fact that the round lag value of each of the candidate channels is 0, the target channel is determined based on each of the first arbitration states and the arbitration decision results.

7. The method according to claim 1, characterized in that, The arbitration decision result also includes the first channel identifier of the authorized channel; The step of determining the target channel based on the first arbitration status and the arbitration decision result includes: The candidate channels that match the first arbitration status and the second arbitration status are identified as the second type of channels; The second channel identifier is determined based on the first channel identifier, and the second channel identifier is the channel identifier of the next channel of the authorized channel; Using the second channel identifier as the starting point, the target channel is determined from the second type of channels using a standard polling method.

8. The method according to claim 7, characterized in that, The step of determining the target channel based on the first arbitration status and the arbitration decision result further includes: In response to the authorization count of each of the second type of channels reaching the maximum authorization accumulation value, the second type of channels are removed from the candidate channels, and the remaining candidate channels are obtained as the third type of channels; or In response to the absence of the second type of channel, the candidate channel is determined to be the third type of channel; and The third channel identifier is determined based on the first channel identifier, and the third channel identifier is the channel identifier of the next channel after the authorized channel; Using the third channel identifier as the starting point for polling, the target channel is determined from the third type of channels using a standard polling method.

9. An arbitration device, characterized in that, The device includes: A channel determination unit is used to determine candidate channels in the current arbitration round, wherein the candidate channels are the channels that made requests in the current arbitration round; The information acquisition unit is used to acquire the first arbitration status of each candidate channel in the current arbitration cycle of the current arbitration round and the arbitration decision result of the previous arbitration cycle. The first arbitration status is determined according to the weight and authorization count of the candidate channel, and the arbitration decision result includes the second arbitration status of the authorized channel in the previous arbitration cycle. An arbitration unit is used to determine a target channel based on the first arbitration status and the arbitration decision result, wherein the target channel is the channel that has been authorized in the current arbitration cycle.

10. A network-on-a-chip, characterized in that, The on-chip network includes: The authorization counter is configured to record the authorization count for the corresponding channel; An arbitrator is configured to determine candidate channels in the current arbitration round, the candidate channels being channels that have issued requests in the current arbitration round; obtain a first arbitration status for each candidate channel in the current arbitration cycle of the current arbitration round and an arbitration decision result from the previous arbitration cycle; the first arbitration status is determined based on the weight and authorization count of the candidate channel; the arbitration decision result includes a second arbitration status of the authorized channel in the previous arbitration cycle; and determine a target channel based on the first arbitration status and the arbitration decision result, the target channel being the channel that has been authorized in the current arbitration cycle.

11. The on-chip network according to claim 10, characterized in that, The on-chip network also includes: The lag polling counter is configured to record the lag value of the corresponding channel's polling number; The arbitrator is further configured to: The target channel is determined based on the round lag value, the first arbitration status, and the arbitration decision result.

12. An arbitrator, characterized in that, The arbitrator is used to implement the method as described in any one of claims 1-8.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-8.

14. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, implements the method as described in any one of claims 1-8.